Skip to content

Commit 3f7a09f

Browse files
Hanjun Guowildea01
authored andcommitted
arm64/numa: fix incorrect log for memory-less node
When booting on NUMA system with memory-less node (no memory dimm on this memory controller), the print for setup_node_data() is incorrect: NUMA: Initmem setup node 2 [mem 0x00000000-0xffffffffffffffff] It can be fixed by printing [mem 0x00000000-0x00000000] when end_pfn is 0, but print <memory-less node> will be more useful. Fixes: 1a2db30 ("arm64, numa: Add NUMA support for arm64 platforms.") Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Ganapatrao Kulkarni <gkulkarni@caviumnetworks.com> Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Will Deacon <will.deacon@arm.com> Cc: Yisheng Xie <xieyisheng1@huawei.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
1 parent 26984c3 commit 3f7a09f

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

arch/arm64/mm/numa.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,11 @@ static void __init setup_node_data(int nid, u64 start_pfn, u64 end_pfn)
223223
void *nd;
224224
int tnid;
225225

226-
pr_info("Initmem setup node %d [mem %#010Lx-%#010Lx]\n",
227-
nid, start_pfn << PAGE_SHIFT, (end_pfn << PAGE_SHIFT) - 1);
226+
if (start_pfn < end_pfn)
227+
pr_info("Initmem setup node %d [mem %#010Lx-%#010Lx]\n", nid,
228+
start_pfn << PAGE_SHIFT, (end_pfn << PAGE_SHIFT) - 1);
229+
else
230+
pr_info("Initmem setup node %d [<memory-less node>]\n", nid);
228231

229232
nd_pa = memblock_alloc_try_nid(nd_size, SMP_CACHE_BYTES, nid);
230233
nd = __va(nd_pa);

0 commit comments

Comments
 (0)