CVS commit: src/tests/lib/libc/sys

2020-08-24 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Tue Aug 25 01:37:39 UTC 2020

Modified Files:
src/tests/lib/libc/sys: t_getrandom.c

Log Message:
Fix getrandom() tests.

Use sigaction() without SA_RESTART -- signal() implies SA_RESTART so
we never got the EINTR.

While here, reduce the timeout to something more reasonable so we
don't waste 20min of testbed time if anything goes wrong and the
one-second alarm doesn't fire.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libc/sys/t_getrandom.c

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

Modified files:

Index: src/tests/lib/libc/sys/t_getrandom.c
diff -u src/tests/lib/libc/sys/t_getrandom.c:1.2 src/tests/lib/libc/sys/t_getrandom.c:1.3
--- src/tests/lib/libc/sys/t_getrandom.c:1.2	Sun Aug 23 17:50:19 2020
+++ src/tests/lib/libc/sys/t_getrandom.c	Tue Aug 25 01:37:38 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_getrandom.c,v 1.2 2020/08/23 17:50:19 riastradh Exp $	*/
+/*	$NetBSD: t_getrandom.c,v 1.3 2020/08/25 01:37:38 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -30,13 +30,14 @@
  */
 
 #include 
-__RCSID("$NetBSD: t_getrandom.c,v 1.2 2020/08/23 17:50:19 riastradh Exp $");
+__RCSID("$NetBSD: t_getrandom.c,v 1.3 2020/08/25 01:37:38 riastradh Exp $");
 
 #include 
 
 #include 
 #include 
 #include 
+#include 
 #include 
 
 static uint8_t buf[65536];
@@ -45,6 +46,22 @@ static uint8_t zero24[24];
 static void
 alarm_handler(int signo)
 {
+
+	fprintf(stderr, "timeout\n");
+}
+
+static void
+install_alarm_handler(void)
+{
+	struct sigaction sa;
+
+	memset(, 0, sizeof sa);
+	sa.sa_handler = alarm_handler;
+	sigfillset(_mask);
+	sa.sa_flags = 0;	/* no SA_RESTART */
+
+	ATF_CHECK_MSG(sigaction(SIGALRM, , NULL) != -1,
+	"sigaction(SIGALRM): %s", strerror(errno));
 }
 
 /*
@@ -58,14 +75,14 @@ ATF_TC(getrandom_default);
 ATF_TC_HEAD(getrandom_default, tc)
 {
 	atf_tc_set_md_var(tc, "descr", "getrandom(..., 0)");
+	atf_tc_set_md_var(tc, "timeout", "2");
 }
 ATF_TC_BODY(getrandom_default, tc)
 {
 	ssize_t n;
 
-	ATF_REQUIRE(signal(SIGALRM, _handler) != SIG_ERR);
-
 	/* default */
+	install_alarm_handler();
 	alarm(1);
 	memset(buf, 0, sizeof buf);
 	n = getrandom(buf, sizeof buf, 0);
@@ -141,14 +158,14 @@ ATF_TC(getrandom_random);
 ATF_TC_HEAD(getrandom_random, tc)
 {
 	atf_tc_set_md_var(tc, "descr", "getrandom(..., GRND_RANDOM)");
+	atf_tc_set_md_var(tc, "timeout", "2");
 }
 ATF_TC_BODY(getrandom_random, tc)
 {
 	ssize_t n;
 
-	ATF_REQUIRE(signal(SIGALRM, _handler) != SIG_ERR);
-
 	/* `random' (hokey) */
+	install_alarm_handler();
 	alarm(1);
 	memset(buf, 0, sizeof buf);
 	n = getrandom(buf, sizeof buf, GRND_RANDOM);



CVS commit: src/usr.bin/make

2020-08-24 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Mon Aug 24 20:15:51 UTC 2020

Modified Files:
src/usr.bin/make: enum.c enum.h make.c make.h targ.c var.c

Log Message:
make(1): in debug mode, print GNode details in symbols

A string like OP_DEPENDS|OP_OPTIONAL|OP_PRECIOUS is much easier to read
and understand than the bit pattern 0089.

The implementation in enum.h looks really bloated and ugly, but using
this API is as simple and natural as possible.  That's the trade-off.

In enum.h, I thought about choosing the numbers in the macros such that
it is always possible to combine two of them in order to reach an
arbitrary number, because of the "part1, part2" in the ENUM__SPEC macro.
The powers of 2 are not these numbers, as 7 cannot be expressed as the
sum of two of them.  Neither are the fibonacci numbers since 12 cannot
be expressed as the sum of 2 fibonacci numbers.  I tried to find a
general pattern to generate these minimal 2-sum numbers, but failed.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/usr.bin/make/enum.c
cvs rdiff -u -r1.6 -r1.7 src/usr.bin/make/enum.h
cvs rdiff -u -r1.121 -r1.122 src/usr.bin/make/make.c
cvs rdiff -u -r1.125 -r1.126 src/usr.bin/make/make.h
cvs rdiff -u -r1.71 -r1.72 src/usr.bin/make/targ.c
cvs rdiff -u -r1.469 -r1.470 src/usr.bin/make/var.c

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/enum.c
diff -u src/usr.bin/make/enum.c:1.3 src/usr.bin/make/enum.c:1.4
--- src/usr.bin/make/enum.c:1.3	Sun Aug  9 09:44:14 2020
+++ src/usr.bin/make/enum.c	Mon Aug 24 20:15:51 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: enum.c,v 1.3 2020/08/09 09:44:14 rillig Exp $	*/
+/*	$NetBSD: enum.c,v 1.4 2020/08/24 20:15:51 rillig Exp $	*/
 
 /*
  Copyright (c) 2020 Roland Illig 
@@ -28,11 +28,11 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: enum.c,v 1.3 2020/08/09 09:44:14 rillig Exp $";
+static char rcsid[] = "$NetBSD: enum.c,v 1.4 2020/08/24 20:15:51 rillig Exp $";
 #else
 #include 
 #ifndef lint
-__RCSID("$NetBSD: enum.c,v 1.3 2020/08/09 09:44:14 rillig Exp $");
+__RCSID("$NetBSD: enum.c,v 1.4 2020/08/24 20:15:51 rillig Exp $");
 #endif
 #endif
 
@@ -44,8 +44,8 @@ __RCSID("$NetBSD: enum.c,v 1.3 2020/08/0
 /* Convert a bitset into a string representation showing the names of the
  * individual bits, or optionally shortcuts for groups of bits. */
 const char *
-Enum_ToString(char *buf, size_t buf_size, int value,
-	  const EnumToStringSpec *spec)
+Enum_FlagsToString(char *buf, size_t buf_size,
+		   int value, const EnumToStringSpec *spec)
 {
 	const char *buf_start = buf;
 	const char *sep = "";
@@ -81,3 +81,14 @@ Enum_ToString(char *buf, size_t buf_size
 	buf[0] = '\0';
 	return buf_start;
 }
+
+/* Convert a fixed-value enum into a string representation. */
+const char *
+Enum_ValueToString(int value, const EnumToStringSpec *spec)
+{
+	for (; spec->es_name[0] != '\0'; spec++) {
+	if (value == spec->es_value)
+	return spec->es_name;
+	}
+	assert(!"unknown enum value");
+}

Index: src/usr.bin/make/enum.h
diff -u src/usr.bin/make/enum.h:1.6 src/usr.bin/make/enum.h:1.7
--- src/usr.bin/make/enum.h:1.6	Sun Aug 23 09:28:52 2020
+++ src/usr.bin/make/enum.h	Mon Aug 24 20:15:51 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: enum.h,v 1.6 2020/08/23 09:28:52 rillig Exp $	*/
+/*	$NetBSD: enum.h,v 1.7 2020/08/24 20:15:51 rillig Exp $	*/
 
 /*
  Copyright (c) 2020 Roland Illig 
@@ -41,58 +41,95 @@ typedef struct {
 	const char *es_name;
 } EnumToStringSpec;
 
-const char *Enum_ToString(char *, size_t, int, const EnumToStringSpec *);
+const char *Enum_FlagsToString(char *, size_t, int, const EnumToStringSpec *);
+const char *Enum_ValueToString(int, const EnumToStringSpec *);
 
 #define ENUM__SEP "|"
 
 #define ENUM__JOIN_1(v1) \
 	#v1
 #define ENUM__JOIN_2(v1, v2) \
-	#v1 ENUM__SEP ENUM__JOIN_1(v2)
-#define ENUM__JOIN_3(v1, v2, v3) \
-	#v1 ENUM__SEP ENUM__JOIN_2(v2, v3)
+	#v1 ENUM__SEP #v2
 #define ENUM__JOIN_4(v1, v2, v3, v4) \
-	#v1 ENUM__SEP ENUM__JOIN_3(v2, v3, v4)
-#define ENUM__JOIN_5(v1, v2, v3, v4, v5) \
-	#v1 ENUM__SEP ENUM__JOIN_4(v2, v3, v4, v5)
-#define ENUM__JOIN_6(v1, v2, v3, v4, v5, v6) \
-	#v1 ENUM__SEP ENUM__JOIN_5(v2, v3, v4, v5, v6)
-#define ENUM__JOIN_7(v1, v2, v3, v4, v5, v6, v7) \
-	#v1 ENUM__SEP ENUM__JOIN_6(v2, v3, v4, v5, v6, v7)
+	ENUM__JOIN_2(v1, v2) ENUM__SEP ENUM__JOIN_2(v3, v4)
 #define ENUM__JOIN_8(v1, v2, v3, v4, v5, v6, v7, v8) \
-	#v1 ENUM__SEP ENUM__JOIN_7(v2, v3, v4, v5, v6, v7, v8)
+	ENUM__JOIN_4(v1, v2, v3, v4) ENUM__SEP ENUM__JOIN_4(v5, v6, v7, v8)
+#define ENUM__JOIN_16(v01, v02, v03, v04, v05, v06, v07, v08, \
+		  v09, v10, v11, v12, v13, v14, v15, v16) \
+	ENUM__JOIN_8(v01, v02, v03, v04, v05, v06, v07, v08) ENUM__SEP \
+	ENUM__JOIN_8(v09, v10, v11, v12, v13, v14, v15, v16)
+#define ENUM__JOIN_32(v01, v02, v03, v04, v05, v06, v07, v08, \
+		  v09, v10, v11, v12, v13, v14, v15, v16, \
+		  v17, v18, v19, 

CVS commit: src/share/man/man4/man4.i386

2020-08-24 Thread Ryo ONODERA
Module Name:src
Committed By:   ryoon
Date:   Mon Aug 24 19:36:32 UTC 2020

Modified Files:
src/share/man/man4/man4.i386: elansc.4

Log Message:
Do not split for AUTHORS

And bump date.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/share/man/man4/man4.i386/elansc.4

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

Modified files:

Index: src/share/man/man4/man4.i386/elansc.4
diff -u src/share/man/man4/man4.i386/elansc.4:1.15 src/share/man/man4/man4.i386/elansc.4:1.16
--- src/share/man/man4/man4.i386/elansc.4:1.15	Sat Feb 18 22:39:01 2017
+++ src/share/man/man4/man4.i386/elansc.4	Mon Aug 24 19:36:32 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: elansc.4,v 1.15 2017/02/18 22:39:01 wiz Exp $
+.\"	$NetBSD: elansc.4,v 1.16 2020/08/24 19:36:32 ryoon Exp $
 .\"
 .\" Copyright (c) 2002 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd February 17, 2017
+.Dd August 25, 2020
 .Dt ELANSC 4 i386
 .Os
 .Sh NAME
@@ -110,6 +110,7 @@ Support for PCI exceptions reporting and
 first appeared in
 .Nx 5.0 .
 .Sh AUTHORS
+.An -nosplit
 The
 .Nm
 driver was written by



CVS commit: src/share/man/man4/man4.i386

2020-08-24 Thread Ryo ONODERA
Module Name:src
Committed By:   ryoon
Date:   Mon Aug 24 19:32:33 UTC 2020

Modified Files:
src/share/man/man4/man4.i386: spic.4

Log Message:
Add a missing comma

And bump date


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/share/man/man4/man4.i386/spic.4

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

Modified files:

Index: src/share/man/man4/man4.i386/spic.4
diff -u src/share/man/man4/man4.i386/spic.4:1.4 src/share/man/man4/man4.i386/spic.4:1.5
--- src/share/man/man4/man4.i386/spic.4:1.4	Tue Apr  5 08:24:43 2011
+++ src/share/man/man4/man4.i386/spic.4	Mon Aug 24 19:32:33 2020
@@ -1,4 +1,4 @@
-.\" $NetBSD: spic.4,v 1.4 2011/04/05 08:24:43 wiz Exp $
+.\" $NetBSD: spic.4,v 1.5 2020/08/24 19:32:33 ryoon Exp $
 .\"
 .\" Copyright (c) 2002 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -57,7 +57,8 @@ The jog dial works as a
 scroll button, and clicking it generates a click with the "middle" button.
 .Sh SEE ALSO
 .Xr acpi 4 ,
-.Xr wsmouse 4
+.Xr wsmouse 4 ,
+.Xr sony 4
 .Sh HISTORY
 The
 .Nm



CVS commit: src/share/man/man4

2020-08-24 Thread Ryo ONODERA
Module Name:src
Committed By:   ryoon
Date:   Mon Aug 24 19:30:00 UTC 2020

Modified Files:
src/share/man/man4: options.4

Log Message:
Add COMPAT_90

And bump date.


To generate a diff of this commit:
cvs rdiff -u -r1.514 -r1.515 src/share/man/man4/options.4

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

Modified files:

Index: src/share/man/man4/options.4
diff -u src/share/man/man4/options.4:1.514 src/share/man/man4/options.4:1.515
--- src/share/man/man4/options.4:1.514	Tue Aug  4 06:10:27 2020
+++ src/share/man/man4/options.4	Mon Aug 24 19:30:00 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: options.4,v 1.514 2020/08/04 06:10:27 skrll Exp $
+.\"	$NetBSD: options.4,v 1.515 2020/08/24 19:30:00 ryoon Exp $
 .\"
 .\" Copyright (c) 1996
 .\" 	Perry E. Metzger.  All rights reserved.
@@ -30,7 +30,7 @@
 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
 .\"
-.Dd August 4, 2020
+.Dd August 25, 2020
 .Dt OPTIONS 4
 .Os
 .Sh NAME
@@ -398,6 +398,12 @@ Enable binary compatibility with
 This provides support for old
 .Xr route 4
 interfaces.
+.It Cd options COMPAT_80
+Enable binary compatibility with
+.Nx 8.0 .
+.It Cd options COMPAT_90
+Enable binary compatibility with
+.Nx 9.0 .
 .It Cd options COMPAT_BSDPTY
 This option is currently on by default and enables the pty multiplexer
 .Xr ptm 4



CVS commit: src/share/man/man4

2020-08-24 Thread Ryo ONODERA
Module Name:src
Committed By:   ryoon
Date:   Mon Aug 24 19:27:36 UTC 2020

Modified Files:
src/share/man/man4: viomb.4

Log Message:
Add a missing comma

And bump date.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/share/man/man4/viomb.4

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

Modified files:

Index: src/share/man/man4/viomb.4
diff -u src/share/man/man4/viomb.4:1.3 src/share/man/man4/viomb.4:1.4
--- src/share/man/man4/viomb.4:1.3	Thu Mar  8 22:52:22 2012
+++ src/share/man/man4/viomb.4	Mon Aug 24 19:27:36 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: viomb.4,v 1.3 2012/03/08 22:52:22 wiz Exp $
+.\"	$NetBSD: viomb.4,v 1.4 2020/08/24 19:27:36 ryoon Exp $
 .\"
 .\" Copyright (C) 2011 Minoura Makoto.
 .\" All rights reserved.
@@ -24,7 +24,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd November 26, 2011
+.Dd August 25, 2020
 .Dt VIOMB 4
 .Os
 .Sh NAME
@@ -69,7 +69,8 @@ shows the requested number of memory pag
 shows the actual number of memory pages that are already returned to the hypervisor.
 .Sh SEE ALSO
 .Xr virtio 4 ,
-.Xr sysctl 8
+.Xr sysctl 8 ,
+.Xr x86/balloon 4
 .Pp
 .Rs
 .%A Rusty Russell, IBM Corporation



CVS commit: src/share/man/man4

2020-08-24 Thread Ryo ONODERA
Module Name:src
Committed By:   ryoon
Date:   Mon Aug 24 19:25:57 UTC 2020

Modified Files:
src/share/man/man4: sf2r.4

Log Message:
Markup authors

And bump date.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/share/man/man4/sf2r.4

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

Modified files:

Index: src/share/man/man4/sf2r.4
diff -u src/share/man/man4/sf2r.4:1.5 src/share/man/man4/sf2r.4:1.6
--- src/share/man/man4/sf2r.4:1.5	Wed Jan  2 02:14:48 2002
+++ src/share/man/man4/sf2r.4	Mon Aug 24 19:25:57 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: sf2r.4,v 1.5 2002/01/02 02:14:48 wiz Exp $
+.\"	$NetBSD: sf2r.4,v 1.6 2020/08/24 19:25:57 ryoon Exp $
 .\"	$RuOBSD: sf2r.4,v 1.3 2001/10/26 05:38:44 form Exp $
 .\"	$OpenBSD: sf2r.4,v 1.2 2001/12/05 11:27:44 mickey Exp $
 .\"
@@ -25,7 +25,7 @@
 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd October 8, 2001
+.Dd August 25, 2020
 .Dt SF2R 4
 .Os
 .Sh NAME
@@ -71,10 +71,15 @@ device driver appeared in
 and
 .Nx 1.6 .
 .Sh AUTHORS
+.An -nosplit
 The
 .Nm
-driver was written by Vladimir Popov and Maxim Tsyplakov.
-The man page was written by Vladimir Popov.
+driver was written by
+.An Vladimir Popov
+and
+.An Maxim Tsyplakov.
+The man page was written by
+.An Vladimir Popov .
 .Sh BUGS
 MediaForte made two variants of the SF16-FMR2 cards, the first one has
 an internal amplifier of the output sound, the second one does not have



CVS commit: src/share/man/man4

2020-08-24 Thread Ryo ONODERA
Module Name:src
Committed By:   ryoon
Date:   Mon Aug 24 19:22:06 UTC 2020

Modified Files:
src/share/man/man4: sony.4

Log Message:
Link to i386/spic(4) instead of spic(4)

And bump date.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/share/man/man4/sony.4

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

Modified files:

Index: src/share/man/man4/sony.4
diff -u src/share/man/man4/sony.4:1.4 src/share/man/man4/sony.4:1.5
--- src/share/man/man4/sony.4:1.4	Wed Jun  1 08:14:16 2016
+++ src/share/man/man4/sony.4	Mon Aug 24 19:22:06 2020
@@ -1,4 +1,4 @@
-.\" $NetBSD: sony.4,v 1.4 2016/06/01 08:14:16 wiz Exp $
+.\" $NetBSD: sony.4,v 1.5 2020/08/24 19:22:06 ryoon Exp $
 .\"
 .\" Copyright (c) 2005 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd June 1, 2016
+.Dd August 25, 2020
 .Dt SONY 4
 .Os
 .Sh NAME
@@ -101,7 +101,7 @@ Fn + F3 (volume down)
 .El
 .Sh SEE ALSO
 .Xr acpi 4 ,
-.Xr spic 4
+.Xr i386/spic 4
 .Sh HISTORY
 The
 .Nm



CVS commit: src/share/man/man4

2020-08-24 Thread Ryo ONODERA
Module Name:src
Committed By:   ryoon
Date:   Mon Aug 24 19:19:25 UTC 2020

Modified Files:
src/share/man/man4: ess.4

Log Message:
Link to i386/pnpbios(4) instead of pnpbios(4)

And bump date.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/share/man/man4/ess.4

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

Modified files:

Index: src/share/man/man4/ess.4
diff -u src/share/man/man4/ess.4:1.14 src/share/man/man4/ess.4:1.15
--- src/share/man/man4/ess.4:1.14	Wed Apr 30 13:10:54 2008
+++ src/share/man/man4/ess.4	Mon Aug 24 19:19:24 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: ess.4,v 1.14 2008/04/30 13:10:54 martin Exp $
+.\"	$NetBSD: ess.4,v 1.15 2020/08/24 19:19:24 ryoon Exp $
 .\"
 .\" Copyright (c) 1999 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -24,7 +24,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd June 22, 2005
+.Dd August 25, 2020
 .Dt ESS 4
 .Os
 .Sh NAME
@@ -66,7 +66,7 @@ driver.
 .Xr joy 4 ,
 .Xr ofisa 4 ,
 .Xr opl 4 ,
-.Xr pnpbios 4
+.Xr i386/pnpbios 4
 .Sh HISTORY
 The
 .Nm



CVS commit: src/share/man/man4

2020-08-24 Thread Ryo ONODERA
Module Name:src
Committed By:   ryoon
Date:   Mon Aug 24 19:16:42 UTC 2020

Modified Files:
src/share/man/man4: wss.4

Log Message:
Link to i386/pnpbios(4) instead of pnpbios(4)

And bump date.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/share/man/man4/wss.4

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

Modified files:

Index: src/share/man/man4/wss.4
diff -u src/share/man/man4/wss.4:1.20 src/share/man/man4/wss.4:1.21
--- src/share/man/man4/wss.4:1.20	Sun Mar  6 17:39:05 2011
+++ src/share/man/man4/wss.4	Mon Aug 24 19:16:42 2020
@@ -1,4 +1,4 @@
-.\"   $NetBSD: wss.4,v 1.20 2011/03/06 17:39:05 wiz Exp $
+.\"   $NetBSD: wss.4,v 1.21 2020/08/24 19:16:42 ryoon Exp $
 .\"
 .\" Copyright (c) 1995 Michael Long.
 .\" All rights reserved.
@@ -25,7 +25,7 @@
 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd June 22, 2005
+.Dd August 25, 2020
 .Dt WSS 4
 .Os
 .Sh NAME
@@ -69,4 +69,4 @@ disables the joystick port on MAD16 hard
 .Xr isapnp 4 ,
 .Xr joy 4 ,
 .Xr opl 4 ,
-.Xr pnpbios 4
+.Xr i386/pnpbios 4



CVS commit: src/sys/dev/pci/ixgbe

2020-08-24 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Aug 24 19:03:28 UTC 2020

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

Log Message:
 Fix handling of IXGBE_REQUEST_TASK_NEED_ACKINTR again...


To generate a diff of this commit:
cvs rdiff -u -r1.243 -r1.244 src/sys/dev/pci/ixgbe/ixgbe.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/ixgbe/ixgbe.c
diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.243 src/sys/dev/pci/ixgbe/ixgbe.c:1.244
--- src/sys/dev/pci/ixgbe/ixgbe.c:1.243	Mon Aug 24 18:42:17 2020
+++ src/sys/dev/pci/ixgbe/ixgbe.c	Mon Aug 24 19:03:27 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.c,v 1.243 2020/08/24 18:42:17 msaitoh Exp $ */
+/* $NetBSD: ixgbe.c,v 1.244 2020/08/24 19:03:27 msaitoh Exp $ */
 
 /**
 
@@ -4782,7 +4782,9 @@ ixgbe_handle_admin(struct work *wk, void
 	 */
 	IFNET_LOCK(ifp);
 	IXGBE_CORE_LOCK(adapter);
-	while ((req = adapter->task_requests) != 0) {
+	while ((req =
+		(adapter->task_requests & ~IXGBE_REQUEST_TASK_NEED_ACKINTR))
+	!= 0) {
 		if ((req & IXGBE_REQUEST_TASK_LSC) != 0) {
 			ixgbe_handle_link(adapter);
 			atomic_and_32(>task_requests,



CVS commit: src/sys/dev/pci/ixgbe

2020-08-24 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Aug 24 18:42:17 UTC 2020

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

Log Message:
 The admin workqueue can be used even if the interface is not up.
OK'd by thorpej@. Will fixes PR#55534 reported by Shinichi Doyashiki


To generate a diff of this commit:
cvs rdiff -u -r1.242 -r1.243 src/sys/dev/pci/ixgbe/ixgbe.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/ixgbe/ixgbe.c
diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.242 src/sys/dev/pci/ixgbe/ixgbe.c:1.243
--- src/sys/dev/pci/ixgbe/ixgbe.c:1.242	Mon Aug 24 18:31:14 2020
+++ src/sys/dev/pci/ixgbe/ixgbe.c	Mon Aug 24 18:42:17 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.c,v 1.242 2020/08/24 18:31:14 msaitoh Exp $ */
+/* $NetBSD: ixgbe.c,v 1.243 2020/08/24 18:42:17 msaitoh Exp $ */
 
 /**
 
@@ -1507,11 +1507,10 @@ ixgbe_is_sfp(struct ixgbe_hw *hw)
 static void
 ixgbe_schedule_admin_tasklet(struct adapter *adapter)
 {
-	if (adapter->schedule_wqs_ok) {
-		if (atomic_cas_uint(>admin_pending, 0, 1) == 0)
-			workqueue_enqueue(adapter->admin_wq,
-			>admin_wc, NULL);
-	}
+
+	if (atomic_cas_uint(>admin_pending, 0, 1) == 0)
+		workqueue_enqueue(adapter->admin_wq,
+		>admin_wc, NULL);
 }
 
 /
@@ -4841,8 +4840,6 @@ ixgbe_ifstop(struct ifnet *ifp, int disa
 	ixgbe_stop(adapter);
 	IXGBE_CORE_UNLOCK(adapter);
 
-	workqueue_wait(adapter->admin_wq, >admin_wc);
-	atomic_store_relaxed(>admin_pending, 0);
 	workqueue_wait(adapter->timer_wq, >timer_wc);
 	atomic_store_relaxed(>timer_pending, 0);
 }



CVS commit: src/distrib/sets/lists/tests

2020-08-24 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon Aug 24 18:41:22 UTC 2020

Modified Files:
src/distrib/sets/lists/tests: mi

Log Message:
Restore obsolete entries for make's modorder tests.

These tests were removed a week ago, but their set list entries were
removed rather than marked obsolete.


To generate a diff of this commit:
cvs rdiff -u -r1.905 -r1.906 src/distrib/sets/lists/tests/mi

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

Modified files:

Index: src/distrib/sets/lists/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.905 src/distrib/sets/lists/tests/mi:1.906
--- src/distrib/sets/lists/tests/mi:1.905	Mon Aug 24 18:22:30 2020
+++ src/distrib/sets/lists/tests/mi	Mon Aug 24 18:41:22 2020
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.905 2020/08/24 18:22:30 martin Exp $
+# $NetBSD: mi,v 1.906 2020/08/24 18:41:22 riastradh Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -4791,6 +4791,8 @@
 ./usr/tests/usr.bin/make/unit-tests/modmatch.mk	tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/make/unit-tests/modmisc.exp	tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/make/unit-tests/modmisc.mk	tests-usr.bin-tests	compattestfile,atf
+./usr/tests/usr.bin/make/unit-tests/modorder.exp	tests-obsolete	obsolete
+./usr/tests/usr.bin/make/unit-tests/modorder.mk	tests-obsolete	obsolete
 ./usr/tests/usr.bin/make/unit-tests/modts.exp	tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/make/unit-tests/modts.mk	tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/make/unit-tests/modword.exp	tests-usr.bin-tests	compattestfile,atf



CVS commit: src/sys/dev/pci/ixgbe

2020-08-24 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Aug 24 18:31:15 UTC 2020

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

Log Message:
 Fix ixgbe_sfp_cage_full() on X550EM_A.

In ixgbe_handle_mod():

switch (hw->mac.type) {
case ixgbe_mac_82599EB:
cage_full = IXGBE_READ_REG(hw, IXGBE_ESDP) &
IXGBE_ESDP_SDP2;
break;
case ixgbe_mac_X550EM_x:
case ixgbe_mac_X550EM_a:
cage_full = IXGBE_READ_REG(hw, IXGBE_ESDP) &
IXGBE_ESDP_SDP0;
break;
default:
break;
}

so I had thought that IXGBE_ESDP_SDP0 bit is 1 on cage is full.
In reality, at least, X550EM_A's SFP+ cage is 0 on cage is full.
So invert the logic of ixgbe_sfp_cage_full() on X550EM_A


To generate a diff of this commit:
cvs rdiff -u -r1.241 -r1.242 src/sys/dev/pci/ixgbe/ixgbe.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/ixgbe/ixgbe.c
diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.241 src/sys/dev/pci/ixgbe/ixgbe.c:1.242
--- src/sys/dev/pci/ixgbe/ixgbe.c:1.241	Mon Aug 24 18:21:59 2020
+++ src/sys/dev/pci/ixgbe/ixgbe.c	Mon Aug 24 18:31:14 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.c,v 1.241 2020/08/24 18:21:59 msaitoh Exp $ */
+/* $NetBSD: ixgbe.c,v 1.242 2020/08/24 18:31:14 msaitoh Exp $ */
 
 /**
 
@@ -4624,13 +4624,20 @@ static bool
 ixgbe_sfp_cage_full(struct ixgbe_hw *hw)
 {
 	uint32_t mask;
+	int rv;
 
 	if (hw->mac.type >= ixgbe_mac_X540)
 		mask = IXGBE_ESDP_SDP0;
 	else
 		mask = IXGBE_ESDP_SDP2;
 
-	return IXGBE_READ_REG(hw, IXGBE_ESDP) & mask;
+	rv = IXGBE_READ_REG(hw, IXGBE_ESDP) & mask;
+	if (hw->mac.type == ixgbe_mac_X550EM_a) {
+		/* It seems X550EM_a's SDP0 is inverted than others... */
+		return (rv == 0);
+	}
+
+	return rv;
 } /* ixgbe_sfp_cage_full */
 
 /
@@ -4653,6 +4660,10 @@ ixgbe_handle_mod(void *context)
 			break;
 		case ixgbe_mac_X550EM_x:
 		case ixgbe_mac_X550EM_a:
+			/*
+			 * XXX See ixgbe_sfp_cage_full(). It seems the bit is
+			 * inverted on X550EM_a, so I think this is incorrect.
+			 */
 			cage_full = IXGBE_READ_REG(hw, IXGBE_ESDP) &
 			IXGBE_ESDP_SDP0;
 			break;



CVS commit: src/sys/dev/pci/ixgbe

2020-08-24 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Aug 24 18:21:59 UTC 2020

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

Log Message:
 Fix race in ixgbe_detach() to prevent panic on shutdown.


To generate a diff of this commit:
cvs rdiff -u -r1.240 -r1.241 src/sys/dev/pci/ixgbe/ixgbe.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/ixgbe/ixgbe.c
diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.240 src/sys/dev/pci/ixgbe/ixgbe.c:1.241
--- src/sys/dev/pci/ixgbe/ixgbe.c:1.240	Mon Aug 24 18:16:04 2020
+++ src/sys/dev/pci/ixgbe/ixgbe.c	Mon Aug 24 18:21:59 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.c,v 1.240 2020/08/24 18:16:04 msaitoh Exp $ */
+/* $NetBSD: ixgbe.c,v 1.241 2020/08/24 18:21:59 msaitoh Exp $ */
 
 /**
 
@@ -3558,13 +3558,6 @@ ixgbe_detach(device_t dev, int flags)
 		return (EBUSY);
 	}
 
-	/*
-	 * Stop the interface. ixgbe_setup_low_power_mode() calls ixgbe_stop(),
-	 * so it's not required to call ixgbe_stop() directly.
-	 */
-	IXGBE_CORE_LOCK(adapter);
-	ixgbe_setup_low_power_mode(adapter);
-	IXGBE_CORE_UNLOCK(adapter);
 #if NVLAN > 0
 	/* Make sure VLANs are not using driver */
 	if (!VLAN_ATTACHED(>osdep.ec))
@@ -3577,6 +3570,25 @@ ixgbe_detach(device_t dev, int flags)
 	}
 #endif
 
+	/*
+	 * Stop the interface. ixgbe_setup_low_power_mode() calls ixgbe_stop(),
+	 * so it's not required to call ixgbe_stop() directly.
+	 */
+	IXGBE_CORE_LOCK(adapter);
+	ixgbe_setup_low_power_mode(adapter);
+	IXGBE_CORE_UNLOCK(adapter);
+
+	callout_halt(>timer, NULL);
+	if (adapter->feat_en & IXGBE_FEATURE_RECOVERY_MODE) {
+		callout_stop(>recovery_mode_timer);
+		callout_halt(>recovery_mode_timer, NULL);
+	}
+
+	workqueue_wait(adapter->admin_wq, >admin_wc);
+	atomic_store_relaxed(>admin_pending, 0);
+	workqueue_wait(adapter->timer_wq, >timer_wc);
+	atomic_store_relaxed(>timer_pending, 0);
+
 	pmf_device_deregister(dev);
 
 	ether_ifdetach(adapter->ifp);
@@ -3588,12 +3600,6 @@ ixgbe_detach(device_t dev, int flags)
 	ctrl_ext &= ~IXGBE_CTRL_EXT_DRV_LOAD;
 	IXGBE_WRITE_REG(>hw, IXGBE_CTRL_EXT, ctrl_ext);
 
-	callout_halt(>timer, NULL);
-	if (adapter->feat_en & IXGBE_FEATURE_RECOVERY_MODE) {
-		callout_stop(>recovery_mode_timer);
-		callout_halt(>recovery_mode_timer, NULL);
-	}
-
 	if (adapter->feat_en & IXGBE_FEATURE_NETMAP)
 		netmap_detach(adapter->ifp);
 



CVS commit: src/distrib/sets/lists/tests

2020-08-24 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Aug 24 18:22:30 UTC 2020

Modified Files:
src/distrib/sets/lists/tests: mi

Log Message:
Backout previous,  commiter was dazed and confused


To generate a diff of this commit:
cvs rdiff -u -r1.904 -r1.905 src/distrib/sets/lists/tests/mi

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

Modified files:

Index: src/distrib/sets/lists/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.904 src/distrib/sets/lists/tests/mi:1.905
--- src/distrib/sets/lists/tests/mi:1.904	Mon Aug 24 18:18:51 2020
+++ src/distrib/sets/lists/tests/mi	Mon Aug 24 18:22:30 2020
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.904 2020/08/24 18:18:51 martin Exp $
+# $NetBSD: mi,v 1.905 2020/08/24 18:22:30 martin Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -4791,8 +4791,6 @@
 ./usr/tests/usr.bin/make/unit-tests/modmatch.mk	tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/make/unit-tests/modmisc.exp	tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/make/unit-tests/modmisc.mk	tests-usr.bin-tests	compattestfile,atf
-./usr/tests/usr.bin/make/unit-tests/modorder.exp	tests-usr.bin-tests	compattestfile,atf
-./usr/tests/usr.bin/make/unit-tests/modorder.mk	tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/make/unit-tests/modts.exp	tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/make/unit-tests/modts.mk	tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/make/unit-tests/modword.exp	tests-usr.bin-tests	compattestfile,atf



CVS commit: src/distrib/sets/lists/tests

2020-08-24 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Aug 24 18:18:51 UTC 2020

Modified Files:
src/distrib/sets/lists/tests: mi

Log Message:
Add modorder* make unit test files


To generate a diff of this commit:
cvs rdiff -u -r1.903 -r1.904 src/distrib/sets/lists/tests/mi

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

Modified files:

Index: src/distrib/sets/lists/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.903 src/distrib/sets/lists/tests/mi:1.904
--- src/distrib/sets/lists/tests/mi:1.903	Sun Aug 23 13:50:17 2020
+++ src/distrib/sets/lists/tests/mi	Mon Aug 24 18:18:51 2020
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.903 2020/08/23 13:50:17 rillig Exp $
+# $NetBSD: mi,v 1.904 2020/08/24 18:18:51 martin Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -4791,6 +4791,8 @@
 ./usr/tests/usr.bin/make/unit-tests/modmatch.mk	tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/make/unit-tests/modmisc.exp	tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/make/unit-tests/modmisc.mk	tests-usr.bin-tests	compattestfile,atf
+./usr/tests/usr.bin/make/unit-tests/modorder.exp	tests-usr.bin-tests	compattestfile,atf
+./usr/tests/usr.bin/make/unit-tests/modorder.mk	tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/make/unit-tests/modts.exp	tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/make/unit-tests/modts.mk	tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/make/unit-tests/modword.exp	tests-usr.bin-tests	compattestfile,atf



CVS commit: src/sys/dev/pci/ixgbe

2020-08-24 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Aug 24 18:16:04 UTC 2020

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

Log Message:
 Fix handling of IXGBE_REQUEST_TASK_NEED_ACKINTR in ixgbe_handle_admin().


To generate a diff of this commit:
cvs rdiff -u -r1.239 -r1.240 src/sys/dev/pci/ixgbe/ixgbe.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/ixgbe/ixgbe.c
diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.239 src/sys/dev/pci/ixgbe/ixgbe.c:1.240
--- src/sys/dev/pci/ixgbe/ixgbe.c:1.239	Mon Aug 17 08:23:30 2020
+++ src/sys/dev/pci/ixgbe/ixgbe.c	Mon Aug 24 18:16:04 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.c,v 1.239 2020/08/17 08:23:30 msaitoh Exp $ */
+/* $NetBSD: ixgbe.c,v 1.240 2020/08/24 18:16:04 msaitoh Exp $ */
 
 /**
 
@@ -4801,7 +4801,9 @@ ixgbe_handle_admin(struct work *wk, void
 #endif
 	}
 	atomic_store_relaxed(>admin_pending, 0);
-	if ((req & IXGBE_REQUEST_TASK_NEED_ACKINTR) != 0) {
+	if ((adapter->task_requests & IXGBE_REQUEST_TASK_NEED_ACKINTR) != 0) {
+		atomic_and_32(>task_requests,
+		~IXGBE_REQUEST_TASK_NEED_ACKINTR);
 		if ((adapter->feat_en & IXGBE_FEATURE_MSIX) != 0) {
 			/* Re-enable other interrupts */
 			IXGBE_WRITE_REG(hw, IXGBE_EIMS, IXGBE_EIMS_OTHER);



CVS commit: src/share/man/man8

2020-08-24 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Mon Aug 24 12:58:17 UTC 2020

Modified Files:
src/share/man/man8: afterboot.8

Log Message:
afterboot.8: If it needs a disclaimer that most people shouldn't do it...


To generate a diff of this commit:
cvs rdiff -u -r1.72 -r1.73 src/share/man/man8/afterboot.8

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

Modified files:

Index: src/share/man/man8/afterboot.8
diff -u src/share/man/man8/afterboot.8:1.72 src/share/man/man8/afterboot.8:1.73
--- src/share/man/man8/afterboot.8:1.72	Mon Aug 24 12:45:48 2020
+++ src/share/man/man8/afterboot.8	Mon Aug 24 12:58:16 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: afterboot.8,v 1.72 2020/08/24 12:45:48 nia Exp $
+.\"	$NetBSD: afterboot.8,v 1.73 2020/08/24 12:58:16 nia Exp $
 .\"	$OpenBSD: afterboot.8,v 1.72 2002/02/22 02:02:33 miod Exp $
 .\"
 .\" Originally created by Marshall M. Midden -- 1997-10-20, m...@umn.edu
@@ -961,71 +961,6 @@ Other tools you may find useful are
 .Xr systat 1
 and
 .Xr top 1 .
-.Sh COMPILING A KERNEL
-Note:
-The standard
-.Nx
-kernel configuration (GENERIC) is suitable for most purposes.
-.Pp
-First, review the system message buffer in
-.Pa /var/run/dmesg.boot
-and by using the
-.Xr dmesg 8
-command to find out information on your system's devices as probed by the
-kernel at boot.
-In particular, note which devices were not configured.
-This information will prove useful when editing kernel configuration files.
-.Pp
-To compile a kernel inside a writable source tree, do the following:
-.Bd -literal -offset indent
-$ cd /usr/src/sys/arch/SOMEARCH/conf
-$ cp GENERIC SOMEFILE (only the first time)
-$ vi SOMEFILE (adapt to your needs)
-$ config SOMEFILE
-$ cd ../compile/SOMEFILE
-$ make depend
-$ make
-.Ed
-.Pp
-where
-.Ar SOMEARCH
-is the architecture (e.g., i386), and
-.Ar SOMEFILE
-should be a name indicative of a particular configuration (often
-that of the hostname).
-.Pp
-If you are building your kernel again, before you do a
-.Ic make
-you should do a
-.Ic make clean
-after making changes to your kernel options.
-.Pp
-After either of these two methods, you can place the new kernel (called
-.Pa netbsd )
-in
-.Pa /
-(i.e.,
-.Pa /netbsd )
-by issuing
-.Ic make install
-and the system will boot it next time.
-The old kernel is stored as
-.Pa /onetbsd
-so you can boot it in case of failure.
-.Pp
-If you are using toolchain to build your kernel, you will also need to
-build a new set of toolchain binaries.
-You can do it by changing into
-.Pa /usr/src
-and issuing:
-.Bd -literal -offset indent
-$ cd /usr/src
-$ K=sys/arch/`uname -m`/conf
-$ cp $K/GENERIC $K/SOMEFILE
-$ vi $K/SOMEFILE (adapt to your needs)
-$ ./build.sh tools
-$ ./build.sh kernel=SOMEFILE
-.Ed
 .Sh SYSTEM TESTING
 At this point, the system should be fully configured to your liking.
 It is now a good time to ensure that the system behaves according to



CVS commit: src/etc/root

2020-08-24 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Mon Aug 24 12:46:57 UTC 2020

Modified Files:
src/etc/root: dot.profile

Log Message:
uname -p, pointed out by various


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/etc/root/dot.profile

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

Modified files:

Index: src/etc/root/dot.profile
diff -u src/etc/root/dot.profile:1.31 src/etc/root/dot.profile:1.32
--- src/etc/root/dot.profile:1.31	Sat Aug 15 14:47:28 2020
+++ src/etc/root/dot.profile	Mon Aug 24 12:46:57 2020
@@ -1,11 +1,11 @@
-#	$NetBSD: dot.profile,v 1.31 2020/08/15 14:47:28 nia Exp $
+#	$NetBSD: dot.profile,v 1.32 2020/08/24 12:46:57 nia Exp $
 
 export PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/pkg/sbin:/usr/pkg/bin
 export PATH=${PATH}:/usr/X11R7/bin:/usr/local/sbin:/usr/local/bin
 
 # Uncomment the following line(s) to install binary packages
 # from cdn.NetBSD.org via pkg_add.  (See also pkg_install.conf)
-#export PKG_PATH="https://cdn.NetBSD.org/pub/pkgsrc/packages/NetBSD/$(sysctl -n hw.machine_arch)/$(uname -r|cut -f '1 2' -d.|cut -f 1 -d_)/All"
+#export PKG_PATH="https://cdn.NetBSD.org/pub/pkgsrc/packages/NetBSD/$(uname -p)/$(uname -r|cut -f '1 2' -d.|cut -f 1 -d_)/All"
 
 export BLOCKSIZE=1k
 



CVS commit: src/share/man/man8

2020-08-24 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Mon Aug 24 12:45:48 UTC 2020

Modified Files:
src/share/man/man8: afterboot.8

Log Message:
afterboot.8: uname -p, pointed out by various people


To generate a diff of this commit:
cvs rdiff -u -r1.71 -r1.72 src/share/man/man8/afterboot.8

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

Modified files:

Index: src/share/man/man8/afterboot.8
diff -u src/share/man/man8/afterboot.8:1.71 src/share/man/man8/afterboot.8:1.72
--- src/share/man/man8/afterboot.8:1.71	Mon Aug 24 12:35:48 2020
+++ src/share/man/man8/afterboot.8	Mon Aug 24 12:45:48 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: afterboot.8,v 1.71 2020/08/24 12:35:48 nia Exp $
+.\"	$NetBSD: afterboot.8,v 1.72 2020/08/24 12:45:48 nia Exp $
 .\"	$OpenBSD: afterboot.8,v 1.72 2002/02/22 02:02:33 miod Exp $
 .\"
 .\" Originally created by Marshall M. Midden -- 1997-10-20, m...@umn.edu
@@ -924,7 +924,7 @@ For most users, using pkgin to manage bi
 .Pp
 To install pkgin, if it was not done by the installer:
 .Bd -literal -offset indent
-.Ic export PKG_PATH=https://cdn.netbsd.org/pub/pkgsrc/packages/NetBSD/$(sysctl -n hw.machine_arch)/$(uname -r | cut -d_ -f1)/All
+.Ic export PKG_PATH=https://cdn.netbsd.org/pub/pkgsrc/packages/NetBSD/$(uname -p)/$(uname -r | cut -d_ -f1)/All
 .Ic pkg_add pkgin
 .Ic pkgin update
 .Ic pkgin install bash mpg123 fluxbox ...



CVS commit: src/sys/dev/mii

2020-08-24 Thread Frank Kardel
Module Name:src
Committed By:   kardel
Date:   Mon Aug 24 12:46:04 UTC 2020

Modified Files:
src/sys/dev/mii: mii_physubr.c

Log Message:
Keep the change check invariant intact. The previous code could miss
status updates by picking up a new status different from the tested
status. This left addresses in the DETACHED state although the
link status is already UP again.

addresses PR/kern 55538


To generate a diff of this commit:
cvs rdiff -u -r1.92 -r1.93 src/sys/dev/mii/mii_physubr.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/mii/mii_physubr.c
diff -u src/sys/dev/mii/mii_physubr.c:1.92 src/sys/dev/mii/mii_physubr.c:1.93
--- src/sys/dev/mii/mii_physubr.c:1.92	Mon Aug 24 04:23:41 2020
+++ src/sys/dev/mii/mii_physubr.c	Mon Aug 24 12:46:04 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: mii_physubr.c,v 1.92 2020/08/24 04:23:41 msaitoh Exp $	*/
+/*	$NetBSD: mii_physubr.c,v 1.93 2020/08/24 12:46:04 kardel Exp $	*/
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: mii_physubr.c,v 1.92 2020/08/24 04:23:41 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mii_physubr.c,v 1.93 2020/08/24 12:46:04 kardel Exp $");
 
 #include 
 #include 
@@ -440,16 +440,21 @@ void
 mii_phy_update(struct mii_softc *sc, int cmd)
 {
 	struct mii_data *mii = sc->mii_pdata;
+	u_int mii_media_active;
+	int   mii_media_status;
 
 	KASSERT(mii_locked(mii));
 
-	if (sc->mii_media_active != mii->mii_media_active ||
-	sc->mii_media_status != mii->mii_media_status ||
+	mii_media_active = mii->mii_media_active;
+	mii_media_status = mii->mii_media_status;
+
+	if (sc->mii_media_active != mii_media_active ||
+	sc->mii_media_status != mii_media_status ||
 	cmd == MII_MEDIACHG) {
-		mii_phy_statusmsg(sc);
 		(*mii->mii_statchg)(mii->mii_ifp);
-		sc->mii_media_active = mii->mii_media_active;
-		sc->mii_media_status = mii->mii_media_status;
+		sc->mii_media_active = mii_media_active;
+		sc->mii_media_status = mii_media_status;
+		mii_phy_statusmsg(sc);
 	}
 }
 



CVS commit: src/share/man/man8

2020-08-24 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Mon Aug 24 12:35:48 UTC 2020

Modified Files:
src/share/man/man8: afterboot.8

Log Message:
afterboot.8: Start the daemons after configuring wpa_supplicant.


To generate a diff of this commit:
cvs rdiff -u -r1.70 -r1.71 src/share/man/man8/afterboot.8

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

Modified files:

Index: src/share/man/man8/afterboot.8
diff -u src/share/man/man8/afterboot.8:1.70 src/share/man/man8/afterboot.8:1.71
--- src/share/man/man8/afterboot.8:1.70	Mon Aug 24 12:29:30 2020
+++ src/share/man/man8/afterboot.8	Mon Aug 24 12:35:48 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: afterboot.8,v 1.70 2020/08/24 12:29:30 nia Exp $
+.\"	$NetBSD: afterboot.8,v 1.71 2020/08/24 12:35:48 nia Exp $
 .\"	$OpenBSD: afterboot.8,v 1.72 2002/02/22 02:02:33 miod Exp $
 .\"
 .\" Originally created by Marshall M. Midden -- 1997-10-20, m...@umn.edu
@@ -431,14 +431,14 @@ Then, to make the system use it, put the
 nameserver 127.0.0.1
 .Ed
 .Ss Wireless networking
-To connect to a wireless network using WPA and DHCP:
+To configure the system to connect to a wireless network with a password
+using WPA:
 .Bd -literal -offset indent
 .Ic wpa_passphrase networkname password >> /etc/wpa_supplicant.conf
-.Ic service wpa_supplicant onestart
-.Ic service dhcpcd onestart
 .Ed
 .Pp
-To connect to an open wireless network with no password, edit
+To to configure the system to connect to an open wireless network with
+no password, edit
 .Pa /etc/wpa_supplicant.conf
 instead of using
 .Xr wpa_passphrase 8 :
@@ -450,6 +450,12 @@ network={
 }
 .Ed
 .Pp
+Then start the necessary daemons:
+.Bd -literal -offset indent
+.Ic service wpa_supplicant onestart
+.Ic service dhcpcd onestart
+.Ed
+.Pp
 To automatically connect at boot, add the following to
 .Pa /etc/rc.conf :
 .Pp
@@ -458,7 +464,7 @@ To automatically connect at boot, add th
 .Pp
 While using
 .Xr wpa_supplicant 8 ,
-you can easily retrieve network scan with
+you can easily retrieve network scan results with
 .Xr wpa_cli 8 :
 .Bd -literal -offset indent
 .Ic wpa_cli scan_results



CVS commit: src/share/man/man8

2020-08-24 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Mon Aug 24 12:29:30 UTC 2020

Modified Files:
src/share/man/man8: afterboot.8

Log Message:
afterboot.8: Use wpa_* for everything WiFi, update links

reasoning: ifconfig scan is unreliable while wpa_supplicant is running


To generate a diff of this commit:
cvs rdiff -u -r1.69 -r1.70 src/share/man/man8/afterboot.8

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

Modified files:

Index: src/share/man/man8/afterboot.8
diff -u src/share/man/man8/afterboot.8:1.69 src/share/man/man8/afterboot.8:1.70
--- src/share/man/man8/afterboot.8:1.69	Sat Aug 15 14:45:31 2020
+++ src/share/man/man8/afterboot.8	Mon Aug 24 12:29:30 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: afterboot.8,v 1.69 2020/08/15 14:45:31 nia Exp $
+.\"	$NetBSD: afterboot.8,v 1.70 2020/08/24 12:29:30 nia Exp $
 .\"	$OpenBSD: afterboot.8,v 1.72 2002/02/22 02:02:33 miod Exp $
 .\"
 .\" Originally created by Marshall M. Midden -- 1997-10-20, m...@umn.edu
@@ -59,7 +59,7 @@
 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd August 15, 2020
+.Dd August 24, 2020
 .Dt AFTERBOOT 8
 .Os
 .Sh NAME
@@ -431,12 +431,6 @@ Then, to make the system use it, put the
 nameserver 127.0.0.1
 .Ed
 .Ss Wireless networking
-You can scan for nearby wireless networks using:
-.Bd -literal -offset indent
-.Ic ifconfig iwm0 up list scan
-.Ic ifconfig iwm0 down
-.Ed
-.Pp
 To connect to a wireless network using WPA and DHCP:
 .Bd -literal -offset indent
 .Ic wpa_passphrase networkname password >> /etc/wpa_supplicant.conf
@@ -461,6 +455,19 @@ To automatically connect at boot, add th
 .Pp
 .Dl dhcpcd=YES
 .Dl wpa_supplicant=YES
+.Pp
+While using
+.Xr wpa_supplicant 8 ,
+you can easily retrieve network scan with
+.Xr wpa_cli 8 :
+.Bd -literal -offset indent
+.Ic wpa_cli scan_results
+.Ed
+.Pp
+Or trigger a rescan:
+.Bd -literal -offset indent
+.Ic wpa_cli scan
+.Ed
 .Ss RPC-based network services
 Several services depend on the RPC portmapper
 .Xr rpcbind 8
@@ -1068,6 +1075,7 @@ for details on how to do so.
 .Xr amd 8 ,
 .Xr ccdconfig 8 ,
 .Xr chown 8 ,
+.Xr devpubd 8 ,
 .Xr dhcpcd 8 ,
 .Xr dhcpd 8 ,
 .Xr dmesg 8 ,
@@ -1076,6 +1084,7 @@ for details on how to do so.
 .Xr inetd 8 ,
 .Xr kerberos 8 ,
 .Xr lpd 8 ,
+.Xr mdnsd 8 ,
 .Xr mount 8 ,
 .Xr mrouted 8 ,
 .Xr mtree 8 ,
@@ -1095,6 +1104,7 @@ for details on how to do so.
 .Xr umount 8 ,
 .Xr useradd 8 ,
 .Xr vipw 8 ,
+.Xr wpa_cli 8 ,
 .Xr wpa_supplicant 8 ,
 .Xr yp 8 ,
 .Xr ypbind 8



CVS commit: src/sys/arch/arm/sunxi

2020-08-24 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Mon Aug 24 07:42:02 UTC 2020

Modified Files:
src/sys/arch/arm/sunxi: sunxi_nand.c

Log Message:
Appease gcc when building with KASAN which gave this error before

error: stack usage might be unbounded [-Werror=stack-usage=]


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arm/sunxi/sunxi_nand.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/arm/sunxi/sunxi_nand.c
diff -u src/sys/arch/arm/sunxi/sunxi_nand.c:1.7 src/sys/arch/arm/sunxi/sunxi_nand.c:1.8
--- src/sys/arch/arm/sunxi/sunxi_nand.c:1.7	Sun Jul  5 05:16:50 2020
+++ src/sys/arch/arm/sunxi/sunxi_nand.c	Mon Aug 24 07:42:02 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: sunxi_nand.c,v 1.7 2020/07/05 05:16:50 skrll Exp $ */
+/* $NetBSD: sunxi_nand.c,v 1.8 2020/08/24 07:42:02 skrll Exp $ */
 
 /*-
  * Copyright (c) 2017 Jared McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sunxi_nand.c,v 1.7 2020/07/05 05:16:50 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sunxi_nand.c,v 1.8 2020/08/24 07:42:02 skrll Exp $");
 
 #include 
 #include 
@@ -592,7 +592,7 @@ sunxi_nand_attach_chip(struct sunxi_nand
 
 	mtdparts = get_bootconf_string(boot_args, "mtdparts");
 	if (mtdparts != NULL) {
-		char mtd_id[strlen("sunxi-nand.X") + 1];
+		char mtd_id[] = "sunxi-nand.XX";
 		snprintf(mtd_id, sizeof(mtd_id), "sunxi-nand.%u",
 		device_unit(sc->sc_dev));
 



CVS commit: src/tests/lib/libc/gen

2020-08-24 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Mon Aug 24 06:55:16 UTC 2020

Modified Files:
src/tests/lib/libc/gen: t_siginfo.c

Log Message:
Expect a failure to trap unaligned acesses only when running under
qemu's TCG CPU emulation, not when running under hardware virtualization
such as qemu -accel nvmm.


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/tests/lib/libc/gen/t_siginfo.c

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

Modified files:

Index: src/tests/lib/libc/gen/t_siginfo.c
diff -u src/tests/lib/libc/gen/t_siginfo.c:1.40 src/tests/lib/libc/gen/t_siginfo.c:1.41
--- src/tests/lib/libc/gen/t_siginfo.c:1.40	Sat Jun 20 07:30:09 2020
+++ src/tests/lib/libc/gen/t_siginfo.c	Mon Aug 24 06:55:16 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: t_siginfo.c,v 1.40 2020/06/20 07:30:09 rin Exp $ */
+/* $NetBSD: t_siginfo.c,v 1.41 2020/08/24 06:55:16 gson Exp $ */
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -495,7 +495,7 @@ ATF_TC_BODY(sigbus_adraln, tc)
 	addr = calloc(2, sizeof(int));
 	ATF_REQUIRE(addr != NULL);
 
-	if (isQEMU())
+	if (isQEMU_TCG())
 		atf_tc_expect_fail("QEMU fails to trap unaligned accesses");
 
 	/* Force an unaligned access */