Commit 59e99856 authored by Colin Cross's avatar Colin Cross Committed by Rafael J. Wysocki

cpuidle: coupled: disable interrupts after entering safe state

Calling cpuidle_enter_state is expected to return with interrupts
enabled, but interrupts must be disabled before starting the
ready loop synchronization stage.  Call local_irq_disable after
each call to cpuidle_enter_state for the safe state.
Tested-by: default avatarStephen Warren <swarren@nvidia.com>
Signed-off-by: default avatarColin Cross <ccross@android.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 51f245b8
...@@ -460,6 +460,7 @@ int cpuidle_enter_state_coupled(struct cpuidle_device *dev, ...@@ -460,6 +460,7 @@ int cpuidle_enter_state_coupled(struct cpuidle_device *dev,
} }
entered_state = cpuidle_enter_state(dev, drv, entered_state = cpuidle_enter_state(dev, drv,
dev->safe_state_index); dev->safe_state_index);
local_irq_disable();
} }
/* Read barrier ensures online_count is read after prevent is cleared */ /* Read barrier ensures online_count is read after prevent is cleared */
...@@ -485,6 +486,7 @@ int cpuidle_enter_state_coupled(struct cpuidle_device *dev, ...@@ -485,6 +486,7 @@ int cpuidle_enter_state_coupled(struct cpuidle_device *dev,
entered_state = cpuidle_enter_state(dev, drv, entered_state = cpuidle_enter_state(dev, drv,
dev->safe_state_index); dev->safe_state_index);
local_irq_disable();
} }
if (cpuidle_coupled_clear_pokes(dev->cpu)) { if (cpuidle_coupled_clear_pokes(dev->cpu)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment