patch-2.3.29 linux/include/asm-i386/highmem.h

Next file: linux/include/asm-i386/io.h
Previous file: linux/include/asm-i386/e820.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.28/linux/include/asm-i386/highmem.h linux/include/asm-i386/highmem.h
@@ -37,7 +37,20 @@
 
 extern void kmap_init(void) __init;
 
+/*
+ * Right now we initialize only a single pte table. It can be extended
+ * easily, subsequent pte tables have to be allocated in one physical
+ * chunk of RAM.
+ */
 #define PKMAP_BASE (0xff000000UL)
+#ifdef CONFIG_X86_PAE
+#define LAST_PKMAP 512
+#else
+#define LAST_PKMAP 1024
+#endif
+#define LAST_PKMAP_MASK (LAST_PKMAP-1)
+#define PKMAP_NR(virt)  ((virt-PKMAP_BASE) >> PAGE_SHIFT)
+#define PKMAP_ADDR(nr)  (PKMAP_BASE + ((nr) << PAGE_SHIFT))
 
 extern unsigned long FASTCALL(kmap_high(struct page *page));
 extern void FASTCALL(kunmap_high(struct page *page));

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