Skip to content

Commit

Permalink
powerpc/mm: Fix build break with RADIX=y & HUGETLBFS=n
Browse files Browse the repository at this point in the history
If we enable RADIX but disable HUGETLBFS, the build breaks with:

  arch/powerpc/mm/pgtable-radix.c:557:7: error: implicit declaration of function 'pmd_huge'
  arch/powerpc/mm/pgtable-radix.c:588:7: error: implicit declaration of function 'pud_huge'

Fix it by stubbing those functions when HUGETLBFS=n.

Fixes: 4b5d62c ("powerpc/mm: add radix__remove_section_mapping()")
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
  • Loading branch information
Michael Ellerman committed Feb 14, 2017
1 parent b0b5a76 commit aad71e3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions arch/powerpc/include/asm/book3s/64/pgtable-4k.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,12 @@ static inline int hugepd_ok(hugepd_t hpd)
return hash__hugepd_ok(hpd);
}
#define is_hugepd(hpd) (hugepd_ok(hpd))

#else /* !CONFIG_HUGETLB_PAGE */
static inline int pmd_huge(pmd_t pmd) { return 0; }
static inline int pud_huge(pud_t pud) { return 0; }
#endif /* CONFIG_HUGETLB_PAGE */

#endif /* __ASSEMBLY__ */

#endif /*_ASM_POWERPC_BOOK3S_64_PGTABLE_4K_H */
3 changes: 3 additions & 0 deletions arch/powerpc/include/asm/book3s/64/pgtable-64k.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ static inline int hugepd_ok(hugepd_t hpd)
}
#define is_hugepd(pdep) 0

#else /* !CONFIG_HUGETLB_PAGE */
static inline int pmd_huge(pmd_t pmd) { return 0; }
static inline int pud_huge(pud_t pud) { return 0; }
#endif /* CONFIG_HUGETLB_PAGE */

static inline int remap_4k_pfn(struct vm_area_struct *vma, unsigned long addr,
Expand Down

0 comments on commit aad71e3

Please sign in to comment.