On 08/12/2020 12:03 PM, Aneesh Kumar K.V wrote: > ppc64 supports huge vmap only with radix translation. Hence use arch helper > to determine the huge vmap support. > > Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@xxxxxxxxxxxxx> > --- > mm/debug_vm_pgtable.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/mm/debug_vm_pgtable.c b/mm/debug_vm_pgtable.c > index 02a7c20aa4a2..679bb3d289a3 100644 > --- a/mm/debug_vm_pgtable.c > +++ b/mm/debug_vm_pgtable.c > @@ -206,7 +206,7 @@ static void __init pmd_huge_tests(pmd_t *pmdp, unsigned long pfn, pgprot_t prot) > { > pmd_t pmd; > > - if (!IS_ENABLED(CONFIG_HAVE_ARCH_HUGE_VMAP)) > + if (!arch_ioremap_pmd_supported()) > return; > > pr_debug("Validating PMD huge\n"); > Problem is arch_ioremap_pmd_supported() symbol which should also be explicitly included via <linux/io.h>, is not available without the config CONFIG_HAVE_ARCH_HUGE_VMAP. ioremap_pmd_enabled() should have been better here and has a fallback for !CONFIG_HAVE_ARCH_HUGE_VMAP. But then the symbol is local to that file. Unless we would like to make ioremap_pxx_enabled generally available, the remaining option would be to wrap pxx_huge_tests() with CONFIG_HAVE_ARCH_HUGE_VMAP. Similar changes should also be done for pud_huge_tests() as well.