Skip to content

Commit f29cab2

Browse files
committed
xtensa: get rid of stack frame in coprocessor_flush
coprocessor_flush is an ordinary function, it can use all registers. Don't reserve stack frame for it and use a7 to preserve a0 around the context saving call. Signed-off-by: Max Filippov <[email protected]>
1 parent e45d4bf commit f29cab2

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

arch/xtensa/kernel/coprocessor.S

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -216,21 +216,20 @@ ENDPROC(fast_coprocessor)
216216

217217
ENTRY(coprocessor_flush)
218218

219-
/* reserve 4 bytes on stack to save a0 */
220-
abi_entry(4)
219+
abi_entry_default
221220

222-
s32i a0, a1, 0
223221
movi a4, .Lcp_regs_jump_table
224222
addx8 a4, a3, a4
225223
addx4 a3, a3, a4
226224
l32i a4, a3, CP_REGS_TAB_SAVE
227225
beqz a4, 1f
228226
l32i a3, a3, CP_REGS_TAB_OFFSET
229227
add a2, a2, a3
228+
mov a7, a0
230229
callx0 a4
231-
1: l32i a0, a1, 0
232-
233-
abi_ret(4)
230+
mov a0, a7
231+
1:
232+
abi_ret_default
234233

235234
ENDPROC(coprocessor_flush)
236235

0 commit comments

Comments
 (0)