]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - arch/x86/include/asm/tlbflush.h
Merge branch 'WIP.x86/process' into perf/core
[karo-tx-linux.git] / arch / x86 / include / asm / tlbflush.h
index 6fa85944af83d8ddbbad3a344a31a7920e64e6d0..75d002bdb3f35bcc12c06ec4acc213bc49241ae9 100644 (file)
@@ -110,6 +110,16 @@ static inline void cr4_clear_bits(unsigned long mask)
        }
 }
 
+static inline void cr4_toggle_bits(unsigned long mask)
+{
+       unsigned long cr4;
+
+       cr4 = this_cpu_read(cpu_tlbstate.cr4);
+       cr4 ^= mask;
+       this_cpu_write(cpu_tlbstate.cr4, cr4);
+       __write_cr4(cr4);
+}
+
 /* Read the CR4 shadow. */
 static inline unsigned long cr4_read_shadow(void)
 {
@@ -188,7 +198,7 @@ static inline void __native_flush_tlb_single(unsigned long addr)
 
 static inline void __flush_tlb_all(void)
 {
-       if (static_cpu_has(X86_FEATURE_PGE))
+       if (boot_cpu_has(X86_FEATURE_PGE))
                __flush_tlb_global();
        else
                __flush_tlb();