aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/irq/chip.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/irq/chip.c')
-rw-r--r--kernel/irq/chip.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
index 8e4fce4a1b1f..de210f4b7a92 100644
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -353,6 +353,7 @@ handle_level_irq(unsigned int irq, struct irq_desc *desc)
353 353
354 spin_lock(&desc->lock); 354 spin_lock(&desc->lock);
355 mask_ack_irq(desc, irq); 355 mask_ack_irq(desc, irq);
356 desc = irq_remap_to_desc(irq, desc);
356 357
357 if (unlikely(desc->status & IRQ_INPROGRESS)) 358 if (unlikely(desc->status & IRQ_INPROGRESS))
358 goto out_unlock; 359 goto out_unlock;
@@ -430,6 +431,7 @@ handle_fasteoi_irq(unsigned int irq, struct irq_desc *desc)
430 desc->status &= ~IRQ_INPROGRESS; 431 desc->status &= ~IRQ_INPROGRESS;
431out: 432out:
432 desc->chip->eoi(irq); 433 desc->chip->eoi(irq);
434 desc = irq_remap_to_desc(irq, desc);
433 435
434 spin_unlock(&desc->lock); 436 spin_unlock(&desc->lock);
435} 437}
@@ -466,12 +468,14 @@ handle_edge_irq(unsigned int irq, struct irq_desc *desc)
466 !desc->action)) { 468 !desc->action)) {
467 desc->status |= (IRQ_PENDING | IRQ_MASKED); 469 desc->status |= (IRQ_PENDING | IRQ_MASKED);
468 mask_ack_irq(desc, irq); 470 mask_ack_irq(desc, irq);
471 desc = irq_remap_to_desc(irq, desc);
469 goto out_unlock; 472 goto out_unlock;
470 } 473 }
471 kstat_incr_irqs_this_cpu(irq, desc); 474 kstat_incr_irqs_this_cpu(irq, desc);
472 475
473 /* Start handling the irq */ 476 /* Start handling the irq */
474 desc->chip->ack(irq); 477 desc->chip->ack(irq);
478 desc = irq_remap_to_desc(irq, desc);
475 479
476 /* Mark the IRQ currently in progress.*/ 480 /* Mark the IRQ currently in progress.*/
477 desc->status |= IRQ_INPROGRESS; 481 desc->status |= IRQ_INPROGRESS;
@@ -532,8 +536,10 @@ handle_percpu_irq(unsigned int irq, struct irq_desc *desc)
532 if (!noirqdebug) 536 if (!noirqdebug)
533 note_interrupt(irq, desc, action_ret); 537 note_interrupt(irq, desc, action_ret);
534 538
535 if (desc->chip->eoi) 539 if (desc->chip->eoi) {
536 desc->chip->eoi(irq); 540 desc->chip->eoi(irq);
541 desc = irq_remap_to_desc(irq, desc);
542 }
537} 543}
538 544
539void 545void
@@ -568,8 +574,10 @@ __set_irq_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained,
568 574
569 /* Uninstall? */ 575 /* Uninstall? */
570 if (handle == handle_bad_irq) { 576 if (handle == handle_bad_irq) {
571 if (desc->chip != &no_irq_chip) 577 if (desc->chip != &no_irq_chip) {
572 mask_ack_irq(desc, irq); 578 mask_ack_irq(desc, irq);
579 desc = irq_remap_to_desc(irq, desc);
580 }
573 desc->status |= IRQ_DISABLED; 581 desc->status |= IRQ_DISABLED;
574 desc->depth = 1; 582 desc->depth = 1;
575 } 583 }