Commit 7694f514 authored by Christian Brauner's avatar Christian Brauner

sparc: unconditionally enable HAVE_COPY_THREAD_TLS

Now that both sparc and sparc64 support copy_thread_tls() and don't rely
on do_fork() anymore, turn on HAVE_COPY_THREAD_TLS unconditionally. Once
all architectures are switched over this macro will be removed and
the old do_fork() calling convention fully abandoned in favor of the
cleaner struct kernel_clone_args one.
Signed-off-by: default avatarChristian Brauner <christian.brauner@ubuntu.com>
Acked-by: default avatarDavid S. Miller <davem@davemloft.net>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Guo Ren <guoren@kernel.org>
Cc: linux-csky@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: sparclinux@vger.kernel.org
Link: https://lore.kernel.org/r/20200512171527.570109-4-christian.brauner@ubuntu.com
parent a4261d4b
...@@ -48,6 +48,7 @@ config SPARC ...@@ -48,6 +48,7 @@ config SPARC
select LOCKDEP_SMALL if LOCKDEP select LOCKDEP_SMALL if LOCKDEP
select NEED_DMA_MAP_STATE select NEED_DMA_MAP_STATE
select NEED_SG_DMA_LENGTH select NEED_SG_DMA_LENGTH
select HAVE_COPY_THREAD_TLS
config SPARC32 config SPARC32
def_bool !64BIT def_bool !64BIT
...@@ -94,7 +95,6 @@ config SPARC64 ...@@ -94,7 +95,6 @@ config SPARC64
select ARCH_HAS_PTE_SPECIAL select ARCH_HAS_PTE_SPECIAL
select PCI_DOMAINS if PCI select PCI_DOMAINS if PCI
select ARCH_HAS_GIGANTIC_PAGE select ARCH_HAS_GIGANTIC_PAGE
select HAVE_COPY_THREAD_TLS
config ARCH_PROC_KCORE_TEXT config ARCH_PROC_KCORE_TEXT
def_bool y def_bool y
......
...@@ -273,8 +273,9 @@ clone_stackframe(struct sparc_stackf __user *dst, ...@@ -273,8 +273,9 @@ clone_stackframe(struct sparc_stackf __user *dst,
extern void ret_from_fork(void); extern void ret_from_fork(void);
extern void ret_from_kernel_thread(void); extern void ret_from_kernel_thread(void);
int copy_thread(unsigned long clone_flags, unsigned long sp, int copy_thread_tls(unsigned long clone_flags, unsigned long sp,
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, *regs = current_pt_regs(); struct pt_regs *childregs, *regs = current_pt_regs();
...@@ -376,7 +377,7 @@ int copy_thread(unsigned long clone_flags, unsigned long sp, ...@@ -376,7 +377,7 @@ int copy_thread(unsigned long clone_flags, unsigned long sp,
regs->u_regs[UREG_I1] = 0; regs->u_regs[UREG_I1] = 0;
if (clone_flags & CLONE_SETTLS) if (clone_flags & CLONE_SETTLS)
childregs->u_regs[UREG_G7] = regs->u_regs[UREG_I3]; childregs->u_regs[UREG_G7] = tls;
return 0; return 0;
} }
......
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