]> git.karo-electronics.de Git - karo-tx-linux.git/commit
xtensa: fix fast_syscall_spill_registers_fixup
authorMax Filippov <jcmvbkbc@gmail.com>
Mon, 14 Oct 2013 22:22:42 +0000 (02:22 +0400)
committerChris Zankel <chris@zankel.net>
Tue, 15 Oct 2013 20:39:06 +0000 (13:39 -0700)
commit244066f4be8ce2dc2d2d60f01bceeba55c71a783
treea1a266f7ae41b3418a1f858712c52ba3cf141100
parent61e6cfa80de5760bbe406f4e815b7739205754d2
xtensa: fix fast_syscall_spill_registers_fixup

fast_syscall_spill_registers_fixup was not correctly updated by the
'keep a3 and excsave1 on entry to exception handlers' patch: it doesn't
preserve a3 that it gets on entry, breaking _spill_registers in case of
page fault on stack during register spilling, leading to unhandled
exception in kernel mode.

Preserve a3 by saving it in the original _spill_registers stack frame's
a3 during exception handling and restoring it afterwards.

Also fix comments and function bounds annotations.

Reported-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Tested-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Chris Zankel <chris@zankel.net>
arch/xtensa/kernel/entry.S