aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/mm/memblock.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/mm/memblock.c')
-rw-r--r--arch/x86/mm/memblock.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/x86/mm/memblock.c b/arch/x86/mm/memblock.c
index 53a7a5aebd6b..22ff0a39b227 100644
--- a/arch/x86/mm/memblock.c
+++ b/arch/x86/mm/memblock.c
@@ -234,6 +234,21 @@ void __init memblock_x86_free_range(u64 start, u64 end)
234} 234}
235 235
236/* 236/*
237 * Need to call this function after memblock_x86_register_active_regions,
238 * so early_node_map[] is filled already.
239 */
240u64 __init memblock_x86_find_in_range_node(int nid, u64 start, u64 end, u64 size, u64 align)
241{
242 u64 addr;
243 addr = find_memory_core_early(nid, size, align, start, end);
244 if (addr != MEMBLOCK_ERROR)
245 return addr;
246
247 /* Fallback, should already have start end within node range */
248 return memblock_find_in_range(start, end, size, align);
249}
250
251/*
237 * Finds an active region in the address range from start_pfn to last_pfn and 252 * Finds an active region in the address range from start_pfn to last_pfn and
238 * returns its range in ei_startpfn and ei_endpfn for the memblock entry. 253 * returns its range in ei_startpfn and ei_endpfn for the memblock entry.
239 */ 254 */