Skip to content

Commit

Permalink
cpuidle: coupled: disable interrupts after entering safe state
Browse files Browse the repository at this point in the history
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: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Colin Cross <ccross@android.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
colincross authored and rafaeljw committed Aug 29, 2013
1 parent 51f245b commit 59e9985
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/cpuidle/coupled.c
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,7 @@ int cpuidle_enter_state_coupled(struct cpuidle_device *dev,
}
entered_state = cpuidle_enter_state(dev, drv,
dev->safe_state_index);
local_irq_disable();
}

/* Read barrier ensures online_count is read after prevent is cleared */
Expand All @@ -485,6 +486,7 @@ int cpuidle_enter_state_coupled(struct cpuidle_device *dev,

entered_state = cpuidle_enter_state(dev, drv,
dev->safe_state_index);
local_irq_disable();
}

if (cpuidle_coupled_clear_pokes(dev->cpu)) {
Expand Down

0 comments on commit 59e9985

Please sign in to comment.