diff options
author | Max Filippov <jcmvbkbc@gmail.com> | 2016-03-06 22:36:33 (GMT) |
---|---|---|
committer | Chris Zankel <chris@zankel.net> | 2016-03-11 08:53:32 (GMT) |
commit | 6ec7026ac01f3db039e0428db1f37590685ad3e7 (patch) | |
tree | 9a3ac45e85c4ba604ce9dde4d14c103c9d2e70ff /arch/xtensa/kernel/vectors.S | |
parent | 816aa58895ca4a6176caded477a655fc82aab5f5 (diff) | |
download | linux-6ec7026ac01f3db039e0428db1f37590685ad3e7.tar.xz |
xtensa: use context structure for debug exceptions
With implementation of data breakpoints debug exceptions raised when
PS.EXCM is set need to be handled, e.g. window overflow code can write
to watched userspace address. Currently debug exception handler uses
EXCSAVE and DEPC SRs to save temporary registers, but DEPC may not be
available when PS.EXCM is set and more space will be needed to save
additional state.
Reorganize debug context: create per-CPU structure debug_table instance
and store its address in the EXCSAVE<debug level> instead of
debug_exception function address. Expand this structure when more save
space is needed.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Diffstat (limited to 'arch/xtensa/kernel/vectors.S')
-rw-r--r-- | arch/xtensa/kernel/vectors.S | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/xtensa/kernel/vectors.S b/arch/xtensa/kernel/vectors.S index fc25318..332e9d6 100644 --- a/arch/xtensa/kernel/vectors.S +++ b/arch/xtensa/kernel/vectors.S @@ -601,7 +601,9 @@ ENDPROC(window_overflow_restore_a0_fixup) ENTRY(_DebugInterruptVector) - xsr a0, SREG_EXCSAVE + XCHAL_DEBUGLEVEL + xsr a3, SREG_EXCSAVE + XCHAL_DEBUGLEVEL + s32i a0, a3, DT_DEBUG_SAVE + l32i a0, a3, DT_DEBUG_EXCEPTION jx a0 ENDPROC(_DebugInterruptVector) |