]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
x86/hpet: Cure interface abuse in the resume path
authorThomas Gleixner <tglx@linutronix.de>
Mon, 31 Jul 2017 20:07:09 +0000 (22:07 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 1 Aug 2017 11:02:37 +0000 (13:02 +0200)
commitbb68cfe2f5a7f43058aed299fdbb73eb281734ed
tree04ad72d536b8ea36b546524952a41111ef0d0a6b
parent16f73eb02d7e1765ccab3d2018e0bd98eb93d973
x86/hpet: Cure interface abuse in the resume path

The HPET resume path abuses irq_domain_[de]activate_irq() to restore the
MSI message in the HPET chip for the boot CPU on resume and it relies on an
implementation detail of the interrupt core code, which magically makes the
HPET unmask call invoked via a irq_disable/enable pair. This worked as long
as the irq code did unconditionally invoke the unmask() callback. With the
recent changes which keep track of the masked state to avoid expensive
hardware access, this does not longer work. As a consequence the HPET timer
interrupts are not unmasked which breaks resume as the boot CPU waits
forever that a timer interrupt arrives.

Make the restore of the MSI message explicit and invoke the unmask()
function directly. While at it get rid of the pointless affinity setting as
nothing can change the affinity of the interrupt and the vector across
suspend/resume. The restore of the MSI message reestablishes the previous
affinity setting which is the correct one.

Fixes: bf22ff45bed6 ("genirq: Avoid unnecessary low level irq function calls")
Reported-and-tested-by: Tomi Sarvela <tomi.p.sarvela@intel.com>
Reported-by: Martin Peres <martin.peres@linux.intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Cc: jeffy.chen@rock-chips.com
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Link: http://lkml.kernel.org/r/alpine.DEB.2.20.1707312158590.2287@nanos
arch/x86/kernel/hpet.c