[lkml]   [2017]   [Dec]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH 4.9 070/148] x86/hpet: Prevent might sleep splat on resume
4.9-stable review patch.  If anyone has any objections, please let me know.


From: Thomas Gleixner <>

[ Upstream commit bb1a2c26165640ba2cbcfe06c81e9f9d6db4e643 ]

Sergey reported a might sleep warning triggered from the hpet resume
path. It's caused by the call to disable_irq() from interrupt disabled

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 <>
Signed-off-by: Thomas Gleixner <>
Cc: Peter Zijlstra <>
Cc: "Rafael J. Wysocki" <>
Cc: Sergey Senozhatsky <>
Cc: Borislav Petkov <>
Signed-off-by: Thomas Gleixner <>
Signed-off-by: Sasha Levin <>
Signed-off-by: Greg Kroah-Hartman <>
arch/x86/kernel/hpet.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- a/arch/x86/kernel/hpet.c
+++ b/arch/x86/kernel/hpet.c
@@ -354,7 +354,7 @@ static int hpet_resume(struct clock_even

- disable_irq(hdev->irq);
+ disable_hardirq(hdev->irq);
irq_set_affinity(hdev->irq, cpumask_of(hdev->cpu));

 \ /
  Last update: 2017-12-12 14:20    [W:0.479 / U:11.564 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site