CVS commit: [pgoyette-compat] src/sys/compat/netbsd32

2018-09-10 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Tue Sep 11 05:57:15 UTC 2018

Modified Files:
src/sys/compat/netbsd32 [pgoyette-compat]: netbsd32_mqueue.c

Log Message:
Revert previous - it was wrong.


To generate a diff of this commit:
cvs rdiff -u -r1.6.18.1 -r1.6.18.2 src/sys/compat/netbsd32/netbsd32_mqueue.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_mqueue.c
diff -u src/sys/compat/netbsd32/netbsd32_mqueue.c:1.6.18.1 src/sys/compat/netbsd32/netbsd32_mqueue.c:1.6.18.2
--- src/sys/compat/netbsd32/netbsd32_mqueue.c:1.6.18.1	Tue Sep 11 05:48:07 2018
+++ src/sys/compat/netbsd32/netbsd32_mqueue.c	Tue Sep 11 05:57:15 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_mqueue.c,v 1.6.18.1 2018/09/11 05:48:07 pgoyette Exp $	*/
+/*	$NetBSD: netbsd32_mqueue.c,v 1.6.18.2 2018/09/11 05:57:15 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_mqueue.c,v 1.6.18.1 2018/09/11 05:48:07 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_mqueue.c,v 1.6.18.2 2018/09/11 05:57:15 pgoyette Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd.h"
@@ -328,7 +328,7 @@ netbsd32___mq_timedreceive50(struct lwp 
 
 int
 compat_50_netbsd32_mq_timedsend(struct lwp *l,
-const struct netbsd32_mq_timedsend_args *uap,
+const struct compat_50_netbsd32_mq_timedsend_args *uap,
 register_t *retval)
 {
 	/* {
@@ -360,7 +360,7 @@ compat_50_netbsd32_mq_timedsend(struct l
 
 int
 compat_50_netbsd32_mq_timedreceive(struct lwp *l,
-const struct netbsd32_mq_timedreceive_args *uap,
+const struct compat_50_netbsd32_mq_timedreceive_args *uap,
 register_t *retval)
 {
 	/* {



CVS commit: [pgoyette-compat] src/sys/compat/netbsd32

2018-09-10 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Tue Sep 11 05:48:07 UTC 2018

Modified Files:
src/sys/compat/netbsd32 [pgoyette-compat]: netbsd32_compat_80.c
netbsd32_mqueue.c netbsd32_syscall.h netbsd32_syscallargs.h
netbsd32_syscalls.c netbsd32_syscalls_autoload.c netbsd32_sysent.c
netbsd32_systrace_args.c

Log Message:
Regen


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/sys/compat/netbsd32/netbsd32_compat_80.c
cvs rdiff -u -r1.6 -r1.6.18.1 src/sys/compat/netbsd32/netbsd32_mqueue.c
cvs rdiff -u -r1.134.2.4 -r1.134.2.5 \
src/sys/compat/netbsd32/netbsd32_syscall.h
cvs rdiff -u -r1.134.2.3 -r1.134.2.4 \
src/sys/compat/netbsd32/netbsd32_syscallargs.h
cvs rdiff -u -r1.132.2.4 -r1.132.2.5 \
src/sys/compat/netbsd32/netbsd32_syscalls.c
cvs rdiff -u -r1.13.2.3 -r1.13.2.4 \
src/sys/compat/netbsd32/netbsd32_syscalls_autoload.c
cvs rdiff -u -r1.132.2.3 -r1.132.2.4 \
src/sys/compat/netbsd32/netbsd32_sysent.c
cvs rdiff -u -r1.24.2.3 -r1.24.2.4 \
src/sys/compat/netbsd32/netbsd32_systrace_args.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_compat_80.c
diff -u src/sys/compat/netbsd32/netbsd32_compat_80.c:1.1.2.1 src/sys/compat/netbsd32/netbsd32_compat_80.c:1.1.2.2
--- src/sys/compat/netbsd32/netbsd32_compat_80.c:1.1.2.1	Mon Sep 10 22:50:51 2018
+++ src/sys/compat/netbsd32/netbsd32_compat_80.c	Tue Sep 11 05:48:07 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_compat_80.c,v 1.1.2.1 2018/09/10 22:50:51 pgoyette Exp $	*/
+/*	$NetBSD: netbsd32_compat_80.c,v 1.1.2.2 2018/09/11 05:48:07 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_80.c,v 1.1.2.1 2018/09/10 22:50:51 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_80.c,v 1.1.2.2 2018/09/11 05:48:07 pgoyette Exp $");
 
 #include 
 #include 
@@ -37,12 +37,18 @@ __KERNEL_RCSID(0, "$NetBSD: netbsd32_com
 #include 
 #include 
 
+#include 
+
 #include 
 #include 
 #include 
 #include 
 
 #ifdef COMPAT_80
+
+int netbsd32_80_modctl(struct lwp *, const struct netbsd32_modctl_args *,
+	register_t *);
+
 static int
 modctl32_handle_ostat(int cmd, struct netbsd32_iovec *iov, void *arg)
 {
@@ -147,9 +153,7 @@ netbsd32_80_modctl(struct lwp *lwp, cons
 		syscallarg(int) cmd;
 		syscallarg(netbsd32_voidp) arg;
 	} */
-	char buf[MAXMODNAME];
 	struct netbsd32_iovec iov;
-	struct netbsd32_modctl_load ml;
 	int error;
 	void *arg;
 #ifdef MODULAR
@@ -197,5 +201,3 @@ static int (*orig_netbsd32_80_modctl)(st
 	}
 }
 #endif	/* COMPAT_80 */
-
-vec_compat32_80_modctl = compat32_80_modctl_compat_stub;

Index: src/sys/compat/netbsd32/netbsd32_mqueue.c
diff -u src/sys/compat/netbsd32/netbsd32_mqueue.c:1.6 src/sys/compat/netbsd32/netbsd32_mqueue.c:1.6.18.1
--- src/sys/compat/netbsd32/netbsd32_mqueue.c:1.6	Tue Dec  1 23:56:43 2015
+++ src/sys/compat/netbsd32/netbsd32_mqueue.c	Tue Sep 11 05:48:07 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_mqueue.c,v 1.6 2015/12/01 23:56:43 pgoyette Exp $	*/
+/*	$NetBSD: netbsd32_mqueue.c,v 1.6.18.1 2018/09/11 05:48:07 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_mqueue.c,v 1.6 2015/12/01 23:56:43 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_mqueue.c,v 1.6.18.1 2018/09/11 05:48:07 pgoyette Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd.h"
@@ -328,7 +328,7 @@ netbsd32___mq_timedreceive50(struct lwp 
 
 int
 compat_50_netbsd32_mq_timedsend(struct lwp *l,
-const struct compat_50_netbsd32_mq_timedsend_args *uap,
+const struct netbsd32_mq_timedsend_args *uap,
 register_t *retval)
 {
 	/* {
@@ -360,7 +360,7 @@ compat_50_netbsd32_mq_timedsend(struct l
 
 int
 compat_50_netbsd32_mq_timedreceive(struct lwp *l,
-const struct compat_50_netbsd32_mq_timedreceive_args *uap,
+const struct netbsd32_mq_timedreceive_args *uap,
 register_t *retval)
 {
 	/* {

Index: src/sys/compat/netbsd32/netbsd32_syscall.h
diff -u src/sys/compat/netbsd32/netbsd32_syscall.h:1.134.2.4 src/sys/compat/netbsd32/netbsd32_syscall.h:1.134.2.5
--- src/sys/compat/netbsd32/netbsd32_syscall.h:1.134.2.4	Tue Sep 11 01:52:00 2018
+++ src/sys/compat/netbsd32/netbsd32_syscall.h	Tue Sep 11 05:48:07 2018
@@ -1,10 +1,10 @@
-/* $NetBSD: netbsd32_syscall.h,v 1.134.2.4 2018/09/11 01:52:00 pgoyette Exp $ */
+/* $NetBSD: netbsd32_syscall.h,v 1.134.2.5 2018/09/11 05:48:07 pgoyette Exp $ */
 
 /*
  * System call numbers.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.120.2.7 2018/09/11 01:45:19 pgoyette Exp
+ * created from	NetBSD: syscalls.master,v 1.120.2.8 2018/09/11 05:47:52 pgoyette Exp
  */
 
 #ifndef _NETBSD32_SYS_SYSCALL_H_
@@ -569,8 +569,8 @@
 /* syscall: 

CVS commit: [pgoyette-compat] src/sys/compat/netbsd32

2018-09-10 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Tue Sep 11 05:47:52 UTC 2018

Modified Files:
src/sys/compat/netbsd32 [pgoyette-compat]: syscalls.master

Log Message:
Don't be overzealous with changes!  Return a few syscalls to their
original COMPAT_xx status (rather than STD)


To generate a diff of this commit:
cvs rdiff -u -r1.120.2.7 -r1.120.2.8 src/sys/compat/netbsd32/syscalls.master

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/syscalls.master
diff -u src/sys/compat/netbsd32/syscalls.master:1.120.2.7 src/sys/compat/netbsd32/syscalls.master:1.120.2.8
--- src/sys/compat/netbsd32/syscalls.master:1.120.2.7	Tue Sep 11 01:45:19 2018
+++ src/sys/compat/netbsd32/syscalls.master	Tue Sep 11 05:47:52 2018
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.120.2.7 2018/09/11 01:45:19 pgoyette Exp $
+	$NetBSD: syscalls.master,v 1.120.2.8 2018/09/11 05:47:52 pgoyette Exp $
 
 ;	from: NetBSD: syscalls.master,v 1.81 1998/07/05 08:49:50 jonathan Exp
 ;	@(#)syscalls.master	8.2 (Berkeley) 1/13/94
@@ -461,7 +461,7 @@
 218	UNIMPL
 219	UNIMPL
 ; System calls 220-300 are reserved for use by NetBSD
-220	STD MODULAR compat_netbsd32_sysvipc	\
+220	COMPAT_14 MODULAR compat_netbsd32_sysvipc	\
 			{ int|netbsd32||__semctl(int semid, int semnum, \
 			int cmd, netbsd32_semunu_t arg); }
 221	STD MODULAR compat_netbsd32_sysvipc	\
@@ -472,7 +472,7 @@
 			netbsd32_sembufp_t sops, netbsd32_size_t nsops); }
 223	STD MODULAR compat_netbsd32_sysvipc	\
 			{ int|netbsd32||semconfig(int flag); }
-224	STD MODULAR compat_netbsd32_sysvipc	\
+224	COMPAT_14 MODULAR compat_netbsd32_sysvipc	\
 			{ int|netbsd32||msgctl(int msqid, int cmd, \
 			netbsd32_msqid_ds14p_t buf); }
 225	STD MODULAR compat_netbsd32_sysvipc	\
@@ -487,7 +487,7 @@
 228	STD MODULAR compat_netbsd32_sysvipc	\
 			{ netbsd32_voidp|netbsd32||shmat(int shmid, \
 			netbsd32_voidp shmaddr, int shmflg); }
-229	STD MODULAR compat_netbsd32_sysvipc	\
+229	COMPAT_14 MODULAR compat_netbsd32_sysvipc	\
 			{ int|netbsd32||shmctl(int shmid, int cmd, \
 			netbsd32_shmid_dsp_t buf); }
 230	STD MODULAR compat_netbsd32_sysvipc	\
@@ -579,13 +579,13 @@
 			{ netbsd32_ssize_t|netbsd32||mq_receive(mqd_t mqdes, \
 			netbsd32_charp msg_ptr, \
 			netbsd32_size_t msg_len, netbsd32_uintp msg_prio); }
-265	STD MODULAR compat_netbsd32_mqueue	\
+265	COMPAT_50 MODULAR compat_netbsd32_mqueue	\
 			{ int|netbsd32||mq_timedsend(mqd_t mqdes, \
 			const netbsd32_charp msg_ptr, \
 			netbsd32_size_t msg_len, \
 			unsigned msg_prio, \
 			const netbsd32_timespec50p_t abs_timeout); }
-266	STD MODULAR compat_netbsd32_mqueue	\
+266	COMPAT_50 MODULAR compat_netbsd32_mqueue	\
 			{ netbsd32_ssize_t|netbsd32||mq_timedreceive( \
 			mqd_t mqdes, \
 			netbsd32_charp msg_ptr, netbsd32_size_t msg_len, \



CVS commit: [pgoyette-compat] src/sys/compat/netbsd32

2018-09-10 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Tue Sep 11 05:00:42 UTC 2018

Modified Files:
src/sys/compat/netbsd32 [pgoyette-compat]: files.netbsd32
netbsd32_compat_09.c netbsd32_compat_12.c netbsd32_compat_13.c
netbsd32_compat_20.c netbsd32_compat_30.c netbsd32_compat_50.c
netbsd32_compat_60.c

Log Message:
Also need to declare the emul_netbsd32 !


To generate a diff of this commit:
cvs rdiff -u -r1.39.14.1 -r1.39.14.2 src/sys/compat/netbsd32/files.netbsd32
cvs rdiff -u -r1.18.86.3 -r1.18.86.4 \
src/sys/compat/netbsd32/netbsd32_compat_09.c
cvs rdiff -u -r1.33.36.5 -r1.33.36.6 \
src/sys/compat/netbsd32/netbsd32_compat_12.c
cvs rdiff -u -r1.26.28.4 -r1.26.28.5 \
src/sys/compat/netbsd32/netbsd32_compat_13.c
cvs rdiff -u -r1.36.10.6 -r1.36.10.7 \
src/sys/compat/netbsd32/netbsd32_compat_20.c
cvs rdiff -u -r1.31.16.5 -r1.31.16.6 \
src/sys/compat/netbsd32/netbsd32_compat_30.c
cvs rdiff -u -r1.32.16.4 -r1.32.16.5 \
src/sys/compat/netbsd32/netbsd32_compat_50.c
cvs rdiff -u -r1.3.2.4 -r1.3.2.5 src/sys/compat/netbsd32/netbsd32_compat_60.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/files.netbsd32
diff -u src/sys/compat/netbsd32/files.netbsd32:1.39.14.1 src/sys/compat/netbsd32/files.netbsd32:1.39.14.2
--- src/sys/compat/netbsd32/files.netbsd32:1.39.14.1	Wed Mar 21 02:01:34 2018
+++ src/sys/compat/netbsd32/files.netbsd32	Tue Sep 11 05:00:42 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: files.netbsd32,v 1.39.14.1 2018/03/21 02:01:34 pgoyette Exp $
+#	$NetBSD: files.netbsd32,v 1.39.14.2 2018/09/11 05:00:42 pgoyette Exp $
 #
 # config file description for machine-independent netbsd32 compat code.
 # included by ports that need it.
@@ -45,3 +45,4 @@ file	compat/netbsd32/netbsd32_rndpseudo_
 file	compat/netbsd32/netbsd32_compat_50_sysv.c compat_netbsd32 & compat_50 &
 		(sysvmsg | sysvsem | sysvshm)
 file	compat/netbsd32/netbsd32_compat_60.c	compat_netbsd32 & compat_60
+file	compat/netbsd32/netbsd32_compat_80.c	compat_netbsd32 & compat_80

Index: src/sys/compat/netbsd32/netbsd32_compat_09.c
diff -u src/sys/compat/netbsd32/netbsd32_compat_09.c:1.18.86.3 src/sys/compat/netbsd32/netbsd32_compat_09.c:1.18.86.4
--- src/sys/compat/netbsd32/netbsd32_compat_09.c:1.18.86.3	Tue Sep 11 04:53:42 2018
+++ src/sys/compat/netbsd32/netbsd32_compat_09.c	Tue Sep 11 05:00:42 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_compat_09.c,v 1.18.86.3 2018/09/11 04:53:42 pgoyette Exp $	*/
+/*	$NetBSD: netbsd32_compat_09.c,v 1.18.86.4 2018/09/11 05:00:42 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 1998 Matthew R. Green
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_09.c,v 1.18.86.3 2018/09/11 04:53:42 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_09.c,v 1.18.86.4 2018/09/11 05:00:42 pgoyette Exp $");
 
 #include 
 #include 
@@ -46,6 +46,8 @@ __KERNEL_RCSID(0, "$NetBSD: netbsd32_com
 #include 
 #include 
 
+extern struct emul emul_netbsd32;
+
 int
 compat_09_netbsd32_ogetdomainname(struct lwp *l, const struct compat_09_netbsd32_ogetdomainname_args *uap, register_t *retval)
 {

Index: src/sys/compat/netbsd32/netbsd32_compat_12.c
diff -u src/sys/compat/netbsd32/netbsd32_compat_12.c:1.33.36.5 src/sys/compat/netbsd32/netbsd32_compat_12.c:1.33.36.6
--- src/sys/compat/netbsd32/netbsd32_compat_12.c:1.33.36.5	Tue Sep 11 04:53:42 2018
+++ src/sys/compat/netbsd32/netbsd32_compat_12.c	Tue Sep 11 05:00:42 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_compat_12.c,v 1.33.36.5 2018/09/11 04:53:42 pgoyette Exp $	*/
+/*	$NetBSD: netbsd32_compat_12.c,v 1.33.36.6 2018/09/11 05:00:42 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_12.c,v 1.33.36.5 2018/09/11 04:53:42 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_12.c,v 1.33.36.6 2018/09/11 05:00:42 pgoyette Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd.h"
@@ -54,6 +54,8 @@ __KERNEL_RCSID(0, "$NetBSD: netbsd32_com
 #include 
 #include 
 
+extern struct emul emul_netbsd32;
+
 static void netbsd32_stat12_to_netbsd32(struct stat12 *,
 		struct netbsd32_stat12 *);
 

Index: src/sys/compat/netbsd32/netbsd32_compat_13.c
diff -u src/sys/compat/netbsd32/netbsd32_compat_13.c:1.26.28.4 src/sys/compat/netbsd32/netbsd32_compat_13.c:1.26.28.5
--- src/sys/compat/netbsd32/netbsd32_compat_13.c:1.26.28.4	Tue Sep 11 04:53:42 2018
+++ src/sys/compat/netbsd32/netbsd32_compat_13.c	Tue Sep 11 05:00:42 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_compat_13.c,v 1.26.28.4 2018/09/11 04:53:42 pgoyette Exp $	*/
+/*	$NetBSD: netbsd32_compat_13.c,v 1.26.28.5 2018/09/11 05:00:42 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_13.c,v 1.26.28.4 2018/09/11 04:53:42 pgoyette Exp $");

CVS commit: [pgoyette-compat] src/sys/modules/compat_netbsd32

2018-09-10 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Tue Sep 11 05:01:35 UTC 2018

Modified Files:
src/sys/modules/compat_netbsd32 [pgoyette-compat]: Makefile

Log Message:
Don't include the 60-specific code in the monolithic compat_netbsd32 module


To generate a diff of this commit:
cvs rdiff -u -r1.20.12.4 -r1.20.12.5 src/sys/modules/compat_netbsd32/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_netbsd32/Makefile
diff -u src/sys/modules/compat_netbsd32/Makefile:1.20.12.4 src/sys/modules/compat_netbsd32/Makefile:1.20.12.5
--- src/sys/modules/compat_netbsd32/Makefile:1.20.12.4	Mon Sep 10 22:50:52 2018
+++ src/sys/modules/compat_netbsd32/Makefile	Tue Sep 11 05:01:35 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.20.12.4 2018/09/10 22:50:52 pgoyette Exp $
+#	$NetBSD: Makefile,v 1.20.12.5 2018/09/11 05:01:35 pgoyette Exp $
 
 .include "../Makefile.inc"
 .include "../Makefile.assym"
@@ -27,7 +27,6 @@ CPPFLAGS+=	-DNTP -DKTRACE -DMODULAR
 SRCS+=	netbsd32_compat_10.c	# belongs to compat_netbsd32_sysvipc_10
 SRCS+=	netbsd32_compat_14.c	# belongs to compat_netbsd32_sysvipc_14
 SRCS+=	netbsd32_compat_43.c
-SRCS+=	netbsd32_compat_60.c
 SRCS+=	netbsd32_core.c netbsd32_event.c
 SRCS+=	netbsd32_exec_elf32.c
 SRCS+=	netbsd32_execve.c netbsd32_fs.c



CVS commit: [pgoyette-compat] src/sys/compat/netbsd32

2018-09-10 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Tue Sep 11 04:53:42 UTC 2018

Modified Files:
src/sys/compat/netbsd32 [pgoyette-compat]: netbsd32_compat_09.c
netbsd32_compat_12.c netbsd32_compat_13.c netbsd32_compat_20.c
netbsd32_compat_30.c netbsd32_compat_50.c netbsd32_compat_60.c
netbsd32_mod.c netbsd32_module.c

Log Message:
Install the syscalls into the netbsd32 table, not the default/native table.


To generate a diff of this commit:
cvs rdiff -u -r1.18.86.2 -r1.18.86.3 \
src/sys/compat/netbsd32/netbsd32_compat_09.c
cvs rdiff -u -r1.33.36.4 -r1.33.36.5 \
src/sys/compat/netbsd32/netbsd32_compat_12.c
cvs rdiff -u -r1.26.28.3 -r1.26.28.4 \
src/sys/compat/netbsd32/netbsd32_compat_13.c
cvs rdiff -u -r1.36.10.5 -r1.36.10.6 \
src/sys/compat/netbsd32/netbsd32_compat_20.c
cvs rdiff -u -r1.31.16.4 -r1.31.16.5 \
src/sys/compat/netbsd32/netbsd32_compat_30.c
cvs rdiff -u -r1.32.16.3 -r1.32.16.4 \
src/sys/compat/netbsd32/netbsd32_compat_50.c
cvs rdiff -u -r1.3.2.3 -r1.3.2.4 src/sys/compat/netbsd32/netbsd32_compat_60.c
cvs rdiff -u -r1.13.16.4 -r1.13.16.5 src/sys/compat/netbsd32/netbsd32_mod.c
cvs rdiff -u -r1.6.2.4 -r1.6.2.5 src/sys/compat/netbsd32/netbsd32_module.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_compat_09.c
diff -u src/sys/compat/netbsd32/netbsd32_compat_09.c:1.18.86.2 src/sys/compat/netbsd32/netbsd32_compat_09.c:1.18.86.3
--- src/sys/compat/netbsd32/netbsd32_compat_09.c:1.18.86.2	Tue Sep 11 02:53:56 2018
+++ src/sys/compat/netbsd32/netbsd32_compat_09.c	Tue Sep 11 04:53:42 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_compat_09.c,v 1.18.86.2 2018/09/11 02:53:56 pgoyette Exp $	*/
+/*	$NetBSD: netbsd32_compat_09.c,v 1.18.86.3 2018/09/11 04:53:42 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 1998 Matthew R. Green
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_09.c,v 1.18.86.2 2018/09/11 02:53:56 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_09.c,v 1.18.86.3 2018/09/11 04:53:42 pgoyette Exp $");
 
 #include 
 #include 
@@ -40,6 +40,8 @@ __KERNEL_RCSID(0, "$NetBSD: netbsd32_com
 #include 
 #include 
 
+#include 
+
 #include 
 #include 
 #include 
@@ -87,13 +89,13 @@ compat_09_netbsd32_uname(struct lwp *l, 
 	NETBSD32TOP_UAP(name, struct outsname);
 	return (compat_09_sys_uname(l, , retval));
 }
-NETBSD32_SYS_compat_30_netbsd32_fhstat
+
 static struct syscall_package compat_netbsd32_09_syscalls[] = {
-{ NETBSD32_SYS_compat_30_netbsd32_ogetdomainname, 0,
+{ NETBSD32_SYS_compat_09_netbsd32_ogetdomainname, 0,
 (sy_call_t *)compat_09_netbsd32_ogetdomainname },
-{ NETBSD32_SYS_compat_30_netbsd32_osetdomainname, 0,
+{ NETBSD32_SYS_compat_09_netbsd32_osetdomainname, 0,
 (sy_call_t *)compat_09_netbsd32_osetdomainname },
-{ NETBSD32_SYS_compat_30_netbsd32_ouname, 0,
+{ NETBSD32_SYS_compat_09_netbsd32_uname, 0,
 	(sy_call_t *)compat_09_netbsd32_uname },
 { 0, 0, NULL }
 };
@@ -101,15 +103,17 @@ static struct syscall_package compat_net
 MODULE(MODULE_CLASS_EXEC, compat_netbsd32_09, "compat_netbsd32,compat_09");
 
 static int
-compat_netbsd32_09_modcmd(modcmt_t cmd, void *(arg)
+compat_netbsd32_09_modcmd(modcmd_t cmd, void *arg)
 {
 
 	switch (cmd) {
 	case MODULE_CMD_INIT:
-		return syscall_establish(NULL, compat_netbsd32_09_syscalls);
+		return syscall_establish(_netbsd32,
+		compat_netbsd32_09_syscalls);
 
 	case MODULE_CMD_FINI:
-		return syscall_disestablish(NULL, compat_netbsd32_09_syscalls);
+		return syscall_disestablish(_netbsd32,
+		compat_netbsd32_09_syscalls);
 
 	default:
 		return ENOTTY;

Index: src/sys/compat/netbsd32/netbsd32_compat_12.c
diff -u src/sys/compat/netbsd32/netbsd32_compat_12.c:1.33.36.4 src/sys/compat/netbsd32/netbsd32_compat_12.c:1.33.36.5
--- src/sys/compat/netbsd32/netbsd32_compat_12.c:1.33.36.4	Tue Sep 11 02:53:56 2018
+++ src/sys/compat/netbsd32/netbsd32_compat_12.c	Tue Sep 11 04:53:42 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_compat_12.c,v 1.33.36.4 2018/09/11 02:53:56 pgoyette Exp $	*/
+/*	$NetBSD: netbsd32_compat_12.c,v 1.33.36.5 2018/09/11 04:53:42 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_12.c,v 1.33.36.4 2018/09/11 02:53:56 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_12.c,v 1.33.36.5 2018/09/11 04:53:42 pgoyette Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd.h"
@@ -216,8 +216,8 @@ static struct syscall_package compat_net
 	(sy_call_t *)compat_12_netbsd32_reboot },
 	{ NETBSD32_SYS_compat_12_netbsd32_msync, 0,
 	(sy_call_t *)compat_12_netbsd32_msync },
-	{ NETBSD32_SYS_compat_12_netbsd32_swapon, 0,
-	(sy_call_t *)compat_12_netbsd32_swapon },
+	{ 

CVS commit: [pgoyette-compat] src/sys/modules

2018-09-10 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Tue Sep 11 04:20:51 UTC 2018

Modified Files:
src/sys/modules [pgoyette-compat]: Makefile
src/sys/modules/compat_netbsd32_09 [pgoyette-compat]: Makefile
src/sys/modules/compat_netbsd32_12 [pgoyette-compat]: Makefile
src/sys/modules/compat_netbsd32_13 [pgoyette-compat]: Makefile
src/sys/modules/compat_netbsd32_20 [pgoyette-compat]: Makefile
src/sys/modules/compat_netbsd32_30 [pgoyette-compat]: Makefile
src/sys/modules/compat_netbsd32_50 [pgoyette-compat]: Makefile
src/sys/modules/compat_netbsd32_60 [pgoyette-compat]: Makefile
src/sys/modules/compat_netbsd32_80 [pgoyette-compat]: Makefile

Log Message:
Add -DCOMPAT_NETBSD32 for all the version-specific modules


To generate a diff of this commit:
cvs rdiff -u -r1.202.2.27 -r1.202.2.28 src/sys/modules/Makefile
cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/sys/modules/compat_netbsd32_09/Makefile
cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/sys/modules/compat_netbsd32_12/Makefile
cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/sys/modules/compat_netbsd32_13/Makefile
cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/sys/modules/compat_netbsd32_20/Makefile
cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/sys/modules/compat_netbsd32_30/Makefile
cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/sys/modules/compat_netbsd32_50/Makefile
cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/sys/modules/compat_netbsd32_60/Makefile
cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/sys/modules/compat_netbsd32_80/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/Makefile
diff -u src/sys/modules/Makefile:1.202.2.27 src/sys/modules/Makefile:1.202.2.28
--- src/sys/modules/Makefile:1.202.2.27	Mon Sep 10 10:49:10 2018
+++ src/sys/modules/Makefile	Tue Sep 11 04:20:50 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.202.2.27 2018/09/10 10:49:10 pgoyette Exp $
+#	$NetBSD: Makefile,v 1.202.2.28 2018/09/11 04:20:50 pgoyette Exp $
 
 .include 
 
@@ -271,7 +271,7 @@ SUBDIR+=	compat_netbsd32_09	compat_netbs
 SUBDIR+=	compat_netbsd32_13	compat_netbsd32_20
 SUBDIR+=	compat_netbsd32_30	compat_netbsd32_50
 SUBDIR+=	compat_netbsd32_60	compat_netbsd32_80
-SUBDIR+=	compat_netbsd32_43
+#SUBDIR+=	compat_netbsd32_43
 SUBDIR+=	compat_netbsd32_mqueue
 SUBDIR+=	compat_netbsd32_nfssrv
 SUBDIR+=	compat_netbsd32_ptrace
@@ -285,7 +285,7 @@ SUBDIR+=	compat_netbsd32_09	compat_netbs
 SUBDIR+=	compat_netbsd32_13	compat_netbsd32_20
 SUBDIR+=	compat_netbsd32_30	compat_netbsd32_50
 SUBDIR+=	compat_netbsd32_60	compat_netbsd32_80
-SUBDIR+=	compat_netbsd32_43
+#SUBDIR+=	compat_netbsd32_43
 SUBDIR+=	compat_netbsd32_mqueue
 SUBDIR+=	compat_netbsd32_nfssrv
 SUBDIR+=	compat_netbsd32_ptrace

Index: src/sys/modules/compat_netbsd32_09/Makefile
diff -u src/sys/modules/compat_netbsd32_09/Makefile:1.1.2.1 src/sys/modules/compat_netbsd32_09/Makefile:1.1.2.2
--- src/sys/modules/compat_netbsd32_09/Makefile:1.1.2.1	Mon Sep 10 09:54:47 2018
+++ src/sys/modules/compat_netbsd32_09/Makefile	Tue Sep 11 04:20:50 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.1.2.1 2018/09/10 09:54:47 pgoyette Exp $
+#	$NetBSD: Makefile,v 1.1.2.2 2018/09/11 04:20:50 pgoyette Exp $
 
 .include "../Makefile.inc"
 
@@ -6,6 +6,7 @@
 
 KMOD=	compat_netbsd32_09
 
+CPPFLAGS+=	-DCOMPAT_NETBSD32
 CPPFLAGS+=	-DCOMPAT_09 -DCOMPAT_10 -DCOMPAT_12
 CPPFLAGS+=	-DCOMPAT_13 -DCOMPAT_14 -DCOMPAT_16 -DCOMPAT_20 -DCOMPAT_30
 CPPFLAGS+=	-DCOMPAT_40 -DCOMPAT_50 -DCOMPAT_60 -DCOMPAT_70 -DCOMPAT_80

Index: src/sys/modules/compat_netbsd32_12/Makefile
diff -u src/sys/modules/compat_netbsd32_12/Makefile:1.1.2.1 src/sys/modules/compat_netbsd32_12/Makefile:1.1.2.2
--- src/sys/modules/compat_netbsd32_12/Makefile:1.1.2.1	Mon Sep 10 09:54:47 2018
+++ src/sys/modules/compat_netbsd32_12/Makefile	Tue Sep 11 04:20:51 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.1.2.1 2018/09/10 09:54:47 pgoyette Exp $
+#	$NetBSD: Makefile,v 1.1.2.2 2018/09/11 04:20:51 pgoyette Exp $
 
 .include "../Makefile.inc"
 
@@ -6,6 +6,7 @@
 
 KMOD=	compat_netbsd32_12
 
+CPPFLAGS+=	-DCOMPAT_NETBSD32
 CPPFLAGS+=	-DCOMPAT_12
 CPPFLAGS+=	-DCOMPAT_13 -DCOMPAT_14 -DCOMPAT_16 -DCOMPAT_20 -DCOMPAT_30
 CPPFLAGS+=	-DCOMPAT_40 -DCOMPAT_50 -DCOMPAT_60 -DCOMPAT_70 -DCOMPAT_80

Index: src/sys/modules/compat_netbsd32_13/Makefile
diff -u src/sys/modules/compat_netbsd32_13/Makefile:1.1.2.1 src/sys/modules/compat_netbsd32_13/Makefile:1.1.2.2
--- src/sys/modules/compat_netbsd32_13/Makefile:1.1.2.1	Mon Sep 10 10:49:10 2018
+++ src/sys/modules/compat_netbsd32_13/Makefile	Tue Sep 11 04:20:51 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.1.2.1 2018/09/10 10:49:10 pgoyette Exp $
+#	$NetBSD: Makefile,v 1.1.2.2 2018/09/11 04:20:51 pgoyette Exp $
 
 .include "../Makefile.inc"
 
@@ -6,6 +6,7 @@
 
 KMOD=	compat_netbsd32_13
 
+CPPFLAGS+=	-DCOMPAT_NETBSD32
 CPPFLAGS+=	-DCOMPAT_13 -DCOMPAT_14 -DCOMPAT_16 -DCOMPAT_20 -DCOMPAT_30
 CPPFLAGS+=	-DCOMPAT_40 -DCOMPAT_50 -DCOMPAT_60 -DCOMPAT_70 -DCOMPAT_80

CVS commit: src/bin/sh

2018-09-10 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Tue Sep 11 03:30:40 UTC 2018

Modified Files:
src/bin/sh: jobs.h

Log Message:
Whitespace cleanup from last update.   NFC.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/bin/sh/jobs.h

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

Modified files:

Index: src/bin/sh/jobs.h
diff -u src/bin/sh/jobs.h:1.22 src/bin/sh/jobs.h:1.23
--- src/bin/sh/jobs.h:1.22	Tue Sep  4 23:16:30 2018
+++ src/bin/sh/jobs.h	Tue Sep 11 03:30:40 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: jobs.h,v 1.22 2018/09/04 23:16:30 kre Exp $	*/
+/*	$NetBSD: jobs.h,v 1.23 2018/09/11 03:30:40 kre Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -79,7 +79,7 @@ struct job {
 	char	flags;	
 #define	JOBCHANGED	1	/* set if status has changed */
 #define	JOBWANTED	2	/* set if this is a job being sought */
-#define JPIPEFAIL	4	/* set if -o pipefail when job created */
+#define	JPIPEFAIL	4	/* set if -o pipefail when job created */
 #if JOBS
 	char 	jobctl;		/* job running under job control */
 	int	prev_job;	/* previous job index */



CVS commit: [pgoyette-compat] src/sys/compat/netbsd32

2018-09-10 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Tue Sep 11 02:53:56 UTC 2018

Modified Files:
src/sys/compat/netbsd32 [pgoyette-compat]: netbsd32_compat_09.c
netbsd32_compat_12.c netbsd32_compat_13.c netbsd32_compat_20.c
netbsd32_compat_30.c netbsd32_compat_50.c netbsd32_compat_60.c

Log Message:
Use netbsd32 syscall names in the establish/disestablish tables


To generate a diff of this commit:
cvs rdiff -u -r1.18.86.1 -r1.18.86.2 \
src/sys/compat/netbsd32/netbsd32_compat_09.c
cvs rdiff -u -r1.33.36.3 -r1.33.36.4 \
src/sys/compat/netbsd32/netbsd32_compat_12.c
cvs rdiff -u -r1.26.28.2 -r1.26.28.3 \
src/sys/compat/netbsd32/netbsd32_compat_13.c
cvs rdiff -u -r1.36.10.4 -r1.36.10.5 \
src/sys/compat/netbsd32/netbsd32_compat_20.c
cvs rdiff -u -r1.31.16.3 -r1.31.16.4 \
src/sys/compat/netbsd32/netbsd32_compat_30.c
cvs rdiff -u -r1.32.16.2 -r1.32.16.3 \
src/sys/compat/netbsd32/netbsd32_compat_50.c
cvs rdiff -u -r1.3.2.2 -r1.3.2.3 src/sys/compat/netbsd32/netbsd32_compat_60.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_compat_09.c
diff -u src/sys/compat/netbsd32/netbsd32_compat_09.c:1.18.86.1 src/sys/compat/netbsd32/netbsd32_compat_09.c:1.18.86.2
--- src/sys/compat/netbsd32/netbsd32_compat_09.c:1.18.86.1	Mon Sep 10 09:54:47 2018
+++ src/sys/compat/netbsd32/netbsd32_compat_09.c	Tue Sep 11 02:53:56 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_compat_09.c,v 1.18.86.1 2018/09/10 09:54:47 pgoyette Exp $	*/
+/*	$NetBSD: netbsd32_compat_09.c,v 1.18.86.2 2018/09/11 02:53:56 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 1998 Matthew R. Green
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_09.c,v 1.18.86.1 2018/09/10 09:54:47 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_09.c,v 1.18.86.2 2018/09/11 02:53:56 pgoyette Exp $");
 
 #include 
 #include 
@@ -41,6 +41,7 @@ __KERNEL_RCSID(0, "$NetBSD: netbsd32_com
 #include 
 
 #include 
+#include 
 #include 
 
 int
@@ -86,13 +87,14 @@ compat_09_netbsd32_uname(struct lwp *l, 
 	NETBSD32TOP_UAP(name, struct outsname);
 	return (compat_09_sys_uname(l, , retval));
 }
-
+NETBSD32_SYS_compat_30_netbsd32_fhstat
 static struct syscall_package compat_netbsd32_09_syscalls[] = {
-{ NETBSD32_SYS_ogetdomainname, 0,
+{ NETBSD32_SYS_compat_30_netbsd32_ogetdomainname, 0,
 (sy_call_t *)compat_09_netbsd32_ogetdomainname },
-{ NETBSD32_SYS_osetdomainname, 0,
+{ NETBSD32_SYS_compat_30_netbsd32_osetdomainname, 0,
 (sy_call_t *)compat_09_netbsd32_osetdomainname },
-{ NETBSD32_SYS_ouname, 0, (sy_call_t *)compat_09_netbsd32_uname },
+{ NETBSD32_SYS_compat_30_netbsd32_ouname, 0,
+	(sy_call_t *)compat_09_netbsd32_uname },
 { 0, 0, NULL }
 };
 

Index: src/sys/compat/netbsd32/netbsd32_compat_12.c
diff -u src/sys/compat/netbsd32/netbsd32_compat_12.c:1.33.36.3 src/sys/compat/netbsd32/netbsd32_compat_12.c:1.33.36.4
--- src/sys/compat/netbsd32/netbsd32_compat_12.c:1.33.36.3	Tue Sep 11 01:52:00 2018
+++ src/sys/compat/netbsd32/netbsd32_compat_12.c	Tue Sep 11 02:53:56 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_compat_12.c,v 1.33.36.3 2018/09/11 01:52:00 pgoyette Exp $	*/
+/*	$NetBSD: netbsd32_compat_12.c,v 1.33.36.4 2018/09/11 02:53:56 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_12.c,v 1.33.36.3 2018/09/11 01:52:00 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_12.c,v 1.33.36.4 2018/09/11 02:53:56 pgoyette Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd.h"
@@ -51,6 +51,7 @@ __KERNEL_RCSID(0, "$NetBSD: netbsd32_com
 #include 
 
 #include 
+#include 
 #include 
 
 static void netbsd32_stat12_to_netbsd32(struct stat12 *,
@@ -211,19 +212,19 @@ compat_12_netbsd32_getdirentries(struct 
 }
 
 static struct syscall_package compat_netbsd32_12_syscalls[] = {
-	{ NETBSD32_SYS_reboot, 0,
+	{ NETBSD32_SYS_compat_12_netbsd32_reboot, 0,
 	(sy_call_t *)compat_12_netbsd32_reboot },
-	{ NETBSD32_SYS_msync, 0,
+	{ NETBSD32_SYS_compat_12_netbsd32_msync, 0,
 	(sy_call_t *)compat_12_netbsd32_msync },
-	{ NETBSD32_SYS_swapon, 0,
+	{ NETBSD32_SYS_compat_12_netbsd32_swapon, 0,
 	(sy_call_t *)compat_12_netbsd32_swapon },
-	{ NETBSD32_SYS_stat12, 0,
+	{ NETBSD32_SYS_compat_12_netbsd32_stat12, 0,
 	(sy_call_t *)compat_12_netbsd32_stat12 },
-	{ NETBSD32_SYS_fstat12, 0,
+	{ NETBSD32_SYS_compat_12_netbsd32_fstat12, 0,
 	(sy_call_t *)compat_12_netbsd32_fstat12 },
-	{ NETBSD32_SYS_lstat12, 0,
+	{ NETBSD32_SYS_compat_12_netbsd32_lstat12, 0,
 	(sy_call_t *)compat_12_netbsd32_lstat12 },
-	{ NETBSD32_SYS_getdirentries, 0,
+	{ NETBSD32_SYS_compat_12_netbsd32_getdirentries, 0,
 	(sy_call_t *)compat_12_netbsd32_getdirentries },
 	{ 0, 0, NULL }
 };

Index: 

CVS commit: src/sys/external/bsd/libnv/dist

2018-09-10 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Sep 11 02:20:31 UTC 2018

Modified Files:
src/sys/external/bsd/libnv/dist: nvlist.c nvlist_impl.h

Log Message:
add dead...


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/external/bsd/libnv/dist/nvlist.c
cvs rdiff -u -r1.2 -r1.3 src/sys/external/bsd/libnv/dist/nvlist_impl.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/external/bsd/libnv/dist/nvlist.c
diff -u src/sys/external/bsd/libnv/dist/nvlist.c:1.4 src/sys/external/bsd/libnv/dist/nvlist.c:1.5
--- src/sys/external/bsd/libnv/dist/nvlist.c:1.4	Sat Sep  8 10:32:25 2018
+++ src/sys/external/bsd/libnv/dist/nvlist.c	Mon Sep 10 22:20:31 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: nvlist.c,v 1.4 2018/09/08 14:32:25 christos Exp $	*/
+/*	$NetBSD: nvlist.c,v 1.5 2018/09/11 02:20:31 christos Exp $	*/
 
 /*-
  * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
@@ -36,7 +36,7 @@
 #ifdef __FreeBSD__
 __FBSDID("$FreeBSD: head/sys/contrib/libnv/nvlist.c 335347 2018-06-18 22:57:32Z oshogbo $");
 #else
-__RCSID("$NetBSD: nvlist.c,v 1.4 2018/09/08 14:32:25 christos Exp $");
+__RCSID("$NetBSD: nvlist.c,v 1.5 2018/09/11 02:20:31 christos Exp $");
 #endif
 
 #include 
@@ -337,7 +337,7 @@ nvlist_set_flags(nvlist_t *nvl, int flag
 	nvl->nvl_flags = flags;
 }
 
-void
+__dead void
 nvlist_report_missing(int type, const char *name)
 {
 

Index: src/sys/external/bsd/libnv/dist/nvlist_impl.h
diff -u src/sys/external/bsd/libnv/dist/nvlist_impl.h:1.2 src/sys/external/bsd/libnv/dist/nvlist_impl.h:1.3
--- src/sys/external/bsd/libnv/dist/nvlist_impl.h:1.2	Sat Sep  8 10:02:15 2018
+++ src/sys/external/bsd/libnv/dist/nvlist_impl.h	Mon Sep 10 22:20:31 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: nvlist_impl.h,v 1.2 2018/09/08 14:02:15 christos Exp $	*/
+/*	$NetBSD: nvlist_impl.h,v 1.3 2018/09/11 02:20:31 christos Exp $	*/
 
 /*-
  * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
@@ -47,7 +47,7 @@
 #include 
 #endif
 
-void nvlist_report_missing(int type, const char *name);
+__dead void nvlist_report_missing(int type, const char *name);
 nvpair_t *nvlist_get_nvpair_parent(const nvlist_t *nvl);
 const unsigned char *nvlist_unpack_header(nvlist_t *nvl,
 const unsigned char *ptr, size_t nfds, bool *isbep, size_t *leftp);



CVS commit: [pgoyette-compat] src/sys/compat/netbsd32

2018-09-10 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Tue Sep 11 01:52:00 UTC 2018

Modified Files:
src/sys/compat/netbsd32 [pgoyette-compat]: netbsd32_compat_10.c
netbsd32_compat_12.c netbsd32_compat_13.c netbsd32_compat_20.c
netbsd32_compat_30.c netbsd32_compat_50.c netbsd32_compat_60.c
netbsd32_syscall.h netbsd32_syscallargs.h netbsd32_syscalls.c
netbsd32_syscalls_autoload.c netbsd32_sysent.c
netbsd32_systrace_args.c

Log Message:
Regen syscall files and fix includes for syscallvar.h


To generate a diff of this commit:
cvs rdiff -u -r1.25.16.1 -r1.25.16.2 \
src/sys/compat/netbsd32/netbsd32_compat_10.c
cvs rdiff -u -r1.33.36.2 -r1.33.36.3 \
src/sys/compat/netbsd32/netbsd32_compat_12.c
cvs rdiff -u -r1.26.28.1 -r1.26.28.2 \
src/sys/compat/netbsd32/netbsd32_compat_13.c
cvs rdiff -u -r1.36.10.3 -r1.36.10.4 \
src/sys/compat/netbsd32/netbsd32_compat_20.c
cvs rdiff -u -r1.31.16.2 -r1.31.16.3 \
src/sys/compat/netbsd32/netbsd32_compat_30.c
cvs rdiff -u -r1.32.16.1 -r1.32.16.2 \
src/sys/compat/netbsd32/netbsd32_compat_50.c
cvs rdiff -u -r1.3.2.1 -r1.3.2.2 src/sys/compat/netbsd32/netbsd32_compat_60.c
cvs rdiff -u -r1.134.2.3 -r1.134.2.4 \
src/sys/compat/netbsd32/netbsd32_syscall.h
cvs rdiff -u -r1.134.2.2 -r1.134.2.3 \
src/sys/compat/netbsd32/netbsd32_syscallargs.h
cvs rdiff -u -r1.132.2.3 -r1.132.2.4 \
src/sys/compat/netbsd32/netbsd32_syscalls.c
cvs rdiff -u -r1.13.2.2 -r1.13.2.3 \
src/sys/compat/netbsd32/netbsd32_syscalls_autoload.c
cvs rdiff -u -r1.132.2.2 -r1.132.2.3 \
src/sys/compat/netbsd32/netbsd32_sysent.c
cvs rdiff -u -r1.24.2.2 -r1.24.2.3 \
src/sys/compat/netbsd32/netbsd32_systrace_args.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_compat_10.c
diff -u src/sys/compat/netbsd32/netbsd32_compat_10.c:1.25.16.1 src/sys/compat/netbsd32/netbsd32_compat_10.c:1.25.16.2
--- src/sys/compat/netbsd32/netbsd32_compat_10.c:1.25.16.1	Mon Sep 10 09:54:47 2018
+++ src/sys/compat/netbsd32/netbsd32_compat_10.c	Tue Sep 11 01:52:00 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_compat_10.c,v 1.25.16.1 2018/09/10 09:54:47 pgoyette Exp $	*/
+/*	$NetBSD: netbsd32_compat_10.c,v 1.25.16.2 2018/09/11 01:52:00 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 1994 Adam Glass and Charles M. Hannum.  All rights reserved.
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_10.c,v 1.25.16.1 2018/09/10 09:54:47 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_10.c,v 1.25.16.2 2018/09/11 01:52:00 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_sysv.h"
@@ -47,9 +47,9 @@ __KERNEL_RCSID(0, "$NetBSD: netbsd32_com
 
 #include 
 #include 
+#include 
 
 #include 
-#include 
 #include 
 #include 
 

Index: src/sys/compat/netbsd32/netbsd32_compat_12.c
diff -u src/sys/compat/netbsd32/netbsd32_compat_12.c:1.33.36.2 src/sys/compat/netbsd32/netbsd32_compat_12.c:1.33.36.3
--- src/sys/compat/netbsd32/netbsd32_compat_12.c:1.33.36.2	Mon Sep 10 10:49:09 2018
+++ src/sys/compat/netbsd32/netbsd32_compat_12.c	Tue Sep 11 01:52:00 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_compat_12.c,v 1.33.36.2 2018/09/10 10:49:09 pgoyette Exp $	*/
+/*	$NetBSD: netbsd32_compat_12.c,v 1.33.36.3 2018/09/11 01:52:00 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_12.c,v 1.33.36.2 2018/09/10 10:49:09 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_12.c,v 1.33.36.3 2018/09/11 01:52:00 pgoyette Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd.h"
@@ -46,11 +46,11 @@ __KERNEL_RCSID(0, "$NetBSD: netbsd32_com
 #include 
 
 #include 
+#include 
 
 #include 
 
 #include 
-#include 
 #include 
 
 static void netbsd32_stat12_to_netbsd32(struct stat12 *,

Index: src/sys/compat/netbsd32/netbsd32_compat_13.c
diff -u src/sys/compat/netbsd32/netbsd32_compat_13.c:1.26.28.1 src/sys/compat/netbsd32/netbsd32_compat_13.c:1.26.28.2
--- src/sys/compat/netbsd32/netbsd32_compat_13.c:1.26.28.1	Mon Sep 10 10:49:09 2018
+++ src/sys/compat/netbsd32/netbsd32_compat_13.c	Tue Sep 11 01:52:00 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_compat_13.c,v 1.26.28.1 2018/09/10 10:49:09 pgoyette Exp $	*/
+/*	$NetBSD: netbsd32_compat_13.c,v 1.26.28.2 2018/09/11 01:52:00 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_13.c,v 1.26.28.1 2018/09/10 10:49:09 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_13.c,v 1.26.28.2 2018/09/11 01:52:00 pgoyette Exp $");
 
 #include 
 #include 
@@ -37,9 +37,9 @@ __KERNEL_RCSID(0, "$NetBSD: netbsd32_com
 #include 
 #include 
 #include 
+#include 
 
 #include 
-#include 
 #include 
 
 #include 

Index: src/sys/compat/netbsd32/netbsd32_compat_20.c
diff -u 

CVS commit: [pgoyette-compat] src/sys/compat/netbsd32

2018-09-10 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Tue Sep 11 01:45:19 UTC 2018

Modified Files:
src/sys/compat/netbsd32 [pgoyette-compat]: syscalls.master

Log Message:
Update for module-provided compat syscalls


To generate a diff of this commit:
cvs rdiff -u -r1.120.2.6 -r1.120.2.7 src/sys/compat/netbsd32/syscalls.master

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/syscalls.master
diff -u src/sys/compat/netbsd32/syscalls.master:1.120.2.6 src/sys/compat/netbsd32/syscalls.master:1.120.2.7
--- src/sys/compat/netbsd32/syscalls.master:1.120.2.6	Mon Sep 10 22:50:51 2018
+++ src/sys/compat/netbsd32/syscalls.master	Tue Sep 11 01:45:19 2018
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.120.2.6 2018/09/10 22:50:51 pgoyette Exp $
+	$NetBSD: syscalls.master,v 1.120.2.7 2018/09/11 01:45:19 pgoyette Exp $
 
 ;	from: NetBSD: syscalls.master,v 1.81 1998/07/05 08:49:50 jonathan Exp
 ;	@(#)syscalls.master	8.2 (Berkeley) 1/13/94
@@ -70,7 +70,7 @@
 5	STD		{ int|netbsd32||open(netbsd32_charp path, int flags, \
 			... mode_t mode); }
 6	STD		{ int|netbsd32||close(int fd); }
-7	STD MODULAR compat_netbsd32_50	\
+7	COMPAT_50 MODULAR compat_netbsd32_50	\
 			{ int|netbsd32||wait4(int pid, netbsd32_intp status, \
 			int options, netbsd32_rusage50p_t rusage); }
 8	COMPAT_43	{ int|netbsd32||ocreat(netbsd32_charp path, \
@@ -81,14 +81,14 @@
 11	OBSOL		execv
 12	STD		{ int|netbsd32||chdir(netbsd32_charp path); }
 13	STD		{ int|netbsd32||fchdir(int fd); }
-14	STD MODULAR compat_netbsd32_50	\
+14	COMPAT_50 MODULAR compat_netbsd32_50	\
 			{ int|netbsd32||mknod(netbsd32_charp path, mode_t mode, \
 			uint32_t dev); }
 15	STD		{ int|netbsd32||chmod(netbsd32_charp path, mode_t mode); }
 16	STD		{ int|netbsd32||chown(netbsd32_charp path, uid_t uid, \
 			gid_t gid); }
 17	STD		{ int|netbsd32||break(netbsd32_charp nsize); }
-18	STD MODULAR compat_netbsd32_20	\
+18	COMPAT_20 MODULAR compat_netbsd32_20	\
 			{ int|netbsd32||getfsstat(netbsd32_statfsp_t buf, \
 			netbsd32_long bufsize, int flags); }
 19	COMPAT_43	{ netbsd32_long|netbsd32||olseek(int fd, \
@@ -144,7 +144,7 @@
 			netbsd32_sigactionp_t nsa, \
 			netbsd32_sigactionp_t osa); }
 47	NOARGS 		{ gid_t|sys||getgid(void); }
-48	STD MODULAR compat_netbsd32_13	\
+48	COMPAT_13 MODULAR compat_netbsd32_13	\
 			{ int|netbsd32||sigprocmask(int how, \
 			int mask); } sigprocmask13
 49	STD		{ int|netbsd32||__getlogin(netbsd32_charp namebuf, \
@@ -152,13 +152,13 @@
 50	STD		{ int|netbsd32||setlogin(netbsd32_charp namebuf); }
 51	STD		{ int|netbsd32||acct(netbsd32_charp path); }
 52	COMPAT_13 	{ int|sys||sigpending(void); } sigpending13
-53	STD MODULAR compat_netbsd32_13	\
+53	COMPAT_13 MODULAR compat_netbsd32_13	\
 			{ int|netbsd32||sigaltstack13( \
 			netbsd32_sigaltstack13p_t nss, \
 			netbsd32_sigaltstack13p_t oss); }
 54	STD		{ int|netbsd32||ioctl(int fd, netbsd32_u_long com, \
 			... netbsd32_voidp data); }
-55	STD MODULAR compat_netbsd32_12	\
+55	COMPAT_12 MODULAR compat_netbsd32_12	\
 			{ int|netbsd32||reboot(int opt); }
 56	STD		{ int|netbsd32||revoke(netbsd32_charp path); }
 57	STD		{ int|netbsd32||symlink(netbsd32_charp path, \
@@ -174,7 +174,7 @@
 			netbsd32_charp where, netbsd32_intp size, \
 			int arg); }
 64	COMPAT_43	{ int|sys||getpagesize(void); } ogetpagesize
-65	STD MODULAR compat_netbsd32_12	\
+65	COMPAT_12 MODULAR compat_netbsd32_12	\
 			{ int|netbsd32||msync(netbsd32_voidp addr, \
 			netbsd32_size_t len); }
 ; XXX COMPAT_??? for 4.4BSD-compatible vfork(2)?
@@ -203,14 +203,14 @@
 			netbsd32_gid_tp gidset); }
 81	NOARGS 		{ int|sys||getpgrp(void); }
 82	STD		{ int|netbsd32||setpgid(int pid, int pgid); }
-83	STD MODULAR compat_netbsd32_50	\
+83	COMPAT_50 MODULAR compat_netbsd32_50	\
 			{ int|netbsd32||setitimer(int which, \
 			netbsd32_itimerval50p_t itv, \
 			netbsd32_itimerval50p_t oitv); }
 84	COMPAT_43	{ int|sys||wait(void); } owait
-85	STD MODULAR compat_netbsd32_12	\
+85	COMPAT_12 MODULAR compat_netbsd32_12	\
 			{ int|netbsd32||oswapon(netbsd32_charp name); }
-86	STD MODULAR compat_netbsd32_50	\
+86	COMPAT_50 MODULAR compat_netbsd32_50	\
 			{ int|netbsd32||getitimer(int which, \
 			netbsd32_itimerval50p_t itv); }
 87	COMPAT_43	{ int|netbsd32||ogethostname(netbsd32_charp hostname, \
@@ -222,7 +222,7 @@
 91	UNIMPL		getdopt
 92	STD		{ int|netbsd32||fcntl(int fd, int cmd, \
 			... netbsd32_voidp arg); }
-93	STD MODULAR compat_netbsd32_50	\
+93	COMPAT_50 MODULAR compat_netbsd32_50	\
 			{ int|netbsd32||select(int nd, netbsd32_fd_setp_t in, \
 			netbsd32_fd_setp_t ou, netbsd32_fd_setp_t ex, \
 			netbsd32_timeval50p_t tv); }
@@ -230,7 +230,7 @@
 95	STD		{ int|netbsd32||fsync(int fd); }
 96	STD		{ int|netbsd32||setpriority(int which, int who, \
 			int prio); }
-97	STD MODULAR compat_netbsd32_30	\
+97	COMPAT_30 MODULAR 

CVS commit: [pgoyette-compat] src/sys

2018-09-10 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Sep 10 22:50:52 UTC 2018

Modified Files:
src/sys/compat/netbsd32 [pgoyette-compat]: netbsd32_compat_20.c
netbsd32_compat_50.c netbsd32_compat_60.c netbsd32_mod.c
netbsd32_module.c syscalls.master
src/sys/modules/compat_netbsd32 [pgoyette-compat]: Makefile
src/sys/sys [pgoyette-compat]: module.h
Added Files:
src/sys/compat/netbsd32 [pgoyette-compat]: netbsd32_compat_80.c
src/sys/modules/compat_netbsd32_50 [pgoyette-compat]: Makefile
src/sys/modules/compat_netbsd32_60 [pgoyette-compat]: Makefile
src/sys/modules/compat_netbsd32_80 [pgoyette-compat]: Makefile

Log Message:
More work on splitting the compat_netbsd32 module


To generate a diff of this commit:
cvs rdiff -u -r1.36.10.2 -r1.36.10.3 \
src/sys/compat/netbsd32/netbsd32_compat_20.c
cvs rdiff -u -r1.32 -r1.32.16.1 src/sys/compat/netbsd32/netbsd32_compat_50.c
cvs rdiff -u -r1.3 -r1.3.2.1 src/sys/compat/netbsd32/netbsd32_compat_60.c
cvs rdiff -u -r0 -r1.1.2.1 src/sys/compat/netbsd32/netbsd32_compat_80.c
cvs rdiff -u -r1.13.16.3 -r1.13.16.4 src/sys/compat/netbsd32/netbsd32_mod.c
cvs rdiff -u -r1.6.2.3 -r1.6.2.4 src/sys/compat/netbsd32/netbsd32_module.c
cvs rdiff -u -r1.120.2.5 -r1.120.2.6 src/sys/compat/netbsd32/syscalls.master
cvs rdiff -u -r1.20.12.3 -r1.20.12.4 src/sys/modules/compat_netbsd32/Makefile
cvs rdiff -u -r0 -r1.1.2.1 src/sys/modules/compat_netbsd32_50/Makefile
cvs rdiff -u -r0 -r1.1.2.1 src/sys/modules/compat_netbsd32_60/Makefile
cvs rdiff -u -r0 -r1.1.2.1 src/sys/modules/compat_netbsd32_80/Makefile
cvs rdiff -u -r1.41.14.11 -r1.41.14.12 src/sys/sys/module.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_compat_20.c
diff -u src/sys/compat/netbsd32/netbsd32_compat_20.c:1.36.10.2 src/sys/compat/netbsd32/netbsd32_compat_20.c:1.36.10.3
--- src/sys/compat/netbsd32/netbsd32_compat_20.c:1.36.10.2	Mon Sep 10 10:49:09 2018
+++ src/sys/compat/netbsd32/netbsd32_compat_20.c	Mon Sep 10 22:50:51 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_compat_20.c,v 1.36.10.2 2018/09/10 10:49:09 pgoyette Exp $	*/
+/*	$NetBSD: netbsd32_compat_20.c,v 1.36.10.3 2018/09/10 22:50:51 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_20.c,v 1.36.10.2 2018/09/10 10:49:09 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_20.c,v 1.36.10.3 2018/09/10 22:50:51 pgoyette Exp $");
 
 #include 
 #include 
@@ -220,6 +220,12 @@ compat_20_netbsd32_fhstatfs(struct lwp *
 }
 
 static struct syscall_package compat_netbsd32_20_syscalls[] = {
+	{ NETBSD32_SYS_statfs, 0,
+	(sy_call_t *)compat_20_netbsd32_statfs },
+	{ NETBSD32_SYS_fstatfs, 0,
+	(sy_call_t *)compat_20_netbsd32_fstatfs },
+	{ NETBSD32_SYS_fhstatfs, 0,
+	(sy_call_t *)compat_20_netbsd32_fhstatfs },
 	{ NETBSD32_SYS_getfsstat, 0,
 	(sy_call_t *)compat_20_netbsd32_getfsstat },
 	{ 0, 0, NULL }

Index: src/sys/compat/netbsd32/netbsd32_compat_50.c
diff -u src/sys/compat/netbsd32/netbsd32_compat_50.c:1.32 src/sys/compat/netbsd32/netbsd32_compat_50.c:1.32.16.1
--- src/sys/compat/netbsd32/netbsd32_compat_50.c:1.32	Thu Dec  3 10:38:21 2015
+++ src/sys/compat/netbsd32/netbsd32_compat_50.c	Mon Sep 10 22:50:51 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_compat_50.c,v 1.32 2015/12/03 10:38:21 pgoyette Exp $	*/
+/*	$NetBSD: netbsd32_compat_50.c,v 1.32.16.1 2018/09/10 22:50:51 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_50.c,v 1.32 2015/12/03 10:38:21 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_50.c,v 1.32.16.1 2018/09/10 22:50:51 pgoyette Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd.h"
@@ -44,6 +44,7 @@ __KERNEL_RCSID(0, "$NetBSD: netbsd32_com
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -65,6 +66,7 @@ __KERNEL_RCSID(0, "$NetBSD: netbsd32_com
 #include 
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -924,4 +926,79 @@ compat_50_netbsd32_quotactl(struct lwp *
 	return (compat_50_sys_quotactl(l, , retval));
 }
 
+static struct syscall_package compat_netbsd32_50_syscalls[] = {
+	{ NETBSD32_SYS_mknod, 0,
+	(sy_call_t *)compat_50_netbsd32_mknod }, 
+	{ NETBSD32_SYS_select, 0,
+	(sy_call_t *)compat_50_netbsd32_select }, 
+	{ NETBSD32_SYS_gettimeofday, 0,
+	(sy_call_t *)compat_50_netbsd32_gettimeofday }, 
+	{ NETBSD32_SYS_settimeofday, 0,
+	(sy_call_t *)compat_50_netbsd32_settimeofday }, 
+	{ NETBSD32_SYS_utimes, 0,
+	(sy_call_t *)compat_50_netbsd32_utimes }, 
+	{ NETBSD32_SYS_futimes, 0,
+	(sy_call_t *)compat_50_netbsd32_futimes }, 
+	{ NETBSD32_SYS_adjtime, 0,
+	(sy_call_t *)compat_50_netbsd32_adjtime }, 
+	{ 

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

2018-09-10 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon Sep 10 19:43:58 UTC 2018

Modified Files:
src/sys/arch/arm/cortex: gic.c

Log Message:
armgic_ipi_send: use GIC interface number, not CPU index, when setting
the target(s) for an IPI.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/sys/arch/arm/cortex/gic.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/cortex/gic.c
diff -u src/sys/arch/arm/cortex/gic.c:1.36 src/sys/arch/arm/cortex/gic.c:1.37
--- src/sys/arch/arm/cortex/gic.c:1.36	Mon Sep 10 09:48:57 2018
+++ src/sys/arch/arm/cortex/gic.c	Mon Sep 10 19:43:58 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: gic.c,v 1.36 2018/09/10 09:48:57 jmcneill Exp $	*/
+/*	$NetBSD: gic.c,v 1.37 2018/09/10 19:43:58 jmcneill Exp $	*/
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -34,7 +34,7 @@
 #define _INTR_PRIVATE
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: gic.c,v 1.36 2018/09/10 09:48:57 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gic.c,v 1.37 2018/09/10 19:43:58 jmcneill Exp $");
 
 #include 
 #include 
@@ -547,9 +547,12 @@ armgic_ipi_send(struct pic_softc *pic, c
 
 	uint32_t sgir = __SHIFTIN(ARMGIC_SGI_IPIBASE + ipi, GICD_SGIR_SGIINTID);
 	if (kcp != NULL) {
-		uint32_t targets;
-		kcpuset_export_u32(kcp, , sizeof(targets));
-		sgir |= __SHIFTIN(targets, GICD_SGIR_TargetList);
+		uint32_t targets_val = 0;
+		for (int n = 0; n < MAXCPUS; n++) {
+			if (kcpuset_isset(kcp, n))
+targets_val |= sc->sc_target[n];
+		}
+		sgir |= __SHIFTIN(targets_val, GICD_SGIR_TargetList);
 		sgir |= GICD_SGIR_TargetListFilter_List;
 	} else {
 		if (ncpu == 1)



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

2018-09-10 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon Sep 10 19:15:17 UTC 2018

Modified Files:
src/sys/arch/arm/fdt: cpu_fdt.c

Log Message:
Re-add support for cpu nodes with status = "disabled", lost in previous commit


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/arm/fdt/cpu_fdt.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/fdt/cpu_fdt.c
diff -u src/sys/arch/arm/fdt/cpu_fdt.c:1.12 src/sys/arch/arm/fdt/cpu_fdt.c:1.13
--- src/sys/arch/arm/fdt/cpu_fdt.c:1.12	Mon Sep 10 11:05:12 2018
+++ src/sys/arch/arm/fdt/cpu_fdt.c	Mon Sep 10 19:15:16 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu_fdt.c,v 1.12 2018/09/10 11:05:12 ryo Exp $ */
+/* $NetBSD: cpu_fdt.c,v 1.13 2018/09/10 19:15:16 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2017 Jared McNeill 
@@ -30,7 +30,7 @@
 #include "psci_fdt.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cpu_fdt.c,v 1.12 2018/09/10 11:05:12 ryo Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu_fdt.c,v 1.13 2018/09/10 19:15:16 jmcneill Exp $");
 
 #include 
 #include 
@@ -205,6 +205,26 @@ spintable_cpu_on(u_int cpuindex, paddr_t
 }
 #endif /* MULTIPROCESSOR */
 
+static bool
+arm_fdt_cpu_okay(const int child)
+{
+	const char *s;
+
+	s = fdtbus_get_string(child, "device_type");
+	if (!s || strcmp(s, "cpu") != 0)
+		return false;
+
+	s = fdtbus_get_string(child, "status");
+	if (s) {
+		if (strcmp(s, "okay") == 0)
+			return false;
+		if (strcmp(s, "disabled") == 0)
+			return of_hasprop(child, "enable-method");
+		return false;
+	} else {
+		return true;
+	}
+}
 
 void
 arm_fdt_cpu_bootstrap(void)
@@ -213,7 +233,7 @@ arm_fdt_cpu_bootstrap(void)
 	uint64_t mpidr, bp_mpidr;
 	u_int cpuindex;
 	int child, ret;
-	const char *devtype, *method;
+	const char *method;
 
 	const int cpus = OF_finddevice("/cpus");
 	if (cpus == -1) {
@@ -225,9 +245,7 @@ arm_fdt_cpu_bootstrap(void)
 	/* Count CPUs */
 	arm_cpu_max = 0;
 	for (child = OF_child(cpus); child; child = OF_peer(child))
-		if (fdtbus_status_okay(child) && ((devtype =
-		fdtbus_get_string(child, "device_type")) != NULL) &&
-		(strcmp(devtype, "cpu") == 0))
+		if (arm_fdt_cpu_okay(child))
 			arm_cpu_max++;
 
 #if NPSCI_FDT > 0
@@ -242,7 +260,7 @@ arm_fdt_cpu_bootstrap(void)
 	uint32_t started = 0;
 	cpuindex = 1;
 	for (child = OF_child(cpus); child; child = OF_peer(child)) {
-		if (!fdtbus_status_okay(child))
+		if (!arm_fdt_cpu_okay(child))
 			continue;
 		if (fdtbus_get_reg64(child, 0, , NULL) != 0)
 			continue;



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

2018-09-10 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon Sep 10 19:09:38 UTC 2018

Modified Files:
src/sys/arch/arm/amd: seattle_platform.c

Log Message:
psci_fdt_bootstrap -> arm_fdt_cpu_bootstrap


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/amd/seattle_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/amd/seattle_platform.c
diff -u src/sys/arch/arm/amd/seattle_platform.c:1.1 src/sys/arch/arm/amd/seattle_platform.c:1.2
--- src/sys/arch/arm/amd/seattle_platform.c:1.1	Sat Sep  8 00:49:06 2018
+++ src/sys/arch/arm/amd/seattle_platform.c	Mon Sep 10 19:09:38 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: seattle_platform.c,v 1.1 2018/09/08 00:49:06 jmcneill Exp $ */
+/* $NetBSD: seattle_platform.c,v 1.2 2018/09/10 19:09:38 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2018 Jared McNeill 
@@ -33,7 +33,7 @@
 #define _ARM32_BUS_DMA_PRIVATE
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: seattle_platform.c,v 1.1 2018/09/08 00:49:06 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: seattle_platform.c,v 1.2 2018/09/10 19:09:38 jmcneill Exp $");
 
 #include 
 #include 
@@ -60,7 +60,7 @@ __KERNEL_RCSID(0, "$NetBSD: seattle_plat
 #include 
 
 #include 
-#include 
+#include 
 
 #include 
 
@@ -147,7 +147,7 @@ seattle_platform_uart_freq(void)
 
 static const struct arm_platform seattle_platform = {
 	.ap_devmap = seattle_platform_devmap,
-	.ap_bootstrap = psci_fdt_bootstrap,
+	.ap_bootstrap = arm_fdt_cpu_bootstrap,
 	.ap_init_attach_args = seattle_platform_init_attach_args,
 	.ap_early_putchar = seattle_platform_early_putchar,
 	.ap_device_register = seattle_platform_device_register,



CVS commit: [netbsd-8] src/doc

2018-09-10 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Sep 10 17:56:49 UTC 2018

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

Log Message:
Ticket #1019


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.23 -r1.1.2.24 src/doc/CHANGES-8.1

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

Modified files:

Index: src/doc/CHANGES-8.1
diff -u src/doc/CHANGES-8.1:1.1.2.23 src/doc/CHANGES-8.1:1.1.2.24
--- src/doc/CHANGES-8.1:1.1.2.23	Mon Sep 10 16:00:09 2018
+++ src/doc/CHANGES-8.1	Mon Sep 10 17:56:49 2018
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-8.1,v 1.1.2.23 2018/09/10 16:00:09 martin Exp $
+# $NetBSD: CHANGES-8.1,v 1.1.2.24 2018/09/10 17:56:49 martin Exp $
 
 A complete list of changes from the NetBSD 8.0 release to the NetBSD 8.1
 release:
@@ -1013,3 +1013,11 @@ sys/netinet6/in6_l2tp.c1.17
 	reset tunnel.
 	[knakahara, ticket #1018]
 
+sbin/raidctl/raidctl.81.73
+sbin/raidctl/rf_configure.c			1.27-1.32
+sbin/raidctl/rf_configure.h			1.2
+
+	Various raidctl fixes.
+	Support NAME= syntax for disks and spares.
+	[nakayama, ticket #1019]
+



CVS commit: [netbsd-8] src/sbin/raidctl

2018-09-10 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Sep 10 17:56:00 UTC 2018

Modified Files:
src/sbin/raidctl [netbsd-8]: raidctl.8 rf_configure.c rf_configure.h

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

sbin/raidctl/rf_configure.h: revision 1.2
sbin/raidctl/rf_configure.c: revision 1.27
sbin/raidctl/rf_configure.c: revision 1.28
sbin/raidctl/rf_configure.c: revision 1.29
sbin/raidctl/raidctl.8: revision 1.73
sbin/raidctl/rf_configure.c: revision 1.30
sbin/raidctl/rf_configure.c: revision 1.31
sbin/raidctl/rf_configure.c: revision 1.32

support NAME= syntax for disks and spares

 -

stop using magic constants
wrap long lines
use warn{,x}
make static
knf

 -

White space and comment formatting.   NFC.

 -

With char bug[SIZE]  using sizeof(bug[0]) is kind of boring, use
sizeof(bug) instead...

 -

Avoid needless pointer calisthenics: [0] -> foo

 -

Several more cleanups:
1. Don't force use of "for" when "while" works better.
2. No need to check c != '\0' when we also check (c == ' ' || c == '\t')
3. Use the size of the buffer we're using, rather than a different one
   (not really a concern, they're the same size)
4. Don't use fscanf() to read file data, use fgets() & sscanf().
5. After using a pointer as a char *, validate alignment before switching
   to int * (can only fail if kernel #define gets set stupidly)   Or #6...
6. Validate sparemap file name isn't too long for assigned space.
7. recognise that strlen() returns size_t - don't shove it into an int.
8. On out of mem, be more clear which allocation failed in warning msg.

ATF tests all pass.   But I don't think they use sparemap files.


To generate a diff of this commit:
cvs rdiff -u -r1.71 -r1.71.8.1 src/sbin/raidctl/raidctl.8
cvs rdiff -u -r1.26 -r1.26.8.1 src/sbin/raidctl/rf_configure.c
cvs rdiff -u -r1.1 -r1.1.92.1 src/sbin/raidctl/rf_configure.h

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

Modified files:

Index: src/sbin/raidctl/raidctl.8
diff -u src/sbin/raidctl/raidctl.8:1.71 src/sbin/raidctl/raidctl.8:1.71.8.1
--- src/sbin/raidctl/raidctl.8:1.71	Wed Jan  6 22:57:44 2016
+++ src/sbin/raidctl/raidctl.8	Mon Sep 10 17:56:00 2018
@@ -1,4 +1,4 @@
-.\" $NetBSD: raidctl.8,v 1.71 2016/01/06 22:57:44 wiz Exp $
+.\" $NetBSD: raidctl.8,v 1.71.8.1 2018/09/10 17:56:00 martin Exp $
 .\"
 .\" Copyright (c) 1998, 2002 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -388,6 +388,7 @@ START disks
 .Ed
 .Pp
 specifies the three component disks to be used in the RAID device.
+Disk wedges may also be specified with the NAME= syntax.
 If any of the specified drives cannot be found when the RAID device is
 configured, then they will be marked as
 .Sq failed ,

Index: src/sbin/raidctl/rf_configure.c
diff -u src/sbin/raidctl/rf_configure.c:1.26 src/sbin/raidctl/rf_configure.c:1.26.8.1
--- src/sbin/raidctl/rf_configure.c:1.26	Wed Mar  9 19:53:32 2016
+++ src/sbin/raidctl/rf_configure.c	Mon Sep 10 17:56:00 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: rf_configure.c,v 1.26 2016/03/09 19:53:32 christos Exp $	*/
+/*	$NetBSD: rf_configure.c,v 1.26.8.1 2018/09/10 17:56:00 martin Exp $ */
 
 /*
  * Copyright (c) 1995 Carnegie-Mellon University.
@@ -49,7 +49,7 @@
 #include 
 
 #ifndef lint
-__RCSID("$NetBSD: rf_configure.c,v 1.26 2016/03/09 19:53:32 christos Exp $");
+__RCSID("$NetBSD: rf_configure.c,v 1.26.8.1 2018/09/10 17:56:00 martin Exp $");
 #endif
 
 
@@ -58,6 +58,7 @@ __RCSID("$NetBSD: rf_configure.c,v 1.26 
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -65,22 +66,23 @@ __RCSID("$NetBSD: rf_configure.c,v 1.26 
 #include 
 #include "rf_configure.h"
 
-RF_LayoutSW_t *rf_GetLayout(RF_ParityConfig_t parityConfig);
-char   *rf_find_non_white(char *p);
-char   *rf_find_white(char *p);
+static char   *rf_find_non_white(char *, int);
+static char   *rf_find_white(char *);
+static int rf_search_file_for_start_of(const char *, char *, int, FILE *);
+static int rf_get_next_nonblank_line(char *, int, FILE *, const char *);
+
 #define RF_MIN(a,b) (((a) < (b)) ? (a) : (b))
-#define RF_ERRORMSG(s)printf((s))
-#define RF_ERRORMSG1(s,a) printf((s),(a))
-#define RF_ERRORMSG2(s,a,b)   printf((s),(a),(b))
-
-int distSpareYes = 1;
-int distSpareNo = 0;
-
-/* The mapsw[] table below contains all the various RAID types that might
-be supported by the kernel.  The actual supported types are found
-in sys/dev/raidframe/rf_layout.c. */
 
-static RF_LayoutSW_t mapsw[] = {
+static int distSpareYes = 1;
+static int distSpareNo = 0;
+
+/*
+ * The mapsw[] table below contains all the various RAID types that might
+ * be supported by the kernel.  The actual supported types are found
+ * in sys/dev/raidframe/rf_layout.c.
+ */
+
+static const RF_LayoutSW_t mapsw[] = {
 	/* parity declustering */
 	{'T', "Parity declustering",
 	 

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

2018-09-10 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Mon Sep 10 17:25:21 UTC 2018

Modified Files:
src/sys/arch/aarch64/conf: kern.ldscript

Log Message:
reduce the battlefield


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/aarch64/conf/kern.ldscript

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

Modified files:

Index: src/sys/arch/aarch64/conf/kern.ldscript
diff -u src/sys/arch/aarch64/conf/kern.ldscript:1.8 src/sys/arch/aarch64/conf/kern.ldscript:1.9
--- src/sys/arch/aarch64/conf/kern.ldscript:1.8	Thu Aug 30 10:30:05 2018
+++ src/sys/arch/aarch64/conf/kern.ldscript	Mon Sep 10 17:25:21 2018
@@ -10,55 +10,37 @@ SECTIONS
 {
 	.text :
 	{
-		PROVIDE (__kernel_text = .);
-		PROVIDE_HIDDEN (__eprol = .);
+		PROVIDE(__kernel_text = .);
 		*(.text)
-		*(.text.unlikely .text.*_unlikely)
-		*(.text.exit .text.exit.*)
-		*(.text.startup .text.startup.*)
-		*(.text.hot .text.hot.*)
-		*(.stub .text.* .gnu.linkonce.t.*)
-		/* .gnu.warning sections are handled specially by elf32.em.  */
+		*(.text.*)
+		*(.stub)
 	} =0
 
 	/* Move .rodata to the next L2 block to set unexecutable */
-	. = ALIGN (L2_SIZE);
-	PROVIDE (__rodata_start = .);
-	.rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
-	.rodata1: { *(.rodata1) }
-	.eh_frame_hdr : { *(.eh_frame_hdr) }
-	.eh_frame   : ONLY_IF_RO { KEEP (*(.eh_frame)) }
-	.gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table
-	.gcc_except_table.*) }
-
-	/* These sections are generated by the Sun/Oracle C++ compiler.  */
-	.exception_ranges   : ONLY_IF_RO { *(.exception_ranges
-	.exception_ranges*) }
-	PROVIDE (__etext = .);
-	PROVIDE (_etext = .);
-	PROVIDE (etext = .);
+	. = ALIGN(L2_SIZE);
+
+	PROVIDE(__rodata_start = .);
+	.rodata :
+	{
+		*(.rodata)
+		*(.rodata.*)
+	}
+
+	PROVIDE(_etext = .);
+	PROVIDE(etext = .);
 
 	/*
 	 * Adjust the address for the data segment. Move .data to the next
 	 * L2 block, and .text and .rodata will be set readonly if needed.
 	 */
-	PROVIDE (_erodata = .);
-	. = ALIGN (L2_SIZE);
-	. = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
-	/* Exception handling  */
-	.eh_frame   : ONLY_IF_RW { KEEP (*(.eh_frame)) }
-	.gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
-	.exception_ranges   : ONLY_IF_RW { *(.exception_ranges .exception_ranges*) }
-	.got: { *(.got) *(.igot) }
-	. = DATA_SEGMENT_RELRO_END (24, .);
-	.got.plt: { *(.got.plt)  *(.igot.plt) }
-	.data   :
+	PROVIDE(_erodata = .);
+	. = ALIGN(L2_SIZE);
+
+	.data :
 	{
-		PROVIDE (__data_start = .);
-		*(.data .gnu.linkonce.d.*)
-		SORT(CONSTRUCTORS)
+		PROVIDE(__data_start = .);
+		*(.data)
 	}
-	.data1  : { *(.data1) }
 
 	. = ALIGN(64);	/* COHERENCY_UNIT */
 	.data.cacheline_aligned :
@@ -72,15 +54,15 @@ SECTIONS
 	}
 	. = ALIGN(64);	/* COHERENCY_UNIT */
 
-	_edata = .; PROVIDE (edata = .);
-	. = .;
+	_edata = .;
+	PROVIDE (edata = .);
 
 	__bss_start = .;
 	__bss_start__ = .;
 	.bss :
 	{
-		*(.dynbss)
-		*(.bss .bss.* .gnu.linkonce.b.*)
+		*(.bss)
+		*(.bss.*)
 		*(COMMON)
 
 		/*
@@ -94,13 +76,11 @@ SECTIONS
 		 */
 		. = ALIGN(. != 0 ? 32 / 8 : 1);
 	}
-	_bss_end__ = . ; __bss_end__ = . ;
-	. = ALIGN(32 / 8);
+	_bss_end__ = . ;
+	__bss_end__ = . ;
 	. = ALIGN(32 / 8);
 
 	__end__ = . ;
-	_end = .; PROVIDE (end = .);
-	. = DATA_SEGMENT_END (.);
-	.ARM.attributes 0 : { KEEP (*(.ARM.attributes)) KEEP (*(.gnu.attributes)) }
-	.note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) }
+	_end = .;
+	PROVIDE(end = .);
 }



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

2018-09-10 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Mon Sep 10 17:25:15 UTC 2018

Modified Files:
src/sys/arch/aarch64/aarch64: copyinout.S trap.c

Log Message:
changed kcopy() to asm to avoid replacement memcpy() to kasan_memcpy() when 
defined KASAN.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/aarch64/aarch64/copyinout.S
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/aarch64/aarch64/trap.c

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

Modified files:

Index: src/sys/arch/aarch64/aarch64/copyinout.S
diff -u src/sys/arch/aarch64/aarch64/copyinout.S:1.7 src/sys/arch/aarch64/aarch64/copyinout.S:1.8
--- src/sys/arch/aarch64/aarch64/copyinout.S:1.7	Mon Jul 30 09:08:41 2018
+++ src/sys/arch/aarch64/aarch64/copyinout.S	Mon Sep 10 17:25:15 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: copyinout.S,v 1.7 2018/07/30 09:08:41 ryo Exp $ */
+/* $NetBSD: copyinout.S,v 1.8 2018/09/10 17:25:15 ryo Exp $ */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -33,7 +33,7 @@
 #include 
 #include "assym.h"
 
-RCSID("$NetBSD: copyinout.S,v 1.7 2018/07/30 09:08:41 ryo Exp $");
+RCSID("$NetBSD: copyinout.S,v 1.8 2018/09/10 17:25:15 ryo Exp $");
 
 	.macro enter_cpu_onfault
 	stp	fp, lr, [sp, #-16]!	/* save fp, lr */
@@ -312,3 +312,19 @@ copyoutstr_done:
 	exit_cpu_onfault
 	ret
 END(copyoutstr)
+
+
+/* LINTSTUB: int kcopy(const void *src, void *dst, size_t len); */
+
+ENTRY(kcopy)
+	enter_cpu_onfault
+
+	mov	x3, x0			/* swap src and dst for memcpy */
+	mov	x0, x1
+	mov	x1, x3
+	bl	_C_LABEL(memcpy)
+	mov	x8, #0			/* error = 0 */
+
+	exit_cpu_onfault
+	ret
+END(kcopy)

Index: src/sys/arch/aarch64/aarch64/trap.c
diff -u src/sys/arch/aarch64/aarch64/trap.c:1.8 src/sys/arch/aarch64/aarch64/trap.c:1.9
--- src/sys/arch/aarch64/aarch64/trap.c:1.8	Sat Jul 28 09:57:59 2018
+++ src/sys/arch/aarch64/aarch64/trap.c	Mon Sep 10 17:25:15 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: trap.c,v 1.8 2018/07/28 09:57:59 ryo Exp $ */
+/* $NetBSD: trap.c,v 1.9 2018/09/10 17:25:15 ryo Exp $ */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include 
 
-__KERNEL_RCSID(1, "$NetBSD: trap.c,v 1.8 2018/07/28 09:57:59 ryo Exp $");
+__KERNEL_RCSID(1, "$NetBSD: trap.c,v 1.9 2018/09/10 17:25:15 ryo Exp $");
 
 #include "opt_arm_intr_impl.h"
 #include "opt_compat_netbsd32.h"
@@ -421,19 +421,6 @@ ucas_ras_check(struct trapframe *tf)
 }
 
 int
-kcopy(const void *src, void *dst, size_t len)
-{
-	struct faultbuf fb;
-	int error;
-
-	if ((error = cpu_set_onfault()) == 0) {
-		memcpy(dst, src, len);
-		cpu_unset_onfault();
-	}
-	return error;
-}
-
-int
 copystr(const void *kfaddr, void *kdaddr, size_t len, size_t *done)
 {
 	struct faultbuf fb;



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

2018-09-10 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Mon Sep 10 16:43:24 UTC 2018

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

Log Message:
Replace KDASSERT by panic.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/aarch64/aarch64/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/aarch64/aarch64/pmap.c
diff -u src/sys/arch/aarch64/aarch64/pmap.c:1.22 src/sys/arch/aarch64/aarch64/pmap.c:1.23
--- src/sys/arch/aarch64/aarch64/pmap.c:1.22	Mon Sep 10 15:14:50 2018
+++ src/sys/arch/aarch64/aarch64/pmap.c	Mon Sep 10 16:43:24 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.22 2018/09/10 15:14:50 maxv Exp $	*/
+/*	$NetBSD: pmap.c,v 1.23 2018/09/10 16:43:24 maxv Exp $	*/
 
 /*
  * Copyright (c) 2017 Ryo Shimizu 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.22 2018/09/10 15:14:50 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.23 2018/09/10 16:43:24 maxv Exp $");
 
 #include "opt_arm_debug.h"
 #include "opt_ddb.h"
@@ -577,7 +577,9 @@ pmap_steal_memory(vsize_t size, vaddr_t 
 			break;
 	}
 
-	KDASSERT(uvm_physseg_valid_p(bank));
+	if (!uvm_physseg_valid_p(bank)) {
+		panic("%s: no memory", __func__);
+	}
 
 	/* Steal pages */
 	pa = ptoa(uvm_physseg_get_avail_start(bank));



CVS commit: [netbsd-8] src/doc

2018-09-10 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Sep 10 16:00:10 UTC 2018

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

Log Message:
Tickets #1015 - #1018


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.22 -r1.1.2.23 src/doc/CHANGES-8.1

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

Modified files:

Index: src/doc/CHANGES-8.1
diff -u src/doc/CHANGES-8.1:1.1.2.22 src/doc/CHANGES-8.1:1.1.2.23
--- src/doc/CHANGES-8.1:1.1.2.22	Fri Sep  7 12:38:23 2018
+++ src/doc/CHANGES-8.1	Mon Sep 10 16:00:09 2018
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-8.1,v 1.1.2.22 2018/09/07 12:38:23 martin Exp $
+# $NetBSD: CHANGES-8.1,v 1.1.2.23 2018/09/10 16:00:09 martin Exp $
 
 A complete list of changes from the NetBSD 8.0 release to the NetBSD 8.1
 release:
@@ -979,3 +979,37 @@ sys/dev/pci/ixgbe/ix_txrx.c			1.50
 	function).
 	[msaitoh, ticket #1014]
 
+bin/sh/expand.c	1.124,1.127 (patch)
+bin/sh/parser.c	1.148,1.149 (patch)
+bin/sh/syntax.c	1.6 (patch)
+bin/sh/syntax.h	1.9 (partial, patch)
+
+	Fix pattern matching.
+	[kre, ticket #1015]
+
+usr.bin/find/function.c1.77
+
+	Avoid getting "arguemt list too long" in find -exec invocations.
+	[kre, ticket #1016]
+
+distrib/sgimips/instkernel/Makefile		1.13
+sys/arch/sgimips/conf/INSTALL32_IP2x		1.10
+sys/arch/sgimips/hpc/wdsc.c			1.35
+sys/arch/sgimips/sgimips/machdep.c		1.146
+sys/arch/sgimips/stand/boot/Makefile		1.20
+
+	Disable misc options to shrink an INSTALL kernel for IP2x.
+	Fix build failure without options DDB and with pseudo-device ksyms.
+	Use elf2ecoff(1) rather than objcopy(1) to generat ecoff for old
+	machines.
+	Fix wdsc(4) probe failure on HPC1.5 machines
+	(Indigo R3k/R4k, IP6/IP10/IP12).
+	[tsutsui, ticket #1017]
+
+sys/netinet/in_l2tp.c1.16
+sys/netinet6/in6_l2tp.c1.17
+
+	fix: l2tp(4) cannot receive packets after reset session without
+	reset tunnel.
+	[knakahara, ticket #1018]
+



CVS commit: [netbsd-8] src/sys

2018-09-10 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Sep 10 15:58:47 UTC 2018

Modified Files:
src/sys/netinet [netbsd-8]: in_l2tp.c
src/sys/netinet6 [netbsd-8]: in6_l2tp.c

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

sys/netinet6/in6_l2tp.c: revision 1.17
sys/netinet/in_l2tp.c: revision 1.16

fix: l2tp(4) cannot receive packets after reset session without reset tunnel. 
Pointed out by k-goda@IIJ

When the following operations are done after established session, the l2tp0
cannot receive packets until done deletetunnel && tunnel "src" "dst".


ifconfig l2tp0 deletesession
ifconfig l2tp0 deletecookie
ifconfig l2tp0 session 200 100


XXX pullup-8


To generate a diff of this commit:
cvs rdiff -u -r1.2.8.6 -r1.2.8.7 src/sys/netinet/in_l2tp.c
cvs rdiff -u -r1.5.8.6 -r1.5.8.7 src/sys/netinet6/in6_l2tp.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/in_l2tp.c
diff -u src/sys/netinet/in_l2tp.c:1.2.8.6 src/sys/netinet/in_l2tp.c:1.2.8.7
--- src/sys/netinet/in_l2tp.c:1.2.8.6	Fri Jul 13 14:26:47 2018
+++ src/sys/netinet/in_l2tp.c	Mon Sep 10 15:58:47 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: in_l2tp.c,v 1.2.8.6 2018/07/13 14:26:47 martin Exp $	*/
+/*	$NetBSD: in_l2tp.c,v 1.2.8.7 2018/09/10 15:58:47 martin Exp $	*/
 
 /*
  * Copyright (c) 2017 Internet Initiative Japan Inc.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: in_l2tp.c,v 1.2.8.6 2018/07/13 14:26:47 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: in_l2tp.c,v 1.2.8.7 2018/09/10 15:58:47 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_l2tp.h"
@@ -368,16 +368,25 @@ out:
 static int
 in_l2tp_match(struct mbuf *m, int off, int proto, void *arg)
 {
-	struct l2tp_variant *var = arg;
+	struct l2tp_softc *sc = arg;
+	struct l2tp_variant *var;
+	struct psref psref;
 	uint32_t sess_id;
+	int rv = 0;
 
 	KASSERT(proto == IPPROTO_L2TP);
 
+	var = l2tp_getref_variant(sc, );
+	if (__predict_false(var == NULL))
+		return rv;
+
 	/*
 	 * If the packet contains no session ID it cannot match
 	 */
-	if (m_length(m) < off + sizeof(uint32_t))
-		return 0;
+	if (m_length(m) < off + sizeof(uint32_t)) {
+		rv = 0;
+		goto out;
+	}
 
 	/* get L2TP session ID */
 	m_copydata(m, off, sizeof(uint32_t), (void *)_id);
@@ -387,19 +396,26 @@ in_l2tp_match(struct mbuf *m, int off, i
 		 * L2TPv3 control packet received.
 		 * userland daemon(l2tpd?) should process.
 		 */
-		return 32 * 2;
+		rv = 32 * 2;
 	} else if (sess_id == var->lv_my_sess_id)
-		return 32 * 2;
+		rv = 32 * 2;
 	else
-		return 0;
+		rv = 0;
+
+out:
+	l2tp_putref_variant(var, );
+	return rv;
 }
 
 int
 in_l2tp_attach(struct l2tp_variant *var)
 {
+	struct l2tp_softc *sc = var->lv_softc;
 
+	if (sc == NULL)
+		return EINVAL;
 	var->lv_encap_cookie = encap_attach_func(AF_INET, IPPROTO_L2TP,
-	in_l2tp_match, _l2tp_encapsw, var);
+	in_l2tp_match, _l2tp_encapsw, sc);
 	if (var->lv_encap_cookie == NULL)
 		return EEXIST;
 

Index: src/sys/netinet6/in6_l2tp.c
diff -u src/sys/netinet6/in6_l2tp.c:1.5.8.6 src/sys/netinet6/in6_l2tp.c:1.5.8.7
--- src/sys/netinet6/in6_l2tp.c:1.5.8.6	Fri Jul 13 14:26:47 2018
+++ src/sys/netinet6/in6_l2tp.c	Mon Sep 10 15:58:47 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: in6_l2tp.c,v 1.5.8.6 2018/07/13 14:26:47 martin Exp $	*/
+/*	$NetBSD: in6_l2tp.c,v 1.5.8.7 2018/09/10 15:58:47 martin Exp $	*/
 
 /*
  * Copyright (c) 2017 Internet Initiative Japan Inc.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: in6_l2tp.c,v 1.5.8.6 2018/07/13 14:26:47 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: in6_l2tp.c,v 1.5.8.7 2018/09/10 15:58:47 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_l2tp.h"
@@ -361,16 +361,25 @@ out:
 static int
 in6_l2tp_match(struct mbuf *m, int off, int proto, void *arg)
 {
-	struct l2tp_variant *var = arg;
+	struct l2tp_softc *sc = arg;
+	struct l2tp_variant *var;
+	struct psref psref;
 	uint32_t sess_id;
+	int rv = 0;
 
 	KASSERT(proto == IPPROTO_L2TP);
 
+	var = l2tp_getref_variant(sc, );
+	if (__predict_false(var == NULL))
+		return rv;
+
 	/*
 	 * If the packet contains no session ID it cannot match
 	 */
-	if (m_length(m) < off + sizeof(uint32_t))
-		return 0;
+	if (m_length(m) < off + sizeof(uint32_t)) {
+		rv = 0 ;
+		goto out;
+	}
 
 	/* get L2TP session ID */
 	m_copydata(m, off, sizeof(uint32_t), (void *)_id);
@@ -380,19 +389,26 @@ in6_l2tp_match(struct mbuf *m, int off, 
 		 * L2TPv3 control packet received.
 		 * userland daemon(l2tpd?) should process.
 		 */
-		return 128 * 2;
+		rv = 128 * 2;
 	} else if (sess_id == var->lv_my_sess_id)
-		return 128 * 2;
+		rv = 128 * 2;
 	else
-		return 0;
+		rv = 0;
+
+out:
+	l2tp_putref_variant(var, );
+	return rv;
 }
 
 int
 in6_l2tp_attach(struct l2tp_variant *var)
 {
+	struct l2tp_softc *sc = var->lv_softc;
 
+	if (sc == NULL)
+		return EINVAL;
 	var->lv_encap_cookie = 

CVS commit: [netbsd-8] src

2018-09-10 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Sep 10 15:52:36 UTC 2018

Modified Files:
src/distrib/sgimips/instkernel [netbsd-8]: Makefile
src/sys/arch/sgimips/conf [netbsd-8]: INSTALL32_IP2x
src/sys/arch/sgimips/hpc [netbsd-8]: wdsc.c
src/sys/arch/sgimips/sgimips [netbsd-8]: machdep.c
src/sys/arch/sgimips/stand/boot [netbsd-8]: Makefile

Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #1017):

sys/arch/sgimips/conf/INSTALL32_IP2x: revision 1.10
sys/arch/sgimips/stand/boot/Makefile: revision 1.20
sys/arch/sgimips/sgimips/machdep.c: revision 1.146
sys/arch/sgimips/hpc/wdsc.c: revision 1.35
distrib/sgimips/instkernel/Makefile: revision 1.13

Disable misc options to shrink an INSTALL kernel for IP2x.

The ARC BIOS on Indy seems to have ~8MB limit.

Fixes PR port-sgimips/53378 from Naruaki Etomi.
Should be pulled up to netbsd-7 and netbsd-8.

 -

Fix build failure without options DDB and with pseudo-device ksyms.
There is a typo for ksyms (NKSYMS vs NKSYM).

Also use consistent "#if NKSYMS" rather than "#if NKSYMS > 0" etc.
and add comments after corresponding #endif for readability.

Fixes PR port-sgimips/53521 from Naruaki Etomi.
Should be pulled up to (at least) netbsd-8.

 -

Use elf2ecoff(1) rather than objcopy(1) to generat ecoff for old machines.
objcopy(1) was used instead of elf2ecoff(1) since Makefile rev 1.9:
 
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/arch/sgimips/stand/boot/Makefile#rev1.9
but it looks ELF binaries generated by recent binutils are too complicated
to convert them to ecoff for old machines by objcopy(1).

Reported by Naruaki Etomi in PR port-sgimips/53519.
Should be pulled up to at least netbsd-8.

 -

Fix wdsc(4) probe failure on HPC1.5 machines (Indigo R3k/R4k, IP6/IP10/IP12).

The alignment adjustment code was removed in rev 1.36 for common
mips bus_space changes, but the code was not bus_space related
but used for uint32_t register acccess during probe.

Reported and tested by Naruaki Etomi in PR port-sgimips/53522.
Should be pulled up to netbsd-8.

 -

Use elf2ecoff(1) rather than objcopy(1) to generate ecoff kernel.

Reported by Naruaki Etomi in PR port-sgimips/53518.

Should be pulled up to netbsd-7 and netbsd-8.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.12.8.1 src/distrib/sgimips/instkernel/Makefile
cvs rdiff -u -r1.9 -r1.9.40.1 src/sys/arch/sgimips/conf/INSTALL32_IP2x
cvs rdiff -u -r1.34 -r1.34.10.1 src/sys/arch/sgimips/hpc/wdsc.c
cvs rdiff -u -r1.144 -r1.144.6.1 src/sys/arch/sgimips/sgimips/machdep.c
cvs rdiff -u -r1.19 -r1.19.48.1 src/sys/arch/sgimips/stand/boot/Makefile

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

Modified files:

Index: src/distrib/sgimips/instkernel/Makefile
diff -u src/distrib/sgimips/instkernel/Makefile:1.12 src/distrib/sgimips/instkernel/Makefile:1.12.8.1
--- src/distrib/sgimips/instkernel/Makefile:1.12	Wed Mar 23 05:24:11 2016
+++ src/distrib/sgimips/instkernel/Makefile	Mon Sep 10 15:52:36 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.12 2016/03/23 05:24:11 mrg Exp $
+#	$NetBSD: Makefile,v 1.12.8.1 2018/09/10 15:52:36 martin Exp $
 
 .include 
 .include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
@@ -30,9 +30,7 @@ MDSETTARGETS=	INSTALL${NX}_IP2x ${RAMDIS
 MDSET_RELEASEDIR=	binary/kernel
 
 MDSET_SUFFIXES.netbsd-INSTALL${NX}_IP2x=ecoff create-ecoff
-create-ecoff=	${OBJCOPY} --impure -O ecoff-bigmips \
-		-R .pdr -R .mdebug.abi32 -R .comment -R .ident \
-		${.TARGET:R} ${.TARGET}
+create-ecoff=	${ELF2ECOFF} ${.TARGET:R} ${.TARGET}
 
 IMAGE_RELEASEDIR=	installation/diskimage
 

Index: src/sys/arch/sgimips/conf/INSTALL32_IP2x
diff -u src/sys/arch/sgimips/conf/INSTALL32_IP2x:1.9 src/sys/arch/sgimips/conf/INSTALL32_IP2x:1.9.40.1
--- src/sys/arch/sgimips/conf/INSTALL32_IP2x:1.9	Sat Feb  4 22:27:26 2012
+++ src/sys/arch/sgimips/conf/INSTALL32_IP2x	Mon Sep 10 15:52:36 2018
@@ -5,7 +5,7 @@
 # Pull in standard `install' config
 include 	"arch/sgimips/conf/GENERIC32_IP2x"
 
-makeoptions	COPTS="-Os"
+makeoptions	COPTS="-Os -mmemcpy"
 
 # Enable the hooks used for initializing the root memory-disk.
 options MEMORY_DISK_HOOKS
@@ -13,3 +13,60 @@ options MEMORY_DISK_IS_ROOT 
 options MEMORY_DISK_SERVER=0# no userspace memory disk support
 options MEMORY_DISK_ROOT_SIZE=6400 # size of memory disk in blocks (3200k)
 options MEMORY_DISK_RBFLAGS=RB_SINGLE   # boot in single-user mode
+
+# shrink kernel since ARC BIOS seems to have 8MB limit
+options 	FFS_NO_SNAPSHOT
+
+no options 	KTRACE
+no options 	SYSVMSG
+no options 	SYSVSEM
+no options 	SYSVSHM
+no options 	SYSCTL_INCLUDE_DESCR
+no options	COMPAT_15
+no options	COMPAT_16
+no options	COMPAT_20
+no options	COMPAT_30
+no options	COMPAT_40
+no options	COMPAT_LINUX
+
+no file-system	EXT2FS
+no file-system	LFS
+no file-system	NTFS
+no file-system	FDESC
+no 

CVS commit: [netbsd-8] src/usr.bin/find

2018-09-10 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Sep 10 15:48:25 UTC 2018

Modified Files:
src/usr.bin/find [netbsd-8]: function.c

Log Message:
Pull up following revision(s) (requested by kre in ticket #1016):

usr.bin/find/function.c: revision 1.77

Inspired by PR pkg/53543

When calculating the length of the args that can be
appended in a "find  -exec something {} +"
usage, remember to allow for the arg pointers, which
form part of what is allowed in ARG_MAX.

>From a fairly empty installation of HEAD on amd64
and with a "/tmp/args" command that simply prints
its arg count, and the length of the arg strings,
with this mod I see ..

netbsd# find / -exec /tmp/args {} +
Argc 5000 Arglen 107645
Argc 5000 Arglen 151324
Argc 5000 Arglen 187725
Argc 5000 Arglen 206591
Argc 5000 Arglen 172909
Argc 5000 Arglen 186264
Argc 5000 Arglen 167906
Argc 2881 Arglen 98260

The upper limit of 5000 args is in the code.

Using the biggest of those, 5000
args, plus 206591 bytes of strings
uses 246591 bytes total (this excludes
the command name, so add a few more).

That's fairly close to the ARG_MAX
of 262144.

On another system (with longer paths) I see:
(this is just a small part of the output, using a
different version of the dummy command, and a
slightly different invocation)

Args: 4546 Len 218030
Args: 4878 Len 217991
Args: 4813 Len 218028
Args: 4803 Len 218029

There, 4878*8 + 217991 == 257015 which is about
as close as we'd want to come to the arg limit.

XXX pullup -8


To generate a diff of this commit:
cvs rdiff -u -r1.75.8.1 -r1.75.8.2 src/usr.bin/find/function.c

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

Modified files:

Index: src/usr.bin/find/function.c
diff -u src/usr.bin/find/function.c:1.75.8.1 src/usr.bin/find/function.c:1.75.8.2
--- src/usr.bin/find/function.c:1.75.8.1	Thu Jun 15 05:46:49 2017
+++ src/usr.bin/find/function.c	Mon Sep 10 15:48:25 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: function.c,v 1.75.8.1 2017/06/15 05:46:49 snj Exp $	*/
+/*	$NetBSD: function.c,v 1.75.8.2 2018/09/10 15:48:25 martin Exp $	*/
 
 /*-
  * Copyright (c) 1990, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "from: @(#)function.c	8.10 (Berkeley) 5/4/95";
 #else
-__RCSID("$NetBSD: function.c,v 1.75.8.1 2017/06/15 05:46:49 snj Exp $");
+__RCSID("$NetBSD: function.c,v 1.75.8.2 2018/09/10 15:48:25 martin Exp $");
 #endif
 #endif /* not lint */
 
@@ -759,7 +759,9 @@ c_exec(char ***argvp, int isok, char *op
 		size_t c, bufsize;
 
 		cnt = ap - *argvp - 1;			/* units are words */
-		new->ep_maxargs = 5000;
+		new->ep_maxargs = ARG_MAX / (sizeof (char *) + 16);
+		if (new->ep_maxargs > 5000)
+			new->ep_maxargs = 5000;
 		new->e_argv = emalloc((cnt + new->ep_maxargs)
 		* sizeof(*new->e_argv));
 
@@ -780,7 +782,9 @@ c_exec(char ***argvp, int isok, char *op
 errx(1, "Arguments too long");
 			new->e_argv[cnt] = *argv;
 		}
-		bufsize = MAXARG - c;
+		if (c + new->ep_maxargs * sizeof (char *) >= MAXARG)
+			errx(1, "Arguments too long");
+		bufsize = MAXARG - c - new->ep_maxargs * sizeof (char *);
 
 		/*
 		 * Allocate, and then initialize current, base, and



CVS commit: [netbsd-8] src/bin/sh

2018-09-10 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Sep 10 15:45:11 UTC 2018

Modified Files:
src/bin/sh [netbsd-8]: expand.c parser.c syntax.c syntax.h

Log Message:
Pull up following revision(s) via patch (requested by kre in ticket #1015):

bin/sh/expand.c: revision 1.124
bin/sh/expand.c: revision 1.127
bin/sh/parser.c: revision 1.148
bin/sh/parser.c: revision 1.149
bin/sh/syntax.c: revision 1.6
bin/sh/syntax.h: revision 1.9 (partial)

First pass at fixing some of the more arcane pattern matching
possibilities that we do not currently handle all that well.

This mostly means (for now) making sure that quoted pattern
magic characters (as well as quoted sh syntax magic chars)
are properly marked, so they remain known as being quoted,
and do not turn into pattern magic.   Also, make sure that an
unquoted \ in a pattern always quotes whatever comes next
(which, unlike in regular expressions, includes inside []
matches),

 -

Part 2 of pattern matching (glob etc) fixes.
Attempt to correctly deal with \ (both when it is a literal,
in appropriate cases, and when it appears as CTLESC when it was
detected as a quoting character during parsing).

In a pattern, in sh, no quoted character can ever be anything other
than a literal character.   This is quite different than regular
expressions, and even different than other uses of glob matching,
where shell quoting is not an issue.

In something like
ls ?\*.c
the ? is a meta-character, the * is a literal (it was quoted).  This
is nothing new, sh has handled that properly for ever.

But the same happens with
VAR='?\*.c'
and
ls $VAR
which has not always been handled correctly.   Of course, in
ls "$VAR"
nothing in VAR is a meta-character (the entire expansion is quoted)
so even the '\' must match literally (or more accurately, no matching
happens - VAR simply contains an "unusual" filename).  But if it had
been
ls *"$VAR"
then we would be looking for filenames that end with the literal 5
characters that make up $VAR.

The same kinds of things are requires of matching patterns in case
statements, and sub-strings with the % and # operators in variable
expansions.

While here, the final remnant of the ancient !! pattern matching
hack has been removed (the code that actually implemented it was
long gone, but one small piece remained, not doing any real harm,
but potentially wasting time - if someone gave a pattern which would
once have invoked that hack.)


To generate a diff of this commit:
cvs rdiff -u -r1.110.2.4 -r1.110.2.5 src/bin/sh/expand.c
cvs rdiff -u -r1.132.2.5 -r1.132.2.6 src/bin/sh/parser.c
cvs rdiff -u -r1.3.26.1 -r1.3.26.2 src/bin/sh/syntax.c
cvs rdiff -u -r1.7.2.1 -r1.7.2.2 src/bin/sh/syntax.h

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

Modified files:

Index: src/bin/sh/expand.c
diff -u src/bin/sh/expand.c:1.110.2.4 src/bin/sh/expand.c:1.110.2.5
--- src/bin/sh/expand.c:1.110.2.4	Fri Jul 13 14:32:01 2018
+++ src/bin/sh/expand.c	Mon Sep 10 15:45:11 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: expand.c,v 1.110.2.4 2018/07/13 14:32:01 martin Exp $	*/
+/*	$NetBSD: expand.c,v 1.110.2.5 2018/09/10 15:45:11 martin Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)expand.c	8.5 (Berkeley) 5/15/95";
 #else
-__RCSID("$NetBSD: expand.c,v 1.110.2.4 2018/07/13 14:32:01 martin Exp $");
+__RCSID("$NetBSD: expand.c,v 1.110.2.5 2018/09/10 15:45:11 martin Exp $");
 #endif
 #endif /* not lint */
 
@@ -924,7 +924,9 @@ evalvar(const char *p, int flag)
 	varlen++;
 			} else {
 while (*val) {
-	if (quotes && syntax[(int)*val] == CCTL)
+	if (quotes && (varflags & VSQUOTE) &&
+	(syntax[(int)*val] == CCTL ||
+	 syntax[(int)*val] == CBACK))
 		STPUTC(CTLESC, expdest);
 	STPUTC(*val++, expdest);
 }
@@ -1106,7 +1108,7 @@ varvalue(const char *name, int quoted, i
 	int num;
 	char *p;
 	int i;
-	char sep;
+	int sep;
 	char **ap;
 	char const *syntax;
 
@@ -1164,10 +1166,14 @@ varvalue(const char *name, int quoted, i
 			STRTODEST(p);
 			if (!*ap)
 break;
-			if (sep)
+			if (sep) {
+if (quoted && (flag & (EXP_GLOB|EXP_CASE)) &&
+(SQSYNTAX[sep] == CCTL || SQSYNTAX[sep] == CSBACK))
+	STPUTC(CTLESC, expdest);
 STPUTC(sep, expdest);
-			else if ((flag & (EXP_SPLIT|EXP_IN_QUOTES)) == EXP_SPLIT
-			&& !quoted && **ap != '\0')
+			} else
+			if ((flag & (EXP_SPLIT|EXP_IN_QUOTES)) == EXP_SPLIT
+			  && !quoted && **ap != '\0')
 STPUTC('\0', expdest);
 		}
 		return;
@@ -1457,22 +1463,59 @@ expmeta(char *enddir, char *name)
 			metaflag = 1;
 		else if (*p == '[') {
 			q = p + 1;
-			if (*q == '!')
+			if (*q == '!' || *q == '^')
 q++;
 			for (;;) {
 while (*q == CTLQUOTEMARK || *q == CTLNONL)
 	q++;
-if (*q == CTLESC)
+if (*q == ']') {
 	q++;
-if (*q == '/' || *q == '\0')

CVS commit: src/sys/arch/aarch64

2018-09-10 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Mon Sep 10 15:14:50 UTC 2018

Modified Files:
src/sys/arch/aarch64/aarch64: pmap.c
src/sys/arch/aarch64/include: pmap.h

Log Message:
Rename _pmap_alloc_pdp -> pmap_alloc_pdp, and make it public.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/aarch64/aarch64/pmap.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/aarch64/include/pmap.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/aarch64/aarch64/pmap.c
diff -u src/sys/arch/aarch64/aarch64/pmap.c:1.21 src/sys/arch/aarch64/aarch64/pmap.c:1.22
--- src/sys/arch/aarch64/aarch64/pmap.c:1.21	Mon Sep 10 11:05:12 2018
+++ src/sys/arch/aarch64/aarch64/pmap.c	Mon Sep 10 15:14:50 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.21 2018/09/10 11:05:12 ryo Exp $	*/
+/*	$NetBSD: pmap.c,v 1.22 2018/09/10 15:14:50 maxv Exp $	*/
 
 /*
  * Copyright (c) 2017 Ryo Shimizu 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.21 2018/09/10 11:05:12 ryo Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.22 2018/09/10 15:14:50 maxv Exp $");
 
 #include "opt_arm_debug.h"
 #include "opt_ddb.h"
@@ -596,8 +596,8 @@ pmap_reference(struct pmap *pm)
 	atomic_inc_uint(>pm_refcnt);
 }
 
-static pd_entry_t *
-_pmap_alloc_pdp(struct pmap *pm, paddr_t *pap)
+pd_entry_t *
+pmap_alloc_pdp(struct pmap *pm, paddr_t *pap)
 {
 	paddr_t pa;
 
@@ -1300,7 +1300,7 @@ pmap_create(void)
 	pm->pm_asid = -1;
 	SLIST_INIT(>pm_vmlist);
 	mutex_init(>pm_lock, MUTEX_DEFAULT, IPL_VM);
-	pm->pm_l0table = _pmap_alloc_pdp(pm, >pm_l0table_pa);
+	pm->pm_l0table = pmap_alloc_pdp(pm, >pm_l0table_pa);
 	KASSERT(((vaddr_t)pm->pm_l0table & (PAGE_SIZE - 1)) == 0);
 
 	UVMHIST_LOG(pmaphist, "pm=%p, pm_l0table=%016lx, pm_l0table_pa=%016lx",
@@ -1420,7 +1420,7 @@ _pmap_enter(struct pmap *pm, vaddr_t va,
 	idx = l0pde_index(va);
 	pde = l0[idx];
 	if (!l0pde_valid(pde)) {
-		_pmap_alloc_pdp(pm, );
+		pmap_alloc_pdp(pm, );
 		KASSERT(pdppa != POOL_PADDR_INVALID);
 		atomic_swap_64([idx], pdppa | L0_TABLE);
 		l3only = false;
@@ -1432,7 +1432,7 @@ _pmap_enter(struct pmap *pm, vaddr_t va,
 	idx = l1pde_index(va);
 	pde = l1[idx];
 	if (!l1pde_valid(pde)) {
-		_pmap_alloc_pdp(pm, );
+		pmap_alloc_pdp(pm, );
 		KASSERT(pdppa != POOL_PADDR_INVALID);
 		atomic_swap_64([idx], pdppa | L1_TABLE);
 		l3only = false;
@@ -1444,7 +1444,7 @@ _pmap_enter(struct pmap *pm, vaddr_t va,
 	idx = l2pde_index(va);
 	pde = l2[idx];
 	if (!l2pde_valid(pde)) {
-		_pmap_alloc_pdp(pm, );
+		pmap_alloc_pdp(pm, );
 		KASSERT(pdppa != POOL_PADDR_INVALID);
 		atomic_swap_64([idx], pdppa | L2_TABLE);
 		l3only = false;

Index: src/sys/arch/aarch64/include/pmap.h
diff -u src/sys/arch/aarch64/include/pmap.h:1.8 src/sys/arch/aarch64/include/pmap.h:1.9
--- src/sys/arch/aarch64/include/pmap.h:1.8	Fri Aug 10 21:06:42 2018
+++ src/sys/arch/aarch64/include/pmap.h	Mon Sep 10 15:14:50 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.h,v 1.8 2018/08/10 21:06:42 ryo Exp $ */
+/* $NetBSD: pmap.h,v 1.9 2018/09/10 15:14:50 maxv Exp $ */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -135,6 +135,8 @@ const struct pmap_devmap *pmap_devmap_fi
 vaddr_t pmap_devmap_phystov(paddr_t);
 paddr_t pmap_devmap_vtophys(paddr_t);
 
+pd_entry_t *pmap_alloc_pdp(struct pmap *, paddr_t *);
+
 /* devmap use L2 blocks. (2Mbyte) */
 #define DEVMAP_TRUNC_ADDR(x)	((x) & ~L2_OFFSET)
 #define DEVMAP_ROUND_SIZE(x)	(((x) + L2_SIZE - 1) & ~(L2_SIZE - 1))



CVS commit: src/tests/usr.bin/printf

2018-09-10 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Mon Sep 10 15:02:11 UTC 2018

Modified Files:
src/tests/usr.bin/printf: printf.sh t_builtin.sh

Log Message:
Add a test where printf is run twice in the same shell, and the
first invocation uses \c in a %b arg - make sure that 2nd invocation
is not affected by that  (it was until recently, for a very long time).


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/usr.bin/printf/printf.sh
cvs rdiff -u -r1.2 -r1.3 src/tests/usr.bin/printf/t_builtin.sh

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

Modified files:

Index: src/tests/usr.bin/printf/printf.sh
diff -u src/tests/usr.bin/printf/printf.sh:1.1 src/tests/usr.bin/printf/printf.sh:1.2
--- src/tests/usr.bin/printf/printf.sh:1.1	Wed Sep  5 21:05:40 2018
+++ src/tests/usr.bin/printf/printf.sh	Mon Sep 10 15:02:11 2018
@@ -1,4 +1,4 @@
-# $NetBSD: printf.sh,v 1.1 2018/09/05 21:05:40 kre Exp $
+# $NetBSD: printf.sh,v 1.2 2018/09/10 15:02:11 kre Exp $
 #
 # Copyright (c) 2018 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -1345,6 +1345,15 @@ b_SysV_echo_backslash_c()
 	# This is undefined, though would be nice if we could rely upon it
 	# expect "abcd"		%.1b		'a\c' 'b\c' 'c\c' 'd\c' '\c' e
 
+	# Check for interference from one instance of execution of
+	# a builtin printf execution to another
+	# (this makes no sense to test for standalone printf, and for which
+	# the tests don't handle ';' magic args, so this would not work)
+	if $BUILTIN_TEST
+	then
+		expect abcdefjklmno   %s%b%s abc 'def\c' ghi ';' %s%s jkl mno
+	fi
+
 	return $RVAL
 }
 define	b_SysV_echo_backslash_c	'Use of \c in arg to %b format'

Index: src/tests/usr.bin/printf/t_builtin.sh
diff -u src/tests/usr.bin/printf/t_builtin.sh:1.2 src/tests/usr.bin/printf/t_builtin.sh:1.3
--- src/tests/usr.bin/printf/t_builtin.sh:1.2	Sat Sep  8 18:24:01 2018
+++ src/tests/usr.bin/printf/t_builtin.sh	Mon Sep 10 15:02:11 2018
@@ -1,4 +1,4 @@
-# $NetBSD: t_builtin.sh,v 1.2 2018/09/08 18:24:01 kre Exp $
+# $NetBSD: t_builtin.sh,v 1.3 2018/09/10 15:02:11 kre Exp $
 #
 # Copyright (c) 2018 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -63,6 +63,9 @@ do_printf()
 	for ARG
 	do
 		case "${ARG}" in
+		(';')	# Allow multiple commands
+			COMMAND="${COMMAND} ; printf"
+			;;
 		(*\'*)
 			# This is kind of odd, we need a working
 			# printf in order to test printf ...



CVS commit: src/usr.bin/printf

2018-09-10 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Mon Sep 10 14:42:29 UTC 2018

Modified Files:
src/usr.bin/printf: printf.c

Log Message:
A truly ancient bug found by Edgar Fuss

When printf is running builtin in a sh, global vars aren't reset to
0 between invocations.   This affects "rval" which remembers state
from a previous %b \c and thereafter always exits after the first
format conversion, until we get a conversion that generates an
error (which resets the flag almost by accident)

printf %b abc\\c
abc (no \n)
printf %s%s hello world
hello   (no \n, of course, no world ...)
printf %s%s hello world
hello
printf %s%s hello world
hello
printf %d hello
printf: hello: expected numeric value
0   (no \n)
printf %s%s hello world
helloworld  (no \n, and we are back!)

This affects both /bin/sh and /bin/csh (and has for a very long time).

XXX pullup -8


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/usr.bin/printf/printf.c

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

Modified files:

Index: src/usr.bin/printf/printf.c
diff -u src/usr.bin/printf/printf.c:1.45 src/usr.bin/printf/printf.c:1.46
--- src/usr.bin/printf/printf.c:1.45	Tue Sep  4 01:13:50 2018
+++ src/usr.bin/printf/printf.c	Mon Sep 10 14:42:29 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: printf.c,v 1.45 2018/09/04 01:13:50 kre Exp $	*/
+/*	$NetBSD: printf.c,v 1.46 2018/09/10 14:42:29 kre Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993
@@ -41,7 +41,7 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 19
 #if 0
 static char sccsid[] = "@(#)printf.c	8.2 (Berkeley) 3/22/95";
 #else
-__RCSID("$NetBSD: printf.c,v 1.45 2018/09/04 01:13:50 kre Exp $");
+__RCSID("$NetBSD: printf.c,v 1.46 2018/09/10 14:42:29 kre Exp $");
 #endif
 #endif /* not lint */
 
@@ -136,6 +136,8 @@ main(int argc, char *argv[])
 	(void)setlocale (LC_ALL, "");
 #endif
 
+	rval = 0;	/* clear for builtin versions (avoid holdover) */
+
 	while ((o = getopt(argc, argv, "")) != -1) {
 		switch (o) {
 		case '?':



CVS commit: src/sys/kern

2018-09-10 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Mon Sep 10 13:11:05 UTC 2018

Modified Files:
src/sys/kern: subr_pool.c

Log Message:
Correctly align the size+redzone for KASAN, on amd64 it happens to be
always 8byte-aligned but on other architectures it may not be.


To generate a diff of this commit:
cvs rdiff -u -r1.226 -r1.227 src/sys/kern/subr_pool.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/kern/subr_pool.c
diff -u src/sys/kern/subr_pool.c:1.226 src/sys/kern/subr_pool.c:1.227
--- src/sys/kern/subr_pool.c:1.226	Sat Aug 25 05:56:24 2018
+++ src/sys/kern/subr_pool.c	Mon Sep 10 13:11:05 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr_pool.c,v 1.226 2018/08/25 05:56:24 maxv Exp $	*/
+/*	$NetBSD: subr_pool.c,v 1.227 2018/09/10 13:11:05 maxv Exp $	*/
 
 /*-
  * Copyright (c) 1997, 1999, 2000, 2002, 2007, 2008, 2010, 2014, 2015
@@ -33,7 +33,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: subr_pool.c,v 1.226 2018/08/25 05:56:24 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_pool.c,v 1.227 2018/09/10 13:11:05 maxv Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ddb.h"
@@ -2749,8 +2749,17 @@ pool_pattern_generate(const void *p)
 static void
 pool_redzone_init(struct pool *pp, size_t requested_size)
 {
+	size_t redzsz;
 	size_t nsz;
 
+#ifdef KASAN
+	redzsz = requested_size;
+	kasan_add_redzone();
+	redzsz -= requested_size;
+#else
+	redzsz = POOL_REDZONE_SIZE;
+#endif
+
 	if (pp->pr_roflags & PR_NOTOUCH) {
 		pp->pr_reqsize = 0;
 		pp->pr_redzone = false;
@@ -2761,7 +2770,7 @@ pool_redzone_init(struct pool *pp, size_
 	 * We may have extended the requested size earlier; check if
 	 * there's naturally space in the padding for a red zone.
 	 */
-	if (pp->pr_size - requested_size >= POOL_REDZONE_SIZE) {
+	if (pp->pr_size - requested_size >= redzsz) {
 		pp->pr_reqsize = requested_size;
 		pp->pr_redzone = true;
 		return;
@@ -2771,7 +2780,7 @@ pool_redzone_init(struct pool *pp, size_
 	 * No space in the natural padding; check if we can extend a
 	 * bit the size of the pool.
 	 */
-	nsz = roundup(pp->pr_size + POOL_REDZONE_SIZE, pp->pr_align);
+	nsz = roundup(pp->pr_size + redzsz, pp->pr_align);
 	if (nsz <= pp->pr_alloc->pa_pagesz) {
 		/* Ok, we can */
 		pp->pr_size = nsz;
@@ -2791,7 +2800,9 @@ pool_redzone_fill(struct pool *pp, void 
 	if (!pp->pr_redzone)
 		return;
 #ifdef KASAN
-	kasan_alloc(p, pp->pr_reqsize, pp->pr_reqsize + POOL_REDZONE_SIZE);
+	size_t size_with_redzone = pp->pr_reqsize;
+	kasan_add_redzone(_with_redzone);
+	kasan_alloc(p, pp->pr_reqsize, size_with_redzone);
 #else
 	uint8_t *cp, pat;
 	const uint8_t *ep;
@@ -2820,7 +2831,9 @@ pool_redzone_check(struct pool *pp, void
 	if (!pp->pr_redzone)
 		return;
 #ifdef KASAN
-	kasan_free(p, pp->pr_reqsize + POOL_REDZONE_SIZE);
+	size_t size_with_redzone = pp->pr_reqsize;
+	kasan_add_redzone(_with_redzone);
+	kasan_free(p, size_with_redzone);
 #else
 	uint8_t *cp, pat, expected;
 	const uint8_t *ep;



CVS commit: src/sys/arch

2018-09-10 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Mon Sep 10 11:05:12 UTC 2018

Modified Files:
src/sys/arch/aarch64/aarch64: cpu.c locore.S pmap.c
src/sys/arch/aarch64/include: cpu.h
src/sys/arch/arm/broadcom: bcm2835reg.h bcm283x_platform.c
bcm283x_platform.h
src/sys/arch/arm/fdt: arm_fdtvar.h cpu_fdt.c files.fdt psci_fdt.c
src/sys/arch/arm/nvidia: tegra_platform.c
src/sys/arch/arm/rockchip: rk_platform.c
src/sys/arch/arm/sunxi: sunxi_platform.c
src/sys/arch/arm/virt: virt_platform.c
Added Files:
src/sys/arch/arm/fdt: psci_fdtvar.h
Removed Files:
src/sys/arch/arm/fdt: psci_fdt.h

Log Message:
cleanup aarch64 mpstart and fdt bootstrap
 * arm_cpu_hatch_arg is a bad idea. avoid serializing CPU startup, and 
eliminate arm_cpu_hatch_arg.
   in mpstart, resolve own cpu index using array of cpu_mpidr[] (aarch64)
 * add support fdt enable-method "spin-table"
 * add support fdt enable-method "brcm,bcm2836-smp" (for 32bit RaspberryPi)
 * use arm_fdt_cpu_bootstrap() instead of psci_fdt_bootstrap()
 * rename "arm/fdt/psci_fdt.h" to "arm/fdt/psci_fdtvar.h" because of conflict 
of include file for needs-flag
 * add devmap for cpu spin-table of raspberrypi3/aarch64
 * no need to force hatch APs for raspberrypi3/arm32 ifndef MULTIPROCESSOR.
 * fix to work pmap_extract(kerneltext/data/bss) even if before calling 
pmap_bootstrap

idea to use cpu_mpidr[] by jmcneill@. reviewd by skrll@. thanks.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/aarch64/aarch64/cpu.c
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/aarch64/aarch64/locore.S
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/aarch64/aarch64/pmap.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/aarch64/include/cpu.h
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/arm/broadcom/bcm2835reg.h
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/arm/broadcom/bcm283x_platform.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/broadcom/bcm283x_platform.h
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arm/fdt/arm_fdtvar.h
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/arm/fdt/cpu_fdt.c
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/arm/fdt/files.fdt
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/arm/fdt/psci_fdt.c
cvs rdiff -u -r1.2 -r0 src/sys/arch/arm/fdt/psci_fdt.h
cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/fdt/psci_fdtvar.h
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/arm/nvidia/tegra_platform.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/rockchip/rk_platform.c
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/arm/sunxi/sunxi_platform.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/virt/virt_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/aarch64/aarch64/cpu.c
diff -u src/sys/arch/aarch64/aarch64/cpu.c:1.6 src/sys/arch/aarch64/aarch64/cpu.c:1.7
--- src/sys/arch/aarch64/aarch64/cpu.c:1.6	Sun Aug 26 18:15:49 2018
+++ src/sys/arch/aarch64/aarch64/cpu.c	Mon Sep 10 11:05:12 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.c,v 1.6 2018/08/26 18:15:49 ryo Exp $ */
+/* $NetBSD: cpu.c,v 1.7 2018/09/10 11:05:12 ryo Exp $ */
 
 /*
  * Copyright (c) 2017 Ryo Shimizu 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(1, "$NetBSD: cpu.c,v 1.6 2018/08/26 18:15:49 ryo Exp $");
+__KERNEL_RCSID(1, "$NetBSD: cpu.c,v 1.7 2018/09/10 11:05:12 ryo Exp $");
 
 #include "locators.h"
 #include "opt_arm_debug.h"
@@ -63,8 +63,9 @@ static void cpu_identify1(device_t self,
 static void cpu_identify2(device_t self, struct cpu_info *);
 
 #ifdef MULTIPROCESSOR
+uint64_t cpu_mpidr[MAXCPUS];
+
 volatile u_int arm_cpu_hatched __cacheline_aligned = 0;
-volatile u_int arm_cpu_hatch_arg __cacheline_aligned;
 volatile uint32_t arm_cpu_mbox __cacheline_aligned = 0;
 u_int arm_cpu_max = 1;
 

Index: src/sys/arch/aarch64/aarch64/locore.S
diff -u src/sys/arch/aarch64/aarch64/locore.S:1.24 src/sys/arch/aarch64/aarch64/locore.S:1.25
--- src/sys/arch/aarch64/aarch64/locore.S:1.24	Mon Sep 10 07:30:33 2018
+++ src/sys/arch/aarch64/aarch64/locore.S	Mon Sep 10 11:05:12 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.S,v 1.24 2018/09/10 07:30:33 skrll Exp $	*/
+/*	$NetBSD: locore.S,v 1.25 2018/09/10 11:05:12 ryo Exp $	*/
 
 /*
  * Copyright (c) 2017 Ryo Shimizu 
@@ -35,7 +35,7 @@
 #include 
 #include "assym.h"
 
-RCSID("$NetBSD: locore.S,v 1.24 2018/09/10 07:30:33 skrll Exp $")
+RCSID("$NetBSD: locore.S,v 1.25 2018/09/10 11:05:12 ryo Exp $")
 
 /* #define DEBUG_LOCORE */
 /* #define DEBUG_MMU */
@@ -299,14 +299,26 @@ END(printcpu)
 
 ENTRY_NP(aarch64_mpstart)
 ENTRY_NP(cortex_mpstart)	/* compat arm */
-	ADDR	x0, arm_cpu_hatch_arg	/* from cpu0 */
-	ldr	w27, [x0]		/* x27 = cpuindex */
+	mrs	x3, mpidr_el1
+	ldr	x0, =(MPIDR_AFF0|MPIDR_AFF1|MPIDR_AFF2|MPIDR_AFF3)
+	and	x3, x3, x0
+
+	ADDR	x0, cpu_mpidr
+	mov	x1, xzr
+1:
+	add	x1, x1, #1
+	cmp	x1, MAXCPUS		/* cpuindex >= MAXCPUS ? */
+	bge	toomanycpus
+	ldr	x2, [x0, x1, lsl #3]	/* cpu_mpidr[cpunidex] */
+	cmp	x2, x3			/* == mpidr_el1 & MPIDR_AFF ? */
+	bne	1b
+
+	

CVS commit: [pgoyette-compat] src/sys/modules/compat_netbsd32

2018-09-10 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Sep 10 10:59:50 UTC 2018

Modified Files:
src/sys/modules/compat_netbsd32 [pgoyette-compat]: Makefile

Log Message:
Remove from the generic module those files which are being included
in their own version-specific modules.


To generate a diff of this commit:
cvs rdiff -u -r1.20.12.2 -r1.20.12.3 src/sys/modules/compat_netbsd32/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_netbsd32/Makefile
diff -u src/sys/modules/compat_netbsd32/Makefile:1.20.12.2 src/sys/modules/compat_netbsd32/Makefile:1.20.12.3
--- src/sys/modules/compat_netbsd32/Makefile:1.20.12.2	Mon Sep 10 10:49:10 2018
+++ src/sys/modules/compat_netbsd32/Makefile	Mon Sep 10 10:59:50 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.20.12.2 2018/09/10 10:49:10 pgoyette Exp $
+#	$NetBSD: Makefile,v 1.20.12.3 2018/09/10 10:59:50 pgoyette Exp $
 
 .include "../Makefile.inc"
 .include "../Makefile.assym"
@@ -25,9 +25,8 @@ CPPFLAGS+=	-DNTP -DKTRACE -DMODULAR
 
 .PATH:	${S}/compat/netbsd32
 SRCS+=	netbsd32_compat_10.c	# belongs to compat_netbsd32_sysvipc_10
-SRCS+=	netbsd32_compat_13.c
-SRCS+=	netbsd32_compat_14.c netbsd32_compat_20.c
-SRCS+=	netbsd32_compat_30.c netbsd32_compat_43.c
+SRCS+=	netbsd32_compat_14.c	# belongs to compat_netbsd32_sysvipc_14
+SRCS+=	netbsd32_compat_43.c
 SRCS+=	netbsd32_compat_50.c netbsd32_compat_60.c
 SRCS+=	netbsd32_core.c netbsd32_event.c
 SRCS+=	netbsd32_exec_elf32.c



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

2018-09-10 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Mon Sep 10 10:55:03 UTC 2018

Modified Files:
src/sys/arch/arm/cortex: gtmr.c

Log Message:
Typo in comment from Joerg's gtmr diff


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/arm/cortex/gtmr.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/cortex/gtmr.c
diff -u src/sys/arch/arm/cortex/gtmr.c:1.33 src/sys/arch/arm/cortex/gtmr.c:1.34
--- src/sys/arch/arm/cortex/gtmr.c:1.33	Sat Sep  1 20:54:32 2018
+++ src/sys/arch/arm/cortex/gtmr.c	Mon Sep 10 10:55:02 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: gtmr.c,v 1.33 2018/09/01 20:54:32 tnn Exp $	*/
+/*	$NetBSD: gtmr.c,v 1.34 2018/09/10 10:55:02 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: gtmr.c,v 1.33 2018/09/01 20:54:32 tnn Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gtmr.c,v 1.34 2018/09/10 10:55:02 skrll Exp $");
 
 #include 
 #include 
@@ -125,7 +125,7 @@ gtmr_match(device_t parent, cfdata_t cf,
 	if (gtmr_sc.sc_dev != NULL)
 		return 0;
 
-	/* Genertic Timer is always implemented in ARMv8-A */
+	/* Generic Timer is always implemented in ARMv8-A */
 	if (!cpu_gtmr_exists_p())
 		return 0;
 



CVS commit: [pgoyette-compat] src/sys

2018-09-10 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Sep 10 10:49:10 UTC 2018

Modified Files:
src/sys/compat/netbsd32 [pgoyette-compat]: netbsd32_compat_12.c
netbsd32_compat_13.c netbsd32_compat_20.c netbsd32_compat_30.c
syscalls.master
src/sys/modules [pgoyette-compat]: Makefile
src/sys/modules/compat_netbsd32 [pgoyette-compat]: Makefile
Added Files:
src/sys/modules/compat_netbsd32_13 [pgoyette-compat]: Makefile
src/sys/modules/compat_netbsd32_20 [pgoyette-compat]: Makefile
src/sys/modules/compat_netbsd32_30 [pgoyette-compat]: Makefile

Log Message:
More compat_netbsd32_xx modules


To generate a diff of this commit:
cvs rdiff -u -r1.33.36.1 -r1.33.36.2 \
src/sys/compat/netbsd32/netbsd32_compat_12.c
cvs rdiff -u -r1.26 -r1.26.28.1 src/sys/compat/netbsd32/netbsd32_compat_13.c
cvs rdiff -u -r1.36.10.1 -r1.36.10.2 \
src/sys/compat/netbsd32/netbsd32_compat_20.c
cvs rdiff -u -r1.31.16.1 -r1.31.16.2 \
src/sys/compat/netbsd32/netbsd32_compat_30.c
cvs rdiff -u -r1.120.2.4 -r1.120.2.5 src/sys/compat/netbsd32/syscalls.master
cvs rdiff -u -r1.202.2.26 -r1.202.2.27 src/sys/modules/Makefile
cvs rdiff -u -r1.20.12.1 -r1.20.12.2 src/sys/modules/compat_netbsd32/Makefile
cvs rdiff -u -r0 -r1.1.2.1 src/sys/modules/compat_netbsd32_13/Makefile
cvs rdiff -u -r0 -r1.1.2.1 src/sys/modules/compat_netbsd32_20/Makefile
cvs rdiff -u -r0 -r1.1.2.1 src/sys/modules/compat_netbsd32_30/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/compat/netbsd32/netbsd32_compat_12.c
diff -u src/sys/compat/netbsd32/netbsd32_compat_12.c:1.33.36.1 src/sys/compat/netbsd32/netbsd32_compat_12.c:1.33.36.2
--- src/sys/compat/netbsd32/netbsd32_compat_12.c:1.33.36.1	Mon Sep 10 09:54:47 2018
+++ src/sys/compat/netbsd32/netbsd32_compat_12.c	Mon Sep 10 10:49:09 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_compat_12.c,v 1.33.36.1 2018/09/10 09:54:47 pgoyette Exp $	*/
+/*	$NetBSD: netbsd32_compat_12.c,v 1.33.36.2 2018/09/10 10:49:09 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_12.c,v 1.33.36.1 2018/09/10 09:54:47 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_12.c,v 1.33.36.2 2018/09/10 10:49:09 pgoyette Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd.h"
@@ -210,22 +210,22 @@ compat_12_netbsd32_getdirentries(struct 
 	return (compat_12_sys_getdirentries(l, , retval));
 }
 
-static struct syscall_package compat_netbsd32_09_syscalls[] = {
-{ NETBSD32_SYS_reboot, 0,
-(sy_call_t *)compat_12_netbsd32_reboot },
-{ NETBSD32_SYS_msync, 0,
-(sy_call_t *)compat_12_netbsd32_msync },
-{ NETBSD32_SYS_swapon, 0,
-(sy_call_t *)compat_12_netbsd32_swapon },
-{ NETBSD32_SYS_stat12, 0,
-(sy_call_t *)compat_12_netbsd32_stat12 },
-{ NETBSD32_SYS_fstat12, 0,
-(sy_call_t *)compat_12_netbsd32_fstat12 },
-{ NETBSD32_SYS_lstat12, 0,
-(sy_call_t *)compat_12_netbsd32_lstat12 },
-{ NETBSD32_SYS_getdirentries, 0,
-(sy_call_t *)compat_12_netbsd32_getdirentries },
-{ 0, 0, NULL }
+static struct syscall_package compat_netbsd32_12_syscalls[] = {
+	{ NETBSD32_SYS_reboot, 0,
+	(sy_call_t *)compat_12_netbsd32_reboot },
+	{ NETBSD32_SYS_msync, 0,
+	(sy_call_t *)compat_12_netbsd32_msync },
+	{ NETBSD32_SYS_swapon, 0,
+	(sy_call_t *)compat_12_netbsd32_swapon },
+	{ NETBSD32_SYS_stat12, 0,
+	(sy_call_t *)compat_12_netbsd32_stat12 },
+	{ NETBSD32_SYS_fstat12, 0,
+	(sy_call_t *)compat_12_netbsd32_fstat12 },
+	{ NETBSD32_SYS_lstat12, 0,
+	(sy_call_t *)compat_12_netbsd32_lstat12 },
+	{ NETBSD32_SYS_getdirentries, 0,
+	(sy_call_t *)compat_12_netbsd32_getdirentries },
+	{ 0, 0, NULL }
 };
 
 MODULE(MODULE_CLASS_EXEC, compat_netbsd32_12, "compat_netbsd32,compat_12");
@@ -236,8 +236,10 @@ compat_netbsd32_12_modcmd(modcmd_t cmd, 
 
 	switch (cmd) {
 	case MODULE_CMD_INIT:
+		return syscall_establish(NULL, compat_netbsd32_12_syscalls);
 
 	case MODULE_CMD_FINI:
+		return syscall_disestablish(NULL, compat_netbsd32_12_syscalls);
 
 	default:
 		return ENOTTY;

Index: src/sys/compat/netbsd32/netbsd32_compat_13.c
diff -u src/sys/compat/netbsd32/netbsd32_compat_13.c:1.26 src/sys/compat/netbsd32/netbsd32_compat_13.c:1.26.28.1
--- src/sys/compat/netbsd32/netbsd32_compat_13.c:1.26	Fri Jan 24 22:44:00 2014
+++ src/sys/compat/netbsd32/netbsd32_compat_13.c	Mon Sep 10 10:49:09 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_compat_13.c,v 1.26 2014/01/24 22:44:00 christos Exp $	*/
+/*	$NetBSD: netbsd32_compat_13.c,v 1.26.28.1 2018/09/10 10:49:09 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -27,10 +27,11 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_13.c,v 1.26 2014/01/24 

CVS commit: [pgoyette-compat] src/sys

2018-09-10 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Sep 10 09:54:47 UTC 2018

Modified Files:
src/sys/compat/netbsd32 [pgoyette-compat]: netbsd32_compat_09.c
netbsd32_compat_10.c netbsd32_compat_12.c syscalls.master
Added Files:
src/sys/modules/compat_netbsd32_09 [pgoyette-compat]: Makefile
src/sys/modules/compat_netbsd32_12 [pgoyette-compat]: Makefile

Log Message:
Initial cut at a compat_netbsd32_09 and compat_netbsd32_12 modules.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.18.86.1 src/sys/compat/netbsd32/netbsd32_compat_09.c
cvs rdiff -u -r1.25 -r1.25.16.1 src/sys/compat/netbsd32/netbsd32_compat_10.c
cvs rdiff -u -r1.33 -r1.33.36.1 src/sys/compat/netbsd32/netbsd32_compat_12.c
cvs rdiff -u -r1.120.2.3 -r1.120.2.4 src/sys/compat/netbsd32/syscalls.master
cvs rdiff -u -r0 -r1.1.2.1 src/sys/modules/compat_netbsd32_09/Makefile
cvs rdiff -u -r0 -r1.1.2.1 src/sys/modules/compat_netbsd32_12/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/compat/netbsd32/netbsd32_compat_09.c
diff -u src/sys/compat/netbsd32/netbsd32_compat_09.c:1.18 src/sys/compat/netbsd32/netbsd32_compat_09.c:1.18.86.1
--- src/sys/compat/netbsd32/netbsd32_compat_09.c:1.18	Thu May 29 14:51:26 2008
+++ src/sys/compat/netbsd32/netbsd32_compat_09.c	Mon Sep 10 09:54:47 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_compat_09.c,v 1.18 2008/05/29 14:51:26 mrg Exp $	*/
+/*	$NetBSD: netbsd32_compat_09.c,v 1.18.86.1 2018/09/10 09:54:47 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 1998 Matthew R. Green
@@ -27,11 +27,13 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_09.c,v 1.18 2008/05/29 14:51:26 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_09.c,v 1.18.86.1 2018/09/10 09:54:47 pgoyette Exp $");
 
 #include 
 #include 
+#include 
 #include 
+#include 
 #include 
 
 #include 
@@ -84,3 +86,30 @@ compat_09_netbsd32_uname(struct lwp *l, 
 	NETBSD32TOP_UAP(name, struct outsname);
 	return (compat_09_sys_uname(l, , retval));
 }
+
+static struct syscall_package compat_netbsd32_09_syscalls[] = {
+{ NETBSD32_SYS_ogetdomainname, 0,
+(sy_call_t *)compat_09_netbsd32_ogetdomainname },
+{ NETBSD32_SYS_osetdomainname, 0,
+(sy_call_t *)compat_09_netbsd32_osetdomainname },
+{ NETBSD32_SYS_ouname, 0, (sy_call_t *)compat_09_netbsd32_uname },
+{ 0, 0, NULL }
+};
+
+MODULE(MODULE_CLASS_EXEC, compat_netbsd32_09, "compat_netbsd32,compat_09");
+
+static int
+compat_netbsd32_09_modcmd(modcmt_t cmd, void *(arg)
+{
+
+	switch (cmd) {
+	case MODULE_CMD_INIT:
+		return syscall_establish(NULL, compat_netbsd32_09_syscalls);
+
+	case MODULE_CMD_FINI:
+		return syscall_disestablish(NULL, compat_netbsd32_09_syscalls);
+
+	default:
+		return ENOTTY;
+	}
+}

Index: src/sys/compat/netbsd32/netbsd32_compat_10.c
diff -u src/sys/compat/netbsd32/netbsd32_compat_10.c:1.25 src/sys/compat/netbsd32/netbsd32_compat_10.c:1.25.16.1
--- src/sys/compat/netbsd32/netbsd32_compat_10.c:1.25	Thu Dec  3 10:38:21 2015
+++ src/sys/compat/netbsd32/netbsd32_compat_10.c	Mon Sep 10 09:54:47 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_compat_10.c,v 1.25 2015/12/03 10:38:21 pgoyette Exp $	*/
+/*	$NetBSD: netbsd32_compat_10.c,v 1.25.16.1 2018/09/10 09:54:47 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 1994 Adam Glass and Charles M. Hannum.  All rights reserved.
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_10.c,v 1.25 2015/12/03 10:38:21 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_10.c,v 1.25.16.1 2018/09/10 09:54:47 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_sysv.h"
@@ -40,6 +40,7 @@ __KERNEL_RCSID(0, "$NetBSD: netbsd32_com
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -48,6 +49,7 @@ __KERNEL_RCSID(0, "$NetBSD: netbsd32_com
 #include 
 
 #include 
+#include 
 #include 
 #include 
 

Index: src/sys/compat/netbsd32/netbsd32_compat_12.c
diff -u src/sys/compat/netbsd32/netbsd32_compat_12.c:1.33 src/sys/compat/netbsd32/netbsd32_compat_12.c:1.33.36.1
--- src/sys/compat/netbsd32/netbsd32_compat_12.c:1.33	Mon Dec 10 02:21:58 2012
+++ src/sys/compat/netbsd32/netbsd32_compat_12.c	Mon Sep 10 09:54:47 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_compat_12.c,v 1.33 2012/12/10 02:21:58 chs Exp $	*/
+/*	$NetBSD: netbsd32_compat_12.c,v 1.33.36.1 2018/09/10 09:54:47 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_12.c,v 1.33 2012/12/10 02:21:58 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_12.c,v 1.33.36.1 2018/09/10 09:54:47 pgoyette Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd.h"
@@ -35,6 +35,7 @@ __KERNEL_RCSID(0, "$NetBSD: netbsd32_com
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -49,6 +50,7 @@ __KERNEL_RCSID(0, "$NetBSD: netbsd32_com
 

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

2018-09-10 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon Sep 10 09:48:57 UTC 2018

Modified Files:
src/sys/arch/arm/cortex: gic.c

Log Message:
Update sc_mptargets atomically, as PEs will be started up in parallel w/o 
locking here


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/sys/arch/arm/cortex/gic.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/cortex/gic.c
diff -u src/sys/arch/arm/cortex/gic.c:1.35 src/sys/arch/arm/cortex/gic.c:1.36
--- src/sys/arch/arm/cortex/gic.c:1.35	Sun Jul 15 16:04:07 2018
+++ src/sys/arch/arm/cortex/gic.c	Mon Sep 10 09:48:57 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: gic.c,v 1.35 2018/07/15 16:04:07 jmcneill Exp $	*/
+/*	$NetBSD: gic.c,v 1.36 2018/09/10 09:48:57 jmcneill Exp $	*/
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -34,7 +34,7 @@
 #define _INTR_PRIVATE
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: gic.c,v 1.35 2018/07/15 16:04:07 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gic.c,v 1.36 2018/09/10 09:48:57 jmcneill Exp $");
 
 #include 
 #include 
@@ -43,6 +43,7 @@ __KERNEL_RCSID(0, "$NetBSD: gic.c,v 1.35
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -514,7 +515,7 @@ armgic_cpu_init(struct pic_softc *pic, s
 {
 	struct armgic_softc * const sc = PICTOSOFTC(pic);
 	sc->sc_target[cpu_index(ci)] = gicd_find_targets(sc);
-	sc->sc_mptargets |= sc->sc_target[cpu_index(ci)];
+	atomic_or_32(>sc_mptargets, sc->sc_target[cpu_index(ci)]);
 	KASSERTMSG(ci->ci_cpl == IPL_HIGH, "ipl %d not IPL_HIGH", ci->ci_cpl);
 	armgic_cpu_init_priorities(sc);
 	if (!CPU_IS_PRIMARY(ci)) {



CVS commit: [pgoyette-compat] src/sys/compat/netbsd32

2018-09-10 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Sep 10 08:53:12 UTC 2018

Modified Files:
src/sys/compat/netbsd32 [pgoyette-compat]: syscalls.conf

Log Message:
Another compat_80


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.15.16.1 src/sys/compat/netbsd32/syscalls.conf

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/syscalls.conf
diff -u src/sys/compat/netbsd32/syscalls.conf:1.15 src/sys/compat/netbsd32/syscalls.conf:1.15.16.1
--- src/sys/compat/netbsd32/syscalls.conf:1.15	Tue Dec  1 02:20:43 2015
+++ src/sys/compat/netbsd32/syscalls.conf	Mon Sep 10 08:53:12 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: syscalls.conf,v 1.15 2015/12/01 02:20:43 pgoyette Exp $
+#	$NetBSD: syscalls.conf,v 1.15.16.1 2018/09/10 08:53:12 pgoyette Exp $
 
 sysnames="netbsd32_syscalls.c"
 sysnumhdr="netbsd32_syscall.h"
@@ -6,7 +6,7 @@ syssw="netbsd32_sysent.c"
 sysarghdr="netbsd32_syscallargs.h"
 systrace="netbsd32_systrace_args.c"
 sysautoload="netbsd32_syscalls_autoload.c"
-compatopts="compat_43 compat_09 compat_10 compat_11 compat_12 compat_13 compat_14 compat_15 compat_16 compat_20 compat_30 compat_40 compat_50 compat_60 compat_70"
+compatopts="compat_43 compat_09 compat_10 compat_11 compat_12 compat_13 compat_14 compat_15 compat_16 compat_20 compat_30 compat_40 compat_50 compat_60 compat_70 compat_80"
 libcompatopts=""
 
 switchname="netbsd32_sysent"



CVS commit: [pgoyette-compat] src/sys/kern

2018-09-10 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Sep 10 08:52:10 UTC 2018

Modified Files:
src/sys/kern [pgoyette-compat]: syscalls.conf

Log Message:
Add compat_80 to the list of compats


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.28.16.1 src/sys/kern/syscalls.conf

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/syscalls.conf
diff -u src/sys/kern/syscalls.conf:1.28 src/sys/kern/syscalls.conf:1.28.16.1
--- src/sys/kern/syscalls.conf:1.28	Fri May  6 10:17:34 2016
+++ src/sys/kern/syscalls.conf	Mon Sep 10 08:52:10 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: syscalls.conf,v 1.28 2016/05/06 10:17:34 pooka Exp $
+#	$NetBSD: syscalls.conf,v 1.28.16.1 2018/09/10 08:52:10 pgoyette Exp $
 
 sysnames="syscalls.c"
 sysnumhdr="../sys/syscall.h"
@@ -11,7 +11,7 @@ sysalign=1
 rumpcalls="../rump/librump/rumpkern/rump_syscalls.c"
 rumpcallshdr="../rump/include/rump/rump_syscalls.h"
 rumpsysmap="../rump/rump.sysmap"
-compatopts="compat_43 compat_09 compat_10 compat_11 compat_12 compat_13 compat_14 compat_15 compat_16 compat_20 compat_30 compat_40 compat_50 compat_60 compat_70"
+compatopts="compat_43 compat_09 compat_10 compat_11 compat_12 compat_13 compat_14 compat_15 compat_16 compat_20 compat_30 compat_40 compat_50 compat_60 compat_70 compat_80"
 libcompatopts=""
 
 switchname="sysent"



CVS commit: [pgoyette-compat] src/doc

2018-09-10 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Sep 10 08:49:25 UTC 2018

Modified Files:
src/doc [pgoyette-compat]: TODO.compat-module

Log Message:
Note that the compat_netbsd32 module will be split into version-specific
components.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/doc/TODO.compat-module

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

Modified files:

Index: src/doc/TODO.compat-module
diff -u src/doc/TODO.compat-module:1.1.2.1 src/doc/TODO.compat-module:1.1.2.2
--- src/doc/TODO.compat-module:1.1.2.1	Sun Sep  9 02:20:17 2018
+++ src/doc/TODO.compat-module	Mon Sep 10 08:49:25 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: TODO.compat-module,v 1.1.2.1 2018/09/09 02:20:17 pgoyette Exp $ */
+/* $NetBSD: TODO.compat-module,v 1.1.2.2 2018/09/10 08:49:25 pgoyette Exp $ */
 
 DONE
 
@@ -31,11 +31,11 @@ DONE
 
 8.  The old monolithic compat module has been broken into multiple
 modules, one for each old NetBSD version.  The monolithic module
-is still available.
+is no longer available.
 
 Similarly, the compat_sysv module has also been split into several
 version-specific modules, and the mini-monolithic compat_sysv module
-is still provided.
+is no longer provided.
 
 9.  syscalls.master has been updated to autoload the version-specific
 compat modules rather than the monolithic modules.
@@ -46,7 +46,8 @@ DONE
 
 TODO - Required for branch merge
 
-none
+1.  Replace version-specific parts of the compat_netbsd32 module with
+individual modules.  Update dependencies accordingly.
 
 
 TODO - Not required for branch merge



CVS commit: [pgoyette-compat] src/distrib/sets/lists/modules

2018-09-10 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Sep 10 08:44:50 UTC 2018

Modified Files:
src/distrib/sets/lists/modules [pgoyette-compat]: ad.arm ad.mips
md.amd64 mi

Log Message:
Update for removal of monolithic compat modules, and for introduction
of version-specific compat_netbsd32_xx modules


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.10.12.1 src/distrib/sets/lists/modules/ad.arm \
src/distrib/sets/lists/modules/ad.mips
cvs rdiff -u -r1.75.2.2 -r1.75.2.3 src/distrib/sets/lists/modules/md.amd64
cvs rdiff -u -r1.114.2.20 -r1.114.2.21 src/distrib/sets/lists/modules/mi

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

Modified files:

Index: src/distrib/sets/lists/modules/ad.arm
diff -u src/distrib/sets/lists/modules/ad.arm:1.10 src/distrib/sets/lists/modules/ad.arm:1.10.12.1
--- src/distrib/sets/lists/modules/ad.arm:1.10	Thu Dec 15 12:56:52 2016
+++ src/distrib/sets/lists/modules/ad.arm	Mon Sep 10 08:44:50 2018
@@ -1,7 +1,29 @@
-# $NetBSD: ad.arm,v 1.10 2016/12/15 12:56:52 kre Exp $
+# $NetBSD: ad.arm,v 1.10.12.1 2018/09/10 08:44:50 pgoyette Exp $
 
 ./@MODULEDIR@/compat_netbsd32			base-kernel-modules	kmod
 ./@MODULEDIR@/compat_netbsd32/compat_netbsd32.kmod	base-kernel-modules	kmod
+./@MODULEDIR@/compat_netbsd32_09		base-kernel-modules	kmod
+./@MODULEDIR@/compat_netbsd32_09/compat_netbsd32.kmod_09 base-kernel-modules	kmod
+./@MODULEDIR@/compat_netbsd32_10		base-kernel-modules	kmod
+./@MODULEDIR@/compat_netbsd32_10/compat_netbsd32.kmod_10 base-kernel-modules	kmod
+./@MODULEDIR@/compat_netbsd32_12		base-kernel-modules	kmod
+./@MODULEDIR@/compat_netbsd32_12/compat_netbsd32.kmod_12 base-kernel-modules	kmod
+./@MODULEDIR@/compat_netbsd32_13		base-kernel-modules	kmod
+./@MODULEDIR@/compat_netbsd32_13/compat_netbsd32.kmod_13 base-kernel-modules	kmod
+./@MODULEDIR@/compat_netbsd32_14		base-kernel-modules	kmod
+./@MODULEDIR@/compat_netbsd32_14/compat_netbsd32.kmod_14 base-kernel-modules	kmod
+./@MODULEDIR@/compat_netbsd32_20		base-kernel-modules	kmod
+./@MODULEDIR@/compat_netbsd32_20/compat_netbsd32.kmod_20 base-kernel-modules	kmod
+./@MODULEDIR@/compat_netbsd32_30		base-kernel-modules	kmod
+./@MODULEDIR@/compat_netbsd32_30/compat_netbsd32.kmod_30 base-kernel-modules	kmod
+./@MODULEDIR@/compat_netbsd32_50		base-kernel-modules	kmod
+./@MODULEDIR@/compat_netbsd32_50/compat_netbsd32.kmod_50 base-kernel-modules	kmod
+./@MODULEDIR@/compat_netbsd32_60		base-kernel-modules	kmod
+./@MODULEDIR@/compat_netbsd32_60/compat_netbsd32.kmod_60 base-kernel-modules	kmod
+./@MODULEDIR@/compat_netbsd32_80		base-kernel-modules	kmod
+./@MODULEDIR@/compat_netbsd32_80/compat_netbsd32.kmod_80 base-kernel-modules	kmod
+./@MODULEDIR@/compat_netbsd32_43		base-kernel-modules	kmod
+./@MODULEDIR@/compat_netbsd32_43/compat_netbsd32.kmod_43 base-kernel-modules	kmod
 ./@MODULEDIR@/compat_netbsd32_mqueue		base-kernel-modules	kmod
 ./@MODULEDIR@/compat_netbsd32_mqueue/compat_netbsd32_mqueue.kmod	base-kernel-modules	kmod
 ./@MODULEDIR@/compat_netbsd32_nfssrv		base-kernel-modules	kmod
Index: src/distrib/sets/lists/modules/ad.mips
diff -u src/distrib/sets/lists/modules/ad.mips:1.10 src/distrib/sets/lists/modules/ad.mips:1.10.12.1
--- src/distrib/sets/lists/modules/ad.mips:1.10	Thu Dec 15 12:56:52 2016
+++ src/distrib/sets/lists/modules/ad.mips	Mon Sep 10 08:44:50 2018
@@ -1,6 +1,28 @@
-# $NetBSD: ad.mips,v 1.10 2016/12/15 12:56:52 kre Exp $
+# $NetBSD: ad.mips,v 1.10.12.1 2018/09/10 08:44:50 pgoyette Exp $
 ./@MODULEDIR@/compat_netbsd32			base-kernel-modules	kmod,arch64,nocompatmodules
 ./@MODULEDIR@/compat_netbsd32/compat_netbsd32.kmod	base-kernel-modules	kmod,arch64,nocompatmodules
+./@MODULEDIR@/compat_netbsd32_09		base-kernel-modules	kmod
+./@MODULEDIR@/compat_netbsd32_09/compat_netbsd32.kmod_09 base-kernel-modules	kmod
+./@MODULEDIR@/compat_netbsd32_10		base-kernel-modules	kmod
+./@MODULEDIR@/compat_netbsd32_10/compat_netbsd32.kmod_10 base-kernel-modules	kmod
+./@MODULEDIR@/compat_netbsd32_12		base-kernel-modules	kmod
+./@MODULEDIR@/compat_netbsd32_12/compat_netbsd32.kmod_12 base-kernel-modules	kmod
+./@MODULEDIR@/compat_netbsd32_13		base-kernel-modules	kmod
+./@MODULEDIR@/compat_netbsd32_13/compat_netbsd32.kmod_13 base-kernel-modules	kmod
+./@MODULEDIR@/compat_netbsd32_14		base-kernel-modules	kmod
+./@MODULEDIR@/compat_netbsd32_14/compat_netbsd32.kmod_14 base-kernel-modules	kmod
+./@MODULEDIR@/compat_netbsd32_20		base-kernel-modules	kmod
+./@MODULEDIR@/compat_netbsd32_20/compat_netbsd32.kmod_20 base-kernel-modules	kmod
+./@MODULEDIR@/compat_netbsd32_30		base-kernel-modules	kmod
+./@MODULEDIR@/compat_netbsd32_30/compat_netbsd32.kmod_30 base-kernel-modules	kmod
+./@MODULEDIR@/compat_netbsd32_50		base-kernel-modules	kmod
+./@MODULEDIR@/compat_netbsd32_50/compat_netbsd32.kmod_50 base-kernel-modules	kmod
+./@MODULEDIR@/compat_netbsd32_60		base-kernel-modules	kmod
+./@MODULEDIR@/compat_netbsd32_60/compat_netbsd32.kmod_60 

CVS commit: [pgoyette-compat] src/sys/modules

2018-09-10 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Sep 10 08:43:50 UTC 2018

Modified Files:
src/sys/modules [pgoyette-compat]: Makefile

Log Message:
Don't descend into the build directories for monolithic compat and
compat_sysv modules.

Add sub-dirs for the soon-to-arrive version-specific compat_netbsd32_xx
modules.


To generate a diff of this commit:
cvs rdiff -u -r1.202.2.25 -r1.202.2.26 src/sys/modules/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/Makefile
diff -u src/sys/modules/Makefile:1.202.2.25 src/sys/modules/Makefile:1.202.2.26
--- src/sys/modules/Makefile:1.202.2.25	Thu Sep  6 06:56:43 2018
+++ src/sys/modules/Makefile	Mon Sep 10 08:43:50 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.202.2.25 2018/09/06 06:56:43 pgoyette Exp $
+#	$NetBSD: Makefile,v 1.202.2.26 2018/09/10 08:43:50 pgoyette Exp $
 
 .include 
 
@@ -6,13 +6,15 @@
 
 # Modules for compatability with earlier versions of NetBSD
 
-SUBDIR+=	compat  compat_util
+#SUBDIR+=	compat
+SUBDIR+=	compat_util
 SUBDIR+=	compat_43   compat_sysctl_09_43
 SUBDIR+=	compat_09   compat_10   compat_12   compat_13   compat_14
 SUBDIR+=	compat_16   compat_20   compat_30   compat_40   compat_50
 SUBDIR+=	compat_60   compat_70   compat_80 
 
-SUBDIR+=	compat_sysv compat_sysv_10 compat_sysv_14 compat_sysv_50
+#SUBDIR+=	compat_sysv
+SUBDIR+=	compat_sysv_10 compat_sysv_14 compat_sysv_50
 
 SUBDIR+=	accf_dataready
 SUBDIR+=	accf_httpready
@@ -265,6 +267,12 @@ SUBDIR+=	wmimsi
 .if ${MACHINE_CPU} == "arm" \
 || (!empty(MACHINE_ARCH:Mmips64*) && !defined(BSD_MK_COMPAT_FILE))
 SUBDIR+=	compat_netbsd32
+SUBDIR+=	compat_netbsd32_09	compat_netbsd32_10
+SUBDIR+=	compat_netbsd32_12	compat_netbsd32_13
+SUBDIR+=	compat_netbsd32_14	compat_netbsd32_20
+SUBDIR+=	compat_netbsd32_30	compat_netbsd32_50
+SUBDIR+=	compat_netbsd32_60	compat_netbsd32_80
+SUBDIR+=	compat_netbsd32_43
 SUBDIR+=	compat_netbsd32_mqueue
 SUBDIR+=	compat_netbsd32_nfssrv
 SUBDIR+=	compat_netbsd32_ptrace
@@ -274,6 +282,12 @@ SUBDIR+=	compat_netbsd32_sysvipc
 .if ${MACHINE_ARCH} == "x86_64"
 SUBDIR+=	compat_linux32
 SUBDIR+=	compat_netbsd32
+SUBDIR+=	compat_netbsd32_09	compat_netbsd32_10
+SUBDIR+=	compat_netbsd32_12	compat_netbsd32_13
+SUBDIR+=	compat_netbsd32_14	compat_netbsd32_20
+SUBDIR+=	compat_netbsd32_30	compat_netbsd32_50
+SUBDIR+=	compat_netbsd32_60	compat_netbsd32_80
+SUBDIR+=	compat_netbsd32_43
 SUBDIR+=	compat_netbsd32_mqueue
 SUBDIR+=	compat_netbsd32_nfssrv
 SUBDIR+=	compat_netbsd32_ptrace



CVS commit: [pgoyette-compat] src/sys/compat/common

2018-09-10 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Sep 10 08:41:47 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: compat_09_mod.c
compat_10_mod.c compat_12_mod.c compat_13_mod.c compat_14_mod.c
compat_16_mod.c compat_20_mod.c compat_30_mod.c compat_40_mod.c
compat_43_mod.c compat_50_mod.c compat_60_mod.c compat_70_mod.c
compat_80_mod.c compat_sysctl_09_43.c compat_util.c files.common

Log Message:
Remove the monolithic compat and compat_sysv modules.  Now that we
don't have aliases, we need to use only the version-specific module
names when resolving dependencies.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/sys/compat/common/compat_09_mod.c \
src/sys/compat/common/compat_10_mod.c \
src/sys/compat/common/compat_14_mod.c \
src/sys/compat/common/compat_16_mod.c \
src/sys/compat/common/compat_20_mod.c \
src/sys/compat/common/compat_43_mod.c \
src/sys/compat/common/compat_sysctl_09_43.c
cvs rdiff -u -r1.1.2.2 -r1.1.2.3 src/sys/compat/common/compat_12_mod.c \
src/sys/compat/common/compat_13_mod.c \
src/sys/compat/common/compat_40_mod.c
cvs rdiff -u -r1.1.2.4 -r1.1.2.5 src/sys/compat/common/compat_30_mod.c
cvs rdiff -u -r1.1.2.8 -r1.1.2.9 src/sys/compat/common/compat_50_mod.c
cvs rdiff -u -r1.1.2.15 -r1.1.2.16 src/sys/compat/common/compat_60_mod.c
cvs rdiff -u -r1.1.2.7 -r1.1.2.8 src/sys/compat/common/compat_70_mod.c \
src/sys/compat/common/compat_80_mod.c
cvs rdiff -u -r1.46.18.2 -r1.46.18.3 src/sys/compat/common/compat_util.c
cvs rdiff -u -r1.1.2.33 -r1.1.2.34 src/sys/compat/common/files.common

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/compat_09_mod.c
diff -u src/sys/compat/common/compat_09_mod.c:1.1.2.1 src/sys/compat/common/compat_09_mod.c:1.1.2.2
--- src/sys/compat/common/compat_09_mod.c:1.1.2.1	Tue Apr 17 08:07:13 2018
+++ src/sys/compat/common/compat_09_mod.c	Mon Sep 10 08:41:47 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_09_mod.c,v 1.1.2.1 2018/04/17 08:07:13 pgoyette Exp $	*/
+/*	$NetBSD: compat_09_mod.c,v 1.1.2.2 2018/09/10 08:41:47 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: compat_09_mod.c,v 1.1.2.1 2018/04/17 08:07:13 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: compat_09_mod.c,v 1.1.2.2 2018/09/10 08:41:47 pgoyette Exp $");
 
 #include 
 #include 
@@ -69,8 +69,6 @@ compat_09_fini(void)
 	return 0;
 }
 
-#ifdef _MODULE
-
 #define REQD_09_1	"compat_80,compat_70,compat_60,compat_50,"
 #define REQD_09_2	"compat_40,compat_30,compat_20,compat_16,"
 #define REQD_09_3	"compat_14,compat_13,compat_12,compat_10,"
@@ -91,4 +89,3 @@ compat_09_modcmd(modcmd_t cmd, void *arg
 		return ENOTTY;
 	}
 }
-#endif
Index: src/sys/compat/common/compat_10_mod.c
diff -u src/sys/compat/common/compat_10_mod.c:1.1.2.1 src/sys/compat/common/compat_10_mod.c:1.1.2.2
--- src/sys/compat/common/compat_10_mod.c:1.1.2.1	Tue Apr 17 08:07:13 2018
+++ src/sys/compat/common/compat_10_mod.c	Mon Sep 10 08:41:47 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_10_mod.c,v 1.1.2.1 2018/04/17 08:07:13 pgoyette Exp $	*/
+/*	$NetBSD: compat_10_mod.c,v 1.1.2.2 2018/09/10 08:41:47 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: compat_10_mod.c,v 1.1.2.1 2018/04/17 08:07:13 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: compat_10_mod.c,v 1.1.2.2 2018/09/10 08:41:47 pgoyette Exp $");
 
 #include 
 #include 
@@ -62,8 +62,6 @@ compat_10_fini(void)
 	return 0;
 }
 
-#ifdef _MODULE
-
 #define REQD_10_1	"compat_80,compat_70,compat_60,compat_50,"
 #define REQD_10_2	"compat_40,compat_30,compat_20,compat_16,"
 #define REQD_10_3	"compat_14,compat_13,compat_12,compat_util"
@@ -83,4 +81,3 @@ compat_10_modcmd(modcmd_t cmd, void *arg
 		return ENOTTY;
 	}
 }
-#endif
Index: src/sys/compat/common/compat_14_mod.c
diff -u src/sys/compat/common/compat_14_mod.c:1.1.2.1 src/sys/compat/common/compat_14_mod.c:1.1.2.2
--- src/sys/compat/common/compat_14_mod.c:1.1.2.1	Fri Mar 30 10:09:07 2018
+++ src/sys/compat/common/compat_14_mod.c	Mon Sep 10 08:41:47 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_14_mod.c,v 1.1.2.1 2018/03/30 10:09:07 pgoyette Exp $	*/
+/*	$NetBSD: compat_14_mod.c,v 1.1.2.2 2018/09/10 08:41:47 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: compat_14_mod.c,v 1.1.2.1 2018/03/30 10:09:07 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: compat_14_mod.c,v 1.1.2.2 2018/09/10 08:41:47 pgoyette Exp $");
 
 #include 
 #include 
@@ -62,8 +62,6 @@ compat_14_fini(void)
 	return 0;
 }
 
-#ifdef _MODULE
-
 #define REQD_14_1	"compat_80,compat_70,compat_60,compat_50,"
 #define REQD_14_2	"compat_40,compat_30,compat_20,compat_16"
 
@@ -82,4 

CVS commit: src/sys/arch

2018-09-10 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Mon Sep 10 07:30:33 UTC 2018

Modified Files:
src/sys/arch/aarch64/aarch64: locore.S
src/sys/arch/evbarm/fdt: fdt_start.S

Log Message:
Don't use printx before setting up stack.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/aarch64/aarch64/locore.S
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/evbarm/fdt/fdt_start.S

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

Modified files:

Index: src/sys/arch/aarch64/aarch64/locore.S
diff -u src/sys/arch/aarch64/aarch64/locore.S:1.23 src/sys/arch/aarch64/aarch64/locore.S:1.24
--- src/sys/arch/aarch64/aarch64/locore.S:1.23	Mon Sep 10 05:14:42 2018
+++ src/sys/arch/aarch64/aarch64/locore.S	Mon Sep 10 07:30:33 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.S,v 1.23 2018/09/10 05:14:42 skrll Exp $	*/
+/*	$NetBSD: locore.S,v 1.24 2018/09/10 07:30:33 skrll Exp $	*/
 
 /*
  * Copyright (c) 2017 Ryo Shimizu 
@@ -35,7 +35,7 @@
 #include 
 #include "assym.h"
 
-RCSID("$NetBSD: locore.S,v 1.23 2018/09/10 05:14:42 skrll Exp $")
+RCSID("$NetBSD: locore.S,v 1.24 2018/09/10 07:30:33 skrll Exp $")
 
 /* #define DEBUG_LOCORE */
 /* #define DEBUG_MMU */
@@ -79,6 +79,10 @@ ENTRY_NP(aarch64_start)
 	ADDR	x0, bootstk
 	mov	sp, x0
 
+#ifdef VERBOSE_INIT_ARM
+	PRINT("boot NetBSD/evbarm (aarch64)\r\n")
+#endif
+
 #ifdef DEBUG_LOCORE
 	PRINT("PC   = ")
 	bl	1f

Index: src/sys/arch/evbarm/fdt/fdt_start.S
diff -u src/sys/arch/evbarm/fdt/fdt_start.S:1.3 src/sys/arch/evbarm/fdt/fdt_start.S:1.4
--- src/sys/arch/evbarm/fdt/fdt_start.S:1.3	Wed Jul 18 06:50:48 2018
+++ src/sys/arch/evbarm/fdt/fdt_start.S	Mon Sep 10 07:30:33 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: fdt_start.S,v 1.3 2018/07/18 06:50:48 ryo Exp $	*/
+/*	$NetBSD: fdt_start.S,v 1.4 2018/09/10 07:30:33 skrll Exp $	*/
 
 /*
  * Copyright (c) 2017 Ryo Shimizu 
@@ -32,10 +32,7 @@
 
 #include 
 
-RCSID("$NetBSD: fdt_start.S,v 1.3 2018/07/18 06:50:48 ryo Exp $")
-
-#define PRINT(string)	\
-	bl xprint;.asciz string;.align 2
+RCSID("$NetBSD: fdt_start.S,v 1.4 2018/09/10 07:30:33 skrll Exp $")
 
 /* load far effective address (pc relative) */
 .macro	ADDR, reg, addr
@@ -74,11 +71,6 @@ start:
 	ADDR	x8, fdt_addr_r
 	str	x0, [x8]
 
-
-#ifdef VERBOSE_INIT_ARM
-	PRINT("boot NetBSD/evbarm (aarch64)\r\n")
-#endif
-
 	b	aarch64_start		/* aarch64_start() @ aarch64/locore.S */
 
 ENTRY_NP(uartputc)



CVS commit: src/sys/arch/x86/isa

2018-09-10 Thread Cherry G. Mathew
Module Name:src
Committed By:   cherry
Date:   Mon Sep 10 07:04:08 UTC 2018

Modified Files:
src/sys/arch/x86/isa: isa_machdep.c

Log Message:
Remove the last usage of xen_pirq_alloc() and pirq_establish()
outside of the x86 interrupt and xen events framework.

This allows us to finally unify the interrupt path for both Xen
and x86 as changes 'internal' to the subsystem.

This change has been kindly tested on real hardware by gson@

The change is not cosmetic and may thus affect users on various
hardware configurations - especially involving legacy hardware.

I look forward to bug reports.


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/sys/arch/x86/isa/isa_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/x86/isa/isa_machdep.c
diff -u src/sys/arch/x86/isa/isa_machdep.c:1.39 src/sys/arch/x86/isa/isa_machdep.c:1.40
--- src/sys/arch/x86/isa/isa_machdep.c:1.39	Sun Jun 24 13:35:33 2018
+++ src/sys/arch/x86/isa/isa_machdep.c	Mon Sep 10 07:04:08 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: isa_machdep.c,v 1.39 2018/06/24 13:35:33 jdolecek Exp $	*/
+/*	$NetBSD: isa_machdep.c,v 1.40 2018/09/10 07:04:08 cherry Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -65,7 +65,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: isa_machdep.c,v 1.39 2018/06/24 13:35:33 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: isa_machdep.c,v 1.40 2018/09/10 07:04:08 cherry Exp $");
 
 #include 
 #include 
@@ -237,31 +237,8 @@ isa_intr_establish_xname(isa_chipset_tag
 			printf("isa_intr_establish: no MP mapping found\n");
 	}
 #endif
-#if defined(XEN)
-	KASSERT(APIC_IRQ_ISLEGACY(irq));
-
-	int evtch;
-	const char *intrstr;
-	char intrstr_buf[INTRIDBUF];
-
-	mpih |= APIC_IRQ_LEGACY_IRQ(irq);
-
-	evtch = xen_pirq_alloc(, type); /* XXX: legacy - xen just tosses irq back at us */
-	if (evtch == -1)
-		return NULL;
-
-	intrstr = intr_create_intrid(irq, pic, pin, intrstr_buf,
-	sizeof(intrstr_buf));
-
-	aprint_debug("irq: %d requested on pic: %s.\n", irq, pic->pic_name);
-
-	return (void *)pirq_establish(irq, evtch, ih_fun, ih_arg, level,
-	intrstr, xname);
-#else /* defined(XEN) */
 	return intr_establish_xname(irq, pic, pin, type, level, ih_fun, ih_arg,
 	false, xname);
-#endif
-
 }
 
 /* Deregister an interrupt handler. */