Skip to content

Commit

Permalink
fix: export memblock_free
Browse files Browse the repository at this point in the history
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/
  • Loading branch information
AaronDewes authored Nov 11, 2024
1 parent c0cb0d0 commit 8a1d2e4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mm/memblock.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 8a1d2e4

Please sign in to comment.