From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: dma-mapping: preallocate DMA-debug hash tables in pure_initcall
Date: Tue, 15 Nov 2016 12:18:05 +0100 [thread overview]
Message-ID: <6476437.ygKkNgMBPR@wuerfel> (raw)
In-Reply-To: <9470b8cc-daaf-0edc-da33-0872d9919311@samsung.com>
On Tuesday, November 15, 2016 11:39:17 AM CET Marek Szyprowski wrote:
> On 2016-11-15 11:31, Arnd Bergmann wrote:
> > On Tuesday, November 15, 2016 11:04:55 AM CET Marek Szyprowski wrote:
> >> fs_initcall is definitely too late to initialize DMA-debug hash tables,
> >> because some drivers might get probed and use DMA mapping framework
> >> already in core_initcall. Late initialization of DMA-debug results in
> >> false warning about accessing memory, that was not allocated, like this
> >> one:
> > To ask the obvious question: what driver does DMA allocations in a
> > core_initcall, and have you tried to change that first?
>
> See the attached stack trace.
>
> Exynos IOMMU driver does that in its domain_alloc implementation (to
> allocate
> first level of PTE) and I see no easy way to avoid that, as iommu
> domains are
> allocated very early (as well as the whole IOMMU initialization and
> attaching
> to the devices). Exynos IOMMU driver has to use DMA-mapping API for PTE
> management, because the IOMMU controllers are not coherent with system
> CPU and
> there is no other way to ensure proper CPU cache management.
Could the allocation be deferred until the first user of the IOMMU
comes up?
Arnd
next prev parent reply other threads:[~2016-11-15 11:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20161115100459eucas1p152b644d5d329192a0902c836b13f35ba@eucas1p1.samsung.com>
2016-11-15 10:04 ` [PATCH] ARM: dma-mapping: preallocate DMA-debug hash tables in pure_initcall Marek Szyprowski
2016-11-15 10:31 ` Arnd Bergmann
2016-11-15 10:39 ` Marek Szyprowski
2016-11-15 11:18 ` Arnd Bergmann [this message]
2016-11-15 12:40 ` Russell King - ARM Linux
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=6476437.ygKkNgMBPR@wuerfel \
--to=arnd@arndb.de \
--cc=linux-arm-kernel@lists.infradead.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