kmalloc vs pci_alloc_consistent

Chris Zimman chris at cryptoapps.com
Sat Jul 19 01:33:57 EST 2003


On Fri, Jul 18, 2003 at 09:56:35AM -0500, Johnson, Stephen wrote:
> I read one thing noted on a man page for kmalloc that should be highlighted.
> "the GFP_DMA flag may be set to indicate the memory must be suitable for
> DMA. ***This can mean different things on different platforms.*** For
> example, on x86, it means that the memory must come from the first 16MB."

Just to clarify -- the 16MB lower memory limit is only true on x86 when doing
DMA via ISA.  PCI does not have this problem.

In addition to making sure you get pages that are usable for DMA,
pci_alloc_consistent() also takes care of cache coherency issues.

--Chris

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/





More information about the Linuxppc-embedded mailing list