Merge branch 'irq-cleanup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'irq-cleanup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (37 commits)
um: Use generic irq Kconfig
tile: Use generic irq Kconfig
sparc: Use generic irq Kconfig
score: Use generic irq Kconfig
powerpc: Use generic irq Kconfig
parisc: Use generic irq Kconfig
mn10300: Use generic irq Kconfig
microblaze: Use generic irq Kconfig
m68knommu: Use generic irq Kconfig
ia64: Use generic irq Kconfig
frv: Use generic irq Kconfig
blackfin: Use generic irq Kconfig
alpha: Use generic irq Kconfig
genirq: Remove __do_IRQ
m32r: Convert to generic irq Kconfig
m32r: Convert usrv platform irq handling
m32r: Convert opsput_lcdpld irq chip
m32r: Convert opsput lanpld irq chip
m32r: Convert opsput pld irq chip
m32r: Convert opsput irq chip
...

+430 -1050
-8
Documentation/feature-removal-schedule.txt
··· 357 357 358 358 ----------------------------- 359 359 360 - What: __do_IRQ all in one fits nothing interrupt handler 361 - When: 2.6.32 362 - Why: __do_IRQ was kept for easy migration to the type flow handlers. 363 - More than two years of migration time is enough. 364 - Who: Thomas Gleixner <tglx@linutronix.de> 365 - 366 - ----------------------------- 367 - 368 360 What: fakephp and associated sysfs files in /sys/bus/pci/slots/ 369 361 When: 2011 370 362 Why: In 2.6.27, the semantics of /sys/bus/pci/slots was redefined to
+3 -16
arch/alpha/Kconfig
··· 8 8 select HAVE_IRQ_WORK 9 9 select HAVE_PERF_EVENTS 10 10 select HAVE_DMA_ATTRS 11 + select HAVE_GENERIC_HARDIRQS 12 + select GENERIC_IRQ_PROBE 13 + select AUTO_IRQ_AFFINITY if SMP 11 14 help 12 15 The Alpha is a 64-bit general-purpose processor designed and 13 16 marketed by the Digital Equipment Corporation of blessed memory, ··· 70 67 config GENERIC_IOMAP 71 68 bool 72 69 default n 73 - 74 - config GENERIC_HARDIRQS_NO__DO_IRQ 75 - def_bool y 76 - 77 - config GENERIC_HARDIRQS 78 - bool 79 - default y 80 - 81 - config GENERIC_IRQ_PROBE 82 - bool 83 - default y 84 - 85 - config AUTO_IRQ_AFFINITY 86 - bool 87 - depends on SMP 88 - default y 89 70 90 71 source "init/Kconfig" 91 72 source "kernel/Kconfig.freezer"
+3 -14
arch/blackfin/Kconfig
··· 30 30 select HAVE_KERNEL_LZO if RAMKERNEL 31 31 select HAVE_OPROFILE 32 32 select ARCH_WANT_OPTIONAL_GPIOLIB 33 + select HAVE_GENERIC_HARDIRQS 34 + select GENERIC_IRQ_PROBE 35 + select IRQ_PER_CPU if SMP 33 36 34 37 config GENERIC_CSUM 35 38 def_bool y ··· 45 42 def_bool y 46 43 47 44 config GENERIC_FIND_NEXT_BIT 48 - def_bool y 49 - 50 - config GENERIC_HARDIRQS 51 - def_bool y 52 - 53 - config GENERIC_IRQ_PROBE 54 - def_bool y 55 - 56 - config GENERIC_HARDIRQS_NO__DO_IRQ 57 45 def_bool y 58 46 59 47 config GENERIC_GPIO ··· 246 252 config HOTPLUG_CPU 247 253 bool "Support for hot-pluggable CPUs" 248 254 depends on SMP && HOTPLUG 249 - default y 250 - 251 - config IRQ_PER_CPU 252 - bool 253 - depends on SMP 254 255 default y 255 256 256 257 config HAVE_LEGACY_PER_CPU_AREA
+2 -4
arch/cris/Kconfig
··· 54 54 bool 55 55 default y 56 56 select HAVE_IDE 57 + select HAVE_GENERIC_HARDIRQS 58 + select GENERIC_HARDIRQS_NO_DEPRECATED 57 59 58 60 config HZ 59 61 int ··· 68 66 menu "General setup" 69 67 70 68 source "fs/Kconfig.binfmt" 71 - 72 - config GENERIC_HARDIRQS 73 - bool 74 - default y 75 69 76 70 config ETRAX_CMDLINE 77 71 string "Kernel command line"
+10 -31
arch/cris/arch-v10/kernel/irq.c
··· 104 104 IRQ31_interrupt 105 105 }; 106 106 107 - static void enable_crisv10_irq(unsigned int irq); 108 - 109 - static unsigned int startup_crisv10_irq(unsigned int irq) 107 + static void enable_crisv10_irq(struct irq_data *data) 110 108 { 111 - enable_crisv10_irq(irq); 112 - return 0; 109 + crisv10_unmask_irq(data->irq); 113 110 } 114 111 115 - #define shutdown_crisv10_irq disable_crisv10_irq 116 - 117 - static void enable_crisv10_irq(unsigned int irq) 112 + static void disable_crisv10_irq(struct irq_data *data) 118 113 { 119 - crisv10_unmask_irq(irq); 120 - } 121 - 122 - static void disable_crisv10_irq(unsigned int irq) 123 - { 124 - crisv10_mask_irq(irq); 125 - } 126 - 127 - static void ack_crisv10_irq(unsigned int irq) 128 - { 129 - } 130 - 131 - static void end_crisv10_irq(unsigned int irq) 132 - { 114 + crisv10_mask_irq(data->irq); 133 115 } 134 116 135 117 static struct irq_chip crisv10_irq_type = { 136 - .name = "CRISv10", 137 - .startup = startup_crisv10_irq, 138 - .shutdown = shutdown_crisv10_irq, 139 - .enable = enable_crisv10_irq, 140 - .disable = disable_crisv10_irq, 141 - .ack = ack_crisv10_irq, 142 - .end = end_crisv10_irq, 143 - .set_affinity = NULL 118 + .name = "CRISv10", 119 + .irq_shutdown = disable_crisv10_irq, 120 + .irq_enable = enable_crisv10_irq, 121 + .irq_disable = disable_crisv10_irq, 144 122 }; 145 123 146 124 void weird_irq(void); ··· 199 221 200 222 /* Initialize IRQ handler descriptors. */ 201 223 for(i = 2; i < NR_IRQS; i++) { 202 - irq_desc[i].chip = &crisv10_irq_type; 224 + set_irq_desc_and_handler(i, &crisv10_irq_type, 225 + handle_simple_irq); 203 226 set_int_vector(i, interrupt[i]); 204 227 } 205 228
+16 -36
arch/cris/arch-v32/kernel/irq.c
··· 291 291 } 292 292 293 293 294 - static unsigned int startup_crisv32_irq(unsigned int irq) 294 + static void enable_crisv32_irq(struct irq_data *data) 295 295 { 296 - crisv32_unmask_irq(irq); 297 - return 0; 296 + crisv32_unmask_irq(data->irq); 298 297 } 299 298 300 - static void shutdown_crisv32_irq(unsigned int irq) 299 + static void disable_crisv32_irq(struct irq_data *data) 301 300 { 302 - crisv32_mask_irq(irq); 301 + crisv32_mask_irq(data->irq); 303 302 } 304 303 305 - static void enable_crisv32_irq(unsigned int irq) 306 - { 307 - crisv32_unmask_irq(irq); 308 - } 309 - 310 - static void disable_crisv32_irq(unsigned int irq) 311 - { 312 - crisv32_mask_irq(irq); 313 - } 314 - 315 - static void ack_crisv32_irq(unsigned int irq) 316 - { 317 - } 318 - 319 - static void end_crisv32_irq(unsigned int irq) 320 - { 321 - } 322 - 323 - int set_affinity_crisv32_irq(unsigned int irq, const struct cpumask *dest) 304 + static int set_affinity_crisv32_irq(struct irq_data *data, 305 + const struct cpumask *dest, bool force) 324 306 { 325 307 unsigned long flags; 326 - spin_lock_irqsave(&irq_lock, flags); 327 - irq_allocations[irq - FIRST_IRQ].mask = *dest; 328 - spin_unlock_irqrestore(&irq_lock, flags); 329 308 309 + spin_lock_irqsave(&irq_lock, flags); 310 + irq_allocations[data->irq - FIRST_IRQ].mask = *dest; 311 + spin_unlock_irqrestore(&irq_lock, flags); 330 312 return 0; 331 313 } 332 314 333 315 static struct irq_chip crisv32_irq_type = { 334 - .name = "CRISv32", 335 - .startup = startup_crisv32_irq, 336 - .shutdown = shutdown_crisv32_irq, 337 - .enable = enable_crisv32_irq, 338 - .disable = disable_crisv32_irq, 339 - .ack = ack_crisv32_irq, 340 - .end = end_crisv32_irq, 341 - .set_affinity = set_affinity_crisv32_irq 316 + .name = "CRISv32", 317 + .irq_shutdown = disable_crisv32_irq, 318 + .irq_enable = enable_crisv32_irq, 319 + .irq_disable = disable_crisv32_irq, 320 + .irq_set_affinity = set_affinity_crisv32_irq, 342 321 }; 343 322 344 323 void ··· 451 472 452 473 /* Point all IRQ's to bad handlers. */ 453 474 for (i = FIRST_IRQ, j = 0; j < NR_IRQS; i++, j++) { 454 - irq_desc[j].chip = &crisv32_irq_type; 475 + set_irq_chip_and_handler(j, &crisv32_irq_type, 476 + handle_simple_irq); 455 477 set_exception_vector(i, interrupt[j]); 456 478 } 457 479
+3 -3
arch/cris/kernel/irq.c
··· 62 62 for_each_online_cpu(j) 63 63 seq_printf(p, "%10u ", kstat_irqs_cpu(i, j)); 64 64 #endif 65 - seq_printf(p, " %14s", irq_desc[i].chip->name); 65 + seq_printf(p, " %14s", irq_desc[i].irq_data.chip->name); 66 66 seq_printf(p, " %s", action->name); 67 67 68 68 for (action=action->next; action; action = action->next) ··· 93 93 printk("do_IRQ: stack overflow: %lX\n", sp); 94 94 show_stack(NULL, (unsigned long *)sp); 95 95 } 96 - __do_IRQ(irq); 97 - irq_exit(); 96 + generic_handle_irq(irq); 97 + irq_exit(); 98 98 set_irq_regs(old_regs); 99 99 } 100 100
+1 -8
arch/frv/Kconfig
··· 5 5 select HAVE_ARCH_TRACEHOOK 6 6 select HAVE_IRQ_WORK 7 7 select HAVE_PERF_EVENTS 8 + select HAVE_GENERIC_HARDIRQS 8 9 9 10 config ZONE_DMA 10 11 bool ··· 29 28 config GENERIC_CALIBRATE_DELAY 30 29 bool 31 30 default n 32 - 33 - config GENERIC_HARDIRQS 34 - bool 35 - default y 36 - 37 - config GENERIC_HARDIRQS_NO__DO_IRQ 38 - bool 39 - default y 40 31 41 32 config TIME_LOW_RES 42 33 bool
+2 -4
arch/h8300/Kconfig
··· 2 2 bool 3 3 default y 4 4 select HAVE_IDE 5 + select HAVE_GENERIC_HARDIRQS 6 + select GENERIC_HARDIRQS_NO_DEPRECATED 5 7 6 8 config SYMBOL_PREFIX 7 9 string ··· 46 44 default y 47 45 48 46 config GENERIC_HWEIGHT 49 - bool 50 - default y 51 - 52 - config GENERIC_HARDIRQS 53 47 bool 54 48 default y 55 49
+20 -30
arch/h8300/kernel/irq.c
··· 38 38 return (irq >= EXT_IRQ0 && irq <= (EXT_IRQ0 + EXT_IRQS)); 39 39 } 40 40 41 - static void h8300_enable_irq(unsigned int irq) 41 + static void h8300_enable_irq(struct irq_data *data) 42 42 { 43 - if (is_ext_irq(irq)) 44 - IER_REGS |= 1 << (irq - EXT_IRQ0); 43 + if (is_ext_irq(data->irq)) 44 + IER_REGS |= 1 << (data->irq - EXT_IRQ0); 45 45 } 46 46 47 - static void h8300_disable_irq(unsigned int irq) 47 + static void h8300_disable_irq(struct irq_data *data) 48 48 { 49 - if (is_ext_irq(irq)) 50 - IER_REGS &= ~(1 << (irq - EXT_IRQ0)); 49 + if (is_ext_irq(data->irq)) 50 + IER_REGS &= ~(1 << (data->irq - EXT_IRQ0)); 51 51 } 52 52 53 - static void h8300_end_irq(unsigned int irq) 53 + static unsigned int h8300_startup_irq(struct irq_data *data) 54 54 { 55 - } 56 - 57 - static unsigned int h8300_startup_irq(unsigned int irq) 58 - { 59 - if (is_ext_irq(irq)) 60 - return h8300_enable_irq_pin(irq); 55 + if (is_ext_irq(data->irq)) 56 + return h8300_enable_irq_pin(data->irq); 61 57 else 62 58 return 0; 63 59 } 64 60 65 - static void h8300_shutdown_irq(unsigned int irq) 61 + static void h8300_shutdown_irq(struct irq_data *data) 66 62 { 67 - if (is_ext_irq(irq)) 68 - h8300_disable_irq_pin(irq); 63 + if (is_ext_irq(data->irq)) 64 + h8300_disable_irq_pin(data->irq); 69 65 } 70 66 71 67 /* ··· 69 73 */ 70 74 struct irq_chip h8300irq_chip = { 71 75 .name = "H8300-INTC", 72 - .startup = h8300_startup_irq, 73 - .shutdown = h8300_shutdown_irq, 74 - .enable = h8300_enable_irq, 75 - .disable = h8300_disable_irq, 76 - .ack = NULL, 77 - .end = h8300_end_irq, 76 + .irq_startup = h8300_startup_irq, 77 + .irq_shutdown = h8300_shutdown_irq, 78 + .irq_enable = h8300_enable_irq, 79 + .irq_disable = h8300_disable_irq, 78 80 }; 79 81 80 82 #if defined(CONFIG_RAMKERNEL) ··· 154 160 155 161 setup_vector(); 156 162 157 - for (c = 0; c < NR_IRQS; c++) { 158 - irq_desc[c].status = IRQ_DISABLED; 159 - irq_desc[c].action = NULL; 160 - irq_desc[c].depth = 1; 161 - irq_desc[c].chip = &h8300irq_chip; 162 - } 163 + for (c = 0; c < NR_IRQS; c++) 164 + set_irq_chip_and_handler(c, &h8300irq_chip, handle_simple_irq); 163 165 } 164 166 165 167 asmlinkage void do_IRQ(int irq) 166 168 { 167 169 irq_enter(); 168 - __do_IRQ(irq); 170 + generic_handle_irq(irq); 169 171 irq_exit(); 170 172 } 171 173 ··· 182 192 goto unlock; 183 193 seq_printf(p, "%3d: ",i); 184 194 seq_printf(p, "%10u ", kstat_irqs(i)); 185 - seq_printf(p, " %14s", irq_desc[i].chip->name); 195 + seq_printf(p, " %14s", irq_desc[i].irq_data.chip->name); 186 196 seq_printf(p, "-%-8s", irq_desc[i].name); 187 197 seq_printf(p, " %s", action->name); 188 198
+4 -22
arch/ia64/Kconfig
··· 22 22 select HAVE_KVM 23 23 select HAVE_ARCH_TRACEHOOK 24 24 select HAVE_DMA_API_DEBUG 25 + select HAVE_GENERIC_HARDIRQS 26 + select GENERIC_IRQ_PROBE 27 + select GENERIC_PENDING_IRQ if SMP 28 + select IRQ_PER_CPU 25 29 default y 26 30 help 27 31 The Itanium Processor Family is Intel's 64-bit successor to ··· 681 677 source "arch/ia64/kvm/Kconfig" 682 678 683 679 source "lib/Kconfig" 684 - 685 - # 686 - # Use the generic interrupt handling code in kernel/irq/: 687 - # 688 - config GENERIC_HARDIRQS 689 - def_bool y 690 - 691 - config GENERIC_HARDIRQS_NO__DO_IRQ 692 - def_bool y 693 - 694 - config GENERIC_IRQ_PROBE 695 - bool 696 - default y 697 - 698 - config GENERIC_PENDING_IRQ 699 - bool 700 - depends on GENERIC_HARDIRQS && SMP 701 - default y 702 - 703 - config IRQ_PER_CPU 704 - bool 705 - default y 706 680 707 681 config IOMMU_HELPER 708 682 def_bool (IA64_HP_ZX1 || IA64_HP_ZX1_SWIOTLB || IA64_GENERIC || SWIOTLB)
+3 -8
arch/m32r/Kconfig
··· 7 7 select HAVE_KERNEL_GZIP 8 8 select HAVE_KERNEL_BZIP2 9 9 select HAVE_KERNEL_LZMA 10 + select HAVE_GENERIC_HARDIRQS 11 + select GENERIC_HARDIRQS_NO_DEPRECATED 12 + select GENERIC_IRQ_PROBE 10 13 11 14 config SBUS 12 15 bool ··· 19 16 default y 20 17 21 18 config ZONE_DMA 22 - bool 23 - default y 24 - 25 - config GENERIC_HARDIRQS 26 - bool 27 - default y 28 - 29 - config GENERIC_IRQ_PROBE 30 19 bool 31 20 default y 32 21
+6 -4
arch/m32r/kernel/irq.c
··· 40 40 } 41 41 42 42 if (i < NR_IRQS) { 43 - raw_spin_lock_irqsave(&irq_desc[i].lock, flags); 44 - action = irq_desc[i].action; 43 + struct irq_desc *desc = irq_to_desc(i); 44 + 45 + raw_spin_lock_irqsave(&desc->lock, flags); 46 + action = desc->action; 45 47 if (!action) 46 48 goto skip; 47 49 seq_printf(p, "%3d: ",i); ··· 53 51 for_each_online_cpu(j) 54 52 seq_printf(p, "%10u ", kstat_irqs_cpu(i, j)); 55 53 #endif 56 - seq_printf(p, " %14s", irq_desc[i].chip->name); 54 + seq_printf(p, " %14s", desc->irq_data.chip->name); 57 55 seq_printf(p, " %s", action->name); 58 56 59 57 for (action=action->next; action; action = action->next) ··· 61 59 62 60 seq_putc(p, '\n'); 63 61 skip: 64 - raw_spin_unlock_irqrestore(&irq_desc[i].lock, flags); 62 + raw_spin_unlock_irqrestore(&desc->lock, flags); 65 63 } 66 64 return 0; 67 65 }
+21 -37
arch/m32r/platforms/m32104ut/setup.c
··· 39 39 outl(data, port); 40 40 } 41 41 42 - static void mask_and_ack_m32104ut(unsigned int irq) 42 + static void mask_m32104ut_irq(struct irq_data *data) 43 43 { 44 - disable_m32104ut_irq(irq); 44 + disable_m32104ut_irq(data->irq); 45 45 } 46 46 47 - static void end_m32104ut_irq(unsigned int irq) 47 + static void unmask_m32104ut_irq(struct irq_data *data) 48 48 { 49 - enable_m32104ut_irq(irq); 49 + enable_m32104ut_irq(data->irq); 50 50 } 51 51 52 - static unsigned int startup_m32104ut_irq(unsigned int irq) 52 + static void shutdown_m32104ut_irq(struct irq_data *data) 53 53 { 54 - enable_m32104ut_irq(irq); 55 - return (0); 56 - } 54 + unsigned int irq = data->irq; 55 + unsigned long port = irq2port(irq); 57 56 58 - static void shutdown_m32104ut_irq(unsigned int irq) 59 - { 60 - unsigned long port; 61 - 62 - port = irq2port(irq); 63 57 outl(M32R_ICUCR_ILEVEL7, port); 64 58 } 65 59 66 60 static struct irq_chip m32104ut_irq_type = 67 61 { 68 - .name = "M32104UT-IRQ", 69 - .startup = startup_m32104ut_irq, 70 - .shutdown = shutdown_m32104ut_irq, 71 - .enable = enable_m32104ut_irq, 72 - .disable = disable_m32104ut_irq, 73 - .ack = mask_and_ack_m32104ut, 74 - .end = end_m32104ut_irq 62 + .name = "M32104UT-IRQ", 63 + .irq_shutdown = shutdown_m32104ut_irq, 64 + .irq_unmask = unmask_m32104ut_irq, 65 + .irq_mask = mask_m32104ut_irq, 75 66 }; 76 67 77 68 void __init init_IRQ(void) ··· 76 85 77 86 #if defined(CONFIG_SMC91X) 78 87 /* INT#0: LAN controller on M32104UT-LAN (SMC91C111)*/ 79 - irq_desc[M32R_IRQ_INT0].status = IRQ_DISABLED; 80 - irq_desc[M32R_IRQ_INT0].chip = &m32104ut_irq_type; 81 - irq_desc[M32R_IRQ_INT0].action = 0; 82 - irq_desc[M32R_IRQ_INT0].depth = 1; 83 - icu_data[M32R_IRQ_INT0].icucr = M32R_ICUCR_IEN | M32R_ICUCR_ISMOD11; /* "H" level sense */ 88 + set_irq_chip_and_handler(M32R_IRQ_INT0, &m32104ut_irq_type, 89 + handle_level_irq); 90 + /* "H" level sense */ 91 + cu_data[M32R_IRQ_INT0].icucr = M32R_ICUCR_IEN | M32R_ICUCR_ISMOD11; 84 92 disable_m32104ut_irq(M32R_IRQ_INT0); 85 93 #endif /* CONFIG_SMC91X */ 86 94 87 95 /* MFT2 : system timer */ 88 - irq_desc[M32R_IRQ_MFT2].status = IRQ_DISABLED; 89 - irq_desc[M32R_IRQ_MFT2].chip = &m32104ut_irq_type; 90 - irq_desc[M32R_IRQ_MFT2].action = 0; 91 - irq_desc[M32R_IRQ_MFT2].depth = 1; 96 + set_irq_chip_and_handler(M32R_IRQ_MFT2, &m32104ut_irq_type, 97 + handle_level_irq); 92 98 icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN; 93 99 disable_m32104ut_irq(M32R_IRQ_MFT2); 94 100 95 101 #ifdef CONFIG_SERIAL_M32R_SIO 96 102 /* SIO0_R : uart receive data */ 97 - irq_desc[M32R_IRQ_SIO0_R].status = IRQ_DISABLED; 98 - irq_desc[M32R_IRQ_SIO0_R].chip = &m32104ut_irq_type; 99 - irq_desc[M32R_IRQ_SIO0_R].action = 0; 100 - irq_desc[M32R_IRQ_SIO0_R].depth = 1; 103 + set_irq_chip_and_handler(M32R_IRQ_SIO0_R, &m32104ut_irq_type, 104 + handle_level_irq); 101 105 icu_data[M32R_IRQ_SIO0_R].icucr = M32R_ICUCR_IEN; 102 106 disable_m32104ut_irq(M32R_IRQ_SIO0_R); 103 107 104 108 /* SIO0_S : uart send data */ 105 - irq_desc[M32R_IRQ_SIO0_S].status = IRQ_DISABLED; 106 - irq_desc[M32R_IRQ_SIO0_S].chip = &m32104ut_irq_type; 107 - irq_desc[M32R_IRQ_SIO0_S].action = 0; 108 - irq_desc[M32R_IRQ_SIO0_S].depth = 1; 109 + set_irq_chip_and_handler(M32R_IRQ_SIO0_S, &m32104ut_irq_type, 110 + handle_level_irq); 109 111 icu_data[M32R_IRQ_SIO0_S].icucr = M32R_ICUCR_IEN; 110 112 disable_m32104ut_irq(M32R_IRQ_SIO0_S); 111 113 #endif /* CONFIG_SERIAL_M32R_SIO */
+73 -141
arch/m32r/platforms/m32700ut/setup.c
··· 45 45 outl(data, port); 46 46 } 47 47 48 - static void mask_and_ack_m32700ut(unsigned int irq) 48 + static void mask_m32700ut(struct irq_data *data) 49 49 { 50 - disable_m32700ut_irq(irq); 50 + disable_m32700ut_irq(data->irq); 51 51 } 52 52 53 - static void end_m32700ut_irq(unsigned int irq) 53 + static void unmask_m32700ut(struct irq_data *data) 54 54 { 55 - enable_m32700ut_irq(irq); 55 + enable_m32700ut_irq(data->irq); 56 56 } 57 57 58 - static unsigned int startup_m32700ut_irq(unsigned int irq) 59 - { 60 - enable_m32700ut_irq(irq); 61 - return (0); 62 - } 63 - 64 - static void shutdown_m32700ut_irq(unsigned int irq) 58 + static void shutdown_m32700ut(struct irq_data *data) 65 59 { 66 60 unsigned long port; 67 61 68 - port = irq2port(irq); 62 + port = irq2port(data->irq); 69 63 outl(M32R_ICUCR_ILEVEL7, port); 70 64 } 71 65 72 66 static struct irq_chip m32700ut_irq_type = 73 67 { 74 - .name = "M32700UT-IRQ", 75 - .startup = startup_m32700ut_irq, 76 - .shutdown = shutdown_m32700ut_irq, 77 - .enable = enable_m32700ut_irq, 78 - .disable = disable_m32700ut_irq, 79 - .ack = mask_and_ack_m32700ut, 80 - .end = end_m32700ut_irq 68 + .name = "M32700UT-IRQ", 69 + .irq_shutdown = shutdown_m32700ut, 70 + .irq_mask = mask_m32700ut, 71 + .irq_unmask = unmask_m32700ut 81 72 }; 82 73 83 74 /* ··· 90 99 unsigned int pldirq; 91 100 92 101 pldirq = irq2pldirq(irq); 93 - // disable_m32700ut_irq(M32R_IRQ_INT1); 94 102 port = pldirq2port(pldirq); 95 103 data = pld_icu_data[pldirq].icucr|PLD_ICUCR_ILEVEL7; 96 104 outw(data, port); ··· 101 111 unsigned int pldirq; 102 112 103 113 pldirq = irq2pldirq(irq); 104 - // enable_m32700ut_irq(M32R_IRQ_INT1); 105 114 port = pldirq2port(pldirq); 106 115 data = pld_icu_data[pldirq].icucr|PLD_ICUCR_IEN|PLD_ICUCR_ILEVEL6; 107 116 outw(data, port); 108 117 } 109 118 110 - static void mask_and_ack_m32700ut_pld(unsigned int irq) 119 + static void mask_m32700ut_pld(struct irq_data *data) 111 120 { 112 - disable_m32700ut_pld_irq(irq); 113 - // mask_and_ack_m32700ut(M32R_IRQ_INT1); 121 + disable_m32700ut_pld_irq(data->irq); 114 122 } 115 123 116 - static void end_m32700ut_pld_irq(unsigned int irq) 124 + static void unmask_m32700ut_pld(struct irq_data *data) 117 125 { 118 - enable_m32700ut_pld_irq(irq); 119 - end_m32700ut_irq(M32R_IRQ_INT1); 126 + enable_m32700ut_pld_irq(data->irq); 127 + enable_m32700ut_irq(M32R_IRQ_INT1); 120 128 } 121 129 122 - static unsigned int startup_m32700ut_pld_irq(unsigned int irq) 123 - { 124 - enable_m32700ut_pld_irq(irq); 125 - return (0); 126 - } 127 - 128 - static void shutdown_m32700ut_pld_irq(unsigned int irq) 130 + static void shutdown_m32700ut_pld_irq(struct irq_data *data) 129 131 { 130 132 unsigned long port; 131 133 unsigned int pldirq; 132 134 133 - pldirq = irq2pldirq(irq); 134 - // shutdown_m32700ut_irq(M32R_IRQ_INT1); 135 + pldirq = irq2pldirq(data->irq); 135 136 port = pldirq2port(pldirq); 136 137 outw(PLD_ICUCR_ILEVEL7, port); 137 138 } 138 139 139 140 static struct irq_chip m32700ut_pld_irq_type = 140 141 { 141 - .name = "M32700UT-PLD-IRQ", 142 - .startup = startup_m32700ut_pld_irq, 143 - .shutdown = shutdown_m32700ut_pld_irq, 144 - .enable = enable_m32700ut_pld_irq, 145 - .disable = disable_m32700ut_pld_irq, 146 - .ack = mask_and_ack_m32700ut_pld, 147 - .end = end_m32700ut_pld_irq 142 + .name = "M32700UT-PLD-IRQ", 143 + .irq_shutdown = shutdown_m32700ut_pld_irq, 144 + .irq_mask = mask_m32700ut_pld, 145 + .irq_unmask = unmask_m32700ut_pld, 148 146 }; 149 147 150 148 /* ··· 166 188 outw(data, port); 167 189 } 168 190 169 - static void mask_and_ack_m32700ut_lanpld(unsigned int irq) 191 + static void mask_m32700ut_lanpld(struct irq_data *data) 170 192 { 171 - disable_m32700ut_lanpld_irq(irq); 193 + disable_m32700ut_lanpld_irq(data->irq); 172 194 } 173 195 174 - static void end_m32700ut_lanpld_irq(unsigned int irq) 196 + static void unmask_m32700ut_lanpld(struct irq_data *data) 175 197 { 176 - enable_m32700ut_lanpld_irq(irq); 177 - end_m32700ut_irq(M32R_IRQ_INT0); 198 + enable_m32700ut_lanpld_irq(data->irq); 199 + enable_m32700ut_irq(M32R_IRQ_INT0); 178 200 } 179 201 180 - static unsigned int startup_m32700ut_lanpld_irq(unsigned int irq) 181 - { 182 - enable_m32700ut_lanpld_irq(irq); 183 - return (0); 184 - } 185 - 186 - static void shutdown_m32700ut_lanpld_irq(unsigned int irq) 202 + static void shutdown_m32700ut_lanpld(struct irq_data *data) 187 203 { 188 204 unsigned long port; 189 205 unsigned int pldirq; 190 206 191 - pldirq = irq2lanpldirq(irq); 207 + pldirq = irq2lanpldirq(data->irq); 192 208 port = lanpldirq2port(pldirq); 193 209 outw(PLD_ICUCR_ILEVEL7, port); 194 210 } 195 211 196 212 static struct irq_chip m32700ut_lanpld_irq_type = 197 213 { 198 - .name = "M32700UT-PLD-LAN-IRQ", 199 - .startup = startup_m32700ut_lanpld_irq, 200 - .shutdown = shutdown_m32700ut_lanpld_irq, 201 - .enable = enable_m32700ut_lanpld_irq, 202 - .disable = disable_m32700ut_lanpld_irq, 203 - .ack = mask_and_ack_m32700ut_lanpld, 204 - .end = end_m32700ut_lanpld_irq 214 + .name = "M32700UT-PLD-LAN-IRQ", 215 + .irq_shutdown = shutdown_m32700ut_lanpld, 216 + .irq_mask = mask_m32700ut_lanpld, 217 + .irq_unmask = unmask_m32700ut_lanpld, 205 218 }; 206 219 207 220 /* ··· 226 257 outw(data, port); 227 258 } 228 259 229 - static void mask_and_ack_m32700ut_lcdpld(unsigned int irq) 260 + static void mask_m32700ut_lcdpld(struct irq_data *data) 230 261 { 231 - disable_m32700ut_lcdpld_irq(irq); 262 + disable_m32700ut_lcdpld_irq(data->irq); 232 263 } 233 264 234 - static void end_m32700ut_lcdpld_irq(unsigned int irq) 265 + static void unmask_m32700ut_lcdpld(struct irq_data *data) 235 266 { 236 - enable_m32700ut_lcdpld_irq(irq); 237 - end_m32700ut_irq(M32R_IRQ_INT2); 267 + enable_m32700ut_lcdpld_irq(data->irq); 268 + enable_m32700ut_irq(M32R_IRQ_INT2); 238 269 } 239 270 240 - static unsigned int startup_m32700ut_lcdpld_irq(unsigned int irq) 241 - { 242 - enable_m32700ut_lcdpld_irq(irq); 243 - return (0); 244 - } 245 - 246 - static void shutdown_m32700ut_lcdpld_irq(unsigned int irq) 271 + static void shutdown_m32700ut_lcdpld(struct irq_data *data) 247 272 { 248 273 unsigned long port; 249 274 unsigned int pldirq; 250 275 251 - pldirq = irq2lcdpldirq(irq); 276 + pldirq = irq2lcdpldirq(data->irq); 252 277 port = lcdpldirq2port(pldirq); 253 278 outw(PLD_ICUCR_ILEVEL7, port); 254 279 } 255 280 256 281 static struct irq_chip m32700ut_lcdpld_irq_type = 257 282 { 258 - .name = "M32700UT-PLD-LCD-IRQ", 259 - .startup = startup_m32700ut_lcdpld_irq, 260 - .shutdown = shutdown_m32700ut_lcdpld_irq, 261 - .enable = enable_m32700ut_lcdpld_irq, 262 - .disable = disable_m32700ut_lcdpld_irq, 263 - .ack = mask_and_ack_m32700ut_lcdpld, 264 - .end = end_m32700ut_lcdpld_irq 283 + .name = "M32700UT-PLD-LCD-IRQ", 284 + .irq_shutdown = shutdown_m32700ut_lcdpld, 285 + .irq_mask = mask_m32700ut_lcdpld, 286 + .irq_unmask = unmask_m32700ut_lcdpld, 265 287 }; 266 288 267 289 void __init init_IRQ(void) 268 290 { 269 291 #if defined(CONFIG_SMC91X) 270 292 /* INT#0: LAN controller on M32700UT-LAN (SMC91C111)*/ 271 - irq_desc[M32700UT_LAN_IRQ_LAN].status = IRQ_DISABLED; 272 - irq_desc[M32700UT_LAN_IRQ_LAN].chip = &m32700ut_lanpld_irq_type; 273 - irq_desc[M32700UT_LAN_IRQ_LAN].action = 0; 274 - irq_desc[M32700UT_LAN_IRQ_LAN].depth = 1; /* disable nested irq */ 293 + set_irq_chip_and_handler(M32700UT_LAN_IRQ_LAN, 294 + &m32700ut_lanpld_irq_type, handle_level_irq); 275 295 lanpld_icu_data[irq2lanpldirq(M32700UT_LAN_IRQ_LAN)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD02; /* "H" edge sense */ 276 296 disable_m32700ut_lanpld_irq(M32700UT_LAN_IRQ_LAN); 277 297 #endif /* CONFIG_SMC91X */ 278 298 279 299 /* MFT2 : system timer */ 280 - irq_desc[M32R_IRQ_MFT2].status = IRQ_DISABLED; 281 - irq_desc[M32R_IRQ_MFT2].chip = &m32700ut_irq_type; 282 - irq_desc[M32R_IRQ_MFT2].action = 0; 283 - irq_desc[M32R_IRQ_MFT2].depth = 1; 300 + set_irq_chip_and_handler(M32R_IRQ_MFT2, &m32700ut_irq_type, 301 + handle_level_irq); 284 302 icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN; 285 303 disable_m32700ut_irq(M32R_IRQ_MFT2); 286 304 287 305 /* SIO0 : receive */ 288 - irq_desc[M32R_IRQ_SIO0_R].status = IRQ_DISABLED; 289 - irq_desc[M32R_IRQ_SIO0_R].chip = &m32700ut_irq_type; 290 - irq_desc[M32R_IRQ_SIO0_R].action = 0; 291 - irq_desc[M32R_IRQ_SIO0_R].depth = 1; 306 + set_irq_chip_and_handler(M32R_IRQ_SIO0_R, &m32700ut_irq_type, 307 + handle_level_irq); 292 308 icu_data[M32R_IRQ_SIO0_R].icucr = 0; 293 309 disable_m32700ut_irq(M32R_IRQ_SIO0_R); 294 310 295 311 /* SIO0 : send */ 296 - irq_desc[M32R_IRQ_SIO0_S].status = IRQ_DISABLED; 297 - irq_desc[M32R_IRQ_SIO0_S].chip = &m32700ut_irq_type; 298 - irq_desc[M32R_IRQ_SIO0_S].action = 0; 299 - irq_desc[M32R_IRQ_SIO0_S].depth = 1; 312 + set_irq_chip_and_handler(M32R_IRQ_SIO0_S, &m32700ut_irq_type, 313 + handle_level_irq); 300 314 icu_data[M32R_IRQ_SIO0_S].icucr = 0; 301 315 disable_m32700ut_irq(M32R_IRQ_SIO0_S); 302 316 303 317 /* SIO1 : receive */ 304 - irq_desc[M32R_IRQ_SIO1_R].status = IRQ_DISABLED; 305 - irq_desc[M32R_IRQ_SIO1_R].chip = &m32700ut_irq_type; 306 - irq_desc[M32R_IRQ_SIO1_R].action = 0; 307 - irq_desc[M32R_IRQ_SIO1_R].depth = 1; 318 + set_irq_chip_and_handler(M32R_IRQ_SIO1_R, &m32700ut_irq_type, 319 + handle_level_irq); 308 320 icu_data[M32R_IRQ_SIO1_R].icucr = 0; 309 321 disable_m32700ut_irq(M32R_IRQ_SIO1_R); 310 322 311 323 /* SIO1 : send */ 312 - irq_desc[M32R_IRQ_SIO1_S].status = IRQ_DISABLED; 313 - irq_desc[M32R_IRQ_SIO1_S].chip = &m32700ut_irq_type; 314 - irq_desc[M32R_IRQ_SIO1_S].action = 0; 315 - irq_desc[M32R_IRQ_SIO1_S].depth = 1; 324 + set_irq_chip_and_handler(M32R_IRQ_SIO1_S, &m32700ut_irq_type, 325 + handle_level_irq); 316 326 icu_data[M32R_IRQ_SIO1_S].icucr = 0; 317 327 disable_m32700ut_irq(M32R_IRQ_SIO1_S); 318 328 319 329 /* DMA1 : */ 320 - irq_desc[M32R_IRQ_DMA1].status = IRQ_DISABLED; 321 - irq_desc[M32R_IRQ_DMA1].chip = &m32700ut_irq_type; 322 - irq_desc[M32R_IRQ_DMA1].action = 0; 323 - irq_desc[M32R_IRQ_DMA1].depth = 1; 330 + set_irq_chip_and_handler(M32R_IRQ_DMA1, &m32700ut_irq_type, 331 + handle_level_irq); 324 332 icu_data[M32R_IRQ_DMA1].icucr = 0; 325 333 disable_m32700ut_irq(M32R_IRQ_DMA1); 326 334 327 335 #ifdef CONFIG_SERIAL_M32R_PLDSIO 328 336 /* INT#1: SIO0 Receive on PLD */ 329 - irq_desc[PLD_IRQ_SIO0_RCV].status = IRQ_DISABLED; 330 - irq_desc[PLD_IRQ_SIO0_RCV].chip = &m32700ut_pld_irq_type; 331 - irq_desc[PLD_IRQ_SIO0_RCV].action = 0; 332 - irq_desc[PLD_IRQ_SIO0_RCV].depth = 1; /* disable nested irq */ 337 + set_irq_chip_and_handler(PLD_IRQ_SIO0_RCV, &m32700ut_pld_irq_type, 338 + handle_level_irq); 333 339 pld_icu_data[irq2pldirq(PLD_IRQ_SIO0_RCV)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD03; 334 340 disable_m32700ut_pld_irq(PLD_IRQ_SIO0_RCV); 335 341 336 342 /* INT#1: SIO0 Send on PLD */ 337 - irq_desc[PLD_IRQ_SIO0_SND].status = IRQ_DISABLED; 338 - irq_desc[PLD_IRQ_SIO0_SND].chip = &m32700ut_pld_irq_type; 339 - irq_desc[PLD_IRQ_SIO0_SND].action = 0; 340 - irq_desc[PLD_IRQ_SIO0_SND].depth = 1; /* disable nested irq */ 343 + set_irq_chip_and_handler(PLD_IRQ_SIO0_SND, &m32700ut_pld_irq_type, 344 + handle_level_irq); 341 345 pld_icu_data[irq2pldirq(PLD_IRQ_SIO0_SND)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD03; 342 346 disable_m32700ut_pld_irq(PLD_IRQ_SIO0_SND); 343 347 #endif /* CONFIG_SERIAL_M32R_PLDSIO */ 344 348 345 349 /* INT#1: CFC IREQ on PLD */ 346 - irq_desc[PLD_IRQ_CFIREQ].status = IRQ_DISABLED; 347 - irq_desc[PLD_IRQ_CFIREQ].chip = &m32700ut_pld_irq_type; 348 - irq_desc[PLD_IRQ_CFIREQ].action = 0; 349 - irq_desc[PLD_IRQ_CFIREQ].depth = 1; /* disable nested irq */ 350 + set_irq_chip_and_handler(PLD_IRQ_CFIREQ, &m32700ut_pld_irq_type, 351 + handle_level_irq); 350 352 pld_icu_data[irq2pldirq(PLD_IRQ_CFIREQ)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD01; /* 'L' level sense */ 351 353 disable_m32700ut_pld_irq(PLD_IRQ_CFIREQ); 352 354 353 355 /* INT#1: CFC Insert on PLD */ 354 - irq_desc[PLD_IRQ_CFC_INSERT].status = IRQ_DISABLED; 355 - irq_desc[PLD_IRQ_CFC_INSERT].chip = &m32700ut_pld_irq_type; 356 - irq_desc[PLD_IRQ_CFC_INSERT].action = 0; 357 - irq_desc[PLD_IRQ_CFC_INSERT].depth = 1; /* disable nested irq */ 356 + set_irq_chip_and_handler(PLD_IRQ_CFC_INSERT, &m32700ut_pld_irq_type, 357 + handle_level_irq); 358 358 pld_icu_data[irq2pldirq(PLD_IRQ_CFC_INSERT)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD00; /* 'L' edge sense */ 359 359 disable_m32700ut_pld_irq(PLD_IRQ_CFC_INSERT); 360 360 361 361 /* INT#1: CFC Eject on PLD */ 362 - irq_desc[PLD_IRQ_CFC_EJECT].status = IRQ_DISABLED; 363 - irq_desc[PLD_IRQ_CFC_EJECT].chip = &m32700ut_pld_irq_type; 364 - irq_desc[PLD_IRQ_CFC_EJECT].action = 0; 365 - irq_desc[PLD_IRQ_CFC_EJECT].depth = 1; /* disable nested irq */ 362 + set_irq_chip_and_handler(PLD_IRQ_CFC_EJECT, &m32700ut_pld_irq_type, 363 + handle_level_irq); 366 364 pld_icu_data[irq2pldirq(PLD_IRQ_CFC_EJECT)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD02; /* 'H' edge sense */ 367 365 disable_m32700ut_pld_irq(PLD_IRQ_CFC_EJECT); 368 366 ··· 349 413 350 414 #if defined(CONFIG_USB) 351 415 outw(USBCR_OTGS, USBCR); /* USBCR: non-OTG */ 416 + set_irq_chip_and_handler(M32700UT_LCD_IRQ_USB_INT1, 417 + &m32700ut_lcdpld_irq_type, handle_level_irq); 352 418 353 - irq_desc[M32700UT_LCD_IRQ_USB_INT1].status = IRQ_DISABLED; 354 - irq_desc[M32700UT_LCD_IRQ_USB_INT1].chip = &m32700ut_lcdpld_irq_type; 355 - irq_desc[M32700UT_LCD_IRQ_USB_INT1].action = 0; 356 - irq_desc[M32700UT_LCD_IRQ_USB_INT1].depth = 1; 357 - lcdpld_icu_data[irq2lcdpldirq(M32700UT_LCD_IRQ_USB_INT1)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD01; /* "L" level sense */ 358 - disable_m32700ut_lcdpld_irq(M32700UT_LCD_IRQ_USB_INT1); 419 + lcdpld_icu_data[irq2lcdpldirq(M32700UT_LCD_IRQ_USB_INT1)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD01; /* "L" level sense */ 420 + disable_m32700ut_lcdpld_irq(M32700UT_LCD_IRQ_USB_INT1); 359 421 #endif 360 422 /* 361 423 * INT2# is used for BAT, USB, AUDIO ··· 366 432 /* 367 433 * INT3# is used for AR 368 434 */ 369 - irq_desc[M32R_IRQ_INT3].status = IRQ_DISABLED; 370 - irq_desc[M32R_IRQ_INT3].chip = &m32700ut_irq_type; 371 - irq_desc[M32R_IRQ_INT3].action = 0; 372 - irq_desc[M32R_IRQ_INT3].depth = 1; 435 + set_irq_chip_and_handler(M32R_IRQ_INT3, &m32700ut_irq_type, 436 + handle_level_irq); 373 437 icu_data[M32R_IRQ_INT3].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10; 374 438 disable_m32700ut_irq(M32R_IRQ_INT3); 375 439 #endif /* CONFIG_VIDEO_M32R_AR */
+26 -52
arch/m32r/platforms/mappi/setup.c
··· 38 38 outl(data, port); 39 39 } 40 40 41 - static void mask_and_ack_mappi(unsigned int irq) 41 + static void mask_mappi(struct irq_data *data) 42 42 { 43 - disable_mappi_irq(irq); 43 + disable_mappi_irq(data->irq); 44 44 } 45 45 46 - static void end_mappi_irq(unsigned int irq) 46 + static void unmask_mappi(struct irq_data *data) 47 47 { 48 - if (!(irq_desc[irq].status & (IRQ_DISABLED | IRQ_INPROGRESS))) 49 - enable_mappi_irq(irq); 48 + enable_mappi_irq(data->irq); 50 49 } 51 50 52 - static unsigned int startup_mappi_irq(unsigned int irq) 53 - { 54 - enable_mappi_irq(irq); 55 - return (0); 56 - } 57 - 58 - static void shutdown_mappi_irq(unsigned int irq) 51 + static void shutdown_mappi(struct irq_data *data) 59 52 { 60 53 unsigned long port; 61 54 62 - port = irq2port(irq); 55 + port = irq2port(data->irq); 63 56 outl(M32R_ICUCR_ILEVEL7, port); 64 57 } 65 58 66 59 static struct irq_chip mappi_irq_type = 67 60 { 68 - .name = "MAPPI-IRQ", 69 - .startup = startup_mappi_irq, 70 - .shutdown = shutdown_mappi_irq, 71 - .enable = enable_mappi_irq, 72 - .disable = disable_mappi_irq, 73 - .ack = mask_and_ack_mappi, 74 - .end = end_mappi_irq 61 + .name = "MAPPI-IRQ", 62 + .irq_shutdown = shutdown_mappi, 63 + .irq_mask = mask_mappi, 64 + .irq_unmask = unmask_mappi, 75 65 }; 76 66 77 67 void __init init_IRQ(void) ··· 75 85 76 86 #ifdef CONFIG_NE2000 77 87 /* INT0 : LAN controller (RTL8019AS) */ 78 - irq_desc[M32R_IRQ_INT0].status = IRQ_DISABLED; 79 - irq_desc[M32R_IRQ_INT0].chip = &mappi_irq_type; 80 - irq_desc[M32R_IRQ_INT0].action = NULL; 81 - irq_desc[M32R_IRQ_INT0].depth = 1; 88 + set_irq_chip_and_handler(M32R_IRQ_INT0, &mappi_irq_type, 89 + handle_level_irq); 82 90 icu_data[M32R_IRQ_INT0].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD11; 83 91 disable_mappi_irq(M32R_IRQ_INT0); 84 92 #endif /* CONFIG_M32R_NE2000 */ 85 93 86 94 /* MFT2 : system timer */ 87 - irq_desc[M32R_IRQ_MFT2].status = IRQ_DISABLED; 88 - irq_desc[M32R_IRQ_MFT2].chip = &mappi_irq_type; 89 - irq_desc[M32R_IRQ_MFT2].action = NULL; 90 - irq_desc[M32R_IRQ_MFT2].depth = 1; 95 + set_irq_chip_and_handler(M32R_IRQ_MFT2, &mappi_irq_type, 96 + handle_level_irq); 91 97 icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN; 92 98 disable_mappi_irq(M32R_IRQ_MFT2); 93 99 94 100 #ifdef CONFIG_SERIAL_M32R_SIO 95 101 /* SIO0_R : uart receive data */ 96 - irq_desc[M32R_IRQ_SIO0_R].status = IRQ_DISABLED; 97 - irq_desc[M32R_IRQ_SIO0_R].chip = &mappi_irq_type; 98 - irq_desc[M32R_IRQ_SIO0_R].action = NULL; 99 - irq_desc[M32R_IRQ_SIO0_R].depth = 1; 102 + set_irq_chip_and_handler(M32R_IRQ_SIO0_R, &mappi_irq_type, 103 + handle_level_irq); 100 104 icu_data[M32R_IRQ_SIO0_R].icucr = 0; 101 105 disable_mappi_irq(M32R_IRQ_SIO0_R); 102 106 103 107 /* SIO0_S : uart send data */ 104 - irq_desc[M32R_IRQ_SIO0_S].status = IRQ_DISABLED; 105 - irq_desc[M32R_IRQ_SIO0_S].chip = &mappi_irq_type; 106 - irq_desc[M32R_IRQ_SIO0_S].action = NULL; 107 - irq_desc[M32R_IRQ_SIO0_S].depth = 1; 108 + set_irq_chip_and_handler(M32R_IRQ_SIO0_S, &mappi_irq_type, 109 + handle_level_irq); 108 110 icu_data[M32R_IRQ_SIO0_S].icucr = 0; 109 111 disable_mappi_irq(M32R_IRQ_SIO0_S); 110 112 111 113 /* SIO1_R : uart receive data */ 112 - irq_desc[M32R_IRQ_SIO1_R].status = IRQ_DISABLED; 113 - irq_desc[M32R_IRQ_SIO1_R].chip = &mappi_irq_type; 114 - irq_desc[M32R_IRQ_SIO1_R].action = NULL; 115 - irq_desc[M32R_IRQ_SIO1_R].depth = 1; 114 + set_irq_chip_and_handler(M32R_IRQ_SIO1_R, &mappi_irq_type, 115 + handle_level_irq); 116 116 icu_data[M32R_IRQ_SIO1_R].icucr = 0; 117 117 disable_mappi_irq(M32R_IRQ_SIO1_R); 118 118 119 119 /* SIO1_S : uart send data */ 120 - irq_desc[M32R_IRQ_SIO1_S].status = IRQ_DISABLED; 121 - irq_desc[M32R_IRQ_SIO1_S].chip = &mappi_irq_type; 122 - irq_desc[M32R_IRQ_SIO1_S].action = NULL; 123 - irq_desc[M32R_IRQ_SIO1_S].depth = 1; 120 + set_irq_chip_and_handler(M32R_IRQ_SIO1_S, &mappi_irq_type, 121 + handle_level_irq); 124 122 icu_data[M32R_IRQ_SIO1_S].icucr = 0; 125 123 disable_mappi_irq(M32R_IRQ_SIO1_S); 126 124 #endif /* CONFIG_SERIAL_M32R_SIO */ 127 125 128 126 #if defined(CONFIG_M32R_PCC) 129 127 /* INT1 : pccard0 interrupt */ 130 - irq_desc[M32R_IRQ_INT1].status = IRQ_DISABLED; 131 - irq_desc[M32R_IRQ_INT1].chip = &mappi_irq_type; 132 - irq_desc[M32R_IRQ_INT1].action = NULL; 133 - irq_desc[M32R_IRQ_INT1].depth = 1; 128 + set_irq_chip_and_handler(M32R_IRQ_INT1, &mappi_irq_type, 129 + handle_level_irq); 134 130 icu_data[M32R_IRQ_INT1].icucr = M32R_ICUCR_IEN | M32R_ICUCR_ISMOD00; 135 131 disable_mappi_irq(M32R_IRQ_INT1); 136 132 137 133 /* INT2 : pccard1 interrupt */ 138 - irq_desc[M32R_IRQ_INT2].status = IRQ_DISABLED; 139 - irq_desc[M32R_IRQ_INT2].chip = &mappi_irq_type; 140 - irq_desc[M32R_IRQ_INT2].action = NULL; 141 - irq_desc[M32R_IRQ_INT2].depth = 1; 134 + set_irq_chip_and_handler(M32R_IRQ_INT2, &mappi_irq_type, 135 + handle_level_irq); 142 136 icu_data[M32R_IRQ_INT2].icucr = M32R_ICUCR_IEN | M32R_ICUCR_ISMOD00; 143 137 disable_mappi_irq(M32R_IRQ_INT2); 144 138 #endif /* CONFIG_M32RPCC */
+30 -59
arch/m32r/platforms/mappi2/setup.c
··· 46 46 outl(data, port); 47 47 } 48 48 49 - static void mask_and_ack_mappi2(unsigned int irq) 49 + static void mask_mappi2(struct irq_data *data) 50 50 { 51 - disable_mappi2_irq(irq); 51 + disable_mappi2_irq(data->irq); 52 52 } 53 53 54 - static void end_mappi2_irq(unsigned int irq) 54 + static void unmask_mappi2(struct irq_data *data) 55 55 { 56 - enable_mappi2_irq(irq); 56 + enable_mappi2_irq(data->irq); 57 57 } 58 58 59 - static unsigned int startup_mappi2_irq(unsigned int irq) 60 - { 61 - enable_mappi2_irq(irq); 62 - return (0); 63 - } 64 - 65 - static void shutdown_mappi2_irq(unsigned int irq) 59 + static void shutdown_mappi2(struct irq_data *data) 66 60 { 67 61 unsigned long port; 68 62 69 - port = irq2port(irq); 63 + port = irq2port(data->irq); 70 64 outl(M32R_ICUCR_ILEVEL7, port); 71 65 } 72 66 73 67 static struct irq_chip mappi2_irq_type = 74 68 { 75 - .name = "MAPPI2-IRQ", 76 - .startup = startup_mappi2_irq, 77 - .shutdown = shutdown_mappi2_irq, 78 - .enable = enable_mappi2_irq, 79 - .disable = disable_mappi2_irq, 80 - .ack = mask_and_ack_mappi2, 81 - .end = end_mappi2_irq 69 + .name = "MAPPI2-IRQ", 70 + .irq_shutdown = shutdown_mappi2, 71 + .irq_mask = mask_mappi2, 72 + .irq_unmask = unmask_mappi2, 82 73 }; 83 74 84 75 void __init init_IRQ(void) 85 76 { 86 77 #if defined(CONFIG_SMC91X) 87 78 /* INT0 : LAN controller (SMC91111) */ 88 - irq_desc[M32R_IRQ_INT0].status = IRQ_DISABLED; 89 - irq_desc[M32R_IRQ_INT0].chip = &mappi2_irq_type; 90 - irq_desc[M32R_IRQ_INT0].action = 0; 91 - irq_desc[M32R_IRQ_INT0].depth = 1; 79 + set_irq_chip_and_handler(M32R_IRQ_INT0, &mappi2_irq_type, 80 + handle_level_irq); 92 81 icu_data[M32R_IRQ_INT0].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10; 93 82 disable_mappi2_irq(M32R_IRQ_INT0); 94 83 #endif /* CONFIG_SMC91X */ 95 84 96 85 /* MFT2 : system timer */ 97 - irq_desc[M32R_IRQ_MFT2].status = IRQ_DISABLED; 98 - irq_desc[M32R_IRQ_MFT2].chip = &mappi2_irq_type; 99 - irq_desc[M32R_IRQ_MFT2].action = 0; 100 - irq_desc[M32R_IRQ_MFT2].depth = 1; 86 + set_irq_chip_and_handler(M32R_IRQ_MFT2, &mappi2_irq_type, 87 + handle_level_irq); 101 88 icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN; 102 89 disable_mappi2_irq(M32R_IRQ_MFT2); 103 90 104 91 #ifdef CONFIG_SERIAL_M32R_SIO 105 92 /* SIO0_R : uart receive data */ 106 - irq_desc[M32R_IRQ_SIO0_R].status = IRQ_DISABLED; 107 - irq_desc[M32R_IRQ_SIO0_R].chip = &mappi2_irq_type; 108 - irq_desc[M32R_IRQ_SIO0_R].action = 0; 109 - irq_desc[M32R_IRQ_SIO0_R].depth = 1; 93 + set_irq_chip_and_handler(M32R_IRQ_SIO0_R, &mappi2_irq_type, 94 + handle_level_irq); 110 95 icu_data[M32R_IRQ_SIO0_R].icucr = 0; 111 96 disable_mappi2_irq(M32R_IRQ_SIO0_R); 112 97 113 98 /* SIO0_S : uart send data */ 114 - irq_desc[M32R_IRQ_SIO0_S].status = IRQ_DISABLED; 115 - irq_desc[M32R_IRQ_SIO0_S].chip = &mappi2_irq_type; 116 - irq_desc[M32R_IRQ_SIO0_S].action = 0; 117 - irq_desc[M32R_IRQ_SIO0_S].depth = 1; 99 + set_irq_chip_and_handler(M32R_IRQ_SIO0_S, &mappi2_irq_type, 100 + handle_level_irq); 118 101 icu_data[M32R_IRQ_SIO0_S].icucr = 0; 119 102 disable_mappi2_irq(M32R_IRQ_SIO0_S); 120 103 /* SIO1_R : uart receive data */ 121 - irq_desc[M32R_IRQ_SIO1_R].status = IRQ_DISABLED; 122 - irq_desc[M32R_IRQ_SIO1_R].chip = &mappi2_irq_type; 123 - irq_desc[M32R_IRQ_SIO1_R].action = 0; 124 - irq_desc[M32R_IRQ_SIO1_R].depth = 1; 104 + set_irq_chip_and_handler(M32R_IRQ_SIO1_R, &mappi2_irq_type, 105 + handle_level_irq); 125 106 icu_data[M32R_IRQ_SIO1_R].icucr = 0; 126 107 disable_mappi2_irq(M32R_IRQ_SIO1_R); 127 108 128 109 /* SIO1_S : uart send data */ 129 - irq_desc[M32R_IRQ_SIO1_S].status = IRQ_DISABLED; 130 - irq_desc[M32R_IRQ_SIO1_S].chip = &mappi2_irq_type; 131 - irq_desc[M32R_IRQ_SIO1_S].action = 0; 132 - irq_desc[M32R_IRQ_SIO1_S].depth = 1; 110 + set_irq_chip_and_handler(M32R_IRQ_SIO1_S, &mappi2_irq_type, 111 + handle_level_irq); 133 112 icu_data[M32R_IRQ_SIO1_S].icucr = 0; 134 113 disable_mappi2_irq(M32R_IRQ_SIO1_S); 135 114 #endif /* CONFIG_M32R_USE_DBG_CONSOLE */ 136 115 137 116 #if defined(CONFIG_USB) 138 117 /* INT1 : USB Host controller interrupt */ 139 - irq_desc[M32R_IRQ_INT1].status = IRQ_DISABLED; 140 - irq_desc[M32R_IRQ_INT1].chip = &mappi2_irq_type; 141 - irq_desc[M32R_IRQ_INT1].action = 0; 142 - irq_desc[M32R_IRQ_INT1].depth = 1; 118 + set_irq_chip_and_handler(M32R_IRQ_INT1, &mappi2_irq_type, 119 + handle_level_irq); 143 120 icu_data[M32R_IRQ_INT1].icucr = M32R_ICUCR_ISMOD01; 144 121 disable_mappi2_irq(M32R_IRQ_INT1); 145 122 #endif /* CONFIG_USB */ 146 123 147 124 /* ICUCR40: CFC IREQ */ 148 - irq_desc[PLD_IRQ_CFIREQ].status = IRQ_DISABLED; 149 - irq_desc[PLD_IRQ_CFIREQ].chip = &mappi2_irq_type; 150 - irq_desc[PLD_IRQ_CFIREQ].action = 0; 151 - irq_desc[PLD_IRQ_CFIREQ].depth = 1; /* disable nested irq */ 125 + set_irq_chip_and_handler(PLD_IRQ_CFIREQ, &mappi2_irq_type, 126 + handle_level_irq); 152 127 icu_data[PLD_IRQ_CFIREQ].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD01; 153 128 disable_mappi2_irq(PLD_IRQ_CFIREQ); 154 129 155 130 #if defined(CONFIG_M32R_CFC) 156 131 /* ICUCR41: CFC Insert */ 157 - irq_desc[PLD_IRQ_CFC_INSERT].status = IRQ_DISABLED; 158 - irq_desc[PLD_IRQ_CFC_INSERT].chip = &mappi2_irq_type; 159 - irq_desc[PLD_IRQ_CFC_INSERT].action = 0; 160 - irq_desc[PLD_IRQ_CFC_INSERT].depth = 1; /* disable nested irq */ 132 + set_irq_chip_and_handler(PLD_IRQ_CFC_INSERT, &mappi2_irq_type, 133 + handle_level_irq); 161 134 icu_data[PLD_IRQ_CFC_INSERT].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD00; 162 135 disable_mappi2_irq(PLD_IRQ_CFC_INSERT); 163 136 164 137 /* ICUCR42: CFC Eject */ 165 - irq_desc[PLD_IRQ_CFC_EJECT].status = IRQ_DISABLED; 166 - irq_desc[PLD_IRQ_CFC_EJECT].chip = &mappi2_irq_type; 167 - irq_desc[PLD_IRQ_CFC_EJECT].action = 0; 168 - irq_desc[PLD_IRQ_CFC_EJECT].depth = 1; /* disable nested irq */ 138 + set_irq_chip_and_handler(PLD_IRQ_CFC_EJECT, &mappi2_irq_type, 139 + handle_level_irq); 169 140 icu_data[PLD_IRQ_CFC_EJECT].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10; 170 141 disable_mappi2_irq(PLD_IRQ_CFC_EJECT); 171 142 #endif /* CONFIG_MAPPI2_CFC */
+31 -61
arch/m32r/platforms/mappi3/setup.c
··· 46 46 outl(data, port); 47 47 } 48 48 49 - static void mask_and_ack_mappi3(unsigned int irq) 49 + static void mask_mappi3(struct irq_data *data) 50 50 { 51 - disable_mappi3_irq(irq); 51 + disable_mappi3_irq(data->irq); 52 52 } 53 53 54 - static void end_mappi3_irq(unsigned int irq) 54 + static void unmask_mappi3(struct irq_data *data) 55 55 { 56 - enable_mappi3_irq(irq); 56 + enable_mappi3_irq(data->irq); 57 57 } 58 58 59 - static unsigned int startup_mappi3_irq(unsigned int irq) 60 - { 61 - enable_mappi3_irq(irq); 62 - return (0); 63 - } 64 - 65 - static void shutdown_mappi3_irq(unsigned int irq) 59 + static void shutdown_mappi3(struct irq_data *data) 66 60 { 67 61 unsigned long port; 68 62 69 - port = irq2port(irq); 63 + port = irq2port(data->irq); 70 64 outl(M32R_ICUCR_ILEVEL7, port); 71 65 } 72 66 73 - static struct irq_chip mappi3_irq_type = 74 - { 75 - .name = "MAPPI3-IRQ", 76 - .startup = startup_mappi3_irq, 77 - .shutdown = shutdown_mappi3_irq, 78 - .enable = enable_mappi3_irq, 79 - .disable = disable_mappi3_irq, 80 - .ack = mask_and_ack_mappi3, 81 - .end = end_mappi3_irq 67 + static struct irq_chip mappi3_irq_type = { 68 + .name = "MAPPI3-IRQ", 69 + .irq_shutdown = shutdown_mappi3, 70 + .irq_mask = mask_mappi3, 71 + .irq_unmask = unmask_mappi3, 82 72 }; 83 73 84 74 void __init init_IRQ(void) 85 75 { 86 76 #if defined(CONFIG_SMC91X) 87 77 /* INT0 : LAN controller (SMC91111) */ 88 - irq_desc[M32R_IRQ_INT0].status = IRQ_DISABLED; 89 - irq_desc[M32R_IRQ_INT0].chip = &mappi3_irq_type; 90 - irq_desc[M32R_IRQ_INT0].action = 0; 91 - irq_desc[M32R_IRQ_INT0].depth = 1; 78 + set_irq_chip_and_handler(M32R_IRQ_INT0, &mappi3_irq_type, 79 + handle_level_irq); 92 80 icu_data[M32R_IRQ_INT0].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10; 93 81 disable_mappi3_irq(M32R_IRQ_INT0); 94 82 #endif /* CONFIG_SMC91X */ 95 83 96 84 /* MFT2 : system timer */ 97 - irq_desc[M32R_IRQ_MFT2].status = IRQ_DISABLED; 98 - irq_desc[M32R_IRQ_MFT2].chip = &mappi3_irq_type; 99 - irq_desc[M32R_IRQ_MFT2].action = 0; 100 - irq_desc[M32R_IRQ_MFT2].depth = 1; 85 + set_irq_chip_and_handler(M32R_IRQ_MFT2, &mappi3_irq_type, 86 + handle_level_irq); 101 87 icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN; 102 88 disable_mappi3_irq(M32R_IRQ_MFT2); 103 89 104 90 #ifdef CONFIG_SERIAL_M32R_SIO 105 91 /* SIO0_R : uart receive data */ 106 - irq_desc[M32R_IRQ_SIO0_R].status = IRQ_DISABLED; 107 - irq_desc[M32R_IRQ_SIO0_R].chip = &mappi3_irq_type; 108 - irq_desc[M32R_IRQ_SIO0_R].action = 0; 109 - irq_desc[M32R_IRQ_SIO0_R].depth = 1; 92 + set_irq_chip_and_handler(M32R_IRQ_SIO0_R, &mappi3_irq_type, 93 + handle_level_irq); 110 94 icu_data[M32R_IRQ_SIO0_R].icucr = 0; 111 95 disable_mappi3_irq(M32R_IRQ_SIO0_R); 112 96 113 97 /* SIO0_S : uart send data */ 114 - irq_desc[M32R_IRQ_SIO0_S].status = IRQ_DISABLED; 115 - irq_desc[M32R_IRQ_SIO0_S].chip = &mappi3_irq_type; 116 - irq_desc[M32R_IRQ_SIO0_S].action = 0; 117 - irq_desc[M32R_IRQ_SIO0_S].depth = 1; 98 + set_irq_chip_and_handler(M32R_IRQ_SIO0_S, &mappi3_irq_type, 99 + handle_level_irq); 118 100 icu_data[M32R_IRQ_SIO0_S].icucr = 0; 119 101 disable_mappi3_irq(M32R_IRQ_SIO0_S); 120 102 /* SIO1_R : uart receive data */ 121 - irq_desc[M32R_IRQ_SIO1_R].status = IRQ_DISABLED; 122 - irq_desc[M32R_IRQ_SIO1_R].chip = &mappi3_irq_type; 123 - irq_desc[M32R_IRQ_SIO1_R].action = 0; 124 - irq_desc[M32R_IRQ_SIO1_R].depth = 1; 103 + set_irq_chip_and_handler(M32R_IRQ_SIO1_R, &mappi3_irq_type, 104 + handle_level_irq); 125 105 icu_data[M32R_IRQ_SIO1_R].icucr = 0; 126 106 disable_mappi3_irq(M32R_IRQ_SIO1_R); 127 107 128 108 /* SIO1_S : uart send data */ 129 - irq_desc[M32R_IRQ_SIO1_S].status = IRQ_DISABLED; 130 - irq_desc[M32R_IRQ_SIO1_S].chip = &mappi3_irq_type; 131 - irq_desc[M32R_IRQ_SIO1_S].action = 0; 132 - irq_desc[M32R_IRQ_SIO1_S].depth = 1; 109 + set_irq_chip_and_handler(M32R_IRQ_SIO1_S, &mappi3_irq_type, 110 + handle_level_irq); 133 111 icu_data[M32R_IRQ_SIO1_S].icucr = 0; 134 112 disable_mappi3_irq(M32R_IRQ_SIO1_S); 135 113 #endif /* CONFIG_M32R_USE_DBG_CONSOLE */ 136 114 137 115 #if defined(CONFIG_USB) 138 116 /* INT1 : USB Host controller interrupt */ 139 - irq_desc[M32R_IRQ_INT1].status = IRQ_DISABLED; 140 - irq_desc[M32R_IRQ_INT1].chip = &mappi3_irq_type; 141 - irq_desc[M32R_IRQ_INT1].action = 0; 142 - irq_desc[M32R_IRQ_INT1].depth = 1; 117 + set_irq_chip_and_handler(M32R_IRQ_INT1, &mappi3_irq_type, 118 + handle_level_irq); 143 119 icu_data[M32R_IRQ_INT1].icucr = M32R_ICUCR_ISMOD01; 144 120 disable_mappi3_irq(M32R_IRQ_INT1); 145 121 #endif /* CONFIG_USB */ 146 122 147 123 /* CFC IREQ */ 148 - irq_desc[PLD_IRQ_CFIREQ].status = IRQ_DISABLED; 149 - irq_desc[PLD_IRQ_CFIREQ].chip = &mappi3_irq_type; 150 - irq_desc[PLD_IRQ_CFIREQ].action = 0; 151 - irq_desc[PLD_IRQ_CFIREQ].depth = 1; /* disable nested irq */ 124 + set_irq_chip_and_handler(PLD_IRQ_CFIREQ, &mappi3_irq_type, 125 + handle_level_irq); 152 126 icu_data[PLD_IRQ_CFIREQ].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD01; 153 127 disable_mappi3_irq(PLD_IRQ_CFIREQ); 154 128 155 129 #if defined(CONFIG_M32R_CFC) 156 130 /* ICUCR41: CFC Insert & eject */ 157 - irq_desc[PLD_IRQ_CFC_INSERT].status = IRQ_DISABLED; 158 - irq_desc[PLD_IRQ_CFC_INSERT].chip = &mappi3_irq_type; 159 - irq_desc[PLD_IRQ_CFC_INSERT].action = 0; 160 - irq_desc[PLD_IRQ_CFC_INSERT].depth = 1; /* disable nested irq */ 131 + set_irq_chip_and_handler(PLD_IRQ_CFC_INSERT, &mappi3_irq_type, 132 + handle_level_irq); 161 133 icu_data[PLD_IRQ_CFC_INSERT].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD00; 162 134 disable_mappi3_irq(PLD_IRQ_CFC_INSERT); 163 135 164 136 #endif /* CONFIG_M32R_CFC */ 165 137 166 138 /* IDE IREQ */ 167 - irq_desc[PLD_IRQ_IDEIREQ].status = IRQ_DISABLED; 168 - irq_desc[PLD_IRQ_IDEIREQ].chip = &mappi3_irq_type; 169 - irq_desc[PLD_IRQ_IDEIREQ].action = 0; 170 - irq_desc[PLD_IRQ_IDEIREQ].depth = 1; /* disable nested irq */ 139 + set_irq_chip_and_handler(PLD_IRQ_IDEIREQ, &mappi3_irq_type, 140 + handle_level_irq); 171 141 icu_data[PLD_IRQ_IDEIREQ].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10; 172 142 disable_mappi3_irq(PLD_IRQ_IDEIREQ); 173 143
+22 -43
arch/m32r/platforms/oaks32r/setup.c
··· 37 37 outl(data, port); 38 38 } 39 39 40 - static void mask_and_ack_mappi(unsigned int irq) 40 + static void mask_oaks32r(struct irq_data *data) 41 41 { 42 - disable_oaks32r_irq(irq); 42 + disable_oaks32r_irq(data->irq); 43 43 } 44 44 45 - static void end_oaks32r_irq(unsigned int irq) 45 + static void unmask_oaks32r(struct irq_data *data) 46 46 { 47 - enable_oaks32r_irq(irq); 47 + enable_oaks32r_irq(data->irq); 48 48 } 49 49 50 - static unsigned int startup_oaks32r_irq(unsigned int irq) 51 - { 52 - enable_oaks32r_irq(irq); 53 - return (0); 54 - } 55 - 56 - static void shutdown_oaks32r_irq(unsigned int irq) 50 + static void shutdown_oaks32r(struct irq_data *data) 57 51 { 58 52 unsigned long port; 59 53 60 - port = irq2port(irq); 54 + port = irq2port(data->irq); 61 55 outl(M32R_ICUCR_ILEVEL7, port); 62 56 } 63 57 64 58 static struct irq_chip oaks32r_irq_type = 65 59 { 66 - .name = "OAKS32R-IRQ", 67 - .startup = startup_oaks32r_irq, 68 - .shutdown = shutdown_oaks32r_irq, 69 - .enable = enable_oaks32r_irq, 70 - .disable = disable_oaks32r_irq, 71 - .ack = mask_and_ack_mappi, 72 - .end = end_oaks32r_irq 60 + .name = "OAKS32R-IRQ", 61 + .irq_shutdown = shutdown_oaks32r, 62 + .irq_mask = mask_oaks32r, 63 + .irq_unmask = unmask_oaks32r, 73 64 }; 74 65 75 66 void __init init_IRQ(void) ··· 74 83 75 84 #ifdef CONFIG_NE2000 76 85 /* INT3 : LAN controller (RTL8019AS) */ 77 - irq_desc[M32R_IRQ_INT3].status = IRQ_DISABLED; 78 - irq_desc[M32R_IRQ_INT3].chip = &oaks32r_irq_type; 79 - irq_desc[M32R_IRQ_INT3].action = 0; 80 - irq_desc[M32R_IRQ_INT3].depth = 1; 86 + set_irq_chip_and_handler(M32R_IRQ_INT3, &oaks32r_irq_type, 87 + handle_level_irq); 81 88 icu_data[M32R_IRQ_INT3].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10; 82 89 disable_oaks32r_irq(M32R_IRQ_INT3); 83 90 #endif /* CONFIG_M32R_NE2000 */ 84 91 85 92 /* MFT2 : system timer */ 86 - irq_desc[M32R_IRQ_MFT2].status = IRQ_DISABLED; 87 - irq_desc[M32R_IRQ_MFT2].chip = &oaks32r_irq_type; 88 - irq_desc[M32R_IRQ_MFT2].action = 0; 89 - irq_desc[M32R_IRQ_MFT2].depth = 1; 93 + set_irq_chip_and_handler(M32R_IRQ_MFT2, &oaks32r_irq_type, 94 + handle_level_irq); 90 95 icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN; 91 96 disable_oaks32r_irq(M32R_IRQ_MFT2); 92 97 93 98 #ifdef CONFIG_SERIAL_M32R_SIO 94 99 /* SIO0_R : uart receive data */ 95 - irq_desc[M32R_IRQ_SIO0_R].status = IRQ_DISABLED; 96 - irq_desc[M32R_IRQ_SIO0_R].chip = &oaks32r_irq_type; 97 - irq_desc[M32R_IRQ_SIO0_R].action = 0; 98 - irq_desc[M32R_IRQ_SIO0_R].depth = 1; 100 + set_irq_chip_and_handler(M32R_IRQ_SIO0_R, &oaks32r_irq_type, 101 + handle_level_irq); 99 102 icu_data[M32R_IRQ_SIO0_R].icucr = 0; 100 103 disable_oaks32r_irq(M32R_IRQ_SIO0_R); 101 104 102 105 /* SIO0_S : uart send data */ 103 - irq_desc[M32R_IRQ_SIO0_S].status = IRQ_DISABLED; 104 - irq_desc[M32R_IRQ_SIO0_S].chip = &oaks32r_irq_type; 105 - irq_desc[M32R_IRQ_SIO0_S].action = 0; 106 - irq_desc[M32R_IRQ_SIO0_S].depth = 1; 106 + set_irq_chip_and_handler(M32R_IRQ_SIO0_S, &oaks32r_irq_type, 107 + handle_level_irq); 107 108 icu_data[M32R_IRQ_SIO0_S].icucr = 0; 108 109 disable_oaks32r_irq(M32R_IRQ_SIO0_S); 109 110 110 111 /* SIO1_R : uart receive data */ 111 - irq_desc[M32R_IRQ_SIO1_R].status = IRQ_DISABLED; 112 - irq_desc[M32R_IRQ_SIO1_R].chip = &oaks32r_irq_type; 113 - irq_desc[M32R_IRQ_SIO1_R].action = 0; 114 - irq_desc[M32R_IRQ_SIO1_R].depth = 1; 112 + set_irq_chip_and_handler(M32R_IRQ_SIO1_R, &oaks32r_irq_type, 113 + handle_level_irq); 115 114 icu_data[M32R_IRQ_SIO1_R].icucr = 0; 116 115 disable_oaks32r_irq(M32R_IRQ_SIO1_R); 117 116 118 117 /* SIO1_S : uart send data */ 119 - irq_desc[M32R_IRQ_SIO1_S].status = IRQ_DISABLED; 120 - irq_desc[M32R_IRQ_SIO1_S].chip = &oaks32r_irq_type; 121 - irq_desc[M32R_IRQ_SIO1_S].action = 0; 122 - irq_desc[M32R_IRQ_SIO1_S].depth = 1; 118 + set_irq_chip_and_handler(M32R_IRQ_SIO1_S, &oaks32r_irq_type, 119 + handle_level_irq); 123 120 icu_data[M32R_IRQ_SIO1_S].icucr = 0; 124 121 disable_oaks32r_irq(M32R_IRQ_SIO1_S); 125 122 #endif /* CONFIG_SERIAL_M32R_SIO */
+75 -145
arch/m32r/platforms/opsput/setup.c
··· 46 46 outl(data, port); 47 47 } 48 48 49 - static void mask_and_ack_opsput(unsigned int irq) 49 + static void mask_opsput(struct irq_data *data) 50 50 { 51 - disable_opsput_irq(irq); 51 + disable_opsput_irq(data->irq); 52 52 } 53 53 54 - static void end_opsput_irq(unsigned int irq) 54 + static void unmask_opsput(struct irq_data *data) 55 55 { 56 - enable_opsput_irq(irq); 56 + enable_opsput_irq(data->irq); 57 57 } 58 58 59 - static unsigned int startup_opsput_irq(unsigned int irq) 60 - { 61 - enable_opsput_irq(irq); 62 - return (0); 63 - } 64 - 65 - static void shutdown_opsput_irq(unsigned int irq) 59 + static void shutdown_opsput(struct irq_data *data) 66 60 { 67 61 unsigned long port; 68 62 69 - port = irq2port(irq); 63 + port = irq2port(data->irq); 70 64 outl(M32R_ICUCR_ILEVEL7, port); 71 65 } 72 66 73 67 static struct irq_chip opsput_irq_type = 74 68 { 75 - .name = "OPSPUT-IRQ", 76 - .startup = startup_opsput_irq, 77 - .shutdown = shutdown_opsput_irq, 78 - .enable = enable_opsput_irq, 79 - .disable = disable_opsput_irq, 80 - .ack = mask_and_ack_opsput, 81 - .end = end_opsput_irq 69 + .name = "OPSPUT-IRQ", 70 + .irq_shutdown = shutdown_opsput, 71 + .irq_mask = mask_opsput, 72 + .irq_unmask = unmask_opsput, 82 73 }; 83 74 84 75 /* ··· 91 100 unsigned int pldirq; 92 101 93 102 pldirq = irq2pldirq(irq); 94 - // disable_opsput_irq(M32R_IRQ_INT1); 95 103 port = pldirq2port(pldirq); 96 104 data = pld_icu_data[pldirq].icucr|PLD_ICUCR_ILEVEL7; 97 105 outw(data, port); ··· 102 112 unsigned int pldirq; 103 113 104 114 pldirq = irq2pldirq(irq); 105 - // enable_opsput_irq(M32R_IRQ_INT1); 106 115 port = pldirq2port(pldirq); 107 116 data = pld_icu_data[pldirq].icucr|PLD_ICUCR_IEN|PLD_ICUCR_ILEVEL6; 108 117 outw(data, port); 109 118 } 110 119 111 - static void mask_and_ack_opsput_pld(unsigned int irq) 120 + static void mask_opsput_pld(struct irq_data *data) 112 121 { 113 - disable_opsput_pld_irq(irq); 114 - // mask_and_ack_opsput(M32R_IRQ_INT1); 122 + disable_opsput_pld_irq(data->irq); 115 123 } 116 124 117 - static void end_opsput_pld_irq(unsigned int irq) 125 + static void unmask_opsput_pld(struct irq_data *data) 118 126 { 119 - enable_opsput_pld_irq(irq); 120 - end_opsput_irq(M32R_IRQ_INT1); 127 + enable_opsput_pld_irq(data->irq); 128 + enable_opsput_irq(M32R_IRQ_INT1); 121 129 } 122 130 123 - static unsigned int startup_opsput_pld_irq(unsigned int irq) 124 - { 125 - enable_opsput_pld_irq(irq); 126 - return (0); 127 - } 128 - 129 - static void shutdown_opsput_pld_irq(unsigned int irq) 131 + static void shutdown_opsput_pld(struct irq_data *data) 130 132 { 131 133 unsigned long port; 132 134 unsigned int pldirq; 133 135 134 - pldirq = irq2pldirq(irq); 135 - // shutdown_opsput_irq(M32R_IRQ_INT1); 136 + pldirq = irq2pldirq(data->irq); 136 137 port = pldirq2port(pldirq); 137 138 outw(PLD_ICUCR_ILEVEL7, port); 138 139 } 139 140 140 141 static struct irq_chip opsput_pld_irq_type = 141 142 { 142 - .name = "OPSPUT-PLD-IRQ", 143 - .startup = startup_opsput_pld_irq, 144 - .shutdown = shutdown_opsput_pld_irq, 145 - .enable = enable_opsput_pld_irq, 146 - .disable = disable_opsput_pld_irq, 147 - .ack = mask_and_ack_opsput_pld, 148 - .end = end_opsput_pld_irq 143 + .name = "OPSPUT-PLD-IRQ", 144 + .irq_shutdown = shutdown_opsput_pld, 145 + .irq_mask = mask_opsput_pld, 146 + .irq_unmask = unmask_opsput_pld, 149 147 }; 150 148 151 149 /* ··· 167 189 outw(data, port); 168 190 } 169 191 170 - static void mask_and_ack_opsput_lanpld(unsigned int irq) 192 + static void mask_opsput_lanpld(struct irq_data *data) 171 193 { 172 - disable_opsput_lanpld_irq(irq); 194 + disable_opsput_lanpld_irq(data->irq); 173 195 } 174 196 175 - static void end_opsput_lanpld_irq(unsigned int irq) 197 + static void unmask_opsput_lanpld(struct irq_data *data) 176 198 { 177 - enable_opsput_lanpld_irq(irq); 178 - end_opsput_irq(M32R_IRQ_INT0); 199 + enable_opsput_lanpld_irq(data->irq); 200 + enable_opsput_irq(M32R_IRQ_INT0); 179 201 } 180 202 181 - static unsigned int startup_opsput_lanpld_irq(unsigned int irq) 182 - { 183 - enable_opsput_lanpld_irq(irq); 184 - return (0); 185 - } 186 - 187 - static void shutdown_opsput_lanpld_irq(unsigned int irq) 203 + static void shutdown_opsput_lanpld(struct irq_data *data) 188 204 { 189 205 unsigned long port; 190 206 unsigned int pldirq; 191 207 192 - pldirq = irq2lanpldirq(irq); 208 + pldirq = irq2lanpldirq(data->irq); 193 209 port = lanpldirq2port(pldirq); 194 210 outw(PLD_ICUCR_ILEVEL7, port); 195 211 } 196 212 197 213 static struct irq_chip opsput_lanpld_irq_type = 198 214 { 199 - .name = "OPSPUT-PLD-LAN-IRQ", 200 - .startup = startup_opsput_lanpld_irq, 201 - .shutdown = shutdown_opsput_lanpld_irq, 202 - .enable = enable_opsput_lanpld_irq, 203 - .disable = disable_opsput_lanpld_irq, 204 - .ack = mask_and_ack_opsput_lanpld, 205 - .end = end_opsput_lanpld_irq 215 + .name = "OPSPUT-PLD-LAN-IRQ", 216 + .irq_shutdown = shutdown_opsput_lanpld, 217 + .irq_mask = mask_opsput_lanpld, 218 + .irq_unmask = unmask_opsput_lanpld, 206 219 }; 207 220 208 221 /* ··· 227 258 outw(data, port); 228 259 } 229 260 230 - static void mask_and_ack_opsput_lcdpld(unsigned int irq) 261 + static void mask_opsput_lcdpld(struct irq_data *data) 231 262 { 232 - disable_opsput_lcdpld_irq(irq); 263 + disable_opsput_lcdpld_irq(data->irq); 233 264 } 234 265 235 - static void end_opsput_lcdpld_irq(unsigned int irq) 266 + static void unmask_opsput_lcdpld(struct irq_data *data) 236 267 { 237 - enable_opsput_lcdpld_irq(irq); 238 - end_opsput_irq(M32R_IRQ_INT2); 268 + enable_opsput_lcdpld_irq(data->irq); 269 + enable_opsput_irq(M32R_IRQ_INT2); 239 270 } 240 271 241 - static unsigned int startup_opsput_lcdpld_irq(unsigned int irq) 242 - { 243 - enable_opsput_lcdpld_irq(irq); 244 - return (0); 245 - } 246 - 247 - static void shutdown_opsput_lcdpld_irq(unsigned int irq) 272 + static void shutdown_opsput_lcdpld(struct irq_data *data) 248 273 { 249 274 unsigned long port; 250 275 unsigned int pldirq; 251 276 252 - pldirq = irq2lcdpldirq(irq); 277 + pldirq = irq2lcdpldirq(data->irq); 253 278 port = lcdpldirq2port(pldirq); 254 279 outw(PLD_ICUCR_ILEVEL7, port); 255 280 } 256 281 257 - static struct irq_chip opsput_lcdpld_irq_type = 258 - { 259 - "OPSPUT-PLD-LCD-IRQ", 260 - startup_opsput_lcdpld_irq, 261 - shutdown_opsput_lcdpld_irq, 262 - enable_opsput_lcdpld_irq, 263 - disable_opsput_lcdpld_irq, 264 - mask_and_ack_opsput_lcdpld, 265 - end_opsput_lcdpld_irq 282 + static struct irq_chip opsput_lcdpld_irq_type = { 283 + .name = "OPSPUT-PLD-LCD-IRQ", 284 + .irq_shutdown = shutdown_opsput_lcdpld, 285 + .irq_mask = mask_opsput_lcdpld, 286 + .irq_unmask = unmask_opsput_lcdpld, 266 287 }; 267 288 268 289 void __init init_IRQ(void) 269 290 { 270 291 #if defined(CONFIG_SMC91X) 271 292 /* INT#0: LAN controller on OPSPUT-LAN (SMC91C111)*/ 272 - irq_desc[OPSPUT_LAN_IRQ_LAN].status = IRQ_DISABLED; 273 - irq_desc[OPSPUT_LAN_IRQ_LAN].chip = &opsput_lanpld_irq_type; 274 - irq_desc[OPSPUT_LAN_IRQ_LAN].action = 0; 275 - irq_desc[OPSPUT_LAN_IRQ_LAN].depth = 1; /* disable nested irq */ 293 + set_irq_chip_and_handler(OPSPUT_LAN_IRQ_LAN, &opsput_lanpld_irq_type, 294 + handle_level_irq); 276 295 lanpld_icu_data[irq2lanpldirq(OPSPUT_LAN_IRQ_LAN)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD02; /* "H" edge sense */ 277 296 disable_opsput_lanpld_irq(OPSPUT_LAN_IRQ_LAN); 278 297 #endif /* CONFIG_SMC91X */ 279 298 280 299 /* MFT2 : system timer */ 281 - irq_desc[M32R_IRQ_MFT2].status = IRQ_DISABLED; 282 - irq_desc[M32R_IRQ_MFT2].chip = &opsput_irq_type; 283 - irq_desc[M32R_IRQ_MFT2].action = 0; 284 - irq_desc[M32R_IRQ_MFT2].depth = 1; 300 + set_irq_chip_and_handler(M32R_IRQ_MFT2, &opsput_irq_type, 301 + handle_level_irq); 285 302 icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN; 286 303 disable_opsput_irq(M32R_IRQ_MFT2); 287 304 288 305 /* SIO0 : receive */ 289 - irq_desc[M32R_IRQ_SIO0_R].status = IRQ_DISABLED; 290 - irq_desc[M32R_IRQ_SIO0_R].chip = &opsput_irq_type; 291 - irq_desc[M32R_IRQ_SIO0_R].action = 0; 292 - irq_desc[M32R_IRQ_SIO0_R].depth = 1; 306 + set_irq_chip_and_handler(M32R_IRQ_SIO0_R, &opsput_irq_type, 307 + handle_level_irq); 293 308 icu_data[M32R_IRQ_SIO0_R].icucr = 0; 294 309 disable_opsput_irq(M32R_IRQ_SIO0_R); 295 310 296 311 /* SIO0 : send */ 297 - irq_desc[M32R_IRQ_SIO0_S].status = IRQ_DISABLED; 298 - irq_desc[M32R_IRQ_SIO0_S].chip = &opsput_irq_type; 299 - irq_desc[M32R_IRQ_SIO0_S].action = 0; 300 - irq_desc[M32R_IRQ_SIO0_S].depth = 1; 312 + set_irq_chip_and_handler(M32R_IRQ_SIO0_S, &opsput_irq_type, 313 + handle_level_irq); 301 314 icu_data[M32R_IRQ_SIO0_S].icucr = 0; 302 315 disable_opsput_irq(M32R_IRQ_SIO0_S); 303 316 304 317 /* SIO1 : receive */ 305 - irq_desc[M32R_IRQ_SIO1_R].status = IRQ_DISABLED; 306 - irq_desc[M32R_IRQ_SIO1_R].chip = &opsput_irq_type; 307 - irq_desc[M32R_IRQ_SIO1_R].action = 0; 308 - irq_desc[M32R_IRQ_SIO1_R].depth = 1; 318 + set_irq_chip_and_handler(M32R_IRQ_SIO1_R, &opsput_irq_type, 319 + handle_level_irq); 309 320 icu_data[M32R_IRQ_SIO1_R].icucr = 0; 310 321 disable_opsput_irq(M32R_IRQ_SIO1_R); 311 322 312 323 /* SIO1 : send */ 313 - irq_desc[M32R_IRQ_SIO1_S].status = IRQ_DISABLED; 314 - irq_desc[M32R_IRQ_SIO1_S].chip = &opsput_irq_type; 315 - irq_desc[M32R_IRQ_SIO1_S].action = 0; 316 - irq_desc[M32R_IRQ_SIO1_S].depth = 1; 324 + set_irq_chip_and_handler(M32R_IRQ_SIO1_S, &opsput_irq_type, 325 + handle_level_irq); 317 326 icu_data[M32R_IRQ_SIO1_S].icucr = 0; 318 327 disable_opsput_irq(M32R_IRQ_SIO1_S); 319 328 320 329 /* DMA1 : */ 321 - irq_desc[M32R_IRQ_DMA1].status = IRQ_DISABLED; 322 - irq_desc[M32R_IRQ_DMA1].chip = &opsput_irq_type; 323 - irq_desc[M32R_IRQ_DMA1].action = 0; 324 - irq_desc[M32R_IRQ_DMA1].depth = 1; 330 + set_irq_chip_and_handler(M32R_IRQ_DMA1, &opsput_irq_type, 331 + handle_level_irq); 325 332 icu_data[M32R_IRQ_DMA1].icucr = 0; 326 333 disable_opsput_irq(M32R_IRQ_DMA1); 327 334 328 335 #ifdef CONFIG_SERIAL_M32R_PLDSIO 329 336 /* INT#1: SIO0 Receive on PLD */ 330 - irq_desc[PLD_IRQ_SIO0_RCV].status = IRQ_DISABLED; 331 - irq_desc[PLD_IRQ_SIO0_RCV].chip = &opsput_pld_irq_type; 332 - irq_desc[PLD_IRQ_SIO0_RCV].action = 0; 333 - irq_desc[PLD_IRQ_SIO0_RCV].depth = 1; /* disable nested irq */ 337 + set_irq_chip_and_handler(PLD_IRQ_SIO0_RCV, &opsput_pld_irq_type, 338 + handle_level_irq); 334 339 pld_icu_data[irq2pldirq(PLD_IRQ_SIO0_RCV)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD03; 335 340 disable_opsput_pld_irq(PLD_IRQ_SIO0_RCV); 336 341 337 342 /* INT#1: SIO0 Send on PLD */ 338 - irq_desc[PLD_IRQ_SIO0_SND].status = IRQ_DISABLED; 339 - irq_desc[PLD_IRQ_SIO0_SND].chip = &opsput_pld_irq_type; 340 - irq_desc[PLD_IRQ_SIO0_SND].action = 0; 341 - irq_desc[PLD_IRQ_SIO0_SND].depth = 1; /* disable nested irq */ 343 + set_irq_chip_and_handler(PLD_IRQ_SIO0_SND, &opsput_pld_irq_type, 344 + handle_level_irq); 342 345 pld_icu_data[irq2pldirq(PLD_IRQ_SIO0_SND)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD03; 343 346 disable_opsput_pld_irq(PLD_IRQ_SIO0_SND); 344 347 #endif /* CONFIG_SERIAL_M32R_PLDSIO */ 345 348 346 349 /* INT#1: CFC IREQ on PLD */ 347 - irq_desc[PLD_IRQ_CFIREQ].status = IRQ_DISABLED; 348 - irq_desc[PLD_IRQ_CFIREQ].chip = &opsput_pld_irq_type; 349 - irq_desc[PLD_IRQ_CFIREQ].action = 0; 350 - irq_desc[PLD_IRQ_CFIREQ].depth = 1; /* disable nested irq */ 350 + set_irq_chip_and_handler(PLD_IRQ_CFIREQ, &opsput_pld_irq_type, 351 + handle_level_irq); 351 352 pld_icu_data[irq2pldirq(PLD_IRQ_CFIREQ)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD01; /* 'L' level sense */ 352 353 disable_opsput_pld_irq(PLD_IRQ_CFIREQ); 353 354 354 355 /* INT#1: CFC Insert on PLD */ 355 - irq_desc[PLD_IRQ_CFC_INSERT].status = IRQ_DISABLED; 356 - irq_desc[PLD_IRQ_CFC_INSERT].chip = &opsput_pld_irq_type; 357 - irq_desc[PLD_IRQ_CFC_INSERT].action = 0; 358 - irq_desc[PLD_IRQ_CFC_INSERT].depth = 1; /* disable nested irq */ 356 + set_irq_chip_and_handler(PLD_IRQ_CFC_INSERT, &opsput_pld_irq_type, 357 + handle_level_irq); 359 358 pld_icu_data[irq2pldirq(PLD_IRQ_CFC_INSERT)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD00; /* 'L' edge sense */ 360 359 disable_opsput_pld_irq(PLD_IRQ_CFC_INSERT); 361 360 362 361 /* INT#1: CFC Eject on PLD */ 363 - irq_desc[PLD_IRQ_CFC_EJECT].status = IRQ_DISABLED; 364 - irq_desc[PLD_IRQ_CFC_EJECT].chip = &opsput_pld_irq_type; 365 - irq_desc[PLD_IRQ_CFC_EJECT].action = 0; 366 - irq_desc[PLD_IRQ_CFC_EJECT].depth = 1; /* disable nested irq */ 362 + set_irq_chip_and_handler(PLD_IRQ_CFC_EJECT, &opsput_pld_irq_type, 363 + handle_level_irq); 367 364 pld_icu_data[irq2pldirq(PLD_IRQ_CFC_EJECT)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD02; /* 'H' edge sense */ 368 365 disable_opsput_pld_irq(PLD_IRQ_CFC_EJECT); 369 366 ··· 348 413 enable_opsput_irq(M32R_IRQ_INT1); 349 414 350 415 #if defined(CONFIG_USB) 351 - outw(USBCR_OTGS, USBCR); /* USBCR: non-OTG */ 352 - 353 - irq_desc[OPSPUT_LCD_IRQ_USB_INT1].status = IRQ_DISABLED; 354 - irq_desc[OPSPUT_LCD_IRQ_USB_INT1].chip = &opsput_lcdpld_irq_type; 355 - irq_desc[OPSPUT_LCD_IRQ_USB_INT1].action = 0; 356 - irq_desc[OPSPUT_LCD_IRQ_USB_INT1].depth = 1; 357 - lcdpld_icu_data[irq2lcdpldirq(OPSPUT_LCD_IRQ_USB_INT1)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD01; /* "L" level sense */ 358 - disable_opsput_lcdpld_irq(OPSPUT_LCD_IRQ_USB_INT1); 416 + outw(USBCR_OTGS, USBCR); /* USBCR: non-OTG */ 417 + set_irq_chip_and_handler(OPSPUT_LCD_IRQ_USB_INT1, 418 + &opsput_lcdpld_irq_type, handle_level_irq); 419 + lcdpld_icu_data[irq2lcdpldirq(OPSPUT_LCD_IRQ_USB_INT1)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD01; /* "L" level sense */ 420 + disable_opsput_lcdpld_irq(OPSPUT_LCD_IRQ_USB_INT1); 359 421 #endif 360 422 /* 361 423 * INT2# is used for BAT, USB, AUDIO ··· 365 433 /* 366 434 * INT3# is used for AR 367 435 */ 368 - irq_desc[M32R_IRQ_INT3].status = IRQ_DISABLED; 369 - irq_desc[M32R_IRQ_INT3].chip = &opsput_irq_type; 370 - irq_desc[M32R_IRQ_INT3].action = 0; 371 - irq_desc[M32R_IRQ_INT3].depth = 1; 436 + set_irq_chip_and_handler(M32R_IRQ_INT3, &opsput_irq_type, 437 + handle_level_irq); 372 438 icu_data[M32R_IRQ_INT3].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10; 373 439 disable_opsput_irq(M32R_IRQ_INT3); 374 440 #endif /* CONFIG_VIDEO_M32R_AR */
+40 -75
arch/m32r/platforms/usrv/setup.c
··· 37 37 outl(data, port); 38 38 } 39 39 40 - static void mask_and_ack_mappi(unsigned int irq) 40 + static void mask_mappi(struct irq_data *data) 41 41 { 42 - disable_mappi_irq(irq); 42 + disable_mappi_irq(data->irq); 43 43 } 44 44 45 - static void end_mappi_irq(unsigned int irq) 45 + static void unmask_mappi(struct irq_data *data) 46 46 { 47 - enable_mappi_irq(irq); 47 + enable_mappi_irq(data->irq); 48 48 } 49 49 50 - static unsigned int startup_mappi_irq(unsigned int irq) 51 - { 52 - enable_mappi_irq(irq); 53 - return 0; 54 - } 55 - 56 - static void shutdown_mappi_irq(unsigned int irq) 50 + static void shutdown_mappi(struct irq_data *data) 57 51 { 58 52 unsigned long port; 59 53 60 - port = irq2port(irq); 54 + port = irq2port(data->irq); 61 55 outl(M32R_ICUCR_ILEVEL7, port); 62 56 } 63 57 64 58 static struct irq_chip mappi_irq_type = 65 59 { 66 - .name = "M32700-IRQ", 67 - .startup = startup_mappi_irq, 68 - .shutdown = shutdown_mappi_irq, 69 - .enable = enable_mappi_irq, 70 - .disable = disable_mappi_irq, 71 - .ack = mask_and_ack_mappi, 72 - .end = end_mappi_irq 60 + .name = "M32700-IRQ", 61 + .irq_shutdown = shutdown_mappi, 62 + .irq_mask = mask_mappi, 63 + .irq_unmask = unmask_mappi, 73 64 }; 74 65 75 66 /* ··· 98 107 outw(data, port); 99 108 } 100 109 101 - static void mask_and_ack_m32700ut_pld(unsigned int irq) 110 + static void mask_m32700ut_pld(struct irq_data *data) 102 111 { 103 - disable_m32700ut_pld_irq(irq); 112 + disable_m32700ut_pld_irq(data->irq); 104 113 } 105 114 106 - static void end_m32700ut_pld_irq(unsigned int irq) 115 + static void unmask_m32700ut_pld(struct irq_data *data) 107 116 { 108 - enable_m32700ut_pld_irq(irq); 109 - end_mappi_irq(M32R_IRQ_INT1); 117 + enable_m32700ut_pld_irq(data->irq); 118 + enable_mappi_irq(M32R_IRQ_INT1); 110 119 } 111 120 112 - static unsigned int startup_m32700ut_pld_irq(unsigned int irq) 113 - { 114 - enable_m32700ut_pld_irq(irq); 115 - return 0; 116 - } 117 - 118 - static void shutdown_m32700ut_pld_irq(unsigned int irq) 121 + static void shutdown_m32700ut_pld(struct irq_data *data) 119 122 { 120 123 unsigned long port; 121 124 unsigned int pldirq; 122 125 123 - pldirq = irq2pldirq(irq); 126 + pldirq = irq2pldirq(data->irq); 124 127 port = pldirq2port(pldirq); 125 128 outw(PLD_ICUCR_ILEVEL7, port); 126 129 } 127 130 128 131 static struct irq_chip m32700ut_pld_irq_type = 129 132 { 130 - .name = "USRV-PLD-IRQ", 131 - .startup = startup_m32700ut_pld_irq, 132 - .shutdown = shutdown_m32700ut_pld_irq, 133 - .enable = enable_m32700ut_pld_irq, 134 - .disable = disable_m32700ut_pld_irq, 135 - .ack = mask_and_ack_m32700ut_pld, 136 - .end = end_m32700ut_pld_irq 133 + .name = "USRV-PLD-IRQ", 134 + .irq_shutdown = shutdown_m32700ut_pld, 135 + .irq_mask = mask_m32700ut_pld, 136 + .irq_unmask = unmask_m32700ut_pld, 137 137 }; 138 138 139 139 void __init init_IRQ(void) ··· 138 156 once++; 139 157 140 158 /* MFT2 : system timer */ 141 - irq_desc[M32R_IRQ_MFT2].status = IRQ_DISABLED; 142 - irq_desc[M32R_IRQ_MFT2].chip = &mappi_irq_type; 143 - irq_desc[M32R_IRQ_MFT2].action = 0; 144 - irq_desc[M32R_IRQ_MFT2].depth = 1; 159 + set_irq_chip_and_handler(M32R_IRQ_MFT2, &mappi_irq_type, 160 + handle_level_irq); 145 161 icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN; 146 162 disable_mappi_irq(M32R_IRQ_MFT2); 147 163 148 164 #if defined(CONFIG_SERIAL_M32R_SIO) 149 165 /* SIO0_R : uart receive data */ 150 - irq_desc[M32R_IRQ_SIO0_R].status = IRQ_DISABLED; 151 - irq_desc[M32R_IRQ_SIO0_R].chip = &mappi_irq_type; 152 - irq_desc[M32R_IRQ_SIO0_R].action = 0; 153 - irq_desc[M32R_IRQ_SIO0_R].depth = 1; 166 + set_irq_chip_and_handler(M32R_IRQ_SIO0_R, &mappi_irq_type, 167 + handle_level_irq); 154 168 icu_data[M32R_IRQ_SIO0_R].icucr = 0; 155 169 disable_mappi_irq(M32R_IRQ_SIO0_R); 156 170 157 171 /* SIO0_S : uart send data */ 158 - irq_desc[M32R_IRQ_SIO0_S].status = IRQ_DISABLED; 159 - irq_desc[M32R_IRQ_SIO0_S].chip = &mappi_irq_type; 160 - irq_desc[M32R_IRQ_SIO0_S].action = 0; 161 - irq_desc[M32R_IRQ_SIO0_S].depth = 1; 172 + set_irq_chip_and_handler(M32R_IRQ_SIO0_S, &mappi_irq_type, 173 + handle_level_irq); 162 174 icu_data[M32R_IRQ_SIO0_S].icucr = 0; 163 175 disable_mappi_irq(M32R_IRQ_SIO0_S); 164 176 165 177 /* SIO1_R : uart receive data */ 166 - irq_desc[M32R_IRQ_SIO1_R].status = IRQ_DISABLED; 167 - irq_desc[M32R_IRQ_SIO1_R].chip = &mappi_irq_type; 168 - irq_desc[M32R_IRQ_SIO1_R].action = 0; 169 - irq_desc[M32R_IRQ_SIO1_R].depth = 1; 178 + set_irq_chip_and_handler(M32R_IRQ_SIO1_R, &mappi_irq_type, 179 + handle_level_irq); 170 180 icu_data[M32R_IRQ_SIO1_R].icucr = 0; 171 181 disable_mappi_irq(M32R_IRQ_SIO1_R); 172 182 173 183 /* SIO1_S : uart send data */ 174 - irq_desc[M32R_IRQ_SIO1_S].status = IRQ_DISABLED; 175 - irq_desc[M32R_IRQ_SIO1_S].chip = &mappi_irq_type; 176 - irq_desc[M32R_IRQ_SIO1_S].action = 0; 177 - irq_desc[M32R_IRQ_SIO1_S].depth = 1; 184 + set_irq_chip_and_handler(M32R_IRQ_SIO1_S, &mappi_irq_type, 185 + handle_level_irq); 178 186 icu_data[M32R_IRQ_SIO1_S].icucr = 0; 179 187 disable_mappi_irq(M32R_IRQ_SIO1_S); 180 188 #endif /* CONFIG_SERIAL_M32R_SIO */ 181 189 182 190 /* INT#67-#71: CFC#0 IREQ on PLD */ 183 191 for (i = 0 ; i < CONFIG_M32R_CFC_NUM ; i++ ) { 184 - irq_desc[PLD_IRQ_CF0 + i].status = IRQ_DISABLED; 185 - irq_desc[PLD_IRQ_CF0 + i].chip = &m32700ut_pld_irq_type; 186 - irq_desc[PLD_IRQ_CF0 + i].action = 0; 187 - irq_desc[PLD_IRQ_CF0 + i].depth = 1; /* disable nested irq */ 192 + set_irq_chip_and_handler(PLD_IRQ_CF0 + i, 193 + &m32700ut_pld_irq_type, 194 + handle_level_irq); 188 195 pld_icu_data[irq2pldirq(PLD_IRQ_CF0 + i)].icucr 189 196 = PLD_ICUCR_ISMOD01; /* 'L' level sense */ 190 197 disable_m32700ut_pld_irq(PLD_IRQ_CF0 + i); ··· 181 210 182 211 #if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE) 183 212 /* INT#76: 16552D#0 IREQ on PLD */ 184 - irq_desc[PLD_IRQ_UART0].status = IRQ_DISABLED; 185 - irq_desc[PLD_IRQ_UART0].chip = &m32700ut_pld_irq_type; 186 - irq_desc[PLD_IRQ_UART0].action = 0; 187 - irq_desc[PLD_IRQ_UART0].depth = 1; /* disable nested irq */ 213 + set_irq_chip_and_handler(PLD_IRQ_UART0, &m32700ut_pld_irq_type, 214 + handle_level_irq); 188 215 pld_icu_data[irq2pldirq(PLD_IRQ_UART0)].icucr 189 216 = PLD_ICUCR_ISMOD03; /* 'H' level sense */ 190 217 disable_m32700ut_pld_irq(PLD_IRQ_UART0); 191 218 192 219 /* INT#77: 16552D#1 IREQ on PLD */ 193 - irq_desc[PLD_IRQ_UART1].status = IRQ_DISABLED; 194 - irq_desc[PLD_IRQ_UART1].chip = &m32700ut_pld_irq_type; 195 - irq_desc[PLD_IRQ_UART1].action = 0; 196 - irq_desc[PLD_IRQ_UART1].depth = 1; /* disable nested irq */ 220 + set_irq_chip_and_handler(PLD_IRQ_UART1, &m32700ut_pld_irq_type, 221 + handle_level_irq); 197 222 pld_icu_data[irq2pldirq(PLD_IRQ_UART1)].icucr 198 223 = PLD_ICUCR_ISMOD03; /* 'H' level sense */ 199 224 disable_m32700ut_pld_irq(PLD_IRQ_UART1); ··· 197 230 198 231 #if defined(CONFIG_IDC_AK4524) || defined(CONFIG_IDC_AK4524_MODULE) 199 232 /* INT#80: AK4524 IREQ on PLD */ 200 - irq_desc[PLD_IRQ_SNDINT].status = IRQ_DISABLED; 201 - irq_desc[PLD_IRQ_SNDINT].chip = &m32700ut_pld_irq_type; 202 - irq_desc[PLD_IRQ_SNDINT].action = 0; 203 - irq_desc[PLD_IRQ_SNDINT].depth = 1; /* disable nested irq */ 233 + set_irq_chip_and_handler(PLD_IRQ_SNDINT, &m32700ut_pld_irq_type, 234 + handle_level_irq); 204 235 pld_icu_data[irq2pldirq(PLD_IRQ_SNDINT)].icucr 205 236 = PLD_ICUCR_ISMOD01; /* 'L' level sense */ 206 237 disable_m32700ut_pld_irq(PLD_IRQ_SNDINT);
+1 -8
arch/m68knommu/Kconfig
··· 2 2 bool 3 3 default y 4 4 select HAVE_IDE 5 + select HAVE_GENERIC_HARDIRQS 5 6 6 7 config MMU 7 8 bool ··· 46 45 default n 47 46 48 47 config GENERIC_HWEIGHT 49 - bool 50 - default y 51 - 52 - config GENERIC_HARDIRQS 53 - bool 54 - default y 55 - 56 - config GENERIC_HARDIRQS_NO__DO_IRQ 57 48 bool 58 49 default y 59 50
+2 -9
arch/microblaze/Kconfig
··· 15 15 select TRACING_SUPPORT 16 16 select OF 17 17 select OF_EARLY_FLATTREE 18 + select HAVE_GENERIC_HARDIRQS 19 + select GENERIC_IRQ_PROBE 18 20 19 21 config SWAP 20 22 def_bool n ··· 39 37 config GENERIC_HWEIGHT 40 38 def_bool y 41 39 42 - config GENERIC_HARDIRQS 43 - def_bool y 44 - 45 - config GENERIC_IRQ_PROBE 46 - def_bool y 47 - 48 40 config GENERIC_CALIBRATE_DELAY 49 41 def_bool y 50 42 ··· 46 50 def_bool n 47 51 48 52 config GENERIC_CLOCKEVENTS 49 - def_bool y 50 - 51 - config GENERIC_HARDIRQS_NO__DO_IRQ 52 53 def_bool y 53 54 54 55 config GENERIC_GPIO
-3
arch/mips/Kconfig
··· 793 793 bool 794 794 default y 795 795 796 - config GENERIC_HARDIRQS_NO__DO_IRQ 797 - def_bool y 798 - 799 796 # 800 797 # Select some configuration options automatically based on user selections. 801 798 #
+1 -7
arch/mn10300/Kconfig
··· 1 1 config MN10300 2 2 def_bool y 3 3 select HAVE_OPROFILE 4 + select GENERIC_HARDIRQS 4 5 5 6 config AM33_2 6 7 def_bool n ··· 34 33 35 34 config RWSEM_XCHGADD_ALGORITHM 36 35 bool 37 - 38 - config GENERIC_HARDIRQS_NO__DO_IRQ 39 - def_bool y 40 36 41 37 config GENERIC_CALIBRATE_DELAY 42 38 def_bool y ··· 75 77 def_bool y 76 78 77 79 config ARCH_HAS_ILOG2_U32 78 - def_bool y 79 - 80 - # Use the generic interrupt handling code in kernel/irq/ 81 - config GENERIC_HARDIRQS 82 80 def_bool y 83 81 84 82 config HOTPLUG_CPU
+4 -14
arch/parisc/Kconfig
··· 12 12 select HAVE_IRQ_WORK 13 13 select HAVE_PERF_EVENTS 14 14 select GENERIC_ATOMIC64 if !64BIT 15 - select GENERIC_HARDIRQS_NO__DO_IRQ 15 + select HAVE_GENERIC_HARDIRQS 16 + select GENERIC_IRQ_PROBE 17 + select IRQ_PER_CPU 18 + 16 19 help 17 20 The PA-RISC microprocessor is designed by Hewlett-Packard and used 18 21 in many of their workstations & servers (HP9000 700 and 800 series, ··· 69 66 depends on SMP 70 67 default y 71 68 72 - config GENERIC_HARDIRQS 73 - def_bool y 74 - 75 - config GENERIC_IRQ_PROBE 76 - def_bool y 77 - 78 69 config HAVE_LATENCYTOP_SUPPORT 79 70 def_bool y 80 - 81 - config IRQ_PER_CPU 82 - bool 83 - default y 84 - 85 - config GENERIC_HARDIRQS_NO__DO_IRQ 86 - def_bool y 87 71 88 72 # unless you want to implement ACPI on PA-RISC ... ;-) 89 73 config PM
+3 -25
arch/powerpc/Kconfig
··· 36 36 config GENERIC_CLOCKEVENTS 37 37 def_bool y 38 38 39 - config GENERIC_HARDIRQS 40 - bool 41 - default y 42 - 43 - config GENERIC_HARDIRQS_NO__DO_IRQ 44 - bool 45 - default y 46 - 47 39 config HAVE_SETUP_PER_CPU_AREA 48 40 def_bool PPC64 49 41 50 42 config NEED_PER_CPU_EMBED_FIRST_CHUNK 51 43 def_bool PPC64 52 - 53 - config IRQ_PER_CPU 54 - bool 55 - default y 56 44 57 45 config NR_IRQS 58 46 int "Number of virtual interrupt numbers" ··· 131 143 select HAVE_PERF_EVENTS 132 144 select HAVE_REGS_AND_STACK_ACCESS_API 133 145 select HAVE_HW_BREAKPOINT if PERF_EVENTS && PPC_BOOK3S_64 146 + select HAVE_GENERIC_HARDIRQS 147 + select HAVE_SPARSE_IRQ 148 + select IRQ_PER_CPU 134 149 135 150 config EARLY_PRINTK 136 151 bool ··· 382 391 multiple CPUs. Saying N here will route all IRQs to the first 383 392 CPU. Generally saying Y is safe, although some problems have been 384 393 reported with SMP Power Macintoshes with this option enabled. 385 - 386 - config SPARSE_IRQ 387 - bool "Support sparse irq numbering" 388 - default n 389 - help 390 - This enables support for sparse irqs. This is useful for distro 391 - kernels that want to define a high CONFIG_NR_CPUS value but still 392 - want to have low kernel memory footprint on smaller machines. 393 - 394 - ( Sparse IRQs can also be beneficial on NUMA boxes, as they spread 395 - out the irq_desc[] array in a more NUMA-friendly way. ) 396 - 397 - If you don't know what to do here, say N. 398 394 399 395 config NUMA 400 396 bool "NUMA support"
+4 -6
arch/score/Kconfig
··· 1 1 menu "Machine selection" 2 2 3 + config SCORE 4 + def_bool y 5 + select HAVE_GENERIC_HARDIRQS 6 + 3 7 choice 4 8 prompt "System type" 5 9 default MACH_SPCT6600 ··· 57 53 config SCHED_NO_NO_OMIT_FRAME_POINTER 58 54 def_bool y 59 55 60 - config GENERIC_HARDIRQS_NO__DO_IRQ 61 - def_bool y 62 - 63 56 config GENERIC_SYSCALL_TABLE 64 57 def_bool y 65 58 ··· 67 66 menu "Kernel type" 68 67 69 68 config 32BIT 70 - def_bool y 71 - 72 - config GENERIC_HARDIRQS 73 69 def_bool y 74 70 75 71 config ARCH_FLATMEM_ENABLE
+1 -8
arch/sparc/Kconfig
··· 50 50 select RTC_DRV_STARFIRE 51 51 select HAVE_PERF_EVENTS 52 52 select PERF_USE_VMALLOC 53 + select HAVE_GENERIC_HARDIRQS 53 54 54 55 config ARCH_DEFCONFIG 55 56 string ··· 106 105 def_bool y if SPARC64 107 106 108 107 config NEED_PER_CPU_PAGE_FIRST_CHUNK 109 - def_bool y if SPARC64 110 - 111 - config GENERIC_HARDIRQS_NO__DO_IRQ 112 - bool 113 108 def_bool y if SPARC64 114 109 115 110 config MMU ··· 272 275 Say Y here to experiment with turning CPUs off and on. CPUs 273 276 can be controlled through /sys/devices/system/cpu/cpu#. 274 277 Say N if you want to disable CPU hotplug. 275 - 276 - config GENERIC_HARDIRQS 277 - bool 278 - default y if SPARC64 279 278 280 279 source "kernel/time/Kconfig" 281 280
+22 -33
arch/tile/Kconfig
··· 1 1 # For a description of the syntax of this configuration file, 2 2 # see Documentation/kbuild/config-language.txt. 3 3 4 + config TILE 5 + def_bool y 6 + select HAVE_KVM if !TILEGX 7 + select GENERIC_FIND_FIRST_BIT 8 + select GENERIC_FIND_NEXT_BIT 9 + select USE_GENERIC_SMP_HELPERS 10 + select CC_OPTIMIZE_FOR_SIZE 11 + select HAVE_GENERIC_HARDIRQS 12 + select GENERIC_IRQ_PROBE 13 + select GENERIC_PENDING_IRQ if SMP 14 + 15 + # FIXME: investigate whether we need/want these options. 16 + # select HAVE_IOREMAP_PROT 17 + # select HAVE_OPTPROBES 18 + # select HAVE_REGS_AND_STACK_ACCESS_API 19 + # select HAVE_HW_BREAKPOINT 20 + # select PERF_EVENTS 21 + # select HAVE_USER_RETURN_NOTIFIER 22 + # config NO_BOOTMEM 23 + # config ARCH_SUPPORTS_DEBUG_PAGEALLOC 24 + # config HUGETLB_PAGE_SIZE_VARIABLE 25 + 4 26 config MMU 5 27 def_bool y 6 28 7 29 config GENERIC_CSUM 8 30 def_bool y 9 - 10 - config GENERIC_HARDIRQS 11 - def_bool y 12 - 13 - config GENERIC_HARDIRQS_NO__DO_IRQ 14 - def_bool y 15 - 16 - config GENERIC_IRQ_PROBE 17 - def_bool y 18 - 19 - config GENERIC_PENDING_IRQ 20 - def_bool y 21 - depends on GENERIC_HARDIRQS && SMP 22 31 23 32 config SEMAPHORE_SLEEPERS 24 33 def_bool y ··· 105 96 config HVC_TILE 106 97 select HVC_DRIVER 107 98 def_bool y 108 - 109 - config TILE 110 - def_bool y 111 - select HAVE_KVM if !TILEGX 112 - select GENERIC_FIND_FIRST_BIT 113 - select GENERIC_FIND_NEXT_BIT 114 - select USE_GENERIC_SMP_HELPERS 115 - select CC_OPTIMIZE_FOR_SIZE 116 - 117 - # FIXME: investigate whether we need/want these options. 118 - # select HAVE_IOREMAP_PROT 119 - # select HAVE_OPTPROBES 120 - # select HAVE_REGS_AND_STACK_ACCESS_API 121 - # select HAVE_HW_BREAKPOINT 122 - # select PERF_EVENTS 123 - # select HAVE_USER_RETURN_NOTIFIER 124 - # config NO_BOOTMEM 125 - # config ARCH_SUPPORTS_DEBUG_PAGEALLOC 126 - # config HUGETLB_PAGE_SIZE_VARIABLE 127 - 128 99 129 100 # Please note: TILE-Gx support is not yet finalized; this is 130 101 # the preliminary support. TILE-Gx drivers are only provided
+1 -5
arch/um/Kconfig.common
··· 3 3 option defconfig_list 4 4 default "arch/$ARCH/defconfig" 5 5 6 - # UML uses the generic IRQ subsystem 7 - config GENERIC_HARDIRQS 8 - bool 9 - default y 10 - 11 6 config UML 12 7 bool 13 8 default y 9 + select HAVE_GENERIC_HARDIRQS 14 10 15 11 config MMU 16 12 bool
-3
arch/um/Kconfig.um
··· 120 120 121 121 If you don't know what to do, say N. 122 122 123 - config GENERIC_HARDIRQS_NO__DO_IRQ 124 - def_bool y 125 - 126 123 config NR_CPUS 127 124 int "Maximum number of CPUs (2-32)" 128 125 range 2 32
-14
include/linux/irqdesc.h
··· 101 101 #define get_irq_desc_msi(desc) ((desc)->irq_data.msi_desc) 102 102 103 103 /* 104 - * Monolithic do_IRQ implementation. 105 - */ 106 - #ifndef CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ 107 - extern unsigned int __do_IRQ(unsigned int irq); 108 - #endif 109 - 110 - /* 111 104 * Architectures call this to let the generic IRQ layer 112 105 * handle an interrupt. If the descriptor is attached to an 113 106 * irqchip-style controller then we call the ->handle_irq() handler, ··· 108 115 */ 109 116 static inline void generic_handle_irq_desc(unsigned int irq, struct irq_desc *desc) 110 117 { 111 - #ifdef CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ 112 118 desc->handle_irq(irq, desc); 113 - #else 114 - if (likely(desc->handle_irq)) 115 - desc->handle_irq(irq, desc); 116 - else 117 - __do_IRQ(irq); 118 - #endif 119 119 } 120 120 121 121 static inline void generic_handle_irq(unsigned int irq)
-3
kernel/irq/Kconfig
··· 9 9 config GENERIC_HARDIRQS 10 10 def_bool y 11 11 12 - config GENERIC_HARDIRQS_NO__DO_IRQ 13 - def_bool y 14 - 15 12 # Select this to disable the deprecated stuff 16 13 config GENERIC_HARDIRQS_NO_DEPRECATED 17 14 def_bool n
-111
kernel/irq/handle.c
··· 118 118 119 119 return retval; 120 120 } 121 - 122 - #ifndef CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ 123 - 124 - #ifdef CONFIG_ENABLE_WARN_DEPRECATED 125 - # warning __do_IRQ is deprecated. Please convert to proper flow handlers 126 - #endif 127 - 128 - /** 129 - * __do_IRQ - original all in one highlevel IRQ handler 130 - * @irq: the interrupt number 131 - * 132 - * __do_IRQ handles all normal device IRQ's (the special 133 - * SMP cross-CPU interrupts have their own specific 134 - * handlers). 135 - * 136 - * This is the original x86 implementation which is used for every 137 - * interrupt type. 138 - */ 139 - unsigned int __do_IRQ(unsigned int irq) 140 - { 141 - struct irq_desc *desc = irq_to_desc(irq); 142 - struct irqaction *action; 143 - unsigned int status; 144 - 145 - kstat_incr_irqs_this_cpu(irq, desc); 146 - 147 - if (CHECK_IRQ_PER_CPU(desc->status)) { 148 - irqreturn_t action_ret; 149 - 150 - /* 151 - * No locking required for CPU-local interrupts: 152 - */ 153 - if (desc->irq_data.chip->ack) 154 - desc->irq_data.chip->ack(irq); 155 - if (likely(!(desc->status & IRQ_DISABLED))) { 156 - action_ret = handle_IRQ_event(irq, desc->action); 157 - if (!noirqdebug) 158 - note_interrupt(irq, desc, action_ret); 159 - } 160 - desc->irq_data.chip->end(irq); 161 - return 1; 162 - } 163 - 164 - raw_spin_lock(&desc->lock); 165 - if (desc->irq_data.chip->ack) 166 - desc->irq_data.chip->ack(irq); 167 - /* 168 - * REPLAY is when Linux resends an IRQ that was dropped earlier 169 - * WAITING is used by probe to mark irqs that are being tested 170 - */ 171 - status = desc->status & ~(IRQ_REPLAY | IRQ_WAITING); 172 - status |= IRQ_PENDING; /* we _want_ to handle it */ 173 - 174 - /* 175 - * If the IRQ is disabled for whatever reason, we cannot 176 - * use the action we have. 177 - */ 178 - action = NULL; 179 - if (likely(!(status & (IRQ_DISABLED | IRQ_INPROGRESS)))) { 180 - action = desc->action; 181 - status &= ~IRQ_PENDING; /* we commit to handling */ 182 - status |= IRQ_INPROGRESS; /* we are handling it */ 183 - } 184 - desc->status = status; 185 - 186 - /* 187 - * If there is no IRQ handler or it was disabled, exit early. 188 - * Since we set PENDING, if another processor is handling 189 - * a different instance of this same irq, the other processor 190 - * will take care of it. 191 - */ 192 - if (unlikely(!action)) 193 - goto out; 194 - 195 - /* 196 - * Edge triggered interrupts need to remember 197 - * pending events. 198 - * This applies to any hw interrupts that allow a second 199 - * instance of the same irq to arrive while we are in do_IRQ 200 - * or in the handler. But the code here only handles the _second_ 201 - * instance of the irq, not the third or fourth. So it is mostly 202 - * useful for irq hardware that does not mask cleanly in an 203 - * SMP environment. 204 - */ 205 - for (;;) { 206 - irqreturn_t action_ret; 207 - 208 - raw_spin_unlock(&desc->lock); 209 - 210 - action_ret = handle_IRQ_event(irq, action); 211 - if (!noirqdebug) 212 - note_interrupt(irq, desc, action_ret); 213 - 214 - raw_spin_lock(&desc->lock); 215 - if (likely(!(desc->status & IRQ_PENDING))) 216 - break; 217 - desc->status &= ~IRQ_PENDING; 218 - } 219 - desc->status &= ~IRQ_INPROGRESS; 220 - 221 - out: 222 - /* 223 - * The ->end() handler has to deal with interrupts which got 224 - * disabled while the handler was running. 225 - */ 226 - desc->irq_data.chip->end(irq); 227 - raw_spin_unlock(&desc->lock); 228 - 229 - return 1; 230 - } 231 - #endif