aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/idle
diff options
context:
space:
mode:
authorShaohua Li <shaohua.li@intel.com>2012-01-10 15:48:19 -0800
committerGreg Kroah-Hartman <gregkh@suse.de>2012-01-25 17:24:56 -0800
commite26a6033d0d0183e613a1ae5eafefd3baf7f3e6c (patch)
treeca56051b0cf33f40befec2aa3ba414f99f9b3752 /drivers/idle
parent57700d3c569071c4c43f220de637461850d027a1 (diff)
downloadkernel_samsung_smdk4412-e26a6033d0d0183e613a1ae5eafefd3baf7f3e6c.zip
kernel_samsung_smdk4412-e26a6033d0d0183e613a1ae5eafefd3baf7f3e6c.tar.gz
kernel_samsung_smdk4412-e26a6033d0d0183e613a1ae5eafefd3baf7f3e6c.tar.bz2
intel_idle: fix API misuse
commit 39a74fdedd1c1461d6fb6d330b5266886513c98f upstream. smp_call_function() only lets all other CPUs execute a specific function, while we expect all CPUs do in intel_idle. Without the fix, we could have one cpu which has auto_demotion enabled or has no broadcast timer setup. Usually we don't see impact because auto demotion just harms power and the intel_idle init is called in CPU 0, where boradcast timer delivers interrupt, but this still could be a problem. Signed-off-by: Shaohua Li <shaohua.li@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Len Brown <len.brown@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/idle')
-rw-r--r--drivers/idle/intel_idle.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c
index 19c07c0..026f9aa 100644
--- a/drivers/idle/intel_idle.c
+++ b/drivers/idle/intel_idle.c
@@ -368,7 +368,7 @@ static int intel_idle_probe(void)
if (boot_cpu_has(X86_FEATURE_ARAT)) /* Always Reliable APIC Timer */
lapic_timer_reliable_states = LAPIC_TIMER_ALWAYS_RELIABLE;
else {
- smp_call_function(__setup_broadcast_timer, (void *)true, 1);
+ on_each_cpu(__setup_broadcast_timer, (void *)true, 1);
register_cpu_notifier(&setup_broadcast_notifier);
}
@@ -460,7 +460,7 @@ static int intel_idle_cpuidle_devices_init(void)
}
}
if (auto_demotion_disable_flags)
- smp_call_function(auto_demotion_disable, NULL, 1);
+ on_each_cpu(auto_demotion_disable, NULL, 1);
return 0;
}
@@ -500,7 +500,7 @@ static void __exit intel_idle_exit(void)
cpuidle_unregister_driver(&intel_idle_driver);
if (lapic_timer_reliable_states != LAPIC_TIMER_ALWAYS_RELIABLE) {
- smp_call_function(__setup_broadcast_timer, (void *)false, 1);
+ on_each_cpu(__setup_broadcast_timer, (void *)false, 1);
unregister_cpu_notifier(&setup_broadcast_notifier);
}