xtensa: fix kernel register spilling
authorMax Filippov <jcmvbkbc@gmail.com>
Thu, 16 Jul 2015 07:41:02 +0000 (10:41 +0300)
committerMax Filippov <jcmvbkbc@gmail.com>
Mon, 17 Aug 2015 04:33:35 +0000 (07:33 +0300)
commit77d6273e79e3a86552fcf10cdd31a69b46ed2ce6
tree4cf6368299b9d521c93a9d2327b7e00e98b80ede
parent7d5f6a9a2496c6e4f2a3b5db7743ff4e3a99738e
xtensa: fix kernel register spilling

call12 can't be safely used as the first call in the inline function,
because the compiler does not extend the stack frame of the bounding
function accordingly, which may result in corruption of local variables.

If a call needs to be done, do call8 first followed by call12.

For pure assembly code in _switch_to increase stack frame size of the
bounding function.

Cc: stable@vger.kernel.org
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
arch/xtensa/include/asm/traps.h
arch/xtensa/kernel/entry.S