* count of kernel invalidations, but that scheme
* has its disadvantages as well.
*/
- set_cr4(cr4 & ~CR4_PGE);
- set_cr4(cr4 | CR4_PGE);
+ if (cr4 & CR4_PGE) {
+ set_cr4(cr4 & ~CR4_PGE);
+ set_cr4(cr4 | CR4_PGE);
+ } else {
+ set_cr3_raw(get_cr3_raw());
+ }
return;
}
if (cptr) {
*cptr = 0;
}
-
}
static inline void pmap_pcid_invalidate_cpu(pmap_t tpmap, int ccpu) {