arm64: Modify stack trace and dump for use with irq_stack
authorAKASHI Takahiro <takahiro.akashi@linaro.org>
Fri, 4 Dec 2015 11:02:26 +0000 (11:02 +0000)
committerWill Deacon <will.deacon@arm.com>
Tue, 8 Dec 2015 11:41:51 +0000 (11:41 +0000)
commit132cd887b5c54758d04bf25c52fa48f45e843a30
tree5c911127a290dcd7a78c417ced4ae096dd93bd5c
parent6cdf9c7ca687e01840d0215437620a20263012fc
arm64: Modify stack trace and dump for use with irq_stack

This patch allows unwind_frame() to traverse from interrupt stack to task
stack correctly. It requires data from a dummy stack frame, created
during irq_stack_entry(), added by a later patch.

A similar approach is taken to modify dump_backtrace(), which expects to
find struct pt_regs underneath any call to functions marked __exception.
When on an irq_stack, the struct pt_regs is stored on the old task stack,
the location of which is stored in the dummy stack frame.

Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
[james.morse: merged two patches, reworked for per_cpu irq_stacks, and
 no alignment guarantees, added irq_stack definitions]
Signed-off-by: James Morse <james.morse@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/include/asm/irq.h
arch/arm64/kernel/irq.c
arch/arm64/kernel/stacktrace.c
arch/arm64/kernel/traps.c