Commit 795d82ed authored by Tiezhu Yang's avatar Tiezhu Yang Committed by Thomas Bogendoerfer
Browse files

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: default avatarTiezhu Yang <yangtiezhu@loongson.cn>
Signed-off-by: default avatarThomas Bogendoerfer <tsbogend@alpha.franken.de>
parent fb3d6967
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -37,6 +37,7 @@
#include <asm/cdmm.h>
#include <asm/cpu.h>
#include <asm/debug.h>
#include <asm/mmzone.h>
#include <asm/sections.h>
#include <asm/setup.h>
#include <asm/smp-ops.h>
@@ -364,6 +365,9 @@ static int __init early_parse_mem(char *p)
	if (*p == '@')
		start = memparse(p + 1, &p);

	if (IS_ENABLED(CONFIG_NUMA))
		memblock_add_node(start, size, pa_to_nid(start), MEMBLOCK_NONE);
	else
		memblock_add(start, size);

	return 0;