diff options
Diffstat (limited to 'drivers/cpufreq/speedstep-centrino.c')
-rw-r--r-- | drivers/cpufreq/speedstep-centrino.c | 28 |
1 files changed, 5 insertions, 23 deletions
diff --git a/drivers/cpufreq/speedstep-centrino.c b/drivers/cpufreq/speedstep-centrino.c index 3a953d519f46..618e6f417b1c 100644 --- a/drivers/cpufreq/speedstep-centrino.c +++ b/drivers/cpufreq/speedstep-centrino.c | |||
@@ -457,7 +457,7 @@ static int centrino_target (struct cpufreq_policy *policy, | |||
457 | unsigned int msr, oldmsr = 0, h = 0, cpu = policy->cpu; | 457 | unsigned int msr, oldmsr = 0, h = 0, cpu = policy->cpu; |
458 | struct cpufreq_freqs freqs; | 458 | struct cpufreq_freqs freqs; |
459 | int retval = 0; | 459 | int retval = 0; |
460 | unsigned int j, k, first_cpu, tmp; | 460 | unsigned int j, first_cpu, tmp; |
461 | cpumask_var_t covered_cpus; | 461 | cpumask_var_t covered_cpus; |
462 | 462 | ||
463 | if (unlikely(!zalloc_cpumask_var(&covered_cpus, GFP_KERNEL))) | 463 | if (unlikely(!zalloc_cpumask_var(&covered_cpus, GFP_KERNEL))) |
@@ -481,10 +481,6 @@ static int centrino_target (struct cpufreq_policy *policy, | |||
481 | for_each_cpu(j, policy->cpus) { | 481 | for_each_cpu(j, policy->cpus) { |
482 | int good_cpu; | 482 | int good_cpu; |
483 | 483 | ||
484 | /* cpufreq holds the hotplug lock, so we are safe here */ | ||
485 | if (!cpu_online(j)) | ||
486 | continue; | ||
487 | |||
488 | /* | 484 | /* |
489 | * Support for SMP systems. | 485 | * Support for SMP systems. |
490 | * Make sure we are running on CPU that wants to change freq | 486 | * Make sure we are running on CPU that wants to change freq |
@@ -522,13 +518,8 @@ static int centrino_target (struct cpufreq_policy *policy, | |||
522 | pr_debug("target=%dkHz old=%d new=%d msr=%04x\n", | 518 | pr_debug("target=%dkHz old=%d new=%d msr=%04x\n", |
523 | target_freq, freqs.old, freqs.new, msr); | 519 | target_freq, freqs.old, freqs.new, msr); |
524 | 520 | ||
525 | for_each_cpu(k, policy->cpus) { | 521 | cpufreq_notify_transition(policy, &freqs, |
526 | if (!cpu_online(k)) | ||
527 | continue; | ||
528 | freqs.cpu = k; | ||
529 | cpufreq_notify_transition(&freqs, | ||
530 | CPUFREQ_PRECHANGE); | 522 | CPUFREQ_PRECHANGE); |
531 | } | ||
532 | 523 | ||
533 | first_cpu = 0; | 524 | first_cpu = 0; |
534 | /* all but 16 LSB are reserved, treat them with care */ | 525 | /* all but 16 LSB are reserved, treat them with care */ |
@@ -544,12 +535,7 @@ static int centrino_target (struct cpufreq_policy *policy, | |||
544 | cpumask_set_cpu(j, covered_cpus); | 535 | cpumask_set_cpu(j, covered_cpus); |
545 | } | 536 | } |
546 | 537 | ||
547 | for_each_cpu(k, policy->cpus) { | 538 | cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE); |
548 | if (!cpu_online(k)) | ||
549 | continue; | ||
550 | freqs.cpu = k; | ||
551 | cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); | ||
552 | } | ||
553 | 539 | ||
554 | if (unlikely(retval)) { | 540 | if (unlikely(retval)) { |
555 | /* | 541 | /* |
@@ -565,12 +551,8 @@ static int centrino_target (struct cpufreq_policy *policy, | |||
565 | tmp = freqs.new; | 551 | tmp = freqs.new; |
566 | freqs.new = freqs.old; | 552 | freqs.new = freqs.old; |
567 | freqs.old = tmp; | 553 | freqs.old = tmp; |
568 | for_each_cpu(j, policy->cpus) { | 554 | cpufreq_notify_transition(policy, &freqs, CPUFREQ_PRECHANGE); |
569 | if (!cpu_online(j)) | 555 | cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE); |
570 | continue; | ||
571 | cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); | ||
572 | cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); | ||
573 | } | ||
574 | } | 556 | } |
575 | retval = 0; | 557 | retval = 0; |
576 | 558 | ||