MIPS: Make phys_to_virt utilize __va()

The implementation is exactly the same, so avoid open-coding it in two
different locations.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Serge Semin <fancer.lancer@gmail.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
This commit is contained in:
Florian Fainelli 2022-07-07 13:37:42 -07:00 committed by Thomas Bogendoerfer
parent 8baa65126e
commit 9044576357

View file

@ -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);
}
/*