]> git.hungrycats.org Git - linux/commitdiff
[PATCH] x86_64 Kconfig: Split CONFIG_NUMA_EMU and CONFIG_K8_NUMA
authorAndi Kleen <ak@muc.de>
Wed, 20 Oct 2004 01:12:20 +0000 (18:12 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Wed, 20 Oct 2004 01:12:20 +0000 (18:12 -0700)
Split CONFIG_NUMA_EMU and CONFIG_K8_NUMA because they are independent.

Signed-off-by: Andi Kleen <ak@muc.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/x86_64/Kconfig
arch/x86_64/mm/numa.c

index d660dcfe31e55a29427e804923e74692ee0081a9..d895c3bec3c6bc26989658e2a490cc3160a7df55 100644 (file)
@@ -256,6 +256,7 @@ config SCHED_SMT
 
 config K8_NUMA
        bool "K8 NUMA support"
+       select NUMA
        depends on SMP
        help
          Enable NUMA (Non Unified Memory Architecture) support for
@@ -265,15 +266,23 @@ config K8_NUMA
          This code is recommended on all multiprocessor Opteron systems
          and normally doesn't hurt on others.
 
+config NUMA_EMU
+       bool "NUMA emulation support"
+       select NUMA
+       depends on SMP
+       help
+         Enable NUMA emulation. A flat machine will be split
+         into virtual nodes when booted with "numa=fake=N", where N is the
+         number of nodes. This is only useful for debugging.
+
 config DISCONTIGMEM
        bool
-       depends on K8_NUMA
+       depends on NUMA
        default y
 
 config NUMA
        bool
-       depends on K8_NUMA
-       default y
+       default n
 
 config HAVE_DEC_LOCK
        bool
index f136fc23f9cf78e9a5f1b25feee46e94ef881f50..12eef59cabaa96e2daa9b75797c9d7bcdf899278 100644 (file)
@@ -164,6 +164,7 @@ void __init numa_init_array(void)
        set_bit(0, &node_to_cpumask[cpu_to_node(0)]);
 }
 
+#ifdef CONFIG_NUMA_EMU
 int numa_fake __initdata = 0;
 
 /* Numa emulation */
@@ -208,13 +209,16 @@ static int numa_emulation(unsigned long start_pfn, unsigned long end_pfn)
        numa_init_array();
        return 0;
 }
+#endif
 
 void __init numa_initmem_init(unsigned long start_pfn, unsigned long end_pfn)
 { 
        int i;
 
+#ifdef CONFIG_NUMA_EMU
        if (numa_fake && !numa_emulation(start_pfn, end_pfn))
                return;
+#endif
 
 #ifdef CONFIG_K8_NUMA
        if (!numa_off && !k8_scan_nodes(start_pfn<<PAGE_SHIFT, end_pfn<<PAGE_SHIFT))