lkml.org 
[lkml]   [2011]   [Apr]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch] parisc: enable CONFIG_NUMA for DISCONTIGMEM and fix build errors
From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>

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 <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: David Rientjes <rientjes@google.com>
---
arch/parisc/Kconfig | 3 +++
include/asm-generic/topology.h | 4 ----
include/linux/topology.h | 2 +-
3 files changed, 4 insertions(+), 5 deletions(-)

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 <asm/topology.h> 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 */

\
 
 \ /
  Last update: 2011-04-21 23:33    [W:0.659 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site