Commit c47f0fce authored by Andi Kleen's avatar Andi Kleen Committed by Linus Torvalds

[PATCH] x86_64 Kconfig: Split CONFIG_NUMA_EMU and CONFIG_K8_NUMA

Split CONFIG_NUMA_EMU and CONFIG_K8_NUMA because they are independent.
Signed-off-by: default avatarAndi Kleen <ak@muc.de>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 3f42b132
...@@ -256,6 +256,7 @@ config SCHED_SMT ...@@ -256,6 +256,7 @@ config SCHED_SMT
config K8_NUMA config K8_NUMA
bool "K8 NUMA support" bool "K8 NUMA support"
select NUMA
depends on SMP depends on SMP
help help
Enable NUMA (Non Unified Memory Architecture) support for Enable NUMA (Non Unified Memory Architecture) support for
...@@ -265,15 +266,23 @@ config K8_NUMA ...@@ -265,15 +266,23 @@ config K8_NUMA
This code is recommended on all multiprocessor Opteron systems This code is recommended on all multiprocessor Opteron systems
and normally doesn't hurt on others. 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 config DISCONTIGMEM
bool bool
depends on K8_NUMA depends on NUMA
default y default y
config NUMA config NUMA
bool bool
depends on K8_NUMA default n
default y
config HAVE_DEC_LOCK config HAVE_DEC_LOCK
bool bool
......
...@@ -164,6 +164,7 @@ void __init numa_init_array(void) ...@@ -164,6 +164,7 @@ void __init numa_init_array(void)
set_bit(0, &node_to_cpumask[cpu_to_node(0)]); set_bit(0, &node_to_cpumask[cpu_to_node(0)]);
} }
#ifdef CONFIG_NUMA_EMU
int numa_fake __initdata = 0; int numa_fake __initdata = 0;
/* Numa emulation */ /* Numa emulation */
...@@ -208,13 +209,16 @@ static int numa_emulation(unsigned long start_pfn, unsigned long end_pfn) ...@@ -208,13 +209,16 @@ static int numa_emulation(unsigned long start_pfn, unsigned long end_pfn)
numa_init_array(); numa_init_array();
return 0; return 0;
} }
#endif
void __init numa_initmem_init(unsigned long start_pfn, unsigned long end_pfn) void __init numa_initmem_init(unsigned long start_pfn, unsigned long end_pfn)
{ {
int i; int i;
#ifdef CONFIG_NUMA_EMU
if (numa_fake && !numa_emulation(start_pfn, end_pfn)) if (numa_fake && !numa_emulation(start_pfn, end_pfn))
return; return;
#endif
#ifdef CONFIG_K8_NUMA #ifdef CONFIG_K8_NUMA
if (!numa_off && !k8_scan_nodes(start_pfn<<PAGE_SHIFT, end_pfn<<PAGE_SHIFT)) if (!numa_off && !k8_scan_nodes(start_pfn<<PAGE_SHIFT, end_pfn<<PAGE_SHIFT))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment