diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/include/asm/pgtable-ppc32.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/pgtable-ppc32.h b/arch/powerpc/include/asm/pgtable-ppc32.h index 55646adfa843..a83809916f28 100644 --- a/arch/powerpc/include/asm/pgtable-ppc32.h +++ b/arch/powerpc/include/asm/pgtable-ppc32.h | |||
@@ -307,6 +307,17 @@ static inline void __ptep_set_access_flags(pte_t *ptep, pte_t entry) | |||
307 | (((address) >> PAGE_SHIFT) & (PTRS_PER_PTE - 1)) | 307 | (((address) >> PAGE_SHIFT) & (PTRS_PER_PTE - 1)) |
308 | #define pte_offset_kernel(dir, addr) \ | 308 | #define pte_offset_kernel(dir, addr) \ |
309 | ((pte_t *) pmd_page_vaddr(*(dir)) + pte_index(addr)) | 309 | ((pte_t *) pmd_page_vaddr(*(dir)) + pte_index(addr)) |
310 | #ifdef CONFIG_PREEMPT_RT | ||
311 | #define pte_offset_map(dir, addr) \ | ||
312 | ((pte_t *) kmap(pmd_page(*(dir))) + pte_index(addr)) | ||
313 | #define pte_offset_map_nested(dir, addr) \ | ||
314 | ((pte_t *) kmap(pmd_page(*(dir))) + pte_index(addr)) | ||
315 | |||
316 | #define pte_unmap(pte) \ | ||
317 | kunmap((struct page *)_ALIGN_DOWN((unsigned int)pte, PAGE_SIZE)) | ||
318 | #define pte_unmap_nested(pte) \ | ||
319 | kunmap((struct page *)_ALIGN_DOWN((unsigned int)pte, PAGE_SIZE)) | ||
320 | #else | ||
310 | #define pte_offset_map(dir, addr) \ | 321 | #define pte_offset_map(dir, addr) \ |
311 | ((pte_t *) kmap_atomic(pmd_page(*(dir)), KM_PTE0) + pte_index(addr)) | 322 | ((pte_t *) kmap_atomic(pmd_page(*(dir)), KM_PTE0) + pte_index(addr)) |
312 | #define pte_offset_map_nested(dir, addr) \ | 323 | #define pte_offset_map_nested(dir, addr) \ |
@@ -314,6 +325,7 @@ static inline void __ptep_set_access_flags(pte_t *ptep, pte_t entry) | |||
314 | 325 | ||
315 | #define pte_unmap(pte) kunmap_atomic(pte, KM_PTE0) | 326 | #define pte_unmap(pte) kunmap_atomic(pte, KM_PTE0) |
316 | #define pte_unmap_nested(pte) kunmap_atomic(pte, KM_PTE1) | 327 | #define pte_unmap_nested(pte) kunmap_atomic(pte, KM_PTE1) |
328 | #endif | ||
317 | 329 | ||
318 | /* | 330 | /* |
319 | * Encode and decode a swap entry. | 331 | * Encode and decode a swap entry. |