]> git.baikalelectronics.ru Git - kernel.git/commit
genirq/PM: Properly pretend disabled state when force resuming interrupts
authorJuergen Gross <jgross@suse.com>
Mon, 17 Jul 2017 17:47:02 +0000 (19:47 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Mon, 17 Jul 2017 20:32:20 +0000 (22:32 +0200)
commit67698747c4b6c0f8df5ab3d546a32bcd129217ba
tree7a42a24adc55c807dff07da64a77eabff1021045
parent36b66da92ee7c2b877785be3708e6f816e9974a9
genirq/PM: Properly pretend disabled state when force resuming interrupts

Interrupts with the IRQF_FORCE_RESUME flag set have also the
IRQF_NO_SUSPEND flag set. They are not disabled in the suspend path, but
must be forcefully resumed. That's used by XEN to keep IPIs enabled beyond
the suspension of device irqs. Force resume works by pretending that the
interrupt was disabled and then calling __irq_enable().

Incrementing the disabled depth counter was enough to do that, but with the
recent changes which use state flags to avoid unnecessary hardware access,
this is not longer sufficient. If the state flags are not set, then the
hardware callbacks are not invoked and the interrupt line stays disabled in
"hardware".

Set the disabled and masked state when pretending that an interrupt got
disabled by suspend.

Fixes: df69a5d56eaf ("genirq: Avoid unnecessary low level irq function calls")
Suggested-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: xen-devel@lists.xenproject.org
Cc: boris.ostrovsky@oracle.com
Link: http://lkml.kernel.org/r/20170717174703.4603-2-jgross@suse.com
kernel/irq/chip.c
kernel/irq/internals.h
kernel/irq/pm.c