Devicetree
 help / color / mirror / Atom feed
From: Vinayak Katoch <vinayak.katoch@oss.qualcomm.com>
To: Srinivas Kandagatla <srini@kernel.org>,
	Ekansh Gupta <ekansh.gupta@oss.qualcomm.com>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>, Arnd Bergmann <arnd@arndb.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konradybcio@kernel.org>
Cc: Bharath Kumar <bkumar@qti.qualcomm.com>,
	Chenna Kesava Raju <chennak@qti.qualcomm.com>,
	linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	Vinayak Katoch <vinayak.katoch@oss.qualcomm.com>
Subject: [PATCH 0/6] misc: fastrpc: Add extended IOVA mapping support
Date: Wed, 26 Aug 2026 19:15:42 +0530	[thread overview]
Message-ID: <20260826-extended-mapping-v1-0-d046c1cb9a9f@oss.qualcomm.com> (raw)

FastRPC context banks on kaanapali and glymur are limited to a 34-bit
IOVA window. Large compute workloads such as LLM inference on the
CDSP require mapping buffers that exceed this range. Dedicated extended
context banks exist in hardware but were unused by the driver.

This series wires up end-to-end support for extended IOVA mapping:

- The DT binding gains a memory-region property for context bank nodes.
  It points to a reserved-memory node whose iommu-addresses blocks the
  lower IOVA range, pushing allocations into the extended address space.
  The driver uses the presence of this property to identify the context
  bank as an extended mapping bank. The binding also relaxes
  #address-cells and #size-cells constraints to accommodate the 64-bit
  values required by iommu-addresses.

- The driver is extended to read the correct SID from multi-cell reg
  properties, which are needed on platforms that use #address-cells = <2>
  on the fastrpc node.

- kaanapali and glymur are updated to add a fastrpc_far_region node
  blocking the lower 16 GB IOVA range and link the dedicated CDSP
  compute context bank to it via memory-region.

- Extended context banks are shared across all open sessions and carry
  a 40-bit DMA mask. They are kept in a separate cctx->ext_cb[] array
  rather than the normal session[] pool to avoid mixing exclusively-owned
  and shared resources.

- Two new UAPI flags (FASTRPC_MAP_FD_EXTENDED and
  FASTRPC_MAP_FD_DELAYED_EXTENDED) allow userspace to request extended
  mapping. When set, fastrpc_map_attach() iterates cctx->ext_cb[] and
  retries on -ENOMEM, falling over to the next extended CB if one
  exhausts its IOVA space. The SID offset is corrected per-CB so the
  IOVA forwarded to the DSP is valid.

Signed-off-by: Vinayak Katoch <vinayak.katoch@oss.qualcomm.com>
---
Vinayak Katoch (6):
      dt-bindings: misc: fastrpc: Add memory-region property for context bank
      misc: fastrpc: Handle multi-cell reg in context bank probe
      arm64: dts: qcom: kaanapali: Add CDSP FastRPC extended context bank
      arm64: dts: qcom: glymur: Add CDSP FastRPC extended context bank
      misc: fastrpc: Add extended context bank support
      misc: fastrpc: Add UAPI flags for extended IOVA mapping

 .../devicetree/bindings/misc/qcom,fastrpc.yaml     |  12 ++-
 arch/arm64/boot/dts/qcom/glymur.dtsi               |  37 ++++---
 arch/arm64/boot/dts/qcom/kaanapali.dtsi            |  35 ++++---
 drivers/misc/fastrpc.c                             | 114 ++++++++++++++++++---
 include/uapi/misc/fastrpc.h                        |   7 ++
 5 files changed, 159 insertions(+), 46 deletions(-)
---
base-commit: a8406e6c0b793ce0788019683837c40855b55995
change-id: 20260826-extended-mapping-9b08b0c3108d
prerequisite-change-id: 20260609-dup-sessions-ea2acaac1994:v4
prerequisite-patch-id: 15f76eb917232e683ce9271fb3f0f465a4d60abe
prerequisite-patch-id: f225961fa033cae9dce14a906752e1232b052290
prerequisite-patch-id: da0a3d55397a522ea4b77769e387df9faea8e024

Best regards,
-- 
Vinayak Katoch <vinayak.katoch@oss.qualcomm.com>


             reply	other threads:[~2026-08-26 13:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-26 13:45 Vinayak Katoch [this message]
2026-08-26 13:45 ` [PATCH 1/6] dt-bindings: misc: fastrpc: Add memory-region property for context bank Vinayak Katoch
2026-08-26 13:45 ` [PATCH 2/6] misc: fastrpc: Handle multi-cell reg in context bank probe Vinayak Katoch
2026-08-26 13:45 ` [PATCH 3/6] arm64: dts: qcom: kaanapali: Add CDSP FastRPC extended context bank Vinayak Katoch
2026-08-26 13:45 ` [PATCH 4/6] arm64: dts: qcom: glymur: " Vinayak Katoch
2026-08-26 13:45 ` [PATCH 5/6] misc: fastrpc: Add extended context bank support Vinayak Katoch
2026-08-26 13:45 ` [PATCH 6/6] misc: fastrpc: Add UAPI flags for extended IOVA mapping Vinayak Katoch

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=20260826-extended-mapping-v1-0-d046c1cb9a9f@oss.qualcomm.com \
    --to=vinayak.katoch@oss.qualcomm.com \
    --cc=andersson@kernel.org \
    --cc=arnd@arndb.de \
    --cc=bkumar@qti.qualcomm.com \
    --cc=chennak@qti.qualcomm.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=ekansh.gupta@oss.qualcomm.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=konradybcio@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=srini@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