Re: [PATCH v3 1/4] hugetlb: Pass vma into huge_pte_alloc() and huge_pmd_share()

From: Peter Xu
Date: Thu Feb 18 2021 - 17:29:47 EST


On Thu, Feb 18, 2021 at 02:13:52PM -0800, Mike Kravetz wrote:
> On 2/18/21 1:54 PM, Peter Xu wrote:
> > It is a preparation work to be able to behave differently in the per
> > architecture huge_pte_alloc() according to different VMA attributes.
>
> > diff --git a/arch/sparc/mm/hugetlbpage.c b/arch/sparc/mm/hugetlbpage.c
> > index ad4b42f04988..97e0824fdbe7 100644
> > --- a/arch/sparc/mm/hugetlbpage.c
> > +++ b/arch/sparc/mm/hugetlbpage.c
> > @@ -280,6 +280,7 @@ unsigned long pmd_leaf_size(pmd_t pmd) { return 1UL << tte_to_shift(*(pte_t *)&p
> > unsigned long pte_leaf_size(pte_t pte) { return 1UL << tte_to_shift(pte); }
> >
> > pte_t *huge_pte_alloc(struct mm_struct *mm,
> > +pte_t *huge_pte_alloc(struct mm_struct *mm, struct vm_area_struct *vma,
> > unsigned long addr, unsigned long sz)
> > {
> > pgd_t *pgd;
>
> Didn't kernel test robot report this build error on the first patch series?

That seems to be irrelevant of this series:

arch/sparc/mm/hugetlbpage.c:269:22: error: 'huge_tte_to_size' defined but not used [-Werror=unused-function]

Thanks,

--
Peter Xu