[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190213184448.GB20399@lst.de>
Date: Wed, 13 Feb 2019 19:44:48 +0100
From: Christoph Hellwig <hch@....de>
To: Mike Rapoport <rppt@...ux.ibm.com>
Cc: Christoph Hellwig <hch@....de>,
Andrew Morton <akpm@...ux-foundation.org>,
Alexander Viro <viro@...iv.linux.org.uk>,
Russell King <linux@...linux.org.uk>,
Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will.deacon@....com>,
Guan Xuetao <gxt@....edu.cn>,
linux-arm-kernel@...ts.infradead.org, linux-mm@...ck.org,
linux-arch@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 7/8] initramfs: proide a generic free_initrd_mem
implementation
On Wed, Feb 13, 2019 at 08:41:40PM +0200, Mike Rapoport wrote:
> csky seems to open-code free_reserved_page with the only
> difference that it's also increments totalram_pages for the freed pages,
> which doesn't seem correct anyway...
>
> That said, I suppose arch/csky can be also added to the party.
Yes, I noticed that. But I'd rather move it over manually in
another patch post rc1 or for the next merge window.
> > +void __weak free_initrd_mem(unsigned long start, unsigned long end)
> > +{
> > + free_reserved_area((void *)start, (void *)end, -1, "initrd");
>
> Some architectures have pr_info("Freeing initrd memory..."), I'd add it for
> the generic version as well.
Well, if we think such a printk is useful it should probably be
moved to the caller in init/initramfs.c instead. I can include a
patch for that in the next iteration of the series.
> Another thing that I was thinking of is that x86 has all those memory
> protection calls in its free_initrd_mem, maybe it'd make sense to have them
> in the generic version as well?
Maybe. But I'd rather keep it out of the initial series as it looks
a little more complicated. Having a single implementation
of free_initrd_mem would be great, though.
Powered by blists - more mailing lists