提交 215c3409 编写于 作者: A Andy Whitcroft 提交者: Linus Torvalds

[PATCH] i386 sparsemem for single node systems

Allow SPARSEMEM to be enabled on non-numa x86 systems.  This is made
dependant on EXPERIMENTAL also being set.  When an in-tree user (such as
simulated numa) exists it should be made dependant on that.

The plan is to have no options and no selector as normal when
!EXPERIMENTAL.  When EXPERIMENTAL we enable the FLATMEM and SPARSEMEM
options for X86_PC whilst maintaining DISCONTIGMEM and SPARSEMEM for NUMA.
Signed-off-by: NAndy Whitcroft <apw@shadowen.org>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 bb152f53
...@@ -464,7 +464,6 @@ config NUMA ...@@ -464,7 +464,6 @@ config NUMA
depends on SMP && HIGHMEM64G && (X86_NUMAQ || X86_GENERICARCH || (X86_SUMMIT && ACPI)) depends on SMP && HIGHMEM64G && (X86_NUMAQ || X86_GENERICARCH || (X86_SUMMIT && ACPI))
default n if X86_PC default n if X86_PC
default y if (X86_NUMAQ || X86_SUMMIT) default y if (X86_NUMAQ || X86_SUMMIT)
select SPARSEMEM_STATIC
# Need comments to help the hapless user trying to turn on NUMA support # Need comments to help the hapless user trying to turn on NUMA support
comment "NUMA (NUMA-Q) requires SMP, 64GB highmem support" comment "NUMA (NUMA-Q) requires SMP, 64GB highmem support"
...@@ -493,6 +492,10 @@ config HAVE_ARCH_ALLOC_REMAP ...@@ -493,6 +492,10 @@ config HAVE_ARCH_ALLOC_REMAP
depends on NUMA depends on NUMA
default y default y
config ARCH_FLATMEM_ENABLE
def_bool y
depends on (ARCH_SELECT_MEMORY_MODEL && X86_PC)
config ARCH_DISCONTIGMEM_ENABLE config ARCH_DISCONTIGMEM_ENABLE
def_bool y def_bool y
depends on NUMA depends on NUMA
...@@ -503,7 +506,8 @@ config ARCH_DISCONTIGMEM_DEFAULT ...@@ -503,7 +506,8 @@ config ARCH_DISCONTIGMEM_DEFAULT
config ARCH_SPARSEMEM_ENABLE config ARCH_SPARSEMEM_ENABLE
def_bool y def_bool y
depends on NUMA depends on (NUMA || (X86_PC && EXPERIMENTAL))
select SPARSEMEM_STATIC
config ARCH_SELECT_MEMORY_MODEL config ARCH_SELECT_MEMORY_MODEL
def_bool y def_bool y
......
...@@ -954,6 +954,12 @@ efi_find_max_pfn(unsigned long start, unsigned long end, void *arg) ...@@ -954,6 +954,12 @@ efi_find_max_pfn(unsigned long start, unsigned long end, void *arg)
return 0; return 0;
} }
static int __init
efi_memory_present_wrapper(unsigned long start, unsigned long end, void *arg)
{
memory_present(0, start, end);
return 0;
}
/* /*
* Find the highest page frame number we have available * Find the highest page frame number we have available
...@@ -965,6 +971,7 @@ void __init find_max_pfn(void) ...@@ -965,6 +971,7 @@ void __init find_max_pfn(void)
max_pfn = 0; max_pfn = 0;
if (efi_enabled) { if (efi_enabled) {
efi_memmap_walk(efi_find_max_pfn, &max_pfn); efi_memmap_walk(efi_find_max_pfn, &max_pfn);
efi_memmap_walk(efi_memory_present_wrapper, NULL);
return; return;
} }
...@@ -979,6 +986,7 @@ void __init find_max_pfn(void) ...@@ -979,6 +986,7 @@ void __init find_max_pfn(void)
continue; continue;
if (end > max_pfn) if (end > max_pfn)
max_pfn = end; max_pfn = end;
memory_present(0, start, end);
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册