initramfs: provide a generic free_initrd_mem implementation

For most architectures free_initrd_mem just expands to the same
free_reserved_area call.  Provide that as a generic implementation marked
__weak.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Christoph Hellwig <[email protected]>
Acked-by: Geert Uytterhoeven <[email protected]>	[m68k]
Acked-by: Mike Rapoport <[email protected]>
Cc: Catalin Marinas <[email protected]>	[arm64]
Cc: Steven Price <[email protected]>
Cc: Alexander Viro <[email protected]>
Cc: Guan Xuetao <[email protected]>
Cc: Russell King <[email protected]>
Cc: Will Deacon <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
Christoph Hellwig 2019-05-13 17:18:34 -07:00 • committed by Linus Torvalds
commit 4afd58e14d
15 changed files with 5 additions and 100 deletions

View file

@ -82,13 +82,6 @@ void __init mmu_init(void)
flush_tlb_all();
}
#ifdef CONFIG_BLK_DEV_INITRD
void __init free_initrd_mem(unsigned long start, unsigned long end)
{
free_reserved_area((void *)start, (void *)end, -1, "initrd");
}
#endif
void __ref free_initmem(void)
{
free_initmem_default(-1);