Skip to content
Permalink
Browse files
mm/debug_vm_pgtables/hugevmap: Use the arch helper to identify huge v…
…map support.

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@linux.ibm.com>
  • Loading branch information
kvaneesh authored and intel-lab-lkp committed Aug 19, 2020
1 parent e77ce1a commit 260b675444a7d5afa9ccef47ca9e588fb18d01a3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
@@ -38,6 +38,18 @@ int arch_ioremap_pud_supported(void);
int arch_ioremap_pmd_supported(void);
#else
static inline void ioremap_huge_init(void) { }
static inline int arch_ioremap_p4d_supported(void)
{
return false;
}
static inline int arch_ioremap_pud_supported(void)
{
return false;
}
static inline int arch_ioremap_pmd_supported(void)
{
return false;
}
#endif

/*
@@ -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");
@@ -320,7 +320,7 @@ static void __init pud_huge_tests(pud_t *pudp, unsigned long pfn, pgprot_t prot)
{
pud_t pud;

if (!IS_ENABLED(CONFIG_HAVE_ARCH_HUGE_VMAP))
if (!arch_ioremap_pud_supported())
return;

pr_debug("Validating PUD huge\n");

0 comments on commit 260b675

Please sign in to comment.