Re: [PATCH 2/2] dma: Add IOMMU static calls with clear default ops

Leon Romanovsky
2024-07-11T18:45:11Z

On Thu, Jul 11, 2024 at 11:17:28AM -0700, Easwar Hariharan wrote:
> On 7/11/2024 3:38 AM, Leon Romanovsky wrote:
> > From: Leon Romanovsky <leonro@nvidia.com>
> >
> > Most of the IOMMU drivers are using the same DMA operations, which are
> > default ones implemented in drivers/iomem/dma-iomem.c. So it makes sense
>
> s/iomem/iommu?

Thanks, will fix it.

>
> > to properly set them as a default with direct call without need to
> > perform function pointer dereference.
> >
> > During system initialization, the IOMMU driver can set its own DMA and
> > in such case, the default DMA operations will be overridden.
> >
> > Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
> > ---
> > MAINTAINERS | 1 +
> > drivers/iommu/dma-iommu.c | 24 +++++++-------
> > include/linux/iommu-dma.h | 50 +++++++++++++++++++++++++++++
> > kernel/dma/iommu.h | 67 +++++++++++++++++++++++++++++++++++++++
> > kernel/dma/mapping.c | 9 +++---
> > 5 files changed, 134 insertions(+), 17 deletions(-)
> > create mode 100644 include/linux/iommu-dma.h
> > create mode 100644 kernel/dma/iommu.h
> >
>
> <snip>