[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.2.02.1203062101040.2742@ionos>
Date: Tue, 6 Mar 2012 21:26:07 +0100 (CET)
From: Thomas Gleixner <tglx@...utronix.de>
To: Sven Joachim <svenjoac@....de>
cc: Linus Torvalds <torvalds@...ux-foundation.org>,
Stefan Lippers-Hollmann <s.L-H@....de>,
Greg KH <gregkh@...uxfoundation.org>,
LKML <linux-kernel@...r.kernel.org>, stable@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>,
Alan Cox <alan@...rguk.ukuu.org.uk>,
Jonathan Nieder <jrnieder@...il.com>,
linux-wireless@...r.kernel.org,
Stefano Brivio <stefano.brivio@...imi.it>
Subject: Re: [ 57/72] genirq: Unmask oneshot irqs when thread was not woken
On Tue, 6 Mar 2012, Sven Joachim wrote:
> Am 06.03.2012 um 20:31 schrieb Thomas Gleixner:
>
> > Stephan, Sven: Can you please provide the output of /proc/interrupts ?
>
> Here is mine, from a freshly booted 3.3-rc6 kernel.
>
> Cheers,
> Sven
>
> CPU0
> 0: 25050 XT-PIC-XT-PIC timer
> 1: 101 XT-PIC-XT-PIC i8042
> 2: 0 XT-PIC-XT-PIC cascade
> 3: 1 XT-PIC-XT-PIC
> 4: 1 XT-PIC-XT-PIC
> 5: 0 XT-PIC-XT-PIC ehci_hcd:usb1, uhci_hcd:usb2
> 6: 1 XT-PIC-XT-PIC i915, uhci_hcd:usb5, yenta
> 7: 1 XT-PIC-XT-PIC
> 8: 0 XT-PIC-XT-PIC rtc0
> 9: 634 XT-PIC-XT-PIC acpi
> 10: 341 XT-PIC-XT-PIC uhci_hcd:usb4, snd_hda_intel, b43
Ah, XT-PIC uses handle_level_irq(). /me bangs head against desk.
Does the patch below fix the problem for you ?
Thanks,
tglx
----------------->
Subject: genirq: Clear action->thread_mask if IRQ_ONESHOT is not set
commit ac5637611(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.
Reported-by: Sven Joachim <svenjoac@....de>
Cc: stable@...r.kernel.org
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
---
Index: linux-2.6/kernel/irq/manage.c
===================================================================
--- linux-2.6.orig/kernel/irq/manage.c
+++ linux-2.6/kernel/irq/manage.c
@@ -996,11 +996,13 @@ __setup_irq(unsigned int irq, struct irq
* Setup the thread mask for this irqaction. Unlikely to have
* 32 resp 64 irqs sharing one line, but who knows.
*/
- if (new->flags & IRQF_ONESHOT && thread_mask == ~0UL) {
- ret = -EBUSY;
- goto out_mask;
+ if (new->flags & IRQF_ONESHOT) {
+ if (thread_mask == ~0UL) {
+ ret = -EBUSY;
+ goto out_mask;
+ }
+ new->thread_mask = new->flags & IRQF_ONESHOT;
}
- new->thread_mask = 1 << ffz(thread_mask);
if (!shared) {
init_waitqueue_head(&desc->wait_for_threads);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists