Skip to contentSkip to conversation

firmware: arm_scmi: use ioread64() instead of ioread64_hi_lo()

PATCH Applied Arnd Bergmann 3 participants 3 messages Mar 4, 2025 – Mar 6, 2025 System control & power/management interface (SCPI/SCMI) Message Protocol drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 firmware: arm_scmi: use ioread64() instead of ioread64_hi_lo()

From: Arnd Bergmann <[email protected]>

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")
---
 drivers/firmware/arm_scmi/driver.c | 10 ----------
 1 file changed, 10 deletions(-)
drivers/firmware/arm_scmi/driver.c +0 -10
index 60050da54bf2..1c75a4c9c371 100644
@@ -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
 }
 
 /**
Signature · 1 line
2.39.5
Reviewed-by on v1 1/1
#1 lore raw

Hi Arnd,

Quoted 11 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

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,

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

#2 lore raw
In reply to Arnd Bergmann
This patch was applied to soc/soc.git (for-next) by Arnd Bergmann <[email protected]>:

Hello:

This patch was applied to soc/soc.git (for-next)
by Arnd Bergmann <[email protected]>:

Quoted 11 lines · On Tue, 4 Mar 2025 15:43:34 +0100 you wrote:

From: Arnd Bergmann <[email protected]>

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.

[...]

Here is the summary with links:
- firmware: arm_scmi: use ioread64() instead of ioread64_hi_lo()

    https://git.kernel.org/soc/soc/c/3b8c56d80727

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html