[PATCH v3] iommu/rockchip: Add missing set_platform_dma_ops callback

Jason Gunthorpe jgg at nvidia.com
Thu Mar 30 08:34:35 PDT 2023


On Thu, Mar 30, 2023 at 04:09:03PM +0100, Robin Murphy wrote:

> > +static struct iommu_domain_ops rk_identity_ops = {
> > +	.attach_dev = rk_iommu_identity_attach,
> 
> Since it's going to behave like a regular identity domain and be treated as
> one, it needs to support .free as well.

It would be nice to provide some

static void iommu_domain_static_free(struct iommu_domain *){}

Or adjust the core code so NULL is OK..

I think this pattern of static singleton will be popular. I drafted a
patch for the DART driver like this too

Thanks,
Jason



More information about the Linux-rockchip mailing list