initramfs: Provide a common initrd reserve function
authorKefeng Wang <wangkefeng.wang@huawei.com>
Fri, 15 Jan 2021 05:46:04 +0000 (13:46 +0800)
committerPalmer Dabbelt <palmerdabbelt@google.com>
Fri, 19 Feb 2021 07:17:57 +0000 (23:17 -0800)
commitc72160fe05fb978ad859ba053c4462c2bb960b13
tree7e049e02369f5e4d78f2c9f3cfe24a89163d8b72
parentfade5cad9339a627c5ad029e3577582b6292df03
initramfs: Provide a common initrd reserve function

Some architectures(eg, ARM and riscv) have similar logic to
check and reserve the memory of initrd, let's provide a common
function reserve_initrd_mem() to reduce duplicated code.

Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
include/linux/initrd.h
init/initramfs.c