aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mmzone.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/mmzone.h')
-rw-r--r--include/linux/mmzone.h19
1 files changed, 7 insertions, 12 deletions
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index b79633d3a97b..39e912708e2a 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -414,30 +414,25 @@ extern struct pglist_data contig_page_data;
414 414
415#include <asm/mmzone.h> 415#include <asm/mmzone.h>
416 416
417#endif /* !CONFIG_DISCONTIGMEM */
418
417#if BITS_PER_LONG == 32 || defined(ARCH_HAS_ATOMIC_UNSIGNED) 419#if BITS_PER_LONG == 32 || defined(ARCH_HAS_ATOMIC_UNSIGNED)
418/* 420/*
419 * with 32 bit page->flags field, we reserve 8 bits for node/zone info. 421 * with 32 bit page->flags field, we reserve 8 bits for node/zone info.
420 * there are 3 zones (2 bits) and this leaves 8-2=6 bits for nodes. 422 * there are 3 zones (2 bits) and this leaves 8-2=6 bits for nodes.
421 */ 423 */
422#define MAX_NODES_SHIFT 6 424#define FLAGS_RESERVED 8
425
423#elif BITS_PER_LONG == 64 426#elif BITS_PER_LONG == 64
424/* 427/*
425 * with 64 bit flags field, there's plenty of room. 428 * with 64 bit flags field, there's plenty of room.
426 */ 429 */
427#define MAX_NODES_SHIFT 10 430#define FLAGS_RESERVED 32
428#endif
429 431
430#endif /* !CONFIG_DISCONTIGMEM */ 432#else
431
432#if NODES_SHIFT > MAX_NODES_SHIFT
433#error NODES_SHIFT > MAX_NODES_SHIFT
434#endif
435 433
436/* There are currently 3 zones: DMA, Normal & Highmem, thus we need 2 bits */ 434#error BITS_PER_LONG not defined
437#define MAX_ZONES_SHIFT 2
438 435
439#if ZONES_SHIFT > MAX_ZONES_SHIFT
440#error ZONES_SHIFT > MAX_ZONES_SHIFT
441#endif 436#endif
442 437
443#endif /* !__ASSEMBLY__ */ 438#endif /* !__ASSEMBLY__ */