Commit 397dc00e authored by Mike Rapoport's avatar Mike Rapoport Committed by Paul Burton

mips: sgi-ip27: switch from DISCONTIGMEM to SPARSEMEM

The memory initialization of SGI-IP27 is already half-way to support
SPARSEMEM. It only had free_bootmem_with_active_regions() left-overs
interfering with sparse_memory_present_with_active_regions().

Replace these calls with simpler memblocks_present() call in prom_meminit()
and adjust arch/mips/Kconfig to enable SPARSEMEM and SPARSEMEM_EXTREME for
SGI-IP27.
Co-developed-by: default avatarThomas Bogendoerfer <tbogendoerfer@suse.de>
Signed-off-by: default avatarThomas Bogendoerfer <tbogendoerfer@suse.de>
Signed-off-by: default avatarMike Rapoport <rppt@linux.ibm.com>
Signed-off-by: default avatarPaul Burton <paul.burton@mips.com>
Cc: linux-mips@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
parent e4acfbc1
...@@ -674,6 +674,7 @@ config SGI_IP22 ...@@ -674,6 +674,7 @@ config SGI_IP22
config SGI_IP27 config SGI_IP27
bool "SGI IP27 (Origin200/2000)" bool "SGI IP27 (Origin200/2000)"
select ARCH_HAS_PHYS_TO_DMA select ARCH_HAS_PHYS_TO_DMA
select ARCH_SPARSEMEM_ENABLE
select FW_ARC select FW_ARC
select FW_ARC64 select FW_ARC64
select BOOT_ELF64 select BOOT_ELF64
...@@ -2618,18 +2619,9 @@ config ARCH_FLATMEM_ENABLE ...@@ -2618,18 +2619,9 @@ config ARCH_FLATMEM_ENABLE
def_bool y def_bool y
depends on !NUMA && !CPU_LOONGSON2 depends on !NUMA && !CPU_LOONGSON2
config ARCH_DISCONTIGMEM_ENABLE
bool
default y if SGI_IP27
help
Say Y to support efficient handling of discontiguous physical memory,
for architectures which are either NUMA (Non-Uniform Memory Access)
or have huge holes in the physical address space for other reasons.
See <file:Documentation/vm/numa.rst> for more.
config ARCH_SPARSEMEM_ENABLE config ARCH_SPARSEMEM_ENABLE
bool bool
select SPARSEMEM_STATIC select SPARSEMEM_STATIC if !SGI_IP27
config NUMA config NUMA
bool "NUMA Support" bool "NUMA Support"
......
...@@ -385,12 +385,8 @@ static void __init node_mem_init(nasid_t node) ...@@ -385,12 +385,8 @@ static void __init node_mem_init(nasid_t node)
slot_freepfn += PFN_UP(sizeof(struct pglist_data) + slot_freepfn += PFN_UP(sizeof(struct pglist_data) +
sizeof(struct hub_data)); sizeof(struct hub_data));
free_bootmem_with_active_regions(node, end_pfn);
memblock_reserve(slot_firstpfn << PAGE_SHIFT, memblock_reserve(slot_firstpfn << PAGE_SHIFT,
((slot_freepfn - slot_firstpfn) << PAGE_SHIFT)); ((slot_freepfn - slot_firstpfn) << PAGE_SHIFT));
sparse_memory_present_with_active_regions(node);
} }
/* /*
...@@ -423,6 +419,8 @@ void __init prom_meminit(void) ...@@ -423,6 +419,8 @@ void __init prom_meminit(void)
} }
__node_data[node] = &null_node; __node_data[node] = &null_node;
} }
memblocks_present();
} }
void __init prom_free_prom_memory(void) void __init prom_free_prom_memory(void)
......
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