From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A233738945D for ; Mon, 29 Jun 2026 06:07:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782713270; cv=none; b=f6mivcN9vKFip4UEr+fVIq4+53ENrpl+TJrc+YLkY3agBPGmIiqyp0eLBO+BW5W3Kpy2m9ui014AOts/ktQb5rcP5QFXK4tUbvkFz7a1jLDThEsetnrCtCpyP7g5RbuX9qDQx7zakKojvyI8G1/JhKa3BSE5vpRiS/huZag1gtE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782713270; c=relaxed/simple; bh=S+xfSjerIzf4333j31cwkBDq1ASe4CstqMGjPHVylHI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=CN6lSoEYyeO+kr3dLVG05Hw6jCv8ZWuprroU3HQqYKrHFFPCKZbTCfNrcdnU4ZQqQk0vSK2GZer7rdxSA5B419n3bKwZrChaS+zOQ1YdHFfC3s52r0SJnPjGdi9RIUjk/V2uer7JnGL00JMRcNYWHUshNztyBPxV2zt6Kh23w24= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 3F14D75D1E; Mon, 29 Jun 2026 06:07:48 +0000 (UTC) Authentication-Results: smtp-out2.suse.de; none Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 0E7FC779A8; Mon, 29 Jun 2026 06:07:48 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id 6rUYArQLQmrfEwAAD6G6ig (envelope-from ); Mon, 29 Jun 2026 06:07:48 +0000 From: Juergen Gross To: linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org Cc: Juergen Gross , Linus Walleij , Bartosz Golaszewski Subject: [PATCH 24/32] drivers/gpio: Stop using 32-bit MSR interfaces Date: Mon, 29 Jun 2026 08:05:15 +0200 Message-ID: <20260629060526.3638272-25-jgross@suse.com> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260629060526.3638272-1-jgross@suse.com> References: <20260629060526.3638272-1-jgross@suse.com> Precedence: bulk X-Mailing-List: linux-gpio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 3F14D75D1E X-Spam-Flag: NO X-Spam-Score: -4.00 X-Spam-Level: X-Rspamd-Action: no action X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 50.00]; REPLY(-4.00)[] 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 --- 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.54.0