[PATCH] ppc64: Fix new mpic driver on some POWER3

From: Benjamin Herrenschmidt
Date: Tue Oct 26 2004 - 00:00:07 EST


Hi !

On machines using the "ISU" mecanism for the MPIC, the new driver didn't properly
calculate the new interrupt count when an ISU was added. That would cause later on
failure to request interrupts in the offending range.

Signed-off-by: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>

Index: linux-work/arch/ppc64/kernel/mpic.c
===================================================================
--- linux-work.orig/arch/ppc64/kernel/mpic.c 2004-10-26 10:32:23.000000000 +1000
+++ linux-work/arch/ppc64/kernel/mpic.c 2004-10-26 14:36:00.464755000 +1000
@@ -580,11 +580,13 @@
void __init mpic_assign_isu(struct mpic *mpic, unsigned int isu_num,
unsigned long phys_addr)
{
+ unsigned int isu_first = isu_num * mpic->isu_size;
+
BUG_ON(isu_num >= MPIC_MAX_ISU);

mpic->isus[isu_num] = ioremap(phys_addr, MPIC_IRQ_STRIDE * mpic->isu_size);
- if ((isu_num + mpic->isu_size) > mpic->num_sources)
- mpic->num_sources = isu_num + mpic->isu_size;
+ if ((isu_first + mpic->isu_size) > mpic->num_sources)
+ mpic->num_sources = isu_first + mpic->isu_size;
}

void __init mpic_setup_cascade(unsigned int irq, mpic_cascade_t handler,


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/