From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Kumar Gala <galak@kernel.crashing.org>
Cc: linuxppc-dev@ozlabs.org, Paul Mackerras <paulus@samba.org>
Subject: Re: [PATCH] [POWERPC] Rework EXC_LEVEL_EXCEPTION_PROLOG code
Date: Thu, 01 May 2008 08:22:10 +1000 [thread overview]
Message-ID: <1209594130.18023.258.camel@pasglop> (raw)
In-Reply-To: <12ECF63E-7CEA-48FD-9447-7D534C29271D@kernel.crashing.org>
On Wed, 2008-04-30 at 17:13 -0500, Kumar Gala wrote:
>
> If we don't handle reschedule or signal will we actually not
> function
> properly? I assume reschedule isn't an issue, but could we lose a
> signal?
Well, you can be in trouble if you lose TIF_SIGPENDING. You don't -have-
to actually take the signal, it will then be done on the next return to
userspace (next timer interrupt, next syscall, ...), but TIF_SIGPENDING
must not be lost.
> > Nothing specific to your patch, but those level##_STACK_TOP seem to
> > be pretty badly named if you end up -adding- THREAD_SIZE to actually
> > get to the stack's top. Do they really contain the stack top or do
> > they in fact contain the stack base/bottom ?
>
> That might be stale from how the old code worked. I can never
> remember what we consider the top and bottom of the stack. (please
> remind me and I'll fixup the comments and variables).
Well, top is the high address and bottom is the low address in my view
of things :-)
> I thought about that. The only case its a bit of an issue is for
> CriticalInput. I don't see Watchdog, Debug, or MachineCheck as
> being
> performance critical. I can use r10 if I save and restored the CR
> or
> some other register.
You can save CR first yeah and then interleave a bit using 2 registers
(ie. 2 loads, 2 stores, or something like load 1, load 2, store 1, load
3, store 2, etc...)
> just leaving it to C code. I assume that preempt_count should be
> the
> same value on entry and exit. Do think we should set HARDIRQ_OFFSET
> for debug level exceptions?
Well... I think all those things should run with EE disabled, and thus
be considered as far as linux is concerned, as interrupts. So the C code
should do irq_enter/exit.
> Where should I look for an example of how to convey that information
> to lockdep?
The irqtrace stuff in the asm would do maybe unless transfer_to_handler
does it already, I have to look at the code with all your patches
applied...
Ben.
next prev parent reply other threads:[~2008-04-30 22:22 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-30 9:27 [PATCH] [POWERPC] Rework EXC_LEVEL_EXCEPTION_PROLOG code Kumar Gala
2008-04-30 21:54 ` Benjamin Herrenschmidt
2008-04-30 22:13 ` Kumar Gala
2008-04-30 22:18 ` Benjamin Herrenschmidt
2008-04-30 23:24 ` Kumar Gala
2008-04-30 22:22 ` Benjamin Herrenschmidt [this message]
2008-04-30 23:28 ` Kumar Gala
2008-04-30 23:52 ` Benjamin Herrenschmidt
2008-04-30 23:47 ` Paul Mackerras
2008-05-01 6:01 ` Kumar Gala
2008-05-01 7:53 ` Benjamin Herrenschmidt
2008-05-01 13:22 ` Kumar Gala
2008-05-01 14:26 ` Josh Boyer
2008-05-01 14:31 ` Kumar Gala
2008-05-05 11:57 ` Gabriel Paubert
2008-05-05 12:06 ` Benjamin Herrenschmidt
2008-05-01 8:24 ` Paul Mackerras
2008-05-01 13:17 ` Kumar Gala
2008-05-01 16:14 ` Scott Wood
2008-05-01 16:22 ` Scott Wood
2008-05-01 16:33 ` Kumar Gala
2008-05-01 16:42 ` Scott Wood
2008-05-01 17:48 ` Kumar Gala
2008-05-01 19:02 ` Scott Wood
2008-05-01 23:34 ` Paul Mackerras
2008-05-02 4:02 ` Kumar Gala
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=1209594130.18023.258.camel@pasglop \
--to=benh@kernel.crashing.org \
--cc=galak@kernel.crashing.org \
--cc=linuxppc-dev@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;
as well as URLs for NNTP newsgroup(s).