lkml.org 
[lkml]   [2002]   [Mar]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: Does kmalloc always return address below 4GB?
From
   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/

\
 
 \ /
  Last update: 2005-03-22 13:24    [W:0.039 / U:0.296 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site