]> git.ipfire.org Git - thirdparty/linux.git/commit - init/initramfs.c
arm64: use generic free_initrd_mem()
authorMike Rapoport <rppt@linux.ibm.com>
Sat, 28 Sep 2019 08:02:26 +0000 (11:02 +0300)
committerCatalin Marinas <catalin.marinas@arm.com>
Wed, 16 Oct 2019 12:55:25 +0000 (13:55 +0100)
commit899ee4afe5eb262236717188ccdaa0192c00dc5a
treed3614a378962712beae3211d3d41f4d720cf2cfd
parentce87de45b3243d7023e8a4a76ba004002a7ec087
arm64: use generic free_initrd_mem()

arm64 calls memblock_free() for the initrd area in its implementation of
free_initrd_mem(), but this call has no actual effect that late in the boot
process. By the time initrd is freed, all the reserved memory is managed by
the page allocator and the memblock.reserved is unused, so the only purpose
of the memblock_free() call is to keep track of initrd memory for debugging
and accounting.

Without the memblock_free() call the only difference between arm64 and the
generic versions of free_initrd_mem() is the memory poisoning.

Move memblock_free() call to the generic code, enable it there
for the architectures that define ARCH_KEEP_MEMBLOCK and use the generic
implementation of free_initrd_mem() on arm64.

Tested-by: Anshuman Khandual <anshuman.khandual@arm.com> #arm64
Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
Acked-by: Will Deacon <will@kernel.org>
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/mm/init.c
init/initramfs.c