Re: [LIP] pci_alloc_consistent usage in x86-64 kernel
Arun Sharma <[email protected]>
| Newsgroups | gmane.user-groups.linux.india.programmers |
|---|---|
| Message-ID | <[email protected]> |
On Mon, May 31, 2004 at 03:53:24AM +0000, Sathya Prakash V wrote: > if (hwdev == NULL || hwdev->dma_mask < 0xffffffff || no_iommu) > gfp |= GFP_DMA; > If there is no_iommu then without considering the dma_mask the GFP_DMA is > set and the memory allocation is limited. Sorry, I should've caught this in the first place. That is precisely what pci_alloc_consistent is defined to do. From Documentation/DMA-mapping.txt: The consistent DMA mapping interfaces, for non-NULL dev, will always return a DMA address which is SAC (Single Address Cycle) addressable. Even if the device indicates (via PCI dma mask) that it may address the upper 32-bits and thus perform DAC cycles, consistent allocation will still only return 32-bit PCI addresses for DMA. This is true of the pci_pool interface as well. So, the real problem is: why are you using pci_alloc_consistent to allocate lots of memory and why not use the streaming DMA mapping APIs such as pci_map_single ? -Arun ------------------------------------------------------- This SF.Net email is sponsored by the new InstallShield X. From Windows to Linux, servers to mobile, InstallShield X is the one installation-authoring solution that does it all. Learn more and evaluate today! http://www.installshield.com/Dev2Dev/0504