From 8a1d2e46fcea39673a9b946fc34e5604c475a5c5 Mon Sep 17 00:00:00 2001 From: Aaron Dewes Date: Mon, 11 Nov 2024 22:41:46 +0100 Subject: [PATCH] fix: export memblock_free This is required for drivers/gpu/drm/rockchip/rockchip_drm_logo.c to compile properly as a module. Without this patch, build including rockchip-drm fail for me with ERROR: modpost: "memblock_free" undefined! cherry-picked from https://android.googlesource.com/kernel/common/+/cd5f5cb9fe677466551e44039b31198e7b0dc812%5E%21/ --- mm/memblock.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mm/memblock.c b/mm/memblock.c index f71c8b0f8ac7f..8185cef57d45b 100644 --- a/mm/memblock.c +++ b/mm/memblock.c @@ -875,6 +875,10 @@ int __init_memblock memblock_phys_free(phys_addr_t base, phys_addr_t size) return memblock_remove_range(&memblock.reserved, base, size); } +#ifdef CONFIG_ARCH_KEEP_MEMBLOCK +EXPORT_SYMBOL_GPL(memblock_free); +#endif + int __init_memblock memblock_reserve(phys_addr_t base, phys_addr_t size) { phys_addr_t end = base + size - 1;