From: Robin Murphy <robin.murphy@arm.com>
To: Jon Masters <jcm@jonmasters.org>
Cc: "Niklas Söderlund" <niklas.soderlund+renesas@ragnatech.se>,
linux-arm-kernel@lists.infradead.org,
iommu@lists.linux-foundation.org, dmaengine@vger.kernel.org,
linux-renesas-soc@vger.kernel.org, will.deacon@arm.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/2] Fix incorrect warning from dma-debug
Date: Mon, 8 May 2017 10:39:36 +0100 [thread overview]
Message-ID: <963c75b8-2d8b-8710-58af-ac0685d6aa17@arm.com> (raw)
In-Reply-To: <477ded30-eef2-3598-3a8d-95d206e11efb@jonmasters.org>
On 07/05/17 01:06, Jon Masters wrote:
> On 05/09/2016 06:00 AM, Robin Murphy wrote:
>> On 09/05/16 10:37, Robin Murphy wrote:
>>> Hi Niklas,
>>>
>>> On 08/05/16 11:59, Niklas Söderlund wrote:
>>>> Hi,
>>>>
>>>> While using CONFIG_DMA_API_DEBUG i came across this warning which I
>>>> think is a false positive. As shown dma_sync_single_for_device() are
>>>> called from the dma_map_single() call path. This triggers the warning
>>>> since the dma-debug code have not yet been made aware of the mapping.
>>>
>>> Almost right ;) The thing being mapped (the SPI device's buffer) and the
>>> thing being synced (the IOMMU's PTE) are entirely unrelated. Due to the
>>> current of_iommu_init() setup, the IOMMU is probed long before
>>> dma_debug_init() gets called, therefore DMA debug is missing entries for
>>> some of the initial page table mappings and gets confused when we update
>>> them later.
>
> What was the eventual followup/fix for this? We're seeing similar traces
> to this during internal testing of 4.11 kernels.
The IOMMU probe-deferral patches queued for the current merge window get
rid of the need for early device creation bodges that cause the problem
(of IOMMU pagetables being mapped for DMA before dma-debug is up and
running). In the meantime, I'd suggest either adjusting the initcall
level per 256ff1cf6b44, or turning off the IOMMU driver and/or using
dma-debug's driver-filter option if you're doing more targeted debugging.
Robin.
>
> Jon.
>
next prev parent reply other threads:[~2017-05-08 9:39 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-08 10:59 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 ` [PATCH 2/2] iommu/io-pgtable-arm: use __dma_sync_single_for_device() Niklas Söderlund
2016-05-09 9:35 ` 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 [this message]
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=963c75b8-2d8b-8710-58af-ac0685d6aa17@arm.com \
--to=robin.murphy@arm.com \
--cc=dmaengine@vger.kernel.org \
--cc=iommu@lists.linux-foundation.org \
--cc=jcm@jonmasters.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=niklas.soderlund+renesas@ragnatech.se \
--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
all inboxes | Powered by JetHome®