From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: DMA using data buffer vmapped in kernel space
Date: Tue, 9 Mar 2010 10:16:11 +0000 [thread overview]
Message-ID: <20100309101611.GC5691@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <20100309.012935.98310472.davem@davemloft.net>
On Tue, Mar 09, 2010 at 01:29:35AM -0800, David Miller wrote:
> From: Russell King - ARM Linux <linux@arm.linux.org.uk>
> Date: Tue, 9 Mar 2010 09:14:03 +0000
>
> > What you could do is prepare a patch to allow the firmware support to
> > export a scatterlist via the struct firmware, and then use that with
> > dma_map_sg(). Let's hope that the SPI interfaces support scatterlists.
>
> It's so common to want a scatterlist from a vmalloc/vmap area
> that a generic common helper is probably the best.
>
> Just iterate over the vmalloc/vmap area using vmalloc_to_page()
> to fill in the SG entries.
It looks like the firmware interface may return a pointer to either the
kernel binary itself for built-in firmware, or to a set of pages which
have been vmap'd. In the former case, vmalloc_to_page() will fail.
WARNING: multiple messages have this Message-ID (diff)
From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: David Miller <davem@davemloft.net>
Cc: mkl0301@gmail.com, thomas@koeller.dyndns.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: DMA using data buffer vmapped in kernel space
Date: Tue, 9 Mar 2010 10:16:11 +0000 [thread overview]
Message-ID: <20100309101611.GC5691@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <20100309.012935.98310472.davem@davemloft.net>
On Tue, Mar 09, 2010 at 01:29:35AM -0800, David Miller wrote:
> From: Russell King - ARM Linux <linux@arm.linux.org.uk>
> Date: Tue, 9 Mar 2010 09:14:03 +0000
>
> > What you could do is prepare a patch to allow the firmware support to
> > export a scatterlist via the struct firmware, and then use that with
> > dma_map_sg(). Let's hope that the SPI interfaces support scatterlists.
>
> It's so common to want a scatterlist from a vmalloc/vmap area
> that a generic common helper is probably the best.
>
> Just iterate over the vmalloc/vmap area using vmalloc_to_page()
> to fill in the SG entries.
It looks like the firmware interface may return a pointer to either the
kernel binary itself for built-in firmware, or to a set of pages which
have been vmap'd. In the former case, vmalloc_to_page() will fail.
next prev parent reply other threads:[~2010-03-09 10:16 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-04 21:11 DMA using data buffer vmapped in kernel space Thomas Koeller
2010-03-04 21:11 ` Thomas Koeller
2010-03-04 21:36 ` Russell King - ARM Linux
2010-03-04 21:36 ` Russell King - ARM Linux
2010-03-06 13:07 ` Thomas Koeller
2010-03-06 13:07 ` Thomas Koeller
2010-03-06 19:31 ` Russell King - ARM Linux
2010-03-06 19:31 ` Russell King - ARM Linux
2010-03-09 7:45 ` Lin Mac
2010-03-09 7:45 ` Lin Mac
2010-03-09 9:14 ` Russell King - ARM Linux
2010-03-09 9:14 ` Russell King - ARM Linux
2010-03-09 9:29 ` David Miller
2010-03-09 9:29 ` David Miller
2010-03-09 10:16 ` Russell King - ARM Linux [this message]
2010-03-09 10:16 ` Russell King - ARM Linux
2010-03-09 10:20 ` David Miller
2010-03-09 10:20 ` David Miller
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=20100309101611.GC5691@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.