]> git.itanic.dy.fi Git - linux-stable/commit
LoongArch: Fix arch_remove_memory() undefined build error
authorYupeng Li <liyupeng@zbhlos.com>
Wed, 31 Aug 2022 05:40:17 +0000 (13:40 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 20 Sep 2022 10:43:49 +0000 (12:43 +0200)
commite18b2e3310f0ba4fa1e6c518ece9e429ecaa7fad
treeaddb747d2ed4f46ecf4d0ea2e1fa8e3669e8444d
parent6023efd94e5469e7503f69bc1377585db77729a7
LoongArch: Fix arch_remove_memory() undefined build error

[ Upstream commit 1a470ce4e9106cc4c3c0edfb2e213dcbb7224dc4 ]

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: Yupeng Li <liyupeng@zbhlos.com>
Signed-off-by: Caicai <caizp2008@163.com>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/loongarch/mm/init.c