summaryrefslogtreecommitdiffstats
path: root/sys/powerpc/aim
diff options
context:
space:
mode:
authornwhitehorn <nwhitehorn@FreeBSD.org>2012-04-11 20:28:05 +0000
committernwhitehorn <nwhitehorn@FreeBSD.org>2012-04-11 20:28:05 +0000
commit31bc0a8bff2a66718684b68012fa4be1ed30f522 (patch)
tree6feb2894ba6a46bcd31338c4f03645df9fa26a76 /sys/powerpc/aim
parent8c1a6fb8e51814e83ee22f068d3700fbb2af951d (diff)
downloadFreeBSD-src-31bc0a8bff2a66718684b68012fa4be1ed30f522.zip
FreeBSD-src-31bc0a8bff2a66718684b68012fa4be1ed30f522.tar.gz
Fix error in r233949. Synchronizing icaches on uncacheable pages turns out
not to be a good idea, and of course the PV entry list for a page is never empty after the page has been mapped.
Diffstat (limited to 'sys/powerpc/aim')
-rw-r--r--sys/powerpc/aim/mmu_oea.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/powerpc/aim/mmu_oea.c b/sys/powerpc/aim/mmu_oea.c
index 45bf5b3..d7023d9 100644
--- a/sys/powerpc/aim/mmu_oea.c
+++ b/sys/powerpc/aim/mmu_oea.c
@@ -1137,9 +1137,11 @@ moea_enter_locked(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot,
/*
* Flush the real page from the instruction cache. This has be done
* for all user mappings to prevent information leakage via the
- * instruction cache.
+ * instruction cache. moea_pvo_enter() returns ENOENT for the first
+ * mapping for a page.
*/
- if (pmap != kernel_pmap && LIST_EMPTY(vm_page_to_pvoh(m)))
+ if (pmap != kernel_pmap && error == ENOENT &&
+ (pte_lo & (PTE_I | PTE_G)) == 0)
moea_syncicache(VM_PAGE_TO_PHYS(m), PAGE_SIZE);
}
OpenPOWER on IntegriCloud