lkml.org 
[lkml]   [2003]   [Nov]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectHow to allocate pages for a scatter-gather buffer?
Jens:

Thanks for your help in tracking down that problem with the usb-storage
sddr09 driver.

Now a slightly different question. Suppose I want to allocate some pages
as a scatter-gather buffer for I/O to a device. I've got the device's
dma_mask; what's the right way to convert that to a GFP bitmask for
alloc_pages() or get_free_pages()?

Also, assuming I'll have to use memcpy() to transfer data into or out of
the scatter-gather buffer (so it will have to get a kernel virtual mapping
at some point), am I better off using alloc_pages() followed by
kmap_atomic()/kunmap_atomic() or get_free_pages()? Or even kmalloc()?

Alan Stern

-
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:58    [W:0.020 / U:0.468 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site