intel_idle: Delete meaningless local_irq_disable() call in intel_idle.c.]
PATCH 1/1 intel_idle: Delete meaningless local_irq_disable() call in intel_idle.c.]
Andrew,
Would you like to accept the patch into your testing tree?
Thanks,
Yanmin
-------- Forwarded Message --------
From: Zhang, MingmingX <[email protected]>
To: [email protected] <[email protected]>
Cc: [email protected] <[email protected]>, Li, Shaohua <[email protected]>, Brown, Len <[email protected]>
Subject: [patch] intel_idle: Delete meaningless local_irq_disable() call in intel_idle.c.
Date: Fri, 23 Dec 2011 01:57:29 +0000
From: mzha38X <[email protected]>
intel_idle.c is a bit misleading in a sense that local_irq_disable,it actually does nothing. Real irq disable 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. Below patch deletes the calling to local_irq_disable() at entry.
--- drivers/idle/intel_idle.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-)
drivers/idle/intel_idle.c +0 -2
@@ -247,8 +247,6 @@ static int intel_idle(struct cpuidle_device *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.
Signature · 1 line
1.7.1
Quoted 3 lines · On Mon, 26 Dec 2011 09:28:20 +0800 Yanmin Zhang <[email protected]>…
Andrew,
Would you like to accept the patch into your testing tree?
hm, that's three indel_idle patches which I have now. Someone wake up lenb!
Quoted 19 lines
intel_idle.cis a bit misleading in a sense that local_irq_disable,it actually does nothing. Real irq disable happens earlier in process_32.c:cpu_idle. Basically,cpuidle_state->enteris called, cpu irq is disabled.cpuidle_state->enterwould turn on irq when exiting.
intel_idledoesn't follow this assumption. Although it doesn't cause real issue, it misleads developers. Below patch deletes the calling tolocal_irq_disable()at entry.Signed-off-by mzha38X <[email protected]>--- drivers/idle/intel_idle.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-)drivers/idle/intel_idle.c +0
-0
drivers/idle/intel_idle.c static int intel_idle(struct cpuidle_device *dev, · line 252
Quoted 8 lines
drivers/idle/intel_idle.c +0
-2@@ -247,8 +247,6 @@ static int intel_idle(struct cpuidle_device *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.
I'd suggest adding this as well:
drivers/idle/intel_idle.c renamed from drivers/idle/intel_idle.c~drivers-idle-intel_idlec-remove-redundant-local_irq_disable-call-fix +1 -0
@@ -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)
_
Quoted 7 lines · Andrew Morton
Quoted 3 lines · On Mon, 26 Dec 2011 09:28:20 +0800 Yanmin Zhang <[email protected]>…
Andrew,
Would you like to accept the patch into your testing tree?
Quoted 7 lines
hm, that's three
indel_idlepatches which I have now. Someone wake up lenb!Quoted 1 line
intel_idle.cis a bit misleading in a sense that local_irq_disable,itI'd suggest adding this as well:
Agree. It'll be clearer.
Quoted 11 lines
drivers/idle/intel_idle.c renamed from drivers/idle/intel_idle.c~drivers-idle-intel_idlec-remove-redundant-local_irq_disable-call-fix +1
-0@@ -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)