diff options
| author | Max Filippov <jcmvbkbc@gmail.com> | 2015-07-16 10:41:02 +0300 |
|---|---|---|
| committer | Moyster <oysterized@gmail.com> | 2016-08-26 20:01:19 +0200 |
| commit | 1119ee37836da39b9c756ee29b4ef9bf5cdb160e (patch) | |
| tree | 2c1cc2c9e7c7891d74b714e3bd6b21abc74ba7cf /arch/xtensa/kernel/entry.S | |
| parent | dbace15d522b1569f8e290a99d98800335dd2ccb (diff) | |
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>
Signed-off-by: Stefan Guendhoer <stefan@guendhoer.com>
Diffstat (limited to 'arch/xtensa/kernel/entry.S')
| -rw-r--r-- | arch/xtensa/kernel/entry.S | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/xtensa/kernel/entry.S b/arch/xtensa/kernel/entry.S index d29bac601..b268d3cc0 100644 --- a/arch/xtensa/kernel/entry.S +++ b/arch/xtensa/kernel/entry.S @@ -1934,7 +1934,7 @@ ENDPROC(system_call) mov a12, a0 .endr #endif - _entry a1, 48 + _entry a1, 16 #if XCHAL_NUM_AREGS % 12 == 0 mov a8, a8 #elif XCHAL_NUM_AREGS % 12 == 4 @@ -1958,7 +1958,7 @@ ENDPROC(system_call) ENTRY(_switch_to) - entry a1, 16 + entry a1, 48 mov a11, a3 # and 'next' (a3) |
