Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760412AbcDMLmx (ORCPT ); Wed, 13 Apr 2016 07:42:53 -0400 Received: from terminus.zytor.com ([198.137.202.10]:56634 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965246AbcDMLmt (ORCPT ); Wed, 13 Apr 2016 07:42:49 -0400 Date: Wed, 13 Apr 2016 04:41:47 -0700 From: tip-bot for Borislav Petkov Message-ID: Cc: bp@alien8.de, torvalds@linux-foundation.org, mingo@kernel.org, bp@suse.de, peterz@infradead.org, brgerst@gmail.com, dvlasenk@redhat.com, hpa@zytor.com, tglx@linutronix.de, linux-kernel@vger.kernel.org, luto@amacapital.net Reply-To: luto@amacapital.net, linux-kernel@vger.kernel.org, peterz@infradead.org, brgerst@gmail.com, tglx@linutronix.de, dvlasenk@redhat.com, hpa@zytor.com, bp@suse.de, mingo@kernel.org, torvalds@linux-foundation.org, bp@alien8.de In-Reply-To: <1459837795-2588-4-git-send-email-bp@alien8.de> References: <1459837795-2588-4-git-send-email-bp@alien8.de> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/asm] x86/tsc: Do not check X86_FEATURE_CONSTANT_TSC in notifier call Git-Commit-ID: a841cca74ea7612508aee161c89987b2646ed769 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2019 Lines: 59 Commit-ID: a841cca74ea7612508aee161c89987b2646ed769 Gitweb: http://git.kernel.org/tip/a841cca74ea7612508aee161c89987b2646ed769 Author: Borislav Petkov AuthorDate: Tue, 5 Apr 2016 08:29:52 +0200 Committer: Ingo Molnar CommitDate: Wed, 13 Apr 2016 11:37:43 +0200 x86/tsc: Do not check X86_FEATURE_CONSTANT_TSC in notifier call ... because the notifier-registering routine already does that. Also, rename cpufreq_tsc() init call to something more telling. Signed-off-by: Borislav Petkov Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1459837795-2588-4-git-send-email-bp@alien8.de Signed-off-by: Ingo Molnar --- arch/x86/kernel/tsc.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c index a0346bc..5bb702c 100644 --- a/arch/x86/kernel/tsc.c +++ b/arch/x86/kernel/tsc.c @@ -922,9 +922,6 @@ static int time_cpufreq_notifier(struct notifier_block *nb, unsigned long val, struct cpufreq_freqs *freq = data; unsigned long *lpj; - if (cpu_has(&cpu_data(freq->cpu), X86_FEATURE_CONSTANT_TSC)) - return 0; - lpj = &boot_cpu_data.loops_per_jiffy; #ifdef CONFIG_SMP if (!(freq->flags & CPUFREQ_CONST_LOOPS)) @@ -954,7 +951,7 @@ static struct notifier_block time_cpufreq_notifier_block = { .notifier_call = time_cpufreq_notifier }; -static int __init cpufreq_tsc(void) +static int __init cpufreq_register_tsc_scaling(void) { if (!boot_cpu_has(X86_FEATURE_TSC)) return 0; @@ -965,7 +962,7 @@ static int __init cpufreq_tsc(void) return 0; } -core_initcall(cpufreq_tsc); +core_initcall(cpufreq_register_tsc_scaling); #endif /* CONFIG_CPU_FREQ */