[RFC PATCH v1 2/4] mm/hugetlb: Change parameters of arch_make_huge_pte()

Mike Kravetz mike.kravetz at oracle.com
Thu Apr 29 18:50:49 BST 2021


On 4/28/21 9:46 AM, Christophe Leroy wrote:
> At the time being, arch_make_huge_pte() has the following prototype:
> 
> 	pte_t arch_make_huge_pte(pte_t entry, struct vm_area_struct *vma,
> 				 struct page *page, int writable);
> 
> vma is used to get the pages shift or size.
> vma is also used on Sparc to get vm_flags.
> page is not used.
> writable is not used.
> 
> In order to use this function without a vma, and replace vma by shift
> and flags. Also remove the used parameters.
> 
> Signed-off-by: Christophe Leroy <christophe.leroy at csgroup.eu>
> ---
>  arch/arm64/include/asm/hugetlb.h                 | 3 +--
>  arch/arm64/mm/hugetlbpage.c                      | 5 ++---
>  arch/powerpc/include/asm/nohash/32/hugetlb-8xx.h | 5 ++---
>  arch/sparc/include/asm/pgtable_64.h              | 3 +--
>  arch/sparc/mm/hugetlbpage.c                      | 6 ++----
>  include/linux/hugetlb.h                          | 4 ++--
>  mm/hugetlb.c                                     | 6 ++++--
>  mm/migrate.c                                     | 4 +++-
>  8 files changed, 17 insertions(+), 19 deletions(-)

Hi Christophe,

Sorry, no suggestion for how to make a beautiful generic implementation.

This patch is straight forward.
Acked-by: Mike Kravetz <mike.kravetz at oracle.com>
-- 
Mike Kravetz



More information about the linux-arm-kernel mailing list