|
@@ -246,20 +246,9 @@ static inline void __native_flush_tlb(void)
|
|
|
preempt_enable();
|
|
|
}
|
|
|
|
|
|
-static inline void __native_flush_tlb_global_irq_disabled(void)
|
|
|
-{
|
|
|
- unsigned long cr4;
|
|
|
-
|
|
|
- cr4 = this_cpu_read(cpu_tlbstate.cr4);
|
|
|
- /* clear PGE */
|
|
|
- native_write_cr4(cr4 & ~X86_CR4_PGE);
|
|
|
- /* write old PGE again and flush TLBs */
|
|
|
- native_write_cr4(cr4);
|
|
|
-}
|
|
|
-
|
|
|
static inline void __native_flush_tlb_global(void)
|
|
|
{
|
|
|
- unsigned long flags;
|
|
|
+ unsigned long cr4, flags;
|
|
|
|
|
|
if (static_cpu_has(X86_FEATURE_INVPCID)) {
|
|
|
/*
|
|
@@ -277,7 +266,11 @@ static inline void __native_flush_tlb_global(void)
|
|
|
*/
|
|
|
raw_local_irq_save(flags);
|
|
|
|
|
|
- __native_flush_tlb_global_irq_disabled();
|
|
|
+ cr4 = this_cpu_read(cpu_tlbstate.cr4);
|
|
|
+ /* toggle PGE */
|
|
|
+ native_write_cr4(cr4 ^ X86_CR4_PGE);
|
|
|
+ /* write old PGE again and flush TLBs */
|
|
|
+ native_write_cr4(cr4);
|
|
|
|
|
|
raw_local_irq_restore(flags);
|
|
|
}
|