[Linux-Xtensa] [PATCH 2/8] xtensa: keep exception/interrupt stack continuous
Max Filippov
jcmvbkbc at gmail.com
Tue Jul 7 19:46:33 UTC 2015
Hi Chris,
On Tue, Jul 7, 2015 at 9:47 PM, Chris Zankel <chris at zankel.net> wrote:
> Not such a big fan about these changes as they introduce additional
> load and stores and a branch.
>
> Copy spill area:
> - is this only for debugging? Could the debugger identify the 'kernel
> exception' frame and handle it appropriately?
For the debugger and all in-kernel stack tracers: perf, ftrace, oprofile.
I'm not sure how the kernel exception frame can be identified,
especially for the nested kernel re-entries.
> - if we need it for debugging/perf, maybe move these line under a
> kernel option (could be enabled by default)
Ok.
> - since we know the kernel stack frame size, why can't we just load
> from that offset (instead of the l32i and add). Also, can't we use
> s32e (need to look up the spec again).
Oh, right, l32e and s32e make perfect sense here, I thought about
it, but somehow I was under impression we could get here from
userspace and CRING would be wrong for the kernel stack. We
obviously can't.
> Branch:
> - is there any logical change in the code or are these only to avoid using a0?
Yes.
> - if for a0, couldn't we load a0 just before the 'xsr a3, ps' and keep
> the code as before?
Sure.
--
Thanks.
-- Max
More information about the linux-xtensa
mailing list