From d5ccde0a64c3dbe954a8a13a6ba9fb3b6d7c6225 Mon Sep 17 00:00:00 2001 From: Kyle McMartin Date: Thu, 14 Oct 2010 22:31:11 -0400 Subject: 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 Signed-off-by: Kyle McMartin Signed-off-by: Matt Turner --- arch/alpha/kernel/irq_i8259.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'arch/alpha/kernel/irq_i8259.c') diff --git a/arch/alpha/kernel/irq_i8259.c b/arch/alpha/kernel/irq_i8259.c index 83a9ac2..39299fb 100644 --- a/arch/alpha/kernel/irq_i8259.c +++ b/arch/alpha/kernel/irq_i8259.c @@ -107,8 +107,7 @@ init_i8259a_irqs(void) outb(0xff, 0xA1); /* mask all of 8259A-2 */ for (i = 0; i < 16; i++) { - irq_desc[i].status = IRQ_DISABLED; - irq_desc[i].chip = &i8259a_irq_type; + set_irq_chip_and_handler(i, &i8259a_irq_type, alpha_do_IRQ); } setup_irq(2, &cascade); -- cgit v1.1 From a891b393dd7f6ed84ecee98c0eac4a808ff2cbbc Mon Sep 17 00:00:00 2001 From: Kyle McMartin Date: Thu, 14 Oct 2010 22:31:25 -0400 Subject: 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 Signed-off-by: Kyle McMartin Signed-off-by: Matt Turner --- arch/alpha/kernel/irq_i8259.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'arch/alpha/kernel/irq_i8259.c') diff --git a/arch/alpha/kernel/irq_i8259.c b/arch/alpha/kernel/irq_i8259.c index 39299fb..9e49395 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) void 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); } -- cgit v1.1 From 7d209c8110ecd49db46da786437485e8ef67f414 Mon Sep 17 00:00:00 2001 From: Kyle McMartin Date: Thu, 14 Oct 2010 22:31:34 -0400 Subject: alpha: kill off alpha_do_IRQ Good riddance... Nuke a pile of redundant handlers that the generic code takes care of as well. Tested-by: Michael Cree Signed-off-by: Kyle McMartin Signed-off-by: Matt Turner --- arch/alpha/kernel/irq_i8259.c | 26 ++++---------------------- 1 file changed, 4 insertions(+), 22 deletions(-) (limited to 'arch/alpha/kernel/irq_i8259.c') diff --git a/arch/alpha/kernel/irq_i8259.c b/arch/alpha/kernel/irq_i8259.c index 9e49395..956ea0e 100644 --- a/arch/alpha/kernel/irq_i8259.c +++ b/arch/alpha/kernel/irq_i8259.c @@ -69,29 +69,11 @@ i8259a_mask_and_ack_irq(unsigned int irq) spin_unlock(&i8259_irq_lock); } -unsigned int -i8259a_startup_irq(unsigned int irq) -{ - i8259a_enable_irq(irq); - return 0; /* never anything pending */ -} - -void -i8259a_end_irq(unsigned int irq) -{ - struct irq_desc *desc = irq_to_desc(irq); - if (desc || !(desc->status & (IRQ_DISABLED|IRQ_INPROGRESS))) - i8259a_enable_irq(irq); -} - struct irq_chip i8259a_irq_type = { .name = "XT-PIC", - .startup = i8259a_startup_irq, - .shutdown = i8259a_disable_irq, - .enable = i8259a_enable_irq, - .disable = i8259a_disable_irq, - .ack = i8259a_mask_and_ack_irq, - .end = i8259a_end_irq, + .unmask = i8259a_enable_irq, + .mask = i8259a_disable_irq, + .mask_ack = i8259a_mask_and_ack_irq, }; void __init @@ -108,7 +90,7 @@ init_i8259a_irqs(void) outb(0xff, 0xA1); /* mask all of 8259A-2 */ for (i = 0; i < 16; i++) { - set_irq_chip_and_handler(i, &i8259a_irq_type, alpha_do_IRQ); + set_irq_chip_and_handler(i, &i8259a_irq_type, handle_level_irq); } setup_irq(2, &cascade); -- cgit v1.1