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.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c b/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c
index 3031f1196192..908dd347c67e 100644
--- a/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c
+++ b/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c
@@ -315,7 +315,7 @@ static unsigned int get_cur_freq(unsigned int cpu)
315 cpumask_t saved_mask; 315 cpumask_t saved_mask;
316 316
317 saved_mask = current->cpus_allowed; 317 saved_mask = current->cpus_allowed;
318 set_cpus_allowed(current, cpumask_of_cpu(cpu)); 318 set_cpus_allowed_ptr(current, &cpumask_of_cpu(cpu));
319 if (smp_processor_id() != cpu) 319 if (smp_processor_id() != cpu)
320 return 0; 320 return 0;
321 321
@@ -333,7 +333,7 @@ static unsigned int get_cur_freq(unsigned int cpu)
333 clock_freq = extract_clock(l, cpu, 1); 333 clock_freq = extract_clock(l, cpu, 1);
334 } 334 }
335 335
336 set_cpus_allowed(current, saved_mask); 336 set_cpus_allowed_ptr(current, &saved_mask);
337 return clock_freq; 337 return clock_freq;
338} 338}
339 339
@@ -487,7 +487,7 @@ static int centrino_target (struct cpufreq_policy *policy,
487 else 487 else
488 cpu_set(j, set_mask); 488 cpu_set(j, set_mask);
489 489
490 set_cpus_allowed(current, set_mask); 490 set_cpus_allowed_ptr(current, &set_mask);
491 preempt_disable(); 491 preempt_disable();
492 if (unlikely(!cpu_isset(smp_processor_id(), set_mask))) { 492 if (unlikely(!cpu_isset(smp_processor_id(), set_mask))) {
493 dprintk("couldn't limit to CPUs in this domain\n"); 493 dprintk("couldn't limit to CPUs in this domain\n");
@@ -555,7 +555,8 @@ static int centrino_target (struct cpufreq_policy *policy,
555 555
556 if (!cpus_empty(covered_cpus)) { 556 if (!cpus_empty(covered_cpus)) {
557 for_each_cpu_mask(j, covered_cpus) { 557 for_each_cpu_mask(j, covered_cpus) {
558 set_cpus_allowed(current, cpumask_of_cpu(j)); 558 set_cpus_allowed_ptr(current,
559 &cpumask_of_cpu(j));
559 wrmsr(MSR_IA32_PERF_CTL, oldmsr, h); 560 wrmsr(MSR_IA32_PERF_CTL, oldmsr, h);
560 } 561 }
561 } 562 }
@@ -569,12 +570,12 @@ static int centrino_target (struct cpufreq_policy *policy,
569 cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); 570 cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
570 } 571 }
571 } 572 }
572 set_cpus_allowed(current, saved_mask); 573 set_cpus_allowed_ptr(current, &saved_mask);
573 return 0; 574 return 0;
574 575
575migrate_end: 576migrate_end:
576 preempt_enable(); 577 preempt_enable();
577 set_cpus_allowed(current, saved_mask); 578 set_cpus_allowed_ptr(current, &saved_mask);
578 return 0; 579 return 0;
579} 580}
580 581