History

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.

Christian Brauner committed 6 years ago

Commit e1cc9d81 parent 6dfdf672 files · +4 −3Browse files

Unified · Split

2 files
  1. arch/sh/Kconfig +1 −0
  2. arch/sh/kernel/process_32.c +3 −3
arch/sh/Kconfig+1−0
@@ -29,6 +29,7 @@ config SUPERH · 28 unmodified lines
2929 select HAVE_ARCH_AUDITSYSCALL
3030 select HAVE_ARCH_KGDB
3131 select HAVE_ARCH_TRACEHOOK
32+ select HAVE_COPY_THREAD_TLS
3233 select HAVE_DEBUG_BUGVERBOSE
3334 select HAVE_DEBUG_KMEMLEAK
3435 select HAVE_DYNAMIC_FTRACE
arch/sh/kernel/process_32.c+3−3
@@ -111,8 +111,8 @@ EXPORT_SYMBOL(dump_fpu); · 110 unmodified lines
111111 asmlinkage void ret_from_fork(void);
112112 asmlinkage void ret_from_kernel_thread(void);
113113
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)
116116 {
117117 struct thread_info *ti = task_thread_info(p);
118118 struct pt_regs *childregs;
@@ -154,7 +154,7 @@ int copy_thread(unsigned long clone_flags, unsigned long usp, · 35 unmodified lines
154154 ti->addr_limit = USER_DS;
155155
156156 if (clone_flags & CLONE_SETTLS)
157− childregs->gbr = childregs->regs[0];
157+ childregs->gbr = tls;
158158
159159 childregs->regs[0] = 0; /* Set return value for child */
160160 p->thread.pc = (unsigned long) ret_from_fork;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t