author: Andreas Oetken <andreas.oetken@siemens.com> 2021-02-19 14:41:03 +0800
committer: Ley Foon Tan <ley.foon.tan@intel.com> 2021-02-19 15:02:08 +0800
commit: 9abcfcb20320e8f693e89d86573b58e6289931cb
parent: c26958cb5a0d9053d1358258827638773f3d36ed
Commit Summary:
Diffstat:
1 file changed, 3 insertions, 0 deletions
diff --git a/arch/nios2/kernel/entry.S b/arch/nios2/kernel/entry.S
index da8442450e46..0794cd7803df 100644
--- a/arch/nios2/kernel/entry.S
+++ b/arch/nios2/kernel/entry.S
@@ -389,7 +389,10 @@ ENTRY(ret_from_interrupt)
*/
ENTRY(sys_clone)
SAVE_SWITCH_STACK
+ subi sp, sp, 4 /* make space for tls pointer */
+ stw r8, 0(sp) /* pass tls pointer (r8) via stack (5th argument) */
call nios2_clone
+ addi sp, sp, 4
RESTORE_SWITCH_STACK
ret