[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240713051813.GA25733@lst.de>
Date: Sat, 13 Jul 2024 07:18:13 +0200
From: Christoph Hellwig <hch@....de>
To: Robin Murphy <robin.murphy@....com>
Cc: Leon Romanovsky <leon@...nel.org>, Christoph Hellwig <hch@....de>,
Joerg Roedel <joro@...tes.org>, Will Deacon <will@...nel.org>,
Marek Szyprowski <m.szyprowski@...sung.com>,
Jason Gunthorpe <jgg@...dia.com>, linux-kernel@...r.kernel.org,
iommu@...ts.linux.dev
Subject: Re: [PATCH 2/2] dma: Add IOMMU static calls with clear default ops
On Fri, Jul 12, 2024 at 03:21:55PM +0100, Robin Murphy wrote:
>> This is done to keep layering similar to existing in DMA subsystem. We
>> have special files and calls to dma-direct, it looks natural to have
>> special files and call to dma-iommu. It is not nice to call to drivers/iommu
>> from kernel/dma/mapping.c
>
> That's where I firmly disagree. In the DMA API aspect, iommu-dma is exactly
> a peer of dma-direct,
Exactly.
> however it lives in drivers/iommu for practical
> reasons because it's more closely coupled to IOMMU API internals in all
> other aspects of its implementation.
TBH I think kernel/dma/ would be the better place. But that's really the
least my concernes at the moment.
But the important point is that I would really prefer to avoid another
magic layer - just do direct calls like for dma-direct to keep it
understandable (and probably faster).
Powered by blists - more mailing lists