Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3yBCpW3gH0zDqlv for ; Tue, 10 Oct 2017 21:22:11 +1100 (AEDT) Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id v9AAJsmN072880 for ; Tue, 10 Oct 2017 06:22:08 -0400 Received: from e17.ny.us.ibm.com (e17.ny.us.ibm.com [129.33.205.207]) by mx0a-001b2d01.pphosted.com with ESMTP id 2dgurr9wpr-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Tue, 10 Oct 2017 06:22:08 -0400 Received: from localhost by e17.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 10 Oct 2017 06:22:07 -0400 Subject: Re: [PATCH] powerpc/64s/radix: fix preempt imbalance in TLB flush To: Nicholas Piggin , linuxppc-dev@lists.ozlabs.org References: <20171010101641.5714-1-npiggin@gmail.com> From: "Aneesh Kumar K.V" Date: Tue, 10 Oct 2017 15:52:02 +0530 MIME-Version: 1.0 In-Reply-To: <20171010101641.5714-1-npiggin@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Message-Id: List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On 10/10/2017 03:46 PM, Nicholas Piggin wrote: > Signed-off-by: Nicholas Piggin > --- > 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 b3e849c4886e..de414460287a 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 ? mm->context.id : 0; > 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; > } > Can't we do a preempt_disable before the if (local) check?. That way we don't need that prempt_enable in that PAGE_SIZE==0x1000 path.We already do disable/enable correctly in radix__flush_all_mm(mm) -aneesh