From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
To: Vishnu Santhosh <vishnu.santhosh@oss.qualcomm.com>,
Vinod Koul <vkoul@kernel.org>, Frank Li <Frank.Li@kernel.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Andy Gross <agross@kernel.org>,
Bjorn Andersson <andersson@kernel.org>
Cc: linux-arm-msm@vger.kernel.org, dmaengine@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
chris.lew@oss.qualcomm.com,
Deepak Kumar Singh <deepak.singh@oss.qualcomm.com>
Subject: Re: [PATCH 2/2] dmaengine: qcom: bam_dma: SCM-assign descriptor FIFOs to a remote VMID
Date: Thu, 23 Jul 2026 15:37:05 +0200 [thread overview]
Message-ID: <fb8d3a44-0792-4420-aee6-e7559eb9ab70@oss.qualcomm.com> (raw)
In-Reply-To: <20260714-qcom-bam-dma-vmid-ext-v1-2-cef87c57b7dc@oss.qualcomm.com>
On 7/14/26 7:00 AM, Vishnu Santhosh wrote:
> On Qualcomm SoCs where the BAM is powered by a remote processor that
> enforces XPU access control (e.g. the mDSP on Shikra, VMID 43 / NAV),
> the BAM reads the descriptor FIFO as an AXI master under the remote
> execution environment. Without an SCM grant for the remote VMID, the
> first descriptor enqueue faults with an XPU violation.
[...]
> + ret = of_property_read_u32_array(dev->of_node, "qcom,vmid",
> + bdev->vmids, n);
> + if (ret)
> + return ret;
> +
> + for (i = 0; i < n; i++) {
> + if (bdev->vmids[i] == QCOM_SCM_VMID_HLOS) {
> + dev_err(dev, "qcom,vmid must not include HLOS (%u)\n",
> + QCOM_SCM_VMID_HLOS);
> + return -EINVAL;
> + }
> + }
Please switch to device_property_ instead
[...]
> +static int bam_assign_fifo(struct bam_device *bdev, struct bam_chan *bchan)
> +{
> + struct qcom_scm_vmperm *dst __free(kfree) = NULL;
> + u64 src = BIT_ULL(QCOM_SCM_VMID_HLOS);
> + int i, ret;
> +
> + if (!bdev->num_vmids)
> + return 0;
> +
> + dst = kcalloc(bdev->num_vmids + 1, sizeof(*dst), GFP_KERNEL);
> + if (!dst)
> + return -ENOMEM;
Please reshuffle this to follow
7c4c14ad3d8c ("tee: qcomtee: mem: Fix confusing cleanup.h syntax")
Konrad
prev parent reply other threads:[~2026-07-23 13:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-14 5:00 [PATCH 0/2] dmaengine: qcom: bam_dma: SCM-assign descriptor FIFOs to a remote VMID Vishnu Santhosh
2026-07-14 5:00 ` [PATCH 1/2] dt-bindings: dma: qcom,bam-dma: Add optional qcom,vmid property Vishnu Santhosh
2026-07-22 15:33 ` Rob Herring (Arm)
2026-07-14 5:00 ` [PATCH 2/2] dmaengine: qcom: bam_dma: SCM-assign descriptor FIFOs to a remote VMID Vishnu Santhosh
2026-07-14 5:16 ` sashiko-bot
2026-07-23 13:37 ` Konrad Dybcio [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=fb8d3a44-0792-4420-aee6-e7559eb9ab70@oss.qualcomm.com \
--to=konrad.dybcio@oss.qualcomm.com \
--cc=Frank.Li@kernel.org \
--cc=agross@kernel.org \
--cc=andersson@kernel.org \
--cc=chris.lew@oss.qualcomm.com \
--cc=conor+dt@kernel.org \
--cc=deepak.singh@oss.qualcomm.com \
--cc=devicetree@vger.kernel.org \
--cc=dmaengine@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh@kernel.org \
--cc=vishnu.santhosh@oss.qualcomm.com \
--cc=vkoul@kernel.org \
/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