diff options
Diffstat (limited to 'include/linux/mmzone.h')
-rw-r--r-- | include/linux/mmzone.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 356a814e7c8e..c8f89417740b 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h | |||
@@ -1094,8 +1094,14 @@ static inline unsigned long early_pfn_to_nid(unsigned long pfn) | |||
1094 | #error Allocator MAX_ORDER exceeds SECTION_SIZE | 1094 | #error Allocator MAX_ORDER exceeds SECTION_SIZE |
1095 | #endif | 1095 | #endif |
1096 | 1096 | ||
1097 | #define pfn_to_section_nr(pfn) ((pfn) >> PFN_SECTION_SHIFT) | 1097 | static inline unsigned long pfn_to_section_nr(unsigned long pfn) |
1098 | #define section_nr_to_pfn(sec) ((sec) << PFN_SECTION_SHIFT) | 1098 | { |
1099 | return pfn >> PFN_SECTION_SHIFT; | ||
1100 | } | ||
1101 | static inline unsigned long section_nr_to_pfn(unsigned long sec) | ||
1102 | { | ||
1103 | return sec << PFN_SECTION_SHIFT; | ||
1104 | } | ||
1099 | 1105 | ||
1100 | #define SECTION_ALIGN_UP(pfn) (((pfn) + PAGES_PER_SECTION - 1) & PAGE_SECTION_MASK) | 1106 | #define SECTION_ALIGN_UP(pfn) (((pfn) + PAGES_PER_SECTION - 1) & PAGE_SECTION_MASK) |
1101 | #define SECTION_ALIGN_DOWN(pfn) ((pfn) & PAGE_SECTION_MASK) | 1107 | #define SECTION_ALIGN_DOWN(pfn) ((pfn) & PAGE_SECTION_MASK) |