Re: [PATCH] dma-iommu: Introduce API to reserve IOVA regions for dynamically created devices

From: Jason Gunthorpe

Date: Mon Jun 15 2026 - 08:53:08 EST


On Mon, Jun 15, 2026 at 12:26:25PM +0530, Vikash Garodia wrote:

> To handle such case, we create the device dynamically and associated the
> distinct IOVA range to them,via the api introduced in this patch.
> This was prototyped in recent SOC here [1]
>
> [1] https://lore.kernel.org/linux-media/20260313-kaanapali-iris-v3-1-9c0d1a67af4b@xxxxxxxxxxxxxxxx/

Well, I'm not enthused by this:

+static int iris_vpu_bus_dma_configure(struct device *dev)
+{
+ struct iris_context_bank *cb = dev_get_drvdata(dev);
+
+ if (!cb)
+ return -ENODEV;
+
+ return of_dma_configure_id(dev, dev->parent->of_node, true, &cb->f_id);
+}

A custom bus and then calling configure_id on the parent which would
have already called of_dma_configure on that same of_node seems very
hacky to me.

Jason