[PATCH v2 1/3] powerpc/64s/radix: fix preempt imbalance in TLB flush

Aneesh Kumar K.V aneesh.kumar at linux.vnet.ibm.com
Thu Oct 26 17:52:29 AEDT 2017


Nicholas Piggin <npiggin at gmail.com> writes:


Reviewed-by: Aneesh Kumar K.V <aneesh.kumar at linux.vnet.ibm.com>

> Signed-off-by: Nicholas Piggin <npiggin at gmail.com>
> ---
>  arch/powerpc/mm/tlb-radix.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/mm/tlb-radix.c b/arch/powerpc/mm/tlb-radix.c
> index 3a07d7a5e2fe..892544ebc2d2 100644
> --- a/arch/powerpc/mm/tlb-radix.c
> +++ b/arch/powerpc/mm/tlb-radix.c
> @@ -358,7 +358,7 @@ void radix__flush_tlb_collapsed_pmd(struct mm_struct *mm, unsigned long addr)
>  	unsigned long ap = mmu_get_ap(mmu_virtual_psize);
>  	unsigned long pid, end;
>
> -
> +	preempt_disable();
>  	pid = mm->context.id;
>  	if (unlikely(pid == MMU_NO_CONTEXT))
>  		goto no_context;
> @@ -366,6 +366,7 @@ void radix__flush_tlb_collapsed_pmd(struct mm_struct *mm, unsigned long addr)
>  	/* 4k page size, just blow the world */
>  	if (PAGE_SIZE == 0x1000) {
>  		radix__flush_all_mm(mm);
> +		preempt_enable();
>  		return;
>  	}
>
> -- 
> 2.13.3



More information about the Linuxppc-dev mailing list