summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2021-08-28 13:11:51 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2021-08-28 13:11:51 +0200
commitdbf96c4953a2acf193c7804f3853eddd92a66f65 (patch)
tree63fd41c6ab58e55cdd0da455a19cebae73408825
parentd4311dd342bce90b8e362426e25b71076b9f371a (diff)
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 <intel/pmap.h> (virt_to_phys): Use kvtophys instead of _kvtophys.
-rw-r--r--linux/src/include/asm-i386/io.h3
1 files changed, 2 insertions, 1 deletions
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 <machine/vm_param.h>
+#include <intel/pmap.h>
#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)