lmb: move lmb_map_update_notify() to EFI

When building with qemu_arm64_defconfig with CONFIG_CC_OPTIMIZE_FOR_DEBUG=y
and CONFIG_EFI_LOADER=n 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.

Reported-by: Liya Huang <1425075683@qq.com>
Acked-by: Liya Huang <1425075683@qq.com>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
This commit is contained in:
Heinrich Schuchardt
2025-02-16 12:12:40 +01:00
parent 08573d7688
commit 41d5734442
3 changed files with 45 additions and 28 deletions

View File

@@ -1263,6 +1263,21 @@ efi_status_t efi_disk_get_device_name(const efi_handle_t handle, char *buf, int
*/
void efi_add_known_memory(void);
/**
* efi_map_update_notify() - notify EFI of memory map changes
*
* @addr: start of memory area
* @size: size of memory area
* @op: type of change
* Return: 0 if change could be processed
*/
#ifdef CONFIG_EFI_LOADER
int efi_map_update_notify(phys_addr_t addr, phys_size_t size,
enum lmb_map_op op);
#else
#define efi_map_update_notify(addr, size, op) (0)
#endif
/**
* efi_load_option_dp_join() - join device-paths for load option
*