[PATCH v3 03/21] powerpc/8xx: exception InstructionAccess does not exist on MPC8xx

Scott Wood scottwood at freescale.com
Fri Sep 19 04:56:40 EST 2014


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 <christophe.leroy at c-s.fr> 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 <christophe.leroy at c-s.fr>
> >>>
> >>> ---
> >>> 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




More information about the Linuxppc-dev mailing list