Date: Thu, 25 Jun 2009 02:15:04 +0000 (UTC) From: Oleksandr Tymoshenko <gonzo@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r194938 - projects/mips/sys/mips/mips Message-ID: <200906250215.n5P2F4Sp037280@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: gonzo Date: Thu Jun 25 02:15:04 2009 New Revision: 194938 URL: http://svn.freebsd.org/changeset/base/194938 Log: - Invalidate cache in pmap_qenter. Fixes corruption of data that comes through pipe (may be other bugs) Modified: projects/mips/sys/mips/mips/pmap.c Modified: projects/mips/sys/mips/mips/pmap.c ============================================================================== --- projects/mips/sys/mips/mips/pmap.c Thu Jun 25 02:14:47 2009 (r194937) +++ projects/mips/sys/mips/mips/pmap.c Thu Jun 25 02:15:04 2009 (r194938) @@ -744,11 +744,14 @@ void pmap_qenter(vm_offset_t va, vm_page_t *m, int count) { int i; + vm_offset_t origva = va; for (i = 0; i < count; i++) { pmap_kenter(va, VM_PAGE_TO_PHYS(m[i])); va += PAGE_SIZE; } + + mips_dcache_wbinv_range_index(origva, PAGE_SIZE*count); } /* @@ -758,6 +761,11 @@ pmap_qenter(vm_offset_t va, vm_page_t *m void pmap_qremove(vm_offset_t va, int count) { + /* + * No need to wb/inv caches here, + * pmap_kremove will do it for us + */ + while (count-- > 0) { pmap_kremove(va); va += PAGE_SIZE;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906250215.n5P2F4Sp037280>