[PATCH v8 2/4] arm64: Modify stack trace and dump for use with irq_stack
Jungseok Lee
jungseoklee85 at gmail.com
Fri Dec 4 04:21:39 PST 2015
On Dec 4, 2015, at 8:02 PM, James Morse wrote:
> From: AKASHI Takahiro <takahiro.akashi at linaro.org>
>
> 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.
>
> Signed-off-by: AKASHI Takahiro <takahiro.akashi at linaro.org>
> [merged two patches, reworked for per_cpu irq_stacks, and no alignment
> guarantees, added irq_stack definitions]
> Signed-off-by: James Morse <james.morse at arm.com>
> ---
> arch/arm64/include/asm/irq.h | 32 ++++++++++++++++++++++++++++++++
> arch/arm64/kernel/irq.c | 3 +++
> arch/arm64/kernel/stacktrace.c | 29 +++++++++++++++++++++++++++--
> arch/arm64/kernel/traps.c | 14 +++++++++++++-
> 4 files changed, 75 insertions(+), 3 deletions(-)
>
> diff --git a/arch/arm64/include/asm/irq.h b/arch/arm64/include/asm/irq.h
> index 8e8d30684392..e2f3f135a3bc 100644
> --- a/arch/arm64/include/asm/irq.h
> +++ b/arch/arm64/include/asm/irq.h
> @@ -1,10 +1,32 @@
> #ifndef __ASM_IRQ_H
> #define __ASM_IRQ_H
>
> +#define IRQ_STACK_SIZE THREAD_SIZE
I agree that it is unnecessary to reduce a process stack size at this stage.
But, it would be no issue to set IRQ_STACK_SIZE to 8KB now, which is aligned
with Catalin's comment [1].
Best Regards
Jungseok Lee
[1] http://www.spinics.net/lists/arm-kernel/msg463868.html
Best Regards
Jungseok Lee
More information about the linux-arm-kernel
mailing list