All of lore.kernel.org
 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 2/2] Add support of the IOMMU_DEVICE flag.
Date: Mon, 6 Oct 2014 12:17:16 +0100	[thread overview]
Message-ID: <20141006111716.GF12935@arm.com> (raw)
In-Reply-To: <1412591296-31934-2-git-send-email-Varun.Sethi-KZfg59tc24xl57MIdRCFDg@public.gmane.org>

On Mon, Oct 06, 2014 at 11:28:16AM +0100, Varun Sethi wrote:
> This flag is used for specifying access to device memory. SMMU would apply
> device memory attributes for a DMA transaction. This is required for setting
> access to GIC registers, for generating message interrupts. This would ensure that 
> transactions targetting device memory are not gathered or reordered.
> 
> Signed-off-by: Varun Sethi <Varun.Sethi-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
> ---
>  drivers/iommu/arm-smmu.c |    7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c
> index ca18d6d..f8338d6 100644
> --- a/drivers/iommu/arm-smmu.c
> +++ b/drivers/iommu/arm-smmu.c
> @@ -1263,6 +1263,10 @@ static int arm_smmu_alloc_init_pte(struct arm_smmu_device *smmu, pmd_t *pmd,
>  		if (prot & IOMMU_CACHE)
>  			pteval |= (MAIR_ATTR_IDX_CACHE <<
>  				   ARM_SMMU_PTE_ATTRINDX_SHIFT);
> +
> +		if (prot & IOMMU_DEVICE)
> +			pteval |= (MAIR_ATTR_IDX_DEV <<
> +				   ARM_SMMU_PTE_ATTRINDX_SHIFT);

This is slightly odd, as I could in theory pass IOMMU_CACHE | IOMMU_DEVICE
to iommu_map.

Will

  parent reply	other threads:[~2014-10-06 11:17 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 [this message]
     [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   ` [RFC][PATCH 1/2] Introduce " Will Deacon
     [not found]     ` <20141006110428.GE12935-5wv7dgnIgG8@public.gmane.org>
2014-10-06 11:51       ` 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=20141006111716.GF12935@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 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.