diff options
author | Paul Mundt <lethal@linux-sh.org> | 2006-09-27 05:03:34 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2006-09-27 05:03:34 -0400 |
commit | 8599cf059209de22dd3be16816b90f1aad10c74a (patch) | |
tree | 8cd5bdec25431a2797147c3eea11532ec71b6272 /arch/sh/cchips | |
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/cchips')
-rw-r--r-- | arch/sh/cchips/hd6446x/hd64461/setup.c | 7 | ||||
-rw-r--r-- | arch/sh/cchips/hd6446x/hd64465/setup.c | 6 | ||||
-rw-r--r-- | arch/sh/cchips/voyagergx/irq.c | 20 |
3 files changed, 6 insertions, 27 deletions
diff --git a/arch/sh/cchips/hd6446x/hd64461/setup.c b/arch/sh/cchips/hd6446x/hd64461/setup.c index 6c961273a23a..38f1e8171a3a 100644 --- a/arch/sh/cchips/hd6446x/hd64461/setup.c +++ b/arch/sh/cchips/hd6446x/hd64461/setup.c | |||
@@ -11,35 +11,28 @@ | |||
11 | #include <linux/interrupt.h> | 11 | #include <linux/interrupt.h> |
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/irq.h> | 13 | #include <linux/irq.h> |
14 | |||
15 | #include <asm/io.h> | 14 | #include <asm/io.h> |
16 | #include <asm/irq.h> | 15 | #include <asm/irq.h> |
17 | #include <asm/hd64461.h> | 16 | #include <asm/hd64461.h> |
18 | 17 | ||
19 | static void disable_hd64461_irq(unsigned int irq) | 18 | static void disable_hd64461_irq(unsigned int irq) |
20 | { | 19 | { |
21 | unsigned long flags; | ||
22 | unsigned short nimr; | 20 | unsigned short nimr; |
23 | unsigned short mask = 1 << (irq - HD64461_IRQBASE); | 21 | unsigned short mask = 1 << (irq - HD64461_IRQBASE); |
24 | 22 | ||
25 | local_irq_save(flags); | ||
26 | nimr = inw(HD64461_NIMR); | 23 | nimr = inw(HD64461_NIMR); |
27 | nimr |= mask; | 24 | nimr |= mask; |
28 | outw(nimr, HD64461_NIMR); | 25 | outw(nimr, HD64461_NIMR); |
29 | local_irq_restore(flags); | ||
30 | } | 26 | } |
31 | 27 | ||
32 | static void enable_hd64461_irq(unsigned int irq) | 28 | static void enable_hd64461_irq(unsigned int irq) |
33 | { | 29 | { |
34 | unsigned long flags; | ||
35 | unsigned short nimr; | 30 | unsigned short nimr; |
36 | unsigned short mask = 1 << (irq - HD64461_IRQBASE); | 31 | unsigned short mask = 1 << (irq - HD64461_IRQBASE); |
37 | 32 | ||
38 | local_irq_save(flags); | ||
39 | nimr = inw(HD64461_NIMR); | 33 | nimr = inw(HD64461_NIMR); |
40 | nimr &= ~mask; | 34 | nimr &= ~mask; |
41 | outw(nimr, HD64461_NIMR); | 35 | outw(nimr, HD64461_NIMR); |
42 | local_irq_restore(flags); | ||
43 | } | 36 | } |
44 | 37 | ||
45 | static void mask_and_ack_hd64461(unsigned int irq) | 38 | static void mask_and_ack_hd64461(unsigned int irq) |
diff --git a/arch/sh/cchips/hd6446x/hd64465/setup.c b/arch/sh/cchips/hd6446x/hd64465/setup.c index d2b2851bc44b..30573d3e1966 100644 --- a/arch/sh/cchips/hd6446x/hd64465/setup.c +++ b/arch/sh/cchips/hd6446x/hd64465/setup.c | |||
@@ -25,31 +25,25 @@ | |||
25 | 25 | ||
26 | static void disable_hd64465_irq(unsigned int irq) | 26 | static void disable_hd64465_irq(unsigned int irq) |
27 | { | 27 | { |
28 | unsigned long flags; | ||
29 | unsigned short nimr; | 28 | unsigned short nimr; |
30 | unsigned short mask = 1 << (irq - HD64465_IRQ_BASE); | 29 | unsigned short mask = 1 << (irq - HD64465_IRQ_BASE); |
31 | 30 | ||
32 | pr_debug("disable_hd64465_irq(%d): mask=%x\n", irq, mask); | 31 | pr_debug("disable_hd64465_irq(%d): mask=%x\n", irq, mask); |
33 | local_irq_save(flags); | ||
34 | nimr = inw(HD64465_REG_NIMR); | 32 | nimr = inw(HD64465_REG_NIMR); |
35 | nimr |= mask; | 33 | nimr |= mask; |
36 | outw(nimr, HD64465_REG_NIMR); | 34 | outw(nimr, HD64465_REG_NIMR); |
37 | local_irq_restore(flags); | ||
38 | } | 35 | } |
39 | 36 | ||
40 | 37 | ||
41 | static void enable_hd64465_irq(unsigned int irq) | 38 | static void enable_hd64465_irq(unsigned int irq) |
42 | { | 39 | { |
43 | unsigned long flags; | ||
44 | unsigned short nimr; | 40 | unsigned short nimr; |
45 | unsigned short mask = 1 << (irq - HD64465_IRQ_BASE); | 41 | unsigned short mask = 1 << (irq - HD64465_IRQ_BASE); |
46 | 42 | ||
47 | pr_debug("enable_hd64465_irq(%d): mask=%x\n", irq, mask); | 43 | pr_debug("enable_hd64465_irq(%d): mask=%x\n", irq, mask); |
48 | local_irq_save(flags); | ||
49 | nimr = inw(HD64465_REG_NIMR); | 44 | nimr = inw(HD64465_REG_NIMR); |
50 | nimr &= ~mask; | 45 | nimr &= ~mask; |
51 | outw(nimr, HD64465_REG_NIMR); | 46 | outw(nimr, HD64465_REG_NIMR); |
52 | local_irq_restore(flags); | ||
53 | } | 47 | } |
54 | 48 | ||
55 | 49 | ||
diff --git a/arch/sh/cchips/voyagergx/irq.c b/arch/sh/cchips/voyagergx/irq.c index 4cfa7c990553..392c8b12ce36 100644 --- a/arch/sh/cchips/voyagergx/irq.c +++ b/arch/sh/cchips/voyagergx/irq.c | |||
@@ -36,32 +36,26 @@ | |||
36 | 36 | ||
37 | static void disable_voyagergx_irq(unsigned int irq) | 37 | static void disable_voyagergx_irq(unsigned int irq) |
38 | { | 38 | { |
39 | unsigned long flags, val; | 39 | unsigned long val; |
40 | unsigned long mask = 1 << (irq - VOYAGER_IRQ_BASE); | 40 | unsigned long mask = 1 << (irq - VOYAGER_IRQ_BASE); |
41 | 41 | ||
42 | pr_debug("disable_voyagergx_irq(%d): mask=%x\n", irq, mask); | 42 | pr_debug("disable_voyagergx_irq(%d): mask=%x\n", irq, mask); |
43 | local_irq_save(flags); | ||
44 | val = inl(VOYAGER_INT_MASK); | 43 | val = inl(VOYAGER_INT_MASK); |
45 | val &= ~mask; | 44 | val &= ~mask; |
46 | outl(val, VOYAGER_INT_MASK); | 45 | outl(val, VOYAGER_INT_MASK); |
47 | local_irq_restore(flags); | ||
48 | } | 46 | } |
49 | 47 | ||
50 | |||
51 | static void enable_voyagergx_irq(unsigned int irq) | 48 | static void enable_voyagergx_irq(unsigned int irq) |
52 | { | 49 | { |
53 | unsigned long flags, val; | 50 | unsigned long val; |
54 | unsigned long mask = 1 << (irq - VOYAGER_IRQ_BASE); | 51 | unsigned long mask = 1 << (irq - VOYAGER_IRQ_BASE); |
55 | 52 | ||
56 | pr_debug("disable_voyagergx_irq(%d): mask=%x\n", irq, mask); | 53 | pr_debug("disable_voyagergx_irq(%d): mask=%x\n", irq, mask); |
57 | local_irq_save(flags); | ||
58 | val = inl(VOYAGER_INT_MASK); | 54 | val = inl(VOYAGER_INT_MASK); |
59 | val |= mask; | 55 | val |= mask; |
60 | outl(val, VOYAGER_INT_MASK); | 56 | outl(val, VOYAGER_INT_MASK); |
61 | local_irq_restore(flags); | ||
62 | } | 57 | } |
63 | 58 | ||
64 | |||
65 | static void mask_and_ack_voyagergx(unsigned int irq) | 59 | static void mask_and_ack_voyagergx(unsigned int irq) |
66 | { | 60 | { |
67 | disable_voyagergx_irq(irq); | 61 | disable_voyagergx_irq(irq); |
@@ -94,7 +88,8 @@ static struct hw_interrupt_type voyagergx_irq_type = { | |||
94 | .end = end_voyagergx_irq, | 88 | .end = end_voyagergx_irq, |
95 | }; | 89 | }; |
96 | 90 | ||
97 | static irqreturn_t voyagergx_interrupt(int irq, void *dev_id, struct pt_regs *regs) | 91 | static irqreturn_t voyagergx_interrupt(int irq, void *dev_id, |
92 | struct pt_regs *regs) | ||
98 | { | 93 | { |
99 | printk(KERN_INFO | 94 | printk(KERN_INFO |
100 | "VoyagerGX: spurious interrupt, status: 0x%x\n", | 95 | "VoyagerGX: spurious interrupt, status: 0x%x\n", |
@@ -102,9 +97,6 @@ static irqreturn_t voyagergx_interrupt(int irq, void *dev_id, struct pt_regs *re | |||
102 | return IRQ_HANDLED; | 97 | return IRQ_HANDLED; |
103 | } | 98 | } |
104 | 99 | ||
105 | |||
106 | /*====================================================*/ | ||
107 | |||
108 | static struct { | 100 | static struct { |
109 | int (*func)(int, void *); | 101 | int (*func)(int, void *); |
110 | void *dev; | 102 | void *dev; |