linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] firmware: arm_scmi: use ioread64() instead of ioread64_hi_lo()
@ 2025-03-04 14:43 Arnd Bergmann
  2025-03-04 15:28 ` Sudeep Holla
  0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2025-03-04 14:43 UTC (permalink / raw)
  To: Sudeep Holla, Cristian Marussi
  Cc: soc, Arnd Bergmann, Luke Parkin, Peng Fan, arm-scmi,
	linux-arm-kernel, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

The scmi_common_fastchannel_db_ring() function calls either ioread64()
or ioread64_hi_lo() depending on whether it is compiler for 32-bit
or 64-bit architectures.

The same logic is used to define ioread64() itself in the
linux/io-64-nonatomic-hi-lo.h header file, so the special case
is not really needed.

The behavior here should not change at all.

Fixes: 6f9ea4dabd2d ("firmware: arm_scmi: Generalize the fast channel support")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/firmware/arm_scmi/driver.c | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/drivers/firmware/arm_scmi/driver.c b/drivers/firmware/arm_scmi/driver.c
index 60050da54bf2..1c75a4c9c371 100644
--- a/drivers/firmware/arm_scmi/driver.c
+++ b/drivers/firmware/arm_scmi/driver.c
@@ -1997,17 +1997,7 @@ static void scmi_common_fastchannel_db_ring(struct scmi_fc_db_info *db)
 	else if (db->width == 4)
 		SCMI_PROTO_FC_RING_DB(32);
 	else /* db->width == 8 */
-#ifdef CONFIG_64BIT
 		SCMI_PROTO_FC_RING_DB(64);
-#else
-	{
-		u64 val = 0;
-
-		if (db->mask)
-			val = ioread64_hi_lo(db->addr) & db->mask;
-		iowrite64_hi_lo(db->set | val, db->addr);
-	}
-#endif
 }
 
 /**
-- 
2.39.5



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] firmware: arm_scmi: use ioread64() instead of ioread64_hi_lo()
  2025-03-04 14:43 [PATCH] firmware: arm_scmi: use ioread64() instead of ioread64_hi_lo() Arnd Bergmann
@ 2025-03-04 15:28 ` Sudeep Holla
  0 siblings, 0 replies; 2+ messages in thread
From: Sudeep Holla @ 2025-03-04 15:28 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Cristian Marussi, soc, Sudeep Holla, Arnd Bergmann, Luke Parkin,
	Peng Fan, arm-scmi, linux-arm-kernel, linux-kernel

Hi Arnd,

On Tue, Mar 04, 2025 at 03:43:34PM +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> The scmi_common_fastchannel_db_ring() function calls either ioread64()
> or ioread64_hi_lo() depending on whether it is compiler for 32-bit
> or 64-bit architectures.
> 
> The same logic is used to define ioread64() itself in the
> linux/io-64-nonatomic-hi-lo.h header file, so the special case
> is not really needed.
> 
> The behavior here should not change at all.

LGTM. I just sent PR for v6.15 this morning. Either I can redo PR with
this included or you can just apply this directly. I am fine either way.
If you go for the latter approach,

Reviewed-by: Sudeep Holla <sudeep.holla@arm.com>

If you prefer me to send updated PR, let me know. I don't want to create
confusion by recalling by PR and sending an updated one without consulting
you.

--
Regards,
Sudeep


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-03-04 16:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-04 14:43 [PATCH] firmware: arm_scmi: use ioread64() instead of ioread64_hi_lo() Arnd Bergmann
2025-03-04 15:28 ` Sudeep Holla

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).