* Fwd: [PATCH v2] memblock: export memblock_free() to free reserved memory.
[not found] <20240625115825.1163653-1-lgs156412@gmail.com>
@ 2024-06-25 12:08 ` liangxi Liu
0 siblings, 0 replies; only message in thread
From: liangxi Liu @ 2024-06-25 12:08 UTC (permalink / raw)
To: linux-mm, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1113 bytes --]
---------- Forwarded message ---------
From: Guanshun Liu <lgs156412@gmail.com>
Date: Tue, Jun 25, 2024 at 7:58 PM
Subject: [PATCH v2] memblock: export memblock_free() to free reserved
memory.
To: <rppt@kernel.org>
Cc: <akpm@linux-foundation.org>, Guanshun Liu <lgs156412@gmail.com>
On architectures that support the preservation of memblock metadata
after __init, allow drivers to call memblock_free() to free a
reservation configured in dts. This is a hack to support the
freeing of bootsplash reservations passed to Linux by the bootloader.
Signed-off-by: Guanshun Liu <lgs156412@gmail.com>
---
| 3 +++
1 file changed, 3 insertions(+)
--git a/mm/memblock.c b/mm/memblock.c
index 6d18485571b4..20e7f81fc076 100644
--- a/mm/memblock.c
+++ b/mm/memblock.c
@@ -848,6 +848,9 @@ void __init_memblock memblock_free(void *ptr, size_t
size)
if (ptr)
memblock_phys_free(__pa(ptr), size);
}
+#ifdef CONFIG_ARCH_KEEP_MEMBLOCK
+EXPORT_SYMBOL_GPL(memblock_free);
+#endif
/**
* memblock_phys_free - free boot memory block
--
2.25.1
[-- Attachment #2: Type: text/html, Size: 1688 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-06-25 12:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20240625115825.1163653-1-lgs156412@gmail.com>
2024-06-25 12:08 ` Fwd: [PATCH v2] memblock: export memblock_free() to free reserved memory liangxi Liu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox