vserver 1.9.5.x5
[linux-2.6.git] / include / asm-mips / pgtable-64.h
index 333d9a8..704b551 100644 (file)
  * that the failure is recognized later on. Linux does not seem to
  * handle these failures very well though. The empty_bad_page_table has
  * invalid pte entries in it, to force page faults.
- * Vmalloc handling: vmalloc uses swapper_pg_dir[0] (returned by
- * pgd_offset_k), which is initalized to point to kpmdtbl. kpmdtbl is
- * the only single page pmd in the system. kpmdtbl entries point into
- * kptbl[] array. We reserve 1 << PGD_ORDER pages to hold the
- * vmalloc range translations, which the fault handler looks at.
+ *
+ * Kernel mappings: kernel mappings are held in the swapper_pg_table.
+ * The layout is identical to userspace except it's indexed with the
+ * fault address - VMALLOC_START.
  */
 
 /* PMD_SHIFT determines the size of the area a second-level page table can map */
@@ -66,7 +65,7 @@
  */
 #ifdef CONFIG_PAGE_SIZE_4KB
 #define PGD_ORDER              1
-#define PMD_ORDER              1
+#define PMD_ORDER              0
 #define PTE_ORDER              0
 #endif
 #ifdef CONFIG_PAGE_SIZE_8KB
@@ -94,7 +93,7 @@
 
 #define VMALLOC_START          XKSEG
 #define VMALLOC_END    \
-       (VMALLOC_START + ((1 << PGD_ORDER) * PTRS_PER_PTE * PAGE_SIZE))
+       (VMALLOC_START + PTRS_PER_PGD * PTRS_PER_PMD * PTRS_PER_PTE * PAGE_SIZE)
 
 #define pte_ERROR(e) \
        printk("%s:%d: bad pte %016lx.\n", __FILE__, __LINE__, pte_val(e))
@@ -225,10 +224,4 @@ static inline pte_t mk_swap_pte(unsigned long type, unsigned long offset)
 #define pgoff_to_pte(off) \
        ((pte_t) { (((off) & 0x1f) << 3) + (((off) >> 6) << 9) + _PAGE_FILE })
 
-/*
- * Used for the b0rked handling of kernel pagetables on the 64-bit kernel.
- */
-extern pte_t kptbl[(PAGE_SIZE << PGD_ORDER)/sizeof(pte_t)];
-extern pmd_t kpmdtbl[PTRS_PER_PMD];
-
 #endif /* _ASM_PGTABLE_64_H */