https://github.com/torvalds/linux
Revision c3274763bfc3bf1ececa269ed6e6c4d7ec1c3e5e authored by Srivatsa S. Bhat on 17 February 2014, 10:48:21 UTC, committed by Rafael J. Wysocki on 19 February 2014, 00:04:56 UTC
The powernow-k8 driver maintains a per-cpu data-structure called
powernow_data that is used to perform the frequency transitions.
It initializes this data structure only for the policy->cpu. So,
accesses to this data structure by other CPUs results in various
problems because they would have been uninitialized.

Specifically, if a cpu (!= policy->cpu) invokes the drivers' ->get()
function, it returns 0 as the KHz value, since its per-cpu memory
doesn't point to anything valid. This causes problems during
suspend/resume since cpufreq_update_policy() tries to enforce this
(0 KHz) as the current frequency of the CPU, and this madness gets
propagated to adjust_jiffies() as well. Eventually, lots of things
start breaking down, including the r8169 ethernet card, in one
particularly interesting case reported by Pierre Ossman.

Fix this by initializing the per-cpu data-structures of all the CPUs
in the policy appropriately.

References: https://bugzilla.kernel.org/show_bug.cgi?id=70311
Reported-by: Pierre Ossman <pierre@ossman.eu>
Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Cc: All applicable <stable@vger.kernel.org>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 6964d91
History
Tip revision: c3274763bfc3bf1ececa269ed6e6c4d7ec1c3e5e authored by Srivatsa S. Bhat on 17 February 2014, 10:48:21 UTC
cpufreq: powernow-k8: Initialize per-cpu data-structures properly
Tip revision: c327476
File Mode Size
.gitignore -rw-r--r-- 151 bytes
Kconfig -rw-r--r-- 5.6 KB
Makefile -rw-r--r-- 2.3 KB
gen_init_cpio.c -rw-r--r-- 12.7 KB
initramfs_data.S -rw-r--r-- 1.3 KB

back to top