lkml.org 
[lkml]   [2022]   [Jul]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] MIPS: Make phys_to_virt utilize __va()
On Thu, Jul 07, 2022 at 01:37:42PM -0700, Florian Fainelli wrote:
> The implementation is exactly the same, so avoid open-coding it in two
> different locations.
>
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
> ---
> arch/mips/include/asm/io.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/mips/include/asm/io.h b/arch/mips/include/asm/io.h
> index 6f5c86d2bab4..880048a54362 100644
> --- a/arch/mips/include/asm/io.h
> +++ b/arch/mips/include/asm/io.h
> @@ -131,7 +131,7 @@ static inline phys_addr_t virt_to_phys(const volatile void *x)
> */
> static inline void * phys_to_virt(unsigned long address)
> {
> - return (void *)(address + PAGE_OFFSET - PHYS_OFFSET);
> + return __va(address);
> }
>
> /*
> --
> 2.25.1

applied to mips-next.

Thomas.

--
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea. [ RFC1925, 2.3 ]

\
 
 \ /
  Last update: 2022-07-11 10:41    [W:0.072 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site