From owner-svn-src-user@FreeBSD.ORG Sat Jun 19 22:13:41 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 36BAE106564A; Sat, 19 Jun 2010 22:13:41 +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 E46B98FC08; Sat, 19 Jun 2010 22:13:40 +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 o5JMDesG010099; Sat, 19 Jun 2010 22:13:40 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5JMDesn010097; Sat, 19 Jun 2010 22:13:40 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201006192213.o5JMDesn010097@svn.freebsd.org> From: Juli Mallett Date: Sat, 19 Jun 2010 22:13:40 +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: r209357 - 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: Sat, 19 Jun 2010 22:13:41 -0000 Author: jmallett Date: Sat Jun 19 22:13:40 2010 New Revision: 209357 URL: http://svn.freebsd.org/changeset/base/209357 Log: Apply by hand alc@'s patch to init_pte_prot... I don't know if I mismerged this from head or it hasn't been committed yet, but it's necessary for me to boot. 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 Sat Jun 19 21:11:06 2010 (r209356) +++ user/jmallett/octeon/sys/mips/mips/pmap.c Sat Jun 19 22:13:40 2010 (r209357) @@ -2948,21 +2948,16 @@ init_pte_prot(vm_offset_t va, vm_page_t if (!(prot & VM_PROT_WRITE)) rw = PTE_V | PTE_RO | PTE_C_CNC; - else { - if (va >= VM_MIN_KERNEL_ADDRESS) { - /* - * Don't bother to trap on kernel writes, just - * record page as dirty. - */ + else if ((m->flags & (PG_FICTITIOUS | PG_UNMANAGED)) == 0) { + if ((m->md.pv_flags & PV_TABLE_MOD) || + m->dirty == VM_PAGE_BITS_ALL) { rw = PTE_V | PTE_D | PTE_C_CNC; - vm_page_dirty(m); - } else if ((m->md.pv_flags & PV_TABLE_MOD) || - m->dirty == VM_PAGE_BITS_ALL) - rw = PTE_V | PTE_D | PTE_C_CNC; - else + } else rw = PTE_V | PTE_C_CNC; vm_page_flag_set(m, PG_WRITEABLE); - } + } else + /* Needn't emulate a modified bit for unmanaged pages. */ + rw = PTE_V | PTE_D | PTE_C_CNC; return rw; }