Re: [PATCH 2/3] iommu/dma: Move public interfaces to linux/iommu.h

2022-09-02 Thread Catalin Marinas
On Tue, Aug 16, 2022 at 06:28:04PM +0100, Robin Murphy wrote:
> The iommu-dma layer is now mostly encapsulated by iommu_dma_ops, with
> only a couple more public interfaces left pertaining to MSI integration.
> Since these depend on the main IOMMU API header anyway, move their
> declarations there, taking the opportunity to update the half-baked
> comments to proper kerneldoc along the way.
> 
> Signed-off-by: Robin Murphy 
> ---
> 
> Note that iommu_setup_dma_ops() should also become internal in a future
> phase of the great IOMMU API upheaval - for now as the last bit of true
> arch code glue I consider it more "necessarily exposed" than "public".
> 
>  arch/arm64/mm/dma-mapping.c   |  2 +-

And here:

Acked-by: Catalin Marinas 


Re: [PATCH 2/3] iommu/dma: Move public interfaces to linux/iommu.h

2022-08-22 Thread Robin Murphy

On 2022-08-22 12:21, Christoph Hellwig wrote:

diff --git a/include/linux/iommu.h b/include/linux/iommu.h
index 70393fbb57ed..79cb6eb560a8 100644
--- a/include/linux/iommu.h
+++ b/include/linux/iommu.h
@@ -1059,4 +1059,40 @@ void iommu_debugfs_setup(void);
  static inline void iommu_debugfs_setup(void) {}
  #endif
  
+#ifdef CONFIG_IOMMU_DMA

+#include 


I don't think msi.h is actually needed here.

Just make the struct msi_desc and struct msi_msg forward declarations
unconditional and we should be fine.


dma-iommu.c still needs to pick up msi.h for the actual definitions 
somehow, so it seemed logical to keep things the same shape as before. 
However I don't have a particularly strong preference either way.


Thanks,
Robin.


Re: [PATCH 2/3] iommu/dma: Move public interfaces to linux/iommu.h

2022-08-17 Thread Marc Zyngier
On Tue, 16 Aug 2022 18:28:04 +0100,
Robin Murphy  wrote:
> 
> The iommu-dma layer is now mostly encapsulated by iommu_dma_ops, with
> only a couple more public interfaces left pertaining to MSI integration.
> Since these depend on the main IOMMU API header anyway, move their
> declarations there, taking the opportunity to update the half-baked
> comments to proper kerneldoc along the way.
> 
> Signed-off-by: Robin Murphy 
> ---
> 
> Note that iommu_setup_dma_ops() should also become internal in a future
> phase of the great IOMMU API upheaval - for now as the last bit of true
> arch code glue I consider it more "necessarily exposed" than "public".
> 
>  arch/arm64/mm/dma-mapping.c   |  2 +-
>  drivers/iommu/dma-iommu.c | 15 ++--
>  drivers/irqchip/irq-gic-v2m.c |  2 +-
>  drivers/irqchip/irq-gic-v3-its.c  |  2 +-
>  drivers/irqchip/irq-gic-v3-mbi.c  |  2 +-
>  drivers/irqchip/irq-ls-scfg-msi.c |  2 +-
>  drivers/vfio/vfio_iommu_type1.c   |  1 -
>  include/linux/dma-iommu.h | 40 ---
>  include/linux/iommu.h | 36 
>  9 files changed, 54 insertions(+), 48 deletions(-)

For the irqchip side:

Acked-by: Marc Zyngier 

M.

-- 
Without deviation from the norm, progress is not possible.