intel_idle: fix API misuse
Subsystems (2)
PATCH 1/3 intel_idle: fix API misuse
From: Shaohua Li <[email protected]>
Subject: intel_idle: fix API misuse
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 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.
---
drivers/idle/intel_idle.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/idle/intel_idle.c renamed from drivers/idle/intel_idle.c~intel_idle-fix-api-misuse +3 -3
@@ -394,7 +394,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); }
@@ -471,7 +471,7 @@ static int intel_idle_cpuidle_driver_ini }if (auto_demotion_disable_flags) -smp_call_function (auto_demotion_disable,NULL ,1 ); +on_each_cpu (auto_demotion_disable,NULL ,1 );return 0 ; }
@@ -568,7 +568,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); }
_
Quoted 2 lines · On Wednesday, January 11, 2012 12:48:19 AM [email protected] wrote:
From: Shaohua Li <[email protected]>
Subject:intel_idle: fix API misuse
This one looks worth adding:
CC: [email protected]
Quoted 10 lines
smp_call_function()only lets all other CPUs execute a specific function, while we expect all CPUs do inintel_idle. Without the fix, we could have one cpu which hasauto_demotionenabled or has no boradcast timer setup. Usually we don't see impact because auto demotion just harms power and theintel_idleinit is called in CPU 0, where boradcast timer delivers interrupt, but this still could be a problem.Signed-off-by Shaohua Li <[email protected]>Cc Len Brown <[email protected]>Signed-off-by Andrew Morton <[email protected]>
Thomas
(let's cc stable on this thread then!)
Quoted 15 lines · On Tue, 17 Jan 2012 11:37:58 +0100 Thomas Renninger <[email protected]> wrote:
Quoted 2 lines · On Wednesday, January 11, 2012 12:48:19 AM [email protected] wrote:
From: Shaohua Li <[email protected]>
Subject:intel_idle: fix API misuseThis one looks worth adding:
CC: [email protected]Quoted 7 lines
smp_call_function()only lets all other CPUs execute a specific function, while we expect all CPUs do inintel_idle. Without the fix, we could have one cpu which hasauto_demotionenabled or has no boradcast timer setup. Usually we don't see impact because auto demotion just harms power and theintel_idleinit is called in CPU 0, where boradcast timer delivers interrupt, but this still could be a problem.
Quoted 5 lines
Quoted 3 lines
Signed-off-by Shaohua Li <[email protected]>Cc Len Brown <[email protected]>Signed-off-by Andrew Morton <[email protected]>
OK. I think Len is processing these patches at present. So [email protected] will see when I've dropped my copy of the patch, but the version which goes into mainline might be missing the stable tag. Hopefully Greg is awake enough to sort out that cryptic messaging!
Quoted 23 lines · Andrew Morton
(let's cc stable on this thread then!)
Quoted 18 lines · On Tue, 17 Jan 2012 11:37:58 +0100 Thomas Renninger <[email protected]> wrote:
Quoted 2 lines · On Wednesday, January 11, 2012 12:48:19 AM [email protected] wrote:
From: Shaohua Li <[email protected]>
Subject:intel_idle: fix API misuseThis one looks worth adding:
CC: [email protected]Quoted 10 lines
smp_call_function()only lets all other CPUs execute a specific function, while we expect all CPUs do inintel_idle. Without the fix, we could have one cpu which hasauto_demotionenabled or has no boradcast timer setup. Usually we don't see impact because auto demotion just harms power and theintel_idleinit is called in CPU 0, where boradcast timer delivers interrupt, but this still could be a problem.Signed-off-by Shaohua Li <[email protected]>Cc Len Brown <[email protected]>Signed-off-by Andrew Morton <[email protected]>
Quoted 7 lines
Quoted 2 lines
OK. I think Len is processing these patches at present. So [email protected] will see when I've dropped my copy of the patch, but the version which goes into mainline might be missing the stable tag. Hopefully Greg is awake enough to sort out that cryptic messaging!
In case I'm not, can someone send me the git commit ids that you want added to the stable trees to [email protected] when they hit Linus's tree?
thanks,
greg k-h