Date: Wed, 17 Feb 2010 14:27:37 +0000 (UTC) From: Nathan Whitehorn <nwhitehorn@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r204004 - projects/ppc64/sys/powerpc/aim Message-ID: <201002171427.o1HERbRT068162@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201002171427.o1HERbRT068162>