mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Matthew Wilcox <matthew@wil.cx>
To: Linus Torvalds <torvalds@osdl.org>, Andrew Morton <akpm@osdl.org>
Cc: Matthew Wilcox <matthew@wil.cx>, Ingo Molnar <mingo@elte.hu>,
	linux-kernel@vger.kernel.org, Russell King <rmk@arm.linux.org.uk>,
	Ian Molton <spyro@f2s.com>, David Howells <dhowells@redhat.com>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Paul Mackerras <paulus@samba.org>
Subject: [PATCH 2/5] Ensure NO_IRQ is appropriately defined on all architectures
Date: Tue, 22 Nov 2005 00:19:06 -0500	[thread overview]
Message-ID: <E1EeQYc-00055n-Gc@localhost.localdomain> (raw)

Add a default definition of NO_IRQ to <linux/hardirq.h> and make the
definition in <asm/hardirq.h> uniform across all architectures which
define it.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>

---

 include/asm-arm/irq.h     |    5 +----
 include/asm-arm26/irq.h   |    5 +----
 include/asm-frv/irq.h     |    2 +-
 include/asm-parisc/irq.h  |    2 +-
 include/asm-powerpc/irq.h |    2 +-
 include/linux/hardirq.h   |   10 ++++++++++
 6 files changed, 15 insertions(+), 11 deletions(-)

applies-to: 48ad7d3f9b055a9d4c1a1ab1f6dd0a584cfed99c
8a7e8c26051c3abef81eb155c8a721716e24cc26
diff --git a/include/asm-arm/irq.h b/include/asm-arm/irq.h
index 59975ee..4ea980e 100644
--- a/include/asm-arm/irq.h
+++ b/include/asm-arm/irq.h
@@ -12,12 +12,9 @@
 #endif
 
 /*
- * Use this value to indicate lack of interrupt
- * capability
+ * Use this value to indicate lack of interrupt capability
  */
-#ifndef NO_IRQ
 #define NO_IRQ	((unsigned int)(-1))
-#endif
 
 struct irqaction;
 
diff --git a/include/asm-arm26/irq.h b/include/asm-arm26/irq.h
index 06bd5a5..88e8ab7 100644
--- a/include/asm-arm26/irq.h
+++ b/include/asm-arm26/irq.h
@@ -15,12 +15,9 @@
 
 
 /*
- * Use this value to indicate lack of interrupt
- * capability
+ * Use this value to indicate lack of interrupt capability
  */
-#ifndef NO_IRQ
 #define NO_IRQ	((unsigned int)(-1))
-#endif
 
 struct irqaction;
 
diff --git a/include/asm-frv/irq.h b/include/asm-frv/irq.h
index 2c16d8d..018ef9b 100644
--- a/include/asm-frv/irq.h
+++ b/include/asm-frv/irq.h
@@ -21,7 +21,7 @@
  */
 
 /* this number is used when no interrupt has been assigned */
-#define NO_IRQ				(-1)
+#define NO_IRQ				((unsigned int)(-1))
 
 #define NR_IRQ_LOG2_ACTIONS_PER_GROUP	5
 #define NR_IRQ_ACTIONS_PER_GROUP	(1 << NR_IRQ_LOG2_ACTIONS_PER_GROUP)
diff --git a/include/asm-parisc/irq.h b/include/asm-parisc/irq.h
index b0a30e2..d8de7cf 100644
--- a/include/asm-parisc/irq.h
+++ b/include/asm-parisc/irq.h
@@ -11,7 +11,7 @@
 #include <linux/cpumask.h>
 #include <asm/types.h>
 
-#define NO_IRQ		(-1)
+#define NO_IRQ		((unsigned int)(-1))
 
 #ifdef CONFIG_GSC
 #define GSC_IRQ_BASE	16
diff --git a/include/asm-powerpc/irq.h b/include/asm-powerpc/irq.h
index 8eb7e85..61579c0 100644
--- a/include/asm-powerpc/irq.h
+++ b/include/asm-powerpc/irq.h
@@ -16,7 +16,7 @@
 #include <asm/atomic.h>
 
 /* this number is used when no interrupt has been assigned */
-#define NO_IRQ			(-1)
+#define NO_IRQ			((unsigned int)(-1))
 
 /*
  * These constants are used for passing information about interrupt
diff --git a/include/linux/hardirq.h b/include/linux/hardirq.h
index 71d2b8a..510d71b 100644
--- a/include/linux/hardirq.h
+++ b/include/linux/hardirq.h
@@ -5,6 +5,7 @@
 #include <linux/preempt.h>
 #include <linux/smp_lock.h>
 #include <asm/hardirq.h>
+#include <asm/irq.h>
 #include <asm/system.h>
 
 /*
@@ -87,6 +88,15 @@ extern void synchronize_irq(unsigned int
 # define synchronize_irq(irq)	barrier()
 #endif
 
+/*
+ * This value means "Device has no interrupt".  The value 0 has
+ * historically been used, but it's a legal interrupt number on some
+ * architectures.  These architectures typically define it to be -1 instead.
+ */
+#ifndef NO_IRQ
+#define NO_IRQ			((unsigned int)0)
+#endif
+
 #define nmi_enter()		irq_enter()
 #define nmi_exit()		sub_preempt_count(HARDIRQ_OFFSET)
 
---
0.99.8.GIT

             reply	other threads:[~2005-11-22  5:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-22  5:19 Matthew Wilcox [this message]
2005-11-22 14:20 ` Matthew Wilcox
2005-11-22 14:27 ` Christoph Hellwig
2005-11-22 16:43   ` Matthew Wilcox
2005-12-06 17:23     ` Christoph Hellwig

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=E1EeQYc-00055n-Gc@localhost.localdomain \
    --to=matthew@wil.cx \
    --cc=akpm@osdl.org \
    --cc=benh@kernel.crashing.org \
    --cc=dhowells@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=paulus@samba.org \
    --cc=rmk@arm.linux.org.uk \
    --cc=spyro@f2s.com \
    --cc=torvalds@osdl.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

all inboxes | Powered by JetHome®