All of lore.kernel.org
 help / color / mirror / Atom feed
From: Juergen Gross <jgross@suse.com>
To: linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org
Cc: Juergen Gross <jgross@suse.com>,
	Linus Walleij <linusw@kernel.org>,
	Bartosz Golaszewski <brgl@kernel.org>,
	Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Subject: [PATCH v5 08/12] drivers/gpio: Stop using 32-bit MSR interfaces
Date: Mon, 26 Oct 2026 14:02:19 +0100	[thread overview]
Message-ID: <20261026130223.773129-9-jgross@suse.com> (raw)
In-Reply-To: <20261026130223.773129-1-jgross@suse.com>

The 32-bit MSR interfaces rdmsr() and wrmsr() are planned to be
removed. Use the related 64-bit variants instead.

Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
---
 drivers/gpio/gpio-cs5535.c | 10 +++++-----
 include/linux/cs5535.h     | 10 +++++-----
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/gpio/gpio-cs5535.c b/drivers/gpio/gpio-cs5535.c
index 5f5373d86397..a97ec7561889 100644
--- a/drivers/gpio/gpio-cs5535.c
+++ b/drivers/gpio/gpio-cs5535.c
@@ -143,17 +143,17 @@ EXPORT_SYMBOL_GPL(cs5535_gpio_isset);
 
 int cs5535_gpio_set_irq(unsigned group, unsigned irq)
 {
-	uint32_t lo, hi;
+	struct msr val;
 
 	if (group > 7 || irq > 15)
 		return -EINVAL;
 
-	rdmsr(MSR_PIC_ZSEL_HIGH, lo, hi);
+	rdmsrq(MSR_PIC_ZSEL_HIGH, val.q);
 
-	lo &= ~(0xF << (group * 4));
-	lo |= (irq & 0xF) << (group * 4);
+	val.l &= ~(0xF << (group * 4));
+	val.l |= (irq & 0xF) << (group * 4);
 
-	wrmsr(MSR_PIC_ZSEL_HIGH, lo, hi);
+	wrmsrq(MSR_PIC_ZSEL_HIGH, val.q);
 	return 0;
 }
 EXPORT_SYMBOL_GPL(cs5535_gpio_set_irq);
diff --git a/include/linux/cs5535.h b/include/linux/cs5535.h
index 2be1120174eb..5ec2aca537bb 100644
--- a/include/linux/cs5535.h
+++ b/include/linux/cs5535.h
@@ -49,12 +49,12 @@
 static inline int cs5535_pic_unreqz_select_high(unsigned int group,
 						unsigned int irq)
 {
-	uint32_t lo, hi;
+	struct msr val;
 
-	rdmsr(MSR_PIC_ZSEL_HIGH, lo, hi);
-	lo &= ~(0xF << (group * 4));
-	lo |= (irq & 0xF) << (group * 4);
-	wrmsr(MSR_PIC_ZSEL_HIGH, lo, hi);
+	rdmsrq(MSR_PIC_ZSEL_HIGH, val.q);
+	val.l &= ~(0xF << (group * 4));
+	val.l |= (irq & 0xF) << (group * 4);
+	wrmsrq(MSR_PIC_ZSEL_HIGH, val.q);
 	return 0;
 }
 
-- 
2.56.0


  parent reply	other threads:[~2026-10-26 13:03 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 ` [PATCH v5 03/12] x86/msr: Remove rdmsr_safe() Juergen Gross
2026-10-26 13:10   ` 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 ` Juergen Gross [this message]
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-9-jgross@suse.com \
    --to=jgross@suse.com \
    --cc=bartosz.golaszewski@oss.qualcomm.com \
    --cc=brgl@kernel.org \
    --cc=linusw@kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.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.