CVS commit: src/external/gpl3/gcc.old/dist/gcc/config

2019-09-25 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Thu Sep 26 05:51:13 UTC 2019

Added Files:
src/external/gpl3/gcc.old/dist/gcc/config: t-netbsd
src/external/gpl3/gcc.old/dist/gcc/config/alpha: t-alpha
src/external/gpl3/gcc.old/dist/gcc/config/arc: t-arc

Log Message:
merge gcc 7.4 into gcc.old.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.3 src/external/gpl3/gcc.old/dist/gcc/config/t-netbsd
cvs rdiff -u -r0 -r1.3 \
src/external/gpl3/gcc.old/dist/gcc/config/alpha/t-alpha
cvs rdiff -u -r0 -r1.3 src/external/gpl3/gcc.old/dist/gcc/config/arc/t-arc

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

Added files:

Index: src/external/gpl3/gcc.old/dist/gcc/config/t-netbsd
diff -u /dev/null src/external/gpl3/gcc.old/dist/gcc/config/t-netbsd:1.3
--- /dev/null	Thu Sep 26 05:51:13 2019
+++ src/external/gpl3/gcc.old/dist/gcc/config/t-netbsd	Thu Sep 26 05:51:13 2019
@@ -0,0 +1,21 @@
+# Copyright (C) 2017 Free Software Foundation, Inc.
+#
+# This file is part of GCC.
+#
+# GCC is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GCC is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GCC; see the file COPYING3.  If not see
+# .
+
+netbsd.o: $(srcdir)/config/netbsd.c
+	$(COMPILE) $<
+	$(POSTCOMPILE)

Index: src/external/gpl3/gcc.old/dist/gcc/config/alpha/t-alpha
diff -u /dev/null src/external/gpl3/gcc.old/dist/gcc/config/alpha/t-alpha:1.3
--- /dev/null	Thu Sep 26 05:51:13 2019
+++ src/external/gpl3/gcc.old/dist/gcc/config/alpha/t-alpha	Thu Sep 26 05:51:13 2019
@@ -0,0 +1,19 @@
+# Copyright (C) 2016-2017 Free Software Foundation, Inc.
+#
+# This file is part of GCC.
+#
+# GCC is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GCC is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GCC; see the file COPYING3.  If not see
+# .
+
+PASSES_EXTRA += $(srcdir)/config/alpha/alpha-passes.def

Index: src/external/gpl3/gcc.old/dist/gcc/config/arc/t-arc
diff -u /dev/null src/external/gpl3/gcc.old/dist/gcc/config/arc/t-arc:1.3
--- /dev/null	Thu Sep 26 05:51:13 2019
+++ src/external/gpl3/gcc.old/dist/gcc/config/arc/t-arc	Thu Sep 26 05:51:13 2019
@@ -0,0 +1,48 @@
+# GCC Makefile fragment for Synopsys DesignWare ARC.
+#
+# Copyright (C) 2016-2017 Free Software Foundation, Inc.
+#
+# This file is part of GCC.
+#
+# GCC is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 3, or (at your option) any later version.
+#
+# GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
+# details.
+#
+# You should have received a copy of the GNU General Public License along
+# with GCC; see the file COPYING3.  If not see
+# .
+
+TM_H += $(srcdir)/config/arc/arc-c.def
+
+driver-arc.o: $(srcdir)/config/arc/driver-arc.c \
+  $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H)
+	$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<
+
+arc-c.o: $(srcdir)/config/arc/arc-c.c $(CONFIG_H) $(SYSTEM_H) \
+$(TREE_H) $(TM_H) $(TM_P_H) coretypes.h
+	$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
+		$(srcdir)/config/arc/arc-c.c
+
+#Run `arc-cpus` if you changed something in arc-cpus.def
+
+.PHONY: arc-cpus
+
+arc-cpus: $(srcdir)/config/arc/t-multilib \
+	$(srcdir)/config/arc/arc-tables.opt
+
+$(srcdir)/config/arc/t-multilib: $(srcdir)/config/arc/genmultilib.awk 	\
+ $(srcdir)/config/arc/arc-cpus.def
+	$(AWK) -f $< -v FORMAT=Makefile $< $(srcdir)/config/arc/arc-cpus.def > $@
+
+$(srcdir)/config/arc/arc-tables.opt: $(srcdir)/config/arc/genoptions.awk \
+ $(srcdir)/config/arc/arc-cpus.def
+	$(AWK) -f $< -v FORMAT=Makefile $< $(srcdir)/config/arc/arc-cpus.def > $@
+
+# Local Variables:
+# mode: Makefile
+# End:



CVS commit: src/external/gpl3/gcc.old/dist/gcc/config

2019-09-25 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Thu Sep 26 05:51:13 UTC 2019

Added Files:
src/external/gpl3/gcc.old/dist/gcc/config: t-netbsd
src/external/gpl3/gcc.old/dist/gcc/config/alpha: t-alpha
src/external/gpl3/gcc.old/dist/gcc/config/arc: t-arc

Log Message:
merge gcc 7.4 into gcc.old.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.3 src/external/gpl3/gcc.old/dist/gcc/config/t-netbsd
cvs rdiff -u -r0 -r1.3 \
src/external/gpl3/gcc.old/dist/gcc/config/alpha/t-alpha
cvs rdiff -u -r0 -r1.3 src/external/gpl3/gcc.old/dist/gcc/config/arc/t-arc

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



CVS commit: src/sys/dev/pci

2019-09-25 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Sep 26 04:16:03 UTC 2019

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

Log Message:
 Fix typo in comment.


To generate a diff of this commit:
cvs rdiff -u -r1.648 -r1.649 src/sys/dev/pci/if_wm.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_wm.c
diff -u src/sys/dev/pci/if_wm.c:1.648 src/sys/dev/pci/if_wm.c:1.649
--- src/sys/dev/pci/if_wm.c:1.648	Fri Sep 13 07:55:07 2019
+++ src/sys/dev/pci/if_wm.c	Thu Sep 26 04:16:03 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_wm.c,v 1.648 2019/09/13 07:55:07 msaitoh Exp $	*/
+/*	$NetBSD: if_wm.c,v 1.649 2019/09/26 04:16:03 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -82,7 +82,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.648 2019/09/13 07:55:07 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.649 2019/09/26 04:16:03 msaitoh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_net_mpsafe.h"
@@ -9894,7 +9894,7 @@ wm_gmii_reset(struct wm_softc *sc)
  * result might be incorrect.
  *
  *  In the second call, PHY OUI and model is used to identify PHY type.
- * It might not be perfpect because of the lack of compared entry, but it
+ * It might not be perfect because of the lack of compared entry, but it
  * would be better than the first call.
  *
  *  If the detected new result and previous assumption is different,
@@ -12852,12 +12852,12 @@ wm_ich8_cycle_init(struct wm_softc *sc)
 	/*
 	 * Either we should have a hardware SPI cycle in progress bit to check
 	 * against, in order to start a new cycle or FDONE bit should be
-	 * changed in the hardware so that it is 1 after harware reset, which
+	 * changed in the hardware so that it is 1 after hardware reset, which
 	 * can then be used as an indication whether a cycle is in progress or
 	 * has been completed .. we should also have some software semaphore
 	 * mechanism to guard FDONE or the cycle in progress bit so that two
 	 * threads access to those bits can be sequentiallized or a way so that
-	 * 2 threads dont start the cycle at the same time
+	 * 2 threads don't start the cycle at the same time
 	 */
 
 	if ((hsfsts & HSFSTS_FLINPRO) == 0) {



CVS commit: src/sys/dev/pci

2019-09-25 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Sep 26 04:16:03 UTC 2019

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

Log Message:
 Fix typo in comment.


To generate a diff of this commit:
cvs rdiff -u -r1.648 -r1.649 src/sys/dev/pci/if_wm.c

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



CVS commit: src/sys/modules

2019-09-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Sep 26 02:01:05 UTC 2019

Modified Files:
src/sys/modules/compat_20: Makefile
src/sys/modules/compat_30: Makefile
src/sys/modules/compat_43: Makefile
src/sys/modules/compat_80: Makefile
src/sys/modules/compat_netbsd32: Makefile
src/sys/modules/compat_netbsd32_09: Makefile
src/sys/modules/compat_netbsd32_12: Makefile
src/sys/modules/compat_netbsd32_13: Makefile
src/sys/modules/compat_netbsd32_16: Makefile
src/sys/modules/compat_netbsd32_20: Makefile
src/sys/modules/compat_netbsd32_30: Makefile
src/sys/modules/compat_netbsd32_40: Makefile
src/sys/modules/compat_netbsd32_43: Makefile
src/sys/modules/compat_netbsd32_50: Makefile
src/sys/modules/compat_netbsd32_60: Makefile
src/sys/modules/compat_netbsd32_80: Makefile
src/sys/modules/compat_netbsd32_mqueue: Makefile
src/sys/modules/compat_netbsd32_nfssrv: Makefile
src/sys/modules/compat_netbsd32_ptrace: Makefile
src/sys/modules/compat_netbsd32_raid: Makefile
src/sys/modules/compat_netbsd32_sysvipc: Makefile
src/sys/modules/compat_netbsd32_sysvipc_10: Makefile
src/sys/modules/compat_netbsd32_sysvipc_14: Makefile
src/sys/modules/compat_netbsd32_sysvipc_50: Makefile
src/sys/modules/compat_ossaudio: Makefile
src/sys/modules/compat_raid_50: Makefile
src/sys/modules/compat_sysctl_09_43: Makefile

Log Message:
Kill WARNS = 3 from all the modules that now compile cleanly.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/modules/compat_20/Makefile
cvs rdiff -u -r1.3 -r1.4 src/sys/modules/compat_30/Makefile
cvs rdiff -u -r1.3 -r1.4 src/sys/modules/compat_43/Makefile
cvs rdiff -u -r1.4 -r1.5 src/sys/modules/compat_80/Makefile
cvs rdiff -u -r1.27 -r1.28 src/sys/modules/compat_netbsd32/Makefile
cvs rdiff -u -r1.3 -r1.4 src/sys/modules/compat_netbsd32_09/Makefile
cvs rdiff -u -r1.3 -r1.4 src/sys/modules/compat_netbsd32_12/Makefile
cvs rdiff -u -r1.3 -r1.4 src/sys/modules/compat_netbsd32_13/Makefile
cvs rdiff -u -r1.3 -r1.4 src/sys/modules/compat_netbsd32_16/Makefile
cvs rdiff -u -r1.3 -r1.4 src/sys/modules/compat_netbsd32_20/Makefile
cvs rdiff -u -r1.3 -r1.4 src/sys/modules/compat_netbsd32_30/Makefile
cvs rdiff -u -r1.3 -r1.4 src/sys/modules/compat_netbsd32_40/Makefile
cvs rdiff -u -r1.3 -r1.4 src/sys/modules/compat_netbsd32_43/Makefile
cvs rdiff -u -r1.4 -r1.5 src/sys/modules/compat_netbsd32_50/Makefile
cvs rdiff -u -r1.3 -r1.4 src/sys/modules/compat_netbsd32_60/Makefile
cvs rdiff -u -r1.3 -r1.4 src/sys/modules/compat_netbsd32_80/Makefile
cvs rdiff -u -r1.3 -r1.4 src/sys/modules/compat_netbsd32_mqueue/Makefile
cvs rdiff -u -r1.3 -r1.4 src/sys/modules/compat_netbsd32_nfssrv/Makefile
cvs rdiff -u -r1.4 -r1.5 src/sys/modules/compat_netbsd32_ptrace/Makefile
cvs rdiff -u -r1.2 -r1.3 src/sys/modules/compat_netbsd32_raid/Makefile
cvs rdiff -u -r1.4 -r1.5 src/sys/modules/compat_netbsd32_sysvipc/Makefile
cvs rdiff -u -r1.3 -r1.4 src/sys/modules/compat_netbsd32_sysvipc_10/Makefile
cvs rdiff -u -r1.3 -r1.4 src/sys/modules/compat_netbsd32_sysvipc_14/Makefile
cvs rdiff -u -r1.3 -r1.4 src/sys/modules/compat_netbsd32_sysvipc_50/Makefile
cvs rdiff -u -r1.2 -r1.3 src/sys/modules/compat_ossaudio/Makefile
cvs rdiff -u -r1.3 -r1.4 src/sys/modules/compat_raid_50/Makefile
cvs rdiff -u -r1.3 -r1.4 src/sys/modules/compat_sysctl_09_43/Makefile

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

Modified files:

Index: src/sys/modules/compat_20/Makefile
diff -u src/sys/modules/compat_20/Makefile:1.3 src/sys/modules/compat_20/Makefile:1.4
--- src/sys/modules/compat_20/Makefile:1.3	Sat Feb 16 23:05:45 2019
+++ src/sys/modules/compat_20/Makefile	Wed Sep 25 22:01:02 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.3 2019/02/17 04:05:45 rin Exp $
+#	$NetBSD: Makefile,v 1.4 2019/09/26 02:01:02 christos Exp $
 
 .include "../Makefile.inc"
 
@@ -12,6 +12,4 @@ CPPFLAGS+=	-DCOMPAT_40 -DCOMPAT_50 -DCOM
 SRCS+=	compat_20_mod.c
 SRCS+=	vfs_syscalls_20.c  ieee80211_20.c if43_20.c
 
-WARNS=	3
-
 .include 

Index: src/sys/modules/compat_30/Makefile
diff -u src/sys/modules/compat_30/Makefile:1.3 src/sys/modules/compat_30/Makefile:1.4
--- src/sys/modules/compat_30/Makefile:1.3	Sat Feb 16 23:05:45 2019
+++ src/sys/modules/compat_30/Makefile	Wed Sep 25 22:01:02 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.3 2019/02/17 04:05:45 rin Exp $
+#	$NetBSD: Makefile,v 1.4 2019/09/26 02:01:02 christos Exp $
 
 .include "../Makefile.inc"
 
@@ -13,6 +13,4 @@ SRCS+=	compat_30_mod.c
 SRCS+=	vfs_syscalls_30.c uipc_syscalls_30.c kern_time_30.c bio_30.c vnd_30.c
 SRCS+=	usb_subr_30.c
 
-WARNS=	3
-
 .include 

Index: src/sys/modules/compat_43/Makefile
diff -u src/sys/modules/compat_43/Makefile:1.3 src/sys/modules/compat_43/Makefile:1.4
--- src/sys/modules/compat_43/Makefile:1.3	Sat 

CVS commit: src/sys/modules

2019-09-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Sep 26 02:01:05 UTC 2019

Modified Files:
src/sys/modules/compat_20: Makefile
src/sys/modules/compat_30: Makefile
src/sys/modules/compat_43: Makefile
src/sys/modules/compat_80: Makefile
src/sys/modules/compat_netbsd32: Makefile
src/sys/modules/compat_netbsd32_09: Makefile
src/sys/modules/compat_netbsd32_12: Makefile
src/sys/modules/compat_netbsd32_13: Makefile
src/sys/modules/compat_netbsd32_16: Makefile
src/sys/modules/compat_netbsd32_20: Makefile
src/sys/modules/compat_netbsd32_30: Makefile
src/sys/modules/compat_netbsd32_40: Makefile
src/sys/modules/compat_netbsd32_43: Makefile
src/sys/modules/compat_netbsd32_50: Makefile
src/sys/modules/compat_netbsd32_60: Makefile
src/sys/modules/compat_netbsd32_80: Makefile
src/sys/modules/compat_netbsd32_mqueue: Makefile
src/sys/modules/compat_netbsd32_nfssrv: Makefile
src/sys/modules/compat_netbsd32_ptrace: Makefile
src/sys/modules/compat_netbsd32_raid: Makefile
src/sys/modules/compat_netbsd32_sysvipc: Makefile
src/sys/modules/compat_netbsd32_sysvipc_10: Makefile
src/sys/modules/compat_netbsd32_sysvipc_14: Makefile
src/sys/modules/compat_netbsd32_sysvipc_50: Makefile
src/sys/modules/compat_ossaudio: Makefile
src/sys/modules/compat_raid_50: Makefile
src/sys/modules/compat_sysctl_09_43: Makefile

Log Message:
Kill WARNS = 3 from all the modules that now compile cleanly.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/modules/compat_20/Makefile
cvs rdiff -u -r1.3 -r1.4 src/sys/modules/compat_30/Makefile
cvs rdiff -u -r1.3 -r1.4 src/sys/modules/compat_43/Makefile
cvs rdiff -u -r1.4 -r1.5 src/sys/modules/compat_80/Makefile
cvs rdiff -u -r1.27 -r1.28 src/sys/modules/compat_netbsd32/Makefile
cvs rdiff -u -r1.3 -r1.4 src/sys/modules/compat_netbsd32_09/Makefile
cvs rdiff -u -r1.3 -r1.4 src/sys/modules/compat_netbsd32_12/Makefile
cvs rdiff -u -r1.3 -r1.4 src/sys/modules/compat_netbsd32_13/Makefile
cvs rdiff -u -r1.3 -r1.4 src/sys/modules/compat_netbsd32_16/Makefile
cvs rdiff -u -r1.3 -r1.4 src/sys/modules/compat_netbsd32_20/Makefile
cvs rdiff -u -r1.3 -r1.4 src/sys/modules/compat_netbsd32_30/Makefile
cvs rdiff -u -r1.3 -r1.4 src/sys/modules/compat_netbsd32_40/Makefile
cvs rdiff -u -r1.3 -r1.4 src/sys/modules/compat_netbsd32_43/Makefile
cvs rdiff -u -r1.4 -r1.5 src/sys/modules/compat_netbsd32_50/Makefile
cvs rdiff -u -r1.3 -r1.4 src/sys/modules/compat_netbsd32_60/Makefile
cvs rdiff -u -r1.3 -r1.4 src/sys/modules/compat_netbsd32_80/Makefile
cvs rdiff -u -r1.3 -r1.4 src/sys/modules/compat_netbsd32_mqueue/Makefile
cvs rdiff -u -r1.3 -r1.4 src/sys/modules/compat_netbsd32_nfssrv/Makefile
cvs rdiff -u -r1.4 -r1.5 src/sys/modules/compat_netbsd32_ptrace/Makefile
cvs rdiff -u -r1.2 -r1.3 src/sys/modules/compat_netbsd32_raid/Makefile
cvs rdiff -u -r1.4 -r1.5 src/sys/modules/compat_netbsd32_sysvipc/Makefile
cvs rdiff -u -r1.3 -r1.4 src/sys/modules/compat_netbsd32_sysvipc_10/Makefile
cvs rdiff -u -r1.3 -r1.4 src/sys/modules/compat_netbsd32_sysvipc_14/Makefile
cvs rdiff -u -r1.3 -r1.4 src/sys/modules/compat_netbsd32_sysvipc_50/Makefile
cvs rdiff -u -r1.2 -r1.3 src/sys/modules/compat_ossaudio/Makefile
cvs rdiff -u -r1.3 -r1.4 src/sys/modules/compat_raid_50/Makefile
cvs rdiff -u -r1.3 -r1.4 src/sys/modules/compat_sysctl_09_43/Makefile

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



CVS commit: src/sys/modules/compat_50

2019-09-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Sep 26 02:00:27 UTC 2019

Modified Files:
src/sys/modules/compat_50: Makefile

Log Message:
Limit -Wno-sign-compare to only rtsock_50.c which by virtue of including
rtsock_shared.c and using m_len is a mess to fix.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/modules/compat_50/Makefile

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

Modified files:

Index: src/sys/modules/compat_50/Makefile
diff -u src/sys/modules/compat_50/Makefile:1.5 src/sys/modules/compat_50/Makefile:1.6
--- src/sys/modules/compat_50/Makefile:1.5	Mon Jun 17 10:57:57 2019
+++ src/sys/modules/compat_50/Makefile	Wed Sep 25 22:00:27 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.5 2019/06/17 14:57:57 christos Exp $
+#	$NetBSD: Makefile,v 1.6 2019/09/26 02:00:27 christos Exp $
 
 .include "../Makefile.inc"
 
@@ -21,6 +21,8 @@ CPPFLAGS+=	-DINET -DINET6
 
 SRCS+=	rtsock_50.c
 
+COPTS.rtsock_50.c+=-Wno-sign-compare
+
 .PATH:	${S}/fs/puffs
 
 SRCS+=	puffs_compat.c
@@ -33,6 +35,4 @@ SRCS+=  wsevent_50.c
 
 SRCS+=	vnd_50.c
 
-WARNS=	3
-
 .include 



CVS commit: src/sys/modules/compat_50

2019-09-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Sep 26 02:00:27 UTC 2019

Modified Files:
src/sys/modules/compat_50: Makefile

Log Message:
Limit -Wno-sign-compare to only rtsock_50.c which by virtue of including
rtsock_shared.c and using m_len is a mess to fix.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/modules/compat_50/Makefile

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



CVS commit: src/sys/arch/amd64/amd64

2019-09-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Sep 26 01:39:22 UTC 2019

Modified Files:
src/sys/arch/amd64/amd64: netbsd32_machdep.c

Log Message:
- promote regs from int to u_int in comparisons with unsigned constants
- cast -1 to __greg32_t which is unsigned and the LHS.


To generate a diff of this commit:
cvs rdiff -u -r1.127 -r1.128 src/sys/arch/amd64/amd64/netbsd32_machdep.c

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



CVS commit: src/sys/arch/amd64/amd64

2019-09-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Sep 26 01:39:22 UTC 2019

Modified Files:
src/sys/arch/amd64/amd64: netbsd32_machdep.c

Log Message:
- promote regs from int to u_int in comparisons with unsigned constants
- cast -1 to __greg32_t which is unsigned and the LHS.


To generate a diff of this commit:
cvs rdiff -u -r1.127 -r1.128 src/sys/arch/amd64/amd64/netbsd32_machdep.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/amd64/amd64/netbsd32_machdep.c
diff -u src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.127 src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.128
--- src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.127	Wed Aug 21 08:46:56 2019
+++ src/sys/arch/amd64/amd64/netbsd32_machdep.c	Wed Sep 25 21:39:22 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_machdep.c,v 1.127 2019/08/21 12:46:56 maxv Exp $	*/
+/*	$NetBSD: netbsd32_machdep.c,v 1.128 2019/09/26 01:39:22 christos Exp $	*/
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.127 2019/08/21 12:46:56 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.128 2019/09/26 01:39:22 christos Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -437,7 +437,7 @@ netbsd32_process_write_regs(struct lwp *
 	if (!VALID_USER_DSEL32(regs->r_ds) ||
 	!VALID_USER_DSEL32(regs->r_ss))
 		return EINVAL;
-	if (regs->r_eip >= VM_MAXUSER_ADDRESS32)
+	if ((u_int)regs->r_eip >= VM_MAXUSER_ADDRESS32)
 		return EINVAL;
 
 	tf->tf_rax = regs->r_eax;
@@ -479,7 +479,7 @@ netbsd32_process_write_dbregs(struct lwp
 
 	/* Check that DR0-DR3 contain user-space address */
 	for (i = 0; i < X86_DBREGS; i++) {
-		if (regs->dr[i] >= VM_MAXUSER_ADDRESS32)
+		if ((u_int)regs->dr[i] >= VM_MAXUSER_ADDRESS32)
 			return EINVAL;
 	}
 
@@ -811,7 +811,7 @@ cpu_getmcontext32(struct lwp *l, mcontex
 	gr[_REG32_ERR]= tf->tf_err;
 
 	if ((ras_eip = (__greg32_t)(uintptr_t)ras_lookup(l->l_proc,
-	(void *) (uintptr_t)gr[_REG32_EIP])) != -1)
+	(void *) (uintptr_t)gr[_REG32_EIP])) != (__greg32_t)-1)
 		gr[_REG32_EIP] = ras_eip;
 
 	*flags |= _UC_CPU;



CVS commit: src/sys/compat/ossaudio

2019-09-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Sep 26 01:37:53 UTC 2019

Modified Files:
src/sys/compat/ossaudio: ossaudio.c

Log Message:
- "source" is u_long in the kernel (and int in userland). Cast -1 to u_long.
- make "s" unsigned since blocksize is too.


To generate a diff of this commit:
cvs rdiff -u -r1.75 -r1.76 src/sys/compat/ossaudio/ossaudio.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/ossaudio/ossaudio.c
diff -u src/sys/compat/ossaudio/ossaudio.c:1.75 src/sys/compat/ossaudio/ossaudio.c:1.76
--- src/sys/compat/ossaudio/ossaudio.c:1.75	Fri Aug 23 08:42:14 2019
+++ src/sys/compat/ossaudio/ossaudio.c	Wed Sep 25 21:37:52 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: ossaudio.c,v 1.75 2019/08/23 12:42:14 maxv Exp $	*/
+/*	$NetBSD: ossaudio.c,v 1.76 2019/09/26 01:37:52 christos Exp $	*/
 
 /*-
  * Copyright (c) 1997, 2008 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ossaudio.c,v 1.75 2019/08/23 12:42:14 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ossaudio.c,v 1.76 2019/09/26 01:37:52 christos Exp $");
 
 #include 
 #include 
@@ -1087,7 +1087,7 @@ oss_ioctl_mixer(struct lwp *lwp, const s
 		}
 		break;
 	case OSS_SOUND_MIXER_READ_RECSRC:
-		if (di->source == -1) {
+		if (di->source == (u_long)-1) {
 			DPRINTF(("%s: OSS_SOUND_MIXER_READ_RECSRC bad source\n",
 			__func__));
 			error = EINVAL;
@@ -1132,7 +1132,7 @@ oss_ioctl_mixer(struct lwp *lwp, const s
 		break;
 	case OSS_SOUND_MIXER_WRITE_RECSRC:
 	case OSS_SOUND_MIXER_WRITE_R_RECSRC:
-		if (di->source == -1) {
+		if (di->source == (u_long)-1) {
 			DPRINTF(("%s: OSS_SOUND_MIXER_WRITE_RECSRC bad "
 			"source\n", __func__));
 			error = EINVAL;
@@ -1492,11 +1492,11 @@ static void
 setblocksize(file_t *fp, struct audio_info *info)
 {
 	struct audio_info set;
-	int s;
+	u_int s;
 
-	 if (info->blocksize & (info->blocksize-1)) {
+	 if (info->blocksize & (info->blocksize - 1)) {
 		for(s = 32; s < info->blocksize; s <<= 1)
-			;
+			continue;
 		AUDIO_INITINFO();
 		set.blocksize = s;
 		fp->f_ops->fo_ioctl(fp, AUDIO_SETINFO, );



CVS commit: src/sys/compat/ossaudio

2019-09-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Sep 26 01:37:53 UTC 2019

Modified Files:
src/sys/compat/ossaudio: ossaudio.c

Log Message:
- "source" is u_long in the kernel (and int in userland). Cast -1 to u_long.
- make "s" unsigned since blocksize is too.


To generate a diff of this commit:
cvs rdiff -u -r1.75 -r1.76 src/sys/compat/ossaudio/ossaudio.c

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



CVS commit: src/sys/dev/raidframe

2019-09-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Sep 26 01:36:11 UTC 2019

Modified Files:
src/sys/dev/raidframe: raidframevar.h rf_compat50.c

Log Message:
make nspares unsigned; it is assigned from numSpares which is unsigned.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/dev/raidframe/raidframevar.h
cvs rdiff -u -r1.10 -r1.11 src/sys/dev/raidframe/rf_compat50.c

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



CVS commit: src/sys/dev/raidframe

2019-09-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Sep 26 01:36:11 UTC 2019

Modified Files:
src/sys/dev/raidframe: raidframevar.h rf_compat50.c

Log Message:
make nspares unsigned; it is assigned from numSpares which is unsigned.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/dev/raidframe/raidframevar.h
cvs rdiff -u -r1.10 -r1.11 src/sys/dev/raidframe/rf_compat50.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/raidframe/raidframevar.h
diff -u src/sys/dev/raidframe/raidframevar.h:1.19 src/sys/dev/raidframe/raidframevar.h:1.20
--- src/sys/dev/raidframe/raidframevar.h:1.19	Thu Apr 19 17:50:09 2018
+++ src/sys/dev/raidframe/raidframevar.h	Wed Sep 25 21:36:10 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: raidframevar.h,v 1.19 2018/04/19 21:50:09 christos Exp $ */
+/*	$NetBSD: raidframevar.h,v 1.20 2019/09/26 01:36:10 christos Exp $ */
 /*-
  * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -519,7 +519,7 @@ typedef struct RF_DeviceConfig_s {
 	u_int   maxqdepth;
 	int ndevs;
 	RF_RaidDisk_t devs[RF_MAX_DISKS];
-	int nspares;
+	u_intnspares;
 	RF_RaidDisk_t spares[RF_MAX_DISKS];
 }   RF_DeviceConfig_t;
 

Index: src/sys/dev/raidframe/rf_compat50.c
diff -u src/sys/dev/raidframe/rf_compat50.c:1.10 src/sys/dev/raidframe/rf_compat50.c:1.11
--- src/sys/dev/raidframe/rf_compat50.c:1.10	Fri Mar  1 06:06:56 2019
+++ src/sys/dev/raidframe/rf_compat50.c	Wed Sep 25 21:36:10 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: rf_compat50.c,v 1.10 2019/03/01 11:06:56 pgoyette Exp $	*/
+/*	$NetBSD: rf_compat50.c,v 1.11 2019/09/26 01:36:10 christos Exp $	*/
 
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -86,7 +86,7 @@ typedef struct RF_DeviceConfig50_s {
 	u_int			maxqdepth;
 	int			ndevs;
 	RF_RaidDisk50_t		devs[RF_MAX_DISKS];
-	int			nspares;
+	u_int			nspares;
 	RF_RaidDisk50_t		spares[RF_MAX_DISKS];
 } RF_DeviceConfig50_t;
 



CVS commit: src/sys/dev/usb

2019-09-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Sep 26 01:35:08 UTC 2019

Modified Files:
src/sys/dev/usb: usbdivar.h

Log Message:
subdevlen is an array length, make it unsigned


To generate a diff of this commit:
cvs rdiff -u -r1.118 -r1.119 src/sys/dev/usb/usbdivar.h

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



CVS commit: src/sys/dev/usb

2019-09-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Sep 26 01:35:08 UTC 2019

Modified Files:
src/sys/dev/usb: usbdivar.h

Log Message:
subdevlen is an array length, make it unsigned


To generate a diff of this commit:
cvs rdiff -u -r1.118 -r1.119 src/sys/dev/usb/usbdivar.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/usb/usbdivar.h
diff -u src/sys/dev/usb/usbdivar.h:1.118 src/sys/dev/usb/usbdivar.h:1.119
--- src/sys/dev/usb/usbdivar.h:1.118	Sat Jan 26 21:08:42 2019
+++ src/sys/dev/usb/usbdivar.h	Wed Sep 25 21:35:08 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: usbdivar.h,v 1.118 2019/01/27 02:08:42 pgoyette Exp $	*/
+/*	$NetBSD: usbdivar.h,v 1.119 2019/09/26 01:35:08 christos Exp $	*/
 
 /*
  * Copyright (c) 1998, 2012 The NetBSD Foundation, Inc.
@@ -203,7 +203,7 @@ struct usbd_device {
 	const struct usbd_quirks
 			   *ud_quirks;	/* device quirks, always set */
 	struct usbd_hub	   *ud_hub;		/* only if this is a hub */
-	int			ud_subdevlen;	/* array length of following */
+	u_int			ud_subdevlen;	/* array length of following */
 	device_t	   *ud_subdevs;	/* sub-devices */
 	int			ud_nifaces_claimed; /* number of ifaces in use */
 	void		   *ud_hcpriv;



CVS commit: src/sys

2019-09-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Sep 26 01:34:16 UTC 2019

Modified Files:
src/sys/kern: vfs_syscalls.c
src/sys/sys: vfs_syscalls.h

Log Message:
make nmountcompatnames unsigned (assigned from __arraycount, compared with
unsigned in compat code)


To generate a diff of this commit:
cvs rdiff -u -r1.536 -r1.537 src/sys/kern/vfs_syscalls.c
cvs rdiff -u -r1.25 -r1.26 src/sys/sys/vfs_syscalls.h

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



CVS commit: src/sys

2019-09-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Sep 26 01:34:16 UTC 2019

Modified Files:
src/sys/kern: vfs_syscalls.c
src/sys/sys: vfs_syscalls.h

Log Message:
make nmountcompatnames unsigned (assigned from __arraycount, compared with
unsigned in compat code)


To generate a diff of this commit:
cvs rdiff -u -r1.536 -r1.537 src/sys/kern/vfs_syscalls.c
cvs rdiff -u -r1.25 -r1.26 src/sys/sys/vfs_syscalls.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/kern/vfs_syscalls.c
diff -u src/sys/kern/vfs_syscalls.c:1.536 src/sys/kern/vfs_syscalls.c:1.537
--- src/sys/kern/vfs_syscalls.c:1.536	Sun Sep 22 18:59:39 2019
+++ src/sys/kern/vfs_syscalls.c	Wed Sep 25 21:34:16 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_syscalls.c,v 1.536 2019/09/22 22:59:39 christos Exp $	*/
+/*	$NetBSD: vfs_syscalls.c,v 1.537 2019/09/26 01:34:16 christos Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.536 2019/09/22 22:59:39 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.537 2019/09/26 01:34:16 christos Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_fileassoc.h"
@@ -163,7 +163,7 @@ const char * const mountcompatnames[] = 
 	MOUNT_AFS,	/* 9 */
 };
 
-const int nmountcompatnames = __arraycount(mountcompatnames);
+const u_int nmountcompatnames = __arraycount(mountcompatnames);
 
 static int 
 fd_nameiat(struct lwp *l, int fdat, struct nameidata *ndp)

Index: src/sys/sys/vfs_syscalls.h
diff -u src/sys/sys/vfs_syscalls.h:1.25 src/sys/sys/vfs_syscalls.h:1.26
--- src/sys/sys/vfs_syscalls.h:1.25	Wed Jun 19 23:31:54 2019
+++ src/sys/sys/vfs_syscalls.h	Wed Sep 25 21:34:16 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: vfs_syscalls.h,v 1.25 2019/06/20 03:31:54 kamil Exp $*/
+/* $NetBSD: vfs_syscalls.h,v 1.26 2019/09/26 01:34:16 christos Exp $*/
 
 /*
  * Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -85,6 +85,6 @@ int	chdir_lookup(const char *, int, stru
 void	change_root(struct cwdinfo *, struct vnode *, struct lwp *);
 
 extern const char *const mountcompatnames[];
-extern const int nmountcompatnames;
+extern const u_int nmountcompatnames;
 
 #endif /* _SYS_VFS_SYSCALLS_H_ */



CVS commit: src/sys/compat/netbsd32

2019-09-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Sep 26 01:32:09 UTC 2019

Modified Files:
src/sys/compat/netbsd32: netbsd32_fs.c netbsd32_rndpseudo_50.c
netbsd32_socket.c

Log Message:
use size_t for counters (which are compared and set with unsigneds)


To generate a diff of this commit:
cvs rdiff -u -r1.84 -r1.85 src/sys/compat/netbsd32/netbsd32_fs.c
cvs rdiff -u -r1.3 -r1.4 src/sys/compat/netbsd32/netbsd32_rndpseudo_50.c
cvs rdiff -u -r1.49 -r1.50 src/sys/compat/netbsd32/netbsd32_socket.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/netbsd32/netbsd32_fs.c
diff -u src/sys/compat/netbsd32/netbsd32_fs.c:1.84 src/sys/compat/netbsd32/netbsd32_fs.c:1.85
--- src/sys/compat/netbsd32/netbsd32_fs.c:1.84	Sun Sep 22 18:59:38 2019
+++ src/sys/compat/netbsd32/netbsd32_fs.c	Wed Sep 25 21:32:09 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_fs.c,v 1.84 2019/09/22 22:59:38 christos Exp $	*/
+/*	$NetBSD: netbsd32_fs.c,v 1.85 2019/09/26 01:32:09 christos Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_fs.c,v 1.84 2019/09/22 22:59:38 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_fs.c,v 1.85 2019/09/26 01:32:09 christos Exp $");
 
 #include 
 #include 
@@ -139,7 +139,8 @@ dofilereadv32(int fd, struct file *fp, s
 	struct iovec *iov;
 	struct iovec *needfree;
 	struct iovec aiov[UIO_SMALLIOV];
-	long i, cnt, error = 0;
+	long i, error = 0;
+	size_t cnt;
 	u_int iovlen;
 	struct iovec *ktriov = NULL;
 
@@ -243,7 +244,8 @@ dofilewritev32(int fd, struct file *fp, 
 	struct iovec *iov;
 	struct iovec *needfree;
 	struct iovec aiov[UIO_SMALLIOV];
-	long i, cnt, error = 0;
+	long i, error = 0;
+	size_t cnt;
 	u_int iovlen;
 	struct iovec *ktriov = NULL;
 

Index: src/sys/compat/netbsd32/netbsd32_rndpseudo_50.c
diff -u src/sys/compat/netbsd32/netbsd32_rndpseudo_50.c:1.3 src/sys/compat/netbsd32/netbsd32_rndpseudo_50.c:1.4
--- src/sys/compat/netbsd32/netbsd32_rndpseudo_50.c:1.3	Wed Jun 26 22:36:27 2019
+++ src/sys/compat/netbsd32/netbsd32_rndpseudo_50.c	Wed Sep 25 21:32:09 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_rndpseudo_50.c,v 1.3 2019/06/27 02:36:27 christos Exp $	*/
+/*	$NetBSD: netbsd32_rndpseudo_50.c,v 1.4 2019/09/26 01:32:09 christos Exp $	*/
 
 /*-
  * Copyright (c) 1997-2011 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_rndpseudo_50.c,v 1.3 2019/06/27 02:36:27 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_rndpseudo_50.c,v 1.4 2019/09/26 01:32:09 christos Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd.h"
@@ -79,7 +79,7 @@ compat32_50_rnd_ioctl(struct file *fp, u
 	{
 		rndstat_t rstbuf = {.start = 0};
 		rndstat50_32_t *rst50_32 = (rndstat50_32_t *)addr;
-		int count;
+		size_t count;
 
 		if (rst50_32->count > RND_MAXSTATCOUNT50)
 			return (EINVAL);

Index: src/sys/compat/netbsd32/netbsd32_socket.c
diff -u src/sys/compat/netbsd32/netbsd32_socket.c:1.49 src/sys/compat/netbsd32/netbsd32_socket.c:1.50
--- src/sys/compat/netbsd32/netbsd32_socket.c:1.49	Wed Nov 14 12:51:37 2018
+++ src/sys/compat/netbsd32/netbsd32_socket.c	Wed Sep 25 21:32:09 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_socket.c,v 1.49 2018/11/14 17:51:37 hannken Exp $	*/
+/*	$NetBSD: netbsd32_socket.c,v 1.50 2019/09/26 01:32:09 christos Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_socket.c,v 1.49 2018/11/14 17:51:37 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_socket.c,v 1.50 2019/09/26 01:32:09 christos Exp $");
 
 #include 
 #include 
@@ -74,11 +74,12 @@ __KERNEL_RCSID(0, "$NetBSD: netbsd32_soc
 #define CMSG32_LEN(l)	(CMSG32_ALIGN(sizeof(struct cmsghdr)) + (l))
 
 static int
-copyout32_msg_control_mbuf(struct lwp *l, struct msghdr *mp, int *len,
+copyout32_msg_control_mbuf(struct lwp *l, struct msghdr *mp, u_int *len,
 struct mbuf *m, char **q, bool *truncated)
 {
 	struct cmsghdr *cmsg, cmsg32;
-	int i, j, error;
+	size_t i, j;
+	int error;
 
 	*truncated = false;
 	cmsg = mtod(m, struct cmsghdr *);



CVS commit: src/sys/compat/netbsd32

2019-09-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Sep 26 01:32:09 UTC 2019

Modified Files:
src/sys/compat/netbsd32: netbsd32_fs.c netbsd32_rndpseudo_50.c
netbsd32_socket.c

Log Message:
use size_t for counters (which are compared and set with unsigneds)


To generate a diff of this commit:
cvs rdiff -u -r1.84 -r1.85 src/sys/compat/netbsd32/netbsd32_fs.c
cvs rdiff -u -r1.3 -r1.4 src/sys/compat/netbsd32/netbsd32_rndpseudo_50.c
cvs rdiff -u -r1.49 -r1.50 src/sys/compat/netbsd32/netbsd32_socket.c

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



CVS commit: src/sys/compat/netbsd32

2019-09-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Sep 26 01:30:46 UTC 2019

Modified Files:
src/sys/compat/netbsd32: netbsd32.h

Log Message:
accrightslen should be u_int for compat too


To generate a diff of this commit:
cvs rdiff -u -r1.125 -r1.126 src/sys/compat/netbsd32/netbsd32.h

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



CVS commit: src/sys/compat/netbsd32

2019-09-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Sep 26 01:30:46 UTC 2019

Modified Files:
src/sys/compat/netbsd32: netbsd32.h

Log Message:
accrightslen should be u_int for compat too


To generate a diff of this commit:
cvs rdiff -u -r1.125 -r1.126 src/sys/compat/netbsd32/netbsd32.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/compat/netbsd32/netbsd32.h
diff -u src/sys/compat/netbsd32/netbsd32.h:1.125 src/sys/compat/netbsd32/netbsd32.h:1.126
--- src/sys/compat/netbsd32/netbsd32.h:1.125	Wed Sep 25 17:40:42 2019
+++ src/sys/compat/netbsd32/netbsd32.h	Wed Sep 25 21:30:46 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32.h,v 1.125 2019/09/25 21:40:42 christos Exp $	*/
+/*	$NetBSD: netbsd32.h,v 1.126 2019/09/26 01:30:46 christos Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001, 2008, 2015 Matthew R. Green
@@ -738,7 +738,7 @@ struct netbsd32_omsghdr {
 	netbsd32_iovecp_t msg_iov;		/* scatter/gather array */
 	int		 msg_iovlen;		/* # elements in msg_iov */
 	netbsd32_caddr_t msg_accrights;		/* access rights sent/recvd */
-	int		 msg_accrightslen;
+	u_int		 msg_accrightslen;
 };
 
 typedef netbsd32_pointer_t netbsd32_mmsghdrp_t;



CVS commit: src/sys/compat/netbsd32

2019-09-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Sep 26 01:30:00 UTC 2019

Modified Files:
src/sys/compat/netbsd32: netbsd32_time.c

Log Message:
make the ?: expression types match


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/sys/compat/netbsd32/netbsd32_time.c

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



CVS commit: src/sys/compat/netbsd32

2019-09-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Sep 26 01:30:00 UTC 2019

Modified Files:
src/sys/compat/netbsd32: netbsd32_time.c

Log Message:
make the ?: expression types match


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/sys/compat/netbsd32/netbsd32_time.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/netbsd32/netbsd32_time.c
diff -u src/sys/compat/netbsd32/netbsd32_time.c:1.51 src/sys/compat/netbsd32/netbsd32_time.c:1.52
--- src/sys/compat/netbsd32/netbsd32_time.c:1.51	Sat Jan 26 21:08:40 2019
+++ src/sys/compat/netbsd32/netbsd32_time.c	Wed Sep 25 21:30:00 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_time.c,v 1.51 2019/01/27 02:08:40 pgoyette Exp $	*/
+/*	$NetBSD: netbsd32_time.c,v 1.52 2019/09/26 01:30:00 christos Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_time.c,v 1.51 2019/01/27 02:08:40 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_time.c,v 1.52 2019/09/26 01:30:00 christos Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_ntp.h"
@@ -534,11 +534,11 @@ netbsd32_clock_getcpuclockid2(struct lwp
 
 	switch (SCARG(uap, idtype)) {
 	case P_PID:
-		pid = id == 0 ? l->l_proc->p_pid : id;
+		pid = id == 0 ? l->l_proc->p_pid : (pid_t)id;
 		clock_id = CLOCK_PROCESS_CPUTIME_ID | pid;
 		break;
 	case P_LWPID:
-		lid = id == 0 ? l->l_lid : id;
+		lid = id == 0 ? l->l_lid : (lwpid_t)id;
 		clock_id = CLOCK_THREAD_CPUTIME_ID | lid;
 		break;
 	default:



CVS commit: src/sys/compat/sys

2019-09-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Sep 26 01:29:00 UTC 2019

Modified Files:
src/sys/compat/sys: socket.h

Log Message:
accrightslen is always used in an unsigned context so make it.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/compat/sys/socket.h

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



CVS commit: src/sys/compat/sys

2019-09-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Sep 26 01:29:00 UTC 2019

Modified Files:
src/sys/compat/sys: socket.h

Log Message:
accrightslen is always used in an unsigned context so make it.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/compat/sys/socket.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/compat/sys/socket.h
diff -u src/sys/compat/sys/socket.h:1.18 src/sys/compat/sys/socket.h:1.19
--- src/sys/compat/sys/socket.h:1.18	Thu Apr 11 00:42:08 2019
+++ src/sys/compat/sys/socket.h	Wed Sep 25 21:29:00 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: socket.h,v 1.18 2019/04/11 04:42:08 msaitoh Exp $	*/
+/*	$NetBSD: socket.h,v 1.19 2019/09/26 01:29:00 christos Exp $	*/
 
 /*
  * Copyright (c) 1982, 1985, 1986, 1988, 1993, 1994
@@ -67,7 +67,7 @@ struct omsghdr {
 	struct iovec	*msg_iov;	/* scatter/gather array */
 	int		msg_iovlen;	/* # elements in msg_iov */
 	void *		msg_accrights;	/* access rights sent/received */
-	int		msg_accrightslen;
+	u_int		msg_accrightslen;
 };
 
 /*



CVS commit: src/sys/compat/common

2019-09-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Sep 26 01:28:27 UTC 2019

Modified Files:
src/sys/compat/common: if_media_80.c rndpseudo_50.c usb_subr_30.c
vfs_syscalls_20.c

Log Message:
fix sign-compare issues.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/compat/common/if_media_80.c
cvs rdiff -u -r1.4 -r1.5 src/sys/compat/common/rndpseudo_50.c \
src/sys/compat/common/usb_subr_30.c
cvs rdiff -u -r1.42 -r1.43 src/sys/compat/common/vfs_syscalls_20.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/if_media_80.c
diff -u src/sys/compat/common/if_media_80.c:1.1 src/sys/compat/common/if_media_80.c:1.2
--- src/sys/compat/common/if_media_80.c:1.1	Fri May 17 03:37:11 2019
+++ src/sys/compat/common/if_media_80.c	Wed Sep 25 21:28:27 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_media_80.c,v 1.1 2019/05/17 07:37:11 msaitoh Exp $	*/
+/*	$NetBSD: if_media_80.c,v 1.2 2019/09/26 01:28:27 christos Exp $	*/
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -126,8 +126,8 @@ compat_ifmediareq_post(struct ifreq *ifr
 {
 	struct ifmediareq *ifmr = (struct ifmediareq *)ifr;
 	size_t minwords;
-	int count, *kptr;
-	int error;
+	size_t count;
+	int error, *kptr;
 
 	switch (cmd) {
 	case SIOCSIFMEDIA:

Index: src/sys/compat/common/rndpseudo_50.c
diff -u src/sys/compat/common/rndpseudo_50.c:1.4 src/sys/compat/common/rndpseudo_50.c:1.5
--- src/sys/compat/common/rndpseudo_50.c:1.4	Fri Mar  1 06:06:56 2019
+++ src/sys/compat/common/rndpseudo_50.c	Wed Sep 25 21:28:27 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: rndpseudo_50.c,v 1.4 2019/03/01 11:06:56 pgoyette Exp $	*/
+/*	$NetBSD: rndpseudo_50.c,v 1.5 2019/09/26 01:28:27 christos Exp $	*/
 
 /*-
  * Copyright (c) 1997-2011 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rndpseudo_50.c,v 1.4 2019/03/01 11:06:56 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rndpseudo_50.c,v 1.5 2019/09/26 01:28:27 christos Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd.h"
@@ -76,7 +76,7 @@ compat_50_rnd_ioctl(struct file *fp, u_l
 	{
 		rndstat_t rstbuf = {.start = 0};
 		rndstat50_t *rst50 = (rndstat50_t *)addr;
-		int count;
+		size_t count;
 
 		if (rst50->count > RND_MAXSTATCOUNT50)
 			return EINVAL;
Index: src/sys/compat/common/usb_subr_30.c
diff -u src/sys/compat/common/usb_subr_30.c:1.4 src/sys/compat/common/usb_subr_30.c:1.5
--- src/sys/compat/common/usb_subr_30.c:1.4	Fri Mar  1 06:06:56 2019
+++ src/sys/compat/common/usb_subr_30.c	Wed Sep 25 21:28:27 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: usb_subr_30.c,v 1.4 2019/03/01 11:06:56 pgoyette Exp $	*/
+/*	$NetBSD: usb_subr_30.c,v 1.5 2019/09/26 01:28:27 christos Exp $	*/
 /*	$FreeBSD: src/sys/dev/usb/usb_subr.c,v 1.18 1999/11/17 22:33:47 n_hibma Exp $	*/
 
 /*
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: usb_subr_30.c,v 1.4 2019/03/01 11:06:56 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usb_subr_30.c,v 1.5 2019/09/26 01:28:27 christos Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -131,7 +131,8 @@ usbd_fill_deviceinfo_old(struct usbd_dev
 int (*do_printBCD)(char *cp, size_t l, int bcd))
 {
 	struct usbd_port *p;
-	int i, j, err;
+	size_t i, j;
+	int err;
 
 	di->udi_bus = device_unit(dev->ud_bus->ub_usbctl);
 	di->udi_addr = dev->ud_addr;
@@ -171,7 +172,7 @@ usbd_fill_deviceinfo_old(struct usbd_dev
 		return 0;
 	}
 
-	const int nports = dev->ud_hub->uh_hubdesc.bNbrPorts;
+	const u_int nports = dev->ud_hub->uh_hubdesc.bNbrPorts;
 	for (i = 1; i <= __arraycount(di->udi_ports) && i <= nports;
 	 i++) {
 		p = >ud_hub->uh_ports[i - 1];

Index: src/sys/compat/common/vfs_syscalls_20.c
diff -u src/sys/compat/common/vfs_syscalls_20.c:1.42 src/sys/compat/common/vfs_syscalls_20.c:1.43
--- src/sys/compat/common/vfs_syscalls_20.c:1.42	Sun Sep 22 18:59:38 2019
+++ src/sys/compat/common/vfs_syscalls_20.c	Wed Sep 25 21:28:27 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_syscalls_20.c,v 1.42 2019/09/22 22:59:38 christos Exp $	*/
+/*	$NetBSD: vfs_syscalls_20.c,v 1.43 2019/09/26 01:28:27 christos Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993
@@ -37,7 +37,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls_20.c,v 1.42 2019/09/22 22:59:38 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls_20.c,v 1.43 2019/09/26 01:28:27 christos Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -104,7 +104,7 @@ statvfs_to_statfs12(const void *vfs, voi
 {
 	struct statfs12 ofs, *bfs = vbfs;
 	const struct statvfs *fs = vfs;
-	int i;
+	size_t i;
 	ofs.f_type = 0;
 	ofs.f_oflags = (short)fs->f_flag;
 



CVS commit: src/sys/compat/common

2019-09-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Sep 26 01:28:27 UTC 2019

Modified Files:
src/sys/compat/common: if_media_80.c rndpseudo_50.c usb_subr_30.c
vfs_syscalls_20.c

Log Message:
fix sign-compare issues.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/compat/common/if_media_80.c
cvs rdiff -u -r1.4 -r1.5 src/sys/compat/common/rndpseudo_50.c \
src/sys/compat/common/usb_subr_30.c
cvs rdiff -u -r1.42 -r1.43 src/sys/compat/common/vfs_syscalls_20.c

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



CVS commit: src/etc

2019-09-25 Thread David Brownlee
Module Name:src
Committed By:   abs
Date:   Wed Sep 25 23:09:25 UTC 2019

Modified Files:
src/etc/etc.aarch64: ttys
src/etc/etc.algor: ttys
src/etc/etc.alpha: ttys
src/etc/etc.amd64: ttys
src/etc/etc.amiga: ttys
src/etc/etc.amigappc: ttys
src/etc/etc.arc: ttys
src/etc/etc.cesfic: ttys
src/etc/etc.emips: ttys
src/etc/etc.epoc32: ttys
src/etc/etc.evbarm: ttys
src/etc/etc.evbcf: ttys
src/etc/etc.evbmips: ttys
src/etc/etc.evbppc: ttys
src/etc/etc.evbsh3: ttys
src/etc/etc.ews4800mips: ttys
src/etc/etc.hp300: ttys
src/etc/etc.hpcmips: ttys
src/etc/etc.hppa: ttys
src/etc/etc.i386: ttys
src/etc/etc.ia64: ttys
src/etc/etc.iyonix: ttys
src/etc/etc.landisk: ttys
src/etc/etc.luna68k: ttys
src/etc/etc.mipsco: ttys
src/etc/etc.mmeye: ttys
src/etc/etc.mvme68k: ttys
src/etc/etc.mvmeppc: ttys
src/etc/etc.netwinder: ttys
src/etc/etc.news68k: ttys
src/etc/etc.newsmips: ttys
src/etc/etc.next68k: ttys
src/etc/etc.or1k: ttys
src/etc/etc.playstation2: ttys
src/etc/etc.pmax: ttys
src/etc/etc.riscv: ttys
src/etc/etc.sandpoint: ttys
src/etc/etc.sbmips: ttys
src/etc/etc.sgimips: ttys
src/etc/etc.shark: ttys
src/etc/etc.sparc: ttys
src/etc/etc.sparc64: ttys
src/etc/etc.vax: ttys
src/etc/etc.zaurus: ttys

Log Message:
Switch default console tty from /dev/console to /dev/constty

With this switch processes (such as xconsole) can open /dev/console
without breaking login on the text or serial console. This can be
trivially triggered by enabling xdm in rc.conf and hitting
Ctrl+Alt+F1 or equivalent once booted.

The changes:
- Add entry for /dev/console or /dev/constty if missing
- If a port's had /dev/console 'on' switch it off and enable /dev/constty
- If a port did not have /dev/console 'on', leave /dev/constty off

Some ports had /dev/console off and /dev/ttyE0 enabled, presumably to
avoid just this issue. It may make sense to adjust these also (but not
in this pass)

As discussed on current-users


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/etc/etc.aarch64/ttys
cvs rdiff -u -r1.5 -r1.6 src/etc/etc.algor/ttys
cvs rdiff -u -r1.12 -r1.13 src/etc/etc.alpha/ttys
cvs rdiff -u -r1.6 -r1.7 src/etc/etc.amd64/ttys
cvs rdiff -u -r1.24 -r1.25 src/etc/etc.amiga/ttys
cvs rdiff -u -r1.3 -r1.4 src/etc/etc.amigappc/ttys
cvs rdiff -u -r1.8 -r1.9 src/etc/etc.arc/ttys
cvs rdiff -u -r1.5 -r1.6 src/etc/etc.cesfic/ttys
cvs rdiff -u -r1.1 -r1.2 src/etc/etc.emips/ttys
cvs rdiff -u -r1.1 -r1.2 src/etc/etc.epoc32/ttys
cvs rdiff -u -r1.7 -r1.8 src/etc/etc.evbarm/ttys
cvs rdiff -u -r1.2 -r1.3 src/etc/etc.evbcf/ttys
cvs rdiff -u -r1.6 -r1.7 src/etc/etc.evbmips/ttys
cvs rdiff -u -r1.6 -r1.7 src/etc/etc.evbppc/ttys
cvs rdiff -u -r1.6 -r1.7 src/etc/etc.evbsh3/ttys
cvs rdiff -u -r1.2 -r1.3 src/etc/etc.ews4800mips/ttys
cvs rdiff -u -r1.16 -r1.17 src/etc/etc.hp300/ttys
cvs rdiff -u -r1.11 -r1.12 src/etc/etc.hpcmips/ttys
cvs rdiff -u -r1.1 -r1.2 src/etc/etc.hppa/ttys
cvs rdiff -u -r1.20 -r1.21 src/etc/etc.i386/ttys
cvs rdiff -u -r1.1 -r1.2 src/etc/etc.ia64/ttys
cvs rdiff -u -r1.4 -r1.5 src/etc/etc.iyonix/ttys
cvs rdiff -u -r1.3 -r1.4 src/etc/etc.landisk/ttys
cvs rdiff -u -r1.8 -r1.9 src/etc/etc.luna68k/ttys
cvs rdiff -u -r1.6 -r1.7 src/etc/etc.mipsco/ttys
cvs rdiff -u -r1.7 -r1.8 src/etc/etc.mmeye/ttys
cvs rdiff -u -r1.9 -r1.10 src/etc/etc.mvme68k/ttys
cvs rdiff -u -r1.6 -r1.7 src/etc/etc.mvmeppc/ttys
cvs rdiff -u -r1.8 -r1.9 src/etc/etc.netwinder/ttys
cvs rdiff -u -r1.9 -r1.10 src/etc/etc.news68k/ttys
cvs rdiff -u -r1.9 -r1.10 src/etc/etc.newsmips/ttys
cvs rdiff -u -r1.10 -r1.11 src/etc/etc.next68k/ttys
cvs rdiff -u -r1.1 -r1.2 src/etc/etc.or1k/ttys
cvs rdiff -u -r1.6 -r1.7 src/etc/etc.playstation2/ttys
cvs rdiff -u -r1.15 -r1.16 src/etc/etc.pmax/ttys
cvs rdiff -u -r1.1 -r1.2 src/etc/etc.riscv/ttys
cvs rdiff -u -r1.7 -r1.8 src/etc/etc.sandpoint/ttys
cvs rdiff -u -r1.5 -r1.6 src/etc/etc.sbmips/ttys
cvs rdiff -u -r1.10 -r1.11 src/etc/etc.sgimips/ttys
cvs rdiff -u -r1.8 -r1.9 src/etc/etc.shark/ttys
cvs rdiff -u -r1.16 -r1.17 src/etc/etc.sparc/ttys
cvs rdiff -u -r1.11 -r1.12 src/etc/etc.sparc64/ttys
cvs rdiff -u -r1.9 -r1.10 src/etc/etc.vax/ttys
cvs rdiff -u -r1.3 -r1.4 src/etc/etc.zaurus/ttys

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



CVS commit: src/etc

2019-09-25 Thread David Brownlee
Module Name:src
Committed By:   abs
Date:   Wed Sep 25 23:09:25 UTC 2019

Modified Files:
src/etc/etc.aarch64: ttys
src/etc/etc.algor: ttys
src/etc/etc.alpha: ttys
src/etc/etc.amd64: ttys
src/etc/etc.amiga: ttys
src/etc/etc.amigappc: ttys
src/etc/etc.arc: ttys
src/etc/etc.cesfic: ttys
src/etc/etc.emips: ttys
src/etc/etc.epoc32: ttys
src/etc/etc.evbarm: ttys
src/etc/etc.evbcf: ttys
src/etc/etc.evbmips: ttys
src/etc/etc.evbppc: ttys
src/etc/etc.evbsh3: ttys
src/etc/etc.ews4800mips: ttys
src/etc/etc.hp300: ttys
src/etc/etc.hpcmips: ttys
src/etc/etc.hppa: ttys
src/etc/etc.i386: ttys
src/etc/etc.ia64: ttys
src/etc/etc.iyonix: ttys
src/etc/etc.landisk: ttys
src/etc/etc.luna68k: ttys
src/etc/etc.mipsco: ttys
src/etc/etc.mmeye: ttys
src/etc/etc.mvme68k: ttys
src/etc/etc.mvmeppc: ttys
src/etc/etc.netwinder: ttys
src/etc/etc.news68k: ttys
src/etc/etc.newsmips: ttys
src/etc/etc.next68k: ttys
src/etc/etc.or1k: ttys
src/etc/etc.playstation2: ttys
src/etc/etc.pmax: ttys
src/etc/etc.riscv: ttys
src/etc/etc.sandpoint: ttys
src/etc/etc.sbmips: ttys
src/etc/etc.sgimips: ttys
src/etc/etc.shark: ttys
src/etc/etc.sparc: ttys
src/etc/etc.sparc64: ttys
src/etc/etc.vax: ttys
src/etc/etc.zaurus: ttys

Log Message:
Switch default console tty from /dev/console to /dev/constty

With this switch processes (such as xconsole) can open /dev/console
without breaking login on the text or serial console. This can be
trivially triggered by enabling xdm in rc.conf and hitting
Ctrl+Alt+F1 or equivalent once booted.

The changes:
- Add entry for /dev/console or /dev/constty if missing
- If a port's had /dev/console 'on' switch it off and enable /dev/constty
- If a port did not have /dev/console 'on', leave /dev/constty off

Some ports had /dev/console off and /dev/ttyE0 enabled, presumably to
avoid just this issue. It may make sense to adjust these also (but not
in this pass)

As discussed on current-users


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/etc/etc.aarch64/ttys
cvs rdiff -u -r1.5 -r1.6 src/etc/etc.algor/ttys
cvs rdiff -u -r1.12 -r1.13 src/etc/etc.alpha/ttys
cvs rdiff -u -r1.6 -r1.7 src/etc/etc.amd64/ttys
cvs rdiff -u -r1.24 -r1.25 src/etc/etc.amiga/ttys
cvs rdiff -u -r1.3 -r1.4 src/etc/etc.amigappc/ttys
cvs rdiff -u -r1.8 -r1.9 src/etc/etc.arc/ttys
cvs rdiff -u -r1.5 -r1.6 src/etc/etc.cesfic/ttys
cvs rdiff -u -r1.1 -r1.2 src/etc/etc.emips/ttys
cvs rdiff -u -r1.1 -r1.2 src/etc/etc.epoc32/ttys
cvs rdiff -u -r1.7 -r1.8 src/etc/etc.evbarm/ttys
cvs rdiff -u -r1.2 -r1.3 src/etc/etc.evbcf/ttys
cvs rdiff -u -r1.6 -r1.7 src/etc/etc.evbmips/ttys
cvs rdiff -u -r1.6 -r1.7 src/etc/etc.evbppc/ttys
cvs rdiff -u -r1.6 -r1.7 src/etc/etc.evbsh3/ttys
cvs rdiff -u -r1.2 -r1.3 src/etc/etc.ews4800mips/ttys
cvs rdiff -u -r1.16 -r1.17 src/etc/etc.hp300/ttys
cvs rdiff -u -r1.11 -r1.12 src/etc/etc.hpcmips/ttys
cvs rdiff -u -r1.1 -r1.2 src/etc/etc.hppa/ttys
cvs rdiff -u -r1.20 -r1.21 src/etc/etc.i386/ttys
cvs rdiff -u -r1.1 -r1.2 src/etc/etc.ia64/ttys
cvs rdiff -u -r1.4 -r1.5 src/etc/etc.iyonix/ttys
cvs rdiff -u -r1.3 -r1.4 src/etc/etc.landisk/ttys
cvs rdiff -u -r1.8 -r1.9 src/etc/etc.luna68k/ttys
cvs rdiff -u -r1.6 -r1.7 src/etc/etc.mipsco/ttys
cvs rdiff -u -r1.7 -r1.8 src/etc/etc.mmeye/ttys
cvs rdiff -u -r1.9 -r1.10 src/etc/etc.mvme68k/ttys
cvs rdiff -u -r1.6 -r1.7 src/etc/etc.mvmeppc/ttys
cvs rdiff -u -r1.8 -r1.9 src/etc/etc.netwinder/ttys
cvs rdiff -u -r1.9 -r1.10 src/etc/etc.news68k/ttys
cvs rdiff -u -r1.9 -r1.10 src/etc/etc.newsmips/ttys
cvs rdiff -u -r1.10 -r1.11 src/etc/etc.next68k/ttys
cvs rdiff -u -r1.1 -r1.2 src/etc/etc.or1k/ttys
cvs rdiff -u -r1.6 -r1.7 src/etc/etc.playstation2/ttys
cvs rdiff -u -r1.15 -r1.16 src/etc/etc.pmax/ttys
cvs rdiff -u -r1.1 -r1.2 src/etc/etc.riscv/ttys
cvs rdiff -u -r1.7 -r1.8 src/etc/etc.sandpoint/ttys
cvs rdiff -u -r1.5 -r1.6 src/etc/etc.sbmips/ttys
cvs rdiff -u -r1.10 -r1.11 src/etc/etc.sgimips/ttys
cvs rdiff -u -r1.8 -r1.9 src/etc/etc.shark/ttys
cvs rdiff -u -r1.16 -r1.17 src/etc/etc.sparc/ttys
cvs rdiff -u -r1.11 -r1.12 src/etc/etc.sparc64/ttys
cvs rdiff -u -r1.9 -r1.10 src/etc/etc.vax/ttys
cvs rdiff -u -r1.3 -r1.4 src/etc/etc.zaurus/ttys

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

Modified files:

Index: src/etc/etc.aarch64/ttys
diff -u src/etc/etc.aarch64/ttys:1.1 src/etc/etc.aarch64/ttys:1.2
--- src/etc/etc.aarch64/ttys:1.1	Sun Aug 10 05:47:36 2014
+++ src/etc/etc.aarch64/ttys	Wed Sep 25 23:09:19 2019
@@ -1,11 +1,11 @@
-# $NetBSD: ttys,v 1.1 2014/08/10 05:47:36 matt Exp $
+# $NetBSD: ttys,v 1.2 2019/09/25 23:09:19 abs Exp $
 #
 #	from: @(#)ttys	5.1 (Berkeley) 4/17/89
 #

CVS commit: src/sys/compat/netbsd32

2019-09-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Sep 25 21:40:43 UTC 2019

Modified Files:
src/sys/compat/netbsd32: netbsd32.h

Log Message:
avoid signed-compare warning; use uintmax_t to print.


To generate a diff of this commit:
cvs rdiff -u -r1.124 -r1.125 src/sys/compat/netbsd32/netbsd32.h

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



CVS commit: src/sys/compat/netbsd32

2019-09-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Sep 25 21:40:43 UTC 2019

Modified Files:
src/sys/compat/netbsd32: netbsd32.h

Log Message:
avoid signed-compare warning; use uintmax_t to print.


To generate a diff of this commit:
cvs rdiff -u -r1.124 -r1.125 src/sys/compat/netbsd32/netbsd32.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/compat/netbsd32/netbsd32.h
diff -u src/sys/compat/netbsd32/netbsd32.h:1.124 src/sys/compat/netbsd32/netbsd32.h:1.125
--- src/sys/compat/netbsd32/netbsd32.h:1.124	Sun Sep 22 18:59:38 2019
+++ src/sys/compat/netbsd32/netbsd32.h	Wed Sep 25 17:40:42 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32.h,v 1.124 2019/09/22 22:59:38 christos Exp $	*/
+/*	$NetBSD: netbsd32.h,v 1.125 2019/09/25 21:40:42 christos Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001, 2008, 2015 Matthew R. Green
@@ -128,9 +128,9 @@ static __inline NETBSD32_POINTER_TYPE
 netbsd32_ptr32i(const void *p64)
 {
 	uintptr_t u64 = (uintptr_t)p64;
-	KASSERTMSG(u64 == (NETBSD32_POINTER_TYPE)u64, "u64 %llx != %llx",
-		   (unsigned long long)u64,
-		   (unsigned long long)(NETBSD32_POINTER_TYPE)u64);
+	KASSERTMSG(u64 == (uintptr_t)(NETBSD32_POINTER_TYPE)u64,
+	"u64 %jx != %jx", (uintmax_t)u64,
+	   (uintmax_t)(NETBSD32_POINTER_TYPE)u64);
 	return u64;
 }
 



CVS commit: src/lib/librumphijack

2019-09-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Sep 25 20:19:59 UTC 2019

Modified Files:
src/lib/librumphijack: hijack.c

Log Message:
teach hijack about the new vfs syscalls


To generate a diff of this commit:
cvs rdiff -u -r1.127 -r1.128 src/lib/librumphijack/hijack.c

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



CVS commit: src/lib/librumphijack

2019-09-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Sep 25 20:19:59 UTC 2019

Modified Files:
src/lib/librumphijack: hijack.c

Log Message:
teach hijack about the new vfs syscalls


To generate a diff of this commit:
cvs rdiff -u -r1.127 -r1.128 src/lib/librumphijack/hijack.c

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

Modified files:

Index: src/lib/librumphijack/hijack.c
diff -u src/lib/librumphijack/hijack.c:1.127 src/lib/librumphijack/hijack.c:1.128
--- src/lib/librumphijack/hijack.c:1.127	Sun Feb 17 18:35:50 2019
+++ src/lib/librumphijack/hijack.c	Wed Sep 25 16:19:59 2019
@@ -1,4 +1,4 @@
-/*  $NetBSD: hijack.c,v 1.127 2019/02/17 23:35:50 bad Exp $	*/
+/*  $NetBSD: hijack.c,v 1.128 2019/09/25 20:19:59 christos Exp $	*/
 
 /*-
  * Copyright (c) 2011 Antti Kantee.  All Rights Reserved.
@@ -34,7 +34,7 @@
 #include 
 
 #if !defined(lint)
-__RCSID("$NetBSD: hijack.c,v 1.127 2019/02/17 23:35:50 bad Exp $");
+__RCSID("$NetBSD: hijack.c,v 1.128 2019/09/25 20:19:59 christos Exp $");
 #endif
 
 #include 
@@ -216,7 +216,17 @@ enum dualcall {
 #define REALMOUNT __mount50
 #define REALGETFH __getfh30
 #define REALFHOPEN __fhopen40
+#if !__NetBSD_Prereq__(9,99,13)
+#define REALSTATVFS1 statvfs1
+#define REALFSTATVFS1 fstatvfs1
+#define REALGETVFSSTAT getvfsstat
 #define REALFHSTATVFS1 __fhstatvfs140
+#else
+#define REALSTATVFS1 __statvfs190
+#define REALFSTATVFS1 __fstatvfs190
+#define REALGETVFSSTAT __getvfsstat90
+#define REALFHSTATVFS1 __fhstatvfs190
+#endif
 #define REALSOCKET __socket30
 
 #define LSEEK_ALIAS _lseek
@@ -264,7 +274,10 @@ int REALMOUNT(const char *, const char *
 int REALGETFH(const char *, void *, size_t *);
 int REALFHOPEN(const void *, size_t, int);
 int REALFHSTAT(const void *, size_t, struct stat *);
+int REALSTATVFS1(const char *, struct statvfs *, int);
+int REALFSTATVFS1(int, struct statvfs *, int);
 int REALFHSTATVFS1(const void *, size_t, struct statvfs *, int);
+int REALGETVFSSTAT(struct statvfs *, size_t, int);
 int REALSOCKET(int, int, int);
 
 #define S(a) __STRING(a)
@@ -365,9 +378,9 @@ struct sysnames {
 #endif
 
 #ifdef __NetBSD__
-	{ DUALCALL_STATVFS1,	"statvfs1",	RSYS_NAME(STATVFS1)	},
-	{ DUALCALL_FSTATVFS1,	"fstatvfs1",	RSYS_NAME(FSTATVFS1)	},
-	{ DUALCALL_GETVFSSTAT,	"getvfsstat",	RSYS_NAME(GETVFSSTAT)	},
+	{ DUALCALL_STATVFS1,	S(REALSTATVFS1),RSYS_NAME(STATVFS1)	},
+	{ DUALCALL_FSTATVFS1,	S(REALFSTATVFS1),RSYS_NAME(FSTATVFS1)	},
+	{ DUALCALL_GETVFSSTAT,	S(REALGETVFSSTAT),RSYS_NAME(GETVFSSTAT)	},
 #endif
 
 #ifdef __NetBSD__
@@ -2497,7 +2510,7 @@ FDCALL(int, REALFSTAT, DUALCALL_FSTAT,		
 #endif
 
 #ifdef __NetBSD__
-FDCALL(int, fstatvfs1, DUALCALL_FSTATVFS1,\
+FDCALL(int, REALFSTATVFS1, DUALCALL_FSTATVFS1,\
 	(int fd, struct statvfs *buf, int flags),			\
 	(int, struct statvfs *, int),	\
 	(fd, buf, flags))
@@ -2599,7 +2612,7 @@ PATHCALL(int, lchmod, DUALCALL_LCHMOD,		
 	(path, mode))
 
 #ifdef __NetBSD__
-PATHCALL(int, statvfs1, DUALCALL_STATVFS1,\
+PATHCALL(int, REALSTATVFS1, DUALCALL_STATVFS1,\
 	(const char *path, struct statvfs *buf, int flags),		\
 	(const char *, struct statvfs *, int),\
 	(path, buf, flags))
@@ -2728,7 +2741,7 @@ PATHCALL(int, REALGETFH, DUALCALL_GETFH,
  */
 
 #ifdef __NetBSD__
-VFSCALL(VFSBIT_GETVFSSTAT, int, getvfsstat, DUALCALL_GETVFSSTAT,	\
+VFSCALL(VFSBIT_GETVFSSTAT, int, REALGETVFSSTAT, DUALCALL_GETVFSSTAT,	\
 	(struct statvfs *buf, size_t buflen, int flags),		\
 	(struct statvfs *, size_t, int),\
 	(buf, buflen, flags))



CVS commit: src/share/misc

2019-09-25 Thread Sevan Janiyan
Module Name:src
Committed By:   sevan
Date:   Wed Sep 25 20:17:59 UTC 2019

Modified Files:
src/share/misc: acronyms.comp

Log Message:
SDR


To generate a diff of this commit:
cvs rdiff -u -r1.290 -r1.291 src/share/misc/acronyms.comp

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



CVS commit: src/share/misc

2019-09-25 Thread Sevan Janiyan
Module Name:src
Committed By:   sevan
Date:   Wed Sep 25 20:17:59 UTC 2019

Modified Files:
src/share/misc: acronyms.comp

Log Message:
SDR


To generate a diff of this commit:
cvs rdiff -u -r1.290 -r1.291 src/share/misc/acronyms.comp

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

Modified files:

Index: src/share/misc/acronyms.comp
diff -u src/share/misc/acronyms.comp:1.290 src/share/misc/acronyms.comp:1.291
--- src/share/misc/acronyms.comp:1.290	Mon Sep  9 18:11:20 2019
+++ src/share/misc/acronyms.comp	Wed Sep 25 20:17:59 2019
@@ -1,4 +1,4 @@
-$NetBSD: acronyms.comp,v 1.290 2019/09/09 18:11:20 sevan Exp $
+$NetBSD: acronyms.comp,v 1.291 2019/09/25 20:17:59 sevan Exp $
 3WHS	three-way handshake
 8VSB	8-state vestigial side band modulation
 AA	anti-aliasing
@@ -1406,6 +1406,7 @@ SDL	Simple Direct-media Layer 
 SDLC	{software,system,systems} development life cycle
 SDN	software defined networking
 SDP	Session Description Protocol
+SDR	software defined radio
 SDRAM	synchronous dynamic random access memory
 SDS	software defined storage
 SDT	syntax-directed translation



CVS commit: src/sys/netinet

2019-09-25 Thread John Nemeth
Module Name:src
Committed By:   jnemeth
Date:   Wed Sep 25 19:06:30 UTC 2019

Modified Files:
src/sys/netinet: tcp_input.c

Log Message:
PR/54572 - Edgar Fu� -- error in comment


To generate a diff of this commit:
cvs rdiff -u -r1.415 -r1.416 src/sys/netinet/tcp_input.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/netinet/tcp_input.c
diff -u src/sys/netinet/tcp_input.c:1.415 src/sys/netinet/tcp_input.c:1.416
--- src/sys/netinet/tcp_input.c:1.415	Tue Aug  6 15:48:18 2019
+++ src/sys/netinet/tcp_input.c	Wed Sep 25 19:06:30 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: tcp_input.c,v 1.415 2019/08/06 15:48:18 riastradh Exp $	*/
+/*	$NetBSD: tcp_input.c,v 1.416 2019/09/25 19:06:30 jnemeth Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -148,7 +148,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tcp_input.c,v 1.415 2019/08/06 15:48:18 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tcp_input.c,v 1.416 2019/09/25 19:06:30 jnemeth Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -2405,8 +2405,8 @@ after_listen:
 
 	/*
 	 * Since we've covered the SYN-SENT and SYN-RECEIVED states above
-	 * we must be in a synchronized state.  RFC791 states (under RST
-	 * generation) that any unacceptable segment (an out-of-order SYN
+	 * we must be in a synchronized state.  RFC793 states (under Reset
+	 * Generation) that any unacceptable segment (an out-of-order SYN
 	 * qualifies) received in a synchronized state must elicit only an
 	 * empty acknowledgment segment ... and the connection remains in
 	 * the same state.



CVS commit: src/sys/netinet

2019-09-25 Thread John Nemeth
Module Name:src
Committed By:   jnemeth
Date:   Wed Sep 25 19:06:30 UTC 2019

Modified Files:
src/sys/netinet: tcp_input.c

Log Message:
PR/54572 - Edgar Fu� -- error in comment


To generate a diff of this commit:
cvs rdiff -u -r1.415 -r1.416 src/sys/netinet/tcp_input.c

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



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

2019-09-25 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Sep 25 18:05:39 UTC 2019

Modified Files:
src/sys/arch/arm/broadcom: bcm2835reg.h

Log Message:
Add BCM2838_{PERIPHERALS,ARM_LOCAL}_BASE and support macros


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/arm/broadcom/bcm2835reg.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/arm/broadcom/bcm2835reg.h
diff -u src/sys/arch/arm/broadcom/bcm2835reg.h:1.24 src/sys/arch/arm/broadcom/bcm2835reg.h:1.25
--- src/sys/arch/arm/broadcom/bcm2835reg.h:1.24	Wed Sep 25 18:01:03 2019
+++ src/sys/arch/arm/broadcom/bcm2835reg.h	Wed Sep 25 18:05:39 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: bcm2835reg.h,v 1.24 2019/09/25 18:01:03 skrll Exp $	*/
+/*	$NetBSD: bcm2835reg.h,v 1.25 2019/09/25 18:05:39 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -44,11 +44,17 @@
 #error Must define SOC_BCM2835 or SOC_BCM2836, and not both
 #endif
 
+#define	BCM2838_PERIPHERALS_BASE	0xfe00
 #define	BCM2836_PERIPHERALS_BASE	0x3f00
 #define	BCM2835_PERIPHERALS_BASE	0x2000
 #define	BCM283X_PERIPHERALS_SIZE	0x0100	/* 16MBytes */
 #define	BCM283X_PERIPHERALS_BASE_BUS	0x7e00
 
+#define	BCM2838_PERIPHERALS_PHYS_TO_BUS(a) \
+((a) - BCM2838_PERIPHERALS_BASE + BCM283X_PERIPHERALS_BASE_BUS)
+#define	BCM2838_PERIPHERALS_BUS_TO_PHYS(a) \
+((a) - BCM283X_PERIPHERALS_BASE_BUS + BCM2838_PERIPHERALS_BASE)
+
 #define	BCM2836_PERIPHERALS_PHYS_TO_BUS(a) \
 ((a) - BCM2836_PERIPHERALS_BASE + BCM283X_PERIPHERALS_BASE_BUS)
 #define	BCM2836_PERIPHERALS_BUS_TO_PHYS(a) \
@@ -206,6 +212,9 @@
 
 #define	BCM2835_UART0_CLK		300
 
+#define	BCM2838_ARM_LOCAL_BASE		0xff80
+#define	BCM2838_ARM_LOCAL_SIZE		0x0010	/* 1MByte */
+
 #define	BCM2836_ARM_LOCAL_BASE		0x4000
 #define	BCM2836_ARM_LOCAL_SIZE		0x1000	/* 4KBytes */
 



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

2019-09-25 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Sep 25 18:05:39 UTC 2019

Modified Files:
src/sys/arch/arm/broadcom: bcm2835reg.h

Log Message:
Add BCM2838_{PERIPHERALS,ARM_LOCAL}_BASE and support macros


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/arm/broadcom/bcm2835reg.h

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



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

2019-09-25 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Sep 25 18:01:03 UTC 2019

Modified Files:
src/sys/arch/arm/broadcom: bcm2835reg.h bcm283x_platform.c

Log Message:
s/2835/283X/ in BCM2835_PERIPHERALS_BASE_BUS and BCM2835_PERIPHERALS_SIZE
to show they cover all of 283[5678]

NFCI


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/arm/broadcom/bcm2835reg.h \
src/sys/arch/arm/broadcom/bcm283x_platform.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/broadcom/bcm2835reg.h
diff -u src/sys/arch/arm/broadcom/bcm2835reg.h:1.23 src/sys/arch/arm/broadcom/bcm2835reg.h:1.24
--- src/sys/arch/arm/broadcom/bcm2835reg.h:1.23	Mon Sep 10 11:05:12 2018
+++ src/sys/arch/arm/broadcom/bcm2835reg.h	Wed Sep 25 18:01:03 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: bcm2835reg.h,v 1.23 2018/09/10 11:05:12 ryo Exp $	*/
+/*	$NetBSD: bcm2835reg.h,v 1.24 2019/09/25 18:01:03 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -46,40 +46,40 @@
 
 #define	BCM2836_PERIPHERALS_BASE	0x3f00
 #define	BCM2835_PERIPHERALS_BASE	0x2000
-#define	BCM2835_PERIPHERALS_SIZE	0x0100	/* 16MBytes */
-#define	BCM2835_PERIPHERALS_BASE_BUS	0x7e00
+#define	BCM283X_PERIPHERALS_SIZE	0x0100	/* 16MBytes */
+#define	BCM283X_PERIPHERALS_BASE_BUS	0x7e00
 
 #define	BCM2836_PERIPHERALS_PHYS_TO_BUS(a) \
-((a) - BCM2836_PERIPHERALS_BASE + BCM2835_PERIPHERALS_BASE_BUS)
+((a) - BCM2836_PERIPHERALS_BASE + BCM283X_PERIPHERALS_BASE_BUS)
 #define	BCM2836_PERIPHERALS_BUS_TO_PHYS(a) \
-((a) - BCM2835_PERIPHERALS_BASE_BUS + BCM2836_PERIPHERALS_BASE)
+((a) - BCM283X_PERIPHERALS_BASE_BUS + BCM2836_PERIPHERALS_BASE)
 
 #define	BCM2835_PERIPHERALS_PHYS_TO_BUS(a) \
-((a) - BCM2835_PERIPHERALS_BASE + BCM2835_PERIPHERALS_BASE_BUS)
+((a) - BCM2835_PERIPHERALS_BASE + BCM283X_PERIPHERALS_BASE_BUS)
 #define	BCM2835_PERIPHERALS_BUS_TO_PHYS(a) \
-((a) - BCM2835_PERIPHERALS_BASE_BUS + BCM2835_PERIPHERALS_BASE)
+((a) - BCM283X_PERIPHERALS_BASE_BUS + BCM2835_PERIPHERALS_BASE)
 
-#define	BCM2835_STIMER_BASE	(BCM2835_PERIPHERALS_BASE_BUS + 0x3000)
-#define	BCM2835_DMA0_BASE	(BCM2835_PERIPHERALS_BASE_BUS + 0x7000)
-#define	BCM2835_ARM_BASE	(BCM2835_PERIPHERALS_BASE_BUS + 0xB000)
-#define	BCM2835_PM_BASE		(BCM2835_PERIPHERALS_BASE_BUS + 0x0010)
-#define	BCM2835_CM_BASE  	(BCM2835_PERIPHERALS_BASE_BUS + 0x00101000)
-#define	BCM2835_RNG_BASE	(BCM2835_PERIPHERALS_BASE_BUS + 0x00104000)
-#define	BCM2835_GPIO_BASE	(BCM2835_PERIPHERALS_BASE_BUS + 0x0020)
-#define	BCM2835_UART0_BASE	(BCM2835_PERIPHERALS_BASE_BUS + 0x00201000)
-#define	BCM2835_SDHOST_BASE	(BCM2835_PERIPHERALS_BASE_BUS + 0x00202000)
-#define	BCM2835_PCM_BASE	(BCM2835_PERIPHERALS_BASE_BUS + 0x00203000)
-#define	BCM2835_SPI0_BASE	(BCM2835_PERIPHERALS_BASE_BUS + 0x00204000)
-#define	BCM2835_BSC0_BASE	(BCM2835_PERIPHERALS_BASE_BUS + 0x00205000)
-#define	BCM2835_PWM_BASE	(BCM2835_PERIPHERALS_BASE_BUS + 0x0020C000)
-#define	BCM2835_BSCSPISLV_BASE	(BCM2835_PERIPHERALS_BASE_BUS + 0x00214000)
-#define	BCM2835_AUX_BASE	(BCM2835_PERIPHERALS_BASE_BUS + 0x00215000)
-#define	BCM2835_AUX_UART_BASE	(BCM2835_PERIPHERALS_BASE_BUS + 0x00215040)
-#define	BCM2835_EMMC_BASE	(BCM2835_PERIPHERALS_BASE_BUS + 0x0030)
-#define	BCM2835_BSC1_BASE	(BCM2835_PERIPHERALS_BASE_BUS + 0x00804000)
-#define	BCM2835_BSC2_BASE	(BCM2835_PERIPHERALS_BASE_BUS + 0x00805000)
-#define	BCM2835_USB_BASE	(BCM2835_PERIPHERALS_BASE_BUS + 0x0098)
-#define	BCM2835_DMA15_BASE	(BCM2835_PERIPHERALS_BASE_BUS + 0x00E05000)
+#define	BCM2835_STIMER_BASE	(BCM283X_PERIPHERALS_BASE_BUS + 0x3000)
+#define	BCM2835_DMA0_BASE	(BCM283X_PERIPHERALS_BASE_BUS + 0x7000)
+#define	BCM2835_ARM_BASE	(BCM283X_PERIPHERALS_BASE_BUS + 0xB000)
+#define	BCM2835_PM_BASE		(BCM283X_PERIPHERALS_BASE_BUS + 0x0010)
+#define	BCM2835_CM_BASE  	(BCM283X_PERIPHERALS_BASE_BUS + 0x00101000)
+#define	BCM2835_RNG_BASE	(BCM283X_PERIPHERALS_BASE_BUS + 0x00104000)
+#define	BCM2835_GPIO_BASE	(BCM283X_PERIPHERALS_BASE_BUS + 0x0020)
+#define	BCM2835_UART0_BASE	(BCM283X_PERIPHERALS_BASE_BUS + 0x00201000)
+#define	BCM2835_SDHOST_BASE	(BCM283X_PERIPHERALS_BASE_BUS + 0x00202000)
+#define	BCM2835_PCM_BASE	(BCM283X_PERIPHERALS_BASE_BUS + 0x00203000)
+#define	BCM2835_SPI0_BASE	(BCM283X_PERIPHERALS_BASE_BUS + 0x00204000)
+#define	BCM2835_BSC0_BASE	(BCM283X_PERIPHERALS_BASE_BUS + 0x00205000)
+#define	BCM2835_PWM_BASE	(BCM283X_PERIPHERALS_BASE_BUS + 0x0020C000)
+#define	BCM2835_BSCSPISLV_BASE	(BCM283X_PERIPHERALS_BASE_BUS + 0x00214000)
+#define	BCM2835_AUX_BASE	(BCM283X_PERIPHERALS_BASE_BUS + 0x00215000)
+#define	BCM2835_AUX_UART_BASE	(BCM283X_PERIPHERALS_BASE_BUS + 0x00215040)
+#define	BCM2835_EMMC_BASE	(BCM283X_PERIPHERALS_BASE_BUS + 0x0030)
+#define	BCM2835_BSC1_BASE	(BCM283X_PERIPHERALS_BASE_BUS + 0x00804000)
+#define	BCM2835_BSC2_BASE	(BCM283X_PERIPHERALS_BASE_BUS + 

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

2019-09-25 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Sep 25 18:01:03 UTC 2019

Modified Files:
src/sys/arch/arm/broadcom: bcm2835reg.h bcm283x_platform.c

Log Message:
s/2835/283X/ in BCM2835_PERIPHERALS_BASE_BUS and BCM2835_PERIPHERALS_SIZE
to show they cover all of 283[5678]

NFCI


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/arm/broadcom/bcm2835reg.h \
src/sys/arch/arm/broadcom/bcm283x_platform.c

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



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

2019-09-25 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Sep 25 16:57:11 UTC 2019

Modified Files:
src/sys/arch/arm/broadcom: bcm2835_intr.c

Log Message:
Sprinkle KASSERTs


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/arm/broadcom/bcm2835_intr.c

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



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

2019-09-25 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Sep 25 16:57:11 UTC 2019

Modified Files:
src/sys/arch/arm/broadcom: bcm2835_intr.c

Log Message:
Sprinkle KASSERTs


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/arm/broadcom/bcm2835_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/arm/broadcom/bcm2835_intr.c
diff -u src/sys/arch/arm/broadcom/bcm2835_intr.c:1.23 src/sys/arch/arm/broadcom/bcm2835_intr.c:1.24
--- src/sys/arch/arm/broadcom/bcm2835_intr.c:1.23	Wed Sep 25 16:50:28 2019
+++ src/sys/arch/arm/broadcom/bcm2835_intr.c	Wed Sep 25 16:57:10 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: bcm2835_intr.c,v 1.23 2019/09/25 16:50:28 skrll Exp $	*/
+/*	$NetBSD: bcm2835_intr.c,v 1.24 2019/09/25 16:57:10 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2012, 2015 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: bcm2835_intr.c,v 1.23 2019/09/25 16:50:28 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bcm2835_intr.c,v 1.24 2019/09/25 16:57:10 skrll Exp $");
 
 #define _INTR_PRIVATE
 
@@ -309,6 +309,8 @@ bcm2835_irq_handler(void *frame)
 	const uint32_t oldipl_mask = __BIT(oldipl);
 	int ipl_mask = 0;
 
+	KASSERT(cpuid < BCM2836_NCPUS);
+
 	ci->ci_data.cpu_nintr++;
 
 	bcm2835_barrier();
@@ -479,6 +481,7 @@ bcm2836mp_pic_unblock_irqs(struct pic_so
 	const bus_space_handle_t ioh = bcml1icu_sc->sc_ioh;
 	const cpuid_t cpuid = pic - _pic[0];
 
+	KASSERT(cpuid < BCM2836_NCPUS);
 	KASSERT(irqbase == 0);
 
 	if (irq_mask & BCM2836MP_TIMER_IRQS) {
@@ -525,6 +528,7 @@ bcm2836mp_pic_block_irqs(struct pic_soft
 	const bus_space_handle_t ioh = bcml1icu_sc->sc_ioh;
 	const cpuid_t cpuid = pic - _pic[0];
 
+	KASSERT(cpuid < BCM2836_NCPUS);
 	KASSERT(irqbase == 0);
 
 	if (irq_mask & BCM2836MP_TIMER_IRQS) {
@@ -562,6 +566,7 @@ bcm2836mp_pic_find_pending_irqs(struct p
 	uint32_t lpending;
 	int ipl = 0;
 
+	KASSERT(cpuid < BCM2836_NCPUS);
 	KASSERT(pic == _pic[cpuid]);
 
 	bcm2835_barrier();
@@ -598,10 +603,13 @@ bcm2836mp_pic_source_name(struct pic_sof
 #if defined(MULTIPROCESSOR)
 static void bcm2836mp_cpu_init(struct pic_softc *pic, struct cpu_info *ci)
 {
+	const cpuid_t cpuid = ci->ci_core_id;
+
+	KASSERT(cpuid < BCM2836_NCPUS);
 
 	/* Enable IRQ and not FIQ */
 	bus_space_write_4(bcml1icu_sc->sc_iot, bcml1icu_sc->sc_ioh,
-	BCM2836_LOCAL_MAILBOX_IRQ_CONTROLN(ci->ci_core_id), 1);
+	BCM2836_LOCAL_MAILBOX_IRQ_CONTROLN(cpuid), 1);
 }
 
 static void
@@ -612,6 +620,7 @@ bcm2836mp_send_ipi(struct pic_softc *pic
 	KASSERT(pic->pic_cpus != NULL);
 
 	const cpuid_t cpuid = pic - _pic[0];
+	KASSERT(cpuid < BCM2836_NCPUS);
 
 	bus_space_write_4(bcml1icu_sc->sc_iot, bcml1icu_sc->sc_ioh,
 	BCM2836_LOCAL_MAILBOX0_SETN(cpuid), __BIT(ipi));
@@ -624,6 +633,8 @@ bcm2836mp_ipi_handler(void *priv)
 	const cpuid_t cpuid = ci->ci_core_id;
 	uint32_t ipimask, bit;
 
+	KASSERT(cpuid < BCM2836_NCPUS);
+
 	ipimask = bus_space_read_4(bcml1icu_sc->sc_iot, bcml1icu_sc->sc_ioh,
 	BCM2836_LOCAL_MAILBOX0_CLRN(cpuid));
 	bus_space_write_4(bcml1icu_sc->sc_iot, bcml1icu_sc->sc_ioh,
@@ -671,6 +682,8 @@ bcm2836mp_intr_init(void *priv, struct c
 	const cpuid_t cpuid = ci->ci_core_id;
 	struct pic_softc * const pic = _pic[cpuid];
 
+	KASSERT(cpuid < BCM2836_NCPUS);
+
 #if defined(MULTIPROCESSOR)
 	pic->pic_cpus = ci->ci_kcpuset;
 



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

2019-09-25 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Sep 25 16:50:28 UTC 2019

Modified Files:
src/sys/arch/arm/broadcom: bcm2835_intr.c

Log Message:
Sprinkle static


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/arm/broadcom/bcm2835_intr.c

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



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

2019-09-25 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Sep 25 16:50:28 UTC 2019

Modified Files:
src/sys/arch/arm/broadcom: bcm2835_intr.c

Log Message:
Sprinkle static


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/arm/broadcom/bcm2835_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/arm/broadcom/bcm2835_intr.c
diff -u src/sys/arch/arm/broadcom/bcm2835_intr.c:1.22 src/sys/arch/arm/broadcom/bcm2835_intr.c:1.23
--- src/sys/arch/arm/broadcom/bcm2835_intr.c:1.22	Wed Sep 25 16:49:37 2019
+++ src/sys/arch/arm/broadcom/bcm2835_intr.c	Wed Sep 25 16:50:28 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: bcm2835_intr.c,v 1.22 2019/09/25 16:49:37 skrll Exp $	*/
+/*	$NetBSD: bcm2835_intr.c,v 1.23 2019/09/25 16:50:28 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2012, 2015 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: bcm2835_intr.c,v 1.22 2019/09/25 16:49:37 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bcm2835_intr.c,v 1.23 2019/09/25 16:50:28 skrll Exp $");
 
 #define _INTR_PRIVATE
 
@@ -170,8 +170,8 @@ struct bcm2835icu_softc {
 	int sc_phandle;
 };
 
-struct bcm2835icu_softc *bcml1icu_sc;
-struct bcm2835icu_softc *bcmicu_sc;
+static struct bcm2835icu_softc *bcml1icu_sc;
+static struct bcm2835icu_softc *bcmicu_sc;
 
 #define read_bcm2835reg(o)	\
 	bus_space_read_4(bcmicu_sc->sc_iot, bcmicu_sc->sc_ioh, (o))



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

2019-09-25 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Sep 25 16:49:37 UTC 2019

Modified Files:
src/sys/arch/arm/broadcom: bcm2835_intr.c

Log Message:
KNF


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/arm/broadcom/bcm2835_intr.c

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



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

2019-09-25 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Sep 25 16:49:37 UTC 2019

Modified Files:
src/sys/arch/arm/broadcom: bcm2835_intr.c

Log Message:
KNF


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/arm/broadcom/bcm2835_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/arm/broadcom/bcm2835_intr.c
diff -u src/sys/arch/arm/broadcom/bcm2835_intr.c:1.21 src/sys/arch/arm/broadcom/bcm2835_intr.c:1.22
--- src/sys/arch/arm/broadcom/bcm2835_intr.c:1.21	Wed Sep 25 16:48:06 2019
+++ src/sys/arch/arm/broadcom/bcm2835_intr.c	Wed Sep 25 16:49:37 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: bcm2835_intr.c,v 1.21 2019/09/25 16:48:06 skrll Exp $	*/
+/*	$NetBSD: bcm2835_intr.c,v 1.22 2019/09/25 16:49:37 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2012, 2015 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: bcm2835_intr.c,v 1.21 2019/09/25 16:48:06 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bcm2835_intr.c,v 1.22 2019/09/25 16:49:37 skrll Exp $");
 
 #define _INTR_PRIVATE
 
@@ -705,6 +705,7 @@ bcm2836mp_intr_init(void *priv, struct c
 static int
 bcm2836mp_icu_fdt_decode_irq(u_int *specifier)
 {
+
 	if (!specifier)
 		return -1;
 	return be32toh(specifier[0]);



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

2019-09-25 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Sep 25 16:48:06 UTC 2019

Modified Files:
src/sys/arch/arm/broadcom: bcm2835_intr.c

Log Message:
Whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/arm/broadcom/bcm2835_intr.c

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



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

2019-09-25 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Sep 25 16:48:06 UTC 2019

Modified Files:
src/sys/arch/arm/broadcom: bcm2835_intr.c

Log Message:
Whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/arm/broadcom/bcm2835_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/arm/broadcom/bcm2835_intr.c
diff -u src/sys/arch/arm/broadcom/bcm2835_intr.c:1.20 src/sys/arch/arm/broadcom/bcm2835_intr.c:1.21
--- src/sys/arch/arm/broadcom/bcm2835_intr.c:1.20	Wed Mar 27 05:47:50 2019
+++ src/sys/arch/arm/broadcom/bcm2835_intr.c	Wed Sep 25 16:48:06 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: bcm2835_intr.c,v 1.20 2019/03/27 05:47:50 ryo Exp $	*/
+/*	$NetBSD: bcm2835_intr.c,v 1.21 2019/09/25 16:48:06 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2012, 2015 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: bcm2835_intr.c,v 1.20 2019/03/27 05:47:50 ryo Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bcm2835_intr.c,v 1.21 2019/09/25 16:48:06 skrll Exp $");
 
 #define _INTR_PRIVATE
 
@@ -547,7 +547,7 @@ bcm2836mp_pic_block_irqs(struct pic_soft
 	}
 	if (irq_mask & BCM2836MP_PMU_IRQ) {
 		bus_space_write_4(iot, ioh, BCM2836_LOCAL_PM_ROUTING_CLR,
-		 __BIT(cpuid));
+		__BIT(cpuid));
 	}
 
 	bcm2835_barrier();



CVS commit: src/sys/rump/librump/rumpvfs

2019-09-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Sep 25 16:44:42 UTC 2019

Modified Files:
src/sys/rump/librump/rumpvfs: rumpvfs_syscalls.c

Log Message:
Regen


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/rump/librump/rumpvfs/rumpvfs_syscalls.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/rump/librump/rumpvfs/rumpvfs_syscalls.c
diff -u src/sys/rump/librump/rumpvfs/rumpvfs_syscalls.c:1.6 src/sys/rump/librump/rumpvfs/rumpvfs_syscalls.c:1.7
--- src/sys/rump/librump/rumpvfs/rumpvfs_syscalls.c:1.6	Sun Sep 22 19:03:21 2019
+++ src/sys/rump/librump/rumpvfs/rumpvfs_syscalls.c	Wed Sep 25 12:44:42 2019
@@ -1,9 +1,9 @@
-/*	$NetBSD: rumpvfs_syscalls.c,v 1.6 2019/09/22 23:03:21 christos Exp $	*/
+/*	$NetBSD: rumpvfs_syscalls.c,v 1.7 2019/09/25 16:44:42 christos Exp $	*/
 
 /* AUTOMATICALLY GENERATED BY makerumpsyscalls.sh */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rumpvfs_syscalls.c,v 1.6 2019/09/22 23:03:21 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rumpvfs_syscalls.c,v 1.7 2019/09/25 16:44:42 christos Exp $");
 
 #include 
 
@@ -107,6 +107,10 @@ extern sy_call_t sys_futimens;
 extern sy_call_t sys___quotactl;
 extern sy_call_t sys_posix_fallocate;
 extern sy_call_t sys_fdiscard;
+extern sy_call_t sys___getvfsstat90;
+extern sy_call_t sys___statvfs190;
+extern sy_call_t sys___fstatvfs190;
+extern sy_call_t sys___fhstatvfs190;
 
 static const struct rump_onesyscall mysys[] = {
 	{ 5,	sys_open },
@@ -207,6 +211,10 @@ static const struct rump_onesyscall mysy
 	{ 473,	sys___quotactl },
 	{ 479,	sys_posix_fallocate },
 	{ 480,	sys_fdiscard },
+	{ 483,	sys___getvfsstat90 },
+	{ 484,	sys___statvfs190 },
+	{ 485,	sys___fstatvfs190 },
+	{ 486,	sys___fhstatvfs190 },
 };
 
 RUMP_COMPONENT(RUMP_COMPONENT_SYSCALL)



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

2019-09-25 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Sep 25 16:37:54 UTC 2019

Modified Files:
src/sys/arch/arm/arm32: pmap.c

Log Message:
Convert a __CTASSERT into a KASSERT as L1_S_CACHE_MASK may not be a
compile time constant if ARM_NMMUS > 1


To generate a diff of this commit:
cvs rdiff -u -r1.373 -r1.374 src/sys/arch/arm/arm32/pmap.c

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

Modified files:

Index: src/sys/arch/arm/arm32/pmap.c
diff -u src/sys/arch/arm/arm32/pmap.c:1.373 src/sys/arch/arm/arm32/pmap.c:1.374
--- src/sys/arch/arm/arm32/pmap.c:1.373	Tue Apr 23 11:21:21 2019
+++ src/sys/arch/arm/arm32/pmap.c	Wed Sep 25 16:37:54 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.373 2019/04/23 11:21:21 bouyer Exp $	*/
+/*	$NetBSD: pmap.c,v 1.374 2019/09/25 16:37:54 skrll Exp $	*/
 
 /*
  * Copyright 2003 Wasabi Systems, Inc.
@@ -221,7 +221,7 @@
 #include 
 #endif
 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.373 2019/04/23 11:21:21 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.374 2019/09/25 16:37:54 skrll Exp $");
 
 //#define PMAP_DEBUG
 #ifdef PMAP_DEBUG
@@ -6406,7 +6406,7 @@ pmap_set_pt_cache_mode(pd_entry_t *kl1, 
 		pd_entry_t pde = *pdep;
 
 		if (l1pte_section_p(pde)) {
-			__CTASSERT((L1_S_CACHE_MASK & L1_S_V6_SUPER) == 0);
+			KASSERT((L1_S_CACHE_MASK & L1_S_V6_SUPER) == 0);
 			if ((pde & L1_S_CACHE_MASK) != pte_l1_s_cache_mode_pt) {
 *pdep = (pde & ~L1_S_CACHE_MASK) |
 pte_l1_s_cache_mode_pt;



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

2019-09-25 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Sep 25 16:37:54 UTC 2019

Modified Files:
src/sys/arch/arm/arm32: pmap.c

Log Message:
Convert a __CTASSERT into a KASSERT as L1_S_CACHE_MASK may not be a
compile time constant if ARM_NMMUS > 1


To generate a diff of this commit:
cvs rdiff -u -r1.373 -r1.374 src/sys/arch/arm/arm32/pmap.c

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



CVS commit: src/sys/dev/sdmmc

2019-09-25 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Wed Sep 25 16:21:14 UTC 2019

Modified Files:
src/sys/dev/sdmmc: if_bwfm_sdio.c

Log Message:
Use correct function to verify if a task has been queued. Avoids race
that can corrupt the task queue.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/sdmmc/if_bwfm_sdio.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/sdmmc/if_bwfm_sdio.c
diff -u src/sys/dev/sdmmc/if_bwfm_sdio.c:1.5 src/sys/dev/sdmmc/if_bwfm_sdio.c:1.6
--- src/sys/dev/sdmmc/if_bwfm_sdio.c:1.5	Fri Sep 13 11:21:03 2019
+++ src/sys/dev/sdmmc/if_bwfm_sdio.c	Wed Sep 25 16:21:14 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: if_bwfm_sdio.c,v 1.5 2019/09/13 11:21:03 mlelstv Exp $ */
+/* $NetBSD: if_bwfm_sdio.c,v 1.6 2019/09/25 16:21:14 mlelstv Exp $ */
 /* $OpenBSD: if_bwfm_sdio.c,v 1.1 2017/10/11 17:19:50 patrick Exp $ */
 /*
  * Copyright (c) 2010-2016 Broadcom Corporation
@@ -1267,10 +1267,9 @@ bwfm_sdio_intr(void *v)
 DPRINTF(("%s: sdio_intr\n", DEVNAME(sc)));
 
 	mutex_enter(>sc_intr_lock);
-	if (!sc->sc_task_queued) {
-		sc->sc_task_queued = true;
+	if (!sdmmc_task_pending(>sc_task))
 		sdmmc_add_task(sc->sc_sf[1]->sc, >sc_task);
-	}
+	sc->sc_task_queued = true;
 	mutex_exit(>sc_intr_lock);
 	return 1;
 }



CVS commit: src/sys/dev/sdmmc

2019-09-25 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Wed Sep 25 16:21:14 UTC 2019

Modified Files:
src/sys/dev/sdmmc: if_bwfm_sdio.c

Log Message:
Use correct function to verify if a task has been queued. Avoids race
that can corrupt the task queue.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/sdmmc/if_bwfm_sdio.c

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



CVS commit: src/sys/dev/ic

2019-09-25 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Wed Sep 25 15:51:37 UTC 2019

Modified Files:
src/sys/dev/ic: isp_netbsd.c

Log Message:
Make clang -Wformat-security happier by not passing a (constant) variable
as the format string,
const string msg; printf(msg)
  -> printf("%s", msg);

the strings are all known and don't currently contain format variables.


To generate a diff of this commit:
cvs rdiff -u -r1.94 -r1.95 src/sys/dev/ic/isp_netbsd.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/ic/isp_netbsd.c
diff -u src/sys/dev/ic/isp_netbsd.c:1.94 src/sys/dev/ic/isp_netbsd.c:1.95
--- src/sys/dev/ic/isp_netbsd.c:1.94	Sat Sep 21 07:31:56 2019
+++ src/sys/dev/ic/isp_netbsd.c	Wed Sep 25 15:51:37 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: isp_netbsd.c,v 1.94 2019/09/21 07:31:56 maxv Exp $ */
+/* $NetBSD: isp_netbsd.c,v 1.95 2019/09/25 15:51:37 maya Exp $ */
 /*
  * Platform (NetBSD) dependent common attachment code for Qlogic adapters.
  */
@@ -33,7 +33,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: isp_netbsd.c,v 1.94 2019/09/21 07:31:56 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: isp_netbsd.c,v 1.95 2019/09/25 15:51:37 maya Exp $");
 
 #include 
 #include 
@@ -1261,7 +1261,7 @@ isp_async(struct ispsoftc *isp, ispasync
    "Starting Loop Down Timer");
 			}
 		}
-		isp_prt(isp, ISP_LOGINFO, msg);
+		isp_prt(isp, ISP_LOGINFO, "%s", msg);
 		break;
 case ISPASYNC_LOOP_UP:
 		/*
@@ -1457,7 +1457,7 @@ isp_async(struct ispsoftc *isp, ispasync
 			isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0,
 			   "Stopping Loop Down Timer");
 		}
-		isp_prt(isp, ISP_LOGINFO, msg);
+		isp_prt(isp, ISP_LOGINFO, "%s", msg);
 		/*
 		 * We can set blocked here because we know it's now okay
 		 * to try and run isp_fc_runstate (in order to build loop



CVS commit: src/sys/dev/ic

2019-09-25 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Wed Sep 25 15:51:37 UTC 2019

Modified Files:
src/sys/dev/ic: isp_netbsd.c

Log Message:
Make clang -Wformat-security happier by not passing a (constant) variable
as the format string,
const string msg; printf(msg)
  -> printf("%s", msg);

the strings are all known and don't currently contain format variables.


To generate a diff of this commit:
cvs rdiff -u -r1.94 -r1.95 src/sys/dev/ic/isp_netbsd.c

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



CVS commit: [netbsd-8] src/doc

2019-09-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Sep 25 15:49:45 UTC 2019

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

Log Message:
Ticket #1386


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.42 -r1.1.2.43 src/doc/CHANGES-8.2

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



CVS commit: [netbsd-8] src/doc

2019-09-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Sep 25 15:49:45 UTC 2019

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

Log Message:
Ticket #1386


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.42 -r1.1.2.43 src/doc/CHANGES-8.2

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.2
diff -u src/doc/CHANGES-8.2:1.1.2.42 src/doc/CHANGES-8.2:1.1.2.43
--- src/doc/CHANGES-8.2:1.1.2.42	Tue Sep 24 18:28:19 2019
+++ src/doc/CHANGES-8.2	Wed Sep 25 15:49:45 2019
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-8.2,v 1.1.2.42 2019/09/24 18:28:19 martin Exp $
+# $NetBSD: CHANGES-8.2,v 1.1.2.43 2019/09/25 15:49:45 martin Exp $
 
 A complete list of changes from the NetBSD 8.1 release to the NetBSD 8.2
 release:
@@ -1134,3 +1134,9 @@ sys/netipsec/key.c			1.259,1.260
 	percpu storage.
 	[knakahara, ticket #1385]
 
+sys/dev/ic/nvme.c1.45
+
+	PRs kern/54275, kern/54503 and kern/54532:
+	don't set Phase Tag bit of Completion Queue entry at nvme_poll_done().
+	[nonaka, ticket #1386]
+



CVS commit: [netbsd-8] src/sys/dev/ic

2019-09-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Sep 25 15:49:17 UTC 2019

Modified Files:
src/sys/dev/ic [netbsd-8]: nvme.c

Log Message:
Pull up following revision(s) (requested by nonaka in ticket #1386):

sys/dev/ic/nvme.c: revision 1.45

Don't set Phase Tag bit of Completion Queue entry at nvme_poll_done().

A new completion queue entry check incorrectly determined that there was
a Completion Queue entry for a command that was not submitted.

Fix PR kern/54275, PR kern/54503, PR kern/54532.


To generate a diff of this commit:
cvs rdiff -u -r1.30.2.4 -r1.30.2.5 src/sys/dev/ic/nvme.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/ic/nvme.c
diff -u src/sys/dev/ic/nvme.c:1.30.2.4 src/sys/dev/ic/nvme.c:1.30.2.5
--- src/sys/dev/ic/nvme.c:1.30.2.4	Thu Apr 19 15:37:56 2018
+++ src/sys/dev/ic/nvme.c	Wed Sep 25 15:49:16 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: nvme.c,v 1.30.2.4 2018/04/19 15:37:56 martin Exp $	*/
+/*	$NetBSD: nvme.c,v 1.30.2.5 2019/09/25 15:49:16 martin Exp $	*/
 /*	$OpenBSD: nvme.c,v 1.49 2016/04/18 05:59:50 dlg Exp $ */
 
 /*
@@ -18,7 +18,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: nvme.c,v 1.30.2.4 2018/04/19 15:37:56 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nvme.c,v 1.30.2.5 2019/09/25 15:49:16 martin Exp $");
 
 #include 
 #include 
@@ -1202,8 +1202,8 @@ nvme_poll_done(struct nvme_queue *q, str
 {
 	struct nvme_poll_state *state = ccb->ccb_cookie;
 
-	SET(cqe->flags, htole16(NVME_CQE_PHASE));
 	state->c = *cqe;
+	SET(state->c.flags, htole16(NVME_CQE_PHASE));
 
 	ccb->ccb_cookie = state->cookie;
 	state->done(q, ccb, >c);



CVS commit: [netbsd-8] src/sys/dev/ic

2019-09-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Sep 25 15:49:17 UTC 2019

Modified Files:
src/sys/dev/ic [netbsd-8]: nvme.c

Log Message:
Pull up following revision(s) (requested by nonaka in ticket #1386):

sys/dev/ic/nvme.c: revision 1.45

Don't set Phase Tag bit of Completion Queue entry at nvme_poll_done().

A new completion queue entry check incorrectly determined that there was
a Completion Queue entry for a command that was not submitted.

Fix PR kern/54275, PR kern/54503, PR kern/54532.


To generate a diff of this commit:
cvs rdiff -u -r1.30.2.4 -r1.30.2.5 src/sys/dev/ic/nvme.c

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



CVS commit: [netbsd-9] src/doc

2019-09-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Sep 25 15:47:36 UTC 2019

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

Log Message:
Ticket #240


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.59 -r1.1.2.60 src/doc/CHANGES-9.0

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



CVS commit: [netbsd-9] src/doc

2019-09-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Sep 25 15:47:36 UTC 2019

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

Log Message:
Ticket #240


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.59 -r1.1.2.60 src/doc/CHANGES-9.0

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.0
diff -u src/doc/CHANGES-9.0:1.1.2.59 src/doc/CHANGES-9.0:1.1.2.60
--- src/doc/CHANGES-9.0:1.1.2.59	Tue Sep 24 18:15:50 2019
+++ src/doc/CHANGES-9.0	Wed Sep 25 15:47:36 2019
@@ -1,5 +1,5 @@
 
-# $NetBSD: CHANGES-9.0,v 1.1.2.59 2019/09/24 18:15:50 martin Exp $
+# $NetBSD: CHANGES-9.0,v 1.1.2.60 2019/09/25 15:47:36 martin Exp $
 
 A complete list of changes from the initial NetBSD 9.0 branch on 2019-07-30
 until the 9.0 release:
@@ -3961,3 +3961,11 @@ sys/dev/nvmm/x86/nvmm_x86_vmx.c			1.37
 	Always set hwcode on error. Useful for debugging.
 	[maxv, ticket #239]
 
+usr.sbin/postinstall/postinstall.in		1.6,1.7
+
+	exclude_libs - redirect ls 2> /dev/null so that the user is not
+	spammed with errors for directories without any libraries.
+	Add missing ${DEST_DIR} prefix to check target directory
+	(instead of host directory).
+	[nakayama, ticket #240]
+



CVS commit: [netbsd-9] src/usr.sbin/postinstall

2019-09-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Sep 25 15:46:38 UTC 2019

Modified Files:
src/usr.sbin/postinstall [netbsd-9]: postinstall.in

Log Message:
Pull up following revision(s) (requested by nakayama in ticket #240):

usr.sbin/postinstall/postinstall.in: revision 1.6
usr.sbin/postinstall/postinstall.in: revision 1.7

exclude_libs - redirect ls 2> /dev/null so that the user is not
spammed with errors for directories without any libraries; the most
common case in the wild would be empty /usr/libdata/debug.  Add -d to
ls for good measure while here.

 -

Add ${DEST_DIR} prefix to check target directory not host directory.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.5.2.1 src/usr.sbin/postinstall/postinstall.in

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



CVS commit: xsrc/external/mit/MesaLib/dist/src/intel/compiler

2019-09-25 Thread Maya Rashish
Module Name:xsrc
Committed By:   maya
Date:   Wed Sep 25 14:53:20 UTC 2019

Modified Files:
xsrc/external/mit/MesaLib/dist/src/intel/compiler:
brw_fs_combine_constants.cpp

Log Message:
Avoid truncating int64_t to int. Found by clang.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2 -r1.2 \

xsrc/external/mit/MesaLib/dist/src/intel/compiler/brw_fs_combine_constants.cpp

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



CVS commit: xsrc/external/mit/MesaLib/dist/src/intel/compiler

2019-09-25 Thread Maya Rashish
Module Name:xsrc
Committed By:   maya
Date:   Wed Sep 25 14:53:20 UTC 2019

Modified Files:
xsrc/external/mit/MesaLib/dist/src/intel/compiler:
brw_fs_combine_constants.cpp

Log Message:
Avoid truncating int64_t to int. Found by clang.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2 -r1.2 \

xsrc/external/mit/MesaLib/dist/src/intel/compiler/brw_fs_combine_constants.cpp

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/MesaLib/dist/src/intel/compiler/brw_fs_combine_constants.cpp
diff -u xsrc/external/mit/MesaLib/dist/src/intel/compiler/brw_fs_combine_constants.cpp:1.1.1.2 xsrc/external/mit/MesaLib/dist/src/intel/compiler/brw_fs_combine_constants.cpp:1.2
--- xsrc/external/mit/MesaLib/dist/src/intel/compiler/brw_fs_combine_constants.cpp:1.1.1.2	Tue Sep 24 17:39:40 2019
+++ xsrc/external/mit/MesaLib/dist/src/intel/compiler/brw_fs_combine_constants.cpp	Wed Sep 25 14:53:20 2019
@@ -34,6 +34,7 @@
  * cannot use immediate values.
  */
 
+#include 
 #include "brw_fs.h"
 #include "brw_cfg.h"
 #include "util/half_float.h"
@@ -232,7 +233,7 @@ get_constant_value(const struct gen_devi
   break;
}
case BRW_REGISTER_TYPE_Q: {
-  int64_t val = !can_do_source_mods ? src->d64 : abs(src->d64);
+  int64_t val = !can_do_source_mods ? src->d64 : std::abs(src->d64);
   memcpy(out, , 8);
   break;
}



CVS commit: src/sys

2019-09-25 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Wed Sep 25 09:53:38 UTC 2019

Modified Files:
src/sys/net: if.c if_llatbl.c link_proto.c route.c
src/sys/netinet: in.c
src/sys/netinet6: in6.c mld6.c nd6.c nd6_rtr.c
src/sys/netipsec: key.c

Log Message:
Make panic messages more informative


To generate a diff of this commit:
cvs rdiff -u -r1.461 -r1.462 src/sys/net/if.c
cvs rdiff -u -r1.30 -r1.31 src/sys/net/if_llatbl.c
cvs rdiff -u -r1.38 -r1.39 src/sys/net/link_proto.c
cvs rdiff -u -r1.222 -r1.223 src/sys/net/route.c
cvs rdiff -u -r1.234 -r1.235 src/sys/netinet/in.c
cvs rdiff -u -r1.275 -r1.276 src/sys/netinet6/in6.c
cvs rdiff -u -r1.100 -r1.101 src/sys/netinet6/mld6.c
cvs rdiff -u -r1.264 -r1.265 src/sys/netinet6/nd6.c
cvs rdiff -u -r1.145 -r1.146 src/sys/netinet6/nd6_rtr.c
cvs rdiff -u -r1.266 -r1.267 src/sys/netipsec/key.c

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



CVS commit: src/sys

2019-09-25 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Wed Sep 25 09:53:38 UTC 2019

Modified Files:
src/sys/net: if.c if_llatbl.c link_proto.c route.c
src/sys/netinet: in.c
src/sys/netinet6: in6.c mld6.c nd6.c nd6_rtr.c
src/sys/netipsec: key.c

Log Message:
Make panic messages more informative


To generate a diff of this commit:
cvs rdiff -u -r1.461 -r1.462 src/sys/net/if.c
cvs rdiff -u -r1.30 -r1.31 src/sys/net/if_llatbl.c
cvs rdiff -u -r1.38 -r1.39 src/sys/net/link_proto.c
cvs rdiff -u -r1.222 -r1.223 src/sys/net/route.c
cvs rdiff -u -r1.234 -r1.235 src/sys/netinet/in.c
cvs rdiff -u -r1.275 -r1.276 src/sys/netinet6/in6.c
cvs rdiff -u -r1.100 -r1.101 src/sys/netinet6/mld6.c
cvs rdiff -u -r1.264 -r1.265 src/sys/netinet6/nd6.c
cvs rdiff -u -r1.145 -r1.146 src/sys/netinet6/nd6_rtr.c
cvs rdiff -u -r1.266 -r1.267 src/sys/netipsec/key.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/net/if.c
diff -u src/sys/net/if.c:1.461 src/sys/net/if.c:1.462
--- src/sys/net/if.c:1.461	Thu Sep 19 06:07:24 2019
+++ src/sys/net/if.c	Wed Sep 25 09:53:37 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if.c,v 1.461 2019/09/19 06:07:24 knakahara Exp $	*/
+/*	$NetBSD: if.c,v 1.462 2019/09/25 09:53:37 ozaki-r Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2008 The NetBSD Foundation, Inc.
@@ -90,7 +90,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.461 2019/09/19 06:07:24 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.462 2019/09/25 09:53:37 ozaki-r Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_inet.h"
@@ -1807,7 +1807,7 @@ void
 ifafree(struct ifaddr *ifa)
 {
 	KASSERT(ifa != NULL);
-	KASSERT(ifa->ifa_refcnt > 0);
+	KASSERTMSG(ifa->ifa_refcnt > 0, "ifa_refcnt=%d", ifa->ifa_refcnt);
 
 	if (atomic_dec_uint_nv(>ifa_refcnt) == 0) {
 		free(ifa, M_IFADDR);

Index: src/sys/net/if_llatbl.c
diff -u src/sys/net/if_llatbl.c:1.30 src/sys/net/if_llatbl.c:1.31
--- src/sys/net/if_llatbl.c:1.30	Tue Jul 10 19:30:37 2018
+++ src/sys/net/if_llatbl.c	Wed Sep 25 09:53:37 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_llatbl.c,v 1.30 2018/07/10 19:30:37 kre Exp $	*/
+/*	$NetBSD: if_llatbl.c,v 1.31 2019/09/25 09:53:37 ozaki-r Exp $	*/
 /*
  * Copyright (c) 2004 Luigi Rizzo, Alessandro Cerri. All rights reserved.
  * Copyright (c) 2004-2008 Qing Li. All rights reserved.
@@ -239,7 +239,8 @@ htable_unlink_entry(struct llentry *lle)
 		lle->lle_tbl = NULL;
 		lle->lle_head = NULL;
 #endif
-		KASSERT(lle->lle_tbl->llt_lle_count != 0);
+		KASSERTMSG(lle->lle_tbl->llt_lle_count != 0,
+		"llt_lle_count=%u", lle->lle_tbl->llt_lle_count);
 		lle->lle_tbl->llt_lle_count--;
 	}
 }

Index: src/sys/net/link_proto.c
diff -u src/sys/net/link_proto.c:1.38 src/sys/net/link_proto.c:1.39
--- src/sys/net/link_proto.c:1.38	Mon Apr 29 11:57:22 2019
+++ src/sys/net/link_proto.c	Wed Sep 25 09:53:37 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: link_proto.c,v 1.38 2019/04/29 11:57:22 roy Exp $	*/
+/*	$NetBSD: link_proto.c,v 1.39 2019/09/25 09:53:37 ozaki-r Exp $	*/
 
 /*-
  * Copyright (c) 1982, 1986, 1993
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: link_proto.c,v 1.38 2019/04/29 11:57:22 roy Exp $");
+__KERNEL_RCSID(0, "$NetBSD: link_proto.c,v 1.39 2019/09/25 09:53:37 ozaki-r Exp $");
 
 #include 
 #include 
@@ -220,7 +220,8 @@ link_control(struct socket *so, unsigned
 ifaref(ifa);
 ifa_release(ifa, );
 ifa_remove(ifp, ifa);
-KASSERT(ifa->ifa_refcnt == 1);
+KASSERTMSG(ifa->ifa_refcnt == 1, "ifa_refcnt=%d",
+ifa->ifa_refcnt);
 ifafree(ifa);
 ifa = NULL;
 			}

Index: src/sys/net/route.c
diff -u src/sys/net/route.c:1.222 src/sys/net/route.c:1.223
--- src/sys/net/route.c:1.222	Mon Sep 23 05:00:20 2019
+++ src/sys/net/route.c	Wed Sep 25 09:53:37 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: route.c,v 1.222 2019/09/23 05:00:20 rin Exp $	*/
+/*	$NetBSD: route.c,v 1.223 2019/09/25 09:53:37 ozaki-r Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2008 The NetBSD Foundation, Inc.
@@ -97,7 +97,7 @@
 #endif
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: route.c,v 1.222 2019/09/23 05:00:20 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: route.c,v 1.223 2019/09/25 09:53:37 ozaki-r Exp $");
 
 #include 
 #ifdef RTFLUSH_DEBUG
@@ -621,7 +621,7 @@ static void
 rt_ref(struct rtentry *rt)
 {
 
-	KASSERT(rt->rt_refcnt >= 0);
+	KASSERTMSG(rt->rt_refcnt >= 0, "rt_refcnt=%d", rt->rt_refcnt);
 	atomic_inc_uint(>rt_refcnt);
 }
 
@@ -725,7 +725,7 @@ void
 rt_free(struct rtentry *rt)
 {
 
-	KASSERT(rt->rt_refcnt > 0);
+	KASSERTMSG(rt->rt_refcnt > 0, "rt_refcnt=%d", rt->rt_refcnt);
 	if (rt_wait_ok()) {
 		atomic_dec_uint(>rt_refcnt);
 		_rt_free(rt);

Index: src/sys/netinet/in.c
diff -u src/sys/netinet/in.c:1.234 src/sys/netinet/in.c:1.235
--- src/sys/netinet/in.c:1.234	Mon Apr 29 11:57:22 2019
+++ src/sys/netinet/in.c	Wed Sep 25 09:53:38 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: in.c,v 1.234 2019/04/29 11:57:22 roy Exp $	*/
+/*	$NetBSD: in.c,v 1.235 

CVS commit: src/sys

2019-09-25 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Wed Sep 25 09:52:32 UTC 2019

Modified Files:
src/sys/netinet: if_arp.c
src/sys/netinet6: nd6.c nd6.h nd6_nbr.c

Log Message:
Initialize DAD components properly

The original code initialized each component in non-init functions such as
arp_dad_start and nd6_dad_find, conditionally based on a global flag for each.
However, it was racy because the flag and the code around it were not
protected by a lock and could cause a kernel panic at worst.

Fix the issue by initializing the components in bootup as usual.


To generate a diff of this commit:
cvs rdiff -u -r1.287 -r1.288 src/sys/netinet/if_arp.c
cvs rdiff -u -r1.263 -r1.264 src/sys/netinet6/nd6.c
cvs rdiff -u -r1.87 -r1.88 src/sys/netinet6/nd6.h
cvs rdiff -u -r1.173 -r1.174 src/sys/netinet6/nd6_nbr.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/netinet/if_arp.c
diff -u src/sys/netinet/if_arp.c:1.287 src/sys/netinet/if_arp.c:1.288
--- src/sys/netinet/if_arp.c:1.287	Sun Sep  1 22:09:02 2019
+++ src/sys/netinet/if_arp.c	Wed Sep 25 09:52:32 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_arp.c,v 1.287 2019/09/01 22:09:02 roy Exp $	*/
+/*	$NetBSD: if_arp.c,v 1.288 2019/09/25 09:52:32 ozaki-r Exp $	*/
 
 /*
  * Copyright (c) 1998, 2000, 2008 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_arp.c,v 1.287 2019/09/01 22:09:02 roy Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_arp.c,v 1.288 2019/09/25 09:52:32 ozaki-r Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ddb.h"
@@ -153,6 +153,7 @@ int arp_debug = 0;
 #endif
 
 static void arp_init(void);
+static void arp_dad_init(void);
 
 static void arprequest(struct ifnet *,
 const struct in_addr *, const struct in_addr *,
@@ -264,6 +265,8 @@ arp_init(void)
 #ifdef MBUFTRACE
 	MOWNER_ATTACH(_mowner);
 #endif
+
+	arp_dad_init();
 }
 
 static void
@@ -1510,10 +1513,17 @@ struct dadq {
 };
 
 static struct dadq_head dadq;
-static int dad_init = 0;
 static int dad_maxtry = 15; /* max # of *tries* to transmit DAD packet */
 static kmutex_t arp_dad_lock;
 
+static void
+arp_dad_init(void)
+{
+
+	TAILQ_INIT();
+	mutex_init(_dad_lock, MUTEX_DEFAULT, IPL_NONE);
+}
+
 static struct dadq *
 arp_dad_find(struct ifaddr *ifa)
 {
@@ -1588,12 +1598,6 @@ arp_dad_start(struct ifaddr *ifa)
 	struct dadq *dp;
 	char ipbuf[INET_ADDRSTRLEN];
 
-	if (!dad_init) {
-		TAILQ_INIT();
-		mutex_init(_dad_lock, MUTEX_DEFAULT, IPL_NONE);
-		dad_init++;
-	}
-
 	/*
 	 * If we don't need DAD, don't do it.
 	 * - DAD is disabled
@@ -1662,9 +1666,6 @@ arp_dad_stop(struct ifaddr *ifa)
 {
 	struct dadq *dp;
 
-	if (!dad_init)
-		return;
-
 	mutex_enter(_dad_lock);
 	dp = arp_dad_find(ifa);
 	if (dp == NULL) {

Index: src/sys/netinet6/nd6.c
diff -u src/sys/netinet6/nd6.c:1.263 src/sys/netinet6/nd6.c:1.264
--- src/sys/netinet6/nd6.c:1.263	Sun Sep  1 19:26:21 2019
+++ src/sys/netinet6/nd6.c	Wed Sep 25 09:52:32 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: nd6.c,v 1.263 2019/09/01 19:26:21 roy Exp $	*/
+/*	$NetBSD: nd6.c,v 1.264 2019/09/25 09:52:32 ozaki-r Exp $	*/
 /*	$KAME: nd6.c,v 1.279 2002/06/08 11:16:51 itojun Exp $	*/
 
 /*
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: nd6.c,v 1.263 2019/09/01 19:26:21 roy Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nd6.c,v 1.264 2019/09/25 09:52:32 ozaki-r Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_net_mpsafe.h"
@@ -137,6 +137,8 @@ nd6_init(void)
 {
 	int error;
 
+	nd6_nbr_init();
+
 	rw_init(_lock);
 
 	/* initialization of the default router list */

Index: src/sys/netinet6/nd6.h
diff -u src/sys/netinet6/nd6.h:1.87 src/sys/netinet6/nd6.h:1.88
--- src/sys/netinet6/nd6.h:1.87	Sun Sep  1 19:26:21 2019
+++ src/sys/netinet6/nd6.h	Wed Sep 25 09:52:32 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: nd6.h,v 1.87 2019/09/01 19:26:21 roy Exp $	*/
+/*	$NetBSD: nd6.h,v 1.88 2019/09/25 09:52:32 ozaki-r Exp $	*/
 /*	$KAME: nd6.h,v 1.95 2002/06/08 11:31:06 itojun Exp $	*/
 
 /*
@@ -430,6 +430,7 @@ union nd_opts {
 /* XXX: need nd6_var.h?? */
 /* nd6.c */
 void nd6_init(void);
+void nd6_nbr_init(void);
 struct nd_ifinfo *nd6_ifattach(struct ifnet *);
 void nd6_ifdetach(struct ifnet *, struct in6_ifextra *);
 int nd6_is_addr_neighbor(const struct sockaddr_in6 *, struct ifnet *);

Index: src/sys/netinet6/nd6_nbr.c
diff -u src/sys/netinet6/nd6_nbr.c:1.173 src/sys/netinet6/nd6_nbr.c:1.174
--- src/sys/netinet6/nd6_nbr.c:1.173	Wed Sep 18 08:18:05 2019
+++ src/sys/netinet6/nd6_nbr.c	Wed Sep 25 09:52:32 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: nd6_nbr.c,v 1.173 2019/09/18 08:18:05 ozaki-r Exp $	*/
+/*	$NetBSD: nd6_nbr.c,v 1.174 2019/09/25 09:52:32 ozaki-r Exp $	*/
 /*	$KAME: nd6_nbr.c,v 1.61 2001/02/10 16:06:14 jinmei Exp $	*/
 
 /*
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: nd6_nbr.c,v 1.173 2019/09/18 08:18:05 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nd6_nbr.c,v 1.174 2019/09/25 09:52:32 ozaki-r Exp $");
 
 #ifdef 

CVS commit: src/sys

2019-09-25 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Wed Sep 25 09:52:32 UTC 2019

Modified Files:
src/sys/netinet: if_arp.c
src/sys/netinet6: nd6.c nd6.h nd6_nbr.c

Log Message:
Initialize DAD components properly

The original code initialized each component in non-init functions such as
arp_dad_start and nd6_dad_find, conditionally based on a global flag for each.
However, it was racy because the flag and the code around it were not
protected by a lock and could cause a kernel panic at worst.

Fix the issue by initializing the components in bootup as usual.


To generate a diff of this commit:
cvs rdiff -u -r1.287 -r1.288 src/sys/netinet/if_arp.c
cvs rdiff -u -r1.263 -r1.264 src/sys/netinet6/nd6.c
cvs rdiff -u -r1.87 -r1.88 src/sys/netinet6/nd6.h
cvs rdiff -u -r1.173 -r1.174 src/sys/netinet6/nd6_nbr.c

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