Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/aarch64/aarch64 don't set lwp->l_private if no _UC_...



details:   https://anonhg.NetBSD.org/src/rev/4f29c53fef38
branches:  trunk
changeset: 365179:4f29c53fef38
user:      ryo <ryo%NetBSD.org@localhost>
date:      Fri Aug 03 17:04:30 2018 +0000

description:
don't set lwp->l_private if no _UC_TLSBASE flag.
atf lib/libc/sys/t_swapcontext Passed.

diffstat:

 sys/arch/aarch64/aarch64/cpu_machdep.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (30 lines):

diff -r a5a920e2ce58 -r 4f29c53fef38 sys/arch/aarch64/aarch64/cpu_machdep.c
--- a/sys/arch/aarch64/aarch64/cpu_machdep.c    Fri Aug 03 16:32:55 2018 +0000
+++ b/sys/arch/aarch64/aarch64/cpu_machdep.c    Fri Aug 03 17:04:30 2018 +0000
@@ -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,8 +204,10 @@
                        return error;
 
                memcpy(&tf->tf_regs, mcp->__gregs, sizeof(tf->tf_regs));
+       }
+
+       if (flags & _UC_TLSBASE)
                l->l_private = (void *)mcp->__gregs[_REG_TPIDR];
-       }
 
        if (flags & _UC_FPU) {
                struct pcb * const pcb = lwp_getpcb(l);



Home | Main Index | Thread Index | Old Index