mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yong Zhang <yong.zhang0@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: Thomas Gleixner <tglx@linutronix.de>
Subject: [PATCH -rt] genirq: IRQF_NODELAY must be consistent between shared irqs
Date: Mon, 17 Jan 2011 22:33:31 +0800	[thread overview]
Message-ID: <1295274811-3504-1-git-send-email-yong.zhang0@gmail.com> (raw)

IRQF_NODELAY can not be messed up for shared irqs, because if
one of the regestered irq can be threaded, irq_desc->status will
set with IRQ_ONESHOT. Thus when irq is triggered, the
none-threaded one will warn with warn_no_thread().

So let __setup_irq fail if IRQF_NODELAY is not consistent between
them.

Signed-off-by: Yong Zhang <yong.zhang0@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
---
 kernel/irq/manage.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index cda70cb..7ce9050 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -797,10 +797,11 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new)
 		 * 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 and IRQF_NODELAY must match.
 		 */
 		if (!((old->flags & new->flags) & IRQF_SHARED) ||
-		    ((old->flags ^ new->flags) & IRQF_TRIGGER_MASK)) {
+		    ((old->flags ^ new->flags) & (IRQF_TRIGGER_MASK |
+						  IRQF_NODELAY))) {
 			old_name = old->name;
 			goto mismatch;
 		}
-- 
1.7.1


             reply	other threads:[~2011-01-17 14:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-17 14:33 Yong Zhang [this message]
2011-01-18  7:26 ` Yong Zhang

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=1295274811-3504-1-git-send-email-yong.zhang0@gmail.com \
    --to=yong.zhang0@gmail.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®