|
@@ -913,8 +913,7 @@ static __cpuidle int intel_idle(struct cpuidle_device *dev,
|
|
|
struct cpuidle_state *state = &drv->states[index];
|
|
|
unsigned long eax = flg2MWAIT(state->flags);
|
|
|
unsigned int cstate;
|
|
|
-
|
|
|
- cstate = (((eax) >> MWAIT_SUBSTATE_SIZE) & MWAIT_CSTATE_MASK) + 1;
|
|
|
+ bool uninitialized_var(tick);
|
|
|
|
|
|
/*
|
|
|
* NB: if CPUIDLE_FLAG_TLB_FLUSHED is set, this idle transition
|
|
@@ -923,12 +922,19 @@ static __cpuidle int intel_idle(struct cpuidle_device *dev,
|
|
|
* useful with this knowledge.
|
|
|
*/
|
|
|
|
|
|
- if (!(lapic_timer_reliable_states & (1 << (cstate))))
|
|
|
- tick_broadcast_enter();
|
|
|
+ if (!static_cpu_has(X86_FEATURE_ARAT)) {
|
|
|
+ cstate = (((eax) >> MWAIT_SUBSTATE_SIZE) &
|
|
|
+ MWAIT_CSTATE_MASK) + 1;
|
|
|
+ tick = false;
|
|
|
+ if (!(lapic_timer_reliable_states & (1 << (cstate)))) {
|
|
|
+ tick = true;
|
|
|
+ tick_broadcast_enter();
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
mwait_idle_with_hints(eax, ecx);
|
|
|
|
|
|
- if (!(lapic_timer_reliable_states & (1 << (cstate))))
|
|
|
+ if (!static_cpu_has(X86_FEATURE_ARAT) && tick)
|
|
|
tick_broadcast_exit();
|
|
|
|
|
|
return index;
|