Skip to content

Commit c8f5cae

Browse files
bp3tk0vrafaeljw
authored andcommitted
cpuidle: haltpoll: Do not enable interrupts when entering idle
The cpuidle drivers' ->enter() methods are supposed to be IRQ invariant: 5e26aa9 ("cpuidle/poll: Ensure IRQs stay disabled after cpuidle_state::enter() calls") bb7b112 ("cpuidle: Move IRQ state validation") Do that in the haltpoll driver too. Fixes: 5e26aa9 ("cpuidle/poll: Ensure IRQs stay disabled after cpuidle_state::enter() calls") Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218245 Reported-by: <forza@tnonline.net> Tested-by: <forza@tnonline.net> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> [ rjw: Changelog edits ] Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 92813fd commit c8f5cae

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

drivers/cpuidle/cpuidle-haltpoll.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,12 @@ MODULE_PARM_DESC(force, "Load unconditionally");
2525
static struct cpuidle_device __percpu *haltpoll_cpuidle_devices;
2626
static enum cpuhp_state haltpoll_hp_state;
2727

28-
static int default_enter_idle(struct cpuidle_device *dev,
29-
struct cpuidle_driver *drv, int index)
28+
static __cpuidle int default_enter_idle(struct cpuidle_device *dev,
29+
struct cpuidle_driver *drv, int index)
3030
{
31-
if (current_clr_polling_and_test()) {
32-
local_irq_enable();
31+
if (current_clr_polling_and_test())
3332
return index;
34-
}
33+
3534
arch_cpu_idle();
3635
return index;
3736
}

0 commit comments

Comments
 (0)