X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=include%2Fasm-mips%2Fpgtable-64.h;fp=include%2Fasm-mips%2Fpgtable-64.h;h=704b551f59e9f93198826f76dbf65f80087eb85b;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=333d9a8f585f5af1826101067db412f1c5c7b00f;hpb=87fc8d1bb10cd459024a742c6a10961fefcef18f;p=linux-2.6.git diff --git a/include/asm-mips/pgtable-64.h b/include/asm-mips/pgtable-64.h index 333d9a8f5..704b551f5 100644 --- a/include/asm-mips/pgtable-64.h +++ b/include/asm-mips/pgtable-64.h @@ -29,11 +29,10 @@ * 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 */