lkml.org 
[lkml]   [2007]   [Jun]   [3]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateSun, 3 Jun 2007 04:41:44 -0400 (EDT)
From"Robert P. J. Day" <>
Subject__get_free_pages: can GFP_DMA omit GFP_KERNEL and GFP_ATOMIC?
a two-parter:

  first, can a call to __get_free_pages to allocate DMA-able memory
omit specifying either of GFP_KERNEL or GFP_ATOMIC?  love's book on
kernel development strongly suggests you need to specify one or the
other, but there are a few instances in the tree like this:

drivers/s390/net/claw.c:                        (void *)__get_free_pages(__GFP_DMA,
drivers/s390/net/claw.c:                   p_buff=(void *)__get_free_pages(__GFP_DMA,

where you can see that the only type flag is __GFP_DMA.  is that
meaningful?

  and, second, i only noticed this as i was going to submit a short
patch to replace __get_free_pages calls for DMA-able memory with the
existing equivalent macro __get_dma_pages.  is that still considered a
worthwhile cleanup?  there's not that many examples of it, and it
would just make things consistent.

rday

-- 
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA
http://fsdev.net/wiki/index.php?title=Main_Page
========================================================================
-
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: 2007-06-03 08:45    [from the cache]
©2003-2008