arm64: make irq_stack_ptr more robust
authorYang Shi <yang.shi@linaro.org>
Thu, 11 Feb 2016 21:53:10 +0000 (13:53 -0800)
committerAlex Shi <alex.shi@linaro.org>
Wed, 11 May 2016 15:32:16 +0000 (23:32 +0800)
commit885af350336f3e3256999234cd4948210df6c946
tree24c0da81bf1df168f3a6e0972c05e4f32f522715
parente009472925ee90986397518ef6796e6f8d12e1da
arm64: make irq_stack_ptr more robust

Switching between stacks is only valid if we are tracing ourselves while on the
irq_stack, so it is only valid when in current and non-preemptible context,
otherwise is is just zeroed off.

Fixes: 132cd887b5c5 ("arm64: Modify stack trace and dump for use with irq_stack")
Acked-by: James Morse <james.morse@arm.com>
Tested-by: James Morse <james.morse@arm.com>
Signed-off-by: Yang Shi <yang.shi@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
(cherry picked from commit a80a0eb70c358f8c7dda4bb62b2278dc6285217b)
Signed-off-by: Alex Shi <alex.shi@linaro.org>
arch/arm64/kernel/stacktrace.c
arch/arm64/kernel/traps.c