[PATCH 17/17] mm/hugetlb: localize HUGE_BOOTMEM_ZONES_VALID

From: Muchun Song

Date: Thu Jul 02 2026 - 06:04:10 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>
---
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 99fcb25cc201..b11d964ac634 100644
--- a/include/linux/hugetlb.h
+++ b/include/linux/hugetlb.h
@@ -674,8 +674,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 5eae762c99d5..9aa2ebd45ca9 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -52,6 +52,8 @@
#include "hugetlb_internal.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