From patchwork Thu Apr 21 21:31:29 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Rientjes X-Patchwork-Id: 725981 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p3LLVn5H014046 for ; Thu, 21 Apr 2011 21:31:49 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755177Ab1DUVbi (ORCPT ); Thu, 21 Apr 2011 17:31:38 -0400 Received: from smtp-out.google.com ([74.125.121.67]:19750 "EHLO smtp-out.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754564Ab1DUVbh (ORCPT ); Thu, 21 Apr 2011 17:31:37 -0400 Received: from hpaq2.eem.corp.google.com (hpaq2.eem.corp.google.com [172.25.149.2]) by smtp-out.google.com with ESMTP id p3LLVZCG004713 for ; Thu, 21 Apr 2011 14:31:36 -0700 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1303421496; bh=lkdHnshyS6PlrAgylcbeqOuMVf8=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References: MIME-Version:Content-Type; b=ttaTluhMGPmmWknKPSNIshQEoOvVbyeYV9hJivKc+N1Ag7uQ7B9eM6A/LFkCOM6C+ Oq4vh8EuFT0ax0aTxX8sg== Received: from pxi1 (pxi1.prod.google.com [10.243.27.1]) by hpaq2.eem.corp.google.com with ESMTP id p3LLVXpr018736 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Thu, 21 Apr 2011 14:31:34 -0700 Received: by pxi1 with SMTP id 1so91710pxi.23 for ; Thu, 21 Apr 2011 14:31:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=beta; h=domainkey-signature:date:from:x-x-sender:to:cc:subject:in-reply-to :message-id:references:user-agent:mime-version:content-type; bh=K6QW3uMYfMWV32ZgInYXhTbzym3bOdg0mOZDbwJfyLY=; b=xi3drnrkwW/iT0fFS2iJSPw/BkNC0yEtV2KYU21SmJUjp/Q+l3k8zgiuM/wKVR2kBp AzMrH4imoIO/zzvR9a2w== DomainKey-Signature: a=rsa-sha1; c=nofws; d=google.com; s=beta; h=date:from:x-x-sender:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version:content-type; b=Sd/z8r9kp0Du+M8QllLElQ2RV8P40ajrt9kJsS1pijGsthJr7zxwPRfo2ceXR1MrEc 5MKKfxqOBb8KFWLz9vuQ== Received: by 10.68.29.72 with SMTP id i8mr533722pbh.494.1303421492693; Thu, 21 Apr 2011 14:31:32 -0700 (PDT) Received: from chino.kir.corp.google.com (chino.kir.corp.google.com [172.31.6.12]) by mx.google.com with ESMTPS id x9sm402269pbi.12.2011.04.21.14.31.29 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 21 Apr 2011 14:31:30 -0700 (PDT) Date: Thu, 21 Apr 2011 14:31:29 -0700 (PDT) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Kyle McMartin , Helge Deller , James Bottomley cc: KOSAKI Motohiro , Andrew Morton , linux-kernel@vger.kernel.org, linux-parisc@vger.kernel.org Subject: [patch] parisc: enable CONFIG_NUMA for DISCONTIGMEM and fix build errors In-Reply-To: Message-ID: References: <1303317178.2587.30.camel@mulgrave.site> <20110421220351.9180.A69D9226@jp.fujitsu.com> User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 X-System-Of-Record: true Sender: linux-parisc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-parisc@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Thu, 21 Apr 2011 21:31:49 +0000 (UTC) From: KOSAKI Motohiro CONFIG_DISCONTIGMEM requires CONFIG_NUMA because it represents its memory regions as individual nodes that lack remote proximity, hence it already has a default CONFIG_NODES_SHIFT of 3. This configuration causes build errors, however, so fix them as well. This was first realized when CONFIG_DISCONTIGMEM was used with CONFIG_SLUB which depends heavily on CONFIG_NUMA being enabled or disabled to support these memory regions. A long-term fix is to separate the memory region abstraction required for DISCONTIGMEM away from NUMA and then build NUMA on top of it with proximity domains. [rientjes@google.com: implicitly enable NUMA for DISCONTIGMEM, changelog] Signed-off-by: KOSAKI Motohiro Signed-off-by: David Rientjes --- arch/parisc/Kconfig | 3 +++ include/asm-generic/topology.h | 4 ---- include/linux/topology.h | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-parisc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig --- a/arch/parisc/Kconfig +++ b/arch/parisc/Kconfig @@ -244,6 +244,9 @@ config ARCH_DISCONTIGMEM_DEFAULT def_bool y depends on ARCH_DISCONTIGMEM_ENABLE +config NUMA + def_bool ARCH_DISCONTIGMEM_ENABLE + config NODES_SHIFT int default "3" diff --git a/include/asm-generic/topology.h b/include/asm-generic/topology.h --- a/include/asm-generic/topology.h +++ b/include/asm-generic/topology.h @@ -27,8 +27,6 @@ #ifndef _ASM_GENERIC_TOPOLOGY_H #define _ASM_GENERIC_TOPOLOGY_H -#ifndef CONFIG_NUMA - /* Other architectures wishing to use this simple topology API should fill in the below functions as appropriate in their own file. */ #ifndef cpu_to_node @@ -60,8 +58,6 @@ cpumask_of_node(pcibus_to_node(bus))) #endif -#endif /* CONFIG_NUMA */ - #if !defined(CONFIG_NUMA) || !defined(CONFIG_HAVE_MEMORYLESS_NODES) #ifndef set_numa_mem diff --git a/include/linux/topology.h b/include/linux/topology.h --- a/include/linux/topology.h +++ b/include/linux/topology.h @@ -209,7 +209,7 @@ int arch_update_cpu_topology(void); #ifdef CONFIG_NUMA #ifndef SD_NODE_INIT -#error Please define an appropriate SD_NODE_INIT in include/asm/topology.h!!! +#define SD_NODE_INIT SD_ALLNODES_INIT #endif #endif /* CONFIG_NUMA */