diff -Nru linux-2.6.10-adeos-orig/arch/ppc/kernel/adeos.c linux-2.6.10-adeos-work/arch/ppc/kernel/adeos.c --- linux-2.6.10-adeos-orig/arch/ppc/kernel/adeos.c 2005-05-25 21:22:41.289901000 +0300 +++ linux-2.6.10-adeos-work/arch/ppc/kernel/adeos.c 2005-05-25 23:23:17.954761000 +0300 @@ -65,6 +65,11 @@ struct pt_regs __adeos_irq_regs; +#ifdef CONFIG_POWER4 +extern struct irqaction k2u3_cascade_action; +extern int openpic2_get_irq(struct pt_regs *regs); +#endif + /* Current reload value for the decrementer. */ unsigned long __adeos_decr_ticks; @@ -346,7 +351,7 @@ { irq_desc_t *desc = irq_desc + irq; - + if (desc->handler->ack != NULL) { unsigned long adflags; @@ -364,7 +369,19 @@ preempt_disable(); #endif /* CONFIG_PREEMPT */ spin_lock(&desc->lock); - desc->handler->ack(irq); + desc->handler->ack(irq); +#ifdef CONFIG_POWER4 + /* if it is a k2u3 cascaded irq, acknowledge it, also */ + if (desc->action == &k2u3_cascade_action) { + struct pt_regs regs; + int irq2 = openpic2_get_irq(®s); + if (irq2 != -1) { + irq_desc_t *desc2 = irq_desc + irq2; + if (desc2->handler->ack) + desc2->handler->ack(irq2); + } + } +#endif spin_unlock(&desc->lock); #ifdef CONFIG_PREEMPT preempt_enable_no_resched(); @@ -565,6 +582,14 @@ return 1; } +#ifdef CONFIG_POWER4 + /* On 970 CPUs DEC cannot be disabled, and without setting DEC + * here, DEC interrupt would be triggered as soon as interrupts are + * enabled in __adeos_sync_stage + */ + set_dec(0x7fffffff); +#endif + __adeos_irq_regs.msr = regs->msr; /* for do_timer() */ __adeos_handle_irq(ADEOS_TIMER_VIRQ,regs); diff -Nru linux-2.6.10-adeos-orig/arch/ppc/platforms/pmac_pic.c linux-2.6.10-adeos-work/arch/ppc/platforms/pmac_pic.c --- linux-2.6.10-adeos-orig/arch/ppc/platforms/pmac_pic.c 2004-12-24 23:35:28.000000000 +0200 +++ linux-2.6.10-adeos-work/arch/ppc/platforms/pmac_pic.c 2005-05-25 23:09:37.535483000 +0300 @@ -387,7 +387,12 @@ return IRQ_HANDLED; } +#ifdef CONFIG_ADEOS_CORE +/* this is used in kernel/adeos.c adeos_acknowledge_irq */ +struct irqaction k2u3_cascade_action = { +#else /* !CONFIG_ADEOS_CORE */ static struct irqaction k2u3_cascade_action = { +#endif /* CONFIG_ADEOS_CORE */ .handler = k2u3_action, .flags = 0, .mask = CPU_MASK_NONE,