From: "Robert P. J. Day" <rpjday@crashcourse.ca>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: test for "spurious" IRQ ignores possible IRQ_WAKE_THREAD value
Date: Mon, 14 Sep 2009 16:34:48 -0400 (EDT) [thread overview]
Message-ID: <alpine.LFD.2.00.0909141632390.4329@localhost> (raw)
In-Reply-To: <alpine.LFD.2.00.0909141627500.4124@localhost>
On Mon, 14 Sep 2009, Robert P. J. Day wrote:
> never ashamed to embarrass myself in public, i just noticed the
> following. from kernel/irq/spurious.c:
>
> ...
> static void
> __report_bad_irq(unsigned int irq, struct irq_desc *desc,
> irqreturn_t action_ret)
> {
> struct irqaction *action;
>
> if (action_ret != IRQ_HANDLED && action_ret != IRQ_NONE) {
> printk(KERN_ERR "irq event %d: bogus return value %x\n",
> irq, action_ret);
>
> but from include/linux/irqreturn.h, we see *three* possible return
> values:
>
> enum irqreturn {
> IRQ_NONE,
> IRQ_HANDLED,
> IRQ_WAKE_THREAD,
> };
>
> typedef enum irqreturn irqreturn_t;
> #define IRQ_RETVAL(x) ((x) != IRQ_NONE)
>
> is there an inconsistency here?
i should have pointed out that there is (apparently) only one place
in the entire tree that uses that third return value:
$ grep -rw IRQ_WAKE_THREAD *
drivers/net/wireless/b43/main.c: return IRQ_WAKE_THREAD; <-- there
include/linux/irqreturn.h: * @IRQ_WAKE_THREAD handler requests to wake the handler thread
include/linux/irqreturn.h: IRQ_WAKE_THREAD,
Binary file include/linux/.irqreturn.h.swp matches
include/linux/interrupt.h: * IRQTF_WARNED - warning "IRQ_WAKE_THREAD w/o thread_fn" has been printed
kernel/irq/handle.c: printk(KERN_WARNING "IRQ %d device %s returned IRQ_WAKE_THREAD "
kernel/irq/handle.c: case IRQ_WAKE_THREAD:
kernel/irq/manage.c: return IRQ_WAKE_THREAD;
kernel/irq/manage.c: * IRQ_WAKE_THREAD which will wake up the handler thread and run
$
for what that's worth.
rday
--
========================================================================
Robert P. J. Day Waterloo, Ontario, CANADA
Linux Consulting, Training and Annoying Kernel Pedantry.
Web page: http://crashcourse.ca
Twitter: http://twitter.com/rpjday
========================================================================
next prev parent reply other threads:[~2009-09-14 20:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-14 20:30 test for "spurious" IRQ ignores possible IRQ_WAKE_THREAD value Robert P. J. Day
2009-09-14 20:34 ` Robert P. J. Day [this message]
2009-09-17 19:34 ` Cyrill Gorcunov
2009-09-17 19:52 ` Thomas Gleixner
2009-09-17 20:08 ` Robert P. J. Day
2009-09-17 20:18 ` Cyrill Gorcunov
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=alpine.LFD.2.00.0909141632390.4329@localhost \
--to=rpjday@crashcourse.ca \
--cc=linux-kernel@vger.kernel.org \
/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.