From: Borislav Petkov <bp@kernel.org>
To: X86 ML <x86@kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
"Borislav Petkov (AMD)" <bp@alien8.de>
Subject: [PATCH 08/14] x86/alternative: Convert alternative_call_2()
Date: Fri, 31 May 2024 14:35:05 +0200 [thread overview]
Message-ID: <20240531123512.21427-9-bp@kernel.org> (raw)
In-Reply-To: <20240531123512.21427-1-bp@kernel.org>
From: "Borislav Petkov (AMD)" <bp@alien8.de>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
---
arch/x86/include/asm/alternative.h | 21 ++++++---------------
1 file changed, 6 insertions(+), 15 deletions(-)
diff --git a/arch/x86/include/asm/alternative.h b/arch/x86/include/asm/alternative.h
index bc696c60848d..bad1558d6382 100644
--- a/arch/x86/include/asm/alternative.h
+++ b/arch/x86/include/asm/alternative.h
@@ -349,23 +349,14 @@ static inline int alternatives_text_reserved(void *start, void *end)
* Otherwise, if CPU has feature1, function1 is used.
* Otherwise, old function is used.
*/
-#define alternative_call_2(oldfunc, newfunc1, ft_flags1, newfunc2, ft_flags2, \
- output, input...) \
- asm_inline volatile (ALTERNATIVE_2("call %c[old]", "call %c[new1]", ft_flags1, \
- "call %c[new2]", ft_flags2) \
- : output, ASM_CALL_CONSTRAINT \
- : [old] "i" (oldfunc), [new1] "i" (newfunc1), \
+#define alternative_call_2(oldfunc, newfunc1, ft_flags1, newfunc2, ft_flags2, \
+ output, input...) \
+ asm_inline volatile(N_ALTERNATIVE_2("call %P[old]", "call %P[new1]", ft_flags1, \
+ "call %P[new2]", ft_flags2) \
+ : output, ASM_CALL_CONSTRAINT \
+ : [old] "i" (oldfunc), [new1] "i" (newfunc1), \
[new2] "i" (newfunc2), ## input)
-#define n_alternative_call_2(oldfunc, newfunc1, ft_flags1, newfunc2, ft_flags2, \
- output, input...) \
- asm_inline volatile (N_ALTERNATIVE_2("call %P[old]", "call %P[new1]", ft_flags1,\
- "call %P[new2]", ft_flags2) \
- : output, ASM_CALL_CONSTRAINT \
- : [old] "i" (oldfunc), [new1] "i" (newfunc1), \
- [new2] "i" (newfunc2), ## input)
-
-
/*
* use this macro(s) if you need more than one output parameter
* in alternative_io
--
2.43.0
next prev parent reply other threads:[~2024-05-31 12:35 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-31 12:34 [PATCH 00/14] x86/alternatives: Nest them Borislav Petkov
2024-05-31 12:34 ` [PATCH 01/14] x86/alternative: Zap alternative_ternary() Borislav Petkov
2024-05-31 12:34 ` [PATCH 02/14] x86/alternatives: Add nested alternatives macros Borislav Petkov
2024-05-31 14:30 ` Uros Bizjak
2024-05-31 14:32 ` Borislav Petkov
2024-05-31 14:36 ` Borislav Petkov
2024-05-31 15:10 ` Uros Bizjak
2024-05-31 18:09 ` Borislav Petkov
2024-05-31 12:35 ` [PATCH 03/14] x86/alternative: Convert alternative() Borislav Petkov
2024-05-31 12:35 ` [PATCH 04/14] x86/alternative: Convert alternative_2() Borislav Petkov
2024-05-31 12:35 ` [PATCH 05/14] x86/alternative: Convert alternative_input() Borislav Petkov
2024-05-31 12:35 ` [PATCH 06/14] x86/alternative: Convert alternative_io() Borislav Petkov
2024-05-31 12:35 ` [PATCH 07/14] x86/alternative: Convert alternative_call() Borislav Petkov
2024-05-31 12:35 ` Borislav Petkov [this message]
2024-05-31 12:35 ` [PATCH 09/14] x86/alternative: Convert ALTERNATIVE_TERNARY() Borislav Petkov
2024-05-31 12:35 ` [PATCH 10/14] x86/alternative: Convert ALTERNATIVE_3() Borislav Petkov
2024-05-31 17:00 ` Brian Gerst
2024-06-01 9:04 ` Borislav Petkov
2024-05-31 12:35 ` [PATCH 11/14] x86/alternative: Convert the asm ALTERNATIVE() macro Borislav Petkov
2024-05-31 12:35 ` [PATCH 12/14] x86/alternative: Convert the asm ALTERNATIVE_2() macro Borislav Petkov
2024-05-31 12:35 ` [PATCH 13/14] x86/alternative: Convert the asm ALTERNATIVE_3() macro Borislav Petkov
2024-05-31 12:35 ` [PATCH 14/14] x86/alternative: Replace the old macros Borislav Petkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240531123512.21427-9-bp@kernel.org \
--to=bp@kernel.org \
--cc=bp@alien8.de \
--cc=linux-kernel@vger.kernel.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox