Re: [RFC 03/10] drivers: dax: use pgtable_has_pmd_leaves()

From: David Hildenbrand (Red Hat)
Date: Mon Nov 17 2025 - 12:33:55 EST


On 06.11.25 22:28, Luiz Capitulino wrote:
dav_align_valid() uses has_transparent_hugepage() to check if PMD-sized
pages are supported, use pgtable_has_pmd_leaves() instead.

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 0867115aeef2..10aeaec9e789 100644
--- a/drivers/dax/dax-private.h
+++ b/drivers/dax/dax-private.h
@@ -117,7 +117,7 @@ static inline bool dax_align_valid(unsigned long align)
{
if (align == PUD_SIZE && IS_ENABLED(CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD))

As discussed offlist, it would be great to later also have this be

if (align == PUD_SIZE && pgtable_has_pud_leaves()

Acked-by: David Hildenbrand (Red Hat) <david@xxxxxxxxxx>

--
Cheers

David