diff --git a/arch/ppc/4xx_io/serial_sicc.c b/arch/ppc/4xx_io/serial_sicc.c index f7b7044ecfe1c69f173897dc749e642c30c7c774..da44468c5c4780b81aa2363877d1d7c25967e0a2 100644 --- a/arch/ppc/4xx_io/serial_sicc.c +++ b/arch/ppc/4xx_io/serial_sicc.c @@ -431,11 +431,7 @@ static void siccuart_event(struct SICC_info *info, int event) } static void -#ifdef SUPPORT_SYSRQ siccuart_rx_chars(struct SICC_info *info, struct pt_regs *regs) -#else -siccuart_rx_chars(struct SICC_info *info) -#endif { struct tty_struct *tty = info->tty; unsigned int status, ch, rsr, flg, ignored = 0; @@ -574,25 +570,19 @@ static void siccuart_tx_chars(struct SICC_info *info) } -static void siccuart_int_rx(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t siccuart_int_rx(int irq, void *dev_id, struct pt_regs *regs) { struct SICC_info *info = dev_id; - -#ifdef SUPPORT_SYSRQ - siccuart_rx_chars(info, regs); -#else - siccuart_rx_chars(info); -#endif - - //powerpcClearUicsrBits(0x00000400); + siccuart_rx_chars(info, regs); + return IRQ_HANDLED; } -static void siccuart_int_tx(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t siccuart_int_tx(int irq, void *dev_id, struct pt_regs *regs) { struct SICC_info *info = dev_id; siccuart_tx_chars(info); - + return IRQ_HANDLED; } static void siccuart_tasklet_action(unsigned long data) diff --git a/arch/ppc/8260_io/enet.c b/arch/ppc/8260_io/enet.c index 5e06697c88e7b618c68235cdee802ba35bcff08c..7a24273167aa981760f699bd2e39f4173a6923a9 100644 --- a/arch/ppc/8260_io/enet.c +++ b/arch/ppc/8260_io/enet.c @@ -122,7 +122,7 @@ struct scc_enet_private { static int scc_enet_open(struct net_device *dev); static int scc_enet_start_xmit(struct sk_buff *skb, struct net_device *dev); static int scc_enet_rx(struct net_device *dev); -static void scc_enet_interrupt(int irq, void * dev_id, struct pt_regs * regs); +static irqreturn_t scc_enet_interrupt(int irq, void *dev_id, struct pt_regs *); static int scc_enet_close(struct net_device *dev); static struct net_device_stats *scc_enet_get_stats(struct net_device *dev); static void set_multicast_list(struct net_device *dev); @@ -272,7 +272,7 @@ scc_enet_timeout(struct net_device *dev) /* The interrupt handler. * This is called from the CPM handler, not the MPC core interrupt. */ -static void +static irqreturn_t scc_enet_interrupt(int irq, void * dev_id, struct pt_regs * regs) { struct net_device *dev = dev_id; @@ -403,7 +403,7 @@ scc_enet_interrupt(int irq, void * dev_id, struct pt_regs * regs) printk("SCC ENET: BSY can't happen.\n"); } - return; + return IRQ_HANDLED; } /* During a receive, the cur_rx points to the current incoming buffer. diff --git a/arch/ppc/8260_io/fcc_enet.c b/arch/ppc/8260_io/fcc_enet.c index 041b2b65de614c9f8d948ba8c0dc86dc5944b4e1..85274b8ac41e2f266a0d959bedb315cf23576587 100644 --- a/arch/ppc/8260_io/fcc_enet.c +++ b/arch/ppc/8260_io/fcc_enet.c @@ -126,7 +126,7 @@ typedef struct { static int fcc_enet_open(struct net_device *dev); static int fcc_enet_start_xmit(struct sk_buff *skb, struct net_device *dev); static int fcc_enet_rx(struct net_device *dev); -static void fcc_enet_interrupt(int irq, void * dev_id, struct pt_regs * regs); +static irqreturn_t fcc_enet_interrupt(int irq, void *dev_id, struct pt_regs *); static int fcc_enet_close(struct net_device *dev); static struct net_device_stats *fcc_enet_get_stats(struct net_device *dev); static void set_multicast_list(struct net_device *dev); @@ -452,7 +452,7 @@ fcc_enet_timeout(struct net_device *dev) } /* The interrupt handler. */ -static void +static irqreturn_t fcc_enet_interrupt(int irq, void * dev_id, struct pt_regs * regs) { struct net_device *dev = dev_id; @@ -583,7 +583,7 @@ fcc_enet_interrupt(int irq, void * dev_id, struct pt_regs * regs) if (int_events & FCC_ENET_BSY) { cep->stats.rx_dropped++; } - return; + return IRQ_HANDLED; } /* During a receive, the cur_rx points to the current incoming buffer. @@ -1203,7 +1203,7 @@ mii_discover_phy(uint mii_reg, struct net_device *dev) } /* This interrupt occurs when the PHY detects a link change. */ -static void +static irqreturn_t mii_link_interrupt(int irq, void * dev_id, struct pt_regs * regs) { struct net_device *dev = dev_id; @@ -1211,6 +1211,7 @@ mii_link_interrupt(int irq, void * dev_id, struct pt_regs * regs) mii_do_cmd(dev, fep->phy->ack_int); mii_do_cmd(dev, phy_cmd_relink); /* restart and display status */ + return IRQ_HANDLED; } #endif /* CONFIG_USE_MDIO */ diff --git a/arch/ppc/8260_io/uart.c b/arch/ppc/8260_io/uart.c index 3393e85b05e9abb2f6a29ab941ff29f9844aa86e..f0aa4cce2f5819048172b40e5f1a26433a39be2e 100644 --- a/arch/ppc/8260_io/uart.c +++ b/arch/ppc/8260_io/uart.c @@ -570,7 +570,7 @@ static _INLINE_ void check_modem_status(struct async_struct *info) /* * This is the serial driver's interrupt routine for a single port */ -static void rs_8xx_interrupt(int irq, void * dev_id, struct pt_regs * regs) +static irqreturn_t rs_8xx_interrupt(int irq, void * dev_id, struct pt_regs * regs) { u_char events; int idx; @@ -610,6 +610,7 @@ static void rs_8xx_interrupt(int irq, void * dev_id, struct pt_regs * regs) #ifdef SERIAL_DEBUG_INTR printk("end.\n"); #endif + return IRQ_HANDLED; } diff --git a/arch/ppc/amiga/amiints.c b/arch/ppc/amiga/amiints.c index a12e2f8f5e0fce64ca28a83c2e04be122951c173..91195e2ce38d138861315f3006f4a9e53e3ef1cf 100644 --- a/arch/ppc/amiga/amiints.c +++ b/arch/ppc/amiga/amiints.c @@ -55,10 +55,6 @@ #include <asm/amigappc.h> #endif -extern int cia_request_irq(int irq, - void (*handler)(int, void *, struct pt_regs *), - unsigned long flags, const char *devname, void *dev_id); -extern void cia_free_irq(unsigned int irq, void *dev_id); extern void cia_init_IRQ(struct ciabase *base); unsigned short ami_intena_vals[AMI_STD_IRQS] = { diff --git a/arch/ppc/amiga/config.c b/arch/ppc/amiga/config.c index 5404b69042ff45799f6a4359bde36db4ce1f9f98..11a2592e7d389dc231d2d7c57de12809cd15f3d0 100644 --- a/arch/ppc/amiga/config.c +++ b/arch/ppc/amiga/config.c @@ -71,7 +71,7 @@ static char amiga_model_name[13] = "Amiga "; extern char m68k_debug_device[]; -static void amiga_sched_init(void (*handler)(int, void *, struct pt_regs *)); +static void amiga_sched_init(irqreturn_t (*handler)(int, void *, struct pt_regs *)); /* amiga specific irq functions */ extern void amiga_init_IRQ (void); extern void (*amiga_default_handler[]) (int, void *, struct pt_regs *); @@ -478,8 +478,8 @@ void __init config_amiga(void) static unsigned short jiffy_ticks; -static void __init amiga_sched_init(void (*timer_routine)(int, void *, - struct pt_regs *)) +static void __init amiga_sched_init(irqreturn_t (*timer_routine)(int, void *, + struct pt_regs *)) { static struct resource sched_res = { "timer", 0x00bfd400, 0x00bfd5ff, diff --git a/arch/ppc/kernel/irq.c b/arch/ppc/kernel/irq.c index 24965586025c050de2479fe193adfb6028c6200f..37e3e054b787260c5816c9a36c7c700c1c6eba5f 100644 --- a/arch/ppc/kernel/irq.c +++ b/arch/ppc/kernel/irq.c @@ -210,7 +210,8 @@ void free_irq(unsigned int irq, void* dev_id) return; } -int request_irq(unsigned int irq, void (*handler)(int, void *, struct pt_regs *), +int request_irq(unsigned int irq, + irqreturn_t (*handler)(int, void *, struct pt_regs *), unsigned long irqflags, const char * devname, void *dev_id) { struct irqaction *action; @@ -218,16 +219,9 @@ int request_irq(unsigned int irq, void (*handler)(int, void *, struct pt_regs *) if (irq >= NR_IRQS) return -EINVAL; - if (!handler) - { - /* - * free_irq() used to be implemented as a call to - * request_irq() with handler being NULL. Now we have - * a real free_irq() but need to allow the old behavior - * for old code that hasn't caught up yet. - * -- Cort <cort@fsmlabs.com> - */ - free_irq(irq, dev_id); + if (!handler) { + printk(KERN_ERR "request_irq called with NULL handler!\n"); + dump_stack(); return 0; } @@ -246,8 +240,7 @@ int request_irq(unsigned int irq, void (*handler)(int, void *, struct pt_regs *) action->next = NULL; retval = setup_irq(irq, action); - if (retval) - { + if (retval) { kfree(action); return retval; } @@ -732,6 +725,7 @@ void init_irq_proc (void) } } -void no_action(int irq, void *dev, struct pt_regs *regs) +irqreturn_t no_action(int irq, void *dev, struct pt_regs *regs) { + return IRQ_NONE; } diff --git a/arch/ppc/platforms/pmac_smp.c b/arch/ppc/platforms/pmac_smp.c index f558e977e24247cbc94cd3b5c3ac179f3ebc9b25..8fef8266a4236abe22c82c19f7de92cf72169fb2 100644 --- a/arch/ppc/platforms/pmac_smp.c +++ b/arch/ppc/platforms/pmac_smp.c @@ -189,10 +189,11 @@ psurge_smp_message_recv(struct pt_regs *regs) smp_message_recv(msg, regs); } -void __pmac +irqreturn_t __pmac psurge_primary_intr(int irq, void *d, struct pt_regs *regs) { psurge_smp_message_recv(regs); + return IRQ_HANDLED; } static void __pmac diff --git a/arch/ppc/platforms/prep_setup.c b/arch/ppc/platforms/prep_setup.c index 574bf95601c98e40a92dc11c27bd70dd10a2f7cc..b43033e67319bb9636c8d4197dcaa12230fde250 100644 --- a/arch/ppc/platforms/prep_setup.c +++ b/arch/ppc/platforms/prep_setup.c @@ -850,7 +850,7 @@ prep_res_calibrate_decr(void) static volatile int calibrate_steps __initdata = 3; static unsigned tbstamp __initdata = 0; -static void __init +static irqreturn_t __init prep_calibrate_decr_handler(int irq, void *dev, struct pt_regs *regs) { unsigned long t, freq; @@ -866,6 +866,7 @@ prep_calibrate_decr_handler(int irq, void *dev, struct pt_regs *regs) tb_ticks_per_jiffy = freq / HZ; tb_to_us = mulhwu_scale_factor(freq, 1000000); } + return IRQ_HANDLED; } static void __init diff --git a/arch/ppc/syslib/open_pic.c b/arch/ppc/syslib/open_pic.c index 33798a25a470f0a6aaa84a30dfa569aedd8ca839..f91d2c4f3bb0ee204634df36e4eacb6f267611f8 100644 --- a/arch/ppc/syslib/open_pic.c +++ b/arch/ppc/syslib/open_pic.c @@ -821,9 +821,10 @@ static void openpic_end_ipi(unsigned int irq_nr) { } -static void openpic_ipi_action(int cpl, void *dev_id, struct pt_regs *regs) +static irqreturn_t openpic_ipi_action(int cpl, void *dev_id, struct pt_regs *regs) { smp_message_recv(cpl-OPENPIC_VEC_IPI-open_pic_irq_offset, regs); + return IRQ_HANDLED; } #endif /* CONFIG_SMP */ diff --git a/arch/ppc/syslib/ppc8xx_pic.c b/arch/ppc/syslib/ppc8xx_pic.c index a0e94c9e382c45c6425e1899cc351c3c151be524..73ae3c04dc260b5c1db5c84ae5b173f9593f2467 100644 --- a/arch/ppc/syslib/ppc8xx_pic.c +++ b/arch/ppc/syslib/ppc8xx_pic.c @@ -168,7 +168,8 @@ void mbx_i8259_action(int cpl, void *dev_id, struct pt_regs *regs) * drivers that may mess up the internal interrupt controllers, and also * allow them to run without modification on the MBX. */ -int request_irq(unsigned int irq, void (*handler)(int, void *, struct pt_regs *), +int request_irq(unsigned int irq, + irqreturn_t (*handler)(int, void *, struct pt_regs *), unsigned long irqflags, const char * devname, void *dev_id) {