linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joerg Roedel <joro@8bytes.org>
To: Robin Murphy <robin.murphy@arm.com>
Cc: iommu@lists.linux-foundation.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Joerg Roedel <jroedel@suse.de>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/5] iommu/of: Use device_iommu_mapped()
Date: Fri, 7 Dec 2018 10:31:58 +0100	[thread overview]
Message-ID: <20181207093158.GL16835@8bytes.org> (raw)
In-Reply-To: <42cb32df-5358-f00d-12f5-eb3135ec680a@arm.com>

On Thu, Dec 06, 2018 at 05:42:16PM +0000, Robin Murphy wrote:
> For sure - although I am now wondering whether "mapped" is perhaps a little
> ambiguous in the naming, since the answer to "can I use the API" is yes even
> when the device may currently be attached to an identity/passthrough domain
> or blocked completely, neither of which involve any "mapping". Maybe simply
> "device_has_iommu()" would convey the intent better?

The name is shorter version of:

	device_is_behind_an_iommu_remapping_its_dma_transactions()
	:)

The name is not perfect, but device_has_iommu() is not better because it
might be considered as a check whether the device itself has an IOMMU
built-in.

In the end an identity-mapping is also still a mapping (if the iommu
needs a page-table for that is an implementation detail), as is a
mapping with no page-table entries at all (blocking). So I think
device_iommu_mapped() is a reasonable choice.

Regards,

	Joerg

  reply	other threads:[~2018-12-07  9:32 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-04 17:24 [PATCH 0/5] Introduce device_iommu_maped() function Joerg Roedel
2018-12-04 17:25 ` [PATCH 1/5] driver core: Introduce device_iommu_mapped() function Joerg Roedel
2018-12-06 12:55   ` Greg Kroah-Hartman
2018-12-06 15:39     ` Joerg Roedel
2018-12-04 17:25 ` [PATCH 2/5] iommu/of: Use device_iommu_mapped() Joerg Roedel
2018-12-05 17:17   ` Robin Murphy
2018-12-06 15:35     ` Joerg Roedel
2018-12-06 17:42       ` Robin Murphy
2018-12-07  9:31         ` Joerg Roedel [this message]
2018-12-04 17:25 ` [PATCH 3/5] ACPI/IORT: " Joerg Roedel
2018-12-04 17:25 ` [PATCH 4/5] powerpc/iommu: " Joerg Roedel
2018-12-04 17:25 ` [PATCH 5/5] xhci: " Joerg Roedel
2018-12-05 17:17 ` [PATCH 0/5] Introduce device_iommu_maped() function Robin Murphy
2018-12-06 15:36   ` Joerg Roedel

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=20181207093158.GL16835@8bytes.org \
    --to=joro@8bytes.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=iommu@lists.linux-foundation.org \
    --cc=jroedel@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robin.murphy@arm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).