aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKyle McMartin <kyle@redhat.com>2010-10-14 22:31:25 -0400
committerMatt Turner <mattst88@monolith.freenet-rz.de>2011-01-16 23:42:12 -0500
commita891b393dd7f6ed84ecee98c0eac4a808ff2cbbc (patch)
treeab4ee31ef54691f492e77dfc2d937f62c055cb1a
parentd5ccde0a64c3dbe954a8a13a6ba9fb3b6d7c6225 (diff)
alpha: irq clean up
Stop touching irq_desc[irq] directly, instead use accessor functions provided. Use irq_has_action instead of directly testing the irq_desc. Tested-by: Michael Cree <mcree@orcon.net.nz> Signed-off-by: Kyle McMartin <kyle@redhat.com> Signed-off-by: Matt Turner <mattst88@gmail.com>
-rw-r--r--arch/alpha/kernel/irq.c27
-rw-r--r--arch/alpha/kernel/irq_alpha.c10
-rw-r--r--arch/alpha/kernel/irq_i8259.c3
-rw-r--r--arch/alpha/kernel/irq_pyxis.c5
-rw-r--r--arch/alpha/kernel/irq_srm.c4
-rw-r--r--arch/alpha/kernel/sys_alcor.c4
-rw-r--r--arch/alpha/kernel/sys_cabriolet.c4
-rw-r--r--arch/alpha/kernel/sys_dp264.c6
-rw-r--r--arch/alpha/kernel/sys_eb64p.c4
-rw-r--r--arch/alpha/kernel/sys_eiger.c4
-rw-r--r--arch/alpha/kernel/sys_jensen.c10
-rw-r--r--arch/alpha/kernel/sys_marvel.c6
-rw-r--r--arch/alpha/kernel/sys_mikasa.c4
-rw-r--r--arch/alpha/kernel/sys_noritake.c4
-rw-r--r--arch/alpha/kernel/sys_rawhide.c4
-rw-r--r--arch/alpha/kernel/sys_rx164.c4
-rw-r--r--arch/alpha/kernel/sys_sable.c4
-rw-r--r--arch/alpha/kernel/sys_takara.c4
-rw-r--r--arch/alpha/kernel/sys_titan.c4
-rw-r--r--arch/alpha/kernel/sys_wildfire.c10
20 files changed, 67 insertions, 58 deletions
diff --git a/arch/alpha/kernel/irq.c b/arch/alpha/kernel/irq.c
index ecfa51eafd7..cea8913e74b 100644
--- a/arch/alpha/kernel/irq.c
+++ b/arch/alpha/kernel/irq.c
@@ -44,10 +44,11 @@ static char irq_user_affinity[NR_IRQS];
44 44
45int irq_select_affinity(unsigned int irq) 45int irq_select_affinity(unsigned int irq)
46{ 46{
47 struct irq_desc *desc = irq_to_desc[irq];
47 static int last_cpu; 48 static int last_cpu;
48 int cpu = last_cpu + 1; 49 int cpu = last_cpu + 1;
49 50
50 if (!irq_desc[irq].chip->set_affinity || irq_user_affinity[irq]) 51 if (!desc || !get_irq_desc_chip(desc)->set_affinity || irq_user_affinity[irq])
51 return 1; 52 return 1;
52 53
53 while (!cpu_possible(cpu) || 54 while (!cpu_possible(cpu) ||
@@ -55,8 +56,8 @@ int irq_select_affinity(unsigned int irq)
55 cpu = (cpu < (NR_CPUS-1) ? cpu + 1 : 0); 56 cpu = (cpu < (NR_CPUS-1) ? cpu + 1 : 0);
56 last_cpu = cpu; 57 last_cpu = cpu;
57 58
58 cpumask_copy(irq_desc[irq].affinity, cpumask_of(cpu)); 59 cpumask_copy(desc->affinity, cpumask_of(cpu));
59 irq_desc[irq].chip->set_affinity(irq, cpumask_of(cpu)); 60 get_irq_desc_chip(desc)->set_affinity(irq, cpumask_of(cpu));
60 return 0; 61 return 0;
61} 62}
62#endif /* CONFIG_SMP */ 63#endif /* CONFIG_SMP */
@@ -67,6 +68,7 @@ show_interrupts(struct seq_file *p, void *v)
67 int j; 68 int j;
68 int irq = *(loff_t *) v; 69 int irq = *(loff_t *) v;
69 struct irqaction * action; 70 struct irqaction * action;
71 struct irq_desc *desc;
70 unsigned long flags; 72 unsigned long flags;
71 73
72#ifdef CONFIG_SMP 74#ifdef CONFIG_SMP
@@ -79,8 +81,13 @@ show_interrupts(struct seq_file *p, void *v)
79#endif 81#endif
80 82
81 if (irq < ACTUAL_NR_IRQS) { 83 if (irq < ACTUAL_NR_IRQS) {
82 raw_spin_lock_irqsave(&irq_desc[irq].lock, flags); 84 desc = irq_to_desc(irq);
83 action = irq_desc[irq].action; 85
86 if (!desc)
87 return 0;
88
89 raw_spin_lock_irqsave(&desc->lock, flags);
90 action = desc->action;
84 if (!action) 91 if (!action)
85 goto unlock; 92 goto unlock;
86 seq_printf(p, "%3d: ", irq); 93 seq_printf(p, "%3d: ", irq);
@@ -90,7 +97,7 @@ show_interrupts(struct seq_file *p, void *v)
90 for_each_online_cpu(j) 97 for_each_online_cpu(j)
91 seq_printf(p, "%10u ", kstat_irqs_cpu(irq, j)); 98 seq_printf(p, "%10u ", kstat_irqs_cpu(irq, j));
92#endif 99#endif
93 seq_printf(p, " %14s", irq_desc[irq].chip->name); 100 seq_printf(p, " %14s", get_irq_desc_chip(desc)->name);
94 seq_printf(p, " %c%s", 101 seq_printf(p, " %c%s",
95 (action->flags & IRQF_DISABLED)?'+':' ', 102 (action->flags & IRQF_DISABLED)?'+':' ',
96 action->name); 103 action->name);
@@ -103,7 +110,7 @@ show_interrupts(struct seq_file *p, void *v)
103 110
104 seq_putc(p, '\n'); 111 seq_putc(p, '\n');
105unlock: 112unlock:
106 raw_spin_unlock_irqrestore(&irq_desc[irq].lock, flags); 113 raw_spin_unlock_irqrestore(&desc->lock, flags);
107 } else if (irq == ACTUAL_NR_IRQS) { 114 } else if (irq == ACTUAL_NR_IRQS) {
108#ifdef CONFIG_SMP 115#ifdef CONFIG_SMP
109 seq_puts(p, "IPI: "); 116 seq_puts(p, "IPI: ");
@@ -142,8 +149,10 @@ handle_irq(int irq)
142 * handled by some other CPU. (or is disabled) 149 * handled by some other CPU. (or is disabled)
143 */ 150 */
144 static unsigned int illegal_count=0; 151 static unsigned int illegal_count=0;
152 struct irq_desc *desc = irq_to_desc(irq);
145 153
146 if ((unsigned) irq > ACTUAL_NR_IRQS && illegal_count < MAX_ILLEGAL_IRQS ) { 154 if (!desc || ((unsigned) irq > ACTUAL_NR_IRQS &&
155 illegal_count < MAX_ILLEGAL_IRQS)) {
147 irq_err_count++; 156 irq_err_count++;
148 illegal_count++; 157 illegal_count++;
149 printk(KERN_CRIT "device_interrupt: invalid interrupt %d\n", 158 printk(KERN_CRIT "device_interrupt: invalid interrupt %d\n",
@@ -159,7 +168,7 @@ handle_irq(int irq)
159 * at IPL 0. 168 * at IPL 0.
160 */ 169 */
161 local_irq_disable(); 170 local_irq_disable();
162 generic_handle_irq(irq); 171 generic_handle_irq_desc(irq, desc);
163 irq_exit(); 172 irq_exit();
164} 173}
165 174
diff --git a/arch/alpha/kernel/irq_alpha.c b/arch/alpha/kernel/irq_alpha.c
index 4c8bb374eb0..1b2c8bb8146 100644
--- a/arch/alpha/kernel/irq_alpha.c
+++ b/arch/alpha/kernel/irq_alpha.c
@@ -241,9 +241,13 @@ static struct irq_chip rtc_irq_type = {
241void __init 241void __init
242init_rtc_irq(void) 242init_rtc_irq(void)
243{ 243{
244 irq_desc[RTC_IRQ].status = IRQ_DISABLED; 244 struct irq_desc *desc = irq_to_desc(RTC_IRQ);
245 irq_desc[RTC_IRQ].chip = &rtc_irq_type; 245
246 setup_irq(RTC_IRQ, &timer_irqaction); 246 if (desc) {
247 desc->status |= IRQ_DISABLED;
248 set_irq_chip(RTC_IRQ, &rtc_irq_type);
249 setup_irq(RTC_IRQ, &timer_irqaction);
250 }
247} 251}
248 252
249/* Dummy irqactions. */ 253/* Dummy irqactions. */
diff --git a/arch/alpha/kernel/irq_i8259.c b/arch/alpha/kernel/irq_i8259.c
index 39299fbb637..9e493958895 100644
--- a/arch/alpha/kernel/irq_i8259.c
+++ b/arch/alpha/kernel/irq_i8259.c
@@ -79,7 +79,8 @@ i8259a_startup_irq(unsigned int irq)
79void 79void
80i8259a_end_irq(unsigned int irq) 80i8259a_end_irq(unsigned int irq)
81{ 81{
82 if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) 82 struct irq_desc *desc = irq_to_desc(irq);
83 if (desc || !(desc->status & (IRQ_DISABLED|IRQ_INPROGRESS)))
83 i8259a_enable_irq(irq); 84 i8259a_enable_irq(irq);
84} 85}
85 86
diff --git a/arch/alpha/kernel/irq_pyxis.c b/arch/alpha/kernel/irq_pyxis.c
index 4e1904cd0fc..9f603cfd440 100644
--- a/arch/alpha/kernel/irq_pyxis.c
+++ b/arch/alpha/kernel/irq_pyxis.c
@@ -50,7 +50,8 @@ pyxis_startup_irq(unsigned int irq)
50static void 50static void
51pyxis_end_irq(unsigned int irq) 51pyxis_end_irq(unsigned int irq)
52{ 52{
53 if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) 53 struct irq_desc *desc = irq_to_desc(irq);
54 if (desc || !(desc->status & (IRQ_DISABLED|IRQ_INPROGRESS)))
54 pyxis_enable_irq(irq); 55 pyxis_enable_irq(irq);
55} 56}
56 57
@@ -120,7 +121,7 @@ init_pyxis_irqs(unsigned long ignore_mask)
120 if ((ignore_mask >> i) & 1) 121 if ((ignore_mask >> i) & 1)
121 continue; 122 continue;
122 set_irq_chip_and_handler(i, &pyxis_irq_type, alpha_do_IRQ); 123 set_irq_chip_and_handler(i, &pyxis_irq_type, alpha_do_IRQ);
123 irq_desc[i].status |= IRQ_LEVEL; 124 irq_to_desc(i)->status |= IRQ_LEVEL;
124 } 125 }
125 126
126 setup_irq(16+7, &isa_cascade_irqaction); 127 setup_irq(16+7, &isa_cascade_irqaction);
diff --git a/arch/alpha/kernel/irq_srm.c b/arch/alpha/kernel/irq_srm.c
index b337cfc9d6b..ea790069dfb 100644
--- a/arch/alpha/kernel/irq_srm.c
+++ b/arch/alpha/kernel/irq_srm.c
@@ -43,7 +43,7 @@ srm_startup_irq(unsigned int irq)
43static void 43static void
44srm_end_irq(unsigned int irq) 44srm_end_irq(unsigned int irq)
45{ 45{
46 if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) 46 if (!(irq_to_desc(irq)->status & (IRQ_DISABLED|IRQ_INPROGRESS)))
47 srm_enable_irq(irq); 47 srm_enable_irq(irq);
48} 48}
49 49
@@ -68,8 +68,8 @@ init_srm_irqs(long max, unsigned long ignore_mask)
68 for (i = 16; i < max; ++i) { 68 for (i = 16; i < max; ++i) {
69 if (i < 64 && ((ignore_mask >> i) & 1)) 69 if (i < 64 && ((ignore_mask >> i) & 1))
70 continue; 70 continue;
71 irq_desc[i].status |= IRQ_LEVEL;
72 set_irq_chip_and_handler(i, &srm_irq_type, alpha_do_IRQ); 71 set_irq_chip_and_handler(i, &srm_irq_type, alpha_do_IRQ);
72 irq_to_desc(i)->status |= IRQ_LEVEL;
73 } 73 }
74} 74}
75 75
diff --git a/arch/alpha/kernel/sys_alcor.c b/arch/alpha/kernel/sys_alcor.c
index d8c918384f2..138cc155299 100644
--- a/arch/alpha/kernel/sys_alcor.c
+++ b/arch/alpha/kernel/sys_alcor.c
@@ -85,7 +85,7 @@ alcor_isa_mask_and_ack_irq(unsigned int irq)
85static void 85static void
86alcor_end_irq(unsigned int irq) 86alcor_end_irq(unsigned int irq)
87{ 87{
88 if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) 88 if (!(irq_to_desc(irq)->status & (IRQ_DISABLED|IRQ_INPROGRESS)))
89 alcor_enable_irq(irq); 89 alcor_enable_irq(irq);
90} 90}
91 91
@@ -142,8 +142,8 @@ alcor_init_irq(void)
142 on while IRQ probing. */ 142 on while IRQ probing. */
143 if (i >= 16+20 && i <= 16+30) 143 if (i >= 16+20 && i <= 16+30)
144 continue; 144 continue;
145 irq_desc[i].status |= IRQ_LEVEL;
146 set_irq_chip_and_handler(i, &alcor_irq_type, alpha_do_IRQ); 145 set_irq_chip_and_handler(i, &alcor_irq_type, alpha_do_IRQ);
146 irq_to_desc(i)->status |= IRQ_LEVEL;
147 } 147 }
148 i8259a_irq_type.ack = alcor_isa_mask_and_ack_irq; 148 i8259a_irq_type.ack = alcor_isa_mask_and_ack_irq;
149 149
diff --git a/arch/alpha/kernel/sys_cabriolet.c b/arch/alpha/kernel/sys_cabriolet.c
index ba38fcd347d..01a932b74de 100644
--- a/arch/alpha/kernel/sys_cabriolet.c
+++ b/arch/alpha/kernel/sys_cabriolet.c
@@ -67,7 +67,7 @@ cabriolet_startup_irq(unsigned int irq)
67static void 67static void
68cabriolet_end_irq(unsigned int irq) 68cabriolet_end_irq(unsigned int irq)
69{ 69{
70 if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) 70 if (!(irq_to_desc(irq)->status & (IRQ_DISABLED|IRQ_INPROGRESS)))
71 cabriolet_enable_irq(irq); 71 cabriolet_enable_irq(irq);
72} 72}
73 73
@@ -124,7 +124,7 @@ common_init_irq(void (*srm_dev_int)(unsigned long v))
124 for (i = 16; i < 35; ++i) { 124 for (i = 16; i < 35; ++i) {
125 set_irq_chip_and_handler(i, &cabriolet_irq_type, 125 set_irq_chip_and_handler(i, &cabriolet_irq_type,
126 alpha_do_IRQ); 126 alpha_do_IRQ);
127 irq_desc[i].status |= IRQ_LEVEL; 127 irq_to_desc(i)->status |= IRQ_LEVEL;
128 } 128 }
129 } 129 }
130 130
diff --git a/arch/alpha/kernel/sys_dp264.c b/arch/alpha/kernel/sys_dp264.c
index 147154d372e..34abb5cffa3 100644
--- a/arch/alpha/kernel/sys_dp264.c
+++ b/arch/alpha/kernel/sys_dp264.c
@@ -125,7 +125,7 @@ dp264_startup_irq(unsigned int irq)
125static void 125static void
126dp264_end_irq(unsigned int irq) 126dp264_end_irq(unsigned int irq)
127{ 127{
128 if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) 128 if (!(irq_to_desc(irq)->status & (IRQ_DISABLED|IRQ_INPROGRESS)))
129 dp264_enable_irq(irq); 129 dp264_enable_irq(irq);
130} 130}
131 131
@@ -157,7 +157,7 @@ clipper_startup_irq(unsigned int irq)
157static void 157static void
158clipper_end_irq(unsigned int irq) 158clipper_end_irq(unsigned int irq)
159{ 159{
160 if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) 160 if (!(irq_to_desc(irq)->status & (IRQ_DISABLED|IRQ_INPROGRESS)))
161 clipper_enable_irq(irq); 161 clipper_enable_irq(irq);
162} 162}
163 163
@@ -302,7 +302,7 @@ init_tsunami_irqs(struct irq_chip * ops, int imin, int imax)
302{ 302{
303 long i; 303 long i;
304 for (i = imin; i <= imax; ++i) { 304 for (i = imin; i <= imax; ++i) {
305 irq_desc[i].status |= IRQ_LEVEL; 305 irq_to_desc(i)->status |= IRQ_LEVEL;
306 set_irq_chip_and_handler(i, ops, alpha_do_IRQ); 306 set_irq_chip_and_handler(i, ops, alpha_do_IRQ);
307 } 307 }
308} 308}
diff --git a/arch/alpha/kernel/sys_eb64p.c b/arch/alpha/kernel/sys_eb64p.c
index cb309a422c0..f7a957a5575 100644
--- a/arch/alpha/kernel/sys_eb64p.c
+++ b/arch/alpha/kernel/sys_eb64p.c
@@ -65,7 +65,7 @@ eb64p_startup_irq(unsigned int irq)
65static void 65static void
66eb64p_end_irq(unsigned int irq) 66eb64p_end_irq(unsigned int irq)
67{ 67{
68 if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) 68 if (!(irq_to_desc(irq)->status & (IRQ_DISABLED|IRQ_INPROGRESS)))
69 eb64p_enable_irq(irq); 69 eb64p_enable_irq(irq);
70} 70}
71 71
@@ -135,7 +135,7 @@ eb64p_init_irq(void)
135 init_i8259a_irqs(); 135 init_i8259a_irqs();
136 136
137 for (i = 16; i < 32; ++i) { 137 for (i = 16; i < 32; ++i) {
138 irq_desc[i].status |= IRQ_LEVEL; 138 irq_to_desc(i)->status |= IRQ_LEVEL;
139 set_irq_chip_and_handler(i, &eb64p_irq_type, alpha_do_IRQ); 139 set_irq_chip_and_handler(i, &eb64p_irq_type, alpha_do_IRQ);
140 } 140 }
141 141
diff --git a/arch/alpha/kernel/sys_eiger.c b/arch/alpha/kernel/sys_eiger.c
index 16a5483cb75..4f3596e248c 100644
--- a/arch/alpha/kernel/sys_eiger.c
+++ b/arch/alpha/kernel/sys_eiger.c
@@ -76,7 +76,7 @@ eiger_startup_irq(unsigned int irq)
76static void 76static void
77eiger_end_irq(unsigned int irq) 77eiger_end_irq(unsigned int irq)
78{ 78{
79 if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) 79 if (!(irq_to_desc(irq)->status & (IRQ_DISABLED|IRQ_INPROGRESS)))
80 eiger_enable_irq(irq); 80 eiger_enable_irq(irq);
81} 81}
82 82
@@ -153,7 +153,7 @@ eiger_init_irq(void)
153 init_i8259a_irqs(); 153 init_i8259a_irqs();
154 154
155 for (i = 16; i < 128; ++i) { 155 for (i = 16; i < 128; ++i) {
156 irq_desc[i].status |= IRQ_LEVEL; 156 irq_to_desc(i)->status |= IRQ_LEVEL;
157 set_irq_chip_and_handler(i, &eiger_irq_type, alpha_do_IRQ); 157 set_irq_chip_and_handler(i, &eiger_irq_type, alpha_do_IRQ);
158 } 158 }
159} 159}
diff --git a/arch/alpha/kernel/sys_jensen.c b/arch/alpha/kernel/sys_jensen.c
index 5b64f913bed..460d82b5bc4 100644
--- a/arch/alpha/kernel/sys_jensen.c
+++ b/arch/alpha/kernel/sys_jensen.c
@@ -68,13 +68,7 @@ jensen_local_startup(unsigned int irq)
68 /* the parport is really hw IRQ 1, silly Jensen. */ 68 /* the parport is really hw IRQ 1, silly Jensen. */
69 if (irq == 7) 69 if (irq == 7)
70 i8259a_startup_irq(1); 70 i8259a_startup_irq(1);
71 else 71
72 /*
73 * For all true local interrupts, set the flag that prevents
74 * the IPL from being dropped during handler processing.
75 */
76 if (irq_desc[irq].action)
77 irq_desc[irq].action->flags |= IRQF_DISABLED;
78 return 0; 72 return 0;
79} 73}
80 74
@@ -158,7 +152,7 @@ jensen_device_interrupt(unsigned long vector)
158 } 152 }
159 153
160 /* If there is no handler yet... */ 154 /* If there is no handler yet... */
161 if (irq_desc[irq].action == NULL) { 155 if (!irq_has_action(irq)) {
162 /* If it is a local interrupt that cannot be masked... */ 156 /* If it is a local interrupt that cannot be masked... */
163 if (vector >= 0x900) 157 if (vector >= 0x900)
164 { 158 {
diff --git a/arch/alpha/kernel/sys_marvel.c b/arch/alpha/kernel/sys_marvel.c
index 0d0699eef08..a5095e09b80 100644
--- a/arch/alpha/kernel/sys_marvel.c
+++ b/arch/alpha/kernel/sys_marvel.c
@@ -153,7 +153,7 @@ io7_startup_irq(unsigned int irq)
153static void 153static void
154io7_end_irq(unsigned int irq) 154io7_end_irq(unsigned int irq)
155{ 155{
156 if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) 156 if (!(irq_to_desc(irq)->status & (IRQ_DISABLED|IRQ_INPROGRESS)))
157 io7_enable_irq(irq); 157 io7_enable_irq(irq);
158} 158}
159 159
@@ -304,7 +304,7 @@ init_io7_irqs(struct io7 *io7,
304 304
305 /* Set up the lsi irqs. */ 305 /* Set up the lsi irqs. */
306 for (i = 0; i < 128; ++i) { 306 for (i = 0; i < 128; ++i) {
307 irq_desc[base + i].status |= IRQ_LEVEL; 307 irq_to_desc(base + i)->status |= IRQ_LEVEL;
308 set_irq_chip_and_handler(base + i, lsi_ops, alpha_do_IRQ); 308 set_irq_chip_and_handler(base + i, lsi_ops, alpha_do_IRQ);
309 } 309 }
310 310
@@ -318,7 +318,7 @@ init_io7_irqs(struct io7 *io7,
318 318
319 /* Set up the msi irqs. */ 319 /* Set up the msi irqs. */
320 for (i = 128; i < (128 + 512); ++i) { 320 for (i = 128; i < (128 + 512); ++i) {
321 irq_desc[base + i].status |= IRQ_LEVEL; 321 irq_to_desc(base + i)->status |= IRQ_LEVEL;
322 set_irq_chip_and_handler(base + i, msi_ops, alpha_do_IRQ); 322 set_irq_chip_and_handler(base + i, msi_ops, alpha_do_IRQ);
323 } 323 }
324 324
diff --git a/arch/alpha/kernel/sys_mikasa.c b/arch/alpha/kernel/sys_mikasa.c
index a27bc56ddda..37e5c6578c8 100644
--- a/arch/alpha/kernel/sys_mikasa.c
+++ b/arch/alpha/kernel/sys_mikasa.c
@@ -64,7 +64,7 @@ mikasa_startup_irq(unsigned int irq)
64static void 64static void
65mikasa_end_irq(unsigned int irq) 65mikasa_end_irq(unsigned int irq)
66{ 66{
67 if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) 67 if (!(irq_to_desc(irq)->status & (IRQ_DISABLED|IRQ_INPROGRESS)))
68 mikasa_enable_irq(irq); 68 mikasa_enable_irq(irq);
69} 69}
70 70
@@ -115,7 +115,7 @@ mikasa_init_irq(void)
115 mikasa_update_irq_hw(0); 115 mikasa_update_irq_hw(0);
116 116
117 for (i = 16; i < 32; ++i) { 117 for (i = 16; i < 32; ++i) {
118 irq_desc[i].status |= IRQ_LEVEL; 118 irq_to_desc(i)->status |= IRQ_LEVEL;
119 set_irq_chip_and_handler(i, &mikasa_irq_type, alpha_do_IRQ); 119 set_irq_chip_and_handler(i, &mikasa_irq_type, alpha_do_IRQ);
120 } 120 }
121 121
diff --git a/arch/alpha/kernel/sys_noritake.c b/arch/alpha/kernel/sys_noritake.c
index a4f07d6c939..004f8ec1057 100644
--- a/arch/alpha/kernel/sys_noritake.c
+++ b/arch/alpha/kernel/sys_noritake.c
@@ -69,7 +69,7 @@ noritake_startup_irq(unsigned int irq)
69static void 69static void
70noritake_end_irq(unsigned int irq) 70noritake_end_irq(unsigned int irq)
71{ 71{
72 if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) 72 if (!(irq_to_desc(irq)->status & (IRQ_DISABLED|IRQ_INPROGRESS)))
73 noritake_enable_irq(irq); 73 noritake_enable_irq(irq);
74} 74}
75 75
@@ -144,7 +144,7 @@ noritake_init_irq(void)
144 outw(0, 0x54c); 144 outw(0, 0x54c);
145 145
146 for (i = 16; i < 48; ++i) { 146 for (i = 16; i < 48; ++i) {
147 irq_desc[i].status |= IRQ_LEVEL; 147 irq_to_desc(i)->status |= IRQ_LEVEL;
148 set_irq_chip_and_handler(i, &noritake_irq_type, alpha_do_IRQ); 148 set_irq_chip_and_handler(i, &noritake_irq_type, alpha_do_IRQ);
149 } 149 }
150 150
diff --git a/arch/alpha/kernel/sys_rawhide.c b/arch/alpha/kernel/sys_rawhide.c
index a63da5c6eb8..60d152a4b45 100644
--- a/arch/alpha/kernel/sys_rawhide.c
+++ b/arch/alpha/kernel/sys_rawhide.c
@@ -131,7 +131,7 @@ rawhide_startup_irq(unsigned int irq)
131static void 131static void
132rawhide_end_irq(unsigned int irq) 132rawhide_end_irq(unsigned int irq)
133{ 133{
134 if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) 134 if (!(irq_to_desc(irq)->status & (IRQ_DISABLED|IRQ_INPROGRESS)))
135 rawhide_enable_irq(irq); 135 rawhide_enable_irq(irq);
136} 136}
137 137
@@ -194,7 +194,7 @@ rawhide_init_irq(void)
194 } 194 }
195 195
196 for (i = 16; i < 128; ++i) { 196 for (i = 16; i < 128; ++i) {
197 irq_desc[i].status |= IRQ_LEVEL; 197 irq_to_desc(i)->status |= IRQ_LEVEL;
198 set_irq_chip_and_handler(i, &rawhide_irq_type, alpha_do_IRQ); 198 set_irq_chip_and_handler(i, &rawhide_irq_type, alpha_do_IRQ);
199 } 199 }
200 200
diff --git a/arch/alpha/kernel/sys_rx164.c b/arch/alpha/kernel/sys_rx164.c
index 0465716d343..8a029a91301 100644
--- a/arch/alpha/kernel/sys_rx164.c
+++ b/arch/alpha/kernel/sys_rx164.c
@@ -68,7 +68,7 @@ rx164_startup_irq(unsigned int irq)
68static void 68static void
69rx164_end_irq(unsigned int irq) 69rx164_end_irq(unsigned int irq)
70{ 70{
71 if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) 71 if (!(irq_to_desc(irq)->status & (IRQ_DISABLED|IRQ_INPROGRESS)))
72 rx164_enable_irq(irq); 72 rx164_enable_irq(irq);
73} 73}
74 74
@@ -116,7 +116,7 @@ rx164_init_irq(void)
116 116
117 rx164_update_irq_hw(0); 117 rx164_update_irq_hw(0);
118 for (i = 16; i < 40; ++i) { 118 for (i = 16; i < 40; ++i) {
119 irq_desc[i].status |= IRQ_LEVEL; 119 irq_to_desc(i)->status |= IRQ_LEVEL;
120 set_irq_chip_and_handler(i, &rx164_irq_type, alpha_do_IRQ); 120 set_irq_chip_and_handler(i, &rx164_irq_type, alpha_do_IRQ);
121 } 121 }
122 122
diff --git a/arch/alpha/kernel/sys_sable.c b/arch/alpha/kernel/sys_sable.c
index 944b598b80e..ed883156750 100644
--- a/arch/alpha/kernel/sys_sable.c
+++ b/arch/alpha/kernel/sys_sable.c
@@ -484,7 +484,7 @@ sable_lynx_startup_irq(unsigned int irq)
484static void 484static void
485sable_lynx_end_irq(unsigned int irq) 485sable_lynx_end_irq(unsigned int irq)
486{ 486{
487 if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) 487 if (!(irq_to_desc(irq)->status & (IRQ_DISABLED|IRQ_INPROGRESS)))
488 sable_lynx_enable_irq(irq); 488 sable_lynx_enable_irq(irq);
489} 489}
490 490
@@ -535,7 +535,7 @@ sable_lynx_init_irq(int nr_of_irqs)
535 long i; 535 long i;
536 536
537 for (i = 0; i < nr_of_irqs; ++i) { 537 for (i = 0; i < nr_of_irqs; ++i) {
538 irq_desc[i].status |= IRQ_LEVEL; 538 irq_to_desc(i)->status |= IRQ_LEVEL;
539 set_irq_chip_and_handler(i, &sable_lynx_irq_type, 539 set_irq_chip_and_handler(i, &sable_lynx_irq_type,
540 alpha_do_IRQ); 540 alpha_do_IRQ);
541 } 541 }
diff --git a/arch/alpha/kernel/sys_takara.c b/arch/alpha/kernel/sys_takara.c
index 00df4e7b8d7..dc3c23265ef 100644
--- a/arch/alpha/kernel/sys_takara.c
+++ b/arch/alpha/kernel/sys_takara.c
@@ -70,7 +70,7 @@ takara_startup_irq(unsigned int irq)
70static void 70static void
71takara_end_irq(unsigned int irq) 71takara_end_irq(unsigned int irq)
72{ 72{
73 if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) 73 if (!(irq_to_desc(irq)->status & (IRQ_DISABLED|IRQ_INPROGRESS)))
74 takara_enable_irq(irq); 74 takara_enable_irq(irq);
75} 75}
76 76
@@ -153,7 +153,7 @@ takara_init_irq(void)
153 takara_update_irq_hw(i, -1); 153 takara_update_irq_hw(i, -1);
154 154
155 for (i = 16; i < 128; ++i) { 155 for (i = 16; i < 128; ++i) {
156 irq_desc[i].status |= IRQ_LEVEL; 156 irq_to_desc(i)->status |= IRQ_LEVEL;
157 set_irq_chip_and_handler(i, &takara_irq_type, alpha_do_IRQ); 157 set_irq_chip_and_handler(i, &takara_irq_type, alpha_do_IRQ);
158 } 158 }
159 159
diff --git a/arch/alpha/kernel/sys_titan.c b/arch/alpha/kernel/sys_titan.c
index ffa48e8a27c..9870f3daa73 100644
--- a/arch/alpha/kernel/sys_titan.c
+++ b/arch/alpha/kernel/sys_titan.c
@@ -139,7 +139,7 @@ titan_startup_irq(unsigned int irq)
139static void 139static void
140titan_end_irq(unsigned int irq) 140titan_end_irq(unsigned int irq)
141{ 141{
142 if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) 142 if (!(irq_to_desc(irq)->status & (IRQ_DISABLED|IRQ_INPROGRESS)))
143 titan_enable_irq(irq); 143 titan_enable_irq(irq);
144} 144}
145 145
@@ -189,7 +189,7 @@ init_titan_irqs(struct irq_chip * ops, int imin, int imax)
189{ 189{
190 long i; 190 long i;
191 for (i = imin; i <= imax; ++i) { 191 for (i = imin; i <= imax; ++i) {
192 irq_desc[i].status |= IRQ_LEVEL; 192 irq_to_desc(i)->status |= IRQ_LEVEL;
193 set_irq_chip_and_handler(i, ops, alpha_do_IRQ); 193 set_irq_chip_and_handler(i, ops, alpha_do_IRQ);
194 } 194 }
195} 195}
diff --git a/arch/alpha/kernel/sys_wildfire.c b/arch/alpha/kernel/sys_wildfire.c
index ea86103f53c..f6004f05f50 100644
--- a/arch/alpha/kernel/sys_wildfire.c
+++ b/arch/alpha/kernel/sys_wildfire.c
@@ -150,10 +150,10 @@ static void
150wildfire_end_irq(unsigned int irq) 150wildfire_end_irq(unsigned int irq)
151{ 151{
152#if 0 152#if 0
153 if (!irq_desc[irq].action) 153 if (!irq_has_action(irq))
154 printk("got irq %d\n", irq); 154 printk("got irq %d\n", irq);
155#endif 155#endif
156 if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) 156 if (!(irq_to_desc(irq)->status & (IRQ_DISABLED|IRQ_INPROGRESS)))
157 wildfire_enable_irq(irq); 157 wildfire_enable_irq(irq);
158} 158}
159 159
@@ -198,15 +198,15 @@ wildfire_init_irq_per_pca(int qbbno, int pcano)
198 for (i = 0; i < 16; ++i) { 198 for (i = 0; i < 16; ++i) {
199 if (i == 2) 199 if (i == 2)
200 continue; 200 continue;
201 irq_desc[i+irq_bias].status |= IRQ_LEVEL; 201 irq_to_desc(i+irq_bias)->status |= IRQ_LEVEL;
202 set_irq_chip_and_handler(i+irq_bias, &wildfire_irq_type, 202 set_irq_chip_and_handler(i+irq_bias, &wildfire_irq_type,
203 alpha_do_IRQ); 203 alpha_do_IRQ);
204 } 204 }
205 205
206 irq_desc[36+irq_bias].status |= IRQ_LEVEL; 206 irq_to_desc(36+irq_bias)->status |= IRQ_LEVEL;
207 set_irq_chip_and_handler(36+irq_bias, &wildfire_irq_type, alpha_do_IRQ); 207 set_irq_chip_and_handler(36+irq_bias, &wildfire_irq_type, alpha_do_IRQ);
208 for (i = 40; i < 64; ++i) { 208 for (i = 40; i < 64; ++i) {
209 irq_desc[i+irq_bias].status |= IRQ_LEVEL; 209 irq_to_desc(i+irq_bias)->status |= IRQ_LEVEL;
210 set_irq_chip_and_handler(i+irq_bias, &wildfire_irq_type, 210 set_irq_chip_and_handler(i+irq_bias, &wildfire_irq_type,
211 alpha_do_IRQ); 211 alpha_do_IRQ);
212 } 212 }