svn commit: r204004 - projects/ppc64/sys/powerpc/aim
Nathan Whitehorn
nwhitehorn at FreeBSD.org
Wed Feb 17 14:27:37 UTC 2010
Author: nwhitehorn
Date: Wed Feb 17 14:27:36 2010
New Revision: 204004
URL: http://svn.freebsd.org/changeset/base/204004
Log:
Make moea64_syncicache() work correctly for non-page-aligned memory in
non-kernel pmaps.
Modified:
projects/ppc64/sys/powerpc/aim/mmu_oea64.c
Modified: projects/ppc64/sys/powerpc/aim/mmu_oea64.c
==============================================================================
--- projects/ppc64/sys/powerpc/aim/mmu_oea64.c Wed Feb 17 13:06:06 2010 (r204003)
+++ projects/ppc64/sys/powerpc/aim/mmu_oea64.c Wed Feb 17 14:27:36 2010 (r204004)
@@ -1367,6 +1367,7 @@ moea64_enter_locked(pmap_t pmap, vm_offs
static void
moea64_syncicache(pmap_t pmap, vm_offset_t va, vm_offset_t pa, vm_size_t sz)
{
+
/*
* This is much trickier than on older systems because
* we can't sync the icache on physical addresses directly
@@ -1389,8 +1390,9 @@ moea64_syncicache(pmap_t pmap, vm_offset
mtx_lock(&moea64_scratchpage_mtx);
- moea64_set_scratchpage_pa(1,pa);
- __syncicache((void *)moea64_scratchpage_va[1], sz);
+ moea64_set_scratchpage_pa(1,pa & ~ADDR_POFF);
+ __syncicache((void *)(moea64_scratchpage_va[1] +
+ (va & ADDR_POFF)), sz);
mtx_unlock(&moea64_scratchpage_mtx);
}
More information about the svn-src-projects
mailing list