Subject: ppc64 fixup
From: Anton Blanchard <[email-masked]>
To: [email-masked]
Date: Wed, 4 Jun 2003 02:55:29 +1000

I added this bug in just as Linus pulled from the tree. We were calling
kmalloc too early, I had slab debugging on which hid the bug.

Anton

===== arch/ppc64/mm/init.c 1.44 vs edited =====
--- 1.44/arch/ppc64/mm/init.c	Tue Jun  3 16:07:52 2003
+++ edited/arch/ppc64/mm/init.c	Wed Jun  4 02:49:39 2003
@@ -512,7 +512,7 @@
 
 static struct kcore_list kcore_vmem;
 
-static void setup_kcore(void)
+static int __init setup_kcore(void)
 {
 	int i;
 
@@ -536,7 +536,10 @@
 	}
 
 	kclist_add(&kcore_vmem, (void *)VMALLOC_START, VMALLOC_END-VMALLOC_START);
+
+	return 0;
 }
+module_init(setup_kcore);
 
 void initialize_paca_hardware_interrupt_stack(void);
 
@@ -605,8 +608,6 @@
 	       PAGE_OFFSET, (unsigned long)__va(lmb_end_of_DRAM()));
 #endif
 	mem_init_done = 1;
-
-	setup_kcore();
 
 	/* set the last page of each hardware interrupt stack to be protected */
 	initialize_paca_hardware_interrupt_stack();