Re: [PATCH 2/2] dma: Add IOMMU static calls with clear default ops
From: Easwar Hariharan
Date: Thu Jul 11 2024 - 14:17:46 EST
On 7/11/2024 3:38 AM, Leon Romanovsky wrote:
> From: Leon Romanovsky <leonro@xxxxxxxxxx>
>
> 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?
> 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@xxxxxxxxxx>
> ---
> 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>