Commit 119537c0 authored by Thiemo Seufer's avatar Thiemo Seufer Committed by Ralf Baechle

[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: default avatarThiemo Seufer <ths@networkno.de>
Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent 72ede9b1
...@@ -194,7 +194,7 @@ static void vrc5477_irq_dispatch(void) ...@@ -194,7 +194,7 @@ static void vrc5477_irq_dispatch(void)
asmlinkage void plat_irq_dispatch(void) asmlinkage void plat_irq_dispatch(void)
{ {
unsigned int pending = read_c0_cause() & read_c0_status(); unsigned int pending = read_c0_cause() & read_c0_status() & ST0_IM;
if (pending & STATUSF_IP7) if (pending & STATUSF_IP7)
do_IRQ(CPU_IRQ_BASE + 7); do_IRQ(CPU_IRQ_BASE + 7);
......
...@@ -115,7 +115,7 @@ void __init arch_init_irq(void) ...@@ -115,7 +115,7 @@ void __init arch_init_irq(void)
asmlinkage void plat_irq_dispatch(void) asmlinkage void plat_irq_dispatch(void)
{ {
unsigned int pending = read_c0_status() & read_c0_cause(); unsigned int pending = read_c0_status() & read_c0_cause() & ST0_IM;
if (pending & STATUSF_IP7) if (pending & STATUSF_IP7)
do_IRQ(CPU_IRQ_BASE + 7); do_IRQ(CPU_IRQ_BASE + 7);
......
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
asmlinkage void plat_irq_dispatch(void) asmlinkage void plat_irq_dispatch(void)
{ {
unsigned int pending = read_c0_status() & read_c0_cause(); unsigned int pending = read_c0_status() & read_c0_cause() & ST0_IM;
if (pending & STATUSF_IP4) /* int2 hardware line (timer) */ if (pending & STATUSF_IP4) /* int2 hardware line (timer) */
do_IRQ(4); do_IRQ(4);
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
asmlinkage void plat_irq_dispatch(void) asmlinkage void plat_irq_dispatch(void)
{ {
unsigned int pending = read_c0_status() & read_c0_cause(); unsigned int pending = read_c0_status() & read_c0_cause() & ST0_IM;
if (pending & STATUSF_IP7) if (pending & STATUSF_IP7)
do_IRQ(WRPPMC_MIPS_TIMER_IRQ); /* CPU Compare/Count internal timer */ do_IRQ(WRPPMC_MIPS_TIMER_IRQ); /* CPU Compare/Count internal timer */
......
...@@ -122,7 +122,7 @@ static void ll_local_dev(void) ...@@ -122,7 +122,7 @@ static void ll_local_dev(void)
asmlinkage void plat_irq_dispatch(void) asmlinkage void plat_irq_dispatch(void)
{ {
unsigned int pending = read_c0_cause() & read_c0_status() & ST0_IM; unsigned int pending = read_c0_cause() & read_c0_status();
if (pending & IE_IRQ5) if (pending & IE_IRQ5)
write_c0_compare(0); write_c0_compare(0);
......
...@@ -64,7 +64,7 @@ extern void ll_cpci_irq(void); ...@@ -64,7 +64,7 @@ extern void ll_cpci_irq(void);
asmlinkage void plat_irq_dispatch(void) asmlinkage void plat_irq_dispatch(void)
{ {
unsigned int pending = read_c0_cause() & read_c0_status(); unsigned int pending = read_c0_cause() & read_c0_status() & ST0_IM;
if (pending & STATUSF_IP0) if (pending & STATUSF_IP0)
do_IRQ(0); do_IRQ(0);
......
...@@ -83,16 +83,15 @@ static void timer_irqdispatch(int irq) ...@@ -83,16 +83,15 @@ static void timer_irqdispatch(int irq)
asmlinkage void plat_irq_dispatch(void) asmlinkage void plat_irq_dispatch(void)
{ {
unsigned int pending = read_c0_status() & read_c0_cause(); unsigned int pending = read_c0_status() & read_c0_cause() & ST0_IM;
if (pending & STATUSF_IP2) if (pending & STATUSF_IP2)
hw0_irqdispatch(2); hw0_irqdispatch(2);
else if (pending & STATUSF_IP7) { else if (pending & STATUSF_IP7) {
if (read_c0_config7() & 0x01c0) if (read_c0_config7() & 0x01c0)
timer_irqdispatch(7); timer_irqdispatch(7);
} } else
spurious_interrupt();
spurious_interrupt();
} }
static inline void modify_cp0_intmask(unsigned clr_mask, unsigned set_mask) static inline void modify_cp0_intmask(unsigned clr_mask, unsigned set_mask)
......
...@@ -237,7 +237,7 @@ extern void indy_8254timer_irq(void); ...@@ -237,7 +237,7 @@ extern void indy_8254timer_irq(void);
asmlinkage void plat_irq_dispatch(void) asmlinkage void plat_irq_dispatch(void)
{ {
unsigned int pending = read_c0_cause(); unsigned int pending = read_c0_status() & read_c0_cause();
/* /*
* First we check for r4k counter/timer IRQ. * First we check for r4k counter/timer IRQ.
......
...@@ -454,7 +454,7 @@ static void ip32_irq5(void) ...@@ -454,7 +454,7 @@ static void ip32_irq5(void)
asmlinkage void plat_irq_dispatch(void) asmlinkage void plat_irq_dispatch(void)
{ {
unsigned int pending = read_c0_cause(); unsigned int pending = read_c0_status() & read_c0_cause();
if (likely(pending & IE_IRQ0)) if (likely(pending & IE_IRQ0))
ip32_irq0(); ip32_irq0();
......
...@@ -421,7 +421,7 @@ asmlinkage void plat_irq_dispatch(void) ...@@ -421,7 +421,7 @@ asmlinkage void plat_irq_dispatch(void)
* blasting the high 32 bits. * blasting the high 32 bits.
*/ */
pending = read_c0_cause() & read_c0_status(); pending = read_c0_cause() & read_c0_status() & ST0_IM;
#ifdef CONFIG_SIBYTE_SB1250_PROF #ifdef CONFIG_SIBYTE_SB1250_PROF
if (pending & CAUSEF_IP7) /* Cpu performance counter interrupt */ if (pending & CAUSEF_IP7) /* Cpu performance counter interrupt */
......
...@@ -333,7 +333,7 @@ static void pcimt_hwint3(void) ...@@ -333,7 +333,7 @@ static void pcimt_hwint3(void)
static void sni_pcimt_hwint(void) static void sni_pcimt_hwint(void)
{ {
u32 pending = (read_c0_cause() & read_c0_status()); u32 pending = read_c0_cause() & read_c0_status();
if (pending & C_IRQ5) if (pending & C_IRQ5)
do_IRQ (MIPS_CPU_IRQ_BASE + 7); do_IRQ (MIPS_CPU_IRQ_BASE + 7);
......
...@@ -271,7 +271,7 @@ static void pcit_hwint0(void) ...@@ -271,7 +271,7 @@ static void pcit_hwint0(void)
static void sni_pcit_hwint(void) static void sni_pcit_hwint(void)
{ {
u32 pending = (read_c0_cause() & read_c0_status()); u32 pending = read_c0_cause() & read_c0_status();
if (pending & C_IRQ1) if (pending & C_IRQ1)
pcit_hwint1(); pcit_hwint1();
...@@ -285,7 +285,7 @@ static void sni_pcit_hwint(void) ...@@ -285,7 +285,7 @@ static void sni_pcit_hwint(void)
static void sni_pcit_hwint_cplus(void) static void sni_pcit_hwint_cplus(void)
{ {
u32 pending = (read_c0_cause() & read_c0_status()); u32 pending = read_c0_cause() & read_c0_status();
if (pending & C_IRQ0) if (pending & C_IRQ0)
pcit_hwint0(); pcit_hwint0();
......
...@@ -416,7 +416,7 @@ static int tx4927_irq_nested(void) ...@@ -416,7 +416,7 @@ static int tx4927_irq_nested(void)
asmlinkage void plat_irq_dispatch(void) asmlinkage void plat_irq_dispatch(void)
{ {
unsigned int pending = read_c0_status() & read_c0_cause(); unsigned int pending = read_c0_status() & read_c0_cause() & ST0_IM;
if (pending & STATUSF_IP7) /* cpu timer */ if (pending & STATUSF_IP7) /* cpu timer */
do_IRQ(TX4927_IRQ_CPU_TIMER); do_IRQ(TX4927_IRQ_CPU_TIMER);
......
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