Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

MIPS: Replace setup_irq() by request_irq()

request_irq() is preferred over setup_irq(). Invocations of setup_irq()
occur after memory allocators are ready.

Per tglx[1], setup_irq() existed in olden days when allocators were not
ready by the time early interrupts were initialized.

Hence replace setup_irq() by request_irq().

remove_irq() has been replaced by free_irq() as well.

There were build error's during previous version, couple of which was
reported by kbuild test robot <lkp@intel.com> of which one was reported
by Thomas Bogendoerfer <tsbogend@alpha.franken.de> as well. There were a
few more issues including build errors, those also have been fixed.

[1] https://lkml.kernel.org/r/alpine.DEB.2.20.1710191609480.1971@nanos

Signed-off-by: afzal mohammed <afzal.mohd.ma@gmail.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>

authored by

afzal mohammed and committed by
Thomas Bogendoerfer
ac8fd122 792a402c

+240 -413
+3 -8
arch/mips/alchemy/common/time.c
··· 72 72 .cpumask = cpu_possible_mask, 73 73 }; 74 74 75 - static struct irqaction au1x_rtcmatch2_irqaction = { 76 - .handler = au1x_rtcmatch2_irq, 77 - .flags = IRQF_TIMER, 78 - .name = "timer", 79 - .dev_id = &au1x_rtcmatch2_clockdev, 80 - }; 81 - 82 75 static int __init alchemy_time_init(unsigned int m2int) 83 76 { 84 77 struct clock_event_device *cd = &au1x_rtcmatch2_clockdev; ··· 123 130 cd->min_delta_ns = clockevent_delta2ns(9, cd); 124 131 cd->min_delta_ticks = 9; /* ~0.28ms */ 125 132 clockevents_register_device(cd); 126 - setup_irq(m2int, &au1x_rtcmatch2_irqaction); 133 + if (request_irq(m2int, au1x_rtcmatch2_irq, IRQF_TIMER, "timer", 134 + &au1x_rtcmatch2_clockdev)) 135 + pr_err("Failed to register timer interrupt\n"); 127 136 128 137 printk(KERN_INFO "Alchemy clocksource installed\n"); 129 138
+8 -8
arch/mips/ar7/irq.c
··· 83 83 .irq_ack = ar7_ack_sec_irq, 84 84 }; 85 85 86 - static struct irqaction ar7_cascade_action = { 87 - .handler = no_action, 88 - .name = "AR7 cascade interrupt", 89 - .flags = IRQF_NO_THREAD, 90 - }; 91 - 92 86 static void __init ar7_irq_init(int base) 93 87 { 94 88 int i; ··· 110 116 handle_level_irq); 111 117 } 112 118 113 - setup_irq(2, &ar7_cascade_action); 114 - setup_irq(ar7_irq_base, &ar7_cascade_action); 119 + if (request_irq(2, no_action, IRQF_NO_THREAD, "AR7 cascade interrupt", 120 + NULL)) 121 + pr_err("Failed to request irq 2 (AR7 cascade interrupt)\n"); 122 + if (request_irq(ar7_irq_base, no_action, IRQF_NO_THREAD, 123 + "AR7 cascade interrupt", NULL)) { 124 + pr_err("Failed to request irq %d (AR7 cascade interrupt)\n", 125 + ar7_irq_base); 126 + } 115 127 set_c0_status(IE_IRQ0); 116 128 } 117 129
+3 -6
arch/mips/ath25/ar2315.c
··· 64 64 return IRQ_HANDLED; 65 65 } 66 66 67 - static struct irqaction ar2315_ahb_err_interrupt = { 68 - .handler = ar2315_ahb_err_handler, 69 - .name = "ar2315-ahb-error", 70 - }; 71 - 72 67 static void ar2315_misc_irq_handler(struct irq_desc *desc) 73 68 { 74 69 u32 pending = ar2315_rst_reg_read(AR2315_ISR) & ··· 154 159 panic("Failed to add IRQ domain"); 155 160 156 161 irq = irq_create_mapping(domain, AR2315_MISC_IRQ_AHB); 157 - setup_irq(irq, &ar2315_ahb_err_interrupt); 162 + if (request_irq(irq, ar2315_ahb_err_handler, 0, "ar2315-ahb-error", 163 + NULL)) 164 + pr_err("Failed to register ar2315-ahb-error interrupt\n"); 158 165 159 166 irq_set_chained_handler_and_data(AR2315_IRQ_MISC, 160 167 ar2315_misc_irq_handler, domain);
+3 -6
arch/mips/ath25/ar5312.c
··· 68 68 return IRQ_HANDLED; 69 69 } 70 70 71 - static struct irqaction ar5312_ahb_err_interrupt = { 72 - .handler = ar5312_ahb_err_handler, 73 - .name = "ar5312-ahb-error", 74 - }; 75 - 76 71 static void ar5312_misc_irq_handler(struct irq_desc *desc) 77 72 { 78 73 u32 pending = ar5312_rst_reg_read(AR5312_ISR) & ··· 149 154 panic("Failed to add IRQ domain"); 150 155 151 156 irq = irq_create_mapping(domain, AR5312_MISC_IRQ_AHB_PROC); 152 - setup_irq(irq, &ar5312_ahb_err_interrupt); 157 + if (request_irq(irq, ar5312_ahb_err_handler, 0, "ar5312-ahb-error", 158 + NULL)) 159 + pr_err("Failed to register ar5312-ahb-error interrupt\n"); 153 160 154 161 irq_set_chained_handler_and_data(AR5312_IRQ_MISC, 155 162 ar5312_misc_irq_handler, domain);
+16 -25
arch/mips/bcm63xx/irq.c
··· 399 399 .irq_set_type = bcm63xx_external_irq_set_type, 400 400 }; 401 401 402 - static struct irqaction cpu_ip2_cascade_action = { 403 - .handler = no_action, 404 - .name = "cascade_ip2", 405 - .flags = IRQF_NO_THREAD, 406 - }; 407 - 408 - #ifdef CONFIG_SMP 409 - static struct irqaction cpu_ip3_cascade_action = { 410 - .handler = no_action, 411 - .name = "cascade_ip3", 412 - .flags = IRQF_NO_THREAD, 413 - }; 414 - #endif 415 - 416 - static struct irqaction cpu_ext_cascade_action = { 417 - .handler = no_action, 418 - .name = "cascade_extirq", 419 - .flags = IRQF_NO_THREAD, 420 - }; 421 - 422 402 static void bcm63xx_init_irq(void) 423 403 { 424 404 int irq_bits; ··· 511 531 512 532 void __init arch_init_irq(void) 513 533 { 514 - int i; 534 + int i, irq; 515 535 516 536 bcm63xx_init_irq(); 517 537 mips_cpu_irq_init(); ··· 524 544 handle_edge_irq); 525 545 526 546 if (!is_ext_irq_cascaded) { 527 - for (i = 3; i < 3 + ext_irq_count; ++i) 528 - setup_irq(MIPS_CPU_IRQ_BASE + i, &cpu_ext_cascade_action); 547 + for (i = 3; i < 3 + ext_irq_count; ++i) { 548 + irq = MIPS_CPU_IRQ_BASE + i; 549 + if (request_irq(irq, no_action, IRQF_NO_THREAD, 550 + "cascade_extirq", NULL)) { 551 + pr_err("Failed to request irq %d (cascade_extirq)\n", 552 + irq); 553 + } 554 + } 529 555 } 530 556 531 - setup_irq(MIPS_CPU_IRQ_BASE + 2, &cpu_ip2_cascade_action); 557 + irq = MIPS_CPU_IRQ_BASE + 2; 558 + if (request_irq(irq, no_action, IRQF_NO_THREAD, "cascade_ip2", NULL)) 559 + pr_err("Failed to request irq %d (cascade_ip2)\n", irq); 532 560 #ifdef CONFIG_SMP 533 561 if (is_ext_irq_cascaded) { 534 - setup_irq(MIPS_CPU_IRQ_BASE + 3, &cpu_ip3_cascade_action); 562 + irq = MIPS_CPU_IRQ_BASE + 3; 563 + if (request_irq(irq, no_action, IRQF_NO_THREAD, "cascade_ip3", 564 + NULL)) 565 + pr_err("Failed to request irq %d (cascade_ip3)\n", irq); 535 566 bcm63xx_internal_irq_chip.irq_set_affinity = 536 567 bcm63xx_internal_set_affinity; 537 568
+10 -8
arch/mips/cobalt/irq.c
··· 45 45 spurious_interrupt(); 46 46 } 47 47 48 - static struct irqaction cascade = { 49 - .handler = no_action, 50 - .name = "cascade", 51 - .flags = IRQF_NO_THREAD, 52 - }; 53 - 54 48 void __init arch_init_irq(void) 55 49 { 56 50 mips_cpu_irq_init(); 57 51 gt641xx_irq_init(); 58 52 init_i8259_irqs(); 59 53 60 - setup_irq(GT641XX_CASCADE_IRQ, &cascade); 61 - setup_irq(I8259_CASCADE_IRQ, &cascade); 54 + if (request_irq(GT641XX_CASCADE_IRQ, no_action, IRQF_NO_THREAD, 55 + "cascade", NULL)) { 56 + pr_err("Failed to request irq %d (cascade)\n", 57 + GT641XX_CASCADE_IRQ); 58 + } 59 + if (request_irq(I8259_CASCADE_IRQ, no_action, IRQF_NO_THREAD, 60 + "cascade", NULL)) { 61 + pr_err("Failed to request irq %d (cascade)\n", 62 + I8259_CASCADE_IRQ); 63 + } 62 64 }
+24 -35
arch/mips/dec/setup.c
··· 103 103 int cpu_fpu_mask = DEC_CPU_IRQ_MASK(DEC_CPU_INR_FPU); 104 104 int *fpu_kstat_irq; 105 105 106 - static struct irqaction ioirq = { 107 - .handler = no_action, 108 - .name = "cascade", 109 - .flags = IRQF_NO_THREAD, 110 - }; 111 - static struct irqaction fpuirq = { 112 - .handler = no_action, 113 - .name = "fpu", 114 - .flags = IRQF_NO_THREAD, 115 - }; 116 - 117 - static struct irqaction busirq = { 118 - .name = "bus error", 119 - .flags = IRQF_NO_THREAD, 120 - }; 121 - 122 - static struct irqaction haltirq = { 123 - .handler = dec_intr_halt, 124 - .name = "halt", 125 - .flags = IRQF_NO_THREAD, 126 - }; 127 - 106 + static irq_handler_t busirq_handler; 107 + static unsigned int busirq_flags = IRQF_NO_THREAD; 128 108 129 109 /* 130 110 * Bus error (DBE/IBE exceptions and bus interrupts) handling setup. ··· 114 134 switch (mips_machtype) { 115 135 case MACH_DS23100: /* DS2100/DS3100 Pmin/Pmax */ 116 136 board_be_handler = dec_kn01_be_handler; 117 - busirq.handler = dec_kn01_be_interrupt; 118 - busirq.flags |= IRQF_SHARED; 137 + busirq_handler = dec_kn01_be_interrupt; 138 + busirq_flags |= IRQF_SHARED; 119 139 dec_kn01_be_init(); 120 140 break; 121 141 case MACH_DS5000_1XX: /* DS5000/1xx 3min */ 122 142 case MACH_DS5000_XX: /* DS5000/xx Maxine */ 123 143 board_be_handler = dec_kn02xa_be_handler; 124 - busirq.handler = dec_kn02xa_be_interrupt; 144 + busirq_handler = dec_kn02xa_be_interrupt; 125 145 dec_kn02xa_be_init(); 126 146 break; 127 147 case MACH_DS5000_200: /* DS5000/200 3max */ 128 148 case MACH_DS5000_2X0: /* DS5000/240 3max+ */ 129 149 case MACH_DS5900: /* DS5900 bigmax */ 130 150 board_be_handler = dec_ecc_be_handler; 131 - busirq.handler = dec_ecc_be_interrupt; 151 + busirq_handler = dec_ecc_be_interrupt; 132 152 dec_ecc_be_init(); 133 153 break; 134 154 } ··· 744 764 int irq_fpu; 745 765 746 766 irq_fpu = dec_interrupt[DEC_IRQ_FPU]; 747 - setup_irq(irq_fpu, &fpuirq); 767 + if (request_irq(irq_fpu, no_action, IRQF_NO_THREAD, "fpu", 768 + NULL)) 769 + pr_err("Failed to register fpu interrupt\n"); 748 770 desc_fpu = irq_to_desc(irq_fpu); 749 771 fpu_kstat_irq = this_cpu_ptr(desc_fpu->kstat_irqs); 750 772 } 751 - if (dec_interrupt[DEC_IRQ_CASCADE] >= 0) 752 - setup_irq(dec_interrupt[DEC_IRQ_CASCADE], &ioirq); 753 - 773 + if (dec_interrupt[DEC_IRQ_CASCADE] >= 0) { 774 + if (request_irq(dec_interrupt[DEC_IRQ_CASCADE], no_action, 775 + IRQF_NO_THREAD, "cascade", NULL)) 776 + pr_err("Failed to register cascade interrupt\n"); 777 + } 754 778 /* Register the bus error interrupt. */ 755 - if (dec_interrupt[DEC_IRQ_BUS] >= 0 && busirq.handler) 756 - setup_irq(dec_interrupt[DEC_IRQ_BUS], &busirq); 757 - 779 + if (dec_interrupt[DEC_IRQ_BUS] >= 0 && busirq_handler) { 780 + if (request_irq(dec_interrupt[DEC_IRQ_BUS], busirq_handler, 781 + busirq_flags, "bus error", NULL)) 782 + pr_err("Failed to register bus error interrupt\n"); 783 + } 758 784 /* Register the HALT interrupt. */ 759 - if (dec_interrupt[DEC_IRQ_HALT] >= 0) 760 - setup_irq(dec_interrupt[DEC_IRQ_HALT], &haltirq); 785 + if (dec_interrupt[DEC_IRQ_HALT] >= 0) { 786 + if (request_irq(dec_interrupt[DEC_IRQ_HALT], dec_intr_halt, 787 + IRQF_NO_THREAD, "halt", NULL)) 788 + pr_err("Failed to register halt interrupt\n"); 789 + } 761 790 } 762 791 763 792 asmlinkage unsigned int dec_irq_dispatch(unsigned int irq)
+10 -11
arch/mips/emma/markeins/irq.c
··· 153 153 handle_edge_irq, "edge"); 154 154 } 155 155 156 - static struct irqaction irq_cascade = { 157 - .handler = no_action, 158 - .flags = IRQF_NO_THREAD, 159 - .name = "cascade", 160 - .dev_id = NULL, 161 - .next = NULL, 162 - }; 163 - 164 156 /* 165 157 * the first level int-handler will jump here if it is a emma2rh irq 166 158 */ ··· 228 236 void __init arch_init_irq(void) 229 237 { 230 238 u32 reg; 239 + int irq; 231 240 232 241 /* by default, interrupts are disabled. */ 233 242 emma2rh_out32(EMMA2RH_BHIF_INT_EN_0, 0); ··· 265 272 mips_cpu_irq_init(); 266 273 267 274 /* setup cascade interrupts */ 268 - setup_irq(EMMA2RH_IRQ_BASE + EMMA2RH_SW_CASCADE, &irq_cascade); 269 - setup_irq(EMMA2RH_IRQ_BASE + EMMA2RH_GPIO_CASCADE, &irq_cascade); 270 - setup_irq(MIPS_CPU_IRQ_BASE + 2, &irq_cascade); 275 + irq = EMMA2RH_IRQ_BASE + EMMA2RH_SW_CASCADE; 276 + if (request_irq(irq, no_action, IRQF_NO_THREAD, "cascade", NULL)) 277 + pr_err("Failed to request irq %d (cascade)\n", irq); 278 + irq = EMMA2RH_IRQ_BASE + EMMA2RH_GPIO_CASCADE; 279 + if (request_irq(irq, no_action, IRQF_NO_THREAD, "cascade", NULL)) 280 + pr_err("Failed to request irq %d (cascade)\n", irq); 281 + irq = MIPS_CPU_IRQ_BASE + 2; 282 + if (request_irq(irq, no_action, IRQF_NO_THREAD, "cascade", NULL)) 283 + pr_err("Failed to request irq %d (cascade)\n", irq); 271 284 } 272 285 273 286 asmlinkage void plat_irq_dispatch(void)
+3 -1
arch/mips/include/asm/sni.h
··· 11 11 #ifndef __ASM_SNI_H 12 12 #define __ASM_SNI_H 13 13 14 + #include <linux/irqreturn.h> 15 + 14 16 extern unsigned int sni_brd_type; 15 17 16 18 #define SNI_BRD_10 2 ··· 241 239 242 240 /* common irq stuff */ 243 241 extern void (*sni_hwint)(void); 244 - extern struct irqaction sni_isa_irq; 242 + extern irqreturn_t sni_isa_irq_handler(int dummy, void *p); 245 243 246 244 #endif /* __ASM_SNI_H */
+3 -9
arch/mips/jazz/irq.c
··· 125 125 return IRQ_HANDLED; 126 126 } 127 127 128 - static struct irqaction r4030_timer_irqaction = { 129 - .handler = r4030_timer_interrupt, 130 - .flags = IRQF_TIMER, 131 - .name = "R4030 timer", 132 - }; 133 - 134 128 void __init plat_time_init(void) 135 129 { 136 130 struct clock_event_device *cd = &r4030_clockevent; 137 - struct irqaction *action = &r4030_timer_irqaction; 138 131 unsigned int cpu = smp_processor_id(); 139 132 140 133 BUG_ON(HZ != 100); 141 134 142 135 cd->cpumask = cpumask_of(cpu); 143 136 clockevents_register_device(cd); 144 - action->dev_id = cd; 145 - setup_irq(JAZZ_TIMER_IRQ, action); 137 + if (request_irq(JAZZ_TIMER_IRQ, r4030_timer_interrupt, IRQF_TIMER, 138 + "R4030 timer", cd)) 139 + pr_err("Failed to register R4030 timer interrupt\n"); 146 140 147 141 /* 148 142 * Set clock to 100Hz.
+3 -8
arch/mips/kernel/cevt-bcm1480.c
··· 91 91 } 92 92 93 93 static DEFINE_PER_CPU(struct clock_event_device, sibyte_hpt_clockevent); 94 - static DEFINE_PER_CPU(struct irqaction, sibyte_hpt_irqaction); 95 94 static DEFINE_PER_CPU(char [18], sibyte_hpt_name); 96 95 97 96 void sb1480_clockevent_init(void) 98 97 { 99 98 unsigned int cpu = smp_processor_id(); 100 99 unsigned int irq = K_BCM1480_INT_TIMER_0 + cpu; 101 - struct irqaction *action = &per_cpu(sibyte_hpt_irqaction, cpu); 102 100 struct clock_event_device *cd = &per_cpu(sibyte_hpt_clockevent, cpu); 103 101 unsigned char *name = per_cpu(sibyte_hpt_name, cpu); 102 + unsigned long flags = IRQF_PERCPU | IRQF_TIMER; 104 103 105 104 BUG_ON(cpu > 3); /* Only have 4 general purpose timers */ 106 105 ··· 132 133 133 134 bcm1480_unmask_irq(cpu, irq); 134 135 135 - action->handler = sibyte_counter_handler; 136 - action->flags = IRQF_PERCPU | IRQF_TIMER; 137 - action->name = name; 138 - action->dev_id = cd; 139 - 140 136 irq_set_affinity(irq, cpumask_of(cpu)); 141 - setup_irq(irq, action); 137 + if (request_irq(irq, sibyte_counter_handler, flags, name, cd)) 138 + pr_err("Failed to request irq %d (%s)\n", irq, name); 142 139 }
+2 -7
arch/mips/kernel/cevt-ds1287.c
··· 100 100 return IRQ_HANDLED; 101 101 } 102 102 103 - static struct irqaction ds1287_irqaction = { 104 - .handler = ds1287_interrupt, 105 - .flags = IRQF_PERCPU | IRQF_TIMER, 106 - .name = "ds1287", 107 - }; 108 - 109 103 int __init ds1287_clockevent_init(int irq) 110 104 { 105 + unsigned long flags = IRQF_PERCPU | IRQF_TIMER; 111 106 struct clock_event_device *cd; 112 107 113 108 cd = &ds1287_clockevent; ··· 117 122 118 123 clockevents_register_device(&ds1287_clockevent); 119 124 120 - return setup_irq(irq, &ds1287_irqaction); 125 + return request_irq(irq, ds1287_interrupt, flags, "ds1287", NULL); 121 126 }
+2 -7
arch/mips/kernel/cevt-gt641xx.c
··· 120 120 return IRQ_HANDLED; 121 121 } 122 122 123 - static struct irqaction gt641xx_timer0_irqaction = { 124 - .handler = gt641xx_timer0_interrupt, 125 - .flags = IRQF_PERCPU | IRQF_TIMER, 126 - .name = "gt641xx_timer0", 127 - }; 128 - 129 123 static int __init gt641xx_timer0_clockevent_init(void) 130 124 { 131 125 struct clock_event_device *cd; ··· 140 146 141 147 clockevents_register_device(&gt641xx_timer0_clockevent); 142 148 143 - return setup_irq(GT641XX_TIMER0_IRQ, &gt641xx_timer0_irqaction); 149 + return request_irq(GT641XX_TIMER0_IRQ, gt641xx_timer0_interrupt, 150 + IRQF_PERCPU | IRQF_TIMER, "gt641xx_timer0", NULL); 144 151 } 145 152 arch_initcall(gt641xx_timer0_clockevent_init);
+3 -1
arch/mips/kernel/cevt-r4k.c
··· 252 252 253 253 int r4k_clockevent_init(void) 254 254 { 255 + unsigned long flags = IRQF_PERCPU | IRQF_TIMER | IRQF_SHARED; 255 256 unsigned int cpu = smp_processor_id(); 256 257 struct clock_event_device *cd; 257 258 unsigned int irq, min_delta; ··· 292 291 293 292 cp0_timer_irq_installed = 1; 294 293 295 - setup_irq(irq, &c0_compare_irqaction); 294 + if (request_irq(irq, c0_compare_interrupt, flags, "timer", NULL)) 295 + pr_err("Failed to request irq %d (timer)\n", irq); 296 296 297 297 return 0; 298 298 }
+3 -8
arch/mips/kernel/cevt-sb1250.c
··· 90 90 } 91 91 92 92 static DEFINE_PER_CPU(struct clock_event_device, sibyte_hpt_clockevent); 93 - static DEFINE_PER_CPU(struct irqaction, sibyte_hpt_irqaction); 94 93 static DEFINE_PER_CPU(char [18], sibyte_hpt_name); 95 94 96 95 void sb1250_clockevent_init(void) 97 96 { 98 97 unsigned int cpu = smp_processor_id(); 99 98 unsigned int irq = K_INT_TIMER_0 + cpu; 100 - struct irqaction *action = &per_cpu(sibyte_hpt_irqaction, cpu); 101 99 struct clock_event_device *cd = &per_cpu(sibyte_hpt_clockevent, cpu); 102 100 unsigned char *name = per_cpu(sibyte_hpt_name, cpu); 101 + unsigned long flags = IRQF_PERCPU | IRQF_TIMER; 103 102 104 103 /* Only have 4 general purpose timers, and we use last one as hpt */ 105 104 BUG_ON(cpu > 2); ··· 132 133 133 134 sb1250_unmask_irq(cpu, irq); 134 135 135 - action->handler = sibyte_counter_handler; 136 - action->flags = IRQF_PERCPU | IRQF_TIMER; 137 - action->name = name; 138 - action->dev_id = cd; 139 - 140 136 irq_set_affinity(irq, cpumask_of(cpu)); 141 - setup_irq(irq, action); 137 + if (request_irq(irq, sibyte_counter_handler, flags, name, cd)) 138 + pr_err("Failed to request irq %d (%s)\n", irq, name); 142 139 }
+3 -8
arch/mips/kernel/cevt-txx9.c
··· 174 174 return IRQ_HANDLED; 175 175 } 176 176 177 - static struct irqaction txx9tmr_irq = { 178 - .handler = txx9tmr_interrupt, 179 - .flags = IRQF_PERCPU | IRQF_TIMER, 180 - .name = "txx9tmr", 181 - .dev_id = &txx9_clock_event_device, 182 - }; 183 - 184 177 void __init txx9_clockevent_init(unsigned long baseaddr, int irq, 185 178 unsigned int imbusclk) 186 179 { ··· 195 202 cd->irq = irq; 196 203 cd->cpumask = cpumask_of(0), 197 204 clockevents_register_device(cd); 198 - setup_irq(irq, &txx9tmr_irq); 205 + if (request_irq(irq, txx9tmr_interrupt, IRQF_PERCPU | IRQF_TIMER, 206 + "txx9tmr", &txx9_clock_event_device)) 207 + pr_err("Failed to request irq %d (txx9tmr)\n", irq); 199 208 printk(KERN_INFO "TXx9: clockevent device at 0x%lx, irq %d\n", 200 209 baseaddr, irq); 201 210 }
+4 -7
arch/mips/kernel/i8253.c
··· 18 18 return IRQ_HANDLED; 19 19 } 20 20 21 - static struct irqaction irq0 = { 22 - .handler = timer_interrupt, 23 - .flags = IRQF_NOBALANCING | IRQF_TIMER, 24 - .name = "timer" 25 - }; 26 - 27 21 void __init setup_pit_timer(void) 28 22 { 23 + unsigned long flags = IRQF_NOBALANCING | IRQF_TIMER; 24 + 29 25 clockevent_i8253_init(true); 30 - setup_irq(0, &irq0); 26 + if (request_irq(0, timer_interrupt, flags, "timer", NULL)) 27 + pr_err("Failed to request irq 0 (timer)\n"); 31 28 } 32 29 33 30 static int __init init_pit_clocksource(void)
+1 -7
arch/mips/kernel/rtlx-mt.c
··· 51 51 return IRQ_HANDLED; 52 52 } 53 53 54 - static struct irqaction rtlx_irq = { 55 - .handler = rtlx_interrupt, 56 - .name = "RTLX", 57 - }; 58 - 59 54 static int rtlx_irq_num = MIPS_CPU_IRQ_BASE + MIPS_CPU_RTLX_IRQ; 60 55 61 56 void _interrupt_sp(void) ··· 119 124 goto out_class; 120 125 } 121 126 122 - rtlx_irq.dev_id = rtlx; 123 - err = setup_irq(rtlx_irq_num, &rtlx_irq); 127 + err = request_irq(rtlx_irq_num, rtlx_interrupt, 0, "RTLX", rtlx); 124 128 if (err) 125 129 goto out_class; 126 130
+12 -21
arch/mips/kernel/smp.c
··· 207 207 return IRQ_HANDLED; 208 208 } 209 209 210 - static struct irqaction irq_resched = { 211 - .handler = ipi_resched_interrupt, 212 - .flags = IRQF_PERCPU, 213 - .name = "IPI resched" 214 - }; 215 - 216 - static struct irqaction irq_call = { 217 - .handler = ipi_call_interrupt, 218 - .flags = IRQF_PERCPU, 219 - .name = "IPI call" 220 - }; 221 - 222 - static void smp_ipi_init_one(unsigned int virq, 223 - struct irqaction *action) 210 + static void smp_ipi_init_one(unsigned int virq, const char *name, 211 + irq_handler_t handler) 224 212 { 225 213 int ret; 226 214 227 215 irq_set_handler(virq, handle_percpu_irq); 228 - ret = setup_irq(virq, action); 216 + ret = request_irq(virq, handler, IRQF_PERCPU, name, NULL); 229 217 BUG_ON(ret); 230 218 } 231 219 ··· 266 278 int cpu; 267 279 268 280 for_each_cpu(cpu, mask) { 269 - smp_ipi_init_one(call_virq + cpu, &irq_call); 270 - smp_ipi_init_one(sched_virq + cpu, &irq_resched); 281 + smp_ipi_init_one(call_virq + cpu, "IPI call", 282 + ipi_call_interrupt); 283 + smp_ipi_init_one(sched_virq + cpu, "IPI resched", 284 + ipi_resched_interrupt); 271 285 } 272 286 } else { 273 - smp_ipi_init_one(call_virq, &irq_call); 274 - smp_ipi_init_one(sched_virq, &irq_resched); 287 + smp_ipi_init_one(call_virq, "IPI call", ipi_call_interrupt); 288 + smp_ipi_init_one(sched_virq, "IPI resched", 289 + ipi_resched_interrupt); 275 290 } 276 291 277 292 return 0; ··· 302 311 int cpu; 303 312 304 313 for_each_cpu(cpu, mask) { 305 - remove_irq(call_virq + cpu, &irq_call); 306 - remove_irq(sched_virq + cpu, &irq_resched); 314 + free_irq(call_virq + cpu, NULL); 315 + free_irq(sched_virq + cpu, NULL); 307 316 } 308 317 } 309 318 irq_destroy_ipi(call_virq, mask);
+3 -7
arch/mips/lasat/interrupt.c
··· 90 90 } 91 91 } 92 92 93 - static struct irqaction cascade = { 94 - .handler = no_action, 95 - .name = "cascade", 96 - .flags = IRQF_NO_THREAD, 97 - }; 98 - 99 93 void __init arch_init_irq(void) 100 94 { 95 + int irq = LASAT_CASCADE_IRQ; 101 96 int i; 102 97 103 98 if (IS_LASAT_200()) { ··· 114 119 for (i = LASAT_IRQ_BASE; i <= LASAT_IRQ_END; i++) 115 120 irq_set_chip_and_handler(i, &lasat_irq_type, handle_level_irq); 116 121 117 - setup_irq(LASAT_CASCADE_IRQ, &cascade); 122 + if (request_irq(irq, no_action, IRQF_NO_THREAD, "cascade", NULL)) 123 + pr_err("Failed to request irq %d (cascade)\n", irq); 118 124 }
+3 -6
arch/mips/loongson2ef/common/bonito-irq.c
··· 30 30 .irq_unmask = bonito_irq_enable, 31 31 }; 32 32 33 - static struct irqaction __maybe_unused dma_timeout_irqaction = { 34 - .handler = no_action, 35 - .name = "dma_timeout", 36 - }; 37 - 38 33 void bonito_irq_init(void) 39 34 { 40 35 u32 i; ··· 39 44 handle_level_irq); 40 45 41 46 #ifdef CONFIG_CPU_LOONGSON2E 42 - setup_irq(LOONGSON_IRQ_BASE + 10, &dma_timeout_irqaction); 47 + i = LOONGSON_IRQ_BASE + 10; 48 + if (request_irq(i, no_action, 0, "dma_timeout", NULL)) 49 + pr_err("Failed to request irq %d (dma_timeout)\n", i); 43 50 #endif 44 51 }
+3 -7
arch/mips/loongson2ef/common/cs5536/cs5536_mfgpt.c
··· 100 100 return IRQ_HANDLED; 101 101 } 102 102 103 - static struct irqaction irq5 = { 104 - .handler = timer_interrupt, 105 - .flags = IRQF_NOBALANCING | IRQF_TIMER, 106 - .name = "timer" 107 - }; 108 - 109 103 /* 110 104 * Initialize the conversion factor and the min/max deltas of the clock event 111 105 * structure and register the clock event source with the framework. ··· 128 134 129 135 clockevents_register_device(cd); 130 136 131 - setup_irq(CS5536_MFGPT_INTR, &irq5); 137 + if (request_irq(CS5536_MFGPT_INTR, timer_interrupt, 138 + IRQF_NOBALANCING | IRQF_TIMER, "timer", NULL)) 139 + pr_err("Failed to register timer interrupt\n"); 132 140 } 133 141 134 142 /*
+8 -8
arch/mips/loongson2ef/fuloong-2e/irq.c
··· 35 35 spurious_interrupt(); 36 36 } 37 37 38 - static struct irqaction cascade_irqaction = { 39 - .handler = no_action, 40 - .name = "cascade", 41 - .flags = IRQF_NO_THREAD, 42 - }; 43 - 44 38 void __init mach_init_irq(void) 45 39 { 40 + int irq; 41 + 46 42 /* init all controller 47 43 * 0-15 ------> i8259 interrupt 48 44 * 16-23 ------> mips cpu interrupt ··· 55 59 bonito_irq_init(); 56 60 57 61 /* bonito irq at IP2 */ 58 - setup_irq(MIPS_CPU_IRQ_BASE + 2, &cascade_irqaction); 62 + irq = MIPS_CPU_IRQ_BASE + 2; 63 + if (request_irq(irq, no_action, IRQF_NO_THREAD, "cascade", NULL)) 64 + pr_err("Failed to request irq %d (cascade)\n", irq); 59 65 /* 8259 irq at IP5 */ 60 - setup_irq(MIPS_CPU_IRQ_BASE + 5, &cascade_irqaction); 66 + irq = MIPS_CPU_IRQ_BASE + 5; 67 + if (request_irq(irq, no_action, IRQF_NO_THREAD, "cascade", NULL)) 68 + pr_err("Failed to request irq %d (cascade)\n", irq); 61 69 }
+6 -14
arch/mips/loongson2ef/lemote-2f/irq.c
··· 90 90 return IRQ_HANDLED; 91 91 } 92 92 93 - static struct irqaction ip6_irqaction = { 94 - .handler = ip6_action, 95 - .name = "cascade", 96 - .flags = IRQF_SHARED | IRQF_NO_THREAD, 97 - }; 98 - 99 - static struct irqaction cascade_irqaction = { 100 - .handler = no_action, 101 - .name = "cascade", 102 - .flags = IRQF_NO_THREAD | IRQF_NO_SUSPEND, 103 - }; 104 - 105 93 void __init mach_init_irq(void) 106 94 { 107 95 /* init all controller ··· 108 120 bonito_irq_init(); 109 121 110 122 /* setup north bridge irq (bonito) */ 111 - setup_irq(LOONGSON_NORTH_BRIDGE_IRQ, &ip6_irqaction); 123 + if (request_irq(LOONGSON_NORTH_BRIDGE_IRQ, ip6_action, 124 + IRQF_SHARED | IRQF_NO_THREAD, "cascade", NULL)) 125 + pr_err("Failed to register north bridge cascade interrupt\n"); 112 126 /* setup source bridge irq (i8259) */ 113 - setup_irq(LOONGSON_SOUTH_BRIDGE_IRQ, &cascade_irqaction); 127 + if (request_irq(LOONGSON_SOUTH_BRIDGE_IRQ, no_action, 128 + IRQF_NO_THREAD | IRQF_NO_SUSPEND, "cascade", NULL)) 129 + pr_err("Failed to register south bridge cascade interrupt\n"); 114 130 }
+10 -11
arch/mips/loongson32/common/irq.c
··· 149 149 150 150 } 151 151 152 - static struct irqaction cascade_irqaction = { 153 - .handler = no_action, 154 - .name = "cascade", 155 - .flags = IRQF_NO_THREAD, 156 - }; 157 - 158 152 static void __init ls1x_irq_init(int base) 159 153 { 160 154 int n; ··· 170 176 handle_level_irq); 171 177 } 172 178 173 - setup_irq(INT0_IRQ, &cascade_irqaction); 174 - setup_irq(INT1_IRQ, &cascade_irqaction); 175 - setup_irq(INT2_IRQ, &cascade_irqaction); 176 - setup_irq(INT3_IRQ, &cascade_irqaction); 179 + if (request_irq(INT0_IRQ, no_action, IRQF_NO_THREAD, "cascade", NULL)) 180 + pr_err("Failed to request irq %d (cascade)\n", INT0_IRQ); 181 + if (request_irq(INT1_IRQ, no_action, IRQF_NO_THREAD, "cascade", NULL)) 182 + pr_err("Failed to request irq %d (cascade)\n", INT1_IRQ); 183 + if (request_irq(INT2_IRQ, no_action, IRQF_NO_THREAD, "cascade", NULL)) 184 + pr_err("Failed to request irq %d (cascade)\n", INT2_IRQ); 185 + if (request_irq(INT3_IRQ, no_action, IRQF_NO_THREAD, "cascade", NULL)) 186 + pr_err("Failed to request irq %d (cascade)\n", INT3_IRQ); 177 187 #if defined(CONFIG_LOONGSON1_LS1C) 178 - setup_irq(INT4_IRQ, &cascade_irqaction); 188 + if (request_irq(INT4_IRQ, no_action, IRQF_NO_THREAD, "cascade", NULL)) 189 + pr_err("Failed to request irq %d (cascade)\n", INT4_IRQ); 179 190 #endif 180 191 } 181 192
+4 -8
arch/mips/loongson32/common/time.c
··· 176 176 .tick_resume = ls1x_clockevent_tick_resume, 177 177 }; 178 178 179 - static struct irqaction ls1x_pwmtimer_irqaction = { 180 - .name = "ls1x-pwmtimer", 181 - .handler = ls1x_clockevent_isr, 182 - .dev_id = &ls1x_clockevent, 183 - .flags = IRQF_PERCPU | IRQF_TIMER, 184 - }; 185 - 186 179 static void __init ls1x_time_init(void) 187 180 { 188 181 struct clock_event_device *cd = &ls1x_clockevent; ··· 199 206 if (ret) 200 207 panic(KERN_ERR "Failed to register clocksource: %d\n", ret); 201 208 202 - setup_irq(LS1X_TIMER_IRQ, &ls1x_pwmtimer_irqaction); 209 + if (request_irq(LS1X_TIMER_IRQ, ls1x_clockevent_isr, 210 + IRQF_PERCPU | IRQF_TIMER, "ls1x-pwmtimer", 211 + &ls1x_clockevent)) 212 + pr_err("Failed to register ls1x-pwmtimer interrupt\n"); 203 213 } 204 214 #endif /* CONFIG_CEVT_CSRC_LS1X */ 205 215
+3 -7
arch/mips/loongson64/hpet.c
··· 187 187 return IRQ_NONE; 188 188 } 189 189 190 - static struct irqaction hpet_irq = { 191 - .handler = hpet_irq_handler, 192 - .flags = IRQF_NOBALANCING | IRQF_TIMER, 193 - .name = "hpet", 194 - }; 195 - 196 190 /* 197 191 * hpet address assignation and irq setting should be done in bios. 198 192 * but pmon don't do this, we just setup here directly. ··· 218 224 219 225 void __init setup_hpet_timer(void) 220 226 { 227 + unsigned long flags = IRQF_NOBALANCING | IRQF_TIMER; 221 228 unsigned int cpu = smp_processor_id(); 222 229 struct clock_event_device *cd; 223 230 ··· 242 247 cd->min_delta_ticks = HPET_MIN_PROG_DELTA; 243 248 244 249 clockevents_register_device(cd); 245 - setup_irq(HPET_T0_IRQ, &hpet_irq); 250 + if (request_irq(HPET_T0_IRQ, hpet_irq_handler, flags, "hpet", NULL)) 251 + pr_err("Failed to request irq %d (hpet)\n", HPET_T0_IRQ); 246 252 pr_info("hpet clock event device register\n"); 247 253 } 248 254
+3 -7
arch/mips/mti-malta/malta-int.c
··· 144 144 return IRQ_HANDLED; 145 145 } 146 146 147 - static struct irqaction corehi_irqaction = { 148 - .handler = corehi_handler, 149 - .name = "CoreHi", 150 - .flags = IRQF_NO_THREAD, 151 - }; 152 - 153 147 static msc_irqmap_t msc_irqmap[] __initdata = { 154 148 {MSC01C_INT_TMR, MSC01_IRQ_EDGE, 0}, 155 149 {MSC01C_INT_PCI, MSC01_IRQ_LEVEL, 0}, ··· 217 223 corehi_irq = MIPS_CPU_IRQ_BASE + MIPSCPU_INT_COREHI; 218 224 } 219 225 220 - setup_irq(corehi_irq, &corehi_irqaction); 226 + if (request_irq(corehi_irq, corehi_handler, IRQF_NO_THREAD, "CoreHi", 227 + NULL)) 228 + pr_err("Failed to request irq %d (CoreHi)\n", corehi_irq); 221 229 }
+3 -8
arch/mips/netlogic/xlr/fmn.c
··· 110 110 return IRQ_HANDLED; 111 111 } 112 112 113 - struct irqaction fmn_irqaction = { 114 - .handler = fmn_message_handler, 115 - .flags = IRQF_PERCPU, 116 - .name = "fmn", 117 - }; 118 - 119 113 void xlr_percpu_fmn_init(void) 120 114 { 121 115 struct xlr_fmn_info *cpu_fmn_info; ··· 189 195 { 190 196 uint32_t flags; 191 197 192 - /* setup irq only once */ 193 - setup_irq(IRQ_FMN, &fmn_irqaction); 198 + /* request irq only once */ 199 + if (request_irq(IRQ_FMN, fmn_message_handler, IRQF_PERCPU, "fmn", NULL)) 200 + pr_err("Failed to request irq %d (fmn)\n", IRQ_FMN); 194 201 195 202 flags = nlm_cop2_enable_irqsave(); 196 203 nlm_fmn_setup_intr(IRQ_FMN, (1 << nlm_threads_per_core) - 1);
+12 -16
arch/mips/pmcs-msp71xx/msp_irq.c
··· 107 107 do_IRQ(MSP_INT_SW1); 108 108 } 109 109 110 - static struct irqaction cic_cascade_msp = { 111 - .handler = no_action, 112 - .name = "MSP CIC cascade", 113 - .flags = IRQF_NO_THREAD, 114 - }; 115 - 116 - static struct irqaction per_cascade_msp = { 117 - .handler = no_action, 118 - .name = "MSP PER cascade", 119 - .flags = IRQF_NO_THREAD, 120 - }; 121 - 122 110 void __init arch_init_irq(void) 123 111 { 124 112 /* assume we'll be using vectored interrupt mode except in UP mode*/ ··· 130 142 #endif /* CONFIG_MIPS_MT_SMP */ 131 143 #endif /* CONFIG_MIPS_MT */ 132 144 /* setup the cascaded interrupts */ 133 - setup_irq(MSP_INT_CIC, &cic_cascade_msp); 134 - setup_irq(MSP_INT_PER, &per_cascade_msp); 145 + if (request_irq(MSP_INT_CIC, no_action, IRQF_NO_THREAD, 146 + "MSP CIC cascade", NULL)) 147 + pr_err("Failed to register MSP CIC cascade interrupt\n"); 148 + if (request_irq(MSP_INT_PER, no_action, IRQF_NO_THREAD, 149 + "MSP PER cascade", NULL)) 150 + pr_err("Failed to register MSP PER cascade interrupt\n"); 135 151 136 152 #else 137 153 /* ··· 145 153 msp_slp_irq_init(); 146 154 147 155 /* setup the cascaded SLP/PER interrupts */ 148 - setup_irq(MSP_INT_SLP, &cic_cascade_msp); 149 - setup_irq(MSP_INT_PER, &per_cascade_msp); 156 + if (request_irq(MSP_INT_SLP, no_action, IRQF_NO_THREAD, 157 + "MSP CIC cascade", NULL)) 158 + pr_err("Failed to register MSP CIC cascade interrupt\n"); 159 + if (request_irq(MSP_INT_PER, no_action, IRQF_NO_THREAD, 160 + "MSP PER cascade", NULL)) 161 + pr_err("Failed to register MSP PER cascade interrupt\n"); 150 162 #endif 151 163 }
+6 -16
arch/mips/pmcs-msp71xx/msp_smp.c
··· 38 38 return IRQ_HANDLED; 39 39 } 40 40 41 - static struct irqaction irq_resched = { 42 - .handler = ipi_resched_interrupt, 43 - .flags = IRQF_PERCPU, 44 - .name = "IPI_resched" 45 - }; 46 - 47 - static struct irqaction irq_call = { 48 - .handler = ipi_call_interrupt, 49 - .flags = IRQF_PERCPU, 50 - .name = "IPI_call" 51 - }; 52 - 53 - void __init arch_init_ipiirq(int irq, struct irqaction *action) 41 + void __init arch_init_ipiirq(int irq, const char *name, irq_handler_t handler) 54 42 { 55 - setup_irq(irq, action); 43 + if (request_irq(irq, handler, IRQF_PERCPU, name, NULL)) 44 + pr_err("Failed to request irq %d (%s)\n", irq, name); 56 45 irq_set_handler(irq, handle_percpu_irq); 57 46 } 58 47 ··· 49 60 { 50 61 set_vi_handler(MIPS_CPU_IPI_RESCHED_IRQ, ipi_resched_dispatch); 51 62 set_vi_handler(MIPS_CPU_IPI_CALL_IRQ, ipi_call_dispatch); 52 - arch_init_ipiirq(MIPS_CPU_IPI_RESCHED_IRQ, &irq_resched); 53 - arch_init_ipiirq(MIPS_CPU_IPI_CALL_IRQ, &irq_call); 63 + arch_init_ipiirq(MIPS_CPU_IPI_RESCHED_IRQ, "IPI_resched", 64 + ipi_resched_interrupt); 65 + arch_init_ipiirq(MIPS_CPU_IPI_CALL_IRQ, "IPI_call", ipi_call_interrupt); 54 66 } 55 67 #endif /* CONFIG_MIPS_MT_SMP */
+5 -3
arch/mips/pmcs-msp71xx/msp_time.c
··· 27 27 #define get_current_vpe() \ 28 28 ((read_c0_tcbind() >> TCBIND_CURVPE_SHIFT) & TCBIND_CURVPE) 29 29 30 - static struct irqaction timer_vpe1; 31 30 static int tim_installed; 32 31 33 32 void __init plat_time_init(void) ··· 76 77 77 78 unsigned int get_c0_compare_int(void) 78 79 { 80 + unsigned long flags = IRQF_PERCPU | IRQF_TIMER | IRQF_SHARED; 81 + 79 82 /* MIPS_MT modes may want timer for second VPE */ 80 83 if ((get_current_vpe()) && !tim_installed) { 81 - memcpy(&timer_vpe1, &c0_compare_irqaction, sizeof(timer_vpe1)); 82 - setup_irq(MSP_INT_VPE1_TIMER, &timer_vpe1); 84 + if (request_irq(MSP_INT_VPE1_TIMER, c0_compare_interrupt, flags, 85 + "timer", NULL)) 86 + pr_err("Failed to register timer interrupt\n"); 83 87 tim_installed++; 84 88 } 85 89
+8 -10
arch/mips/ralink/cevt-rt3352.c
··· 82 82 }, 83 83 }; 84 84 85 - static struct irqaction systick_irqaction = { 86 - .handler = systick_interrupt, 87 - .flags = IRQF_PERCPU | IRQF_TIMER, 88 - .dev_id = &systick.dev, 89 - }; 90 - 91 85 static int systick_shutdown(struct clock_event_device *evt) 92 86 { 93 87 struct systick_device *sdev; ··· 89 95 sdev = container_of(evt, struct systick_device, dev); 90 96 91 97 if (sdev->irq_requested) 92 - free_irq(systick.dev.irq, &systick_irqaction); 98 + free_irq(systick.dev.irq, &systick.dev); 93 99 sdev->irq_requested = 0; 94 100 iowrite32(0, systick.membase + SYSTICK_CONFIG); 95 101 ··· 98 104 99 105 static int systick_set_oneshot(struct clock_event_device *evt) 100 106 { 107 + const char *name = systick.dev.name; 101 108 struct systick_device *sdev; 109 + int irq = systick.dev.irq; 102 110 103 111 sdev = container_of(evt, struct systick_device, dev); 104 112 105 - if (!sdev->irq_requested) 106 - setup_irq(systick.dev.irq, &systick_irqaction); 113 + if (!sdev->irq_requested) { 114 + if (request_irq(irq, systick_interrupt, 115 + IRQF_PERCPU | IRQF_TIMER, name, &systick.dev)) 116 + pr_err("Failed to request irq %d (%s)\n", irq, name); 117 + } 107 118 sdev->irq_requested = 1; 108 119 iowrite32(CFG_EXT_STK_EN | CFG_CNT_EN, 109 120 systick.membase + SYSTICK_CONFIG); ··· 124 125 if (!systick.membase) 125 126 return -ENXIO; 126 127 127 - systick_irqaction.name = np->name; 128 128 systick.dev.name = np->name; 129 129 clockevents_calc_mult_shift(&systick.dev, SYSTICK_FREQ, 60); 130 130 systick.dev.max_delta_ns = clockevent_delta2ns(0x7fff, &systick.dev);
+2 -8
arch/mips/sgi-ip22/ip22-eisa.c
··· 92 92 return IRQ_NONE; 93 93 } 94 94 95 - static struct irqaction eisa_action = { 96 - .handler = ip22_eisa_intr, 97 - .name = "EISA", 98 - }; 99 - 100 95 int __init ip22_eisa_init(void) 101 96 { 102 97 int i, c; ··· 131 136 132 137 init_i8259_irqs(); 133 138 134 - /* Cannot use request_irq because of kmalloc not being ready at such 135 - * an early stage. Yes, I've been bitten... */ 136 - setup_irq(SGI_EISA_IRQ, &eisa_action); 139 + if (request_irq(SGI_EISA_IRQ, ip22_eisa_intr, 0, "EISA", NULL)) 140 + pr_err("Failed to request irq %d (EISA)\n", SGI_EISA_IRQ); 137 141 138 142 EISA_bus = 1; 139 143 return 0;
+15 -34
arch/mips/sgi-ip22/ip22-int.c
··· 159 159 irq_exit(); 160 160 } 161 161 162 - static struct irqaction local0_cascade = { 163 - .handler = no_action, 164 - .flags = IRQF_NO_THREAD, 165 - .name = "local0 cascade", 166 - }; 167 - 168 - static struct irqaction local1_cascade = { 169 - .handler = no_action, 170 - .flags = IRQF_NO_THREAD, 171 - .name = "local1 cascade", 172 - }; 173 - 174 - static struct irqaction buserr = { 175 - .handler = no_action, 176 - .flags = IRQF_NO_THREAD, 177 - .name = "Bus Error", 178 - }; 179 - 180 - static struct irqaction map0_cascade = { 181 - .handler = no_action, 182 - .flags = IRQF_NO_THREAD, 183 - .name = "mapable0 cascade", 184 - }; 185 - 186 162 #ifdef USE_LIO3_IRQ 187 - static struct irqaction map1_cascade = { 188 - .handler = no_action, 189 - .flags = IRQF_NO_THREAD, 190 - .name = "mapable1 cascade", 191 - }; 192 163 #define SGI_INTERRUPTS SGINT_END 193 164 #else 194 165 #define SGI_INTERRUPTS SGINT_LOCAL3 ··· 293 322 } 294 323 295 324 /* vector handler. this register the IRQ as non-sharable */ 296 - setup_irq(SGI_LOCAL_0_IRQ, &local0_cascade); 297 - setup_irq(SGI_LOCAL_1_IRQ, &local1_cascade); 298 - setup_irq(SGI_BUSERR_IRQ, &buserr); 325 + if (request_irq(SGI_LOCAL_0_IRQ, no_action, IRQF_NO_THREAD, 326 + "local0 cascade", NULL)) 327 + pr_err("Failed to register local0 cascade interrupt\n"); 328 + if (request_irq(SGI_LOCAL_1_IRQ, no_action, IRQF_NO_THREAD, 329 + "local1 cascade", NULL)) 330 + pr_err("Failed to register local1 cascade interrupt\n"); 331 + if (request_irq(SGI_BUSERR_IRQ, no_action, IRQF_NO_THREAD, 332 + "Bus Error", NULL)) 333 + pr_err("Failed to register Bus Error interrupt\n"); 299 334 300 335 /* cascade in cascade. i love Indy ;-) */ 301 - setup_irq(SGI_MAP_0_IRQ, &map0_cascade); 336 + if (request_irq(SGI_MAP_0_IRQ, no_action, IRQF_NO_THREAD, 337 + "mapable0 cascade", NULL)) 338 + pr_err("Failed to register mapable0 cascade interrupt\n"); 302 339 #ifdef USE_LIO3_IRQ 303 - setup_irq(SGI_MAP_1_IRQ, &map1_cascade); 340 + if (request_irq(SGI_MAP_1_IRQ, no_action, IRQF_NO_THREAD, 341 + "mapable1 cascade", NULL)) 342 + pr_err("Failed to register mapable1 cascade interrupt\n"); 304 343 #endif 305 344 306 345 #ifdef CONFIG_EISA
+6 -12
arch/mips/sgi-ip32/ip32-irq.c
··· 111 111 extern irqreturn_t crime_memerr_intr(int irq, void *dev_id); 112 112 extern irqreturn_t crime_cpuerr_intr(int irq, void *dev_id); 113 113 114 - static struct irqaction memerr_irq = { 115 - .handler = crime_memerr_intr, 116 - .name = "CRIME memory error", 117 - }; 118 - 119 - static struct irqaction cpuerr_irq = { 120 - .handler = crime_cpuerr_intr, 121 - .name = "CRIME CPU error", 122 - }; 123 - 124 114 /* 125 115 * This is for pure CRIME interrupts - ie not MACE. The advantage? 126 116 * We get to split the register in half and do faster lookups. ··· 487 497 break; 488 498 } 489 499 } 490 - setup_irq(CRIME_MEMERR_IRQ, &memerr_irq); 491 - setup_irq(CRIME_CPUERR_IRQ, &cpuerr_irq); 500 + if (request_irq(CRIME_MEMERR_IRQ, crime_memerr_intr, 0, 501 + "CRIME memory error", NULL)) 502 + pr_err("Failed to register CRIME memory error interrupt\n"); 503 + if (request_irq(CRIME_CPUERR_IRQ, crime_cpuerr_intr, 0, 504 + "CRIME CPU error", NULL)) 505 + pr_err("Failed to register CRIME CPU error interrupt\n"); 492 506 493 507 #define ALLINTS (IE_IRQ0 | IE_IRQ1 | IE_IRQ2 | IE_IRQ3 | IE_IRQ4 | IE_IRQ5) 494 508 change_c0_status(ST0_IM, ALLINTS);
+3 -1
arch/mips/sni/a20r.c
··· 222 222 irq_set_chip_and_handler(i, &a20r_irq_type, handle_level_irq); 223 223 sni_hwint = a20r_hwint; 224 224 change_c0_status(ST0_IM, IE_IRQ0); 225 - setup_irq(SNI_A20R_IRQ_BASE + 3, &sni_isa_irq); 225 + if (request_irq(SNI_A20R_IRQ_BASE + 3, sni_isa_irq_handler, 226 + IRQF_SHARED, "ISA", NULL)) 227 + pr_err("Failed to register ISA interrupt\n"); 226 228 } 227 229 228 230 void sni_a20r_init(void)
+1 -7
arch/mips/sni/irq.c
··· 27 27 } 28 28 29 29 /* ISA irq handler */ 30 - static irqreturn_t sni_isa_irq_handler(int dummy, void *p) 30 + irqreturn_t sni_isa_irq_handler(int dummy, void *p) 31 31 { 32 32 int irq; 33 33 ··· 38 38 generic_handle_irq(irq); 39 39 return IRQ_HANDLED; 40 40 } 41 - 42 - struct irqaction sni_isa_irq = { 43 - .handler = sni_isa_irq_handler, 44 - .name = "ISA", 45 - .flags = IRQF_SHARED 46 - }; 47 41 48 42 /* 49 43 * On systems with i8259-style interrupt controllers we assume for
+6 -2
arch/mips/sni/pcit.c
··· 244 244 *(volatile u32 *)SNI_PCIT_INT_REG = 0; 245 245 sni_hwint = sni_pcit_hwint; 246 246 change_c0_status(ST0_IM, IE_IRQ1); 247 - setup_irq(SNI_PCIT_INT_START + 6, &sni_isa_irq); 247 + if (request_irq(SNI_PCIT_INT_START + 6, sni_isa_irq_handler, 248 + IRQF_SHARED, "ISA", NULL)) 249 + pr_err("Failed to register ISA interrupt\n"); 248 250 } 249 251 250 252 void __init sni_pcit_cplus_irq_init(void) ··· 259 257 *(volatile u32 *)SNI_PCIT_INT_REG = 0x40000000; 260 258 sni_hwint = sni_pcit_hwint_cplus; 261 259 change_c0_status(ST0_IM, IE_IRQ0); 262 - setup_irq(MIPS_CPU_IRQ_BASE + 3, &sni_isa_irq); 260 + if (request_irq(MIPS_CPU_IRQ_BASE + 3, sni_isa_irq_handler, 261 + IRQF_SHARED, "ISA", NULL)) 262 + pr_err("Failed to register ISA interrupt\n"); 263 263 } 264 264 265 265 void __init sni_pcit_init(void)
+9 -14
arch/mips/sni/rm200.c
··· 356 356 /* 357 357 * IRQ2 is cascade interrupt to second interrupt controller 358 358 */ 359 - static struct irqaction sni_rm200_irq2 = { 360 - .handler = no_action, 361 - .name = "cascade", 362 - .flags = IRQF_NO_THREAD, 363 - }; 364 359 365 360 static struct resource sni_rm200_pic1_resource = { 366 361 .name = "onboard ISA pic1", ··· 384 389 return IRQ_HANDLED; 385 390 } 386 391 387 - struct irqaction sni_rm200_i8259A_irq = { 388 - .handler = sni_rm200_i8259A_irq_handler, 389 - .name = "onboard ISA", 390 - .flags = IRQF_SHARED 391 - }; 392 - 393 392 void __init sni_rm200_i8259_irqs(void) 394 393 { 395 394 int i; ··· 406 417 irq_set_chip_and_handler(i, &sni_rm200_i8259A_chip, 407 418 handle_level_irq); 408 419 409 - setup_irq(RM200_I8259A_IRQ_BASE + PIC_CASCADE_IR, &sni_rm200_irq2); 420 + if (request_irq(RM200_I8259A_IRQ_BASE + PIC_CASCADE_IR, no_action, 421 + IRQF_NO_THREAD, "cascade", NULL)) 422 + pr_err("Failed to register cascade interrupt\n"); 410 423 } 411 424 412 425 ··· 472 481 irq_set_chip_and_handler(i, &rm200_irq_type, handle_level_irq); 473 482 sni_hwint = sni_rm200_hwint; 474 483 change_c0_status(ST0_IM, IE_IRQ0); 475 - setup_irq(SNI_RM200_INT_START + 0, &sni_rm200_i8259A_irq); 476 - setup_irq(SNI_RM200_INT_START + 1, &sni_isa_irq); 484 + if (request_irq(SNI_RM200_INT_START + 0, sni_rm200_i8259A_irq_handler, 485 + IRQF_SHARED, "onboard ISA", NULL)) 486 + pr_err("Failed to register onboard ISA interrupt\n"); 487 + if (request_irq(SNI_RM200_INT_START + 1, sni_isa_irq_handler, 488 + IRQF_SHARED, "ISA", NULL)) 489 + pr_err("Failed to register ISA interrupt\n"); 477 490 } 478 491 479 492 void __init sni_rm200_init(void)
+3 -9
arch/mips/sni/time.c
··· 55 55 return IRQ_HANDLED; 56 56 } 57 57 58 - static struct irqaction a20r_irqaction = { 59 - .handler = a20r_interrupt, 60 - .flags = IRQF_PERCPU | IRQF_TIMER, 61 - .name = "a20r-timer", 62 - }; 63 - 64 58 /* 65 59 * a20r platform uses 2 counters to divide the input frequency. 66 60 * Counter 2 output is connected to Counter 0 & 1 input. ··· 62 68 static void __init sni_a20r_timer_setup(void) 63 69 { 64 70 struct clock_event_device *cd = &a20r_clockevent_device; 65 - struct irqaction *action = &a20r_irqaction; 66 71 unsigned int cpu = smp_processor_id(); 67 72 68 73 cd->cpumask = cpumask_of(cpu); 69 74 clockevents_register_device(cd); 70 - action->dev_id = cd; 71 - setup_irq(SNI_A20R_IRQ_TIMER, &a20r_irqaction); 75 + if (request_irq(SNI_A20R_IRQ_TIMER, a20r_interrupt, 76 + IRQF_PERCPU | IRQF_TIMER, "a20r-timer", cd)) 77 + pr_err("Failed to register a20r-timer interrupt\n"); 72 78 } 73 79 74 80 #define SNI_8254_TICK_RATE 1193182UL
+2 -7
arch/mips/vr41xx/common/irq.c
··· 17 17 18 18 static irq_cascade_t irq_cascade[NR_IRQS] __cacheline_aligned; 19 19 20 - static struct irqaction cascade_irqaction = { 21 - .handler = no_action, 22 - .name = "cascade", 23 - .flags = IRQF_NO_THREAD, 24 - }; 25 - 26 20 int cascade_irq(unsigned int irq, int (*get_irq)(unsigned int)) 27 21 { 28 22 int retval = 0; ··· 30 36 irq_cascade[irq].get_irq = get_irq; 31 37 32 38 if (get_irq != NULL) { 33 - retval = setup_irq(irq, &cascade_irqaction); 39 + retval = request_irq(irq, no_action, IRQF_NO_THREAD, 40 + "cascade", NULL); 34 41 if (retval < 0) 35 42 irq_cascade[irq].get_irq = NULL; 36 43 }