git: 0e742cc77454 - main - cpu_set_upcall / linux_clone_thread: Remove calls to cpu_thread_clean
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 03 Jan 2025 16:03:27 UTC
The branch main has been updated by jhb:
URL: https://cgit.FreeBSD.org/src/commit/?id=0e742cc77454d0872ac2f6e7fd755b6d0322b711
commit 0e742cc77454d0872ac2f6e7fd755b6d0322b711
Author: John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2025-01-03 16:03:08 +0000
Commit: John Baldwin <jhb@FreeBSD.org>
CommitDate: 2025-01-03 16:03:08 +0000
cpu_set_upcall / linux_clone_thread: Remove calls to cpu_thread_clean
This is intended to clean state of a thread at the end of its
lifecycle during wait(), not the beginning of its life cycle.
Reviewed by: kib
Sponsored by: AFRL, DARPA
Differential Revision: https://reviews.freebsd.org/D48023
---
sys/amd64/amd64/vm_machdep.c | 10 ----------
sys/compat/linux/linux_fork.c | 2 --
sys/i386/i386/vm_machdep.c | 10 ----------
3 files changed, 22 deletions(-)
diff --git a/sys/amd64/amd64/vm_machdep.c b/sys/amd64/amd64/vm_machdep.c
index f74091438648..1c6b1549422b 100644
--- a/sys/amd64/amd64/vm_machdep.c
+++ b/sys/amd64/amd64/vm_machdep.c
@@ -605,16 +605,6 @@ int
cpu_set_upcall(struct thread *td, void (*entry)(void *), void *arg,
stack_t *stack)
{
-
- /*
- * Do any extra cleaning that needs to be done.
- * The thread may have optional components
- * that are not present in a fresh thread.
- * This may be a recycled thread so make it look
- * as though it's newly allocated.
- */
- cpu_thread_clean(td);
-
#ifdef COMPAT_FREEBSD32
if (SV_PROC_FLAG(td->td_proc, SV_ILP32)) {
/*
diff --git a/sys/compat/linux/linux_fork.c b/sys/compat/linux/linux_fork.c
index 4ce3bc192b4e..1c9189162a09 100644
--- a/sys/compat/linux/linux_fork.c
+++ b/sys/compat/linux/linux_fork.c
@@ -301,8 +301,6 @@ linux_clone_thread(struct thread *td, struct l_clone_args *args)
else
em->child_clear_tid = NULL;
- cpu_thread_clean(newtd);
-
linux_set_upcall(newtd, args->stack);
PROC_LOCK(p);
diff --git a/sys/i386/i386/vm_machdep.c b/sys/i386/i386/vm_machdep.c
index 0e0cebe98e5f..b0dd7534633b 100644
--- a/sys/i386/i386/vm_machdep.c
+++ b/sys/i386/i386/vm_machdep.c
@@ -480,16 +480,6 @@ int
cpu_set_upcall(struct thread *td, void (*entry)(void *), void *arg,
stack_t *stack)
{
-
- /*
- * Do any extra cleaning that needs to be done.
- * The thread may have optional components
- * that are not present in a fresh thread.
- * This may be a recycled thread so make it look
- * as though it's newly allocated.
- */
- cpu_thread_clean(td);
-
/*
* Set the trap frame to point at the beginning of the entry
* function.