Skip to content

Commit bb1a2c2

Browse files
committed
x86/hpet: Prevent might sleep splat on resume
Sergey reported a might sleep warning triggered from the hpet resume path. It's caused by the call to disable_irq() from interrupt disabled context. The problem with the low level resume code is that it is not accounted as a special system_state like we do during the boot process. Calling the same code during system boot would not trigger the warning. That's inconsistent at best. In this particular case it's trivial to replace the disable_irq() with disable_hardirq() because this particular code path is solely used from system resume and the involved hpet interrupts can never be force threaded. Reported-and-tested-by: Sergey Senozhatsky <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: "Rafael J. Wysocki" <[email protected]> Cc: Sergey Senozhatsky <[email protected]> Cc: Borislav Petkov <[email protected]> Link: http://lkml.kernel.org/r/alpine.DEB.2.20.1703012108460.3684@nanos Signed-off-by: Thomas Gleixner <[email protected]>
1 parent 8392f16 commit bb1a2c2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/kernel/hpet.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ static int hpet_resume(struct clock_event_device *evt, int timer)
354354

355355
irq_domain_deactivate_irq(irq_get_irq_data(hdev->irq));
356356
irq_domain_activate_irq(irq_get_irq_data(hdev->irq));
357-
disable_irq(hdev->irq);
357+
disable_hardirq(hdev->irq);
358358
irq_set_affinity(hdev->irq, cpumask_of(hdev->cpu));
359359
enable_irq(hdev->irq);
360360
}

0 commit comments

Comments
 (0)