[RFC v1 09/10] powerpc: book3s64: Make use of H_RPTI_TYPE_ALL macro

Christophe Leroy (CS GROUP) chleroy at kernel.org
Wed Mar 4 20:07:10 AEDT 2026



Le 25/02/2026 à 12:04, Ritesh Harjani (IBM) a écrit :
> Instead of opencoding, let's use the pre-defined macro (H_RPTI_TYPE_ALL)
> at the following places.
> 
> Signed-off-by: Ritesh Harjani (IBM) <ritesh.list at gmail.com>

Reviewed-by: Christophe Leroy (CS GROUP) <chleroy at kernel.org>

> ---
>   arch/powerpc/mm/book3s64/radix_tlb.c | 9 +++------
>   1 file changed, 3 insertions(+), 6 deletions(-)
> 
> diff --git a/arch/powerpc/mm/book3s64/radix_tlb.c b/arch/powerpc/mm/book3s64/radix_tlb.c
> index 6ce94eaefc1b..7de5760164a9 100644
> --- a/arch/powerpc/mm/book3s64/radix_tlb.c
> +++ b/arch/powerpc/mm/book3s64/radix_tlb.c
> @@ -885,8 +885,7 @@ static void __flush_all_mm(struct mm_struct *mm, bool fullmm)
>   	} else if (type == FLUSH_TYPE_GLOBAL) {
>   		if (!mmu_has_feature(MMU_FTR_GTSE)) {
>   			unsigned long tgt = H_RPTI_TARGET_CMMU;
> -			unsigned long type = H_RPTI_TYPE_TLB | H_RPTI_TYPE_PWC |
> -					     H_RPTI_TYPE_PRT;
> +			unsigned long type = H_RPTI_TYPE_ALL;
>   
>   			if (atomic_read(&mm->context.copros) > 0)
>   				tgt |= H_RPTI_TARGET_NMMU;
> @@ -982,8 +981,7 @@ void radix__flush_tlb_kernel_range(unsigned long start, unsigned long end)
>   {
>   	if (!mmu_has_feature(MMU_FTR_GTSE)) {
>   		unsigned long tgt = H_RPTI_TARGET_CMMU | H_RPTI_TARGET_NMMU;
> -		unsigned long type = H_RPTI_TYPE_TLB | H_RPTI_TYPE_PWC |
> -				     H_RPTI_TYPE_PRT;
> +		unsigned long type = H_RPTI_TYPE_ALL;
>   
>   		pseries_rpt_invalidate(0, tgt, type, H_RPTI_PAGE_ALL,
>   				       start, end);
> @@ -1337,8 +1335,7 @@ void radix__flush_tlb_collapsed_pmd(struct mm_struct *mm, unsigned long addr)
>   			unsigned long tgt, type, pg_sizes;
>   
>   			tgt = H_RPTI_TARGET_CMMU;
> -			type = H_RPTI_TYPE_TLB | H_RPTI_TYPE_PWC |
> -			       H_RPTI_TYPE_PRT;
> +			type = H_RPTI_TYPE_ALL;
>   			pg_sizes = psize_to_rpti_pgsize(mmu_virtual_psize);
>   
>   			if (atomic_read(&mm->context.copros) > 0)



More information about the Linuxppc-dev mailing list