Commit 908dcecd authored by Jan Beulich's avatar Jan Beulich Committed by Linus Torvalds

[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: default avatarJan 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: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent a5d6839b
...@@ -92,8 +92,4 @@ extern void enable_irq(unsigned int); ...@@ -92,8 +92,4 @@ extern void enable_irq(unsigned int);
struct pt_regs; struct pt_regs;
extern void (*perf_irq)(unsigned long, struct pt_regs *); extern void (*perf_irq)(unsigned long, struct pt_regs *);
struct irqaction;
int handle_IRQ_event(unsigned int, struct pt_regs *, struct irqaction *);
#endif /* _ALPHA_IRQ_H */ #endif /* _ALPHA_IRQ_H */
...@@ -47,10 +47,6 @@ void disable_irq_wake(unsigned int irq); ...@@ -47,10 +47,6 @@ void disable_irq_wake(unsigned int irq);
void enable_irq_wake(unsigned int irq); void enable_irq_wake(unsigned int irq);
int setup_irq(unsigned int, struct irqaction *); int setup_irq(unsigned int, struct irqaction *);
struct irqaction;
struct pt_regs;
int handle_IRQ_event(unsigned int, struct pt_regs *, struct irqaction *);
extern void migrate_irqs(void); extern void migrate_irqs(void);
#endif #endif
...@@ -44,9 +44,5 @@ extern void enable_irq(unsigned int); ...@@ -44,9 +44,5 @@ extern void enable_irq(unsigned int);
int set_irq_type(unsigned int irq, unsigned int type); int set_irq_type(unsigned int irq, unsigned int type);
int setup_irq(unsigned int, struct irqaction *);
struct pt_regs;
int handle_IRQ_event(unsigned int, struct pt_regs *, struct irqaction *);
#endif #endif
...@@ -63,8 +63,4 @@ extern void enable_irq(unsigned int); ...@@ -63,8 +63,4 @@ extern void enable_irq(unsigned int);
extern void disable_irq(unsigned int); extern void disable_irq(unsigned int);
#define disable_irq_nosync(x) disable_irq(x) #define disable_irq_nosync(x) disable_irq(x)
struct irqaction;
struct pt_regs;
int handle_IRQ_event(unsigned int, struct pt_regs *, struct irqaction *);
#endif /* _H8300_IRQ_H_ */ #endif /* _H8300_IRQ_H_ */
...@@ -130,8 +130,4 @@ extern volatile unsigned int num_spurious; ...@@ -130,8 +130,4 @@ extern volatile unsigned int num_spurious;
*/ */
extern irq_node_t *new_irq_node(void); extern irq_node_t *new_irq_node(void);
struct irqaction;
struct pt_regs;
int handle_IRQ_event(unsigned int, struct pt_regs *, struct irqaction *);
#endif /* _M68K_IRQ_H_ */ #endif /* _M68K_IRQ_H_ */
...@@ -87,8 +87,4 @@ extern void (*mach_disable_irq)(unsigned int); ...@@ -87,8 +87,4 @@ extern void (*mach_disable_irq)(unsigned int);
#define disable_irq(x) do { } while (0) #define disable_irq(x) do { } while (0)
#define disable_irq_nosync(x) disable_irq(x) #define disable_irq_nosync(x) disable_irq(x)
struct irqaction;
struct pt_regs;
int handle_IRQ_event(unsigned int, struct pt_regs *, struct irqaction *);
#endif /* _M68K_IRQ_H_ */ #endif /* _M68K_IRQ_H_ */
...@@ -21,10 +21,6 @@ enum interruption_class { ...@@ -21,10 +21,6 @@ enum interruption_class {
#define touch_nmi_watchdog() do { } while(0) #define touch_nmi_watchdog() do { } while(0)
struct irqaction;
struct pt_regs;
int handle_IRQ_event(unsigned int, struct pt_regs *, struct irqaction *);
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
#endif #endif
...@@ -181,8 +181,4 @@ extern struct sun4m_intregs *sun4m_interrupts; ...@@ -181,8 +181,4 @@ extern struct sun4m_intregs *sun4m_interrupts;
#define SUN4M_INT_SBUS(x) (1 << (x+7)) #define SUN4M_INT_SBUS(x) (1 << (x+7))
#define SUN4M_INT_VME(x) (1 << (x)) #define SUN4M_INT_VME(x) (1 << (x))
struct irqaction;
struct pt_regs;
int handle_IRQ_event(unsigned int, struct pt_regs *, struct irqaction *);
#endif #endif
...@@ -62,8 +62,6 @@ extern void disable_irq (unsigned int irq); ...@@ -62,8 +62,6 @@ extern void disable_irq (unsigned int irq);
/* Disable an irq without waiting. */ /* Disable an irq without waiting. */
extern void disable_irq_nosync (unsigned int irq); extern void disable_irq_nosync (unsigned int irq);
extern int handle_IRQ_event(unsigned int, struct pt_regs *, struct irqaction *);
#endif /* !__ASSEMBLY__ */ #endif /* !__ASSEMBLY__ */
#endif /* __V850_IRQ_H__ */ #endif /* __V850_IRQ_H__ */
...@@ -7,32 +7,13 @@ ...@@ -7,32 +7,13 @@
#include <linux/bitops.h> #include <linux/bitops.h>
#include <linux/preempt.h> #include <linux/preempt.h>
#include <linux/cpumask.h> #include <linux/cpumask.h>
#include <linux/irqreturn.h>
#include <linux/hardirq.h> #include <linux/hardirq.h>
#include <linux/sched.h> #include <linux/sched.h>
#include <asm/atomic.h> #include <asm/atomic.h>
#include <asm/ptrace.h> #include <asm/ptrace.h>
#include <asm/system.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)
struct irqaction { struct irqaction {
irqreturn_t (*handler)(int, void *, struct pt_regs *); irqreturn_t (*handler)(int, void *, struct pt_regs *);
unsigned long flags; unsigned long flags;
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#include <linux/cache.h> #include <linux/cache.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/cpumask.h> #include <linux/cpumask.h>
#include <linux/irqreturn.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/ptrace.h> #include <asm/ptrace.h>
...@@ -175,7 +176,7 @@ static inline void set_balance_irq_affinity(unsigned int irq, cpumask_t mask) ...@@ -175,7 +176,7 @@ static inline void set_balance_irq_affinity(unsigned int irq, cpumask_t mask)
extern int no_irq_affinity; extern int no_irq_affinity;
extern int noirqdebug_setup(char *str); extern int noirqdebug_setup(char *str);
extern fastcall int handle_IRQ_event(unsigned int irq, struct pt_regs *regs, extern fastcall irqreturn_t handle_IRQ_event(unsigned int irq, struct pt_regs *regs,
struct irqaction *action); struct irqaction *action);
extern fastcall unsigned int __do_IRQ(unsigned int irq, struct pt_regs *regs); extern fastcall unsigned int __do_IRQ(unsigned int irq, struct pt_regs *regs);
extern void note_interrupt(unsigned int irq, irq_desc_t *desc, extern void note_interrupt(unsigned int irq, irq_desc_t *desc,
......
/* 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
...@@ -76,10 +76,11 @@ irqreturn_t no_action(int cpl, void *dev_id, struct pt_regs *regs) ...@@ -76,10 +76,11 @@ irqreturn_t no_action(int cpl, void *dev_id, struct pt_regs *regs)
/* /*
* Have got an event to handle: * Have got an event to handle:
*/ */
fastcall int handle_IRQ_event(unsigned int irq, struct pt_regs *regs, fastcall irqreturn_t handle_IRQ_event(unsigned int irq, struct pt_regs *regs,
struct irqaction *action) struct irqaction *action)
{ {
int ret, retval = 0, status = 0; irqreturn_t ret, retval = IRQ_NONE;
unsigned int status = 0;
if (!(action->flags & SA_INTERRUPT)) if (!(action->flags & SA_INTERRUPT))
local_irq_enable(); local_irq_enable();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment