[PATCH] 2.6.10-rc2-mm4 panic on AMD64
From: Badari Pulavarty
Date: Mon Dec 06 2004 - 20:12:38 EST
Ok !! Here is the patch to fix the problem. It works
fine on my 4-way AMD64 box.
Rafael, can you verify on yours ?
Problem is with "c - cpu_data" arthimetic. "c" could
be "boot_cpu_data" or "cpu_data".
Andi, is this reasonable ?
Thanks,
Badari
On Mon, 2004-12-06 at 15:22, Rafael J. Wysocki wrote:
> On Monday 06 of December 2004 23:15, Andrew Morton wrote:
> > Badari Pulavarty <pbadari@xxxxxxxxxx> wrote:
> > >
> > > Hi Andrew,
> > >
> > > I get following panic while booting 2.6.10-rc2-mm4 on my
> > > 4-way AMD64 box. Is this known or fixed ?
> >
> > Well it is known now, but not fixed, afaik.
>
> Well, I reported exactly the same thing some time ago (on a dual-Opteron). :-)
> It is NUMA-related, or at least SMP-related, apparently, as it does not occur
> on a UP box ...
>
> > > Unable to handle kernel paging request at ffffffffd5a4a4fb RIP:
> > > <ffffffff80657607>{numa_add_cpu+7}
> >
> > Looks like cpu_to_node(cpu) returned garbage, perhaps.
>
> ... so I guess you are right.
>
> Greets,
> RJW
--- linux.org/arch/x86_64/kernel/setup.c 2004-12-06 17:47:46.000000000 -0800
+++ linux/arch/x86_64/kernel/setup.c 2004-12-06 17:43:39.000000000 -0800
@@ -947,7 +947,8 @@ void __init identify_cpu(struct cpuinfo_
mcheck_init(c);
#endif
#ifdef CONFIG_NUMA
- numa_add_cpu(c - cpu_data);
+ if ( c != &boot_cpu_data )
+ numa_add_cpu(c - cpu_data);
#endif
}