提交 c8381cc3 编写于 作者: L Len Brown

intel_idle: simplify test for leave_mm()

A run-time test to invoke leave_mm() for the deepest
supported C-state is redundant, since the appropriate
C-states already have flags with CPUIDLE_FLAG_TLB_FLUSHED set.
Signed-off-by: NLen Brown <len.brown@intel.com>
上级 cd07202c
......@@ -186,13 +186,10 @@ static int intel_idle(struct cpuidle_device *dev, struct cpuidle_state *state)
local_irq_disable();
/*
* If the state flag indicates that the TLB will be flushed or if this
* is the deepest c-state supported, do a voluntary leave mm to avoid
* costly and mostly unnecessary wakeups for flushing the user TLB's
* associated with the active mm.
* leave_mm() to avoid costly and often unnecessary wakeups
* for flushing the user TLB's associated with the active mm.
*/
if (state->flags & CPUIDLE_FLAG_TLB_FLUSHED ||
(&dev->states[dev->state_count - 1] == state))
if (state->flags & CPUIDLE_FLAG_TLB_FLUSHED)
leave_mm(cpu);
if (!(lapic_timer_reliable_states & (1 << (cstate))))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册