]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - arch/x86/include/asm/tlbflush.h
x86/mm/pat: Disable preemption around __flush_tlb_all()
[mirror_ubuntu-bionic-kernel.git] / arch / x86 / include / asm / tlbflush.h
index 1bbc43077583702cff4dc78557ca9ff71f578455..1a56d1df5c216edfb451b7a0a38038594425e0b3 100644 (file)
@@ -473,6 +473,12 @@ static inline void __native_flush_tlb_one_user(unsigned long addr)
  */
 static inline void __flush_tlb_all(void)
 {
+       /*
+        * This is to catch users with enabled preemption and the PGE feature
+        * and don't trigger the warning in __native_flush_tlb().
+        */
+       VM_WARN_ON_ONCE(preemptible());
+
        if (boot_cpu_has(X86_FEATURE_PGE)) {
                __flush_tlb_global();
        } else {