]> git.baikalelectronics.ru Git - kernel.git/commit
x86/boot: Fix randconfig build error due to MEMORY_HOTREMOVE
authorBorislav Petkov <bp@suse.de>
Tue, 5 Feb 2019 13:04:01 +0000 (14:04 +0100)
committerBorislav Petkov <bp@suse.de>
Wed, 6 Feb 2019 10:48:42 +0000 (11:48 +0100)
commit5a4b26db5a00b50ff8db64ab7594cc57e045b3c5
treeedc5f4e58b3056efbf2c615fb6cd87dbddba8eab
parent9b8fcf976cec0d5141c765a245c3bf310277d7eb
x86/boot: Fix randconfig build error due to MEMORY_HOTREMOVE

When building randconfigs, one of the failures is:

  ld: arch/x86/boot/compressed/kaslr.o: in function `choose_random_location':
  kaslr.c:(.text+0xbf7): undefined reference to `count_immovable_mem_regions'
  ld: kaslr.c:(.text+0xcbe): undefined reference to `immovable_mem'
  make[2]: *** [arch/x86/boot/compressed/vmlinux] Error 1

because CONFIG_ACPI is not enabled in this particular .config but
CONFIG_MEMORY_HOTREMOVE is and count_immovable_mem_regions() is
unresolvable because it is defined in compressed/acpi.c which is the
compilation unit that depends on CONFIG_ACPI.

Add CONFIG_ACPI to the explicit dependencies for MEMORY_HOTREMOVE.

Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Chao Fan <fanc.fnst@cn.fujitsu.com>
Cc: x86@kernel.org
Link: https://lkml.kernel.org/r/20190205131033.9564-1-bp@alien8.de
arch/x86/boot/compressed/kaslr.c
arch/x86/boot/compressed/misc.h