summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/mmzone.h27
1 files changed, 10 insertions, 17 deletions
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index 5c052c08d9aa..3b96d6c7123b 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -2059,7 +2059,6 @@ static inline struct mem_section *__nr_to_section(unsigned long nr)
* accommodate SECTION_MAP_LAST_BIT. We use BUILD_BUG_ON() to ensure this.
*/
enum {
- SECTION_MARKED_PRESENT_BIT,
SECTION_HAS_MEM_MAP_BIT,
SECTION_IS_ONLINE_BIT,
SECTION_IS_EARLY_BIT,
@@ -2069,7 +2068,6 @@ enum {
SECTION_MAP_LAST_BIT,
};
-#define SECTION_MARKED_PRESENT BIT(SECTION_MARKED_PRESENT_BIT)
#define SECTION_HAS_MEM_MAP BIT(SECTION_HAS_MEM_MAP_BIT)
#define SECTION_IS_ONLINE BIT(SECTION_IS_ONLINE_BIT)
#define SECTION_IS_EARLY BIT(SECTION_IS_EARLY_BIT)
@@ -2086,16 +2084,6 @@ static inline struct page *__section_mem_map_addr(struct mem_section *section)
return (struct page *)map;
}
-static inline int present_section(const struct mem_section *section)
-{
- return (section && (section->section_mem_map & SECTION_MARKED_PRESENT));
-}
-
-static inline int present_section_nr(unsigned long nr)
-{
- return present_section(__nr_to_section(nr));
-}
-
static inline int valid_section(const struct mem_section *section)
{
return (section && (section->section_mem_map & SECTION_HAS_MEM_MAP));
@@ -2111,6 +2099,11 @@ static inline int valid_section_nr(unsigned long nr)
return valid_section(__nr_to_section(nr));
}
+static inline int early_section_nr(unsigned long nr)
+{
+ return early_section(__nr_to_section(nr));
+}
+
static inline int online_section(const struct mem_section *section)
{
return (section && (section->section_mem_map & SECTION_IS_ONLINE));
@@ -2300,20 +2293,20 @@ static inline unsigned long next_valid_pfn(unsigned long pfn, unsigned long end_
#endif
-static inline unsigned long next_present_section_nr(unsigned long section_nr)
+static inline unsigned long next_early_section_nr(unsigned long section_nr)
{
while (++section_nr <= __highest_used_section_nr) {
- if (present_section_nr(section_nr))
+ if (early_section_nr(section_nr))
return section_nr;
}
return -1;
}
-#define for_each_present_section_nr(start, section_nr) \
- for (section_nr = next_present_section_nr(start - 1); \
+#define for_each_early_section_nr(start, section_nr) \
+ for (section_nr = next_early_section_nr(start - 1); \
section_nr != -1; \
- section_nr = next_present_section_nr(section_nr))
+ section_nr = next_early_section_nr(section_nr))
/*
* These are _only_ used during initialisation, therefore they