diff mbox series

[v4,28/30] x86/tlb: Make __flush_tlb_all() noinstr

Message ID 20250114175143.81438-29-vschneid@redhat.com (mailing list archive)
State Handled Elsewhere
Headers show
Series context_tracking,x86: Defer some IPIs until a user->kernel transition | expand

Checks

Context Check Description
conchuod/vmtest-for-next-PR fail PR summary
conchuod/patch-28-test-1 fail .github/scripts/patches/tests/build_rv32_defconfig.sh took 12.62s
conchuod/patch-28-test-2 fail .github/scripts/patches/tests/build_rv64_clang_allmodconfig.sh took 9.88s
conchuod/patch-28-test-3 fail .github/scripts/patches/tests/build_rv64_gcc_allmodconfig.sh took 10.04s
conchuod/patch-28-test-4 fail .github/scripts/patches/tests/build_rv64_nommu_k210_defconfig.sh took 5.12s
conchuod/patch-28-test-5 fail .github/scripts/patches/tests/build_rv64_nommu_virt_defconfig.sh took 5.15s
conchuod/patch-28-test-6 success .github/scripts/patches/tests/checkpatch.sh took 0.70s
conchuod/patch-28-test-7 success .github/scripts/patches/tests/dtb_warn_rv64.sh took 44.37s
conchuod/patch-28-test-8 success .github/scripts/patches/tests/header_inline.sh took 0.01s
conchuod/patch-28-test-9 success .github/scripts/patches/tests/kdoc.sh took 0.55s
conchuod/patch-28-test-10 success .github/scripts/patches/tests/module_param.sh took 0.02s
conchuod/patch-28-test-11 success .github/scripts/patches/tests/verify_fixes.sh took 0.00s
conchuod/patch-28-test-12 success .github/scripts/patches/tests/verify_signedoff.sh took 0.04s

Commit Message

Valentin Schneider Jan. 14, 2025, 5:51 p.m. UTC
Later patches will require issuing a __flush_tlb_all() from noinstr code.
Both __flush_tlb_local() and __flush_tlb_global() are now
noinstr-compliant, so __flush_tlb_all() can be made noinstr itself.

Signed-off-by: Valentin Schneider <vschneid@redhat.com>
---
 arch/x86/include/asm/tlbflush.h | 2 +-
 arch/x86/mm/tlb.c               | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/arch/x86/include/asm/tlbflush.h b/arch/x86/include/asm/tlbflush.h
index 69e79fff41b80..4d11396250999 100644
--- a/arch/x86/include/asm/tlbflush.h
+++ b/arch/x86/include/asm/tlbflush.h
@@ -17,7 +17,7 @@ 
 
 DECLARE_PER_CPU(u64, tlbstate_untag_mask);
 
-void __flush_tlb_all(void);
+noinstr void __flush_tlb_all(void);
 
 #define TLB_FLUSH_ALL	-1UL
 #define TLB_GENERATION_INVALID	0
diff --git a/arch/x86/mm/tlb.c b/arch/x86/mm/tlb.c
index 18b40bbc2fa15..119765772ab11 100644
--- a/arch/x86/mm/tlb.c
+++ b/arch/x86/mm/tlb.c
@@ -1229,7 +1229,7 @@  void flush_tlb_local(void)
 /*
  * Flush everything
  */
-void __flush_tlb_all(void)
+noinstr void __flush_tlb_all(void)
 {
 	/*
 	 * This is to catch users with enabled preemption and the PGE feature
@@ -1243,7 +1243,7 @@  void __flush_tlb_all(void)
 		/*
 		 * !PGE -> !PCID (setup_pcid()), thus every flush is total.
 		 */
-		flush_tlb_local();
+		__flush_tlb_local();
 	}
 }
 EXPORT_SYMBOL_GPL(__flush_tlb_all);