mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 22:21:40 +00:00
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 61167ad5fe
("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>
This commit is contained in:
parent
abcabb9e30
commit
ce7b1b9777
@ -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
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user