Linux IOMMU Development
 help / color / mirror / Atom feed
From: Robin Murphy <robin.murphy-5wv7dgnIgG8@public.gmane.org>
To: Yong Wu <yong.wu-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>,
	Will Deacon <Will.Deacon-5wv7dgnIgG8@public.gmane.org>
Cc: "iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org"
	<iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org>,
	"linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
	<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>
Subject: Re: [PATCH v2] iommu/io-pgtable-arm: Don't use dma_to_phys()
Date: Tue, 22 Sep 2015 17:23:16 +0100	[thread overview]
Message-ID: <56018074.2010104@arm.com> (raw)
In-Reply-To: <1442928308.17514.3.camel@mhfsdcap03>

On 22/09/15 14:25, Yong Wu wrote:
[...]
> About here:
>> @@ -629,6 +626,11 @@ arm_lpae_alloc_pgtable(struct io_pgtable_cfg
> *cfg)
>>        if (cfg->oas > ARM_LPAE_MAX_ADDR_BITS)
>>                return NULL;
>>   
>> +     if (cfg->iommu_dev->dma_pfn_offset) {
> 
> Do we need change to :
> 	if (!selftest_running && cfg->iommu_dev->dma_pfn_offset) {
> 
> cfg->iommu_dev will be null while self test.

Urgh, you're absolutely right. Must have been one of those days when I
had loads of noisy debug in there and turned the self-tests off :(

Will; since the branch hasn't gone anywhere yet, are you OK to take the below?

Robin.

----->8-----
From: Robin Murphy <robin.murphy-5wv7dgnIgG8@public.gmane.org>
Date: Tue, 22 Sep 2015 14:52:27 +0100
Subject: [PATCH] fixup! iommu/io-pgtable-arm: Don't use dma_to_phys()

Signed-off-by: Robin Murphy <robin.murphy-5wv7dgnIgG8@public.gmane.org>
---
 drivers/iommu/io-pgtable-arm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iommu/io-pgtable-arm.c b/drivers/iommu/io-pgtable-arm.c
index 1f08ce7..2ba2323 100644
--- a/drivers/iommu/io-pgtable-arm.c
+++ b/drivers/iommu/io-pgtable-arm.c
@@ -628,7 +628,7 @@ arm_lpae_alloc_pgtable(struct io_pgtable_cfg *cfg)
        if (cfg->oas > ARM_LPAE_MAX_ADDR_BITS)
                return NULL;
 
-       if (cfg->iommu_dev->dma_pfn_offset) {
+       if (!selftest_running && cfg->iommu_dev->dma_pfn_offset) {
                dev_err(cfg->iommu_dev, "Cannot accommodate DMA offset for IOMMU page tables\n");
                return NULL;
        }

  reply	other threads:[~2015-09-22 16:23 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-17 14:22 [PATCH] iommu/io-pgtable-arm: Don't use dma_to_phys() Robin Murphy
     [not found] ` <1c591836f1ec6e676a8889cdccd042650eadb73b.1442499554.git.robin.murphy-5wv7dgnIgG8@public.gmane.org>
2015-09-17 14:52   ` Will Deacon
     [not found]     ` <20150917145216.GJ25634-5wv7dgnIgG8@public.gmane.org>
2015-09-17 15:53       ` Robin Murphy
2015-09-17 16:42   ` [PATCH v2] " Robin Murphy
     [not found]     ` <59f4ebbf06e75a6176a366495211afd16d0048a3.1442507940.git.robin.murphy-5wv7dgnIgG8@public.gmane.org>
2015-09-18  8:55       ` Yong Wu
2015-09-18 11:04         ` Robin Murphy
     [not found]           ` <55FBEFBA.6000606-5wv7dgnIgG8@public.gmane.org>
2015-09-18 12:29             ` Russell King - ARM Linux
2015-09-22 13:25             ` Yong Wu
2015-09-22 16:23               ` Robin Murphy [this message]
     [not found]                 ` <56018074.2010104-5wv7dgnIgG8@public.gmane.org>
2015-09-22 16:26                   ` Will Deacon

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=56018074.2010104@arm.com \
    --to=robin.murphy-5wv7dgnigg8@public.gmane.org \
    --cc=Will.Deacon-5wv7dgnIgG8@public.gmane.org \
    --cc=iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=yong.wu-NuS5LvNUpcJWk0Htik3J/w@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