diff options
author | Huang Pei <huangpei@loongson.cn> | 2024-01-23 09:47:58 +0800 |
---|---|---|
committer | Thomas Bogendoerfer <tsbogend@alpha.franken.de> | 2024-01-26 10:34:07 +0100 |
commit | ce7b1b97776ec0b068c4dd6b6dbb48ae09a23519 (patch) | |
tree | 117fb2c5b939855e666c354d57876bca79d625a8 /arch/mips/loongson64 | |
parent | abcabb9e30a1f9a69c76776f8abffc31c377b542 (diff) | |
download | linux-ce7b1b97776ec0b068c4dd6b6dbb48ae09a23519.tar.gz linux-ce7b1b97776ec0b068c4dd6b6dbb48ae09a23519.tar.bz2 linux-ce7b1b97776ec0b068c4dd6b6dbb48ae09a23519.zip |
MIPS: loongson64: set nid for reserved memblock region
Commit 61167ad5fecd("mm: pass nid to reserve_bootmem_region()") reveals
that reserved memblock regions have no valid node id set, just set it
right since loongson64 firmware makes it clear in memory layout info.
This works around booting failure on 3A1000+ since commit 61167ad5fecd
("mm: pass nid to reserve_bootmem_region()") under
CONFIG_DEFERRED_STRUCT_PAGE_INIT.
Signed-off-by: Huang Pei <huangpei@loongson.cn>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Diffstat (limited to 'arch/mips/loongson64')
-rw-r--r-- | arch/mips/loongson64/init.c | 2 | ||||
-rw-r--r-- | arch/mips/loongson64/numa.c | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/arch/mips/loongson64/init.c b/arch/mips/loongson64/init.c index f25caa6aa9d3..000ba91c0886 100644 --- a/arch/mips/loongson64/init.c +++ b/arch/mips/loongson64/init.c @@ -103,6 +103,8 @@ void __init szmem(unsigned int node) if (loongson_sysconf.vgabios_addr) memblock_reserve(virt_to_phys((void *)loongson_sysconf.vgabios_addr), SZ_256K); + /* set nid for reserved memory */ + memblock_set_node((u64)node << 44, (u64)(node+1) << 44, &memblock.reserved, node); } #ifndef CONFIG_NUMA diff --git a/arch/mips/loongson64/numa.c b/arch/mips/loongson64/numa.c index 8f61e93c0c5b..6345e096c532 100644 --- a/arch/mips/loongson64/numa.c +++ b/arch/mips/loongson64/numa.c @@ -132,6 +132,8 @@ static void __init node_mem_init(unsigned int node) /* Reserve pfn range 0~node[0]->node_start_pfn */ memblock_reserve(0, PAGE_SIZE * start_pfn); + /* set nid for reserved memory on node 0 */ + memblock_set_node(0, (u64)1 << 44, &memblock.reserved, 1); } } |