* [patch 1/2]intel_idle: fix misuse API - resend
@ 2011-06-03 2:42 Shaohua Li
2011-06-13 2:51 ` Shaohua Li
0 siblings, 1 reply; 2+ messages in thread
From: Shaohua Li @ 2011-06-03 2:42 UTC (permalink / raw)
To: linux acpi; +Cc: Len Brown, Andrew Morton
smp_call_function() only lets all other CPUs execute specific
function, while we expect all CPUs do in intel_idle. Without
the fix, we could have one cpu has auto_demotion enabled or
has no boradcast 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>
---
drivers/idle/intel_idle.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
Index: linux/drivers/idle/intel_idle.c
===================================================================
--- linux.orig/drivers/idle/intel_idle.c 2011-05-27 16:47:06.000000000 +0800
+++ linux/drivers/idle/intel_idle.c 2011-06-03 09:47:30.000000000 +0800
@@ -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_in
}
}
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 [flat|nested] 2+ messages in thread* Re: [patch 1/2]intel_idle: fix misuse API - resend
2011-06-03 2:42 [patch 1/2]intel_idle: fix misuse API - resend Shaohua Li
@ 2011-06-13 2:51 ` Shaohua Li
0 siblings, 0 replies; 2+ messages in thread
From: Shaohua Li @ 2011-06-13 2:51 UTC (permalink / raw)
To: linux acpi; +Cc: Len Brown, Andrew Morton
On Fri, 2011-06-03 at 10:42 +0800, Shaohua Li wrote:
> smp_call_function() only lets all other CPUs execute specific
> function, while we expect all CPUs do in intel_idle. Without
> the fix, we could have one cpu has auto_demotion enabled or
> has no boradcast 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.
has any comments on these? NACK or merge?
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-06-13 2:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-03 2:42 [patch 1/2]intel_idle: fix misuse API - resend Shaohua Li
2011-06-13 2:51 ` Shaohua Li
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox