Message ID | 20190107161047.10516-2-anup@brainfault.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Fixmap support and MM cleanups | expand |
On Mon, Jan 07, 2019 at 09:40:43PM +0530, Anup Patel wrote: > From: Anup Patel <anup.patel@wdc.com> > > We move free_initrd_mem() to kernel/setup.c so that all initrd > related functions are in one place. > > Signed-off-by: Anup Patel <anup.patel@wdc.com> Looks fine: Reviewed-by: Christoph Hellwig <hch@lst.de> Talking about free_initrd_mem - don't we need to call free_reserved_area to actually release the memory?
On Tue, Jan 15, 2019 at 7:13 PM Christoph Hellwig <hch@infradead.org> wrote: > > On Mon, Jan 07, 2019 at 09:40:43PM +0530, Anup Patel wrote: > > From: Anup Patel <anup.patel@wdc.com> > > > > We move free_initrd_mem() to kernel/setup.c so that all initrd > > related functions are in one place. > > > > Signed-off-by: Anup Patel <anup.patel@wdc.com> > > Looks fine: > > Reviewed-by: Christoph Hellwig <hch@lst.de> > > Talking about free_initrd_mem - don't we need to call free_reserved_area > to actually release the memory? Yes, we should. Thanks for pointing. I will include separate patch for it. Thanks, Anup
diff --git a/arch/riscv/kernel/setup.c b/arch/riscv/kernel/setup.c index fc8006a042eb..64646d0b4d53 100644 --- a/arch/riscv/kernel/setup.c +++ b/arch/riscv/kernel/setup.c @@ -96,6 +96,10 @@ static void __init setup_initrd(void) initrd_start = 0; initrd_end = 0; } + +void free_initrd_mem(unsigned long start, unsigned long end) +{ +} #endif /* CONFIG_BLK_DEV_INITRD */ pgd_t swapper_pg_dir[PTRS_PER_PGD] __page_aligned_bss; diff --git a/arch/riscv/mm/init.c b/arch/riscv/mm/init.c index 1d9bfaff60bc..f354486f9b78 100644 --- a/arch/riscv/mm/init.c +++ b/arch/riscv/mm/init.c @@ -14,7 +14,6 @@ #include <linux/init.h> #include <linux/mm.h> #include <linux/memblock.h> -#include <linux/initrd.h> #include <linux/swap.h> #include <linux/sizes.h> @@ -63,9 +62,3 @@ void free_initmem(void) { free_initmem_default(0); } - -#ifdef CONFIG_BLK_DEV_INITRD -void free_initrd_mem(unsigned long start, unsigned long end) -{ -} -#endif /* CONFIG_BLK_DEV_INITRD */