[PATCH 8/8] mm: remove thp_size() and thp_order()
From: Tal Zussman
Date: Mon Nov 02 2026 - 18:34:48 EST
The last callers of thp_size() have been converted to folio_size(), and
thp_order()'s only remaining user was thp_size() itself, so remove
both.
Acked-by: David Hildenbrand (Arm) <david@xxxxxxxxxx>
Signed-off-by: Tal Zussman <tz2294@xxxxxxxxxxxx>
---
include/linux/mm.h | 21 ---------------------
1 file changed, 21 deletions(-)
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 8b5883878538..143865580169 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -2146,27 +2146,6 @@ static inline unsigned int page_shift(struct page *page)
return PAGE_SHIFT + compound_order(page);
}
-/**
- * thp_order - Order of a transparent huge page.
- * @page: Head page of a transparent huge page.
- */
-static inline unsigned int thp_order(struct page *page)
-{
- VM_BUG_ON_PGFLAGS(PageTail(page), page);
- return compound_order(page);
-}
-
-/**
- * thp_size - Size of a transparent huge page.
- * @page: Head page of a transparent huge page.
- *
- * Return: Number of bytes in this page.
- */
-static inline unsigned long thp_size(struct page *page)
-{
- return PAGE_SIZE << thp_order(page);
-}
-
#ifdef CONFIG_MMU
/*
* Do pte_mkwrite, but only if the vma says VM_WRITE. We do this when
--
2.39.5