From patchwork Mon Dec 7 14:16:07 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 65527 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id nB7ELmFm032298 for ; Mon, 7 Dec 2009 14:21:48 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935119AbZLGOVl (ORCPT ); Mon, 7 Dec 2009 09:21:41 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S935130AbZLGOVk (ORCPT ); Mon, 7 Dec 2009 09:21:40 -0500 Received: from mail-yx0-f187.google.com ([209.85.210.187]:62358 "EHLO mail-yx0-f187.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935119AbZLGOVk (ORCPT ); Mon, 7 Dec 2009 09:21:40 -0500 Received: by yxe17 with SMTP id 17so3904667yxe.33 for ; Mon, 07 Dec 2009 06:21:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:date:message-id :subject; bh=JrWl9P/PaKh96SLQiLtvKH7wXFwai9RvLXRPMSEHVI8=; b=IDxdjdy5GbUg9qGl6+jcN8y0W7/OJW1Xk36a4zdP1YwGLACSWjEHj2dYb6tyUVMkIM aGpaB7z44ephfBUhC79WjrwAGIQgUzAnA3MxK4d489JcJzpx4bjKggK4yUqoR8qKpuUb qoAfIdQbzno+T9C8Hyg0QN+YzjbdGIMb+HeRw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:date:message-id:subject; b=HWj28w3AkgpJN+IPrREl2HY31brnHAlJN6mPOHck/c+WXP1eUhW2yoBHjkI6Bt+81e QnSau6ZEUBqLp6kBW+sBEOlFkQ9oY5Z931App82Jjj+DCkOmTPp7Giey/Q73v4ec0XqA M5xz6ZytkhsxnvmihSawEPyfWjogr2h8BNdjA= Received: by 10.150.125.24 with SMTP id x24mr11503240ybc.5.1260195705801; Mon, 07 Dec 2009 06:21:45 -0800 (PST) Received: from rxone.opensource.se (49.14.32.202.bf.2iij.net [202.32.14.49]) by mx.google.com with ESMTPS id 15sm2780690gxk.0.2009.12.07.06.21.44 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 07 Dec 2009 06:21:45 -0800 (PST) From: Magnus Damm To: linux-sh@vger.kernel.org Cc: Magnus Damm , lethal@linux-sh.org Date: Mon, 07 Dec 2009 23:16:07 +0900 Message-Id: <20091207141607.6696.57181.sendpatchset@rxone.opensource.se> Subject: [PATCH] sh: NUMA lmb fixes Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org --- 0004/arch/sh/mm/numa.c +++ work/arch/sh/mm/numa.c 2009-12-07 21:16:54.000000000 +0900 @@ -38,6 +38,15 @@ void __init setup_memory(void) (__MEMORY_START + CONFIG_ZERO_PAGE_OFFSET)); /* + * Reserve physical pages below CONFIG_ZERO_PAGE_OFFSET. + */ + if (CONFIG_ZERO_PAGE_OFFSET != 0) + lmb_reserve(__MEMORY_START, CONFIG_ZERO_PAGE_OFFSET); + + lmb_analyze(); + lmb_dump_all(); + + /* * Node 0 sets up its pgdat at the first available pfn, * and bumps it up before setting up the bootmem allocator. */ @@ -71,7 +80,7 @@ void __init setup_bootmem_node(int nid, /* Node-local pgdat */ NODE_DATA(nid) = __va(lmb_alloc_base(sizeof(struct pglist_data), - SMP_CACHE_BYTES, end_pfn)); + SMP_CACHE_BYTES, end)); memset(NODE_DATA(nid), 0, sizeof(struct pglist_data)); NODE_DATA(nid)->bdata = &bootmem_node_data[nid]; @@ -81,7 +90,7 @@ void __init setup_bootmem_node(int nid, /* Node-local bootmap */ bootmap_pages = bootmem_bootmap_pages(end_pfn - start_pfn); bootmem_paddr = lmb_alloc_base(bootmap_pages << PAGE_SHIFT, - PAGE_SIZE, end_pfn); + PAGE_SIZE, end); init_bootmem_node(NODE_DATA(nid), bootmem_paddr >> PAGE_SHIFT, start_pfn, end_pfn);