diff options
author | Paul Mundt <lethal@linux-sh.org> | 2006-09-27 18:03:34 +0900 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2006-09-27 18:03:34 +0900 |
commit | 8599cf059209de22dd3be16816b90f1aad10c74a (patch) | |
tree | 8cd5bdec25431a2797147c3eea11532ec71b6272 /arch/sh/kernel/cpu/irq | |
parent | ba463937ef75bceaf3943edf01f849257c68623a (diff) |
sh: Cleanup IRQ disabling for hardirq handlers.
The generic hardirq layer already takes care of a lot of the
appropriate locking and disabling for us, no need to duplicate
it in the handlers..
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel/cpu/irq')
-rw-r--r-- | arch/sh/kernel/cpu/irq/ipr.c | 8 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/irq/maskreg.c | 6 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/irq/pint.c | 8 |
3 files changed, 4 insertions, 18 deletions
diff --git a/arch/sh/kernel/cpu/irq/ipr.c b/arch/sh/kernel/cpu/irq/ipr.c index 00edee971bc..4c4fd4118d1 100644 --- a/arch/sh/kernel/cpu/irq/ipr.c +++ b/arch/sh/kernel/cpu/irq/ipr.c @@ -57,31 +57,27 @@ static struct hw_interrupt_type ipr_irq_type = { static void disable_ipr_irq(unsigned int irq) { - unsigned long val, flags; + unsigned long val; unsigned int addr = ipr_data[irq].addr; unsigned short mask = 0xffff ^ (0x0f << ipr_data[irq].shift); /* Set the priority in IPR to 0 */ - local_irq_save(flags); val = ctrl_inw(addr); val &= mask; ctrl_outw(val, addr); - local_irq_restore(flags); } static void enable_ipr_irq(unsigned int irq) { - unsigned long val, flags; + unsigned long val; unsigned int addr = ipr_data[irq].addr; int priority = ipr_data[irq].priority; unsigned short value = (priority << ipr_data[irq].shift); /* Set priority in IPR back to original value */ - local_irq_save(flags); val = ctrl_inw(addr); val |= value; ctrl_outw(val, addr); - local_irq_restore(flags); } static void mask_and_ack_ipr(unsigned int irq) diff --git a/arch/sh/kernel/cpu/irq/maskreg.c b/arch/sh/kernel/cpu/irq/maskreg.c index 1cc0de15e4a..492db31b3ca 100644 --- a/arch/sh/kernel/cpu/irq/maskreg.c +++ b/arch/sh/kernel/cpu/irq/maskreg.c @@ -52,32 +52,26 @@ static void shutdown_maskreg_irq(unsigned int irq) static void disable_maskreg_irq(unsigned int irq) { - unsigned long flags; unsigned short val, mask = 0x01 << irq; BUG_ON(!irq_mask_register); /* Set "irq"th bit */ - local_irq_save(flags); val = ctrl_inw(irq_mask_register); val |= mask; ctrl_outw(val, irq_mask_register); - local_irq_restore(flags); } static void enable_maskreg_irq(unsigned int irq) { - unsigned long flags; unsigned short val, mask = ~(0x01 << irq); BUG_ON(!irq_mask_register); /* Clear "irq"th bit */ - local_irq_save(flags); val = ctrl_inw(irq_mask_register); val &= mask; ctrl_outw(val, irq_mask_register); - local_irq_restore(flags); } static void mask_and_ack_maskreg(unsigned int irq) diff --git a/arch/sh/kernel/cpu/irq/pint.c b/arch/sh/kernel/cpu/irq/pint.c index 80cd8108d36..17f47b373d6 100644 --- a/arch/sh/kernel/cpu/irq/pint.c +++ b/arch/sh/kernel/cpu/irq/pint.c @@ -48,26 +48,22 @@ static struct hw_interrupt_type pint_irq_type = { static void disable_pint_irq(unsigned int irq) { - unsigned long val, flags; + unsigned long val; - local_irq_save(flags); val = ctrl_inw(INTC_INTER); val &= ~(1 << (irq - PINT_IRQ_BASE)); ctrl_outw(val, INTC_INTER); /* disable PINTn */ portcr_mask &= ~(3 << (irq - PINT_IRQ_BASE)*2); - local_irq_restore(flags); } static void enable_pint_irq(unsigned int irq) { - unsigned long val, flags; + unsigned long val; - local_irq_save(flags); val = ctrl_inw(INTC_INTER); val |= 1 << (irq - PINT_IRQ_BASE); ctrl_outw(val, INTC_INTER); /* enable PINTn */ portcr_mask |= 3 << (irq - PINT_IRQ_BASE)*2; - local_irq_restore(flags); } static void mask_and_ack_pint(unsigned int irq) |