From owner-svn-src-projects@FreeBSD.ORG Thu Jun 25 02:15:05 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1D83B1065670; Thu, 25 Jun 2009 02:15:05 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0BE488FC0A; Thu, 25 Jun 2009 02:15:05 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5P2F4Xd037282; Thu, 25 Jun 2009 02:15:04 GMT (envelope-from gonzo@svn.freebsd.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5P2F4Sp037280; Thu, 25 Jun 2009 02:15:04 GMT (envelope-from gonzo@svn.freebsd.org) Message-Id: <200906250215.n5P2F4Sp037280@svn.freebsd.org> From: Oleksandr Tymoshenko Date: Thu, 25 Jun 2009 02:15:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194938 - projects/mips/sys/mips/mips X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jun 2009 02:15:05 -0000 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;