Skip to content

Commit 719ac02

Browse files
committed
x86/alternative: Convert alternative_call_2()
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lore.kernel.org/r/20240607111701.8366-9-bp@kernel.org
1 parent a880f9e commit 719ac02

1 file changed

Lines changed: 6 additions & 15 deletions

File tree

arch/x86/include/asm/alternative.h

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -358,23 +358,14 @@ static inline int alternatives_text_reserved(void *start, void *end)
358358
* Otherwise, if CPU has feature1, function1 is used.
359359
* Otherwise, old function is used.
360360
*/
361-
#define alternative_call_2(oldfunc, newfunc1, ft_flags1, newfunc2, ft_flags2, \
362-
output, input...) \
363-
asm_inline volatile (ALTERNATIVE_2("call %c[old]", "call %c[new1]", ft_flags1, \
364-
"call %c[new2]", ft_flags2) \
365-
: output, ASM_CALL_CONSTRAINT \
366-
: [old] "i" (oldfunc), [new1] "i" (newfunc1), \
361+
#define alternative_call_2(oldfunc, newfunc1, ft_flags1, newfunc2, ft_flags2, \
362+
output, input...) \
363+
asm_inline volatile(N_ALTERNATIVE_2("call %c[old]", "call %c[new1]", ft_flags1, \
364+
"call %c[new2]", ft_flags2) \
365+
: output, ASM_CALL_CONSTRAINT \
366+
: [old] "i" (oldfunc), [new1] "i" (newfunc1), \
367367
[new2] "i" (newfunc2), ## input)
368368

369-
#define n_alternative_call_2(oldfunc, newfunc1, ft_flags1, newfunc2, ft_flags2, \
370-
output, input...) \
371-
asm_inline volatile (N_ALTERNATIVE_2("call %c[old]", "call %c[new1]", ft_flags1,\
372-
"call %c[new2]", ft_flags2) \
373-
: output, ASM_CALL_CONSTRAINT \
374-
: [old] "i" (oldfunc), [new1] "i" (newfunc1), \
375-
[new2] "i" (newfunc2), ## input)
376-
377-
378369
/*
379370
* use this macro(s) if you need more than one output parameter
380371
* in alternative_io

0 commit comments

Comments
 (0)