Linux clock framework development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Han Gao" <gaohan@iscas.ac.cn>
Cc: devicetree@vger.kernel.org, linux-gpio@vger.kernel.org,
	linux-clk@vger.kernel.org, linux-serial@vger.kernel.org,
	robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH RFC v3 01/17] firmware: arm_scmi: Drop the ARM architecture dependency
Date: Mon, 02 Nov 2026 19:55:18 +0000	[thread overview]
Message-ID: <sashiko-outbox-194037@kernel.org> (raw)
In-Reply-To: <20261103-a210-scmi-v3-1-ee6b31580808@iscas.ac.cn>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] firmware: arm_scmi: missing HAS_IOMEM dependency on ARM_SCMI_PROTOCOL
--

commit 2b45f4669350cda60b185c5a0c439cbdd7f35cc9
Author: Han Gao <gaohan@iscas.ac.cn>

firmware: arm_scmi: Drop the ARM architecture dependency

This commit removes the ARM, ARM64, and COMPILE_TEST dependency from
ARM_SCMI_PROTOCOL in Kconfig so that other architectures can build and use
the SCMI protocol driver.

> diff --git a/drivers/firmware/arm_scmi/Kconfig b/drivers/firmware/arm_scmi/Kconfig
> index 783c24a20e291..b56aed46a3870 100644
> --- a/drivers/firmware/arm_scmi/Kconfig
> +++ b/drivers/firmware/arm_scmi/Kconfig
> @@ -3,7 +3,6 @@ menu "ARM System Control and Management Interface Protocol"
>  
>  config ARM_SCMI_PROTOCOL
>  	tristate "ARM System Control and Management Interface (SCMI) Message Protocol"
> -	depends on ARM || ARM64 || COMPILE_TEST

[Severity: Low]
Should ARM_SCMI_PROTOCOL retain a dependency on HAS_IOMEM?

Previously, ARM and ARM64 selected HAS_IOMEM, and COMPILE_TEST in
init/Kconfig depends on HAS_IOMEM, which guaranteed that CONFIG_HAS_IOMEM
was enabled whenever ARM_SCMI_PROTOCOL was selectable. Dropping this line
leaves ARM_SCMI_PROTOCOL with no dependencies, allowing it to be enabled on
targets where CONFIG_HAS_IOMEM is disabled (such as ARCH=um).

When CONFIG_ARM_SCMI_PROTOCOL is enabled, the core driver in
drivers/firmware/arm_scmi/driver.c unconditionally compiles
scmi_common_fastchannel_init(), which calls devm_ioremap():

    addr = devm_ioremap(ph->dev, phys_addr, size);

In addition, when CONFIG_MAILBOX or CONFIG_OPTEE is enabled,
ARM_SCMI_TRANSPORT_MAILBOX or ARM_SCMI_TRANSPORT_OPTEE selects
ARM_SCMI_HAVE_SHMEM, which compiles drivers/firmware/arm_scmi/shmem.c
(calling __ioread32_copy() in shmem_memcpy_fromio32(), __iowrite32_copy()
in shmem_memcpy_toio32(), and devm_ioremap() in shmem_setup_iomap()) and
drivers/firmware/arm_scmi/transports/mailbox.c (calling devm_iounmap() in
mailbox_chan_setup()).

Because lib/Makefile only builds iomap_copy.o and devres.o when
CONFIG_HAS_IOMEM is enabled:

    obj-$(CONFIG_HAS_IOMEM) += iomap_copy.o devres.o

won't building ARM_SCMI_PROTOCOL with CONFIG_HAS_IOMEM disabled fail at link
time with undefined references to devm_ioremap(), devm_iounmap(),
__ioread32_copy(), and __iowrite32_copy()?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261103-a210-scmi-v3-0-ee6b31580808@iscas.ac.cn?part=1

  reply	other threads:[~2026-11-02 19:55 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-02 19:45 [PATCH RFC v3 00/17] riscv: add initial Zhihe A210 support using SCMI clocks and resets Han Gao via B4 Relay
2026-11-02 19:45 ` [PATCH RFC v3 01/17] firmware: arm_scmi: Drop the ARM architecture dependency Han Gao via B4 Relay
2026-11-02 19:55   ` sashiko-bot [this message]
2026-11-02 19:45 ` [PATCH RFC v3 02/17] dt-bindings: vendor-prefixes: add Zhihe Han Gao via B4 Relay
2026-11-02 19:45 ` [PATCH RFC v3 03/17] riscv: add Zhihe A210 support Han Gao via B4 Relay
2026-11-02 19:45 ` [PATCH RFC v3 04/17] dt-bindings: mailbox: add Zhihe A210 AP to E902 mailbox Han Gao via B4 Relay
2026-11-02 19:45 ` [PATCH RFC v3 05/17] mailbox: add Zhihe A210 AP to E902 mailbox driver Han Gao via B4 Relay
2026-11-02 19:45 ` [PATCH RFC v3 06/17] dt-bindings: pinctrl: add Zhihe A210 pin controller Han Gao via B4 Relay
2026-11-02 19:45 ` [PATCH RFC v3 07/17] pinctrl: zhihe: add A210 support Han Gao via B4 Relay
2026-11-02 19:45 ` [PATCH RFC v3 08/17] dt-bindings: interrupt-controller: add Zhihe A210 PLIC Han Gao via B4 Relay
2026-11-02 19:45 ` [PATCH RFC v3 09/17] dt-bindings: riscv: add Melon Pi V1 and V2 Han Gao via B4 Relay
2026-11-02 19:45 ` [PATCH RFC v3 10/17] dt-bindings: timer: add Zhihe A210 CLINT Han Gao via B4 Relay
2026-11-02 19:45 ` [PATCH RFC v3 11/17] dt-bindings: serial: snps-dw-apb-uart: add Zhihe A210 UART Han Gao via B4 Relay
2026-11-02 19:45 ` [PATCH RFC v3 12/17] riscv: dts: zhihe: add A210 core support Han Gao via B4 Relay
2026-11-02 19:45 ` [PATCH RFC v3 13/17] riscv: dts: zhihe: add A210 UARTs Han Gao via B4 Relay
2026-11-02 19:45 ` [PATCH RFC v3 14/17] riscv: dts: zhihe: add A210 module memory Han Gao via B4 Relay
2026-11-02 19:45 ` [PATCH RFC v3 15/17] riscv: dts: zhihe: add Melon Pi V1 and V2 Han Gao via B4 Relay
2026-11-02 19:45 ` [PATCH RFC v3 16/17] riscv: defconfig: enable A210 support Han Gao via B4 Relay
2026-11-02 19:45 ` [PATCH RFC v3 17/17] MAINTAINERS: add Zhihe A210 Han Gao via B4 Relay

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=sashiko-outbox-194037@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=gaohan@iscas.ac.cn \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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