mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Scott Wood <scottwood@freescale.com>
To: christophe leroy <christophe.leroy@c-s.fr>
Cc: Joakim Tjernlund <joakim.tjernlund@transmode.se>,
	<linuxppc-dev@lists.ozlabs.org>, <linux-kernel@vger.kernel.org>,
	Paul Mackerras <paulus@samba.org>
Subject: Re: [PATCH v3 03/21] powerpc/8xx: exception InstructionAccess does not exist on MPC8xx
Date: Thu, 18 Sep 2014 13:56:40 -0500	[thread overview]
Message-ID: <1411066600.13320.12.camel@snotra.buserror.net> (raw)
In-Reply-To: <541B29DE.5090804@c-s.fr>

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@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@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



      reply	other threads:[~2014-09-18 18:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-17 16:36 Christophe Leroy
2014-09-18 15:15 ` Joakim Tjernlund
2014-09-18 16:42   ` leroy christophe
2014-09-18 18:12     ` Joakim Tjernlund
2014-09-18 19:11       ` christophe leroy
2014-09-18 20:02         ` Joakim Tjernlund
2014-09-19  7:38           ` leroy christophe
2014-09-18 18:52     ` christophe leroy
2014-09-18 18:56       ` Scott Wood [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1411066600.13320.12.camel@snotra.buserror.net \
    --to=scottwood@freescale.com \
    --cc=christophe.leroy@c-s.fr \
    --cc=joakim.tjernlund@transmode.se \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=paulus@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome