diff options
-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 |