All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: "T.J. Mercier" <tjmercier@google.com>
Cc: Christoph Hellwig <hch@lst.de>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	Robin Murphy <robin.murphy@arm.com>,
	isaacmanjarres@google.com,
	Catalin Marinas <catalin.marinas@arm.com>,
	iommu@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] dma-direct: Set SG_DMA_SWIOTLB flag for dma-direct
Date: Mon, 6 May 2024 18:02:44 +0200	[thread overview]
Message-ID: <20240506160244.GA16248@lst.de> (raw)
In-Reply-To: <CABdmKX1XNTtoPTvfsJRobim8pHdDjPsKx=qVovVZDh5GEbKCfQ@mail.gmail.com>

On Mon, May 06, 2024 at 09:00:59AM -0700, T.J. Mercier wrote:
> Oh, that's disappointing. I'm looking for a way to quickly check if
> any addresses point at a SWIOTLB buffer without doing a potentially
> expensive call to iommu_iova_to_phys. Since it's meant to be dma-iommu
> only I guess I could use sg_dma_is_swiotlb if iommu_get_domain_for_dev
> returns a domain, and is_swiotlb_buffer otherwise for dma-direct, but
> it'd be nice to have just one way to check which it looked like the
> SG_DMA_SWIOTLB flag could be used for.

This sounds like you're trying to do that from a consumer of the
DMA API, which is simply wrong.  What is the actual problem you are
trying to solve?

  reply	other threads:[~2024-05-06 16:02 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-03 18:37 [PATCH] dma-direct: Set SG_DMA_SWIOTLB flag for dma-direct T.J. Mercier
2024-05-04  8:53 ` Petr Tesařík
2024-05-09 13:28   ` Robin Murphy
2024-05-06  5:29 ` Christoph Hellwig
2024-05-06 16:00   ` T.J. Mercier
2024-05-06 16:02     ` Christoph Hellwig [this message]
2024-05-06 16:10       ` T.J. Mercier
2024-05-06 16:19         ` Christoph Hellwig
2024-05-06 16:39           ` T.J. Mercier
2024-05-07  5:43             ` Christoph Hellwig
2024-05-07 20:07               ` T.J. Mercier
2024-05-08 11:33                 ` Christoph Hellwig
2024-05-09 12:54                   ` Robin Murphy
2024-05-09 18:26                     ` T.J. Mercier
2024-05-08 17:19                 ` Catalin Marinas
2024-05-08 20:14                   ` T.J. Mercier
2024-05-09  7:49                     ` Catalin Marinas
2024-05-09 13:06                       ` Christoph Hellwig
2024-05-09 18:32                         ` T.J. Mercier

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=20240506160244.GA16248@lst.de \
    --to=hch@lst.de \
    --cc=catalin.marinas@arm.com \
    --cc=iommu@lists.linux.dev \
    --cc=isaacmanjarres@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=robin.murphy@arm.com \
    --cc=tjmercier@google.com \
    /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.