From: Michael Ellerman <michael@ellerman.id.au>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Olof Johansson <olof@lixom.net>,
linuxppc-dev@ozlabs.org, paulus@samba.org, anton@samba.org
Subject: Re: [PATCH] powerpc: save trap number in bad_stack
Date: Fri, 20 Apr 2007 12:18:44 +1000 [thread overview]
Message-ID: <1177035524.6890.7.camel@concordia.ozlabs.ibm.com> (raw)
In-Reply-To: <1177024678.7286.23.camel@localhost.localdomain>
[-- Attachment #1: Type: text/plain, Size: 2136 bytes --]
On Fri, 2007-04-20 at 09:17 +1000, Benjamin Herrenschmidt wrote:
> On Mon, 2007-04-16 at 01:23 -0500, Olof Johansson wrote:
> > Save the trap number in the case of getting a bad stack in an exception
> > handler. It is sometimes useful to know what exception it was that caused
> > this to happen. Without this, no trap is reported.
> >
> >
> > Signed-off-by: Olof Johansson <olof@lixom.net>
> >
> > Index: linux-2.6/arch/powerpc/kernel/asm-offsets.c
> > ===================================================================
> > --- linux-2.6.orig/arch/powerpc/kernel/asm-offsets.c
> > +++ linux-2.6/arch/powerpc/kernel/asm-offsets.c
> > @@ -139,6 +139,7 @@ int main(void)
> > DEFINE(PACA_SYSTEM_TIME, offsetof(struct paca_struct, system_time));
> > DEFINE(PACA_SLBSHADOWPTR, offsetof(struct paca_struct, slb_shadow_ptr));
> > DEFINE(PACA_DATA_OFFSET, offsetof(struct paca_struct, data_offset));
> > + DEFINE(PACA_TRAP_SAVE, offsetof(struct paca_struct, trap_save));
> >
> > DEFINE(SLBSHADOW_STACKVSID,
> > offsetof(struct slb_shadow, save_area[SLB_NUM_BOLTED - 1].vsid));
> > Index: linux-2.6/include/asm-powerpc/paca.h
> > ===================================================================
> > --- linux-2.6.orig/include/asm-powerpc/paca.h
> > +++ linux-2.6/include/asm-powerpc/paca.h
> > @@ -81,6 +81,8 @@ struct paca_struct {
> > u64 exslb[10]; /* used for SLB/segment table misses
> > * on the linear mapping */
> >
> > + u64 trap_save; /* Used when bad stack is encountered */
>
> Can you put it elsewhere in the PACA (around less frequently used
> bits) ? This is a pretty hot area of the PACA...
It's only set in the bad_stack case though.
You should put it after cpu_start, there's a bit hole there, and
trap_save is readonly during normal operation, so it shouldn't be a
performance hit.
cheers
--
Michael Ellerman
OzLabs, IBM Australia Development Lab
wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)
We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2007-04-20 2:18 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-16 6:23 [PATCH] powerpc: save trap number in bad_stack Olof Johansson
2007-04-19 23:17 ` Benjamin Herrenschmidt
2007-04-20 2:18 ` Michael Ellerman [this message]
2007-04-20 8:51 ` Segher Boessenkool
2007-04-22 23:34 ` Olof Johansson
2007-04-22 23:38 ` [PATCH] [v2] " Olof Johansson
2007-04-23 9:29 ` Gabriel Paubert
2007-04-23 11:49 ` Olof Johansson
2007-04-23 12:19 ` [PATCH] [v3] " Olof Johansson
2007-04-23 15:11 ` [PATCH] [v4] " Olof Johansson
2007-04-23 15:34 ` Stephen Rothwell
2007-04-23 13:22 ` [PATCH] [v2] " Stephen Rothwell
2007-04-23 13:33 ` Michael Ellerman
2007-04-23 13:39 ` David Gibson
2007-04-23 13:54 ` Olof Johansson
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=1177035524.6890.7.camel@concordia.ozlabs.ibm.com \
--to=michael@ellerman.id.au \
--cc=anton@samba.org \
--cc=benh@kernel.crashing.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=olof@lixom.net \
--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;
as well as URLs for NNTP newsgroup(s).