diff options
Diffstat (limited to 'arch/mips/include/asm/pgtable-32.h')
-rw-r--r-- | arch/mips/include/asm/pgtable-32.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/arch/mips/include/asm/pgtable-32.h b/arch/mips/include/asm/pgtable-32.h index 5d56bb230345..b4204c179b97 100644 --- a/arch/mips/include/asm/pgtable-32.h +++ b/arch/mips/include/asm/pgtable-32.h | |||
@@ -47,7 +47,7 @@ | |||
47 | #define USER_PTRS_PER_PGD (0x80000000UL/PGDIR_SIZE) | 47 | #define USER_PTRS_PER_PGD (0x80000000UL/PGDIR_SIZE) |
48 | #define FIRST_USER_ADDRESS 0 | 48 | #define FIRST_USER_ADDRESS 0 |
49 | 49 | ||
50 | #define VMALLOC_START MAP_BASE | 50 | #define VMALLOC_START MAP_BASE |
51 | 51 | ||
52 | #define PKMAP_BASE (0xfe000000UL) | 52 | #define PKMAP_BASE (0xfe000000UL) |
53 | 53 | ||
@@ -136,7 +136,7 @@ pfn_pte(unsigned long pfn, pgprot_t prot) | |||
136 | #define pte_offset_kernel(dir, address) \ | 136 | #define pte_offset_kernel(dir, address) \ |
137 | ((pte_t *) pmd_page_vaddr(*(dir)) + __pte_offset(address)) | 137 | ((pte_t *) pmd_page_vaddr(*(dir)) + __pte_offset(address)) |
138 | 138 | ||
139 | #define pte_offset_map(dir, address) \ | 139 | #define pte_offset_map(dir, address) \ |
140 | ((pte_t *)page_address(pmd_page(*(dir))) + __pte_offset(address)) | 140 | ((pte_t *)page_address(pmd_page(*(dir))) + __pte_offset(address)) |
141 | #define pte_unmap(pte) ((void)(pte)) | 141 | #define pte_unmap(pte) ((void)(pte)) |
142 | 142 | ||
@@ -155,7 +155,7 @@ pfn_pte(unsigned long pfn, pgprot_t prot) | |||
155 | 155 | ||
156 | #define pte_to_pgoff(_pte) ((((_pte).pte >> 1 ) & 0x07) | \ | 156 | #define pte_to_pgoff(_pte) ((((_pte).pte >> 1 ) & 0x07) | \ |
157 | (((_pte).pte >> 2 ) & 0x38) | \ | 157 | (((_pte).pte >> 2 ) & 0x38) | \ |
158 | (((_pte).pte >> 10) << 6 )) | 158 | (((_pte).pte >> 10) << 6 )) |
159 | 159 | ||
160 | #define pgoff_to_pte(off) ((pte_t) { (((off) & 0x07) << 1 ) | \ | 160 | #define pgoff_to_pte(off) ((pte_t) { (((off) & 0x07) << 1 ) | \ |
161 | (((off) & 0x38) << 2 ) | \ | 161 | (((off) & 0x38) << 2 ) | \ |
@@ -167,14 +167,14 @@ pfn_pte(unsigned long pfn, pgprot_t prot) | |||
167 | /* Swap entries must have VALID and GLOBAL bits cleared. */ | 167 | /* Swap entries must have VALID and GLOBAL bits cleared. */ |
168 | #if defined(CONFIG_64BIT_PHYS_ADDR) && defined(CONFIG_CPU_MIPS32) | 168 | #if defined(CONFIG_64BIT_PHYS_ADDR) && defined(CONFIG_CPU_MIPS32) |
169 | #define __swp_type(x) (((x).val >> 2) & 0x1f) | 169 | #define __swp_type(x) (((x).val >> 2) & 0x1f) |
170 | #define __swp_offset(x) ((x).val >> 7) | 170 | #define __swp_offset(x) ((x).val >> 7) |
171 | #define __swp_entry(type,offset) \ | 171 | #define __swp_entry(type,offset) \ |
172 | ((swp_entry_t) { ((type) << 2) | ((offset) << 7) }) | 172 | ((swp_entry_t) { ((type) << 2) | ((offset) << 7) }) |
173 | #else | 173 | #else |
174 | #define __swp_type(x) (((x).val >> 8) & 0x1f) | 174 | #define __swp_type(x) (((x).val >> 8) & 0x1f) |
175 | #define __swp_offset(x) ((x).val >> 13) | 175 | #define __swp_offset(x) ((x).val >> 13) |
176 | #define __swp_entry(type,offset) \ | 176 | #define __swp_entry(type,offset) \ |
177 | ((swp_entry_t) { ((type) << 8) | ((offset) << 13) }) | 177 | ((swp_entry_t) { ((type) << 8) | ((offset) << 13) }) |
178 | #endif /* defined(CONFIG_64BIT_PHYS_ADDR) && defined(CONFIG_CPU_MIPS32) */ | 178 | #endif /* defined(CONFIG_64BIT_PHYS_ADDR) && defined(CONFIG_CPU_MIPS32) */ |
179 | 179 | ||
180 | #if defined(CONFIG_64BIT_PHYS_ADDR) && defined(CONFIG_CPU_MIPS32) | 180 | #if defined(CONFIG_64BIT_PHYS_ADDR) && defined(CONFIG_CPU_MIPS32) |
@@ -184,7 +184,7 @@ pfn_pte(unsigned long pfn, pgprot_t prot) | |||
184 | #define PTE_FILE_MAX_BITS 30 | 184 | #define PTE_FILE_MAX_BITS 30 |
185 | 185 | ||
186 | #define pte_to_pgoff(_pte) ((_pte).pte_high >> 2) | 186 | #define pte_to_pgoff(_pte) ((_pte).pte_high >> 2) |
187 | #define pgoff_to_pte(off) ((pte_t) { _PAGE_FILE, (off) << 2 }) | 187 | #define pgoff_to_pte(off) ((pte_t) { _PAGE_FILE, (off) << 2 }) |
188 | 188 | ||
189 | #else | 189 | #else |
190 | /* | 190 | /* |
@@ -194,7 +194,7 @@ pfn_pte(unsigned long pfn, pgprot_t prot) | |||
194 | 194 | ||
195 | #define pte_to_pgoff(_pte) ((((_pte).pte >> 1) & 0x7) | \ | 195 | #define pte_to_pgoff(_pte) ((((_pte).pte >> 1) & 0x7) | \ |
196 | (((_pte).pte >> 2) & 0x8) | \ | 196 | (((_pte).pte >> 2) & 0x8) | \ |
197 | (((_pte).pte >> 8) << 4)) | 197 | (((_pte).pte >> 8) << 4)) |
198 | 198 | ||
199 | #define pgoff_to_pte(off) ((pte_t) { (((off) & 0x7) << 1) | \ | 199 | #define pgoff_to_pte(off) ((pte_t) { (((off) & 0x7) << 1) | \ |
200 | (((off) & 0x8) << 2) | \ | 200 | (((off) & 0x8) << 2) | \ |
@@ -208,7 +208,7 @@ pfn_pte(unsigned long pfn, pgprot_t prot) | |||
208 | #define __pte_to_swp_entry(pte) ((swp_entry_t) { (pte).pte_high }) | 208 | #define __pte_to_swp_entry(pte) ((swp_entry_t) { (pte).pte_high }) |
209 | #define __swp_entry_to_pte(x) ((pte_t) { 0, (x).val }) | 209 | #define __swp_entry_to_pte(x) ((pte_t) { 0, (x).val }) |
210 | #else | 210 | #else |
211 | #define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) }) | 211 | #define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) }) |
212 | #define __swp_entry_to_pte(x) ((pte_t) { (x).val }) | 212 | #define __swp_entry_to_pte(x) ((pte_t) { (x).val }) |
213 | #endif | 213 | #endif |
214 | 214 | ||