Date: Sat, 27 Mar 2010 23:53:47 +0000 (UTC) From: Alan Cox <alc@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r205778 - in head/sys: amd64/amd64 i386/i386 Message-ID: <201003272353.o2RNrlTp037832@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201003272353.o2RNrlTp037832>