diff options
-rw-r--r-- | include/asm-alpha/irq.h | 4 | ||||
-rw-r--r-- | include/asm-arm/irq.h | 4 | ||||
-rw-r--r-- | include/asm-arm26/irq.h | 4 | ||||
-rw-r--r-- | include/asm-h8300/irq.h | 4 | ||||
-rw-r--r-- | include/asm-m68k/irq.h | 4 | ||||
-rw-r--r-- | include/asm-m68knommu/irq.h | 4 | ||||
-rw-r--r-- | include/asm-s390/irq.h | 4 | ||||
-rw-r--r-- | include/asm-sparc/irq.h | 4 | ||||
-rw-r--r-- | include/asm-v850/irq.h | 2 | ||||
-rw-r--r-- | include/linux/interrupt.h | 21 | ||||
-rw-r--r-- | include/linux/irq.h | 3 | ||||
-rw-r--r-- | include/linux/irqreturn.h | 25 | ||||
-rw-r--r-- | kernel/irq/handle.c | 5 |
13 files changed, 31 insertions, 57 deletions
diff --git a/include/asm-alpha/irq.h b/include/asm-alpha/irq.h index f6de033718a0..917b9fe372cf 100644 --- a/include/asm-alpha/irq.h +++ b/include/asm-alpha/irq.h | |||
@@ -92,8 +92,4 @@ extern void enable_irq(unsigned int); | |||
92 | struct pt_regs; | 92 | struct pt_regs; |
93 | extern void (*perf_irq)(unsigned long, struct pt_regs *); | 93 | extern void (*perf_irq)(unsigned long, struct pt_regs *); |
94 | 94 | ||
95 | struct irqaction; | ||
96 | int handle_IRQ_event(unsigned int, struct pt_regs *, struct irqaction *); | ||
97 | |||
98 | |||
99 | #endif /* _ALPHA_IRQ_H */ | 95 | #endif /* _ALPHA_IRQ_H */ |
diff --git a/include/asm-arm/irq.h b/include/asm-arm/irq.h index 60b5105c9c93..66e67e60bc56 100644 --- a/include/asm-arm/irq.h +++ b/include/asm-arm/irq.h | |||
@@ -47,10 +47,6 @@ void disable_irq_wake(unsigned int irq); | |||
47 | void enable_irq_wake(unsigned int irq); | 47 | void enable_irq_wake(unsigned int irq); |
48 | int setup_irq(unsigned int, struct irqaction *); | 48 | int setup_irq(unsigned int, struct irqaction *); |
49 | 49 | ||
50 | struct irqaction; | ||
51 | struct pt_regs; | ||
52 | int handle_IRQ_event(unsigned int, struct pt_regs *, struct irqaction *); | ||
53 | |||
54 | extern void migrate_irqs(void); | 50 | extern void migrate_irqs(void); |
55 | #endif | 51 | #endif |
56 | 52 | ||
diff --git a/include/asm-arm26/irq.h b/include/asm-arm26/irq.h index 06bd5a543d13..9aaac87efba9 100644 --- a/include/asm-arm26/irq.h +++ b/include/asm-arm26/irq.h | |||
@@ -44,9 +44,5 @@ extern void enable_irq(unsigned int); | |||
44 | 44 | ||
45 | int set_irq_type(unsigned int irq, unsigned int type); | 45 | int set_irq_type(unsigned int irq, unsigned int type); |
46 | 46 | ||
47 | int setup_irq(unsigned int, struct irqaction *); | ||
48 | struct pt_regs; | ||
49 | int handle_IRQ_event(unsigned int, struct pt_regs *, struct irqaction *); | ||
50 | |||
51 | #endif | 47 | #endif |
52 | 48 | ||
diff --git a/include/asm-h8300/irq.h b/include/asm-h8300/irq.h index 73065f5bda0e..42a3ac424a9e 100644 --- a/include/asm-h8300/irq.h +++ b/include/asm-h8300/irq.h | |||
@@ -63,8 +63,4 @@ extern void enable_irq(unsigned int); | |||
63 | extern void disable_irq(unsigned int); | 63 | extern void disable_irq(unsigned int); |
64 | #define disable_irq_nosync(x) disable_irq(x) | 64 | #define disable_irq_nosync(x) disable_irq(x) |
65 | 65 | ||
66 | struct irqaction; | ||
67 | struct pt_regs; | ||
68 | int handle_IRQ_event(unsigned int, struct pt_regs *, struct irqaction *); | ||
69 | |||
70 | #endif /* _H8300_IRQ_H_ */ | 66 | #endif /* _H8300_IRQ_H_ */ |
diff --git a/include/asm-m68k/irq.h b/include/asm-m68k/irq.h index b4f48b2a6a57..9727ca9d9f26 100644 --- a/include/asm-m68k/irq.h +++ b/include/asm-m68k/irq.h | |||
@@ -130,8 +130,4 @@ extern volatile unsigned int num_spurious; | |||
130 | */ | 130 | */ |
131 | extern irq_node_t *new_irq_node(void); | 131 | extern irq_node_t *new_irq_node(void); |
132 | 132 | ||
133 | struct irqaction; | ||
134 | struct pt_regs; | ||
135 | int handle_IRQ_event(unsigned int, struct pt_regs *, struct irqaction *); | ||
136 | |||
137 | #endif /* _M68K_IRQ_H_ */ | 133 | #endif /* _M68K_IRQ_H_ */ |
diff --git a/include/asm-m68knommu/irq.h b/include/asm-m68knommu/irq.h index 2b408842a30e..c5247516fcfe 100644 --- a/include/asm-m68knommu/irq.h +++ b/include/asm-m68knommu/irq.h | |||
@@ -87,8 +87,4 @@ extern void (*mach_disable_irq)(unsigned int); | |||
87 | #define disable_irq(x) do { } while (0) | 87 | #define disable_irq(x) do { } while (0) |
88 | #define disable_irq_nosync(x) disable_irq(x) | 88 | #define disable_irq_nosync(x) disable_irq(x) |
89 | 89 | ||
90 | struct irqaction; | ||
91 | struct pt_regs; | ||
92 | int handle_IRQ_event(unsigned int, struct pt_regs *, struct irqaction *); | ||
93 | |||
94 | #endif /* _M68K_IRQ_H_ */ | 90 | #endif /* _M68K_IRQ_H_ */ |
diff --git a/include/asm-s390/irq.h b/include/asm-s390/irq.h index 916a1aa0b073..bd1a721f7aa2 100644 --- a/include/asm-s390/irq.h +++ b/include/asm-s390/irq.h | |||
@@ -21,10 +21,6 @@ enum interruption_class { | |||
21 | 21 | ||
22 | #define touch_nmi_watchdog() do { } while(0) | 22 | #define touch_nmi_watchdog() do { } while(0) |
23 | 23 | ||
24 | struct irqaction; | ||
25 | struct pt_regs; | ||
26 | int handle_IRQ_event(unsigned int, struct pt_regs *, struct irqaction *); | ||
27 | |||
28 | #endif /* __KERNEL__ */ | 24 | #endif /* __KERNEL__ */ |
29 | #endif | 25 | #endif |
30 | 26 | ||
diff --git a/include/asm-sparc/irq.h b/include/asm-sparc/irq.h index f2d64537e29d..3141ddfea97d 100644 --- a/include/asm-sparc/irq.h +++ b/include/asm-sparc/irq.h | |||
@@ -181,8 +181,4 @@ extern struct sun4m_intregs *sun4m_interrupts; | |||
181 | #define SUN4M_INT_SBUS(x) (1 << (x+7)) | 181 | #define SUN4M_INT_SBUS(x) (1 << (x+7)) |
182 | #define SUN4M_INT_VME(x) (1 << (x)) | 182 | #define SUN4M_INT_VME(x) (1 << (x)) |
183 | 183 | ||
184 | struct irqaction; | ||
185 | struct pt_regs; | ||
186 | int handle_IRQ_event(unsigned int, struct pt_regs *, struct irqaction *); | ||
187 | |||
188 | #endif | 184 | #endif |
diff --git a/include/asm-v850/irq.h b/include/asm-v850/irq.h index 44431152b36d..1bf096db8f4c 100644 --- a/include/asm-v850/irq.h +++ b/include/asm-v850/irq.h | |||
@@ -62,8 +62,6 @@ extern void disable_irq (unsigned int irq); | |||
62 | /* Disable an irq without waiting. */ | 62 | /* Disable an irq without waiting. */ |
63 | extern void disable_irq_nosync (unsigned int irq); | 63 | extern void disable_irq_nosync (unsigned int irq); |
64 | 64 | ||
65 | extern int handle_IRQ_event(unsigned int, struct pt_regs *, struct irqaction *); | ||
66 | |||
67 | #endif /* !__ASSEMBLY__ */ | 65 | #endif /* !__ASSEMBLY__ */ |
68 | 66 | ||
69 | #endif /* __V850_IRQ_H__ */ | 67 | #endif /* __V850_IRQ_H__ */ |
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 | */ | ||
30 | typedef int irqreturn_t; | ||
31 | |||
32 | #define IRQ_NONE (0) | ||
33 | #define IRQ_HANDLED (1) | ||
34 | #define IRQ_RETVAL(x) ((x) != 0) | ||
35 | |||
36 | struct irqaction { | 17 | struct 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) | |||
175 | extern int no_irq_affinity; | 176 | extern int no_irq_affinity; |
176 | extern int noirqdebug_setup(char *str); | 177 | extern int noirqdebug_setup(char *str); |
177 | 178 | ||
178 | extern fastcall int handle_IRQ_event(unsigned int irq, struct pt_regs *regs, | 179 | extern fastcall irqreturn_t handle_IRQ_event(unsigned int irq, struct pt_regs *regs, |
179 | struct irqaction *action); | 180 | struct irqaction *action); |
180 | extern fastcall unsigned int __do_IRQ(unsigned int irq, struct pt_regs *regs); | 181 | extern fastcall unsigned int __do_IRQ(unsigned int irq, struct pt_regs *regs); |
181 | extern void note_interrupt(unsigned int irq, irq_desc_t *desc, | 182 | extern 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 | */ | ||
19 | typedef int irqreturn_t; | ||
20 | |||
21 | #define IRQ_NONE (0) | ||
22 | #define IRQ_HANDLED (1) | ||
23 | #define IRQ_RETVAL(x) ((x) != 0) | ||
24 | |||
25 | #endif | ||
diff --git a/kernel/irq/handle.c b/kernel/irq/handle.c index 51df337b37db..0f6530117105 100644 --- a/kernel/irq/handle.c +++ b/kernel/irq/handle.c | |||
@@ -76,10 +76,11 @@ irqreturn_t no_action(int cpl, void *dev_id, struct pt_regs *regs) | |||
76 | /* | 76 | /* |
77 | * Have got an event to handle: | 77 | * Have got an event to handle: |
78 | */ | 78 | */ |
79 | fastcall int handle_IRQ_event(unsigned int irq, struct pt_regs *regs, | 79 | fastcall irqreturn_t handle_IRQ_event(unsigned int irq, struct pt_regs *regs, |
80 | struct irqaction *action) | 80 | struct irqaction *action) |
81 | { | 81 | { |
82 | int ret, retval = 0, status = 0; | 82 | irqreturn_t ret, retval = IRQ_NONE; |
83 | unsigned int status = 0; | ||
83 | 84 | ||
84 | if (!(action->flags & SA_INTERRUPT)) | 85 | if (!(action->flags & SA_INTERRUPT)) |
85 | local_irq_enable(); | 86 | local_irq_enable(); |