Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1637007 > unrolled thread
| Started by | Jon Masters <jcm@jonmasters.org> |
|---|---|
| First post | 2017-05-07 02:10 +0200 |
| Last post | 2017-05-08 11:40 +0200 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH 0/2] Fix incorrect warning from dma-debug Jon Masters <jcm@jonmasters.org> - 2017-05-07 02:10 +0200
Re: [PATCH 0/2] Fix incorrect warning from dma-debug Geert Uytterhoeven <geert@linux-m68k.org> - 2017-05-08 11:20 +0200
Re: [PATCH 0/2] Fix incorrect warning from dma-debug Robin Murphy <robin.murphy@arm.com> - 2017-05-08 11:40 +0200
| From | Jon Masters <jcm@jonmasters.org> |
|---|---|
| Date | 2017-05-07 02:10 +0200 |
| Subject | Re: [PATCH 0/2] Fix incorrect warning from dma-debug |
| Message-ID | <tEhVU-6rK-1@gated-at.bofh.it> |
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. Jon. -- Computer Architect
[toc] | [next] | [standalone]
| From | Geert Uytterhoeven <geert@linux-m68k.org> |
|---|---|
| Date | 2017-05-08 11:20 +0200 |
| Message-ID | <tEMZI-1ZS-7@gated-at.bofh.it> |
| In reply to | #1637007 |
Hi Jon,
On Sun, May 7, 2017 at 2:06 AM, Jon Masters <jcm@jonmasters.org> wrote:
> On 05/09/2016 06:00 AM, Robin Murphy wrote:
>> On 09/05/16 10:37, Robin Murphy wrote:
>>> On 08/05/16 11:59, Niklas Söderlund wrote:
>>>> 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.
A quick hack is to change arch/arm64/mm/dma-mapping.c:dma_debug_do_init()
from fs_initcall() to arch_initcall().
However, then you loose the debugfs features. A proper fix would involve
splitting dma_debug_init() in two phases: an early one doing the real work,
and a late one registering the debugfs interface.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
[toc] | [prev] | [next] | [standalone]
| From | Robin Murphy <robin.murphy@arm.com> |
|---|---|
| Date | 2017-05-08 11:40 +0200 |
| Message-ID | <tENj4-28p-13@gated-at.bofh.it> |
| In reply to | #1637007 |
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. >
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web