diff options
-rw-r--r-- | arch/x86/include/asm/alternative.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/arch/x86/include/asm/alternative.h b/arch/x86/include/asm/alternative.h index 094fbc9c0b1c..13adca37c99a 100644 --- a/arch/x86/include/asm/alternative.h +++ b/arch/x86/include/asm/alternative.h | |||
@@ -201,10 +201,10 @@ static inline int alternatives_text_reserved(void *start, void *end) | |||
201 | * without volatile and memory clobber. | 201 | * without volatile and memory clobber. |
202 | */ | 202 | */ |
203 | #define alternative(oldinstr, newinstr, feature) \ | 203 | #define alternative(oldinstr, newinstr, feature) \ |
204 | asm volatile (ALTERNATIVE(oldinstr, newinstr, feature) : : : "memory") | 204 | asm_inline volatile (ALTERNATIVE(oldinstr, newinstr, feature) : : : "memory") |
205 | 205 | ||
206 | #define alternative_2(oldinstr, newinstr1, feature1, newinstr2, feature2) \ | 206 | #define alternative_2(oldinstr, newinstr1, feature1, newinstr2, feature2) \ |
207 | asm volatile(ALTERNATIVE_2(oldinstr, newinstr1, feature1, newinstr2, feature2) ::: "memory") | 207 | asm_inline volatile(ALTERNATIVE_2(oldinstr, newinstr1, feature1, newinstr2, feature2) ::: "memory") |
208 | 208 | ||
209 | /* | 209 | /* |
210 | * Alternative inline assembly with input. | 210 | * Alternative inline assembly with input. |
@@ -218,7 +218,7 @@ static inline int alternatives_text_reserved(void *start, void *end) | |||
218 | * Leaving an unused argument 0 to keep API compatibility. | 218 | * Leaving an unused argument 0 to keep API compatibility. |
219 | */ | 219 | */ |
220 | #define alternative_input(oldinstr, newinstr, feature, input...) \ | 220 | #define alternative_input(oldinstr, newinstr, feature, input...) \ |
221 | asm volatile (ALTERNATIVE(oldinstr, newinstr, feature) \ | 221 | asm_inline volatile (ALTERNATIVE(oldinstr, newinstr, feature) \ |
222 | : : "i" (0), ## input) | 222 | : : "i" (0), ## input) |
223 | 223 | ||
224 | /* | 224 | /* |
@@ -231,18 +231,18 @@ static inline int alternatives_text_reserved(void *start, void *end) | |||
231 | */ | 231 | */ |
232 | #define alternative_input_2(oldinstr, newinstr1, feature1, newinstr2, \ | 232 | #define alternative_input_2(oldinstr, newinstr1, feature1, newinstr2, \ |
233 | feature2, input...) \ | 233 | feature2, input...) \ |
234 | asm volatile(ALTERNATIVE_2(oldinstr, newinstr1, feature1, \ | 234 | asm_inline volatile(ALTERNATIVE_2(oldinstr, newinstr1, feature1, \ |
235 | newinstr2, feature2) \ | 235 | newinstr2, feature2) \ |
236 | : : "i" (0), ## input) | 236 | : : "i" (0), ## input) |
237 | 237 | ||
238 | /* Like alternative_input, but with a single output argument */ | 238 | /* Like alternative_input, but with a single output argument */ |
239 | #define alternative_io(oldinstr, newinstr, feature, output, input...) \ | 239 | #define alternative_io(oldinstr, newinstr, feature, output, input...) \ |
240 | asm volatile (ALTERNATIVE(oldinstr, newinstr, feature) \ | 240 | asm_inline volatile (ALTERNATIVE(oldinstr, newinstr, feature) \ |
241 | : output : "i" (0), ## input) | 241 | : output : "i" (0), ## input) |
242 | 242 | ||
243 | /* Like alternative_io, but for replacing a direct call with another one. */ | 243 | /* Like alternative_io, but for replacing a direct call with another one. */ |
244 | #define alternative_call(oldfunc, newfunc, feature, output, input...) \ | 244 | #define alternative_call(oldfunc, newfunc, feature, output, input...) \ |
245 | asm volatile (ALTERNATIVE("call %P[old]", "call %P[new]", feature) \ | 245 | asm_inline volatile (ALTERNATIVE("call %P[old]", "call %P[new]", feature) \ |
246 | : output : [old] "i" (oldfunc), [new] "i" (newfunc), ## input) | 246 | : output : [old] "i" (oldfunc), [new] "i" (newfunc), ## input) |
247 | 247 | ||
248 | /* | 248 | /* |
@@ -253,7 +253,7 @@ static inline int alternatives_text_reserved(void *start, void *end) | |||
253 | */ | 253 | */ |
254 | #define alternative_call_2(oldfunc, newfunc1, feature1, newfunc2, feature2, \ | 254 | #define alternative_call_2(oldfunc, newfunc1, feature1, newfunc2, feature2, \ |
255 | output, input...) \ | 255 | output, input...) \ |
256 | asm volatile (ALTERNATIVE_2("call %P[old]", "call %P[new1]", feature1,\ | 256 | asm_inline volatile (ALTERNATIVE_2("call %P[old]", "call %P[new1]", feature1,\ |
257 | "call %P[new2]", feature2) \ | 257 | "call %P[new2]", feature2) \ |
258 | : output, ASM_CALL_CONSTRAINT \ | 258 | : output, ASM_CALL_CONSTRAINT \ |
259 | : [old] "i" (oldfunc), [new1] "i" (newfunc1), \ | 259 | : [old] "i" (oldfunc), [new1] "i" (newfunc1), \ |