[PATCH 12/20] x86/cpu: Use alternative_io() in prefetch[w]()
From: Josh Poimboeuf
Date: Fri Mar 14 2025 - 17:49:41 EST
Use the new alternative_io() interface in preparation for removing
alternative_input().
Signed-off-by: Josh Poimboeuf <jpoimboe@xxxxxxxxxx>
---
arch/x86/include/asm/processor.h | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h
index 2e9566134949..a1baf2fc5f9b 100644
--- a/arch/x86/include/asm/processor.h
+++ b/arch/x86/include/asm/processor.h
@@ -624,9 +624,10 @@ extern char ignore_fpu_irq;
*/
static inline void prefetch(const void *x)
{
- alternative_input(BASE_PREFETCH,
- "prefetchnta %[val]", X86_FEATURE_XMM,
- [val] "m" (*(const char *)x));
+ alternative_io(BASE_PREFETCH,
+ "prefetchnta %[val]", X86_FEATURE_XMM,
+ ARG(),
+ ARG([val] "m" (*(const char *)x)));
}
/*
@@ -636,9 +637,10 @@ static inline void prefetch(const void *x)
*/
static __always_inline void prefetchw(const void *x)
{
- alternative_input(BASE_PREFETCH,
- "prefetchw %[val]", X86_FEATURE_3DNOWPREFETCH,
- [val] "m" (*(const char *)x));
+ alternative_io(BASE_PREFETCH,
+ "prefetchw %[val]", X86_FEATURE_3DNOWPREFETCH,
+ ARG(),
+ ARG([val] "m" (*(const char *)x)));
}
#define TOP_OF_INIT_STACK ((unsigned long)&init_stack + sizeof(init_stack) - \
--
2.48.1