diff options
Diffstat (limited to 'arch/powerpc/mm/pgtable_32.c')
-rw-r--r-- | arch/powerpc/mm/pgtable_32.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/arch/powerpc/mm/pgtable_32.c b/arch/powerpc/mm/pgtable_32.c index b9243e7557ae..9fc02dc72ce9 100644 --- a/arch/powerpc/mm/pgtable_32.c +++ b/arch/powerpc/mm/pgtable_32.c | |||
@@ -146,6 +146,14 @@ ioremap_flags(phys_addr_t addr, unsigned long size, unsigned long flags) | |||
146 | /* we don't want to let _PAGE_USER and _PAGE_EXEC leak out */ | 146 | /* we don't want to let _PAGE_USER and _PAGE_EXEC leak out */ |
147 | flags &= ~(_PAGE_USER | _PAGE_EXEC); | 147 | flags &= ~(_PAGE_USER | _PAGE_EXEC); |
148 | 148 | ||
149 | #ifdef _PAGE_BAP_SR | ||
150 | /* _PAGE_USER contains _PAGE_BAP_SR on BookE using the new PTE format | ||
151 | * which means that we just cleared supervisor access... oops ;-) This | ||
152 | * restores it | ||
153 | */ | ||
154 | flags |= _PAGE_BAP_SR; | ||
155 | #endif | ||
156 | |||
149 | return __ioremap_caller(addr, size, flags, __builtin_return_address(0)); | 157 | return __ioremap_caller(addr, size, flags, __builtin_return_address(0)); |
150 | } | 158 | } |
151 | EXPORT_SYMBOL(ioremap_flags); | 159 | EXPORT_SYMBOL(ioremap_flags); |
@@ -385,11 +393,7 @@ static int __change_page_attr(struct page *page, pgprot_t prot) | |||
385 | return -EINVAL; | 393 | return -EINVAL; |
386 | __set_pte_at(&init_mm, address, kpte, mk_pte(page, prot), 0); | 394 | __set_pte_at(&init_mm, address, kpte, mk_pte(page, prot), 0); |
387 | wmb(); | 395 | wmb(); |
388 | #ifdef CONFIG_PPC_STD_MMU | ||
389 | flush_hash_pages(0, address, pmd_val(*kpmd), 1); | ||
390 | #else | ||
391 | flush_tlb_page(NULL, address); | 396 | flush_tlb_page(NULL, address); |
392 | #endif | ||
393 | pte_unmap(kpte); | 397 | pte_unmap(kpte); |
394 | 398 | ||
395 | return 0; | 399 | return 0; |