CVS commit: xsrc/external/mit/xorg-server/dist/hw/netbsd/x68k

2020-07-17 Thread Izumi Tsutsui
Module Name:xsrc
Committed By:   tsutsui
Date:   Sat Jul 18 04:46:22 UTC 2020

Modified Files:
xsrc/external/mit/xorg-server/dist/hw/netbsd/x68k: x68kInit.c

Log Message:
Pull changes of x68kInit.c rev 1.3 from xorg-server.old.

https://mail-index.netbsd.org/source-changes/2020/07/18/msg119473.html
> Use AllocDevicePair() to initialize input devices in InitInput().

Untested, but I'll re-visit on migrating to HAVE_XORG_SERVER_VER=120.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
xsrc/external/mit/xorg-server/dist/hw/netbsd/x68k/x68kInit.c

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

Modified files:

Index: xsrc/external/mit/xorg-server/dist/hw/netbsd/x68k/x68kInit.c
diff -u xsrc/external/mit/xorg-server/dist/hw/netbsd/x68k/x68kInit.c:1.4 xsrc/external/mit/xorg-server/dist/hw/netbsd/x68k/x68kInit.c:1.5
--- xsrc/external/mit/xorg-server/dist/hw/netbsd/x68k/x68kInit.c:1.4	Fri Apr 10 16:49:36 2020
+++ xsrc/external/mit/xorg-server/dist/hw/netbsd/x68k/x68kInit.c	Sat Jul 18 04:46:22 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: x68kInit.c,v 1.4 2020/04/10 16:49:36 tsutsui Exp $ */
+/* $NetBSD: x68kInit.c,v 1.5 2020/07/18 04:46:22 tsutsui Exp $ */
 /*-
  * Copyright (c) 1996 Yasushi Yamasaki
  * All rights reserved.
@@ -126,8 +126,13 @@ InitOutput(ScreenInfo *pScreenInfo, int 
 void
 InitInput(int argc, char *argv[]) 
 {
-x68kPointerDevice = AddInputDevice(serverClient, x68kMouseProc, TRUE);
-x68kKeyboardDevice = AddInputDevice(serverClient, x68kKbdProc, TRUE);
+int rc;
+
+rc = AllocDevicePair(serverClient, "x68k",
+			 , ,
+			 x68kMouseProc,x68kKbdProc, FALSE);
+if (rc != Success)
+	FatalError("Failed to init x68k default input devices.\n");
 
 if ( !mieqInit() )
 FatalError("mieqInit failed\n");



CVS commit: xsrc/external/mit/xorg-server.old/dist/hw/netbsd/x68k

2020-07-17 Thread Izumi Tsutsui
Module Name:xsrc
Committed By:   tsutsui
Date:   Sat Jul 18 04:37:50 UTC 2020

Modified Files:
xsrc/external/mit/xorg-server.old/dist/hw/netbsd/x68k: x68kInit.c

Log Message:
Use AllocDevicePair() to initialize input devices in InitInput().

This should have been done on the initial X11R7'fied imoprt as
upstream xnest did:
 
https://cgit.freedesktop.org/xorg/xserver/commit?id=32ce5c83a504d2cafd2b19ed628b40032ef347b3

Tested and no visible regression on XM6i.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
xsrc/external/mit/xorg-server.old/dist/hw/netbsd/x68k/x68kInit.c

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

Modified files:

Index: xsrc/external/mit/xorg-server.old/dist/hw/netbsd/x68k/x68kInit.c
diff -u xsrc/external/mit/xorg-server.old/dist/hw/netbsd/x68k/x68kInit.c:1.2 xsrc/external/mit/xorg-server.old/dist/hw/netbsd/x68k/x68kInit.c:1.3
--- xsrc/external/mit/xorg-server.old/dist/hw/netbsd/x68k/x68kInit.c:1.2	Fri Apr 10 16:49:36 2020
+++ xsrc/external/mit/xorg-server.old/dist/hw/netbsd/x68k/x68kInit.c	Sat Jul 18 04:37:50 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: x68kInit.c,v 1.2 2020/04/10 16:49:36 tsutsui Exp $ */
+/* $NetBSD: x68kInit.c,v 1.3 2020/07/18 04:37:50 tsutsui Exp $ */
 /*-
  * Copyright (c) 1996 Yasushi Yamasaki
  * All rights reserved.
@@ -128,8 +128,14 @@ InitOutput(ScreenInfo *pScreenInfo, int 
 void
 InitInput(int argc, char *argv[]) 
 {
-x68kPointerDevice = AddInputDevice(serverClient, x68kMouseProc, TRUE);
-x68kKeyboardDevice = AddInputDevice(serverClient, x68kKbdProc, TRUE);
+int rc;
+
+rc = AllocDevicePair(serverClient, "x68k",
+			 , ,
+			 x68kMouseProc,x68kKbdProc, FALSE);
+if (rc != Success)
+	FatalError("Failed to init x68k default input devices.\n");
+
 GetEventList();
 
 if ( !mieqInit() )



CVS commit: src/usr.bin/ftp

2020-07-17 Thread Luke Mewburn
Module Name:src
Committed By:   lukem
Date:   Sat Jul 18 03:00:38 UTC 2020

Modified Files:
src/usr.bin/ftp: ftp.1 main.c version.h

Log Message:
ftp: add -? for help. improve synopsis

Add -? to display usage synopsis and help to stdout.
This allows for "ftp -? | less", which is more user friendly.
Errors still show usage to stderr.
Consistency improvements in some usage text.


To generate a diff of this commit:
cvs rdiff -u -r1.141 -r1.142 src/usr.bin/ftp/ftp.1
cvs rdiff -u -r1.126 -r1.127 src/usr.bin/ftp/main.c
cvs rdiff -u -r1.90 -r1.91 src/usr.bin/ftp/version.h

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/ftp/ftp.1
diff -u src/usr.bin/ftp/ftp.1:1.141 src/usr.bin/ftp/ftp.1:1.142
--- src/usr.bin/ftp/ftp.1:1.141	Wed Jul 15 19:23:44 2020
+++ src/usr.bin/ftp/ftp.1	Sat Jul 18 03:00:37 2020
@@ -1,4 +1,4 @@
-.\" 	$NetBSD: ftp.1,v 1.141 2020/07/15 19:23:44 uwe Exp $
+.\" 	$NetBSD: ftp.1,v 1.142 2020/07/18 03:00:37 lukem Exp $
 .\"
 .\" Copyright (c) 1996-2020 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -57,7 +57,7 @@
 .\"
 .\"	@(#)ftp.1	8.3 (Berkeley) 10/9/94
 .\"
-.Dd July 15, 2020
+.Dd July 18, 2020
 .Dt FTP 1
 .Os
 .Sh NAME
@@ -65,7 +65,7 @@
 .Nd Internet file transfer program
 .Sh SYNOPSIS
 .Nm
-.Op Fl 46AadefginpRtVv
+.Op Fl 46AadefginpRtVv?
 .Op Fl N Ar netrc
 .Op Fl o Ar output
 .Op Fl P Ar port
@@ -121,7 +121,7 @@
 .Ar host Oo Li \&: Ar port Oc
 .Li / Ar path
 .Op Li /
-.Op Li ;type= Ar X
+.Op Li ;type= Ar type
 .Oc
 .Sm on
 .Ek
@@ -138,6 +138,19 @@
 .Oc
 .Sm on
 .Ek
+.Bk -words
+.\" [https://[user[:password]@]host[:port]/path]
+.Sm off
+.Oo
+.Li https://
+.Oo Ar user
+.Op Li \&: Ar password
+.Li \&@ Oc
+.Ar host Oo Li \&: Ar port Oc
+.Li / Ar path
+.Oc
+.Sm on
+.Ek
 .Ar \&...
 .Nm
 .Bk -words
@@ -316,6 +329,8 @@ Set the size of the socket send and rece
 Refer to
 .Ic xferbuf
 for more information.
+.It Fl ?
+Display help to stdout, and exit.
 .El
 .Pp
 The client host with which
@@ -1581,10 +1596,10 @@ of
 in the current directory.
 Otherwise, the full remote name is used as the local name,
 relative to the local root directory.
-.\" ftp://[user[:password]@]host[:port]/path[/][;type=X]
+.\" ftp://[user[:password]@]host[:port]/path[/][;type=type]
 .It Li ftp:// Ns Oo Ar user Ns Oo Ns Li \&: Ns Ar password Oc Ns Li \&@ Oc \
 Ns Ar host Ns Oo Li \&: Ns Ar port Oc Ns Li / Ns Ar path Ns Oo Li / Oc \
-Ns Oo Li ;type= Ns Ar X Oc
+Ns Oo Li ;type= Ns Ar type Oc
 An
 .Tn FTP
 URL, retrieved using the

Index: src/usr.bin/ftp/main.c
diff -u src/usr.bin/ftp/main.c:1.126 src/usr.bin/ftp/main.c:1.127
--- src/usr.bin/ftp/main.c:1.126	Mon Feb  4 04:09:13 2019
+++ src/usr.bin/ftp/main.c	Sat Jul 18 03:00:37 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: main.c,v 1.126 2019/02/04 04:09:13 mrg Exp $	*/
+/*	$NetBSD: main.c,v 1.127 2020/07/18 03:00:37 lukem Exp $	*/
 
 /*-
  * Copyright (c) 1996-2015 The NetBSD Foundation, Inc.
@@ -98,7 +98,7 @@ __COPYRIGHT("@(#) Copyright (c) 1985, 19
 #if 0
 static char sccsid[] = "@(#)main.c	8.6 (Berkeley) 10/9/94";
 #else
-__RCSID("$NetBSD: main.c,v 1.126 2019/02/04 04:09:13 mrg Exp $");
+__RCSID("$NetBSD: main.c,v 1.127 2020/07/18 03:00:37 lukem Exp $");
 #endif
 #endif /* not lint */
 
@@ -130,7 +130,8 @@ __RCSID("$NetBSD: main.c,v 1.126 2019/02
 #define	NO_PROXY	"no_proxy"	/* env var with list of non-proxied
 	 * hosts, comma or space separated */
 
-__dead static void	usage(void);
+static int	usage(void);
+static int	usage_help(void);
 static void	setupoption(const char *, const char *, const char *);
 
 int
@@ -266,7 +267,7 @@ main(int volatile argc, char **volatile 
 		}
 	}
 
-	while ((ch = getopt(argc, argv, "46AadefginN:o:pP:q:r:Rs:tT:u:vVx:")) != -1) {
+	while ((ch = getopt(argc, argv, "?46AadefginN:o:pP:q:r:Rs:tT:u:vVx:")) != -1) {
 		switch (ch) {
 		case '4':
 			family = AF_INET;
@@ -378,15 +379,15 @@ main(int volatile argc, char **volatile 
 if (*cp == '\0') {
 	warnx("Bad throttle value `%s'",
 	optarg);
-	usage();
-	/* NOTREACHED */
+	return usage();
 }
 targv[targc++] = cp;
 if (targc >= 5)
 	break;
 			}
-			if (parserate(targc, targv, 1) == -1)
-usage();
+			if (parserate(targc, targv, 1) == -1) {
+return usage();
+			}
 			free(oac);
 			break;
 		}
@@ -415,8 +416,14 @@ main(int volatile argc, char **volatile 
 			rcvbuf_size = sndbuf_size;
 			break;
 
+		case '?':
+			if (optopt == '?') {
+return usage_help();
+			}
+			return usage();
+
 		default:
-			usage();
+			errx(1, "unimplemented option -%c", ch);
 		}
 	}
 			/* set line buffering on ttyout */
@@ -572,8 +579,9 @@ main(int volatile argc, char **volatile 
 			retry_connect = 0; /* connected, stop hiding msgs */
 		}
 	}
-	if (isupload)
-		usage();
+	if (isupload) {
+		return usage();
+	}
 
 #ifndef NO_EDITCOMPLETE
 	controlediting();
@@ -836,7 +844,6 @@ slurpstring(void)
 slrflag++;
 INC_CHKCURSOR(stringbase);
 

CVS commit: src/sys/arch/mips

2020-07-17 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Fri Jul 17 21:59:30 UTC 2020

Modified Files:
src/sys/arch/mips/cavium: octeon_cpunode.c octeon_intr.c octeonvar.h
src/sys/arch/mips/cavium/dev: octeon_ciureg.h
src/sys/arch/mips/mips: cpu_subr.c

Log Message:
Remove 2 CPU limit in OCTEON interrupt controller driver.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/mips/cavium/octeon_cpunode.c
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/mips/cavium/octeon_intr.c
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/mips/cavium/octeonvar.h
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/mips/cavium/dev/octeon_ciureg.h
cvs rdiff -u -r1.48 -r1.49 src/sys/arch/mips/mips/cpu_subr.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/mips/cavium/octeon_cpunode.c
diff -u src/sys/arch/mips/cavium/octeon_cpunode.c:1.13 src/sys/arch/mips/cavium/octeon_cpunode.c:1.14
--- src/sys/arch/mips/cavium/octeon_cpunode.c:1.13	Tue Jun 23 05:14:18 2020
+++ src/sys/arch/mips/cavium/octeon_cpunode.c	Fri Jul 17 21:59:30 2020
@@ -29,7 +29,7 @@
 #define __INTR_PRIVATE
 #include 
 
-__KERNEL_RCSID(0, "$NetBSD: octeon_cpunode.c,v 1.13 2020/06/23 05:14:18 simonb Exp $");
+__KERNEL_RCSID(0, "$NetBSD: octeon_cpunode.c,v 1.14 2020/07/17 21:59:30 jmcneill Exp $");
 
 #include "locators.h"
 #include "cpunode.h"
@@ -55,6 +55,8 @@ __KERNEL_RCSID(0, "$NetBSD: octeon_cpuno
 #include 
 #include 
 
+extern struct cpu_softc octeon_cpu_softc[];
+
 struct cpunode_attach_args {
 	const char *cnaa_name;
 	int cnaa_cpunum;
@@ -291,7 +293,6 @@ cpu_cpunode_attach(device_t parent, devi
 		return;
 	}
 #ifdef MULTIPROCESSOR
-	KASSERTMSG(cpunum == 1, "cpunum %d", cpunum);
 	if (!kcpuset_isset(cpus_booted, cpunum)) {
 		aprint_naive(" disabled\n");
 		aprint_normal(" disabled (unresponsive)\n");
@@ -299,7 +300,7 @@ cpu_cpunode_attach(device_t parent, devi
 	}
 	struct cpu_info * const ci = cpu_info_alloc(NULL, cpunum, 0, cpunum, 0);
 
-	ci->ci_softc = _cpu1_softc;
+	ci->ci_softc = _cpu_softc[cpunum];
 	ci->ci_softc->cpu_ci = ci;
 
 	cpu_cpunode_attach_common(self, ci);

Index: src/sys/arch/mips/cavium/octeon_intr.c
diff -u src/sys/arch/mips/cavium/octeon_intr.c:1.17 src/sys/arch/mips/cavium/octeon_intr.c:1.18
--- src/sys/arch/mips/cavium/octeon_intr.c:1.17	Fri Jul 17 19:40:47 2020
+++ src/sys/arch/mips/cavium/octeon_intr.c	Fri Jul 17 21:59:30 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: octeon_intr.c,v 1.17 2020/07/17 19:40:47 jmcneill Exp $	*/
+/*	$NetBSD: octeon_intr.c,v 1.18 2020/07/17 21:59:30 jmcneill Exp $	*/
 /*
  * Copyright 2001, 2002 Wasabi Systems, Inc.
  * All rights reserved.
@@ -44,7 +44,7 @@
 #define __INTR_PRIVATE
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: octeon_intr.c,v 1.17 2020/07/17 19:40:47 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: octeon_intr.c,v 1.18 2020/07/17 21:59:30 jmcneill Exp $");
 
 #include 
 #include 
@@ -199,158 +199,79 @@ struct octeon_intrhand *octciu_intrs[NIR
 
 kmutex_t octeon_intr_lock;
 
-#define X(a)	MIPS_PHYS_TO_XKPHYS(OCTEON_CCA_NONE, (a))
-
-struct cpu_softc octeon_cpu0_softc = {
-	.cpu_ci = _info_store,
-	.cpu_int0_sum0 = X(CIU_INT0_SUM0),
-	.cpu_int1_sum0 = X(CIU_INT1_SUM0),
-	.cpu_int2_sum0 = X(CIU_INT4_SUM0),
-
-	.cpu_int_sum1 = X(CIU_INT_SUM1),
-
-	.cpu_int0_en[0] = X(CIU_INT0_EN0),
-	.cpu_int1_en[0] = X(CIU_INT1_EN0),
-	.cpu_int2_en[0] = X(CIU_INT4_EN00),
-
-	.cpu_int0_en[1] = X(CIU_INT0_EN1),
-	.cpu_int1_en[1] = X(CIU_INT1_EN1),
-	.cpu_int2_en[1] = X(CIU_INT4_EN01),
-
-	.cpu_int32_en = X(CIU_INT32_EN0),
-
-	.cpu_wdog = X(CIU_WDOG0),
-	.cpu_pp_poke = X(CIU_PP_POKE0),
-
-#ifdef MULTIPROCESSOR
-	.cpu_mbox_set = X(CIU_MBOX_SET0),
-	.cpu_mbox_clr = X(CIU_MBOX_CLR0),
+#if defined(MULTIPROCESSOR)
+#define	OCTEON_NCPU	MAXCPUS
+#else
+#define	OCTEON_NCPU	1
 #endif
-};
 
-#ifdef MULTIPROCESSOR
-/* XXX limit of two CPUs ... */
-struct cpu_softc octeon_cpu1_softc = {
-	.cpu_int0_sum0 = X(CIU_INT2_SUM0),
-	.cpu_int1_sum0 = X(CIU_INT3_SUM0),
-	.cpu_int2_sum0 = X(CIU_INT4_SUM1),
-
-	.cpu_int_sum1 = X(CIU_INT_SUM1),
-
-	.cpu_int0_en[0] = X(CIU_INT2_EN0),
-	.cpu_int1_en[0] = X(CIU_INT3_EN0),
-	.cpu_int2_en[0] = X(CIU_INT4_EN10),
-
-	.cpu_int0_en[1] = X(CIU_INT2_EN1),
-	.cpu_int1_en[1] = X(CIU_INT3_EN1),
-	.cpu_int2_en[1] = X(CIU_INT4_EN11),
+struct cpu_softc octeon_cpu_softc[OCTEON_NCPU];
 
-	.cpu_int32_en = X(CIU_INT32_EN1),
-
-	.cpu_wdog = X(CIU_WDOG(1)),
-	.cpu_pp_poke = X(CIU_PP_POKE1),
-
-	.cpu_mbox_set = X(CIU_MBOX_SET1),
-	.cpu_mbox_clr = X(CIU_MBOX_CLR1),
-};
-#endif
-
-#ifdef DEBUG
 static void
-octeon_mbox_test(void)
+octeon_intr_setup(void)
 {
-	const uint64_t mbox_clr0 = X(CIU_MBOX_CLR0);
-	const uint64_t mbox_clr1 = X(CIU_MBOX_CLR1);
-	const uint64_t mbox_set0 = X(CIU_MBOX_SET0);
-	const uint64_t mbox_set1 = X(CIU_MBOX_SET1);
-	const uint64_t int_sum0 = X(CIU_INT0_SUM0);
-	const uint64_t int_sum1 = X(CIU_INT2_SUM0);
-	const uint64_t sum_mbox_lo = __BIT(CIU_INT_MBOX_15_0);
-	const 

CVS commit: src/sys/dev/pci

2020-07-17 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Fri Jul 17 21:04:14 UTC 2020

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

Log Message:
remove explicit irqack() call for unexpected interrupt; this happens
normally during boot when running identify for the drive as polled
command, and fixes hard hang caused by the irqack() on a sun machine

the unexpected interrupt happens because cmdide doesn't respect
WDCTL_IDS bit and triggers interrupt also for polled commands

also reclassify the "bogus intr" as aprint_verbose() to avoid noise
on boot

discussed and tested by Martin Husemann


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sys/dev/pci/cmdide.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/cmdide.c
diff -u src/sys/dev/pci/cmdide.c:1.45 src/sys/dev/pci/cmdide.c:1.46
--- src/sys/dev/pci/cmdide.c:1.45	Wed Jul  1 17:57:14 2020
+++ src/sys/dev/pci/cmdide.c	Fri Jul 17 21:04:14 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: cmdide.c,v 1.45 2020/07/01 17:57:14 jdolecek Exp $	*/
+/*	$NetBSD: cmdide.c,v 1.46 2020/07/17 21:04:14 jdolecek Exp $	*/
 
 /*
  * Copyright (c) 1999, 2000, 2001 Manuel Bouyer.
@@ -25,7 +25,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cmdide.c,v 1.45 2020/07/01 17:57:14 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cmdide.c,v 1.46 2020/07/17 21:04:14 jdolecek Exp $");
 
 #include 
 #include 
@@ -245,10 +245,9 @@ cmd_pci_intr(void *arg)
 		(i == 1 && (secirq & CMD_ARTTIM23_IRQ))) {
 			crv = wdcintr(wdc_cp);
 			if (crv == 0) {
-aprint_error("%s:%d: bogus intr\n",
+aprint_verbose("%s:%d: bogus intr\n",
 device_xname(
   sc->sc_wdcdev.sc_atac.atac_dev), i);
-sc->sc_wdcdev.irqack(wdc_cp);
 			} else
 rv = 1;
 		}



CVS commit: src/sys/arch/mips/cavium

2020-07-17 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Fri Jul 17 19:40:47 UTC 2020

Modified Files:
src/sys/arch/mips/cavium: octeon_intr.c

Log Message:
Simplify IPI handling and change IPLs of IPI_HALT, IPI_XCALL, and
IPI_GENERIC from IPL_SCHED to IPL_HIGH.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/mips/cavium/octeon_intr.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/mips/cavium/octeon_intr.c
diff -u src/sys/arch/mips/cavium/octeon_intr.c:1.16 src/sys/arch/mips/cavium/octeon_intr.c:1.17
--- src/sys/arch/mips/cavium/octeon_intr.c:1.16	Fri Jul 17 17:57:16 2020
+++ src/sys/arch/mips/cavium/octeon_intr.c	Fri Jul 17 19:40:47 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: octeon_intr.c,v 1.16 2020/07/17 17:57:16 jmcneill Exp $	*/
+/*	$NetBSD: octeon_intr.c,v 1.17 2020/07/17 19:40:47 jmcneill Exp $	*/
 /*
  * Copyright 2001, 2002 Wasabi Systems, Inc.
  * All rights reserved.
@@ -44,7 +44,7 @@
 #define __INTR_PRIVATE
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: octeon_intr.c,v 1.16 2020/07/17 17:57:16 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: octeon_intr.c,v 1.17 2020/07/17 19:40:47 jmcneill Exp $");
 
 #include 
 #include 
@@ -172,6 +172,22 @@ struct octeon_intrhand ipi_intrhands[2] 
 		.ih_ipl = IPL_HIGH,
 	},
 };
+
+#define	OCTEON_IPI_SCHED(n)	__BIT((n) + 0)
+#define	OCTEON_IPI_HIGH(n)	__BIT((n) + 16)
+
+static uint64_t octeon_ipi_mask[NIPIS] = {
+	[IPI_NOP]		= OCTEON_IPI_SCHED(IPI_NOP),
+	[IPI_AST]		= OCTEON_IPI_SCHED(IPI_AST),
+	[IPI_SHOOTDOWN]		= OCTEON_IPI_SCHED(IPI_SHOOTDOWN),
+	[IPI_SYNCICACHE]	= OCTEON_IPI_SCHED(IPI_SYNCICACHE),
+	[IPI_KPREEMPT]		= OCTEON_IPI_SCHED(IPI_KPREEMPT),
+	[IPI_SUSPEND]		= OCTEON_IPI_HIGH(IPI_SUSPEND),
+	[IPI_HALT]		= OCTEON_IPI_HIGH(IPI_HALT),
+	[IPI_XCALL]		= OCTEON_IPI_HIGH(IPI_XCALL),
+	[IPI_GENERIC]		= OCTEON_IPI_HIGH(IPI_GENERIC),
+	[IPI_WDOG]		= OCTEON_IPI_HIGH(IPI_WDOG),
+};
 #endif
 
 struct octeon_intrhand *octciu_intrs[NIRQS] = {
@@ -592,9 +608,6 @@ octeon_ipi_intr(void *arg)
 
 	mips3_sd(cpu->cpu_mbox_clr, ipi_mask);
 
-	ipi_mask |= (ipi_mask >> 16);
-	ipi_mask &= __BITS(15,0);
-
 	KASSERT(ipi_mask < __BIT(NIPIS));
 
 #if NWDOG > 0
@@ -641,14 +654,12 @@ octeon_send_ipi(struct cpu_info *ci, int
 		return -1;
 
 	struct cpu_softc * const cpu = ci->ci_softc;
-	uint64_t ipi_mask = __BIT(req);
+	const uint64_t ipi_mask = octeon_ipi_mask[req];
 
 	atomic_or_64(>ci_request_ipis, ipi_mask);
-	if (req == IPI_SUSPEND || req == IPI_WDOG) {
-		ipi_mask <<= 16;
-	}
 
 	mips3_sd(cpu->cpu_mbox_set, ipi_mask);
+
 	return 0;
 }
 #endif	/* MULTIPROCESSOR */



CVS commit: src/lib/libc/sys

2020-07-17 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Fri Jul 17 18:58:11 UTC 2020

Modified Files:
src/lib/libc/sys: poll.2

Log Message:
Remove trailing whitespace.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/lib/libc/sys/poll.2

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

Modified files:

Index: src/lib/libc/sys/poll.2
diff -u src/lib/libc/sys/poll.2:1.31 src/lib/libc/sys/poll.2:1.32
--- src/lib/libc/sys/poll.2:1.31	Fri Jul 17 15:34:17 2020
+++ src/lib/libc/sys/poll.2	Fri Jul 17 18:58:11 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: poll.2,v 1.31 2020/07/17 15:34:17 kamil Exp $
+.\"	$NetBSD: poll.2,v 1.32 2020/07/17 18:58:11 wiz Exp $
 .\"
 .\" Copyright (c) 1998, 2005, 2020 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -221,7 +221,7 @@ This behaviour is believed to be more us
 .Pp
 The
 .Fn ppoll
-function is an wrapper for 
+function is an wrapper for
 .Fn pollts
 to provide compatiblity with the Linux implementation.
 .Sh ERRORS



CVS commit: src/sys/arch/mips/cavium

2020-07-17 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Fri Jul 17 17:57:16 UTC 2020

Modified Files:
src/sys/arch/mips/cavium: octeon_intr.c octeonvar.h

Log Message:
Cleanup handling of multiple banks.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/mips/cavium/octeon_intr.c
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/mips/cavium/octeonvar.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/arch/mips/cavium/octeon_intr.c
diff -u src/sys/arch/mips/cavium/octeon_intr.c:1.15 src/sys/arch/mips/cavium/octeon_intr.c:1.16
--- src/sys/arch/mips/cavium/octeon_intr.c:1.15	Thu Jul 16 21:33:50 2020
+++ src/sys/arch/mips/cavium/octeon_intr.c	Fri Jul 17 17:57:16 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: octeon_intr.c,v 1.15 2020/07/16 21:33:50 jmcneill Exp $	*/
+/*	$NetBSD: octeon_intr.c,v 1.16 2020/07/17 17:57:16 jmcneill Exp $	*/
 /*
  * Copyright 2001, 2002 Wasabi Systems, Inc.
  * All rights reserved.
@@ -44,7 +44,7 @@
 #define __INTR_PRIVATE
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: octeon_intr.c,v 1.15 2020/07/16 21:33:50 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: octeon_intr.c,v 1.16 2020/07/17 17:57:16 jmcneill Exp $");
 
 #include 
 #include 
@@ -193,13 +193,13 @@ struct cpu_softc octeon_cpu0_softc = {
 
 	.cpu_int_sum1 = X(CIU_INT_SUM1),
 
-	.cpu_int0_en0 = X(CIU_INT0_EN0),
-	.cpu_int1_en0 = X(CIU_INT1_EN0),
-	.cpu_int2_en0 = X(CIU_INT4_EN00),
-
-	.cpu_int0_en1 = X(CIU_INT0_EN1),
-	.cpu_int1_en1 = X(CIU_INT1_EN1),
-	.cpu_int2_en1 = X(CIU_INT4_EN01),
+	.cpu_int0_en[0] = X(CIU_INT0_EN0),
+	.cpu_int1_en[0] = X(CIU_INT1_EN0),
+	.cpu_int2_en[0] = X(CIU_INT4_EN00),
+
+	.cpu_int0_en[1] = X(CIU_INT0_EN1),
+	.cpu_int1_en[1] = X(CIU_INT1_EN1),
+	.cpu_int2_en[1] = X(CIU_INT4_EN01),
 
 	.cpu_int32_en = X(CIU_INT32_EN0),
 
@@ -221,13 +221,13 @@ struct cpu_softc octeon_cpu1_softc = {
 
 	.cpu_int_sum1 = X(CIU_INT_SUM1),
 
-	.cpu_int0_en0 = X(CIU_INT2_EN0),
-	.cpu_int1_en0 = X(CIU_INT3_EN0),
-	.cpu_int2_en0 = X(CIU_INT4_EN10),
-
-	.cpu_int0_en1 = X(CIU_INT2_EN1),
-	.cpu_int1_en1 = X(CIU_INT3_EN1),
-	.cpu_int2_en1 = X(CIU_INT4_EN11),
+	.cpu_int0_en[0] = X(CIU_INT2_EN0),
+	.cpu_int1_en[0] = X(CIU_INT3_EN0),
+	.cpu_int2_en[0] = X(CIU_INT4_EN10),
+
+	.cpu_int0_en[1] = X(CIU_INT2_EN1),
+	.cpu_int1_en[1] = X(CIU_INT3_EN1),
+	.cpu_int2_en[1] = X(CIU_INT4_EN11),
 
 	.cpu_int32_en = X(CIU_INT32_EN1),
 
@@ -311,6 +311,7 @@ octeon_intr_init(struct cpu_info *ci)
 #endif
 	const char * const xname = cpu_name(ci);
 	struct cpu_softc *cpu = ci->ci_softc;
+	int bank;
 
 
 	if (ci->ci_cpuid == 0) {
@@ -332,25 +333,29 @@ octeon_intr_init(struct cpu_info *ci)
 
 #ifdef MULTIPROCESSOR
 	// Enable the IPIs
-	cpu->cpu_int1_enable0 |= __BIT(CIU_INT_MBOX_15_0);
-	cpu->cpu_int2_enable0 |= __BIT(CIU_INT_MBOX_31_16);
+	cpu->cpu_int1_enable[0] |= __BIT(CIU_INT_MBOX_15_0);
+	cpu->cpu_int2_enable[0] |= __BIT(CIU_INT_MBOX_31_16);
 #endif
 
-	if (ci->ci_dev)
-		aprint_verbose_dev(ci->ci_dev,
-		"enabling intr masks %#"PRIx64"/%#"PRIx64"/%#"PRIx64"\n",
-		cpu->cpu_int0_enable0, cpu->cpu_int1_enable0,
-		cpu->cpu_int2_enable0);
-
-	mips3_sd(cpu->cpu_int0_en0, cpu->cpu_int0_enable0);
-	mips3_sd(cpu->cpu_int1_en0, cpu->cpu_int1_enable0);
-	mips3_sd(cpu->cpu_int2_en0, cpu->cpu_int2_enable0);
+	if (ci->ci_dev) {
+		for (bank = 0; bank < NBANKS; bank++) {
+			aprint_verbose_dev(ci->ci_dev,
+			"enabling intr masks %u "
+			" %#"PRIx64"/%#"PRIx64"/%#"PRIx64"\n",
+			bank,
+			cpu->cpu_int0_enable[0],
+			cpu->cpu_int1_enable[0],
+			cpu->cpu_int2_enable[0]);
+		}
+	}
 
-	mips3_sd(cpu->cpu_int32_en, 0);
+	for (bank = 0; bank < NBANKS; bank++) {
+		mips3_sd(cpu->cpu_int0_en[bank], cpu->cpu_int0_enable[bank]);
+		mips3_sd(cpu->cpu_int1_en[bank], cpu->cpu_int1_enable[bank]);
+		mips3_sd(cpu->cpu_int2_en[bank], cpu->cpu_int2_enable[bank]);
+	}
 
-	mips3_sd(cpu->cpu_int0_en1, cpu->cpu_int0_enable1);
-	mips3_sd(cpu->cpu_int1_en1, cpu->cpu_int1_enable1);
-	mips3_sd(cpu->cpu_int2_en1, cpu->cpu_int2_enable1);
+	mips3_sd(cpu->cpu_int32_en, 0);
 
 #ifdef MULTIPROCESSOR
 	mips3_sd(cpu->cpu_mbox_clr, __BITS(31,0));
@@ -426,51 +431,29 @@ octeon_intr_establish(int irq, int ipl, 
 
 	switch (ipl) {
 	case IPL_VM:
-		if (bank == 0) {
-			cpu0->cpu_int0_enable0 |= irq_mask;
-			mips3_sd(cpu0->cpu_int0_en0, cpu0->cpu_int0_enable0);
-		} else {
-			cpu0->cpu_int0_enable1 |= irq_mask;
-			mips3_sd(cpu0->cpu_int0_en1, cpu0->cpu_int0_enable1);
-		}
+		cpu0->cpu_int0_enable[bank] |= irq_mask;
+		mips3_sd(cpu0->cpu_int0_en[bank], cpu0->cpu_int0_enable[bank]);
 		break;
 
 	case IPL_SCHED:
-		if (bank == 0) {
-			cpu0->cpu_int1_enable0 |= irq_mask;
-			mips3_sd(cpu0->cpu_int1_en0, cpu0->cpu_int1_enable0);
-#ifdef MULTIPROCESSOR
-			cpu1->cpu_int1_enable0 = cpu0->cpu_int1_enable0;
-			mips3_sd(cpu1->cpu_int1_en0, cpu1->cpu_int1_enable0);
-#endif
-		} else {
-			cpu0->cpu_int1_enable1 |= irq_mask;
-			

CVS commit: src/doc

2020-07-17 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Fri Jul 17 15:52:16 UTC 2020

Modified Files:
src/doc: CHANGES

Log Message:
libc: Added ppoll() wrapper around native pollts(2)


To generate a diff of this commit:
cvs rdiff -u -r1.2716 -r1.2717 src/doc/CHANGES

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
diff -u src/doc/CHANGES:1.2716 src/doc/CHANGES:1.2717
--- src/doc/CHANGES:1.2716	Fri Jul 17 06:42:56 2020
+++ src/doc/CHANGES	Fri Jul 17 15:52:16 2020
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2716 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2717 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -256,3 +256,4 @@ Changes from NetBSD 9.0 to NetBSD 10.0:
 		ERLITE -> OCTEON
 		INSTALL_ERLITE -> INSTALL_OCTEON
 		[simonb 20200715]
+	libc: Added ppoll() wrapper around native pollts(2) [kamil 20200717]



CVS commit: src/external/bsd/nsd/include

2020-07-17 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Fri Jul 17 15:44:04 UTC 2020

Modified Files:
src/external/bsd/nsd/include: config.h

Log Message:
Enable support for ppoll()


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/external/bsd/nsd/include/config.h

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

Modified files:

Index: src/external/bsd/nsd/include/config.h
diff -u src/external/bsd/nsd/include/config.h:1.8 src/external/bsd/nsd/include/config.h:1.9
--- src/external/bsd/nsd/include/config.h:1.8	Sun Dec 15 16:26:04 2019
+++ src/external/bsd/nsd/include/config.h	Fri Jul 17 15:44:04 2020
@@ -249,7 +249,7 @@
 #define HAVE_OPENSSL_SSL_H 1
 
 /* Define to 1 if you have the `ppoll' function. */
-/* #undef HAVE_PPOLL */
+#define HAVE_PPOLL 1
 
 /* Define to 1 if you have the `pselect' function. */
 #define HAVE_PSELECT 1



CVS commit: src

2020-07-17 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Fri Jul 17 15:34:17 UTC 2020

Modified Files:
src/distrib/sets/lists/comp: mi
src/distrib/sets/lists/debug: mi
src/distrib/sets/lists/tests: mi
src/lib/libc/sys: Makefile.inc poll.2
src/sys/sys: poll.h
src/tests/lib/libc/sys: Makefile t_poll.c
Added Files:
src/lib/libc/sys: ppoll.c
src/tests/lib/libc/sys: t_pollts.c t_ppoll.c

Log Message:
Add ppoll() a compatibility wrapper around pollts(2)

Submitted by Apurva Nandan.


To generate a diff of this commit:
cvs rdiff -u -r1.2339 -r1.2340 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.324 -r1.325 src/distrib/sets/lists/debug/mi
cvs rdiff -u -r1.873 -r1.874 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.243 -r1.244 src/lib/libc/sys/Makefile.inc
cvs rdiff -u -r1.30 -r1.31 src/lib/libc/sys/poll.2
cvs rdiff -u -r0 -r1.1 src/lib/libc/sys/ppoll.c
cvs rdiff -u -r1.15 -r1.16 src/sys/sys/poll.h
cvs rdiff -u -r1.65 -r1.66 src/tests/lib/libc/sys/Makefile
cvs rdiff -u -r1.3 -r1.4 src/tests/lib/libc/sys/t_poll.c
cvs rdiff -u -r0 -r1.1 src/tests/lib/libc/sys/t_pollts.c \
src/tests/lib/libc/sys/t_ppoll.c

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/comp/mi
diff -u src/distrib/sets/lists/comp/mi:1.2339 src/distrib/sets/lists/comp/mi:1.2340
--- src/distrib/sets/lists/comp/mi:1.2339	Fri Jul 10 02:27:13 2020
+++ src/distrib/sets/lists/comp/mi	Fri Jul 17 15:34:17 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: mi,v 1.2339 2020/07/10 02:27:13 thorpej Exp $
+#	$NetBSD: mi,v 1.2340 2020/07/17 15:34:17 kamil Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 ./etc/mtree/set.compcomp-sys-root
@@ -4529,6 +4529,7 @@
 ./usr/share/man/cat2/posix_fadvise.0		comp-c-catman		.cat
 ./usr/share/man/cat2/posix_fallocate.0		comp-c-catman		.cat
 ./usr/share/man/cat2/posix_madvise.0		comp-c-catman		.cat
+./usr/share/man/cat2/ppoll.0			comp-c-catman		.cat
 ./usr/share/man/cat2/pread.0			comp-c-catman		.cat
 ./usr/share/man/cat2/preadv.0			comp-c-catman		.cat
 ./usr/share/man/cat2/profil.0			comp-c-catman		.cat
@@ -12822,6 +12823,7 @@
 ./usr/share/man/html2/posix_fadvise.html	comp-c-htmlman		html
 ./usr/share/man/html2/posix_fallocate.html		comp-c-htmlman		html
 ./usr/share/man/html2/posix_madvise.html	comp-c-htmlman		html
+./usr/share/man/html2/ppoll.html		comp-c-htmlman		html
 ./usr/share/man/html2/pread.html		comp-c-htmlman		html
 ./usr/share/man/html2/preadv.html		comp-c-htmlman		html
 ./usr/share/man/html2/profil.html		comp-c-htmlman		html
@@ -20943,6 +20945,7 @@
 ./usr/share/man/man2/posix_fadvise.2		comp-c-man		.man
 ./usr/share/man/man2/posix_fallocate.2		comp-c-man		.man
 ./usr/share/man/man2/posix_madvise.2		comp-c-man		.man
+./usr/share/man/man2/ppoll.2			comp-c-man		.man
 ./usr/share/man/man2/pread.2			comp-c-man		.man
 ./usr/share/man/man2/preadv.2			comp-c-man		.man
 ./usr/share/man/man2/profil.2			comp-c-man		.man

Index: src/distrib/sets/lists/debug/mi
diff -u src/distrib/sets/lists/debug/mi:1.324 src/distrib/sets/lists/debug/mi:1.325
--- src/distrib/sets/lists/debug/mi:1.324	Mon Jul  6 18:47:02 2020
+++ src/distrib/sets/lists/debug/mi	Fri Jul 17 15:34:17 2020
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.324 2020/07/06 18:47:02 christos Exp $
+# $NetBSD: mi,v 1.325 2020/07/17 15:34:17 kamil Exp $
 ./etc/mtree/set.debug   comp-sys-root
 ./usr/lib	comp-sys-usr		compatdir
 ./usr/lib/i18n/libBIG5_g.a			comp-c-debuglib		debuglib,compatfile
@@ -2169,8 +2169,10 @@
 ./usr/libdata/debug/usr/tests/lib/libc/sys/t_pipe.debug			tests-lib-debug		debug,atf,compattestfile
 ./usr/libdata/debug/usr/tests/lib/libc/sys/t_pipe2.debug		tests-lib-debug		debug,atf,compattestfile
 ./usr/libdata/debug/usr/tests/lib/libc/sys/t_poll.debug			tests-lib-debug		debug,atf,compattestfile
+./usr/libdata/debug/usr/tests/lib/libc/sys/t_pollts.debug			tests-lib-debug		debug,atf,compattestfile
 ./usr/libdata/debug/usr/tests/lib/libc/sys/t_posix_fadvise.debug	tests-lib-debug		debug,atf,rump
 ./usr/libdata/debug/usr/tests/lib/libc/sys/t_posix_fallocate.debug	tests-lib-debug		debug,atf,compattestfile
+./usr/libdata/debug/usr/tests/lib/libc/sys/t_ppoll.debug			tests-lib-debug		debug,atf,compattestfile
 ./usr/libdata/debug/usr/tests/lib/libc/sys/t_ptrace.debug		tests-lib-debug		debug,atf,compattestfile
 ./usr/libdata/debug/usr/tests/lib/libc/sys/t_ptrace_sigchld.debug	tests-lib-debug		debug,atf,compattestfile
 ./usr/libdata/debug/usr/tests/lib/libc/sys/t_ptrace_wait.debug		tests-lib-debug		debug,atf,compattestfile

Index: src/distrib/sets/lists/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.873 src/distrib/sets/lists/tests/mi:1.874
--- src/distrib/sets/lists/tests/mi:1.873	Mon Jul  6 18:47:02 2020
+++ src/distrib/sets/lists/tests/mi	Fri Jul 17 15:34:17 2020
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.873 2020/07/06 18:47:02 christos Exp $
+# $NetBSD: 

CVS commit: [netbsd-9] src/doc

2020-07-17 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Jul 17 15:31:21 UTC 2020

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

Log Message:
Tickets #1018 amd #1019


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.80 -r1.1.2.81 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.80 src/doc/CHANGES-9.1:1.1.2.81
--- src/doc/CHANGES-9.1:1.1.2.80	Thu Jul 16 12:41:35 2020
+++ src/doc/CHANGES-9.1	Fri Jul 17 15:31:20 2020
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-9.1,v 1.1.2.80 2020/07/16 12:41:35 martin Exp $
+# $NetBSD: CHANGES-9.1,v 1.1.2.81 2020/07/17 15:31:20 martin Exp $
 
 A complete list of changes from the NetBSD 9.0 release to the NetBSD 9.1
 release:
@@ -3468,3 +3468,17 @@ sys/dev/pci/piixpmreg.h1.9-1.12
 	- Whitespace fix.
 	[msaitoh, ticket #1017]
 
+sys/compat/common/uipc_syscalls_40.c		1.23
+sys/compat/linux/common/linux_socket.c		1.150
+sys/compat/linux32/common/linux32_socket.c	1.31
+sys/net/if.c	1.479
+
+	ioctl(SIOCGIFCONF): do not accept negative buffer length values.
+	[msaitoh, ticket #1018]
+
+sys/dev/pci/radeonfb.c1.107
+sys/dev/pci/radeonfbvar.h			1.21
+
+	Reduce stack usage in radeonfb_pickres() and radeonfb_set_cursor().
+	[macallan, ticket #1019]
+



CVS commit: [netbsd-9] src/sys/dev/pci

2020-07-17 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Jul 17 15:30:26 UTC 2020

Modified Files:
src/sys/dev/pci [netbsd-9]: radeonfb.c radeonfbvar.h

Log Message:
Pull up following revision(s) (requested by macallan in ticket #1019):

sys/dev/pci/radeonfbvar.h: revision 1.21
sys/dev/pci/radeonfb.c: revision 1.107

reduce stack usage in radeonfb_pickres() and radeonfb_set_cursor()

forgot to commit a header change, again...


To generate a diff of this commit:
cvs rdiff -u -r1.104.4.1 -r1.104.4.2 src/sys/dev/pci/radeonfb.c
cvs rdiff -u -r1.20 -r1.20.26.1 src/sys/dev/pci/radeonfbvar.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/dev/pci/radeonfb.c
diff -u src/sys/dev/pci/radeonfb.c:1.104.4.1 src/sys/dev/pci/radeonfb.c:1.104.4.2
--- src/sys/dev/pci/radeonfb.c:1.104.4.1	Sun Aug 18 09:58:49 2019
+++ src/sys/dev/pci/radeonfb.c	Fri Jul 17 15:30:26 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: radeonfb.c,v 1.104.4.1 2019/08/18 09:58:49 martin Exp $ */
+/*	$NetBSD: radeonfb.c,v 1.104.4.2 2020/07/17 15:30:26 martin Exp $ */
 
 /*-
  * Copyright (c) 2006 Itronix Inc.
@@ -70,7 +70,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: radeonfb.c,v 1.104.4.1 2019/08/18 09:58:49 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: radeonfb.c,v 1.104.4.2 2020/07/17 15:30:26 martin Exp $");
 
 #include 
 #include 
@@ -80,6 +80,7 @@ __KERNEL_RCSID(0, "$NetBSD: radeonfb.c,v
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -3691,12 +3692,12 @@ radeonfb_set_cursor(struct radeonfb_disp
 	unsigned	index, count;
 	int		i, err;
 	int		pitch, size;
-	struct radeonfb_cursor	nc;
+	struct radeonfb_cursor	*nc = >rd_tempcursor;
 
 	flags = wc->which;
 
 	/* copy old values */
-	nc = dp->rd_cursor;
+	memcpy(nc, >rd_cursor, sizeof(struct radeonfb_cursor));
 
 	if (flags & WSDISPLAY_CURSOR_DOCMAP) {
 		index = wc->cmap.index;
@@ -3716,7 +3717,7 @@ radeonfb_set_cursor(struct radeonfb_disp
 			return err;
 
 		for (i = index; i < index + count; i++) {
-			nc.rc_cmap[i] =
+			nc->rc_cmap[i] =
 			(r[i] << 16) + (g[i] << 8) + (b[i] << 0);
 		}
 	}
@@ -3731,46 +3732,46 @@ radeonfb_set_cursor(struct radeonfb_disp
 		size = pitch * wc->size.y;
 
 		/* clear the old cursor and mask */
-		memset(nc.rc_image, 0, 512);
-		memset(nc.rc_mask, 0, 512);
+		memset(nc->rc_image, 0, 512);
+		memset(nc->rc_mask, 0, 512);
 
-		nc.rc_size = wc->size;
+		nc->rc_size = wc->size;
 
-		if ((err = copyin(wc->image, nc.rc_image, size)) != 0)
+		if ((err = copyin(wc->image, nc->rc_image, size)) != 0)
 			return err;
 
-		if ((err = copyin(wc->mask, nc.rc_mask, size)) != 0)
+		if ((err = copyin(wc->mask, nc->rc_mask, size)) != 0)
 			return err;
 	}
 
 	if (flags & WSDISPLAY_CURSOR_DOHOT) {
-		nc.rc_hot = wc->hot;
-		if (nc.rc_hot.x >= nc.rc_size.x)
-			nc.rc_hot.x = nc.rc_size.x - 1;
-		if (nc.rc_hot.y >= nc.rc_size.y)
-			nc.rc_hot.y = nc.rc_size.y - 1;
+		nc->rc_hot = wc->hot;
+		if (nc->rc_hot.x >= nc->rc_size.x)
+			nc->rc_hot.x = nc->rc_size.x - 1;
+		if (nc->rc_hot.y >= nc->rc_size.y)
+			nc->rc_hot.y = nc->rc_size.y - 1;
 	}
 
 	if (flags & WSDISPLAY_CURSOR_DOPOS) {
-		nc.rc_pos = wc->pos;
-		if (nc.rc_pos.x >= dp->rd_virtx)
-			nc.rc_pos.x = dp->rd_virtx - 1;
+		nc->rc_pos = wc->pos;
+		if (nc->rc_pos.x >= dp->rd_virtx)
+			nc->rc_pos.x = dp->rd_virtx - 1;
 #if 0
-		if (nc.rc_pos.x < 0)
-			nc.rc_pos.x = 0;
+		if (nc->rc_pos.x < 0)
+			nc->rc_pos.x = 0;
 #endif
-		if (nc.rc_pos.y >= dp->rd_virty)
-			nc.rc_pos.y = dp->rd_virty - 1;
+		if (nc->rc_pos.y >= dp->rd_virty)
+			nc->rc_pos.y = dp->rd_virty - 1;
 #if 0
-		if (nc.rc_pos.y < 0)
-			nc.rc_pos.y = 0;
+		if (nc->rc_pos.y < 0)
+			nc->rc_pos.y = 0;
 #endif
 	}
 	if (flags & WSDISPLAY_CURSOR_DOCUR) {
-		nc.rc_visible = wc->enable;
+		nc->rc_visible = wc->enable;
 	}
 
-	dp->rd_cursor = nc;
+	memcpy(>rd_cursor, nc, sizeof(struct radeonfb_cursor));
 	radeonfb_cursor_update(dp, wc->which);
 
 	return 0;
@@ -4171,10 +4172,14 @@ radeonfb_pickres(struct radeonfb_display
 		}
 
 	} else {
-		struct videomode	modes[64];
+		struct videomode	*modes;
+		size_t			smodes;
 		int			nmodes = 0;
 		int			valid = 0;
 
+		smodes = sizeof(struct videomode) * 64;
+		modes = kmem_alloc(smodes, KM_SLEEP);
+
 		for (i = 0; i < dp->rd_ncrtcs; i++) {
 			/*
 			 * pick the largest resolution in common.
@@ -4243,6 +4248,8 @@ radeonfb_pickres(struct radeonfb_display
 *y = modes[i].vdisplay;
 			}
 		}
+		kmem_free(modes, smodes);
+
 	}
 
 	if ((*x == 0) || (*y == 0)) {

Index: src/sys/dev/pci/radeonfbvar.h
diff -u src/sys/dev/pci/radeonfbvar.h:1.20 src/sys/dev/pci/radeonfbvar.h:1.20.26.1
--- src/sys/dev/pci/radeonfbvar.h:1.20	Wed Nov  5 19:39:17 2014
+++ src/sys/dev/pci/radeonfbvar.h	Fri Jul 17 15:30:26 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: radeonfbvar.h,v 1.20 2014/11/05 19:39:17 macallan Exp $ */
+/* $NetBSD: radeonfbvar.h,v 1.20.26.1 2020/07/17 15:30:26 martin Exp $ */
 
 /*-
  * Copyright (c) 

CVS commit: [netbsd-8] src/doc

2020-07-17 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Jul 17 15:29:13 UTC 2020

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

Log Message:
Ticket #1576


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.21 -r1.1.2.22 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.21 src/doc/CHANGES-8.3:1.1.2.22
--- src/doc/CHANGES-8.3:1.1.2.21	Wed Jul 15 15:55:49 2020
+++ src/doc/CHANGES-8.3	Fri Jul 17 15:29:12 2020
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-8.3,v 1.1.2.21 2020/07/15 15:55:49 martin Exp $
+# $NetBSD: CHANGES-8.3,v 1.1.2.22 2020/07/17 15:29:12 martin Exp $
 
 A complete list of changes from the NetBSD 8.2 release to the NetBSD 8.3
 release:
@@ -291,3 +291,11 @@ sys/arch/i386/stand/boot/boot2.c		1.74
 	PR 55490: let the consdev command also set speed.
 	[kim, ticket #1575]
 
+sys/compat/common/uipc_syscalls_40.c		1.23
+sys/compat/linux/common/linux_socket.c		1.150
+sys/compat/linux32/common/linux32_socket.c	1.31
+sys/net/if.c	1.479
+
+	ioctl(SIOCGIFCONF): do not accept negative buffer length values.
+	[msaitoh, ticket #1576]
+



CVS commit: [netbsd-8] src/sys

2020-07-17 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Jul 17 15:28:08 UTC 2020

Modified Files:
src/sys/compat/common [netbsd-8]: uipc_syscalls_40.c
src/sys/compat/linux/common [netbsd-8]: linux_socket.c
src/sys/compat/linux32/common [netbsd-8]: linux32_socket.c
src/sys/net [netbsd-8]: if.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1576):

sys/net/if.c: revision 1.479
sys/compat/common/uipc_syscalls_40.c: revision 1.23
sys/compat/linux/common/linux_socket.c: revision 1.150
sys/compat/linux32/common/linux32_socket.c: revision 1.31

 Don't accept negative value.


To generate a diff of this commit:
cvs rdiff -u -r1.13.6.3 -r1.13.6.4 src/sys/compat/common/uipc_syscalls_40.c
cvs rdiff -u -r1.138.6.5 -r1.138.6.6 \
src/sys/compat/linux/common/linux_socket.c
cvs rdiff -u -r1.27.6.3 -r1.27.6.4 \
src/sys/compat/linux32/common/linux32_socket.c
cvs rdiff -u -r1.394.2.18 -r1.394.2.19 src/sys/net/if.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/compat/common/uipc_syscalls_40.c
diff -u src/sys/compat/common/uipc_syscalls_40.c:1.13.6.3 src/sys/compat/common/uipc_syscalls_40.c:1.13.6.4
--- src/sys/compat/common/uipc_syscalls_40.c:1.13.6.3	Fri Apr 19 09:12:58 2019
+++ src/sys/compat/common/uipc_syscalls_40.c	Fri Jul 17 15:28:07 2020
@@ -1,9 +1,9 @@
-/*	$NetBSD: uipc_syscalls_40.c,v 1.13.6.3 2019/04/19 09:12:58 martin Exp $	*/
+/*	$NetBSD: uipc_syscalls_40.c,v 1.13.6.4 2020/07/17 15:28:07 martin Exp $	*/
 
 /* written by Pavel Cahyna, 2006. Public domain. */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls_40.c,v 1.13.6.3 2019/04/19 09:12:58 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls_40.c,v 1.13.6.4 2020/07/17 15:28:07 martin Exp $");
 
 /*
  * System call interface to the socket abstraction.
@@ -42,11 +42,14 @@ compat_ifconf(u_long cmd, void *data)
 	int bound;
 	struct psref psref;
 
-	memset(, 0, sizeof(ifr));
 	if (docopy) {
+		if (ifc->ifc_len < 0)
+			return EINVAL;
+
 		space = ifc->ifc_len;
 		ifrp = ifc->ifc_req;
 	}
+	memset(, 0, sizeof(ifr));
 
 	bound = curlwp_bind();
 	s = pserialize_read_enter();

Index: src/sys/compat/linux/common/linux_socket.c
diff -u src/sys/compat/linux/common/linux_socket.c:1.138.6.5 src/sys/compat/linux/common/linux_socket.c:1.138.6.6
--- src/sys/compat/linux/common/linux_socket.c:1.138.6.5	Tue Jan 21 18:12:54 2020
+++ src/sys/compat/linux/common/linux_socket.c	Fri Jul 17 15:28:08 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_socket.c,v 1.138.6.5 2020/01/21 18:12:54 martin Exp $	*/
+/*	$NetBSD: linux_socket.c,v 1.138.6.6 2020/07/17 15:28:08 martin Exp $	*/
 
 /*-
  * Copyright (c) 1995, 1998, 2008 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: linux_socket.c,v 1.138.6.5 2020/01/21 18:12:54 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_socket.c,v 1.138.6.6 2020/07/17 15:28:08 martin Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_inet.h"
@@ -1156,12 +1156,15 @@ linux_getifconf(struct lwp *l, register_
 	if (error)
 		return error;
 
-	memset(, 0, sizeof(ifr));
 	docopy = ifc.ifc_req != NULL;
 	if (docopy) {
+		if (ifc.ifc_len < 0)
+			return EINVAL;
+
 		space = ifc.ifc_len;
 		ifrp = ifc.ifc_req;
 	}
+	memset(, 0, sizeof(ifr));
 
 	bound = curlwp_bind();
 	s = pserialize_read_enter();

Index: src/sys/compat/linux32/common/linux32_socket.c
diff -u src/sys/compat/linux32/common/linux32_socket.c:1.27.6.3 src/sys/compat/linux32/common/linux32_socket.c:1.27.6.4
--- src/sys/compat/linux32/common/linux32_socket.c:1.27.6.3	Fri Apr 19 09:12:58 2019
+++ src/sys/compat/linux32/common/linux32_socket.c	Fri Jul 17 15:28:08 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux32_socket.c,v 1.27.6.3 2019/04/19 09:12:58 martin Exp $ */
+/*	$NetBSD: linux32_socket.c,v 1.27.6.4 2020/07/17 15:28:08 martin Exp $ */
 
 /*-
  * Copyright (c) 2006 Emmanuel Dreyfus, all rights reserved.
@@ -33,7 +33,7 @@
 
 #include 
 
-__KERNEL_RCSID(0, "$NetBSD: linux32_socket.c,v 1.27.6.3 2019/04/19 09:12:58 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux32_socket.c,v 1.27.6.4 2020/07/17 15:28:08 martin Exp $");
 
 #include 
 #include 
@@ -431,12 +431,15 @@ linux32_getifconf(struct lwp *l, registe
 	if (error)
 		return error;
 
-	memset(, 0, sizeof(ifr));
 	docopy = NETBSD32PTR64(ifc.ifc_req) != NULL;
 	if (docopy) {
+		if (ifc.ifc_len < 0)
+			return EINVAL;
+
 		space = ifc.ifc_len;
 		ifrp = NETBSD32PTR64(ifc.ifc_req);
 	}
+	memset(, 0, sizeof(ifr));
 
 	bound = curlwp_bind();
 	s = pserialize_read_enter();

Index: src/sys/net/if.c
diff -u src/sys/net/if.c:1.394.2.18 src/sys/net/if.c:1.394.2.19
--- src/sys/net/if.c:1.394.2.18	Tue Sep 24 18:27:09 2019
+++ src/sys/net/if.c	Fri Jul 17 15:28:07 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if.c,v 1.394.2.18 2019/09/24 18:27:09 martin Exp $	*/
+/*	$NetBSD: if.c,v 1.394.2.19 2020/07/17 15:28:07 martin Exp $	*/
 
 

CVS commit: [netbsd-9] src/sys

2020-07-17 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Jul 17 15:24:49 UTC 2020

Modified Files:
src/sys/compat/common [netbsd-9]: uipc_syscalls_40.c
src/sys/compat/linux/common [netbsd-9]: linux_socket.c
src/sys/compat/linux32/common [netbsd-9]: linux32_socket.c
src/sys/net [netbsd-9]: if.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1018):

sys/net/if.c: revision 1.479
sys/compat/common/uipc_syscalls_40.c: revision 1.23
sys/compat/linux/common/linux_socket.c: revision 1.150
sys/compat/linux32/common/linux32_socket.c: revision 1.31

 Don't accept negative value.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.20.2.1 src/sys/compat/common/uipc_syscalls_40.c
cvs rdiff -u -r1.145.4.1 -r1.145.4.2 \
src/sys/compat/linux/common/linux_socket.c
cvs rdiff -u -r1.30 -r1.30.4.1 src/sys/compat/linux32/common/linux32_socket.c
cvs rdiff -u -r1.457.2.3 -r1.457.2.4 src/sys/net/if.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/compat/common/uipc_syscalls_40.c
diff -u src/sys/compat/common/uipc_syscalls_40.c:1.20 src/sys/compat/common/uipc_syscalls_40.c:1.20.2.1
--- src/sys/compat/common/uipc_syscalls_40.c:1.20	Tue Apr 23 07:45:06 2019
+++ src/sys/compat/common/uipc_syscalls_40.c	Fri Jul 17 15:24:48 2020
@@ -1,9 +1,9 @@
-/*	$NetBSD: uipc_syscalls_40.c,v 1.20 2019/04/23 07:45:06 msaitoh Exp $	*/
+/*	$NetBSD: uipc_syscalls_40.c,v 1.20.2.1 2020/07/17 15:24:48 martin Exp $	*/
 
 /* written by Pavel Cahyna, 2006. Public domain. */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls_40.c,v 1.20 2019/04/23 07:45:06 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls_40.c,v 1.20.2.1 2020/07/17 15:24:48 martin Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd.h"
@@ -54,11 +54,14 @@ compat_ifconf(u_long cmd, void *data)
 		return ENOSYS;
 	}
 
-	memset(, 0, sizeof(ifr));
 	if (docopy) {
+		if (ifc->ifc_len < 0)
+			return EINVAL;
+
 		space = ifc->ifc_len;
 		ifrp = ifc->ifc_req;
 	}
+	memset(, 0, sizeof(ifr));
 
 	bound = curlwp_bind();
 	s = pserialize_read_enter();

Index: src/sys/compat/linux/common/linux_socket.c
diff -u src/sys/compat/linux/common/linux_socket.c:1.145.4.1 src/sys/compat/linux/common/linux_socket.c:1.145.4.2
--- src/sys/compat/linux/common/linux_socket.c:1.145.4.1	Fri Sep 13 06:25:25 2019
+++ src/sys/compat/linux/common/linux_socket.c	Fri Jul 17 15:24:48 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_socket.c,v 1.145.4.1 2019/09/13 06:25:25 martin Exp $	*/
+/*	$NetBSD: linux_socket.c,v 1.145.4.2 2020/07/17 15:24:48 martin Exp $	*/
 
 /*-
  * Copyright (c) 1995, 1998, 2008 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: linux_socket.c,v 1.145.4.1 2019/09/13 06:25:25 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_socket.c,v 1.145.4.2 2020/07/17 15:24:48 martin Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_inet.h"
@@ -1140,12 +1140,15 @@ linux_getifconf(struct lwp *l, register_
 	if (error)
 		return error;
 
-	memset(, 0, sizeof(ifr));
 	docopy = ifc.ifc_req != NULL;
 	if (docopy) {
+		if (ifc.ifc_len < 0)
+			return EINVAL;
+
 		space = ifc.ifc_len;
 		ifrp = ifc.ifc_req;
 	}
+	memset(, 0, sizeof(ifr));
 
 	bound = curlwp_bind();
 	s = pserialize_read_enter();

Index: src/sys/compat/linux32/common/linux32_socket.c
diff -u src/sys/compat/linux32/common/linux32_socket.c:1.30 src/sys/compat/linux32/common/linux32_socket.c:1.30.4.1
--- src/sys/compat/linux32/common/linux32_socket.c:1.30	Thu Apr 18 17:45:12 2019
+++ src/sys/compat/linux32/common/linux32_socket.c	Fri Jul 17 15:24:49 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux32_socket.c,v 1.30 2019/04/18 17:45:12 christos Exp $ */
+/*	$NetBSD: linux32_socket.c,v 1.30.4.1 2020/07/17 15:24:49 martin Exp $ */
 
 /*-
  * Copyright (c) 2006 Emmanuel Dreyfus, all rights reserved.
@@ -33,7 +33,7 @@
 
 #include 
 
-__KERNEL_RCSID(0, "$NetBSD: linux32_socket.c,v 1.30 2019/04/18 17:45:12 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux32_socket.c,v 1.30.4.1 2020/07/17 15:24:49 martin Exp $");
 
 #include 
 #include 
@@ -431,12 +431,15 @@ linux32_getifconf(struct lwp *l, registe
 	if (error)
 		return error;
 
-	memset(, 0, sizeof(ifr));
 	docopy = NETBSD32PTR64(ifc.ifc_req) != NULL;
 	if (docopy) {
+		if (ifc.ifc_len < 0)
+			return EINVAL;
+
 		space = ifc.ifc_len;
 		ifrp = NETBSD32PTR64(ifc.ifc_req);
 	}
+	memset(, 0, sizeof(ifr));
 
 	bound = curlwp_bind();
 	s = pserialize_read_enter();

Index: src/sys/net/if.c
diff -u src/sys/net/if.c:1.457.2.3 src/sys/net/if.c:1.457.2.4
--- src/sys/net/if.c:1.457.2.3	Tue Dec 17 16:12:54 2019
+++ src/sys/net/if.c	Fri Jul 17 15:24:48 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if.c,v 1.457.2.3 2019/12/17 16:12:54 martin Exp $	*/
+/*	$NetBSD: if.c,v 1.457.2.4 2020/07/17 15:24:48 martin Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2008 The NetBSD 

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

2020-07-17 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Fri Jul 17 15:24:03 UTC 2020

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

Log Message:
man5/changelist.5 does not depend on MKPOSTFIX


To generate a diff of this commit:
cvs rdiff -u -r1.1695 -r1.1696 src/distrib/sets/lists/man/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/man/mi
diff -u src/distrib/sets/lists/man/mi:1.1695 src/distrib/sets/lists/man/mi:1.1696
--- src/distrib/sets/lists/man/mi:1.1695	Mon Jul 13 09:10:34 2020
+++ src/distrib/sets/lists/man/mi	Fri Jul 17 15:24:03 2020
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1695 2020/07/13 09:10:34 jruoho Exp $
+# $NetBSD: mi,v 1.1696 2020/07/17 15:24:03 kamil Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -8315,7 +8315,7 @@
 ./usr/share/man/man5/capfile.5			man-sys-man		.man
 ./usr/share/man/man5/ccd.conf.5			man-sysutil-man		.man
 ./usr/share/man/man5/cdb.5			man-sys-man		.man
-./usr/share/man/man5/changelist.5		man-sys-man		postfix,.man
+./usr/share/man/man5/changelist.5		man-sys-man		.man
 ./usr/share/man/man5/cidr_table.5		man-postfix-man		postfix,.man
 ./usr/share/man/man5/core.5			man-sys-man		.man
 ./usr/share/man/man5/crontab.5			man-cron-man		.man



CVS commit: src

2020-07-17 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Fri Jul 17 15:16:34 UTC 2020

Modified Files:
src/distrib/utils/embedded: mkimage
src/distrib/utils/embedded/conf: arm64.conf evbarm.conf
src/etc/etc.evbmips: Makefile.inc
Added Files:
src/distrib/utils/embedded/conf: evbmips.conf octeon.conf

Log Message:
Create an "octeon.img.gz" bootable image for evbmips64-eb release builds.


To generate a diff of this commit:
cvs rdiff -u -r1.74 -r1.75 src/distrib/utils/embedded/mkimage
cvs rdiff -u -r1.11 -r1.12 src/distrib/utils/embedded/conf/arm64.conf
cvs rdiff -u -r1.36 -r1.37 src/distrib/utils/embedded/conf/evbarm.conf
cvs rdiff -u -r0 -r1.1 src/distrib/utils/embedded/conf/evbmips.conf \
src/distrib/utils/embedded/conf/octeon.conf
cvs rdiff -u -r1.23 -r1.24 src/etc/etc.evbmips/Makefile.inc

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

Modified files:

Index: src/distrib/utils/embedded/mkimage
diff -u src/distrib/utils/embedded/mkimage:1.74 src/distrib/utils/embedded/mkimage:1.75
--- src/distrib/utils/embedded/mkimage:1.74	Sun May 24 18:43:39 2020
+++ src/distrib/utils/embedded/mkimage	Fri Jul 17 15:16:34 2020
@@ -1,5 +1,5 @@
 #!/bin/sh
-# $NetBSD: mkimage,v 1.74 2020/05/24 18:43:39 jmcneill Exp $
+# $NetBSD: mkimage,v 1.75 2020/07/17 15:16:34 jmcneill Exp $
 #
 # Copyright (c) 2013, 2014 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -284,7 +284,7 @@ if $gpt; then
 
 	echo ${bar} Creating partitions ${bar}
 	${GPT} ${gpt_flags} ${image} create ${gpt_create_flags}
-	${GPT} ${gpt_flags} ${image} add -b ${initsecs} -s ${bootsecs} -l ${gpt_label_efi:-EFI} -t efi
+	${GPT} ${gpt_flags} ${image} add -b ${initsecs} -s ${bootsecs} -l ${gpt_label_boot:-EFI} -t ${gpt_boot_type:-efi}
 	${GPT} ${gpt_flags} ${image} set -a required -i 1
 	${GPT} ${gpt_flags} ${image} add -a 4m -b ${ffsstart} -l ${gpt_label_ffs:-netbsd-root} -t ffs
 	${GPT} ${gpt_flags} ${image} show

Index: src/distrib/utils/embedded/conf/arm64.conf
diff -u src/distrib/utils/embedded/conf/arm64.conf:1.11 src/distrib/utils/embedded/conf/arm64.conf:1.12
--- src/distrib/utils/embedded/conf/arm64.conf:1.11	Sun May 24 18:44:46 2020
+++ src/distrib/utils/embedded/conf/arm64.conf	Fri Jul 17 15:16:34 2020
@@ -1,4 +1,4 @@
-# $NetBSD: arm64.conf,v 1.11 2020/05/24 18:44:46 jmcneill Exp $
+# $NetBSD: arm64.conf,v 1.12 2020/07/17 15:16:34 jmcneill Exp $
 # ARM64 customization script used by mkimage
 #
 board=arm64
@@ -7,7 +7,7 @@ resize=true
 gpt=true
 gpt_hybrid=true
 gpt_create_flags="-p 16"
-gpt_label_efi="EFI"
+gpt_label_boot="EFI"
 gpt_label_ffs="netbsd-root"
 
 . ${DIR}/conf/evbarm.conf

Index: src/distrib/utils/embedded/conf/evbarm.conf
diff -u src/distrib/utils/embedded/conf/evbarm.conf:1.36 src/distrib/utils/embedded/conf/evbarm.conf:1.37
--- src/distrib/utils/embedded/conf/evbarm.conf:1.36	Thu May 28 10:19:02 2020
+++ src/distrib/utils/embedded/conf/evbarm.conf	Fri Jul 17 15:16:34 2020
@@ -1,4 +1,4 @@
-# $NetBSD: evbarm.conf,v 1.36 2020/05/28 10:19:02 jmcneill Exp $
+# $NetBSD: evbarm.conf,v 1.37 2020/07/17 15:16:34 jmcneill Exp $
 # evbarm shared config
 #
 image=$HOME/${board}.img
@@ -70,7 +70,7 @@ make_fstab_evbarm_gpt() {
 # NetBSD /etc/fstab
 # See /usr/share/examples/fstab/ for more examples.
 NAME=${gpt_label_ffs:-netbsd-root}	/		ffs	rw,noatime	1 1
-NAME=${gpt_label_efi:-EFI}		/boot		msdos	rw	1 1
+NAME=${gpt_label_boot:-EFI}		/boot		msdos	rw	1 1
 kernfs		/kern		kernfs	rw
 ptyfs		/dev/pts	ptyfs	rw
 procfs		/proc		procfs	rw

Index: src/etc/etc.evbmips/Makefile.inc
diff -u src/etc/etc.evbmips/Makefile.inc:1.23 src/etc/etc.evbmips/Makefile.inc:1.24
--- src/etc/etc.evbmips/Makefile.inc:1.23	Wed Jul 15 12:15:30 2020
+++ src/etc/etc.evbmips/Makefile.inc	Fri Jul 17 15:16:34 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.23 2020/07/15 12:15:30 simonb Exp $
+#	$NetBSD: Makefile.inc,v 1.24 2020/07/17 15:16:34 jmcneill Exp $
 #
 #	etc.evbmips/Makefile.inc -- evbmips-specific etc Makefile targets
 #
@@ -37,3 +37,42 @@ BUILD_KERNELS=		INSTALL_MALTA
 
 # SBMIPS has a kernel for all targets
 KERNEL_SETS+=		SBMIPS${MACHINE_ARCH:S/mips//:C/e[lb]//}
+
+# Support for mkimage
+MKIMAGE= 	${NETBSDSRCDIR}/distrib/utils/embedded/mkimage
+IMAGE.rel=  ${RELEASEDIR}/${RELEASEMACHINEDIR}
+IMAGE.dir=  ${IMAGE.rel}/binary/gzimg
+IMAGE.kern= ${IMAGE.rel}/binary/kernel
+.if !empty(MACHINE_ARCH:M*eb)
+IMAGEENDIAN=	be
+.else
+IMAGEENDIAN=	le
+.endif
+
+__mkimage: .USE
+	TOOL_MAKE=${MAKE} \
+	TOOL_MAKEFS=${TOOL_MAKEFS} \
+	TOOL_DISKLABEL=${TOOL_DISKLABEL} \
+	TOOL_FDISK=${TOOL_FDISK} \
+	TOOL_GPT=${TOOL_GPT} \
+	TOOL_GZIP=${TOOL_GZIP} \
+	TOOL_MKNOD=${TOOL_MKNOD} \
+	TOOL_PAX=${TOOL_PAX} \
+	TOOL_MKUBOOTIMAGE=${TOOL_MKUBOOTIMAGE} \
+	TOOL_MTREE=${TOOL_MTREE} \
+	HOST_SH=${HOST_SH} \
+	KERNOBJDIR=${KERNOBJDIR} \
+	MACHINE=${MACHINE} \
+	MKDTB=${MKDTB} \
+	${HOST_SH} ${MKIMAGE} -h ${.TARGET:S/smp_//} -D ${DESTDIR} \
+-S ${NETBSDSRCDIR} -B 

CVS commit: src/sys/arch/evbmips/conf

2020-07-17 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Fri Jul 17 14:58:17 UTC 2020

Modified Files:
src/sys/arch/evbmips/conf: INSTALL_OCTEON

Log Message:
ERLITE -> OCTEON


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/evbmips/conf/INSTALL_OCTEON

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/evbmips/conf/INSTALL_OCTEON
diff -u src/sys/arch/evbmips/conf/INSTALL_OCTEON:1.1 src/sys/arch/evbmips/conf/INSTALL_OCTEON:1.2
--- src/sys/arch/evbmips/conf/INSTALL_OCTEON:1.1	Wed Jul 15 12:15:30 2020
+++ src/sys/arch/evbmips/conf/INSTALL_OCTEON	Fri Jul 17 14:58:17 2020
@@ -1,8 +1,8 @@
-# $NetBSD: INSTALL_OCTEON,v 1.1 2020/07/15 12:15:30 simonb Exp $
+# $NetBSD: INSTALL_OCTEON,v 1.2 2020/07/17 14:58:17 jmcneill Exp $
 
 include		"arch/evbmips/conf/OCTEON"
 
-#ident 		"INSTALL_ERLITE-$Revision: 1.1 $"
+#ident 		"INSTALL_OCTEON-$Revision: 1.2 $"
 
 # Enable the hooks used for initializing the root memory-disk.
 # The ramdisk size must be kept in sync manually with the size of



CVS commit: src/sys/arch/evbmips/conf

2020-07-17 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Fri Jul 17 14:57:54 UTC 2020

Modified Files:
src/sys/arch/evbmips/conf: OCTEON

Log Message:
ERLITE -> OCTEON


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/evbmips/conf/OCTEON

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/evbmips/conf/OCTEON
diff -u src/sys/arch/evbmips/conf/OCTEON:1.6 src/sys/arch/evbmips/conf/OCTEON:1.7
--- src/sys/arch/evbmips/conf/OCTEON:1.6	Fri Jul 17 14:56:47 2020
+++ src/sys/arch/evbmips/conf/OCTEON	Fri Jul 17 14:57:54 2020
@@ -1,11 +1,11 @@
-#	$NetBSD: OCTEON,v 1.6 2020/07/17 14:56:47 jmcneill Exp $
+#	$NetBSD: OCTEON,v 1.7 2020/07/17 14:57:54 jmcneill Exp $
 
 include 	"arch/mips/conf/std.octeon"
 include 	"arch/evbmips/conf/files.octeon"
 
 #options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		"ERLITE-$Revision: 1.6 $"
+#ident 		"OCTEON-$Revision: 1.7 $"
 
 maxusers	32
 



CVS commit: src/sys/arch/evbmips/conf

2020-07-17 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Fri Jul 17 14:56:47 UTC 2020

Modified Files:
src/sys/arch/evbmips/conf: OCTEON

Log Message:
Add wedge support


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/evbmips/conf/OCTEON

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/evbmips/conf/OCTEON
diff -u src/sys/arch/evbmips/conf/OCTEON:1.5 src/sys/arch/evbmips/conf/OCTEON:1.6
--- src/sys/arch/evbmips/conf/OCTEON:1.5	Thu Jul 16 21:34:52 2020
+++ src/sys/arch/evbmips/conf/OCTEON	Fri Jul 17 14:56:47 2020
@@ -1,11 +1,11 @@
-#	$NetBSD: OCTEON,v 1.5 2020/07/16 21:34:52 jmcneill Exp $
+#	$NetBSD: OCTEON,v 1.6 2020/07/17 14:56:47 jmcneill Exp $
 
 include 	"arch/mips/conf/std.octeon"
 include 	"arch/evbmips/conf/files.octeon"
 
 #options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		"ERLITE-$Revision: 1.5 $"
+#ident 		"ERLITE-$Revision: 1.6 $"
 
 maxusers	32
 
@@ -50,6 +50,10 @@ include "conf/compat_netbsd50.co
 #options 	EXEC_ECOFF	# exec ECOFF binaries
 #options 	COMPAT_ULTRIX	# binary compatibility with Ultrix
 
+# Wedge support
+options 	DKWEDGE_AUTODISCOVER	# Automatically add dk(4) instances
+options 	DKWEDGE_METHOD_GPT	# Supports GPT partitions as wedges
+
 # File systems
 file-system	FFS		# Berkeley Fast Filesystem
 file-system	MFS		# memory-based filesystem



CVS commit: src

2020-07-17 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Fri Jul 17 12:12:24 UTC 2020

Modified Files:
src/distrib/sets/lists/comp: md.amd64 md.i386
src/sys/arch/xen/include: Makefile

Log Message:
don't install xen/xenio.h and xen/xenio3.h anymore, xentools don't use it

PR port-xen/52874


To generate a diff of this commit:
cvs rdiff -u -r1.277 -r1.278 src/distrib/sets/lists/comp/md.amd64
cvs rdiff -u -r1.195 -r1.196 src/distrib/sets/lists/comp/md.i386
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/xen/include/Makefile

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/comp/md.amd64
diff -u src/distrib/sets/lists/comp/md.amd64:1.277 src/distrib/sets/lists/comp/md.amd64:1.278
--- src/distrib/sets/lists/comp/md.amd64:1.277	Sat Apr 25 15:46:59 2020
+++ src/distrib/sets/lists/comp/md.amd64	Fri Jul 17 12:12:24 2020
@@ -1,4 +1,4 @@
-# $NetBSD: md.amd64,v 1.277 2020/04/25 15:46:59 bouyer Exp $
+# $NetBSD: md.amd64,v 1.278 2020/07/17 12:12:24 jdolecek Exp $
 ./usr/include/amd64comp-c-include
 ./usr/include/amd64/ansi.h			comp-c-include
 ./usr/include/amd64/aout_machdep.h		comp-c-include
@@ -1003,8 +1003,8 @@
 ./usr/include/x86/via_padlock.h			comp-c-include
 ./usr/include/xencomp-c-include
 ./usr/include/xen/intrdefs.h			comp-c-include
-./usr/include/xen/xenio.h			comp-c-include
-./usr/include/xen/xenio3.h			comp-c-include
+./usr/include/xen/xenio.h			comp-obsolete		obsolete
+./usr/include/xen/xenio3.h			comp-obsolete		obsolete
 ./usr/include/xmmintrin.h			comp-obsolete		obsolete
 ./usr/lib/clang/7.0.0/lib/netbsd/libclang_rt.asan-i386.a	comp-obsolete	obsolete
 ./usr/lib/clang/7.0.0/lib/netbsd/libclang_rt.asan-i386.so	comp-obsolete	obsolete

Index: src/distrib/sets/lists/comp/md.i386
diff -u src/distrib/sets/lists/comp/md.i386:1.195 src/distrib/sets/lists/comp/md.i386:1.196
--- src/distrib/sets/lists/comp/md.i386:1.195	Sat Apr 25 15:46:59 2020
+++ src/distrib/sets/lists/comp/md.i386	Fri Jul 17 12:12:24 2020
@@ -1,4 +1,4 @@
-# $NetBSD: md.i386,v 1.195 2020/04/25 15:46:59 bouyer Exp $
+# $NetBSD: md.i386,v 1.196 2020/07/17 12:12:24 jdolecek Exp $
 ./usr/include/clang-3.4/__wmmintrin_aes.h	comp-obsolete		obsolete
 ./usr/include/clang-3.4/__wmmintrin_pclmul.h	comp-obsolete		obsolete
 ./usr/include/clang-3.4/ammintrin.h		comp-obsolete		obsolete
@@ -872,8 +872,8 @@
 ./usr/include/x86/via_padlock.h			comp-c-include
 ./usr/include/xencomp-c-include
 ./usr/include/xen/intrdefs.h			comp-c-include
-./usr/include/xen/xenio.h			comp-c-include
-./usr/include/xen/xenio3.h			comp-c-include
+./usr/include/xen/xenio.h			comp-obsolete		obsolete
+./usr/include/xen/xenio3.h			comp-obsolete		obsolete
 ./usr/include/xmmintrin.h			comp-obsolete		obsolete
 ./usr/lib/clang/7.0.0/lib/netbsd/libclang_rt.asan-i386.a	comp-obsolete	obsolete
 ./usr/lib/clang/7.0.0/lib/netbsd/libclang_rt.asan-i386.so	comp-obsolete	obsolete

Index: src/sys/arch/xen/include/Makefile
diff -u src/sys/arch/xen/include/Makefile:1.4 src/sys/arch/xen/include/Makefile:1.5
--- src/sys/arch/xen/include/Makefile:1.4	Sat Apr 25 15:26:17 2020
+++ src/sys/arch/xen/include/Makefile	Fri Jul 17 12:12:24 2020
@@ -1,8 +1,8 @@
-#	$NetBSD: Makefile,v 1.4 2020/04/25 15:26:17 bouyer Exp $
+#	$NetBSD: Makefile,v 1.5 2020/07/17 12:12:24 jdolecek Exp $
 
 
 INCSDIR= /usr/include/xen
 
-INCS=	intrdefs.h xenio.h xenio3.h
+INCS=	intrdefs.h
 
 .include 



CVS commit: src/sys/dev/pci

2020-07-17 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Fri Jul 17 10:56:15 UTC 2020

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

Log Message:
if bnx_tx_encap() fails because mbuf is too fragmented or too long,
drop the mbuf instead of wedging the TX queue forever; found by code inspection

this is quite unlikely scenario since it requires mbuf chain consisting of
more than 8 frags and m_defrag() failing, so probably unrelated to PR kern/47229


To generate a diff of this commit:
cvs rdiff -u -r1.104 -r1.105 src/sys/dev/pci/if_bnx.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_bnx.c
diff -u src/sys/dev/pci/if_bnx.c:1.104 src/sys/dev/pci/if_bnx.c:1.105
--- src/sys/dev/pci/if_bnx.c:1.104	Fri Jul 17 10:08:04 2020
+++ src/sys/dev/pci/if_bnx.c	Fri Jul 17 10:56:15 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_bnx.c,v 1.104 2020/07/17 10:08:04 jdolecek Exp $	*/
+/*	$NetBSD: if_bnx.c,v 1.105 2020/07/17 10:56:15 jdolecek Exp $	*/
 /*	$OpenBSD: if_bnx.c,v 1.101 2013/03/28 17:21:44 brad Exp $	*/
 
 /*-
@@ -35,7 +35,7 @@
 #if 0
 __FBSDID("$FreeBSD: src/sys/dev/bce/if_bce.c,v 1.3 2006/04/13 14:12:26 ru Exp $");
 #endif
-__KERNEL_RCSID(0, "$NetBSD: if_bnx.c,v 1.104 2020/07/17 10:08:04 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_bnx.c,v 1.105 2020/07/17 10:56:15 jdolecek Exp $");
 
 /*
  * The following controllers are supported by this driver:
@@ -5174,8 +5174,10 @@ retry:
 	bus_dmamap_sync(sc->bnx_dmatag, map, 0, map->dm_mapsize,
 	BUS_DMASYNC_PREWRITE);
 	/* Make sure there's room in the chain */
-	if (map->dm_nsegs > (sc->max_tx_bd - sc->used_tx_bd))
+	if (map->dm_nsegs > (sc->max_tx_bd - sc->used_tx_bd)) {
+		error = ENOMEM;
 		goto nospace;
+	}
 
 	/* prod points to an empty tx_bd at this point. */
 	prod_bseq = sc->tx_prod_bseq;
@@ -5254,7 +5256,7 @@ maperr:
 	TAILQ_INSERT_TAIL(>tx_free_pkts, pkt, pkt_entry);
 	mutex_exit(>tx_pkt_mtx);
 
-	return ENOMEM;
+	return error;
 }
 
 //
@@ -5268,7 +5270,7 @@ bnx_start(struct ifnet *ifp)
 {
 	struct bnx_softc	*sc = ifp->if_softc;
 	struct mbuf		*m_head = NULL;
-	int			count = 0;
+	int			count = 0, error;
 #ifdef BNX_DEBUG
 	uint16_t		tx_chain_prod;
 #endif
@@ -5306,12 +5308,22 @@ bnx_start(struct ifnet *ifp)
 		 * don't have room, set the OACTIVE flag to wait
 		 * for the NIC to drain the chain.
 		 */
-		if (bnx_tx_encap(sc, m_head)) {
-			ifp->if_flags |= IFF_OACTIVE;
-			DBPRINT(sc, BNX_INFO_SEND, "TX chain is closed for "
-			"business! Total tx_bd used = %d\n",
-			sc->used_tx_bd);
-			break;
+		if ((error = bnx_tx_encap(sc, m_head))) {
+			if (error == ENOMEM) {
+ifp->if_flags |= IFF_OACTIVE;
+DBPRINT(sc, BNX_INFO_SEND,
+"TX chain is closed for "
+"business! Total tx_bd used = %d\n",
+sc->used_tx_bd);
+break;
+			} else {
+/* Permanent error for the mbuf, drop it */
+IFQ_DEQUEUE(>if_snd, m_head);
+m_freem(m_head);
+DBPRINT(sc, BNX_INFO_SEND,
+"mbuf load error %d, dropped\n", error);
+continue;
+			}
 		}
 
 		IFQ_DEQUEUE(>if_snd, m_head);



CVS commit: src/sys/dev/pci

2020-07-17 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Fri Jul 17 10:08:04 UTC 2020

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

Log Message:
make sure bnx_alloc_pkts() always clears BNX_ALLOC_PKTS_FLAG and IFF_OACTIVE,
even on dmamap allocation failure; remove unnecessary IFF_UP condition


To generate a diff of this commit:
cvs rdiff -u -r1.103 -r1.104 src/sys/dev/pci/if_bnx.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_bnx.c
diff -u src/sys/dev/pci/if_bnx.c:1.103 src/sys/dev/pci/if_bnx.c:1.104
--- src/sys/dev/pci/if_bnx.c:1.103	Fri Jul 17 09:51:31 2020
+++ src/sys/dev/pci/if_bnx.c	Fri Jul 17 10:08:04 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_bnx.c,v 1.103 2020/07/17 09:51:31 jdolecek Exp $	*/
+/*	$NetBSD: if_bnx.c,v 1.104 2020/07/17 10:08:04 jdolecek Exp $	*/
 /*	$OpenBSD: if_bnx.c,v 1.101 2013/03/28 17:21:44 brad Exp $	*/
 
 /*-
@@ -35,7 +35,7 @@
 #if 0
 __FBSDID("$FreeBSD: src/sys/dev/bce/if_bce.c,v 1.3 2006/04/13 14:12:26 ru Exp $");
 #endif
-__KERNEL_RCSID(0, "$NetBSD: if_bnx.c,v 1.103 2020/07/17 09:51:31 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_bnx.c,v 1.104 2020/07/17 10:08:04 jdolecek Exp $");
 
 /*
  * The following controllers are supported by this driver:
@@ -4082,11 +4082,10 @@ bnx_alloc_pkts(struct work * unused, voi
 		if (bus_dmamap_create(sc->bnx_dmatag,
 		MCLBYTES * BNX_MAX_SEGMENTS, USABLE_TX_BD,
 		MCLBYTES, 0, BUS_DMA_WAITOK | BUS_DMA_ALLOCNOW,
-		>pkt_dmamap) != 0)
-			goto put;
-
-		if (!ISSET(ifp->if_flags, IFF_UP))
-			goto stopping;
+		>pkt_dmamap) != 0) {
+			pool_put(bnx_tx_pool, pkt);
+			break;
+		}
 
 		mutex_enter(>tx_pkt_mtx);
 		TAILQ_INSERT_TAIL(>tx_free_pkts, pkt, pkt_entry);
@@ -4104,14 +4103,6 @@ bnx_alloc_pkts(struct work * unused, voi
 	if (!IFQ_IS_EMPTY(>if_snd))
 		bnx_start(ifp);
 	splx(s);
-
-	return;
-
-stopping:
-	bus_dmamap_destroy(sc->bnx_dmatag, pkt->pkt_dmamap);
-put:
-	pool_put(bnx_tx_pool, pkt);
-	return;
 }
 
 //



CVS commit: src/sys/dev/pci

2020-07-17 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Fri Jul 17 09:51:31 UTC 2020

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

Log Message:
remove mistakely committed in-progress code from previous commit


To generate a diff of this commit:
cvs rdiff -u -r1.102 -r1.103 src/sys/dev/pci/if_bnx.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_bnx.c
diff -u src/sys/dev/pci/if_bnx.c:1.102 src/sys/dev/pci/if_bnx.c:1.103
--- src/sys/dev/pci/if_bnx.c:1.102	Fri Jul 17 09:48:21 2020
+++ src/sys/dev/pci/if_bnx.c	Fri Jul 17 09:51:31 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_bnx.c,v 1.102 2020/07/17 09:48:21 jdolecek Exp $	*/
+/*	$NetBSD: if_bnx.c,v 1.103 2020/07/17 09:51:31 jdolecek Exp $	*/
 /*	$OpenBSD: if_bnx.c,v 1.101 2013/03/28 17:21:44 brad Exp $	*/
 
 /*-
@@ -35,7 +35,7 @@
 #if 0
 __FBSDID("$FreeBSD: src/sys/dev/bce/if_bce.c,v 1.3 2006/04/13 14:12:26 ru Exp $");
 #endif
-__KERNEL_RCSID(0, "$NetBSD: if_bnx.c,v 1.102 2020/07/17 09:48:21 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_bnx.c,v 1.103 2020/07/17 09:51:31 jdolecek Exp $");
 
 /*
  * The following controllers are supported by this driver:
@@ -4085,6 +4085,9 @@ bnx_alloc_pkts(struct work * unused, voi
 		>pkt_dmamap) != 0)
 			goto put;
 
+		if (!ISSET(ifp->if_flags, IFF_UP))
+			goto stopping;
+
 		mutex_enter(>tx_pkt_mtx);
 		TAILQ_INSERT_TAIL(>tx_free_pkts, pkt, pkt_entry);
 		sc->tx_pkt_count++;
@@ -4104,6 +4107,8 @@ bnx_alloc_pkts(struct work * unused, voi
 
 	return;
 
+stopping:
+	bus_dmamap_destroy(sc->bnx_dmatag, pkt->pkt_dmamap);
 put:
 	pool_put(bnx_tx_pool, pkt);
 	return;
@@ -5178,10 +5183,8 @@ retry:
 	bus_dmamap_sync(sc->bnx_dmatag, map, 0, map->dm_mapsize,
 	BUS_DMASYNC_PREWRITE);
 	/* Make sure there's room in the chain */
-	if (map->dm_nsegs > (sc->max_tx_bd - sc->used_tx_bd)) {
-		error = ENOMEM;
+	if (map->dm_nsegs > (sc->max_tx_bd - sc->used_tx_bd))
 		goto nospace;
-	}
 
 	/* prod points to an empty tx_bd at this point. */
 	prod_bseq = sc->tx_prod_bseq;
@@ -5260,7 +5263,7 @@ maperr:
 	TAILQ_INSERT_TAIL(>tx_free_pkts, pkt, pkt_entry);
 	mutex_exit(>tx_pkt_mtx);
 
-	return error;
+	return ENOMEM;
 }
 
 //



CVS commit: src/sys/dev/pci

2020-07-17 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Fri Jul 17 09:48:21 UTC 2020

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

Log Message:
re-enable MSI/MSI-X, the TX timeouts were caused by the IFF_OACTIVE handling,
which was fixed in previous revision


To generate a diff of this commit:
cvs rdiff -u -r1.101 -r1.102 src/sys/dev/pci/if_bnx.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_bnx.c
diff -u src/sys/dev/pci/if_bnx.c:1.101 src/sys/dev/pci/if_bnx.c:1.102
--- src/sys/dev/pci/if_bnx.c:1.101	Thu Jul 16 14:57:59 2020
+++ src/sys/dev/pci/if_bnx.c	Fri Jul 17 09:48:21 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_bnx.c,v 1.101 2020/07/16 14:57:59 jdolecek Exp $	*/
+/*	$NetBSD: if_bnx.c,v 1.102 2020/07/17 09:48:21 jdolecek Exp $	*/
 /*	$OpenBSD: if_bnx.c,v 1.101 2013/03/28 17:21:44 brad Exp $	*/
 
 /*-
@@ -35,7 +35,7 @@
 #if 0
 __FBSDID("$FreeBSD: src/sys/dev/bce/if_bce.c,v 1.3 2006/04/13 14:12:26 ru Exp $");
 #endif
-__KERNEL_RCSID(0, "$NetBSD: if_bnx.c,v 1.101 2020/07/16 14:57:59 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_bnx.c,v 1.102 2020/07/17 09:48:21 jdolecek Exp $");
 
 /*
  * The following controllers are supported by this driver:
@@ -625,14 +625,7 @@ bnx_attach(device_t parent, device_t sel
 		return;
 	}
 
-	/* XXX using MSI-X causes TX timeouts, needs to be debugged */
-	int counts[PCI_INTR_TYPE_SIZE] = {
-		[PCI_INTR_TYPE_INTX] = 1,
-		[PCI_INTR_TYPE_MSI] = 0,
-		[PCI_INTR_TYPE_MSIX] = 0,
-	};
-
-	if (pci_intr_alloc(pa, >bnx_ih, counts, PCI_INTR_TYPE_INTX)) {
+	if (pci_intr_alloc(pa, >bnx_ih, NULL, 0)) {
 		aprint_error_dev(sc->bnx_dev, "couldn't map interrupt\n");
 		goto bnx_attach_fail;
 	}
@@ -4092,9 +4085,6 @@ bnx_alloc_pkts(struct work * unused, voi
 		>pkt_dmamap) != 0)
 			goto put;
 
-		if (!ISSET(ifp->if_flags, IFF_UP))
-			goto stopping;
-
 		mutex_enter(>tx_pkt_mtx);
 		TAILQ_INSERT_TAIL(>tx_free_pkts, pkt, pkt_entry);
 		sc->tx_pkt_count++;
@@ -4114,8 +4104,6 @@ bnx_alloc_pkts(struct work * unused, voi
 
 	return;
 
-stopping:
-	bus_dmamap_destroy(sc->bnx_dmatag, pkt->pkt_dmamap);
 put:
 	pool_put(bnx_tx_pool, pkt);
 	return;
@@ -5190,8 +5178,10 @@ retry:
 	bus_dmamap_sync(sc->bnx_dmatag, map, 0, map->dm_mapsize,
 	BUS_DMASYNC_PREWRITE);
 	/* Make sure there's room in the chain */
-	if (map->dm_nsegs > (sc->max_tx_bd - sc->used_tx_bd))
+	if (map->dm_nsegs > (sc->max_tx_bd - sc->used_tx_bd)) {
+		error = ENOMEM;
 		goto nospace;
+	}
 
 	/* prod points to an empty tx_bd at this point. */
 	prod_bseq = sc->tx_prod_bseq;
@@ -5270,7 +5260,7 @@ maperr:
 	TAILQ_INSERT_TAIL(>tx_free_pkts, pkt, pkt_entry);
 	mutex_exit(>tx_pkt_mtx);
 
-	return ENOMEM;
+	return error;
 }
 
 //



CVS commit: src/sys/arch/mips/cavium/dev

2020-07-17 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Fri Jul 17 08:06:02 UTC 2020

Modified Files:
src/sys/arch/mips/cavium/dev: octeon_xhci.c octeon_xhcireg.h

Log Message:
Don't use a reserved value for the USB endian CSR selects and
enable octxhci_uctl_init().  Between these, USB works without
needing a "usb start" from u-boot.

XXX: Note the port power enable goop is still disabled until
we get a GPIO driver.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/mips/cavium/dev/octeon_xhci.c \
src/sys/arch/mips/cavium/dev/octeon_xhcireg.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/arch/mips/cavium/dev/octeon_xhci.c
diff -u src/sys/arch/mips/cavium/dev/octeon_xhci.c:1.1 src/sys/arch/mips/cavium/dev/octeon_xhci.c:1.2
--- src/sys/arch/mips/cavium/dev/octeon_xhci.c:1.1	Thu Jul 16 21:34:52 2020
+++ src/sys/arch/mips/cavium/dev/octeon_xhci.c	Fri Jul 17 08:06:02 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: octeon_xhci.c,v 1.1 2020/07/16 21:34:52 jmcneill Exp $ */
+/*	$NetBSD: octeon_xhci.c,v 1.2 2020/07/17 08:06:02 simonb Exp $ */
 /*	$OpenBSD: octxhci.c,v 1.4 2019/09/29 04:32:23 visa Exp $	*/
 
 /*
@@ -151,7 +151,6 @@ octxhci_attach(device_t parent, device_t
 	if (strcmp(clock_type_hs, "pll_ref_clk") == 0)
 		clock_sel |= 2;
 
-	if (0)
 	octxhci_uctl_init(osc, clock_freq, clock_sel);
 
 	if (octxhci_dwc3_init(sc) != 0) {
@@ -330,8 +329,8 @@ octxhci_uctl_init(struct octxhci_softc *
 	val = XCTL_RD_8(sc, XCTL_SHIM_CFG);
 	val &= ~XCTL_SHIM_CFG_CSR_BYTE_SWAP;
 	val &= ~XCTL_SHIM_CFG_DMA_BYTE_SWAP;
-	val |= 3ull << XCTL_SHIM_CFG_CSR_BYTE_SWAP_SHIFT;
-	val |= 1ull << XCTL_SHIM_CFG_DMA_BYTE_SWAP_SHIFT;
+	val |= __SHIFTIN(XCTL_SHIM_ENDIAN_BIG, XCTL_SHIM_CFG_DMA_BYTE_SWAP);
+	val |= __SHIFTIN(XCTL_SHIM_ENDIAN_BIG, XCTL_SHIM_CFG_CSR_BYTE_SWAP);
 	XCTL_WR_8(sc, XCTL_SHIM_CFG, val);
 	(void)XCTL_RD_8(sc, XCTL_SHIM_CFG);
 }
Index: src/sys/arch/mips/cavium/dev/octeon_xhcireg.h
diff -u src/sys/arch/mips/cavium/dev/octeon_xhcireg.h:1.1 src/sys/arch/mips/cavium/dev/octeon_xhcireg.h:1.2
--- src/sys/arch/mips/cavium/dev/octeon_xhcireg.h:1.1	Thu Jul 16 21:34:52 2020
+++ src/sys/arch/mips/cavium/dev/octeon_xhcireg.h	Fri Jul 17 08:06:02 2020
@@ -59,6 +59,10 @@
 #define   XCTL_SHIM_CFG_DMA_BYTE_SWAP_SHIFT	8
 #define   XCTL_SHIM_CFG_CSR_BYTE_SWAP		0x0003ull
 #define   XCTL_SHIM_CFG_CSR_BYTE_SWAP_SHIFT	0
+#define	  XCTL_SHIM_ENDIAN_LITTLE		  0 /* A-B-C-D-E-F-G-H -> A-B-C-D-E-F-G-H */
+#define	  XCTL_SHIM_ENDIAN_BIG			  1 /* A-B-C-D-E-F-G-H -> H-G-F-E-D-C-B-A */
+#define	  XCTL_SHIM_ENDIAN_RSVD2		  2 /* A-B-C-D-E-F-G-H -> D-C-B-A-H-G-F-E */
+#define	  XCTL_SHIM_ENDIAN_RSVD3		  3 /* A-B-C-D-E-F-G-H -> E-F-G-H-A-B-C-D */
 
 /*
  * DWC3 core control registers.



CVS commit: src/sys/arch/aarch64/aarch64

2020-07-17 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Fri Jul 17 07:21:44 UTC 2020

Modified Files:
src/sys/arch/aarch64/aarch64: pmapboot.c

Log Message:
KNF. 80 cols, use tab.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/aarch64/aarch64/pmapboot.c

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

Modified files:

Index: src/sys/arch/aarch64/aarch64/pmapboot.c
diff -u src/sys/arch/aarch64/aarch64/pmapboot.c:1.9 src/sys/arch/aarch64/aarch64/pmapboot.c:1.10
--- src/sys/arch/aarch64/aarch64/pmapboot.c:1.9	Fri Jul 17 07:16:10 2020
+++ src/sys/arch/aarch64/aarch64/pmapboot.c	Fri Jul 17 07:21:44 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmapboot.c,v 1.9 2020/07/17 07:16:10 ryo Exp $	*/
+/*	$NetBSD: pmapboot.c,v 1.10 2020/07/17 07:21:44 ryo Exp $	*/
 
 /*
  * Copyright (c) 2018 Ryo Shimizu 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pmapboot.c,v 1.9 2020/07/17 07:16:10 ryo Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmapboot.c,v 1.10 2020/07/17 07:21:44 ryo Exp $");
 
 #include "opt_arm_debug.h"
 #include "opt_ddb.h"
@@ -264,7 +264,8 @@ pmapboot_enter(vaddr_t va, paddr_t pa, p
 		if (l0[idx0] == 0) {
 			l1 = pmapboot_pagealloc();
 			if (l1 == NULL) {
-VPRINTF("pmapboot_enter: cannot allocate L1 page\n");
+VPRINTF("pmapboot_enter: "
+"cannot allocate L1 page\n");
 return -1;
 			}
 
@@ -308,7 +309,8 @@ pmapboot_enter(vaddr_t va, paddr_t pa, p
 		if (!l1pde_valid(l1[idx1])) {
 			l2 = pmapboot_pagealloc();
 			if (l2 == NULL) {
-VPRINTF("pmapboot_enter: cannot allocate L2 page\n");
+VPRINTF("pmapboot_enter: "
+"cannot allocate L2 page\n");
 return -1;
 			}
 
@@ -351,7 +353,8 @@ pmapboot_enter(vaddr_t va, paddr_t pa, p
 		if (!l2pde_valid(l2[idx2])) {
 			l3 = pmapboot_pagealloc();
 			if (l3 == NULL) {
-VPRINTF("pmapboot_enter: cannot allocate L3 page\n");
+VPRINTF("pmapboot_enter: "
+"cannot allocate L3 page\n");
 return -1;
 			}
 
@@ -403,7 +406,8 @@ pmapboot_enter(vaddr_t va, paddr_t pa, p
 			}
 			if (va == va_end && (llidx & 15) != 15) {
 /* clear CONTIG flag after this pte entry */
-for (i = (llidx + 1); i < ((llidx + 16) & ~15); i++) {
+for (i = (llidx + 1); i < ((llidx + 16) & ~15);
+i++) {
 	ll[i] &= ~LX_BLKPAG_CONTIG;
 }
 			}
@@ -445,7 +449,7 @@ pmapboot_pagealloc(void)
 	char *e = s + PAGE_SIZE;
 
 	while (s < e)
-	*s++ = 0;
+		*s++ = 0;
 
 	return (pd_entry_t *)pa;
 }



CVS commit: src/sys/arch/aarch64

2020-07-17 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Fri Jul 17 07:16:10 UTC 2020

Modified Files:
src/sys/arch/aarch64/aarch64: locore.S pmapboot.c
src/sys/arch/aarch64/conf: files.aarch64

Log Message:
Add options PMAPBOOT_DEBUG to dump TTBR when pmapboot_enter().
Formerly DEBUG_MMU in locore.S, but there was a bit of confusion.


To generate a diff of this commit:
cvs rdiff -u -r1.67 -r1.68 src/sys/arch/aarch64/aarch64/locore.S
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/aarch64/aarch64/pmapboot.c
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/aarch64/conf/files.aarch64

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

Modified files:

Index: src/sys/arch/aarch64/aarch64/locore.S
diff -u src/sys/arch/aarch64/aarch64/locore.S:1.67 src/sys/arch/aarch64/aarch64/locore.S:1.68
--- src/sys/arch/aarch64/aarch64/locore.S:1.67	Thu Jul 16 11:36:35 2020
+++ src/sys/arch/aarch64/aarch64/locore.S	Fri Jul 17 07:16:10 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.S,v 1.67 2020/07/16 11:36:35 skrll Exp $	*/
+/*	$NetBSD: locore.S,v 1.68 2020/07/17 07:16:10 ryo Exp $	*/
 
 /*
  * Copyright (c) 2017 Ryo Shimizu 
@@ -38,7 +38,7 @@
 #include 
 #include "assym.h"
 
-RCSID("$NetBSD: locore.S,v 1.67 2020/07/16 11:36:35 skrll Exp $")
+RCSID("$NetBSD: locore.S,v 1.68 2020/07/17 07:16:10 ryo Exp $")
 
 #ifdef AARCH64_DEVICE_MEM_STRONGLY_ORDERED
 #define	MAIR_DEVICE_MEM		MAIR_DEVICE_nGnRnE
@@ -49,7 +49,6 @@ RCSID("$NetBSD: locore.S,v 1.67 2020/07/
 
 /*#define DEBUG_LOCORE			// debug print */
 /*#define DEBUG_LOCORE_PRINT_LOCK	// avoid mixing AP's output */
-/*#define DEBUG_MMU			// dump MMU table */
 
 #define LOCORE_EL2
 
@@ -659,7 +658,7 @@ print_x0:
 	ldp	x0, lr, [sp], #16
 	ret
 
-#ifdef DEBUG_MMU
+#ifdef VERBOSE_LOCORE
 /*
  * tinyprintf() supports only maximum 7 '%x', '%d' and '%s' formats.
  * width and any modifiers are ignored. '\n' will be replaced to '\r\n'.
@@ -753,7 +752,7 @@ tinyprintf_done:
 	ldp	x19, x20, [sp], #16
 	ldp	x0, lr, [sp], #16
 	ret
-#endif /* defined(DEBUG_LOCORE) || defined(DEBUG_MMU) */
+#endif /* VERBOSE_LOCORE */
 
 
 save_ttbrs:
@@ -788,7 +787,7 @@ init_mmutable:
 	DPRINTSREG("TTBR0= ", ttbr0_el1)
 	DPRINTSREG("TTBR1= ", ttbr1_el1)
 
-#ifdef DEBUG_MMU
+#ifdef VERBOSE_LOCORE
 	adr	x26, tinyprintf
 #else
 	mov	x26, xzr

Index: src/sys/arch/aarch64/aarch64/pmapboot.c
diff -u src/sys/arch/aarch64/aarch64/pmapboot.c:1.8 src/sys/arch/aarch64/aarch64/pmapboot.c:1.9
--- src/sys/arch/aarch64/aarch64/pmapboot.c:1.8	Thu Jul 16 11:36:35 2020
+++ src/sys/arch/aarch64/aarch64/pmapboot.c	Fri Jul 17 07:16:10 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmapboot.c,v 1.8 2020/07/16 11:36:35 skrll Exp $	*/
+/*	$NetBSD: pmapboot.c,v 1.9 2020/07/17 07:16:10 ryo Exp $	*/
 
 /*
  * Copyright (c) 2018 Ryo Shimizu 
@@ -27,12 +27,13 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pmapboot.c,v 1.8 2020/07/16 11:36:35 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmapboot.c,v 1.9 2020/07/17 07:16:10 ryo Exp $");
 
 #include "opt_arm_debug.h"
 #include "opt_ddb.h"
 #include "opt_multiprocessor.h"
 #include "opt_pmap.h"
+#include "opt_pmapboot.h"
 
 #include 
 #include 
@@ -147,6 +148,13 @@ pmapboot_protect(vaddr_t sva, vaddr_t ev
  */
 
 #ifdef VERBOSE_INIT_ARM
+#define VPRINTF(fmt, args...)	\
+	while (pr != NULL) { pr(fmt, ## args); break; }
+#else
+#define VPRINTF(fmt, args...)	__nothing
+#endif
+
+#ifdef PMAPBOOT_DEBUG
 static void
 pmapboot_pte_print(pt_entry_t pte, int level,
 void (*pr)(const char *, ...) __printflike(1, 2))
@@ -160,7 +168,15 @@ pmapboot_pte_print(pt_entry_t pte, int l
 	l0pde_pa(pte));
 #endif
 }
-#endif /* VERBOSE_INIT_ARM */
+#define PMAPBOOT_DPRINTF(fmt, args...)	\
+	while (pr != NULL) { pr(fmt, ## args); break; }
+#define PMAPBOOT_DPRINT_PTE(pte, l)	\
+	while (pr != NULL) { pmapboot_pte_print((pte), (l), pr); break; }
+#else /* PMAPBOOT_DEBUG */
+#define PMAPBOOT_DPRINTF(fmt, args...)	__nothing
+#define PMAPBOOT_DPRINT_PTE(pte, l)	__nothing
+#endif /* PMAPBOOT_DEBUG */
+
 
 #ifdef OPTIMIZE_TLB_CONTIG
 static inline bool
@@ -178,17 +194,6 @@ tlb_contiguous_p(vaddr_t addr, vaddr_t s
 }
 #endif /* OPTIMIZE_TLB_CONTIG */
 
-
-#ifdef VERBOSE_INIT_ARM
-#define VPRINTF(fmt, args...)	\
-	while (pr != NULL) { pr(fmt, ## args); break; }
-#define VPRINT_PTE(pte, l)	\
-	while (pr != NULL) { pmapboot_pte_print((pte), (l), pr); break; }
-#else
-#define VPRINTF(fmt, args...)	__nothing
-#define VPRINT_PTE(pte, l)	__nothing
-#endif
-
 /*
  * pmapboot_enter() accesses pagetables by physical address.
  * this should be called while identity mapping (VA=PA) available.
@@ -265,8 +270,9 @@ pmapboot_enter(vaddr_t va, paddr_t pa, p
 
 			pte = (uint64_t)l1 | L0_TABLE;
 			l0[idx0] = pte;
-			VPRINTF("TTBR%d[%d] (new)\t= %016lx:", ttbr, idx0, pte);
-			VPRINT_PTE(pte, 0);
+			PMAPBOOT_DPRINTF("TTBR%d[%d] (new)\t= %016lx:",
+			ttbr, idx0, pte);
+			PMAPBOOT_DPRINT_PTE(pte, 0);
 		} else {
 			l1 = (uint64_t *)(l0[idx0] & LX_TBL_PA);
 

CVS commit: src/doc

2020-07-17 Thread Shoichi YAMAGUCHI
Module Name:src
Committed By:   yamaguchi
Date:   Fri Jul 17 06:42:56 UTC 2020

Modified Files:
src/doc: CHANGES

Log Message:
Note x86 per-cpu IDTs change


To generate a diff of this commit:
cvs rdiff -u -r1.2715 -r1.2716 src/doc/CHANGES

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
diff -u src/doc/CHANGES:1.2715 src/doc/CHANGES:1.2716
--- src/doc/CHANGES:1.2715	Wed Jul 15 12:15:31 2020
+++ src/doc/CHANGES	Fri Jul 17 06:42:56 2020
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2715 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2716 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -251,6 +251,7 @@ Changes from NetBSD 9.0 to NetBSD 10.0:
 	ciss(4): Add support for PERFORMANT mode, and enable MSI/MSI-X
 		for adapters supporting it [jdolecek 20200714]
 	ciss(4): Match new HP Smart Array adapters [jdolecek 20200714]
+	x86: Introduce per-cpu IDTs [yamaguchi 20200714]
 	evbmips: Renamed kernel config files:
 		ERLITE -> OCTEON
 		INSTALL_ERLITE -> INSTALL_OCTEON