CVS commit: src/sys/uvm/pmap

2020-08-19 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Thu Aug 20 05:54:32 UTC 2020

Modified Files:
src/sys/uvm/pmap: pmap.c pmap.h pmap_segtab.c

Log Message:
move pmap segtab history into a new history of only 1000 entries,
but will overflow much slower than the main pmap history.

move various debug info into kernhist.  make pte array checker
into an array and use it in pmap_segtab_release() and
pmap_pte_reserve().  move check before MD callback(), incase it
wants to change ptes for some reason (they're passed in, but
this callback is currently always NULL.)

clean up some history logs to reduce the number of lines required.


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 src/sys/uvm/pmap/pmap.c
cvs rdiff -u -r1.16 -r1.17 src/sys/uvm/pmap/pmap.h
cvs rdiff -u -r1.18 -r1.19 src/sys/uvm/pmap/pmap_segtab.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/uvm/pmap/pmap.c
diff -u src/sys/uvm/pmap/pmap.c:1.54 src/sys/uvm/pmap/pmap.c:1.55
--- src/sys/uvm/pmap/pmap.c:1.54	Wed Aug 19 07:29:01 2020
+++ src/sys/uvm/pmap/pmap.c	Thu Aug 20 05:54:32 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.54 2020/08/19 07:29:01 simonb Exp $	*/
+/*	$NetBSD: pmap.c,v 1.55 2020/08/20 05:54:32 mrg Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2001 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
 
 #include 
 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.54 2020/08/19 07:29:01 simonb Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.55 2020/08/20 05:54:32 mrg Exp $");
 
 /*
  *	Manages physical address maps.
@@ -217,8 +217,10 @@ struct pmap_limits pmap_limits = {	/* VA
 #ifdef UVMHIST
 static struct kern_history_ent pmapexechistbuf[1];
 static struct kern_history_ent pmaphistbuf[1];
+static struct kern_history_ent pmapsegtabhistbuf[1000];
 UVMHIST_DEFINE(pmapexechist);
 UVMHIST_DEFINE(pmaphist);
+UVMHIST_DEFINE(pmapsegtabhist);
 #endif
 
 /*
@@ -587,6 +589,7 @@ pmap_init(void)
 {
 	UVMHIST_INIT_STATIC(pmapexechist, pmapexechistbuf);
 	UVMHIST_INIT_STATIC(pmaphist, pmaphistbuf);
+	UVMHIST_INIT_STATIC(pmapsegtabhist, pmapsegtabhistbuf);
 
 	UVMHIST_FUNC(__func__);
 	UVMHIST_CALLED(pmaphist);

Index: src/sys/uvm/pmap/pmap.h
diff -u src/sys/uvm/pmap/pmap.h:1.16 src/sys/uvm/pmap/pmap.h:1.17
--- src/sys/uvm/pmap/pmap.h:1.16	Fri Aug  7 07:19:45 2020
+++ src/sys/uvm/pmap/pmap.h	Thu Aug 20 05:54:32 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.h,v 1.16 2020/08/07 07:19:45 skrll Exp $	*/
+/*	$NetBSD: pmap.h,v 1.17 2020/08/20 05:54:32 mrg Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -78,6 +78,7 @@
 #ifdef UVMHIST
 UVMHIST_DECL(pmapexechist);
 UVMHIST_DECL(pmaphist);
+UVMHIST_DECL(pmapsegtabhist);
 #endif
 
 /*

Index: src/sys/uvm/pmap/pmap_segtab.c
diff -u src/sys/uvm/pmap/pmap_segtab.c:1.18 src/sys/uvm/pmap/pmap_segtab.c:1.19
--- src/sys/uvm/pmap/pmap_segtab.c:1.18	Tue Aug 18 11:48:21 2020
+++ src/sys/uvm/pmap/pmap_segtab.c	Thu Aug 20 05:54:32 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap_segtab.c,v 1.18 2020/08/18 11:48:21 simonb Exp $	*/
+/*	$NetBSD: pmap_segtab.c,v 1.19 2020/08/20 05:54:32 mrg Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2001 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
 
 #include 
 
-__KERNEL_RCSID(0, "$NetBSD: pmap_segtab.c,v 1.18 2020/08/18 11:48:21 simonb Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap_segtab.c,v 1.19 2020/08/20 05:54:32 mrg Exp $");
 
 /*
  *	Manages physical address maps.
@@ -131,16 +131,32 @@ struct pmap_segtab_info {
 
 kmutex_t pmap_segtab_lock __cacheline_aligned;
 
+/*
+ * Check that a seg_tab[] array is empty.  
+ *
+ * This is used when allocating or freeing a pmap_segtab_t.  The stp
+ * should be unused -- meaning, none of the seg_tab[] pointers are
+ * not NULL, as it transitions from either freshly allocated segtab from
+ * pmap pool, an unused allocated page segtab alloc from the SMP case,
+ * where two CPUs attempt to allocate the same underlying segtab, the
+ * release of a segtab entry to the freelist, or for SMP, where reserve
+ * also frees a freshly allocated but unused entry.
+ */
 static void
 pmap_check_stp(pmap_segtab_t *stp, const char *caller, const char *why)
 {
 #ifdef DEBUG
 	for (size_t i = 0; i < PMAP_SEGTABSIZE; i++) {
-		if (stp->seg_tab[i] != 0) {
+		if (stp->seg_tab[i] != NULL) {
+#define DEBUG_NOISY
 #ifdef DEBUG_NOISY
+			UVMHIST_FUNC(__func__);
+			UVMHIST_CALLARGS(pmapsegtabhist, "stp=%#jx",
+			(uintptr_t)stp, 0, 0, 0);
 			for (size_t j = i; j < PMAP_SEGTABSIZE; j++)
-printf("%s: pm_segtab.seg_tab[%zu] = %p\n",
-caller, j, stp->seg_tab[j]);
+if (stp->seg_tab[j] != NULL)
+	printf("%s: stp->seg_tab[%zu] = %p\n",
+	caller, j, stp->seg_tab[j]);
 #endif
 			panic("%s: pm_segtab.seg_tab[%zu] != 0 (%p): %s",
 			caller, i, stp->seg_tab[i], why);
@@ -149,6 +165,31 @@ pmap_check_stp(pmap_segtab_t *stp, const
 #endif
 }
 
+/*
+ * Check that an array of ptes is actually zero.
+ */
+static void
+pmap_check_ptes(pt_entry_t *pte, const char 

CVS commit: src/libexec/httpd

2020-08-19 Thread S.P.Zeidler
Module Name:src
Committed By:   spz
Date:   Thu Aug 20 05:46:31 UTC 2020

Modified Files:
src/libexec/httpd: bozohttpd.c bozohttpd.h cgi-bozo.c ssl-bozo.c

Log Message:
send close_notify for the ssl connection before closing the TCP connection
Thanks to Dr. Thomas Orgis for reporting the issue.


To generate a diff of this commit:
cvs rdiff -u -r1.117 -r1.118 src/libexec/httpd/bozohttpd.c
cvs rdiff -u -r1.62 -r1.63 src/libexec/httpd/bozohttpd.h
cvs rdiff -u -r1.49 -r1.50 src/libexec/httpd/cgi-bozo.c
cvs rdiff -u -r1.26 -r1.27 src/libexec/httpd/ssl-bozo.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/libexec/httpd/bozohttpd.c
diff -u src/libexec/httpd/bozohttpd.c:1.117 src/libexec/httpd/bozohttpd.c:1.118
--- src/libexec/httpd/bozohttpd.c:1.117	Mon Jul 13 09:38:57 2020
+++ src/libexec/httpd/bozohttpd.c	Thu Aug 20 05:46:31 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: bozohttpd.c,v 1.117 2020/07/13 09:38:57 jruoho Exp $	*/
+/*	$NetBSD: bozohttpd.c,v 1.118 2020/08/20 05:46:31 spz Exp $	*/
 
 /*	$eterna: bozohttpd.c,v 1.178 2011/11/18 09:21:15 mrg Exp $	*/
 
@@ -1912,6 +1912,8 @@ bozo_process_request(bozo_httpreq_t *req
  cleanup:
 	close(fd);
  cleanup_nofd:
+	/* If SSL enabled send close_notify. */
+	bozo_ssl_shutdown(request->hr_httpd);
 	close(STDIN_FILENO);
 	close(STDOUT_FILENO);
 	/*close(STDERR_FILENO);*/

Index: src/libexec/httpd/bozohttpd.h
diff -u src/libexec/httpd/bozohttpd.h:1.62 src/libexec/httpd/bozohttpd.h:1.63
--- src/libexec/httpd/bozohttpd.h:1.62	Sat Jul 11 08:10:52 2020
+++ src/libexec/httpd/bozohttpd.h	Thu Aug 20 05:46:31 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: bozohttpd.h,v 1.62 2020/07/11 08:10:52 jruoho Exp $	*/
+/*	$NetBSD: bozohttpd.h,v 1.63 2020/08/20 05:46:31 spz Exp $	*/
 
 /*	$eterna: bozohttpd.h,v 1.39 2011/11/18 09:21:15 mrg Exp $	*/
 
@@ -312,6 +312,7 @@ char	*bozostrdup(bozohttpd_t *, bozo_htt
 #define bozo_ssl_set_ciphers(w, x)			bozo_noop
 #define bozo_ssl_init(x)bozo_noop
 #define bozo_ssl_accept(x)(0)
+#define bozo_ssl_shutdown(x)bozo_noop
 #define bozo_ssl_destroy(x)bozo_noop
 #define have_ssl	(0)
 #else
@@ -319,6 +320,7 @@ void	bozo_ssl_set_opts(bozohttpd_t *, co
 void	bozo_ssl_set_ciphers(bozohttpd_t *, const char *);
 void	bozo_ssl_init(bozohttpd_t *);
 int	bozo_ssl_accept(bozohttpd_t *);
+void	bozo_ssl_shutdown(bozohttpd_t *);
 void	bozo_ssl_destroy(bozohttpd_t *);
 #define have_ssl	(1)
 #endif

Index: src/libexec/httpd/cgi-bozo.c
diff -u src/libexec/httpd/cgi-bozo.c:1.49 src/libexec/httpd/cgi-bozo.c:1.50
--- src/libexec/httpd/cgi-bozo.c:1.49	Fri Dec  6 05:53:20 2019
+++ src/libexec/httpd/cgi-bozo.c	Thu Aug 20 05:46:31 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: cgi-bozo.c,v 1.49 2019/12/06 05:53:20 mrg Exp $	*/
+/*	$NetBSD: cgi-bozo.c,v 1.50 2020/08/20 05:46:31 spz Exp $	*/
 
 /*	$eterna: cgi-bozo.c,v 1.40 2011/11/18 09:21:15 mrg Exp $	*/
 
@@ -637,6 +637,8 @@ bozo_process_cgi(bozo_httpreq_t *request
 		/* child reader/writer */
 		close(STDIN_FILENO);
 		finish_cgi_output(httpd, request, sv[0], nph);
+		/* if we do SSL, send a SSL_shutdown now */
+		bozo_ssl_shutdown(request->hr_httpd);
 		/* if we're done output, our parent is useless... */
 		kill(getppid(), SIGKILL);
 		debug((httpd, DEBUG_FAT, "done processing cgi output"));

Index: src/libexec/httpd/ssl-bozo.c
diff -u src/libexec/httpd/ssl-bozo.c:1.26 src/libexec/httpd/ssl-bozo.c:1.27
--- src/libexec/httpd/ssl-bozo.c:1.26	Thu Feb 28 08:28:21 2019
+++ src/libexec/httpd/ssl-bozo.c	Thu Aug 20 05:46:31 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: ssl-bozo.c,v 1.26 2019/02/28 08:28:21 mrg Exp $	*/
+/*	$NetBSD: ssl-bozo.c,v 1.27 2020/08/20 05:46:31 spz Exp $	*/
 
 /*	$eterna: ssl-bozo.c,v 1.15 2011/11/18 09:21:15 mrg Exp $	*/
 
@@ -287,6 +287,15 @@ bozo_ssl_accept(bozohttpd_t *httpd)
 }
 
 void
+bozo_ssl_shutdown(bozohttpd_t *httpd)
+{
+	const sslinfo_t *sslinfo = httpd->sslinfo;
+
+	if (sslinfo && sslinfo->bozossl)
+		SSL_shutdown(sslinfo->bozossl);
+}
+
+void
 bozo_ssl_destroy(bozohttpd_t *httpd)
 {
 	const sslinfo_t *sslinfo = httpd->sslinfo;



CVS commit: src

2020-08-19 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Thu Aug 20 03:09:34 UTC 2020

Modified Files:
src: UPDATING

Log Message:
update the latest note to talk about all 3 potential ways that
failure can occur now (1 still upcoming.)


To generate a diff of this commit:
cvs rdiff -u -r1.311 -r1.312 src/UPDATING

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/UPDATING
diff -u src/UPDATING:1.311 src/UPDATING:1.312
--- src/UPDATING:1.311	Wed Aug 12 06:48:50 2020
+++ src/UPDATING	Thu Aug 20 03:09:34 2020
@@ -1,4 +1,4 @@
-$NetBSD: UPDATING,v 1.311 2020/08/12 06:48:50 mrg Exp $
+$NetBSD: UPDATING,v 1.312 2020/08/20 03:09:34 mrg Exp $
 
 This file (UPDATING) is intended to be a brief reference to recent
 changes that might cause problems in the build process, and a guide for
@@ -20,7 +20,9 @@ Recent changes:
 ^^^
 
 20200811:
-	GCC updates may require cleaning the objdir.
+	GCC updates may require cleaning the objdir.  This may occur
+	due to GCC 7.5 update, GCC 8.4 move to gcc.old, or the upcoming
+	GCC 9 upgrade.
 
 20200614:
 	blacklist* has been renamed to blocklist*. postinstall(8)



CVS commit: src/share/mk

2020-08-19 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Thu Aug 20 03:08:07 UTC 2020

Modified Files:
src/share/mk: bsd.own.mk

Log Message:
make GCC 8 consumers to use gcc.old.


To generate a diff of this commit:
cvs rdiff -u -r1.1204 -r1.1205 src/share/mk/bsd.own.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/mk/bsd.own.mk
diff -u src/share/mk/bsd.own.mk:1.1204 src/share/mk/bsd.own.mk:1.1205
--- src/share/mk/bsd.own.mk:1.1204	Sun Aug 16 06:43:05 2020
+++ src/share/mk/bsd.own.mk	Thu Aug 20 03:08:07 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.own.mk,v 1.1204 2020/08/16 06:43:05 mrg Exp $
+#	$NetBSD: bsd.own.mk,v 1.1205 2020/08/20 03:08:07 mrg Exp $
 
 # This needs to be before bsd.init.mk
 .if defined(BSD_MK_COMPAT_FILE)
@@ -75,9 +75,9 @@ MKGCCCMDS?=	no
 # We import the old gcc as "gcc.old" when upgrading.  EXTERNAL_GCC_SUBDIR is
 # set to the relevant subdirectory in src/external/gpl3 for his HAVE_GCC.
 #
-.if ${HAVE_GCC} == 7
+.if ${HAVE_GCC} == 8
 EXTERNAL_GCC_SUBDIR?=	gcc.old
-.elif ${HAVE_GCC} == 8
+.elif ${HAVE_GCC} == 9
 EXTERNAL_GCC_SUBDIR?=	gcc
 .else
 EXTERNAL_GCC_SUBDIR?=	/does/not/exist



CVS commit: src/usr.bin/make/unit-tests

2020-08-19 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Wed Aug 19 22:47:09 UTC 2020

Modified Files:
src/usr.bin/make/unit-tests: cond-short.mk

Log Message:
make(1): add empty lines to separate the test cases in cond-short


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/usr.bin/make/unit-tests/cond-short.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/make/unit-tests/cond-short.mk
diff -u src/usr.bin/make/unit-tests/cond-short.mk:1.8 src/usr.bin/make/unit-tests/cond-short.mk:1.9
--- src/usr.bin/make/unit-tests/cond-short.mk:1.8	Sun Jul 19 21:03:55 2020
+++ src/usr.bin/make/unit-tests/cond-short.mk	Wed Aug 19 22:47:09 2020
@@ -1,4 +1,4 @@
-# $NetBSD: cond-short.mk,v 1.8 2020/07/19 21:03:55 rillig Exp $
+# $NetBSD: cond-short.mk,v 1.9 2020/08/19 22:47:09 rillig Exp $
 #
 # Demonstrates that in conditions, the right-hand side of an && or ||
 # is only evaluated if it can actually influence the result.
@@ -123,6 +123,7 @@ x=Ok
 x=Fail
 .endif
 x!= echo 'defined(V42) && ${V42} > 0: $x' >&2; echo
+
 # this one throws both String comparison operator and
 # Malformed conditional with cond.c 1.78
 # indirect iV2 would expand to "" and treated as 0
@@ -132,6 +133,7 @@ x=Fail
 x=Ok
 .endif
 x!= echo 'defined(V66) && ( "${iV2}" < ${V42} ): $x' >&2; echo
+
 # next two thow String comparison operator with cond.c 1.78
 # indirect iV1 would expand to 42
 .if 1 || ${iV1} < ${V42}
@@ -140,12 +142,14 @@ x=Ok
 x=Fail
 .endif
 x!= echo '1 || ${iV1} < ${V42}: $x' >&2; echo
+
 .if 1 || ${iV2:U2} < ${V42}
 x=Ok
 .else
 x=Fail
 .endif
 x!= echo '1 || ${iV2:U2} < ${V42}: $x' >&2; echo
+
 # the same expressions are fine when the lhs is expanded
 # ${iV1} expands to 42
 .if 0 || ${iV1} <= ${V42}
@@ -154,6 +158,7 @@ x=Ok
 x=Fail
 .endif
 x!= echo '0 || ${iV1} <= ${V42}: $x' >&2; echo
+
 # ${iV2:U2} expands to 2
 .if 0 || ${iV2:U2} < ${V42}
 x=Ok



CVS commit: src/bin/sh

2020-08-19 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Wed Aug 19 22:41:47 UTC 2020

Modified Files:
src/bin/sh: parser.c

Log Message:
For now, probably forever, prohibit unquoted $ and ` in the names of
functions being defined (they can still be included if quoted).

If we parsed the way POSIX specifies (leaving the exact input text of
$ and ` expansions unaltered, until required to be expanded) this would
not be needed, as the name of a function being defined does not underbo
parameter, command, or arith expansions, so xxx$3() { : ; } would just
work.   But for many reasons we don't do that (and are unlikely to ever,
though maintaing both forms might be an option someday) - which led to
very obscure behaviour (if sh were compiled in DEBUG mode, even an abort())
and certainly nothing useful.   So just prohibit these uses for now.
(A portable function name must be a "name" so this makes no difference
at all to posix compat applications/scripts).

A doc update is pending (the updated sh.1 also contains updates in other
areas not yet appropriate to commit).


To generate a diff of this commit:
cvs rdiff -u -r1.170 -r1.171 src/bin/sh/parser.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/bin/sh/parser.c
diff -u src/bin/sh/parser.c:1.170 src/bin/sh/parser.c:1.171
--- src/bin/sh/parser.c:1.170	Thu May 14 08:34:17 2020
+++ src/bin/sh/parser.c	Wed Aug 19 22:41:47 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: parser.c,v 1.170 2020/05/14 08:34:17 msaitoh Exp $	*/
+/*	$NetBSD: parser.c,v 1.171 2020/08/19 22:41:47 kre Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)parser.c	8.7 (Berkeley) 5/16/95";
 #else
-__RCSID("$NetBSD: parser.c,v 1.170 2020/05/14 08:34:17 msaitoh Exp $");
+__RCSID("$NetBSD: parser.c,v 1.171 2020/08/19 22:41:47 kre Exp $");
 #endif
 #endif /* not lint */
 
@@ -666,6 +666,18 @@ simplecmd(union node **rpp, union node *
 			/* We have a function */
 			consumetoken(TRP);
 			funclinno = plinno;
+			/*
+			 * Make sure there are no unquoted $'s in the
+			 * name (allowing those, not expanding them,
+			 * simply treating '$' as a character, is desireable
+			 * but the parser has converted them to CTLxxx
+			 * chars, and that's not what we want
+			 *
+			 * Fortunately here the user can simply quote
+			 * the name to avoid this restriction.
+			 */
+			if (!noexpand(n->narg.text))
+synerror("Bad function name (use quotes)");
 			rmescapes(n->narg.text);
 			if (strchr(n->narg.text, '/'))
 synerror("Bad function name");



CVS commit: [netbsd-8] src/doc

2020-08-19 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Aug 19 18:40:09 UTC 2020

Modified Files:
src/doc [netbsd-8]: CHANGES-8.3

Log Message:
Ticket #1598


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.30 -r1.1.2.31 src/doc/CHANGES-8.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/doc/CHANGES-8.3
diff -u src/doc/CHANGES-8.3:1.1.2.30 src/doc/CHANGES-8.3:1.1.2.31
--- src/doc/CHANGES-8.3:1.1.2.30	Tue Aug 18 09:42:00 2020
+++ src/doc/CHANGES-8.3	Wed Aug 19 18:40:09 2020
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-8.3,v 1.1.2.30 2020/08/18 09:42:00 martin Exp $
+# $NetBSD: CHANGES-8.3,v 1.1.2.31 2020/08/19 18:40:09 martin Exp $
 
 A complete list of changes from the NetBSD 8.2 release to the NetBSD 8.3
 release:
@@ -1003,3 +1003,9 @@ sys/dev/ipmi.c	1.5
 	ipmi(4): Fix critical/warning threshold confusion.
 	[nonaka, ticket #1597]
 
+sys/uvm/uvm_amap.c1.123 (patch)
+
+	fix amap_extend() to handle amaps where we previously failed
+	to allocate the ppref memory.
+	[chs, ticket #1598]
+



CVS commit: [netbsd-8] src/sys/uvm

2020-08-19 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Aug 19 18:39:19 UTC 2020

Modified Files:
src/sys/uvm [netbsd-8]: uvm_amap.c

Log Message:
Pull up following revision(s) (requested by chs in ticket #1598):

sys/uvm/uvm_amap.c: revision 1.123 (via patch)

fix amap_extend() to handle amaps where we previously failed to allocate
the ppref memory.


To generate a diff of this commit:
cvs rdiff -u -r1.107.32.1 -r1.107.32.2 src/sys/uvm/uvm_amap.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/uvm/uvm_amap.c
diff -u src/sys/uvm/uvm_amap.c:1.107.32.1 src/sys/uvm/uvm_amap.c:1.107.32.2
--- src/sys/uvm/uvm_amap.c:1.107.32.1	Thu Nov  2 21:29:53 2017
+++ src/sys/uvm/uvm_amap.c	Wed Aug 19 18:39:18 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_amap.c,v 1.107.32.1 2017/11/02 21:29:53 snj Exp $	*/
+/*	$NetBSD: uvm_amap.c,v 1.107.32.2 2020/08/19 18:39:18 martin Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uvm_amap.c,v 1.107.32.1 2017/11/02 21:29:53 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_amap.c,v 1.107.32.2 2020/08/19 18:39:18 martin Exp $");
 
 #include "opt_uvmhist.h"
 
@@ -317,7 +317,7 @@ amap_extend(struct vm_map_entry *entry, 
 	struct vm_amap *amap = entry->aref.ar_amap;
 	int slotoff = entry->aref.ar_pageoff;
 	int slotmapped, slotadd, slotneed, slotadded, slotalloc;
-	int slotadj, slotspace;
+	int slotadj, slotspace, slotendoff;
 	int oldnslots;
 #ifdef UVM_AMAP_PPREF
 	int *newppref, *oldppref;
@@ -355,6 +355,36 @@ amap_extend(struct vm_map_entry *entry, 
 	tofree = NULL;
 
 	/*
+	 * Because this amap only has 1 ref, we know that there is
+	 * only one vm_map_entry pointing to it, and the one entry is
+	 * using slots between slotoff and slotoff + slotmapped.  If
+	 * we have been using ppref then we know that only slots in
+	 * the one map entry's range can have anons, since ppref
+	 * allowed us to free any anons outside that range as other map
+	 * entries which used this amap were removed. But without ppref,
+	 * we couldn't know which slots were still needed by other map
+	 * entries, so we couldn't free any anons as we removed map
+	 * entries, and so any slot from 0 to am_nslot can have an
+	 * anon.  But now that we know there is only one map entry
+	 * left and we know its range, we can free up any anons
+	 * outside that range.  This is necessary because the rest of
+	 * this function assumes that there are no anons in the amap
+	 * outside of the one map entry's range.
+	 */
+
+	slotendoff = slotoff + slotmapped;
+	if (amap->am_ppref == PPREF_NONE) {
+		amap_wiperange(amap, 0, slotoff, );
+		amap_wiperange(amap, slotendoff, amap->am_nslot - slotendoff, );
+	}
+	for (i = 0; i < slotoff; i++) {
+		KASSERT(amap->am_anon[i] == NULL);
+	}
+	for (i = slotendoff; i < amap->am_nslot - slotendoff; i++) {
+		KASSERT(amap->am_anon[i] == NULL);
+	}
+
+	/*
 	 * case 1: we already have enough slots in the map and thus
 	 * only need to bump the reference counts on the slots we are
 	 * adding.



CVS commit: [netbsd-9] src/doc

2020-08-19 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Aug 19 18:38:03 UTC 2020

Modified Files:
src/doc [netbsd-9]: CHANGES-9.1

Log Message:
Ticket #1057


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.98 -r1.1.2.99 src/doc/CHANGES-9.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/doc/CHANGES-9.1
diff -u src/doc/CHANGES-9.1:1.1.2.98 src/doc/CHANGES-9.1:1.1.2.99
--- src/doc/CHANGES-9.1:1.1.2.98	Tue Aug 18 09:37:41 2020
+++ src/doc/CHANGES-9.1	Wed Aug 19 18:38:02 2020
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-9.1,v 1.1.2.98 2020/08/18 09:37:41 martin Exp $
+# $NetBSD: CHANGES-9.1,v 1.1.2.99 2020/08/19 18:38:02 martin Exp $
 
 A complete list of changes from the NetBSD 9.0 release to the NetBSD 9.1
 release:
@@ -4773,3 +4773,9 @@ sys/dev/ipmi.c	1.5
 	ipmi(4): Fix critical/warning threshold confusion.
 	[nonaka, ticket #1056]
 
+sys/uvm/uvm_amap.c1.123 (patch)
+
+	fix amap_extend() to handle amaps where we previously failed
+	to allocate the ppref memory.
+	[chs, ticket #1057]
+



CVS commit: [netbsd-9] src/sys/uvm

2020-08-19 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Aug 19 18:36:59 UTC 2020

Modified Files:
src/sys/uvm [netbsd-9]: uvm_amap.c

Log Message:
Pull up following revision(s) (requested by chs in ticket #1057):

sys/uvm/uvm_amap.c: revision 1.123 (via patch)

fix amap_extend() to handle amaps where we previously failed to allocate
the ppref memory.


To generate a diff of this commit:
cvs rdiff -u -r1.109 -r1.109.4.1 src/sys/uvm/uvm_amap.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/uvm/uvm_amap.c
diff -u src/sys/uvm/uvm_amap.c:1.109 src/sys/uvm/uvm_amap.c:1.109.4.1
--- src/sys/uvm/uvm_amap.c:1.109	Sun Aug 12 09:29:16 2018
+++ src/sys/uvm/uvm_amap.c	Wed Aug 19 18:36:59 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_amap.c,v 1.109 2018/08/12 09:29:16 maxv Exp $	*/
+/*	$NetBSD: uvm_amap.c,v 1.109.4.1 2020/08/19 18:36:59 martin Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uvm_amap.c,v 1.109 2018/08/12 09:29:16 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_amap.c,v 1.109.4.1 2020/08/19 18:36:59 martin Exp $");
 
 #include "opt_uvmhist.h"
 
@@ -317,7 +317,7 @@ amap_extend(struct vm_map_entry *entry, 
 	struct vm_amap *amap = entry->aref.ar_amap;
 	int slotoff = entry->aref.ar_pageoff;
 	int slotmapped, slotadd, slotneed, slotadded, slotalloc;
-	int slotadj, slotarea;
+	int slotadj, slotarea, slotendoff;
 	int oldnslots;
 #ifdef UVM_AMAP_PPREF
 	int *newppref, *oldppref;
@@ -355,6 +355,36 @@ amap_extend(struct vm_map_entry *entry, 
 	tofree = NULL;
 
 	/*
+	 * Because this amap only has 1 ref, we know that there is
+	 * only one vm_map_entry pointing to it, and the one entry is
+	 * using slots between slotoff and slotoff + slotmapped.  If
+	 * we have been using ppref then we know that only slots in
+	 * the one map entry's range can have anons, since ppref
+	 * allowed us to free any anons outside that range as other map
+	 * entries which used this amap were removed. But without ppref,
+	 * we couldn't know which slots were still needed by other map
+	 * entries, so we couldn't free any anons as we removed map
+	 * entries, and so any slot from 0 to am_nslot can have an
+	 * anon.  But now that we know there is only one map entry
+	 * left and we know its range, we can free up any anons
+	 * outside that range.  This is necessary because the rest of
+	 * this function assumes that there are no anons in the amap
+	 * outside of the one map entry's range.
+	 */
+
+	slotendoff = slotoff + slotmapped;
+	if (amap->am_ppref == PPREF_NONE) {
+		amap_wiperange(amap, 0, slotoff, );
+		amap_wiperange(amap, slotendoff, amap->am_nslot - slotendoff, );
+	}
+	for (i = 0; i < slotoff; i++) {
+		KASSERT(amap->am_anon[i] == NULL);
+	}
+	for (i = slotendoff; i < amap->am_nslot - slotendoff; i++) {
+		KASSERT(amap->am_anon[i] == NULL);
+	}
+
+	/*
 	 * case 1: we already have enough slots in the map and thus
 	 * only need to bump the reference counts on the slots we are
 	 * adding.



CVS commit: src/sys/uvm

2020-08-19 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Wed Aug 19 15:36:41 UTC 2020

Modified Files:
src/sys/uvm: uvm_aobj.c

Log Message:
in uao_get(), if we unlock the uobj to read a page from swap,
we must clear the cached page array because it is now stale.
also add a missing call to uvm_page_array_fini() if the I/O fails.
fixes PR 55493.


To generate a diff of this commit:
cvs rdiff -u -r1.150 -r1.151 src/sys/uvm/uvm_aobj.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/uvm/uvm_aobj.c
diff -u src/sys/uvm/uvm_aobj.c:1.150 src/sys/uvm/uvm_aobj.c:1.151
--- src/sys/uvm/uvm_aobj.c:1.150	Wed Aug 19 07:29:00 2020
+++ src/sys/uvm/uvm_aobj.c	Wed Aug 19 15:36:41 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_aobj.c,v 1.150 2020/08/19 07:29:00 simonb Exp $	*/
+/*	$NetBSD: uvm_aobj.c,v 1.151 2020/08/19 15:36:41 chs Exp $	*/
 
 /*
  * Copyright (c) 1998 Chuck Silvers, Charles D. Cranor and
@@ -38,7 +38,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uvm_aobj.c,v 1.150 2020/08/19 07:29:00 simonb Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_aobj.c,v 1.151 2020/08/19 15:36:41 chs Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_uvmhist.h"
@@ -982,6 +982,7 @@ uao_get(struct uvm_object *uobj, voff_t 
 			 * unlock object for i/o, relock when done.
 			 */
 
+			uvm_page_array_clear();
 			rw_exit(uobj->vmobjlock);
 			error = uvm_swap_get(ptmp, swslot, PGO_SYNCIO);
 			rw_enter(uobj->vmobjlock, RW_WRITER);
@@ -1015,6 +1016,7 @@ uao_get(struct uvm_object *uobj, voff_t 
 	uvm_page_unbusy(pps, lcv);
 }
 memset(pps, 0, maxpages * sizeof(pps[0]));
+uvm_page_array_fini();
 return error;
 			}
 #else /* defined(VMSWAP) */



CVS commit: src/sys/arch/sun3/sun3x

2020-08-19 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Wed Aug 19 13:11:42 UTC 2020

Modified Files:
src/sys/arch/sun3/sun3x: pmap.c

Log Message:
Make sure pmap_kenter_pa(9) handles uncached mappings properly.

Fixes "cgfour(4) is mis-probed as bwtwo(4)" problem on 3/80
that has been broken since NetBSD 1.6.
Now Xorg 1.20 based Xsun 8bpp color server is confirmed working
on the cgfour(4).

Should be pulled up to netbsd-9.

XXX: all MD PMAP_NC flags should be replaced with MI PMAP_NOCACHE flag.


To generate a diff of this commit:
cvs rdiff -u -r1.116 -r1.117 src/sys/arch/sun3/sun3x/pmap.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/sun3/sun3x/pmap.c
diff -u src/sys/arch/sun3/sun3x/pmap.c:1.116 src/sys/arch/sun3/sun3x/pmap.c:1.117
--- src/sys/arch/sun3/sun3x/pmap.c:1.116	Thu Mar  5 15:56:20 2020
+++ src/sys/arch/sun3/sun3x/pmap.c	Wed Aug 19 13:11:42 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.116 2020/03/05 15:56:20 msaitoh Exp $	*/
+/*	$NetBSD: pmap.c,v 1.117 2020/08/19 13:11:42 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -105,7 +105,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.116 2020/03/05 15:56:20 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.117 2020/08/19 13:11:42 tsutsui Exp $");
 
 #include "opt_ddb.h"
 #include "opt_pmap_debug.h"
@@ -2145,6 +2145,12 @@ void
 pmap_kenter_pa(vaddr_t va, paddr_t pa, vm_prot_t prot, u_int flags)
 {
 	mmu_short_pte_t	*pte;
+	u_int mapflags;
+
+	/* XXX: MD PMAP_NC should be replaced by MI PMAP_NOCACHE in flags. */
+	mapflags = (pa & ~MMU_PAGE_MASK);
+	if ((mapflags & PMAP_NC) != 0)
+		flags |= PMAP_NOCACHE;
 
 	/* This array is traditionally named "Sysmap" */
 	pte = [(u_long)m68k_btop(va - KERNBASE3X)];
@@ -2153,6 +2159,8 @@ pmap_kenter_pa(vaddr_t va, paddr_t pa, v
 	pte->attr.raw = MMU_DT_INVALID | MMU_DT_PAGE | (pa & MMU_PAGE_MASK);
 	if (!(prot & VM_PROT_WRITE))
 		pte->attr.raw |= MMU_SHORT_PTE_WP;
+	if ((flags & PMAP_NOCACHE) != 0)
+		pte->attr.raw |= MMU_SHORT_PTE_CI;
 }
 
 void



CVS commit: src/sys/dev/pci

2020-08-19 Thread Shoichi YAMAGUCHI
Module Name:src
Committed By:   yamaguchi
Date:   Wed Aug 19 09:22:05 UTC 2020

Modified Files:
src/sys/dev/pci: if_ixl.c

Log Message:
Make descriptor_num in ixl(4) readonly
because ixl(4) does not support reallocating related resources

pointed out by knakahara@, thanks.


To generate a diff of this commit:
cvs rdiff -u -r1.73 -r1.74 src/sys/dev/pci/if_ixl.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/dev/pci/if_ixl.c
diff -u src/sys/dev/pci/if_ixl.c:1.73 src/sys/dev/pci/if_ixl.c:1.74
--- src/sys/dev/pci/if_ixl.c:1.73	Wed Aug 19 09:07:57 2020
+++ src/sys/dev/pci/if_ixl.c	Wed Aug 19 09:22:05 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_ixl.c,v 1.73 2020/08/19 09:07:57 yamaguchi Exp $	*/
+/*	$NetBSD: if_ixl.c,v 1.74 2020/08/19 09:22:05 yamaguchi Exp $	*/
 
 /*
  * Copyright (c) 2013-2015, Intel Corporation
@@ -74,7 +74,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_ixl.c,v 1.73 2020/08/19 09:07:57 yamaguchi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ixl.c,v 1.74 2020/08/19 09:22:05 yamaguchi Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_net_mpsafe.h"
@@ -907,7 +907,6 @@ static void	ixl_stats_update(void *);
 static int	ixl_setup_sysctls(struct ixl_softc *);
 static void	ixl_teardown_sysctls(struct ixl_softc *);
 static int	ixl_sysctl_itr_handler(SYSCTLFN_PROTO);
-static int	ixl_sysctl_ndescs_handler(SYSCTLFN_PROTO);
 static int	ixl_queue_pairs_alloc(struct ixl_softc *);
 static void	ixl_queue_pairs_free(struct ixl_softc *);
 
@@ -6656,10 +6655,9 @@ ixl_setup_sysctls(struct ixl_softc *sc)
 		goto out;
 
 	error = sysctl_createv(log, 0, , NULL,
-	CTLFLAG_READWRITE, CTLTYPE_INT, "descriptor_num",
+	CTLFLAG_READONLY, CTLTYPE_INT, "descriptor_num",
 	SYSCTL_DESCR("the number of rx descriptors"),
-	ixl_sysctl_ndescs_handler, 0,
-	(void *)sc, 0, CTL_CREATE, CTL_EOL);
+	NULL, 0, >sc_rx_ring_ndescs, 0, CTL_CREATE, CTL_EOL);
 	if (error)
 		goto out;
 
@@ -6695,10 +6693,9 @@ ixl_setup_sysctls(struct ixl_softc *sc)
 		goto out;
 
 	error = sysctl_createv(log, 0, , NULL,
-	CTLFLAG_READWRITE, CTLTYPE_INT, "descriptor_num",
+	CTLFLAG_READONLY, CTLTYPE_INT, "descriptor_num",
 	SYSCTL_DESCR("the number of tx descriptors"),
-	ixl_sysctl_ndescs_handler, 0,
-	(void *)sc, 0, CTL_CREATE, CTL_EOL);
+	NULL, 0, >sc_tx_ring_ndescs, 0, CTL_CREATE, CTL_EOL);
 	if (error)
 		goto out;
 
@@ -6781,45 +6778,6 @@ ixl_sysctl_itr_handler(SYSCTLFN_ARGS)
 	return 0;
 }
 
-static int
-ixl_sysctl_ndescs_handler(SYSCTLFN_ARGS)
-{
-	struct sysctlnode node = *rnode;
-	struct ixl_softc *sc = (struct ixl_softc *)node.sysctl_data;
-	struct ifnet *ifp = >sc_ec.ec_if;
-	unsigned int *ndescs_ptr, ndescs, n;
-	int error;
-
-	if (ixl_sysctlnode_is_rx()) {
-		ndescs_ptr = >sc_rx_ring_ndescs;
-	} else {
-		ndescs_ptr = >sc_tx_ring_ndescs;
-	}
-
-	ndescs = *ndescs_ptr;
-	node.sysctl_data = 
-	node.sysctl_size = sizeof(ndescs);
-
-	error = sysctl_lookup(SYSCTLFN_CALL());
-
-	if (error || newp == NULL)
-		return error;
-
-	if (ISSET(ifp->if_flags, IFF_RUNNING))
-		return EBUSY;
-
-	if (ndescs < 8 || 0x < ndescs)
-		return EINVAL;
-
-	n = 1U << (fls32(ndescs) - 1);
-	if (n != ndescs)
-		return EINVAL;
-
-	*ndescs_ptr = ndescs;
-
-	return 0;
-}
-
 static struct workqueue *
 ixl_workq_create(const char *name, pri_t prio, int ipl, int flags)
 {



CVS commit: src/sys/dev/pci

2020-08-19 Thread Shoichi YAMAGUCHI
Module Name:src
Committed By:   yamaguchi
Date:   Wed Aug 19 09:07:57 UTC 2020

Modified Files:
src/sys/dev/pci: if_ixl.c

Log Message:
Adjust the default descriptor sizes for ixl(4)

These decreasements has no impact for throughput
while forwarding 64-1518 byte packets.


To generate a diff of this commit:
cvs rdiff -u -r1.72 -r1.73 src/sys/dev/pci/if_ixl.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/dev/pci/if_ixl.c
diff -u src/sys/dev/pci/if_ixl.c:1.72 src/sys/dev/pci/if_ixl.c:1.73
--- src/sys/dev/pci/if_ixl.c:1.72	Wed Aug 19 09:03:50 2020
+++ src/sys/dev/pci/if_ixl.c	Wed Aug 19 09:07:57 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_ixl.c,v 1.72 2020/08/19 09:03:50 yamaguchi Exp $	*/
+/*	$NetBSD: if_ixl.c,v 1.73 2020/08/19 09:07:57 yamaguchi Exp $	*/
 
 /*
  * Copyright (c) 2013-2015, Intel Corporation
@@ -74,7 +74,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_ixl.c,v 1.72 2020/08/19 09:03:50 yamaguchi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ixl.c,v 1.73 2020/08/19 09:07:57 yamaguchi Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_net_mpsafe.h"
@@ -762,8 +762,8 @@ do {			\
 static bool		 ixl_param_nomsix = false;
 static int		 ixl_param_stats_interval = IXL_STATS_INTERVAL_MSEC;
 static int		 ixl_param_nqps_limit = IXL_QUEUE_NUM;
-static unsigned int	 ixl_param_tx_ndescs = 1024;
-static unsigned int	 ixl_param_rx_ndescs = 1024;
+static unsigned int	 ixl_param_tx_ndescs = 512;
+static unsigned int	 ixl_param_rx_ndescs = 256;
 
 static enum i40e_mac_type
 	ixl_mactype(pci_product_id_t);



CVS commit: src/sys/dev/pci

2020-08-19 Thread Shoichi YAMAGUCHI
Module Name:src
Committed By:   yamaguchi
Date:   Wed Aug 19 09:03:50 UTC 2020

Modified Files:
src/sys/dev/pci: if_ixl.c

Log Message:
whitespace fix

>From msaitoh@, thanks.


To generate a diff of this commit:
cvs rdiff -u -r1.71 -r1.72 src/sys/dev/pci/if_ixl.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/dev/pci/if_ixl.c
diff -u src/sys/dev/pci/if_ixl.c:1.71 src/sys/dev/pci/if_ixl.c:1.72
--- src/sys/dev/pci/if_ixl.c:1.71	Fri Jul 31 09:34:33 2020
+++ src/sys/dev/pci/if_ixl.c	Wed Aug 19 09:03:50 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_ixl.c,v 1.71 2020/07/31 09:34:33 yamaguchi Exp $	*/
+/*	$NetBSD: if_ixl.c,v 1.72 2020/08/19 09:03:50 yamaguchi Exp $	*/
 
 /*
  * Copyright (c) 2013-2015, Intel Corporation
@@ -74,7 +74,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_ixl.c,v 1.71 2020/07/31 09:34:33 yamaguchi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ixl.c,v 1.72 2020/08/19 09:03:50 yamaguchi Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_net_mpsafe.h"
@@ -4399,7 +4399,7 @@ ixl_phy_mask_ints(struct ixl_softc *sc)
 }
 
 static int
-ixl_get_phy_abilities(struct ixl_softc *sc,struct ixl_dmamem *idm)
+ixl_get_phy_abilities(struct ixl_softc *sc, struct ixl_dmamem *idm)
 {
 	struct ixl_aq_desc iaq;
 	int rv;
@@ -4840,7 +4840,7 @@ ixl_register_rss_key(struct ixl_softc *s
 
 	ixl_get_default_rss_key(rss_seed, sizeof(rss_seed));
 
-	if (ISSET(sc->sc_aq_flags, IXL_SC_AQ_FLAG_RSS)){
+	if (ISSET(sc->sc_aq_flags, IXL_SC_AQ_FLAG_RSS)) {
 		rv = ixl_set_rss_key(sc, (uint8_t*)rss_seed,
 		sizeof(rss_seed));
 	} else {
@@ -5874,7 +5874,7 @@ ixl_establish_msix(struct ixl_softc *sc)
 		}
 
 		aprint_normal_dev(sc->sc_dev,
-		"for TXRX%d interrupt at %s",i , intrstr);
+		"for TXRX%d interrupt at %s", i, intrstr);
 
 		kcpuset_zero(affinity);
 		kcpuset_set(affinity, affinity_to);



CVS commit: src/sys

2020-08-19 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Wed Aug 19 07:29:01 UTC 2020

Modified Files:
src/sys/arch/hppa/hppa: pmap.c
src/sys/miscfs/genfs: genfs_io.c
src/sys/uvm: uvm_aobj.c
src/sys/uvm/pmap: pmap.c

Log Message:
Remove trailing \n from UVMHIST_LOG() format strings.


To generate a diff of this commit:
cvs rdiff -u -r1.113 -r1.114 src/sys/arch/hppa/hppa/pmap.c
cvs rdiff -u -r1.100 -r1.101 src/sys/miscfs/genfs/genfs_io.c
cvs rdiff -u -r1.149 -r1.150 src/sys/uvm/uvm_aobj.c
cvs rdiff -u -r1.53 -r1.54 src/sys/uvm/pmap/pmap.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/hppa/hppa/pmap.c
diff -u src/sys/arch/hppa/hppa/pmap.c:1.113 src/sys/arch/hppa/hppa/pmap.c:1.114
--- src/sys/arch/hppa/hppa/pmap.c:1.113	Mon May 25 21:15:10 2020
+++ src/sys/arch/hppa/hppa/pmap.c	Wed Aug 19 07:29:00 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.113 2020/05/25 21:15:10 ad Exp $	*/
+/*	$NetBSD: pmap.c,v 1.114 2020/08/19 07:29:00 simonb Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002, 2020 The NetBSD Foundation, Inc.
@@ -65,7 +65,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.113 2020/05/25 21:15:10 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.114 2020/08/19 07:29:00 simonb Exp $");
 
 #include "opt_cputype.h"
 
@@ -877,7 +877,7 @@ pmap_bootstrap(vaddr_t vstart)
 		pmap_hpt = addr;
 		addr += pmap_hptsize;
 
-		UVMHIST_LOG(maphist, "hpt_table %#jx @ %#jx\n",
+		UVMHIST_LOG(maphist, "hpt_table %#jx @ %#jx",
 		pmap_hptsize, addr, 0, 0);
 
 		if ((error = (cpu_hpt_init)(pmap_hpt, pmap_hptsize)) < 0) {

Index: src/sys/miscfs/genfs/genfs_io.c
diff -u src/sys/miscfs/genfs/genfs_io.c:1.100 src/sys/miscfs/genfs/genfs_io.c:1.101
--- src/sys/miscfs/genfs/genfs_io.c:1.100	Fri Aug 14 09:06:14 2020
+++ src/sys/miscfs/genfs/genfs_io.c	Wed Aug 19 07:29:00 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: genfs_io.c,v 1.100 2020/08/14 09:06:14 chs Exp $	*/
+/*	$NetBSD: genfs_io.c,v 1.101 2020/08/19 07:29:00 simonb Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: genfs_io.c,v 1.100 2020/08/14 09:06:14 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: genfs_io.c,v 1.101 2020/08/19 07:29:00 simonb Exp $");
 
 #include 
 #include 
@@ -689,7 +689,7 @@ genfs_getpages_read(struct vnode *vp, st
 		lbn = offset >> fs_bshift;
 		error = VOP_BMAP(vp, lbn, , , );
 		if (error) {
-			UVMHIST_LOG(ubchist, "VOP_BMAP lbn 0x%jx -> %jd\n",
+			UVMHIST_LOG(ubchist, "VOP_BMAP lbn 0x%jx -> %jd",
 			lbn,error,0,0);
 			skipbytes += bytes;
 			bytes = 0;
@@ -1516,7 +1516,7 @@ genfs_do_io(struct vnode *vp, off_t off,
 		lbn = offset >> fs_bshift;
 		error = VOP_BMAP(vp, lbn, , , );
 		if (error) {
-			UVMHIST_LOG(ubchist, "VOP_BMAP lbn 0x%jx -> %jd\n",
+			UVMHIST_LOG(ubchist, "VOP_BMAP lbn 0x%jx -> %jd",
 			lbn, error, 0, 0);
 			skipbytes += bytes;
 			bytes = 0;

Index: src/sys/uvm/uvm_aobj.c
diff -u src/sys/uvm/uvm_aobj.c:1.149 src/sys/uvm/uvm_aobj.c:1.150
--- src/sys/uvm/uvm_aobj.c:1.149	Thu Jul  9 05:57:15 2020
+++ src/sys/uvm/uvm_aobj.c	Wed Aug 19 07:29:00 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_aobj.c,v 1.149 2020/07/09 05:57:15 skrll Exp $	*/
+/*	$NetBSD: uvm_aobj.c,v 1.150 2020/08/19 07:29:00 simonb Exp $	*/
 
 /*
  * Copyright (c) 1998 Chuck Silvers, Charles D. Cranor and
@@ -38,7 +38,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uvm_aobj.c,v 1.149 2020/07/09 05:57:15 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_aobj.c,v 1.150 2020/08/19 07:29:00 simonb Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_uvmhist.h"
@@ -957,7 +957,7 @@ uao_get(struct uvm_object *uobj, voff_t 
 		/* out of RAM? */
 		if (ptmp == NULL) {
 			rw_exit(uobj->vmobjlock);
-			UVMHIST_LOG(pdhist, "sleeping, ptmp == NULL\n",0,0,0,0);
+			UVMHIST_LOG(pdhist, "sleeping, ptmp == NULL",0,0,0,0);
 			uvm_wait("uao_getpage");
 			rw_enter(uobj->vmobjlock, RW_WRITER);
 			uvm_page_array_clear();

Index: src/sys/uvm/pmap/pmap.c
diff -u src/sys/uvm/pmap/pmap.c:1.53 src/sys/uvm/pmap/pmap.c:1.54
--- src/sys/uvm/pmap/pmap.c:1.53	Tue Aug 11 06:09:44 2020
+++ src/sys/uvm/pmap/pmap.c	Wed Aug 19 07:29:01 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.53 2020/08/11 06:09:44 skrll Exp $	*/
+/*	$NetBSD: pmap.c,v 1.54 2020/08/19 07:29:01 simonb Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2001 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
 
 #include 
 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.53 2020/08/11 06:09:44 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.54 2020/08/19 07:29:01 simonb Exp $");
 
 /*
  *	Manages physical address maps.
@@ -405,13 +405,13 @@ pmap_page_syncicache(struct vm_page *pg)
 	VM_PAGEMD_PVLIST_READLOCK(mdpg);
 	pmap_pvlist_check(mdpg);
 
-	UVMHIST_LOG(pmaphist, "pv %jx pv_pmap %jx\n", (uintptr_t)pv,
+	UVMHIST_LOG(pmaphist, "pv %jx pv_pmap %jx", (uintptr_t)pv,
 	 (uintptr_t)pv->pv_pmap, 0, 0);
 
 	if (pv->pv_pmap != NULL) {
 		for (; pv != 

CVS commit: src/usr.bin/make

2020-08-19 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Wed Aug 19 06:30:37 UTC 2020

Modified Files:
src/usr.bin/make: Makefile

Log Message:
make(1): don't optimize when measuring the code coverage

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96622


To generate a diff of this commit:
cvs rdiff -u -r1.89 -r1.90 src/usr.bin/make/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/make/Makefile
diff -u src/usr.bin/make/Makefile:1.89 src/usr.bin/make/Makefile:1.90
--- src/usr.bin/make/Makefile:1.89	Sat Aug 15 01:49:07 2020
+++ src/usr.bin/make/Makefile	Wed Aug 19 06:30:37 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.89 2020/08/15 01:49:07 rillig Exp $
+#	$NetBSD: Makefile,v 1.90 2020/08/19 06:30:37 rillig Exp $
 #	@(#)Makefile	5.2 (Berkeley) 12/28/90
 
 PROG=	make
@@ -45,7 +45,7 @@ HDRS+=  trace.h
 USE_COVERAGE?=	no		# works only with gcc; clang9 fails to link
 .if ${USE_COVERAGE} == "yes"
 GCOV?=		gcov
-COPTS+=		--coverage -O2 -ggdb
+COPTS+=		--coverage -O0 -ggdb
 LDADD+=		--coverage
 .endif
 CLEANFILES+=	*.gcda *.gcno *.gcov



CVS commit: src/sys/uvm/pmap

2020-08-19 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Aug 19 06:11:49 UTC 2020

Modified Files:
src/sys/uvm/pmap: pmap_tlb.c pmap_tlb.h

Log Message:
KNF.  Add some whitespace to the TLBINV_MAP macro and tlb_invalidate_op
enum.


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/sys/uvm/pmap/pmap_tlb.c
cvs rdiff -u -r1.14 -r1.15 src/sys/uvm/pmap/pmap_tlb.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/uvm/pmap/pmap_tlb.c
diff -u src/sys/uvm/pmap/pmap_tlb.c:1.38 src/sys/uvm/pmap/pmap_tlb.c:1.39
--- src/sys/uvm/pmap/pmap_tlb.c:1.38	Wed Aug 19 06:08:27 2020
+++ src/sys/uvm/pmap/pmap_tlb.c	Wed Aug 19 06:11:49 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap_tlb.c,v 1.38 2020/08/19 06:08:27 skrll Exp $	*/
+/*	$NetBSD: pmap_tlb.c,v 1.39 2020/08/19 06:11:49 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include 
 
-__KERNEL_RCSID(0, "$NetBSD: pmap_tlb.c,v 1.38 2020/08/19 06:08:27 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap_tlb.c,v 1.39 2020/08/19 06:11:49 skrll Exp $");
 
 /*
  * Manages address spaces in a TLB.
@@ -626,11 +626,11 @@ pmap_tlb_shootdown_process(void)
  * can be loaded in a single instruction.
  */
 #define	TLBINV_MAP(op, nobody, one, alluser, allkernel, all)	\
-	   (nobody) << 3*TLBINV_NOBODY)			\
-	 | (  (one) << 3*TLBINV_ONE)			\
-	 | (  (alluser) << 3*TLBINV_ALLUSER)			\
-	 | ((allkernel) << 3*TLBINV_ALLKERNEL)			\
-	 | (  (all) << 3*TLBINV_ALL)) >> 3*(op)) & 7)
+	   (nobody) << 3 * TLBINV_NOBODY)			\
+	 | (  (one) << 3 * TLBINV_ONE)			\
+	 | (  (alluser) << 3 * TLBINV_ALLUSER)			\
+	 | ((allkernel) << 3 * TLBINV_ALLKERNEL)			\
+	 | (  (all) << 3 * TLBINV_ALL)) >> 3 * (op)) & 7)
 
 #define	TLBINV_USER_MAP(op)	\
 	TLBINV_MAP(op, TLBINV_ONE, TLBINV_ALLUSER, TLBINV_ALLUSER,	\

Index: src/sys/uvm/pmap/pmap_tlb.h
diff -u src/sys/uvm/pmap/pmap_tlb.h:1.14 src/sys/uvm/pmap/pmap_tlb.h:1.15
--- src/sys/uvm/pmap/pmap_tlb.h:1.14	Sat Aug  1 07:14:05 2020
+++ src/sys/uvm/pmap/pmap_tlb.h	Wed Aug 19 06:11:49 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap_tlb.h,v 1.14 2020/08/01 07:14:05 skrll Exp $	*/
+/*	$NetBSD: pmap_tlb.h,v 1.15 2020/08/19 06:11:49 skrll Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -104,11 +104,11 @@ struct pmap_asid_info {
 	- offsetof(struct pmap, pm_pai[tlbinfo_index(ti)])))
 
 enum tlb_invalidate_op {
-	TLBINV_NOBODY=0,
-	TLBINV_ONE=1,
-	TLBINV_ALLUSER=2,
-	TLBINV_ALLKERNEL=3,
-	TLBINV_ALL=4
+	TLBINV_NOBODY = 0,
+	TLBINV_ONE = 1,
+	TLBINV_ALLUSER = 2,
+	TLBINV_ALLKERNEL = 3,
+	TLBINV_ALL = 4
 };
 
 struct pmap_tlb_info {



CVS commit: src/usr.bin/make

2020-08-19 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Wed Aug 19 06:10:07 UTC 2020

Modified Files:
src/usr.bin/make: make.1
src/usr.bin/make/unit-tests: varmod-subst.mk

Log Message:
make(1): fix a few inconsistencies in the manual page


To generate a diff of this commit:
cvs rdiff -u -r1.286 -r1.287 src/usr.bin/make/make.1
cvs rdiff -u -r1.2 -r1.3 src/usr.bin/make/unit-tests/varmod-subst.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/make/make.1
diff -u src/usr.bin/make/make.1:1.286 src/usr.bin/make/make.1:1.287
--- src/usr.bin/make/make.1:1.286	Wed Aug  5 08:50:42 2020
+++ src/usr.bin/make/make.1	Wed Aug 19 06:10:06 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: make.1,v 1.286 2020/08/05 08:50:42 dholland Exp $
+.\"	$NetBSD: make.1,v 1.287 2020/08/19 06:10:06 rillig Exp $
 .\"
 .\" Copyright (c) 1990, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\"
 .\"	from: @(#)make.1	8.4 (Berkeley) 3/19/94
 .\"
-.Dd August 5, 2020
+.Dd August 19, 2020
 .Dt MAKE 1
 .Os
 .Sh NAME
@@ -318,7 +318,8 @@ as an argument).
 .It Fl n
 Display the commands that would have been executed, but do not
 actually execute them unless the target depends on the .MAKE special
-source (see below).
+source (see below) or the command is prefixed with
+.Ql Ic + .
 .It Fl N
 Display the commands which would have been executed, but do not
 actually execute any of them; useful for debugging top-level makefiles
@@ -622,7 +623,7 @@ This shorter form is not recommended.
 .Pp
 If the variable name contains a dollar, then the name itself is expanded first.
 This allows almost arbitrary variable names, however names containing dollar,
-braces, parenthesis, or whitespace are really best avoided!
+braces, parentheses, or whitespace are really best avoided!
 .Pp
 If the result of expanding a variable contains a dollar sign
 .Pq Ql \&$
@@ -1184,7 +1185,7 @@ Replaces each word in the variable with 
 .It Cm \&:H
 Replaces each word in the variable with everything but the last component.
 .It Cm \&:M Ns Ar pattern
-Select only those words that match
+Selects only those words that match
 .Ar pattern .
 The standard shell wildcard characters
 .Pf ( Ql * ,
@@ -1208,11 +1209,11 @@ This is identical to
 but selects all words which do not match
 .Ar pattern .
 .It Cm \&:O
-Order every word in variable alphabetically.
+Orders every word in variable alphabetically.
 .It Cm \&:Or
-Order every word in variable in reverse alphabetical order.
+Orders every word in variable in reverse alphabetical order.
 .It Cm \&:Ox
-Randomize words in variable.
+Shuffles the words in variable.
 The results will be different each time you are referring to the
 modified variable; use the assignment with expansion
 .Pq Ql Cm \&:=
@@ -1262,7 +1263,7 @@ If a
 .Va utc
 value is not provided or is 0, the current time is used.
 .It Cm \&:hash
-Compute a 32-bit hash of the value and encode it as hex digits.
+Computes a 32-bit hash of the value and encode it as hex digits.
 .It Cm \&:localtime[=utc]
 The value is a format string for
 .Xr strftime 3 ,
@@ -1272,7 +1273,7 @@ If a
 .Va utc
 value is not provided or is 0, the current time is used.
 .It Cm \&:tA
-Attempt to convert variable to an absolute path using
+Attempts to convert variable to an absolute path using
 .Xr realpath 3 ,
 if that fails, the value is unchanged.
 .It Cm \&:tl
@@ -1284,7 +1285,7 @@ This modifier sets the separator to the 
 If
 .Ar c
 is omitted, then no separator is used.
-The common escapes (including octal numeric codes), work as expected.
+The common escapes (including octal numeric codes) work as expected.
 .It Cm \&:tu
 Converts variable to upper-case letters.
 .It Cm \&:tW
@@ -1300,9 +1301,9 @@ See also
 .Sm off
 .It Cm \&:S No \&/ Ar old_string No \&/ Ar new_string No \&/ Op Cm 1gW
 .Sm on
-Modify the first occurrence of
+Modifies the first occurrence of
 .Ar old_string
-in the variable's value, replacing it with
+in each word of the variable's value, replacing it with
 .Ar new_string .
 If a
 .Ql g
@@ -1310,7 +1311,7 @@ is appended to the last slash of the pat
 in each word are replaced.
 If a
 .Ql 1
-is appended to the last slash of the pattern, only the first word
+is appended to the last slash of the pattern, only the first occurrence
 is affected.
 If a
 .Ql W
@@ -1400,9 +1401,9 @@ and
 are subjected to variable expansion before being parsed as
 regular expressions.
 .It Cm \&:T
-Replaces each word in the variable with its last component.
+Replaces each word in the variable with its last path component.
 .It Cm \&:u
-Remove adjacent duplicate words (like
+Removes adjacent duplicate words (like
 .Xr uniq 1 ) .
 .Sm off
 .It Cm \&:\&? Ar true_string Cm \&: Ar false_string
@@ -1418,7 +1419,7 @@ usually contain variable expansions.
 A common error is trying to use expressions like
 .Dl ${NUMBERS:M42:?match:no}
 which actually tests 

CVS commit: src/sys/uvm/pmap

2020-08-19 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Aug 19 06:08:27 UTC 2020

Modified Files:
src/sys/uvm/pmap: pmap_tlb.c

Log Message:
Unwrap short line KASSERT


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/sys/uvm/pmap/pmap_tlb.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/uvm/pmap/pmap_tlb.c
diff -u src/sys/uvm/pmap/pmap_tlb.c:1.37 src/sys/uvm/pmap/pmap_tlb.c:1.38
--- src/sys/uvm/pmap/pmap_tlb.c:1.37	Wed Aug 19 06:07:03 2020
+++ src/sys/uvm/pmap/pmap_tlb.c	Wed Aug 19 06:08:27 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap_tlb.c,v 1.37 2020/08/19 06:07:03 skrll Exp $	*/
+/*	$NetBSD: pmap_tlb.c,v 1.38 2020/08/19 06:08:27 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include 
 
-__KERNEL_RCSID(0, "$NetBSD: pmap_tlb.c,v 1.37 2020/08/19 06:07:03 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap_tlb.c,v 1.38 2020/08/19 06:08:27 skrll Exp $");
 
 /*
  * Manages address spaces in a TLB.
@@ -551,8 +551,7 @@ pmap_tlb_shootdown_process(void)
 #endif
 
 	KASSERT(cpu_intr_p());
-	KASSERTMSG(ci->ci_cpl >= IPL_SCHED,
-	"%s: cpl (%d) < IPL_SCHED (%d)",
+	KASSERTMSG(ci->ci_cpl >= IPL_SCHED, "%s: cpl (%d) < IPL_SCHED (%d)",
 	__func__, ci->ci_cpl, IPL_SCHED);
 
 	TLBINFO_LOCK(ti);



CVS commit: src/sys/uvm/pmap

2020-08-19 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Aug 19 06:07:03 UTC 2020

Modified Files:
src/sys/uvm/pmap: pmap_tlb.c

Log Message:
Fix inverted logic test in pmap_tlb_shootdown_process for if the victim
is onproc.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/sys/uvm/pmap/pmap_tlb.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/uvm/pmap/pmap_tlb.c
diff -u src/sys/uvm/pmap/pmap_tlb.c:1.36 src/sys/uvm/pmap/pmap_tlb.c:1.37
--- src/sys/uvm/pmap/pmap_tlb.c:1.36	Tue Aug 11 06:54:14 2020
+++ src/sys/uvm/pmap/pmap_tlb.c	Wed Aug 19 06:07:03 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap_tlb.c,v 1.36 2020/08/11 06:54:14 skrll Exp $	*/
+/*	$NetBSD: pmap_tlb.c,v 1.37 2020/08/19 06:07:03 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include 
 
-__KERNEL_RCSID(0, "$NetBSD: pmap_tlb.c,v 1.36 2020/08/11 06:54:14 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap_tlb.c,v 1.37 2020/08/19 06:07:03 skrll Exp $");
 
 /*
  * Manages address spaces in a TLB.
@@ -564,7 +564,7 @@ pmap_tlb_shootdown_process(void)
 		 */
 		struct pmap_asid_info * const pai = PMAP_PAI(ti->ti_victim, ti);
 		KASSERT(ti->ti_victim != pmap_kernel());
-		if (!pmap_tlb_intersecting_onproc_p(ti->ti_victim, ti)) {
+		if (pmap_tlb_intersecting_onproc_p(ti->ti_victim, ti)) {
 			/*
 			 * The victim is an active pmap so we will just
 			 * invalidate its TLB entries.