Re: [PATCH v8 04/14] drivers: dax: use pgtable_has_pmd_leaves()
From: Luiz Capitulino
Date: Sat Oct 03 2026 - 10:55:30 EST
On 10/2/26 3:15 PM, David Hildenbrand (Arm) wrote:
On 9/18/26 03:45, Luiz Capitulino wrote:
dax_align_valid() uses has_transparent_hugepage() to check if PMD-sized
pages are supported, use pgtable_has_pmd_leaves() instead.
Acked-by: David Hildenbrand (Red Hat) <david@xxxxxxxxxx>
Signed-off-by: Luiz Capitulino <luizcap@xxxxxxxxxx>
---
drivers/dax/dax-private.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/dax/dax-private.h b/drivers/dax/dax-private.h
index 607a53a91f58..18a6295aa766 100644
--- a/drivers/dax/dax-private.h
+++ b/drivers/dax/dax-private.h
@@ -121,7 +121,7 @@ static inline bool dax_align_valid(unsigned long align)
{
if (align == PUD_SIZE && IS_ENABLED(CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD))
return true;
- if (align == PMD_SIZE && has_transparent_hugepage())
+ if (align == PMD_SIZE && pgtable_has_pmd_leaves())
return true;
if (align == PAGE_SIZE)
return true;
The main part why we don't see any change is that dax_align_valid() is wrapped
in the #ifdef CONFIG_TRANSPARENT_HUGEPAGE today.
Might we worth spelling that out in the patch description.
OK, the new changelog reads:
"""
dax_align_valid() uses has_transparent_hugepage() to check if PMD-sized
pages are supported, use pgtable_has_pmd_leaves() instead.
No functional change intended since the call happens under the
CONFIG_TRANSPARENT_HUGEPAGE guard and when CONFIG_TRANSPARENT_HUGEPAGE=y
both functions return the same value.
"""