|
@@ -200,6 +200,12 @@ static inline int next_present_section_nr(int section_nr)
|
|
|
(section_nr <= __highest_present_section_nr)); \
|
|
(section_nr <= __highest_present_section_nr)); \
|
|
|
section_nr = next_present_section_nr(section_nr))
|
|
section_nr = next_present_section_nr(section_nr))
|
|
|
|
|
|
|
|
|
|
+/*
|
|
|
|
|
+ * Record how many memory sections are marked as present
|
|
|
|
|
+ * during system bootup.
|
|
|
|
|
+ */
|
|
|
|
|
+static int __initdata nr_present_sections;
|
|
|
|
|
+
|
|
|
/* Record a memory area against a node. */
|
|
/* Record a memory area against a node. */
|
|
|
void __init memory_present(int nid, unsigned long start, unsigned long end)
|
|
void __init memory_present(int nid, unsigned long start, unsigned long end)
|
|
|
{
|
|
{
|
|
@@ -229,6 +235,7 @@ void __init memory_present(int nid, unsigned long start, unsigned long end)
|
|
|
ms->section_mem_map = sparse_encode_early_nid(nid) |
|
|
ms->section_mem_map = sparse_encode_early_nid(nid) |
|
|
|
SECTION_IS_ONLINE;
|
|
SECTION_IS_ONLINE;
|
|
|
section_mark_present(ms);
|
|
section_mark_present(ms);
|
|
|
|
|
+ nr_present_sections++;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|