Date: Sat, 19 Jun 2010 22:13:40 +0000 (UTC) From: Juli Mallett <jmallett@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r209357 - user/jmallett/octeon/sys/mips/mips Message-ID: <201006192213.o5JMDesn010097@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201006192213.o5JMDesn010097>