sh: Abstract the number of page table levels
[linux-2.6.git] / arch / sh / include / asm / pgtable_nopmd.h
blobf0b525b3cb4a4b404c42a21a7ddeeb20d09123aa
1 #ifndef __ASM_SH_PGTABLE_NOPMD_H
2 #define __ASM_SH_PGTABLE_NOPMD_H
4 #include <asm-generic/pgtable-nopmd.h>
6 /*
7 * traditional two-level paging structure
8 */
10 /* PTE bits */
11 #define PTE_MAGNITUDE 2 /* 32-bit PTEs */
13 #define PTE_SHIFT PAGE_SHIFT
14 #define PTE_BITS (PTE_SHIFT - PTE_MAGNITUDE)
16 /* PGD bits */
17 #define PGDIR_SHIFT (PTE_SHIFT + PTE_BITS)
19 #define PTRS_PER_PGD (PAGE_SIZE / (1 << PTE_MAGNITUDE))
20 #define USER_PTRS_PER_PGD (TASK_SIZE/PGDIR_SIZE)
22 #endif /* __ASM_SH_PGTABLE_NOPMD_H */