Subject: Re: [PATCH] mm: add PTE pointer parameter to flush_tlb_fix_spurious_fault()

From: Michael Ellerman <[email-masked]>
Date: Tue, 07 Mar 2023 10:11:53 +1100

Gerald Schaefer <[email-masked]> writes:
> s390 can do more fine-grained handling of spurious TLB protection faults,
> when there also is the PTE pointer available.
>
> Therefore, pass on the PTE pointer to flush_tlb_fix_spurious_fault() as
> an additional parameter.
>
> This will add no functional change to other architectures, but those with
> private flush_tlb_fix_spurious_fault() implementations need to be made
> aware of the new parameter.
>
> Reviewed-by: Alexander Gordeev <[email-masked]>
> Signed-off-by: Gerald Schaefer <[email-masked]>
> ---
>  arch/arm64/include/asm/pgtable.h              |  2 +-
>  arch/mips/include/asm/pgtable.h               |  3 ++-
>  arch/powerpc/include/asm/book3s/64/tlbflush.h |  3 ++-
>  arch/s390/include/asm/pgtable.h               | 12 +++++++-----
>  arch/x86/include/asm/pgtable.h                |  2 +-
>  include/linux/pgtable.h                       |  2 +-
>  mm/memory.c                                   |  3 ++-
>  mm/pgtable-generic.c                          |  2 +-
>  8 files changed, 17 insertions(+), 12 deletions(-)
...
> diff --git a/arch/powerpc/include/asm/book3s/64/tlbflush.h b/arch/powerpc/include/asm/book3s/64/tlbflush.h
> index 2bbc0fcce04a..ff7f0ee179e5 100644
> --- a/arch/powerpc/include/asm/book3s/64/tlbflush.h
> +++ b/arch/powerpc/include/asm/book3s/64/tlbflush.h
> @@ -121,7 +121,8 @@ static inline void flush_tlb_page(struct vm_area_struct *vma,
>  
>  #define flush_tlb_fix_spurious_fault flush_tlb_fix_spurious_fault
>  static inline void flush_tlb_fix_spurious_fault(struct vm_area_struct *vma,
> -						unsigned long address)
> +						unsigned long address,
> +						pte_t *ptep)
>  {
>  	/*
>  	 * Book3S 64 does not require spurious fault flushes because the PTE

Acked-by: Michael Ellerman <[email-masked]> (powerpc)

cheers