linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm:free_initrd_mem should also free the memblock
@ 2014-09-12 10:05 Wang, Yalin
  2014-09-15  2:29 ` [PATCH] arm:extend __init_end to a page align address Wang, Yalin
  0 siblings, 1 reply; 5+ messages in thread
From: Wang, Yalin @ 2014-09-12 10:05 UTC (permalink / raw)
  To: 'Will Deacon', 'linux@arm.linux.org.uk',
	'linux-kernel@vger.kernel.org',
	'linux-arm-kernel@lists.infradead.org',
	'linux-mm@kvack.org'

this patch fix the memblock statics for memblock
in file /sys/kernel/debug/memblock/reserved
if we don't call memblock_free the initrd will still
be marked as reserved, even they are freed.

Signed-off-by: Yalin Wang <yalin.wang@sonymobile.com>
---
 arch/arm/mm/init.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
index 659c75d..7bc8e5b 100644
--- a/arch/arm/mm/init.c
+++ b/arch/arm/mm/init.c
@@ -638,6 +638,7 @@ void free_initrd_mem(unsigned long start, unsigned long end)
 	if (!keep_initrd) {
 		poison_init_mem((void *)start, PAGE_ALIGN(end) - start);
 		free_reserved_area((void *)start, (void *)end, -1, "initrd");
+		memblock_free(__pa(start), end - start);
 	}
 }
 
-- 
2.1.0

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-09-15 13:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-12 10:05 [PATCH] arm:free_initrd_mem should also free the memblock Wang, Yalin
2014-09-15  2:29 ` [PATCH] arm:extend __init_end to a page align address Wang, Yalin
2014-09-15 10:26   ` [RFC Resend] " Wang, Yalin
2014-09-15 10:55     ` Russell King - ARM Linux
2014-09-15 13:15       ` Catalin Marinas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).