Devicetree
 help / color / mirror / Atom feed
From: Stefano Radaelli <stefano.radaelli21@gmail.com>
To: sashiko-reviews@lists.linux.dev
Cc: devicetree@vger.kernel.org, imx@lists.linux.dev, robh@kernel.org,
	conor+dt@kernel.org, Frank.Li@kernel.org
Subject: Re: [PATCH v4 3/3] arm64: dts: freescale: imx93-var: Add Cortex-M33 configurations
Date: Fri, 20 Nov 2026 19:47:13 +0100	[thread overview]
Message-ID: <awCVsf3BF09a0ukI@GLaDOS.station> (raw)
In-Reply-To: <sashiko-outbox-225865@kernel.org>

On Fri, Nov 20, 2026 at 06:44:28PM +0000, sashiko-bot@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential
> issue to consider:
> - [High] arm64: dts: freescale: imx93-var: memory@ node names break
>   imx_rproc matching
> --
> 
> commit 3b76dce88eb56af58d06bc8653db1a91c42100e4
> Author: Stefano Radaelli <stefano.r@variscite.com>
> 
> arm64: dts: freescale: imx93-var: Add Cortex-M33 configurations
> 
> This commit adds Cortex-M33 overlays and combined DTBs for DART-MX93 on Sonata
> and VAR-SOM-MX93 on Symphony, moving the common M33 include into the overlays
> and reserving or disabling affected peripherals.
> 
> > diff --git a/arch/arm64/boot/dts/freescale/imx93-var-dart-sonata-m33.dtso b/arch/arm64/boot/dts/freescale/imx93-var-dart-sonata-m33.dtso
> > new file mode 100644
> > index 0000000000000..51ec0beea7c9f
> > --- /dev/null
> > +++ b/arch/arm64/boot/dts/freescale/imx93-var-dart-sonata-m33.dtso
> > @@ -0,0 +1,55 @@
> > +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> > +/*
> > + * Cortex-M33 support for Variscite DART-MX93 on Sonata-Board
> > + *
> > + * Link: https://variscite.com/carrier-boards/sonata-board/
> > + *
> > + * Copyright (C) 2026 Variscite Ltd. - https://www.variscite.com/
> > + *
> > + */
> > +
> > +/dts-v1/;
> > +/plugin/;
> > +
> > +#include "imx93-var-common-m33.dtsi"
> 
> [Severity: High]
> Does imx_rproc recognize the reserved-memory regions included from
> imx93-var-common-m33.dtsi (both here and in
> imx93-var-som-symphony-m33.dtso)?
> 
> imx93-var-common-m33.dtsi names the reserved-memory nodes memory@2021e000,
> memory@87ee0000, etc., and puts the region names in memory-region-names on
> &cm33:
> 
> arch/arm64/boot/dts/freescale/imx93-var-common-m33.dtsi:
> 	reserved-memory {
> 		...
> 		rsc_table: memory@2021e000 {
> 		...
> &cm33 {
> 	...
> 	memory-region = <&vdevbuffer>, <&vdev0vring0>, <&vdev0vring1>,
> 			<&vdev1vring0>, <&vdev1vring1>, <&rsc_table>;
> 	memory-region-names = "vdev0buffer", "vdev0vring0", "vdev0vring1",
> 			      "vdev1vring0", "vdev1vring1", "rsc-table";
> 
> However, imx_rproc_addr_init() and imx_rproc_prepare() look up regions by
> index with of_reserved_mem_region_to_resource(), which sets res.name to
> the /reserved-memory node name rather than reading memory-region-names:
> 
> drivers/remoteproc/imx_rproc.c:imx_rproc_prepare() {
> 	...
> 		if (strstarts(res.name, "vdev0buffer"))
> 			continue;
> 
> 		if (strstarts(res.name, "rsc-table"))
> 			continue;
> 	...
> 		mem = rproc_mem_entry_init(priv->dev, NULL, (dma_addr_t)res.start,
> 					   resource_size(&res), da,
> 					   rproc_mem_entry_ioremap_wc,
> 					   rproc_mem_entry_iounmap,
> 					   "%.*s", strchrnul(res.name, '@') - res.name,
> 					   res.name);
> 
> Because res.name starts with "memory@", imx_rproc_addr_init() leaves
> priv->rsc_table NULL and ioremaps the vdev regions, while
> imx_rproc_prepare() registers all six carveouts under the name "memory",
> so rproc_alloc_vring() fails to find the "vdev%dvring%d" carveouts at
> runtime.  In addition, fsl,imx-rproc.yaml does not allow
> memory-region-names on the remoteproc node, causing dtbs_check failures on
> the new -m33 DTBs.
> 

This series depends on the following commits, already in linux-next,
as noted in the cover letter and in patch 2:

- ebb21cc5d1c0 ("dt-bindings: remoteproc: imx_rproc: Document
  memory-region-names to avoid implicit ABI")
- 8396089f91fa ("remoteproc: imx_rpoc: Use memory-region-names to avoid
  implicit ABI")

The driver change replaces the direct calls to
of_reserved_mem_region_to_resource() in both imx_rproc_prepare() and
imx_rproc_addr_init() with imx_rproc_rmem_to_resource(), which reads
memory-region-names into res.name. The binding change permits that
property.

With these prerequisites applied, the generic memory@ node names do
not affect resource table or vring matching.

The reported issue applies when the series is evaluated without those
prerequisites. This series needs to be applied after them.

Thanks,
Stefano

      reply	other threads:[~2026-11-20 18:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-20 18:32 [PATCH v4 0/3] arm64: dts: freescale: imx93-var: Add Cortex-M33 configurations Stefano Radaelli
2026-11-20 18:32 ` [PATCH v4 1/3] arm64: dts: freescale: imx93-var-som: Fix resource table address Stefano Radaelli
2026-11-20 18:32 ` [PATCH v4 2/3] arm64: dts: freescale: imx93-var: Extract common Cortex-M33 configuration Stefano Radaelli
2026-11-20 18:32 ` [PATCH v4 3/3] arm64: dts: freescale: imx93-var: Add Cortex-M33 configurations Stefano Radaelli
2026-11-20 18:44   ` sashiko-bot
2026-11-20 18:47     ` Stefano Radaelli [this message]

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=awCVsf3BF09a0ukI@GLaDOS.station \
    --to=stefano.radaelli21@gmail.com \
    --cc=Frank.Li@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=imx@lists.linux.dev \
    --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