Use the copy_thread_tls() calling convention which passes tls through a register. This is required so we can remove the copy_thread{_tls}() split and remove the HAVE_COPY_THREAD_TLS macro.
Unified · Split
| @@ -29,6 +29,7 @@ config SUPERH · 28 unmodified lines | ||
| 29 | 29 | select HAVE_ARCH_AUDITSYSCALL |
| 30 | 30 | select HAVE_ARCH_KGDB |
| 31 | 31 | select HAVE_ARCH_TRACEHOOK |
| 32 | + select HAVE_COPY_THREAD_TLS | |
| 32 | 33 | select HAVE_DEBUG_BUGVERBOSE |
| 33 | 34 | select HAVE_DEBUG_KMEMLEAK |
| 34 | 35 | select HAVE_DYNAMIC_FTRACE |
| @@ -111,8 +111,8 @@ EXPORT_SYMBOL(dump_fpu); · 110 unmodified lines | ||
| 111 | 111 | asmlinkage void ret_from_fork(void); |
| 112 | 112 | asmlinkage void ret_from_kernel_thread(void); |
| 113 | 113 | |
| 114 | −int copy_thread(unsigned long clone_flags, unsigned long usp, | |
| 115 | − unsigned long arg, struct task_struct *p) | |
| 114 | +int copy_thread_tls(unsigned long clone_flags, unsigned long usp, | |
| 115 | + unsigned long arg, struct task_struct *p, unsigned long tls) | |
| 116 | 116 | { |
| 117 | 117 | struct thread_info *ti = task_thread_info(p); |
| 118 | 118 | struct pt_regs *childregs; |
| @@ -154,7 +154,7 @@ int copy_thread(unsigned long clone_flags, unsigned long usp, · 35 unmodified lines | ||
| 154 | 154 | ti->addr_limit = USER_DS; |
| 155 | 155 | |
| 156 | 156 | if (clone_flags & CLONE_SETTLS) |
| 157 | − childregs->gbr = childregs->regs[0]; | |
| 157 | + childregs->gbr = tls; | |
| 158 | 158 | |
| 159 | 159 | childregs->regs[0] = 0; /* Set return value for child */ |
| 160 | 160 | p->thread.pc = (unsigned long) ret_from_fork; |