Re: Does kmalloc always return address below 4GB?

Adam J. Richter (adam@yggdrasil.com)
Tue, 5 Mar 2002 03:52:14 -0800


>Just use pci_alloc_consistent, it never gives you
>anything larger than 32-bit addresses, please read the
>documentation :-)

I see the smiley, but let me point out that I have
read Documentation/DMA-mapping.txt and I was misled by this
sentence:

| If you acquired your memory via the page allocator
| (i.e. __get_free_page*()) or the generic memory allocators
| (i.e. kmalloc() or kmem_cache_alloc()) then you may DMA to/from
| that memory using the addresses returned from those routines.

It might be a good idea to rephrase it. If I knew what that
sentence I would propose a patch to the DMA-mapping.txt file, but I
honestly don't know what proposition that sentence is supposed
to convey. If there really is no guarantee that this sentence is
conveying, then I guess the sentence should be deleted.

Anyhow, thanks for your quick clarification. The driver
breaking on 64-bit architectures was exactly what I was worried about.

Adam J. Richter __ ______________ 4880 Stevens Creek Blvd, Suite 104
adam@yggdrasil.com \ / San Jose, California 95129-1034
+1 408 261-6630 | g g d r a s i l United States of America
fax +1 408 261-6631 "Free Software For The Rest Of Us."
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/