pgtable-2level.h 528 B

1234567891011121314151617181920212223
  1. #ifndef __ASM_SH_PGTABLE_2LEVEL_H
  2. #define __ASM_SH_PGTABLE_2LEVEL_H
  3. #include <asm-generic/pgtable-nopmd.h>
  4. /*
  5. * traditional two-level paging structure
  6. */
  7. #define PAGETABLE_LEVELS 2
  8. /* PTE bits */
  9. #define PTE_MAGNITUDE 2 /* 32-bit PTEs */
  10. #define PTE_SHIFT PAGE_SHIFT
  11. #define PTE_BITS (PTE_SHIFT - PTE_MAGNITUDE)
  12. /* PGD bits */
  13. #define PGDIR_SHIFT (PTE_SHIFT + PTE_BITS)
  14. #define PTRS_PER_PGD (PAGE_SIZE / (1 << PTE_MAGNITUDE))
  15. #define USER_PTRS_PER_PGD (TASK_SIZE/PGDIR_SIZE)
  16. #endif /* __ASM_SH_PGTABLE_2LEVEL_H */