Re: [PATCH v4 02/10] mm, hugetlbfs: Allow an arch to always use generic versions of get_unmapped_area functions

From: Nicholas Piggin
Date: Thu Dec 09 2021 - 04:40:28 EST


Excerpts from Christophe Leroy's message of December 9, 2021 3:18 am:
> Unlike most architectures, powerpc can only define at runtime
> if it is going to use the generic arch_get_unmapped_area() or not.
>
> Today, powerpc has a copy of the generic arch_get_unmapped_area()
> because when selection HAVE_ARCH_UNMAPPED_AREA the generic
> arch_get_unmapped_area() is not available.
>
> Rename it generic_get_unmapped_area() and make it independent of
> HAVE_ARCH_UNMAPPED_AREA.
>
> Do the same for arch_get_unmapped_area_topdown() versus
> HAVE_ARCH_UNMAPPED_AREA_TOPDOWN.
>
> Do the same for hugetlb_get_unmapped_area() versus
> HAVE_ARCH_HUGETLB_UNMAPPED_AREA.
>

Reviewed-by: Nicholas Piggin <npiggin@xxxxxxxxx>

> Signed-off-by: Christophe Leroy <christophe.leroy@xxxxxxxxxx>
> ---
> fs/hugetlbfs/inode.c | 17 +++++++++++++----
> include/linux/hugetlb.h | 5 +++++
> include/linux/sched/mm.h | 9 +++++++++
> mm/mmap.c | 31 ++++++++++++++++++++++++-------
> 4 files changed, 51 insertions(+), 11 deletions(-)
>