[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240717084713.GG5630@unreal>
Date: Wed, 17 Jul 2024 11:47:13 +0300
From: Leon Romanovsky <leon@...nel.org>
To: Christoph Hellwig <hch@....de>
Cc: Robin Murphy <robin.murphy@....com>, Joerg Roedel <joro@...tes.org>,
Will Deacon <will@...nel.org>,
Marek Szyprowski <m.szyprowski@...sung.com>,
Easwar Hariharan <eahariha@...ux.microsoft.com>,
linux-kernel@...r.kernel.org, iommu@...ts.linux.dev,
Jason Gunthorpe <jgg@...dia.com>
Subject: Re: [PATCH v1 2/2] dma: Add IOMMU static calls with clear default ops
On Wed, Jul 17, 2024 at 10:21:45AM +0200, Christoph Hellwig wrote:
> dma_is_default_iommu still looks a bit odd to me - basically we have
> the ops structure just to say to bypass it. Why not add a single-bit
> dma_iommu field to struct device next to dma_ops_bypass to skip it?
It will cause to the situation where "struct device" memory footprint
will increase, while we still need to keep dma_ops for archs that don't
want to use default IOMMU.
Because dma_ops pointer exists anyway and has already specific flags. I
decided to take evolutive approach and add a new flag to it, instead of
revolutionary approach and add a new field to struct device.
> Then IOMMU_DMA also does not need to select DMA_OPS any more, which
> would be kinda silly with the direct calls.
I didn't know how far to go with that, as default IOMMU .flags are
unique and can be removed if dma_iommu bit is set.
Thanks
Powered by blists - more mailing lists