patch-2.3.40 linux/include/asm-arm/page.h

Next file: linux/include/asm-arm/posix_types.h
Previous file: linux/include/asm-arm/iomd.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.39/linux/include/asm-arm/page.h linux/include/asm-arm/page.h
@@ -69,9 +69,9 @@
 
 #include <asm/arch/memory.h>
 
-#define __pa(x)			((unsigned long)(x) - PAGE_OFFSET + PHYS_OFFSET)
-#define __va(x)			((void *)((unsigned long)(x) + PAGE_OFFSET - PHYS_OFFSET))
-#define MAP_NR(addr)		(((unsigned long)(addr) - PAGE_OFFSET) >> PAGE_SHIFT)
+#define __pa(x)			__virt_to_phys((unsigned long)(x))
+#define __va(x)			((void *)__phys_to_virt((unsigned long)(x)))
+#define MAP_NR(addr)		((__pa(addr) - PHYS_OFFSET) >> PAGE_SHIFT)
 
 #endif
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)