• Yupeng Li's avatar
    LoongArch: Fix arch_remove_memory() undefined build error · 1a470ce4
    Yupeng Li authored
    The kernel build error when unslected CONFIG_MEMORY_HOTREMOVE because
    arch_remove_memory() is needed by mm/memory_hotplug.c but undefined.
    
    Some build error messages like:
    
     LD      vmlinux.o
     MODPOST vmlinux.symvers
     MODINFO modules.builtin.modinfo
     GEN     modules.builtin
     LD      .tmp_vmlinux.kallsyms1
    loongarch64-linux-gnu-ld: mm/memory_hotplug.o: in function `.L242':
    memory_hotplug.c:(.ref.text+0x930): undefined reference to `arch_remove_memory'
    make: *** [Makefile:1169:vmlinux] 错误 1
    
    Removed CONFIG_MEMORY_HOTREMOVE requirement and rearrange the file refer
    to the definitions of other platform architectures.
    Signed-off-by: default avatarYupeng Li <liyupeng@zbhlos.com>
    Signed-off-by: default avatarCaicai <caizp2008@163.com>
    Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
    1a470ce4
init.c 4.34 KB