The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=f89a24766cb811dba1aa74a65f70df72bc1fe00a
commit f89a24766cb811dba1aa74a65f70df72bc1fe00a Author: Konstantin Belousov <k...@freebsd.org> AuthorDate: 2025-05-30 11:24:12 +0000 Commit: Konstantin Belousov <k...@freebsd.org> CommitDate: 2025-06-12 18:02:50 +0000 thr_new: pass params.flags to cpu_set_user_tls() (cherry picked from commit 2b8b37c8f516a5955f81a6fc35c7aac01ddf4a3a) --- sys/amd64/amd64/vm_machdep.c | 2 +- sys/arm/arm/vm_machdep.c | 2 +- sys/arm64/arm64/vm_machdep.c | 2 +- sys/arm64/linux/linux_machdep.c | 2 +- sys/i386/i386/vm_machdep.c | 2 +- sys/kern/kern_thr.c | 2 +- sys/powerpc/powerpc/exec_machdep.c | 2 +- sys/riscv/riscv/vm_machdep.c | 2 +- sys/sys/proc.h | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/sys/amd64/amd64/vm_machdep.c b/sys/amd64/amd64/vm_machdep.c index 8a2705a38c46..e069df9a375f 100644 --- a/sys/amd64/amd64/vm_machdep.c +++ b/sys/amd64/amd64/vm_machdep.c @@ -667,7 +667,7 @@ cpu_set_upcall(struct thread *td, void (*entry)(void *), void *arg, } int -cpu_set_user_tls(struct thread *td, void *tls_base) +cpu_set_user_tls(struct thread *td, void *tls_base, int thr_flags) { struct pcb *pcb; diff --git a/sys/arm/arm/vm_machdep.c b/sys/arm/arm/vm_machdep.c index 3fd39d3f7a97..e5018a0bc007 100644 --- a/sys/arm/arm/vm_machdep.c +++ b/sys/arm/arm/vm_machdep.c @@ -243,7 +243,7 @@ cpu_set_upcall(struct thread *td, void (*entry)(void *), void *arg, } int -cpu_set_user_tls(struct thread *td, void *tls_base) +cpu_set_user_tls(struct thread *td, void *tls_base, int thr_flags __unused) { td->td_pcb->pcb_regs.sf_tpidrurw = (register_t)tls_base; diff --git a/sys/arm64/arm64/vm_machdep.c b/sys/arm64/arm64/vm_machdep.c index 40f5e7da8f8c..906179d6f655 100644 --- a/sys/arm64/arm64/vm_machdep.c +++ b/sys/arm64/arm64/vm_machdep.c @@ -229,7 +229,7 @@ cpu_set_upcall(struct thread *td, void (*entry)(void *), void *arg, } int -cpu_set_user_tls(struct thread *td, void *tls_base) +cpu_set_user_tls(struct thread *td, void *tls_base, int thr_flags __unused) { struct pcb *pcb; diff --git a/sys/arm64/linux/linux_machdep.c b/sys/arm64/linux/linux_machdep.c index 3bc2923b9d4d..9f370f04b5c5 100644 --- a/sys/arm64/linux/linux_machdep.c +++ b/sys/arm64/linux/linux_machdep.c @@ -64,7 +64,7 @@ linux_set_cloned_tls(struct thread *td, void *desc) if ((uint64_t)desc >= VM_MAXUSER_ADDRESS) return (EPERM); - return (cpu_set_user_tls(td, desc)); + return (cpu_set_user_tls(td, desc, 0)); } void diff --git a/sys/i386/i386/vm_machdep.c b/sys/i386/i386/vm_machdep.c index d252438dc186..c12afbfd4891 100644 --- a/sys/i386/i386/vm_machdep.c +++ b/sys/i386/i386/vm_machdep.c @@ -513,7 +513,7 @@ cpu_set_upcall(struct thread *td, void (*entry)(void *), void *arg, } int -cpu_set_user_tls(struct thread *td, void *tls_base) +cpu_set_user_tls(struct thread *td, void *tls_base, int thr_flags __unused) { struct segment_descriptor sd; uint32_t base; diff --git a/sys/kern/kern_thr.c b/sys/kern/kern_thr.c index 7c6d00692009..1dd4d6915546 100644 --- a/sys/kern/kern_thr.c +++ b/sys/kern/kern_thr.c @@ -173,7 +173,7 @@ thr_new_initthr(struct thread *td, void *thunk) if (error != 0) return (error); /* Setup user TLS address and TLS pointer register. */ - return (cpu_set_user_tls(td, param->tls_base)); + return (cpu_set_user_tls(td, param->tls_base, param->flags)); } int diff --git a/sys/powerpc/powerpc/exec_machdep.c b/sys/powerpc/powerpc/exec_machdep.c index 94e561ddd33a..2e4e0ebfd7ed 100644 --- a/sys/powerpc/powerpc/exec_machdep.c +++ b/sys/powerpc/powerpc/exec_machdep.c @@ -1091,7 +1091,7 @@ cpu_thread_free(struct thread *td) } int -cpu_set_user_tls(struct thread *td, void *tls_base) +cpu_set_user_tls(struct thread *td, void *tls_base, int thr_flags __unused) { if (SV_PROC_FLAG(td->td_proc, SV_LP64)) diff --git a/sys/riscv/riscv/vm_machdep.c b/sys/riscv/riscv/vm_machdep.c index 043093960edf..26b8c0dffcde 100644 --- a/sys/riscv/riscv/vm_machdep.c +++ b/sys/riscv/riscv/vm_machdep.c @@ -194,7 +194,7 @@ cpu_set_upcall(struct thread *td, void (*entry)(void *), void *arg, } int -cpu_set_user_tls(struct thread *td, void *tls_base) +cpu_set_user_tls(struct thread *td, void *tls_base, int thr_flags __unused) { if ((uintptr_t)tls_base >= VM_MAXUSER_ADDRESS) diff --git a/sys/sys/proc.h b/sys/sys/proc.h index e37f0521861a..4981a5894941 100644 --- a/sys/sys/proc.h +++ b/sys/sys/proc.h @@ -1252,7 +1252,7 @@ int cpu_procctl(struct thread *td, int idtype, id_t id, int com, void cpu_set_syscall_retval(struct thread *, int); int cpu_set_upcall(struct thread *, void (*)(void *), void *, stack_t *); -int cpu_set_user_tls(struct thread *, void *tls_base); +int cpu_set_user_tls(struct thread *, void *tls_base, int flags); void cpu_thread_alloc(struct thread *); void cpu_thread_clean(struct thread *); void cpu_thread_exit(struct thread *);