From: Thomas Gleixner <tglx@linutronix.de>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Andrew Morton <akpm@linux-foundation.org>,
Ingo Molnar <mingo@elte.hu>,
Peter Zijlstra <peterz@infradead.org>
Subject: [patch 2/5] genirq: Allow shared oneshot interrupts
Date: Wed, 23 Feb 2011 23:52:16 -0000 [thread overview]
Message-ID: <20110223234956.483640430@linutronix.de> (raw)
In-Reply-To: 20110223231601.613115832@linutronix.de
[-- Attachment #1: genirq-allow-shared-oneshot-interrupts.patch --]
[-- Type: text/plain, Size: 1354 bytes --]
Support ONESHOT on shared interrupts, if all drivers agree on it.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
kernel/irq/manage.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
Index: linux-2.6-tip/kernel/irq/manage.c
===================================================================
--- linux-2.6-tip.orig/kernel/irq/manage.c
+++ linux-2.6-tip/kernel/irq/manage.c
@@ -823,10 +823,6 @@ __setup_irq(unsigned int irq, struct irq
rand_initialize_irq(irq);
}
- /* Oneshot interrupts are not allowed with shared */
- if ((new->flags & IRQF_ONESHOT) && (new->flags & IRQF_SHARED))
- return -EINVAL;
-
/*
* Check whether the interrupt nests into another interrupt
* thread.
@@ -880,10 +876,12 @@ __setup_irq(unsigned int irq, struct irq
* Can't share interrupts unless both agree to and are
* the same type (level, edge, polarity). So both flag
* fields must have IRQF_SHARED set and the bits which
- * set the trigger type must match.
+ * set the trigger type must match. Also all must
+ * agree on ONESHOT.
*/
if (!((old->flags & new->flags) & IRQF_SHARED) ||
- ((old->flags ^ new->flags) & IRQF_TRIGGER_MASK)) {
+ ((old->flags ^ new->flags) & IRQF_TRIGGER_MASK) ||
+ ((old->flags ^ new->flags) & IRQF_ONESHOT)) {
old_name = old->name;
goto mismatch;
}
next prev parent reply other threads:[~2011-02-23 23:52 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-23 23:52 [patch 0/5] genirq: Forced threaded interrupt handlers Thomas Gleixner
2011-02-23 23:52 ` [patch 1/5] genirq: Prepare the handling of shared oneshot interrupts Thomas Gleixner
2011-02-24 2:30 ` Linus Torvalds
2011-02-24 17:56 ` Thomas Gleixner
2011-02-26 16:22 ` [tip:irq/core] " tip-bot for Thomas Gleixner
2011-02-23 23:52 ` Thomas Gleixner [this message]
2011-02-26 16:22 ` [tip:irq/core] genirq: Allow " tip-bot for Thomas Gleixner
2011-02-23 23:52 ` [patch 3/5] genirq: Add IRQF_NO_THREAD Thomas Gleixner
2011-02-26 16:22 ` [tip:irq/core] " tip-bot for Thomas Gleixner
2011-02-23 23:52 ` [patch 4/5] sched: Switch wait_task_inactive to schedule_hrtimeout() Thomas Gleixner
2011-02-26 16:23 ` [tip:irq/core] " tip-bot for Thomas Gleixner
2011-02-23 23:52 ` [patch 5/5] genirq: Provide forced interrupt threading Thomas Gleixner
2011-02-26 16:23 ` [tip:irq/core] " tip-bot for Thomas Gleixner
2011-02-24 7:12 ` [patch 0/5] genirq: Forced threaded interrupt handlers Ingo Molnar
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=20110223234956.483640430@linutronix.de \
--to=tglx@linutronix.de \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
--cc=torvalds@linux-foundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox