@@ -331,7 +331,6 @@ static int __init numa_alloc_distance(void)
nodemask_t nodes_parsed;
size_t size;
int i, j, cnt = 0;
- u64 phys;
/* size the new table and allocate it */
nodes_parsed = numa_nodes_parsed;
@@ -342,16 +341,14 @@ static int __init numa_alloc_distance(void)
cnt++;
size = cnt * cnt * sizeof(numa_distance[0]);
- phys = memblock_phys_alloc_range(size, PAGE_SIZE, 0,
- PFN_PHYS(max_pfn_mapped));
- if (!phys) {
+ numa_distance = memblock_alloc(size, PAGE_SIZE);
+ if (!numa_distance) {
pr_warn("Warning: can't allocate distance table!\n");
/* don't retry until explicitly reset */
numa_distance = (void *)1LU;
return -ENOMEM;
}
- numa_distance = __va(phys);
numa_distance_cnt = cnt;
/* fill with the default distances */