From: Juergen Gross <jgross@suse.com>
To: linux-kernel@vger.kernel.org, x86@kernel.org,
virtualization@lists.linux.dev
Cc: Juergen Gross <jgross@suse.com>,
Thomas Gleixner <tglx@kernel.org>, Ingo Molnar <mingo@redhat.com>,
Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
"H. Peter Anvin" <hpa@zytor.com>,
Ajay Kaher <ajay.kaher@broadcom.com>,
Alexey Makhalov <alexey.makhalov@broadcom.com>,
Broadcom internal kernel review list
<bcm-kernel-feedback-list@broadcom.com>
Subject: [PATCH v5 03/12] x86/msr: Remove rdmsr_safe()
Date: Mon, 26 Oct 2026 14:02:14 +0100 [thread overview]
Message-ID: <20261026130223.773129-4-jgross@suse.com> (raw)
In-Reply-To: <20261026130223.773129-1-jgross@suse.com>
rdmsr_safe() has no users left. Delete it.
Signed-off-by: Juergen Gross <jgross@suse.com>
---
arch/x86/include/asm/msr.h | 10 ----------
arch/x86/include/asm/paravirt.h | 10 ----------
2 files changed, 20 deletions(-)
diff --git a/arch/x86/include/asm/msr.h b/arch/x86/include/asm/msr.h
index 6fb7125608c7..776a2daa2ba2 100644
--- a/arch/x86/include/asm/msr.h
+++ b/arch/x86/include/asm/msr.h
@@ -205,16 +205,6 @@ static inline int wrmsrq_safe(u32 msr, u64 val)
return native_write_msr_safe(msr, val);
}
-/* rdmsr with exception handling */
-#define rdmsr_safe(msr, low, high) \
-({ \
- u64 __val; \
- int __err = native_read_msr_safe((msr), &__val); \
- (*low) = (u32)__val; \
- (*high) = (u32)(__val >> 32); \
- __err; \
-})
-
static inline int rdmsrq_safe(u32 msr, u64 *p)
{
return native_read_msr_safe(msr, p);
diff --git a/arch/x86/include/asm/paravirt.h b/arch/x86/include/asm/paravirt.h
index 0591aa38fd85..97b082095572 100644
--- a/arch/x86/include/asm/paravirt.h
+++ b/arch/x86/include/asm/paravirt.h
@@ -177,16 +177,6 @@ static inline int wrmsrq_safe(u32 msr, u64 val)
return paravirt_write_msr_safe(msr, val);
}
-/* rdmsr with exception handling */
-#define rdmsr_safe(msr, a, b) \
-({ \
- u64 _l; \
- int _err = paravirt_read_msr_safe((msr), &_l); \
- (*a) = (u32)_l; \
- (*b) = (u32)(_l >> 32); \
- _err; \
-})
-
static __always_inline int rdmsrq_safe(u32 msr, u64 *p)
{
return paravirt_read_msr_safe(msr, p);
--
2.56.0
next prev parent reply other threads:[~2026-10-26 13:02 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-26 13:02 [PATCH v5 00/12] x86/msr: Drop 32-bit MSR interfaces Juergen Gross
2026-10-26 13:02 ` Juergen Gross
2026-10-26 13:02 ` Juergen Gross [this message]
2026-10-26 13:10 ` [PATCH v5 03/12] x86/msr: Remove rdmsr_safe() sashiko-bot
2026-10-26 13:02 ` [PATCH v5 04/12] drivers/ata: Stop using 32-bit MSR interfaces Juergen Gross
2026-10-26 13:02 ` [PATCH v5 05/12] agp/nvidia: " Juergen Gross
2026-10-26 13:02 ` [PATCH v5 06/12] fbdev/geode: " Juergen Gross
2026-10-26 13:02 ` [PATCH v5 07/12] hw_random/via-rng: " Juergen Gross
2026-10-26 13:02 ` [PATCH v5 08/12] drivers/gpio: " Juergen Gross
2026-10-26 13:02 ` [PATCH v5 09/12] x86/msr: Remove wrmsr() Juergen Gross
2026-10-26 13:13 ` sashiko-bot
2026-10-26 13:02 ` [PATCH v5 10/12] x86/msr: Remove rdmsr() Juergen Gross
2026-10-26 13:12 ` sashiko-bot
2026-10-26 13:02 ` [PATCH v5 11/12] treewide: convert rdmsrq() from a macro to an inline function Juergen Gross
2026-10-26 13:02 ` Juergen Gross
2026-10-26 13:15 ` sashiko-bot
2026-10-26 13:02 ` [PATCH v5 12/12] x86/msr: Simplify some rdmsrq() use cases Juergen Gross
2026-10-26 13:14 ` sashiko-bot
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=20261026130223.773129-4-jgross@suse.com \
--to=jgross@suse.com \
--cc=ajay.kaher@broadcom.com \
--cc=alexey.makhalov@broadcom.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@kernel.org \
--cc=virtualization@lists.linux.dev \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.