When building with qemu_arm64_defconfig with CONFIG_CC_OPTIMIZE_FOR_DEBUG=y and CONFIG_EFI_LOADER an error undefined reference to efi_add_memory_map_pg occurs.
Move the EFI dependent part of lmb_map_update_notify() to the EFI sub-system and clean up a little. Thanks to Liya for reporting the issue and providing a first patch. Heinrich Schuchardt (3): lmb: avoid superfluous value check in lmb_map_update_notify() lmb: move lmb_map_update_notify() to EFI efi_loader: make efi_add_memory_map_pg() static include/efi_loader.h | 30 ++++++++++----------- include/lmb.h | 12 +++++++++ lib/efi_loader/efi_memory.c | 28 ++++++++++++++++++++ lib/lmb.c | 52 +++++++------------------------------ 4 files changed, 64 insertions(+), 58 deletions(-) -- 2.47.1