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/mm.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/mm.h')
-rw-r--r-- | include/linux/mm.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h index 4f3c1b2f44de..526f810367d9 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -407,7 +407,7 @@ static inline void set_compound_order(struct page *page, unsigned long order) | |||
407 | 407 | ||
408 | #define ZONES_WIDTH ZONES_SHIFT | 408 | #define ZONES_WIDTH ZONES_SHIFT |
409 | 409 | ||
410 | #if SECTIONS_WIDTH+ZONES_WIDTH+NODES_SHIFT <= FLAGS_RESERVED | 410 | #if SECTIONS_WIDTH+ZONES_WIDTH+NODES_SHIFT <= BITS_PER_LONG - NR_PAGEFLAGS |
411 | #define NODES_WIDTH NODES_SHIFT | 411 | #define NODES_WIDTH NODES_SHIFT |
412 | #else | 412 | #else |
413 | #ifdef CONFIG_SPARSEMEM_VMEMMAP | 413 | #ifdef CONFIG_SPARSEMEM_VMEMMAP |
@@ -455,8 +455,8 @@ static inline void set_compound_order(struct page *page, unsigned long order) | |||
455 | 455 | ||
456 | #define ZONEID_PGSHIFT (ZONEID_PGOFF * (ZONEID_SHIFT != 0)) | 456 | #define ZONEID_PGSHIFT (ZONEID_PGOFF * (ZONEID_SHIFT != 0)) |
457 | 457 | ||
458 | #if SECTIONS_WIDTH+NODES_WIDTH+ZONES_WIDTH > FLAGS_RESERVED | 458 | #if SECTIONS_WIDTH+NODES_WIDTH+ZONES_WIDTH > BITS_PER_LONG - NR_PAGEFLAGS |
459 | #error SECTIONS_WIDTH+NODES_WIDTH+ZONES_WIDTH > FLAGS_RESERVED | 459 | #error SECTIONS_WIDTH+NODES_WIDTH+ZONES_WIDTH > BITS_PER_LONG - NR_PAGEFLAGS |
460 | #endif | 460 | #endif |
461 | 461 | ||
462 | #define ZONES_MASK ((1UL << ZONES_WIDTH) - 1) | 462 | #define ZONES_MASK ((1UL << ZONES_WIDTH) - 1) |