Skip to content

Commit b94c1fe

Browse files
committed
x86/alternative: Convert alternative()
Split conversion deliberately into minimal pieces to ease bisection because debugging alternatives is a nightmare. 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-4-bp@kernel.org
1 parent d2a793d commit b94c1fe

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

arch/x86/include/asm/alternative.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -316,14 +316,11 @@ static inline int alternatives_text_reserved(void *start, void *end)
316316
* without volatile and memory clobber.
317317
*/
318318
#define alternative(oldinstr, newinstr, ft_flags) \
319-
asm_inline volatile (ALTERNATIVE(oldinstr, newinstr, ft_flags) : : : "memory")
319+
asm_inline volatile(N_ALTERNATIVE(oldinstr, newinstr, ft_flags) : : : "memory")
320320

321321
#define alternative_2(oldinstr, newinstr1, ft_flags1, newinstr2, ft_flags2) \
322322
asm_inline volatile(ALTERNATIVE_2(oldinstr, newinstr1, ft_flags1, newinstr2, ft_flags2) ::: "memory")
323323

324-
#define n_alternative(oldinstr, newinstr, ft_flags) \
325-
asm_inline volatile (N_ALTERNATIVE(oldinstr, newinstr, ft_flags) : : : "memory")
326-
327324
#define n_alternative_2(oldinstr, newinstr1, ft_flags1, newinstr2, ft_flags2) \
328325
asm_inline volatile(N_ALTERNATIVE_2(oldinstr, newinstr1, ft_flags1, newinstr2, ft_flags2) ::: "memory")
329326

0 commit comments

Comments
 (0)