Commit 15350c42 authored by Christian Brauner's avatar Christian Brauner

sh: switch to copy_thread_tls()

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.

Cc: Rich Felker <dalias@libc.org>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: linux-sh@vger.kernel.org
Signed-off-by: default avatarChristian Brauner <christian.brauner@ubuntu.com>
parent 1dd966ea
...@@ -70,6 +70,7 @@ config SUPERH ...@@ -70,6 +70,7 @@ config SUPERH
select ARCH_HIBERNATION_POSSIBLE if MMU select ARCH_HIBERNATION_POSSIBLE if MMU
select SPARSE_IRQ select SPARSE_IRQ
select HAVE_STACKPROTECTOR select HAVE_STACKPROTECTOR
select HAVE_COPY_THREAD_TLS
help help
The SuperH is a RISC processor targeted for use in embedded systems The SuperH is a RISC processor targeted for use in embedded systems
and consumer electronics; it was also used in the Sega Dreamcast and consumer electronics; it was also used in the Sega Dreamcast
......
...@@ -115,8 +115,8 @@ EXPORT_SYMBOL(dump_fpu); ...@@ -115,8 +115,8 @@ EXPORT_SYMBOL(dump_fpu);
asmlinkage void ret_from_fork(void); asmlinkage void ret_from_fork(void);
asmlinkage void ret_from_kernel_thread(void); asmlinkage void ret_from_kernel_thread(void);
int copy_thread(unsigned long clone_flags, unsigned long usp, int copy_thread_tls(unsigned long clone_flags, unsigned long usp,
unsigned long arg, struct task_struct *p) unsigned long arg, struct task_struct *p, unsigned long tls)
{ {
struct thread_info *ti = task_thread_info(p); struct thread_info *ti = task_thread_info(p);
struct pt_regs *childregs; struct pt_regs *childregs;
...@@ -158,7 +158,7 @@ int copy_thread(unsigned long clone_flags, unsigned long usp, ...@@ -158,7 +158,7 @@ int copy_thread(unsigned long clone_flags, unsigned long usp,
ti->addr_limit = USER_DS; ti->addr_limit = USER_DS;
if (clone_flags & CLONE_SETTLS) if (clone_flags & CLONE_SETTLS)
childregs->gbr = childregs->regs[0]; childregs->gbr = tls;
childregs->regs[0] = 0; /* Set return value for child */ childregs->regs[0] = 0; /* Set return value for child */
p->thread.pc = (unsigned long) ret_from_fork; p->thread.pc = (unsigned long) ret_from_fork;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment