]> git.baikalelectronics.ru Git - kernel.git/commit
irqchip/armada-370-xp: Fix regression by clearing IRQ_NOAUTOEN
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Wed, 21 Oct 2015 13:48:15 +0000 (15:48 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Mon, 26 Oct 2015 00:19:06 +0000 (09:19 +0900)
commit3da0e026c54ea82e38d6c72258a1b6f4f235c4d8
treecb0b91391404c921108c3a7ec31b900aaf444973
parentee80ff68445d23aeb95aea404e6ca43d90787671
irqchip/armada-370-xp: Fix regression by clearing IRQ_NOAUTOEN

Commit 30561391e18ff ("irqchip: Kill off set_irq_flags usage") changed
the code of armada_370_xp_mpic_irq_map() from using set_irq_flags() to
irq_set_probe().

While the commit log seems to imply that there are no functional
changes, there are indeed functional changes introduced by this
commit: the IRQ_NOAUTOEN flag is no longer cleared. This functional
change causes a regression on Armada XP, which no longer works
properly after suspend/resume because per-CPU interrupts remain
disabled.

Due to how the hardware registers work, the irq-armada-370-xp cannot
simply save/restore a bunch of registers at suspend/resume to make
sure that the interrupts remain in the same state after
resuming. Therefore, it relies on the kernel to say whether the
interrupt is disabled or not, using the irqd_irq_disabled()
function. This was all working fine while the IRQ_NOAUTOEN flag was
cleared.

With the change introduced by Rob Herring in 30561391e18ff, the
IRQ_NOAUTOEN flag is now set for all interrupts. irqd_irq_disabled()
returns false for per-CPU interrupts, and therefore our per-CPU
interrupts are no longer re-enabled after resume.

This commit works around this problem by clearing again the
IRQ_NOAUTOEN flags, so that we are back to the situation we had before
commit 30561391e18ff. This work around is proposed as a minimal fix
for the problem, while a better long-term solution is being worked on.

Fixes: 30561391e18ff "irqchip: Kill off set_irq_flags usage"
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Link: https://lkml.kernel.org/r/1445435295-19956-1-git-send-email-thomas.petazzoni@free-electrons.com
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
drivers/irqchip/irq-armada-370-xp.c