aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/kernel/cpu/proc.c
diff options
context:
space:
mode:
authorGravatar Linus Torvalds <torvalds@linux-foundation.org> 2017-11-10 11:19:11 -0800
committerGravatar Linus Torvalds <torvalds@linux-foundation.org> 2017-11-10 11:19:11 -0800
commitea0ee33988778fb73e4f45e7c73fb735787e2f32 (patch)
tree45ebd3e4347a879157dab48b2bc88f9bf2cf9286 /arch/x86/kernel/cpu/proc.c
parentMerge tag 'drm-fixes-for-v4.14-rc9' of git://people.freedesktop.org/~airlied/... (diff)
downloadlinux-ea0ee33988778fb73e4f45e7c73fb735787e2f32.tar.gz
linux-ea0ee33988778fb73e4f45e7c73fb735787e2f32.tar.bz2
linux-ea0ee33988778fb73e4f45e7c73fb735787e2f32.zip
Revert "x86: CPU: Fix up "cpu MHz" in /proc/cpuinfo"
This reverts commit 941f5f0f6ef5338814145cf2b813cf1f98873e2f. Sadly, it turns out that we really can't just do the cross-CPU IPI to all CPU's to get their proper frequencies, because it's much too expensive on systems with lots of cores. So we'll have to revert this for now, and revisit it using a smarter model (probably doing one system-wide IPI at open time, and doing all the frequency calculations in parallel). Reported-by: WANG Chao <chao.wang@ucloud.cn> Reported-by: Ingo Molnar <mingo@kernel.org> Cc: Rafael J Wysocki <rafael.j.wysocki@intel.com> Cc: stable@kernel.org Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/x86/kernel/cpu/proc.c')
-rw-r--r--arch/x86/kernel/cpu/proc.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/arch/x86/kernel/cpu/proc.c b/arch/x86/kernel/cpu/proc.c
index 4378a729b933..6b7e17bf0b71 100644
--- a/arch/x86/kernel/cpu/proc.c
+++ b/arch/x86/kernel/cpu/proc.c
@@ -78,11 +78,9 @@ static int show_cpuinfo(struct seq_file *m, void *v)
seq_printf(m, "microcode\t: 0x%x\n", c->microcode);
if (cpu_has(c, X86_FEATURE_TSC)) {
- unsigned int freq = arch_freq_get_on_cpu(cpu);
+ unsigned int freq = cpufreq_quick_get(cpu);
if (!freq)
- freq = cpufreq_quick_get(cpu);
- if (!freq)
freq = cpu_khz;
seq_printf(m, "cpu MHz\t\t: %u.%03u\n",
freq / 1000, (freq % 1000));