summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mm/sparse.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/mm/sparse.c b/mm/sparse.c
index b5b2b6f7041b..dfabe554adf8 100644
--- a/mm/sparse.c
+++ b/mm/sparse.c
@@ -600,6 +600,11 @@ void __init sparse_init(void)
BUILD_BUG_ON(!is_power_of_2(sizeof(struct mem_section)));
memblocks_present();
+ if (compound_info_has_mask()) {
+ VM_WARN_ON_ONCE(!IS_ALIGNED((unsigned long) pfn_to_page(0),
+ MAX_FOLIO_VMEMMAP_ALIGN));
+ }
+
pnum_begin = first_present_section_nr();
nid_begin = sparse_early_nid(__nr_to_section(pnum_begin));