From: "Robert P. J. Day" <rpjday@mindspring.com>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: __get_free_pages: can GFP_DMA omit GFP_KERNEL and GFP_ATOMIC?
Date: Sun, 3 Jun 2007 04:41:44 -0400 (EDT) [thread overview]
Message-ID: <Pine.LNX.4.64.0706030435130.14627@localhost.localdomain> (raw)
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
========================================================================
next reply other threads:[~2007-06-03 8:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-03 8:41 Robert P. J. Day [this message]
2007-06-04 18:45 ` Christoph Lameter
2007-06-04 18:53 ` Robert P. J. Day
2007-06-04 19:02 ` Christoph Lameter
2007-06-04 19:07 ` Robert P. J. Day
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.64.0706030435130.14627@localhost.localdomain \
--to=rpjday@mindspring.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®