diff options
author | alc <alc@FreeBSD.org> | 2010-03-27 23:53:47 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2010-03-27 23:53:47 +0000 |
commit | 08131b2b82325de4757248c0d0da2ab4c563fec1 (patch) | |
tree | 5902e968ecb3d48b0c5d33ff4f6d8fa3f5ec68b7 | |
parent | f24d1ea6436cd93eb64c9bf1736e03246f14b9b6 (diff) | |
download | FreeBSD-src-08131b2b82325de4757248c0d0da2ab4c563fec1.zip FreeBSD-src-08131b2b82325de4757248c0d0da2ab4c563fec1.tar.gz |
Correctly handle preemption of pmap_update_pde_invalidate().
X-MFC after: r205573
-rw-r--r-- | sys/amd64/amd64/pmap.c | 7 | ||||
-rw-r--r-- | sys/i386/i386/pmap.c | 7 |
2 files changed, 10 insertions, 4 deletions
diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index d6cddb0..4b3f041 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -880,9 +880,12 @@ pmap_update_pde_invalidate(vm_offset_t va, pd_entry_t newpde) 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 diff --git a/sys/i386/i386/pmap.c b/sys/i386/i386/pmap.c index ff7eff1..7c74f00 100644 --- a/sys/i386/i386/pmap.c +++ b/sys/i386/i386/pmap.c @@ -917,9 +917,12 @@ pmap_update_pde_invalidate(vm_offset_t va, pd_entry_t newpde) 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 |