UPSTREAM: arm64: reduce stack use in irq_handler
authorJames Morse <james.morse@arm.com>
Tue, 15 Dec 2015 11:21:25 +0000 (11:21 +0000)
committerJeff Vander Stoep <jeffv@google.com>
Sun, 18 Sep 2016 20:31:41 +0000 (13:31 -0700)
commit41b7e19e9b27266024dc0565426a91d922c3d96b
tree306b40228381947ce0fda04aba8cbcdd7aa97165
parent9e4d16282cb949c1ef3d9736de79c8155cb24d7b
UPSTREAM: 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>
Bug: 30369029
Patchset: rework-pagetable

(cherry picked from commit 971c67ce37cfeeaf560e792a2c3bc21d8b67163a)
Signed-off-by: Jeff Vander Stoep <jeffv@google.com>
Change-Id: I84cbb04857a441083d331e875c3e228d24ec2276
arch/arm64/include/asm/irq.h
arch/arm64/kernel/entry.S
arch/arm64/kernel/stacktrace.c