Re: [PATCH] asm-generic: provide generic page_to_phys and phys_to_page implementations

2024-10-10 Thread Christoph Hellwig
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

Re: [PATCH] asm-generic: provide generic page_to_phys and phys_to_page implementations

2024-10-10 Thread Christoph Hellwig
On Wed, Oct 09, 2024 at 02:06:27PM +, Arnd Bergmann wrote: > This is clearly a good idea, and I'm happy to take that through > the asm-generic tree if there are no complaints. > > Do you have any other patches that depend on it? Well, I have new code that would benefit from these helpers, but

Re: [PATCH] asm-generic: provide generic page_to_phys and phys_to_page implementations

2024-10-09 Thread Christophe Leroy
Le 09/10/2024 à 13:43, Christoph Hellwig a écrit : page_to_phys is duplicated by all architectures, and from some strange reason placed in where it doesn't fit at all. phys_to_page is only provided by a few architectures despite having a lot of open coded users. Provide generic versions in

Re: [PATCH] asm-generic: provide generic page_to_phys and phys_to_page implementations

2024-10-09 Thread Arnd Bergmann
On Wed, Oct 9, 2024, at 11:43, Christoph Hellwig wrote: > page_to_phys is duplicated by all architectures, and from some strange > reason placed in where it doesn't fit at all. > > phys_to_page is only provided by a few architectures despite having a lot > of open coded users. > > Provide generic

[PATCH] asm-generic: provide generic page_to_phys and phys_to_page implementations

2024-10-09 Thread Christoph Hellwig
page_to_phys is duplicated by all architectures, and from some strange reason placed in where it doesn't fit at all. phys_to_page is only provided by a few architectures despite having a lot of open coded users. Provide generic versions in to make these helpers more easily usable. Signed-off-b