From owner-svn-src-user@FreeBSD.ORG Wed Apr 14 06:56:48 2010 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A50BB106564A; Wed, 14 Apr 2010 06:56:48 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 92B2A8FC16; Wed, 14 Apr 2010 06:56:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3E6umO6096465; Wed, 14 Apr 2010 06:56:48 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3E6umOD096463; Wed, 14 Apr 2010 06:56:48 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201004140656.o3E6umOD096463@svn.freebsd.org> From: Juli Mallett Date: Wed, 14 Apr 2010 06:56:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206594 - user/jmallett/octeon/sys/mips/mips X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Apr 2010 06:56:48 -0000 Author: jmallett Date: Wed Apr 14 06:56:48 2010 New Revision: 206594 URL: http://svn.freebsd.org/changeset/base/206594 Log: o) Add an invariant to pmap_kenter that the previous mapping is invalid or identical to the new mapping. Something is leaving a mapping valid or doing a double pmap_kenter (well, pmap_qenter) but I don't know what, but it's identical to the previous one, so I assume it's the latter (like was in the sfbuf code that I just removed.) o) Given that invariant, neither invalidate nor update the TLB in pmap_kenter, since it should have been invalidated in pmap_kremove. Modified: user/jmallett/octeon/sys/mips/mips/pmap.c Modified: user/jmallett/octeon/sys/mips/mips/pmap.c ============================================================================== --- user/jmallett/octeon/sys/mips/mips/pmap.c Wed Apr 14 06:47:34 2010 (r206593) +++ user/jmallett/octeon/sys/mips/mips/pmap.c Wed Apr 14 06:56:48 2010 (r206594) @@ -750,19 +750,9 @@ pmap_kenter(vm_offset_t va, vm_paddr_t p npte |= PG_C_UC; pte = pmap_pte(kernel_pmap, va); + KASSERT(!pte_test(pte, PG_V) || *pte == npte, + ("pmap_kenter for %p with different valid entry", (void *)va)); *pte = npte; - -#if 0 - /* - * The original code did an update_page() here, but - * we often do a lot of pmap_kenter() calls and then - * start using the addresses later, at which point - * the TLB has overflown many times. - */ - pmap_invalidate_page(kernel_pmap, va); -#else - pmap_update_page(kernel_pmap, va, npte); -#endif } /* @@ -2741,6 +2731,10 @@ pmap_mapdev(vm_offset_t pa, vm_size_t si if (!va) panic("pmap_mapdev: Couldn't alloc kernel virtual memory"); pa = trunc_page(pa); + /* + * XXX + * Shouldn't we make these pages uncached? + */ for (tmpva = va; size > 0;) { pmap_kenter(tmpva, pa); size -= PAGE_SIZE;