提交 63ff07be 编写于 作者: Y Yanmin Zhang 提交者: Len Brown

intel_idle: 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: NMingming Zhang <mingmingx.zhang@intel.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLen Brown <len.brown@intel.com>
上级 39a74fde
...@@ -232,6 +232,7 @@ static int get_driver_data(int cstate) ...@@ -232,6 +232,7 @@ static int get_driver_data(int cstate)
* @drv: cpuidle driver * @drv: cpuidle driver
* @index: index of cpuidle state * @index: index of cpuidle state
* *
* Must be called under local_irq_disable().
*/ */
static int intel_idle(struct cpuidle_device *dev, static int intel_idle(struct cpuidle_device *dev,
struct cpuidle_driver *drv, int index) struct cpuidle_driver *drv, int index)
...@@ -247,8 +248,6 @@ static int intel_idle(struct cpuidle_device *dev, ...@@ -247,8 +248,6 @@ static int intel_idle(struct cpuidle_device *dev,
cstate = (((eax) >> MWAIT_SUBSTATE_SIZE) & MWAIT_CSTATE_MASK) + 1; cstate = (((eax) >> MWAIT_SUBSTATE_SIZE) & MWAIT_CSTATE_MASK) + 1;
local_irq_disable();
/* /*
* leave_mm() to avoid costly and often unnecessary wakeups * leave_mm() to avoid costly and often unnecessary wakeups
* for flushing the user TLB's associated with the active mm. * for flushing the user TLB's associated with the active mm.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册