mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Vishnu Santhosh <vishnu.santhosh@oss.qualcomm.com>
To: Rob Herring <robh@kernel.org>
Cc: Vinod Koul <vkoul@kernel.org>, Frank Li <Frank.Li@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Andy Gross <agross@kernel.org>,
	Bjorn Andersson <andersson@kernel.org>,
	linux-arm-msm@vger.kernel.org, dmaengine@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	Deepak Kumar Singh <deepak.singh@oss.qualcomm.com>
Subject: Re: [PATCH v3] dt-bindings: dma: qcom,bam-dma: Allow memory-region property
Date: Tue, 27 Oct 2026 11:52:11 +0530	[thread overview]
Message-ID: <92dc14f4-edf3-4112-88d3-1b93aac677a8@oss.qualcomm.com> (raw)
In-Reply-To: <20261026130559.GB3598537-robh@kernel.org>


On 26-10-2026 06:35 pm, Rob Herring wrote:
> On Fri, Oct 23, 2026 at 12:05:50PM +0530, Vishnu Santhosh wrote:
>> On 22-10-2026 07:31 pm, Rob Herring wrote:
>>> On Wed, Oct 21, 2026 at 11:22:35AM +0530, Vishnu Santhosh wrote:
>>>> Some Qualcomm SoCs, such as Shikra, run the modem in a separate security
>>>> domain, preventing it from accessing BAM descriptor FIFOs allocated from
>>>> arbitrary host memory.
>>>>
>>>> Add an optional memory-region property to constrain DMA allocations made
>>>> by the BAM DMA controller to a restricted DMA pool. Access permissions
>>>> for the remote execution environment are managed separately.
>>> dma-ranges is normally how address restrictions for a device are
>>> defined. Why can't that be used here?
>>>
>>> Rob
>> The constraint here is access permission, not addressing. The modem can
>> only access a carve-out that is assigned to it through SCM.
> The reason for the constraint doesn't really matter.

Ok, understood.

>
>> The soc bus on Shikra already has an identity dma-ranges covering
>> 64GB [1], so there is no addressing limitation to describe. dma-ranges
>> does not reserve memory, so allocations would still come from the
>> general page allocator, outside the assigned carve-out, and modem
>> accesses to them trigger an XPU violation. It also applies to every
>> device on the bus.
> It's a bit awkward that dma-ranges needs to be in a parent node. So you
> would need to put the device in its own bus node. But if dma-ranges is
> in place, DMA allocations will only come from within that range.

Thanks for the correction.

>
>
>> The A2 BAM on Shikra is not behind an IOMMU. restricted-dma-pool
>> provides a dedicated, per-device region, which is the setup it was
>> introduced for no IOMMU, with firmware restricting device accesses to
>> specific regions [2]. Stephan suggested this approach on v1 of the
>> BAM-DMUX series [3]. The BAM DMA controller and BAM-DMUX reference the
>> same pool, so a single assignment covers both the descriptor FIFOs and
>> the data buffers.
> I suppose that since the memory region is dynamic, 'memory-region' makes
> sense here. If firmware determined the address of the region, I'd
> probably feel differently.

Yes, the region is dynamic. Thanks for the review.

Vishnu


      reply	other threads:[~2026-10-27  6:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-21  5:52 Vishnu Santhosh
2026-10-22 14:01 ` Rob Herring
2026-10-23  6:35   ` Vishnu Santhosh
2026-10-26 13:05     ` Rob Herring
2026-10-27  6:22       ` Vishnu Santhosh [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=92dc14f4-edf3-4112-88d3-1b93aac677a8@oss.qualcomm.com \
    --to=vishnu.santhosh@oss.qualcomm.com \
    --cc=Frank.Li@kernel.org \
    --cc=agross@kernel.org \
    --cc=andersson@kernel.org \
    --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=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

all inboxes | Powered by JetHome®