A future commit will introduce a kernel API to allow for checking if the CPU supports PMD-sized pages. This API will be based on the has_transparent_hugepage() implementation but will be orthogonal to THP and therefore must work when CONFIG_TRANSPARENT_HUGEPAGE=n. Move its definition out of the THP guard. Signed-off-by: Luiz Capitulino --- arch/s390/include/asm/pgtable.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/s390/include/asm/pgtable.h b/arch/s390/include/asm/pgtable.h index e882663a58e7..5aa8f621df04 100644 --- a/arch/s390/include/asm/pgtable.h +++ b/arch/s390/include/asm/pgtable.h @@ -1825,13 +1825,13 @@ static inline int pmd_trans_huge(pmd_t pmd) { return pmd_leaf(pmd); } +#endif /* CONFIG_TRANSPARENT_HUGEPAGE */ #define has_transparent_hugepage has_transparent_hugepage static inline int has_transparent_hugepage(void) { return cpu_has_edat1() ? 1 : 0; } -#endif /* CONFIG_TRANSPARENT_HUGEPAGE */ #ifdef CONFIG_PAGE_TABLE_CHECK static inline bool pte_user_accessible_page(struct mm_struct *mm, unsigned long addr, pte_t pte) -- 2.55.0