aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/idle
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2010-10-15 20:43:06 -0400
committerLen Brown <len.brown@intel.com>2010-10-15 20:43:06 -0400
commitc8381cc3d8a9cc6c80f65bf60863c776651f245c (patch)
tree6951487ec3a4745f24c8b0d7c98db8963e0da4c7 /drivers/idle
parentcd07202cc8262e1669edff0d97715f3dd9260917 (diff)
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: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/idle')
-rw-r--r--drivers/idle/intel_idle.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c
index c37ef64d1465..ad0fb0182b4c 100644
--- a/drivers/idle/intel_idle.c
+++ b/drivers/idle/intel_idle.c
@@ -186,13 +186,10 @@ static int intel_idle(struct cpuidle_device *dev, struct cpuidle_state *state)
186 local_irq_disable(); 186 local_irq_disable();
187 187
188 /* 188 /*
189 * If the state flag indicates that the TLB will be flushed or if this 189 * leave_mm() to avoid costly and often unnecessary wakeups
190 * is the deepest c-state supported, do a voluntary leave mm to avoid 190 * for flushing the user TLB's associated with the active mm.
191 * costly and mostly unnecessary wakeups for flushing the user TLB's
192 * associated with the active mm.
193 */ 191 */
194 if (state->flags & CPUIDLE_FLAG_TLB_FLUSHED || 192 if (state->flags & CPUIDLE_FLAG_TLB_FLUSHED)
195 (&dev->states[dev->state_count - 1] == state))
196 leave_mm(cpu); 193 leave_mm(cpu);
197 194
198 if (!(lapic_timer_reliable_states & (1 << (cstate)))) 195 if (!(lapic_timer_reliable_states & (1 << (cstate))))