pgtable-2level.h 598 B

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