summary refs log tree commit diff
path: root/drivers/base/arch_numa.c
diff options
context:
space:
mode:
authorPetr Mladek <pmladek@suse.com>2021-11-02 10:39:27 +0100
committerPetr Mladek <pmladek@suse.com>2021-11-02 10:39:27 +0100
commit40e64a88dadcfa168914065baf7f035de957bbe0 (patch)
tree06c8c4a9e6c1b478aa6851794c6a33bec1ce6ec4 /drivers/base/arch_numa.c
parent24a1dffbecafeb00d8830985eb7a318e37aabc4e (diff)
parent6a7ca80f4033c9cf3003625b2ef8b497f4ec44da (diff)
downloadlinux-40e64a88dadcfa168914065baf7f035de957bbe0.tar.gz
Merge branch 'for-5.16-vsprintf-pgp' into for-linus
Diffstat (limited to 'drivers/base/arch_numa.c')
-rw-r--r--drivers/base/arch_numa.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/base/arch_numa.c b/drivers/base/arch_numa.c
index 4cc4e117727d..46c503486e96 100644
--- a/drivers/base/arch_numa.c
+++ b/drivers/base/arch_numa.c
@@ -279,13 +279,10 @@ static int __init numa_alloc_distance(void)
 	int i, j;
 
 	size = nr_node_ids * nr_node_ids * sizeof(numa_distance[0]);
-	phys = memblock_find_in_range(0, PFN_PHYS(max_pfn),
-				      size, PAGE_SIZE);
+	phys = memblock_phys_alloc_range(size, PAGE_SIZE, 0, PFN_PHYS(max_pfn));
 	if (WARN_ON(!phys))
 		return -ENOMEM;
 
-	memblock_reserve(phys, size);
-
 	numa_distance = __va(phys);
 	numa_distance_cnt = nr_node_ids;