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

alpha: use set_irq_chip and push down __do_IRQ to the machine types

Also kill superfluous IRQ_DISABLED initialization, since that's the
default state of the irq_desc[i].status field.

Tested-by: Michael Cree <mcree@orcon.net.nz>
Signed-off-by: Kyle McMartin <kyle@redhat.com>
Signed-off-by: Matt Turner <mattst88@gmail.com>

authored by

Kyle McMartin and committed by
Matt Turner
d5ccde0a e78bf5e6

+59 -48
+3
arch/alpha/include/asm/irq.h
··· 88 88 struct pt_regs; 89 89 extern void (*perf_irq)(unsigned long, struct pt_regs *); 90 90 91 + struct irq_desc; 92 + extern void alpha_do_IRQ(unsigned int irq, struct irq_desc *desc); 93 + 91 94 #endif /* _ALPHA_IRQ_H */
+6 -1
arch/alpha/kernel/irq.c
··· 159 159 * at IPL 0. 160 160 */ 161 161 local_irq_disable(); 162 - __do_IRQ(irq); 162 + generic_handle_irq(irq); 163 163 irq_exit(); 164 + } 165 + 166 + void alpha_do_IRQ(unsigned int irq, struct irq_desc *desc) 167 + { 168 + __do_IRQ(irq); 164 169 }
+1 -2
arch/alpha/kernel/irq_i8259.c
··· 107 107 outb(0xff, 0xA1); /* mask all of 8259A-2 */ 108 108 109 109 for (i = 0; i < 16; i++) { 110 - irq_desc[i].status = IRQ_DISABLED; 111 - irq_desc[i].chip = &i8259a_irq_type; 110 + set_irq_chip_and_handler(i, &i8259a_irq_type, alpha_do_IRQ); 112 111 } 113 112 114 113 setup_irq(2, &cascade);
+2 -2
arch/alpha/kernel/irq_pyxis.c
··· 119 119 for (i = 16; i < 48; ++i) { 120 120 if ((ignore_mask >> i) & 1) 121 121 continue; 122 - irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL; 123 - irq_desc[i].chip = &pyxis_irq_type; 122 + set_irq_chip_and_handler(i, &pyxis_irq_type, alpha_do_IRQ); 123 + irq_desc[i].status |= IRQ_LEVEL; 124 124 } 125 125 126 126 setup_irq(16+7, &isa_cascade_irqaction);
+2 -2
arch/alpha/kernel/irq_srm.c
··· 68 68 for (i = 16; i < max; ++i) { 69 69 if (i < 64 && ((ignore_mask >> i) & 1)) 70 70 continue; 71 - irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL; 72 - irq_desc[i].chip = &srm_irq_type; 71 + irq_desc[i].status |= IRQ_LEVEL; 72 + set_irq_chip_and_handler(i, &srm_irq_type, alpha_do_IRQ); 73 73 } 74 74 } 75 75
+2 -2
arch/alpha/kernel/sys_alcor.c
··· 142 142 on while IRQ probing. */ 143 143 if (i >= 16+20 && i <= 16+30) 144 144 continue; 145 - irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL; 146 - irq_desc[i].chip = &alcor_irq_type; 145 + irq_desc[i].status |= IRQ_LEVEL; 146 + set_irq_chip_and_handler(i, &alcor_irq_type, alpha_do_IRQ); 147 147 } 148 148 i8259a_irq_type.ack = alcor_isa_mask_and_ack_irq; 149 149
+3 -2
arch/alpha/kernel/sys_cabriolet.c
··· 122 122 outb(0xff, 0x806); 123 123 124 124 for (i = 16; i < 35; ++i) { 125 - irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL; 126 - irq_desc[i].chip = &cabriolet_irq_type; 125 + set_irq_chip_and_handler(i, &cabriolet_irq_type, 126 + alpha_do_IRQ); 127 + irq_desc[i].status |= IRQ_LEVEL; 127 128 } 128 129 } 129 130
+2 -2
arch/alpha/kernel/sys_dp264.c
··· 302 302 { 303 303 long i; 304 304 for (i = imin; i <= imax; ++i) { 305 - irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL; 306 - irq_desc[i].chip = ops; 305 + irq_desc[i].status |= IRQ_LEVEL; 306 + set_irq_chip_and_handler(i, ops, alpha_do_IRQ); 307 307 } 308 308 } 309 309
+2 -2
arch/alpha/kernel/sys_eb64p.c
··· 135 135 init_i8259a_irqs(); 136 136 137 137 for (i = 16; i < 32; ++i) { 138 - irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL; 139 - irq_desc[i].chip = &eb64p_irq_type; 138 + irq_desc[i].status |= IRQ_LEVEL; 139 + set_irq_chip_and_handler(i, &eb64p_irq_type, alpha_do_IRQ); 140 140 } 141 141 142 142 common_init_isa_dma();
+2 -2
arch/alpha/kernel/sys_eiger.c
··· 153 153 init_i8259a_irqs(); 154 154 155 155 for (i = 16; i < 128; ++i) { 156 - irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL; 157 - irq_desc[i].chip = &eiger_irq_type; 156 + irq_desc[i].status |= IRQ_LEVEL; 157 + set_irq_chip_and_handler(i, &eiger_irq_type, alpha_do_IRQ); 158 158 } 159 159 } 160 160
+5 -5
arch/alpha/kernel/sys_jensen.c
··· 206 206 { 207 207 init_i8259a_irqs(); 208 208 209 - irq_desc[1].chip = &jensen_local_irq_type; 210 - irq_desc[4].chip = &jensen_local_irq_type; 211 - irq_desc[3].chip = &jensen_local_irq_type; 212 - irq_desc[7].chip = &jensen_local_irq_type; 213 - irq_desc[9].chip = &jensen_local_irq_type; 209 + set_irq_chip_and_handler(1, &jensen_local_irq_type, alpha_do_IRQ); 210 + set_irq_chip_and_handler(4, &jensen_local_irq_type, alpha_do_IRQ); 211 + set_irq_chip_and_handler(3, &jensen_local_irq_type, alpha_do_IRQ); 212 + set_irq_chip_and_handler(7, &jensen_local_irq_type, alpha_do_IRQ); 213 + set_irq_chip_and_handler(9, &jensen_local_irq_type, alpha_do_IRQ); 214 214 215 215 common_init_isa_dma(); 216 216 }
+6 -6
arch/alpha/kernel/sys_marvel.c
··· 304 304 305 305 /* Set up the lsi irqs. */ 306 306 for (i = 0; i < 128; ++i) { 307 - irq_desc[base + i].status = IRQ_DISABLED | IRQ_LEVEL; 308 - irq_desc[base + i].chip = lsi_ops; 307 + irq_desc[base + i].status |= IRQ_LEVEL; 308 + set_irq_chip_and_handler(base + i, lsi_ops, alpha_do_IRQ); 309 309 } 310 310 311 311 /* Disable the implemented irqs in hardware. */ ··· 318 318 319 319 /* Set up the msi irqs. */ 320 320 for (i = 128; i < (128 + 512); ++i) { 321 - irq_desc[base + i].status = IRQ_DISABLED | IRQ_LEVEL; 322 - irq_desc[base + i].chip = msi_ops; 321 + irq_desc[base + i].status |= IRQ_LEVEL; 322 + set_irq_chip_and_handler(base + i, msi_ops, alpha_do_IRQ); 323 323 } 324 324 325 325 for (i = 0; i < 16; ++i) ··· 336 336 337 337 /* Reserve the legacy irqs. */ 338 338 for (i = 0; i < 16; ++i) { 339 - irq_desc[i].status = IRQ_DISABLED; 340 - irq_desc[i].chip = &marvel_legacy_irq_type; 339 + set_irq_chip_and_handler(i, &marvel_legacy_irq_type, 340 + alpha_do_IRQ); 341 341 } 342 342 343 343 /* Init the io7 irqs. */
+2 -2
arch/alpha/kernel/sys_mikasa.c
··· 115 115 mikasa_update_irq_hw(0); 116 116 117 117 for (i = 16; i < 32; ++i) { 118 - irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL; 119 - irq_desc[i].chip = &mikasa_irq_type; 118 + irq_desc[i].status |= IRQ_LEVEL; 119 + set_irq_chip_and_handler(i, &mikasa_irq_type, alpha_do_IRQ); 120 120 } 121 121 122 122 init_i8259a_irqs();
+2 -2
arch/alpha/kernel/sys_noritake.c
··· 144 144 outw(0, 0x54c); 145 145 146 146 for (i = 16; i < 48; ++i) { 147 - irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL; 148 - irq_desc[i].chip = &noritake_irq_type; 147 + irq_desc[i].status |= IRQ_LEVEL; 148 + set_irq_chip_and_handler(i, &noritake_irq_type, alpha_do_IRQ); 149 149 } 150 150 151 151 init_i8259a_irqs();
+2 -2
arch/alpha/kernel/sys_rawhide.c
··· 194 194 } 195 195 196 196 for (i = 16; i < 128; ++i) { 197 - irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL; 198 - irq_desc[i].chip = &rawhide_irq_type; 197 + irq_desc[i].status |= IRQ_LEVEL; 198 + set_irq_chip_and_handler(i, &rawhide_irq_type, alpha_do_IRQ); 199 199 } 200 200 201 201 init_i8259a_irqs();
+2 -2
arch/alpha/kernel/sys_rx164.c
··· 116 116 117 117 rx164_update_irq_hw(0); 118 118 for (i = 16; i < 40; ++i) { 119 - irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL; 120 - irq_desc[i].chip = &rx164_irq_type; 119 + irq_desc[i].status |= IRQ_LEVEL; 120 + set_irq_chip_and_handler(i, &rx164_irq_type, alpha_do_IRQ); 121 121 } 122 122 123 123 init_i8259a_irqs();
+3 -2
arch/alpha/kernel/sys_sable.c
··· 535 535 long i; 536 536 537 537 for (i = 0; i < nr_of_irqs; ++i) { 538 - irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL; 539 - irq_desc[i].chip = &sable_lynx_irq_type; 538 + irq_desc[i].status |= IRQ_LEVEL; 539 + set_irq_chip_and_handler(i, &sable_lynx_irq_type, 540 + alpha_do_IRQ); 540 541 } 541 542 542 543 common_init_isa_dma();
+2 -2
arch/alpha/kernel/sys_takara.c
··· 153 153 takara_update_irq_hw(i, -1); 154 154 155 155 for (i = 16; i < 128; ++i) { 156 - irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL; 157 - irq_desc[i].chip = &takara_irq_type; 156 + irq_desc[i].status |= IRQ_LEVEL; 157 + set_irq_chip_and_handler(i, &takara_irq_type, alpha_do_IRQ); 158 158 } 159 159 160 160 common_init_isa_dma();
+2 -2
arch/alpha/kernel/sys_titan.c
··· 189 189 { 190 190 long i; 191 191 for (i = imin; i <= imax; ++i) { 192 - irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL; 193 - irq_desc[i].chip = ops; 192 + irq_desc[i].status |= IRQ_LEVEL; 193 + set_irq_chip_and_handler(i, ops, alpha_do_IRQ); 194 194 } 195 195 } 196 196
+8 -6
arch/alpha/kernel/sys_wildfire.c
··· 198 198 for (i = 0; i < 16; ++i) { 199 199 if (i == 2) 200 200 continue; 201 - irq_desc[i+irq_bias].status = IRQ_DISABLED | IRQ_LEVEL; 202 - irq_desc[i+irq_bias].chip = &wildfire_irq_type; 201 + irq_desc[i+irq_bias].status |= IRQ_LEVEL; 202 + set_irq_chip_and_handler(i+irq_bias, &wildfire_irq_type, 203 + alpha_do_IRQ); 203 204 } 204 205 205 - irq_desc[36+irq_bias].status = IRQ_DISABLED | IRQ_LEVEL; 206 - irq_desc[36+irq_bias].chip = &wildfire_irq_type; 206 + irq_desc[36+irq_bias].status |= IRQ_LEVEL; 207 + set_irq_chip_and_handler(36+irq_bias, &wildfire_irq_type, alpha_do_IRQ); 207 208 for (i = 40; i < 64; ++i) { 208 - irq_desc[i+irq_bias].status = IRQ_DISABLED | IRQ_LEVEL; 209 - irq_desc[i+irq_bias].chip = &wildfire_irq_type; 209 + irq_desc[i+irq_bias].status |= IRQ_LEVEL; 210 + set_irq_chip_and_handler(i+irq_bias, &wildfire_irq_type, 211 + alpha_do_IRQ); 210 212 } 211 213 212 214 setup_irq(32+irq_bias, &isa_enable);