Linux Hardware Monitor development
 help / color / mirror / Atom feed
From: Juergen Gross <jgross@suse.com>
To: linux-kernel@vger.kernel.org, linux-hwmon@vger.kernel.org
Cc: Juergen Gross <jgross@suse.com>, Guenter Roeck <linux@roeck-us.net>
Subject: [PATCH 29/32] hwmon: Stop using 32-bit MSR interfaces
Date: Mon, 29 Jun 2026 08:05:20 +0200	[thread overview]
Message-ID: <20260629060526.3638272-30-jgross@suse.com> (raw)
In-Reply-To: <20260629060526.3638272-1-jgross@suse.com>

The 32-bit MSR interface rdmsr() is planned to be removed. Use the
related 64-bit variant instead.

Signed-off-by: Juergen Gross <jgross@suse.com>
---
 drivers/hwmon/hwmon-vid.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/hwmon/hwmon-vid.c b/drivers/hwmon/hwmon-vid.c
index 2df4956296ed..dee42c163d92 100644
--- a/drivers/hwmon/hwmon-vid.c
+++ b/drivers/hwmon/hwmon-vid.c
@@ -237,16 +237,17 @@ static struct vrm_model vrm_models[] = {
  */
 static u8 get_via_model_d_vrm(void)
 {
-	unsigned int vid, brand, __maybe_unused dummy;
+	u64 msr;
+	unsigned int vid, brand;
 	static const char *brands[4] = {
 		"C7-M", "C7", "Eden", "C7-D"
 	};
 
-	rdmsr(0x198, dummy, vid);
-	vid &= 0xff;
+	rdmsrq(0x198, msr);
+	vid = (msr >> 32) & 0xff;
 
-	rdmsr(0x1154, brand, dummy);
-	brand = ((brand >> 4) ^ (brand >> 2)) & 0x03;
+	rdmsrq(0x1154, msr);
+	brand = ((msr >> 4) ^ (msr >> 2)) & 0x03;
 
 	if (vid > 0x3f) {
 		pr_info("Using %d-bit VID table for VIA %s CPU\n",
-- 
2.54.0


  reply	other threads:[~2026-06-29  6:08 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-29  6:04 [PATCH 00/32] x86/msr: Drop 32-bit MSR interfaces Juergen Gross
2026-06-29  6:05 ` Juergen Gross [this message]
2026-06-29  6:25   ` [PATCH 29/32] hwmon: Stop using " sashiko-bot
2026-06-29 15:05   ` Guenter Roeck
2026-06-29  6:05 ` [PATCH 31/32] treewide: convert rdmsrq() from a macro to an inline function Juergen Gross
2026-06-29  6:24   ` sashiko-bot
2026-06-29  6:52 ` [PATCH 00/32] x86/msr: Drop 32-bit MSR interfaces Arnd Bergmann
2026-06-29  7:01   ` Jürgen Groß
2026-06-29  8:06     ` Arnd Bergmann
2026-06-29  8:15       ` Jürgen Groß
2026-06-29  8:38         ` Arnd Bergmann
2026-06-30 20:06           ` H. Peter Anvin
2026-06-29 11:19       ` Ingo Molnar
2026-06-30 18:59         ` Sean Christopherson
2026-07-01  8:33           ` Jürgen Groß
2026-07-02 10:07           ` Ingo Molnar
2026-07-02 11:03             ` Juergen Gross

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=20260629060526.3638272-30-jgross@suse.com \
    --to=jgross@suse.com \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    /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