Skip to content

Commit

Permalink
microblaze: Setup correct pointer to TLS area
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Edgar E. Iglesias authored and Michal Simek committed May 25, 2012
1 parent 8d95e12 commit d5c15f1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion arch/microblaze/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit d5c15f1

Please sign in to comment.