Re: [PATCH] mm: memblock: Fix arguments passed to memblock_set_node()
From: Jiaxun Yang
Date: Fri Apr 25 2025 - 10:38:21 EST
在2025年4月25日周五 下午3:18,David Woodhouse写道:
[...]
Hi David & co,
>
>
> I did a quick grep for memblock_set_node() callers, and the one in
> szmem() in arch/mips/loongson64/init.c looks odd.
>
> /* set nid for reserved memory */
> memblock_set_node((u64)node << 44, (u64)(node + 1) << 44,
> &memblock.reserved, node);
>
> At first glance I suspect the 'size' should just be (1<<44) or maybe it
> should be inside the loop over the memmap, and called with mem_start,
> mem_size each time?
You are right, it should be (1 << 44), it is an oversight when I was
converting MIPS private boot allocator to memblock.
>
> And why are we calling memblock_reserve() for what appears to be a
> single system-wide vgabios_addr, repeatedly each time szmem() is called
> for a different NUMA node?
Alas this should be done only for node 0.
Thanks
>
>
> 附件:
> * smime.p7s
--
- Jiaxun