From patchwork Sun Jul 24 10:51:19 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tejun Heo X-Patchwork-Id: 1002892 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p6OApR3G002277 for ; Sun, 24 Jul 2011 10:51:27 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751996Ab1GXKvZ (ORCPT ); Sun, 24 Jul 2011 06:51:25 -0400 Received: from mail-fx0-f52.google.com ([209.85.161.52]:36934 "EHLO mail-fx0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750796Ab1GXKvY (ORCPT ); Sun, 24 Jul 2011 06:51:24 -0400 Received: by fxd18 with SMTP id 18so7468728fxd.11 for ; Sun, 24 Jul 2011 03:51:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=sender:date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:user-agent; bh=HjTMNfQatDwsM0ca708fJmlVPA2ngfdqQTKCde+dJeI=; b=u88OX6Q4fb6zgb5hvjgFfqmNc1oJPYi3kg9Kg5qtjL/kyDPYdxtjjtN0blqxDhEFGk mXEANDdwwi4Fru4qKWdspUl/j6mRQyD+tkzYD/+XHbWsCEdHQZQy8gwZrBnaF29o/wNX VMEF4/h8Rv1BNAPDc8GoFkkdWn5FRHE7qaSWY= Received: by 10.205.65.68 with SMTP id xl4mr1047509bkb.303.1311504681921; Sun, 24 Jul 2011 03:51:21 -0700 (PDT) Received: from htj.dyndns.org ([130.75.117.88]) by mx.google.com with ESMTPS id k5sm998935bka.38.2011.07.24.03.51.20 (version=SSLv3 cipher=OTHER); Sun, 24 Jul 2011 03:51:21 -0700 (PDT) Date: Sun, 24 Jul 2011 12:51:19 +0200 From: Tejun Heo To: Paul Mundt , linux-sh@vger.kernel.org Cc: linux-kernel@vger.kernel.org, "H. Peter Anvin" Subject: [PATCH tip:x86/memblock RFC] SuperH: Use HAVE_MEMBLOCK_NODE_MAP Message-ID: <20110724105119.GP2622@htj.dyndns.org> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Sun, 24 Jul 2011 10:51:27 +0000 (UTC) sh doesn't access early_node_map[] directly and enabling HAVE_MEMBLOCK_NODE_MAP is trivial - replacing add_active_range() calls with memblock_set_node() and selecting HAVE_MEMBLOCK_NODE_MAP is enough. Signed-off-by: Tejun Heo Cc: Paul Mundt Cc: linux-sh@vger.kernel.org --- Paul, memblock now can carry node information itself without relying on early_node_map[], which makes operations which make use of both information much saner and generally makes NUMA memory init simpler. For more details, please read the following thread. http://thread.gmane.org/gmane.linux.kernel.cross-arch/10354 I couldn't get the cross-compiler from korg to build configuration with CPU w/ NUMA support but given the trivial nature of the change, I don't think it would cause build failures on different configs, but this definitely needs testing on actual NUMA configuration. The patches implementing HAVE_MEMBLOCK_NODE_MAP is currently in tip:x86/memblock branch on which this patch is based on. Thanks. arch/sh/Kconfig | 1 + arch/sh/kernel/setup.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: work/arch/sh/Kconfig =================================================================== --- work.orig/arch/sh/Kconfig +++ work/arch/sh/Kconfig @@ -4,6 +4,7 @@ config SUPERH select CLKDEV_LOOKUP select HAVE_IDE if HAS_IOPORT select HAVE_MEMBLOCK + select HAVE_MEMBLOCK_NODE_MAP select HAVE_OPROFILE select HAVE_GENERIC_DMA_COHERENT select HAVE_ARCH_TRACEHOOK Index: work/arch/sh/kernel/setup.c =================================================================== --- work.orig/arch/sh/kernel/setup.c +++ work/arch/sh/kernel/setup.c @@ -227,7 +227,8 @@ void __init __add_active_range(unsigned pmb_bolt_mapping((unsigned long)__va(start), start, end - start, PAGE_KERNEL); - add_active_range(nid, start_pfn, end_pfn); + memblock_set_node(PFN_PHYS(start_pfn), + PFN_PHYS(end_pfn - start_pfn), nid); } void __init __weak plat_early_device_setup(void)