Go to the documentation of this file.
10 #ifndef _ASM_PGTABLE_2LEVEL_H
11 #define _ASM_PGTABLE_2LEVEL_H
71 #define PTRS_PER_PTE 512
72 #define PTRS_PER_PMD 1
73 #define PTRS_PER_PGD 2048
75 #define PTE_HWTABLE_PTRS (PTRS_PER_PTE)
76 #define PTE_HWTABLE_OFF (PTE_HWTABLE_PTRS * sizeof(pte_t))
77 #define PTE_HWTABLE_SIZE (PTRS_PER_PTE * sizeof(u32))
84 #define PGDIR_SHIFT 21
86 #define PMD_SIZE (1UL << PMD_SHIFT)
87 #define PMD_MASK (~(PMD_SIZE-1))
88 #define PGDIR_SIZE (1UL << PGDIR_SHIFT)
89 #define PGDIR_MASK (~(PGDIR_SIZE-1))
94 #define SECTION_SHIFT 20
95 #define SECTION_SIZE (1UL << SECTION_SHIFT)
96 #define SECTION_MASK (~(SECTION_SIZE-1))
101 #define SUPERSECTION_SHIFT 24
102 #define SUPERSECTION_SIZE (1UL << SUPERSECTION_SHIFT)
103 #define SUPERSECTION_MASK (~(SUPERSECTION_SIZE-1))
105 #define USER_PTRS_PER_PGD (TASK_SIZE / PGDIR_SIZE)
118 #define L_PTE_PRESENT (_AT(pteval_t, 1) << 0)
119 #define L_PTE_YOUNG (_AT(pteval_t, 1) << 1)
120 #define L_PTE_FILE (_AT(pteval_t, 1) << 2)
121 #define L_PTE_DIRTY (_AT(pteval_t, 1) << 6)
122 #define L_PTE_RDONLY (_AT(pteval_t, 1) << 7)
123 #define L_PTE_USER (_AT(pteval_t, 1) << 8)
124 #define L_PTE_XN (_AT(pteval_t, 1) << 9)
125 #define L_PTE_SHARED (_AT(pteval_t, 1) << 10)
131 #define L_PTE_MT_UNCACHED (_AT(pteval_t, 0x00) << 2)
132 #define L_PTE_MT_BUFFERABLE (_AT(pteval_t, 0x01) << 2)
133 #define L_PTE_MT_WRITETHROUGH (_AT(pteval_t, 0x02) << 2)
134 #define L_PTE_MT_WRITEBACK (_AT(pteval_t, 0x03) << 2)
135 #define L_PTE_MT_MINICACHE (_AT(pteval_t, 0x06) << 2)
136 #define L_PTE_MT_WRITEALLOC (_AT(pteval_t, 0x07) << 2)
137 #define L_PTE_MT_DEV_SHARED (_AT(pteval_t, 0x04) << 2)
138 #define L_PTE_MT_DEV_NONSHARED (_AT(pteval_t, 0x0c) << 2)
139 #define L_PTE_MT_DEV_WC (_AT(pteval_t, 0x09) << 2)
140 #define L_PTE_MT_DEV_CACHED (_AT(pteval_t, 0x0b) << 2)
141 #define L_PTE_MT_MASK (_AT(pteval_t, 0x0f) << 2)
150 #define pud_none(pud) (0)
151 #define pud_bad(pud) (0)
152 #define pud_present(pud) (1)
153 #define pud_clear(pudp) do { } while (0)
154 #define set_pud(pud,pudp) do { } while (0)
161 #define pmd_bad(pmd) (pmd_val(pmd) & 2)
163 #define copy_pmd(pmdpd,pmdps) \
165 pmdpd[0] = pmdps[0]; \
166 pmdpd[1] = pmdps[1]; \
167 flush_pmd_entry(pmdpd); \
170 #define pmd_clear(pmdp) \
172 pmdp[0] = __pmd(0); \
173 pmdp[1] = __pmd(0); \
174 clean_pmd_entry(pmdp); \
178 #define pmd_addr_end(addr,end) (end)
180 #define set_pte_ext(ptep,pte,ext) cpu_set_pte_ext(ptep,pte,ext)