Commit 908dcecda1d18803b5823f30e6c47d2882dc0cf1
Committed by
Linus Torvalds
1 parent
a5d6839b75
Exists in
master
and in
39 other branches
[PATCH] adjust handle_IRR_event() return type
Correct the return type of handle_IRQ_event() (inconsistency noticed during Xen development), and remove redundant declarations. The return type adjustment required breaking out the definition of irqreturn_t into a separate header, in order to satisfy current include order dependencies. Signed-off-by: Jan Beulich <jbeulich@novell.com> Cc: Richard Henderson <rth@twiddle.net> Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru> Cc: Russell King <rmk@arm.linux.org.uk> Cc: Ian Molton <spyro@f2s.com> Cc: Mikael Starvik <starvik@axis.com> Cc: Yoshinori Sato <ysato@users.sourceforge.jp> Cc: Hirokazu Takata <takata.hirokazu@renesas.com> Cc: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: William Lee Irwin III <wli@holomorphy.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: Miles Bader <uclinux-v850@lsi.nec.co.jp> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Showing 13 changed files with 31 additions and 57 deletions Side-by-side Diff
- include/asm-alpha/irq.h
- include/asm-arm/irq.h
- include/asm-arm26/irq.h
- include/asm-h8300/irq.h
- include/asm-m68k/irq.h
- include/asm-m68knommu/irq.h
- include/asm-s390/irq.h
- include/asm-sparc/irq.h
- include/asm-v850/irq.h
- include/linux/interrupt.h
- include/linux/irq.h
- include/linux/irqreturn.h
- kernel/irq/handle.c
include/asm-alpha/irq.h
include/asm-arm/irq.h
... | ... | @@ -47,10 +47,6 @@ |
47 | 47 | void enable_irq_wake(unsigned int irq); |
48 | 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 | 50 | extern void migrate_irqs(void); |
55 | 51 | #endif |
include/asm-arm26/irq.h
include/asm-h8300/irq.h
include/asm-m68k/irq.h
include/asm-m68knommu/irq.h
include/asm-s390/irq.h
include/asm-sparc/irq.h
include/asm-v850/irq.h
include/linux/interrupt.h
... | ... | @@ -7,31 +7,12 @@ |
7 | 7 | #include <linux/bitops.h> |
8 | 8 | #include <linux/preempt.h> |
9 | 9 | #include <linux/cpumask.h> |
10 | +#include <linux/irqreturn.h> | |
10 | 11 | #include <linux/hardirq.h> |
11 | 12 | #include <linux/sched.h> |
12 | 13 | #include <asm/atomic.h> |
13 | 14 | #include <asm/ptrace.h> |
14 | 15 | #include <asm/system.h> |
15 | - | |
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 | 16 | |
36 | 17 | struct irqaction { |
37 | 18 | irqreturn_t (*handler)(int, void *, struct pt_regs *); |
include/linux/irq.h
... | ... | @@ -17,6 +17,7 @@ |
17 | 17 | #include <linux/cache.h> |
18 | 18 | #include <linux/spinlock.h> |
19 | 19 | #include <linux/cpumask.h> |
20 | +#include <linux/irqreturn.h> | |
20 | 21 | |
21 | 22 | #include <asm/irq.h> |
22 | 23 | #include <asm/ptrace.h> |
... | ... | @@ -175,7 +176,7 @@ |
175 | 176 | extern int no_irq_affinity; |
176 | 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 | 180 | struct irqaction *action); |
180 | 181 | extern fastcall unsigned int __do_IRQ(unsigned int irq, struct pt_regs *regs); |
181 | 182 | extern void note_interrupt(unsigned int irq, irq_desc_t *desc, |
include/linux/irqreturn.h
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 |
kernel/irq/handle.c
... | ... | @@ -76,10 +76,11 @@ |
76 | 76 | /* |
77 | 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 | 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 | 85 | if (!(action->flags & SA_INTERRUPT)) |
85 | 86 | local_irq_enable(); |