[PATCH] ppc64: Fix wrong register mapping in mpic driver
Benjamin Herrenschmidt
benh at kernel.crashing.org
Wed Oct 26 10:21:28 EST 2005
The mpic interrupt controller driver (used on G5 and early pSeries among
others) has a bug where it doesn't get the right virtual address for the
timer registers. It causes the driver to poke at the MMIO space of
whatever has been mapped just next to it (ouch !) when initializing and
causes boot failures on some IBM machines. This fixes it. Please apply.
Signed-off-by: Benjamin Herrenschmidt <benh at kernel.crashing.org>
Index: linux-work/arch/ppc64/kernel/mpic.c
===================================================================
--- linux-work.orig/arch/ppc64/kernel/mpic.c 2005-09-23 12:43:21.000000000 +1000
+++ linux-work/arch/ppc64/kernel/mpic.c 2005-10-26 10:21:53.000000000 +1000
@@ -506,8 +506,8 @@
mpic->senses_count = senses_count;
/* Map the global registers */
- mpic->gregs = ioremap(phys_addr + MPIC_GREG_BASE, 0x1000);
- mpic->tmregs = mpic->gregs + (MPIC_TIMER_BASE >> 2);
+ mpic->gregs = ioremap(phys_addr + MPIC_GREG_BASE, 0x2000);
+ mpic->tmregs = mpic->gregs + ((MPIC_TIMER_BASE - MPIC_GREG_BASE) >> 2);
BUG_ON(mpic->gregs == NULL);
/* Reset */
More information about the Linuxppc64-dev
mailing list