From: "tip-bot2 for Ingo Molnar" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Ingo Molnar <mingo@kernel.org>, Andy Lutomirski <luto@kernel.org>,
Brian Gerst <brgerst@gmail.com>, Juergen Gross <jgross@suse.com>,
"H. Peter Anvin" <hpa@zytor.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
Kees Cook <keescook@chromium.org>,
Peter Zijlstra <peterz@infradead.org>,
Borislav Petkov <bp@alien8.de>,
Thomas Gleixner <tglx@linutronix.de>,
Josh Poimboeuf <jpoimboe@redhat.com>,
Uros Bizjak <ubizjak@gmail.com>,
linux-kernel@vger.kernel.org, x86@kernel.org
Subject: [tip: x86/merge] x86/msr: Rename DECLARE_ARGS() to EAX_EDX_DECLARE_ARGS
Date: Fri, 02 May 2025 09:04:29 -0000 [thread overview]
Message-ID: <174617666993.22196.2729172970704358674.tip-bot2@tip-bot2> (raw)
The following commit has been merged into the x86/merge branch of tip:
Commit-ID: c9d8ea9d53d4ddb80f2ad2bca5b9e9e40fcb9b16
Gitweb: https://git.kernel.org/tip/c9d8ea9d53d4ddb80f2ad2bca5b9e9e40fcb9b16
Author: Ingo Molnar <mingo@kernel.org>
AuthorDate: Fri, 02 May 2025 10:08:42 +02:00
Committer: Ingo Molnar <mingo@kernel.org>
CommitterDate: Fri, 02 May 2025 10:11:17 +02:00
x86/msr: Rename DECLARE_ARGS() to EAX_EDX_DECLARE_ARGS
DECLARE_ARGS() is way too generic of a name that says very little about
why these args are declared in that fashion - use the EAX_EDX_ prefix
to create a common prefix between the three helper methods:
EAX_EDX_DECLARE_ARGS()
EAX_EDX_VAL()
EAX_EDX_RET()
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Juergen Gross <jgross@suse.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Kees Cook <keescook@chromium.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Uros Bizjak <ubizjak@gmail.com>
Cc: linux-kernel@vger.kernel.org
---
arch/x86/include/asm/msr.h | 14 +++++++-------
arch/x86/kernel/cpu/mce/core.c | 2 +-
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/arch/x86/include/asm/msr.h b/arch/x86/include/asm/msr.h
index 27bc0b5..d57a94c 100644
--- a/arch/x86/include/asm/msr.h
+++ b/arch/x86/include/asm/msr.h
@@ -46,11 +46,11 @@ struct saved_msrs {
* clearing the high half of 'low':
*/
#ifdef CONFIG_X86_64
-# define DECLARE_ARGS(val, low, high) unsigned long low, high
+# define EAX_EDX_DECLARE_ARGS(val, low, high) unsigned long low, high
# define EAX_EDX_VAL(val, low, high) ((low) | (high) << 32)
# define EAX_EDX_RET(val, low, high) "=a" (low), "=d" (high)
#else
-# define DECLARE_ARGS(val, low, high) u64 val
+# define EAX_EDX_DECLARE_ARGS(val, low, high) u64 val
# define EAX_EDX_VAL(val, low, high) (val)
# define EAX_EDX_RET(val, low, high) "=A" (val)
#endif
@@ -83,7 +83,7 @@ static inline void do_trace_rdpmc(u32 msr, u64 val, int failed) {}
*/
static __always_inline u64 __rdmsr(u32 msr)
{
- DECLARE_ARGS(val, low, high);
+ EAX_EDX_DECLARE_ARGS(val, low, high);
asm volatile("1: rdmsr\n"
"2:\n"
@@ -129,7 +129,7 @@ static inline u64 native_read_msr(u32 msr)
static inline u64 native_read_msr_safe(u32 msr, int *err)
{
- DECLARE_ARGS(val, low, high);
+ EAX_EDX_DECLARE_ARGS(val, low, high);
asm volatile("1: rdmsr ; xor %[err],%[err]\n"
"2:\n\t"
@@ -182,7 +182,7 @@ extern int wrmsr_safe_regs(u32 regs[8]);
*/
static __always_inline u64 rdtsc(void)
{
- DECLARE_ARGS(val, low, high);
+ EAX_EDX_DECLARE_ARGS(val, low, high);
asm volatile("rdtsc" : EAX_EDX_RET(val, low, high));
@@ -199,7 +199,7 @@ static __always_inline u64 rdtsc(void)
*/
static __always_inline u64 rdtsc_ordered(void)
{
- DECLARE_ARGS(val, low, high);
+ EAX_EDX_DECLARE_ARGS(val, low, high);
/*
* The RDTSC instruction is not ordered relative to memory
@@ -227,7 +227,7 @@ static __always_inline u64 rdtsc_ordered(void)
static inline u64 native_read_pmc(int counter)
{
- DECLARE_ARGS(val, low, high);
+ EAX_EDX_DECLARE_ARGS(val, low, high);
asm volatile("rdpmc" : EAX_EDX_RET(val, low, high) : "c" (counter));
if (tracepoint_enabled(rdpmc))
diff --git a/arch/x86/kernel/cpu/mce/core.c b/arch/x86/kernel/cpu/mce/core.c
index 255927f..7b9908c 100644
--- a/arch/x86/kernel/cpu/mce/core.c
+++ b/arch/x86/kernel/cpu/mce/core.c
@@ -390,7 +390,7 @@ void ex_handler_msr_mce(struct pt_regs *regs, bool wrmsr)
/* MSR access wrappers used for error injection */
noinstr u64 mce_rdmsrq(u32 msr)
{
- DECLARE_ARGS(val, low, high);
+ EAX_EDX_DECLARE_ARGS(val, low, high);
if (__this_cpu_read(injectm.finished)) {
int offset;
reply other threads:[~2025-05-02 9:04 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=174617666993.22196.2729172970704358674.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=bp@alien8.de \
--cc=brgerst@gmail.com \
--cc=hpa@zytor.com \
--cc=jgross@suse.com \
--cc=jpoimboe@redhat.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=ubizjak@gmail.com \
--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
all inboxes | Powered by JetHome®