diff options
author | Matt Redfearn <matt.redfearn@imgtec.com> | 2017-03-21 14:52:25 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2017-03-22 11:53:57 +0100 |
commit | db8466c581cca1a08b505f1319c3ecd246f16fa8 (patch) | |
tree | 00a7a77ab90df244dc16dcd32582985ca6a846d6 /fs/exofs | |
parent | 0be032c190abcdcfa948082b6a1e0d461184ba4d (diff) | |
download | linux-db8466c581cca1a08b505f1319c3ecd246f16fa8.tar.gz linux-db8466c581cca1a08b505f1319c3ecd246f16fa8.tar.bz2 linux-db8466c581cca1a08b505f1319c3ecd246f16fa8.zip |
MIPS: IRQ Stack: Unwind IRQ stack onto task stack
When the separate IRQ stack was introduced, stack unwinding only
proceeded as far as the top of the IRQ stack, leading to kernel
backtraces being less useful, lacking the trace of what was interrupted.
Fix this by providing a means for the kernel to unwind the IRQ stack
onto the interrupted task stack. The processor state is saved to the
kernel task stack on interrupt. The IRQ_STACK_START macro reserves an
unsigned long at the top of the IRQ stack where the interrupted task
stack pointer can be saved. After the active stack is switched to the
IRQ stack, save the interrupted tasks stack pointer to the reserved
location.
Fix the stack unwinding code to look for the frame being the top of the
IRQ stack and if so get the next frame from the saved location. The
existing test does not work with the separate stack since the ra is no
longer pointed at ret_from_{irq,exception}.
The test to stop unwinding the stack 32 bytes from the top of a stack
must be modified to allow unwinding to continue up to the location of
the saved task stack pointer when on the IRQ stack. The low / high marks
of the stack are set depending on whether the sp is on an irq stack or
not.
Signed-off-by: Matt Redfearn <matt.redfearn@imgtec.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Marcin Nowakowski <marcin.nowakowski@imgtec.com>
Cc: Masanari Iida <standby24x7@gmail.com>
Cc: Chris Metcalf <cmetcalf@mellanox.com>
Cc: James Hogan <james.hogan@imgtec.com>
Cc: Paul Burton <paul.burton@imgtec.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jason A. Donenfeld <jason@zx2c4.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/15788/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'fs/exofs')
0 files changed, 0 insertions, 0 deletions