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: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Signed-off-by: David Holsgrove <david.holsgrove@petalogix.com>
Signed-off-by: Michal Simek <monstr@monstr.eu>
This commit is contained in:
Edgar E. Iglesias 2012-02-24 14:52:25 +10:00 committed by Michal Simek
parent 8d95e1224a
commit d5c15f1784
1 changed files with 5 additions and 1 deletions

View File

@ -182,8 +182,12 @@ int copy_thread(unsigned long clone_flags, unsigned long usp,
#endif
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)
;
childregs->r21 = childregs->r10;
return 0;
}