Skip to content

Commit 1a6ade8

Browse files
committed
x86/alternative: Convert the asm ALTERNATIVE_3() macro
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-14-bp@kernel.org
1 parent 08a621f commit 1a6ade8

1 file changed

Lines changed: 0 additions & 25 deletions

File tree

arch/x86/include/asm/alternative.h

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -466,31 +466,6 @@ void nop_func(void);
466466
.endm
467467

468468
.macro ALTERNATIVE_3 oldinstr, newinstr1, ft_flags1, newinstr2, ft_flags2, newinstr3, ft_flags3
469-
140:
470-
\oldinstr
471-
141:
472-
.skip -((alt_max_3(new_len1, new_len2, new_len3) - (old_len)) > 0) * \
473-
(alt_max_3(new_len1, new_len2, new_len3) - (old_len)),0x90
474-
142:
475-
476-
.pushsection .altinstructions,"a"
477-
altinstr_entry 140b,143f,\ft_flags1,142b-140b,144f-143f
478-
altinstr_entry 140b,144f,\ft_flags2,142b-140b,145f-144f
479-
altinstr_entry 140b,145f,\ft_flags3,142b-140b,146f-145f
480-
.popsection
481-
482-
.pushsection .altinstr_replacement,"ax"
483-
143:
484-
\newinstr1
485-
144:
486-
\newinstr2
487-
145:
488-
\newinstr3
489-
146:
490-
.popsection
491-
.endm
492-
493-
.macro N_ALTERNATIVE_3 oldinstr, newinstr1, ft_flags1, newinstr2, ft_flags2, newinstr3, ft_flags3
494469
__N_ALTERNATIVE(N_ALTERNATIVE_2(\oldinstr, \newinstr1, \ft_flags1, \newinstr2, \ft_flags2),
495470
\newinstr3, \ft_flags3)
496471
.endm

0 commit comments

Comments
 (0)