Skip to content

Commit 643d48b

Browse files
author
Christian Brauner
committed
hexagon: 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] Acked-by: Brian Cain <[email protected]> Signed-off-by: Christian Brauner <[email protected]>
1 parent e0daa22 commit 643d48b

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

arch/hexagon/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ config HEXAGON
3131
select GENERIC_CLOCKEVENTS_BROADCAST
3232
select MODULES_USE_ELF_RELA
3333
select GENERIC_CPU_DEVICES
34+
select HAVE_COPY_THREAD_TLS
3435
help
3536
Qualcomm Hexagon is a processor architecture designed for high
3637
performance and low power across a wide variety of applications.

arch/hexagon/kernel/process.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ void arch_cpu_idle(void)
5050
/*
5151
* Copy architecture-specific thread state
5252
*/
53-
int copy_thread(unsigned long clone_flags, unsigned long usp,
54-
unsigned long arg, struct task_struct *p)
53+
int copy_thread_tls(unsigned long clone_flags, unsigned long usp,
54+
unsigned long arg, struct task_struct *p, unsigned long tls)
5555
{
5656
struct thread_info *ti = task_thread_info(p);
5757
struct hexagon_switch_stack *ss;
@@ -100,7 +100,7 @@ int copy_thread(unsigned long clone_flags, unsigned long usp,
100100
* ugp is used to provide TLS support.
101101
*/
102102
if (clone_flags & CLONE_SETTLS)
103-
childregs->ugp = childregs->r04;
103+
childregs->ugp = tls;
104104

105105
/*
106106
* Parent sees new pid -- not necessary, not even possible at

0 commit comments

Comments
 (0)