From: robin.murphy@arm•com (Robin Murphy)
To: linux-arm-kernel@lists•infradead.org
Subject: [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@arm•com>
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@arm•com>
---
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;
}
next prev parent 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
2015-09-17 14:52 ` Will Deacon
2015-09-17 15:53 ` Robin Murphy
2015-09-17 16:42 ` [PATCH v2] " Robin Murphy
2015-09-18 8:55 ` Yong Wu
2015-09-18 11:04 ` Robin Murphy
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]
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@arm$(echo .)com \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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