Skip to content

Commit 795d82e

Browse files
seehearfeeltsbogend
authored andcommitted
MIPS: Use memblock_add_node() in early_parse_mem() under CONFIG_NUMA
Use memblock_add_node to add new memblock region within a NUMA node in early_parse_mem() under CONFIG_NUMA, otherwise the mem parameter can not work well. Signed-off-by: Tiezhu Yang <[email protected]> Signed-off-by: Thomas Bogendoerfer <[email protected]>
1 parent fb3d696 commit 795d82e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

arch/mips/kernel/setup.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
#include <asm/cdmm.h>
3838
#include <asm/cpu.h>
3939
#include <asm/debug.h>
40+
#include <asm/mmzone.h>
4041
#include <asm/sections.h>
4142
#include <asm/setup.h>
4243
#include <asm/smp-ops.h>
@@ -364,7 +365,10 @@ static int __init early_parse_mem(char *p)
364365
if (*p == '@')
365366
start = memparse(p + 1, &p);
366367

367-
memblock_add(start, size);
368+
if (IS_ENABLED(CONFIG_NUMA))
369+
memblock_add_node(start, size, pa_to_nid(start), MEMBLOCK_NONE);
370+
else
371+
memblock_add(start, size);
368372

369373
return 0;
370374
}

0 commit comments

Comments
 (0)