Received: from mnm [127.0.0.1]
	by localhost with POP3 (fetchmail-5.9.0)
	for akpm@localhost (single-drop); Tue, 03 Jun 2003 09:57:56 -0700 (PDT)
Received: from digeo-e2k04.digeo.com ([192.168.2.24]) by pao-ex01.pao.digeo.com with Microsoft SMTPSVC(5.0.2195.5329);
	 Tue, 3 Jun 2003 09:56:39 -0700
Received: from digeo-nav01.digeo.com ([192.168.1.233]) by digeo-e2k04.digeo.com with Microsoft SMTPSVC(5.0.2195.5329);
	 Tue, 3 Jun 2003 09:56:37 -0700
Received: from packet.digeo.com ([192.168.17.15])
 by digeo-nav01.digeo.com (SAVSMTP 3.1.1.32) with SMTP id M2003060309584918616
 for <akpm@digeo.com>; Tue, 03 Jun 2003 09:58:49 -0700
Received: from lists.samba.org (dp.samba.org [66.70.73.150])
	by packet.digeo.com (8.12.8/8.12.8) with ESMTP id h53GuZX8016120
	for <akpm@digeo.com>; Tue, 3 Jun 2003 09:56:36 -0700 (PDT)
Received: by lists.samba.org (Postfix, from userid 504)
	id 82ED02C06A; Tue,  3 Jun 2003 16:56:35 +0000 (GMT)
Date: Wed, 4 Jun 2003 02:55:29 +1000
From: Anton Blanchard <anton@samba.org>
To: akpm@digeo.com
Subject: ppc64 fixup
Message-ID: <20030603165529.GE22431@krispykreme>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.5.4i
X-Scanned-By: MIMEDefang 2.30 (www . roaringpenguin . com / mimedefang)
Return-Path: anton@samba.org
X-OriginalArrivalTime: 03 Jun 2003 16:56:37.0351 (UTC) FILETIME=[18A01F70:01C329F1]
X-Spam-Status: No, hits=-15.6 required=6.0
	tests=BAYES_00,PATCH_UNIFIED_DIFF,USER_AGENT_MUTT
	autolearn=ham version=2.53
X-Spam-Level: 
X-Spam-Checker-Version: SpamAssassin 2.53 (1.174.2.15-2003-03-30-exp)


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();