Correctly handle preemption of pmap_update_pde_invalidate().

X-MFC after:	r205573
This commit is contained in:
Alan Cox 2010-03-27 23:53:47 +00:00
parent a57d0d8e1d
commit 3792de2e87
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=205778
2 changed files with 10 additions and 4 deletions

View File

@ -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

View File

@ -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