• Huacai Chen's avatar
    MIPS: Loongson64: Fix boot failure after dropping boot_mem_map · 2b6509f4
    Huacai Chen authored
    From commit a94e4f24 ("MIPS: init: Drop boot_mem_map") onwards,
    add_memory_region() is handled by memblock_add()/memblock_reserve()
    directly and all bootmem API should be converted to memblock API.
    Otherwise it will lead to boot failure, especially in the NUMA case
    because add_memory_region lose the node_id information.
    
    Fixes: a94e4f24 ("MIPS: init: Drop boot_mem_map")
    Signed-off-by: default avatarHuacai Chen <chenhc@lemote.com>
    Signed-off-by: default avatarJiaxun Yang <jiaxun.yang@flygoat.com>
    [paul.burton@mips.com:
      - Invert node_id check to de-indent the switch statement & avoid lines
        over 80 characters.
      - Fixup commit reference in commit message.]
    Signed-off-by: default avatarPaul Burton <paul.burton@mips.com>
    Cc: Ralf Baechle <ralf@linux-mips.org>
    Cc: James Hogan <jhogan@kernel.org>
    Cc: linux-mips@linux-mips.org
    Cc: linux-mips@vger.kernel.org
    Cc: Fuxin Zhang <zhangfx@lemote.com>
    Cc: Zhangjin Wu <wuzhangjin@gmail.com>
    Cc: Huacai Chen <chenhuacai@gmail.com>
    2b6509f4
mem.c 3.44 KB