From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756974AbdDRL2n (ORCPT ); Tue, 18 Apr 2017 07:28:43 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:39075 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756350AbdDRL2l (ORCPT ); Tue, 18 Apr 2017 07:28:41 -0400 Subject: Re: [PATCH] powerpc/32: Remove redundant test in transfer_to_handler() To: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Scott Wood References: <20170414133148.A458B6E5FA@localhost.localdomain> Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org From: Christophe LEROY Message-ID: <8a7bb4c6-6366-cb0d-5c9f-4f1809b9a3a3@c-s.fr> Date: Tue, 18 Apr 2017 13:27:50 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20170414133148.A458B6E5FA@localhost.localdomain> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 14/04/2017 à 15:31, Christophe Leroy a écrit : > As stated in the comment on top of transfer_to_handler(), > all callers set cr0.eq if the exception occurred in kernel mode > (i.e. MSR:PR = 0) > > Therefore, it is not needed to do the test again Indeed, all callers set cr0.eq as required .... except that some of them just destroy it by inserting another test before calling transfer_to_handler(). So this patch cannot be applied as is at the time being. Christophe > > Signed-off-by: Christophe Leroy > --- > arch/powerpc/kernel/entry_32.S | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/arch/powerpc/kernel/entry_32.S b/arch/powerpc/kernel/entry_32.S > index a38600949f3a..0651a7438fa6 100644 > --- a/arch/powerpc/kernel/entry_32.S > +++ b/arch/powerpc/kernel/entry_32.S > @@ -141,7 +141,6 @@ transfer_to_handler: > stw r2,GPR2(r11) > stw r12,_NIP(r11) > stw r9,_MSR(r11) > - andi. r2,r9,MSR_PR > mfctr r12 > mfspr r2,SPRN_XER > stw r12,_CTR(r11) >