From: Michael Buesch <mb@bu3sch.de>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Threaded interrupt handlers broken?
Date: Mon, 17 Aug 2009 13:37:58 +0200 [thread overview]
Message-ID: <200908171337.58713.mb@bu3sch.de> (raw)
In-Reply-To: <alpine.LFD.2.00.0908171311260.2782@localhost.localdomain>
On Monday 17 August 2009 13:12:09 Thomas Gleixner wrote:
> On Mon, 17 Aug 2009, Thomas Gleixner wrote:
> > On Mon, 17 Aug 2009, Thomas Gleixner wrote:
> >
> > > On Mon, 17 Aug 2009, Michael Buesch wrote:
> > > > Ok, I added some more debugging code:
> > > > http://bu3sch.de/patches/wireless-testing/20090817-1219/patches/001-hack-threaded-irqs.patch
> > > >
> > > > Here's the result:
> > > > http://bu3sch.de/misc/dmesg2
> > > >
> > > > Is it possible that the irq_to_desc() in irq_thread() fails and the
> > > > resulting desc pointer points to something random? That could
> > > > probably explain why the bit is set and why the spinlock is
> > > > uninitialized. But it would not explain why desc->lock would still
> > > > work... Maybe irq_to_desc() returns a descriptor to another irq (!=
> > > > 52)?
> > >
> > > That would cause the whole irq code to fail. Can you send/upload your
> > > .config please ?
> >
> > Also just add printk("desc: %p \n", desc); to the various places to
> > make sure that your pointers are correct.
>
> Gah. I think I found it.
>
> I wonder why nobody else ever tripped over this.
>
> Thanks,
>
> tglx
> ---
> diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
> index d222515..223b062 100644
> --- a/kernel/irq/manage.c
> +++ b/kernel/irq/manage.c
> @@ -607,7 +607,6 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new)
> */
> get_task_struct(t);
> new->thread = t;
> - wake_up_process(t);
> }
>
> /*
> @@ -712,6 +711,9 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new)
> new->dir = NULL;
> register_handler_proc(irq, new);
>
> + if (new->thread)
> + wake_up_process(new->thread);
> +
> return 0;
>
> mismatch:
>
>
This fixes it :)
Tested-by: Michael Buesch <mb@bu3sch.de>
--
Greetings, Michael.
next prev parent reply other threads:[~2009-08-17 11:37 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-16 9:53 Threaded interrupt handlers broken? Michael Buesch
2009-08-16 10:14 ` Michael Buesch
2009-08-16 12:45 ` Michael Buesch
2009-08-16 13:22 ` Thomas Gleixner
2009-08-16 13:46 ` Michael Buesch
2009-08-16 14:25 ` Thomas Gleixner
2009-08-16 17:51 ` Michael Buesch
2009-08-16 20:05 ` Thomas Gleixner
2009-08-16 21:01 ` Michael Buesch
2009-08-16 21:28 ` Thomas Gleixner
2009-08-17 10:23 ` Michael Buesch
2009-08-17 10:56 ` Thomas Gleixner
2009-08-17 11:03 ` Thomas Gleixner
2009-08-17 11:12 ` Thomas Gleixner
2009-08-17 11:37 ` Michael Buesch [this message]
2009-08-17 12:14 ` Thomas Gleixner
2009-08-17 12:30 ` Michael Buesch
2009-09-04 18:55 ` Michael Buesch
2009-09-04 19:05 ` Michael Buesch
2009-09-04 19:35 ` Michael Buesch
2009-09-04 19:37 ` Sebastian Andrzej Siewior
2009-08-16 13:19 ` Thomas Gleixner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200908171337.58713.mb@bu3sch.de \
--to=mb@bu3sch.de \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.