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

From: Vinayak Katoch

Date: Wed Oct 07 2026 - 08:09:20 EST


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.

Signed-off-by: Vinayak Katoch <vinayak.katoch@xxxxxxxxxxxxxxxx>
---
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/20260826-extended-mapping-v1-0-d046c1cb9a9f@xxxxxxxxxxxxxxxx

---
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,
--
Vinayak Katoch <vinayak.katoch@xxxxxxxxxxxxxxxx>