From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030278AbbKDKWr (ORCPT ); Wed, 4 Nov 2015 05:22:47 -0500 Received: from www.linutronix.de ([62.245.132.108]:48738 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964894AbbKDKWp (ORCPT ); Wed, 4 Nov 2015 05:22:45 -0500 Date: Wed, 4 Nov 2015 11:21:45 +0100 (CET) From: Thomas Gleixner To: Borislav Petkov cc: Peter Zijlstra , x86-ml , Andy Lutomirski , Steven Rostedt , lkml Subject: Re: [PATCH -v2] x86: Kill notsc In-Reply-To: <20151022185122.GC3442@pd.tnic> Message-ID: References: <20151018142007.GA11294@pd.tnic> <20151021175803.GF3575@pd.tnic> <20151021190109.GC2508@worktop.programming.kicks-ass.net> <20151022185122.GC3442@pd.tnic> User-Agent: Alpine 2.11 (DEB 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 22 Oct 2015, Borislav Petkov wrote: > u64 native_sched_clock(void) > { > - if (static_branch_likely(&__use_tsc)) { > - u64 tsc_now = rdtsc(); > - > - /* return the value in ns */ > - return cycles_2_ns(tsc_now); > - } > - > +#ifdef CONFIG_X86_TSC > + /* return the value in ns */ > + return cycles_2_ns(rdtsc()); > +#else > /* > - * Fall back to jiffies if there's no TSC available: > - * ( But note that we still use it if the TSC is marked > - * unstable. We do this because unlike Time Of Day, > - * the scheduler clock tolerates small errors and it's > - * very important for it to be as fast as the platform > - * can achieve it. ) > + * Fall back to jiffies if there's no TSC available: ( But note that we > + * still use it if the TSC is marked unstable. We do this because unlike > + * Time Of Day, the scheduler clock tolerates small errors and it's very > + * important for it to be as fast as the platform can achieve it. ) This comment does not make any sense with this modification. Thanks, tglx