PPC64 boot failure with 2.6.15

Patrick Finnegan pat at computer-refuge.org
Thu Jan 26 15:07:45 EST 2006


On Wednesday 25 January 2006 21:23, you wrote:
> Hi,
>
> > After succeeding to get 2.4.26 working on my machine (an IBM 9076-N81
> > high node), I'm trying to get 2.6 to work on it.  So far, the kernel
> > fails to boot, and the machine resets partway through bootup.  I've
> > tried compiling both an SMP and UP 2.6.15.1 kernel (unmodified
> > kernel.org sources).
>
> Excellent! Ive been wanting to get these machines booting again but our
> one isnt setup right now. There is one known issue:
>
>   mpic: Setting upMPIC     " version 1.2 at fec000max 1 CPUs
>
> Notice the max 1 CPUs. I forgot to tell benh when he was reworking the
> openpic code that we cant rely on the nr cpus field to be correct :)
>
> Paul had a patch to fix this, I'll see if I can find it.
>
> If you feel keen you could hack it up by changing the following code in
> arch/powerpc/sysdev/mpic.c:
>
>         /* Map the per-CPU registers */
>         for (i = 0; i < mpic->num_cpus; i++) {
>                 mpic->cpuregs[i] = ioremap(phys_addr + MPIC_CPU_BASE +
>                                            i * MPIC_CPU_STRIDE, 0x1000);
>                 BUG_ON(mpic->cpuregs[i] == NULL);
>         }
>
> And replace the for loop with for_each_cpu()

Thanks for the hint!

I can confirm that this fixes the problem.  Patch below.

Pat

--- linux-2.6.15.1/arch/powerpc/sysdev/mpic.c	2006-01-15 01:16:02.000000000 -0500
+++ linux-2.6.15.1.mod/arch/powerpc/sysdev/mpic.c	2006-01-25 23:00:56.000000000 -0500
@@ -538,7 +538,7 @@
 				     >> MPIC_GREG_FEATURE_LAST_SRC_SHIFT) + 1;
 
 	/* Map the per-CPU registers */
-	for (i = 0; i < mpic->num_cpus; i++) {
+	for_each_cpu(i) {
 		mpic->cpuregs[i] = ioremap(phys_addr + MPIC_CPU_BASE +
 					   i * MPIC_CPU_STRIDE, 0x1000);
 		BUG_ON(mpic->cpuregs[i] == NULL);

-- 
Purdue University ITAP/RCAC       --- http://www.rcac.purdue.edu/
The Computer Refuge               --- http://computer-refuge.org



More information about the Linuxppc64-dev mailing list