]> git.baikalelectronics.ru Git - kernel.git/commit
genirq: Clear action->thread_mask if IRQ_ONESHOT is not set
authorThomas Gleixner <tglx@linutronix.de>
Tue, 6 Mar 2012 22:18:54 +0000 (23:18 +0100)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 7 Mar 2012 00:46:39 +0000 (16:46 -0800)
commit4dae65e6629b011765a992219eaccc9f276319f1
treef396df08518ff22039d2c4da153cba029f01ecd2
parent8bf5080ceb2efefdc42415e54f28909cde76a55f
genirq: Clear action->thread_mask if IRQ_ONESHOT is not set

Xommit 4142400af(genirq: Unmask oneshot irqs when thread was not woken)
fails to unmask when a !IRQ_ONESHOT threaded handler is handled by
handle_level_irq.

This happens because thread_mask is or'ed unconditionally in
irq_wake_thread(), but for !IRQ_ONESHOT interrupts never cleared.  So
the check for !desc->thread_active fails and keeps the interrupt
disabled.

Keep the thread_mask zero for !IRQ_ONESHOT interrupts.

Document the thread_mask magic while at it.

Reported-and-tested-by: Sven Joachim <svenjoac@gmx.de>
Reported-and-tested-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
Cc: stable@vger.kernel.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/irq/manage.c