git: eb937f67f837 - main - powerpc: Fix typo in thread register copy

Justin Hibbits jhibbits at FreeBSD.org
Sat Sep 4 16:44:39 UTC 2021


The branch main has been updated by jhibbits:

URL: https://cgit.FreeBSD.org/src/commit/?id=eb937f67f8378adf650e43cadd87ddb9afdea5dd

commit eb937f67f8378adf650e43cadd87ddb9afdea5dd
Author:     Justin Hibbits <jhibbits at FreeBSD.org>
AuthorDate: 2021-09-04 16:43:17 +0000
Commit:     Justin Hibbits <jhibbits at FreeBSD.org>
CommitDate: 2021-09-04 16:44:02 +0000

    powerpc: Fix typo in thread register copy
    
    Should be saving off td0's register's, not td's.
---
 sys/powerpc/powerpc/exec_machdep.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/powerpc/powerpc/exec_machdep.c b/sys/powerpc/powerpc/exec_machdep.c
index 7be7aa3ed241..66bc951fc545 100644
--- a/sys/powerpc/powerpc/exec_machdep.c
+++ b/sys/powerpc/powerpc/exec_machdep.c
@@ -1097,7 +1097,7 @@ cpu_copy_thread(struct thread *td, struct thread *td0)
 	struct callframe *cf;
 
 	/* Ensure td0 pcb is up to date. */
-	if (td == curthread)
+	if (td0 == curthread)
 		cpu_save_thread_regs(td0);
 
 	pcb2 = td->td_pcb;


More information about the dev-commits-src-all mailing list