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

2018-03-08 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Mar  8 08:56:47 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: uipc_usrreq_70.c

Log Message:
No need to compile conditionally, since it won't be compiled at all
unless requested.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.1.20.1 src/sys/compat/common/uipc_usrreq_70.c

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



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

2018-03-08 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Mar  8 08:56:47 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: uipc_usrreq_70.c

Log Message:
No need to compile conditionally, since it won't be compiled at all
unless requested.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.1.20.1 src/sys/compat/common/uipc_usrreq_70.c

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

Modified files:

Index: src/sys/compat/common/uipc_usrreq_70.c
diff -u src/sys/compat/common/uipc_usrreq_70.c:1.1 src/sys/compat/common/uipc_usrreq_70.c:1.1.20.1
--- src/sys/compat/common/uipc_usrreq_70.c:1.1	Wed Apr  6 19:45:45 2016
+++ src/sys/compat/common/uipc_usrreq_70.c	Thu Mar  8 08:56:47 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: uipc_usrreq_70.c,v 1.1 2016/04/06 19:45:45 roy Exp $	*/
+/*	$NetBSD: uipc_usrreq_70.c,v 1.1.20.1 2018/03/08 08:56:47 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2016 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uipc_usrreq_70.c,v 1.1 2016/04/06 19:45:45 roy Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_usrreq_70.c,v 1.1.20.1 2018/03/08 08:56:47 pgoyette Exp $");
 
 #include 
 #include 
@@ -42,7 +42,6 @@ __KERNEL_RCSID(0, "$NetBSD: uipc_usrreq_
 
 #include 
 
-#ifdef COMPAT_SOCKCRED70
 struct mbuf *
 compat_70_unp_addsockcred(struct lwp *l, struct mbuf *control)
 {
@@ -67,4 +66,3 @@ compat_70_unp_addsockcred(struct lwp *l,
 
 	return m_add(control, m);
 }
-#endif



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

2018-03-08 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Mar  8 08:55:52 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: tty_60.c

Log Message:
We don't need to conditionalize the code on COMPAT_60 since we'll
only include the source file when COMPAT_60 is requested (either
by kernel option or module specification)


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.4.16.1 src/sys/compat/common/tty_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/common/tty_60.c
diff -u src/sys/compat/common/tty_60.c:1.4 src/sys/compat/common/tty_60.c:1.4.16.1
--- src/sys/compat/common/tty_60.c:1.4	Thu Oct 22 15:18:25 2015
+++ src/sys/compat/common/tty_60.c	Thu Mar  8 08:55:52 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: tty_60.c,v 1.4 2015/10/22 15:18:25 christos Exp $	*/
+/*	$NetBSD: tty_60.c,v 1.4.16.1 2018/03/08 08:55:52 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tty_60.c,v 1.4 2015/10/22 15:18:25 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tty_60.c,v 1.4.16.1 2018/03/08 08:55:52 pgoyette Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd.h"
@@ -45,8 +45,6 @@ __KERNEL_RCSID(0, "$NetBSD: tty_60.c,v 1
 #include 
 #include 
 
-#ifdef COMPAT_60
-
 /* convert struct ptmget to struct compat_60_ptmget */
 static int
 ptmget_to_ptmget60(struct ptmget *pg, struct compat_60_ptmget *pg60)
@@ -116,5 +114,3 @@ compat_60_ptmioctl(dev_t dev, u_long cmd
 		return EPASSTHROUGH;
 	}
 }
-
-#endif /* COMPAT_60 */



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

2018-03-08 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Mar  8 09:56:06 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: uipc_syscalls_40.c
uipc_syscalls_50.c

Log Message:
Remove unnecessary conditionals.  These files aren't built unless
their content is needed (via config option or module configuration).


To generate a diff of this commit:
cvs rdiff -u -r1.15.2.4 -r1.15.2.5 src/sys/compat/common/uipc_syscalls_40.c
cvs rdiff -u -r1.3.56.2 -r1.3.56.3 src/sys/compat/common/uipc_syscalls_50.c

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

Modified files:

Index: src/sys/compat/common/uipc_syscalls_40.c
diff -u src/sys/compat/common/uipc_syscalls_40.c:1.15.2.4 src/sys/compat/common/uipc_syscalls_40.c:1.15.2.5
--- src/sys/compat/common/uipc_syscalls_40.c:1.15.2.4	Thu Mar  8 00:25:30 2018
+++ src/sys/compat/common/uipc_syscalls_40.c	Thu Mar  8 09:56:05 2018
@@ -1,9 +1,9 @@
-/*	$NetBSD: uipc_syscalls_40.c,v 1.15.2.4 2018/03/08 00:25:30 pgoyette Exp $	*/
+/*	$NetBSD: uipc_syscalls_40.c,v 1.15.2.5 2018/03/08 09:56:05 pgoyette Exp $	*/
 
 /* written by Pavel Cahyna, 2006. Public domain. */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls_40.c,v 1.15.2.4 2018/03/08 00:25:30 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls_40.c,v 1.15.2.5 2018/03/08 09:56:05 pgoyette Exp $");
 
 /*
  * System call interface to the socket abstraction.
@@ -24,7 +24,6 @@ __KERNEL_RCSID(0, "$NetBSD: uipc_syscall
 
 #include 
 
-#ifdef COMPAT_OIFREQ
 /*
  * Return interface configuration
  * of system.  List may be used
@@ -153,8 +152,7 @@ release_exit:
 	curlwp_bindx(bound);
 	return error;
 }
-#endif
-#if defined(COMPAT_40)
+
 static int (*orig_compat_ifconf)(u_long, void *);
 static int (*orig_compat_ifconf)(u_long, void *);
  
@@ -172,4 +170,3 @@ if_40_fini(void)
  
 	vec_compat_ifconf = orig_compat_ifconf;
 }
-#endif /* defined(COMPAT_40) */

Index: src/sys/compat/common/uipc_syscalls_50.c
diff -u src/sys/compat/common/uipc_syscalls_50.c:1.3.56.2 src/sys/compat/common/uipc_syscalls_50.c:1.3.56.3
--- src/sys/compat/common/uipc_syscalls_50.c:1.3.56.2	Thu Mar  8 07:04:01 2018
+++ src/sys/compat/common/uipc_syscalls_50.c	Thu Mar  8 09:56:05 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: uipc_syscalls_50.c,v 1.3.56.2 2018/03/08 07:04:01 pgoyette Exp $	*/
+/*	$NetBSD: uipc_syscalls_50.c,v 1.3.56.3 2018/03/08 09:56:05 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls_50.c,v 1.3.56.2 2018/03/08 07:04:01 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls_50.c,v 1.3.56.3 2018/03/08 09:56:05 pgoyette Exp $");
 
 #include 
 #include 
@@ -56,7 +56,6 @@ __KERNEL_RCSID(0, "$NetBSD: uipc_syscall
 #include 
 #include 
 
-#ifdef COMPAT_OIFDATA
 /*ARGSUSED*/
 int
 compat_ifdatareq(struct lwp *l, u_long cmd, void *data)
@@ -115,4 +114,3 @@ if_50_fini(void)
 
 	vec_compat_ifdatareq = orig_compat_ifdatareq;
 }
-#endif



CVS commit: src/sys/sys

2018-03-08 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Thu Mar  8 10:06:18 UTC 2018

Modified Files:
src/sys/sys: bitops.h

Log Message:
use 1ul for a left shift that may be greater than int sized.
noticed by martin.

fixes PR#53081.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/sys/bitops.h

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



CVS commit: src/sys/sys

2018-03-08 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Thu Mar  8 10:06:18 UTC 2018

Modified Files:
src/sys/sys: bitops.h

Log Message:
use 1ul for a left shift that may be greater than int sized.
noticed by martin.

fixes PR#53081.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/sys/bitops.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/sys/bitops.h
diff -u src/sys/sys/bitops.h:1.12 src/sys/sys/bitops.h:1.13
--- src/sys/sys/bitops.h:1.12	Thu Jan 12 19:03:09 2017
+++ src/sys/sys/bitops.h	Thu Mar  8 10:06:18 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: bitops.h,v 1.12 2017/01/12 19:03:09 christos Exp $	*/
+/*	$NetBSD: bitops.h,v 1.13 2018/03/08 10:06:18 mrg Exp $	*/
 
 /*-
  * Copyright (c) 2007, 2010 The NetBSD Foundation, Inc.
@@ -304,7 +304,7 @@ fast_remainder32(uint32_t _v, uint32_t _
 #define __BITMAP_SIZE(__t, __n) \
 (((__n) + (__BITMAP_BITS(__t) - 1)) / __BITMAP_BITS(__t))
 #define __BITMAP_BIT(__n, __v) \
-(1 << ((__n) & __BITMAP_MASK(*(__v)->_b)))
+(1ul << ((__n) & __BITMAP_MASK(*(__v)->_b)))
 #define __BITMAP_WORD(__n, __v) \
 ((__n) >> __BITMAP_SHIFT(*(__v)->_b))
 



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

2018-03-08 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Mar  8 09:56:06 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: uipc_syscalls_40.c
uipc_syscalls_50.c

Log Message:
Remove unnecessary conditionals.  These files aren't built unless
their content is needed (via config option or module configuration).


To generate a diff of this commit:
cvs rdiff -u -r1.15.2.4 -r1.15.2.5 src/sys/compat/common/uipc_syscalls_40.c
cvs rdiff -u -r1.3.56.2 -r1.3.56.3 src/sys/compat/common/uipc_syscalls_50.c

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



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

2018-03-08 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Mar  8 08:55:52 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: tty_60.c

Log Message:
We don't need to conditionalize the code on COMPAT_60 since we'll
only include the source file when COMPAT_60 is requested (either
by kernel option or module specification)


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.4.16.1 src/sys/compat/common/tty_60.c

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



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

2018-03-08 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Mar  8 09:54:36 UTC 2018

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

Log Message:
Include shared/common routines in the compat_netbsd Makefile

XXX These may later be extracted into an independant compat_util
XXX module.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.14.14.1 src/sys/modules/compat/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/Makefile
diff -u src/sys/modules/compat/Makefile:1.14 src/sys/modules/compat/Makefile:1.14.14.1
--- src/sys/modules/compat/Makefile:1.14	Thu Nov  3 04:26:58 2016
+++ src/sys/modules/compat/Makefile	Thu Mar  8 09:54:36 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.14 2016/11/03 04:26:58 riastradh Exp $
+#	$NetBSD: Makefile,v 1.14.14.1 2018/03/08 09:54:36 pgoyette Exp $
 
 .include "../Makefile.inc"
 
@@ -27,7 +27,7 @@ CPPFLAGS+=	-DCOMPAT_43
 
 .include "../../compat/common/Makefile.sysio"
 
-SRCS+=	compat_mod.c
+SRCS+=	compat_mod.c compat_exec.c compat_util.c
 
 .PATH:	${S}/arch/${MACHINE}/${MACHINE}
 .PATH:	${S}/arch/${MACHINE_ARCH}/${MACHINE_ARCH}



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

2018-03-08 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Mar  8 09:54:36 UTC 2018

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

Log Message:
Include shared/common routines in the compat_netbsd Makefile

XXX These may later be extracted into an independant compat_util
XXX module.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.14.14.1 src/sys/modules/compat/Makefile

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



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

2018-03-08 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Mar  8 13:22:26 UTC 2018

Modified Files:
src/sys/net [netbsd-8]: if_gif.c if_pppoe.c if_spppsubr.c

Log Message:
Pull up following revision(s) (requested by knakahara in ticket #613):
sys/net/if_pppoe.c: revision 1.130,1.134
sys/net/if_spppsubr.c: revision 1.172,1.175,1.179
sys/net/if_gif.c: revision 1.138,1.139

Mark callouts of pppoe(4) CALLOUT_MPSAFE. Suggested by ozaki-r@n.o.

fix non-diagnostic compilation

Fix spl leak.
ifconfig gif0 create
ifconfig gif0 destroy
WARNING: SPL NOT LOWERED ON ...

Fix breaking character limit. Pointed out by ozaki-r@n.o, thanks.

Use m_freem instead of m_free. Otherwise we're leaking the next mbufs in
the chain.


To generate a diff of this commit:
cvs rdiff -u -r1.126.2.8 -r1.126.2.9 src/sys/net/if_gif.c
cvs rdiff -u -r1.125.6.5 -r1.125.6.6 src/sys/net/if_pppoe.c
cvs rdiff -u -r1.169.6.4 -r1.169.6.5 src/sys/net/if_spppsubr.c

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

Modified files:

Index: src/sys/net/if_gif.c
diff -u src/sys/net/if_gif.c:1.126.2.8 src/sys/net/if_gif.c:1.126.2.9
--- src/sys/net/if_gif.c:1.126.2.8	Sun Feb 11 21:17:34 2018
+++ src/sys/net/if_gif.c	Thu Mar  8 13:22:26 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_gif.c,v 1.126.2.8 2018/02/11 21:17:34 snj Exp $	*/
+/*	$NetBSD: if_gif.c,v 1.126.2.9 2018/03/08 13:22:26 martin Exp $	*/
 /*	$KAME: if_gif.c,v 1.76 2001/08/20 02:01:02 kjc Exp $	*/
 
 /*
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_gif.c,v 1.126.2.8 2018/02/11 21:17:34 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_gif.c,v 1.126.2.9 2018/03/08 13:22:26 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -458,7 +458,7 @@ gif_output(struct ifnet *ifp, struct mbu
 	IFQ_CLASSIFY(>if_snd, m, dst->sa_family);
 
 	if ((error = gif_check_nesting(ifp, m)) != 0) {
-		m_free(m);
+		m_freem(m);
 		goto end;
 	}
 
@@ -1126,6 +1126,9 @@ gif_delete_tunnel(struct ifnet *ifp)
 		mutex_exit(>gif_lock);
 		encap_lock_exit();
 		kmem_free(nvar, sizeof(*nvar));
+#ifndef GIF_MPSAFE
+		splx(s);
+#endif
 		return;
 	}
 

Index: src/sys/net/if_pppoe.c
diff -u src/sys/net/if_pppoe.c:1.125.6.5 src/sys/net/if_pppoe.c:1.125.6.6
--- src/sys/net/if_pppoe.c:1.125.6.5	Tue Jan  2 10:20:33 2018
+++ src/sys/net/if_pppoe.c	Thu Mar  8 13:22:25 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: if_pppoe.c,v 1.125.6.5 2018/01/02 10:20:33 snj Exp $ */
+/* $NetBSD: if_pppoe.c,v 1.125.6.6 2018/03/08 13:22:25 martin Exp $ */
 
 /*-
  * Copyright (c) 2002, 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_pppoe.c,v 1.125.6.5 2018/01/02 10:20:33 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_pppoe.c,v 1.125.6.6 2018/03/08 13:22:25 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "pppoe.h"
@@ -315,7 +315,7 @@ pppoe_clone_create(struct if_clone *ifc,
 	/* changed to real address later */
 	memcpy(>sc_dest, etherbroadcastaddr, sizeof(sc->sc_dest));
 
-	callout_init(>sc_timeout, 0);
+	callout_init(>sc_timeout, CALLOUT_MPSAFE);
 
 	sc->sc_sppp.pp_if.if_start = pppoe_start;
 #ifdef PPPOE_MPSAFE
@@ -1795,7 +1795,7 @@ pppoe_transmit(struct ifnet *ifp, struct
 	PPPOE_LOCK(sc, RW_READER);
 	if (sc->sc_state < PPPOE_STATE_SESSION) {
 		PPPOE_UNLOCK(sc);
-		m_free(m);
+		m_freem(m);
 		return ENOBUFS;
 	}
 
@@ -1887,13 +1887,13 @@ static void
 pppoe_enqueue(struct ifqueue *inq, struct mbuf *m)
 {
 	if (m->m_flags & M_PROMISC) {
-		m_free(m);
+		m_freem(m);
 		return;
 	}
 
 #ifndef PPPOE_SERVER
 	if (m->m_flags & (M_MCAST | M_BCAST)) {
-		m_free(m);
+		m_freem(m);
 		return;
 	}
 #endif

Index: src/sys/net/if_spppsubr.c
diff -u src/sys/net/if_spppsubr.c:1.169.6.4 src/sys/net/if_spppsubr.c:1.169.6.5
--- src/sys/net/if_spppsubr.c:1.169.6.4	Tue Jan 16 13:01:10 2018
+++ src/sys/net/if_spppsubr.c	Thu Mar  8 13:22:25 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_spppsubr.c,v 1.169.6.4 2018/01/16 13:01:10 martin Exp $	 */
+/*	$NetBSD: if_spppsubr.c,v 1.169.6.5 2018/03/08 13:22:25 martin Exp $	 */
 
 /*
  * Synchronous PPP/Cisco link level subroutines.
@@ -41,7 +41,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_spppsubr.c,v 1.169.6.4 2018/01/16 13:01:10 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_spppsubr.c,v 1.169.6.5 2018/03/08 13:22:25 martin Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_inet.h"
@@ -999,7 +999,7 @@ sppp_attach(struct ifnet *ifp)
 
 	/* Initialize keepalive handler. */
 	if (! spppq) {
-		callout_init(_ch, 0);
+		callout_init(_ch, CALLOUT_MPSAFE);
 		callout_reset(_ch, hz * LCP_KEEPALIVE_INTERVAL, sppp_keepalive, NULL);
 	}
 
@@ -2205,7 +2205,7 @@ sppp_lcp_init(struct sppp *sp)
 	sp->lcp.max_terminate = 2;
 	sp->lcp.max_configure = 10;
 	sp->lcp.max_failure = 10;
-	callout_init(>ch[IDX_LCP], 0);
+	callout_init(>ch[IDX_LCP], CALLOUT_MPSAFE);
 }
 
 static void
@@ -2967,9 +2967,9 @@ sppp_ipcp_init(struct sppp *sp)
 	sp->fail_counter[IDX_IPCP] = 

CVS commit: [netbsd-8] src/sys

2018-03-08 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Mar  8 13:41:41 UTC 2018

Modified Files:
src/sys/net [netbsd-8]: if_l2tp.c if_l2tp.h
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 #614):
sys/net/if_l2tp.c: revision 1.20
sys/netinet6/in6_l2tp.c: revision 1.13
sys/netinet6/in6_l2tp.c: revision 1.14
sys/net/if_l2tp.h: revision 1.3
sys/net/if_l2tp.c: revision 1.13
sys/netinet/in_l2tp.c: revision 1.10
sys/net/if_l2tp.c: revision 1.18
sys/netinet/in_l2tp.c: revision 1.11
sys/net/if_l2tp.c: revision 1.19
sys/netinet/in_l2tp.c: revision 1.12

If if_attach() failed in the attach function, return. Add comments about 
if_initialize().
suggested by ozaki-r@n.o.

Fix null deref, m could be NULL if M_PREPEND fails.

style

Style, reduce the indentation level when possible, and add a missing NULL
check after M_PREPEND.

Several fixes in L2TP:
 * l2tp_input(): use m_copydata, and ensure there is enough space in the
   chain. Otherwise overflow.
 * l2tp_tcpmss_clamp(): ensure there is enough space in the chain.
 * in_l2tp_output(): don't check 'sc' against NULL, it can't be NULL.
 * in_l2tp_input(): no need to call m_pullup since we use m_copydata.
   Just check the space in the chain.
 * in_l2tp_input(): if there is a cookie, make sure the chain has enough
   space.
 * in6_l2tp_input(): same changes as in_l2tp_input().
Ok knakahara@

Use MH_ALIGN instead, ok knakahara@.


To generate a diff of this commit:
cvs rdiff -u -r1.11.2.4 -r1.11.2.5 src/sys/net/if_l2tp.c
cvs rdiff -u -r1.2 -r1.2.2.1 src/sys/net/if_l2tp.h
cvs rdiff -u -r1.2.8.3 -r1.2.8.4 src/sys/netinet/in_l2tp.c
cvs rdiff -u -r1.5.8.3 -r1.5.8.4 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/net/if_l2tp.c
diff -u src/sys/net/if_l2tp.c:1.11.2.4 src/sys/net/if_l2tp.c:1.11.2.5
--- src/sys/net/if_l2tp.c:1.11.2.4	Sun Feb 11 21:17:34 2018
+++ src/sys/net/if_l2tp.c	Thu Mar  8 13:41:40 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_l2tp.c,v 1.11.2.4 2018/02/11 21:17:34 snj Exp $	*/
+/*	$NetBSD: if_l2tp.c,v 1.11.2.5 2018/03/08 13:41:40 martin Exp $	*/
 
 /*
  * Copyright (c) 2017 Internet Initiative Japan Inc.
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_l2tp.c,v 1.11.2.4 2018/02/11 21:17:34 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_l2tp.c,v 1.11.2.5 2018/03/08 13:41:40 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -228,10 +228,17 @@ l2tp_clone_create(struct if_clone *ifc, 
 {
 	struct l2tp_softc *sc;
 	struct l2tp_variant *var;
+	int rv;
 
 	sc = kmem_zalloc(sizeof(struct l2tp_softc), KM_SLEEP);
-	var = kmem_zalloc(sizeof(struct l2tp_variant), KM_SLEEP);
+	if_initname(>l2tp_ec.ec_if, ifc->ifc_name, unit);
+	rv = l2tpattach0(sc);
+	if (rv != 0) {
+		kmem_free(sc, sizeof(struct l2tp_softc));
+		return rv;
+	}
 
+	var = kmem_zalloc(sizeof(struct l2tp_variant), KM_SLEEP);
 	var->lv_softc = sc;
 	var->lv_state = L2TP_STATE_DOWN;
 	var->lv_use_cookie = L2TP_COOKIE_OFF;
@@ -241,10 +248,6 @@ l2tp_clone_create(struct if_clone *ifc, 
 	mutex_init(>l2tp_lock, MUTEX_DEFAULT, IPL_NONE);
 	PSLIST_ENTRY_INIT(sc, l2tp_hash);
 
-	if_initname(>l2tp_ec.ec_if, ifc->ifc_name, unit);
-
-	l2tpattach0(sc);
-
 	sc->l2tp_ro_percpu = percpu_alloc(sizeof(struct l2tp_ro));
 	percpu_foreach(sc->l2tp_ro_percpu, l2tp_ro_init_pc, NULL);
 
@@ -255,9 +258,10 @@ l2tp_clone_create(struct if_clone *ifc, 
 	return (0);
 }
 
-void
+int
 l2tpattach0(struct l2tp_softc *sc)
 {
+	int rv;
 
 	sc->l2tp_ec.ec_if.if_addrlen = 0;
 	sc->l2tp_ec.ec_if.if_mtu= L2TP_MTU;
@@ -274,9 +278,19 @@ l2tpattach0(struct l2tp_softc *sc)
 	sc->l2tp_ec.ec_if.if_transmit = l2tp_transmit;
 	sc->l2tp_ec.ec_if._if_input = ether_input;
 	IFQ_SET_READY(>l2tp_ec.ec_if.if_snd);
-	if_attach(>l2tp_ec.ec_if);
+	/* XXX
+	 * It may improve performance to use if_initialize()/if_register()
+	 * so that l2tp_input() calls if_input() instead of
+	 * if_percpuq_enqueue(). However, that causes recursive softnet_lock
+	 * when NET_MPSAFE is not set.
+	 */
+	rv = if_attach(>l2tp_ec.ec_if);
+	if (rv != 0)
+		return rv;
 	if_alloc_sadl(>l2tp_ec.ec_if);
 	bpf_attach(>l2tp_ec.ec_if, DLT_EN10MB, sizeof(struct ether_header));
+
+	return 0;
 }
 
 void
@@ -451,16 +465,23 @@ l2tpintr(struct l2tp_variant *var)
 void
 l2tp_input(struct mbuf *m, struct ifnet *ifp)
 {
+	u_long val;
 
 	KASSERT(ifp != NULL);
 
-	if (0 == (mtod(m, u_long) & 0x03)) {
+	if (m->m_pkthdr.len < sizeof(val)) {
+		m_freem(m);
+		return;
+	}
+
+	m_copydata(m, 0, sizeof(val), );
+
+	if ((val & 0x03) == 0) {
 		/* copy and align head of payload */
 		struct mbuf *m_head;
 		int copy_length;
 
 #define L2TP_COPY_LENGTH		60
-#define L2TP_LINK_HDR_ROOM	(MHLEN - L2TP_COPY_LENGTH - 4/*round4(2)*/)
 
 		if 

CVS commit: [netbsd-8] src/sys

2018-03-08 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Mar  8 13:41:41 UTC 2018

Modified Files:
src/sys/net [netbsd-8]: if_l2tp.c if_l2tp.h
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 #614):
sys/net/if_l2tp.c: revision 1.20
sys/netinet6/in6_l2tp.c: revision 1.13
sys/netinet6/in6_l2tp.c: revision 1.14
sys/net/if_l2tp.h: revision 1.3
sys/net/if_l2tp.c: revision 1.13
sys/netinet/in_l2tp.c: revision 1.10
sys/net/if_l2tp.c: revision 1.18
sys/netinet/in_l2tp.c: revision 1.11
sys/net/if_l2tp.c: revision 1.19
sys/netinet/in_l2tp.c: revision 1.12

If if_attach() failed in the attach function, return. Add comments about 
if_initialize().
suggested by ozaki-r@n.o.

Fix null deref, m could be NULL if M_PREPEND fails.

style

Style, reduce the indentation level when possible, and add a missing NULL
check after M_PREPEND.

Several fixes in L2TP:
 * l2tp_input(): use m_copydata, and ensure there is enough space in the
   chain. Otherwise overflow.
 * l2tp_tcpmss_clamp(): ensure there is enough space in the chain.
 * in_l2tp_output(): don't check 'sc' against NULL, it can't be NULL.
 * in_l2tp_input(): no need to call m_pullup since we use m_copydata.
   Just check the space in the chain.
 * in_l2tp_input(): if there is a cookie, make sure the chain has enough
   space.
 * in6_l2tp_input(): same changes as in_l2tp_input().
Ok knakahara@

Use MH_ALIGN instead, ok knakahara@.


To generate a diff of this commit:
cvs rdiff -u -r1.11.2.4 -r1.11.2.5 src/sys/net/if_l2tp.c
cvs rdiff -u -r1.2 -r1.2.2.1 src/sys/net/if_l2tp.h
cvs rdiff -u -r1.2.8.3 -r1.2.8.4 src/sys/netinet/in_l2tp.c
cvs rdiff -u -r1.5.8.3 -r1.5.8.4 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.



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

2018-03-08 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Mar  8 13:22:26 UTC 2018

Modified Files:
src/sys/net [netbsd-8]: if_gif.c if_pppoe.c if_spppsubr.c

Log Message:
Pull up following revision(s) (requested by knakahara in ticket #613):
sys/net/if_pppoe.c: revision 1.130,1.134
sys/net/if_spppsubr.c: revision 1.172,1.175,1.179
sys/net/if_gif.c: revision 1.138,1.139

Mark callouts of pppoe(4) CALLOUT_MPSAFE. Suggested by ozaki-r@n.o.

fix non-diagnostic compilation

Fix spl leak.
ifconfig gif0 create
ifconfig gif0 destroy
WARNING: SPL NOT LOWERED ON ...

Fix breaking character limit. Pointed out by ozaki-r@n.o, thanks.

Use m_freem instead of m_free. Otherwise we're leaking the next mbufs in
the chain.


To generate a diff of this commit:
cvs rdiff -u -r1.126.2.8 -r1.126.2.9 src/sys/net/if_gif.c
cvs rdiff -u -r1.125.6.5 -r1.125.6.6 src/sys/net/if_pppoe.c
cvs rdiff -u -r1.169.6.4 -r1.169.6.5 src/sys/net/if_spppsubr.c

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



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

2018-03-08 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Mar  8 11:33:15 UTC 2018

Modified Files:
src/sys/arch/i386/i386 [netbsd-8]: machdep.c
src/sys/arch/x86/include [netbsd-8]: cpu.h
src/sys/arch/x86/x86 [netbsd-8]: cpu.c

Log Message:
Pull up following revision(s) (requested by maxv in ticket #611):
sys/arch/x86/x86/cpu.c: revision 1.134 (patch)
sys/arch/x86/include/cpu.h: revision 1.78 (patch)
sys/arch/i386/i386/machdep.c: revision 1.792 (patch)

style, and move some i386-specific code into i386/


To generate a diff of this commit:
cvs rdiff -u -r1.782.6.2 -r1.782.6.3 src/sys/arch/i386/i386/machdep.c
cvs rdiff -u -r1.71 -r1.71.2.1 src/sys/arch/x86/include/cpu.h
cvs rdiff -u -r1.130.2.2 -r1.130.2.3 src/sys/arch/x86/x86/cpu.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/i386/i386/machdep.c
diff -u src/sys/arch/i386/i386/machdep.c:1.782.6.2 src/sys/arch/i386/i386/machdep.c:1.782.6.3
--- src/sys/arch/i386/i386/machdep.c:1.782.6.2	Mon Jan  1 19:09:03 2018
+++ src/sys/arch/i386/i386/machdep.c	Thu Mar  8 11:33:15 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.782.6.2 2018/01/01 19:09:03 snj Exp $	*/
+/*	$NetBSD: machdep.c,v 1.782.6.3 2018/03/08 11:33:15 martin Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2000, 2004, 2006, 2008, 2009
@@ -67,7 +67,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.782.6.2 2018/01/01 19:09:03 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.782.6.3 2018/03/08 11:33:15 martin Exp $");
 
 #include "opt_beep.h"
 #include "opt_compat_ibcs2.h"
@@ -578,7 +578,78 @@ i386_tls_switch(lwp_t *l)
 }
 #endif /* XEN */
 
+/* XXX */
+#define IDTVEC(name)	__CONCAT(X, name)
+typedef void (vector)(void);
+
 #ifndef XEN
+static void	tss_init(struct i386tss *, void *, void *);
+
+static void
+tss_init(struct i386tss *tss, void *stack, void *func)
+{
+	KASSERT(curcpu()->ci_pmap == pmap_kernel());
+
+	memset(tss, 0, sizeof *tss);
+	tss->tss_esp0 = tss->tss_esp = (int)((char *)stack + USPACE - 16);
+	tss->tss_ss0 = GSEL(GDATA_SEL, SEL_KPL);
+	tss->__tss_cs = GSEL(GCODE_SEL, SEL_KPL);
+	tss->tss_fs = GSEL(GCPU_SEL, SEL_KPL);
+	tss->tss_gs = tss->__tss_es = tss->__tss_ds =
+	tss->__tss_ss = GSEL(GDATA_SEL, SEL_KPL);
+	/* %cr3 contains the value associated to pmap_kernel */
+	tss->tss_cr3 = rcr3();
+	tss->tss_esp = (int)((char *)stack + USPACE - 16);
+	tss->tss_ldt = GSEL(GLDT_SEL, SEL_KPL);
+	tss->__tss_eflags = PSL_MBO | PSL_NT;	/* XXX not needed? */
+	tss->__tss_eip = (int)func;
+}
+
+extern vector IDTVEC(tss_trap08);
+#if defined(DDB) && defined(MULTIPROCESSOR)
+extern vector Xintrddbipi, Xx2apic_intrddbipi;
+extern int ddb_vec;
+#endif
+
+void
+cpu_set_tss_gates(struct cpu_info *ci)
+{
+	struct segment_descriptor sd;
+
+	ci->ci_doubleflt_stack = (char *)uvm_km_alloc(kernel_map, USPACE, 0,
+	UVM_KMF_WIRED);
+
+	tss_init(>ci_doubleflt_tss, ci->ci_doubleflt_stack,
+	IDTVEC(tss_trap08));
+	setsegment(, >ci_doubleflt_tss, sizeof(struct i386tss) - 1,
+	SDT_SYS386TSS, SEL_KPL, 0, 0);
+	ci->ci_gdt[GTRAPTSS_SEL].sd = sd;
+
+	setgate([8], NULL, 0, SDT_SYSTASKGT, SEL_KPL,
+	GSEL(GTRAPTSS_SEL, SEL_KPL));
+
+#if defined(DDB) && defined(MULTIPROCESSOR)
+	/*
+	 * Set up separate handler for the DDB IPI, so that it doesn't
+	 * stomp on a possibly corrupted stack.
+	 *
+	 * XXX overwriting the gate set in db_machine_init.
+	 * Should rearrange the code so that it's set only once.
+	 */
+	ci->ci_ddbipi_stack = (char *)uvm_km_alloc(kernel_map, USPACE, 0,
+	UVM_KMF_WIRED);
+	tss_init(>ci_ddbipi_tss, ci->ci_ddbipi_stack,
+	x2apic_mode ? Xx2apic_intrddbipi : Xintrddbipi);
+
+	setsegment(, >ci_ddbipi_tss, sizeof(struct i386tss) - 1,
+	SDT_SYS386TSS, SEL_KPL, 0, 0);
+	ci->ci_gdt[GIPITSS_SEL].sd = sd;
+
+	setgate([ddb_vec], NULL, 0, SDT_SYSTASKGT, SEL_KPL,
+	GSEL(GIPITSS_SEL, SEL_KPL));
+#endif
+}
+
 /*
  * Set up TSS and I/O bitmap.
  */
@@ -930,8 +1001,7 @@ setsegment(struct segment_descriptor *sd
 	sd->sd_hibase = (int)base >> 24;
 }
 
-#define	IDTVEC(name)	__CONCAT(X, name)
-typedef void (vector)(void);
+/* XXX */
 extern vector IDTVEC(syscall);
 extern vector *IDTVEC(exceptions)[];
 extern vector IDTVEC(svr4_fasttrap);

Index: src/sys/arch/x86/include/cpu.h
diff -u src/sys/arch/x86/include/cpu.h:1.71 src/sys/arch/x86/include/cpu.h:1.71.2.1
--- src/sys/arch/x86/include/cpu.h:1.71	Tue May 23 08:48:34 2017
+++ src/sys/arch/x86/include/cpu.h	Thu Mar  8 11:33:15 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.h,v 1.71 2017/05/23 08:48:34 nonaka Exp $	*/
+/*	$NetBSD: cpu.h,v 1.71.2.1 2018/03/08 11:33:15 martin Exp $	*/
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -406,6 +406,9 @@ extern void (*x86_cpu_idle)(void);
 #define	cpu_idle() (*x86_cpu_idle)()
 
 /* machdep.c */
+#ifdef i386
+void	cpu_set_tss_gates(struct cpu_info *);
+#endif
 void	dumpconf(void);
 void	

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

2018-03-08 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Mar  8 11:33:15 UTC 2018

Modified Files:
src/sys/arch/i386/i386 [netbsd-8]: machdep.c
src/sys/arch/x86/include [netbsd-8]: cpu.h
src/sys/arch/x86/x86 [netbsd-8]: cpu.c

Log Message:
Pull up following revision(s) (requested by maxv in ticket #611):
sys/arch/x86/x86/cpu.c: revision 1.134 (patch)
sys/arch/x86/include/cpu.h: revision 1.78 (patch)
sys/arch/i386/i386/machdep.c: revision 1.792 (patch)

style, and move some i386-specific code into i386/


To generate a diff of this commit:
cvs rdiff -u -r1.782.6.2 -r1.782.6.3 src/sys/arch/i386/i386/machdep.c
cvs rdiff -u -r1.71 -r1.71.2.1 src/sys/arch/x86/include/cpu.h
cvs rdiff -u -r1.130.2.2 -r1.130.2.3 src/sys/arch/x86/x86/cpu.c

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



CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm

2018-03-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Mar  8 13:38:02 UTC 2018

Added Files:
src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm: arm.inc

Log Message:
oops forgot to commit this.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/arm.inc

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



CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm

2018-03-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Mar  8 13:38:02 UTC 2018

Added Files:
src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm: arm.inc

Log Message:
oops forgot to commit this.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/arm.inc

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

Added files:

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/arm.inc
diff -u /dev/null src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/arm.inc:1.1
--- /dev/null	Thu Mar  8 08:38:02 2018
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/arm.inc	Thu Mar  8 08:38:02 2018
@@ -0,0 +1,17 @@
+
+.if !defined(ARM_MAX_ARCH)
+.	if !empty(MACHINE_ARCH:Mearmv4*) || \
+	${MACHINE_ARCH} == "armeb" || \
+	${MACHINE_ARCH} == "arm"
+ARM_MAX_ARCH=4
+.	elif ${MACHINE_ARCH} == "earmeb" || ${MACHINE_ARCH} == "earmhfeb"
+ARM_MAX_ARCH=5
+.	elif !empty(MACHINE_ARCH:Mearmv6*)
+ARM_MAX_ARCH=6
+.	elif !empty(MACHINE_ARCH:Mearmv7*)
+ARM_MAX_ARCH=7
+.	else
+ARM_MAX_ARCH=8
+.	endif
+CPPFLAGS += -D__ARM_MAX_ARCH__=${ARM_MAX_ARCH}
+.endif



CVS commit: src/doc

2018-03-08 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Mar  8 10:14:00 UTC 2018

Modified Files:
src/doc: CHANGES

Log Message:
sdtemp(4): Add Microchp EMC1501, another device ID of Maxim MAX6604 support.
ichsmb(4): Add support for Intel C620, Apollo Lake and Gemini Lake devices.
lm(4): Add NCT6796D support.


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

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

Modified files:

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.2363 src/doc/CHANGES:1.2364
--- src/doc/CHANGES:1.2363	Wed Feb 28 08:15:27 2018
+++ src/doc/CHANGES	Thu Mar  8 10:14:00 2018
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2363 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2364 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -113,6 +113,9 @@ Changes from NetBSD 8.0 to NetBSD 9.0:
 	nsd: import 4.1.19 [christos 20180209]
 	ddb(4):	Introduce dumpstack sysctl for printing a stack trace on panic,
 		enable by default. [sevan 20180217]
+	sdtemp(4): Add Microchp EMC1501, another device ID of Maxim MAX6604
+		support. [msaitoh 20180222]
+	ichsmb(4): Add support for Intel C620 devices. [msaitoh 20180222]
 	macppc: Enable support for "per-priority cyclical scan" buffer queue
 		strategy. [sevan 20180223]
 	macppc: Enable awacs(4) by default in kernel configs. [sevan 20180224]
@@ -122,4 +125,5 @@ Changes from NetBSD 8.0 to NetBSD 9.0:
 	imcsmb(4): For amd64 and i386 on Intel {Ivy,Sandy}bridge and
 		{Broad,Has}well CPUs, enable access to Integrated Memory
 		Controller-based SMBus [pgoyette 20170228]
-		
+	ichsmb(4) Add Apollo Lake and Gemini Lake devices. [msaitoh 2018302]
+	lm(4): Add NCT6796D support. [msaitoh 2018308]



CVS commit: src/doc

2018-03-08 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Mar  8 10:14:00 UTC 2018

Modified Files:
src/doc: CHANGES

Log Message:
sdtemp(4): Add Microchp EMC1501, another device ID of Maxim MAX6604 support.
ichsmb(4): Add support for Intel C620, Apollo Lake and Gemini Lake devices.
lm(4): Add NCT6796D support.


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

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



CVS commit: src/sys/arch/i386/stand

2018-03-08 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Thu Mar  8 10:34:33 UTC 2018

Modified Files:
src/sys/arch/i386/stand/efiboot: Makefile.efiboot TODO.efiboot boot.c
devopen.c efiboot.c efiboot.h efidisk.c efidisk.h efidisk_ll.c
src/sys/arch/i386/stand/lib: biosdisk.c biosdisk.h biosdisk_ll.h
Added Files:
src/sys/arch/i386/stand/efiboot: efidev.c

Log Message:
efiboot: system can boot from CD/DVD-ROM media.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/i386/stand/efiboot/Makefile.efiboot
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/i386/stand/efiboot/TODO.efiboot
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/i386/stand/efiboot/boot.c \
src/sys/arch/i386/stand/efiboot/efiboot.h
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/i386/stand/efiboot/devopen.c \
src/sys/arch/i386/stand/efiboot/efidisk.c \
src/sys/arch/i386/stand/efiboot/efidisk.h \
src/sys/arch/i386/stand/efiboot/efidisk_ll.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/i386/stand/efiboot/efiboot.c
cvs rdiff -u -r0 -r1.1 src/sys/arch/i386/stand/efiboot/efidev.c
cvs rdiff -u -r1.46 -r1.47 src/sys/arch/i386/stand/lib/biosdisk.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/i386/stand/lib/biosdisk.h
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/i386/stand/lib/biosdisk_ll.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/i386/stand/efiboot/Makefile.efiboot
diff -u src/sys/arch/i386/stand/efiboot/Makefile.efiboot:1.9 src/sys/arch/i386/stand/efiboot/Makefile.efiboot:1.10
--- src/sys/arch/i386/stand/efiboot/Makefile.efiboot:1.9	Sat Apr 29 00:05:35 2017
+++ src/sys/arch/i386/stand/efiboot/Makefile.efiboot	Thu Mar  8 10:34:33 2018
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.efiboot,v 1.9 2017/04/29 00:05:35 nonaka Exp $
+# $NetBSD: Makefile.efiboot,v 1.10 2018/03/08 10:34:33 nonaka Exp $
 
 S=		${.CURDIR}/../../../../..
 
@@ -12,8 +12,8 @@ SOURCES?= start.S conf.c devopen.c efibo
 LIBI386SRCS= boot.c biosdisk.c bootinfo.c bootinfo_biosgeom.c
 LIBI386SRCS+= bootmenu.c diskbuf.c exec.c menuutils.c
 LIBI386SRCS+= panic.c parseutils.c pread.c
-LIBI386SRCS+= eficons.c efidelay.c efidisk.c efidisk_ll.c efigetsecs.c
-LIBI386SRCS+= efimemory.c
+LIBI386SRCS+= eficons.c efidelay.c efidev.c efidisk.c efidisk_ll.c
+LIBI386SRCS+= efigetsecs.c efimemory.c
 SRCS= ${SOURCES} ${EXTRA_SOURCES} ${LIBI386SRCS}
 
 PIE_CFLAGS=
@@ -54,9 +54,11 @@ CPPFLAGS+= -Wno-pointer-sign
 CPPFLAGS+= -DEFI_ALLOCATE_MAX_ADDRESS=0x1ULL
 CPPFLAGS+= -DHEAP_VARIABLE
 CPPFLAGS+= -DSUPPORT_CD9660
+CPPFLAGS+= -D"devb2cdb(bno)=(bno)"
 CPPFLAGS+= -DSUPPORT_DOSFS
 CPPFLAGS+= -DSUPPORT_EXT2FS
 CPPFLAGS+= -DPASS_BIOSGEOM
+CPPFLAGS+= -DBIOSDISK_DEFAULT_SECSIZE=2048	# for bootinfo_biosgeom.c
 CPPFLAGS+= -DLIBSA_ENABLE_LS_OP
 
 EFIDIR= ${S}/external/bsd/gnu-efi/dist
@@ -66,6 +68,7 @@ CPPFLAGS+= -I${EFIDIR}/inc/protocol
 
 SAMISCCPPFLAGS+= -DLIBSA_PRINTF_LONGLONG_SUPPORT
 SAMISCCPPFLAGS+= -DLIBSA_PRINTF_WIDTH_SUPPORT
+SAMISCCPPFLAGS+= -D"cdb2devb(bno)=(bno)"
 SAMISCMAKEFLAGS+= SA_USE_CREAD=yes  # Read compressed kernels
 SAMISCMAKEFLAGS+= SA_INCLUDE_NET=no # Netboot via TFTP, NFS
 

Index: src/sys/arch/i386/stand/efiboot/TODO.efiboot
diff -u src/sys/arch/i386/stand/efiboot/TODO.efiboot:1.3 src/sys/arch/i386/stand/efiboot/TODO.efiboot:1.4
--- src/sys/arch/i386/stand/efiboot/TODO.efiboot:1.3	Sun Mar 12 06:37:41 2017
+++ src/sys/arch/i386/stand/efiboot/TODO.efiboot	Thu Mar  8 10:34:33 2018
@@ -1,6 +1,5 @@
 - efiboot
  * handle UEFI variables
- * boot from CD/DVD (bootable from CD/DVD, but root fs not found.)
  * load boot.cfg from EFI system partition (FAT32)
 
 - kernel

Index: src/sys/arch/i386/stand/efiboot/boot.c
diff -u src/sys/arch/i386/stand/efiboot/boot.c:1.5 src/sys/arch/i386/stand/efiboot/boot.c:1.6
--- src/sys/arch/i386/stand/efiboot/boot.c:1.5	Mon May  1 13:03:01 2017
+++ src/sys/arch/i386/stand/efiboot/boot.c	Thu Mar  8 10:34:33 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: boot.c,v 1.5 2017/05/01 13:03:01 nonaka Exp $	*/
+/*	$NetBSD: boot.c,v 1.6 2018/03/08 10:34:33 nonaka Exp $	*/
 
 /*-
  * Copyright (c) 2016 Kimihiro Nonaka 
@@ -419,7 +419,7 @@ command_dev(char *arg)
 	const char *file; /* dummy */
 
 	if (*arg == '\0') {
-		biosdisk_probe();
+		efi_disk_show();
 		printf("default %s%d%c\n", default_devname, default_unit,
 		   'a' + default_partition);
 		return;
@@ -554,6 +554,7 @@ command_multiboot(char *arg)
 void
 command_version(char *arg)
 {
+	CHAR16 *path;
 
 	if (strcmp(arg, "full") == 0) {
 		printf("ImageBase: 0x%" PRIxPTR "\n",
@@ -563,6 +564,10 @@ command_version(char *arg)
 		ST->Hdr.Revision >> 16, ST->Hdr.Revision & 0x);
 		Print(L"EFI Firmware: %s (rev %d.%02d)\n", ST->FirmwareVendor,
 		ST->FirmwareRevision >> 16, ST->FirmwareRevision & 0x);
+		path = DevicePathToStr(efi_bootdp);
+		Print(L"Boot DevicePath: %d:%d:%s\n", DevicePathType(efi_bootdp),
+		DevicePathSubType(efi_bootdp), path);
+		

CVS commit: src/sys/arch/i386/stand

2018-03-08 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Thu Mar  8 10:34:33 UTC 2018

Modified Files:
src/sys/arch/i386/stand/efiboot: Makefile.efiboot TODO.efiboot boot.c
devopen.c efiboot.c efiboot.h efidisk.c efidisk.h efidisk_ll.c
src/sys/arch/i386/stand/lib: biosdisk.c biosdisk.h biosdisk_ll.h
Added Files:
src/sys/arch/i386/stand/efiboot: efidev.c

Log Message:
efiboot: system can boot from CD/DVD-ROM media.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/i386/stand/efiboot/Makefile.efiboot
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/i386/stand/efiboot/TODO.efiboot
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/i386/stand/efiboot/boot.c \
src/sys/arch/i386/stand/efiboot/efiboot.h
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/i386/stand/efiboot/devopen.c \
src/sys/arch/i386/stand/efiboot/efidisk.c \
src/sys/arch/i386/stand/efiboot/efidisk.h \
src/sys/arch/i386/stand/efiboot/efidisk_ll.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/i386/stand/efiboot/efiboot.c
cvs rdiff -u -r0 -r1.1 src/sys/arch/i386/stand/efiboot/efidev.c
cvs rdiff -u -r1.46 -r1.47 src/sys/arch/i386/stand/lib/biosdisk.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/i386/stand/lib/biosdisk.h
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/i386/stand/lib/biosdisk_ll.h

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



CVS commit: src/doc

2018-03-08 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Mar  8 10:17:22 UTC 2018

Modified Files:
src/doc: CHANGES

Log Message:
s/20183/201803/


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

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

Modified files:

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.2364 src/doc/CHANGES:1.2365
--- src/doc/CHANGES:1.2364	Thu Mar  8 10:14:00 2018
+++ src/doc/CHANGES	Thu Mar  8 10:17:22 2018
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2364 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2365 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -125,5 +125,5 @@ Changes from NetBSD 8.0 to NetBSD 9.0:
 	imcsmb(4): For amd64 and i386 on Intel {Ivy,Sandy}bridge and
 		{Broad,Has}well CPUs, enable access to Integrated Memory
 		Controller-based SMBus [pgoyette 20170228]
-	ichsmb(4) Add Apollo Lake and Gemini Lake devices. [msaitoh 2018302]
-	lm(4): Add NCT6796D support. [msaitoh 2018308]
+	ichsmb(4) Add Apollo Lake and Gemini Lake devices. [msaitoh 20180302]
+	lm(4): Add NCT6796D support. [msaitoh 20180308]



CVS commit: src/doc

2018-03-08 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Mar  8 10:17:22 UTC 2018

Modified Files:
src/doc: CHANGES

Log Message:
s/20183/201803/


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

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



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

2018-03-08 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Mar  8 12:31:25 UTC 2018

Modified Files:
src/sys/dev/pci/ixgbe [netbsd-8]: ixgbe.c ixgbe.h ixv.c

Log Message:
Pull up following revision(s) (requested by knakahara in ticket #612):
sys/dev/pci/ixgbe/ixgbe.c: revision 1.129-1.133
sys/dev/pci/ixgbe/ixgbe.h: revision 1.34
sys/dev/pci/ixgbe/ixv.c: revision 1.85,1.86

- Make "Handled queue in softint" and "Requeued in softint" evcnt(9) per queue
  and count them correctly.
- Remove #if 0'ed code.

Don't increment que->req.ev_count in MSI-X interrupt because it's not
reschedule.

Fix another poll mode assumption breaking. Implemented by msaitoh@n.o, I just 
commit by proxy.
ixgbe_rearm_queues() writes EICS register(s). 82599, X540 and X550
specifications say "Following a write of 1b to any bit in the EICS register
(interrupt cause set), its corresponding bit in the EIMS register is auto
set as well enabling its interrupt." in "Extended Interrupt Auto Mask Enable
(EIAM) Register" section. That is, ixgbe_rearm_queues() causes interrupts
regardless of the status managed by ixgbe_enable_queue()/ixgbe_disable_queue().

That can break poll mode assumption.

In fact, the problem occurs in the following situation
- CPU#A has high load traffic, in contrast, CPU#B has not so high load 
traffic
- CPU#A is occurred interrupt by its NIC queue
  - CPU#A calls ixgbe_disable_queue() in interrupt handler(ixgbe_msix_que())
  - CPU#A kick softint handler(ixgbe_handle_que())
- CPU#A begins softint
- CPU#A's NIC queue is set que->txr->busy flag
- With some reason, CPU#A can do ixg interrupt handler
  E.g. when one of CPU#A's softnet handlers sleeps, ipl is lowered
- CPU#B starts callout
  - CPU#B calls ixgbe_local_timer1()
- CPU#B writes EICS bit corresponding CPU#A's NIC queue bit
- CPU#A's NIC queue causes interrupt whie CPU#A is running in poll mode
  - CPU#A calls ixgbe_disable_queue() in interrupt handler *again*
- CPU#A has done polling, and then CPU#A calls ixgbe_enable_queue() *once*
- CPU#A's NIC queue interrupt is disabled until ixg is detached as
  ixgbe_disable_queue() is called twice though ixgbe_disable_queue() is
  called once only
NOTE:
82598 does not say so, but it is treated in the same way because of no harm.
By the way, we will refactor ixgbe_local_timer(watchdog processing) later.

Fix INTx/MSI handler did not schedule workqueue. Pointed out by msaitoh@n.o.

Reduce duplicated code which schedule deferred packet processing. No functional 
change.


To generate a diff of this commit:
cvs rdiff -u -r1.88.2.12 -r1.88.2.13 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.24.6.5 -r1.24.6.6 src/sys/dev/pci/ixgbe/ixgbe.h
cvs rdiff -u -r1.56.2.9 -r1.56.2.10 src/sys/dev/pci/ixgbe/ixv.c

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

Modified files:

Index: src/sys/dev/pci/ixgbe/ixgbe.c
diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.88.2.12 src/sys/dev/pci/ixgbe/ixgbe.c:1.88.2.13
--- src/sys/dev/pci/ixgbe/ixgbe.c:1.88.2.12	Tue Mar  6 11:12:41 2018
+++ src/sys/dev/pci/ixgbe/ixgbe.c	Thu Mar  8 12:31:25 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.c,v 1.88.2.12 2018/03/06 11:12:41 martin Exp $ */
+/* $NetBSD: ixgbe.c,v 1.88.2.13 2018/03/08 12:31:25 martin Exp $ */
 
 /**
 
@@ -1686,10 +1686,6 @@ ixgbe_add_hw_stats(struct adapter *adapt
 	const char *xname = device_xname(dev);
 
 	/* Driver Statistics */
-	evcnt_attach_dynamic(>handleq, EVCNT_TYPE_MISC,
-	NULL, xname, "Handled queue in softint");
-	evcnt_attach_dynamic(>req, EVCNT_TYPE_MISC,
-	NULL, xname, "Requeued in softint");
 	evcnt_attach_dynamic(>efbig_tx_dma_setup, EVCNT_TYPE_MISC,
 	NULL, xname, "Driver tx dma soft fail EFBIG");
 	evcnt_attach_dynamic(>mbuf_defrag_failed, EVCNT_TYPE_MISC,
@@ -1736,15 +1732,6 @@ ixgbe_add_hw_stats(struct adapter *adapt
 		(void *)>queues[i], 0, CTL_CREATE, CTL_EOL) != 0)
 			break;
 
-#if 0 /* XXX msaitoh */
-		if (sysctl_createv(log, 0, , ,
-		CTLFLAG_READONLY, CTLTYPE_QUAD,
-		"irqs", SYSCTL_DESCR("irqs on this queue"),
-			NULL, 0, &(adapter->queues[i].irqs),
-		0, CTL_CREATE, CTL_EOL) != 0)
-			break;
-#endif
-
 		if (sysctl_createv(log, 0, , ,
 		CTLFLAG_READONLY, CTLTYPE_INT,
 		"txd_head", SYSCTL_DESCR("Transmit Descriptor Head"),
@@ -1761,6 +1748,11 @@ ixgbe_add_hw_stats(struct adapter *adapt
 
 		evcnt_attach_dynamic(>queues[i].irqs, EVCNT_TYPE_INTR,
 		NULL, adapter->queues[i].evnamebuf, "IRQs on queue");
+		evcnt_attach_dynamic(>queues[i].handleq,
+		EVCNT_TYPE_MISC, NULL, adapter->queues[i].evnamebuf,
+		"Handled queue in softint");
+		evcnt_attach_dynamic(>queues[i].req, EVCNT_TYPE_MISC,
+		NULL, adapter->queues[i].evnamebuf, "Requeued in softint");
 		evcnt_attach_dynamic(>tso_tx, EVCNT_TYPE_MISC,
 		NULL, 

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

2018-03-08 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Mar  8 12:31:25 UTC 2018

Modified Files:
src/sys/dev/pci/ixgbe [netbsd-8]: ixgbe.c ixgbe.h ixv.c

Log Message:
Pull up following revision(s) (requested by knakahara in ticket #612):
sys/dev/pci/ixgbe/ixgbe.c: revision 1.129-1.133
sys/dev/pci/ixgbe/ixgbe.h: revision 1.34
sys/dev/pci/ixgbe/ixv.c: revision 1.85,1.86

- Make "Handled queue in softint" and "Requeued in softint" evcnt(9) per queue
  and count them correctly.
- Remove #if 0'ed code.

Don't increment que->req.ev_count in MSI-X interrupt because it's not
reschedule.

Fix another poll mode assumption breaking. Implemented by msaitoh@n.o, I just 
commit by proxy.
ixgbe_rearm_queues() writes EICS register(s). 82599, X540 and X550
specifications say "Following a write of 1b to any bit in the EICS register
(interrupt cause set), its corresponding bit in the EIMS register is auto
set as well enabling its interrupt." in "Extended Interrupt Auto Mask Enable
(EIAM) Register" section. That is, ixgbe_rearm_queues() causes interrupts
regardless of the status managed by ixgbe_enable_queue()/ixgbe_disable_queue().

That can break poll mode assumption.

In fact, the problem occurs in the following situation
- CPU#A has high load traffic, in contrast, CPU#B has not so high load 
traffic
- CPU#A is occurred interrupt by its NIC queue
  - CPU#A calls ixgbe_disable_queue() in interrupt handler(ixgbe_msix_que())
  - CPU#A kick softint handler(ixgbe_handle_que())
- CPU#A begins softint
- CPU#A's NIC queue is set que->txr->busy flag
- With some reason, CPU#A can do ixg interrupt handler
  E.g. when one of CPU#A's softnet handlers sleeps, ipl is lowered
- CPU#B starts callout
  - CPU#B calls ixgbe_local_timer1()
- CPU#B writes EICS bit corresponding CPU#A's NIC queue bit
- CPU#A's NIC queue causes interrupt whie CPU#A is running in poll mode
  - CPU#A calls ixgbe_disable_queue() in interrupt handler *again*
- CPU#A has done polling, and then CPU#A calls ixgbe_enable_queue() *once*
- CPU#A's NIC queue interrupt is disabled until ixg is detached as
  ixgbe_disable_queue() is called twice though ixgbe_disable_queue() is
  called once only
NOTE:
82598 does not say so, but it is treated in the same way because of no harm.
By the way, we will refactor ixgbe_local_timer(watchdog processing) later.

Fix INTx/MSI handler did not schedule workqueue. Pointed out by msaitoh@n.o.

Reduce duplicated code which schedule deferred packet processing. No functional 
change.


To generate a diff of this commit:
cvs rdiff -u -r1.88.2.12 -r1.88.2.13 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.24.6.5 -r1.24.6.6 src/sys/dev/pci/ixgbe/ixgbe.h
cvs rdiff -u -r1.56.2.9 -r1.56.2.10 src/sys/dev/pci/ixgbe/ixv.c

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



CVS commit: [netbsd-8] src

2018-03-08 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Mar  8 14:29:12 UTC 2018

Modified Files:
src/share/man/man4 [netbsd-8]: sdtemp.4
src/sys/dev/i2c [netbsd-8]: sdtemp.c sdtemp_reg.h

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #615):
share/man/man4/sdtemp.4: revision 1.7-1.8
sys/dev/i2c/sdtemp_reg.h: revision 1.13
sys/dev/i2c/sdtemp.c: revision 1.33

- Add another device ID of Maxim MAX6604.

- Add Microchip EMC1501.

- ADT7408's device ID is not 0x80 but 0x08.

Add Microchip EMC1501.

Remove unnecessary macros.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.6.6.1 src/share/man/man4/sdtemp.4
cvs rdiff -u -r1.32 -r1.32.8.1 src/sys/dev/i2c/sdtemp.c
cvs rdiff -u -r1.12 -r1.12.8.1 src/sys/dev/i2c/sdtemp_reg.h

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

Modified files:

Index: src/share/man/man4/sdtemp.4
diff -u src/share/man/man4/sdtemp.4:1.6 src/share/man/man4/sdtemp.4:1.6.6.1
--- src/share/man/man4/sdtemp.4:1.6	Thu Jul 28 09:11:14 2016
+++ src/share/man/man4/sdtemp.4	Thu Mar  8 14:29:12 2018
@@ -1,4 +1,4 @@
-.\"	$NetBSD: sdtemp.4,v 1.6 2016/07/28 09:11:14 msaitoh Exp $
+.\"	$NetBSD: sdtemp.4,v 1.6.6.1 2018/03/08 14:29:12 martin Exp $
 .\"
 .\" Copyright (c) 2008 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd July 28, 2016
+.Dd February 22, 2018
 .Dt SDTEMP 4
 .Os
 .Sh NAME
@@ -45,8 +45,7 @@
 .Sh DESCRIPTION
 The
 .Nm
-driver provides support for the
-.Tn Microchip Technology
+driver provides support for the Microchip Technology
 MCP9805/98242 and other chips that conform to JEDEC Standard 21-C section
 4.7.
 Memory module temperature sensors are optional on DDR2 and newer DIMMs.
@@ -62,63 +61,29 @@ supports temperature ranges from -256 to
 Chips supported by the
 .Nm
 driver include TSE2004av compliant devices and:
-.Pp
 .Bl -bullet -offset indent
 .It
-.Tn Analog Devices
-.Em ADT7408
+Analog Devices ADT7408
+.It
+Atmel AT30TS00 and AT30TSE004
+.It
+On semiconductor (Catalyst) CAT34TS02, CAT34TS02C, CAT34TS04
+and CAT6095
+.It
+Giantec Semiconductor GT30TS00 and GT34TS02
+.It
+Integrated Deviced Technology TSE2002B3, TSE2002GB2, TSE2004GB2,
+TS3000B3, TS3000GB0, TS3000GB2, and TS30001GB2
+.It
+Maxim MAX6604
+.It
+Microchip Technology EMC1501, MCP9804, MCP9805, MCP9843, MCP98242,
+MCP98243, and MCP98244
+.It
+NXP Semiconductors SE97 and SE98
 .It
-.Tn Atmel
-.Em AT30TS00
-and
-.Em AT30TSE004
-.It
-.Tn On semiconductor (Catalyst)
-.Em CAT34TS02 ,
-.Em CAT34TS02C ,
-.Em CAT34TS04
-and
-.Em CAT6095
-.It
-.Tn Giantec Semiconductor
-.Em GT30TS00
-and
-.Em GT34TS02
-.It
-.Tn Integrated Deviced Technology
-.Em TSE2002B3 ,
-.Em TSE2002GB2 ,
-.Em TSE2004GB2 ,
-.Em TS3000B3 ,
-.Em TS3000GB0 ,
-.Em TS3000GB2
-and
-.Em TS30001GB2
-.It
-.Tn Maxim
-.Em MAX6604
-.It
-.Tn Microchip Technology
-.Em MCP9804 ,
-.Em MCP9805 ,
-.Em MCP9843 ,
-.Em MCP98242 ,
-.Em MCP98243
-and
-.Em MCP98244
-.It
-.Tn NXP Semiconductors
-.Em SE97
-and
-.Em SE98
-.It
-.Tn STmicroelectronics
-.Em STTS424 ,
-.Em STTS424E ,
-.Em STTS2002 ,
-.Em STTS2004
-and
-.Em STTS3000
+STmicroelectronics STTS424, STTS424E, STTS2002, STTS2004, and
+STTS3000
 .El
 .Sh SEE ALSO
 .Xr envsys 4 ,

Index: src/sys/dev/i2c/sdtemp.c
diff -u src/sys/dev/i2c/sdtemp.c:1.32 src/sys/dev/i2c/sdtemp.c:1.32.8.1
--- src/sys/dev/i2c/sdtemp.c:1.32	Wed Aug  3 03:35:24 2016
+++ src/sys/dev/i2c/sdtemp.c	Thu Mar  8 14:29:12 2018
@@ -1,4 +1,4 @@
-/*  $NetBSD: sdtemp.c,v 1.32 2016/08/03 03:35:24 msaitoh Exp $*/
+/*  $NetBSD: sdtemp.c,v 1.32.8.1 2018/03/08 14:29:12 martin Exp $*/
 
 /*
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sdtemp.c,v 1.32 2016/08/03 03:35:24 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sdtemp.c,v 1.32.8.1 2018/03/08 14:29:12 martin Exp $");
 
 #include 
 #include 
@@ -115,6 +115,8 @@ sdtemp_dev_table[] = {
 	"Giantec GT34TS02" },
 { MAXIM_MANUFACTURER_ID, MAX_6604_DEVICE_ID, MAX_6604_MASK,	  NULL,
 	"Maxim MAX6604" },
+{ MAXIM_MANUFACTURER_ID, MAX_6604_2_DEVICE_ID,   MAX_6604_MASK,	  NULL,
+	"Maxim MAX6604" },
 { MCP_MANUFACTURER_ID,  MCP_9804_DEVICE_ID,	 MCP_9804_MASK,	  CMCP,
 	"Microchip Tech MCP9804" },
 { MCP_MANUFACTURER_ID,  MCP_9805_DEVICE_ID,	 MCP_9805_MASK,	  NULL,
@@ -125,6 +127,8 @@ sdtemp_dev_table[] = {
 	"Microchip Tech MCP98243" },
 { MCP_MANUFACTURER_ID,  MCP_98244_DEVICE_ID, MCP_98244_MASK,	  CMCP,
 	"Microchip Tech MCP98244" },
+{ MCP2_MANUFACTURER_ID, MCP2_EMC1501_DEVICE_ID,  MCP2_EMC1501_MASK,	  NULL,
+	"Microchip Tech EMC1501" },
 { ADT_MANUFACTURER_ID,  ADT_7408_DEVICE_ID,	 ADT_7408_MASK,	  NULL,
 	"Analog Devices ADT7408" },
 { NXP_MANUFACTURER_ID,  NXP_SE98_DEVICE_ID,	 NXP_SE98_MASK,	  

CVS commit: [netbsd-8] src

2018-03-08 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Mar  8 14:29:12 UTC 2018

Modified Files:
src/share/man/man4 [netbsd-8]: sdtemp.4
src/sys/dev/i2c [netbsd-8]: sdtemp.c sdtemp_reg.h

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #615):
share/man/man4/sdtemp.4: revision 1.7-1.8
sys/dev/i2c/sdtemp_reg.h: revision 1.13
sys/dev/i2c/sdtemp.c: revision 1.33

- Add another device ID of Maxim MAX6604.

- Add Microchip EMC1501.

- ADT7408's device ID is not 0x80 but 0x08.

Add Microchip EMC1501.

Remove unnecessary macros.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.6.6.1 src/share/man/man4/sdtemp.4
cvs rdiff -u -r1.32 -r1.32.8.1 src/sys/dev/i2c/sdtemp.c
cvs rdiff -u -r1.12 -r1.12.8.1 src/sys/dev/i2c/sdtemp_reg.h

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



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

2018-03-08 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Mar  8 14:32:57 UTC 2018

Modified Files:
src/sys/dev/pci [netbsd-8]: pcidevs.h pcidevs_data.h

Log Message:
Regen for ticket #616


To generate a diff of this commit:
cvs rdiff -u -r1.1281.2.2 -r1.1281.2.3 src/sys/dev/pci/pcidevs.h
cvs rdiff -u -r1.1280.2.2 -r1.1280.2.3 src/sys/dev/pci/pcidevs_data.h

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



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

2018-03-08 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Mar  8 14:32:57 UTC 2018

Modified Files:
src/sys/dev/pci [netbsd-8]: pcidevs.h pcidevs_data.h

Log Message:
Regen for ticket #616


To generate a diff of this commit:
cvs rdiff -u -r1.1281.2.2 -r1.1281.2.3 src/sys/dev/pci/pcidevs.h
cvs rdiff -u -r1.1280.2.2 -r1.1280.2.3 src/sys/dev/pci/pcidevs_data.h

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

Modified files:

Index: src/sys/dev/pci/pcidevs.h
diff -u src/sys/dev/pci/pcidevs.h:1.1281.2.2 src/sys/dev/pci/pcidevs.h:1.1281.2.3
--- src/sys/dev/pci/pcidevs.h:1.1281.2.2	Tue Nov 21 14:51:04 2017
+++ src/sys/dev/pci/pcidevs.h	Thu Mar  8 14:32:49 2018
@@ -1,10 +1,10 @@
-/*	$NetBSD: pcidevs.h,v 1.1281.2.2 2017/11/21 14:51:04 martin Exp $	*/
+/*	$NetBSD: pcidevs.h,v 1.1281.2.3 2018/03/08 14:32:49 martin Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: pcidevs,v 1.1289.2.2 2017/11/21 14:48:23 martin Exp
+ *	NetBSD: pcidevs,v 1.1289.2.3 2018/03/08 14:31:18 martin Exp
  */
 
 /*
@@ -41,7 +41,7 @@
 /*
  * NOTE: a fairly complete list of PCI codes can be found at:
  *
- *	http://www.pcidatabase.com/
+ *	https://pci-ids.ucw.cz/
  *
  * (but it doesn't always seem to match vendor documentation)
  *
@@ -2457,7 +2457,7 @@
 #define	PCI_PRODUCT_MARVELL_YUKON_C032	0x4367		/* Yukon 88EC032 */
 #define	PCI_PRODUCT_MARVELL_YUKON_C034	0x4368		/* Yukon 88EC034 */
 #define	PCI_PRODUCT_MARVELL_YUKON_C042	0x4369		/* Yukon 88EC042 */
-#define	PCI_PRODUCT_MARVELL_YUKON_C055	0x436a		/* Yukon 88EC055 */
+#define	PCI_PRODUCT_MARVELL_YUKON_8058	0x436a		/* Yukon 88E8058 */
 #define	PCI_PRODUCT_MARVELL_GT64120	0x4620		/* GT-64120 System Controller */
 #define	PCI_PRODUCT_MARVELL_BELKIN	0x5005		/* Belkin Gigabit Ethernet */
 #define	PCI_PRODUCT_MARVELL_88SX5040	0x5040		/* 88SX5040 SATA */

Index: src/sys/dev/pci/pcidevs_data.h
diff -u src/sys/dev/pci/pcidevs_data.h:1.1280.2.2 src/sys/dev/pci/pcidevs_data.h:1.1280.2.3
--- src/sys/dev/pci/pcidevs_data.h:1.1280.2.2	Tue Nov 21 14:51:04 2017
+++ src/sys/dev/pci/pcidevs_data.h	Thu Mar  8 14:32:49 2018
@@ -1,10 +1,10 @@
-/*	$NetBSD: pcidevs_data.h,v 1.1280.2.2 2017/11/21 14:51:04 martin Exp $	*/
+/*	$NetBSD: pcidevs_data.h,v 1.1280.2.3 2018/03/08 14:32:49 martin Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: pcidevs,v 1.1289.2.2 2017/11/21 14:48:23 martin Exp
+ *	NetBSD: pcidevs,v 1.1289.2.3 2018/03/08 14:31:18 martin Exp
  */
 
 /*
@@ -3725,7 +3725,7 @@ static const uint16_t pci_products[] = {
 	15916, 16026, 0,
 	PCI_VENDOR_MARVELL, PCI_PRODUCT_MARVELL_YUKON_C042, 
 	15916, 16034, 0,
-	PCI_VENDOR_MARVELL, PCI_PRODUCT_MARVELL_YUKON_C055, 
+	PCI_VENDOR_MARVELL, PCI_PRODUCT_MARVELL_YUKON_8058, 
 	15916, 16042, 0,
 	PCI_VENDOR_MARVELL, PCI_PRODUCT_MARVELL_GT64120, 
 	16050, 6, 6300, 0,
@@ -14190,7 +14190,7 @@ static const char pci_words[] = { "." 
 	"88EC032\0" /* 1 refs @ 16018 */
 	"88EC034\0" /* 1 refs @ 16026 */
 	"88EC042\0" /* 1 refs @ 16034 */
-	"88EC055\0" /* 1 refs @ 16042 */
+	"88E8058\0" /* 1 refs @ 16042 */
 	"GT-64120\0" /* 1 refs @ 16050 */
 	"88SX5040\0" /* 1 refs @ 16059 */
 	"88SX5041\0" /* 1 refs @ 16068 */



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

2018-03-08 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Mar  8 14:35:53 UTC 2018

Modified Files:
src/sys/dev/ppbus [netbsd-8]: if_plip.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #617):
sys/dev/ppbus/if_plip.c: revision 1.28
spl leak, found by Mootja


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.27.10.1 src/sys/dev/ppbus/if_plip.c

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



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

2018-03-08 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Mar  8 14:35:53 UTC 2018

Modified Files:
src/sys/dev/ppbus [netbsd-8]: if_plip.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #617):
sys/dev/ppbus/if_plip.c: revision 1.28
spl leak, found by Mootja


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.27.10.1 src/sys/dev/ppbus/if_plip.c

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

Modified files:

Index: src/sys/dev/ppbus/if_plip.c
diff -u src/sys/dev/ppbus/if_plip.c:1.27 src/sys/dev/ppbus/if_plip.c:1.27.10.1
--- src/sys/dev/ppbus/if_plip.c:1.27	Sun May  8 03:11:33 2016
+++ src/sys/dev/ppbus/if_plip.c	Thu Mar  8 14:35:53 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: if_plip.c,v 1.27 2016/05/08 03:11:33 christos Exp $ */
+/* $NetBSD: if_plip.c,v 1.27.10.1 2018/03/08 14:35:53 martin Exp $ */
 
 /*-
  * Copyright (c) 1997 Poul-Henning Kamp
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_plip.c,v 1.27 2016/05/08 03:11:33 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_plip.c,v 1.27.10.1 2018/03/08 14:35:53 martin Exp $");
 
 /*
  * Parallel port TCP/IP interfaces added.  I looked at the driver from
@@ -445,6 +445,7 @@ lpioctl(struct ifnet *ifp, u_long cmd, v
 		case AF_INET:
 			break;
 		default:
+			splx(s);
 			return EAFNOSUPPORT;
 		}
 		break;



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

2018-03-08 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Mar  8 14:31:18 UTC 2018

Modified Files:
src/sys/dev/pci [netbsd-8]: if_msk.c pcidevs

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #616):
sys/dev/pci/if_msk.c: revision 1.55
sys/dev/pci/pcidevs: revision 1.1299
update entry for Marvel Yukon 8058, and fix URL for pci ids (Rocky Hotas)


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.54.8.1 src/sys/dev/pci/if_msk.c
cvs rdiff -u -r1.1289.2.2 -r1.1289.2.3 src/sys/dev/pci/pcidevs

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

Modified files:

Index: src/sys/dev/pci/if_msk.c
diff -u src/sys/dev/pci/if_msk.c:1.54 src/sys/dev/pci/if_msk.c:1.54.8.1
--- src/sys/dev/pci/if_msk.c:1.54	Thu Dec 15 09:28:05 2016
+++ src/sys/dev/pci/if_msk.c	Thu Mar  8 14:31:18 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: if_msk.c,v 1.54 2016/12/15 09:28:05 ozaki-r Exp $ */
+/* $NetBSD: if_msk.c,v 1.54.8.1 2018/03/08 14:31:18 martin Exp $ */
 /*	$OpenBSD: if_msk.c,v 1.42 2007/01/17 02:43:02 krw Exp $	*/
 
 /*
@@ -52,7 +52,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_msk.c,v 1.54 2016/12/15 09:28:05 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_msk.c,v 1.54.8.1 2018/03/08 14:31:18 martin Exp $");
 
 #include 
 #include 
@@ -160,7 +160,6 @@ static const struct msk_product {
 	{ PCI_VENDOR_MARVELL,		PCI_PRODUCT_MARVELL_YUKON_C034 },
 	{ PCI_VENDOR_MARVELL,		PCI_PRODUCT_MARVELL_YUKON_C036 },
 	{ PCI_VENDOR_MARVELL,		PCI_PRODUCT_MARVELL_YUKON_C042 },
-	{ PCI_VENDOR_MARVELL,		PCI_PRODUCT_MARVELL_YUKON_C055 },
 	{ PCI_VENDOR_MARVELL,		PCI_PRODUCT_MARVELL_YUKON_8035 },
 	{ PCI_VENDOR_MARVELL,		PCI_PRODUCT_MARVELL_YUKON_8036 },
 	{ PCI_VENDOR_MARVELL,		PCI_PRODUCT_MARVELL_YUKON_8038 },
@@ -171,6 +170,7 @@ static const struct msk_product {
 	{ PCI_VENDOR_MARVELL,		PCI_PRODUCT_MARVELL_YUKON_8053 },
 	{ PCI_VENDOR_MARVELL,		PCI_PRODUCT_MARVELL_YUKON_8055 },
 	{ PCI_VENDOR_MARVELL,		PCI_PRODUCT_MARVELL_YUKON_8056 },
+	{ PCI_VENDOR_MARVELL,		PCI_PRODUCT_MARVELL_YUKON_8058 },
 	{ PCI_VENDOR_MARVELL,		PCI_PRODUCT_MARVELL_YUKONII_8021CU },
 	{ PCI_VENDOR_MARVELL,		PCI_PRODUCT_MARVELL_YUKONII_8021X },
 	{ PCI_VENDOR_MARVELL,		PCI_PRODUCT_MARVELL_YUKONII_8022CU },

Index: src/sys/dev/pci/pcidevs
diff -u src/sys/dev/pci/pcidevs:1.1289.2.2 src/sys/dev/pci/pcidevs:1.1289.2.3
--- src/sys/dev/pci/pcidevs:1.1289.2.2	Tue Nov 21 14:48:23 2017
+++ src/sys/dev/pci/pcidevs	Thu Mar  8 14:31:18 2018
@@ -1,4 +1,4 @@
-$NetBSD: pcidevs,v 1.1289.2.2 2017/11/21 14:48:23 martin Exp $
+$NetBSD: pcidevs,v 1.1289.2.3 2018/03/08 14:31:18 martin Exp $
 
 /*
  * Copyright (c) 1995, 1996 Christopher G. Demetriou
@@ -34,7 +34,7 @@ $NetBSD: pcidevs,v 1.1289.2.2 2017/11/21
 /*
  * NOTE: a fairly complete list of PCI codes can be found at:
  *
- *	http://www.pcidatabase.com/
+ *	https://pci-ids.ucw.cz/
  *
  * (but it doesn't always seem to match vendor documentation)
  *
@@ -2450,7 +2450,7 @@ product MARVELL YUKON_C036	0x4366	Yukon 
 product MARVELL YUKON_C032	0x4367	Yukon 88EC032
 product MARVELL YUKON_C034	0x4368	Yukon 88EC034
 product MARVELL YUKON_C042	0x4369	Yukon 88EC042
-product MARVELL YUKON_C055	0x436a	Yukon 88EC055
+product MARVELL YUKON_8058	0x436a	Yukon 88E8058
 product MARVELL GT64120		0x4620	GT-64120 System Controller
 product MARVELL BELKIN		0x5005	Belkin Gigabit Ethernet
 product MARVELL 88SX5040	0x5040	88SX5040 SATA



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

2018-03-08 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Mar  8 14:31:18 UTC 2018

Modified Files:
src/sys/dev/pci [netbsd-8]: if_msk.c pcidevs

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #616):
sys/dev/pci/if_msk.c: revision 1.55
sys/dev/pci/pcidevs: revision 1.1299
update entry for Marvel Yukon 8058, and fix URL for pci ids (Rocky Hotas)


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.54.8.1 src/sys/dev/pci/if_msk.c
cvs rdiff -u -r1.1289.2.2 -r1.1289.2.3 src/sys/dev/pci/pcidevs

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



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

2018-03-08 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Mar  8 14:37:58 UTC 2018

Modified Files:
src/sys/net [netbsd-8]: if_ethersubr.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #618):
sys/net/if_ethersubr.c: revision 1.245
sys/net/if_ethersubr.c: revision 1.247

  Use macro(ETHER_LOCK() and ETHER_UNLOCK()). No functional change.

- Modify ether_ioctl() for readability. No functional change.

- KNF


To generate a diff of this commit:
cvs rdiff -u -r1.242.6.3 -r1.242.6.4 src/sys/net/if_ethersubr.c

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



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

2018-03-08 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Mar  8 14:37:58 UTC 2018

Modified Files:
src/sys/net [netbsd-8]: if_ethersubr.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #618):
sys/net/if_ethersubr.c: revision 1.245
sys/net/if_ethersubr.c: revision 1.247

  Use macro(ETHER_LOCK() and ETHER_UNLOCK()). No functional change.

- Modify ether_ioctl() for readability. No functional change.

- KNF


To generate a diff of this commit:
cvs rdiff -u -r1.242.6.3 -r1.242.6.4 src/sys/net/if_ethersubr.c

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

Modified files:

Index: src/sys/net/if_ethersubr.c
diff -u src/sys/net/if_ethersubr.c:1.242.6.3 src/sys/net/if_ethersubr.c:1.242.6.4
--- src/sys/net/if_ethersubr.c:1.242.6.3	Tue Jan  9 19:23:04 2018
+++ src/sys/net/if_ethersubr.c	Thu Mar  8 14:37:58 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_ethersubr.c,v 1.242.6.3 2018/01/09 19:23:04 snj Exp $	*/
+/*	$NetBSD: if_ethersubr.c,v 1.242.6.4 2018/03/08 14:37:58 martin Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -61,7 +61,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_ethersubr.c,v 1.242.6.3 2018/01/09 19:23:04 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ethersubr.c,v 1.242.6.4 2018/03/08 14:37:58 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -226,13 +226,13 @@ ether_output(struct ifnet * const ifp0, 
 		ifp = ifp->if_carpdev;
 		/* ac = (struct arpcom *)ifp; */
 
-		if ((ifp0->if_flags & (IFF_UP|IFF_RUNNING)) !=
-		(IFF_UP|IFF_RUNNING))
+		if ((ifp0->if_flags & (IFF_UP | IFF_RUNNING)) !=
+		(IFF_UP | IFF_RUNNING))
 			senderr(ENETDOWN);
 	}
 #endif /* NCARP > 0 */
 
-	if ((ifp->if_flags & (IFF_UP|IFF_RUNNING)) != (IFF_UP|IFF_RUNNING))
+	if ((ifp->if_flags & (IFF_UP | IFF_RUNNING)) != (IFF_UP | IFF_RUNNING))
 		senderr(ENETDOWN);
 
 	switch (dst->sa_family) {
@@ -640,7 +640,7 @@ ether_input(struct ifnet *ifp, struct mb
 			return;
 	}
 #endif /* NCARP > 0 */
-	if ((m->m_flags & (M_BCAST|M_MCAST|M_PROMISC)) == 0 &&
+	if ((m->m_flags & (M_BCAST | M_MCAST | M_PROMISC)) == 0 &&
 	(ifp->if_flags & IFF_PROMISC) != 0 &&
 	memcmp(CLLADDR(ifp->if_sadl), eh->ether_dhost,
 		   ETHER_ADDR_LEN) != 0) {
@@ -1005,13 +1005,13 @@ ether_ifdetach(struct ifnet *ifp)
 		vlan_ifdetach(ifp);
 #endif
 
-	mutex_enter(ec->ec_lock);
+	ETHER_LOCK(ec);
 	while ((enm = LIST_FIRST(>ec_multiaddrs)) != NULL) {
 		LIST_REMOVE(enm, enm_list);
 		kmem_intr_free(enm, sizeof(*enm));
 		ec->ec_multicnt--;
 	}
-	mutex_exit(ec->ec_lock);
+	ETHER_UNLOCK(ec);
 
 	mutex_destroy(ec->ec_lock);
 
@@ -1231,7 +1231,7 @@ ether_addmulti(const struct sockaddr *sa
 	if (enm == NULL)
 		return ENOBUFS;
 
-	mutex_enter(ec->ec_lock);
+	ETHER_LOCK(ec);
 	error = ether_multiaddr(sa, addrlo, addrhi);
 	if (error != 0)
 		goto out;
@@ -1270,7 +1270,7 @@ ether_addmulti(const struct sockaddr *sa
 	error = ENETRESET;
 	enm = NULL;
 out:
-	mutex_exit(ec->ec_lock);
+	ETHER_UNLOCK(ec);
 	if (enm != NULL)
 		kmem_intr_free(enm, sizeof(*enm));
 	return error;
@@ -1287,7 +1287,7 @@ ether_delmulti(const struct sockaddr *sa
 	u_char addrhi[ETHER_ADDR_LEN];
 	int error;
 
-	mutex_enter(ec->ec_lock);
+	ETHER_LOCK(ec);
 	error = ether_multiaddr(sa, addrlo, addrhi);
 	if (error != 0)
 		goto error;
@@ -1312,7 +1312,7 @@ ether_delmulti(const struct sockaddr *sa
 	 */
 	LIST_REMOVE(enm, enm_list);
 	ec->ec_multicnt--;
-	mutex_exit(ec->ec_lock);
+	ETHER_UNLOCK(ec);
 
 	kmem_intr_free(enm, sizeof(*enm));
 	/*
@@ -1321,7 +1321,7 @@ ether_delmulti(const struct sockaddr *sa
 	 */
 	return ENETRESET;
 error:
-	mutex_exit(ec->ec_lock);
+	ETHER_UNLOCK(ec);
 	return error;
 }
 
@@ -1351,8 +1351,8 @@ ether_ioctl(struct ifnet *ifp, u_long cm
 	{
 		struct ifaddr *ifa = (struct ifaddr *)data;
 		if (ifa->ifa_addr->sa_family != AF_LINK
-		&& (ifp->if_flags & (IFF_UP|IFF_RUNNING)) !=
-		   (IFF_UP|IFF_RUNNING)) {
+		&& (ifp->if_flags & (IFF_UP | IFF_RUNNING)) !=
+		   (IFF_UP | IFF_RUNNING)) {
 			ifp->if_flags |= IFF_UP;
 			if ((error = (*ifp->if_init)(ifp)) != 0)
 return error;
@@ -1387,7 +1387,7 @@ ether_ioctl(struct ifnet *ifp, u_long cm
 	case SIOCSIFFLAGS:
 		if ((error = ifioctl_common(ifp, cmd, data)) != 0)
 			return error;
-		switch (ifp->if_flags & (IFF_UP|IFF_RUNNING)) {
+		switch (ifp->if_flags & (IFF_UP | IFF_RUNNING)) {
 		case IFF_RUNNING:
 			/*
 			 * If interface is marked down and it is running,
@@ -1401,18 +1401,21 @@ ether_ioctl(struct ifnet *ifp, u_long cm
 			 * start it.
 			 */
 			return (*ifp->if_init)(ifp);
-		case IFF_UP|IFF_RUNNING:
+		case IFF_UP | IFF_RUNNING:
 			error = 0;
-			if (ec->ec_ifflags_cb == NULL ||
-			(error = (*ec->ec_ifflags_cb)(ec)) == ENETRESET) {
-/*
- * Reset the interface to pick up
- * changes in any other flags that
- * affect the hardware state.
- */
-return (*ifp->if_init)(ifp);
-			} else 
-return 

CVS commit: [netbsd-8] src/doc

2018-03-08 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Mar  8 14:39:23 UTC 2018

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

Log Message:
Tickets #611 - #618


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.139 -r1.1.2.140 src/doc/CHANGES-8.0

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

Modified files:

Index: src/doc/CHANGES-8.0
diff -u src/doc/CHANGES-8.0:1.1.2.139 src/doc/CHANGES-8.0:1.1.2.140
--- src/doc/CHANGES-8.0:1.1.2.139	Wed Mar  7 14:55:49 2018
+++ src/doc/CHANGES-8.0	Thu Mar  8 14:39:22 2018
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-8.0,v 1.1.2.139 2018/03/07 14:55:49 martin Exp $
+# $NetBSD: CHANGES-8.0,v 1.1.2.140 2018/03/08 14:39:22 martin Exp $
 
 A complete list of changes from the initial NetBSD 8.0 branch on 2017-06-04
 until the 8.0 release:
@@ -10108,3 +10108,74 @@ sys/arch/xen/conf/Makefile.xen		1.45 (vi
 	Introduce nmitrap and doubletrap.
 	Have the CPU clear PSL_D automatically in the syscall entry point.
 	[maxv, ticket #610]
+
+sys/arch/i386/i386/machdep.c			1.792 (via patch)
+sys/arch/x86/include/cpu.h			1.78 (via patch)
+sys/arch/x86/x86/cpu.c1.134 (via patch)
+
+	Style, and move some i386-specific code into i386/
+	[maxv, ticket #611]
+
+sys/dev/pci/ixgbe/ixgbe.c			1.129-1.133
+sys/dev/pci/ixgbe/ixgbe.h			1.34
+sys/dev/pci/ixgbe/ixv.c1.85,1.86
+
+	Make "Handled queue in softint" and "Requeued in softint" evcnt(9)
+	per queue and count them correctly.
+	Fix another poll mode assumption breaking.
+	Fix INTx/MSI handler did not schedule workqueue.
+	[knakahara, ticket #612]
+
+sys/net/if_gif.c1.138,1.139
+sys/net/if_pppoe.c1.130,1.134
+sys/net/if_spppsubr.c1.172,1.175,1.179
+
+	Mark callouts of pppoe(4) CALLOUT_MPSAFE.
+	Fix non-diagnostic compilation for pppoe(4)
+	Fix gif(4) spl leak.
+	Fix breaking character limit of workqueue thread name for pppoe(4).
+	Fix leaking the next mbufs for gif(4) and pppoe(4).
+	[knakahara, ticket #613]
+
+sys/net/if_l2tp.c1.13,1.18-1.20
+sys/net/if_l2tp.h1.3
+sys/netinet/in_l2tp.c1.10-1.12
+sys/netinet6/in6_l2tp.c1.13,1.14
+
+	Fix memory leak when if_attach() failed.
+	Fix NULL dereference when M_PREPEND() failed.
+	Fix invalid m_copydata() when mbuf does not have enough space.
+	Reduce unnecessary NULL check.
+	Use MH_ALIGN instead of own code.
+	[knakahara, ticket #614]
+
+share/man/man4/sdtemp.41.7-1.8
+sys/dev/i2c/sdtemp.c1.33
+sys/dev/i2c/sdtemp_reg.h			1.13
+
+	- Add another device ID of Maxim MAX6604.
+	- Add Microchip EMC1501.
+	- ADT7408's device ID is not 0x80 but 0x08.
+	Add Microchip EMC1501.
+	Remove unnecessary macros.
+	[msaitoh, ticket #615]
+
+sys/dev/pci/if_msk.c1.55
+sys/dev/pci/pcidevs1.1299
+sys/dev/pci/pcidevs.h(regen)
+sys/dev/pci/pcidevs_data.h			(regen)
+
+	Update entry for Marvel Yukon 8058, and fix URL for pci ids.
+	[msaitoh, ticket #616]
+
+sys/dev/ppbus/if_plip.c1.28
+
+	Fix an spl leak.
+	[msaitoh, ticket #617]
+
+sys/net/if_ethersubr.c1.245,1.247
+
+	Use macro(ETHER_LOCK() and ETHER_UNLOCK()).
+	Modify ether_ioctl() for readability. No functional change.
+	[msaitoh, ticket #618]
+



CVS commit: [netbsd-8] src/doc

2018-03-08 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Mar  8 14:39:23 UTC 2018

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

Log Message:
Tickets #611 - #618


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.139 -r1.1.2.140 src/doc/CHANGES-8.0

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



CVS commit: src/sys/arch/evbmips/loongson/dev

2018-03-08 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Mar  8 18:48:25 UTC 2018

Modified Files:
src/sys/arch/evbmips/loongson/dev: pcib.c

Log Message:
The PCI_PRODUCT_VIATECH_VT82C686A_SMB has been renamed, adjust.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/evbmips/loongson/dev/pcib.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/evbmips/loongson/dev/pcib.c
diff -u src/sys/arch/evbmips/loongson/dev/pcib.c:1.1 src/sys/arch/evbmips/loongson/dev/pcib.c:1.2
--- src/sys/arch/evbmips/loongson/dev/pcib.c:1.1	Sat Aug 27 13:42:46 2011
+++ src/sys/arch/evbmips/loongson/dev/pcib.c	Thu Mar  8 18:48:25 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: pcib.c,v 1.1 2011/08/27 13:42:46 bouyer Exp $	*/
+/*	$NetBSD: pcib.c,v 1.2 2018/03/08 18:48:25 martin Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1998 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pcib.c,v 1.1 2011/08/27 13:42:46 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pcib.c,v 1.2 2018/03/08 18:48:25 martin Exp $");
 
 #include 
 #include 
@@ -83,7 +83,7 @@ pcibmatch(device_t parent, cfdata_t matc
 		break;
 	case PCI_VENDOR_VIATECH:
 		switch (PCI_PRODUCT(pa->pa_id)) {
-		case PCI_PRODUCT_VIATECH_VT82C686A_SMB:
+		case PCI_PRODUCT_VIATECH_VT82C686A_PWR:
 			/* mis-identifies itself as a ISA bridge */
 			return (0);
 		}



CVS commit: src/sys/arch/evbmips/loongson/dev

2018-03-08 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Mar  8 18:48:25 UTC 2018

Modified Files:
src/sys/arch/evbmips/loongson/dev: pcib.c

Log Message:
The PCI_PRODUCT_VIATECH_VT82C686A_SMB has been renamed, adjust.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/evbmips/loongson/dev/pcib.c

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



CVS commit: src/share/man/man4

2018-03-08 Thread Sevan Janiyan
Module Name:src
Committed By:   sevan
Date:   Thu Mar  8 17:57:15 UTC 2018

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

Log Message:
Update URL for the cited paper


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

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

Modified files:

Index: src/share/man/man4/altq.4
diff -u src/share/man/man4/altq.4:1.2 src/share/man/man4/altq.4:1.3
--- src/share/man/man4/altq.4:1.2	Thu Jun 23 07:47:22 2011
+++ src/share/man/man4/altq.4	Thu Mar  8 17:57:15 2018
@@ -1,4 +1,4 @@
-.\" $NetBSD: altq.4,v 1.2 2011/06/23 07:47:22 wiz Exp $
+.\" $NetBSD: altq.4,v 1.3 2018/03/08 17:57:15 sevan Exp $
 .\"
 .\" Copyright (c) 2011 Jukka Ruohonen 
 .\"
@@ -24,7 +24,7 @@
 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 .\" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd June 22, 2011
+.Dd March 08, 2018
 .Dt ALTQ 4
 .Os
 .Sh NAME
@@ -77,7 +77,7 @@ are required in order to use a certain n
 .%D March, 2004
 .%C Taipei, Taiwan
 .%O Asia BSD conference
-.%U http://www.sonycsl.co.jp/~kjc/papers/fittingtheory.pdf
+.%U http://www.sonycsl.co.jp/person/kjc/papers/fittingtheory.pdf
 .Re
 .\" .Sh HISTORY
 .\"



CVS commit: src/share/man/man4

2018-03-08 Thread Sevan Janiyan
Module Name:src
Committed By:   sevan
Date:   Thu Mar  8 17:57:15 UTC 2018

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

Log Message:
Update URL for the cited paper


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

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



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

2018-03-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Mar  8 20:39:40 UTC 2018

Modified Files:
src/distrib/sets/lists/debug: ad.mips

Log Message:
add missing debuglib


To generate a diff of this commit:
cvs rdiff -u -r1.67 -r1.68 src/distrib/sets/lists/debug/ad.mips

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



Re: CVS commit: src/sys/sys

2018-03-08 Thread Christos Zoulas
In article <20180308215453.gb22...@britannica.bec.de>,
Joerg Sonnenberger   wrote:
>On Thu, Mar 08, 2018 at 03:32:33PM -0500, Christos Zoulas wrote:
>> Module Name: src
>> Committed By:christos
>> Date:Thu Mar  8 20:32:33 UTC 2018
>> 
>> Modified Files:
>>  src/sys/sys: bitops.h
>> 
>> Log Message:
>> PR/53081: Fix size of the shift to depend on the type of the bitmap so that
>> we get the correct width.
>
>Please don't use __typeof__. 1ull is good enough and we can depend on
>a non-stupid compiler to truncate the intermediate.

The __typeof__ ship has already sailed:

$ fgrep -r __typeof__ /usr/include/sys/ | wc -l
   3

Not counting all the c++ header uses...

Doing a 64 bit calculation on a 32 bit platform when it is not needed
is a waste (and produces narrowing warnings).

christos



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

2018-03-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Mar  8 20:39:40 UTC 2018

Modified Files:
src/distrib/sets/lists/debug: ad.mips

Log Message:
add missing debuglib


To generate a diff of this commit:
cvs rdiff -u -r1.67 -r1.68 src/distrib/sets/lists/debug/ad.mips

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/debug/ad.mips
diff -u src/distrib/sets/lists/debug/ad.mips:1.67 src/distrib/sets/lists/debug/ad.mips:1.68
--- src/distrib/sets/lists/debug/ad.mips:1.67	Sat Feb  3 16:27:45 2018
+++ src/distrib/sets/lists/debug/ad.mips	Thu Mar  8 15:39:40 2018
@@ -1,7 +1,8 @@
-# $NetBSD: ad.mips,v 1.67 2018/02/03 21:27:45 mrg Exp $
+# $NetBSD: ad.mips,v 1.68 2018/03/08 20:39:40 christos Exp $
 -./usr/libdata/debug/usr/lib/64/libgomp.so.1.2.debug	comp-c-debug		debug,compatfile,gcc=5
 -./usr/libdata/debug/usr/lib/64/libgomp.so.1.3.debug	comp-c-debug		debug,compatfile,gcc=6
 ./usr/lib/64/libc_fp_g.acomp-c-debuglib		debuglib,softfloat,compat,arch64
+./usr/lib/64/libgomp_g.acomp-c-debuglib		debuglib,compat,arch64
 ./usr/lib/libc_fp_g.a	comp-c-debuglib		debuglib,softfloat,arch64
 ./usr/lib/o32/libc_fp_g.acomp-c-debuglib		debuglib,softfloat,compat,arch64
 ./usr/libdata/debug/lib/libc_fp.so.0.0.debug		comp-c-debug		debug,softfloat,arch64



Re: CVS commit: src/crypto/external/bsd/openssl/dist

2018-03-08 Thread Christos Zoulas
In article ,
Christos Zoulas  wrote:
>In article <20180308215340.ga22...@britannica.bec.de>,
>Joerg Sonnenberger   wrote:
>>On Wed, Mar 07, 2018 at 11:06:57AM -0500, Christos Zoulas wrote:
>>> Module Name:src
>>> Committed By:   christos
>>> Date:   Wed Mar  7 16:06:57 UTC 2018
>>> 
>>> Modified Files:
>>> src/crypto/external/bsd/openssl/dist: e_os.h
>>> 
>>> Log Message:
>>> HACK around aarch64 having "long long" "__int64_t"
>>
>>Please, just check __STDC_VERSION__ and use the real one for C99 and
>>later. No need for any such hacks.
>
>Will fix! Just trying to get everything to compile first.

Can't do it without making a lot of diffs. There is no C99 with the size
and without the format specifier:

e.g.

#define PRId64  "ld"/* int64_t  */

Where OpenSSL wants:

#define BIO_PRI64   "l"

christos



CVS commit: src/sys/lib/libsa

2018-03-08 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Thu Mar  8 23:02:50 UTC 2018

Modified Files:
src/sys/lib/libsa: cd9660.c

Log Message:
Add missed file in previous commit.

> efiboot: system can boot from CD/DVD-ROM media.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/sys/lib/libsa/cd9660.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/lib/libsa/cd9660.c
diff -u src/sys/lib/libsa/cd9660.c:1.30 src/sys/lib/libsa/cd9660.c:1.31
--- src/sys/lib/libsa/cd9660.c:1.30	Thu Mar 20 03:13:18 2014
+++ src/sys/lib/libsa/cd9660.c	Thu Mar  8 23:02:50 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: cd9660.c,v 1.30 2014/03/20 03:13:18 christos Exp $	*/
+/*	$NetBSD: cd9660.c,v 1.31 2018/03/08 23:02:50 nonaka Exp $	*/
 
 /*
  * Copyright (C) 1996 Wolfgang Solfrank.
@@ -71,7 +71,9 @@ struct ptable_ent {
 #define	PTFIXSZ		8
 #define	PTSIZE(pp)	roundup(PTFIXSZ + isonum_711((pp)->namlen), 2)
 
+#ifndef	cdb2devb
 #define	cdb2devb(bno)	((bno) * ISO_DEFAULT_BLOCK_SIZE / DEV_BSIZE)
+#endif
 
 static int	pnmatch(const char *, struct ptable_ent *);
 static int	dirmatch(const char *, struct iso_directory_record *);



CVS commit: src/sys/lib/libsa

2018-03-08 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Thu Mar  8 23:02:50 UTC 2018

Modified Files:
src/sys/lib/libsa: cd9660.c

Log Message:
Add missed file in previous commit.

> efiboot: system can boot from CD/DVD-ROM media.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/sys/lib/libsa/cd9660.c

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



CVS commit: src/sys/sys

2018-03-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Mar  8 20:32:33 UTC 2018

Modified Files:
src/sys/sys: bitops.h

Log Message:
PR/53081: Fix size of the shift to depend on the type of the bitmap so that
we get the correct width.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/sys/bitops.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/sys/bitops.h
diff -u src/sys/sys/bitops.h:1.13 src/sys/sys/bitops.h:1.14
--- src/sys/sys/bitops.h:1.13	Thu Mar  8 05:06:18 2018
+++ src/sys/sys/bitops.h	Thu Mar  8 15:32:32 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: bitops.h,v 1.13 2018/03/08 10:06:18 mrg Exp $	*/
+/*	$NetBSD: bitops.h,v 1.14 2018/03/08 20:32:32 christos Exp $	*/
 
 /*-
  * Copyright (c) 2007, 2010 The NetBSD Foundation, Inc.
@@ -304,7 +304,7 @@ fast_remainder32(uint32_t _v, uint32_t _
 #define __BITMAP_SIZE(__t, __n) \
 (((__n) + (__BITMAP_BITS(__t) - 1)) / __BITMAP_BITS(__t))
 #define __BITMAP_BIT(__n, __v) \
-(1ul << ((__n) & __BITMAP_MASK(*(__v)->_b)))
+((__typeof__((__v)->_b[0]))1 << ((__n) & __BITMAP_MASK(*(__v)->_b)))
 #define __BITMAP_WORD(__n, __v) \
 ((__n) >> __BITMAP_SHIFT(*(__v)->_b))
 



CVS commit: src/sys/sys

2018-03-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Mar  8 20:32:33 UTC 2018

Modified Files:
src/sys/sys: bitops.h

Log Message:
PR/53081: Fix size of the shift to depend on the type of the bitmap so that
we get the correct width.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/sys/bitops.h

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



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

2018-03-08 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri Mar  9 01:47:14 UTC 2018

Modified Files:
src/distrib/sets/lists/modules [pgoyette-compat]: mi

Log Message:
Reuse the previous module name rather than craeting a new and longer one


To generate a diff of this commit:
cvs rdiff -u -r1.114.2.1 -r1.114.2.2 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/mi
diff -u src/distrib/sets/lists/modules/mi:1.114.2.1 src/distrib/sets/lists/modules/mi:1.114.2.2
--- src/distrib/sets/lists/modules/mi:1.114.2.1	Fri Mar  9 01:34:32 2018
+++ src/distrib/sets/lists/modules/mi	Fri Mar  9 01:47:14 2018
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.114.2.1 2018/03/09 01:34:32 pgoyette Exp $
+# $NetBSD: mi,v 1.114.2.2 2018/03/09 01:47:14 pgoyette Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -70,10 +70,8 @@
 ./@MODULEDIR@/compat/compat.kmod		base-kernel-modules	kmod
 ./@MODULEDIR@/compat_ossaudio			base-kernel-modules	kmod
 ./@MODULEDIR@/compat_ossaudio/compat_ossaudio.kmod	base-kernel-modules	kmod
-./@MODULEDIR@/compat_sysv_ipc			base-kernel-modules	kmod
-./@MODULEDIR@/compat_sysv_ipc/compat_sysv_ipc.kmod base-kernel-modules	kmod
-./@MODULEDIR@/compat_sysv			base-obsolete		obsolete
-./@MODULEDIR@/compat_sysv/compat_sysv.kmod	base-obsolete		obsolete
+./@MODULEDIR@/compat_sysv			base-kernel-modules	kmod
+./@MODULEDIR@/compat_sysv/compat_sysv.kmod	base-kernel-modules	kmod
 ./@MODULEDIR@/coredumpbase-kernel-modules	kmod
 ./@MODULEDIR@/coredump/coredump.kmod		base-kernel-modules	kmod
 ./@MODULEDIR@/cryptobase-kernel-modules	kmod



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

2018-03-08 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri Mar  9 01:47:14 UTC 2018

Modified Files:
src/distrib/sets/lists/modules [pgoyette-compat]: mi

Log Message:
Reuse the previous module name rather than craeting a new and longer one


To generate a diff of this commit:
cvs rdiff -u -r1.114.2.1 -r1.114.2.2 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.



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

2018-03-08 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri Mar  9 02:06:45 UTC 2018

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

Log Message:
More on module renaming - fun with CVS


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.3.10.1 src/sys/modules/compat_sysv/Makefile

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

Added files:

Index: src/sys/modules/compat_sysv/Makefile
diff -u /dev/null src/sys/modules/compat_sysv/Makefile:1.3.10.1
--- /dev/null	Fri Mar  9 02:06:45 2018
+++ src/sys/modules/compat_sysv/Makefile	Fri Mar  9 02:06:45 2018
@@ -0,0 +1,23 @@
+# $NetBSD: Makefile,v 1.3.10.1 2018/03/09 02:06:45 pgoyette Exp $
+
+.include "../Makefile.inc"
+
+.PATH:	${S}/kern
+
+KMOD=	sysv_ipc
+
+CPPFLAGS+=	-DSYSVSEM -DSYSVSHM -DSYSVMSG
+
+.PATH:	${S}/compat/common
+
+CPPFLAGS+=	-DCOMPAT_10
+CPPFLAGS+=	-DCOMPAT_13
+CPPFLAGS+=	-DCOMPAT_14
+CPPFLAGS+=	-DCOMPAT_50
+
+SRCS+=	sysv_ipc_mod.c
+SRCS+=	kern_ipc_10.c
+SRCS+=	sysv_msg_14.c sysv_sem_14.c sysv_shm_14.c
+SRCS+=	sysv_msg_50.c sysv_sem_50.c sysv_shm_50.c
+
+.include 



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

2018-03-08 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri Mar  9 04:48:42 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: sysv_mod.c

Log Message:
Include correct header file


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.4 -r1.1.2.5 src/sys/compat/common/sysv_mod.c

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

Modified files:

Index: src/sys/compat/common/sysv_mod.c
diff -u src/sys/compat/common/sysv_mod.c:1.1.2.4 src/sys/compat/common/sysv_mod.c:1.1.2.5
--- src/sys/compat/common/sysv_mod.c:1.1.2.4	Fri Mar  9 04:42:11 2018
+++ src/sys/compat/common/sysv_mod.c	Fri Mar  9 04:48:42 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: sysv_mod.c,v 1.1.2.4 2018/03/09 04:42:11 pgoyette Exp $	*/
+/*	$NetBSD: sysv_mod.c,v 1.1.2.5 2018/03/09 04:48:42 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sysv_mod.c,v 1.1.2.4 2018/03/09 04:42:11 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sysv_mod.c,v 1.1.2.5 2018/03/09 04:48:42 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -44,7 +44,7 @@ __KERNEL_RCSID(0, "$NetBSD: sysv_mod.c,v
 #include 
 #include 
 
-#include 
+#include 
 
 #ifdef COMPAT_50
 int sysctl_kern_sysvipc50(SYSCTLFN_PROTO);



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

2018-03-08 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri Mar  9 04:48:42 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: sysv_mod.c

Log Message:
Include correct header file


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.4 -r1.1.2.5 src/sys/compat/common/sysv_mod.c

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



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

2018-03-08 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Mar  9 06:27:54 UTC 2018

Modified Files:
src/sys/dev/pci/ixgbe: ix_txrx.c ixgbe.c ixgbe.h ixv.c

Log Message:
 Make some event counters MP safe. Now all of the event counters are
MP safe.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sys/dev/pci/ixgbe/ix_txrx.c \
src/sys/dev/pci/ixgbe/ixgbe.h
cvs rdiff -u -r1.133 -r1.134 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.86 -r1.87 src/sys/dev/pci/ixgbe/ixv.c

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



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

2018-03-08 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Mar  9 06:27:54 UTC 2018

Modified Files:
src/sys/dev/pci/ixgbe: ix_txrx.c ixgbe.c ixgbe.h ixv.c

Log Message:
 Make some event counters MP safe. Now all of the event counters are
MP safe.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sys/dev/pci/ixgbe/ix_txrx.c \
src/sys/dev/pci/ixgbe/ixgbe.h
cvs rdiff -u -r1.133 -r1.134 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.86 -r1.87 src/sys/dev/pci/ixgbe/ixv.c

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

Modified files:

Index: src/sys/dev/pci/ixgbe/ix_txrx.c
diff -u src/sys/dev/pci/ixgbe/ix_txrx.c:1.34 src/sys/dev/pci/ixgbe/ix_txrx.c:1.35
--- src/sys/dev/pci/ixgbe/ix_txrx.c:1.34	Fri Mar  2 10:19:20 2018
+++ src/sys/dev/pci/ixgbe/ix_txrx.c	Fri Mar  9 06:27:53 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: ix_txrx.c,v 1.34 2018/03/02 10:19:20 knakahara Exp $ */
+/* $NetBSD: ix_txrx.c,v 1.35 2018/03/09 06:27:53 msaitoh Exp $ */
 
 /**
 
@@ -392,10 +392,10 @@ retry:
 
 		switch (error) {
 		case EAGAIN:
-			adapter->eagain_tx_dma_setup.ev_count++;
+			txr->q_eagain_tx_dma_setup++;
 			return EAGAIN;
 		case ENOMEM:
-			adapter->enomem_tx_dma_setup.ev_count++;
+			txr->q_enomem_tx_dma_setup++;
 			return EAGAIN;
 		case EFBIG:
 			/* Try it again? - one try */
@@ -405,23 +405,23 @@ retry:
  * XXX: m_defrag will choke on
  * non-MCLBYTES-sized clusters
  */
-adapter->efbig_tx_dma_setup.ev_count++;
+txr->q_efbig_tx_dma_setup++;
 m = m_defrag(m_head, M_NOWAIT);
 if (m == NULL) {
-	adapter->mbuf_defrag_failed.ev_count++;
+	txr->q_mbuf_defrag_failed++;
 	return ENOBUFS;
 }
 m_head = m;
 goto retry;
 			} else {
-adapter->efbig2_tx_dma_setup.ev_count++;
+txr->q_efbig2_tx_dma_setup++;
 return error;
 			}
 		case EINVAL:
-			adapter->einval_tx_dma_setup.ev_count++;
+			txr->q_einval_tx_dma_setup++;
 			return error;
 		default:
-			adapter->other_tx_dma_setup.ev_count++;
+			txr->q_other_tx_dma_setup++;
 			return error;
 		}
 	}
Index: src/sys/dev/pci/ixgbe/ixgbe.h
diff -u src/sys/dev/pci/ixgbe/ixgbe.h:1.34 src/sys/dev/pci/ixgbe/ixgbe.h:1.35
--- src/sys/dev/pci/ixgbe/ixgbe.h:1.34	Wed Mar  7 03:29:10 2018
+++ src/sys/dev/pci/ixgbe/ixgbe.h	Fri Mar  9 06:27:53 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.h,v 1.34 2018/03/07 03:29:10 msaitoh Exp $ */
+/* $NetBSD: ixgbe.h,v 1.35 2018/03/09 06:27:53 msaitoh Exp $ */
 
 /**
   SPDX-License-Identifier: BSD-3-Clause
@@ -334,9 +334,10 @@ struct ix_queue {
 	struct rx_ring   *rxr;
 	struct work  wq_cookie;
 	void *que_si;
-	struct evcnt irqs;
-	struct evcnt handleq;
-	struct evcnt req;
+	/* Per queue event conters */
+	struct evcnt irqs;		/* Hardware interrupt */
+	struct evcnt handleq;	/* software_interrupt */
+	struct evcnt req;		/* deferred */
 	char namebuf[32];
 	char evnamebuf[32];
 
@@ -378,6 +379,15 @@ struct tx_ring {
 	struct evcnt		no_desc_avail;
 	struct evcnt		total_packets;
 	struct evcnt		pcq_drops;
+	/* Per queue conters.  The adapter total is in struct adapter */
+	u64  q_efbig_tx_dma_setup;
+	u64  q_mbuf_defrag_failed;
+	u64  q_efbig2_tx_dma_setup;
+	u64  q_einval_tx_dma_setup;
+	u64  q_other_tx_dma_setup;
+	u64  q_eagain_tx_dma_setup;
+	u64  q_enomem_tx_dma_setup;
+	u64  q_tso_err;
 };
 
 
@@ -558,8 +568,8 @@ struct adapter {
 	void 			(*stop_locked)(void *);
 
 	/* Misc stats maintained by the driver */
-	struct evcnt   		mbuf_defrag_failed;
 	struct evcnt	   	efbig_tx_dma_setup;
+	struct evcnt   		mbuf_defrag_failed;
 	struct evcnt	   	efbig2_tx_dma_setup;
 	struct evcnt	   	einval_tx_dma_setup;
 	struct evcnt	   	other_tx_dma_setup;

Index: src/sys/dev/pci/ixgbe/ixgbe.c
diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.133 src/sys/dev/pci/ixgbe/ixgbe.c:1.134
--- src/sys/dev/pci/ixgbe/ixgbe.c:1.133	Thu Mar  8 02:41:27 2018
+++ src/sys/dev/pci/ixgbe/ixgbe.c	Fri Mar  9 06:27:53 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.c,v 1.133 2018/03/08 02:41:27 knakahara Exp $ */
+/* $NetBSD: ixgbe.c,v 1.134 2018/03/09 06:27:53 msaitoh Exp $ */
 
 /**
 
@@ -1980,8 +1980,8 @@ ixgbe_clear_evcnt(struct adapter *adapte
 	adapter->other_tx_dma_setup.ev_count = 0;
 	adapter->eagain_tx_dma_setup.ev_count = 0;
 	adapter->enomem_tx_dma_setup.ev_count = 0;
-	adapter->watchdog_events.ev_count = 0;
 	adapter->tso_err.ev_count = 0;
+	adapter->watchdog_events.ev_count = 0;
 	adapter->link_irq.ev_count = 0;
 
 	txr = adapter->tx_rings;
@@ -1995,6 +1995,14 @@ ixgbe_clear_evcnt(struct adapter *adapte
 #ifndef IXGBE_LEGACY_TX
 		txr->pcq_drops.ev_count = 0;
 #endif

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

2018-03-08 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri Mar  9 04:42:11 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: sysv_mod.c

Log Message:
All the COMPAT_xx macros are already in opt_compat_netbsd.h so no
need to look for them in opt_compat_xx.h


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.3 -r1.1.2.4 src/sys/compat/common/sysv_mod.c

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

Modified files:

Index: src/sys/compat/common/sysv_mod.c
diff -u src/sys/compat/common/sysv_mod.c:1.1.2.3 src/sys/compat/common/sysv_mod.c:1.1.2.4
--- src/sys/compat/common/sysv_mod.c:1.1.2.3	Fri Mar  9 03:58:32 2018
+++ src/sys/compat/common/sysv_mod.c	Fri Mar  9 04:42:11 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: sysv_mod.c,v 1.1.2.3 2018/03/09 03:58:32 pgoyette Exp $	*/
+/*	$NetBSD: sysv_mod.c,v 1.1.2.4 2018/03/09 04:42:11 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -30,13 +30,10 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sysv_mod.c,v 1.1.2.3 2018/03/09 03:58:32 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sysv_mod.c,v 1.1.2.4 2018/03/09 04:42:11 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
-#include "opt_compat_50.h"
-#include "opt_compat_14.h"
-#include "opt_compat_10.h"
 #include "opt_sysv.h"
 #endif
 



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

2018-03-08 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri Mar  9 04:42:11 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: sysv_mod.c

Log Message:
All the COMPAT_xx macros are already in opt_compat_netbsd.h so no
need to look for them in opt_compat_xx.h


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.3 -r1.1.2.4 src/sys/compat/common/sysv_mod.c

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



CVS commit: src/sys/arch/macppc/dev

2018-03-08 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Thu Mar  8 21:53:20 UTC 2018

Modified Files:
src/sys/arch/macppc/dev: ki2c.c

Log Message:
use channel info and set MODE bits accordingly instead of hoping OF set them
for us
now iic devices on different channels work properly


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/macppc/dev/ki2c.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/macppc/dev/ki2c.c
diff -u src/sys/arch/macppc/dev/ki2c.c:1.24 src/sys/arch/macppc/dev/ki2c.c:1.25
--- src/sys/arch/macppc/dev/ki2c.c:1.24	Wed Jan 24 17:21:03 2018
+++ src/sys/arch/macppc/dev/ki2c.c	Thu Mar  8 21:53:20 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: ki2c.c,v 1.24 2018/01/24 17:21:03 macallan Exp $	*/
+/*	$NetBSD: ki2c.c,v 1.25 2018/03/08 21:53:20 macallan Exp $	*/
 /*	Id: ki2c.c,v 1.7 2002/10/05 09:56:05 tsubai Exp	*/
 
 /*-
@@ -84,7 +84,7 @@ ki2c_attach(device_t parent, device_t se
 	struct ki2c_softc *sc = device_private(self);
 	struct confargs *ca = aux;
 	int node = ca->ca_node;
-	uint32_t addr;
+	uint32_t addr, channel;
 	int rate, child, /*namelen,*/ i2cbus;
 	struct i2cbus_attach_args iba;
 	prop_dictionary_t dict = device_properties(self);
@@ -136,14 +136,21 @@ ki2c_attach(device_t parent, device_t se
 	/* 
 	 * newer OF puts I2C devices under 'i2c-bus' instead of attaching them 
 	 * directly to the ki2c node so we just check if we have a child named
-	 * 'i2c-bus' and if so we attach its children, not ours 
+	 * 'i2c-bus' and if so we attach its children, not ours
+	 *
+	 * XXX
+	 * should probably check for multiple i2c-bus children
 	 */
 	i2cbus = 0;
+	channel = 0;
 	child = OF_child(node);
 	while ((child != 0) && (i2cbus == 0)) {
 		OF_getprop(child, "name", name, sizeof(name));
-		if (strcmp(name, "i2c-bus") == 0)
+		if (strcmp(name, "i2c-bus") == 0) {
+			OF_getprop(child, "reg", , sizeof(channel));
 			i2cbus = child;
+			DPRINTF("found channel %x\n", channel);
+		}
 		child = OF_peer(child);
 	}
 	if (i2cbus == 0) 
@@ -161,7 +168,8 @@ ki2c_attach(device_t parent, device_t se
 		if (OF_getprop(devs, "reg", , 4) <= 0)
 			if (OF_getprop(devs, "i2c-address", , 4) <= 0)
 goto skip;
-		addr = (addr & 0xff) >> 1;
+		addr |= channel << 8;
+		addr = addr >> 1;
 		DPRINTF("-> %s@%x\n", name, addr);
 		dev = prop_dictionary_create();
 		prop_dictionary_set_cstring(dev, "name", name);
@@ -217,13 +225,7 @@ ki2c_getmode(struct ki2c_softc *sc)
 void
 ki2c_setmode(struct ki2c_softc *sc, u_int mode)
 {
-	u_int x;
-
-	KASSERT((mode & ~I2C_MODE) == 0);
-	x = ki2c_readreg(sc, MODE);
-	x &= ~I2C_MODE;
-	x |= mode;
-	ki2c_writereg(sc, MODE, x);
+	ki2c_writereg(sc, MODE, mode);
 }
 
 u_int
@@ -401,6 +403,7 @@ ki2c_i2c_exec(void *cookie, i2c_op_t op,
 	size_t w_len;
 	uint8_t *wp;
 	uint8_t wrbuf[I2C_EXEC_MAX_CMDLEN + I2C_EXEC_MAX_CMDLEN];
+	uint8_t channel;
 
 	/*
 	 * We don't have any idea if the ki2c controller can execute
@@ -410,8 +413,12 @@ ki2c_i2c_exec(void *cookie, i2c_op_t op,
 	if (cmdlen == 0 && buflen == 0)
 		return -1;
 
+	channel = (addr & 0xf80) ? 0x10 : 0x00;
+	addr &= 0x7f;
+	
+
 	/* we handle the subaddress stuff ourselves */
-	ki2c_setmode(sc, I2C_STDMODE);	
+	ki2c_setmode(sc, channel | I2C_STDMODE);	
 
 	/* Write-buffer defaults to vcmd */
 	wp = (uint8_t *)(__UNCONST(vcmd));



CVS commit: src/sys/arch/macppc/dev

2018-03-08 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Thu Mar  8 21:53:20 UTC 2018

Modified Files:
src/sys/arch/macppc/dev: ki2c.c

Log Message:
use channel info and set MODE bits accordingly instead of hoping OF set them
for us
now iic devices on different channels work properly


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/macppc/dev/ki2c.c

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



Re: CVS commit: src/crypto/external/bsd/openssl/dist

2018-03-08 Thread Joerg Sonnenberger
On Wed, Mar 07, 2018 at 11:06:57AM -0500, Christos Zoulas wrote:
> Module Name:  src
> Committed By: christos
> Date: Wed Mar  7 16:06:57 UTC 2018
> 
> Modified Files:
>   src/crypto/external/bsd/openssl/dist: e_os.h
> 
> Log Message:
> HACK around aarch64 having "long long" "__int64_t"

Please, just check __STDC_VERSION__ and use the real one for C99 and
later. No need for any such hacks.

Joerg


Re: CVS commit: src/sys/sys

2018-03-08 Thread Joerg Sonnenberger
On Thu, Mar 08, 2018 at 03:32:33PM -0500, Christos Zoulas wrote:
> Module Name:  src
> Committed By: christos
> Date: Thu Mar  8 20:32:33 UTC 2018
> 
> Modified Files:
>   src/sys/sys: bitops.h
> 
> Log Message:
> PR/53081: Fix size of the shift to depend on the type of the bitmap so that
> we get the correct width.

Please don't use __typeof__. 1ull is good enough and we can depend on
a non-stupid compiler to truncate the intermediate.

Joerg


CVS commit: src/sys/dev/i2c

2018-03-08 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Thu Mar  8 23:25:56 UTC 2018

Modified Files:
src/sys/dev/i2c: files.i2c
Added Files:
src/sys/dev/i2c: fcu.c

Log Message:
preliminary driver for the fan control unit found in some G5


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/sys/dev/i2c/fcu.c
cvs rdiff -u -r1.84 -r1.85 src/sys/dev/i2c/files.i2c

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

Modified files:

Index: src/sys/dev/i2c/files.i2c
diff -u src/sys/dev/i2c/files.i2c:1.84 src/sys/dev/i2c/files.i2c:1.85
--- src/sys/dev/i2c/files.i2c:1.84	Tue Feb 13 13:19:30 2018
+++ src/sys/dev/i2c/files.i2c	Thu Mar  8 23:25:56 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: files.i2c,v 1.84 2018/02/13 13:19:30 uwe Exp $
+#	$NetBSD: files.i2c,v 1.85 2018/03/08 23:25:56 macallan Exp $
 
 obsolete defflag	opt_i2cbus.h		I2C_SCAN
 define	i2cbus { }
@@ -304,6 +304,11 @@ device	em3027rtc: sysmon_envsys
 attach	em3027rtc at iic
 file	dev/i2c/em3027.c			em3027rtc
 
+# Apple Fan Control Unit found in some G5
+device	fcu: sysmon_envsys
+attach	fcu at iic
+file	dev/i2c/fcu.cfcu
+
 # HID over i2c
 # HID "bus"
 define  ihidbus {[ reportid = -1 ]}

Added files:

Index: src/sys/dev/i2c/fcu.c
diff -u /dev/null src/sys/dev/i2c/fcu.c:1.1
--- /dev/null	Thu Mar  8 23:25:56 2018
+++ src/sys/dev/i2c/fcu.c	Thu Mar  8 23:25:56 2018
@@ -0,0 +1,200 @@
+/* $NetBSD: fcu.c,v 1.1 2018/03/08 23:25:56 macallan Exp $ */
+
+/*-
+ * Copyright (c) 2018 Michael Lorenz
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include 
+__KERNEL_RCSID(0, "$NetBSD: fcu.c,v 1.1 2018/03/08 23:25:56 macallan Exp $");
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+#include 
+
+#include 
+
+/* FCU registers, from OpenBSD's fcu.c */
+#define FCU_FAN_FAIL	0x0b		/* fans states in bits 0<1-6>7 */
+#define FCU_FAN_ACTIVE	0x0d
+#define FCU_FANREAD(x)	0x11 + (x)*2
+#define FCU_FANSET(x)	0x10 + (x)*2
+#define FCU_PWM_FAIL	0x2b
+#define FCU_PWM_ACTIVE	0x2d
+#define FCU_PWMREAD(x)	0x30 + (x)*2
+
+struct fcu_softc {
+	device_t	sc_dev;
+	i2c_tag_t	sc_i2c;
+	i2c_addr_t	sc_addr;
+
+	struct sysmon_envsys *sc_sme;
+	envsys_data_t	sc_sensors[32];
+	int		sc_nsensors;
+};
+
+static int	fcu_match(device_t, cfdata_t, void *);
+static void	fcu_attach(device_t, device_t, void *);
+
+static void	fcu_sensors_refresh(struct sysmon_envsys *, envsys_data_t *);
+
+CFATTACH_DECL_NEW(fcu, sizeof(struct fcu_softc),
+fcu_match, fcu_attach, NULL, NULL);
+
+static const char * fcu_compats[] = {
+	"fcu",
+	NULL
+};
+
+static int
+fcu_match(device_t parent, cfdata_t match, void *aux)
+{
+	struct i2c_attach_args *ia = aux;
+
+	if (ia->ia_name == NULL) {
+		/* no ID registers on this chip */
+		if (ia->ia_addr == 0x2f)
+			return 1;
+		return 0;
+	} else {
+		return iic_compat_match(ia, fcu_compats);
+	}
+}
+
+static void
+fcu_attach(device_t parent, device_t self, void *aux)
+{
+	struct fcu_softc *sc = device_private(self);
+	struct i2c_attach_args *ia = aux;
+
+	sc->sc_dev = self;
+	sc->sc_i2c = ia->ia_tag;
+	sc->sc_addr = ia->ia_addr;
+
+	aprint_naive("\n");
+	aprint_normal(": Fan Control Unit\n");
+
+	sc->sc_sme = sysmon_envsys_create();
+	sc->sc_sme->sme_name = device_xname(self);
+	sc->sc_sme->sme_cookie = sc;
+	sc->sc_sme->sme_refresh = fcu_sensors_refresh;
+
+	sc->sc_sensors[0].units = ENVSYS_SFANRPM;
+	sc->sc_sensors[1].state = ENVSYS_SINVALID;
+
+	/* round up sensors */
+	int ch;
+
+	sc->sc_nsensors = 0;
+	ch = OF_child(ia->ia_cookie);
+	while (ch != 0) {
+		char type[32], descr[32];
+		uint32_t reg;
+
+		envsys_data_t *s = >sc_sensors[sc->sc_nsensors];
+
+		if (OF_getprop(ch, 

CVS commit: src/sys/dev/i2c

2018-03-08 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Thu Mar  8 23:25:56 UTC 2018

Modified Files:
src/sys/dev/i2c: files.i2c
Added Files:
src/sys/dev/i2c: fcu.c

Log Message:
preliminary driver for the fan control unit found in some G5


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/sys/dev/i2c/fcu.c
cvs rdiff -u -r1.84 -r1.85 src/sys/dev/i2c/files.i2c

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



CVS commit: [pgoyette-compat] src/sys

2018-03-08 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri Mar  9 03:58:33 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: sysv_mod.c
src/sys/kern [pgoyette-compat]: sysv_ipc.c
src/sys/modules/compat_sysv [pgoyette-compat]: Makefile

Log Message:
Finish renaming the new module.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.2 -r1.1.2.3 src/sys/compat/common/sysv_mod.c
cvs rdiff -u -r1.32.16.1 -r1.32.16.2 src/sys/kern/sysv_ipc.c
cvs rdiff -u -r1.3.10.1 -r1.3.10.2 src/sys/modules/compat_sysv/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/common/sysv_mod.c
diff -u src/sys/compat/common/sysv_mod.c:1.1.2.2 src/sys/compat/common/sysv_mod.c:1.1.2.3
--- src/sys/compat/common/sysv_mod.c:1.1.2.2	Fri Mar  9 02:13:46 2018
+++ src/sys/compat/common/sysv_mod.c	Fri Mar  9 03:58:32 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: sysv_mod.c,v 1.1.2.2 2018/03/09 02:13:46 pgoyette Exp $	*/
+/*	$NetBSD: sysv_mod.c,v 1.1.2.3 2018/03/09 03:58:32 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sysv_mod.c,v 1.1.2.2 2018/03/09 02:13:46 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sysv_mod.c,v 1.1.2.3 2018/03/09 03:58:32 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -47,7 +47,7 @@ __KERNEL_RCSID(0, "$NetBSD: sysv_mod.c,v
 #include 
 #include 
 
-#include 
+#include 
 
 #ifdef COMPAT_50
 int sysctl_kern_sysvipc50(SYSCTLFN_PROTO);

Index: src/sys/kern/sysv_ipc.c
diff -u src/sys/kern/sysv_ipc.c:1.32.16.1 src/sys/kern/sysv_ipc.c:1.32.16.2
--- src/sys/kern/sysv_ipc.c:1.32.16.1	Fri Mar  9 01:27:50 2018
+++ src/sys/kern/sysv_ipc.c	Fri Mar  9 03:58:33 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: sysv_ipc.c,v 1.32.16.1 2018/03/09 01:27:50 pgoyette Exp $	*/
+/*	$NetBSD: sysv_ipc.c,v 1.32.16.2 2018/03/09 03:58:33 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2007 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sysv_ipc.c,v 1.32.16.1 2018/03/09 01:27:50 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sysv_ipc.c,v 1.32.16.2 2018/03/09 03:58:33 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_sysv.h"
@@ -62,7 +62,7 @@ __KERNEL_RCSID(0, "$NetBSD: sysv_ipc.c,v
 #include 
 #include 
 
-#include 	/* for sysctl routine vector */
+#include 	/* for sysctl routine vector */
 
 /*
  * Values in support of System V compatible shared memory.	XXX

Index: src/sys/modules/compat_sysv/Makefile
diff -u src/sys/modules/compat_sysv/Makefile:1.3.10.1 src/sys/modules/compat_sysv/Makefile:1.3.10.2
--- src/sys/modules/compat_sysv/Makefile:1.3.10.1	Fri Mar  9 02:06:45 2018
+++ src/sys/modules/compat_sysv/Makefile	Fri Mar  9 03:58:33 2018
@@ -1,10 +1,10 @@
-# $NetBSD: Makefile,v 1.3.10.1 2018/03/09 02:06:45 pgoyette Exp $
+# $NetBSD: Makefile,v 1.3.10.2 2018/03/09 03:58:33 pgoyette Exp $
 
 .include "../Makefile.inc"
 
 .PATH:	${S}/kern
 
-KMOD=	sysv_ipc
+KMOD=	compat_sysv
 
 CPPFLAGS+=	-DSYSVSEM -DSYSVSHM -DSYSVMSG
 
@@ -15,7 +15,7 @@ CPPFLAGS+=	-DCOMPAT_13
 CPPFLAGS+=	-DCOMPAT_14
 CPPFLAGS+=	-DCOMPAT_50
 
-SRCS+=	sysv_ipc_mod.c
+SRCS+=	sysv_ipc.c
 SRCS+=	kern_ipc_10.c
 SRCS+=	sysv_msg_14.c sysv_sem_14.c sysv_shm_14.c
 SRCS+=	sysv_msg_50.c sysv_sem_50.c sysv_shm_50.c



CVS commit: [pgoyette-compat] src/sys

2018-03-08 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri Mar  9 03:58:33 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: sysv_mod.c
src/sys/kern [pgoyette-compat]: sysv_ipc.c
src/sys/modules/compat_sysv [pgoyette-compat]: Makefile

Log Message:
Finish renaming the new module.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.2 -r1.1.2.3 src/sys/compat/common/sysv_mod.c
cvs rdiff -u -r1.32.16.1 -r1.32.16.2 src/sys/kern/sysv_ipc.c
cvs rdiff -u -r1.3.10.1 -r1.3.10.2 src/sys/modules/compat_sysv/Makefile

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



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

2018-03-08 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri Mar  9 02:06:45 UTC 2018

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

Log Message:
More on module renaming - fun with CVS


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.3.10.1 src/sys/modules/compat_sysv/Makefile

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



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

2018-03-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Mar  9 02:36:28 UTC 2018

Modified Files:
src/distrib/sets/lists/debug: ad.mips

Log Message:
use the magic -


To generate a diff of this commit:
cvs rdiff -u -r1.68 -r1.69 src/distrib/sets/lists/debug/ad.mips

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/debug/ad.mips
diff -u src/distrib/sets/lists/debug/ad.mips:1.68 src/distrib/sets/lists/debug/ad.mips:1.69
--- src/distrib/sets/lists/debug/ad.mips:1.68	Thu Mar  8 15:39:40 2018
+++ src/distrib/sets/lists/debug/ad.mips	Thu Mar  8 21:36:28 2018
@@ -1,8 +1,8 @@
-# $NetBSD: ad.mips,v 1.68 2018/03/08 20:39:40 christos Exp $
+# $NetBSD: ad.mips,v 1.69 2018/03/09 02:36:28 christos Exp $
 -./usr/libdata/debug/usr/lib/64/libgomp.so.1.2.debug	comp-c-debug		debug,compatfile,gcc=5
 -./usr/libdata/debug/usr/lib/64/libgomp.so.1.3.debug	comp-c-debug		debug,compatfile,gcc=6
 ./usr/lib/64/libc_fp_g.acomp-c-debuglib		debuglib,softfloat,compat,arch64
-./usr/lib/64/libgomp_g.acomp-c-debuglib		debuglib,compat,arch64
+-./usr/lib/64/libgomp_g.acomp-c-debuglib		debuglib,compat,arch64
 ./usr/lib/libc_fp_g.a	comp-c-debuglib		debuglib,softfloat,arch64
 ./usr/lib/o32/libc_fp_g.acomp-c-debuglib		debuglib,softfloat,compat,arch64
 ./usr/libdata/debug/lib/libc_fp.so.0.0.debug		comp-c-debug		debug,softfloat,arch64



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

2018-03-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Mar  9 02:36:28 UTC 2018

Modified Files:
src/distrib/sets/lists/debug: ad.mips

Log Message:
use the magic -


To generate a diff of this commit:
cvs rdiff -u -r1.68 -r1.69 src/distrib/sets/lists/debug/ad.mips

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



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

2018-03-08 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Thu Mar  8 23:27:13 UTC 2018

Modified Files:
src/sys/arch/macppc/conf: POWERMAC_G5

Log Message:
add fcu at iic


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/macppc/conf/POWERMAC_G5

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



Re: CVS commit: src/sys/sys

2018-03-08 Thread Joerg Sonnenberger
On Thu, Mar 08, 2018 at 10:25:45PM +, Christos Zoulas wrote:
> In article <20180308215453.gb22...@britannica.bec.de>,
> Joerg Sonnenberger   wrote:
> >On Thu, Mar 08, 2018 at 03:32:33PM -0500, Christos Zoulas wrote:
> >> Module Name:   src
> >> Committed By:  christos
> >> Date:  Thu Mar  8 20:32:33 UTC 2018
> >> 
> >> Modified Files:
> >>src/sys/sys: bitops.h
> >> 
> >> Log Message:
> >> PR/53081: Fix size of the shift to depend on the type of the bitmap so that
> >> we get the correct width.
> >
> >Please don't use __typeof__. 1ull is good enough and we can depend on
> >a non-stupid compiler to truncate the intermediate.
> 
> The __typeof__ ship has already sailed:
> 
> $ fgrep -r __typeof__ /usr/include/sys/ | wc -l
>3

Of those, only the rounddown2 is non-optional. That falls into the same
category even, it doesn't really hurt to widen there.

> Doing a 64 bit calculation on a 32 bit platform when it is not needed
> is a waste (and produces narrowing warnings).

It's not a 64bit calculation if the compiler is at least trying to
create sane code. The bit masking should ensure that.

Joerg


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

2018-03-08 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Thu Mar  8 23:27:13 UTC 2018

Modified Files:
src/sys/arch/macppc/conf: POWERMAC_G5

Log Message:
add fcu at iic


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/macppc/conf/POWERMAC_G5

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/macppc/conf/POWERMAC_G5
diff -u src/sys/arch/macppc/conf/POWERMAC_G5:1.34 src/sys/arch/macppc/conf/POWERMAC_G5:1.35
--- src/sys/arch/macppc/conf/POWERMAC_G5:1.34	Sun Mar  4 00:22:21 2018
+++ src/sys/arch/macppc/conf/POWERMAC_G5	Thu Mar  8 23:27:12 2018
@@ -145,6 +145,7 @@ iic*		at i2cbus?
 admtemp* 	at iic?
 lmtemp* 	at iic?
 dstemp* 	at iic?
+fcu* 		at iic?
 deq* 		at iic?
 
 pmu* 		at obio?	# Apple PMU



CVS commit: [pgoyette-compat] src/sys

2018-03-08 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri Mar  9 01:27:51 UTC 2018

Modified Files:
src/sys/arch/amd64/conf [pgoyette-compat]: NOCOMPAT
src/sys/compat/common [pgoyette-compat]: files.common
src/sys/kern [pgoyette-compat]: sysv_ipc.c
src/sys/modules [pgoyette-compat]: Makefile
src/sys/modules/sysv_ipc [pgoyette-compat]: Makefile
Added Files:
src/sys/compat/common [pgoyette-compat]: sysv_ipc_mod.c sysv_ipc_mod.h
src/sys/modules/compat_sysv_ipc [pgoyette-compat]: Makefile

Log Message:
Split the sysv_ipc module into two pieces:  one for contemporary
SYSV* functionality, and one for compatability with previous NetBSD
versions.  No need to pull in all of compat just to have a sysv_ipc
module.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/sys/arch/amd64/conf/NOCOMPAT
cvs rdiff -u -r1.1.2.3 -r1.1.2.4 src/sys/compat/common/files.common
cvs rdiff -u -r0 -r1.1.2.1 src/sys/compat/common/sysv_ipc_mod.c \
src/sys/compat/common/sysv_ipc_mod.h
cvs rdiff -u -r1.32 -r1.32.16.1 src/sys/kern/sysv_ipc.c
cvs rdiff -u -r1.202 -r1.202.2.1 src/sys/modules/Makefile
cvs rdiff -u -r0 -r1.1.2.1 src/sys/modules/compat_sysv_ipc/Makefile
cvs rdiff -u -r1.3 -r1.3.16.1 src/sys/modules/sysv_ipc/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/arch/amd64/conf/NOCOMPAT
diff -u src/sys/arch/amd64/conf/NOCOMPAT:1.1.2.1 src/sys/arch/amd64/conf/NOCOMPAT:1.1.2.2
--- src/sys/arch/amd64/conf/NOCOMPAT:1.1.2.1	Tue Mar  6 04:45:04 2018
+++ src/sys/arch/amd64/conf/NOCOMPAT	Fri Mar  9 01:27:50 2018
@@ -1,4 +1,4 @@
-# $NetBSD: NOCOMPAT,v 1.1.2.1 2018/03/06 04:45:04 pgoyette Exp $
+# $NetBSD: NOCOMPAT,v 1.1.2.2 2018/03/09 01:27:50 pgoyette Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@ include 	"arch/amd64/conf/std.amd64"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident		"GENERIC-$Revision: 1.1.2.1 $"
+#ident		"GENERIC-$Revision: 1.1.2.2 $"
 
 maxusers	64		# estimated number of users
 
@@ -63,9 +63,9 @@ options 	KTRACE		# system call tracing v
 options 	CPU_UCODE	# cpu ucode loading support
 
 # Note: SysV IPC parameters could be changed dynamically, see sysctl(8).
-options 	SYSVMSG		# System V-like message queues
-options 	SYSVSEM		# System V-like semaphores
-options 	SYSVSHM		# System V-like memory sharing
+#options 	SYSVMSG		# System V-like message queues
+#options 	SYSVSEM		# System V-like semaphores
+#options 	SYSVSHM		# System V-like memory sharing
 
 options 	MODULAR		# new style module(7) framework
 options 	MODULAR_DEFAULT_AUTOLOAD

Index: src/sys/compat/common/files.common
diff -u src/sys/compat/common/files.common:1.1.2.3 src/sys/compat/common/files.common:1.1.2.4
--- src/sys/compat/common/files.common:1.1.2.3	Tue Mar  6 10:37:41 2018
+++ src/sys/compat/common/files.common	Fri Mar  9 01:27:50 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: files.common,v 1.1.2.3 2018/03/06 10:37:41 pgoyette Exp $
+#	$NetBSD: files.common,v 1.1.2.4 2018/03/09 01:27:50 pgoyette Exp $
 
 #
 # Generic files, used by all compat options.
@@ -73,6 +73,10 @@ file	compat/common/uipc_usrreq_70.c		com
 # Sources for sysv ipc compatibility across the versions.
 #
 
+# Module interface for sysv ipc compatability options
+
+file	compat/common/sysv_ipc_mod.c		compat_netbsd
+
 # Compatibility code for NetBSD 1.0
 file	compat/common/kern_ipc_10.c		compat_netbsd
 

Index: src/sys/kern/sysv_ipc.c
diff -u src/sys/kern/sysv_ipc.c:1.32 src/sys/kern/sysv_ipc.c:1.32.16.1
--- src/sys/kern/sysv_ipc.c:1.32	Sat Dec  5 00:51:42 2015
+++ src/sys/kern/sysv_ipc.c	Fri Mar  9 01:27:50 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: sysv_ipc.c,v 1.32 2015/12/05 00:51:42 pgoyette Exp $	*/
+/*	$NetBSD: sysv_ipc.c,v 1.32.16.1 2018/03/09 01:27:50 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2007 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sysv_ipc.c,v 1.32 2015/12/05 00:51:42 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sysv_ipc.c,v 1.32.16.1 2018/03/09 01:27:50 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_sysv.h"
@@ -62,6 +62,8 @@ __KERNEL_RCSID(0, "$NetBSD: sysv_ipc.c,v
 #include 
 #include 
 
+#include 	/* for sysctl routine vector */
+
 /*
  * Values in support of System V compatible shared memory.	XXX
  * (originally located in sys/conf/param.c)
@@ -124,10 +126,6 @@ struct	msginfo msginfo = {
 };
 #endif
 
-#if defined(COMPAT_50)
-int sysctl_kern_sysvipc50(SYSCTLFN_PROTO);
-#endif
-
 MODULE(MODULE_CLASS_EXEC, sysv_ipc, NULL);
  
 SYSCTL_SETUP_PROTO(sysctl_ipc_setup);
@@ -140,15 +138,6 @@ static const struct syscall_package sysv
 	{ SYS_shmat, 0, (sy_call_t *)sys_shmat },
 	{ SYS_shmdt, 0, (sy_call_t *)sys_shmdt },
 	{ SYS_shmget, 0, (sy_call_t *)sys_shmget },
-#if defined(COMPAT_10) && !defined(_LP64)
-	{ SYS_compat_10_oshmsys, 0, (sy_call_t *)compat_10_sys_shmsys },
-#endif
-#if defined(COMPAT_14)

CVS commit: [pgoyette-compat] src/sys

2018-03-08 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri Mar  9 01:27:51 UTC 2018

Modified Files:
src/sys/arch/amd64/conf [pgoyette-compat]: NOCOMPAT
src/sys/compat/common [pgoyette-compat]: files.common
src/sys/kern [pgoyette-compat]: sysv_ipc.c
src/sys/modules [pgoyette-compat]: Makefile
src/sys/modules/sysv_ipc [pgoyette-compat]: Makefile
Added Files:
src/sys/compat/common [pgoyette-compat]: sysv_ipc_mod.c sysv_ipc_mod.h
src/sys/modules/compat_sysv_ipc [pgoyette-compat]: Makefile

Log Message:
Split the sysv_ipc module into two pieces:  one for contemporary
SYSV* functionality, and one for compatability with previous NetBSD
versions.  No need to pull in all of compat just to have a sysv_ipc
module.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/sys/arch/amd64/conf/NOCOMPAT
cvs rdiff -u -r1.1.2.3 -r1.1.2.4 src/sys/compat/common/files.common
cvs rdiff -u -r0 -r1.1.2.1 src/sys/compat/common/sysv_ipc_mod.c \
src/sys/compat/common/sysv_ipc_mod.h
cvs rdiff -u -r1.32 -r1.32.16.1 src/sys/kern/sysv_ipc.c
cvs rdiff -u -r1.202 -r1.202.2.1 src/sys/modules/Makefile
cvs rdiff -u -r0 -r1.1.2.1 src/sys/modules/compat_sysv_ipc/Makefile
cvs rdiff -u -r1.3 -r1.3.16.1 src/sys/modules/sysv_ipc/Makefile

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



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

2018-03-08 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri Mar  9 01:34:32 UTC 2018

Modified Files:
src/distrib/sets/lists/modules [pgoyette-compat]: mi

Log Message:
Add new compat_sysv_ipc module to sets lists.


To generate a diff of this commit:
cvs rdiff -u -r1.114 -r1.114.2.1 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.



CVS commit: src/crypto/external/bsd/openssl/dist/crypto/evp

2018-03-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Mar  9 01:33:58 UTC 2018

Modified Files:
src/crypto/external/bsd/openssl/dist/crypto/evp: e_aes.c

Log Message:
Don't define the v8 functions for v7!


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 \
src/crypto/external/bsd/openssl/dist/crypto/evp/e_aes.c

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

Modified files:

Index: src/crypto/external/bsd/openssl/dist/crypto/evp/e_aes.c
diff -u src/crypto/external/bsd/openssl/dist/crypto/evp/e_aes.c:1.13 src/crypto/external/bsd/openssl/dist/crypto/evp/e_aes.c:1.14
--- src/crypto/external/bsd/openssl/dist/crypto/evp/e_aes.c:1.13	Wed Mar  7 11:06:29 2018
+++ src/crypto/external/bsd/openssl/dist/crypto/evp/e_aes.c	Thu Mar  8 20:33:57 2018
@@ -981,13 +981,15 @@ const EVP_CIPHER *EVP_aes_##keylen##_##m
 
 #if defined(OPENSSL_CPUID_OBJ) && defined(AES_ASM) && (defined(__arm__) || defined(__arm) || defined(__aarch64__))
 # include "arm_arch.h"
-# if __ARM_MAX_ARCH__>=7
+# if __ARM_MAX_ARCH__>= 7
 #  if defined(BSAES_ASM)
 #   define BSAES_CAPABLE (OPENSSL_armcap_P & ARMV7_NEON)
 #  endif
 #  if defined(VPAES_ASM)
 #   define VPAES_CAPABLE (OPENSSL_armcap_P & ARMV7_NEON)
 #  endif
+# endif
+# if __ARM_MAX_ARCH__>= 8
 #  define HWAES_CAPABLE (OPENSSL_armcap_P & ARMV8_AES)
 #  define HWAES_set_encrypt_key aes_v8_set_encrypt_key
 #  define HWAES_set_decrypt_key aes_v8_set_decrypt_key



CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm

2018-03-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Mar  9 01:34:30 UTC 2018

Modified Files:
src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm: arm.inc

Log Message:
Add the rest of the earm flavors; madness.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/arm.inc

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

Modified files:

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/arm.inc
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/arm.inc:1.1 src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/arm.inc:1.2
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/arm.inc:1.1	Thu Mar  8 08:38:02 2018
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/arm.inc	Thu Mar  8 20:34:30 2018
@@ -4,7 +4,10 @@
 	${MACHINE_ARCH} == "armeb" || \
 	${MACHINE_ARCH} == "arm"
 ARM_MAX_ARCH=4
-.	elif ${MACHINE_ARCH} == "earmeb" || ${MACHINE_ARCH} == "earmhfeb"
+.	elif ${MACHINE_ARCH} == "earm" || \
+	${MACHINE_ARCH} == "earmhf" || \
+	${MACHINE_ARCH} == "earmeb" || \
+	${MACHINE_ARCH} == "earmhfeb"
 ARM_MAX_ARCH=5
 .	elif !empty(MACHINE_ARCH:Mearmv6*)
 ARM_MAX_ARCH=6



CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm

2018-03-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Mar  9 01:34:30 UTC 2018

Modified Files:
src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm: arm.inc

Log Message:
Add the rest of the earm flavors; madness.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/arm.inc

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



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

2018-03-08 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri Mar  9 01:34:32 UTC 2018

Modified Files:
src/distrib/sets/lists/modules [pgoyette-compat]: mi

Log Message:
Add new compat_sysv_ipc module to sets lists.


To generate a diff of this commit:
cvs rdiff -u -r1.114 -r1.114.2.1 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/mi
diff -u src/distrib/sets/lists/modules/mi:1.114 src/distrib/sets/lists/modules/mi:1.114.2.1
--- src/distrib/sets/lists/modules/mi:1.114	Tue Jan  9 03:31:14 2018
+++ src/distrib/sets/lists/modules/mi	Fri Mar  9 01:34:32 2018
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.114 2018/01/09 03:31:14 christos Exp $
+# $NetBSD: mi,v 1.114.2.1 2018/03/09 01:34:32 pgoyette Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -70,6 +70,8 @@
 ./@MODULEDIR@/compat/compat.kmod		base-kernel-modules	kmod
 ./@MODULEDIR@/compat_ossaudio			base-kernel-modules	kmod
 ./@MODULEDIR@/compat_ossaudio/compat_ossaudio.kmod	base-kernel-modules	kmod
+./@MODULEDIR@/compat_sysv_ipc			base-kernel-modules	kmod
+./@MODULEDIR@/compat_sysv_ipc/compat_sysv_ipc.kmod base-kernel-modules	kmod
 ./@MODULEDIR@/compat_sysv			base-obsolete		obsolete
 ./@MODULEDIR@/compat_sysv/compat_sysv.kmod	base-obsolete		obsolete
 ./@MODULEDIR@/coredumpbase-kernel-modules	kmod



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

2018-03-08 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri Mar  9 02:13:46 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: sysv_mod.c

Log Message:
Update dependency: compat_sysv requires sysv_ipc


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/sys/compat/common/sysv_mod.c

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



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

2018-03-08 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri Mar  9 02:13:46 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: sysv_mod.c

Log Message:
Update dependency: compat_sysv requires sysv_ipc


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/sys/compat/common/sysv_mod.c

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

Modified files:

Index: src/sys/compat/common/sysv_mod.c
diff -u src/sys/compat/common/sysv_mod.c:1.1.2.1 src/sys/compat/common/sysv_mod.c:1.1.2.2
--- src/sys/compat/common/sysv_mod.c:1.1.2.1	Fri Mar  9 02:02:59 2018
+++ src/sys/compat/common/sysv_mod.c	Fri Mar  9 02:13:46 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: sysv_mod.c,v 1.1.2.1 2018/03/09 02:02:59 pgoyette Exp $	*/
+/*	$NetBSD: sysv_mod.c,v 1.1.2.2 2018/03/09 02:13:46 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sysv_mod.c,v 1.1.2.1 2018/03/09 02:02:59 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sysv_mod.c,v 1.1.2.2 2018/03/09 02:13:46 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -53,7 +53,7 @@ __KERNEL_RCSID(0, "$NetBSD: sysv_mod.c,v
 int sysctl_kern_sysvipc50(SYSCTLFN_PROTO);
 #endif
 
-MODULE(MODULE_CLASS_EXEC, compat_sysv_ipc, NULL);
+MODULE(MODULE_CLASS_EXEC, compat_sysv_ipc, "sysv_ipc");
 
 /* Build the syscall package based on options specified */
 



CVS commit: src/crypto/external/bsd/openssl/dist/crypto/evp

2018-03-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Mar  9 01:33:58 UTC 2018

Modified Files:
src/crypto/external/bsd/openssl/dist/crypto/evp: e_aes.c

Log Message:
Don't define the v8 functions for v7!


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 \
src/crypto/external/bsd/openssl/dist/crypto/evp/e_aes.c

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



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

2018-03-08 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri Mar  9 01:45:46 UTC 2018

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

Log Message:
Rename the new compat_sysv_ipc module to just compat_sysv


To generate a diff of this commit:
cvs rdiff -u -r1.202.2.1 -r1.202.2.2 src/sys/modules/Makefile
cvs rdiff -u -r1.1.2.1 -r0 src/sys/modules/compat_sysv_ipc/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.1 src/sys/modules/Makefile:1.202.2.2
--- src/sys/modules/Makefile:1.202.2.1	Fri Mar  9 01:27:50 2018
+++ src/sys/modules/Makefile	Fri Mar  9 01:45:46 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.202.2.1 2018/03/09 01:27:50 pgoyette Exp $
+#	$NetBSD: Makefile,v 1.202.2.2 2018/03/09 01:45:46 pgoyette Exp $
 
 .include 
 
@@ -29,7 +29,7 @@ SUBDIR+=	coda
 SUBDIR+=	coda5
 SUBDIR+=	compat
 SUBDIR+=	compat_ossaudio
-SUBDIR+=	compat_sysv_ipc
+SUBDIR+=	compat_sysv
 SUBDIR+=	coredump
 SUBDIR+=	dbcool
 SUBDIR+=	des



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

2018-03-08 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri Mar  9 01:45:46 UTC 2018

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

Log Message:
Rename the new compat_sysv_ipc module to just compat_sysv


To generate a diff of this commit:
cvs rdiff -u -r1.202.2.1 -r1.202.2.2 src/sys/modules/Makefile
cvs rdiff -u -r1.1.2.1 -r0 src/sys/modules/compat_sysv_ipc/Makefile

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



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

2018-03-08 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri Mar  9 02:02:59 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: files.common
Added Files:
src/sys/compat/common [pgoyette-compat]: sysv_mod.c sysv_mod.h
Removed Files:
src/sys/compat/common [pgoyette-compat]: sysv_ipc_mod.c sysv_ipc_mod.h

Log Message:
More on renaming the new module


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.4 -r1.1.2.5 src/sys/compat/common/files.common
cvs rdiff -u -r1.1.2.1 -r0 src/sys/compat/common/sysv_ipc_mod.c \
src/sys/compat/common/sysv_ipc_mod.h
cvs rdiff -u -r0 -r1.1.2.1 src/sys/compat/common/sysv_mod.c \
src/sys/compat/common/sysv_mod.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/common/files.common
diff -u src/sys/compat/common/files.common:1.1.2.4 src/sys/compat/common/files.common:1.1.2.5
--- src/sys/compat/common/files.common:1.1.2.4	Fri Mar  9 01:27:50 2018
+++ src/sys/compat/common/files.common	Fri Mar  9 02:02:59 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: files.common,v 1.1.2.4 2018/03/09 01:27:50 pgoyette Exp $
+#	$NetBSD: files.common,v 1.1.2.5 2018/03/09 02:02:59 pgoyette Exp $
 
 #
 # Generic files, used by all compat options.
@@ -75,7 +75,7 @@ file	compat/common/uipc_usrreq_70.c		com
 
 # Module interface for sysv ipc compatability options
 
-file	compat/common/sysv_ipc_mod.c		compat_netbsd
+file	compat/common/sysv_mod.c		compat_netbsd
 
 # Compatibility code for NetBSD 1.0
 file	compat/common/kern_ipc_10.c		compat_netbsd

Added files:

Index: src/sys/compat/common/sysv_mod.c
diff -u /dev/null src/sys/compat/common/sysv_mod.c:1.1.2.1
--- /dev/null	Fri Mar  9 02:02:59 2018
+++ src/sys/compat/common/sysv_mod.c	Fri Mar  9 02:02:59 2018
@@ -0,0 +1,134 @@
+/*	$NetBSD: sysv_mod.c,v 1.1.2.1 2018/03/09 02:02:59 pgoyette Exp $	*/
+
+/*-
+ * Copyright (c) 2018 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software developed for The NetBSD Foundation
+ * by Paul Goyette
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include 
+__KERNEL_RCSID(0, "$NetBSD: sysv_mod.c,v 1.1.2.1 2018/03/09 02:02:59 pgoyette Exp $");
+
+#ifdef _KERNEL_OPT
+#include "opt_compat_netbsd.h"
+#include "opt_compat_50.h"
+#include "opt_compat_14.h"
+#include "opt_compat_10.h"
+#include "opt_sysv.h"
+#endif
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+#ifdef COMPAT_50
+int sysctl_kern_sysvipc50(SYSCTLFN_PROTO);
+#endif
+
+MODULE(MODULE_CLASS_EXEC, compat_sysv_ipc, NULL);
+
+/* Build the syscall package based on options specified */
+
+static const struct syscall_package compat_syscalls[] = {
+#if defined(COMPAT_10) && !defined(_LP64)
+#ifdef	SYSVSHM
+	{ SYS_compat_10_oshmsys, 0, (sy_call_t *)compat_10_sys_shmsys },
+#endif
+#ifdef	SYSVSEM
+	{ SYS_compat_10_osemsys, 0, (sy_call_t *)compat_10_sys_semsys },
+#endif
+#ifdef	SYSVMSG
+	{ SYS_compat_10_omsgsys, 0, (sy_call_t *)compat_10_sys_msgsys },
+#endif
+#endif /* defined(COMPAT_10) && !defined(_LP64) */
+
+#if defined(COMPAT_14)
+#ifdef SYSVSHM
+	{ SYS_compat_14_shmctl, 0, (sy_call_t *)compat_14_sys_shmctl },
+#endif
+#ifdef	SYSVSEM
+	{ SYS_compat_14___semctl, 0, (sy_call_t *)compat_14_sys___semctl },
+#endif
+#ifdef	SYSVMSG
+	{ SYS_compat_14_msgctl, 0, (sy_call_t *)compat_14_sys_msgctl },
+#endif
+#endif	/* defined(COMPAT_14) */
+
+#if defined(COMPAT_50)
+#ifdef SYSVSHM
+	{ SYS_compat_50___shmctl13, 0, (sy_call_t *)compat_50_sys___shmctl13 },
+#endif
+#ifdef	SYSVSEM
+	{ SYS_compat_50_semctl13, 0, (sy_call_t *)compat_50_sys_semctl13 },
+#endif
+#ifdef	SYSVMSG
+	{ 

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

2018-03-08 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri Mar  9 02:02:59 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: files.common
Added Files:
src/sys/compat/common [pgoyette-compat]: sysv_mod.c sysv_mod.h
Removed Files:
src/sys/compat/common [pgoyette-compat]: sysv_ipc_mod.c sysv_ipc_mod.h

Log Message:
More on renaming the new module


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.4 -r1.1.2.5 src/sys/compat/common/files.common
cvs rdiff -u -r1.1.2.1 -r0 src/sys/compat/common/sysv_ipc_mod.c \
src/sys/compat/common/sysv_ipc_mod.h
cvs rdiff -u -r0 -r1.1.2.1 src/sys/compat/common/sysv_mod.c \
src/sys/compat/common/sysv_mod.h

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