Messages in this thread | | | Date | Tue, 05 Mar 2002 03:59:14 -0800 (PST) | Subject | Re: Does kmalloc always return address below 4GB? | From | "David S. Miller" <> |
| |
From: "Adam J. Richter" <adam@yggdrasil.com> Date: Tue, 5 Mar 2002 03:52:14 -0800
| 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.
Probably it should qualify what it means with "and you used GFP_KERNEL". Because that was the intention.
I'll fix that.
However, you can use GFP_HIGH memory with pci_map_page _iff_ you set your DMA mask to allow 64-bits.
The original impetus for that quoted bit of DMA-mapping.txt was to make sure nobody used vmalloc() or kmap() pointers. - 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/
| |