From owner-svn-src-all@FreeBSD.ORG Sat Mar 27 23:53:48 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F3DA21065675; Sat, 27 Mar 2010 23:53:47 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E29938FC16; Sat, 27 Mar 2010 23:53:47 +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 o2RNrlrs037835; Sat, 27 Mar 2010 23:53:47 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2RNrlTp037832; Sat, 27 Mar 2010 23:53:47 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201003272353.o2RNrlTp037832@svn.freebsd.org> From: Alan Cox Date: Sat, 27 Mar 2010 23:53:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205778 - in head/sys: amd64/amd64 i386/i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Mar 2010 23:53:48 -0000 Author: alc Date: Sat Mar 27 23:53:47 2010 New Revision: 205778 URL: http://svn.freebsd.org/changeset/base/205778 Log: Correctly handle preemption of pmap_update_pde_invalidate(). X-MFC after: r205573 Modified: head/sys/amd64/amd64/pmap.c head/sys/i386/i386/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Sat Mar 27 20:25:50 2010 (r205777) +++ head/sys/amd64/amd64/pmap.c Sat Mar 27 23:53:47 2010 (r205778) @@ -880,9 +880,12 @@ pmap_update_pde_invalidate(vm_offset_t v load_cr4(cr4 & ~CR4_PGE); /* * Although preemption at this point could be detrimental to - * performance, it would not lead to an error. + * performance, it would not lead to an error. PG_G is simply + * ignored if CR4.PGE is clear. Moreover, in case this block + * is re-entered, the load_cr4() either above or below will + * modify CR4.PGE flushing the TLB. */ - load_cr4(cr4); + load_cr4(cr4 | CR4_PGE); } } #ifdef SMP Modified: head/sys/i386/i386/pmap.c ============================================================================== --- head/sys/i386/i386/pmap.c Sat Mar 27 20:25:50 2010 (r205777) +++ head/sys/i386/i386/pmap.c Sat Mar 27 23:53:47 2010 (r205778) @@ -917,9 +917,12 @@ pmap_update_pde_invalidate(vm_offset_t v load_cr4(cr4 & ~CR4_PGE); /* * Although preemption at this point could be detrimental to - * performance, it would not lead to an error. + * performance, it would not lead to an error. PG_G is simply + * ignored if CR4.PGE is clear. Moreover, in case this block + * is re-entered, the load_cr4() either above or below will + * modify CR4.PGE flushing the TLB. */ - load_cr4(cr4); + load_cr4(cr4 | CR4_PGE); } } #ifdef SMP