[PATCH v2 17/17] mm/hugetlb: localize HUGE_BOOTMEM_ZONES_VALID
From: Muchun Song
Date: Mon Jul 20 2026 - 05:41:44 EST
HUGE_BOOTMEM_ZONES_VALID is only used by the huge_bootmem_page flag
handling in mm/hugetlb.c. Keep the definition next to that private data
structure instead of exposing it through the public hugetlb header.
No functional change is intended.
Signed-off-by: Muchun Song <songmuchun@xxxxxxxxxxxxx>
Acked-by: Mike Rapoport (Microsoft) <rppt@xxxxxxxxxx>
---
v2:
- Collect Acked-by from Mike Rapoport
---
include/linux/hugetlb.h | 2 --
mm/hugetlb.c | 2 ++
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h
index 255a258f11d1..900c95e346b2 100644
--- a/include/linux/hugetlb.h
+++ b/include/linux/hugetlb.h
@@ -675,8 +675,6 @@ struct hstate {
char name[HSTATE_NAME_LEN];
};
-#define HUGE_BOOTMEM_ZONES_VALID BIT(0)
-
int isolate_or_dissolve_huge_folio(struct folio *folio, struct list_head *list);
int replace_free_hugepage_folios(unsigned long start_pfn, unsigned long end_pfn);
void wait_for_freed_hugetlb_folios(void);
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index 364fdf254e78..47e3147ddc12 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -55,6 +55,8 @@
#include "sparse.h"
#include <linux/page-isolation.h>
+#define HUGE_BOOTMEM_ZONES_VALID BIT(0)
+
struct huge_bootmem_page {
struct list_head list;
struct hstate *hstate;
--
2.54.0