CVS commit: src

2019-02-25 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Tue Feb 26 07:31:49 UTC 2019

Modified Files:
src/distrib/sets/lists/base: mi
src/distrib/sets/lists/man: mi
src/external/zlib/pigz/bin/pigz: Makefile

Log Message:
Install unpigz(1).


To generate a diff of this commit:
cvs rdiff -u -r1.1201 -r1.1202 src/distrib/sets/lists/base/mi
cvs rdiff -u -r1.1638 -r1.1639 src/distrib/sets/lists/man/mi
cvs rdiff -u -r1.9 -r1.10 src/external/zlib/pigz/bin/pigz/Makefile

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

Modified files:

Index: src/distrib/sets/lists/base/mi
diff -u src/distrib/sets/lists/base/mi:1.1201 src/distrib/sets/lists/base/mi:1.1202
--- src/distrib/sets/lists/base/mi:1.1201	Sat Feb 23 10:43:25 2019
+++ src/distrib/sets/lists/base/mi	Tue Feb 26 07:31:49 2019
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1201 2019/02/23 10:43:25 mlelstv Exp $
+# $NetBSD: mi,v 1.1202 2019/02/26 07:31:49 rin Exp $
 #
 # Note:	Don't delete entries from here - mark them as "obsolete" instead,
 #	unless otherwise stated below.
@@ -995,6 +995,7 @@
 ./usr/bin/units	base-util-bin
 ./usr/bin/unlzf	base-util-bin
 ./usr/bin/unlzmabase-util-bin
+./usr/bin/unpigzbase-util-bin
 ./usr/bin/unvis	base-util-bin
 ./usr/bin/unxz	base-util-bin
 ./usr/bin/unzip	base-util-bin

Index: src/distrib/sets/lists/man/mi
diff -u src/distrib/sets/lists/man/mi:1.1638 src/distrib/sets/lists/man/mi:1.1639
--- src/distrib/sets/lists/man/mi:1.1638	Sat Feb 23 03:10:05 2019
+++ src/distrib/sets/lists/man/mi	Tue Feb 26 07:31:49 2019
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1638 2019/02/23 03:10:05 kamil Exp $
+# $NetBSD: mi,v 1.1639 2019/02/26 07:31:49 rin Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -592,6 +592,7 @@
 ./usr/share/man/cat1/units.0			man-util-catman		.cat
 ./usr/share/man/cat1/unlzf.0			man-util-catman		.cat
 ./usr/share/man/cat1/unlzma.0			man-util-catman		.cat
+./usr/share/man/cat1/unpigz.0			man-util-catman		.cat
 ./usr/share/man/cat1/unvis.0			man-util-catman		.cat
 ./usr/share/man/cat1/unxz.0			man-util-catman		.cat
 ./usr/share/man/cat1/unzip.0			man-util-catman		.cat
@@ -3808,6 +3809,7 @@
 ./usr/share/man/html1/units.html		man-util-htmlman	html
 ./usr/share/man/html1/unlzf.html		man-util-htmlman	html
 ./usr/share/man/html1/unlzma.html		man-util-htmlman	html
+./usr/share/man/html1/unpigz.html		man-util-htmlman	html
 ./usr/share/man/html1/unvis.html		man-util-htmlman	html
 ./usr/share/man/html1/unxz.html			man-util-htmlman	html
 ./usr/share/man/html1/unzip.html		man-util-htmlman	html
@@ -6680,6 +6682,7 @@
 ./usr/share/man/man1/units.1			man-util-man		.man
 ./usr/share/man/man1/unlzf.1			man-util-man		.man
 ./usr/share/man/man1/unlzma.1			man-util-man		.man
+./usr/share/man/man1/unpigz.1			man-util-man		.man
 ./usr/share/man/man1/unvis.1			man-util-man		.man
 ./usr/share/man/man1/unxz.1			man-util-man		.man
 ./usr/share/man/man1/unzip.1			man-util-man		.man

Index: src/external/zlib/pigz/bin/pigz/Makefile
diff -u src/external/zlib/pigz/bin/pigz/Makefile:1.9 src/external/zlib/pigz/bin/pigz/Makefile:1.10
--- src/external/zlib/pigz/bin/pigz/Makefile:1.9	Tue Apr  7 17:48:13 2015
+++ src/external/zlib/pigz/bin/pigz/Makefile	Tue Feb 26 07:31:49 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.9 2015/04/07 17:48:13 christos Exp $
+#	$NetBSD: Makefile,v 1.10 2019/02/26 07:31:49 rin Exp $
 
 .include 
 
@@ -21,6 +21,9 @@ DPADD=		${LIBM} ${LIBPTHREAD}
 .endif
 LDADD=		-lm -lz -lpthread
 
+MLINKS+=	pigz.1 unpigz.1
+LINKS+=		${BINDIR}/pigz ${BINDIR}/unpigz
+
 .if ${MKPIGZGZIP} != "no"
 # these ones are from mrg's gzip
 MAN+=		gzexe.1 zdiff.1 zforce.1 zgrep.1 zmore.1 znew.1



CVS commit: src/sys/netipsec

2019-02-25 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Tue Feb 26 06:52:34 UTC 2019

Modified Files:
src/sys/netipsec: keysock.c

Log Message:
Fix locking: it is fine if the lock is already key_so_mtx, this can happen
in socketpair. In that case don't take it.

Ok ozaki-r@

Reported-by: syzbot+901e2e5edaaaed21c...@syzkaller.appspotmail.com


To generate a diff of this commit:
cvs rdiff -u -r1.68 -r1.69 src/sys/netipsec/keysock.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/netipsec/keysock.c
diff -u src/sys/netipsec/keysock.c:1.68 src/sys/netipsec/keysock.c:1.69
--- src/sys/netipsec/keysock.c:1.68	Sun Jan 27 02:08:48 2019
+++ src/sys/netipsec/keysock.c	Tue Feb 26 06:52:34 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: keysock.c,v 1.68 2019/01/27 02:08:48 pgoyette Exp $	*/
+/*	$NetBSD: keysock.c,v 1.69 2019/02/26 06:52:34 maxv Exp $	*/
 /*	$FreeBSD: keysock.c,v 1.3.2.1 2003/01/24 05:11:36 sam Exp $	*/
 /*	$KAME: keysock.c,v 1.25 2001/08/13 20:07:41 itojun Exp $	*/
 
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: keysock.c,v 1.68 2019/01/27 02:08:48 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: keysock.c,v 1.69 2019/02/26 06:52:34 maxv Exp $");
 
 /* This code has derived from sys/net/rtsock.c on FreeBSD2.2.5 */
 
@@ -383,10 +383,12 @@ key_attach(struct socket *so, int proto)
 
 	s = splsoftnet();
 
-	KASSERT(so->so_lock == NULL);
-	mutex_obj_hold(key_so_mtx);
-	so->so_lock = key_so_mtx;
-	solock(so);
+	if (so->so_lock != key_so_mtx) {
+		KASSERT(so->so_lock == NULL);
+		mutex_obj_hold(key_so_mtx);
+		so->so_lock = key_so_mtx;
+		solock(so);
+	}
 
 	error = raw_attach(so, proto, _rawcb);
 	if (error) {



CVS commit: src/sys/compat/netbsd32

2019-02-25 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Tue Feb 26 06:28:43 UTC 2019

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

Log Message:
Push AT_STACKBASE. Otherwise, pthread_attr_getstack(3) cannot
find the stack address for initial thread (LID 1).

Now, rust for i386 and armv7 work on amd64 and aarch64,
respectively.


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/sys/compat/netbsd32/netbsd32_exec_elf32.c

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

Modified files:

Index: src/sys/compat/netbsd32/netbsd32_exec_elf32.c
diff -u src/sys/compat/netbsd32/netbsd32_exec_elf32.c:1.41 src/sys/compat/netbsd32/netbsd32_exec_elf32.c:1.42
--- src/sys/compat/netbsd32/netbsd32_exec_elf32.c:1.41	Sun Jan 27 02:08:40 2019
+++ src/sys/compat/netbsd32/netbsd32_exec_elf32.c	Tue Feb 26 06:28:43 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_exec_elf32.c,v 1.41 2019/01/27 02:08:40 pgoyette Exp $	*/
+/*	$NetBSD: netbsd32_exec_elf32.c,v 1.42 2019/02/26 06:28:43 rin Exp $	*/
 /*	from: NetBSD: exec_aout.c,v 1.15 1996/09/26 23:34:46 cgd Exp */
 
 /*
@@ -57,7 +57,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_exec_elf32.c,v 1.41 2019/01/27 02:08:40 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_exec_elf32.c,v 1.42 2019/02/26 06:28:43 rin Exp $");
 
 #define	ELFSIZE		32
 
@@ -196,6 +196,10 @@ netbsd32_elf32_copyargs(struct lwp *l, s
 		a->a_v = kauth_cred_getgid(l->l_cred);
 		a++;
 
+		a->a_type = AT_STACKBASE;
+		a->a_v = l->l_proc->p_stackbase;
+		a++;
+
 		exec_free_emul_arg(pack);
 	}
 



CVS commit: src/sys/dev/acpi

2019-02-25 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Tue Feb 26 06:15:55 UTC 2019

Modified Files:
src/sys/dev/acpi: com_acpi.c

Log Message:
Cast to same type as parameter. NFCI.


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/sys/dev/acpi/com_acpi.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/acpi/com_acpi.c
diff -u src/sys/dev/acpi/com_acpi.c:1.38 src/sys/dev/acpi/com_acpi.c:1.39
--- src/sys/dev/acpi/com_acpi.c:1.38	Mon Dec 24 17:44:40 2018
+++ src/sys/dev/acpi/com_acpi.c	Tue Feb 26 06:15:55 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: com_acpi.c,v 1.38 2018/12/24 17:44:40 christos Exp $ */
+/* $NetBSD: com_acpi.c,v 1.39 2019/02/26 06:15:55 mlelstv Exp $ */
 
 /*
  * Copyright (c) 2002 Jared D. McNeill 
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: com_acpi.c,v 1.38 2018/12/24 17:44:40 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: com_acpi.c,v 1.39 2019/02/26 06:15:55 mlelstv Exp $");
 
 #include 
 #include 
@@ -174,7 +174,7 @@ com_acpi_attach(device_t parent, device_
 
 	if (!ISSET(sc->sc_hwflags, COM_HW_POLL))
 		asc->sc_ih = acpi_intr_establish(self,
-		(intptr_t)aa->aa_node->ad_handle,
+		(uint64_t)aa->aa_node->ad_handle,
 		IPL_SERIAL, true, comintr, sc, device_xname(self));
 
 	if (!pmf_device_register(self, NULL, com_resume))



CVS commit: src/sys/dev/mii

2019-02-25 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Feb 26 05:26:10 UTC 2019

Modified Files:
src/sys/dev/mii: miivar.h rgephy.c

Log Message:
Add MI MII clause 45 MMD MDIO access macros via clause 22 indirect registers:

DESCRIPTION
static inline int
MMD_INDIRECT(struct mii_softc *sc, uint16_t daddr, uint16_t regnum):
Setup MMD device address and register number. It also setup
address incrementation function.

static inline int
MMD_INDIRECT_READ(struct mii_softc *sc, uint16_t daddr, uint16_t regnum,
  uint16_t *valp)):
Do MMD_INDIRECT() and then read the register.

static inline int
MMD_INDIRECT_WRITE(struct mii_softc *sc, uint16_t daddr, uint16_t regnum,
  uint16_t val):
Do MMD_INDIRECT() and then write the register.

RETURN VALUE
Retruns 0 on success. Non-zero vaule on failure.

Note that old PHYs have no indirect access registers. Accessing such
devices with these functions cause timeout and return non-zero value
(e.g. ETIMEDOUT).

EXAMPLE
Read MMD Auto negotiation device's EEE advertisement register,
drop 100BASE-TX support and write it.

uint16_t eeadvert;

/* Post increment is not required */
MMD_INDIRECT_READ(sc, MDIO_MMD_AN | MMDACR_FN_DATA,
MDIO_AN_EEEADVERT, );
eeadvert &= ~AN_EEEADVERT_100_TX;

/*
 * MMD device address and the register number are already set, so it's
 * enough to read MII_MMDACR.
 */
PHY_WRITE(sc. MII_MMDACR, eeadvert);


To generate a diff of this commit:
cvs rdiff -u -r1.65 -r1.66 src/sys/dev/mii/miivar.h
cvs rdiff -u -r1.50 -r1.51 src/sys/dev/mii/rgephy.c

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

Modified files:

Index: src/sys/dev/mii/miivar.h
diff -u src/sys/dev/mii/miivar.h:1.65 src/sys/dev/mii/miivar.h:1.66
--- src/sys/dev/mii/miivar.h:1.65	Sun Feb 24 17:22:21 2019
+++ src/sys/dev/mii/miivar.h	Tue Feb 26 05:26:10 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: miivar.h,v 1.65 2019/02/24 17:22:21 christos Exp $	*/
+/*	$NetBSD: miivar.h,v 1.66 2019/02/26 05:26:10 msaitoh Exp $	*/
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -36,6 +36,7 @@
 #include 
 #include 
 
+#include 
 #include 
 
 /*
@@ -222,6 +223,57 @@ struct mii_media {
 	(*(p)->mii_pdata->mii_writereg)(device_parent((p)->mii_dev), \
 	(p)->mii_phy, (r), (v))
 
+/*
+ * Setup MDD indirect access. Set device address and register number.
+ * "addr" variable takes an address ORed with the function (MMDACR_FN_*).
+ *
+ */
+static inline int
+MMD_INDIRECT(struct mii_softc *sc, uint16_t daddr, uint16_t regnum)
+{
+	int rv;
+
+	/*
+	 * Set the MMD device address and set the access mode (function)
+	 * to address.
+	 */
+	if ((rv = PHY_WRITE(sc, MII_MMDACR, (daddr & ~MMDACR_FUNCMASK))) != 0)
+		return rv;
+
+	/* Set the register number */
+	if ((rv = PHY_WRITE(sc, MII_MMDAADR, regnum)) != 0)
+		return rv;
+
+	/* Set the access mode (function) */
+	rv = PHY_WRITE(sc, MII_MMDACR, daddr);
+
+	return rv;
+}
+
+static inline int
+MMD_INDIRECT_READ(struct mii_softc *sc, uint16_t daddr, uint16_t regnum,
+uint16_t *valp)
+{
+	int rv;
+
+	if ((rv = MMD_INDIRECT(sc, daddr, regnum)) != 0)
+		return rv;
+
+	return PHY_READ(sc, MII_MMDAADR, valp);
+}
+
+static inline int
+MMD_INDIRECT_WRITE(struct mii_softc *sc, uint16_t daddr, uint16_t regnum,
+uint16_t val)
+{
+	int rv;
+
+	if ((rv = MMD_INDIRECT(sc, daddr, regnum)) != 0)
+		return rv;
+
+	return PHY_WRITE(sc, MII_MMDAADR, val);
+}
+
 #define	PHY_SERVICE(p, d, o) \
 	(*(p)->mii_funcs->pf_service)((p), (d), (o))
 

Index: src/sys/dev/mii/rgephy.c
diff -u src/sys/dev/mii/rgephy.c:1.50 src/sys/dev/mii/rgephy.c:1.51
--- src/sys/dev/mii/rgephy.c:1.50	Mon Feb 25 07:36:16 2019
+++ src/sys/dev/mii/rgephy.c	Tue Feb 26 05:26:10 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: rgephy.c,v 1.50 2019/02/25 07:36:16 msaitoh Exp $	*/
+/*	$NetBSD: rgephy.c,v 1.51 2019/02/26 05:26:10 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 2003
@@ -33,7 +33,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rgephy.c,v 1.50 2019/02/25 07:36:16 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rgephy.c,v 1.51 2019/02/26 05:26:10 msaitoh Exp $");
 
 
 /*
@@ -700,9 +700,7 @@ rgephy_reset(struct mii_softc *sc)
 		/* RTL8211F */
 		delay(1);
 		/* disable EEE */
-		PHY_WRITE(sc, MII_MMDACR, MMDACR_FN_ADDRESS | MDIO_MMD_AN);
-		PHY_WRITE(sc, MII_MMDAADR, MDIO_AN_EEEADVERT);
-		PHY_WRITE(sc, MII_MMDACR, MMDACR_FN_DATA | MDIO_MMD_AN);
-		PHY_WRITE(sc, MII_MMDAADR, 0x);
+		MMD_INDIRECT_WRITE(sc, MDIO_MMD_AN | MMDACR_FN_DATA,
+		MDIO_AN_EEEADVERT, 0x);
 	}
 }



CVS commit: src/share/man/man9

2019-02-25 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Feb 25 21:43:00 UTC 2019

Modified Files:
src/share/man/man9: localcount.9

Log Message:
Add explicit cross-references to pserialize(9) for the sections about
ensuring that a localcount doesn't disappear while in the process of
being referenced, in the same manner as psref(9).


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/share/man/man9/localcount.9

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/man9/localcount.9
diff -u src/share/man/man9/localcount.9:1.6 src/share/man/man9/localcount.9:1.7
--- src/share/man/man9/localcount.9:1.6	Fri Jun  2 00:32:12 2017
+++ src/share/man/man9/localcount.9	Mon Feb 25 21:43:00 2019
@@ -1,4 +1,4 @@
-.\"	$NetBSD: localcount.9,v 1.6 2017/06/02 00:32:12 chs Exp $
+.\"	$NetBSD: localcount.9,v 1.7 2019/02/25 21:43:00 pgoyette Exp $
 .\"
 .\" Copyright (c) 2016 The NetBSD Foundation
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd June 1, 2017
+.Dd February 25, 2019
 .Dt LOCALCOUNT 9
 .Os
 .Sh NAME
@@ -86,7 +86,7 @@ network flows) and on which there may be
 such as xyzread for a device xyz(4), and short-term fast operations, such as
 .Dv xyzioctl(IOC_READ_A_CPU_REG) .
 .Sh FUNCTIONS
-.Bl -tag -width 32n
+.Bl -tag -width abcd
 .It Fn localcount_init "lc"
 Dynamically initialize localcount
 .Ar lc
@@ -106,6 +106,13 @@ has been called until it has been re-ini
 .It Fn localcount_acquire "lc"
 Acquire a reference to the localcount
 .Ar lc .
+.Pp
+The caller must ensure by some other mechanism that the localcount will
+not be destroyed before the call to
+.Fn localcount_acquire ;
+typically this will be via a
+.Xr pserialize 9
+read section.
 .It Fn localcount_release "lc" "cv" "mtx"
 Release a reference to the localcount
 .Ar lc .
@@ -140,7 +147,13 @@ before calling
 .Fn localcount_drain .
 For example, any object that may be found in a list and acquired must be
 removed from the list before calling
-.Fn localcount_drain .
+.Fn localcount_drain ;
+removal from the list would typically be protected by calling
+.Xr pserialize_perform 9
+to wait for any
+.Xr pserialize 9
+readers to complete.
+.Pp
 Once the localcount object
 .Ar lc
 is passed to



CVS commit: src/usr.bin/menuc

2019-02-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Feb 25 20:47:37 UTC 2019

Modified Files:
src/usr.bin/menuc: mdb.c mdb.h menu_sys.def menuc.1 parse.y scan.l
src/usr.bin/menuc/testm: menus.mc

Log Message:
Add an option to supress the vertical space between menu title and
menu items.


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/usr.bin/menuc/mdb.c
cvs rdiff -u -r1.10 -r1.11 src/usr.bin/menuc/mdb.h
cvs rdiff -u -r1.66 -r1.67 src/usr.bin/menuc/menu_sys.def
cvs rdiff -u -r1.36 -r1.37 src/usr.bin/menuc/menuc.1
cvs rdiff -u -r1.17 -r1.18 src/usr.bin/menuc/parse.y src/usr.bin/menuc/scan.l
cvs rdiff -u -r1.11 -r1.12 src/usr.bin/menuc/testm/menus.mc

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

Modified files:

Index: src/usr.bin/menuc/mdb.c
diff -u src/usr.bin/menuc/mdb.c:1.50 src/usr.bin/menuc/mdb.c:1.51
--- src/usr.bin/menuc/mdb.c:1.50	Wed Feb  6 20:08:15 2019
+++ src/usr.bin/menuc/mdb.c	Mon Feb 25 20:47:37 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: mdb.c,v 1.50 2019/02/06 20:08:15 martin Exp $	*/
+/*	$NetBSD: mdb.c,v 1.51 2019/02/25 20:47:37 martin Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -41,7 +41,7 @@
 #include 
 
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: mdb.c,v 1.50 2019/02/06 20:08:15 martin Exp $");
+__RCSID("$NetBSD: mdb.c,v 1.51 2019/02/25 20:47:37 martin Exp $");
 #endif
 
 
@@ -225,6 +225,7 @@ write_menu_file(char *initcode)
 		MC_OPT(MC_DFLTEXIT)
 		MC_OPT(MC_ALWAYS_SCROLL)
 		MC_OPT(MC_SUBMENU)
+		MC_OPT(MC_CONTINUOUS)
 		MC_OPT(MC_VALID)
 #undef MC_OPT
 #undef STR

Index: src/usr.bin/menuc/mdb.h
diff -u src/usr.bin/menuc/mdb.h:1.10 src/usr.bin/menuc/mdb.h:1.11
--- src/usr.bin/menuc/mdb.h:1.10	Wed Nov 21 20:04:48 2018
+++ src/usr.bin/menuc/mdb.h	Mon Feb 25 20:47:37 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: mdb.h,v 1.10 2018/11/21 20:04:48 martin Exp $	*/
+/*	$NetBSD: mdb.h,v 1.11 2019/02/25 20:47:37 martin Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -95,5 +95,6 @@ struct menu_info {
 #define MC_DFLTEXIT 32
 #define MC_ALWAYS_SCROLL 64
 #define MC_SUBMENU 128
+#define	MC_CONTINUOUS 256
 #define MC_VALID 0x1
 #endif

Index: src/usr.bin/menuc/menu_sys.def
diff -u src/usr.bin/menuc/menu_sys.def:1.66 src/usr.bin/menuc/menu_sys.def:1.67
--- src/usr.bin/menuc/menu_sys.def:1.66	Sat Feb 16 18:57:21 2019
+++ src/usr.bin/menuc/menu_sys.def	Mon Feb 25 20:47:37 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: menu_sys.def,v 1.66 2019/02/16 18:57:21 martin Exp $	*/
+/*	$NetBSD: menu_sys.def,v 1.67 2019/02/25 20:47:37 martin Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -141,7 +141,8 @@ init_menu(menudesc *m)
 	y = m->y;
 	w = m->w;
 	wmax = 0;
-	hadd = ((m->mopt & MC_NOBOX) ? 0 : 2);
+	hadd = ((m->mopt & MC_NOBOX) ? 0 :
+	((m->mopt & MC_CONTINUOUS) ? 1 : 2));
 	wadd = ((m->mopt & MC_NOBOX) ? 2 : 4);
 	if (!(m->mopt & MC_NOSHORTCUT))
 		wadd += 3;
@@ -358,7 +359,8 @@ draw_menu(menudesc *m, void *arg)
 			if (ep == NULL || *ep == 0)
 break;
 		}
-		tadd++;
+		if ((m->mopt & MC_CONTINUOUS) == 0)
+			tadd++;
 	}
 
 	cury = tadd;

Index: src/usr.bin/menuc/menuc.1
diff -u src/usr.bin/menuc/menuc.1:1.36 src/usr.bin/menuc/menuc.1:1.37
--- src/usr.bin/menuc/menuc.1:1.36	Sat Feb 16 19:09:07 2019
+++ src/usr.bin/menuc/menuc.1	Mon Feb 25 20:47:37 2019
@@ -1,4 +1,4 @@
-.\"	$NetBSD: menuc.1,v 1.36 2019/02/16 19:09:07 martin Exp $
+.\"	$NetBSD: menuc.1,v 1.37 2019/02/25 20:47:37 martin Exp $
 .\"
 .\" Copyright 1997 Piermont Information Systems Inc.
 .\" All rights reserved.
@@ -29,7 +29,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 .\" THE POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd February 16, 2019
+.Dd February 25, 2019
 .Dt MENUC 1
 .Os
 .Sh NAME
@@ -233,6 +233,9 @@ menu window is created.
 .It Ic sub menu
 If specified, the screen contents that the menu window overwrites are saved
 and restored when the menu exits.
+.It Ic continuous title
+If specified there is no vertical space between the title and the menu
+content.
 .El
 .Pp
 The
@@ -458,6 +461,7 @@ struct menudesc {
 #define MC_DFLTEXIT 32
 #define MC_ALWAYS_SCROLL 64
 #define MC_SUBMENU 128
+#define MC_CONTINUOUS 256
 
 int new_menu(const char *title, menu_ent *opts, int numopts,
 int x, int y, int h, int w, int mopt,

Index: src/usr.bin/menuc/parse.y
diff -u src/usr.bin/menuc/parse.y:1.17 src/usr.bin/menuc/parse.y:1.18
--- src/usr.bin/menuc/parse.y:1.17	Wed Nov 21 20:04:48 2018
+++ src/usr.bin/menuc/parse.y	Mon Feb 25 20:47:37 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: parse.y,v 1.17 2018/11/21 20:04:48 martin Exp $	*/
+/*	$NetBSD: parse.y,v 1.18 2019/02/25 20:47:37 martin Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -54,6 +54,7 @@ static optn_info *cur_optn;
 %token  X Y W H NO BOX SUB HELP MENU NEXT EXIT ACTION ENDWIN OPTION 
 %token  TITLE DEFAULT DISPLAY ERROR EXITSTRING EXPAND ALLOW DYNAMIC
 		 MENUS 

CVS commit: src/external/gpl3

2019-02-25 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Mon Feb 25 19:55:35 UTC 2019

Modified Files:
src/external/gpl3/binutils.old/usr.bin/ld: Makefile
src/external/gpl3/binutils/usr.bin/ld: Makefile

Log Message:
Properly extract the emulation path from the linker script template.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/gpl3/binutils.old/usr.bin/ld/Makefile
cvs rdiff -u -r1.29 -r1.30 src/external/gpl3/binutils/usr.bin/ld/Makefile

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

Modified files:

Index: src/external/gpl3/binutils.old/usr.bin/ld/Makefile
diff -u src/external/gpl3/binutils.old/usr.bin/ld/Makefile:1.6 src/external/gpl3/binutils.old/usr.bin/ld/Makefile:1.7
--- src/external/gpl3/binutils.old/usr.bin/ld/Makefile:1.6	Sat Apr 14 17:53:18 2018
+++ src/external/gpl3/binutils.old/usr.bin/ld/Makefile	Mon Feb 25 19:55:35 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.6 2018/04/14 17:53:18 christos Exp $
+#	$NetBSD: Makefile,v 1.7 2019/02/25 19:55:35 joerg Exp $
 
 CPPFLAGS+=	-I${.CURDIR}/arch/${BINUTILS_MACHINE_ARCH} \
 		-I${DIST}/ld \
@@ -63,30 +63,10 @@ ${PROG}.info: configdoc.texi bfdver.texi
 DPSRCS+=	.depend.${f} e${f}.c
 CLEANFILES+=	.depend.${f} e${f}.c
 
-# XXX super hack
-. if (${BINUTILS_MACHINE_ARCH} == "x86_64" && \
-  ("${f}" == "elf_i386" || "${f}" == "i386nbsd"))
-EMUL_LIB_PATH.${f}=/usr/lib/i386
-. elif (${BINUTILS_MACHINE_ARCH} == "sparc64" && \
-  ("${f}" == "elf32_sparc" || "${f}" == "sparcnbsd"))
-EMUL_LIB_PATH.${f}=/usr/lib/sparc
-. elif !empty(BINUTILS_MACHINE_ARCH:Mmips64*)
-.  if "${f}" == "elf32ltsmip" || "${f}" == "elf32btsmip"
-EMUL_LIB_PATH.${f}:=/usr/lib/o32
-.  elif "${f}" == "elf64ltsmip" || "${f}" == "elf64btsmip"
-EMUL_LIB_PATH.${f}:=/usr/lib/64
-.  else
-EMUL_LIB_PATH.${f}=/usr/lib
-.  endif
-. else
-EMUL_LIB_PATH.${f}=/usr/lib
-. endif
-
 e${f}.c: ${DIST}/ld/genscripts.sh ${.CURDIR}/Makefile stringify.sed
 	${_MKTARGET_CREATE}
 	unset MACHINE || true; \
-	LIB_PATH=${EMUL_LIB_PATH.${f}} NATIVE=yes \
-		${HOST_SH} ${DIST}/ld/genscripts.sh ${DIST}/ld \
+	NATIVE=yes ${HOST_SH} ${DIST}/ld/genscripts.sh ${DIST}/ld \
 		${LIBDIR} "/usr" "/usr/bin" \
 		${G_target_alias} ${G_target_alias} ${G_target_alias} \
 		${G_EMUL} ${LIBDIR} yes ${G_enable_initfini_array} \

Index: src/external/gpl3/binutils/usr.bin/ld/Makefile
diff -u src/external/gpl3/binutils/usr.bin/ld/Makefile:1.29 src/external/gpl3/binutils/usr.bin/ld/Makefile:1.30
--- src/external/gpl3/binutils/usr.bin/ld/Makefile:1.29	Wed Oct 19 20:55:44 2016
+++ src/external/gpl3/binutils/usr.bin/ld/Makefile	Mon Feb 25 19:55:35 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.29 2016/10/19 20:55:44 mrg Exp $
+#	$NetBSD: Makefile,v 1.30 2019/02/25 19:55:35 joerg Exp $
 
 CPPFLAGS+=	-I${.CURDIR}/arch/${BINUTILS_MACHINE_ARCH} \
 		-I${DIST}/ld \
@@ -63,30 +63,10 @@ ${PROG}.info: configdoc.texi bfdver.texi
 DPSRCS+=	.depend.${f} e${f}.c
 CLEANFILES+=	.depend.${f} e${f}.c
 
-# XXX super hack
-. if (${BINUTILS_MACHINE_ARCH} == "x86_64" && \
-  ("${f}" == "elf_i386" || "${f}" == "i386nbsd"))
-EMUL_LIB_PATH.${f}=/usr/lib/i386
-. elif (${BINUTILS_MACHINE_ARCH} == "sparc64" && \
-  ("${f}" == "elf32_sparc" || "${f}" == "sparcnbsd"))
-EMUL_LIB_PATH.${f}=/usr/lib/sparc
-. elif !empty(BINUTILS_MACHINE_ARCH:Mmips64*)
-.  if "${f}" == "elf32ltsmip" || "${f}" == "elf32btsmip"
-EMUL_LIB_PATH.${f}:=/usr/lib/o32
-.  elif "${f}" == "elf64ltsmip" || "${f}" == "elf64btsmip"
-EMUL_LIB_PATH.${f}:=/usr/lib/64
-.  else
-EMUL_LIB_PATH.${f}=/usr/lib
-.  endif
-. else
-EMUL_LIB_PATH.${f}=/usr/lib
-. endif
-
 e${f}.c: ${DIST}/ld/genscripts.sh ${.CURDIR}/Makefile stringify.sed
 	${_MKTARGET_CREATE}
 	unset MACHINE || true; \
-	LIB_PATH=${EMUL_LIB_PATH.${f}} NATIVE=yes \
-		${HOST_SH} ${DIST}/ld/genscripts.sh ${DIST}/ld \
+	NATIVE=yes ${HOST_SH} ${DIST}/ld/genscripts.sh ${DIST}/ld \
 		${LIBDIR} "/usr" "/usr/bin" \
 		${G_target_alias} ${G_target_alias} ${G_target_alias} \
 		${G_EMUL} ${LIBDIR} yes ${G_enable_initfini_array} \



CVS commit: src/sys

2019-02-25 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon Feb 25 19:30:17 UTC 2019

Modified Files:
src/sys/arch/arm/amlogic: files.meson meson8b_clkc.c meson_clk.c
meson_clk.h meson_clk_div.c meson_clk_gate.c meson_clk_mpll.c
meson_clk_mux.c meson_clk_pll.c meson_dwmac.c meson_pinctrl.c
meson_pinctrl.h meson_platform.c meson_resets.c meson_usbphy.c
src/sys/arch/evbarm/conf: GENERIC GENERIC64 files.generic64
src/sys/external/gpl2/dts/dist/arch/arm64/boot/dts/amlogic:
meson-gxbb.dtsi
Added Files:
src/sys/arch/arm/amlogic: mesongx_mmc.c mesongxbb_aoclkc.c
mesongxbb_aoclkc.h mesongxbb_clkc.c mesongxbb_clkc.h
mesongxbb_pinctrl.c

Log Message:
Add support for Amlogic S905 (Meson GXBB) SoCs.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/amlogic/files.meson \
src/sys/arch/arm/amlogic/meson_platform.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/amlogic/meson8b_clkc.c \
src/sys/arch/arm/amlogic/meson_clk.h \
src/sys/arch/arm/amlogic/meson_clk_div.c \
src/sys/arch/arm/amlogic/meson_dwmac.c \
src/sys/arch/arm/amlogic/meson_pinctrl.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/amlogic/meson_clk.c \
src/sys/arch/arm/amlogic/meson_clk_gate.c \
src/sys/arch/arm/amlogic/meson_clk_mpll.c \
src/sys/arch/arm/amlogic/meson_clk_mux.c \
src/sys/arch/arm/amlogic/meson_clk_pll.c \
src/sys/arch/arm/amlogic/meson_pinctrl.h \
src/sys/arch/arm/amlogic/meson_resets.c \
src/sys/arch/arm/amlogic/meson_usbphy.c
cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/amlogic/mesongx_mmc.c \
src/sys/arch/arm/amlogic/mesongxbb_aoclkc.c \
src/sys/arch/arm/amlogic/mesongxbb_aoclkc.h \
src/sys/arch/arm/amlogic/mesongxbb_clkc.c \
src/sys/arch/arm/amlogic/mesongxbb_clkc.h \
src/sys/arch/arm/amlogic/mesongxbb_pinctrl.c
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/evbarm/conf/GENERIC
cvs rdiff -u -r1.79 -r1.80 src/sys/arch/evbarm/conf/GENERIC64
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/evbarm/conf/files.generic64
cvs rdiff -u -r1.1.1.7 -r1.2 \
src/sys/external/gpl2/dts/dist/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi

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

Modified files:

Index: src/sys/arch/arm/amlogic/files.meson
diff -u src/sys/arch/arm/amlogic/files.meson:1.4 src/sys/arch/arm/amlogic/files.meson:1.5
--- src/sys/arch/arm/amlogic/files.meson:1.4	Sun Jan 20 17:58:22 2019
+++ src/sys/arch/arm/amlogic/files.meson	Mon Feb 25 19:30:17 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: files.meson,v 1.4 2019/01/20 17:58:22 jmcneill Exp $
+#	$NetBSD: files.meson,v 1.5 2019/02/25 19:30:17 jmcneill Exp $
 #
 # Configuration info for Amlogic Meson family SoCs
 #
@@ -22,6 +22,16 @@ device	meson8bclkc: meson_clk
 attach	meson8bclkc at fdt with meson8b_clkc
 file	arch/arm/amlogic/meson8b_clkc.c		meson8b_clkc
 
+# Meson GXBB clock controller
+device	gxbbclkc: meson_clk
+attach	gxbbclkc at fdt with mesongxbb_clkc
+file	arch/arm/amlogic/mesongxbb_clkc.c	mesongxbb_clkc
+
+# Meson GXBB AO clock controller
+device	gxbbaoclkc: meson_clk
+attach	gxbbaoclkc at fdt with mesongxbb_aoclkc
+file	arch/arm/amlogic/mesongxbb_aoclkc.c	mesongxbb_aoclkc
+
 # Meson reset controller
 device	mesonresets
 attach	mesonresets at fdt with meson_resets
@@ -33,7 +43,8 @@ attach	mesonuart at fdt with meson_uart
 file	arch/arm/amlogic/meson_uart.c		meson_uart
 
 # Framebuffer console
-attach	genfb at fdt with meson_genfb
+device	mesonfb
+attach	mesonfb at fdt with meson_genfb
 file	arch/arm/amlogic/meson_genfb.c		meson_genfb & soc_meson
 
 # GPIO
@@ -41,17 +52,23 @@ device	mesonpinctrl: gpiobus
 attach	mesonpinctrl at fdt with meson_pinctrl
 file	arch/arm/amlogic/meson_pinctrl.c	meson_pinctrl
 file	arch/arm/amlogic/meson8b_pinctrl.c	meson_pinctrl & soc_meson8b
+file	arch/arm/amlogic/mesongxbb_pinctrl.c	meson_pinctrl & soc_mesongxbb
 
-# SDHC
+# Meson8b SDHC
 device	mesonsdhc: sdmmcbus
 attach	mesonsdhc at fdt with meson_sdhc
 file	arch/arm/amlogic/meson_sdhc.c		meson_sdhc
 
-# SDIO
+# Meson8b SDIO
 device	mesonsdio: sdmmcbus
 attach	mesonsdio at fdt with meson_sdio
 file	arch/arm/amlogic/meson_sdio.c		meson_sdio
 
+# Meson GX MMC
+device	mesongxmmc: sdmmcbus
+attach	mesongxmmc at fdt with mesongx_mmc
+file	arch/arm/amlogic/mesongx_mmc.c		mesongx_mmc 
+
 # USB PHY
 device	mesonusbphy
 attach	mesonusbphy at fdt with meson_usbphy
@@ -79,3 +96,4 @@ file	arch/arm/amlogic/meson_wdt.c		meson
 # SOC parameters
 defflag	opt_soc.h			SOC_MESON
 defflag	opt_soc.h			SOC_MESON8B: SOC_MESON
+defflag	opt_soc.h			SOC_MESONGXBB: SOC_MESON
Index: src/sys/arch/arm/amlogic/meson_platform.c
diff -u src/sys/arch/arm/amlogic/meson_platform.c:1.4 src/sys/arch/arm/amlogic/meson_platform.c:1.5
--- src/sys/arch/arm/amlogic/meson_platform.c:1.4	Thu Jan 31 13:06:10 2019
+++ src/sys/arch/arm/amlogic/meson_platform.c	Mon Feb 25 19:30:17 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: 

CVS commit: src/sys/dev/fdt

2019-02-25 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon Feb 25 19:28:36 UTC 2019

Modified Files:
src/sys/dev/fdt: fdtbus.c syscon.c

Log Message:
Attach syscon to "simple-mfd" devices and fix a bug with fdt_find_with_property


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/dev/fdt/fdtbus.c
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/fdt/syscon.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/fdt/fdtbus.c
diff -u src/sys/dev/fdt/fdtbus.c:1.26 src/sys/dev/fdt/fdtbus.c:1.27
--- src/sys/dev/fdt/fdtbus.c:1.26	Sat Jan 19 20:50:48 2019
+++ src/sys/dev/fdt/fdtbus.c	Mon Feb 25 19:28:36 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: fdtbus.c,v 1.26 2019/01/19 20:50:48 jmcneill Exp $ */
+/* $NetBSD: fdtbus.c,v 1.27 2019/02/25 19:28:36 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: fdtbus.c,v 1.26 2019/01/19 20:50:48 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fdtbus.c,v 1.27 2019/02/25 19:28:36 jmcneill Exp $");
 
 #include 
 #include 
@@ -79,7 +79,7 @@ static void	fdt_add_node(struct fdt_node
 static u_int	fdt_get_order(int);
 
 static const char * const fdtbus_compatible[] =
-{ "simple-bus", "simple-mfd", NULL };
+{ "simple-bus", NULL };
 
 CFATTACH_DECL2_NEW(simplebus, sizeof(struct fdt_softc),
 fdt_match, fdt_attach, NULL, NULL, fdt_rescan, fdt_childdet);
@@ -352,7 +352,7 @@ fdt_find_with_property(const char *prop,
 	int index = 0;
 
 	TAILQ_FOREACH(node, _nodes, n_nodes) {
-		if (index < *pindex)
+		if (index++ < *pindex)
 			continue;
 		if (of_hasprop(node->n_phandle, prop)) {
 			*pindex = index;

Index: src/sys/dev/fdt/syscon.c
diff -u src/sys/dev/fdt/syscon.c:1.2 src/sys/dev/fdt/syscon.c:1.3
--- src/sys/dev/fdt/syscon.c:1.2	Sat Jun 30 16:22:56 2018
+++ src/sys/dev/fdt/syscon.c	Mon Feb 25 19:28:36 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: syscon.c,v 1.2 2018/06/30 16:22:56 jmcneill Exp $ */
+/* $NetBSD: syscon.c,v 1.3 2019/02/25 19:28:36 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2018 Jared McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: syscon.c,v 1.2 2018/06/30 16:22:56 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: syscon.c,v 1.3 2019/02/25 19:28:36 jmcneill Exp $");
 
 #include 
 #include 
@@ -54,6 +54,7 @@ static void	syscon_attach(device_t, devi
 
 static const char *compatible[] = {
 	"syscon",
+	"simple-mfd",
 	NULL
 };
 



CVS commit: src/sys/dev/sdmmc

2019-02-25 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon Feb 25 19:28:01 UTC 2019

Modified Files:
src/sys/dev/sdmmc: sdmmcvar.h

Log Message:
Add SCF_NEED_BOUNCE command flag. Can be used by a driver to keep track of
which command(s) need data transfers to go through DMA bounce buffers.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/sys/dev/sdmmc/sdmmcvar.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/sdmmc/sdmmcvar.h
diff -u src/sys/dev/sdmmc/sdmmcvar.h:1.29 src/sys/dev/sdmmc/sdmmcvar.h:1.30
--- src/sys/dev/sdmmc/sdmmcvar.h:1.29	Sun Aug 20 15:58:43 2017
+++ src/sys/dev/sdmmc/sdmmcvar.h	Mon Feb 25 19:28:00 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: sdmmcvar.h,v 1.29 2017/08/20 15:58:43 mlelstv Exp $	*/
+/*	$NetBSD: sdmmcvar.h,v 1.30 2019/02/25 19:28:00 jmcneill Exp $	*/
 /*	$OpenBSD: sdmmcvar.h,v 1.13 2009/01/09 10:55:22 jsg Exp $	*/
 
 /*
@@ -126,6 +126,7 @@ struct sdmmc_command {
 /* Command hints */
 #define SCF_XFER_SDHC	(1U << 15)	/* card is SDHC */
 #define SCF_POLL	(1U << 16)	/* polling required */
+#define SCF_NEED_BOUNCE	(1U << 17)	/* (driver) transfer requires bounce buffer */
 /* response types */
 #define SCF_RSP_R0	0	/* none */
 #define SCF_RSP_R1	(SCF_RSP_PRESENT|SCF_RSP_CRC|SCF_RSP_IDX)



CVS commit: src/sys/sys

2019-02-25 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Mon Feb 25 13:19:14 UTC 2019

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

Log Message:
Fix typo in kcov.h

Should fix i386.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/sys/kcov.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/kcov.h
diff -u src/sys/sys/kcov.h:1.2 src/sys/sys/kcov.h:1.3
--- src/sys/sys/kcov.h:1.2	Sun Feb 24 21:14:43 2019
+++ src/sys/sys/kcov.h	Mon Feb 25 13:19:14 2019
@@ -1,4 +1,4 @@
-/*  $NetBSD: kcov.h,v 1.2 2019/02/24 21:14:43 kamil Exp $*/
+/*  $NetBSD: kcov.h,v 1.3 2019/02/25 13:19:14 kamil Exp $*/
 
 /*
  * Copyright (c) 2019 The NetBSD Foundation, Inc.
@@ -54,7 +54,7 @@ typedef volatile uint64_t kcov_int_t;
 #define KCOV_STORE(x,v)	__atomic_store_n(&(x), (v), __ATOMIC_RELAXED)
 #define KCOV_LOAD(x)	__atomic_load_n(&(x), __ATOMIC_RELAXED)
 #else
-#define KCOV_STORE(x,v)	(x) = (y)
+#define KCOV_STORE(x,v)	(x) = (v)
 #define KCOV_LOAD(x)	(x)
 #endif
 



CVS commit: src/sys/netinet

2019-02-25 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Mon Feb 25 10:49:16 UTC 2019

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

Log Message:
Improve panic messages.


To generate a diff of this commit:
cvs rdiff -u -r1.210 -r1.211 src/sys/netinet/tcp_output.c

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

Modified files:

Index: src/sys/netinet/tcp_output.c
diff -u src/sys/netinet/tcp_output.c:1.210 src/sys/netinet/tcp_output.c:1.211
--- src/sys/netinet/tcp_output.c:1.210	Thu Dec 27 16:59:17 2018
+++ src/sys/netinet/tcp_output.c	Mon Feb 25 10:49:16 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: tcp_output.c,v 1.210 2018/12/27 16:59:17 maxv Exp $	*/
+/*	$NetBSD: tcp_output.c,v 1.211 2019/02/25 10:49:16 maxv Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -135,7 +135,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tcp_output.c,v 1.210 2018/12/27 16:59:17 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tcp_output.c,v 1.211 2019/02/25 10:49:16 maxv Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -1340,9 +1340,9 @@ reset:			TCP_REASS_UNLOCK(tp);
 		break;
 	}
 	if (tp->t_template == NULL)
-		panic("tcp_output");
+		panic("%s: no template", __func__);
 	if (tp->t_template->m_len < iphdrlen)
-		panic("tcp_output");
+		panic("%s: %d < %d", __func__, tp->t_template->m_len, iphdrlen);
 	bcopy(mtod(tp->t_template, void *), mtod(m, void *), iphdrlen);
 
 	/*



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

2019-02-25 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Mon Feb 25 10:25:40 UTC 2019

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

Log Message:
Register missing CAT page spi.0 in distribution files


To generate a diff of this commit:
cvs rdiff -u -r1.2260 -r1.2261 src/distrib/sets/lists/comp/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/comp/mi
diff -u src/distrib/sets/lists/comp/mi:1.2260 src/distrib/sets/lists/comp/mi:1.2261
--- src/distrib/sets/lists/comp/mi:1.2260	Sat Feb 23 10:43:25 2019
+++ src/distrib/sets/lists/comp/mi	Mon Feb 25 10:25:40 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: mi,v 1.2260 2019/02/23 10:43:25 mlelstv Exp $
+#	$NetBSD: mi,v 1.2261 2019/02/25 10:25:40 kamil Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 ./etc/mtree/set.compcomp-sys-root
@@ -11761,6 +11761,7 @@
 ./usr/share/man/cat9/specificdata_key_delete.0	comp-sys-catman		.cat
 ./usr/share/man/cat9/specificdata_setspecific.0	comp-sys-catman		.cat
 ./usr/share/man/cat9/specificdata_setspecific_nowait.0 comp-sys-catman	.cat
+./usr/share/man/cat9/spi.0			comp-sys-catman		.cat
 ./usr/share/man/cat9/spinlockinit.0		comp-sys-catman		.cat
 ./usr/share/man/cat9/spinlockmgr.0		comp-sys-catman		.cat
 ./usr/share/man/cat9/spl.0			comp-sys-catman		.cat



CVS commit: src/tests/modules

2019-02-25 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Mon Feb 25 10:23:01 UTC 2019

Modified Files:
src/tests/modules: t_kcov.c

Log Message:
Fix build of t_kcov

Correct the syntax that used to work in earlier uncommitted version.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/modules/t_kcov.c

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

Modified files:

Index: src/tests/modules/t_kcov.c
diff -u src/tests/modules/t_kcov.c:1.3 src/tests/modules/t_kcov.c:1.4
--- src/tests/modules/t_kcov.c:1.3	Sun Feb 24 21:14:43 2019
+++ src/tests/modules/t_kcov.c	Mon Feb 25 10:23:01 2019
@@ -214,7 +214,6 @@ ATF_TC_BODY(kcov_enable_no_disable_no_cl
 	ATF_CHECK(ioctl(fd, KCOV_IOC_ENABLE) == 0);
 }
 
-#ifdef __HAVE_ATOMIC64_OPS
 static void *
 common_head(int *fdp)
 {
@@ -254,10 +253,10 @@ ATF_TC_BODY(kcov_basic, tc)
 	ATF_REQUIRE_MSG(ioctl(fd, KCOV_IOC_ENABLE) == 0,
 	"Unable to enable kcov ");
 
-	KCOV_STORE([0], 0);
+	KCOV_STORE(buf[0], 0);
 
 	sleep(0);
-	ATF_REQUIRE_MSG(KCOV_LOAD([0]) != 0, "No records found");
+	ATF_REQUIRE_MSG(KCOV_LOAD(buf[0]) != 0, "No records found");
 
 	ATF_REQUIRE_MSG(ioctl(fd, KCOV_IOC_DISABLE) == 0,
 	"Unable to disable kcov");
@@ -270,9 +269,9 @@ thread_test_helper(void *ptr)
 {
 	kcov_int_t *buf = ptr;
 
-	KCOV_STORE([0], 0);
+	KCOV_STORE(buf[0], 0);
 	sleep(0);
-	ATF_REQUIRE_MSG(KCOV_LOAD([0]) == 0,
+	ATF_REQUIRE_MSG(KCOV_LOAD(buf[0]) == 0,
 	"Records changed in blocked thread");
 
 	return NULL;
@@ -298,7 +297,6 @@ ATF_TC_BODY(kcov_thread, tc)
 
 	common_tail(fd, buf);
 }
-#endif
 
 ATF_TP_ADD_TCS(tp)
 {