Re: Bad virt_to_phys since commit 54c7a8916a887f35

From: Christoph Hellwig
Date: Thu May 16 2019 - 10:25:51 EST


On Thu, May 16, 2019 at 03:21:19PM +0100, Mark Rutland wrote:
> > void __weak free_initrd_mem(unsigned long start, unsigned long end)
> > {
> > + if (!start)
> > + return;
> > +
> > free_reserved_area((void *)start, (void *)end, POISON_FREE_INITMEM,
> > "initrd");
> > }
>
> I think this should work, given Steven's patch checks the same thing.
>
> I don't have a preference as to which patch should be taken, so I'll
> leave that to Christoph.

We still have plenty of architectures not using the generic
free_initrd_mem, so checking it in the caller gives us better
coverage.