aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/mti-malta/malta-int.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/mti-malta/malta-int.c')
-rw-r--r--arch/mips/mti-malta/malta-int.c27
1 files changed, 19 insertions, 8 deletions
diff --git a/arch/mips/mti-malta/malta-int.c b/arch/mips/mti-malta/malta-int.c
index ecc2785f7858..e4f43baa8f67 100644
--- a/arch/mips/mti-malta/malta-int.c
+++ b/arch/mips/mti-malta/malta-int.c
@@ -42,6 +42,10 @@ static unsigned int ipi_map[NR_CPUS];
42 42
43static DEFINE_RAW_SPINLOCK(mips_irq_lock); 43static DEFINE_RAW_SPINLOCK(mips_irq_lock);
44 44
45#ifdef CONFIG_MIPS_GIC_IPI
46DECLARE_BITMAP(ipi_ints, GIC_NUM_INTRS);
47#endif
48
45static inline int mips_pcibios_iack(void) 49static inline int mips_pcibios_iack(void)
46{ 50{
47 int irq; 51 int irq;
@@ -125,16 +129,22 @@ static void malta_hw0_irqdispatch(void)
125 129
126static void malta_ipi_irqdispatch(void) 130static void malta_ipi_irqdispatch(void)
127{ 131{
128 int irq; 132#ifdef CONFIG_MIPS_GIC_IPI
133 unsigned long irq;
134 DECLARE_BITMAP(pending, GIC_NUM_INTRS);
129 135
130 if (gic_compare_int()) 136 gic_get_int_mask(pending, ipi_ints);
131 do_IRQ(MIPS_GIC_IRQ_BASE); 137
138 irq = find_first_bit(pending, GIC_NUM_INTRS);
132 139
133 irq = gic_get_int(); 140 while (irq < GIC_NUM_INTRS) {
134 if (irq < 0) 141 do_IRQ(MIPS_GIC_IRQ_BASE + irq);
135 return; /* interrupt has already been cleared */
136 142
137 do_IRQ(MIPS_GIC_IRQ_BASE + irq); 143 irq = find_next_bit(pending, GIC_NUM_INTRS, irq + 1);
144 }
145#endif
146 if (gic_compare_int())
147 do_IRQ(MIPS_GIC_IRQ_BASE);
138} 148}
139 149
140static void corehi_irqdispatch(void) 150static void corehi_irqdispatch(void)
@@ -427,8 +437,9 @@ static void __init fill_ipi_map1(int baseintr, int cpu, int cpupin)
427 gic_intr_map[intr].pin = cpupin; 437 gic_intr_map[intr].pin = cpupin;
428 gic_intr_map[intr].polarity = GIC_POL_POS; 438 gic_intr_map[intr].polarity = GIC_POL_POS;
429 gic_intr_map[intr].trigtype = GIC_TRIG_EDGE; 439 gic_intr_map[intr].trigtype = GIC_TRIG_EDGE;
430 gic_intr_map[intr].flags = GIC_FLAG_IPI; 440 gic_intr_map[intr].flags = 0;
431 ipi_map[cpu] |= (1 << (cpupin + 2)); 441 ipi_map[cpu] |= (1 << (cpupin + 2));
442 bitmap_set(ipi_ints, intr, 1);
432} 443}
433 444
434static void __init fill_ipi_map(void) 445static void __init fill_ipi_map(void)