diff options
author | Christoph Lameter <clameter@sgi.com> | 2008-04-28 05:12:48 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-28 11:58:21 -0400 |
commit | 9223b4190fa1297a59f292f3419fc0285321d0ea (patch) | |
tree | c6fbbc6b4c35916232e95686194eea1bd9de7377 /include/linux/mmzone.h | |
parent | e26831814998cee8e6d9f0a9854cb46c516f5547 (diff) |
pageflags: get rid of FLAGS_RESERVED
NR_PAGEFLAGS specifies the number of page flags we are using. From that we
can calculate the number of bits leftover that can be used for zone, node (and
maybe the sections id). There is no need anymore for FLAGS_RESERVED if we use
NR_PAGEFLAGS.
Use the new methods to make NR_PAGEFLAGS available via the preprocessor.
NR_PAGEFLAGS is used to calculate field boundaries in the page flags fields.
These field widths have to be available to the preprocessor.
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Cc: David Miller <davem@davemloft.net>
Cc: Andy Whitcroft <apw@shadowen.org>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: Mel Gorman <mel@csn.ul.ie>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/mmzone.h')
-rw-r--r-- | include/linux/mmzone.h | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 0aece6d8937e..c7a51dac441d 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h | |||
@@ -820,25 +820,6 @@ static inline struct zoneref *first_zones_zonelist(struct zonelist *zonelist, | |||
820 | #include <asm/sparsemem.h> | 820 | #include <asm/sparsemem.h> |
821 | #endif | 821 | #endif |
822 | 822 | ||
823 | #if BITS_PER_LONG == 32 | ||
824 | /* | ||
825 | * with 32 bit page->flags field, we reserve 9 bits for node/zone info. | ||
826 | * there are 4 zones (3 bits) and this leaves 9-3=6 bits for nodes. | ||
827 | */ | ||
828 | #define FLAGS_RESERVED 9 | ||
829 | |||
830 | #elif BITS_PER_LONG == 64 | ||
831 | /* | ||
832 | * with 64 bit flags field, there's plenty of room. | ||
833 | */ | ||
834 | #define FLAGS_RESERVED 32 | ||
835 | |||
836 | #else | ||
837 | |||
838 | #error BITS_PER_LONG not defined | ||
839 | |||
840 | #endif | ||
841 | |||
842 | #if !defined(CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID) && \ | 823 | #if !defined(CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID) && \ |
843 | !defined(CONFIG_ARCH_POPULATES_NODE_MAP) | 824 | !defined(CONFIG_ARCH_POPULATES_NODE_MAP) |
844 | static inline unsigned long early_pfn_to_nid(unsigned long pfn) | 825 | static inline unsigned long early_pfn_to_nid(unsigned long pfn) |