linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Subject: [PATCH] reintegrate irqreturn.h into hardirq.h
@ 2006-06-23 17:45 Roman Zippel
  2006-06-24 14:57 ` Roland Dreier
  0 siblings, 1 reply; 3+ messages in thread
From: Roman Zippel @ 2006-06-23 17:45 UTC (permalink / raw)
  To: Andrew Morton, linux-kernel; +Cc: jbeulich


We already have enough mini header files and moving these definitions to
hardirq.h works just fine.

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>

---

 include/linux/hardirq.h   |   20 ++++++++++++++++++++
 include/linux/interrupt.h |    1 -
 include/linux/irq.h       |    3 +--
 include/linux/irqreturn.h |   25 -------------------------
 4 files changed, 21 insertions(+), 28 deletions(-)
 delete mode 100644 include/linux/irqreturn.h

d0f1912371a73561d6146f2fcd8600a535f12ad7
diff --git a/include/linux/hardirq.h b/include/linux/hardirq.h
index 114ae58..f925867 100644
--- a/include/linux/hardirq.h
+++ b/include/linux/hardirq.h
@@ -7,6 +7,26 @@ #include <asm/hardirq.h>
 #include <asm/system.h>
 
 /*
+ * For 2.4.x compatibility, 2.4.x can use
+ *
+ *	typedef void irqreturn_t;
+ *	#define IRQ_NONE
+ *	#define IRQ_HANDLED
+ *	#define IRQ_RETVAL(x)
+ *
+ * To mix old-style and new-style irq handler returns.
+ *
+ * IRQ_NONE means we didn't handle it.
+ * IRQ_HANDLED means that we did have a valid interrupt and handled it.
+ * IRQ_RETVAL(x) selects on the two depending on x being non-zero (for handled)
+ */
+typedef int irqreturn_t;
+
+#define IRQ_NONE	(0)
+#define IRQ_HANDLED	(1)
+#define IRQ_RETVAL(x)	((x) != 0)
+
+/*
  * We put the hardirq and softirq counter into the preemption
  * counter. The bitmask has the following meaning:
  *
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
index 70741e1..47ff0d0 100644
--- a/include/linux/interrupt.h
+++ b/include/linux/interrupt.h
@@ -7,7 +7,6 @@ #include <linux/linkage.h>
 #include <linux/bitops.h>
 #include <linux/preempt.h>
 #include <linux/cpumask.h>
-#include <linux/irqreturn.h>
 #include <linux/hardirq.h>
 #include <linux/sched.h>
 #include <asm/atomic.h>
diff --git a/include/linux/irq.h b/include/linux/irq.h
index 676e00d..e8a07e7 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -17,7 +17,6 @@ #include <linux/linkage.h>
 #include <linux/cache.h>
 #include <linux/spinlock.h>
 #include <linux/cpumask.h>
-#include <linux/irqreturn.h>
 
 #include <asm/irq.h>
 #include <asm/ptrace.h>
@@ -176,7 +175,7 @@ #endif
 extern int no_irq_affinity;
 extern int noirqdebug_setup(char *str);
 
-extern fastcall irqreturn_t handle_IRQ_event(unsigned int irq, struct pt_regs *regs,
+extern fastcall int handle_IRQ_event(unsigned int irq, struct pt_regs *regs,
 					struct irqaction *action);
 extern fastcall unsigned int __do_IRQ(unsigned int irq, struct pt_regs *regs);
 extern void note_interrupt(unsigned int irq, irq_desc_t *desc,
diff --git a/include/linux/irqreturn.h b/include/linux/irqreturn.h
deleted file mode 100644
index 881883c..0000000
--- a/include/linux/irqreturn.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/* irqreturn.h */
-#ifndef _LINUX_IRQRETURN_H
-#define _LINUX_IRQRETURN_H
-
-/*
- * For 2.4.x compatibility, 2.4.x can use
- *
- *	typedef void irqreturn_t;
- *	#define IRQ_NONE
- *	#define IRQ_HANDLED
- *	#define IRQ_RETVAL(x)
- *
- * To mix old-style and new-style irq handler returns.
- *
- * IRQ_NONE means we didn't handle it.
- * IRQ_HANDLED means that we did have a valid interrupt and handled it.
- * IRQ_RETVAL(x) selects on the two depending on x being non-zero (for handled)
- */
-typedef int irqreturn_t;
-
-#define IRQ_NONE	(0)
-#define IRQ_HANDLED	(1)
-#define IRQ_RETVAL(x)	((x) != 0)
-
-#endif
-- 
1.3.3


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: Subject: [PATCH] reintegrate irqreturn.h into hardirq.h
  2006-06-23 17:45 Subject: [PATCH] reintegrate irqreturn.h into hardirq.h Roman Zippel
@ 2006-06-24 14:57 ` Roland Dreier
  2006-06-24 15:34   ` Roman Zippel
  0 siblings, 1 reply; 3+ messages in thread
From: Roland Dreier @ 2006-06-24 14:57 UTC (permalink / raw)
  To: Roman Zippel; +Cc: Andrew Morton, linux-kernel, jbeulich

 > -extern fastcall irqreturn_t handle_IRQ_event(unsigned int irq, struct pt_regs *regs,
 > +extern fastcall int handle_IRQ_event(unsigned int irq, struct pt_regs *regs,
 >  					struct irqaction *action);

This seems like a step backwards: this changes the declaration of
handle_IRQ_event() so it no longer matches the real definition.

 - R.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Subject: [PATCH] reintegrate irqreturn.h into hardirq.h
  2006-06-24 14:57 ` Roland Dreier
@ 2006-06-24 15:34   ` Roman Zippel
  0 siblings, 0 replies; 3+ messages in thread
From: Roman Zippel @ 2006-06-24 15:34 UTC (permalink / raw)
  To: Roland Dreier; +Cc: Andrew Morton, linux-kernel, jbeulich

Hi,

On Sat, 24 Jun 2006, Roland Dreier wrote:

>  > -extern fastcall irqreturn_t handle_IRQ_event(unsigned int irq, struct pt_regs *regs,
>  > +extern fastcall int handle_IRQ_event(unsigned int irq, struct pt_regs *regs,
>  >  					struct irqaction *action);
> 
> This seems like a step backwards: this changes the declaration of
> handle_IRQ_event() so it no longer matches the real definition.

Then it's better to change the definition back as well, we generally want 
to avoid typedefs and this one is only a compatibility typedef meant for 
drivers.

bye, Roman

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-06-24 15:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-23 17:45 Subject: [PATCH] reintegrate irqreturn.h into hardirq.h Roman Zippel
2006-06-24 14:57 ` Roland Dreier
2006-06-24 15:34   ` Roman Zippel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).