Module Name: src Committed By: ryo Date: Fri Aug 3 17:04:30 UTC 2018
Modified Files: src/sys/arch/aarch64/aarch64: cpu_machdep.c Log Message: don't set lwp->l_private if no _UC_TLSBASE flag. atf lib/libc/sys/t_swapcontext Passed. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/aarch64/aarch64/cpu_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/aarch64/aarch64/cpu_machdep.c diff -u src/sys/arch/aarch64/aarch64/cpu_machdep.c:1.5 src/sys/arch/aarch64/aarch64/cpu_machdep.c:1.6 --- src/sys/arch/aarch64/aarch64/cpu_machdep.c:1.5 Tue Jul 17 00:30:11 2018 +++ src/sys/arch/aarch64/aarch64/cpu_machdep.c Fri Aug 3 17:04:30 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu_machdep.c,v 1.5 2018/07/17 00:30:11 christos Exp $ */ +/* $NetBSD: cpu_machdep.c,v 1.6 2018/08/03 17:04:30 ryo Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include <sys/cdefs.h> -__KERNEL_RCSID(1, "$NetBSD: cpu_machdep.c,v 1.5 2018/07/17 00:30:11 christos Exp $"); +__KERNEL_RCSID(1, "$NetBSD: cpu_machdep.c,v 1.6 2018/08/03 17:04:30 ryo Exp $"); #include "opt_multiprocessor.h" @@ -204,9 +204,11 @@ cpu_setmcontext(struct lwp *l, const mco return error; memcpy(&tf->tf_regs, mcp->__gregs, sizeof(tf->tf_regs)); - l->l_private = (void *)mcp->__gregs[_REG_TPIDR]; } + if (flags & _UC_TLSBASE) + l->l_private = (void *)mcp->__gregs[_REG_TPIDR]; + if (flags & _UC_FPU) { struct pcb * const pcb = lwp_getpcb(l); fpu_discard(l, true);