aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/interrupt.h21
-rw-r--r--include/linux/irq.h3
-rw-r--r--include/linux/irqreturn.h25
3 files changed, 28 insertions, 21 deletions
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
index 9e0fefd7884a..70741e170114 100644
--- a/include/linux/interrupt.h
+++ b/include/linux/interrupt.h
@@ -7,32 +7,13 @@
7#include <linux/bitops.h> 7#include <linux/bitops.h>
8#include <linux/preempt.h> 8#include <linux/preempt.h>
9#include <linux/cpumask.h> 9#include <linux/cpumask.h>
10#include <linux/irqreturn.h>
10#include <linux/hardirq.h> 11#include <linux/hardirq.h>
11#include <linux/sched.h> 12#include <linux/sched.h>
12#include <asm/atomic.h> 13#include <asm/atomic.h>
13#include <asm/ptrace.h> 14#include <asm/ptrace.h>
14#include <asm/system.h> 15#include <asm/system.h>
15 16
16/*
17 * For 2.4.x compatibility, 2.4.x can use
18 *
19 * typedef void irqreturn_t;
20 * #define IRQ_NONE
21 * #define IRQ_HANDLED
22 * #define IRQ_RETVAL(x)
23 *
24 * To mix old-style and new-style irq handler returns.
25 *
26 * IRQ_NONE means we didn't handle it.
27 * IRQ_HANDLED means that we did have a valid interrupt and handled it.
28 * IRQ_RETVAL(x) selects on the two depending on x being non-zero (for handled)
29 */
30typedef int irqreturn_t;
31
32#define IRQ_NONE (0)
33#define IRQ_HANDLED (1)
34#define IRQ_RETVAL(x) ((x) != 0)
35
36struct irqaction { 17struct irqaction {
37 irqreturn_t (*handler)(int, void *, struct pt_regs *); 18 irqreturn_t (*handler)(int, void *, struct pt_regs *);
38 unsigned long flags; 19 unsigned long flags;
diff --git a/include/linux/irq.h b/include/linux/irq.h
index e8a07e75e4fb..676e00dfb21a 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -17,6 +17,7 @@
17#include <linux/cache.h> 17#include <linux/cache.h>
18#include <linux/spinlock.h> 18#include <linux/spinlock.h>
19#include <linux/cpumask.h> 19#include <linux/cpumask.h>
20#include <linux/irqreturn.h>
20 21
21#include <asm/irq.h> 22#include <asm/irq.h>
22#include <asm/ptrace.h> 23#include <asm/ptrace.h>
@@ -175,7 +176,7 @@ static inline void set_balance_irq_affinity(unsigned int irq, cpumask_t mask)
175extern int no_irq_affinity; 176extern int no_irq_affinity;
176extern int noirqdebug_setup(char *str); 177extern int noirqdebug_setup(char *str);
177 178
178extern fastcall int handle_IRQ_event(unsigned int irq, struct pt_regs *regs, 179extern fastcall irqreturn_t handle_IRQ_event(unsigned int irq, struct pt_regs *regs,
179 struct irqaction *action); 180 struct irqaction *action);
180extern fastcall unsigned int __do_IRQ(unsigned int irq, struct pt_regs *regs); 181extern fastcall unsigned int __do_IRQ(unsigned int irq, struct pt_regs *regs);
181extern void note_interrupt(unsigned int irq, irq_desc_t *desc, 182extern void note_interrupt(unsigned int irq, irq_desc_t *desc,
diff --git a/include/linux/irqreturn.h b/include/linux/irqreturn.h
new file mode 100644
index 000000000000..881883c2009d
--- /dev/null
+++ b/include/linux/irqreturn.h
@@ -0,0 +1,25 @@
1/* irqreturn.h */
2#ifndef _LINUX_IRQRETURN_H
3#define _LINUX_IRQRETURN_H
4
5/*
6 * For 2.4.x compatibility, 2.4.x can use
7 *
8 * typedef void irqreturn_t;
9 * #define IRQ_NONE
10 * #define IRQ_HANDLED
11 * #define IRQ_RETVAL(x)
12 *
13 * To mix old-style and new-style irq handler returns.
14 *
15 * IRQ_NONE means we didn't handle it.
16 * IRQ_HANDLED means that we did have a valid interrupt and handled it.
17 * IRQ_RETVAL(x) selects on the two depending on x being non-zero (for handled)
18 */
19typedef int irqreturn_t;
20
21#define IRQ_NONE (0)
22#define IRQ_HANDLED (1)
23#define IRQ_RETVAL(x) ((x) != 0)
24
25#endif