Skip to contentSkip to conversation

x86: drop dummy input from alternative_{input, io}()

PATCH In review Jan Beulich 2 participants 2 messages Nov 27, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86: drop dummy input from alternative_{input, io}()

We don't need the claimed API compatibility. No change in generated code.

xen/include/asm-x86/alternative.h +2 -3
@@ -83,16 +83,15 @@ extern void alternative_instructions(voi
  * Best is to use constraints that are fixed size (like (%1) ... "r")
  * If you use variable sized constraints like "m" or "g" in the
  * replacement make sure to pad to the worst case length.
- * Leaving an unused argument 0 to keep API compatibility.
  */
 #define alternative_input(oldinstr, newinstr, feature, input...)	\
 	asm volatile (ALTERNATIVE(oldinstr, newinstr, feature)		\
-		: : "i" (0), ## input)
+		      : : input)
 
 /* Like alternative_input, but with a single output argument */
 #define alternative_io(oldinstr, newinstr, feature, output, input...)	\
 	asm volatile (ALTERNATIVE(oldinstr, newinstr, feature)		\
-		: output : "i" (0), ## input)
+		      : output : input)
 
 /* Use this macro(s) if you need more than one output parameter. */
 #define ASM_OUTPUT2(a...) a

x86: drop dummy input from alternative_{input,io}()

We don't need the claimed API compatibility. No change in generated code.

xen/include/asm-x86/alternative.h +2 -3
@@ -83,16 +83,15 @@ extern void alternative_instructions(voi
  * Best is to use constraints that are fixed size (like (%1) ... "r")
  * If you use variable sized constraints like "m" or "g" in the
  * replacement make sure to pad to the worst case length.
- * Leaving an unused argument 0 to keep API compatibility.
  */
 #define alternative_input(oldinstr, newinstr, feature, input...)	\
 	asm volatile (ALTERNATIVE(oldinstr, newinstr, feature)		\
-		: : "i" (0), ## input)
+		      : : input)
 
 /* Like alternative_input, but with a single output argument */
 #define alternative_io(oldinstr, newinstr, feature, output, input...)	\
 	asm volatile (ALTERNATIVE(oldinstr, newinstr, feature)		\
-		: output : "i" (0), ## input)
+		      : output : input)
 
 /* Use this macro(s) if you need more than one output parameter. */
 #define ASM_OUTPUT2(a...) a

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel