]> git.baikalelectronics.ru Git - kernel.git/commit
xtensa: fix fast_syscall_spill_registers
authorChris Zankel <chris@zankel.net>
Wed, 29 Jan 2014 06:09:51 +0000 (22:09 -0800)
committerChris Zankel <chris@zankel.net>
Wed, 29 Jan 2014 21:47:26 +0000 (13:47 -0800)
commit966f525d8a14e9f1bedb494402f2f5222f672e4b
treea4b3b7cfe0e0d8fe23008b5c44a5d4ff43081738
parent94d0cd519ee16e0fe721db5446e4ab4aaaa4a9ef
xtensa: fix fast_syscall_spill_registers

The original implementation could clobber registers under certain conditions.

The Xtensa processor architecture uses windowed registers and the original
implementation was using a4 as a temporary register, which under certain
conditions could be register a0 of the oldest window frame, and didn't always
restore the content correctly.

By moving the _spill_registers routine inside the fast system call, it frees
up one more register (the return address is not required anymore) for the
spill routine.

Signed-off-by: Chris Zankel <chris@zankel.net>
arch/xtensa/kernel/vectors.S
arch/xtensa/kernel/xtensa_ksyms.c