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 _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"