From: Boris Brezillon <boris.brezillon@bootlin.com>
To: Ladislav Michl <ladis@linux-mips.org>
Cc: linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org,
Boris Brezillon <boris.brezillon@free-electrons.com>,
Peter Ujfalusi <peter.ujfalusi@ti.com>,
Roger Quadros <rogerq@ti.com>,
Aaro Koskinen <aaro.koskinen@iki.fi>,
Tony Lindgren <tony@atomide.com>,
"H. Nikolaus Schaller" <hns@goldelico.com>,
Andreas Kemnade <andreas@kemnade.info>
Subject: Re: [PATCH v2] mtd: onenand: omap2: Disable DMA for HIGHMEM buffers
Date: Wed, 2 May 2018 11:16:35 +0200 [thread overview]
Message-ID: <20180502111635.689397fc@bbrezillon> (raw)
In-Reply-To: <20180502080636.GA2124@lenoch>
On Wed, 2 May 2018 10:06:36 +0200
Ladislav Michl <ladis@linux-mips.org> wrote:
> Hi Boris,
>
> (and apologies for delay)
>
> On Fri, Apr 20, 2018 at 10:01:34PM +0200, Boris Brezillon wrote:
> > Hi Ladislav,
> >
> > On Mon, 16 Apr 2018 08:52:59 +0200
> > Ladislav Michl <ladis@linux-mips.org> wrote:
> >
> > > dma_map_single doesn't get the proper DMA address for vmalloced area,
> >
> > That's not true, it returns the right DMA (physical) address, it's just
> > that:
>
> To be honest I used log message from commit dcf08227e964 which is dealing
> with the same issue.
Okay, looks like I was wrong. The problem is caused by the
virt_to_page() call done in dma_map_single_attrs() which expects a
valid virtual address (one that is present in the identity mapping). If
you pass a vmalloc address to it, the conversion is broken and that's
probably why you end up with a NULL pointer exception.
Maybe you should just say that dma_map_single() does not work for
vmalloc-ed buffers instead of saying that it does not get the right DMA
address.
prev parent reply other threads:[~2018-05-02 9:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-16 6:52 [PATCH v2] mtd: onenand: omap2: Disable DMA for HIGHMEM buffers Ladislav Michl
2018-04-16 11:34 ` Peter Ujfalusi
2018-04-16 13:32 ` Ladislav Michl
2018-04-20 20:01 ` Boris Brezillon
2018-05-02 8:06 ` Ladislav Michl
2018-05-02 9:16 ` Boris Brezillon [this message]
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=20180502111635.689397fc@bbrezillon \
--to=boris.brezillon@bootlin.com \
--cc=aaro.koskinen@iki.fi \
--cc=andreas@kemnade.info \
--cc=boris.brezillon@free-electrons.com \
--cc=hns@goldelico.com \
--cc=ladis@linux-mips.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=peter.ujfalusi@ti.com \
--cc=rogerq@ti.com \
--cc=tony@atomide.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