From: Juergen Gross <jgross@suse.com>
To: linux-kernel@vger.kernel.org, x86@kernel.org
Cc: Juergen Gross <jgross@suse.com>, "H. Peter Anvin" <hpa@zytor.com>,
Thomas Gleixner <tglx@kernel.org>, Ingo Molnar <mingo@redhat.com>,
Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>
Subject: [PATCH RFC 1/6] x86/msr: Rename msr_read() and msr_write()
Date: Mon, 20 Apr 2026 11:16:29 +0200 [thread overview]
Message-ID: <20260420091634.128787-2-jgross@suse.com> (raw)
In-Reply-To: <20260420091634.128787-1-jgross@suse.com>
Rename the existing msr_read() and msr_write() functions to
msr_do_read() and msr_do_write(), as the original names will be used
for new MSR access functions in the future.
Signed-off-by: Juergen Gross <jgross@suse.com>
---
arch/x86/kernel/msr.c | 12 ++++++------
arch/x86/lib/msr.c | 12 ++++++------
2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/arch/x86/kernel/msr.c b/arch/x86/kernel/msr.c
index 4469c784eaa0..43791746103c 100644
--- a/arch/x86/kernel/msr.c
+++ b/arch/x86/kernel/msr.c
@@ -49,8 +49,8 @@ enum allow_write_msrs {
static enum allow_write_msrs allow_writes = MSR_WRITES_DEFAULT;
-static ssize_t msr_read(struct file *file, char __user *buf,
- size_t count, loff_t *ppos)
+static ssize_t msr_do_read(struct file *file, char __user *buf,
+ size_t count, loff_t *ppos)
{
u32 __user *tmp = (u32 __user *) buf;
u32 data[2];
@@ -105,8 +105,8 @@ static int filter_write(u32 reg)
return 0;
}
-static ssize_t msr_write(struct file *file, const char __user *buf,
- size_t count, loff_t *ppos)
+static ssize_t msr_do_write(struct file *file, const char __user *buf,
+ size_t count, loff_t *ppos)
{
const u32 __user *tmp = (const u32 __user *)buf;
u32 data[2];
@@ -227,8 +227,8 @@ static int msr_open(struct inode *inode, struct file *file)
static const struct file_operations msr_fops = {
.owner = THIS_MODULE,
.llseek = no_seek_end_llseek,
- .read = msr_read,
- .write = msr_write,
+ .read = msr_do_read,
+ .write = msr_do_write,
.open = msr_open,
.unlocked_ioctl = msr_ioctl,
.compat_ioctl = msr_ioctl,
diff --git a/arch/x86/lib/msr.c b/arch/x86/lib/msr.c
index dfdd1da89f36..be6c34666743 100644
--- a/arch/x86/lib/msr.c
+++ b/arch/x86/lib/msr.c
@@ -28,7 +28,7 @@ void msrs_free(struct msr __percpu *msrs)
EXPORT_SYMBOL(msrs_free);
/**
- * msr_read - Read an MSR with error handling
+ * msr_do_read - Read an MSR with error handling
* @msr: MSR to read
* @m: value to read into
*
@@ -37,7 +37,7 @@ EXPORT_SYMBOL(msrs_free);
*
* Return: %0 for success, otherwise an error code
*/
-static int msr_read(u32 msr, struct msr *m)
+static int msr_do_read(u32 msr, struct msr *m)
{
int err;
u64 val;
@@ -50,14 +50,14 @@ static int msr_read(u32 msr, struct msr *m)
}
/**
- * msr_write - Write an MSR with error handling
+ * msr_do_write - Write an MSR with error handling
*
* @msr: MSR to write
* @m: value to write
*
* Return: %0 for success, otherwise an error code
*/
-static int msr_write(u32 msr, struct msr *m)
+static int msr_do_write(u32 msr, struct msr *m)
{
return wrmsrq_safe(msr, m->q);
}
@@ -70,7 +70,7 @@ static inline int __flip_bit(u32 msr, u8 bit, bool set)
if (bit > 63)
return err;
- err = msr_read(msr, &m);
+ err = msr_do_read(msr, &m);
if (err)
return err;
@@ -83,7 +83,7 @@ static inline int __flip_bit(u32 msr, u8 bit, bool set)
if (m1.q == m.q)
return 0;
- err = msr_write(msr, &m1);
+ err = msr_do_write(msr, &m1);
if (err)
return err;
--
2.53.0
next prev parent reply other threads:[~2026-04-20 9:16 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-20 9:16 [PATCH RFC 0/6] x86/msr: Rename MSR access functions Juergen Gross
2026-04-20 9:16 ` Juergen Gross [this message]
2026-04-20 9:16 ` [PATCH RFC 2/6] x86/msr: Create a new minimal set of local " Juergen Gross
2026-04-20 9:16 ` [PATCH RFC 3/6] x86/msr: Create a new minimal set of inter-CPU " Juergen Gross
2026-04-20 9:16 ` [PATCH RFC 4/6] x86/msr: Rename the *_safe_regs[_on_cpu]() MSR functions Juergen Gross
2026-04-20 9:16 ` [PATCH RFC 5/6] x86/events: Switch core parts to use new MSR access functions Juergen Gross
2026-04-20 13:36 ` sashiko-bot
2026-04-20 9:16 ` [PATCH RFC 6/6] x86/cpu/mce: Switch code " Juergen Gross
2026-04-20 11:35 ` [PATCH RFC 0/6] x86/msr: Rename " Peter Zijlstra
2026-04-20 11:41 ` Peter Zijlstra
2026-04-20 11:51 ` Jürgen Groß
2026-04-20 13:44 ` Sean Christopherson
2026-04-20 14:04 ` Jürgen Groß
2026-04-20 15:34 ` H. Peter Anvin
2026-04-22 7:11 ` Juergen Gross
2026-04-22 19:21 ` Sean Christopherson
2026-04-23 7:23 ` Jürgen Groß
2026-04-20 11:49 ` Jürgen Groß
2026-04-20 12:33 ` Peter Zijlstra
2026-04-20 13:01 ` Jürgen Groß
2026-04-20 13:10 ` Peter Zijlstra
2026-04-20 13:23 ` Jürgen Groß
2026-04-20 13:36 ` Sean Christopherson
2026-04-20 13:57 ` Jürgen Groß
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=20260420091634.128787-2-jgross@suse.com \
--to=jgross@suse.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=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.