Re: [PATCH v8 12/14] treewide: introduce arch_has_pmd_leaves()
From: Zi Yan
Date: Mon Sep 21 2026 - 22:29:49 EST
On Thu Sep 17, 2026 at 9:45 PM EDT, Luiz Capitulino wrote:
> Now that all the has_transparent_hugepage() callers have been converted
> to pgtable_has_pmd_leaves(), this commit does two things:
>
> 1. Rename has_transparent_hugepage() arch implementations to
> arch_has_pmd_leaves(), since that's what the helper checks for
>
> 2. Introduce the default implementation of arch_has_pmd_leaves() as
> IS_ENABLED(CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE). This means that if
> the arch doesn't implement arch_has_pmd_leaves() we default to checking
> CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE as a way to determine if
> PMD-sized pages are supported
>
> Note that arch_has_pmd_leaves() is supposed to be called only by
> pgtable_leaf_support_init(). The remaining exception is hugepage_init()
> which will be converted in a future commit.
>
> Signed-off-by: Luiz Capitulino <luizcap@xxxxxxxxxx>
> ---
> arch/mips/include/asm/pgtable.h | 4 ++--
> arch/mips/mm/pgtable.c | 6 +++---
> arch/powerpc/include/asm/book3s/64/hash-4k.h | 2 +-
> arch/powerpc/include/asm/book3s/64/hash-64k.h | 2 +-
> arch/powerpc/include/asm/book3s/64/pgtable.h | 10 +++++-----
> arch/powerpc/include/asm/book3s/64/radix.h | 2 +-
> arch/powerpc/mm/book3s64/hash_pgtable.c | 4 ++--
> arch/s390/include/asm/pgtable.h | 4 ++--
> arch/x86/include/asm/pgtable.h | 4 ++--
> include/linux/pgtable.h | 4 ++--
> mm/huge_memory.c | 2 +-
> mm/memory.c | 2 +-
> 12 files changed, 23 insertions(+), 23 deletions(-)
>
Acked-by: Zi Yan <ziy@xxxxxxxxxx>
--
Best Regards,
Yan, Zi