From: Leon Romanovsky <leon@kernel.org>
To: Christoph Hellwig <hch@lst.de>
Cc: Robin Murphy <robin.murphy@arm.com>,
Joerg Roedel <joro@8bytes.org>, Will Deacon <will@kernel.org>,
Marek Szyprowski <m.szyprowski@samsung.com>,
Easwar Hariharan <eahariha@linux.microsoft.com>,
linux-kernel@vger.kernel.org, iommu@lists.linux.dev,
Jason Gunthorpe <jgg@nvidia.com>
Subject: Re: [PATCH v1 2/2] dma: Add IOMMU static calls with clear default ops
Date: Wed, 17 Jul 2024 11:47:13 +0300 [thread overview]
Message-ID: <20240717084713.GG5630@unreal> (raw)
In-Reply-To: <20240717082145.GA15484@lst.de>
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
next prev parent reply other threads:[~2024-07-17 8:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-15 11:44 [PATCH v1 0/2] DMA IOMMU static calls Leon Romanovsky
2024-07-15 11:44 ` [PATCH v1 1/2] dma: call unconditionally to unmap_page and unmap_sg callbacks Leon Romanovsky
2024-07-15 11:44 ` [PATCH v1 2/2] dma: Add IOMMU static calls with clear default ops Leon Romanovsky
2024-07-17 8:21 ` Christoph Hellwig
2024-07-17 8:47 ` Leon Romanovsky [this message]
2024-07-17 8:56 ` Christoph Hellwig
2024-07-17 9:53 ` Leon Romanovsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240717084713.GG5630@unreal \
--to=leon@kernel.org \
--cc=eahariha@linux.microsoft.com \
--cc=hch@lst.de \
--cc=iommu@lists.linux.dev \
--cc=jgg@nvidia.com \
--cc=joro@8bytes.org \
--cc=linux-kernel@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=robin.murphy@arm.com \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.