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: Sat, 6 Mar 2010 19:31:27 +0000 [thread overview]
Message-ID: <20100306193127.GA13262@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <201003061407.12698.thomas@koeller.dyndns.org>
On Sat, Mar 06, 2010 at 02:07:12PM +0100, Thomas Koeller wrote:
> Am Donnerstag, 4. M?rz 2010 22:36:34 schrieb Russell King - ARM Linux:
> > Cache maintainence is done using virtual addresses for L1, and
> > physical addresses for L2. There's the need for virtual addresses
> > to be translatable to physical addresses, which is only true for
> > the kernel direct mapped region (pages between PAGE_OFFSET and
> > high_memory).
>
> Isn't the mapping created by vmap() sufficient for the virt/phys
> translation? In which way is this case different from a buffer
> passed in from user space, where the constituent pages are not
> in the directly mapped kernel region either?
No different.
The requirement is that dma_map_single() is passed a virtual address
in the kernel direct-mapped memory region, which is translatable using
virt_to_phys() and friends.
Anything which requires a page table lookup to obtain the physical
address is just not acceptable - that requires taking locks and other
messy things, plus is grossly inefficient.
WARNING: multiple messages have this Message-ID (diff)
From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Thomas Koeller <thomas@koeller.dyndns.org>
Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: DMA using data buffer vmapped in kernel space
Date: Sat, 6 Mar 2010 19:31:27 +0000 [thread overview]
Message-ID: <20100306193127.GA13262@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <201003061407.12698.thomas@koeller.dyndns.org>
On Sat, Mar 06, 2010 at 02:07:12PM +0100, Thomas Koeller wrote:
> Am Donnerstag, 4. März 2010 22:36:34 schrieb Russell King - ARM Linux:
> > Cache maintainence is done using virtual addresses for L1, and
> > physical addresses for L2. There's the need for virtual addresses
> > to be translatable to physical addresses, which is only true for
> > the kernel direct mapped region (pages between PAGE_OFFSET and
> > high_memory).
>
> Isn't the mapping created by vmap() sufficient for the virt/phys
> translation? In which way is this case different from a buffer
> passed in from user space, where the constituent pages are not
> in the directly mapped kernel region either?
No different.
The requirement is that dma_map_single() is passed a virtual address
in the kernel direct-mapped memory region, which is translatable using
virt_to_phys() and friends.
Anything which requires a page table lookup to obtain the physical
address is just not acceptable - that requires taking locks and other
messy things, plus is grossly inefficient.
next prev parent reply other threads:[~2010-03-06 19:31 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 [this message]
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
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=20100306193127.GA13262@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.