xtensa: fix kernel register spilling
authorMax Filippov <jcmvbkbc@gmail.com>
Thu, 16 Jul 2015 07:41:02 +0000 (10:41 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 21 Sep 2015 17:00:09 +0000 (10:00 -0700)
commit0bd183de611348459ef08b1e893dad005d8880f6
tree252f105bc02ff01f851d12c09105dba6520ab7b0
parent8db5a692d7f860645a4f2a2c3b822637ecdfa3bf
xtensa: fix kernel register spilling

commit 77d6273e79e3a86552fcf10cdd31a69b46ed2ce6 upstream.

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.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/xtensa/include/asm/traps.h
arch/xtensa/kernel/entry.S