From dbf96c4953a2acf193c7804f3853eddd92a66f65 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sat, 28 Aug 2021 13:11:51 +0200 Subject: linux: Use kvtophys instead of _kvtophys _kvtophys only works with direct-mappable memory, which is scarse, better use kvtophys that can work with any kind of memory. * linux/src/include/asm-i386/io.h: Include (virt_to_phys): Use kvtophys instead of _kvtophys. --- linux/src/include/asm-i386/io.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'linux/src') diff --git a/linux/src/include/asm-i386/io.h b/linux/src/include/asm-i386/io.h index 34cf105b..e5c0744b 100644 --- a/linux/src/include/asm-i386/io.h +++ b/linux/src/include/asm-i386/io.h @@ -26,6 +26,7 @@ */ #include +#include #ifdef SLOW_IO_BY_JUMPING #define __SLOW_DOWN_IO __asm__ __volatile__("jmp 1f\n1:\tjmp 1f\n1:") @@ -47,7 +48,7 @@ */ static inline unsigned long virt_to_phys(volatile void * address) { - return (unsigned long) _kvtophys(address); + return (unsigned long) kvtophys((vm_offset_t) address); } static inline void * phys_to_virt(unsigned long address) -- cgit v1.2.3