Skip to contentSkip to conversation

x86/alternative: Clean up headers

PATCH In review Andrew Cooper 2 participants 2 messages Apr 22, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/alternative: Clean up headers

alternative.h doesn't need lib.h now that macros.h exists. Futhermore, STR() is already the prevailing style, so convert the final __stringify() to drop stringify.h too.

No functional change.

---
CC: Jan Beulich <[email protected]>
CC: Roger Pau Monné <[email protected]>

---
 xen/arch/x86/include/asm/alternative.h | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
xen/arch/x86/include/asm/alternative.h +5 -3
index 38472fb58e2d..7326ad942836 100644
@@ -4,8 +4,10 @@
 #ifdef __ASSEMBLY__
 #include <asm/alternative-asm.h>
 #else
-#include <xen/lib.h>
-#include <xen/stringify.h>
+
+#include <xen/macros.h>
+#include <xen/types.h>
+
 #include <asm/asm-macros.h>
 #include <asm/cpufeatureset.h>
 
@@ -65,7 +67,7 @@ extern void alternative_branches(void);
         " .endif\n"                                                     \
         " .long .LXEN%=_orig_s - .\n"             /* label           */ \
         " .long " alt_repl_s(num)" - .\n"         /* new instruction */ \
-        " .word " __stringify(feature) "\n"       /* feature bit     */ \
+        " .word " STR(feature) "\n"               /* feature bit     */ \
         " .byte " alt_orig_len "\n"               /* source len      */ \
         " .byte " alt_repl_len(num) "\n"          /* replacement len */ \
         " .byte " alt_pad_len "\n"                /* padding len     */ \
Signature · 1 line
2.39.5