提交 d5c15f17 编写于 作者: E Edgar E. Iglesias 提交者: Michal Simek

microblaze: Setup correct pointer to TLS area

Setup a pointer to the TLS area in copy_thread.
r10 is 6th argumetn which contains TLS area.
And r21 is the thread reg.
Signed-off-by: NEdgar E. Iglesias <edgar.iglesias@gmail.com>
Signed-off-by: NDavid Holsgrove <david.holsgrove@petalogix.com>
Signed-off-by: NMichal Simek <monstr@monstr.eu>
上级 8d95e122
...@@ -182,8 +182,12 @@ int copy_thread(unsigned long clone_flags, unsigned long usp, ...@@ -182,8 +182,12 @@ int copy_thread(unsigned long clone_flags, unsigned long usp,
#endif #endif
ti->cpu_context.r15 = (unsigned long)ret_from_fork - 8; ti->cpu_context.r15 = (unsigned long)ret_from_fork - 8;
/*
* r21 is the thread reg, r10 is 6th arg to clone
* which contains TLS area
*/
if (clone_flags & CLONE_SETTLS) if (clone_flags & CLONE_SETTLS)
; childregs->r21 = childregs->r10;
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册