All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch 1/3] intel_idle: fix API misuse
@ 2012-01-10 23:48 akpm
  2012-01-17 10:37 ` Thomas Renninger
  0 siblings, 1 reply; 4+ messages in thread
From: akpm @ 2012-01-10 23:48 UTC (permalink / raw)
  To: lenb; +Cc: len.brown, linux-acpi, akpm, shaohua.li

From: Shaohua Li <shaohua.li@intel.com>
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.

Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Cc: Len Brown <lenb@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 drivers/idle/intel_idle.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff -puN drivers/idle/intel_idle.c~intel_idle-fix-api-misuse drivers/idle/intel_idle.c
--- a/drivers/idle/intel_idle.c~intel_idle-fix-api-misuse
+++ a/drivers/idle/intel_idle.c
@@ -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);
 	}
 
_

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [patch 1/3] intel_idle: fix API misuse
  2012-01-10 23:48 [patch 1/3] intel_idle: fix API misuse akpm
@ 2012-01-17 10:37 ` Thomas Renninger
  2012-01-18  0:21   ` Andrew Morton
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Renninger @ 2012-01-17 10:37 UTC (permalink / raw)
  To: akpm; +Cc: lenb, len.brown, linux-acpi, shaohua.li

On Wednesday, January 11, 2012 12:48:19 AM akpm@linux-foundation.org wrote:
> From: Shaohua Li <shaohua.li@intel.com>
> Subject: intel_idle: fix API misuse

This one looks worth adding:
CC: stable@vger.kernel.org

 
> 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.
> 
> Signed-off-by: Shaohua Li <shaohua.li@intel.com>
> Cc: Len Brown <lenb@kernel.org>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
CC: stable@vger.kernel.org

   Thomas

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [patch 1/3] intel_idle: fix API misuse
  2012-01-17 10:37 ` Thomas Renninger
@ 2012-01-18  0:21   ` Andrew Morton
  2012-01-18  0:55     ` Greg KH
  0 siblings, 1 reply; 4+ messages in thread
From: Andrew Morton @ 2012-01-18  0:21 UTC (permalink / raw)
  To: Thomas Renninger; +Cc: lenb, len.brown, linux-acpi, shaohua.li, stable

(let's cc stable on this thread then!)

On Tue, 17 Jan 2012 11:37:58 +0100
Thomas Renninger <trenn@suse.de> wrote:

> On Wednesday, January 11, 2012 12:48:19 AM akpm@linux-foundation.org wrote:
> > From: Shaohua Li <shaohua.li@intel.com>
> > Subject: intel_idle: fix API misuse
> 
> This one looks worth adding:
> CC: stable@vger.kernel.org
> 
>  
> > 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.
> > 
> > Signed-off-by: Shaohua Li <shaohua.li@intel.com>
> > Cc: Len Brown <lenb@kernel.org>
> > Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> CC: stable@vger.kernel.org
> 

OK.  I think Len is processing these patches at present.  So
stable@vger.kernel.org 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!


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [patch 1/3] intel_idle: fix API misuse
  2012-01-18  0:21   ` Andrew Morton
@ 2012-01-18  0:55     ` Greg KH
  0 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2012-01-18  0:55 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Thomas Renninger, lenb, len.brown, linux-acpi, shaohua.li, stable

On Tue, Jan 17, 2012 at 04:21:43PM -0800, Andrew Morton wrote:
> (let's cc stable on this thread then!)
> 
> On Tue, 17 Jan 2012 11:37:58 +0100
> Thomas Renninger <trenn@suse.de> wrote:
> 
> > On Wednesday, January 11, 2012 12:48:19 AM akpm@linux-foundation.org wrote:
> > > From: Shaohua Li <shaohua.li@intel.com>
> > > Subject: intel_idle: fix API misuse
> > 
> > This one looks worth adding:
> > CC: stable@vger.kernel.org
> > 
> >  
> > > 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.
> > > 
> > > Signed-off-by: Shaohua Li <shaohua.li@intel.com>
> > > Cc: Len Brown <lenb@kernel.org>
> > > Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> > CC: stable@vger.kernel.org
> > 
> 
> OK.  I think Len is processing these patches at present.  So
> stable@vger.kernel.org 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 stable@vger.kernel.org when they hit
Linus's tree?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-01-18  0:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-10 23:48 [patch 1/3] intel_idle: fix API misuse akpm
2012-01-17 10:37 ` Thomas Renninger
2012-01-18  0:21   ` Andrew Morton
2012-01-18  0:55     ` Greg KH

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.