From patchwork Wed Jun 3 07:16:38 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Herrenschmidt X-Patchwork-Id: 28038 X-Patchwork-Delegate: benh@kernel.crashing.org Return-Path: X-Original-To: patchwork-incoming@bilbo.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from ozlabs.org (ozlabs.org [203.10.76.45]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mx.ozlabs.org", Issuer "CA Cert Signing Authority" (verified OK)) by bilbo.ozlabs.org (Postfix) with ESMTPS id 715D8B7069 for ; Wed, 3 Jun 2009 17:17:15 +1000 (EST) Received: by ozlabs.org (Postfix) id 15052DE143; Wed, 3 Jun 2009 17:17:05 +1000 (EST) Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id 1326CDE142 for ; Wed, 3 Jun 2009 17:17:05 +1000 (EST) X-Original-To: linuxppc-dev@ozlabs.org Delivered-To: linuxppc-dev@ozlabs.org Received: by ozlabs.org (Postfix, from userid 1030) id 8E1B7DDDF7; Wed, 3 Jun 2009 17:16:53 +1000 (EST) To: From: Benjamin Herrenschmidt Date: Wed, 03 Jun 2009 17:16:38 +1000 Subject: [PATCH] powerpc: Set init_bootmem_done on NUMA platforms as well Message-Id: <20090603071653.8E1B7DDDF7@ozlabs.org> X-BeenThere: linuxppc-dev@ozlabs.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org For some obscure reason, we only set init_bootmem_done after initializing bootmem when NUMA isn't enabled. We even document this next to the declaration of that global in system.h which of course I didn't read before I had to debug why some WIP code wasn't working properly... This patch changes it so that we always set it after bootmem is initialized which should have always been the case... go figure ! Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/include/asm/system.h | 2 +- arch/powerpc/mm/numa.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) --- linux-work.orig/arch/powerpc/include/asm/system.h 2009-06-03 17:12:48.000000000 +1000 +++ linux-work/arch/powerpc/include/asm/system.h 2009-06-03 17:12:51.000000000 +1000 @@ -211,7 +211,7 @@ extern struct task_struct *_switch(struc extern unsigned int rtas_data; extern int mem_init_done; /* set on boot once kmalloc can be called */ -extern int init_bootmem_done; /* set on !NUMA once bootmem is available */ +extern int init_bootmem_done; /* set once bootmem is available */ extern phys_addr_t memory_limit; extern unsigned long klimit; Index: linux-work/arch/powerpc/mm/numa.c =================================================================== --- linux-work.orig/arch/powerpc/mm/numa.c 2009-06-03 17:12:21.000000000 +1000 +++ linux-work/arch/powerpc/mm/numa.c 2009-06-03 17:12:25.000000000 +1000 @@ -981,6 +981,8 @@ void __init do_init_bootmem(void) mark_reserved_regions_for_nid(nid); sparse_memory_present_with_active_regions(nid); } + + init_bootmem_done = 1; } void __init paging_init(void)