summaryrefslogtreecommitdiffstats
path: root/include/linux/mmzone.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2005-11-22 19:39:30 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-22 19:39:30 -0800
commitac3461ad632e86e7debd871776683c05ef3ba4c6 (patch)
tree98ea9272b3e9d05499f1a4fbf10e998f6d476fa5 /include/linux/mmzone.h
parent4b4a27dff4e2d4cc2eac1cde31aede834a966a48 (diff)
downloadtalos-obmc-linux-ac3461ad632e86e7debd871776683c05ef3ba4c6.tar.gz
talos-obmc-linux-ac3461ad632e86e7debd871776683c05ef3ba4c6.zip
Fix up GFP_ZONEMASK for GFP_DMA32 usage
There was some confusion about the different zone usage, this should fix up the resulting mess in the GFP zonemask handling. The different zone usage is still confusing (it's very easy to mix up the individual zone numbers with the GFP zone _list_ numbers), so we might want to clean up some of this in the future, but in the meantime this should fix the actual problems. Acked-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/mmzone.h')
-rw-r--r--include/linux/mmzone.h18
1 files changed, 4 insertions, 14 deletions
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index 2c8edad5dccf..9f22090df7dd 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -91,21 +91,11 @@ struct per_cpu_pageset {
* will be a maximum of 4 (2 ** 2) zonelists, for 3 modifiers there will
* be 8 (2 ** 3) zonelists. GFP_ZONETYPES defines the number of possible
* combinations of zone modifiers in "zone modifier space".
+ *
+ * NOTE! Make sure this matches the zones in <linux/gfp.h>
*/
-#define GFP_ZONEMASK 0x03
-/*
- * As an optimisation any zone modifier bits which are only valid when
- * no other zone modifier bits are set (loners) should be placed in
- * the highest order bits of this field. This allows us to reduce the
- * extent of the zonelists thus saving space. For example in the case
- * of three zone modifier bits, we could require up to eight zonelists.
- * If the left most zone modifier is a "loner" then the highest valid
- * zonelist would be four allowing us to allocate only five zonelists.
- * Use the first form when the left most bit is not a "loner", otherwise
- * use the second.
- */
-/* #define GFP_ZONETYPES (GFP_ZONEMASK + 1) */ /* Non-loner */
-#define GFP_ZONETYPES ((GFP_ZONEMASK + 1) / 2 + 1) /* Loner */
+#define GFP_ZONEMASK 0x07
+#define GFP_ZONETYPES 5
/*
* On machines where it is needed (eg PCs) we divide physical memory
OpenPOWER on IntegriCloud