1
0
Fork 0
remarkable-linux/arch/x86/kernel/cpu
Rafael J. Wysocki 941f5f0f6e x86: CPU: Fix up "cpu MHz" in /proc/cpuinfo
Commit 890da9cf09 (Revert "x86: do not use cpufreq_quick_get() for
/proc/cpuinfo "cpu MHz"") is not sufficient to restore the previous
behavior of "cpu MHz" in /proc/cpuinfo on x86 due to some changes
made after the commit it has reverted.

To address this, make the code in question use arch_freq_get_on_cpu()
which also is used by cpufreq for reporting the current frequency of
CPUs and since that function doesn't really depend on cpufreq in any
way, drop the CONFIG_CPU_FREQ dependency for the object file
containing it.

Also refactor arch_freq_get_on_cpu() somewhat to avoid IPIs and
return cached values right away if it is called very often over a
short time (to prevent user space from triggering IPI storms through
it).

Fixes: 890da9cf09 (Revert "x86: do not use cpufreq_quick_get() for /proc/cpuinfo "cpu MHz"")
Cc: stable@kernel.org   # 4.13 - together with 890da9cf09
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2017-11-03 08:50:13 -07:00
..
mcheck License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
microcode x86/microcode/intel: Disable late loading on model 79 2017-10-18 15:20:20 +02:00
mtrr License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
.gitignore
Makefile x86: CPU: Fix up "cpu MHz" in /proc/cpuinfo 2017-11-03 08:50:13 -07:00
amd.c x86/cpu/AMD: Fix erratum 1076 (CPB bit) 2017-09-15 11:30:53 +02:00
aperfmperf.c x86: CPU: Fix up "cpu MHz" in /proc/cpuinfo 2017-11-03 08:50:13 -07:00
bugs.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
centaur.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
common.c x86/mm/32: Move setup_clear_cpu_cap(X86_FEATURE_PCID) earlier 2017-09-17 18:59:08 +02:00
cpu.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
cyrix.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
hypervisor.c x86/cpu: remove hypervisor specific set_cpu_features 2017-05-02 11:14:30 +02:00
intel.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
intel_cacheinfo.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
intel_rdt.c x86/intel_rdt: Turn off most RDT features on Skylake 2017-08-25 22:00:45 +02:00
intel_rdt.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
intel_rdt_ctrlmondata.c x86/intel_rdt/mbm: Add mbm counter initialization 2017-08-01 22:41:29 +02:00
intel_rdt_monitor.c x86/intel_rdt/cqm: Improve limbo list processing 2017-08-16 12:05:41 +02:00
intel_rdt_rdtgroup.c x86/intel_rdt: Remove redundant ternary operator on return 2017-08-16 16:20:55 +02:00
match.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mkcapflags.sh License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mshyperv.c x86/hyper-V: Allocate the IDT entry early in boot 2017-09-13 11:02:26 +02:00
perfctr-watchdog.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
powerflags.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
proc.c x86: CPU: Fix up "cpu MHz" in /proc/cpuinfo 2017-11-03 08:50:13 -07:00
rdrand.c x86, asm: Use CC_SET()/CC_OUT() and static_cpu_has() in archrandom.h 2016-06-08 12:41:20 -07:00
scattered.c x86/cpu/AMD: Add the Secure Memory Encryption CPU feature 2017-07-18 11:37:59 +02:00
topology.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
transmeta.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
umc.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
vmware.c vmware: set cpu capabilities during platform initialization 2017-05-02 11:14:24 +02:00