On 5/7/20 8:07 PM, Anshuman Khandual wrote: > There are multiple similar definitions for is_hugepage_only_range() on > various platforms. Lets just add it's generic fallback definition for > platforms that do not override. This help reduce code duplication. > > Cc: Russell King <[email protected]> > Cc: Catalin Marinas <[email protected]> > Cc: Will Deacon <[email protected]> > Cc: Tony Luck <[email protected]> > Cc: Fenghua Yu <[email protected]> > Cc: Thomas Bogendoerfer <[email protected]> > Cc: "James E.J. Bottomley" <[email protected]> > Cc: Helge Deller <[email protected]> > Cc: Benjamin Herrenschmidt <[email protected]> > Cc: Paul Mackerras <[email protected]> > Cc: Michael Ellerman <[email protected]> > Cc: Paul Walmsley <[email protected]> > Cc: Palmer Dabbelt <[email protected]> > Cc: Heiko Carstens <[email protected]> > Cc: Vasily Gorbik <[email protected]> > Cc: Christian Borntraeger <[email protected]> > Cc: Yoshinori Sato <[email protected]> > Cc: Rich Felker <[email protected]> > Cc: "David S. Miller" <[email protected]> > Cc: Thomas Gleixner <[email protected]> > Cc: Ingo Molnar <[email protected]> > Cc: Borislav Petkov <[email protected]> > Cc: "H. Peter Anvin" <[email protected]> > Cc: Mike Kravetz <[email protected]> > Cc: Andrew Morton <[email protected]> > Cc: [email protected] > Cc: [email protected] > Cc: [email protected] > Cc: [email protected] > Cc: [email protected] > Cc: [email protected] > Cc: [email protected] > Cc: [email protected] > Cc: [email protected] > Cc: [email protected] > Cc: [email protected] > Cc: [email protected] > Cc: [email protected] > Signed-off-by: Anshuman Khandual <[email protected]> > --- > arch/arm/include/asm/hugetlb.h | 6 ------ > arch/arm64/include/asm/hugetlb.h | 6 ------ > arch/ia64/include/asm/hugetlb.h | 1 + > arch/mips/include/asm/hugetlb.h | 7 ------- > arch/parisc/include/asm/hugetlb.h | 6 ------ > arch/powerpc/include/asm/hugetlb.h | 1 + > arch/riscv/include/asm/hugetlb.h | 6 ------ > arch/s390/include/asm/hugetlb.h | 7 ------- > arch/sh/include/asm/hugetlb.h | 6 ------ > arch/sparc/include/asm/hugetlb.h | 6 ------ > arch/x86/include/asm/hugetlb.h | 6 ------ > include/linux/hugetlb.h | 9 +++++++++ > 12 files changed, 11 insertions(+), 56 deletions(-) > <snip> > diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h > index 43a1cef8f0f1..c01c0c6f7fd4 100644 > --- a/include/linux/hugetlb.h > +++ b/include/linux/hugetlb.h > @@ -591,6 +591,15 @@ static inline unsigned int blocks_per_huge_page(struct > hstate *h) > > #include <asm/hugetlb.h> > > +#ifndef is_hugepage_only_range > +static inline int is_hugepage_only_range(struct mm_struct *mm, > + unsigned long addr, unsigned long len) > +{ > + return 0; > +} > +#define is_hugepage_only_range is_hugepage_only_range > +#endif > + > #ifndef arch_make_huge_pte > static inline pte_t arch_make_huge_pte(pte_t entry, struct vm_area_struct > *vma, > struct page *page, int writable) >
Did you try building without CONFIG_HUGETLB_PAGE defined? I'm guessing that you need a stub for is_hugepage_only_range(). Or, perhaps add this to asm-generic/hugetlb.h? -- Mike Kravetz

