summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2025-04-11 08:41:04 +0300
committerIngo Molnar <mingo@kernel.org>2025-04-11 12:01:35 +0300
commit4f9534719e524affb1aa8e0ff0c8b30c1c65e574 (patch)
treee061209c9ae69b00a9a2dc492feb8c044390f5d0
parent023f42dd59203be8ad2fc0574af32d3b4ad041ec (diff)
downloadlinux-4f9534719e524affb1aa8e0ff0c8b30c1c65e574.tar.xz
x86/alternatives: Add comment about noinstr expectations
Signed-off-by: Ingo Molnar <mingo@kernel.org> Cc: Juergen Gross <jgross@suse.com> Cc: "H . Peter Anvin" <hpa@zytor.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lore.kernel.org/r/20250411054105.2341982-53-mingo@kernel.org
-rw-r--r--arch/x86/kernel/alternative.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c
index 231b2acbe360..604dd608d281 100644
--- a/arch/x86/kernel/alternative.c
+++ b/arch/x86/kernel/alternative.c
@@ -2447,6 +2447,11 @@ static struct smp_text_poke_array {
static DEFINE_PER_CPU(atomic_t, text_poke_array_refs);
+/*
+ * These four __always_inline annotations imply noinstr, necessary
+ * due to smp_text_poke_int3_handler() being noinstr:
+ */
+
static __always_inline bool try_get_text_poke_array(void)
{
atomic_t *refs = this_cpu_ptr(&text_poke_array_refs);