patch-2.0.21-2.1.0 linux/include/asm-alpha/page.h
Next file: linux/include/asm-alpha/pgtable.h
Previous file: linux/include/asm-alpha/io.h
Back to the patch index
Back to the overall index
- Lines: 11
- Date:
Wed Sep 25 12:25:44 1996
- Orig file:
lx2.0/v2.0.21/linux/include/asm-alpha/page.h
- Orig date:
Mon Jan 8 08:14:54 1996
diff -u --recursive --new-file lx2.0/v2.0.21/linux/include/asm-alpha/page.h linux/include/asm-alpha/page.h
@@ -52,7 +52,9 @@
#define PAGE_ALIGN(addr) (((addr)+PAGE_SIZE-1)&PAGE_MASK)
#define PAGE_OFFSET 0xFFFFFC0000000000UL
-#define MAP_NR(addr) ((((unsigned long) (addr)) - PAGE_OFFSET) >> PAGE_SHIFT)
+#define __pa(x) ((unsigned long) (x) - PAGE_OFFSET)
+#define __va(x) ((void *)((unsigned long) (x) + PAGE_OFFSET))
+#define MAP_NR(addr) (__pa(addr) >> PAGE_SHIFT)
#endif /* __KERNEL__ */
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov