Re: [PATCH 0/4] apply page shift to PFN instead of VA in pfn_to_virt

2024-02-02 Thread Yan Zhao
On Fri, Feb 02, 2024 at 08:04:34AM +0100, Arnd Bergmann wrote: > On Fri, Feb 2, 2024, at 02:02, Yan Zhao wrote: > > On Thu, Feb 01, 2024 at 06:46:46AM +0100, Arnd Bergmann wrote: > >> > >> I think it's fair to assume we won't need asm-generic/page.h any > >> more, as we likely won't be adding new

Re: [PATCH 0/4] apply page shift to PFN instead of VA in pfn_to_virt

2024-02-01 Thread Arnd Bergmann
On Thu, Feb 1, 2024, at 11:46, Geert Uytterhoeven wrote: > Hi Arnd, > > On Thu, Feb 1, 2024 at 11:11 AM Arnd Bergmann wrote: >> I think it's fair to assume we won't need asm-generic/page.h any >> more, as we likely won't be adding new NOMMU architectures. > > So you think riscv-nommu (k210) was

Re: [PATCH 0/4] apply page shift to PFN instead of VA in pfn_to_virt

2024-02-01 Thread Arnd Bergmann
On Fri, Feb 2, 2024, at 02:02, Yan Zhao wrote: > On Thu, Feb 01, 2024 at 06:46:46AM +0100, Arnd Bergmann wrote: >> >> I think it's fair to assume we won't need asm-generic/page.h any >> more, as we likely won't be adding new NOMMU architectures. >> I can have a look myself at removing any such

Re: [PATCH 0/4] apply page shift to PFN instead of VA in pfn_to_virt

2024-02-01 Thread Yan Zhao
On Thu, Feb 01, 2024 at 06:46:46AM +0100, Arnd Bergmann wrote: > On Thu, Feb 1, 2024, at 01:01, Yan Zhao wrote: > > On Wed, Jan 31, 2024 at 12:48:38PM +0100, Arnd Bergmann wrote: > >> On Wed, Jan 31, 2024, at 06:51, Yan Zhao wrote: > >> > >> How exactly did you notice the function being wrong, >

Re: [PATCH 0/4] apply page shift to PFN instead of VA in pfn_to_virt

2024-02-01 Thread Geert Uytterhoeven
Hi Arnd, On Thu, Feb 1, 2024 at 11:11 AM Arnd Bergmann wrote: > I think it's fair to assume we won't need asm-generic/page.h any > more, as we likely won't be adding new NOMMU architectures. So you think riscv-nommu (k210) was the last one we will ever see? Gr{oetje,eeting}s,

Re: [PATCH 0/4] apply page shift to PFN instead of VA in pfn_to_virt

2024-01-31 Thread Arnd Bergmann
On Thu, Feb 1, 2024, at 01:01, Yan Zhao wrote: > On Wed, Jan 31, 2024 at 12:48:38PM +0100, Arnd Bergmann wrote: >> On Wed, Jan 31, 2024, at 06:51, Yan Zhao wrote: >> >> How exactly did you notice the function being wrong, >> did you try to add a user somewhere, or just read through >> the code? >

Re: [PATCH 0/4] apply page shift to PFN instead of VA in pfn_to_virt

2024-01-31 Thread Yan Zhao
On Wed, Jan 31, 2024 at 12:48:38PM +0100, Arnd Bergmann wrote: > On Wed, Jan 31, 2024, at 06:51, Yan Zhao wrote: > > This is a tiny fix to pfn_to_virt() for some platforms. > > > > The original implementaion of pfn_to_virt() takes PFN instead of PA as the > > input to macro __va, with PAGE_SHIFT

Re: [PATCH 0/4] apply page shift to PFN instead of VA in pfn_to_virt

2024-01-31 Thread Arnd Bergmann
On Wed, Jan 31, 2024, at 06:51, Yan Zhao wrote: > This is a tiny fix to pfn_to_virt() for some platforms. > > The original implementaion of pfn_to_virt() takes PFN instead of PA as the > input to macro __va, with PAGE_SHIFT applying to the converted VA, which > is not right under most conditions,

Re: [PATCH 0/4] apply page shift to PFN instead of VA in pfn_to_virt

2024-01-30 Thread Linus Walleij
On Wed, Jan 31, 2024 at 7:25 AM Yan Zhao wrote: > This is a tiny fix to pfn_to_virt() for some platforms. > > The original implementaion of pfn_to_virt() takes PFN instead of PA as the > input to macro __va, with PAGE_SHIFT applying to the converted VA, which > is not right under most

[PATCH 0/4] apply page shift to PFN instead of VA in pfn_to_virt

2024-01-30 Thread Yan Zhao
This is a tiny fix to pfn_to_virt() for some platforms. The original implementaion of pfn_to_virt() takes PFN instead of PA as the input to macro __va, with PAGE_SHIFT applying to the converted VA, which is not right under most conditions, especially when there's an offset in __va. Yan Zhao