Skip to content

misc: fastrpc: add extended IOVA mapping support

Vinayak Katoch dri-devel linux-arm-msm linux-devicetree lkml 2 versions – In review

Get series with b4
b4 am [email protected] change-id 20260826-extended-mapping-9b08b0c3108d

Versions newest first

  1. v2 Latest4 patches 4 repliesIn review
  2. v16 patches 3 repliesSuperseded

Changes in v2 from the cover letter

- Split DTS changes (kaanapali, glymur) into a separate series.
- Fix DT binding to allow iommu-ranges on compute-cb subnodes.
- Fix krealloc() called with GFP_KERNEL under spinlock.
- Fix dma_set_mask() error path leaving stale ext_cb entry.
- Fix ext_cb sessions not invalidated in fastrpc_cb_devices_destroy().
- Fix lockless read of ext_cb[]/ext_cb_count in fastrpc_map_attach().
- Fix fastrpc_free_map() using fl->sctx->dev for extended-CB maps.
- Fix fastrpc_map_create() reusing a cached map with mismatched CB flags.
- Link to v1: https://lore.kernel.org/r/[email protected]

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4dt-bindings: misc: qcom,fastrpc: add iommu-ranges support for context bankDocumentation/devicetree/bindings/misc/qcom,fastrpc.yaml+4 -24 replies
2/4misc: fastrpc: handle multi-cell reg in context bank probedrivers/misc/fastrpc.c+2 -10 replies
3/4misc: fastrpc: add extended context bank supportdrivers/misc/fastrpc.c+46 -00 replies
4/4misc: fastrpc: add UAPI flags for extended IOVA mappingdrivers/misc/fastrpc.c include/uapi/misc/fastrpc.h+71 -190 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/4] misc: fastrpc: add extended IOVA mapping support

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 driver and binding support:

- Relax the DT binding to allow 64-bit iommu-ranges values on platforms that require extended addressing.

- Fix SID extraction to read the correct cell of the reg property on platforms with #address-cells = <2>.

- Detect extended context banks by the presence of iommu-ranges and register them separately so large allocations can be directed into the wider IOVA window.

- Add two UAPI flags (FASTRPC_MAP_FD_EXTENDED and FASTRPC_MAP_FD_DELAYED_EXTENDED) so userspace can explicitly request mapping via an extended CB.

---
Changes in v2:
- Split DTS changes (kaanapali, glymur) into a separate series.
- Fix DT binding to allow iommu-ranges on compute-cb subnodes.
- Fix krealloc() called with GFP_KERNEL under spinlock.
- Fix dma_set_mask() error path leaving stale ext_cb entry.
- Fix ext_cb sessions not invalidated in fastrpc_cb_devices_destroy().
- Fix lockless read of ext_cb[]/ext_cb_count in fastrpc_map_attach().
- Fix fastrpc_free_map() using fl->sctx->dev for extended-CB maps.
- Fix fastrpc_map_create() reusing a cached map with mismatched CB flags.
- Link to v1: https://lore.kernel.org/r/[email protected]

---
Vinayak Katoch (4):
dt-bindings: misc: qcom,fastrpc: add iommu-ranges support for context bank
misc: fastrpc: handle multi-cell reg in context bank probe
misc: fastrpc: add extended context bank support
misc: fastrpc: add UAPI flags for extended IOVA mapping

 .../devicetree/bindings/misc/qcom,fastrpc.yaml     |   6 +-
 drivers/misc/fastrpc.c                             | 132 +++++++++++++++++----
 include/uapi/misc/fastrpc.h                        |   7 ++
 3 files changed, 123 insertions(+), 22 deletions(-)

---
base-commit: 5c4d4169604b335c38bbc79bc1fc03042981fc6f
change-id: 20260826-extended-mapping-9b08b0c3108d
prerequisite-change-id: 20260609-dup-sessions-ea2acaac1994:v5
prerequisite-patch-id: 425dc9414848bbc3f2a053d067195d849898e2ae
prerequisite-patch-id: 4fea14b47d11a5a3e18065d8cf3a461841ee2b86
prerequisite-patch-id: da0a3d55397a522ea4b77769e387df9faea8e024

Best regards,

Signature · 1 line
Vinayak Katoch <[email protected]>