aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/cpu/cpufreq/speedstep-lib.c
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2009-06-11 22:59:58 +0930
committerDave Jones <davej@redhat.com>2009-06-15 11:49:43 -0400
commit394122ab144dae4b276d74644a2f11c44a60ac5c (patch)
tree849d4f1e03cab2abacc68a25160ef023ee3da879 /arch/x86/kernel/cpu/cpufreq/speedstep-lib.c
parent[CPUFREQ] powernow-k8: get drv data for correct CPU (diff)
downloadlinux-dev-394122ab144dae4b276d74644a2f11c44a60ac5c.tar.xz
linux-dev-394122ab144dae4b276d74644a2f11c44a60ac5c.zip
[CPUFREQ] cpumask: avoid playing with cpus_allowed in speedstep-ich.c
Impact: don't play with current's cpumask It's generally a very bad idea to mug some process's cpumask: it could legitimately and reasonably be changed by root, which could break us (if done before our code) or them (if we restore the wrong value). We use smp_call_function_single: this had the advantage of being more efficient, too. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> To: cpufreq@vger.kernel.org Cc: Dominik Brodowski <linux@brodo.de> Signed-off-by: Dave Jones <davej@redhat.com>
Diffstat (limited to 'arch/x86/kernel/cpu/cpufreq/speedstep-lib.c')
-rw-r--r--arch/x86/kernel/cpu/cpufreq/speedstep-lib.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/kernel/cpu/cpufreq/speedstep-lib.c b/arch/x86/kernel/cpu/cpufreq/speedstep-lib.c
index 2e3c6862657b..f4c290b8482f 100644
--- a/arch/x86/kernel/cpu/cpufreq/speedstep-lib.c
+++ b/arch/x86/kernel/cpu/cpufreq/speedstep-lib.c
@@ -226,6 +226,7 @@ static unsigned int pentium4_get_frequency(void)
}
+/* Warning: may get called from smp_call_function_single. */
unsigned int speedstep_get_frequency(unsigned int processor)
{
switch (processor) {