All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH]intel_idle: misuse API
@ 2011-05-24  1:10 Shaohua Li
  0 siblings, 0 replies; only message in thread
From: Shaohua Li @ 2011-05-24  1:10 UTC (permalink / raw)
  To: Len Brown; +Cc: linux acpi

smp_call_function() only lets all other CPUs execute specific
function, while we expect all CPUs do.

BTW, auto_demotion_disable should hook to cpu hotplug to make
sure hot added cpu disable auto demotion really.

Signed-off-by: Shaohua Li <shaohua.li@intel.com>

diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c
index a46dddf..55fbb02 100644
--- a/drivers/idle/intel_idle.c
+++ b/drivers/idle/intel_idle.c
@@ -367,7 +367,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);
 	}
 
@@ -459,7 +459,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;
 }
@@ -499,7 +499,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);
 	}
 



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2011-05-24  1:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-24  1:10 [PATCH]intel_idle: misuse API Shaohua Li

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.