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 /arch/sparc64 | |
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 'arch/sparc64')
-rw-r--r-- | arch/sparc64/mm/init.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/arch/sparc64/mm/init.c b/arch/sparc64/mm/init.c index 177d8aaeec42..8c2b50e8abc6 100644 --- a/arch/sparc64/mm/init.c +++ b/arch/sparc64/mm/init.c | |||
@@ -1699,9 +1699,21 @@ void __init paging_init(void) | |||
1699 | * functions like clear_dcache_dirty_cpu use the cpu mask | 1699 | * functions like clear_dcache_dirty_cpu use the cpu mask |
1700 | * in 13-bit signed-immediate instruction fields. | 1700 | * in 13-bit signed-immediate instruction fields. |
1701 | */ | 1701 | */ |
1702 | BUILD_BUG_ON(FLAGS_RESERVED != 32); | 1702 | |
1703 | /* | ||
1704 | * Page flags must not reach into upper 32 bits that are used | ||
1705 | * for the cpu number | ||
1706 | */ | ||
1707 | BUILD_BUG_ON(NR_PAGEFLAGS > 32); | ||
1708 | |||
1709 | /* | ||
1710 | * The bit fields placed in the high range must not reach below | ||
1711 | * the 32 bit boundary. Otherwise we cannot place the cpu field | ||
1712 | * at the 32 bit boundary. | ||
1713 | */ | ||
1703 | BUILD_BUG_ON(SECTIONS_WIDTH + NODES_WIDTH + ZONES_WIDTH + | 1714 | BUILD_BUG_ON(SECTIONS_WIDTH + NODES_WIDTH + ZONES_WIDTH + |
1704 | ilog2(roundup_pow_of_two(NR_CPUS)) > FLAGS_RESERVED); | 1715 | ilog2(roundup_pow_of_two(NR_CPUS)) > 32); |
1716 | |||
1705 | BUILD_BUG_ON(NR_CPUS > 4096); | 1717 | BUILD_BUG_ON(NR_CPUS > 4096); |
1706 | 1718 | ||
1707 | kern_base = (prom_boot_mapping_phys_low >> 22UL) << 22UL; | 1719 | kern_base = (prom_boot_mapping_phys_low >> 22UL) << 22UL; |