]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: reduce stack use in irq_handler
authorJames Morse <james.morse@arm.com>
Tue, 15 Dec 2015 11:21:25 +0000 (11:21 +0000)
committerWill Deacon <will.deacon@arm.com>
Tue, 15 Dec 2015 17:09:08 +0000 (17:09 +0000)
commita429b08b261e02dda61af08944ad34e2ddde4f20
treedabce8d15638e66a8c351454e78e3f5bac6f6c2f
parenta8ec24c305f82777df8958237a16819fcb8f32fe
arm64: reduce stack use in irq_handler

The code for switching to irq_stack stores three pieces of information on
the stack, fp+lr, as a fake stack frame (that lets us walk back onto the
interrupted tasks stack frame), and the address of the struct pt_regs that
contains the register values from kernel entry. (which dump_backtrace()
will print in any stack trace).

To reduce this, we store fp, and the pointer to the struct pt_regs.
unwind_frame() can recognise this as the irq_stack dummy frame, (as it only
appears at the top of the irq_stack), and use the struct pt_regs values
to find the missing interrupted link-register.

Suggested-by: Will Deacon <will.deacon@arm.com>
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/entry.S
arch/arm64/kernel/stacktrace.c