diff options
Diffstat (limited to 'include/linux/mmzone.h')
-rw-r--r-- | include/linux/mmzone.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index f6167f2fd7fb..322e8048463e 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/seqlock.h> | 14 | #include <linux/seqlock.h> |
15 | #include <linux/nodemask.h> | 15 | #include <linux/nodemask.h> |
16 | #include <linux/pageblock-flags.h> | ||
16 | #include <asm/atomic.h> | 17 | #include <asm/atomic.h> |
17 | #include <asm/page.h> | 18 | #include <asm/page.h> |
18 | 19 | ||
@@ -222,6 +223,14 @@ struct zone { | |||
222 | #endif | 223 | #endif |
223 | struct free_area free_area[MAX_ORDER]; | 224 | struct free_area free_area[MAX_ORDER]; |
224 | 225 | ||
226 | #ifndef CONFIG_SPARSEMEM | ||
227 | /* | ||
228 | * Flags for a MAX_ORDER_NR_PAGES block. See pageblock-flags.h. | ||
229 | * In SPARSEMEM, this map is stored in struct mem_section | ||
230 | */ | ||
231 | unsigned long *pageblock_flags; | ||
232 | #endif /* CONFIG_SPARSEMEM */ | ||
233 | |||
225 | 234 | ||
226 | ZONE_PADDING(_pad1_) | 235 | ZONE_PADDING(_pad1_) |
227 | 236 | ||
@@ -720,6 +729,9 @@ extern struct zone *next_zone(struct zone *zone); | |||
720 | #define PAGES_PER_SECTION (1UL << PFN_SECTION_SHIFT) | 729 | #define PAGES_PER_SECTION (1UL << PFN_SECTION_SHIFT) |
721 | #define PAGE_SECTION_MASK (~(PAGES_PER_SECTION-1)) | 730 | #define PAGE_SECTION_MASK (~(PAGES_PER_SECTION-1)) |
722 | 731 | ||
732 | #define SECTION_BLOCKFLAGS_BITS \ | ||
733 | ((SECTION_SIZE_BITS - (MAX_ORDER-1)) * NR_PAGEBLOCK_BITS) | ||
734 | |||
723 | #if (MAX_ORDER - 1 + PAGE_SHIFT) > SECTION_SIZE_BITS | 735 | #if (MAX_ORDER - 1 + PAGE_SHIFT) > SECTION_SIZE_BITS |
724 | #error Allocator MAX_ORDER exceeds SECTION_SIZE | 736 | #error Allocator MAX_ORDER exceeds SECTION_SIZE |
725 | #endif | 737 | #endif |
@@ -739,6 +751,7 @@ struct mem_section { | |||
739 | * before using it wrong. | 751 | * before using it wrong. |
740 | */ | 752 | */ |
741 | unsigned long section_mem_map; | 753 | unsigned long section_mem_map; |
754 | DECLARE_BITMAP(pageblock_flags, SECTION_BLOCKFLAGS_BITS); | ||
742 | }; | 755 | }; |
743 | 756 | ||
744 | #ifdef CONFIG_SPARSEMEM_EXTREME | 757 | #ifdef CONFIG_SPARSEMEM_EXTREME |