patch-2.4.25 linux-2.4.25/include/asm-mips/pgtable.h
Next file: linux-2.4.25/include/asm-mips/prefetch.h
Previous file: linux-2.4.25/include/asm-mips/pgtable-64.h
Back to the patch index
Back to the overall index
- Lines: 23
- Date:
2004-02-18 05:36:32.000000000 -0800
- Orig file:
linux-2.4.24/include/asm-mips/pgtable.h
- Orig date:
2003-08-25 04:44:44.000000000 -0700
diff -urN linux-2.4.24/include/asm-mips/pgtable.h linux-2.4.25/include/asm-mips/pgtable.h
@@ -216,6 +216,13 @@
#define set_pmd(pmdptr, pmdval) (*(pmdptr) = pmdval)
#define set_pgd(pgdptr, pgdval) (*(pgdptr) = pgdval)
+#define PGD_T_LOG2 ffz(~sizeof(pgd_t))
+#define PMD_T_LOG2 ffz(~sizeof(pmd_t))
+#define PTE_T_LOG2 ffz(~sizeof(pte_t))
+
+#define PTRS_PER_PGD ((PAGE_SIZE << PGD_ORDER) / sizeof(pgd_t))
+#define PTRS_PER_PMD 1
+#define PTRS_PER_PTE ((PAGE_SIZE << PTE_ORDER) / sizeof(pte_t))
#define page_pte(page) page_pte_prot(page, __pgprot(0))
@@ -249,7 +256,7 @@
extern int do_check_pgt_cache(int, int);
-extern pgd_t swapper_pg_dir[1024];
+extern pgd_t swapper_pg_dir[PTRS_PER_PGD];
extern void paging_init(void);
extern void __update_tlb(struct vm_area_struct *vma, unsigned long address,
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)