From: Matthew Dobson <colpatch@us.ibm.com>
To: Trivial Patch Monkey <trivial@rustcorp.com.au>
Cc: Andrew Morton <akpm@zip.com.au>,
Martin Bligh <mjbligh@us.ibm.com>,
linux-kernel@vger.kernel.org,
William Lee Irwin III <wli@holomorphy.com>
Subject: [patch][trivial] GFP_ZONEMASK fix
Date: Mon, 17 Mar 2003 17:41:39 -0800 [thread overview]
Message-ID: <3E767953.2040908@us.ibm.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 521 bytes --]
GFP_ZONEMASK is set up as 0xf, meaning the low four bits specify the
zone type. As there are only 3 zone types (DMA, NORMAL, & HIGHMEM), and
only 2 of them (DMA & HIGHMEM) have flags (NORMAL is the default), this
is wrong. This simple patch changes one comment, and changes the value
of GFP_ZONEMASK from 0xf to 0x3.
I'm not sure if this was specified this way to allow for future
expansion, or what. If so, please ignore this. If anyone can tell me
why this is set to four bits, I'm all ears.
Cheers!
-Matt
[-- Attachment #2: GFP_ZONEMASK_fix-2.5.65.patch --]
[-- Type: text/plain, Size: 1059 bytes --]
diff -Nur --exclude-from=/usr/src/.dontdiff linux-2.5.64-vanilla/include/linux/gfp.h linux-2.5.64-gfp_zonemask_fix/include/linux/gfp.h
--- linux-2.5.64-vanilla/include/linux/gfp.h Tue Mar 4 19:29:03 2003
+++ linux-2.5.64-gfp_zonemask_fix/include/linux/gfp.h Mon Mar 17 14:16:28 2003
@@ -7,7 +7,7 @@
/*
* GFP bitmasks..
*/
-/* Zone modifiers in GFP_ZONEMASK (see linux/mmzone.h - low four bits) */
+/* Zone modifiers in GFP_ZONEMASK (see linux/mmzone.h - low two bits) */
#define __GFP_DMA 0x01
#define __GFP_HIGHMEM 0x02
diff -Nur --exclude-from=/usr/src/.dontdiff linux-2.5.64-vanilla/include/linux/mmzone.h linux-2.5.64-gfp_zonemask_fix/include/linux/mmzone.h
--- linux-2.5.64-vanilla/include/linux/mmzone.h Tue Mar 4 19:29:22 2003
+++ linux-2.5.64-gfp_zonemask_fix/include/linux/mmzone.h Mon Mar 17 14:16:28 2003
@@ -162,7 +162,7 @@
struct zone *zones[MAX_NUMNODES * MAX_NR_ZONES + 1]; // NULL delimited
};
-#define GFP_ZONEMASK 0x0f
+#define GFP_ZONEMASK 0x03
/*
* The pg_data_t structure is used in machines with CONFIG_DISCONTIGMEM
reply other threads:[~2003-03-18 1:40 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=3E767953.2040908@us.ibm.com \
--to=colpatch@us.ibm.com \
--cc=akpm@zip.com.au \
--cc=linux-kernel@vger.kernel.org \
--cc=mjbligh@us.ibm.com \
--cc=trivial@rustcorp.com.au \
--cc=wli@holomorphy.com \
/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