iommu.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: Will Deacon <will.deacon-5wv7dgnIgG8@public.gmane.org>
To: Varun Sethi <Varun.Sethi-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
Cc: "iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org"
	<iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org>
Subject: Re: [RFC][PATCH 1/2] Introduce the IOMMU_DEVICE flag.
Date: Mon, 6 Oct 2014 12:04:29 +0100	[thread overview]
Message-ID: <20141006110428.GE12935@arm.com> (raw)
In-Reply-To: <1412591296-31934-1-git-send-email-Varun.Sethi-KZfg59tc24xl57MIdRCFDg@public.gmane.org>

Hi Varun,

[adding the Qualcomm guys, as I have an open question below]

On Mon, Oct 06, 2014 at 11:28:15AM +0100, Varun Sethi wrote:
> This is used for indicating device memory type for a DMA transaction. IOMMU
> driver would set up attributes indicationg access to device memory.
> 
> Signed-off-by: Varun Sethi <Varun.Sethi-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
> ---
>  include/linux/iommu.h |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/include/linux/iommu.h b/include/linux/iommu.h
> index 20f9a52..0599fe1 100644
> --- a/include/linux/iommu.h
> +++ b/include/linux/iommu.h
> @@ -28,6 +28,7 @@
>  #define IOMMU_WRITE	(1 << 1)
>  #define IOMMU_CACHE	(1 << 2) /* DMA cache coherency */
>  #define IOMMU_EXEC	(1 << 3)
> +#define IOMMU_DEVICE	(1 << 4) /* Indicates access to device memory */

An alternative to this would be to make device-memory the default type for
!IOMMU_CACHE mappings (i.e. MAIR index 0).

I'd value feedback either way; the argument comes down to whether we should
use normal non-cacheable or device-nGnRE as the default (!IOMMU_CACHE) memory
type. The latter is likely to be significantly slower, but provides the
ordering guarantees that you need for MSI delivery.

If we do go down the route of adding a new IOMMU_* option, it probably needs
a better name (IOMMU_MMIO, for example).

Will

  parent reply	other threads:[~2014-10-06 11:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-06 10:28 [RFC][PATCH 1/2] Introduce the IOMMU_DEVICE flag Varun Sethi
     [not found] ` <1412591296-31934-1-git-send-email-Varun.Sethi-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2014-10-06 10:28   ` [RFC][PATCH 2/2] Add support of " Varun Sethi
     [not found]     ` <1412591296-31934-2-git-send-email-Varun.Sethi-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2014-10-06 11:17       ` Will Deacon
     [not found]         ` <20141006111716.GF12935-5wv7dgnIgG8@public.gmane.org>
2014-10-06 11:34           ` Varun Sethi
2014-10-06 23:32       ` Mitchel Humpherys
2014-10-06 11:04   ` Will Deacon [this message]
     [not found]     ` <20141006110428.GE12935-5wv7dgnIgG8@public.gmane.org>
2014-10-06 11:51       ` [RFC][PATCH 1/2] Introduce " Varun Sethi
2014-10-06 18:35       ` Olav Haugan

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=20141006110428.GE12935@arm.com \
    --to=will.deacon-5wv7dgnigg8@public.gmane.org \
    --cc=Varun.Sethi-KZfg59tc24xl57MIdRCFDg@public.gmane.org \
    --cc=iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.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 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).