Skip to content

Commit 0fdfc53

Browse files
author
Christian Brauner
committed
alpha: 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: [email protected] Signed-off-by: Christian Brauner <[email protected]>
1 parent ff2a911 commit 0fdfc53

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

arch/alpha/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ config ALPHA
3838
select OLD_SIGSUSPEND
3939
select CPU_NO_EFFICIENT_FFS if !ALPHA_EV67
4040
select MMU_GATHER_NO_RANGE
41+
select HAVE_COPY_THREAD_TLS
4142
help
4243
The Alpha is a 64-bit general-purpose processor designed and
4344
marketed by the Digital Equipment Corporation of blessed memory,

arch/alpha/kernel/process.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -233,10 +233,9 @@ release_thread(struct task_struct *dead_task)
233233
/*
234234
* Copy architecture-specific thread state
235235
*/
236-
int
237-
copy_thread(unsigned long clone_flags, unsigned long usp,
238-
unsigned long kthread_arg,
239-
struct task_struct *p)
236+
int copy_thread_tls(unsigned long clone_flags, unsigned long usp,
237+
unsigned long kthread_arg, struct task_struct *p,
238+
unsigned long tls)
240239
{
241240
extern void ret_from_fork(void);
242241
extern void ret_from_kernel_thread(void);
@@ -267,7 +266,7 @@ copy_thread(unsigned long clone_flags, unsigned long usp,
267266
required for proper operation in the case of a threaded
268267
application calling fork. */
269268
if (clone_flags & CLONE_SETTLS)
270-
childti->pcb.unique = regs->r20;
269+
childti->pcb.unique = tls;
271270
else
272271
regs->r20 = 0; /* OSF/1 has some strange fork() semantics. */
273272
childti->pcb.usp = usp ?: rdusp();

0 commit comments

Comments
 (0)