Skip to content

Commit 08a621f

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

1 file changed

Lines changed: 0 additions & 22 deletions

File tree

arch/x86/include/asm/alternative.h

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -461,28 +461,6 @@ void nop_func(void);
461461
* @feature2, it replaces @oldinstr with @feature2.
462462
*/
463463
.macro ALTERNATIVE_2 oldinstr, newinstr1, ft_flags1, newinstr2, ft_flags2
464-
140:
465-
\oldinstr
466-
141:
467-
.skip -((alt_max_2(new_len1, new_len2) - (old_len)) > 0) * \
468-
(alt_max_2(new_len1, new_len2) - (old_len)),0x90
469-
142:
470-
471-
.pushsection .altinstructions,"a"
472-
altinstr_entry 140b,143f,\ft_flags1,142b-140b,144f-143f
473-
altinstr_entry 140b,144f,\ft_flags2,142b-140b,145f-144f
474-
.popsection
475-
476-
.pushsection .altinstr_replacement,"ax"
477-
143:
478-
\newinstr1
479-
144:
480-
\newinstr2
481-
145:
482-
.popsection
483-
.endm
484-
485-
.macro N_ALTERNATIVE_2 oldinstr, newinstr1, ft_flags1, newinstr2, ft_flags2
486464
__N_ALTERNATIVE(__N_ALTERNATIVE(\oldinstr, \newinstr1, \ft_flags1),
487465
\newinstr2, \ft_flags2)
488466
.endm

0 commit comments

Comments
 (0)