Linux 4.8-rc8
[linux/fpc-iii.git] / arch / sh / include / asm / pgtable-2level.h
blob19bd89db17e71749b1e7bb07355e2152e4c92408
1 #ifndef __ASM_SH_PGTABLE_2LEVEL_H
2 #define __ASM_SH_PGTABLE_2LEVEL_H
4 #include <asm-generic/pgtable-nopmd.h>
6 /*
7 * traditional two-level paging structure
8 */
9 #define PAGETABLE_LEVELS 2
11 /* PTE bits */
12 #define PTE_MAGNITUDE 2 /* 32-bit PTEs */
14 #define PTE_SHIFT PAGE_SHIFT
15 #define PTE_BITS (PTE_SHIFT - PTE_MAGNITUDE)
17 /* PGD bits */
18 #define PGDIR_SHIFT (PTE_SHIFT + PTE_BITS)
20 #define PTRS_PER_PGD (PAGE_SIZE / (1 << PTE_MAGNITUDE))
21 #define USER_PTRS_PER_PGD (TASK_SIZE/PGDIR_SIZE)
23 #endif /* __ASM_SH_PGTABLE_2LEVEL_H */