Re: [PATCH] xen/netback: Pass (void *) to virt_to_page()

2023-05-25 Thread Wei Liu
On Wed, May 24, 2023 at 10:11:47PM -0700, Jakub Kicinski wrote: > On Tue, 23 May 2023 16:03:42 +0200 Linus Walleij wrote: > > virt_to_page() takes a virtual address as argument but > > the driver passes an unsigned long, which works because > > the target platform(s) uses polymorphic macros to calc

Re: [PATCH] xen/netback: Pass (void *) to virt_to_page()

2023-05-25 Thread Linus Walleij
On Thu, May 25, 2023 at 7:12 AM Jakub Kicinski wrote: > On Wed, 24 May 2023 22:11:47 -0700 Jakub Kicinski wrote: > > On Tue, 23 May 2023 16:03:42 +0200 Linus Walleij wrote: > > > virt_to_page() takes a virtual address as argument but > > > the driver passes an unsigned long, which works because >

Re: [PATCH] xen/netback: Pass (void *) to virt_to_page()

2023-05-24 Thread Jakub Kicinski
On Wed, 24 May 2023 22:11:47 -0700 Jakub Kicinski wrote: > On Tue, 23 May 2023 16:03:42 +0200 Linus Walleij wrote: > > virt_to_page() takes a virtual address as argument but > > the driver passes an unsigned long, which works because > > the target platform(s) uses polymorphic macros to calculate >

Re: [PATCH] xen/netback: Pass (void *) to virt_to_page()

2023-05-24 Thread Jakub Kicinski
On Tue, 23 May 2023 16:03:42 +0200 Linus Walleij wrote: > virt_to_page() takes a virtual address as argument but > the driver passes an unsigned long, which works because > the target platform(s) uses polymorphic macros to calculate > the page. > > Since many architectures implement virt_to_pfn()

Re: [PATCH] xen/netback: Pass (void *) to virt_to_page()

2023-05-23 Thread Wei Liu
On Tue, May 23, 2023 at 04:03:42PM +0200, Linus Walleij wrote: > virt_to_page() takes a virtual address as argument but > the driver passes an unsigned long, which works because > the target platform(s) uses polymorphic macros to calculate > the page. > > Since many architectures implement virt_to

[PATCH] xen/netback: Pass (void *) to virt_to_page()

2023-05-23 Thread Linus Walleij
virt_to_page() takes a virtual address as argument but the driver passes an unsigned long, which works because the target platform(s) uses polymorphic macros to calculate the page. Since many architectures implement virt_to_pfn() as a macro, this function becomes polymorphic and accepts both a (un