From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1on0131.outbound.protection.outlook.com [157.56.110.131]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 59BB71A08B8 for ; Fri, 19 Sep 2014 05:12:59 +1000 (EST) Message-ID: <1411066600.13320.12.camel@snotra.buserror.net> Subject: Re: [PATCH v3 03/21] powerpc/8xx: exception InstructionAccess does not exist on MPC8xx From: Scott Wood To: christophe leroy Date: Thu, 18 Sep 2014 13:56:40 -0500 In-Reply-To: <541B29DE.5090804@c-s.fr> References: <20140917163657.7737D1AB032@localhost.localdomain> <541B0B66.8030405@c-s.fr> <541B29DE.5090804@c-s.fr> Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Cc: Paul Mackerras , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Thu, 2014-09-18 at 20:52 +0200, christophe leroy wrote: > Le 18/09/2014 18:42, leroy christophe a écrit : > > > > Le 18/09/2014 17:15, Joakim Tjernlund a écrit : > >> Christophe Leroy wrote on 2014/09/17 18:36:57: > >>> Exception InstructionAccess does not exist on MPC8xx. No need to branch > >> there from somewhere else. > >>> Handling can be done directly in InstructionTLBError Exception. > >>> > >>> Signed-off-by: Christophe Leroy > >>> > >>> --- > >>> Changes in v2: > >>> - None > >>> > >>> Changes in v3: > >>> - arch/powerpc/mm/fault.c uses the vector number, so make sure it > >> understand > >>> the new ones. > >>> > >>> arch/powerpc/kernel/head_8xx.S | 17 +++++++---------- > >>> arch/powerpc/mm/fault.c | 1 + > >>> 2 files changed, 8 insertions(+), 10 deletions(-) > [...] > >>> Still don't like that you change the vector number, every other ppc > >>> uses > >> the > >> standard number. > >> > >> Can you not just lie here(EXC_XFER_LITE(0x400, handle_page_fault))? > >> Move the code to InstructionAccess too and let TLBError branch there. > > My issue was that if I do EXC_XFER_LITE(0x400, handle_page_fault), I > > can't leave the > > EXCEPTION(0x400, InstructionAccess, unknown_exception, > > EXC_XFER_STD) at address .400 > > Otherwise, I get twice the same label. > > > > What about the following patch then ? Would this be acceptable ? > I don't like what I propose two hours ago indeed. > Is it really worth trying to implement code for vectors 0x300 and 0x400 > which are clearly stated in the Reference Manual as never being > generated by the HW ?. > If I just don't put anything at 0x300 and 0x400 is that OK ? > Otherwise I have to put some code that will branch to TLBerror code, but > writing dead code doesn't enchant me. No, just have the one set of exception handlers that hardware will generate, and use the exception codes that Linux expects. E.g. exception codes are a giant lie on booke as well. It would be nice if we documented what linux wanted, though, instead of using magic numbers, and assuming it's the same as classic -- which especially fails when it's an exception type that doesn't exist on classic or book3s. -Scott