From: "Niklas Söderlund" <niklas.soderlund+renesas@ragnatech.se>
To: linux-arm-kernel@lists.infradead.org,
iommu@lists.linux-foundation.org, dmaengine@vger.kernel.org
Cc: will.deacon@arm.com, robin.murphy@arm.com, joro@8bytes.org,
linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
"Niklas Söderlund" <niklas.soderlund+renesas@ragnatech.se>
Subject: [PATCH 2/2] iommu/io-pgtable-arm: use __dma_sync_single_for_device()
Date: Sun, 8 May 2016 12:59:56 +0200 [thread overview]
Message-ID: <1462705196-10857-3-git-send-email-niklas.soderlund+renesas@ragnatech.se> (raw)
In-Reply-To: <1462705196-10857-1-git-send-email-niklas.soderlund+renesas@ragnatech.se>
The call to dma_sync_single_for_device() can be reached from
dma_map_single(). If CONFIG_DMA_API_DEBUG is enabled this would result
in a check that the mapping being synced is valid. Since the call to
dma_map_single is not yet completed the mapping is not recorded in
dma-debug and the check fails and a warning is printed. Avoid this
warning by calling __dma_sync_single_for_device() which don't preform
this check.
Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
---
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 f433b51..3da8102 100644
--- a/drivers/iommu/io-pgtable-arm.c
+++ b/drivers/iommu/io-pgtable-arm.c
@@ -255,7 +255,7 @@ static void __arm_lpae_set_pte(arm_lpae_iopte *ptep, arm_lpae_iopte pte,
*ptep = pte;
if (!selftest_running)
- dma_sync_single_for_device(cfg->iommu_dev,
+ __dma_sync_single_for_device(cfg->iommu_dev,
__arm_lpae_dma_addr(ptep),
sizeof(pte), DMA_TO_DEVICE);
}
--
2.8.2
next prev parent reply other threads:[~2016-05-08 11:10 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-08 10:59 [PATCH 0/2] Fix incorrect warning from dma-debug Niklas Söderlund
2016-05-08 10:59 ` [PATCH 1/2] dma-mapping: add __dma_sync_single_for_device() Niklas Söderlund
2016-05-08 10:59 ` Niklas Söderlund [this message]
2016-05-09 9:35 ` [PATCH 2/2] iommu/io-pgtable-arm: use __dma_sync_single_for_device() Will Deacon
2016-05-09 9:37 ` [PATCH 0/2] Fix incorrect warning from dma-debug Robin Murphy
2016-05-09 10:00 ` Robin Murphy
2017-05-07 0:06 ` Jon Masters
2017-05-08 9:19 ` Geert Uytterhoeven
2017-05-08 9:39 ` Robin Murphy
2017-01-25 16:23 ` Geert Uytterhoeven
2017-01-25 17:27 ` Robin Murphy
2017-01-25 20:32 ` Geert Uytterhoeven
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=1462705196-10857-3-git-send-email-niklas.soderlund+renesas@ragnatech.se \
--to=niklas.soderlund+renesas@ragnatech.se \
--cc=dmaengine@vger.kernel.org \
--cc=iommu@lists.linux-foundation.org \
--cc=joro@8bytes.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=robin.murphy@arm.com \
--cc=will.deacon@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).