Re: [RFC 06/20] iommu: Add iommu_device_init[exit]_user_dma interfaces
From: Jason Gunthorpe
Date: Tue Sep 28 2021 - 07:57:57 EST
On Tue, Sep 28, 2021 at 07:30:41AM +0000, Tian, Kevin wrote:
> > Also, don't call it "hint", there is nothing hinty about this, it has
> > definitive functional impacts.
> possibly dma_mode (too broad?) or dma_usage
You just need a flag to specify if the driver manages DMA ownership
itself, or if it requires the driver core to setup kernel ownership
There is a bool 'suprress_bind_attrs' already so it could be done like
/* If set the driver must call iommu_XX as the first action in probe() */
Which is pretty low cost.