pgtable-2level.h 567 B

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