public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] genirq: Set IRQCHIP_SKIP_SET_WAKE for no_irq_chip
@ 2015-05-22  7:58 Geert Uytterhoeven
  2015-05-22  9:10 ` [tip:irq/core] " tip-bot for Geert Uytterhoeven
  0 siblings, 1 reply; 2+ messages in thread
From: Geert Uytterhoeven @ 2015-05-22  7:58 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: Ingo Molnar, Roger Quadros, Gregory Clement, linux-kernel,
	Geert Uytterhoeven

If no_irq_chip is used for wake up (e.g. gpio-keys with a simple GPIO
controller), the following warning is printed on resume from s2ram:

    WANING: CPU: 0 PID: 1046 at kernel/irq/manage.c:537 irq_set_irq_wake+0x9c/0xf8()
    Unbalanced IRQ 113 wake disable

This happens because no_irq_chip does not implement
irq_chip.irq_set_wake(), causing set_irq_wake_real() to return -ENXIO,
and irq_set_irq_wake() to reset the wake_depth to zero.

Set IRQCHIP_SKIP_SET_WAKE to indicate that irq_chip.irq_set_wake() is
not implemented.

Cfr. commit 10a50f1ab5f06c9a ("genirq: Set IRQCHIP_SKIP_SET_WAKE flag
for dummy_irq_chip").

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
This is v2 of "genirq: Set IRQCHIP_SKIP_SET_WAKE for no_irq_chip and
dummy_irq_chip". Fixing dummy_irq_chip was dropped as it was fixed by an
independent patch.
---
 kernel/irq/dummychip.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/kernel/irq/dummychip.c b/kernel/irq/dummychip.c
index 2feb6feca0cc96df..326a67f2410bf95c 100644
--- a/kernel/irq/dummychip.c
+++ b/kernel/irq/dummychip.c
@@ -42,6 +42,7 @@ struct irq_chip no_irq_chip = {
 	.irq_enable	= noop,
 	.irq_disable	= noop,
 	.irq_ack	= ack_bad,
+	.flags		= IRQCHIP_SKIP_SET_WAKE,
 };
 
 /*
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-05-22  9:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-22  7:58 [PATCH] genirq: Set IRQCHIP_SKIP_SET_WAKE for no_irq_chip Geert Uytterhoeven
2015-05-22  9:10 ` [tip:irq/core] " tip-bot for Geert Uytterhoeven

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox