diff options
author | Thiemo Seufer <ths@networkno.de> | 2007-03-18 20:13:37 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2007-03-19 16:22:43 -0400 |
commit | 119537c092638bf8a0672415024639353c773bb1 (patch) | |
tree | af3fc85f2d5a4bf93fd1cd82b228054ac6b5fe42 /arch | |
parent | 72ede9b18967e7a8a62a88f164f003193f6d891f (diff) |
[MIPS] Misc fixes for plat_irq_dispatch functions
o adds missing ST0_IM masks, which caused the logging of valid interrupts
as spurious
o stops pnx8550 to log every interrupt as spurious
o adds cause register masks for ip22/ip32, which caused handling of masked
interrupts
o removes some superfluous parentheses in the SNI interrupt code
Signed-Off-By: Thiemo Seufer <ths@networkno.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/mips/ddb5xxx/ddb5477/irq.c | 2 | ||||
-rw-r--r-- | arch/mips/emma2rh/markeins/irq.c | 2 | ||||
-rw-r--r-- | arch/mips/gt64120/ev64120/irq.c | 2 | ||||
-rw-r--r-- | arch/mips/gt64120/wrppmc/irq.c | 2 | ||||
-rw-r--r-- | arch/mips/jazz/irq.c | 2 | ||||
-rw-r--r-- | arch/mips/momentum/ocelot_c/irq.c | 2 | ||||
-rw-r--r-- | arch/mips/philips/pnx8550/common/int.c | 7 | ||||
-rw-r--r-- | arch/mips/sgi-ip22/ip22-int.c | 2 | ||||
-rw-r--r-- | arch/mips/sgi-ip32/ip32-irq.c | 2 | ||||
-rw-r--r-- | arch/mips/sibyte/sb1250/irq.c | 2 | ||||
-rw-r--r-- | arch/mips/sni/pcimt.c | 2 | ||||
-rw-r--r-- | arch/mips/sni/pcit.c | 4 | ||||
-rw-r--r-- | arch/mips/tx4927/common/tx4927_irq.c | 2 |
13 files changed, 16 insertions, 17 deletions
diff --git a/arch/mips/ddb5xxx/ddb5477/irq.c b/arch/mips/ddb5xxx/ddb5477/irq.c index 2b23234a5b95..faa4a506bf82 100644 --- a/arch/mips/ddb5xxx/ddb5477/irq.c +++ b/arch/mips/ddb5xxx/ddb5477/irq.c | |||
@@ -194,7 +194,7 @@ static void vrc5477_irq_dispatch(void) | |||
194 | 194 | ||
195 | asmlinkage void plat_irq_dispatch(void) | 195 | asmlinkage void plat_irq_dispatch(void) |
196 | { | 196 | { |
197 | unsigned int pending = read_c0_cause() & read_c0_status(); | 197 | unsigned int pending = read_c0_cause() & read_c0_status() & ST0_IM; |
198 | 198 | ||
199 | if (pending & STATUSF_IP7) | 199 | if (pending & STATUSF_IP7) |
200 | do_IRQ(CPU_IRQ_BASE + 7); | 200 | do_IRQ(CPU_IRQ_BASE + 7); |
diff --git a/arch/mips/emma2rh/markeins/irq.c b/arch/mips/emma2rh/markeins/irq.c index e26630026375..6bcf6a06367a 100644 --- a/arch/mips/emma2rh/markeins/irq.c +++ b/arch/mips/emma2rh/markeins/irq.c | |||
@@ -115,7 +115,7 @@ void __init arch_init_irq(void) | |||
115 | 115 | ||
116 | asmlinkage void plat_irq_dispatch(void) | 116 | asmlinkage void plat_irq_dispatch(void) |
117 | { | 117 | { |
118 | unsigned int pending = read_c0_status() & read_c0_cause(); | 118 | unsigned int pending = read_c0_status() & read_c0_cause() & ST0_IM; |
119 | 119 | ||
120 | if (pending & STATUSF_IP7) | 120 | if (pending & STATUSF_IP7) |
121 | do_IRQ(CPU_IRQ_BASE + 7); | 121 | do_IRQ(CPU_IRQ_BASE + 7); |
diff --git a/arch/mips/gt64120/ev64120/irq.c b/arch/mips/gt64120/ev64120/irq.c index 04572b9c9642..64e4c80b6139 100644 --- a/arch/mips/gt64120/ev64120/irq.c +++ b/arch/mips/gt64120/ev64120/irq.c | |||
@@ -48,7 +48,7 @@ | |||
48 | 48 | ||
49 | asmlinkage void plat_irq_dispatch(void) | 49 | asmlinkage void plat_irq_dispatch(void) |
50 | { | 50 | { |
51 | unsigned int pending = read_c0_status() & read_c0_cause(); | 51 | unsigned int pending = read_c0_status() & read_c0_cause() & ST0_IM; |
52 | 52 | ||
53 | if (pending & STATUSF_IP4) /* int2 hardware line (timer) */ | 53 | if (pending & STATUSF_IP4) /* int2 hardware line (timer) */ |
54 | do_IRQ(4); | 54 | do_IRQ(4); |
diff --git a/arch/mips/gt64120/wrppmc/irq.c b/arch/mips/gt64120/wrppmc/irq.c index d3d96591780e..06177bf5b1d6 100644 --- a/arch/mips/gt64120/wrppmc/irq.c +++ b/arch/mips/gt64120/wrppmc/irq.c | |||
@@ -32,7 +32,7 @@ | |||
32 | 32 | ||
33 | asmlinkage void plat_irq_dispatch(void) | 33 | asmlinkage void plat_irq_dispatch(void) |
34 | { | 34 | { |
35 | unsigned int pending = read_c0_status() & read_c0_cause(); | 35 | unsigned int pending = read_c0_status() & read_c0_cause() & ST0_IM; |
36 | 36 | ||
37 | if (pending & STATUSF_IP7) | 37 | if (pending & STATUSF_IP7) |
38 | do_IRQ(WRPPMC_MIPS_TIMER_IRQ); /* CPU Compare/Count internal timer */ | 38 | do_IRQ(WRPPMC_MIPS_TIMER_IRQ); /* CPU Compare/Count internal timer */ |
diff --git a/arch/mips/jazz/irq.c b/arch/mips/jazz/irq.c index 295892e4ce53..015cf4bb51dd 100644 --- a/arch/mips/jazz/irq.c +++ b/arch/mips/jazz/irq.c | |||
@@ -122,7 +122,7 @@ static void ll_local_dev(void) | |||
122 | 122 | ||
123 | asmlinkage void plat_irq_dispatch(void) | 123 | asmlinkage void plat_irq_dispatch(void) |
124 | { | 124 | { |
125 | unsigned int pending = read_c0_cause() & read_c0_status() & ST0_IM; | 125 | unsigned int pending = read_c0_cause() & read_c0_status(); |
126 | 126 | ||
127 | if (pending & IE_IRQ5) | 127 | if (pending & IE_IRQ5) |
128 | write_c0_compare(0); | 128 | write_c0_compare(0); |
diff --git a/arch/mips/momentum/ocelot_c/irq.c b/arch/mips/momentum/ocelot_c/irq.c index 40472f7944d7..844d566c9de3 100644 --- a/arch/mips/momentum/ocelot_c/irq.c +++ b/arch/mips/momentum/ocelot_c/irq.c | |||
@@ -64,7 +64,7 @@ extern void ll_cpci_irq(void); | |||
64 | 64 | ||
65 | asmlinkage void plat_irq_dispatch(void) | 65 | asmlinkage void plat_irq_dispatch(void) |
66 | { | 66 | { |
67 | unsigned int pending = read_c0_cause() & read_c0_status(); | 67 | unsigned int pending = read_c0_cause() & read_c0_status() & ST0_IM; |
68 | 68 | ||
69 | if (pending & STATUSF_IP0) | 69 | if (pending & STATUSF_IP0) |
70 | do_IRQ(0); | 70 | do_IRQ(0); |
diff --git a/arch/mips/philips/pnx8550/common/int.c b/arch/mips/philips/pnx8550/common/int.c index b1c4805a0b92..aad03429a5e3 100644 --- a/arch/mips/philips/pnx8550/common/int.c +++ b/arch/mips/philips/pnx8550/common/int.c | |||
@@ -83,16 +83,15 @@ static void timer_irqdispatch(int irq) | |||
83 | 83 | ||
84 | asmlinkage void plat_irq_dispatch(void) | 84 | asmlinkage void plat_irq_dispatch(void) |
85 | { | 85 | { |
86 | unsigned int pending = read_c0_status() & read_c0_cause(); | 86 | unsigned int pending = read_c0_status() & read_c0_cause() & ST0_IM; |
87 | 87 | ||
88 | if (pending & STATUSF_IP2) | 88 | if (pending & STATUSF_IP2) |
89 | hw0_irqdispatch(2); | 89 | hw0_irqdispatch(2); |
90 | else if (pending & STATUSF_IP7) { | 90 | else if (pending & STATUSF_IP7) { |
91 | if (read_c0_config7() & 0x01c0) | 91 | if (read_c0_config7() & 0x01c0) |
92 | timer_irqdispatch(7); | 92 | timer_irqdispatch(7); |
93 | } | 93 | } else |
94 | 94 | spurious_interrupt(); | |
95 | spurious_interrupt(); | ||
96 | } | 95 | } |
97 | 96 | ||
98 | static inline void modify_cp0_intmask(unsigned clr_mask, unsigned set_mask) | 97 | static inline void modify_cp0_intmask(unsigned clr_mask, unsigned set_mask) |
diff --git a/arch/mips/sgi-ip22/ip22-int.c b/arch/mips/sgi-ip22/ip22-int.c index b454924aeb56..18348321795d 100644 --- a/arch/mips/sgi-ip22/ip22-int.c +++ b/arch/mips/sgi-ip22/ip22-int.c | |||
@@ -237,7 +237,7 @@ extern void indy_8254timer_irq(void); | |||
237 | 237 | ||
238 | asmlinkage void plat_irq_dispatch(void) | 238 | asmlinkage void plat_irq_dispatch(void) |
239 | { | 239 | { |
240 | unsigned int pending = read_c0_cause(); | 240 | unsigned int pending = read_c0_status() & read_c0_cause(); |
241 | 241 | ||
242 | /* | 242 | /* |
243 | * First we check for r4k counter/timer IRQ. | 243 | * First we check for r4k counter/timer IRQ. |
diff --git a/arch/mips/sgi-ip32/ip32-irq.c b/arch/mips/sgi-ip32/ip32-irq.c index 8c450d9e8696..fb9da9acf53f 100644 --- a/arch/mips/sgi-ip32/ip32-irq.c +++ b/arch/mips/sgi-ip32/ip32-irq.c | |||
@@ -454,7 +454,7 @@ static void ip32_irq5(void) | |||
454 | 454 | ||
455 | asmlinkage void plat_irq_dispatch(void) | 455 | asmlinkage void plat_irq_dispatch(void) |
456 | { | 456 | { |
457 | unsigned int pending = read_c0_cause(); | 457 | unsigned int pending = read_c0_status() & read_c0_cause(); |
458 | 458 | ||
459 | if (likely(pending & IE_IRQ0)) | 459 | if (likely(pending & IE_IRQ0)) |
460 | ip32_irq0(); | 460 | ip32_irq0(); |
diff --git a/arch/mips/sibyte/sb1250/irq.c b/arch/mips/sibyte/sb1250/irq.c index 148239446e6e..0e6a13c0bd0e 100644 --- a/arch/mips/sibyte/sb1250/irq.c +++ b/arch/mips/sibyte/sb1250/irq.c | |||
@@ -421,7 +421,7 @@ asmlinkage void plat_irq_dispatch(void) | |||
421 | * blasting the high 32 bits. | 421 | * blasting the high 32 bits. |
422 | */ | 422 | */ |
423 | 423 | ||
424 | pending = read_c0_cause() & read_c0_status(); | 424 | pending = read_c0_cause() & read_c0_status() & ST0_IM; |
425 | 425 | ||
426 | #ifdef CONFIG_SIBYTE_SB1250_PROF | 426 | #ifdef CONFIG_SIBYTE_SB1250_PROF |
427 | if (pending & CAUSEF_IP7) /* Cpu performance counter interrupt */ | 427 | if (pending & CAUSEF_IP7) /* Cpu performance counter interrupt */ |
diff --git a/arch/mips/sni/pcimt.c b/arch/mips/sni/pcimt.c index 39e5b4abc555..8e8593b64f6a 100644 --- a/arch/mips/sni/pcimt.c +++ b/arch/mips/sni/pcimt.c | |||
@@ -333,7 +333,7 @@ static void pcimt_hwint3(void) | |||
333 | 333 | ||
334 | static void sni_pcimt_hwint(void) | 334 | static void sni_pcimt_hwint(void) |
335 | { | 335 | { |
336 | u32 pending = (read_c0_cause() & read_c0_status()); | 336 | u32 pending = read_c0_cause() & read_c0_status(); |
337 | 337 | ||
338 | if (pending & C_IRQ5) | 338 | if (pending & C_IRQ5) |
339 | do_IRQ (MIPS_CPU_IRQ_BASE + 7); | 339 | do_IRQ (MIPS_CPU_IRQ_BASE + 7); |
diff --git a/arch/mips/sni/pcit.c b/arch/mips/sni/pcit.c index 8d6b3d5b13a1..1dfc3f00bbd3 100644 --- a/arch/mips/sni/pcit.c +++ b/arch/mips/sni/pcit.c | |||
@@ -271,7 +271,7 @@ static void pcit_hwint0(void) | |||
271 | 271 | ||
272 | static void sni_pcit_hwint(void) | 272 | static void sni_pcit_hwint(void) |
273 | { | 273 | { |
274 | u32 pending = (read_c0_cause() & read_c0_status()); | 274 | u32 pending = read_c0_cause() & read_c0_status(); |
275 | 275 | ||
276 | if (pending & C_IRQ1) | 276 | if (pending & C_IRQ1) |
277 | pcit_hwint1(); | 277 | pcit_hwint1(); |
@@ -285,7 +285,7 @@ static void sni_pcit_hwint(void) | |||
285 | 285 | ||
286 | static void sni_pcit_hwint_cplus(void) | 286 | static void sni_pcit_hwint_cplus(void) |
287 | { | 287 | { |
288 | u32 pending = (read_c0_cause() & read_c0_status()); | 288 | u32 pending = read_c0_cause() & read_c0_status(); |
289 | 289 | ||
290 | if (pending & C_IRQ0) | 290 | if (pending & C_IRQ0) |
291 | pcit_hwint0(); | 291 | pcit_hwint0(); |
diff --git a/arch/mips/tx4927/common/tx4927_irq.c b/arch/mips/tx4927/common/tx4927_irq.c index e7f3e5b84dcf..3d25d010f3d5 100644 --- a/arch/mips/tx4927/common/tx4927_irq.c +++ b/arch/mips/tx4927/common/tx4927_irq.c | |||
@@ -416,7 +416,7 @@ static int tx4927_irq_nested(void) | |||
416 | 416 | ||
417 | asmlinkage void plat_irq_dispatch(void) | 417 | asmlinkage void plat_irq_dispatch(void) |
418 | { | 418 | { |
419 | unsigned int pending = read_c0_status() & read_c0_cause(); | 419 | unsigned int pending = read_c0_status() & read_c0_cause() & ST0_IM; |
420 | 420 | ||
421 | if (pending & STATUSF_IP7) /* cpu timer */ | 421 | if (pending & STATUSF_IP7) /* cpu timer */ |
422 | do_IRQ(TX4927_IRQ_CPU_TIMER); | 422 | do_IRQ(TX4927_IRQ_CPU_TIMER); |