From: Robert Hancock <hancockrwd@gmail.com>
To: Maxim Levitsky <maximlevitsky@gmail.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: Does pci_map_single magicly work on > 32 bit address for 32bit capable device?
Date: Fri, 11 Dec 2009 18:07:03 -0600 [thread overview]
Message-ID: <4B22DEA7.8040202@gmail.com> (raw)
In-Reply-To: <1260567582.5983.23.camel@maxim-laptop>
On 12/11/2009 03:39 PM, Maxim Levitsky wrote:
> Hi,
>
> I am writing a driver, and I am faced with following problem:
>
> I receive a kernel pointer, and I want device to dma into that memory.
> However, device is only capable of 32 bit dma.
>
> I can create a 'consistent' mapping and use memcpy from/to it, but it
> feels like waste of performance.
>
>
> According to Documentation/DMA-mapping.txt, I can tell that hw supports
> 32 bit dma using pci_set_dma_mask, however, what will happen if I pass
> arbitrary kernel address into pci_map_single.
> What will happen if the address is above 32 bit?
The kernel should set up an IOMMU (either hardware or software) mapping
for that memory so that the device can access it through an address
below 4GB. This is assuming it's a 64-bit kernel (on 32-bit, a kernel
memory address will always be below 4GB).
next prev parent reply other threads:[~2009-12-12 0:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-11 21:39 Does pci_map_single magicly work on > 32 bit address for 32bit capable device? Maxim Levitsky
2009-12-12 0:07 ` Robert Hancock [this message]
2009-12-12 0:18 ` Maxim Levitsky
2009-12-12 0:38 ` Robert Hancock
2009-12-21 19:48 ` Maxim Levitsky
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=4B22DEA7.8040202@gmail.com \
--to=hancockrwd@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maximlevitsky@gmail.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 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.