# Re: \[PATCH v4 02/10\] mm, hugetlbfs: Allow an arch to always use generic versions of get\_unmapped\_area functions

- From: Nicholas Piggin \<npiggin@gmail.com\>
- Date: 2021-12-09 09:40:28 
- List: linuxppc-dev
- Page: https://ratatoskr.run/linuxppc-dev/2021/12/1602273
- Thread: https://ratatoskr.run/linux-mm/2021/12/1602273/t.md

```text
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@gmail.com>

> Signed-off-by: Christophe Leroy <redacted>
> ---
>  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(-)
> 
```
