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
..
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-03 08:50:13 -07:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-08-10 17:35:19 +02:00
2017-06-28 06:54:46 -07:00
2017-10-22 13:06:02 +02:00
2016-12-25 14:30:04 -08:00
2017-11-02 11:10:55 +01:00
2017-09-14 11:59:30 +02:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2016-12-12 19:25:04 -08:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-07-12 16:25:59 -07:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-07-30 12:04:41 +02:00
2017-07-18 11:38:01 +02:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-08-31 21:34:48 +02:00
2017-07-18 11:38:00 +02:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-08-01 13:02:37 +02:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-09-01 11:04:56 +02:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-08-29 11:42:29 +02:00
2017-11-02 11:10:55 +01:00
2017-01-19 08:42:37 +01:00
2017-11-02 11:10:55 +01:00
2017-07-18 11:37:58 +02:00
2017-07-05 10:09:02 +02:00
2016-08-24 12:27:41 +02:00
2017-09-25 09:36:16 +02:00
2017-10-04 18:28:53 +02:00
2017-03-02 08:42:27 +01:00
2017-11-02 11:10:55 +01:00
2017-08-29 12:07:26 +02:00
2017-07-30 12:09:12 +02:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-07-26 13:18:20 +02:00
2017-11-02 11:10:55 +01:00
2016-12-25 10:47:41 +01:00
2017-11-02 11:10:55 +01:00
2017-08-16 20:40:09 +02:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-09-13 10:55:15 +02:00
2017-06-28 06:54:46 -07:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-09-04 13:56:37 -07:00
2017-09-04 13:56:37 -07:00
2017-11-02 11:10:55 +01:00
2017-03-20 16:10:32 +01:00
2017-03-02 08:42:30 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-07-30 12:09:12 +02:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-09-13 09:54:43 +02:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-08-29 11:42:29 +02:00
2017-09-17 18:59:09 +02:00
2017-03-08 09:18:02 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2016-11-16 09:38:23 +01:00
2017-06-15 16:41:10 +02:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-09-29 19:39:44 +02:00
2016-11-18 10:58:31 +01:00
2017-11-02 11:10:55 +01:00
2017-07-03 18:01:50 -07:00
2017-10-10 12:49:49 +02:00
2017-07-26 13:18:20 +02:00
2017-10-23 13:30:36 +02:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-01-28 14:42:26 +01:00