Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1590636 > unrolled thread
| Started by | Thomas Gleixner <tglx@linutronix.de> |
|---|---|
| First post | 2017-03-01 22:40 +0100 |
| Last post | 2017-03-02 22:20 +0100 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH] x86/hpet: Prevent might sleep splat on resume Thomas Gleixner <tglx@linutronix.de> - 2017-03-01 22:40 +0100
[tip:x86/urgent] x86/hpet: Prevent might sleep splat on resume tip-bot for Thomas Gleixner <tipbot@zytor.com> - 2017-03-02 09:50 +0100
Re: [PATCH] x86/hpet: Prevent might sleep splat on resume Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2017-03-02 22:20 +0100
| From | Thomas Gleixner <tglx@linutronix.de> |
|---|---|
| Date | 2017-03-01 22:40 +0100 |
| Subject | [PATCH] x86/hpet: Prevent might sleep splat on resume |
| Message-ID | <tgk8y-ze-15@gated-at.bofh.it> |
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-by: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: stable@vger.kernel.org --- 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 irq_domain_deactivate_irq(irq_get_irq_data(hdev->irq)); irq_domain_activate_irq(irq_get_irq_data(hdev->irq)); - disable_irq(hdev->irq); + disable_hardirq(hdev->irq); irq_set_affinity(hdev->irq, cpumask_of(hdev->cpu)); enable_irq(hdev->irq); }
[toc] | [next] | [standalone]
| From | tip-bot for Thomas Gleixner <tipbot@zytor.com> |
|---|---|
| Date | 2017-03-02 09:50 +0100 |
| Subject | [tip:x86/urgent] x86/hpet: Prevent might sleep splat on resume |
| Message-ID | <tguAV-856-1@gated-at.bofh.it> |
| In reply to | #1590636 |
Commit-ID: bb1a2c26165640ba2cbcfe06c81e9f9d6db4e643 Gitweb: http://git.kernel.org/tip/bb1a2c26165640ba2cbcfe06c81e9f9d6db4e643 Author: Thomas Gleixner <tglx@linutronix.de> AuthorDate: Wed, 1 Mar 2017 21:10:17 +0100 Committer: Thomas Gleixner <tglx@linutronix.de> CommitDate: Thu, 2 Mar 2017 09:33:47 +0100 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 <sergey.senozhatsky.work@gmail.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: "Rafael J. Wysocki" <rjw@sisk.pl> Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> Cc: Borislav Petkov <bp@alien8.de> Link: http://lkml.kernel.org/r/alpine.DEB.2.20.1703012108460.3684@nanos Signed-off-by: Thomas Gleixner <tglx@linutronix.de> --- arch/x86/kernel/hpet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/hpet.c b/arch/x86/kernel/hpet.c index dc6ba5b..89ff7af 100644 --- a/arch/x86/kernel/hpet.c +++ b/arch/x86/kernel/hpet.c @@ -354,7 +354,7 @@ static int hpet_resume(struct clock_event_device *evt, int timer) irq_domain_deactivate_irq(irq_get_irq_data(hdev->irq)); irq_domain_activate_irq(irq_get_irq_data(hdev->irq)); - disable_irq(hdev->irq); + disable_hardirq(hdev->irq); irq_set_affinity(hdev->irq, cpumask_of(hdev->cpu)); enable_irq(hdev->irq); }
[toc] | [prev] | [next] | [standalone]
| From | Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> |
|---|---|
| Date | 2017-03-02 22:20 +0100 |
| Message-ID | <tgGiK-80q-11@gated-at.bofh.it> |
| In reply to | #1590636 |
On (03/01/17 21:10), Thomas Gleixner wrote: > 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-by: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> > Signed-off-by: Thomas Gleixner <tglx@linutronix.de> > Cc: stable@vger.kernel.org Tested-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> thanks! -ss
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web