mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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>
This commit is contained in:
parent
fade5cad93
commit
c72160fe05
2 changed files with 51 additions and 0 deletions
|
@ -18,6 +18,12 @@ extern int initrd_below_start_ok;
|
|||
extern unsigned long initrd_start, initrd_end;
|
||||
extern void free_initrd_mem(unsigned long, unsigned long);
|
||||
|
||||
#ifdef CONFIG_BLK_DEV_INITRD
|
||||
extern void __init reserve_initrd_mem(void);
|
||||
#else
|
||||
static inline void __init reserve_initrd_mem(void) {}
|
||||
#endif
|
||||
|
||||
extern phys_addr_t phys_initrd_start;
|
||||
extern unsigned long phys_initrd_size;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue