[PATCH] asm-generic: provide generic page_to_phys and phys_to_page implementations
Christoph Hellwig
hch at lst.de
Thu Oct 10 01:37:56 PDT 2024
On Thu, Oct 10, 2024 at 09:03:42AM +0200, Christoph Hellwig wrote:
> > I think we should try to have a little fewer nested macros
> > to evaluate here, right now this ends up expanding
> > __pfn_to_phys, PFN_PHYS, PAGE_SHIFT, CONFIG_PAGE_SHIFT,
> > page_to_pfn and __page_to_pfn. While the behavior is fine,
> > modern gcc versions list all of those in an warning message
> > if someone passes the wrong arguments.
> >
> > Changing the two macros above into inline functions
> > would help as well, but may cause other problems.
>
> Doing them as inlines seems useful to me, let me throw that at
> the buildbot and see if anything explodes.
The inline version instantly blows up, so I'll try just open coding
the phys to/from pfn translation instead.
More information about the linux-riscv
mailing list