aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c')
-rw-r--r--arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c b/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c
index 8b0dd6f2a1ac..fd561bb26c60 100644
--- a/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c
+++ b/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c
@@ -313,9 +313,10 @@ static unsigned int get_cur_freq(unsigned int cpu)
313 unsigned l, h; 313 unsigned l, h;
314 unsigned clock_freq; 314 unsigned clock_freq;
315 cpumask_t saved_mask; 315 cpumask_t saved_mask;
316 cpumask_of_cpu_ptr(new_mask, cpu);
316 317
317 saved_mask = current->cpus_allowed; 318 saved_mask = current->cpus_allowed;
318 set_cpus_allowed_ptr(current, &cpumask_of_cpu(cpu)); 319 set_cpus_allowed_ptr(current, new_mask);
319 if (smp_processor_id() != cpu) 320 if (smp_processor_id() != cpu)
320 return 0; 321 return 0;
321 322
@@ -554,9 +555,11 @@ static int centrino_target (struct cpufreq_policy *policy,
554 */ 555 */
555 556
556 if (!cpus_empty(covered_cpus)) { 557 if (!cpus_empty(covered_cpus)) {
558 cpumask_of_cpu_ptr_declare(new_mask);
559
557 for_each_cpu_mask_nr(j, covered_cpus) { 560 for_each_cpu_mask_nr(j, covered_cpus) {
558 set_cpus_allowed_ptr(current, 561 cpumask_of_cpu_ptr_next(new_mask, j);
559 &cpumask_of_cpu(j)); 562 set_cpus_allowed_ptr(current, new_mask);
560 wrmsr(MSR_IA32_PERF_CTL, oldmsr, h); 563 wrmsr(MSR_IA32_PERF_CTL, oldmsr, h);
561 } 564 }
562 } 565 }