return err;
}
#endif /* CONFIG_FINEGRAINED_THP */
-
+#ifdef CONFIG_TRANSPARENT_HUGEPAGE
static int remap_try_huge_pmd(struct mm_struct *mm, pmd_t *pmd, unsigned long addr,
unsigned long end, unsigned long pfn,
pgprot_t prot)
return ret;
}
+#endif /* CONFIG_TRANSPARENT_HUGEPAGE */
static inline int remap_pmd_range(struct mm_struct *mm, pud_t *pud,
unsigned long addr, unsigned long end,
do {
next = pmd_addr_end(addr, end);
+#ifdef CONFIG_TRANSPARENT_HUGEPAGE
if (remap_try_huge_pmd(mm, pmd, addr, next,
pfn + (addr >> PAGE_SHIFT), prot))
continue;
-
+#endif /* CONFIG_TRANSPARENT_HUGEPAGE */
err = remap_pte_range(mm, pmd, addr, next,
pfn + (addr >> PAGE_SHIFT), prot);
if (err)