From: Edgar E. Iglesias Date: Fri, 24 Feb 2012 04:52:25 +0000 (+1000) Subject: microblaze: Setup correct pointer to TLS area X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=d5c15f17844b8883bc13b61a8ae114f0d3d59cdd;p=linux-beck.git 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 Signed-off-by: David Holsgrove Signed-off-by: Michal Simek --- diff --git a/arch/microblaze/kernel/process.c b/arch/microblaze/kernel/process.c index 883b92789cdf..1944e00f07e1 100644 --- a/arch/microblaze/kernel/process.c +++ b/arch/microblaze/kernel/process.c @@ -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; }