Source-Changes-HG archive

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

[src/trunk]: src/sys/kern fix compilation failure for arches without l_pcu_valid



details:   https://anonhg.NetBSD.org/src/rev/b4073e8892b1
branches:  trunk
changeset: 744715:b4073e8892b1
user:      dogcow <dogcow%NetBSD.org@localhost>
date:      Tue Feb 11 06:09:48 2020 +0000

description:
fix compilation failure for arches without l_pcu_valid
ok riastradh

diffstat:

 sys/kern/kern_lwp.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (28 lines):

diff -r 78625a08e392 -r b4073e8892b1 sys/kern/kern_lwp.c
--- a/sys/kern/kern_lwp.c       Tue Feb 11 03:15:10 2020 +0000
+++ b/sys/kern/kern_lwp.c       Tue Feb 11 06:09:48 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_lwp.c,v 1.224 2020/02/11 03:14:49 riastradh Exp $ */
+/*     $NetBSD: kern_lwp.c,v 1.225 2020/02/11 06:09:48 dogcow Exp $    */
 
 /*-
  * Copyright (c) 2001, 2006, 2007, 2008, 2009, 2019, 2020
@@ -211,7 +211,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_lwp.c,v 1.224 2020/02/11 03:14:49 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_lwp.c,v 1.225 2020/02/11 06:09:48 dogcow Exp $");
 
 #include "opt_ddb.h"
 #include "opt_lockdebug.h"
@@ -890,7 +890,9 @@
         * the MD cpu_lwp_fork() can copy the saved state to the new LWP.
         */
        pcu_save_all(l1);
+#if PCU_UNIT_COUNT > 0
        l2->l_pcu_valid = l1->l_pcu_valid;
+#endif
 
        uvm_lwp_setuarea(l2, uaddr);
        uvm_lwp_fork(l1, l2, stack, stacksize, func, (arg != NULL) ? arg : l2);



Home | Main Index | Thread Index | Old Index