summaryrefslogtreecommitdiff
path: root/arch/mips
diff options
context:
space:
mode:
authorFlorian Fainelli <f.fainelli@gmail.com>2022-07-07 23:37:42 +0300
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>2022-07-11 11:33:18 +0300
commit9044576357b16d9ebbe10cc567277507d1165a54 (patch)
treeece1fba1ff213fe5cd97870583ad21bfa244fdd4 /arch/mips
parent8baa65126e19af5ee9f3c07e7bb53da41c39e4b1 (diff)
downloadlinux-9044576357b16d9ebbe10cc567277507d1165a54.tar.xz
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>
Diffstat (limited to 'arch/mips')
-rw-r--r--arch/mips/include/asm/io.h2
1 files changed, 1 insertions, 1 deletions
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);
}
/*