linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch 3/3] drivers/idle/intel_idle.c: remove redundant local_irq_disable() call
@ 2012-01-10 23:48 akpm
  2012-01-11 15:59 ` Srivatsa S. Bhat
  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, yanmin_zhang, mingmingx.zhang,
	shaohua.li

From: Yanmin Zhang <yanmin_zhang@linux.intel.com>
Subject: drivers/idle/intel_idle.c: remove redundant local_irq_disable() call

irq disabling happens earlier in process_32.c:cpu_idle.  Basically,
cpuidle_state->enter is called, cpu irq is disabled.  cpuidle_state->enter
would turn on irq when exiting.

intel_idle doesn't follow this assumption.  Although it doesn't cause real
issue, it misleads developers.  Remove the call to local_irq_disable() at
entry.

[akpm@linux-foundation.org: add comment]
Signed-off-by: mzha38X <mingmingx.zhang@intel.com>
Cc: "Li, Shaohua" <shaohua.li@intel.com>
Cc: "Brown, Len" <len.brown@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

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

diff -puN drivers/idle/intel_idle.c~drivers-idle-intel_idlec-remove-redundant-local_irq_disable-call drivers/idle/intel_idle.c
--- a/drivers/idle/intel_idle.c~drivers-idle-intel_idlec-remove-redundant-local_irq_disable-call
+++ a/drivers/idle/intel_idle.c
@@ -232,6 +232,7 @@ static int get_driver_data(int cstate)
  * @drv: cpuidle driver
  * @index: index of cpuidle state
  *
+ * Must be called under local_irq_disable().
  */
 static int intel_idle(struct cpuidle_device *dev,
 		struct cpuidle_driver *drv, int index)
@@ -247,8 +248,6 @@ static int intel_idle(struct cpuidle_dev
 
 	cstate = (((eax) >> MWAIT_SUBSTATE_SIZE) & MWAIT_CSTATE_MASK) + 1;
 
-	local_irq_disable();
-
 	/*
 	 * leave_mm() to avoid costly and often unnecessary wakeups
 	 * for flushing the user TLB's associated with the active mm.
_

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

* Re: [patch 3/3] drivers/idle/intel_idle.c: remove redundant local_irq_disable() call
  2012-01-10 23:48 [patch 3/3] drivers/idle/intel_idle.c: remove redundant local_irq_disable() call akpm
@ 2012-01-11 15:59 ` Srivatsa S. Bhat
  2012-01-17 12:22   ` Thomas Renninger
  0 siblings, 1 reply; 4+ messages in thread
From: Srivatsa S. Bhat @ 2012-01-11 15:59 UTC (permalink / raw)
  To: akpm; +Cc: lenb, len.brown, linux-acpi, yanmin_zhang, mingmingx.zhang,
	shaohua.li

On 01/11/2012 05:18 AM, akpm@linux-foundation.org wrote:

> From: Yanmin Zhang <yanmin_zhang@linux.intel.com>
> Subject: drivers/idle/intel_idle.c: remove redundant local_irq_disable() call
> 
> irq disabling happens earlier in process_32.c:cpu_idle.  Basically,
> cpuidle_state->enter is called, cpu irq is disabled.  cpuidle_state->enter
> would turn on irq when exiting.
> 
> intel_idle doesn't follow this assumption.  Although it doesn't cause real
> issue, it misleads developers.  Remove the call to local_irq_disable() at
> entry.
> 
> [akpm@linux-foundation.org: add comment]
> Signed-off-by: mzha38X <mingmingx.zhang@intel.com>

                 ^^^^^^^
Are nicknames acceptable? AFAIK, real names are preferred...

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


Regards,
Srivatsa S. Bhat
IBM Linux Technology Center


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

* Re: [patch 3/3] drivers/idle/intel_idle.c: remove redundant local_irq_disable() call
  2012-01-11 15:59 ` Srivatsa S. Bhat
@ 2012-01-17 12:22   ` Thomas Renninger
  2012-01-18  0:15     ` Yanmin Zhang
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Renninger @ 2012-01-17 12:22 UTC (permalink / raw)
  To: Srivatsa S. Bhat, linux-acpi
  Cc: akpm, lenb, yanmin_zhang, mingmingx.zhang, shaohua.li

On Wednesday, January 11, 2012 04:59:44 PM Srivatsa S. Bhat wrote:
> On 01/11/2012 05:18 AM, akpm@linux-foundation.org wrote:
...
> > [akpm@linux-foundation.org: add comment]
> > Signed-off-by: mzha38X <mingmingx.zhang@intel.com>
> 
>                  ^^^^^^^
> Are nicknames acceptable? AFAIK, real names are preferred...
Not perfect, but as an Intel address is used, it
shouldn't matter.
Signed-off-by: mingmingx.zhang@intel.com
would work as well: it's not anonymous.
I'll use: Mingming Zhang <mingmingx.zhang@intel.com>
(most google hits) when reposting.

   Thomas

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

* Re: [patch 3/3] drivers/idle/intel_idle.c: remove redundant local_irq_disable() call
  2012-01-17 12:22   ` Thomas Renninger
@ 2012-01-18  0:15     ` Yanmin Zhang
  0 siblings, 0 replies; 4+ messages in thread
From: Yanmin Zhang @ 2012-01-18  0:15 UTC (permalink / raw)
  To: Thomas Renninger
  Cc: Srivatsa S. Bhat, linux-acpi, akpm, lenb, mingmingx.zhang,
	shaohua.li

On Tue, 2012-01-17 at 13:22 +0100, Thomas Renninger wrote:
> On Wednesday, January 11, 2012 04:59:44 PM Srivatsa S. Bhat wrote:
> > On 01/11/2012 05:18 AM, akpm@linux-foundation.org wrote:
> ...
> > > [akpm@linux-foundation.org: add comment]
> > > Signed-off-by: mzha38X <mingmingx.zhang@intel.com>
> > 
> >                  ^^^^^^^
> > Are nicknames acceptable? AFAIK, real names are preferred...
> Not perfect, but as an Intel address is used, it
> shouldn't matter.
> Signed-off-by: mingmingx.zhang@intel.com
> would work as well: it's not anonymous.
> I'll use: Mingming Zhang <mingmingx.zhang@intel.com>
> (most google hits) when reposting.
Thomas,

Thanks for your kind reminder. Mingming just sent his first patch to
LKML and he would pay more attention next time.

Yanmin




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

end of thread, other threads:[~2012-01-18  0:15 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 3/3] drivers/idle/intel_idle.c: remove redundant local_irq_disable() call akpm
2012-01-11 15:59 ` Srivatsa S. Bhat
2012-01-17 12:22   ` Thomas Renninger
2012-01-18  0:15     ` Yanmin Zhang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).