diff options
author | Philip Guenther <guenther@cvs.openbsd.org> | 2019-12-11 07:21:41 +0000 |
---|---|---|
committer | Philip Guenther <guenther@cvs.openbsd.org> | 2019-12-11 07:21:41 +0000 |
commit | 52fb5e1e651aa81b0a3d5c7d9df1e757e6bc0148 (patch) | |
tree | a4bdaff4010873db79e2e0960b4d65b18c9156e9 /sys | |
parent | 8d7817e44147a6a9edd122bc90b6e206018c544f (diff) |
%r26 hasn't been used by the threads implementation since 2016, so stop
resetting it in child_return() and update the comment in tcb.h to reflect
reality
ok miod@ aoyama@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/m88k/include/tcb.h | 8 | ||||
-rw-r--r-- | sys/arch/m88k/m88k/trap.c | 5 |
2 files changed, 4 insertions, 9 deletions
diff --git a/sys/arch/m88k/include/tcb.h b/sys/arch/m88k/include/tcb.h index 5b37acce6e2..13d0bdeb55d 100644 --- a/sys/arch/m88k/include/tcb.h +++ b/sys/arch/m88k/include/tcb.h @@ -1,4 +1,4 @@ -/* $OpenBSD: tcb.h,v 1.5 2017/02/15 21:18:52 miod Exp $ */ +/* $OpenBSD: tcb.h,v 1.6 2019/12/11 07:21:40 guenther Exp $ */ /* * Copyright (c) 2011 Philip Guenther <guenther@openbsd.org> @@ -20,11 +20,9 @@ #define _MACHINE_TCB_H_ /* - * In userspace, register %r27 contains the address of the thread's TCB, - * and register %r26 contains the address of the thread's errno. + * In userspace, register %r27 contains the address of the thread's TCB. * It is the responsibility of the kernel to set %r27 to the proper value - * when creating the thread, while initialization of %r26 is done in - * userland within libc on an as-needed basis. + * when creating the thread. */ #ifdef _KERNEL diff --git a/sys/arch/m88k/m88k/trap.c b/sys/arch/m88k/m88k/trap.c index 3da7e0693a6..52a56580fff 100644 --- a/sys/arch/m88k/m88k/trap.c +++ b/sys/arch/m88k/m88k/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.110 2019/09/06 12:22:01 deraadt Exp $ */ +/* $OpenBSD: trap.c,v 1.111 2019/12/11 07:21:40 guenther Exp $ */ /* * Copyright (c) 2004, Miodrag Vallat. * Copyright (c) 1998 Steve Murphree, Jr. @@ -1405,9 +1405,6 @@ child_return(arg) tf->tf_r[2] = 0; tf->tf_r[3] = 0; tf->tf_epsr &= ~PSR_C; - /* reset r26 (used by the threads library) if __tfork */ - if (p->p_flag & P_THREAD) - tf->tf_r[26] = 0; /* skip br instruction as in syscall() */ #ifdef M88100 if (CPU_IS88100) { |