cpuidle: haltpoll: Do not enable interrupts when entering idle
[ Upstream commit c8f5caec3df84a02b937d6d9cda1f7ffa8dc443f ] The cpuidle drivers' ->enter() methods are supposed to be IRQ invariant:5e26aa9339
("cpuidle/poll: Ensure IRQs stay disabled after cpuidle_state::enter() calls")bb7b112585
("cpuidle: Move IRQ state validation") Do that in the haltpoll driver too. Fixes:5e26aa9339
("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> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
cfd7c9d260
commit
628fb89864
|
@ -25,13 +25,12 @@ MODULE_PARM_DESC(force, "Load unconditionally");
|
||||||
static struct cpuidle_device __percpu *haltpoll_cpuidle_devices;
|
static struct cpuidle_device __percpu *haltpoll_cpuidle_devices;
|
||||||
static enum cpuhp_state haltpoll_hp_state;
|
static enum cpuhp_state haltpoll_hp_state;
|
||||||
|
|
||||||
static int default_enter_idle(struct cpuidle_device *dev,
|
static __cpuidle int default_enter_idle(struct cpuidle_device *dev,
|
||||||
struct cpuidle_driver *drv, int index)
|
struct cpuidle_driver *drv, int index)
|
||||||
{
|
{
|
||||||
if (current_clr_polling_and_test()) {
|
if (current_clr_polling_and_test())
|
||||||
local_irq_enable();
|
|
||||||
return index;
|
return index;
|
||||||
}
|
|
||||||
arch_cpu_idle();
|
arch_cpu_idle();
|
||||||
return index;
|
return index;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue