diff options
Diffstat (limited to 'drivers/irqchip/irq-mips-gic.c')
-rw-r--r-- | drivers/irqchip/irq-mips-gic.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/drivers/irqchip/irq-mips-gic.c b/drivers/irqchip/irq-mips-gic.c index 57f09cb54464..269c2354c431 100644 --- a/drivers/irqchip/irq-mips-gic.c +++ b/drivers/irqchip/irq-mips-gic.c | |||
@@ -271,7 +271,7 @@ int gic_get_c0_fdc_int(void) | |||
271 | GIC_LOCAL_TO_HWIRQ(GIC_LOCAL_INT_FDC)); | 271 | GIC_LOCAL_TO_HWIRQ(GIC_LOCAL_INT_FDC)); |
272 | } | 272 | } |
273 | 273 | ||
274 | static void gic_handle_shared_int(void) | 274 | static void gic_handle_shared_int(bool chained) |
275 | { | 275 | { |
276 | unsigned int i, intr, virq; | 276 | unsigned int i, intr, virq; |
277 | unsigned long *pcpu_mask; | 277 | unsigned long *pcpu_mask; |
@@ -299,7 +299,10 @@ static void gic_handle_shared_int(void) | |||
299 | while (intr != gic_shared_intrs) { | 299 | while (intr != gic_shared_intrs) { |
300 | virq = irq_linear_revmap(gic_irq_domain, | 300 | virq = irq_linear_revmap(gic_irq_domain, |
301 | GIC_SHARED_TO_HWIRQ(intr)); | 301 | GIC_SHARED_TO_HWIRQ(intr)); |
302 | do_IRQ(virq); | 302 | if (chained) |
303 | generic_handle_irq(virq); | ||
304 | else | ||
305 | do_IRQ(virq); | ||
303 | 306 | ||
304 | /* go to next pending bit */ | 307 | /* go to next pending bit */ |
305 | bitmap_clear(pending, intr, 1); | 308 | bitmap_clear(pending, intr, 1); |
@@ -431,7 +434,7 @@ static struct irq_chip gic_edge_irq_controller = { | |||
431 | #endif | 434 | #endif |
432 | }; | 435 | }; |
433 | 436 | ||
434 | static void gic_handle_local_int(void) | 437 | static void gic_handle_local_int(bool chained) |
435 | { | 438 | { |
436 | unsigned long pending, masked; | 439 | unsigned long pending, masked; |
437 | unsigned int intr, virq; | 440 | unsigned int intr, virq; |
@@ -445,7 +448,10 @@ static void gic_handle_local_int(void) | |||
445 | while (intr != GIC_NUM_LOCAL_INTRS) { | 448 | while (intr != GIC_NUM_LOCAL_INTRS) { |
446 | virq = irq_linear_revmap(gic_irq_domain, | 449 | virq = irq_linear_revmap(gic_irq_domain, |
447 | GIC_LOCAL_TO_HWIRQ(intr)); | 450 | GIC_LOCAL_TO_HWIRQ(intr)); |
448 | do_IRQ(virq); | 451 | if (chained) |
452 | generic_handle_irq(virq); | ||
453 | else | ||
454 | do_IRQ(virq); | ||
449 | 455 | ||
450 | /* go to next pending bit */ | 456 | /* go to next pending bit */ |
451 | bitmap_clear(&pending, intr, 1); | 457 | bitmap_clear(&pending, intr, 1); |
@@ -509,13 +515,14 @@ static struct irq_chip gic_all_vpes_local_irq_controller = { | |||
509 | 515 | ||
510 | static void __gic_irq_dispatch(void) | 516 | static void __gic_irq_dispatch(void) |
511 | { | 517 | { |
512 | gic_handle_local_int(); | 518 | gic_handle_local_int(false); |
513 | gic_handle_shared_int(); | 519 | gic_handle_shared_int(false); |
514 | } | 520 | } |
515 | 521 | ||
516 | static void gic_irq_dispatch(unsigned int irq, struct irq_desc *desc) | 522 | static void gic_irq_dispatch(unsigned int irq, struct irq_desc *desc) |
517 | { | 523 | { |
518 | __gic_irq_dispatch(); | 524 | gic_handle_local_int(true); |
525 | gic_handle_shared_int(true); | ||
519 | } | 526 | } |
520 | 527 | ||
521 | #ifdef CONFIG_MIPS_GIC_IPI | 528 | #ifdef CONFIG_MIPS_GIC_IPI |