From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751824AbbKQFDZ (ORCPT ); Tue, 17 Nov 2015 00:03:25 -0500 Received: from terminus.zytor.com ([198.137.202.10]:34891 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750771AbbKQFDY (ORCPT ); Tue, 17 Nov 2015 00:03:24 -0500 Subject: Re: [RFC PATCH -v2.1] x86: Kill notsc To: Thomas Gleixner , Borislav Petkov References: <20151018142007.GA11294@pd.tnic> <20151021175803.GF3575@pd.tnic> <20151021190109.GC2508@worktop.programming.kicks-ass.net> <20151022185122.GC3442@pd.tnic> <20151104102941.GA1235@pd.tnic> <20151116184548.GA20137@pd.tnic> Cc: Peter Zijlstra , x86-ml , Andy Lutomirski , Steven Rostedt , lkml From: "H. Peter Anvin" Message-ID: <564AB4D7.20606@zytor.com> Date: Mon, 16 Nov 2015 21:02:15 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/16/15 13:25, Thomas Gleixner wrote: > On Mon, 16 Nov 2015, Borislav Petkov wrote: >> -/* >> - * disable flag for tsc. Takes effect by clearing the TSC cpu flag >> - * in cpu/common.c >> - */ >> -int __init notsc_setup(char *str) >> +/* Disable the TSC feature flag to avoid further TSC use. */ >> +int __init notsc_setup(void) >> { >> +#ifndef CONFIG_X86_TSC >> setup_clear_cpu_cap(X86_FEATURE_TSC); > > This is silly, really. > > If CONFIG_X86_TSC is disabled then we should just not compile tsc.c at > all and map cpu_has_tsc and stuff depending on it to false. > CONFIG_X86_TSC means TSC is obligatory, not that it is supported. -hpa