Commit a2c801c5 authored by Logan Gunthorpe's avatar Logan Gunthorpe Committed by Catalin Marinas

arm64: mm: make use of new memblocks_present() helper

Cleanup the arm64_memory_present() function seeing it's very
similar to other arches.

memblocks_present() is a direct replacement of arm64_memory_present()
Acked-by: default avatarWill Deacon <will.deacon@arm.com>
Acked-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
Signed-off-by: default avatarLogan Gunthorpe <logang@deltatee.com>
Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
parent 83504032
...@@ -285,24 +285,6 @@ int pfn_valid(unsigned long pfn) ...@@ -285,24 +285,6 @@ int pfn_valid(unsigned long pfn)
} }
EXPORT_SYMBOL(pfn_valid); EXPORT_SYMBOL(pfn_valid);
#ifndef CONFIG_SPARSEMEM
static void __init arm64_memory_present(void)
{
}
#else
static void __init arm64_memory_present(void)
{
struct memblock_region *reg;
for_each_memblock(memory, reg) {
int nid = memblock_get_region_node(reg);
memory_present(nid, memblock_region_memory_base_pfn(reg),
memblock_region_memory_end_pfn(reg));
}
}
#endif
static phys_addr_t memory_limit = PHYS_ADDR_MAX; static phys_addr_t memory_limit = PHYS_ADDR_MAX;
/* /*
...@@ -489,7 +471,7 @@ void __init bootmem_init(void) ...@@ -489,7 +471,7 @@ void __init bootmem_init(void)
* Sparsemem tries to allocate bootmem in memory_present(), so must be * Sparsemem tries to allocate bootmem in memory_present(), so must be
* done after the fixed reservations. * done after the fixed reservations.
*/ */
arm64_memory_present(); memblocks_present();
sparse_init(); sparse_init();
zone_sizes_init(min, max); zone_sizes_init(min, max);
......
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