* [PATCH v1 1/2] arm64: dts: qcom: lemans: enable audio ML offload memory and SMMU mappings
2026-07-16 15:18 [PATCH v1 0/2] arm64: dts: qcom: enable audio ML offload Pratyush Meduri
@ 2026-07-16 15:18 ` Pratyush Meduri
2026-07-16 15:32 ` sashiko-bot
2026-07-16 16:24 ` Konrad Dybcio
2026-07-16 15:18 ` [PATCH v1 2/2] arm64: dts: qcom: monaco: " Pratyush Meduri
1 sibling, 2 replies; 6+ messages in thread
From: Pratyush Meduri @ 2026-07-16 15:18 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: linux-arm-msm, devicetree, linux-kernel
The audio ML (machine-learning) offload use case requires a contiguous,
physically addressable buffer shared with the audio DSP/SPF, and issues
DMA transactions through additional SMMU stream IDs that are not
covered by the existing ADSP mapping.
Add a dedicated reusable shared-dma-pool CMA region (16 MiB, 4 MiB
aligned) and wire it to the q6apm DAIs node via memory-region. A
dedicated pool guarantees the alignment and contiguity the DSP expects
and isolates these allocations from the default CMA region.
Under the EL2 (Gunyah/hypervisor) configuration the SMMU is fully
enforcing, so the ML transactions are otherwise blocked and faulted:
arm-smmu 15000000.iommu: Blocked unknown Stream ID 0x3060
arm-smmu 15000000.iommu: Blocked unknown Stream ID 0x3062
Add the ML-related stream IDs (0x3060 mask 0x9, 0x3062 mask 0x1) to the
remoteproc_adsp iommus property in the EL2 overlay so these buffers are
translated by the SMMU instead of being rejected.
Signed-off-by: Pratyush Meduri <pratyush.meduri@oss.qualcomm.com>
---
arch/arm64/boot/dts/qcom/lemans-el2.dtso | 4 +++-
arch/arm64/boot/dts/qcom/lemans.dtsi | 9 +++++++++
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/qcom/lemans-el2.dtso b/arch/arm64/boot/dts/qcom/lemans-el2.dtso
index 621ad930cf54..5b477346ef90 100644
--- a/arch/arm64/boot/dts/qcom/lemans-el2.dtso
+++ b/arch/arm64/boot/dts/qcom/lemans-el2.dtso
@@ -19,7 +19,9 @@ &iris {
};
&remoteproc_adsp {
- iommus = <&apps_smmu 0x3000 0x0>;
+ iommus = <&apps_smmu 0x3000 0x0>,
+ <&apps_smmu 0x3060 0x9>,
+ <&apps_smmu 0x3062 0x1>;
};
&remoteproc_cdsp0 {
diff --git a/arch/arm64/boot/dts/qcom/lemans.dtsi b/arch/arm64/boot/dts/qcom/lemans.dtsi
index 3b0539e27b51..060565113784 100644
--- a/arch/arm64/boot/dts/qcom/lemans.dtsi
+++ b/arch/arm64/boot/dts/qcom/lemans.dtsi
@@ -624,6 +624,14 @@ reserved-memory {
#size-cells = <2>;
ranges;
+ audio_cma_mem: qcom,audio-ml {
+ compatible = "shared-dma-pool";
+ alloc-ranges = <0x0 0x00000000 0x0 0xffffffff>;
+ reusable;
+ alignment = <0x0 0x400000>;
+ size = <0x0 0x1000000>;
+ };
+
sail_ss_mem: sail-ss@80000000 {
reg = <0x0 0x80000000 0x0 0x10000000>;
no-map;
@@ -8134,6 +8142,7 @@ q6apmbedai: bedais {
q6apmdai: dais {
compatible = "qcom,q6apm-dais";
iommus = <&apps_smmu 0x3001 0x0>;
+ memory-region = <&audio_cma_mem>;
};
};
--
2.34.1
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH v1 1/2] arm64: dts: qcom: lemans: enable audio ML offload memory and SMMU mappings
2026-07-16 15:18 ` [PATCH v1 1/2] arm64: dts: qcom: lemans: enable audio ML offload memory and SMMU mappings Pratyush Meduri
@ 2026-07-16 15:32 ` sashiko-bot
2026-07-16 16:24 ` Konrad Dybcio
1 sibling, 0 replies; 6+ messages in thread
From: sashiko-bot @ 2026-07-16 15:32 UTC (permalink / raw)
To: Pratyush Meduri; +Cc: robh, devicetree, conor+dt
Thank you for your contribution! Sashiko AI review found 4 potential issue(s) to consider:
- [High] ML stream IDs are assigned to the wrong device node (`remoteproc_adsp`), causing Stage 1 SMMU translation faults when the DSP accesses CMA memory mapped by `q6apmdai`.
- [Medium] Adding the 'memory-region' property to the q6apmdai node violates the device tree binding schema.
- [Medium] Adding multiple stream IDs to the `iommus` property of `remoteproc_adsp` violates the `maxItems: 1` constraint inherited from the PAS common binding.
- [Low] The reserved-memory node name `qcom,audio-ml` improperly contains a vendor prefix and comma.
--
--- Patch [1]: [PATCH v1 1/2] arm64: dts: qcom: lemans: enable audio ML offload memory and SMMU mappings ---
commit ca6c69a94d584933404e0f4eb77272a1012439df
Author: Pratyush Meduri <pratyush.meduri@oss.qualcomm.com>
arm64: dts: qcom: lemans: enable audio ML offload memory and SMMU mappings
This commit adds a 16 MiB CMA region for audio ML offload and assigns it to
the q6apm DAIs node. It also adds new SMMU stream IDs to the remoteproc
ADSP node in the EL2 overlay to allow the DSP to access the buffers without
faulting.
> diff --git a/arch/arm64/boot/dts/qcom/lemans-el2.dtso b/arch/arm64/boot/dts/qcom/lemans-el2.dtso
> index 621ad930cf547..5b477346ef908 100644
> --- a/arch/arm64/boot/dts/qcom/lemans-el2.dtso
> +++ b/arch/arm64/boot/dts/qcom/lemans-el2.dtso
> @@ -19,7 +19,9 @@ &iris {
> };
>
> &remoteproc_adsp {
> - iommus = <&apps_smmu 0x3000 0x0>;
> + iommus = <&apps_smmu 0x3000 0x0>,
> + <&apps_smmu 0x3060 0x9>,
> + <&apps_smmu 0x3062 0x1>;
[Severity: Medium]
The common PAS schema for the adsp node
(Documentation/devicetree/bindings/remoteproc/qcom,pas-common.yaml)
restricts the iommus property to maxItems: 1. Does adding three items
here cause dtbs_check to fail?
[Severity: High]
Will placing the ML stream IDs on the remoteproc_adsp node result in SMMU
translation faults when the DSP accesses the CMA memory?
Because the memory-region is wired to the q6apmdai device later in this
patch, the ALSA driver will map the DMA buffer into q6apmdai's IOMMU
domain. However, remoteproc_adsp is a distinct platform device with its
own domain. If the DSP performs transactions using stream IDs 0x3060 and
0x3062, they will be translated by the remoteproc_adsp domain which lacks
the mappings for the CMA buffer.
> };
>
> &remoteproc_cdsp0 {
[ ... ]
> diff --git a/arch/arm64/boot/dts/qcom/lemans.dtsi b/arch/arm64/boot/dts/qcom/lemans.dtsi
> index 3b0539e27b519..0605651137846 100644
> --- a/arch/arm64/boot/dts/qcom/lemans.dtsi
> +++ b/arch/arm64/boot/dts/qcom/lemans.dtsi
> @@ -624,6 +624,14 @@ reserved-memory {
> #size-cells = <2>;
> ranges;
>
> + audio_cma_mem: qcom,audio-ml {
[Severity: Low]
The dtschema for reserved-memory nodes enforces a regex pattern that does
not permit commas (^[a-z0-9-]+(@[0-9a-f]+)?$). Could this vendor prefix and
comma in the node name trigger a dtc node-name-has-comma warning?
> + compatible = "shared-dma-pool";
> + alloc-ranges = <0x0 0x00000000 0x0 0xffffffff>;
> + reusable;
> + alignment = <0x0 0x400000>;
> + size = <0x0 0x1000000>;
> + };
> +
[ ... ]
> @@ -8134,6 +8142,7 @@ q6apmbedai: bedais {
> q6apmdai: dais {
> compatible = "qcom,q6apm-dais";
> iommus = <&apps_smmu 0x3001 0x0>;
> + memory-region = <&audio_cma_mem>;
[Severity: Medium]
Does the qcom,q6apm-dai binding allow the memory-region property?
Running dtbs_check might flag this as an error because the schema for
Documentation/devicetree/bindings/sound/qcom,q6apm-dai.yaml sets
additionalProperties: false and doesn't explicitly define memory-region.
> };
> };
>
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260716151854.3041914-1-pratyush.meduri@oss.qualcomm.com?part=1
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH v1 1/2] arm64: dts: qcom: lemans: enable audio ML offload memory and SMMU mappings
2026-07-16 15:18 ` [PATCH v1 1/2] arm64: dts: qcom: lemans: enable audio ML offload memory and SMMU mappings Pratyush Meduri
2026-07-16 15:32 ` sashiko-bot
@ 2026-07-16 16:24 ` Konrad Dybcio
1 sibling, 0 replies; 6+ messages in thread
From: Konrad Dybcio @ 2026-07-16 16:24 UTC (permalink / raw)
To: Pratyush Meduri, Bjorn Andersson, Konrad Dybcio, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: linux-arm-msm, devicetree, linux-kernel
On 7/16/26 5:18 PM, Pratyush Meduri wrote:
> The audio ML (machine-learning) offload use case requires a contiguous,
> physically addressable buffer shared with the audio DSP/SPF, and issues
> DMA transactions through additional SMMU stream IDs that are not
> covered by the existing ADSP mapping.
[...]
> arch/arm64/boot/dts/qcom/lemans-el2.dtso | 4 +++-
> arch/arm64/boot/dts/qcom/lemans.dtsi | 9 +++++++++
> 2 files changed, 12 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm64/boot/dts/qcom/lemans-el2.dtso b/arch/arm64/boot/dts/qcom/lemans-el2.dtso
> index 621ad930cf54..5b477346ef90 100644
> --- a/arch/arm64/boot/dts/qcom/lemans-el2.dtso
> +++ b/arch/arm64/boot/dts/qcom/lemans-el2.dtso
> @@ -19,7 +19,9 @@ &iris {
> };
>
> &remoteproc_adsp {
> - iommus = <&apps_smmu 0x3000 0x0>;
> + iommus = <&apps_smmu 0x3000 0x0>,
> + <&apps_smmu 0x3060 0x9>,
> + <&apps_smmu 0x3062 0x1>;
1. Does the Gunyah setup need any updates?
2. Are the existing SIDs wrong? Aren't they just used for other offloads
usecases?
> };
>
> &remoteproc_cdsp0 {
> diff --git a/arch/arm64/boot/dts/qcom/lemans.dtsi b/arch/arm64/boot/dts/qcom/lemans.dtsi
> index 3b0539e27b51..060565113784 100644
> --- a/arch/arm64/boot/dts/qcom/lemans.dtsi
> +++ b/arch/arm64/boot/dts/qcom/lemans.dtsi
> @@ -624,6 +624,14 @@ reserved-memory {
> #size-cells = <2>;
> ranges;
>
> + audio_cma_mem: qcom,audio-ml {
Node names *must not* contain commas and should be generic
> + compatible = "shared-dma-pool";
> + alloc-ranges = <0x0 0x00000000 0x0 0xffffffff>;
Is the last byte forbidden on purpose?
Konrad
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v1 2/2] arm64: dts: qcom: monaco: enable audio ML offload memory and SMMU mappings
2026-07-16 15:18 [PATCH v1 0/2] arm64: dts: qcom: enable audio ML offload Pratyush Meduri
2026-07-16 15:18 ` [PATCH v1 1/2] arm64: dts: qcom: lemans: enable audio ML offload memory and SMMU mappings Pratyush Meduri
@ 2026-07-16 15:18 ` Pratyush Meduri
2026-07-16 15:45 ` sashiko-bot
1 sibling, 1 reply; 6+ messages in thread
From: Pratyush Meduri @ 2026-07-16 15:18 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: linux-arm-msm, devicetree, linux-kernel
The audio ML (machine-learning) offload use case requires a contiguous,
physically addressable buffer shared with the audio DSP/SPF, and issues
DMA transactions through additional SMMU stream IDs that are not
covered by the existing ADSP mapping.
Add a dedicated reusable shared-dma-pool CMA region (16 MiB, 4 MiB
aligned) and wire it to the q6apm DAIs node via memory-region. A
dedicated pool guarantees the alignment and contiguity the DSP expects
and isolates these allocations from the default CMA region.
Under the EL2 (Gunyah/hypervisor) configuration the SMMU is fully
enforcing, so the ML transactions are otherwise blocked and faulted:
arm-smmu 15000000.iommu: Blocked unknown Stream ID 0x2060
arm-smmu 15000000.iommu: Blocked unknown Stream ID 0x2062
Add the ML-related stream IDs (0x3060 mask 0x9, 0x3062 mask 0x1) to the
remoteproc_adsp iommus property in the EL2 overlay so these buffers are
translated by the SMMU instead of being rejected.
Signed-off-by: Pratyush Meduri <pratyush.meduri@oss.qualcomm.com>
---
arch/arm64/boot/dts/qcom/monaco-el2.dtso | 4 +++-
arch/arm64/boot/dts/qcom/monaco.dtsi | 9 +++++++++
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/qcom/monaco-el2.dtso b/arch/arm64/boot/dts/qcom/monaco-el2.dtso
index a7e3270f8609..97bb8287cec3 100644
--- a/arch/arm64/boot/dts/qcom/monaco-el2.dtso
+++ b/arch/arm64/boot/dts/qcom/monaco-el2.dtso
@@ -17,7 +17,9 @@ &iris {
};
&remoteproc_adsp {
- iommus = <&apps_smmu 0x2000 0x0>;
+ iommus = <&apps_smmu 0x2000 0x0>,
+ <&apps_smmu 0x2060 0x9>,
+ <&apps_smmu 0x2062 0x1>;
};
&remoteproc_cdsp {
diff --git a/arch/arm64/boot/dts/qcom/monaco.dtsi b/arch/arm64/boot/dts/qcom/monaco.dtsi
index 64fc0d592282..d971c0ea1b30 100644
--- a/arch/arm64/boot/dts/qcom/monaco.dtsi
+++ b/arch/arm64/boot/dts/qcom/monaco.dtsi
@@ -729,6 +729,14 @@ reserved-memory {
#size-cells = <2>;
ranges;
+ audio_cma_mem: qcom,audio-ml {
+ compatible = "shared-dma-pool";
+ alloc-ranges = <0x0 0x00000000 0x0 0xffffffff>;
+ reusable;
+ alignment = <0x0 0x400000>;
+ size = <0x0 0x1000000>;
+ };
+
aop_image_mem: aop-image-region@90800000 {
reg = <0x0 0x90800000 0x0 0x60000>;
no-map;
@@ -2844,6 +2852,7 @@ q6apmbedai: bedais {
q6apmdai: dais {
compatible = "qcom,q6apm-dais";
iommus = <&apps_smmu 0x2001 0x0>;
+ memory-region = <&audio_cma_mem>;
};
};
--
2.34.1
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH v1 2/2] arm64: dts: qcom: monaco: enable audio ML offload memory and SMMU mappings
2026-07-16 15:18 ` [PATCH v1 2/2] arm64: dts: qcom: monaco: " Pratyush Meduri
@ 2026-07-16 15:45 ` sashiko-bot
0 siblings, 0 replies; 6+ messages in thread
From: sashiko-bot @ 2026-07-16 15:45 UTC (permalink / raw)
To: Pratyush Meduri; +Cc: conor+dt, robh, devicetree
Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
- [High] The newly added `memory-region` for `audio_cma_mem` will be silently ignored because the `qcom,q6apm-dais` driver does not invoke `of_reserved_mem_device_init()`.
- [Medium] The commit message incorrectly references stream IDs `0x3060` and `0x3062`, while the code and the included error logs implement `0x2060` and `0x2062`.
- [Low] The reserved-memory child node name `qcom,audio-ml` incorrectly uses a vendor prefix and comma, violating standard node naming conventions and schema bindings.
--
--- Patch [2]: [PATCH v1 2/2] arm64: dts: qcom: monaco: enable audio ML offload memory and SMMU mappings ---
commit d4559ccd650e9d04eb0b0b1f98b8e965dd7cd910
Author: Pratyush Meduri <pratyush.meduri@oss.qualcomm.com>
arm64: dts: qcom: monaco: enable audio ML offload memory and SMMU mappings
This patch adds a dedicated 16 MiB shared-dma-pool CMA region for audio ML
offload and connects it to the q6apm DAIs node. It also updates the EL2
overlay to include the ML-related stream IDs so the SMMU translates rather
than blocks these transactions.
> Add the ML-related stream IDs (0x3060 mask 0x9, 0x3062 mask 0x1) to the
> remoteproc_adsp iommus property in the EL2 overlay so these buffers are
> translated by the SMMU instead of being rejected.
[Severity: Medium]
This isn't a bug in the code, but there appears to be a typo in the commit
message. The text references stream IDs 0x3060 and 0x3062, while the code
and the included dmesg logs correctly use 0x2060 and 0x2062. Should the
commit message be updated to match the implementation?
> diff --git a/arch/arm64/boot/dts/qcom/monaco-el2.dtso b/arch/arm64/boot/dts/qcom/monaco-el2.dtso
> index a7e3270f86090..97bb8287cec33 100644
> --- a/arch/arm64/boot/dts/qcom/monaco-el2.dtso
> +++ b/arch/arm64/boot/dts/qcom/monaco-el2.dtso
[ ... ]
> diff --git a/arch/arm64/boot/dts/qcom/monaco.dtsi b/arch/arm64/boot/dts/qcom/monaco.dtsi
> index 64fc0d592282c..d971c0ea1b302 100644
> --- a/arch/arm64/boot/dts/qcom/monaco.dtsi
> +++ b/arch/arm64/boot/dts/qcom/monaco.dtsi
> @@ -729,6 +729,14 @@ reserved-memory {
> #size-cells = <2>;
> ranges;
>
> + audio_cma_mem: qcom,audio-ml {
[Severity: Low]
Does this node name violate standard device tree naming conventions? Using a
vendor prefix and a comma in the node name (qcom,audio-ml) typically causes
dt_binding_check validation failures.
Standard reserved-memory schemas strictly expect child node names to match
generic patterns like memory, pool, shared-dma-pool, or cma. Should this be
named something generic like audio-ml-cma?
> + compatible = "shared-dma-pool";
> + alloc-ranges = <0x0 0x00000000 0x0 0xffffffff>;
> + reusable;
> + alignment = <0x0 0x400000>;
> + size = <0x0 0x1000000>;
> + };
> +
[ ... ]
> @@ -2844,6 +2852,7 @@ q6apmbedai: bedais {
> q6apmdai: dais {
> compatible = "qcom,q6apm-dais";
> iommus = <&apps_smmu 0x2001 0x0>;
> + memory-region = <&audio_cma_mem>;
[Severity: High]
Will this memory-region actually be utilized by the driver?
Looking at the driver probe routine in sound/soc/qcom/qdsp6/q6apm-dai.c,
q6apm_dai_probe() does not appear to call of_reserved_mem_device_init().
Without that initialization, the driver will silently fall back to allocating
from the default CMA pool instead of using this dedicated 16 MiB region.
This seems like it would waste the reserved 16 MiB of RAM and defeat the
patch's goal of isolating allocations to guarantee contiguity, potentially
breaking the ML offload feature when the default CMA pool fragments.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260716151854.3041914-1-pratyush.meduri@oss.qualcomm.com?part=2
^ permalink raw reply [flat|nested] 6+ messages in thread