mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Vishnu Santhosh <vishnu.santhosh@oss.qualcomm.com>
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: Mon, 26 Oct 2026 08:05:59 -0500	[thread overview]
Message-ID: <20261026130559.GB3598537-robh@kernel.org> (raw)
In-Reply-To: <adffece9-165b-4576-b111-6aa40a443734@oss.qualcomm.com>

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.

> 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.


> 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.

Rob

  reply	other threads:[~2026-10-26 13:06 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 [this message]
2026-10-27  6:22       ` Vishnu Santhosh

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=20261026130559.GB3598537-robh@kernel.org \
    --to=robh@kernel.org \
    --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=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

all inboxes | Powered by JetHome®