···120120 if (curtp != irqtp) {121121 irqtp->task = curtp->task;122122 irqtp->flags = 0;123123- call_ppc_irq_dispatch_handler(regsParm, irq, irqtp);123123+ call___do_IRQ(irq, regsParm, irqtp);124124 irqtp->task = NULL;125125 if (irqtp->flags)126126 set_bits(irqtp->flags, &curtp->flags);127127 } else128128#endif129129- ppc_irq_dispatch_handler(regsParm, irq);129129+ __do_IRQ(irq, regsParm);130130 HvCallPci_eoi(eventParm->eventData.slotInterrupt.busNumber,131131 eventParm->eventData.slotInterrupt.subBusNumber,132132 eventParm->eventData.slotInterrupt.deviceId);···326326}327327328328/*329329- * Need to define this so ppc_irq_dispatch_handler will NOT call330330- * enable_IRQ at the end of interrupt handling. However, this does331331- * nothing because there is not enough information provided to do332332- * the EOI HvCall. This is done by XmPciLpEvent.c329329+ * This does nothing because there is not enough information330330+ * provided to do the EOI HvCall. This is done by XmPciLpEvent.c333331 */334332static void iSeries_end_IRQ(unsigned int irq)335333{
+1
arch/powerpc/platforms/pseries/xics.c
···567567568568 xics_8259_pic.enable = i8259_pic.enable;569569 xics_8259_pic.disable = i8259_pic.disable;570570+ xics_8259_pic.end = i8259_pic.end;570571 for (i = 0; i < 16; ++i)571572 get_irq_desc(i)->handler = &xics_8259_pic;572573 for (; i < NR_IRQS; ++i)
+2-106
arch/ppc64/kernel/irq.c
···144144}145145#endif146146147147-extern int noirqdebug;148148-149149-/*150150- * Eventually, this should take an array of interrupts and an array size151151- * so it can dispatch multiple interrupts.152152- */153153-void ppc_irq_dispatch_handler(struct pt_regs *regs, int irq)154154-{155155- int status;156156- struct irqaction *action;157157- int cpu = smp_processor_id();158158- irq_desc_t *desc = get_irq_desc(irq);159159- irqreturn_t action_ret;160160-161161- kstat_cpu(cpu).irqs[irq]++;162162-163163- if (desc->status & IRQ_PER_CPU) {164164- /* no locking required for CPU-local interrupts: */165165- ack_irq(irq);166166- action_ret = handle_IRQ_event(irq, regs, desc->action);167167- desc->handler->end(irq);168168- return;169169- }170170-171171- spin_lock(&desc->lock);172172- ack_irq(irq); 173173- /*174174- REPLAY is when Linux resends an IRQ that was dropped earlier175175- WAITING is used by probe to mark irqs that are being tested176176- */177177- status = desc->status & ~(IRQ_REPLAY | IRQ_WAITING);178178- status |= IRQ_PENDING; /* we _want_ to handle it */179179-180180- /*181181- * If the IRQ is disabled for whatever reason, we cannot182182- * use the action we have.183183- */184184- action = NULL;185185- if (likely(!(status & (IRQ_DISABLED | IRQ_INPROGRESS)))) {186186- action = desc->action;187187- if (!action || !action->handler) {188188- ppc_spurious_interrupts++;189189- printk(KERN_DEBUG "Unhandled interrupt %x, disabled\n", irq);190190- /* We can't call disable_irq here, it would deadlock */191191- if (!desc->depth)192192- desc->depth = 1;193193- desc->status |= IRQ_DISABLED;194194- /* This is not a real spurrious interrupt, we195195- * have to eoi it, so we jump to out196196- */197197- mask_irq(irq);198198- goto out;199199- }200200- status &= ~IRQ_PENDING; /* we commit to handling */201201- status |= IRQ_INPROGRESS; /* we are handling it */202202- }203203- desc->status = status;204204-205205- /*206206- * If there is no IRQ handler or it was disabled, exit early.207207- Since we set PENDING, if another processor is handling208208- a different instance of this same irq, the other processor209209- will take care of it.210210- */211211- if (unlikely(!action))212212- goto out;213213-214214- /*215215- * Edge triggered interrupts need to remember216216- * pending events.217217- * This applies to any hw interrupts that allow a second218218- * instance of the same irq to arrive while we are in do_IRQ219219- * or in the handler. But the code here only handles the _second_220220- * instance of the irq, not the third or fourth. So it is mostly221221- * useful for irq hardware that does not mask cleanly in an222222- * SMP environment.223223- */224224- for (;;) {225225- spin_unlock(&desc->lock);226226-227227- action_ret = handle_IRQ_event(irq, regs, action);228228-229229- spin_lock(&desc->lock);230230- if (!noirqdebug)231231- note_interrupt(irq, desc, action_ret, regs);232232- if (likely(!(desc->status & IRQ_PENDING)))233233- break;234234- desc->status &= ~IRQ_PENDING;235235- }236236-out:237237- desc->status &= ~IRQ_INPROGRESS;238238- /*239239- * The ->end() handler has to deal with interrupts which got240240- * disabled while the handler was running.241241- */242242- if (desc->handler) {243243- if (desc->handler->end)244244- desc->handler->end(irq);245245- else if (desc->handler->enable)246246- desc->handler->enable(irq);247247- }248248- spin_unlock(&desc->lock);249249-}250250-251147#ifdef CONFIG_PPC_ISERIES252148void do_IRQ(struct pt_regs *regs)253149{···221325 if (curtp != irqtp) {222326 irqtp->task = curtp->task;223327 irqtp->flags = 0;224224- call_ppc_irq_dispatch_handler(regs, irq, irqtp);328328+ call___do_IRQ(irq, regs, irqtp);225329 irqtp->task = NULL;226330 if (irqtp->flags)227331 set_bits(irqtp->flags, &curtp->flags);228332 } else229333#endif230230- ppc_irq_dispatch_handler(regs, irq);334334+ __do_IRQ(irq, regs);231335 } else232336 /* That's not SMP safe ... but who cares ? */233337 ppc_spurious_interrupts++;