lkml.org 
[lkml]   [2009]   [Dec]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Does pci_map_single magicly work on > 32 bit address for 32bit capable device?
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).


\
 
 \ /
  Last update: 2009-12-12 01:09    [W:0.154 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site