diff options
Diffstat (limited to 'include/linux/pageblock-flags.h')
-rw-r--r-- | include/linux/pageblock-flags.h | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/include/linux/pageblock-flags.h b/include/linux/pageblock-flags.h index 5456da6b4ad..9ea130829fb 100644 --- a/include/linux/pageblock-flags.h +++ b/include/linux/pageblock-flags.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * Macros for manipulating and testing flags related to a | 2 | * Macros for manipulating and testing flags related to a |
3 | * MAX_ORDER_NR_PAGES block of pages. | 3 | * pageblock_nr_pages number of pages. |
4 | * | 4 | * |
5 | * This program is free software; you can redistribute it and/or modify | 5 | * This program is free software; you can redistribute it and/or modify |
6 | * it under the terms of the GNU General Public License as published by | 6 | * it under the terms of the GNU General Public License as published by |
@@ -35,6 +35,29 @@ enum pageblock_bits { | |||
35 | NR_PAGEBLOCK_BITS | 35 | NR_PAGEBLOCK_BITS |
36 | }; | 36 | }; |
37 | 37 | ||
38 | #ifdef CONFIG_HUGETLB_PAGE | ||
39 | |||
40 | #ifdef CONFIG_HUGETLB_PAGE_SIZE_VARIABLE | ||
41 | |||
42 | /* Huge page sizes are variable */ | ||
43 | extern int pageblock_order; | ||
44 | |||
45 | #else /* CONFIG_HUGETLB_PAGE_SIZE_VARIABLE */ | ||
46 | |||
47 | /* Huge pages are a constant size */ | ||
48 | #define pageblock_order HUGETLB_PAGE_ORDER | ||
49 | |||
50 | #endif /* CONFIG_HUGETLB_PAGE_SIZE_VARIABLE */ | ||
51 | |||
52 | #else /* CONFIG_HUGETLB_PAGE */ | ||
53 | |||
54 | /* If huge pages are not used, group by MAX_ORDER_NR_PAGES */ | ||
55 | #define pageblock_order (MAX_ORDER-1) | ||
56 | |||
57 | #endif /* CONFIG_HUGETLB_PAGE */ | ||
58 | |||
59 | #define pageblock_nr_pages (1UL << pageblock_order) | ||
60 | |||
38 | /* Forward declaration */ | 61 | /* Forward declaration */ |
39 | struct page; | 62 | struct page; |
40 | 63 | ||