ppc64 oops..

Paul Mackerras paulus at samba.org
Tue Nov 15 22:08:18 EST 2005


Linus Torvalds writes:

> I do indeed have CONFIG_NUMA enabled for some totally unknown reason.

I normally don't have CONFIG_NUMA on my G5 kernels, which is why I
didn't notice it.

I would think the patch below ought to fix it.  But on my G5 (with
2.5GB of memory) I get an oops in mem_init due to pgdat_page_nr
apparently returning 0x1c00000.  When I turned on CONFIG_FLATMEM
instead of CONFIG_SPARSEMEM, it wouldn't even compile or link.
Grumble.  Evidently I'm going to have to get my head around the
sparsemem stuff.  As Ben says, the best thing is probably just to turn
off NUMA for now.

Paul.

diff -urN powerpc-merge/arch/powerpc/mm/numa.c merge-hack/arch/powerpc/mm/numa.c
--- powerpc-merge/arch/powerpc/mm/numa.c	2005-11-14 10:35:09.000000000 +1100
+++ merge-hack/arch/powerpc/mm/numa.c	2005-11-15 21:58:26.000000000 +1100
@@ -483,6 +483,7 @@
 {
 	unsigned long top_of_ram = lmb_end_of_DRAM();
 	unsigned long total_ram = lmb_phys_mem_size();
+	unsigned int i;
 
 	printk(KERN_INFO "Top of RAM: 0x%lx, Total RAM: 0x%lx\n",
 	       top_of_ram, total_ram);
@@ -490,7 +491,9 @@
 	       (top_of_ram - total_ram) >> 20);
 
 	map_cpu_to_node(boot_cpuid, 0);
-	add_region(0, 0, lmb_end_of_DRAM() >> PAGE_SHIFT);
+	for (i = 0; i < lmb.memory.cnt; ++i)
+		add_region(0, lmb.memory.region[i].base >> PAGE_SHIFT,
+			   lmb_size_pages(&lmb.memory, i));
 	node_set_online(0);
 }
 



More information about the Linuxppc64-dev mailing list