Skip to content

Commit 39d6ef3

Browse files
vineetgarcxxkent
authored andcommitted
ARC64: workaround TP not setup in glibc
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
1 parent 427d2fd commit 39d6ef3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

arch/arc/kernel/process.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,9 @@ int copy_thread(unsigned long clone_flags, unsigned long usp,
229229
}
230230

231231

232+
#ifdef CONFIG_ISA_ARCV3
233+
c_regs->gp = task_thread_info(p)->thr_ptr;
234+
#else
232235
/*
233236
* setup usermode thread pointer #1:
234237
* when child is picked by scheduler, __switch_to() uses @c_callee to
@@ -237,6 +240,7 @@ int copy_thread(unsigned long clone_flags, unsigned long usp,
237240
* ensures those regs are not clobbered all the way to RTIE to usermode
238241
*/
239242
c_callee->r25 = task_thread_info(p)->thr_ptr;
243+
#endif
240244

241245
return 0;
242246
}

0 commit comments

Comments
 (0)