Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c8381cc3 authored by Len Brown's avatar Len Brown
Browse files

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: default avatarLen Brown <len.brown@intel.com>
parent cd07202c
Loading
Loading
Loading
Loading
+3 −6
Original line number Original line Diff line number Diff line
@@ -186,13 +186,10 @@ static int intel_idle(struct cpuidle_device *dev, struct cpuidle_state *state)
	local_irq_disable();
	local_irq_disable();


	/*
	/*
	 * If the state flag indicates that the TLB will be flushed or if this
	 * leave_mm() to avoid costly and often unnecessary wakeups
	 * is the deepest c-state supported, do a voluntary leave mm to avoid
	 * for flushing the user TLB's associated with the active mm.
	 * costly and mostly unnecessary wakeups for flushing the user TLB's
	 * associated with the active mm.
	 */
	 */
	if (state->flags & CPUIDLE_FLAG_TLB_FLUSHED ||
	if (state->flags & CPUIDLE_FLAG_TLB_FLUSHED)
	    (&dev->states[dev->state_count - 1] == state))
		leave_mm(cpu);
		leave_mm(cpu);


	if (!(lapic_timer_reliable_states & (1 << (cstate))))
	if (!(lapic_timer_reliable_states & (1 << (cstate))))