Commit a891b393 authored by Kyle McMartin's avatar Kyle McMartin Committed by Matt Turner

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: default avatarMichael Cree <mcree@orcon.net.nz>
Signed-off-by: default avatarKyle McMartin <kyle@redhat.com>
Signed-off-by: default avatarMatt Turner <mattst88@gmail.com>
parent d5ccde0a
...@@ -44,10 +44,11 @@ static char irq_user_affinity[NR_IRQS]; ...@@ -44,10 +44,11 @@ static char irq_user_affinity[NR_IRQS];
int irq_select_affinity(unsigned int irq) int irq_select_affinity(unsigned int irq)
{ {
struct irq_desc *desc = irq_to_desc[irq];
static int last_cpu; static int last_cpu;
int cpu = last_cpu + 1; int cpu = last_cpu + 1;
if (!irq_desc[irq].chip->set_affinity || irq_user_affinity[irq]) if (!desc || !get_irq_desc_chip(desc)->set_affinity || irq_user_affinity[irq])
return 1; return 1;
while (!cpu_possible(cpu) || while (!cpu_possible(cpu) ||
...@@ -55,8 +56,8 @@ int irq_select_affinity(unsigned int irq) ...@@ -55,8 +56,8 @@ int irq_select_affinity(unsigned int irq)
cpu = (cpu < (NR_CPUS-1) ? cpu + 1 : 0); cpu = (cpu < (NR_CPUS-1) ? cpu + 1 : 0);
last_cpu = cpu; last_cpu = cpu;
cpumask_copy(irq_desc[irq].affinity, cpumask_of(cpu)); cpumask_copy(desc->affinity, cpumask_of(cpu));
irq_desc[irq].chip->set_affinity(irq, cpumask_of(cpu)); get_irq_desc_chip(desc)->set_affinity(irq, cpumask_of(cpu));
return 0; return 0;
} }
#endif /* CONFIG_SMP */ #endif /* CONFIG_SMP */
...@@ -67,6 +68,7 @@ show_interrupts(struct seq_file *p, void *v) ...@@ -67,6 +68,7 @@ show_interrupts(struct seq_file *p, void *v)
int j; int j;
int irq = *(loff_t *) v; int irq = *(loff_t *) v;
struct irqaction * action; struct irqaction * action;
struct irq_desc *desc;
unsigned long flags; unsigned long flags;
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
...@@ -79,8 +81,13 @@ show_interrupts(struct seq_file *p, void *v) ...@@ -79,8 +81,13 @@ show_interrupts(struct seq_file *p, void *v)
#endif #endif
if (irq < ACTUAL_NR_IRQS) { if (irq < ACTUAL_NR_IRQS) {
raw_spin_lock_irqsave(&irq_desc[irq].lock, flags); desc = irq_to_desc(irq);
action = irq_desc[irq].action;
if (!desc)
return 0;
raw_spin_lock_irqsave(&desc->lock, flags);
action = desc->action;
if (!action) if (!action)
goto unlock; goto unlock;
seq_printf(p, "%3d: ", irq); seq_printf(p, "%3d: ", irq);
...@@ -90,7 +97,7 @@ show_interrupts(struct seq_file *p, void *v) ...@@ -90,7 +97,7 @@ show_interrupts(struct seq_file *p, void *v)
for_each_online_cpu(j) for_each_online_cpu(j)
seq_printf(p, "%10u ", kstat_irqs_cpu(irq, j)); seq_printf(p, "%10u ", kstat_irqs_cpu(irq, j));
#endif #endif
seq_printf(p, " %14s", irq_desc[irq].chip->name); seq_printf(p, " %14s", get_irq_desc_chip(desc)->name);
seq_printf(p, " %c%s", seq_printf(p, " %c%s",
(action->flags & IRQF_DISABLED)?'+':' ', (action->flags & IRQF_DISABLED)?'+':' ',
action->name); action->name);
...@@ -103,7 +110,7 @@ show_interrupts(struct seq_file *p, void *v) ...@@ -103,7 +110,7 @@ show_interrupts(struct seq_file *p, void *v)
seq_putc(p, '\n'); seq_putc(p, '\n');
unlock: unlock:
raw_spin_unlock_irqrestore(&irq_desc[irq].lock, flags); raw_spin_unlock_irqrestore(&desc->lock, flags);
} else if (irq == ACTUAL_NR_IRQS) { } else if (irq == ACTUAL_NR_IRQS) {
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
seq_puts(p, "IPI: "); seq_puts(p, "IPI: ");
...@@ -142,8 +149,10 @@ handle_irq(int irq) ...@@ -142,8 +149,10 @@ handle_irq(int irq)
* handled by some other CPU. (or is disabled) * handled by some other CPU. (or is disabled)
*/ */
static unsigned int illegal_count=0; static unsigned int illegal_count=0;
struct irq_desc *desc = irq_to_desc(irq);
if ((unsigned) irq > ACTUAL_NR_IRQS && illegal_count < MAX_ILLEGAL_IRQS ) { if (!desc || ((unsigned) irq > ACTUAL_NR_IRQS &&
illegal_count < MAX_ILLEGAL_IRQS)) {
irq_err_count++; irq_err_count++;
illegal_count++; illegal_count++;
printk(KERN_CRIT "device_interrupt: invalid interrupt %d\n", printk(KERN_CRIT "device_interrupt: invalid interrupt %d\n",
...@@ -159,7 +168,7 @@ handle_irq(int irq) ...@@ -159,7 +168,7 @@ handle_irq(int irq)
* at IPL 0. * at IPL 0.
*/ */
local_irq_disable(); local_irq_disable();
generic_handle_irq(irq); generic_handle_irq_desc(irq, desc);
irq_exit(); irq_exit();
} }
......
...@@ -241,9 +241,13 @@ static struct irq_chip rtc_irq_type = { ...@@ -241,9 +241,13 @@ static struct irq_chip rtc_irq_type = {
void __init void __init
init_rtc_irq(void) init_rtc_irq(void)
{ {
irq_desc[RTC_IRQ].status = IRQ_DISABLED; struct irq_desc *desc = irq_to_desc(RTC_IRQ);
irq_desc[RTC_IRQ].chip = &rtc_irq_type;
setup_irq(RTC_IRQ, &timer_irqaction); if (desc) {
desc->status |= IRQ_DISABLED;
set_irq_chip(RTC_IRQ, &rtc_irq_type);
setup_irq(RTC_IRQ, &timer_irqaction);
}
} }
/* Dummy irqactions. */ /* Dummy irqactions. */
......
...@@ -79,7 +79,8 @@ i8259a_startup_irq(unsigned int irq) ...@@ -79,7 +79,8 @@ i8259a_startup_irq(unsigned int irq)
void void
i8259a_end_irq(unsigned int irq) i8259a_end_irq(unsigned int irq)
{ {
if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) struct irq_desc *desc = irq_to_desc(irq);
if (desc || !(desc->status & (IRQ_DISABLED|IRQ_INPROGRESS)))
i8259a_enable_irq(irq); i8259a_enable_irq(irq);
} }
......
...@@ -50,7 +50,8 @@ pyxis_startup_irq(unsigned int irq) ...@@ -50,7 +50,8 @@ pyxis_startup_irq(unsigned int irq)
static void static void
pyxis_end_irq(unsigned int irq) pyxis_end_irq(unsigned int irq)
{ {
if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) struct irq_desc *desc = irq_to_desc(irq);
if (desc || !(desc->status & (IRQ_DISABLED|IRQ_INPROGRESS)))
pyxis_enable_irq(irq); pyxis_enable_irq(irq);
} }
...@@ -120,7 +121,7 @@ init_pyxis_irqs(unsigned long ignore_mask) ...@@ -120,7 +121,7 @@ init_pyxis_irqs(unsigned long ignore_mask)
if ((ignore_mask >> i) & 1) if ((ignore_mask >> i) & 1)
continue; continue;
set_irq_chip_and_handler(i, &pyxis_irq_type, alpha_do_IRQ); set_irq_chip_and_handler(i, &pyxis_irq_type, alpha_do_IRQ);
irq_desc[i].status |= IRQ_LEVEL; irq_to_desc(i)->status |= IRQ_LEVEL;
} }
setup_irq(16+7, &isa_cascade_irqaction); setup_irq(16+7, &isa_cascade_irqaction);
......
...@@ -43,7 +43,7 @@ srm_startup_irq(unsigned int irq) ...@@ -43,7 +43,7 @@ srm_startup_irq(unsigned int irq)
static void static void
srm_end_irq(unsigned int irq) srm_end_irq(unsigned int irq)
{ {
if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) if (!(irq_to_desc(irq)->status & (IRQ_DISABLED|IRQ_INPROGRESS)))
srm_enable_irq(irq); srm_enable_irq(irq);
} }
...@@ -68,8 +68,8 @@ init_srm_irqs(long max, unsigned long ignore_mask) ...@@ -68,8 +68,8 @@ init_srm_irqs(long max, unsigned long ignore_mask)
for (i = 16; i < max; ++i) { for (i = 16; i < max; ++i) {
if (i < 64 && ((ignore_mask >> i) & 1)) if (i < 64 && ((ignore_mask >> i) & 1))
continue; continue;
irq_desc[i].status |= IRQ_LEVEL;
set_irq_chip_and_handler(i, &srm_irq_type, alpha_do_IRQ); set_irq_chip_and_handler(i, &srm_irq_type, alpha_do_IRQ);
irq_to_desc(i)->status |= IRQ_LEVEL;
} }
} }
......
...@@ -85,7 +85,7 @@ alcor_isa_mask_and_ack_irq(unsigned int irq) ...@@ -85,7 +85,7 @@ alcor_isa_mask_and_ack_irq(unsigned int irq)
static void static void
alcor_end_irq(unsigned int irq) alcor_end_irq(unsigned int irq)
{ {
if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) if (!(irq_to_desc(irq)->status & (IRQ_DISABLED|IRQ_INPROGRESS)))
alcor_enable_irq(irq); alcor_enable_irq(irq);
} }
...@@ -142,8 +142,8 @@ alcor_init_irq(void) ...@@ -142,8 +142,8 @@ alcor_init_irq(void)
on while IRQ probing. */ on while IRQ probing. */
if (i >= 16+20 && i <= 16+30) if (i >= 16+20 && i <= 16+30)
continue; continue;
irq_desc[i].status |= IRQ_LEVEL;
set_irq_chip_and_handler(i, &alcor_irq_type, alpha_do_IRQ); set_irq_chip_and_handler(i, &alcor_irq_type, alpha_do_IRQ);
irq_to_desc(i)->status |= IRQ_LEVEL;
} }
i8259a_irq_type.ack = alcor_isa_mask_and_ack_irq; i8259a_irq_type.ack = alcor_isa_mask_and_ack_irq;
......
...@@ -67,7 +67,7 @@ cabriolet_startup_irq(unsigned int irq) ...@@ -67,7 +67,7 @@ cabriolet_startup_irq(unsigned int irq)
static void static void
cabriolet_end_irq(unsigned int irq) cabriolet_end_irq(unsigned int irq)
{ {
if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) if (!(irq_to_desc(irq)->status & (IRQ_DISABLED|IRQ_INPROGRESS)))
cabriolet_enable_irq(irq); cabriolet_enable_irq(irq);
} }
...@@ -124,7 +124,7 @@ common_init_irq(void (*srm_dev_int)(unsigned long v)) ...@@ -124,7 +124,7 @@ common_init_irq(void (*srm_dev_int)(unsigned long v))
for (i = 16; i < 35; ++i) { for (i = 16; i < 35; ++i) {
set_irq_chip_and_handler(i, &cabriolet_irq_type, set_irq_chip_and_handler(i, &cabriolet_irq_type,
alpha_do_IRQ); alpha_do_IRQ);
irq_desc[i].status |= IRQ_LEVEL; irq_to_desc(i)->status |= IRQ_LEVEL;
} }
} }
......
...@@ -125,7 +125,7 @@ dp264_startup_irq(unsigned int irq) ...@@ -125,7 +125,7 @@ dp264_startup_irq(unsigned int irq)
static void static void
dp264_end_irq(unsigned int irq) dp264_end_irq(unsigned int irq)
{ {
if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) if (!(irq_to_desc(irq)->status & (IRQ_DISABLED|IRQ_INPROGRESS)))
dp264_enable_irq(irq); dp264_enable_irq(irq);
} }
...@@ -157,7 +157,7 @@ clipper_startup_irq(unsigned int irq) ...@@ -157,7 +157,7 @@ clipper_startup_irq(unsigned int irq)
static void static void
clipper_end_irq(unsigned int irq) clipper_end_irq(unsigned int irq)
{ {
if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) if (!(irq_to_desc(irq)->status & (IRQ_DISABLED|IRQ_INPROGRESS)))
clipper_enable_irq(irq); clipper_enable_irq(irq);
} }
...@@ -302,7 +302,7 @@ init_tsunami_irqs(struct irq_chip * ops, int imin, int imax) ...@@ -302,7 +302,7 @@ init_tsunami_irqs(struct irq_chip * ops, int imin, int imax)
{ {
long i; long i;
for (i = imin; i <= imax; ++i) { for (i = imin; i <= imax; ++i) {
irq_desc[i].status |= IRQ_LEVEL; irq_to_desc(i)->status |= IRQ_LEVEL;
set_irq_chip_and_handler(i, ops, alpha_do_IRQ); set_irq_chip_and_handler(i, ops, alpha_do_IRQ);
} }
} }
......
...@@ -65,7 +65,7 @@ eb64p_startup_irq(unsigned int irq) ...@@ -65,7 +65,7 @@ eb64p_startup_irq(unsigned int irq)
static void static void
eb64p_end_irq(unsigned int irq) eb64p_end_irq(unsigned int irq)
{ {
if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) if (!(irq_to_desc(irq)->status & (IRQ_DISABLED|IRQ_INPROGRESS)))
eb64p_enable_irq(irq); eb64p_enable_irq(irq);
} }
...@@ -135,7 +135,7 @@ eb64p_init_irq(void) ...@@ -135,7 +135,7 @@ eb64p_init_irq(void)
init_i8259a_irqs(); init_i8259a_irqs();
for (i = 16; i < 32; ++i) { for (i = 16; i < 32; ++i) {
irq_desc[i].status |= IRQ_LEVEL; irq_to_desc(i)->status |= IRQ_LEVEL;
set_irq_chip_and_handler(i, &eb64p_irq_type, alpha_do_IRQ); set_irq_chip_and_handler(i, &eb64p_irq_type, alpha_do_IRQ);
} }
......
...@@ -76,7 +76,7 @@ eiger_startup_irq(unsigned int irq) ...@@ -76,7 +76,7 @@ eiger_startup_irq(unsigned int irq)
static void static void
eiger_end_irq(unsigned int irq) eiger_end_irq(unsigned int irq)
{ {
if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) if (!(irq_to_desc(irq)->status & (IRQ_DISABLED|IRQ_INPROGRESS)))
eiger_enable_irq(irq); eiger_enable_irq(irq);
} }
...@@ -153,7 +153,7 @@ eiger_init_irq(void) ...@@ -153,7 +153,7 @@ eiger_init_irq(void)
init_i8259a_irqs(); init_i8259a_irqs();
for (i = 16; i < 128; ++i) { for (i = 16; i < 128; ++i) {
irq_desc[i].status |= IRQ_LEVEL; irq_to_desc(i)->status |= IRQ_LEVEL;
set_irq_chip_and_handler(i, &eiger_irq_type, alpha_do_IRQ); set_irq_chip_and_handler(i, &eiger_irq_type, alpha_do_IRQ);
} }
} }
......
...@@ -68,13 +68,7 @@ jensen_local_startup(unsigned int irq) ...@@ -68,13 +68,7 @@ jensen_local_startup(unsigned int irq)
/* the parport is really hw IRQ 1, silly Jensen. */ /* the parport is really hw IRQ 1, silly Jensen. */
if (irq == 7) if (irq == 7)
i8259a_startup_irq(1); i8259a_startup_irq(1);
else
/*
* For all true local interrupts, set the flag that prevents
* the IPL from being dropped during handler processing.
*/
if (irq_desc[irq].action)
irq_desc[irq].action->flags |= IRQF_DISABLED;
return 0; return 0;
} }
...@@ -158,7 +152,7 @@ jensen_device_interrupt(unsigned long vector) ...@@ -158,7 +152,7 @@ jensen_device_interrupt(unsigned long vector)
} }
/* If there is no handler yet... */ /* If there is no handler yet... */
if (irq_desc[irq].action == NULL) { if (!irq_has_action(irq)) {
/* If it is a local interrupt that cannot be masked... */ /* If it is a local interrupt that cannot be masked... */
if (vector >= 0x900) if (vector >= 0x900)
{ {
......
...@@ -153,7 +153,7 @@ io7_startup_irq(unsigned int irq) ...@@ -153,7 +153,7 @@ io7_startup_irq(unsigned int irq)
static void static void
io7_end_irq(unsigned int irq) io7_end_irq(unsigned int irq)
{ {
if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) if (!(irq_to_desc(irq)->status & (IRQ_DISABLED|IRQ_INPROGRESS)))
io7_enable_irq(irq); io7_enable_irq(irq);
} }
...@@ -304,7 +304,7 @@ init_io7_irqs(struct io7 *io7, ...@@ -304,7 +304,7 @@ init_io7_irqs(struct io7 *io7,
/* Set up the lsi irqs. */ /* Set up the lsi irqs. */
for (i = 0; i < 128; ++i) { for (i = 0; i < 128; ++i) {
irq_desc[base + i].status |= IRQ_LEVEL; irq_to_desc(base + i)->status |= IRQ_LEVEL;
set_irq_chip_and_handler(base + i, lsi_ops, alpha_do_IRQ); set_irq_chip_and_handler(base + i, lsi_ops, alpha_do_IRQ);
} }
...@@ -318,7 +318,7 @@ init_io7_irqs(struct io7 *io7, ...@@ -318,7 +318,7 @@ init_io7_irqs(struct io7 *io7,
/* Set up the msi irqs. */ /* Set up the msi irqs. */
for (i = 128; i < (128 + 512); ++i) { for (i = 128; i < (128 + 512); ++i) {
irq_desc[base + i].status |= IRQ_LEVEL; irq_to_desc(base + i)->status |= IRQ_LEVEL;
set_irq_chip_and_handler(base + i, msi_ops, alpha_do_IRQ); set_irq_chip_and_handler(base + i, msi_ops, alpha_do_IRQ);
} }
......
...@@ -64,7 +64,7 @@ mikasa_startup_irq(unsigned int irq) ...@@ -64,7 +64,7 @@ mikasa_startup_irq(unsigned int irq)
static void static void
mikasa_end_irq(unsigned int irq) mikasa_end_irq(unsigned int irq)
{ {
if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) if (!(irq_to_desc(irq)->status & (IRQ_DISABLED|IRQ_INPROGRESS)))
mikasa_enable_irq(irq); mikasa_enable_irq(irq);
} }
...@@ -115,7 +115,7 @@ mikasa_init_irq(void) ...@@ -115,7 +115,7 @@ mikasa_init_irq(void)
mikasa_update_irq_hw(0); mikasa_update_irq_hw(0);
for (i = 16; i < 32; ++i) { for (i = 16; i < 32; ++i) {
irq_desc[i].status |= IRQ_LEVEL; irq_to_desc(i)->status |= IRQ_LEVEL;
set_irq_chip_and_handler(i, &mikasa_irq_type, alpha_do_IRQ); set_irq_chip_and_handler(i, &mikasa_irq_type, alpha_do_IRQ);
} }
......
...@@ -69,7 +69,7 @@ noritake_startup_irq(unsigned int irq) ...@@ -69,7 +69,7 @@ noritake_startup_irq(unsigned int irq)
static void static void
noritake_end_irq(unsigned int irq) noritake_end_irq(unsigned int irq)
{ {
if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) if (!(irq_to_desc(irq)->status & (IRQ_DISABLED|IRQ_INPROGRESS)))
noritake_enable_irq(irq); noritake_enable_irq(irq);
} }
...@@ -144,7 +144,7 @@ noritake_init_irq(void) ...@@ -144,7 +144,7 @@ noritake_init_irq(void)
outw(0, 0x54c); outw(0, 0x54c);
for (i = 16; i < 48; ++i) { for (i = 16; i < 48; ++i) {
irq_desc[i].status |= IRQ_LEVEL; irq_to_desc(i)->status |= IRQ_LEVEL;
set_irq_chip_and_handler(i, &noritake_irq_type, alpha_do_IRQ); set_irq_chip_and_handler(i, &noritake_irq_type, alpha_do_IRQ);
} }
......
...@@ -131,7 +131,7 @@ rawhide_startup_irq(unsigned int irq) ...@@ -131,7 +131,7 @@ rawhide_startup_irq(unsigned int irq)
static void static void
rawhide_end_irq(unsigned int irq) rawhide_end_irq(unsigned int irq)
{ {
if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) if (!(irq_to_desc(irq)->status & (IRQ_DISABLED|IRQ_INPROGRESS)))
rawhide_enable_irq(irq); rawhide_enable_irq(irq);
} }
...@@ -194,7 +194,7 @@ rawhide_init_irq(void) ...@@ -194,7 +194,7 @@ rawhide_init_irq(void)
} }
for (i = 16; i < 128; ++i) { for (i = 16; i < 128; ++i) {
irq_desc[i].status |= IRQ_LEVEL; irq_to_desc(i)->status |= IRQ_LEVEL;
set_irq_chip_and_handler(i, &rawhide_irq_type, alpha_do_IRQ); set_irq_chip_and_handler(i, &rawhide_irq_type, alpha_do_IRQ);
} }
......
...@@ -68,7 +68,7 @@ rx164_startup_irq(unsigned int irq) ...@@ -68,7 +68,7 @@ rx164_startup_irq(unsigned int irq)
static void static void
rx164_end_irq(unsigned int irq) rx164_end_irq(unsigned int irq)
{ {
if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) if (!(irq_to_desc(irq)->status & (IRQ_DISABLED|IRQ_INPROGRESS)))
rx164_enable_irq(irq); rx164_enable_irq(irq);
} }
...@@ -116,7 +116,7 @@ rx164_init_irq(void) ...@@ -116,7 +116,7 @@ rx164_init_irq(void)
rx164_update_irq_hw(0); rx164_update_irq_hw(0);
for (i = 16; i < 40; ++i) { for (i = 16; i < 40; ++i) {
irq_desc[i].status |= IRQ_LEVEL; irq_to_desc(i)->status |= IRQ_LEVEL;
set_irq_chip_and_handler(i, &rx164_irq_type, alpha_do_IRQ); set_irq_chip_and_handler(i, &rx164_irq_type, alpha_do_IRQ);
} }
......
...@@ -484,7 +484,7 @@ sable_lynx_startup_irq(unsigned int irq) ...@@ -484,7 +484,7 @@ sable_lynx_startup_irq(unsigned int irq)
static void static void
sable_lynx_end_irq(unsigned int irq) sable_lynx_end_irq(unsigned int irq)
{ {
if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) if (!(irq_to_desc(irq)->status & (IRQ_DISABLED|IRQ_INPROGRESS)))
sable_lynx_enable_irq(irq); sable_lynx_enable_irq(irq);
} }
...@@ -535,7 +535,7 @@ sable_lynx_init_irq(int nr_of_irqs) ...@@ -535,7 +535,7 @@ sable_lynx_init_irq(int nr_of_irqs)
long i; long i;
for (i = 0; i < nr_of_irqs; ++i) { for (i = 0; i < nr_of_irqs; ++i) {
irq_desc[i].status |= IRQ_LEVEL; irq_to_desc(i)->status |= IRQ_LEVEL;
set_irq_chip_and_handler(i, &sable_lynx_irq_type, set_irq_chip_and_handler(i, &sable_lynx_irq_type,
alpha_do_IRQ); alpha_do_IRQ);
} }
......
...@@ -70,7 +70,7 @@ takara_startup_irq(unsigned int irq) ...@@ -70,7 +70,7 @@ takara_startup_irq(unsigned int irq)
static void static void
takara_end_irq(unsigned int irq) takara_end_irq(unsigned int irq)
{ {
if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) if (!(irq_to_desc(irq)->status & (IRQ_DISABLED|IRQ_INPROGRESS)))
takara_enable_irq(irq); takara_enable_irq(irq);
} }
...@@ -153,7 +153,7 @@ takara_init_irq(void) ...@@ -153,7 +153,7 @@ takara_init_irq(void)
takara_update_irq_hw(i, -1); takara_update_irq_hw(i, -1);
for (i = 16; i < 128; ++i) { for (i = 16; i < 128; ++i) {
irq_desc[i].status |= IRQ_LEVEL; irq_to_desc(i)->status |= IRQ_LEVEL;
set_irq_chip_and_handler(i, &takara_irq_type, alpha_do_IRQ); set_irq_chip_and_handler(i, &takara_irq_type, alpha_do_IRQ);
} }
......
...@@ -139,7 +139,7 @@ titan_startup_irq(unsigned int irq) ...@@ -139,7 +139,7 @@ titan_startup_irq(unsigned int irq)
static void static void
titan_end_irq(unsigned int irq) titan_end_irq(unsigned int irq)
{ {
if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) if (!(irq_to_desc(irq)->status & (IRQ_DISABLED|IRQ_INPROGRESS)))
titan_enable_irq(irq); titan_enable_irq(irq);
} }
...@@ -189,7 +189,7 @@ init_titan_irqs(struct irq_chip * ops, int imin, int imax) ...@@ -189,7 +189,7 @@ init_titan_irqs(struct irq_chip * ops, int imin, int imax)
{ {
long i; long i;
for (i = imin; i <= imax; ++i) { for (i = imin; i <= imax; ++i) {
irq_desc[i].status |= IRQ_LEVEL; irq_to_desc(i)->status |= IRQ_LEVEL;
set_irq_chip_and_handler(i, ops, alpha_do_IRQ); set_irq_chip_and_handler(i, ops, alpha_do_IRQ);
} }
} }
......
...@@ -150,10 +150,10 @@ static void ...@@ -150,10 +150,10 @@ static void
wildfire_end_irq(unsigned int irq) wildfire_end_irq(unsigned int irq)
{ {
#if 0 #if 0
if (!irq_desc[irq].action) if (!irq_has_action(irq))
printk("got irq %d\n", irq); printk("got irq %d\n", irq);
#endif #endif
if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) if (!(irq_to_desc(irq)->status & (IRQ_DISABLED|IRQ_INPROGRESS)))
wildfire_enable_irq(irq); wildfire_enable_irq(irq);
} }
...@@ -198,15 +198,15 @@ wildfire_init_irq_per_pca(int qbbno, int pcano) ...@@ -198,15 +198,15 @@ wildfire_init_irq_per_pca(int qbbno, int pcano)
for (i = 0; i < 16; ++i) { for (i = 0; i < 16; ++i) {
if (i == 2) if (i == 2)
continue; continue;
irq_desc[i+irq_bias].status |= IRQ_LEVEL; irq_to_desc(i+irq_bias)->status |= IRQ_LEVEL;
set_irq_chip_and_handler(i+irq_bias, &wildfire_irq_type, set_irq_chip_and_handler(i+irq_bias, &wildfire_irq_type,
alpha_do_IRQ); alpha_do_IRQ);
} }
irq_desc[36+irq_bias].status |= IRQ_LEVEL; irq_to_desc(36+irq_bias)->status |= IRQ_LEVEL;
set_irq_chip_and_handler(36+irq_bias, &wildfire_irq_type, alpha_do_IRQ); set_irq_chip_and_handler(36+irq_bias, &wildfire_irq_type, alpha_do_IRQ);
for (i = 40; i < 64; ++i) { for (i = 40; i < 64; ++i) {
irq_desc[i+irq_bias].status |= IRQ_LEVEL; irq_to_desc(i+irq_bias)->status |= IRQ_LEVEL;
set_irq_chip_and_handler(i+irq_bias, &wildfire_irq_type, set_irq_chip_and_handler(i+irq_bias, &wildfire_irq_type,
alpha_do_IRQ); alpha_do_IRQ);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment