CVS commit: src/sys/dev/rasops

2019-07-30 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Wed Jul 31 05:08:10 UTC 2019

Modified Files:
src/sys/dev/rasops: rasops24.c

Log Message:
Factor out copy-paste. No functional changes.


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/sys/dev/rasops/rasops24.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/rasops/rasops24.c
diff -u src/sys/dev/rasops/rasops24.c:1.42 src/sys/dev/rasops/rasops24.c:1.43
--- src/sys/dev/rasops/rasops24.c:1.42	Wed Jul 31 04:45:44 2019
+++ src/sys/dev/rasops/rasops24.c	Wed Jul 31 05:08:10 2019
@@ -1,4 +1,4 @@
-/* 	$NetBSD: rasops24.c,v 1.42 2019/07/31 04:45:44 rin Exp $	*/
+/* 	$NetBSD: rasops24.c,v 1.43 2019/07/31 05:08:10 rin Exp $	*/
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rasops24.c,v 1.42 2019/07/31 04:45:44 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rasops24.c,v 1.43 2019/07/31 05:08:10 rin Exp $");
 
 #include "opt_rasops.h"
 
@@ -51,6 +51,9 @@ static void 	rasops24_erasecols(void *, 
 static void 	rasops24_eraserows(void *, int, int, long);
 static void 	rasops24_putchar(void *, int, int, u_int, long);
 static void 	rasops24_putchar_aa(void *, int, int, u_int, long);
+static __inline void
+		rasops24_makestamp1(struct rasops_info *, uint32_t *,
+uint32_t, uint32_t, uint32_t, uint32_t);
 #ifndef RASOPS_SMALL
 static void 	rasops24_putchar8(void *, int, int, u_int, long);
 static void 	rasops24_putchar12(void *, int, int, u_int, long);
@@ -117,6 +120,27 @@ rasops24_init(struct rasops_info *ri)
 #include "rasops_putchar.h"
 #include "rasops_putchar_aa.h"
 
+static __inline void
+rasops24_makestamp1(struct rasops_info *ri, uint32_t *stamp,
+uint32_t c1, uint32_t c2, uint32_t c3, uint32_t c4)
+{
+
+	stamp[0] = (c1 <<  8) | (c2 >> 16);
+	stamp[1] = (c2 << 16) | (c3 >>  8);
+	stamp[2] = (c3 << 24) |  c4;
+
+#if BYTE_ORDER == LITTLE_ENDIAN
+	if ((ri->ri_flg & RI_BSWAP) == 0)
+#else
+	if ((ri->ri_flg & RI_BSWAP) != 0)
+#endif
+	{
+		stamp[0] = bswap32(stamp[0]);
+		stamp[1] = bswap32(stamp[1]);
+		stamp[2] = bswap32(stamp[2]);
+	}
+}
+
 #ifndef RASOPS_SMALL
 /*
  * Recompute the blitting stamp.
@@ -144,19 +168,7 @@ rasops24_makestamp(struct rasops_info *r
 		c3 = i & 16 ? fg : bg;
 		c4 = i & 32 ? fg : bg;
 #endif
-		stamp[i + 0] = (c1 <<  8) | (c2 >> 16);
-		stamp[i + 1] = (c2 << 16) | (c3 >>  8);
-		stamp[i + 2] = (c3 << 24) |  c4;
-
-#if BYTE_ORDER == LITTLE_ENDIAN
-		if ((ri->ri_flg & RI_BSWAP) == 0) {
-#else
-		if ((ri->ri_flg & RI_BSWAP) != 0) {
-#endif
-			stamp[i + 0] = bswap32(stamp[i + 0]);
-			stamp[i + 1] = bswap32(stamp[i + 1]);
-			stamp[i + 2] = bswap32(stamp[i + 2]);
-		}
+		rasops24_makestamp1(ri, [i], c1, c2, c3, c4);
 	}
 }
 
@@ -210,19 +222,7 @@ rasops24_eraserows(void *cookie, int row
 #endif
 
 	clr = ri->ri_devcmap[((uint32_t)attr >> 16) & 0xf] & 0xff;
-	stamp[0] = (clr <<  8) | (clr >> 16);
-	stamp[1] = (clr << 16) | (clr >>  8);
-	stamp[2] = (clr << 24) |  clr;
-
-#if BYTE_ORDER == LITTLE_ENDIAN
-	if ((ri->ri_flg & RI_BSWAP) == 0) {
-#else
-	if ((ri->ri_flg & RI_BSWAP) != 0) {
-#endif
-		stamp[0] = bswap32(stamp[0]);
-		stamp[1] = bswap32(stamp[1]);
-		stamp[2] = bswap32(stamp[2]);
-	}
+	rasops24_makestamp1(ri, stamp, clr, clr, clr, clr);
 
 	/*
 	 * XXX the wsdisplay_emulops interface seems a little deficient in
@@ -317,19 +317,7 @@ rasops24_erasecols(void *cookie, int row
 	height = ri->ri_font->fontheight;
 
 	clr = ri->ri_devcmap[((uint32_t)attr >> 16) & 0xf] & 0xff;
-	stamp[0] = (clr <<  8) | (clr >> 16);
-	stamp[1] = (clr << 16) | (clr >>  8);
-	stamp[2] = (clr << 24) |  clr;
-
-#if BYTE_ORDER == LITTLE_ENDIAN
-	if ((ri->ri_flg & RI_BSWAP) == 0) {
-#else
-	if ((ri->ri_flg & RI_BSWAP) != 0) {
-#endif
-		stamp[0] = bswap32(stamp[0]);
-		stamp[1] = bswap32(stamp[1]);
-		stamp[2] = bswap32(stamp[2]);
-	}
+	rasops24_makestamp1(ri, stamp, clr, clr, clr, clr);
 
 	/*
 	 * The current byte offset mod 4 tells us the number of 24-bit pels



CVS commit: src/sys/dev/rasops

2019-07-30 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Wed Jul 31 05:08:10 UTC 2019

Modified Files:
src/sys/dev/rasops: rasops24.c

Log Message:
Factor out copy-paste. No functional changes.


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/sys/dev/rasops/rasops24.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/rasops

2019-07-30 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Wed Jul 31 04:45:44 UTC 2019

Modified Files:
src/sys/dev/rasops: rasops.c rasops.h rasops24.c rasops_putchar_aa.h

Log Message:
Provide buffer capable of single-row pixels in order to make things simpler.

XXX
Bump kernel version for rasops_info later.


To generate a diff of this commit:
cvs rdiff -u -r1.104 -r1.105 src/sys/dev/rasops/rasops.c
cvs rdiff -u -r1.41 -r1.42 src/sys/dev/rasops/rasops.h \
src/sys/dev/rasops/rasops24.c
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/rasops/rasops_putchar_aa.h

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



CVS commit: src/sys/dev/rasops

2019-07-30 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Wed Jul 31 04:45:44 UTC 2019

Modified Files:
src/sys/dev/rasops: rasops.c rasops.h rasops24.c rasops_putchar_aa.h

Log Message:
Provide buffer capable of single-row pixels in order to make things simpler.

XXX
Bump kernel version for rasops_info later.


To generate a diff of this commit:
cvs rdiff -u -r1.104 -r1.105 src/sys/dev/rasops/rasops.c
cvs rdiff -u -r1.41 -r1.42 src/sys/dev/rasops/rasops.h \
src/sys/dev/rasops/rasops24.c
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/rasops/rasops_putchar_aa.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/rasops/rasops.c
diff -u src/sys/dev/rasops/rasops.c:1.104 src/sys/dev/rasops/rasops.c:1.105
--- src/sys/dev/rasops/rasops.c:1.104	Wed Jul 31 02:09:02 2019
+++ src/sys/dev/rasops/rasops.c	Wed Jul 31 04:45:44 2019
@@ -1,4 +1,4 @@
-/*	 $NetBSD: rasops.c,v 1.104 2019/07/31 02:09:02 rin Exp $	*/
+/*	 $NetBSD: rasops.c,v 1.105 2019/07/31 04:45:44 rin Exp $	*/
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.104 2019/07/31 02:09:02 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.105 2019/07/31 04:45:44 rin Exp $");
 
 #include "opt_rasops.h"
 #include "rasops_glue.h"
@@ -482,6 +482,14 @@ rasops_reconfig(struct rasops_info *ri, 
 		WSSCREEN_WSCOLORS | WSSCREEN_REVERSE;
 	}
 
+	if (ri->ri_buf != NULL) {
+		kmem_free(ri->ri_buf, ri->ri_buflen);
+		ri->ri_buf = NULL;
+	}
+	len = (ri->ri_flg & RI_FULLCLEAR) ? ri->ri_stride : ri->ri_emustride;
+	ri->ri_buflen = len;
+	ri->ri_buf = kmem_alloc(len, KM_SLEEP);
+
 #ifndef RASOPS_SMALL
 	if (ri->ri_stamp != NULL) {
 		kmem_free(ri->ri_stamp, ri->ri_stamp_len);
@@ -949,8 +957,9 @@ void
 rasops_eraserows(void *cookie, int row, int num, long attr)
 {
 	struct rasops_info *ri = (struct rasops_info *)cookie;
-	uint32_t *rp, *dp, *hp, clr;
-	int n, cnt;
+	uint32_t *buf = (uint32_t *)ri->ri_buf;
+	uint32_t *rp, *hp, clr;
+	int stride, cnt;
 
 	hp = NULL;	/* XXX GCC */
 
@@ -976,25 +985,26 @@ rasops_eraserows(void *cookie, int row, 
 	 * the RI_FULLCLEAR flag is set, clear the entire display.
 	 */
 	if (num == ri->ri_rows && (ri->ri_flg & RI_FULLCLEAR) != 0) {
-		n = ri->ri_stride >> 2;
+		stride = ri->ri_stride;
 		num = ri->ri_height;
 		rp = (uint32_t *)ri->ri_origbits;
 		if (ri->ri_hwbits)
 			hp = (uint32_t *)ri->ri_hworigbits;
 	} else {
-		n = ri->ri_emustride >> 2;
+		stride = ri->ri_emustride;
 		num *= ri->ri_font->fontheight;
 		rp = (uint32_t *)(ri->ri_bits + row * ri->ri_yscale);
 		if (ri->ri_hwbits)
 			hp = (uint32_t *)(ri->ri_hwbits + row * ri->ri_yscale);
 	}
 
+	for (cnt = 0; cnt < stride >> 2; cnt++)
+		buf[cnt] = clr;
+
 	while (num--) {
-		dp = rp;
-		for (cnt = n; cnt; cnt--)
-			*dp++ = clr;
+		memcpy(rp, buf, stride);
 		if (ri->ri_hwbits) {
-			memcpy(hp, rp, n << 2);
+			memcpy(hp, buf, stride);
 			DELTA(hp, ri->ri_stride, uint32_t *);
 		}
 		DELTA(rp, ri->ri_stride, uint32_t *);
@@ -1114,8 +1124,9 @@ void
 rasops_erasecols(void *cookie, int row, int col, int num, long attr)
 {
 	struct rasops_info *ri = (struct rasops_info *)cookie;
+	void *buf = ri->ri_buf;
 	int height, cnt, slop1, slop2, clr;
-	uint32_t *rp, *dp, *hp;
+	uint32_t *dp, *rp, *hp;
 
 	hp = NULL;	/* XXX GCC */
 
@@ -1143,95 +1154,45 @@ rasops_erasecols(void *cookie, int row, 
 	height = ri->ri_font->fontheight;
 	clr = ri->ri_devcmap[((uint32_t)attr >> 16) & 0xf];
 
-	/* Don't bother using the full loop for <= 32 pels */
-	if (num <= 32) {
-		if (((num | ri->ri_xscale) & 3) == 0) {
-			/* Word aligned blt */
-			num >>= 2;
-
-			while (height--) {
-dp = rp;
-for (cnt = num; cnt; cnt--)
-	*dp++ = clr;
-if (ri->ri_hwbits) {
-	memcpy(hp, rp, num << 2);
-	DELTA(hp, ri->ri_stride, uint32_t *);
-}
-DELTA(rp, ri->ri_stride, uint32_t *);
-			}
-		} else if (((num | ri->ri_xscale) & 1) == 0) {
-			/*
-			 * Halfword aligned blt. This is needed so the
-			 * 15/16 bit ops can use this function.
-			 */
-			num >>= 1;
-
-			while (height--) {
-dp = rp;
-for (cnt = num; cnt; cnt--) {
-	*(uint16_t *)dp = clr;
-	DELTA(dp, 2, uint32_t *);
-}
-if (ri->ri_hwbits) {
-	memcpy(hp, rp, num << 1);
-	DELTA(hp, ri->ri_stride, uint32_t *);
-}
-DELTA(rp, ri->ri_stride, uint32_t *);
-			}
-		} else {
-			while (height--) {
-dp = rp;
-for (cnt = num; cnt; cnt--) {
-	*(uint8_t *)dp = clr;
-	DELTA(dp, 1, uint32_t *);
-}
-if (ri->ri_hwbits) {
-	memcpy(hp, rp, num);
-	DELTA(hp, ri->ri_stride, uint32_t *);
-}
-DELTA(rp, ri->ri_stride, uint32_t *);
-			}
-		}
-
-		return;
-	}
+	dp = buf;
 
 	slop1 = (4 - ((uintptr_t)rp & 3)) & 3;
 	slop2 = (num - slop1) & 3;
 	num = (num - slop1 /* - slop2 */) >> 2;
 
-	while (height--) {
-		dp = rp;
+	/* Align span to 4 bytes */
+	if (slop1 & 1) {
+		*(uint8_t *)dp = clr;
+		

CVS commit: src/sys/dev/rasops

2019-07-30 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Wed Jul 31 02:26:40 UTC 2019

Modified Files:
src/sys/dev/rasops: rasops_putchar_aa.h

Log Message:
Reduce memcpy.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/rasops/rasops_putchar_aa.h

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



CVS commit: src/sys/dev/rasops

2019-07-30 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Wed Jul 31 02:26:40 UTC 2019

Modified Files:
src/sys/dev/rasops: rasops_putchar_aa.h

Log Message:
Reduce memcpy.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/rasops/rasops_putchar_aa.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/rasops/rasops_putchar_aa.h
diff -u src/sys/dev/rasops/rasops_putchar_aa.h:1.4 src/sys/dev/rasops/rasops_putchar_aa.h:1.5
--- src/sys/dev/rasops/rasops_putchar_aa.h:1.4	Tue Jul 30 15:29:40 2019
+++ src/sys/dev/rasops/rasops_putchar_aa.h	Wed Jul 31 02:26:40 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: rasops_putchar_aa.h,v 1.4 2019/07/30 15:29:40 rin Exp $ */
+/* $NetBSD: rasops_putchar_aa.h,v 1.5 2019/07/31 02:26:40 rin Exp $ */
 
 /* NetBSD: rasops8.c,v 1.43 2019/07/28 12:06:10 rin Exp */
 /*-
@@ -148,9 +148,9 @@ PUTCHAR_AA(RASOPS_DEPTH)(void *cookie, i
 aval = *fr;
 fr++;
 if (aval == 0)
-	SET_PIXEL(buf, x, 0);
+	SET_PIXEL(rp, x, 0);
 else if (aval == 255)
-	SET_PIXEL(buf, x, 1);
+	SET_PIXEL(rp, x, 1);
 else {
 #define	AVERAGE(p, w)	((w * p[1] + (0xff - w) * p[0]) >> 8)
 	R = AVERAGE(r, aval);
@@ -163,7 +163,7 @@ PUTCHAR_AA(RASOPS_DEPTH)(void *cookie, i
 	(((_r) >> (8 - ri->ri_rnum)) << ri->ri_rpos) |	\
 	(((_g) >> (8 - ri->ri_gnum)) << ri->ri_gpos) |	\
 	(((_b) >> (8 - ri->ri_bnum)) << ri->ri_bpos)
-	buf[x] = RGB2PIXEL(R, G, B);
+	rp[x] = RGB2PIXEL(R, G, B);
 #undef	RGB2PIXEL
 #endif
 
@@ -177,21 +177,20 @@ PUTCHAR_AA(RASOPS_DEPTH)(void *cookie, i
 #define	GOFF	(2 - ri->ri_gpos / 8)
 #define	BOFF	(2 - ri->ri_bpos / 8)
 #  endif
-	buf[3 * x + ROFF] = R;
-	buf[3 * x + GOFF] = G;
-	buf[3 * x + BOFF] = B;
+	rp[3 * x + ROFF] = R;
+	rp[3 * x + GOFF] = G;
+	rp[3 * x + BOFF] = B;
 #undef	ROFF
 #undef	GOFF
 #undef	BOFF
 #endif
 }
 			}
-			memcpy(rp, buf, width * PIXEL_BYTES);
-			DELTA(rp, ri->ri_stride, PIXEL_TYPE *);
 			if (ri->ri_hwbits) {
-memcpy(hp, buf, width * PIXEL_BYTES);
+memcpy(hp, rp, width * PIXEL_BYTES);
 DELTA(hp, ri->ri_stride, PIXEL_TYPE *);
 			}
+			DELTA(rp, ri->ri_stride, PIXEL_TYPE *);
 		}
 	}
 



CVS commit: src/sys/kern

2019-07-30 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Jul 31 02:21:31 UTC 2019

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

Log Message:
 Whitespace fixes. No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.93 -r1.94 src/sys/kern/kern_rndq.c

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

Modified files:

Index: src/sys/kern/kern_rndq.c
diff -u src/sys/kern/kern_rndq.c:1.93 src/sys/kern/kern_rndq.c:1.94
--- src/sys/kern/kern_rndq.c:1.93	Fri Mar  1 11:06:57 2019
+++ src/sys/kern/kern_rndq.c	Wed Jul 31 02:21:31 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_rndq.c,v 1.93 2019/03/01 11:06:57 pgoyette Exp $	*/
+/*	$NetBSD: kern_rndq.c,v 1.94 2019/07/31 02:21:31 msaitoh Exp $	*/
 
 /*-
  * Copyright (c) 1997-2013 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_rndq.c,v 1.93 2019/03/01 11:06:57 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_rndq.c,v 1.94 2019/07/31 02:21:31 msaitoh Exp $");
 
 #include 
 #include 
@@ -67,7 +67,7 @@ __KERNEL_RCSID(0, "$NetBSD: kern_rndq.c,
 #endif
 
 #ifdef RND_DEBUG
-#define	DPRINTF(l,x)  if (rnd_debug & (l)) rnd_printf x
+#define	DPRINTF(l,x)	if (rnd_debug & (l)) rnd_printf x
 int	rnd_debug = 0;
 #else
 #define	DPRINTF(l,x)
@@ -155,7 +155,7 @@ static void *rnd_process __read_mostly;
 static void *rnd_wakeup __read_mostly;
 
 static inline uint32_t	rnd_counter(void);
-staticvoid	rnd_intr(void *);
+static	  void	rnd_intr(void *);
 static	  void	rnd_wake(void *);
 static	  void	rnd_process_events(void);
 static	  void	rnd_add_data_ts(krndsource_t *, const void *const,
@@ -617,7 +617,7 @@ rnd_init(void)
 	 * If we have a cycle counter, take its error with respect
 	 * to the callout mechanism as a source of entropy, ala
 	 * TrueRand.
- 	 *
+	 *
 	 */
 #if defined(__HAVE_CPU_COUNTER)
 	/* IPL_VM because taken while rnd_global.lock is held.  */
@@ -840,10 +840,9 @@ rnd_estimate(krndsource_t *rs, uint32_t 
 			entropy += dt_est;
 		}
 
-if (rs->flags & RND_FLAG_ESTIMATE_VALUE) {
+		if (rs->flags & RND_FLAG_ESTIMATE_VALUE) {
 			entropy += dv_est;
 		}
-
 	}
 	return entropy;
 }
@@ -883,7 +882,7 @@ _rnd_add_uint64(krndsource_t *rs, uint64
 	uint32_t entropy = 0;
 
 	if (rs->flags & RND_FLAG_NO_COLLECT)
-return;
+		return;
 
 	/*
 	 * Sample the counter as soon as possible to avoid
@@ -1414,9 +1413,9 @@ krndsource_to_rndsource(krndsource_t *kr
 
 	memset(r, 0, sizeof(*r));
 	strlcpy(r->name, kr->name, sizeof(r->name));
-r->total = kr->total;
-r->type = kr->type;
-r->flags = kr->flags;
+	r->total = kr->total;
+	r->type = kr->type;
+	r->flags = kr->flags;
 }
 
 static void
@@ -1440,7 +1439,7 @@ krs_setflags(krndsource_t *kr, uint32_t 
 	kr->flags |= (flags & mask);
 
 	if (oflags & RND_FLAG_HASENABLE &&
-((oflags & RND_FLAG_NO_COLLECT) !=
+	((oflags & RND_FLAG_NO_COLLECT) !=
 		(flags & RND_FLAG_NO_COLLECT))) {
 		kr->enable(kr, !(flags & RND_FLAG_NO_COLLECT));
 	}
@@ -1634,7 +1633,7 @@ rnd_system_ioctl(struct file *fp, u_long
 		}
 		mutex_spin_exit(_global.lock);
 
-		ret = ENOENT;   /* name not found */
+		ret = ENOENT;		/* name not found */
 
 		break;
 



CVS commit: src/sys/kern

2019-07-30 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Jul 31 02:21:31 UTC 2019

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

Log Message:
 Whitespace fixes. No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.93 -r1.94 src/sys/kern/kern_rndq.c

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



CVS commit: src/sys

2019-07-30 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Wed Jul 31 02:09:02 UTC 2019

Modified Files:
src/sys/arch/luna68k/dev: omrasops.c
src/sys/dev/rasops: rasops.c rasops.h

Log Message:
G/C ri_delta.

XXX
Bump kernel version after other changes for struct rasops_info.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/luna68k/dev/omrasops.c
cvs rdiff -u -r1.103 -r1.104 src/sys/dev/rasops/rasops.c
cvs rdiff -u -r1.40 -r1.41 src/sys/dev/rasops/rasops.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/luna68k/dev/omrasops.c
diff -u src/sys/arch/luna68k/dev/omrasops.c:1.20 src/sys/arch/luna68k/dev/omrasops.c:1.21
--- src/sys/arch/luna68k/dev/omrasops.c:1.20	Wed Jun  6 01:49:08 2018
+++ src/sys/arch/luna68k/dev/omrasops.c	Wed Jul 31 02:09:02 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: omrasops.c,v 1.20 2018/06/06 01:49:08 maya Exp $ */
+/* $NetBSD: omrasops.c,v 1.21 2019/07/31 02:09:02 rin Exp $ */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include 			/* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: omrasops.c,v 1.20 2018/06/06 01:49:08 maya Exp $");
+__KERNEL_RCSID(0, "$NetBSD: omrasops.c,v 1.21 2019/07/31 02:09:02 rin Exp $");
 
 /*
  * Designed speficically for 'm68k bitorder';
@@ -1202,7 +1202,6 @@ omrasops_init(struct rasops_info *ri, in
 	ri->ri_cols = ri->ri_emuwidth / ri->ri_font->fontwidth;
 	ri->ri_rows = ri->ri_emuheight / ri->ri_font->fontheight;
 	ri->ri_emustride = ri->ri_emuwidth * bpp >> 3;
-	ri->ri_delta = ri->ri_stride - ri->ri_emustride;
 	ri->ri_ccol = 0;
 	ri->ri_crow = 0;
 	ri->ri_pelbytes = bpp >> 3;

Index: src/sys/dev/rasops/rasops.c
diff -u src/sys/dev/rasops/rasops.c:1.103 src/sys/dev/rasops/rasops.c:1.104
--- src/sys/dev/rasops/rasops.c:1.103	Wed Jul 31 02:04:14 2019
+++ src/sys/dev/rasops/rasops.c	Wed Jul 31 02:09:02 2019
@@ -1,4 +1,4 @@
-/*	 $NetBSD: rasops.c,v 1.103 2019/07/31 02:04:14 rin Exp $	*/
+/*	 $NetBSD: rasops.c,v 1.104 2019/07/31 02:09:02 rin Exp $	*/
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.103 2019/07/31 02:04:14 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.104 2019/07/31 02:09:02 rin Exp $");
 
 #include "opt_rasops.h"
 #include "rasops_glue.h"
@@ -417,7 +417,6 @@ rasops_reconfig(struct rasops_info *ri, 
 		ri->ri_rows = ri->ri_emuheight / ri->ri_font->fontheight;
 	}
 	ri->ri_emustride = ri->ri_emuwidth * bpp >> 3;
-	ri->ri_delta = ri->ri_stride - ri->ri_emustride;
 	ri->ri_ccol = 0;
 	ri->ri_crow = 0;
 	ri->ri_pelbytes = bpp >> 3;
@@ -426,12 +425,6 @@ rasops_reconfig(struct rasops_info *ri, 
 	ri->ri_yscale = ri->ri_font->fontheight * ri->ri_stride;
 	ri->ri_fontscale = ri->ri_font->fontheight * ri->ri_font->stride;
 
-	if ((ri->ri_delta & 3) != 0) {
-		aprint_error(
-		"%s: ri_delta not aligned on 32-bit boundary", __func__);
-		splx(s);
-		return -1;
-	}
 	ri->ri_origbits = ri->ri_bits;
 	ri->ri_hworigbits = ri->ri_hwbits;
 

Index: src/sys/dev/rasops/rasops.h
diff -u src/sys/dev/rasops/rasops.h:1.40 src/sys/dev/rasops/rasops.h:1.41
--- src/sys/dev/rasops/rasops.h:1.40	Wed Jul 31 02:04:14 2019
+++ src/sys/dev/rasops/rasops.h	Wed Jul 31 02:09:02 2019
@@ -1,4 +1,4 @@
-/* 	$NetBSD: rasops.h,v 1.40 2019/07/31 02:04:14 rin Exp $ */
+/* 	$NetBSD: rasops.h,v 1.41 2019/07/31 02:09:02 rin Exp $ */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -113,7 +113,6 @@ struct rasops_info {
 	int	ri_emustride;	/* bytes per row we actually care about */
 	int	ri_rows;	/* number of rows (characters, not pels) */
 	int	ri_cols;	/* number of columns (characters, not pels) */
-	int	ri_delta;	/* row delta in bytes */
 	int	ri_pelbytes;	/* bytes per pel (may be zero) */
 	int	ri_fontscale;	/* fontheight * fontstride */
 	int	ri_xscale;	/* fontwidth * pelbytes */



CVS commit: src/sys

2019-07-30 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Wed Jul 31 02:09:02 UTC 2019

Modified Files:
src/sys/arch/luna68k/dev: omrasops.c
src/sys/dev/rasops: rasops.c rasops.h

Log Message:
G/C ri_delta.

XXX
Bump kernel version after other changes for struct rasops_info.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/luna68k/dev/omrasops.c
cvs rdiff -u -r1.103 -r1.104 src/sys/dev/rasops/rasops.c
cvs rdiff -u -r1.40 -r1.41 src/sys/dev/rasops/rasops.h

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



CVS commit: src/sys/dev/rasops

2019-07-30 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Wed Jul 31 02:04:15 UTC 2019

Modified Files:
src/sys/dev/rasops: rasops.c rasops.h rasops15.c rasops2.c rasops24.c
rasops32.c rasops4.c rasops8.c rasops_putchar_width.h

Log Message:
Switch to per-device stamp, and retire stamp_mutex.

XXX
Bump kernel version after other changes for struct rasops_info.


To generate a diff of this commit:
cvs rdiff -u -r1.102 -r1.103 src/sys/dev/rasops/rasops.c
cvs rdiff -u -r1.39 -r1.40 src/sys/dev/rasops/rasops.h
cvs rdiff -u -r1.32 -r1.33 src/sys/dev/rasops/rasops15.c
cvs rdiff -u -r1.27 -r1.28 src/sys/dev/rasops/rasops2.c
cvs rdiff -u -r1.40 -r1.41 src/sys/dev/rasops/rasops24.c \
src/sys/dev/rasops/rasops32.c
cvs rdiff -u -r1.21 -r1.22 src/sys/dev/rasops/rasops4.c
cvs rdiff -u -r1.45 -r1.46 src/sys/dev/rasops/rasops8.c
cvs rdiff -u -r1.9 -r1.10 src/sys/dev/rasops/rasops_putchar_width.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/rasops/rasops.c
diff -u src/sys/dev/rasops/rasops.c:1.102 src/sys/dev/rasops/rasops.c:1.103
--- src/sys/dev/rasops/rasops.c:1.102	Wed Jul 31 00:14:25 2019
+++ src/sys/dev/rasops/rasops.c	Wed Jul 31 02:04:14 2019
@@ -1,4 +1,4 @@
-/*	 $NetBSD: rasops.c,v 1.102 2019/07/31 00:14:25 rin Exp $	*/
+/*	 $NetBSD: rasops.c,v 1.103 2019/07/31 02:04:14 rin Exp $	*/
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.102 2019/07/31 00:14:25 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.103 2019/07/31 02:04:14 rin Exp $");
 
 #include "opt_rasops.h"
 #include "rasops_glue.h"
@@ -489,6 +489,13 @@ rasops_reconfig(struct rasops_info *ri, 
 		WSSCREEN_WSCOLORS | WSSCREEN_REVERSE;
 	}
 
+#ifndef RASOPS_SMALL
+	if (ri->ri_stamp != NULL) {
+		kmem_free(ri->ri_stamp, ri->ri_stamp_len);
+		ri->ri_stamp = NULL;
+	}
+#endif
+
 	switch (ri->ri_depth) {
 #if NRASOPS1 > 0
 	case 1:
@@ -1670,7 +1677,6 @@ rasops_make_box_chars_alpha(struct rasop
  * For now this is either a copy of rasops_cmap[] or an R3G3B2 map, it should
  * probably be a linear ( or gamma corrected? ) ramp for higher depths.
  */
- 
 int
 rasops_get_cmap(struct rasops_info *ri, uint8_t *palette, size_t bytes)
 {
@@ -1707,3 +1713,15 @@ rasops_get_cmap(struct rasops_info *ri, 
 		memcpy(palette, rasops_cmap, uimin(bytes, sizeof(rasops_cmap)));
 	return 0;
 }
+
+#ifndef RASOPS_SMALL
+void
+rasops_allocstamp(struct rasops_info *ri, size_t len)
+{
+
+	KASSERT(ri->ri_stamp == NULL);
+	ri->ri_stamp_len = len;
+	ri->ri_stamp = kmem_zalloc(len, KM_SLEEP);
+	ri->ri_stamp_attr = 0;
+}
+#endif

Index: src/sys/dev/rasops/rasops.h
diff -u src/sys/dev/rasops/rasops.h:1.39 src/sys/dev/rasops/rasops.h:1.40
--- src/sys/dev/rasops/rasops.h:1.39	Wed Jul 31 00:14:25 2019
+++ src/sys/dev/rasops/rasops.h	Wed Jul 31 02:04:14 2019
@@ -1,4 +1,4 @@
-/* 	$NetBSD: rasops.h,v 1.39 2019/07/31 00:14:25 rin Exp $ */
+/* 	$NetBSD: rasops.h,v 1.40 2019/07/31 02:04:14 rin Exp $ */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -132,6 +132,11 @@ struct rasops_info {
 	/* Callbacks so we can share some code */
 	void	(*ri_do_cursor)(struct rasops_info *);
 
+	/* 4x1 stamp for optimized character blitting */
+	void	*ri_stamp;
+	long	ri_stamp_attr;
+	size_t	ri_stamp_len;
+
 #if NRASOPS_ROTATION > 0
 	/* Used to intercept putchar to permit display rotation */
 	struct	wsdisplay_emulops ri_real_ops;
@@ -182,6 +187,8 @@ void	rasops15_init(struct rasops_info *)
 void	rasops24_init(struct rasops_info *);
 void	rasops32_init(struct rasops_info *);
 
+void	rasops_allocstamp(struct rasops_info *, size_t);
+
 #define	DELTA(p, d, cast) ((p) = (cast)((uint8_t *)(p) + (d)))
 
 #define	FONT_GLYPH(uc, font, ri)	\

Index: src/sys/dev/rasops/rasops15.c
diff -u src/sys/dev/rasops/rasops15.c:1.32 src/sys/dev/rasops/rasops15.c:1.33
--- src/sys/dev/rasops/rasops15.c:1.32	Wed Jul 31 00:14:25 2019
+++ src/sys/dev/rasops/rasops15.c	Wed Jul 31 02:04:14 2019
@@ -1,4 +1,4 @@
-/* 	$NetBSD: rasops15.c,v 1.32 2019/07/31 00:14:25 rin Exp $	*/
+/* 	$NetBSD: rasops15.c,v 1.33 2019/07/31 02:04:14 rin Exp $	*/
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rasops15.c,v 1.32 2019/07/31 00:14:25 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rasops15.c,v 1.33 2019/07/31 02:04:14 rin Exp $");
 
 #include "opt_rasops.h"
 
@@ -55,13 +55,6 @@ static void	rasops15_makestamp(struct ra
 
 #ifndef RASOPS_SMALL
 /*
- * 4x1 stamp for optimized character blitting
- */
-static uint32_t	stamp[32];
-static long	stamp_attr;
-static int	stamp_mutex;	/* XXX see note in readme */
-
-/*
  * offset = STAMP_SHIFT(fontbits, nibble #) & STAMP_MASK
  * destination uint32_t[0] = STAMP_READ(offset)
  * destination uint32_t[1] = STAMP_READ(offset + 4)
@@ -106,8 +99,12 @@ rasops15_init(struct rasops_info *ri)
 #endif	/* !RASOPS_SMALL */
 	

CVS commit: src/sys/dev/rasops

2019-07-30 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Wed Jul 31 02:04:15 UTC 2019

Modified Files:
src/sys/dev/rasops: rasops.c rasops.h rasops15.c rasops2.c rasops24.c
rasops32.c rasops4.c rasops8.c rasops_putchar_width.h

Log Message:
Switch to per-device stamp, and retire stamp_mutex.

XXX
Bump kernel version after other changes for struct rasops_info.


To generate a diff of this commit:
cvs rdiff -u -r1.102 -r1.103 src/sys/dev/rasops/rasops.c
cvs rdiff -u -r1.39 -r1.40 src/sys/dev/rasops/rasops.h
cvs rdiff -u -r1.32 -r1.33 src/sys/dev/rasops/rasops15.c
cvs rdiff -u -r1.27 -r1.28 src/sys/dev/rasops/rasops2.c
cvs rdiff -u -r1.40 -r1.41 src/sys/dev/rasops/rasops24.c \
src/sys/dev/rasops/rasops32.c
cvs rdiff -u -r1.21 -r1.22 src/sys/dev/rasops/rasops4.c
cvs rdiff -u -r1.45 -r1.46 src/sys/dev/rasops/rasops8.c
cvs rdiff -u -r1.9 -r1.10 src/sys/dev/rasops/rasops_putchar_width.h

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



CVS commit: src/sys/dev/rasops

2019-07-30 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Wed Jul 31 00:14:26 UTC 2019

Modified Files:
src/sys/dev/rasops: rasops.c rasops.h rasops1.c rasops15.c rasops2.c
rasops24.c rasops32.c rasops4.c rasops8.c

Log Message:
Misc clean-up's:
- protect private stuff in rasops.h by _RASOPS_PRIVATE
- staticify rasops_copycols() and rasops_isgray[]
- G/C unused extern int cold


To generate a diff of this commit:
cvs rdiff -u -r1.101 -r1.102 src/sys/dev/rasops/rasops.c
cvs rdiff -u -r1.38 -r1.39 src/sys/dev/rasops/rasops.h
cvs rdiff -u -r1.31 -r1.32 src/sys/dev/rasops/rasops1.c \
src/sys/dev/rasops/rasops15.c
cvs rdiff -u -r1.26 -r1.27 src/sys/dev/rasops/rasops2.c
cvs rdiff -u -r1.39 -r1.40 src/sys/dev/rasops/rasops24.c \
src/sys/dev/rasops/rasops32.c
cvs rdiff -u -r1.20 -r1.21 src/sys/dev/rasops/rasops4.c
cvs rdiff -u -r1.44 -r1.45 src/sys/dev/rasops/rasops8.c

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



CVS commit: src/external/gpl3/gcc/dist/libstdc++-v3

2019-07-30 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jul 30 20:28:50 UTC 2019

Modified Files:
src/external/gpl3/gcc/dist/libstdc++-v3/config/locale/generic:
time_members.cc
src/external/gpl3/gcc/dist/libstdc++-v3/include/bits:
locale_facets_nonio.h

Log Message:
Add a forward declaration for the specialized __timepunct destructor
that the dragonfly code needs to avoid "instantiation before specialization",
and an empty implementation for the generic code.


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

src/external/gpl3/gcc/dist/libstdc++-v3/config/locale/generic/time_members.cc
cvs rdiff -u -r1.1.1.6 -r1.2 \
src/external/gpl3/gcc/dist/libstdc++-v3/include/bits/locale_facets_nonio.h

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



CVS commit: src/external/gpl3/gcc/dist/libstdc++-v3

2019-07-30 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jul 30 20:28:50 UTC 2019

Modified Files:
src/external/gpl3/gcc/dist/libstdc++-v3/config/locale/generic:
time_members.cc
src/external/gpl3/gcc/dist/libstdc++-v3/include/bits:
locale_facets_nonio.h

Log Message:
Add a forward declaration for the specialized __timepunct destructor
that the dragonfly code needs to avoid "instantiation before specialization",
and an empty implementation for the generic code.


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

src/external/gpl3/gcc/dist/libstdc++-v3/config/locale/generic/time_members.cc
cvs rdiff -u -r1.1.1.6 -r1.2 \
src/external/gpl3/gcc/dist/libstdc++-v3/include/bits/locale_facets_nonio.h

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

Modified files:

Index: src/external/gpl3/gcc/dist/libstdc++-v3/config/locale/generic/time_members.cc
diff -u src/external/gpl3/gcc/dist/libstdc++-v3/config/locale/generic/time_members.cc:1.1.1.5 src/external/gpl3/gcc/dist/libstdc++-v3/config/locale/generic/time_members.cc:1.2
--- src/external/gpl3/gcc/dist/libstdc++-v3/config/locale/generic/time_members.cc:1.1.1.5	Sat Jan 19 05:14:12 2019
+++ src/external/gpl3/gcc/dist/libstdc++-v3/config/locale/generic/time_members.cc	Tue Jul 30 16:28:50 2019
@@ -205,6 +205,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
   _M_data->_M_amonth11 = L"Nov";
   _M_data->_M_amonth12 = L"Dec";
 }
+  template<> 
+__timepunct::~__timepunct()
+   { 
+   }
 #endif
 
 _GLIBCXX_END_NAMESPACE_VERSION

Index: src/external/gpl3/gcc/dist/libstdc++-v3/include/bits/locale_facets_nonio.h
diff -u src/external/gpl3/gcc/dist/libstdc++-v3/include/bits/locale_facets_nonio.h:1.1.1.6 src/external/gpl3/gcc/dist/libstdc++-v3/include/bits/locale_facets_nonio.h:1.2
--- src/external/gpl3/gcc/dist/libstdc++-v3/include/bits/locale_facets_nonio.h:1.1.1.6	Sat Jan 19 05:14:12 2019
+++ src/external/gpl3/gcc/dist/libstdc++-v3/include/bits/locale_facets_nonio.h	Tue Jul 30 16:28:50 2019
@@ -328,6 +328,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
 
 #ifdef _GLIBCXX_USE_WCHAR_T
   template<>
+__timepunct::~__timepunct();
+  template<>
 void
 __timepunct::_M_initialize_timepunct(__c_locale __cloc);
 



CVS commit: src/external/gpl3/gcc/dist/libstdc++-v3/src/c++11

2019-07-30 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jul 30 20:24:59 UTC 2019

Modified Files:
src/external/gpl3/gcc/dist/libstdc++-v3/src/c++11: ctype.cc

Log Message:
There is no specialized constructor for ctype so the
destructor ends up trying to free uninitialized memory for
_M_c_locale_ctype.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.3 -r1.2 \
src/external/gpl3/gcc/dist/libstdc++-v3/src/c++11/ctype.cc

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/gcc/dist/libstdc++-v3/src/c++11/ctype.cc
diff -u src/external/gpl3/gcc/dist/libstdc++-v3/src/c++11/ctype.cc:1.1.1.3 src/external/gpl3/gcc/dist/libstdc++-v3/src/c++11/ctype.cc:1.2
--- src/external/gpl3/gcc/dist/libstdc++-v3/src/c++11/ctype.cc:1.1.1.3	Sat Jan 19 05:14:05 2019
+++ src/external/gpl3/gcc/dist/libstdc++-v3/src/c++11/ctype.cc	Tue Jul 30 16:24:58 2019
@@ -53,7 +53,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
 
   ctype::~ctype()
   {
+#if 0
+// There is no constructor for the char specialization, and
+// _M_c_locale_ctype is uninitialized, found by jemalloc
 _S_destroy_c_locale(_M_c_locale_ctype);
+#endif
 if (_M_del)
   delete[] this->table();
   }



CVS commit: src/external/gpl3/gcc/dist/libstdc++-v3/src/c++11

2019-07-30 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jul 30 20:24:59 UTC 2019

Modified Files:
src/external/gpl3/gcc/dist/libstdc++-v3/src/c++11: ctype.cc

Log Message:
There is no specialized constructor for ctype so the
destructor ends up trying to free uninitialized memory for
_M_c_locale_ctype.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.3 -r1.2 \
src/external/gpl3/gcc/dist/libstdc++-v3/src/c++11/ctype.cc

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



CVS commit: src/external/gpl3/gcc/lib/libstdc++-v3

2019-07-30 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jul 30 20:19:18 UTC 2019

Modified Files:
src/external/gpl3/gcc/lib/libstdc++-v3: Makefile

Log Message:
Arrange so that the Makefile works for both the generic and the dragonfly
locale code.


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/external/gpl3/gcc/lib/libstdc++-v3/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/gcc/lib/libstdc++-v3/Makefile
diff -u src/external/gpl3/gcc/lib/libstdc++-v3/Makefile:1.47 src/external/gpl3/gcc/lib/libstdc++-v3/Makefile:1.48
--- src/external/gpl3/gcc/lib/libstdc++-v3/Makefile:1.47	Tue Apr 23 16:55:53 2019
+++ src/external/gpl3/gcc/lib/libstdc++-v3/Makefile	Tue Jul 30 16:19:18 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.47 2019/04/23 20:55:53 christos Exp $
+#	$NetBSD: Makefile,v 1.48 2019/07/30 20:19:18 christos Exp $
 
 REQUIRETOOLS=	yes
 NOLINT=		# defined
@@ -66,6 +66,12 @@ CXXFLAGS+=	-fno-implicit-templates
 CPPFLAGS+=	-I${DIST}/libstdc++-v3/include
 CPPFLAGS+=	-I${.CURDIR}/arch/${LIBSTDCXX_MACHINE_ARCH}
 CPPFLAGS+=	-D_GLIBCXX_SHARED -DGTHREAD_USE_WEAK -DSUPPORTS_WEAK
+.if ${G_CLOCALE_CC:M*dragonfly*} != ""
+CPPFLAGS+=	-I${CONF}/locale/dragonfly
+LOCALETYPE=	dragonfly
+.else
+LOCALETYPE=	generic
+.endif
 
 # affects profiling; can't switch it off just for profiling easily.
 #CXXFLAGS+=	${G_SECTION_FLAGS}
@@ -92,6 +98,7 @@ COPTS.snprintf_lite.cc += -Wno-stack-pro
 COPTS.cxx11-wlocale-inst.cc +=-Wno-stack-protector
 COPTS.cxx11-locale-inst.cc +=-Wno-stack-protector
 COPTS.cxx11-wlocale-inst.cc +=-Wno-stack-protector
+COPTS.codecvt_members.cc +=-Wno-stack-protector
 COPTS.compatibility-thread-c++0x.cc += -Wno-deprecated-declarations
 COPTS.concept-inst.cc += -fimplicit-templates
 COPTS.collate_members_cow.cc += -fimplicit-templates
@@ -186,7 +193,7 @@ COPTS.${f}.cc+= -fimplicit-templates ${G
 	${DIST}/libstdc++-v3/src/filesystem \
 	${DIST}/libstdc++-v3/libsupc++ \
 	${DIST}/libstdc++-v3/config/os/bsd/netbsd \
-	${CONF}/locale/generic \
+	${CONF}/locale/${LOCALETYPE} \
 	${.CURDIR}/arch/${LIBSTDCXX_MACHINE_ARCH}
 
 ${OBJS}: ${.CURDIR}/arch/${LIBSTDCXX_MACHINE_ARCH}/defs.mk



CVS commit: src/external/gpl3/gcc/lib/libstdc++-v3

2019-07-30 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jul 30 20:19:18 UTC 2019

Modified Files:
src/external/gpl3/gcc/lib/libstdc++-v3: Makefile

Log Message:
Arrange so that the Makefile works for both the generic and the dragonfly
locale code.


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/external/gpl3/gcc/lib/libstdc++-v3/Makefile

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



CVS commit: src/lib/libc/sys

2019-07-30 Thread Michał Górny
Module Name:src
Committed By:   mgorny
Date:   Tue Jul 30 20:18:11 UTC 2019

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

Log Message:
Include pe_lwp member in 'struct ptrace_state'

Reviewed by kamil.


To generate a diff of this commit:
cvs rdiff -u -r1.79 -r1.80 src/lib/libc/sys/ptrace.2

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

Modified files:

Index: src/lib/libc/sys/ptrace.2
diff -u src/lib/libc/sys/ptrace.2:1.79 src/lib/libc/sys/ptrace.2:1.80
--- src/lib/libc/sys/ptrace.2:1.79	Thu Jul 11 03:30:01 2019
+++ src/lib/libc/sys/ptrace.2	Tue Jul 30 20:18:11 2019
@@ -1,4 +1,4 @@
-.\"	$NetBSD: ptrace.2,v 1.79 2019/07/11 03:30:01 mgorny Exp $
+.\"	$NetBSD: ptrace.2,v 1.80 2019/07/30 20:18:11 mgorny Exp $
 .\"
 .\" This file is in the public domain.
 .Dd July 11, 2019
@@ -519,11 +519,14 @@ This request reads the state information
 that stopped the traced process.
 The information is reported in a
 .Vt struct ptrace_state
-defined as:
+that is equivalent to:
 .Bd -literal -offset indent
 typedef struct ptrace_state {
 	int	pe_report_event;
-	pid_t	pe_other_pid;
+	union {
+		pid_t	pe_other_pid;
+		lwpid_t	pe_lwp;
+	};
 } ptrace_state_t;
 .Ed
 .Pp



CVS commit: src/lib/libc/sys

2019-07-30 Thread Michał Górny
Module Name:src
Committed By:   mgorny
Date:   Tue Jul 30 20:18:11 UTC 2019

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

Log Message:
Include pe_lwp member in 'struct ptrace_state'

Reviewed by kamil.


To generate a diff of this commit:
cvs rdiff -u -r1.79 -r1.80 src/lib/libc/sys/ptrace.2

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



CVS commit: [netbsd-9] src

2019-07-30 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Jul 30 16:52:11 UTC 2019

Modified Files:
src/doc [netbsd-9]: LAST_MINUTE README.files
src/external/gpl2/groff/tmac [netbsd-9]: mdoc.local
src/sys/sys [netbsd-9]: param.h
Added Files:
src/doc [netbsd-9]: CHANGES-9.0

Log Message:
Welcome to 9.0_BETA!


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1.2.1 src/doc/CHANGES-9.0
cvs rdiff -u -r1.2 -r1.2.66.1 src/doc/LAST_MINUTE
cvs rdiff -u -r1.5 -r1.5.26.1 src/doc/README.files
cvs rdiff -u -r1.5 -r1.5.6.1 src/external/gpl2/groff/tmac/mdoc.local
cvs rdiff -u -r1.599 -r1.599.2.1 src/sys/sys/param.h

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

Modified files:

Index: src/doc/LAST_MINUTE
diff -u src/doc/LAST_MINUTE:1.2 src/doc/LAST_MINUTE:1.2.66.1
--- src/doc/LAST_MINUTE:1.2	Mon Sep 23 07:52:18 2002
+++ src/doc/LAST_MINUTE	Tue Jul 30 16:52:10 2019
@@ -1,7 +1,7 @@
-#	$NetBSD: LAST_MINUTE,v 1.2 2002/09/23 07:52:18 lukem Exp $
+#	$NetBSD: LAST_MINUTE,v 1.2.66.1 2019/07/30 16:52:10 martin Exp $
 
-This file contains important information on the NetBSD XXX.XXX release that
+This file contains important information on the NetBSD 9.0 release that
 did not make it into the main documentation.
 
 [all]
-	Nothing pertinent; this is NetBSD-current...
+	Nothing pertinent

Index: src/doc/README.files
diff -u src/doc/README.files:1.5 src/doc/README.files:1.5.26.1
--- src/doc/README.files:1.5	Thu Sep  6 22:20:38 2012
+++ src/doc/README.files	Tue Jul 30 16:52:10 2019
@@ -1,8 +1,11 @@
-#	$NetBSD: README.files,v 1.5 2012/09/06 22:20:38 riz Exp $
+#	$NetBSD: README.files,v 1.5.26.1 2019/07/30 16:52:10 martin Exp $
 
 What's in this directory:
 
-CHANGES		Changes between the XXX.XXX-1 and XXX.XXX releases.
+CHANGES		Changes between the 8.0 and 9.0 releases.
+
+CHANGES-9.0	Changes between the creation of the netbsd-9 branch and
+		the 9.0 release.
 
 CHANGES.prev	Changes in previous NetBSD releases.
 
@@ -26,7 +29,7 @@ source/patches/	Post-release source code
 
 In addition to the files and directories listed above, there is one
 directory per architecture, for each of the architectures for which
-NetBSD XXX.XXX has a binary distribution.  The contents of each
+NetBSD 9.0 has a binary distribution.  The contents of each
 architecture's directory are described in an "INSTALL" file found in
 that directory.
 

Index: src/external/gpl2/groff/tmac/mdoc.local
diff -u src/external/gpl2/groff/tmac/mdoc.local:1.5 src/external/gpl2/groff/tmac/mdoc.local:1.5.6.1
--- src/external/gpl2/groff/tmac/mdoc.local:1.5	Sun Feb 25 12:46:49 2018
+++ src/external/gpl2/groff/tmac/mdoc.local	Tue Jul 30 16:52:10 2019
@@ -1,4 +1,4 @@
-.\" $NetBSD: mdoc.local,v 1.5 2018/02/25 12:46:49 uwe Exp $
+.\" $NetBSD: mdoc.local,v 1.5.6.1 2019/07/30 16:52:10 martin Exp $
 .\"
 .\" Copyright (c) 2003, 2004 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -44,9 +44,9 @@
 .as doc-str-St--ieee1275-94 " (\*[Lq]\*[doc-Tn-font-size]Open Firmware\*[doc-str-St]\*[Rq])
 .
 .\" Default .Os value
-.ds doc-operating-system NetBSD\~8.0
+.ds doc-operating-system NetBSD\~9.0_BETA
 .\" Default footer operating system value
-.ds doc-default-operating-system NetBSD\~8.0
+.ds doc-default-operating-system NetBSD\~9.0_BETA
 .\" Other known versions, not yet in groff distribution
 .ds doc-operating-system-NetBSD-1.3.3  1.3.3
 .ds doc-operating-system-NetBSD-1.6.3  1.6.3

Index: src/sys/sys/param.h
diff -u src/sys/sys/param.h:1.599 src/sys/sys/param.h:1.599.2.1
--- src/sys/sys/param.h:1.599	Wed Jul 17 03:30:31 2019
+++ src/sys/sys/param.h	Tue Jul 30 16:52:10 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: param.h,v 1.599 2019/07/17 03:30:31 msaitoh Exp $	*/
+/*	$NetBSD: param.h,v 1.599.2.1 2019/07/30 16:52:10 martin Exp $	*/
 
 /*-
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -67,7 +67,7 @@
  *	2.99.9		(299000900)
  */
 
-#define	__NetBSD_Version__	899005100	/* NetBSD 8.99.51 */
+#define	__NetBSD_Version__	9	/* NetBSD 9.0_BETA */
 
 #define __NetBSD_Prereq__(M,m,p) (M) * 1) + \
 (m) * 100) + (p) * 100) <= __NetBSD_Version__)

Added files:

Index: src/doc/CHANGES-9.0
diff -u /dev/null src/doc/CHANGES-9.0:1.1.2.1
--- /dev/null	Tue Jul 30 16:52:11 2019
+++ src/doc/CHANGES-9.0	Tue Jul 30 16:52:10 2019
@@ -0,0 +1,14 @@
+# $NetBSD: CHANGES-9.0,v 1.1.2.1 2019/07/30 16:52:10 martin Exp $
+
+A complete list of changes from the initial NetBSD 9.0 branch on 2019-07-30
+until the 9.0 release:
+
+doc/CHANGES-9.0 patched by hand
+doc/LAST_MINUTE patched by hand
+doc/README.filespatched by hand
+external/gpl2/groff/tmac/mdoc.local patched by hand
+sys/sys/param.h patched by hand
+
+	Welcome to 9.0_BETA!
+
+



CVS commit: [netbsd-9] src

2019-07-30 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Jul 30 16:52:11 UTC 2019

Modified Files:
src/doc [netbsd-9]: LAST_MINUTE README.files
src/external/gpl2/groff/tmac [netbsd-9]: mdoc.local
src/sys/sys [netbsd-9]: param.h
Added Files:
src/doc [netbsd-9]: CHANGES-9.0

Log Message:
Welcome to 9.0_BETA!


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1.2.1 src/doc/CHANGES-9.0
cvs rdiff -u -r1.2 -r1.2.66.1 src/doc/LAST_MINUTE
cvs rdiff -u -r1.5 -r1.5.26.1 src/doc/README.files
cvs rdiff -u -r1.5 -r1.5.6.1 src/external/gpl2/groff/tmac/mdoc.local
cvs rdiff -u -r1.599 -r1.599.2.1 src/sys/sys/param.h

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



CVS commit: src/sys/dev/ic

2019-07-30 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Jul 30 16:49:21 UTC 2019

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

Log Message:
Avoid undefined behavior when setting multicast address. found by kUBSan.


To generate a diff of this commit:
cvs rdiff -u -r1.197 -r1.198 src/sys/dev/ic/tulip.c

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

Modified files:

Index: src/sys/dev/ic/tulip.c
diff -u src/sys/dev/ic/tulip.c:1.197 src/sys/dev/ic/tulip.c:1.198
--- src/sys/dev/ic/tulip.c:1.197	Tue May 28 08:59:34 2019
+++ src/sys/dev/ic/tulip.c	Tue Jul 30 16:49:20 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: tulip.c,v 1.197 2019/05/28 08:59:34 msaitoh Exp $	*/
+/*	$NetBSD: tulip.c,v 1.198 2019/07/30 16:49:20 msaitoh Exp $	*/
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2002 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tulip.c,v 1.197 2019/05/28 08:59:34 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tulip.c,v 1.198 2019/07/30 16:49:20 msaitoh Exp $");
 
 
 #include 
@@ -2943,7 +2943,7 @@ tlp_al981_filter_setup(struct tulip_soft
 		}
 
 		hash = ether_crc32_le(enm->enm_addrlo, ETHER_ADDR_LEN) & 0x3f;
-		mchash[hash >> 5] |= 1 << (hash & 0x1f);
+		mchash[hash >> 5] |= __BIT(hash & 0x1f);
 		ETHER_NEXT_MULTI(step, enm);
 	}
 	ETHER_UNLOCK(ec);



CVS commit: src/sys/dev/ic

2019-07-30 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Jul 30 16:49:21 UTC 2019

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

Log Message:
Avoid undefined behavior when setting multicast address. found by kUBSan.


To generate a diff of this commit:
cvs rdiff -u -r1.197 -r1.198 src/sys/dev/ic/tulip.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

2019-07-30 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Jul 30 16:07:04 UTC 2019

Modified Files:
src/sys/dev/pci: if_etreg.h

Log Message:
Avoid undefined behavior when reset the chip. found by kUBSan.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/pci/if_etreg.h

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



CVS commit: src/sys/dev/pci

2019-07-30 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Jul 30 16:07:04 UTC 2019

Modified Files:
src/sys/dev/pci: if_etreg.h

Log Message:
Avoid undefined behavior when reset the chip. found by kUBSan.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/pci/if_etreg.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/if_etreg.h
diff -u src/sys/dev/pci/if_etreg.h:1.1 src/sys/dev/pci/if_etreg.h:1.2
--- src/sys/dev/pci/if_etreg.h:1.1	Sat Nov 13 00:47:25 2010
+++ src/sys/dev/pci/if_etreg.h	Tue Jul 30 16:07:04 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_etreg.h,v 1.1 2010/11/13 00:47:25 jnemeth Exp $	*/
+/*	$NetBSD: if_etreg.h,v 1.2 2019/07/30 16:07:04 msaitoh Exp $	*/
 /*	$OpenBSD: if_etreg.h,v 1.3 2008/06/08 06:18:07 jsg Exp $	*/
 
 /*
@@ -235,7 +235,7 @@
 #define ET_MAC_CFG1_RST_TXMC		(1 << 18)
 #define ET_MAC_CFG1_RST_RXMC		(1 << 19)
 #define ET_MAC_CFG1_SIM_RST		(1 << 30)
-#define ET_MAC_CFG1_SOFT_RST		(1 << 31)
+#define ET_MAC_CFG1_SOFT_RST		__BIT(31)
 
 #define ET_MAC_CFG2			0x5004
 #define ET_MAC_CFG2_FDX			(1 << 0)



CVS commit: src

2019-07-30 Thread Martin Husemann
rotect
-		host during early stages of startup. [sevan 20190410]
-	dhcpcd(8): Import dhcpcd-7.2.0. [roy 20190418]
-	evbarm: Add support for Amlogic GXL family SoCs. [jmcneill 20190419]
-	OpenSSH: Import 8.0. [christos 20190420]
-	evbarm: Add support for boot configuration (efiboot.plist) and
-		applying device tree overlays to efiboot. [thorpej 20190421]
-	libpthread(3): Import C11 thread support library. [kamil 20190424]
-	dhcpcd(8): Import dhcpcd-7.2.1. [roy 20190426]
-	carp(4): Enabled by default in GENERIC kernel config of all tier 1 &
-		most tier 2 ports. See system specific config otherwise.
-		[sevan 20190426]
-	veriexec(4): Enabled by default in GENERIC kernel config of all tier 1
-		& most tier 2 ports. See system specific config otherwise.
-		[sevan 20190426]
-	bufq_priocscan(9): Enabled by default in GENERIC kernel config of all
-		tier 1 & most tier 2 ports. See system specific config
-		otherwise. [sevan 20190426]
-	rktsadc(4): New thermal sensor driver for RockChip RK3328 and RK3399
-		on-CPU sensors. [mrg 20190426]
-	bind: Import version 9.14.1. [christos 20190427]
-	acpi(4): Updated ACPICA to 20190405. [christos 20190428]
-	dhcpcd(8): Import dhcpcd-7.2.2. [roy 20190504]
-	siginfo(2): Ship with MI syscall information of a debugged process for
-		SIGTRAP and si_code TRAP_SCE/TRAP_SCX. [kamil 20190506]
-	installboot(8): Add support for NetBSD/evbarm boards that use
-		u-boot for bootstrap. [thorpej 20190506]
-	ifmedia(4): Extend Ethernet's ifmedia word's subword up to 255.
-		[msaitoh 20190517]
-	mount_9p(8): Initial support for 9P2000.u. [ozaki-r 20190517]
-	file(1): Upgraded to 5.37. [christos 20190522]
-	mount_portal(8): in portal.conf # only introduces a comment at
-		start of line, or after whitespace (start word). [kre 20190523]
-	dts: Import dts files from Linux 5.1.4. [jmcneill 20190525]
-	nsd: Import 4.1.27. [christos 20190525]
-	unbound(8): Import 1.9.1. [christos 20190525]
-	gdb(1): Updated to 8.3. [christos 20190528]
-	evbarm: Add support for the Banana Pi BPI-P2 Zero. [thorpej 20190604]
-	mac68k: Switch page size to 8KB. [jklos 20190606]
-	OpenSSL: Imported 1.1.1c. [christos 20190609]
-	gpt(8): added uuid subcommand to generate new UUIDS.
-		[jnemeth 20190624]
-	dhcpcd(8): Import dhcpcd-7.2.3. [roy 20190626]
-	tzcode: Updated to 2019b. [christos 20190703]
-	piixpm(4): Improve AMD chipset support. [msaitoh 20190713]
-	network: Implement VLAN hardware filter. [msaitoh 20190717]
-	ixg(4),ixv(4): Add VLAN hardware filter support. [msaitoh 20190717]
-	resolvconf(8): Import openresolv-3.9.1. [roy 20190717]
-	amdsmn(4),amdzentemp(4): Add suppor for Ryzen 2xxx and 3xxx.
-		[msaitoh 20190718]
-	mac68k: Enable DMA transfer for SCSI adapters found on 660/840AV.
-		Submitted by Michael Zucca via PR port-mac68k/24883.
-		[rin 20190723]
-	dhcpcd(8): Import dhcpcd-8.0.0. [roy 20190724]
-	tar(1): MKBSDTAR now defaults to yes. [roy 20190724]
-	libarchive: Import libarchive-3.4.0. [joerg 20090724]
-	dhcpcd(8): Import dhcpcd-8.0.1. [roy 20190725]
-	mac68k: Add genfb(4) framebuffer driver. [rin 20190726]
-	dhcpcd(8): Import dhcpcd-8.0.2. [roy 20190730]
+Changes from NetBSD 9.0 to NetBSD 10.0:

Index: src/doc/CHANGES.prev
diff -u src/doc/CHANGES.prev:1.143 src/doc/CHANGES.prev:1.144
--- src/doc/CHANGES.prev:1.143	Fri Jul 26 21:41:59 2019
+++ src/doc/CHANGES.prev	Tue Jul 30 15:56:53 2019
@@ -1,4 +1,4 @@
-LIST OF CHANGES FROM PREVIOUS RELEASES:			<$Revision: 1.143 $>
+LIST OF CHANGES FROM PREVIOUS RELEASES:			<$Revision: 1.144 $>
 
 
 Changes from 386bsd 0.1 + patchkit 0.2.2 to NetBSD 0.8:
@@ -12231,3 +12231,399 @@ Changes from NetBSD 7.0 to NetBSD 8.0:
 	amd64: Backport SMAP. [maxv 20180414]
 	x86: Backport SpectreV2 mitigations (hardware). [maxv 20180609]
 	x86: Backport SpectreV4 mitigations. [maxv 20180609]
+
+Changes from NetBSD 8.0 to NetBSD 9.0:
+	byacc: Update to 20170430. [christos 20170605]
+	vax: Add support for VAXstation 4000 TURBOchannel. [flxd 20170609]
+	wsbell(4): Added console bell support for all speaker devices, not
+		only those attached at pcppi. [nat 20170612]
+	bind: Import version 9.10.5-P1. [christos 20170615]
+	dts: Import dts files from Linux 4.11.5. [jmcneill 20170615]
+	amd64: Support 16TB of PA, and 32TB of kernel VA on the architecture
+		side. [maxv 20170617]
+	expat: Import 2.2.1 (security fixes). [christos 20170617]
+	evbarm: Add support for Allwinner H3 SoC. [jmcneill 20170628]
+	bind: Import version 9.10.5-P2. [christos 20170630]
+	sunxiemac(4): Add support for Allwinner Gigabit Ethernet (EMAC).
+		[jmcneill 20170701]
+	fsdb(8): Add "saveblks" command. [mrg 20170804]
+	wbsio(4): Add support for Winbond W83627DHG-P, W83627SF, W83627UHG,
+		W83667HGB, W83687THF, W83697UG,	Nuvoton NCT5104D, NCT6775,
+		NCT6779, NCT6791, NCT6792 and NCT6793. [msaitoh 20170707]
+	evbarm: Add support for Allwinner A83T SoC. [jmcneill 20170707]
+	MAKEDEV(8): Regenerate, documenting lua, dk, plcom, wmcom, hdmicec, mfi,
+		nvme, nvme ns, tpm, and dtrace devices. [s

CVS commit: src

2019-07-30 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Jul 30 15:56:53 UTC 2019

Modified Files:
src/doc: BRANCHES CHANGES CHANGES.prev
src/external/gpl2/groff/tmac: mdoc.local
src/sys/sys: param.h

Log Message:
Welcome to NetBSD 9.99.1!


To generate a diff of this commit:
cvs rdiff -u -r1.350 -r1.351 src/doc/BRANCHES
cvs rdiff -u -r1.2563 -r1.2564 src/doc/CHANGES
cvs rdiff -u -r1.143 -r1.144 src/doc/CHANGES.prev
cvs rdiff -u -r1.5 -r1.6 src/external/gpl2/groff/tmac/mdoc.local
cvs rdiff -u -r1.599 -r1.600 src/sys/sys/param.h

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



CVS commit: src/sys/dev/pci

2019-07-30 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Jul 30 15:50:08 UTC 2019

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

Log Message:
- Avoid undefined behavior in bge_setmulti(). found by kUBSan.
- Avoid undefined behavior when setting the MAC address in bge_init().
  found by kUBSan.


To generate a diff of this commit:
cvs rdiff -u -r1.335 -r1.336 src/sys/dev/pci/if_bge.c

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

Modified files:

Index: src/sys/dev/pci/if_bge.c
diff -u src/sys/dev/pci/if_bge.c:1.335 src/sys/dev/pci/if_bge.c:1.336
--- src/sys/dev/pci/if_bge.c:1.335	Tue Jul  9 08:46:58 2019
+++ src/sys/dev/pci/if_bge.c	Tue Jul 30 15:50:08 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_bge.c,v 1.335 2019/07/09 08:46:58 msaitoh Exp $	*/
+/*	$NetBSD: if_bge.c,v 1.336 2019/07/30 15:50:08 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 2001 Wind River Systems
@@ -79,7 +79,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.335 2019/07/09 08:46:58 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.336 2019/07/30 15:50:08 msaitoh Exp $");
 
 #include 
 #include 
@@ -1827,7 +1827,7 @@ bge_setmulti(struct bge_softc *sc)
 		/* Just want the 7 least-significant bits. */
 		h &= 0x7f;
 
-		hashes[(h & 0x60) >> 5] |= 1 << (h & 0x1F);
+		hashes[(h & 0x60) >> 5] |= 1U << (h & 0x1F);
 		ETHER_NEXT_MULTI(step, enm);
 	}
 	ETHER_UNLOCK(ec);
@@ -5530,7 +5530,8 @@ bge_init(struct ifnet *ifp)
 	/* Load our MAC address. */
 	m = (const uint16_t *)&(CLLADDR(ifp->if_sadl)[0]);
 	CSR_WRITE_4(sc, BGE_MAC_ADDR1_LO, htons(m[0]));
-	CSR_WRITE_4(sc, BGE_MAC_ADDR1_HI, (htons(m[1]) << 16) | htons(m[2]));
+	CSR_WRITE_4(sc, BGE_MAC_ADDR1_HI,
+	((uint32_t)htons(m[1]) << 16) | htons(m[2]));
 
 	/* Enable or disable promiscuous mode as needed. */
 	if (ifp->if_flags & IFF_PROMISC)



CVS commit: src/sys/dev/pci

2019-07-30 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Jul 30 15:50:08 UTC 2019

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

Log Message:
- Avoid undefined behavior in bge_setmulti(). found by kUBSan.
- Avoid undefined behavior when setting the MAC address in bge_init().
  found by kUBSan.


To generate a diff of this commit:
cvs rdiff -u -r1.335 -r1.336 src/sys/dev/pci/if_bge.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/rasops

2019-07-30 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Tue Jul 30 15:29:40 UTC 2019

Modified Files:
src/sys/dev/rasops: rasops.c rasops1.c rasops_bitops.h rasops_putchar.h
rasops_putchar_aa.h rasops_putchar_width.h

Log Message:
Try to improve performance when shadow framebuffer is present;
Use block copy from shadow fb to real fb, instead of repeating
the same operations to two fb's.


To generate a diff of this commit:
cvs rdiff -u -r1.100 -r1.101 src/sys/dev/rasops/rasops.c
cvs rdiff -u -r1.30 -r1.31 src/sys/dev/rasops/rasops1.c
cvs rdiff -u -r1.17 -r1.18 src/sys/dev/rasops/rasops_bitops.h
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/rasops/rasops_putchar.h
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/rasops/rasops_putchar_aa.h
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/rasops/rasops_putchar_width.h

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



CVS commit: src/sys/dev/rasops

2019-07-30 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Tue Jul 30 15:29:40 UTC 2019

Modified Files:
src/sys/dev/rasops: rasops.c rasops1.c rasops_bitops.h rasops_putchar.h
rasops_putchar_aa.h rasops_putchar_width.h

Log Message:
Try to improve performance when shadow framebuffer is present;
Use block copy from shadow fb to real fb, instead of repeating
the same operations to two fb's.


To generate a diff of this commit:
cvs rdiff -u -r1.100 -r1.101 src/sys/dev/rasops/rasops.c
cvs rdiff -u -r1.30 -r1.31 src/sys/dev/rasops/rasops1.c
cvs rdiff -u -r1.17 -r1.18 src/sys/dev/rasops/rasops_bitops.h
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/rasops/rasops_putchar.h
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/rasops/rasops_putchar_aa.h
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/rasops/rasops_putchar_width.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/rasops/rasops.c
diff -u src/sys/dev/rasops/rasops.c:1.100 src/sys/dev/rasops/rasops.c:1.101
--- src/sys/dev/rasops/rasops.c:1.100	Tue Jul 30 14:41:10 2019
+++ src/sys/dev/rasops/rasops.c	Tue Jul 30 15:29:40 2019
@@ -1,4 +1,4 @@
-/*	 $NetBSD: rasops.c,v 1.100 2019/07/30 14:41:10 rin Exp $	*/
+/*	 $NetBSD: rasops.c,v 1.101 2019/07/30 15:29:40 rin Exp $	*/
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.100 2019/07/30 14:41:10 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.101 2019/07/30 15:29:40 rin Exp $");
 
 #include "opt_rasops.h"
 #include "rasops_glue.h"
@@ -950,8 +950,8 @@ void
 rasops_eraserows(void *cookie, int row, int num, long attr)
 {
 	struct rasops_info *ri = (struct rasops_info *)cookie;
-	uint32_t *dp, *hp, clr;
-	int n, cnt, delta;
+	uint32_t *rp, *dp, *hp, clr;
+	int n, cnt;
 
 	hp = NULL;	/* XXX GCC */
 
@@ -979,29 +979,26 @@ rasops_eraserows(void *cookie, int row, 
 	if (num == ri->ri_rows && (ri->ri_flg & RI_FULLCLEAR) != 0) {
 		n = ri->ri_stride >> 2;
 		num = ri->ri_height;
-		dp = (uint32_t *)ri->ri_origbits;
+		rp = (uint32_t *)ri->ri_origbits;
 		if (ri->ri_hwbits)
 			hp = (uint32_t *)ri->ri_hworigbits;
-		delta = 0;
 	} else {
 		n = ri->ri_emustride >> 2;
 		num *= ri->ri_font->fontheight;
-		dp = (uint32_t *)(ri->ri_bits + row * ri->ri_yscale);
+		rp = (uint32_t *)(ri->ri_bits + row * ri->ri_yscale);
 		if (ri->ri_hwbits)
-			hp = (uint32_t *)(ri->ri_hwbits + row *
-			ri->ri_yscale);
-		delta = ri->ri_delta;
+			hp = (uint32_t *)(ri->ri_hwbits + row * ri->ri_yscale);
 	}
 
 	while (num--) {
-		for (cnt = n; cnt; cnt--) {
+		dp = rp;
+		for (cnt = n; cnt; cnt--)
 			*dp++ = clr;
-			if (ri->ri_hwbits)
-*hp++ = clr;
+		if (ri->ri_hwbits) {
+			memcpy(hp, rp, n << 2);
+			DELTA(hp, ri->ri_stride, uint32_t *);
 		}
-		DELTA(dp, delta, uint32_t *);
-		if (ri->ri_hwbits)
-			DELTA(hp, delta, uint32_t *);
+		DELTA(rp, ri->ri_stride, uint32_t *);
 	}
 }
 
@@ -1015,9 +1012,9 @@ rasops_do_cursor(struct rasops_info *ri)
 	int full, height, cnt, slop1, slop2, row, col;
 	uint32_t tmp32, msk1, msk2;
 	uint8_t tmp8;
-	uint8_t *dp, *rp, *hrp, *hp;
+	uint8_t *dp, *rp, *hp;
 
-	hrp = hp = NULL;	/* XXX GCC */
+	hp = NULL;	/* XXX GCC */
 
 #if NRASOPS_ROTATION > 0
 	if (ri->ri_flg & RI_ROTATE_MASK) {
@@ -1042,8 +1039,7 @@ rasops_do_cursor(struct rasops_info *ri)
 
 	rp = ri->ri_bits + row * ri->ri_yscale + col * ri->ri_xscale;
 	if (ri->ri_hwbits)
-		hrp = ri->ri_hwbits + row * ri->ri_yscale + col
-		* ri->ri_xscale;
+		hp = ri->ri_hwbits + row * ri->ri_yscale + col * ri->ri_xscale;
 	height = ri->ri_font->fontheight;
 
 	/*
@@ -1060,8 +1056,8 @@ rasops_do_cursor(struct rasops_info *ri)
 			rp += ri->ri_stride;
 
 			if (ri->ri_hwbits) {
-*hrp = tmp8;
-hrp += ri->ri_stride;
+*hp = tmp8;
+hp += ri->ri_stride;
 			}
 		}
 		return;
@@ -1078,45 +1074,37 @@ rasops_do_cursor(struct rasops_info *ri)
 	full = (ri->ri_xscale - slop1 /* - slop2 */) >> 2;
 
 	rp = (uint8_t *)((uintptr_t)rp & ~3);
-	hrp = (uint8_t *)((uintptr_t)hrp & ~3);
+	hp = (uint8_t *)((uintptr_t)hp & ~3);
 
 	msk1 = !slop1 ? 0 : be32toh(0xU >> (32 - (8 * slop1)));
 	msk2 = !slop2 ? 0 : be32toh(0xU << (32 - (8 * slop2)));
 
 	while (height--) {
 		dp = rp;
-		rp += ri->ri_stride;
-		if (ri->ri_hwbits) {
-			hp = hrp;
-			hrp += ri->ri_stride;
-		}
 
 		if (slop1) {
 			tmp32 = *(uint32_t *)dp ^ msk1;
 			*(uint32_t *)dp = tmp32;
 			dp += 4;
-			if (ri->ri_hwbits) {
-*(uint32_t *)hp = tmp32;
-hp += 4;
-			}
 		}
 
 		for (cnt = full; cnt; cnt--) {
 			tmp32 = ~*(uint32_t *)dp;
 			*(uint32_t *)dp = tmp32;
 			dp += 4;
-			if (ri->ri_hwbits) {
-*(uint32_t *)hp = tmp32;
-hp += 4;
-			}
 		}
 
 		if (slop2) {
 			tmp32 = *(uint32_t *)dp ^ msk2;
 			*(uint32_t *)dp = tmp32;
-			if (ri->ri_hwbits)
-*(uint32_t *)hp = tmp32;
 		}
+
+		if (ri->ri_hwbits) {
+			memcpy(hp, rp, ((slop1 != 0) + full +
+			(slop2 != 0)) << 2);
+			hp += 

CVS commit: src/sys/dev/rasops

2019-07-30 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Tue Jul 30 15:23:23 UTC 2019

Modified Files:
src/sys/dev/rasops: rasops24.c

Log Message:
Support shadow framebuffer for 24bpp screen.


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/sys/dev/rasops/rasops24.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/rasops

2019-07-30 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Tue Jul 30 15:23:23 UTC 2019

Modified Files:
src/sys/dev/rasops: rasops24.c

Log Message:
Support shadow framebuffer for 24bpp screen.


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/sys/dev/rasops/rasops24.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/rasops/rasops24.c
diff -u src/sys/dev/rasops/rasops24.c:1.38 src/sys/dev/rasops/rasops24.c:1.39
--- src/sys/dev/rasops/rasops24.c:1.38	Mon Jul 29 16:17:29 2019
+++ src/sys/dev/rasops/rasops24.c	Tue Jul 30 15:23:23 2019
@@ -1,4 +1,4 @@
-/* 	$NetBSD: rasops24.c,v 1.38 2019/07/29 16:17:29 rin Exp $	*/
+/* 	$NetBSD: rasops24.c,v 1.39 2019/07/30 15:23:23 rin Exp $	*/
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rasops24.c,v 1.38 2019/07/29 16:17:29 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rasops24.c,v 1.39 2019/07/30 15:23:23 rin Exp $");
 
 #include "opt_rasops.h"
 
@@ -188,9 +188,11 @@ rasops24_makestamp(struct rasops_info *r
 static void
 rasops24_eraserows(void *cookie, int row, int num, long attr)
 {
-	int n9, n3, n1, cnt, stride, delta;
-	uint32_t *dp, clr, xstamp[3];
-	struct rasops_info *ri;
+	struct rasops_info *ri = (struct rasops_info *)cookie;
+	int n9, n3, n1, cnt, stride;
+	uint32_t *rp, *dp, *hp, clr, xstamp[3];
+
+	hp = NULL;	/* XXX GCC */
 
 	/*
 	 * If the color is gray, we can cheat and use the generic routines
@@ -201,15 +203,13 @@ rasops24_eraserows(void *cookie, int row
 		return;
 	}
 
-	ri = (struct rasops_info *)cookie;
-
 #ifdef RASOPS_CLIPPING
 	if (row < 0) {
 		num += row;
 		row = 0;
 	}
 
-	if ((row + num) > ri->ri_rows)
+	if (row + num > ri->ri_rows)
 		num = ri->ri_rows - row;
 
 	if (num <= 0)
@@ -219,7 +219,7 @@ rasops24_eraserows(void *cookie, int row
 	clr = ri->ri_devcmap[((uint32_t)attr >> 16) & 0xf] & 0xff;
 	xstamp[0] = (clr <<  8) | (clr >> 16);
 	xstamp[1] = (clr << 16) | (clr >>  8);
-	xstamp[2] = (clr << 24) | clr;
+	xstamp[2] = (clr << 24) |  clr;
 
 #if BYTE_ORDER == LITTLE_ENDIAN
 	if ((ri->ri_flg & RI_BSWAP) == 0) {
@@ -240,46 +240,45 @@ rasops24_eraserows(void *cookie, int row
 	if (num == ri->ri_rows && (ri->ri_flg & RI_FULLCLEAR) != 0) {
 		stride = ri->ri_stride;
 		num = ri->ri_height;
-		dp = (uint32_t *)ri->ri_origbits;
-		delta = 0;
+		rp = (uint32_t *)ri->ri_origbits;
+		if (ri->ri_hwbits)
+			hp = (uint32_t *)ri->ri_hworigbits;
 	} else {
 		stride = ri->ri_emustride;
 		num *= ri->ri_font->fontheight;
-		dp = (uint32_t *)(ri->ri_bits + row * ri->ri_yscale);
-		delta = ri->ri_delta;
+		rp = (uint32_t *)(ri->ri_bits + row * ri->ri_yscale);
+		if (ri->ri_hwbits)
+			hp = (uint32_t *)(ri->ri_hwbits + row * ri->ri_yscale);
 	}
 
-	n9 = stride / 36;
-	cnt = (n9 << 5) + (n9 << 2); /* (32*n9) + (4*n9) */
-	n3 = (stride - cnt) / 12;
-	cnt += (n3 << 3) + (n3 << 2); /* (8*n3) + (4*n3) */
-	n1 = (stride - cnt) >> 2;
+	n9 = stride / (4 * 9);
+	cnt = n9 * (4 * 9);
+	n3 = (stride - cnt) / (4 * 3);
+	cnt += n3 * (4 * 3);
+	n1 = (stride - cnt) / 4;
 
 	while (num--) {
+		dp = rp;
 		for (cnt = n9; cnt; cnt--) {
-			dp[0] = xstamp[0];
-			dp[1] = xstamp[1];
-			dp[2] = xstamp[2];
-			dp[3] = xstamp[0];
-			dp[4] = xstamp[1];
-			dp[5] = xstamp[2];
-			dp[6] = xstamp[0];
-			dp[7] = xstamp[1];
-			dp[8] = xstamp[2];
+			dp[0] = xstamp[0]; dp[1] = xstamp[1]; dp[2] = xstamp[2];
+			dp[3] = xstamp[0]; dp[4] = xstamp[1]; dp[5] = xstamp[2];
+			dp[6] = xstamp[0]; dp[7] = xstamp[1]; dp[8] = xstamp[2];
 			dp += 9;
 		}
 
 		for (cnt = n3; cnt; cnt--) {
-			dp[0] = xstamp[0];
-			dp[1] = xstamp[1];
-			dp[2] = xstamp[2];
+			dp[0] = xstamp[0]; dp[1] = xstamp[1]; dp[2] = xstamp[2];
 			dp += 3;
 		}
 
 		for (cnt = 0; cnt < n1; cnt++)
 			*dp++ = xstamp[cnt];
 
-		DELTA(dp, delta, uint32_t *);
+		if (ri->ri_hwbits) {
+			memcpy(hp, rp, stride);
+			DELTA(hp, ri->ri_stride, uint32_t *);
+		}
+		DELTA(rp, ri->ri_stride, uint32_t *);
 	}
 }
 
@@ -289,10 +288,12 @@ rasops24_eraserows(void *cookie, int row
 static void
 rasops24_erasecols(void *cookie, int row, int col, int num, long attr)
 {
-	int n12, n4, height, cnt, slop, clr, xstamp[3];
-	struct rasops_info *ri;
-	uint32_t *dp, *rp;
-	uint8_t *dbp;
+	struct rasops_info *ri = (struct rasops_info *)cookie;
+	int n12, n4, height, cnt, slop1, slop2, clr, xstamp[3];
+	uint32_t *dp;
+	uint8_t *rp, *hp, *dbp;
+
+	hp = NULL;	/* XXX GCC */
 
 	/*
 	 * If the color is gray, we can cheat and use the generic routines
@@ -303,8 +304,6 @@ rasops24_erasecols(void *cookie, int row
 		return;
 	}
 
-	ri = (struct rasops_info *)cookie;
-
 #ifdef RASOPS_CLIPPING
 	/* Catches 'row < 0' case too */
 	if ((unsigned)row >= (unsigned)ri->ri_rows)
@@ -315,21 +314,24 @@ rasops24_erasecols(void *cookie, int row
 		col = 0;
 	}
 
-	if ((col + num) > ri->ri_cols)
+	if (col + num > ri->ri_cols)
 		num = ri->ri_cols - col;
 
 	if (num <= 0)
 	

CVS commit: src/doc

2019-07-30 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Tue Jul 30 14:57:06 UTC 2019

Modified Files:
src/doc: 3RDPARTY CHANGES

Log Message:
Update libarchive entry for 3.4.0 import.


To generate a diff of this commit:
cvs rdiff -u -r1.1639 -r1.1640 src/doc/3RDPARTY
cvs rdiff -u -r1.2562 -r1.2563 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/doc

2019-07-30 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Tue Jul 30 14:57:06 UTC 2019

Modified Files:
src/doc: 3RDPARTY CHANGES

Log Message:
Update libarchive entry for 3.4.0 import.


To generate a diff of this commit:
cvs rdiff -u -r1.1639 -r1.1640 src/doc/3RDPARTY
cvs rdiff -u -r1.2562 -r1.2563 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/3RDPARTY
diff -u src/doc/3RDPARTY:1.1639 src/doc/3RDPARTY:1.1640
--- src/doc/3RDPARTY:1.1639	Tue Jul 30 10:28:28 2019
+++ src/doc/3RDPARTY	Tue Jul 30 14:57:06 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1639 2019/07/30 10:28:28 roy Exp $
+#	$NetBSD: 3RDPARTY,v 1.1640 2019/07/30 14:57:06 joerg Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -700,12 +700,12 @@ for importation.  Run ./configure before
 Talk to mrg before importing any new version.
 
 Package:	libarchive
-Version:	3.3.2pre
-Current Vers:	3.3.2
+Version:	3.4.0
+Current Vers:	3.4.0
 Maintainer:	kient...@freebsd.org, jo...@netbsd.org
-Archive Site:	https://github.com/libarchive/libarchive/downloads
+Archive Site:	https://github.com/libarchive/libarchive/releases
 Home Page: 	http://www.libarchive.org
-Date:		2019-01-09
+Date:		2019-06-13
 Responsible:	joerg
 License:	BSD (2-clause)
 Location:	external/bsd/libarchive/dist

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.2562 src/doc/CHANGES:1.2563
--- src/doc/CHANGES:1.2562	Tue Jul 30 10:28:28 2019
+++ src/doc/CHANGES	Tue Jul 30 14:57:06 2019
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2562 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2563 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -413,6 +413,7 @@ Changes from NetBSD 8.0 to NetBSD 9.0:
 		[rin 20190723]
 	dhcpcd(8): Import dhcpcd-8.0.0. [roy 20190724]
 	tar(1): MKBSDTAR now defaults to yes. [roy 20190724]
+	libarchive: Import libarchive-3.4.0. [joerg 20090724]
 	dhcpcd(8): Import dhcpcd-8.0.1. [roy 20190725]
 	mac68k: Add genfb(4) framebuffer driver. [rin 20190726]
 	dhcpcd(8): Import dhcpcd-8.0.2. [roy 20190730]



CVS commit: src/sys/dev/rasops

2019-07-30 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Tue Jul 30 14:41:10 UTC 2019

Modified Files:
src/sys/dev/rasops: rasops.c

Log Message:
In rasops_copy{rows,cols}(), if src == dst, we have nothing to do.
Otherwise, we can use memcpy safely instead of memmove.


To generate a diff of this commit:
cvs rdiff -u -r1.99 -r1.100 src/sys/dev/rasops/rasops.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/rasops/rasops.c
diff -u src/sys/dev/rasops/rasops.c:1.99 src/sys/dev/rasops/rasops.c:1.100
--- src/sys/dev/rasops/rasops.c:1.99	Tue Jul 30 14:33:04 2019
+++ src/sys/dev/rasops/rasops.c	Tue Jul 30 14:41:10 2019
@@ -1,4 +1,4 @@
-/*	 $NetBSD: rasops.c,v 1.99 2019/07/30 14:33:04 rin Exp $	*/
+/*	 $NetBSD: rasops.c,v 1.100 2019/07/30 14:41:10 rin Exp $	*/
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.99 2019/07/30 14:33:04 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.100 2019/07/30 14:41:10 rin Exp $");
 
 #include "opt_rasops.h"
 #include "rasops_glue.h"
@@ -675,10 +675,10 @@ rasops_copyrows(void *cookie, int src, i
 
 	hp = NULL;	/* XXX GCC */
 
-#ifdef RASOPS_CLIPPING
-	if (dst == src)
+	if (__predict_false(dst == src))
 		return;
 
+#ifdef RASOPS_CLIPPING
 	if (src < 0) {
 		num += src;
 		src = 0;
@@ -709,7 +709,7 @@ rasops_copyrows(void *cookie, int src, i
 		hp = ri->ri_hwbits + dst * ri->ri_yscale;
 
 	while (num--) {
-		memmove(dp, sp, n);
+		memcpy(dp, sp, n);
 		dp += stride;
 		if (ri->ri_hwbits) {
 			memcpy(hp, sp, n);
@@ -734,10 +734,10 @@ rasops_copycols(void *cookie, int row, i
 
 	hp = NULL;	/* XXX GCC */
 
-#ifdef RASOPS_CLIPPING
-	if (dst == src)
+	if (__predict_false(dst == src))
 		return;
 
+#ifdef RASOPS_CLIPPING
 	/* Catches < 0 case too */
 	if ((unsigned)row >= (unsigned)ri->ri_rows)
 		return;
@@ -772,7 +772,7 @@ rasops_copycols(void *cookie, int row, i
 		hp = ri->ri_hwbits + row + dst * ri->ri_xscale;
 
 	while (height--) {
-		memmove(dp, sp, num);
+		memcpy(dp, sp, num);
 		dp += ri->ri_stride;
 		if (ri->ri_hwbits) {
 			memcpy(hp, sp, num);



CVS commit: src/sys/dev/rasops

2019-07-30 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Tue Jul 30 14:41:10 UTC 2019

Modified Files:
src/sys/dev/rasops: rasops.c

Log Message:
In rasops_copy{rows,cols}(), if src == dst, we have nothing to do.
Otherwise, we can use memcpy safely instead of memmove.


To generate a diff of this commit:
cvs rdiff -u -r1.99 -r1.100 src/sys/dev/rasops/rasops.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/rasops

2019-07-30 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Tue Jul 30 14:33:05 UTC 2019

Modified Files:
src/sys/dev/rasops: rasops.c

Log Message:
Fix catastrophe when ri_emustride != ri_stride in rasops_copyrows().


To generate a diff of this commit:
cvs rdiff -u -r1.98 -r1.99 src/sys/dev/rasops/rasops.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/rasops/rasops.c
diff -u src/sys/dev/rasops/rasops.c:1.98 src/sys/dev/rasops/rasops.c:1.99
--- src/sys/dev/rasops/rasops.c:1.98	Tue Jul 30 12:20:24 2019
+++ src/sys/dev/rasops/rasops.c	Tue Jul 30 14:33:04 2019
@@ -1,4 +1,4 @@
-/*	 $NetBSD: rasops.c,v 1.98 2019/07/30 12:20:24 rin Exp $	*/
+/*	 $NetBSD: rasops.c,v 1.99 2019/07/30 14:33:04 rin Exp $	*/
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.98 2019/07/30 12:20:24 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.99 2019/07/30 14:33:04 rin Exp $");
 
 #include "opt_rasops.h"
 #include "rasops_glue.h"
@@ -671,7 +671,7 @@ rasops_copyrows(void *cookie, int src, i
 {
 	struct rasops_info *ri = (struct rasops_info *)cookie;
 	uint8_t *sp, *dp, *hp;
-	int n;
+	int n, stride;
 
 	hp = NULL;	/* XXX GCC */
 
@@ -701,6 +701,7 @@ rasops_copyrows(void *cookie, int src, i
 
 	num *= ri->ri_font->fontheight;
 	n = ri->ri_emustride;
+	stride = ri->ri_stride;
 
 	sp = ri->ri_bits + src * ri->ri_yscale;
 	dp = ri->ri_bits + dst * ri->ri_yscale;
@@ -709,12 +710,12 @@ rasops_copyrows(void *cookie, int src, i
 
 	while (num--) {
 		memmove(dp, sp, n);
-		dp += n;
+		dp += stride;
 		if (ri->ri_hwbits) {
 			memcpy(hp, sp, n);
-			hp += n;
+			hp += stride;
 		}
-		sp += n;
+		sp += stride;
 	}
 }
 



CVS commit: src/sys/dev/rasops

2019-07-30 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Tue Jul 30 14:33:05 UTC 2019

Modified Files:
src/sys/dev/rasops: rasops.c

Log Message:
Fix catastrophe when ri_emustride != ri_stride in rasops_copyrows().


To generate a diff of this commit:
cvs rdiff -u -r1.98 -r1.99 src/sys/dev/rasops/rasops.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/rasops

2019-07-30 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Tue Jul 30 12:20:24 UTC 2019

Modified Files:
src/sys/dev/rasops: rasops.c

Log Message:
Treat highlighted and reversed text in the same manner to xterm.


To generate a diff of this commit:
cvs rdiff -u -r1.97 -r1.98 src/sys/dev/rasops/rasops.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/rasops/rasops.c
diff -u src/sys/dev/rasops/rasops.c:1.97 src/sys/dev/rasops/rasops.c:1.98
--- src/sys/dev/rasops/rasops.c:1.97	Mon Jul 29 16:17:29 2019
+++ src/sys/dev/rasops/rasops.c	Tue Jul 30 12:20:24 2019
@@ -1,4 +1,4 @@
-/*	 $NetBSD: rasops.c,v 1.97 2019/07/29 16:17:29 rin Exp $	*/
+/*	 $NetBSD: rasops.c,v 1.98 2019/07/30 12:20:24 rin Exp $	*/
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.97 2019/07/29 16:17:29 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.98 2019/07/30 12:20:24 rin Exp $");
 
 #include "opt_rasops.h"
 #include "rasops_glue.h"
@@ -618,16 +618,16 @@ rasops_allocattr_color(void *cookie, int
 #endif
 	}
 
+	if ((flg & WSATTR_HILIT) != 0)
+		fg += 8;
+
 	if ((flg & WSATTR_REVERSE) != 0) {
 		uint32_t swap = fg;
 		fg = bg;
 		bg = swap;
 	}
 
-	if ((flg & WSATTR_HILIT) != 0)
-		fg += 8;
-
-	flg = flg & WSATTR_USERMASK;
+	flg &= WSATTR_USERMASK;
 
 	if (rasops_isgray[fg])
 		flg |= WSATTR_PRIVATE1;



CVS commit: src/sys/dev/rasops

2019-07-30 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Tue Jul 30 12:20:24 UTC 2019

Modified Files:
src/sys/dev/rasops: rasops.c

Log Message:
Treat highlighted and reversed text in the same manner to xterm.


To generate a diff of this commit:
cvs rdiff -u -r1.97 -r1.98 src/sys/dev/rasops/rasops.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/x86/pci

2019-07-30 Thread Kengo NAKAHARA
Module Name:src
Committed By:   knakahara
Date:   Tue Jul 30 11:16:15 UTC 2019

Modified Files:
src/sys/arch/x86/pci: if_vmx.c

Log Message:
vmx(4) can select workqueue for packet processing like ixg(4).


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/sys/arch/x86/pci/if_vmx.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/x86/pci

2019-07-30 Thread Kengo NAKAHARA
Module Name:src
Committed By:   knakahara
Date:   Tue Jul 30 11:16:15 UTC 2019

Modified Files:
src/sys/arch/x86/pci: if_vmx.c

Log Message:
vmx(4) can select workqueue for packet processing like ixg(4).


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/sys/arch/x86/pci/if_vmx.c

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

Modified files:

Index: src/sys/arch/x86/pci/if_vmx.c
diff -u src/sys/arch/x86/pci/if_vmx.c:1.44 src/sys/arch/x86/pci/if_vmx.c:1.45
--- src/sys/arch/x86/pci/if_vmx.c:1.44	Mon Jul 29 10:28:57 2019
+++ src/sys/arch/x86/pci/if_vmx.c	Tue Jul 30 11:16:15 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_vmx.c,v 1.44 2019/07/29 10:28:57 knakahara Exp $	*/
+/*	$NetBSD: if_vmx.c,v 1.45 2019/07/30 11:16:15 knakahara Exp $	*/
 /*	$OpenBSD: if_vmx.c,v 1.16 2014/01/22 06:04:17 brad Exp $	*/
 
 /*
@@ -19,7 +19,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_vmx.c,v 1.44 2019/07/29 10:28:57 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_vmx.c,v 1.45 2019/07/30 11:16:15 knakahara Exp $");
 
 #include 
 #include 
@@ -30,6 +30,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_vmx.c,v 1
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -96,6 +97,8 @@ __KERNEL_RCSID(0, "$NetBSD: if_vmx.c,v 1
 #define VMXNET3_RX_PROCESS_LIMIT 256
 #define VMXNET3_TX_PROCESS_LIMIT 256
 
+#define VMXNET3_WORKQUEUE_PRI PRI_SOFTNET
+
 /*
  * IP protocols that we can perform Tx checksum offloading of.
  */
@@ -225,6 +228,8 @@ struct vmxnet3_queue {
 	struct vmxnet3_rxqueue vxq_rxqueue;
 
 	void *vxq_si;
+	bool vxq_workqueue;
+	struct work vxq_wq_cookie;
 };
 
 struct vmxnet3_statistics {
@@ -291,8 +296,10 @@ struct vmxnet3_softc {
 	u_int vmx_tx_intr_process_limit;
 	u_int vmx_rx_process_limit;
 	u_int vmx_tx_process_limit;
-
 	struct sysctllog *vmx_sysctllog;
+
+	bool vmx_txrx_workqueue;
+	struct workqueue *vmx_queue_wq;
 };
 
 #define VMXNET3_STAT
@@ -378,6 +385,7 @@ bool vmxnet3_rxq_eof(struct vmxnet3_rxqu
 int vmxnet3_legacy_intr(void *);
 int vmxnet3_txrxq_intr(void *);
 void vmxnet3_handle_queue(void *);
+void vmxnet3_handle_queue_work(struct work *, void *);
 int vmxnet3_event_intr(void *);
 
 void vmxnet3_txstop(struct vmxnet3_softc *, struct vmxnet3_txqueue *);
@@ -849,6 +857,7 @@ vmxnet3_free_interrupts(struct vmxnet3_s
 	pci_chipset_tag_t pc = sc->vmx_pc;
 	int i;
 
+	workqueue_destroy(sc->vmx_queue_wq);
 	for (i = 0; i < sc->vmx_nintrs; i++) {
 		struct vmxnet3_queue *vmxq =  >vmx_queue[i];
 
@@ -866,7 +875,7 @@ vmxnet3_setup_msix_interrupts(struct vmx
 	struct vmxnet3_queue *vmxq;
 	pci_intr_handle_t *intr;
 	void **ihs;
-	int intr_idx, i, use_queues;
+	int intr_idx, i, use_queues, error;
 	const char *intrstr;
 	char intrbuf[PCI_INTRSTR_LEN];
 	char xnamebuf[32];
@@ -904,6 +913,15 @@ vmxnet3_setup_msix_interrupts(struct vmx
 
 		vmxq->vxq_intr_idx = intr_idx;
 	}
+	snprintf(xnamebuf, MAXCOMLEN, "%s_tx_rx", device_xname(sc->vmx_dev));
+	error = workqueue_create(>vmx_queue_wq, xnamebuf,
+	vmxnet3_handle_queue_work, sc, VMXNET3_WORKQUEUE_PRI, IPL_NET,
+	WQ_PERCPU | WQ_MPSAFE);
+	if (error) {
+		aprint_error_dev(sc->vmx_dev, "workqueue_create failed\n");
+		return (-1);
+	}
+	sc->vmx_txrx_workqueue = false;
 
 	intrstr = pci_intr_string(pc, *intr, intrbuf, sizeof(intrbuf));
 
@@ -1839,6 +1857,12 @@ vmxnet3_setup_sysctl(struct vmxnet3_soft
 	NULL, 0, NULL, 0, CTL_HW, CTL_CREATE, CTL_EOL);
 	if (error)
 		goto out;
+	error = sysctl_createv(log, 0, , NULL,
+	CTLFLAG_READWRITE, CTLTYPE_BOOL, "txrx_workqueue",
+	SYSCTL_DESCR("Use workqueue for packet processing"),
+	NULL, 0, >vmx_txrx_workqueue, 0, CTL_CREATE, CTL_EOL);
+	if (error)
+		goto out;
 
 	error = sysctl_createv(log, 0, , ,
 	0, CTLTYPE_NODE, "rx",
@@ -2305,6 +2329,18 @@ nextp:
 	return more;
 }
 
+static inline void
+vmxnet3_sched_handle_queue(struct vmxnet3_softc *sc, struct vmxnet3_queue *vmxq)
+{
+
+	if (vmxq->vxq_workqueue) {
+		workqueue_enqueue(sc->vmx_queue_wq, >vxq_wq_cookie,
+		curcpu());
+	} else {
+		softint_schedule(vmxq->vxq_si);
+	}
+}
+
 int
 vmxnet3_legacy_intr(void *xsc)
 {
@@ -2339,7 +2375,7 @@ vmxnet3_legacy_intr(void *xsc)
 	VMXNET3_TXQ_UNLOCK(txq);
 
 	if (txmore || rxmore) {
-		softint_schedule(sc->vmx_queue[0].vxq_si);
+		vmxnet3_sched_handle_queue(sc, >vmx_queue[0]);
 	} else {
 		if_schedule_deferred_start(>vmx_ethercom.ec_if);
 		vmxnet3_enable_all_intrs(sc);
@@ -2363,6 +2399,7 @@ vmxnet3_txrxq_intr(void *xvmxq)
 	sc = txq->vxtxq_sc;
 	txlimit = sc->vmx_tx_intr_process_limit;
 	rxlimit = sc->vmx_rx_intr_process_limit;
+	vmxq->vxq_workqueue = sc->vmx_txrx_workqueue;
 
 	if (sc->vmx_intr_mask_mode == VMXNET3_IMM_ACTIVE)
 		vmxnet3_disable_intr(sc, vmxq->vxq_intr_idx);
@@ -2376,7 +2413,7 @@ vmxnet3_txrxq_intr(void *xvmxq)
 	VMXNET3_RXQ_UNLOCK(rxq);
 
 	if (txmore || rxmore) {
-		softint_schedule(vmxq->vxq_si);
+		vmxnet3_sched_handle_queue(sc, vmxq);
 	} else {
 		/* for ALTQ */
 		if (vmxq->vxq_id 

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

2019-07-30 Thread Kenichi Hashimoto
Module Name:src
Committed By:   hkenken
Date:   Tue Jul 30 11:11:15 UTC 2019

Modified Files:
src/sys/arch/arm/imx: imx6_ccm.c

Log Message:
Fix overflow to calculate frequencies.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/arm/imx/imx6_ccm.c

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

Modified files:

Index: src/sys/arch/arm/imx/imx6_ccm.c
diff -u src/sys/arch/arm/imx/imx6_ccm.c:1.12 src/sys/arch/arm/imx/imx6_ccm.c:1.13
--- src/sys/arch/arm/imx/imx6_ccm.c:1.12	Fri Jul 26 06:57:54 2019
+++ src/sys/arch/arm/imx/imx6_ccm.c	Tue Jul 30 11:11:15 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: imx6_ccm.c,v 1.12 2019/07/26 06:57:54 skrll Exp $	*/
+/*	$NetBSD: imx6_ccm.c,v 1.13 2019/07/30 11:11:15 hkenken Exp $	*/
 
 /*
  * Copyright (c) 2010-2012, 2014  Genetec Corporation.  All rights reserved.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: imx6_ccm.c,v 1.12 2019/07/26 06:57:54 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: imx6_ccm.c,v 1.13 2019/07/30 11:11:15 hkenken Exp $");
 
 #include "opt_cputypes.h"
 
@@ -1031,6 +1031,7 @@ imxccm_clk_get_rate_pll_generic(struct i
 const u_int rate_parent)
 {
 	struct imx6_clk_pll *pll = >clk.pll;
+	uint64_t freq = rate_parent;
 
 	KASSERT((pll->type == IMX6_CLK_PLL_GENNERIC) ||
 	(pll->type == IMX6_CLK_PLL_USB));
@@ -1038,7 +1039,7 @@ imxccm_clk_get_rate_pll_generic(struct i
 	uint32_t v = bus_space_read_4(sc->sc_iot, sc->sc_ioh_analog, pll->reg);
 	uint32_t div = __SHIFTOUT(v, pll->mask);
 
-	return rate_parent * ((div == 1) ? 22 : 20);
+	return freq * ((div == 1) ? 22 : 20);
 }
 
 static u_int
@@ -1046,13 +1047,14 @@ imxccm_clk_get_rate_pll_sys(struct imxcc
 const u_int rate_parent)
 {
 	struct imx6_clk_pll *pll = >clk.pll;
+	uint64_t freq = rate_parent;
 
 	KASSERT(pll->type == IMX6_CLK_PLL_SYS);
 
 	uint32_t v = bus_space_read_4(sc->sc_iot, sc->sc_ioh_analog, pll->reg);
 	uint32_t div = __SHIFTOUT(v, pll->mask);
 
-	return rate_parent * div / 2;
+	return freq * div / 2;
 }
 
 #define PLL_AUDIO_VIDEO_NUM_OFFSET	0x10
@@ -1063,7 +1065,7 @@ imxccm_clk_get_rate_pll_audio_video(stru
 struct imx6_clk *iclk, const u_int rate_parent)
 {
 	struct imx6_clk_pll *pll = >clk.pll;
-	uint64_t freq;
+	uint64_t freq = rate_parent;
 
 	KASSERT(pll->type == IMX6_CLK_PLL_AUDIO_VIDEO);
 
@@ -1074,10 +1076,9 @@ imxccm_clk_get_rate_pll_audio_video(stru
 	uint32_t denom = bus_space_read_4(sc->sc_iot, sc->sc_ioh_analog,
 	pll->reg + PLL_AUDIO_VIDEO_DENOM_OFFSET);
 
-	uint64_t tmp = rate_parent * num / denom;
-	freq = (uint64_t)rate_parent * div + tmp;
+	uint64_t tmp = freq * num / denom;
 
-	return freq;
+	return freq * div + tmp;
 }
 
 static u_int
@@ -1102,7 +1103,7 @@ imxccm_clk_get_rate_fixed_factor(struct 
 	parent = imx6_clk_find(iclk->parent);
 	KASSERT(parent != NULL);
 
-	const u_int rate_parent = imxccm_clk_get_rate(sc, >base);
+	uint64_t rate_parent = imxccm_clk_get_rate(sc, >base);
 
 	return rate_parent * fixed_factor->mult / fixed_factor->div;
 }
@@ -1118,7 +1119,7 @@ imxccm_clk_get_rate_pll(struct imxccm_so
 	parent = imx6_clk_find(iclk->parent);
 	KASSERT(parent != NULL);
 
-	const u_int rate_parent = imxccm_clk_get_rate(sc, >base);
+	uint64_t rate_parent = imxccm_clk_get_rate(sc, >base);
 
 	switch(pll->type) {
 	case IMX6_CLK_PLL_GENNERIC:
@@ -1182,7 +1183,7 @@ imxccm_clk_get_rate_pfd(struct imxccm_so
 	parent = imx6_clk_find(iclk->parent);
 	KASSERT(parent != NULL);
 
-	const u_int rate_parent = imxccm_clk_get_rate(sc, >base);
+	uint64_t rate_parent = imxccm_clk_get_rate(sc, >base);
 
 	uint32_t v = bus_space_read_4(sc->sc_iot, sc->sc_ioh_analog, pfd->reg);
 	uint32_t n = __SHIFTOUT(v, __BITS(5, 0) << (pfd->index * 8));



CVS commit: src/doc

2019-07-30 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Tue Jul 30 10:28:29 UTC 2019

Modified Files:
src/doc: 3RDPARTY CHANGES

Log Message:
Note import of dhcpcd-8.0.2


To generate a diff of this commit:
cvs rdiff -u -r1.1638 -r1.1639 src/doc/3RDPARTY
cvs rdiff -u -r1.2561 -r1.2562 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/doc

2019-07-30 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Tue Jul 30 10:28:29 UTC 2019

Modified Files:
src/doc: 3RDPARTY CHANGES

Log Message:
Note import of dhcpcd-8.0.2


To generate a diff of this commit:
cvs rdiff -u -r1.1638 -r1.1639 src/doc/3RDPARTY
cvs rdiff -u -r1.2561 -r1.2562 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/3RDPARTY
diff -u src/doc/3RDPARTY:1.1638 src/doc/3RDPARTY:1.1639
--- src/doc/3RDPARTY:1.1638	Thu Jul 25 08:59:32 2019
+++ src/doc/3RDPARTY	Tue Jul 30 10:28:28 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1638 2019/07/25 08:59:32 roy Exp $
+#	$NetBSD: 3RDPARTY,v 1.1639 2019/07/30 10:28:28 roy Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -341,12 +341,12 @@ Notes:
 Use the dhcp2netbsd script.
 
 Package:	dhcpcd
-Version:	8.0.1
-Current Vers:	8.0.1
+Version:	8.0.2
+Current Vers:	8.0.2
 Maintainer:	roy
 Archive Site:	ftp://roy.marples.name/pub/dhcpcd/
 Home Page:	http://roy.marples.name/projects/dhcpcd/
-Date:		2019-07-25
+Date:		2019-07-30
 Mailing List: 	dhcpcd-disc...@marples.name
 License:	BSD (2-clause)
 Location:	external/bsd/dhcpcd/dist

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.2561 src/doc/CHANGES:1.2562
--- src/doc/CHANGES:1.2561	Fri Jul 26 23:59:42 2019
+++ src/doc/CHANGES	Tue Jul 30 10:28:28 2019
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2561 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2562 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -415,3 +415,4 @@ Changes from NetBSD 8.0 to NetBSD 9.0:
 	tar(1): MKBSDTAR now defaults to yes. [roy 20190724]
 	dhcpcd(8): Import dhcpcd-8.0.1. [roy 20190725]
 	mac68k: Add genfb(4) framebuffer driver. [rin 20190726]
+	dhcpcd(8): Import dhcpcd-8.0.2. [roy 20190730]



CVS commit: src/external/bsd/dhcpcd/dist/src

2019-07-30 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Tue Jul 30 10:25:03 UTC 2019

Modified Files:
src/external/bsd/dhcpcd/dist/src: bpf.c dhcp.c dhcp6.c dhcpcd.c
if-bsd.c if-options.c ipv6.c ipv6.h ipv6nd.c

Log Message:
Sync


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/external/bsd/dhcpcd/dist/src/bpf.c \
src/external/bsd/dhcpcd/dist/src/dhcp6.c
cvs rdiff -u -r1.22 -r1.23 src/external/bsd/dhcpcd/dist/src/dhcp.c \
src/external/bsd/dhcpcd/dist/src/dhcpcd.c
cvs rdiff -u -r1.9 -r1.10 src/external/bsd/dhcpcd/dist/src/if-bsd.c \
src/external/bsd/dhcpcd/dist/src/ipv6nd.c
cvs rdiff -u -r1.15 -r1.16 src/external/bsd/dhcpcd/dist/src/if-options.c
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/dhcpcd/dist/src/ipv6.c \
src/external/bsd/dhcpcd/dist/src/ipv6.h

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



CVS commit: src/external/bsd/dhcpcd/dist/src

2019-07-30 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Tue Jul 30 10:25:03 UTC 2019

Modified Files:
src/external/bsd/dhcpcd/dist/src: bpf.c dhcp.c dhcp6.c dhcpcd.c
if-bsd.c if-options.c ipv6.c ipv6.h ipv6nd.c

Log Message:
Sync


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/external/bsd/dhcpcd/dist/src/bpf.c \
src/external/bsd/dhcpcd/dist/src/dhcp6.c
cvs rdiff -u -r1.22 -r1.23 src/external/bsd/dhcpcd/dist/src/dhcp.c \
src/external/bsd/dhcpcd/dist/src/dhcpcd.c
cvs rdiff -u -r1.9 -r1.10 src/external/bsd/dhcpcd/dist/src/if-bsd.c \
src/external/bsd/dhcpcd/dist/src/ipv6nd.c
cvs rdiff -u -r1.15 -r1.16 src/external/bsd/dhcpcd/dist/src/if-options.c
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/dhcpcd/dist/src/ipv6.c \
src/external/bsd/dhcpcd/dist/src/ipv6.h

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

Modified files:

Index: src/external/bsd/dhcpcd/dist/src/bpf.c
diff -u src/external/bsd/dhcpcd/dist/src/bpf.c:1.10 src/external/bsd/dhcpcd/dist/src/bpf.c:1.11
--- src/external/bsd/dhcpcd/dist/src/bpf.c:1.10	Wed Jul 24 09:57:43 2019
+++ src/external/bsd/dhcpcd/dist/src/bpf.c	Tue Jul 30 10:25:03 2019
@@ -93,7 +93,7 @@ bpf_frame_header_len(const struct interf
 	}
 }
 
-static const uint8_t etherbroadcastaddr[] =
+static const uint8_t etherbcastaddr[] =
 { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
 
 int
@@ -104,7 +104,7 @@ bpf_frame_bcast(const struct interface *
 	case ARPHRD_ETHER:
 		return memcmp(frame +
 		offsetof(struct ether_header, ether_dhost),
-		etherbroadcastaddr, sizeof(etherbroadcastaddr));
+		etherbcastaddr, sizeof(etherbcastaddr));
 	default:
 		return -1;
 	}
@@ -552,6 +552,12 @@ bpf_arp(struct interface *ifp, int fd)
 }
 #endif
 
+#define	BPF_M_FHLEN	0
+#define	BPF_M_IPHLEN	1
+#define	BPF_M_IPLEN	2
+#define	BPF_M_UDP	3
+#define	BPF_M_UDPLEN	4
+
 static const struct bpf_insn bpf_bootp_ether[] = {
 	/* Make sure this is an IP packet. */
 	BPF_STMT(BPF_LD + BPF_H + BPF_ABS,
@@ -561,16 +567,26 @@ static const struct bpf_insn bpf_bootp_e
 
 	/* Load frame header length into X. */
 	BPF_STMT(BPF_LDX + BPF_W + BPF_IMM, sizeof(struct ether_header)),
-	/* Copy to M0. */
-	BPF_STMT(BPF_STX, 0),
+	/* Copy frame header length to memory */
+	BPF_STMT(BPF_STX, BPF_M_FHLEN),
 };
 #define BPF_BOOTP_ETHER_LEN	__arraycount(bpf_bootp_ether)
 
 static const struct bpf_insn bpf_bootp_filter[] = {
-	/* Make sure it's an optionless IPv4 packet. */
+	/* Make sure it's an IPv4 packet. */
+	BPF_STMT(BPF_LD + BPF_B + BPF_IND, 0),
+	BPF_STMT(BPF_ALU + BPF_AND + BPF_K, 0xf0),
+	BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, 0x40, 1, 0),
+	BPF_STMT(BPF_RET + BPF_K, 0),
+
+	/* Ensure IP header length is big enough and
+	 * store the IP header length in memory. */
 	BPF_STMT(BPF_LD + BPF_B + BPF_IND, 0),
-	BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, 0x45, 1, 0),
+	BPF_STMT(BPF_ALU + BPF_AND + BPF_K, 0x0f),
+	BPF_STMT(BPF_ALU + BPF_MUL + BPF_K, 4),
+	BPF_JUMP(BPF_JMP + BPF_JGE + BPF_K, sizeof(struct ip), 1, 0),
 	BPF_STMT(BPF_RET + BPF_K, 0),
+	BPF_STMT(BPF_ST, BPF_M_IPHLEN),
 
 	/* Make sure it's a UDP packet. */
 	BPF_STMT(BPF_LD + BPF_B + BPF_IND, offsetof(struct ip, ip_p)),
@@ -582,39 +598,42 @@ static const struct bpf_insn bpf_bootp_f
 	BPF_JUMP(BPF_JMP + BPF_JSET + BPF_K, 0x1fff, 0, 1),
 	BPF_STMT(BPF_RET + BPF_K, 0),
 
-	/* Store IP location in M1. */
+	/* Store IP length. */
 	BPF_STMT(BPF_LD + BPF_H + BPF_IND, offsetof(struct ip, ip_len)),
-	BPF_STMT(BPF_ST, 1),
-
-	/* Store IP length in M2. */
-	BPF_STMT(BPF_LD + BPF_H + BPF_IND, offsetof(struct ip, ip_len)),
-	BPF_STMT(BPF_ST, 2),
+	BPF_STMT(BPF_ST, BPF_M_IPLEN),
 
 	/* Advance to the UDP header. */
-	BPF_STMT(BPF_MISC + BPF_TXA, 0),
-	BPF_STMT(BPF_ALU + BPF_ADD + BPF_K, sizeof(struct ip)),
+	BPF_STMT(BPF_LD + BPF_MEM, BPF_M_IPHLEN),
+	BPF_STMT(BPF_ALU + BPF_ADD + BPF_X, 0),
 	BPF_STMT(BPF_MISC + BPF_TAX, 0),
 
-	/* Store X in M3. */
-	BPF_STMT(BPF_STX, 3),
+	/* Store UDP location */
+	BPF_STMT(BPF_STX, BPF_M_UDP),
 
 	/* Make sure it's from and to the right port. */
 	BPF_STMT(BPF_LD + BPF_W + BPF_IND, 0),
 	BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, (BOOTPS << 16) + BOOTPC, 1, 0),
 	BPF_STMT(BPF_RET + BPF_K, 0),
 
-	/* Store UDP length in X. */
+	/* Store UDP length. */
 	BPF_STMT(BPF_LD + BPF_H + BPF_IND, offsetof(struct udphdr, uh_ulen)),
+	BPF_STMT(BPF_ST, BPF_M_UDPLEN),
+
+	/* Ensure that UDP length + IP header length == IP length */
+	/* Copy IP header length to X. */
+	BPF_STMT(BPF_LDX + BPF_MEM, BPF_M_IPHLEN),
+	/* Add UDP length (A) to IP header length (X). */
+	BPF_STMT(BPF_ALU + BPF_ADD + BPF_X, 0),
+	/* Store result in X. */
 	BPF_STMT(BPF_MISC + BPF_TAX, 0),
-	/* Copy IP length in M2 to A. */
-	BPF_STMT(BPF_LD + BPF_MEM, 2),
-	/* Ensure IP length - IP header size == UDP length. */
-	BPF_STMT(BPF_ALU + BPF_SUB + BPF_K, sizeof(struct ip)),
+	/* Copy IP length to A. */
+	BPF_STMT(BPF_LD + BPF_MEM, BPF_M_IPLEN),
+	/* Ensure X == A. */
 	BPF_JUMP(BPF_JMP + 

CVS import: src/external/bsd/dhcpcd/dist

2019-07-30 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Tue Jul 30 10:23:10 UTC 2019

Update of /cvsroot/src/external/bsd/dhcpcd/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv13305

Log Message:
Import dhcpcd-8.0.2 with the following changes:

  *  NetBSD: Can be build without ARP support but listen to kernel DaD
  *  ND6: Removed NA support from SMALL builds
  *  DHCP: Avoid duplicate read of UDP socket when BPF is also open
  *  IP: Avoid adding address if already exists on OS other than Linux
  *  route: Fixed a NULL de-reference error on static routes
  *  DHCP6: Move to REQUEST if any IA has no-binding in REWNEW/REBIND
  *  IP: Accept packets with IP header options 

Status:

Vendor Tag: roy
Release Tags:   dhcpcd-8-0-2

U src/external/bsd/dhcpcd/dist/.gitignore
U src/external/bsd/dhcpcd/dist/BUILDING.md
U src/external/bsd/dhcpcd/dist/LICENSE
U src/external/bsd/dhcpcd/dist/Makefile
U src/external/bsd/dhcpcd/dist/Makefile.inc
U src/external/bsd/dhcpcd/dist/README.md
U src/external/bsd/dhcpcd/dist/config-null.mk
U src/external/bsd/dhcpcd/dist/configure
U src/external/bsd/dhcpcd/dist/iconfig.mk
U src/external/bsd/dhcpcd/dist/compat/_strtoi.h
U src/external/bsd/dhcpcd/dist/compat/arc4random.c
U src/external/bsd/dhcpcd/dist/compat/arc4random.h
U src/external/bsd/dhcpcd/dist/compat/arc4random_uniform.c
U src/external/bsd/dhcpcd/dist/compat/arc4random_uniform.h
U src/external/bsd/dhcpcd/dist/compat/bitops.h
U src/external/bsd/dhcpcd/dist/compat/consttime_memequal.h
U src/external/bsd/dhcpcd/dist/compat/dprintf.c
U src/external/bsd/dhcpcd/dist/compat/dprintf.h
U src/external/bsd/dhcpcd/dist/compat/endian.h
U src/external/bsd/dhcpcd/dist/compat/pidfile.c
U src/external/bsd/dhcpcd/dist/compat/pidfile.h
U src/external/bsd/dhcpcd/dist/compat/queue.h
U src/external/bsd/dhcpcd/dist/compat/rb.c
U src/external/bsd/dhcpcd/dist/compat/rbtree.h
U src/external/bsd/dhcpcd/dist/compat/reallocarray.c
U src/external/bsd/dhcpcd/dist/compat/reallocarray.h
U src/external/bsd/dhcpcd/dist/compat/strlcpy.c
U src/external/bsd/dhcpcd/dist/compat/strlcpy.h
U src/external/bsd/dhcpcd/dist/compat/strtoi.c
U src/external/bsd/dhcpcd/dist/compat/strtoi.h
U src/external/bsd/dhcpcd/dist/compat/strtou.c
U src/external/bsd/dhcpcd/dist/compat/crypt/hmac.c
U src/external/bsd/dhcpcd/dist/compat/crypt/hmac.h
U src/external/bsd/dhcpcd/dist/compat/crypt/md5.c
U src/external/bsd/dhcpcd/dist/compat/crypt/md5.h
U src/external/bsd/dhcpcd/dist/compat/crypt/sha256.c
U src/external/bsd/dhcpcd/dist/compat/crypt/sha256.h
U src/external/bsd/dhcpcd/dist/hooks/01-test
U src/external/bsd/dhcpcd/dist/hooks/02-dump
U src/external/bsd/dhcpcd/dist/hooks/10-wpa_supplicant
U src/external/bsd/dhcpcd/dist/hooks/15-timezone
U src/external/bsd/dhcpcd/dist/hooks/20-resolv.conf
U src/external/bsd/dhcpcd/dist/hooks/29-lookup-hostname
U src/external/bsd/dhcpcd/dist/hooks/30-hostname
U src/external/bsd/dhcpcd/dist/hooks/50-dhcpcd-compat
U src/external/bsd/dhcpcd/dist/hooks/50-ntp.conf
U src/external/bsd/dhcpcd/dist/hooks/50-yp.conf
U src/external/bsd/dhcpcd/dist/hooks/50-ypbind.in
U src/external/bsd/dhcpcd/dist/hooks/Makefile
U src/external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks.8.in
U src/external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks.in
U src/external/bsd/dhcpcd/dist/src/GNUmakefile
U src/external/bsd/dhcpcd/dist/src/Makefile
U src/external/bsd/dhcpcd/dist/src/arp.c
U src/external/bsd/dhcpcd/dist/src/arp.h
U src/external/bsd/dhcpcd/dist/src/auth.c
U src/external/bsd/dhcpcd/dist/src/auth.h
C src/external/bsd/dhcpcd/dist/src/bpf.c
U src/external/bsd/dhcpcd/dist/src/bpf.h
U src/external/bsd/dhcpcd/dist/src/common.c
U src/external/bsd/dhcpcd/dist/src/common.h
U src/external/bsd/dhcpcd/dist/src/control.c
U src/external/bsd/dhcpcd/dist/src/control.h
U src/external/bsd/dhcpcd/dist/src/defs.h
U src/external/bsd/dhcpcd/dist/src/dev.c
U src/external/bsd/dhcpcd/dist/src/dev.h
U src/external/bsd/dhcpcd/dist/src/dhcp-common.c
U src/external/bsd/dhcpcd/dist/src/dhcp-common.h
C src/external/bsd/dhcpcd/dist/src/dhcp.c
U src/external/bsd/dhcpcd/dist/src/dhcp.h
C src/external/bsd/dhcpcd/dist/src/dhcp6.c
U src/external/bsd/dhcpcd/dist/src/dhcp6.h
U src/external/bsd/dhcpcd/dist/src/dhcpcd-definitions-small.conf
U src/external/bsd/dhcpcd/dist/src/dhcpcd-definitions.conf
C src/external/bsd/dhcpcd/dist/src/dhcpcd.8.in
U src/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.c.in
U src/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.h.in
C src/external/bsd/dhcpcd/dist/src/dhcpcd.c
U src/external/bsd/dhcpcd/dist/src/dhcpcd.conf
U src/external/bsd/dhcpcd/dist/src/dhcpcd.conf.5.in
U src/external/bsd/dhcpcd/dist/src/dhcpcd.h
U src/external/bsd/dhcpcd/dist/src/duid.c
U src/external/bsd/dhcpcd/dist/src/duid.h
U src/external/bsd/dhcpcd/dist/src/eloop.c
U src/external/bsd/dhcpcd/dist/src/eloop.h
U src/external/bsd/dhcpcd/dist/src/genembedc
U src/external/bsd/dhcpcd/dist/src/genembedh
C src/external/bsd/dhcpcd/dist/src/if-bsd.c
U src/external/bsd/dhcpcd/dist/src/if-linux-wext.c
U 

CVS import: src/external/bsd/dhcpcd/dist

2019-07-30 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Tue Jul 30 10:23:10 UTC 2019

Update of /cvsroot/src/external/bsd/dhcpcd/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv13305

Log Message:
Import dhcpcd-8.0.2 with the following changes:

  *  NetBSD: Can be build without ARP support but listen to kernel DaD
  *  ND6: Removed NA support from SMALL builds
  *  DHCP: Avoid duplicate read of UDP socket when BPF is also open
  *  IP: Avoid adding address if already exists on OS other than Linux
  *  route: Fixed a NULL de-reference error on static routes
  *  DHCP6: Move to REQUEST if any IA has no-binding in REWNEW/REBIND
  *  IP: Accept packets with IP header options 

Status:

Vendor Tag: roy
Release Tags:   dhcpcd-8-0-2

U src/external/bsd/dhcpcd/dist/.gitignore
U src/external/bsd/dhcpcd/dist/BUILDING.md
U src/external/bsd/dhcpcd/dist/LICENSE
U src/external/bsd/dhcpcd/dist/Makefile
U src/external/bsd/dhcpcd/dist/Makefile.inc
U src/external/bsd/dhcpcd/dist/README.md
U src/external/bsd/dhcpcd/dist/config-null.mk
U src/external/bsd/dhcpcd/dist/configure
U src/external/bsd/dhcpcd/dist/iconfig.mk
U src/external/bsd/dhcpcd/dist/compat/_strtoi.h
U src/external/bsd/dhcpcd/dist/compat/arc4random.c
U src/external/bsd/dhcpcd/dist/compat/arc4random.h
U src/external/bsd/dhcpcd/dist/compat/arc4random_uniform.c
U src/external/bsd/dhcpcd/dist/compat/arc4random_uniform.h
U src/external/bsd/dhcpcd/dist/compat/bitops.h
U src/external/bsd/dhcpcd/dist/compat/consttime_memequal.h
U src/external/bsd/dhcpcd/dist/compat/dprintf.c
U src/external/bsd/dhcpcd/dist/compat/dprintf.h
U src/external/bsd/dhcpcd/dist/compat/endian.h
U src/external/bsd/dhcpcd/dist/compat/pidfile.c
U src/external/bsd/dhcpcd/dist/compat/pidfile.h
U src/external/bsd/dhcpcd/dist/compat/queue.h
U src/external/bsd/dhcpcd/dist/compat/rb.c
U src/external/bsd/dhcpcd/dist/compat/rbtree.h
U src/external/bsd/dhcpcd/dist/compat/reallocarray.c
U src/external/bsd/dhcpcd/dist/compat/reallocarray.h
U src/external/bsd/dhcpcd/dist/compat/strlcpy.c
U src/external/bsd/dhcpcd/dist/compat/strlcpy.h
U src/external/bsd/dhcpcd/dist/compat/strtoi.c
U src/external/bsd/dhcpcd/dist/compat/strtoi.h
U src/external/bsd/dhcpcd/dist/compat/strtou.c
U src/external/bsd/dhcpcd/dist/compat/crypt/hmac.c
U src/external/bsd/dhcpcd/dist/compat/crypt/hmac.h
U src/external/bsd/dhcpcd/dist/compat/crypt/md5.c
U src/external/bsd/dhcpcd/dist/compat/crypt/md5.h
U src/external/bsd/dhcpcd/dist/compat/crypt/sha256.c
U src/external/bsd/dhcpcd/dist/compat/crypt/sha256.h
U src/external/bsd/dhcpcd/dist/hooks/01-test
U src/external/bsd/dhcpcd/dist/hooks/02-dump
U src/external/bsd/dhcpcd/dist/hooks/10-wpa_supplicant
U src/external/bsd/dhcpcd/dist/hooks/15-timezone
U src/external/bsd/dhcpcd/dist/hooks/20-resolv.conf
U src/external/bsd/dhcpcd/dist/hooks/29-lookup-hostname
U src/external/bsd/dhcpcd/dist/hooks/30-hostname
U src/external/bsd/dhcpcd/dist/hooks/50-dhcpcd-compat
U src/external/bsd/dhcpcd/dist/hooks/50-ntp.conf
U src/external/bsd/dhcpcd/dist/hooks/50-yp.conf
U src/external/bsd/dhcpcd/dist/hooks/50-ypbind.in
U src/external/bsd/dhcpcd/dist/hooks/Makefile
U src/external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks.8.in
U src/external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks.in
U src/external/bsd/dhcpcd/dist/src/GNUmakefile
U src/external/bsd/dhcpcd/dist/src/Makefile
U src/external/bsd/dhcpcd/dist/src/arp.c
U src/external/bsd/dhcpcd/dist/src/arp.h
U src/external/bsd/dhcpcd/dist/src/auth.c
U src/external/bsd/dhcpcd/dist/src/auth.h
C src/external/bsd/dhcpcd/dist/src/bpf.c
U src/external/bsd/dhcpcd/dist/src/bpf.h
U src/external/bsd/dhcpcd/dist/src/common.c
U src/external/bsd/dhcpcd/dist/src/common.h
U src/external/bsd/dhcpcd/dist/src/control.c
U src/external/bsd/dhcpcd/dist/src/control.h
U src/external/bsd/dhcpcd/dist/src/defs.h
U src/external/bsd/dhcpcd/dist/src/dev.c
U src/external/bsd/dhcpcd/dist/src/dev.h
U src/external/bsd/dhcpcd/dist/src/dhcp-common.c
U src/external/bsd/dhcpcd/dist/src/dhcp-common.h
C src/external/bsd/dhcpcd/dist/src/dhcp.c
U src/external/bsd/dhcpcd/dist/src/dhcp.h
C src/external/bsd/dhcpcd/dist/src/dhcp6.c
U src/external/bsd/dhcpcd/dist/src/dhcp6.h
U src/external/bsd/dhcpcd/dist/src/dhcpcd-definitions-small.conf
U src/external/bsd/dhcpcd/dist/src/dhcpcd-definitions.conf
C src/external/bsd/dhcpcd/dist/src/dhcpcd.8.in
U src/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.c.in
U src/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.h.in
C src/external/bsd/dhcpcd/dist/src/dhcpcd.c
U src/external/bsd/dhcpcd/dist/src/dhcpcd.conf
U src/external/bsd/dhcpcd/dist/src/dhcpcd.conf.5.in
U src/external/bsd/dhcpcd/dist/src/dhcpcd.h
U src/external/bsd/dhcpcd/dist/src/duid.c
U src/external/bsd/dhcpcd/dist/src/duid.h
U src/external/bsd/dhcpcd/dist/src/eloop.c
U src/external/bsd/dhcpcd/dist/src/eloop.h
U src/external/bsd/dhcpcd/dist/src/genembedc
U src/external/bsd/dhcpcd/dist/src/genembedh
C src/external/bsd/dhcpcd/dist/src/if-bsd.c
U src/external/bsd/dhcpcd/dist/src/if-linux-wext.c
U 

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

2019-07-30 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Jul 30 08:44:28 UTC 2019

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

Log Message:
 ixgbe_setup_low_power_mode() calls ixgbe_stop() in it. ixgbe_detach() first
called ixgbe_stop() and then called ixgbe_setup_low_power_mode() which resulted
in calling ixgbe_stop() twice. Call only ixgbe_setup_low_power_mode() first to
remove extra ixgbe_stop() call.


To generate a diff of this commit:
cvs rdiff -u -r1.198 -r1.199 src/sys/dev/pci/ixgbe/ixgbe.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

2019-07-30 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Jul 30 08:44:28 UTC 2019

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

Log Message:
 ixgbe_setup_low_power_mode() calls ixgbe_stop() in it. ixgbe_detach() first
called ixgbe_stop() and then called ixgbe_setup_low_power_mode() which resulted
in calling ixgbe_stop() twice. Call only ixgbe_setup_low_power_mode() first to
remove extra ixgbe_stop() call.


To generate a diff of this commit:
cvs rdiff -u -r1.198 -r1.199 src/sys/dev/pci/ixgbe/ixgbe.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.198 src/sys/dev/pci/ixgbe/ixgbe.c:1.199
--- src/sys/dev/pci/ixgbe/ixgbe.c:1.198	Fri Jul 26 04:08:39 2019
+++ src/sys/dev/pci/ixgbe/ixgbe.c	Tue Jul 30 08:44:28 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.c,v 1.198 2019/07/26 04:08:39 msaitoh Exp $ */
+/* $NetBSD: ixgbe.c,v 1.199 2019/07/30 08:44:28 msaitoh Exp $ */
 
 /**
 
@@ -3568,8 +3568,13 @@ ixgbe_detach(device_t dev, int flags)
 		return (EBUSY);
 	}
 
-	/* Stop the interface. Callouts are stopped in it. */
-	ixgbe_ifstop(adapter->ifp, 1);
+	/*
+	 * Stop the interface. ixgbe_setup_low_power_mode() calls ixgbe_stop(),
+	 * so it's not required to call ixgbe_stop() directly.
+	 */
+	IXGBE_CORE_LOCK(adapter);
+	ixgbe_setup_low_power_mode(adapter);
+	IXGBE_CORE_UNLOCK(adapter);
 #if NVLAN > 0
 	/* Make sure VLANs are not using driver */
 	if (!VLAN_ATTACHED(>osdep.ec))
@@ -3585,10 +3590,6 @@ ixgbe_detach(device_t dev, int flags)
 	pmf_device_deregister(dev);
 
 	ether_ifdetach(adapter->ifp);
-	/* Stop the adapter */
-	IXGBE_CORE_LOCK(adapter);
-	ixgbe_setup_low_power_mode(adapter);
-	IXGBE_CORE_UNLOCK(adapter);
 
 	ixgbe_free_softint(adapter);
 



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

2019-07-30 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Jul 30 08:38:04 UTC 2019

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

Log Message:
 It's not required to call ixv_stop() twice in ixv_detach().


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

2019-07-30 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Jul 30 08:38:04 UTC 2019

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

Log Message:
 It's not required to call ixv_stop() twice in ixv_detach().


To generate a diff of this commit:
cvs rdiff -u -r1.124 -r1.125 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/ixv.c
diff -u src/sys/dev/pci/ixgbe/ixv.c:1.124 src/sys/dev/pci/ixgbe/ixv.c:1.125
--- src/sys/dev/pci/ixgbe/ixv.c:1.124	Fri Jul 26 03:27:24 2019
+++ src/sys/dev/pci/ixgbe/ixv.c	Tue Jul 30 08:38:03 2019
@@ -1,4 +1,4 @@
-/*$NetBSD: ixv.c,v 1.124 2019/07/26 03:27:24 msaitoh Exp $*/
+/*$NetBSD: ixv.c,v 1.125 2019/07/30 08:38:03 msaitoh Exp $*/
 
 /**
 
@@ -593,10 +593,6 @@ ixv_detach(device_t dev, int flags)
 	}
 #endif
 
-	IXGBE_CORE_LOCK(adapter);
-	ixv_stop(adapter);
-	IXGBE_CORE_UNLOCK(adapter);
-
 	for (int i = 0; i < adapter->num_queues; i++, que++, txr++) {
 		if (!(adapter->feat_en & IXGBE_FEATURE_LEGACY_TX))
 			softint_disestablish(txr->txr_si);



CVS commit: src/external/bsd/libarchive/bin

2019-07-30 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Jul 30 08:05:22 UTC 2019

Modified Files:
src/external/bsd/libarchive/bin: Makefile.inc

Log Message:
Add libpthread to DPADD and LDADD, as libarchive now references it


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/libarchive/bin/Makefile.inc

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

Modified files:

Index: src/external/bsd/libarchive/bin/Makefile.inc
diff -u src/external/bsd/libarchive/bin/Makefile.inc:1.4 src/external/bsd/libarchive/bin/Makefile.inc:1.5
--- src/external/bsd/libarchive/bin/Makefile.inc:1.4	Thu Apr 20 13:11:04 2017
+++ src/external/bsd/libarchive/bin/Makefile.inc	Tue Jul 30 08:05:22 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.4 2017/04/20 13:11:04 joerg Exp $
+# $NetBSD: Makefile.inc,v 1.5 2019/07/30 08:05:22 martin Exp $
 
 .include "../Makefile.inc"
 
@@ -8,6 +8,9 @@ BINDIR=		/bin
 LDSTATIC?=	-static
 .endif
 
-DPADD=	${LIBARCHIVE_FE} ${LIBARCHIVE} ${LIBEXPAT} ${LIBBZ2} ${LIBLZMA} ${LIBZ} ${LIBCRYPTO}
-LDADD=	-L${LIBARCHIVE_FE_DIR} -larchive_fe -larchive -lexpat -lbz2 -llzma -lz -lcrypto
+DPADD=	${LIBARCHIVE_FE} ${LIBARCHIVE} ${LIBEXPAT} ${LIBBZ2} ${LIBLZMA} ${LIBZ} \
+	${LIBCRYPTO} ${LIBPTHREAD}
+LDADD=	-L${LIBARCHIVE_FE_DIR} -larchive_fe -larchive -lexpat -lbz2 -llzma -lz \
+	-lcrypto -lpthread
+
 CPPFLAGS+=	-I${LIBARCHIVEDIR}/libarchive_fe



CVS commit: src/external/bsd/libarchive/bin

2019-07-30 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Jul 30 08:05:22 UTC 2019

Modified Files:
src/external/bsd/libarchive/bin: Makefile.inc

Log Message:
Add libpthread to DPADD and LDADD, as libarchive now references it


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/libarchive/bin/Makefile.inc

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



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

2019-07-30 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Jul 30 06:57:02 UTC 2019

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

Log Message:
Fix loop to calculate prescaler divisor.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arm/cortex/a9wdt.c

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



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

2019-07-30 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Jul 30 06:57:02 UTC 2019

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

Log Message:
Fix loop to calculate prescaler divisor.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arm/cortex/a9wdt.c

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

Modified files:

Index: src/sys/arch/arm/cortex/a9wdt.c
diff -u src/sys/arch/arm/cortex/a9wdt.c:1.7 src/sys/arch/arm/cortex/a9wdt.c:1.8
--- src/sys/arch/arm/cortex/a9wdt.c:1.7	Fri Dec 29 11:07:03 2017
+++ src/sys/arch/arm/cortex/a9wdt.c	Tue Jul 30 06:57:02 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: a9wdt.c,v 1.7 2017/12/29 11:07:03 skrll Exp $	*/
+/*	$NetBSD: a9wdt.c,v 1.8 2019/07/30 06:57:02 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: a9wdt.c,v 1.7 2017/12/29 11:07:03 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: a9wdt.c,v 1.8 2019/07/30 06:57:02 skrll Exp $");
 
 #include 
 #include 
@@ -214,7 +214,7 @@ a9wdt_attach(device_t parent, device_t s
 		/*
 		 * Let's hope the timer frequency isn't prime.
 		 */
-		for (size_t div = 256; div >= 2; div++) {
+		for (size_t div = 256; div >= 2; div--) {
 			if (sc->sc_freq % div == 0) {
 sc->sc_wdog_prescaler = div;
 break;



CVS commit: src/sys/arch

2019-07-30 Thread Kenichi Hashimoto
Module Name:src
Committed By:   hkenken
Date:   Tue Jul 30 06:52:58 UTC 2019

Modified Files:
src/sys/arch/arm/imx: imxi2c.c
src/sys/arch/arm/imx/fdt: files.imx6
src/sys/arch/evbarm/conf: IMX
Added Files:
src/sys/arch/arm/imx/fdt: imx6_i2c.c

Log Message:
Add IIC support.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/imx/imxi2c.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/imx/fdt/files.imx6
cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/imx/fdt/imx6_i2c.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/evbarm/conf/IMX

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



CVS commit: src/sys/arch

2019-07-30 Thread Kenichi Hashimoto
Module Name:src
Committed By:   hkenken
Date:   Tue Jul 30 06:52:58 UTC 2019

Modified Files:
src/sys/arch/arm/imx: imxi2c.c
src/sys/arch/arm/imx/fdt: files.imx6
src/sys/arch/evbarm/conf: IMX
Added Files:
src/sys/arch/arm/imx/fdt: imx6_i2c.c

Log Message:
Add IIC support.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/imx/imxi2c.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/imx/fdt/files.imx6
cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/imx/fdt/imx6_i2c.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/evbarm/conf/IMX

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/imx/imxi2c.c
diff -u src/sys/arch/arm/imx/imxi2c.c:1.2 src/sys/arch/arm/imx/imxi2c.c:1.3
--- src/sys/arch/arm/imx/imxi2c.c:1.2	Fri Mar 27 05:31:23 2015
+++ src/sys/arch/arm/imx/imxi2c.c	Tue Jul 30 06:52:57 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: imxi2c.c,v 1.2 2015/03/27 05:31:23 hkenken Exp $	*/
+/*	$NetBSD: imxi2c.c,v 1.3 2019/07/30 06:52:57 hkenken Exp $	*/
 
 /*
  * Copyright (c) 2012, 2015 Genetec Corporation.  All rights reserved.
@@ -27,9 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: imxi2c.c,v 1.2 2015/03/27 05:31:23 hkenken Exp $");
-
-#include "opt_imx.h"
+__KERNEL_RCSID(0, "$NetBSD: imxi2c.c,v 1.3 2019/07/30 06:52:57 hkenken Exp $");
 
 #include 
 #include 
@@ -39,12 +37,10 @@ __KERNEL_RCSID(0, "$NetBSD: imxi2c.c,v 1
 #include 
 #include 
 
-struct clk_div {
+static const struct clk_div {
 	uint8_t ic_val;
 	int div;
-};
-
-static const struct clk_div imxi2c_clk_div[] = {
+} imxi2c_clk_div[] = {
 	{0x20, 22},   {0x21, 24},   {0x22, 26},   {0x23, 28},
 	{0x00, 30},   {0x01, 32},   {0x24, 32},   {0x02, 36},
 	{0x25, 36},   {0x26, 40},   {0x03, 42},   {0x27, 44},

Index: src/sys/arch/arm/imx/fdt/files.imx6
diff -u src/sys/arch/arm/imx/fdt/files.imx6:1.3 src/sys/arch/arm/imx/fdt/files.imx6:1.4
--- src/sys/arch/arm/imx/fdt/files.imx6:1.3	Tue Jul 30 06:26:31 2019
+++ src/sys/arch/arm/imx/fdt/files.imx6	Tue Jul 30 06:52:57 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: files.imx6,v 1.3 2019/07/30 06:26:31 hkenken Exp $
+#	$NetBSD: files.imx6,v 1.4 2019/07/30 06:52:57 hkenken Exp $
 #
 # Configuration info for the Freescale i.MX6
 #
@@ -78,3 +78,9 @@ device	imxpcie: pcibus
 attach	imxpcie at fdt with imxpcie_fdt
 file	arch/arm/imx/imxpcie.c			imxpcie
 file	arch/arm/imx/fdt/imx6_pcie.c		imxpcie_fdt
+
+# iMX iic Controler
+device	imxi2c: motoi2c, i2cbus, i2cexec
+attach	imxi2c at fdt
+file	arch/arm/imx/imxi2c.c			imxi2c
+file	arch/arm/imx/fdt/imx6_i2c.c		imxi2c

Index: src/sys/arch/evbarm/conf/IMX
diff -u src/sys/arch/evbarm/conf/IMX:1.1 src/sys/arch/evbarm/conf/IMX:1.2
--- src/sys/arch/evbarm/conf/IMX:1.1	Wed Jul 24 13:12:34 2019
+++ src/sys/arch/evbarm/conf/IMX	Tue Jul 30 06:52:57 2019
@@ -1,5 +1,5 @@
 #
-#	$NetBSD: IMX,v 1.1 2019/07/24 13:12:34 hkenken Exp $
+#	$NetBSD: IMX,v 1.2 2019/07/30 06:52:57 hkenken Exp $
 #
 #	NXP(Freescale) I.MX family SoCs
 #
@@ -130,5 +130,9 @@ pci*		at imxpcie?
 ppb*		at pci? dev ? function ?
 pci*		at ppb?
 
+# IIC
+imxi2c* 	at fdt?
+iic*		at imxi2c?
+
 cinclude "arch/evbarm/conf/IMX.local"
 

Added files:

Index: src/sys/arch/arm/imx/fdt/imx6_i2c.c
diff -u /dev/null src/sys/arch/arm/imx/fdt/imx6_i2c.c:1.1
--- /dev/null	Tue Jul 30 06:52:58 2019
+++ src/sys/arch/arm/imx/fdt/imx6_i2c.c	Tue Jul 30 06:52:57 2019
@@ -0,0 +1,80 @@
+/*	$NetBSD: imx6_i2c.c,v 1.1 2019/07/30 06:52:57 hkenken Exp $	*/
+/*-
+ * Copyright (c) 2019 Genetec Corporation.  All rights reserved.
+ * Written by Hashimoto Kenichi for Genetec Corporation.
+ *
+ * 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 AUTHOR ``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 AUTHOR 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: imx6_i2c.c,v 1.1 2019/07/30 06:52:57 hkenken Exp 

CVS commit: src/sys/dev/usb

2019-07-30 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Jul 30 06:35:03 UTC 2019

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

Log Message:
Whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/usb/if_smscvar.h

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

Modified files:

Index: src/sys/dev/usb/if_smscvar.h
diff -u src/sys/dev/usb/if_smscvar.h:1.6 src/sys/dev/usb/if_smscvar.h:1.7
--- src/sys/dev/usb/if_smscvar.h:1.6	Sat Sep  8 13:10:08 2018
+++ src/sys/dev/usb/if_smscvar.h	Tue Jul 30 06:35:03 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_smscvar.h,v 1.6 2018/09/08 13:10:08 mlelstv Exp $	*/
+/*	$NetBSD: if_smscvar.h,v 1.7 2019/07/30 06:35:03 skrll Exp $	*/
 
 /*	$OpenBSD: if_smscreg.h,v 1.2 2012/09/27 12:38:11 jsg Exp $	*/
 /*-
@@ -98,7 +98,6 @@ struct smsc_softc {
 #define	SMSC_FLAG_LINK  0x0001
 
 	struct if_percpuq *sc_ipq;		/* softint-based input queues */
-
 };
 
 #define SMSC_MIN_BUFSZ		2048



CVS commit: src/sys/dev/usb

2019-07-30 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Jul 30 06:35:03 UTC 2019

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

Log Message:
Whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/usb/if_smscvar.h

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



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

2019-07-30 Thread Kenichi Hashimoto
Module Name:src
Committed By:   hkenken
Date:   Tue Jul 30 06:26:31 UTC 2019

Modified Files:
src/sys/arch/arm/imx: if_enet.c if_enet_imx6.c if_enet_imx7.c
src/sys/arch/arm/imx/fdt: files.imx6 if_enet_imx.c

Log Message:
Remove fdtbus_gpio_release() from enet_phy_reset().


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/arm/imx/if_enet.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/imx/if_enet_imx6.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/imx/if_enet_imx7.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/imx/fdt/files.imx6
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/imx/fdt/if_enet_imx.c

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

Modified files:

Index: src/sys/arch/arm/imx/if_enet.c
diff -u src/sys/arch/arm/imx/if_enet.c:1.24 src/sys/arch/arm/imx/if_enet.c:1.25
--- src/sys/arch/arm/imx/if_enet.c:1.24	Tue Jul 23 06:36:36 2019
+++ src/sys/arch/arm/imx/if_enet.c	Tue Jul 30 06:26:31 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_enet.c,v 1.24 2019/07/23 06:36:36 hkenken Exp $	*/
+/*	$NetBSD: if_enet.c,v 1.25 2019/07/30 06:26:31 hkenken Exp $	*/
 
 /*
  * Copyright (c) 2014 Ryo Shimizu 
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_enet.c,v 1.24 2019/07/23 06:36:36 hkenken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_enet.c,v 1.25 2019/07/30 06:26:31 hkenken Exp $");
 
 #include "vlan.h"
 
@@ -166,9 +166,6 @@ static void enet_drain_rxbuf(struct enet
 static int enet_alloc_dma(struct enet_softc *, size_t, void **,
 			  bus_dmamap_t *);
 
-CFATTACH_DECL_NEW(enet, sizeof(struct enet_softc),
-enet_match, enet_attach, NULL, NULL);
-
 int
 enet_attach_common(device_t self)
 {

Index: src/sys/arch/arm/imx/if_enet_imx6.c
diff -u src/sys/arch/arm/imx/if_enet_imx6.c:1.5 src/sys/arch/arm/imx/if_enet_imx6.c:1.6
--- src/sys/arch/arm/imx/if_enet_imx6.c:1.5	Tue Jul 23 06:36:36 2019
+++ src/sys/arch/arm/imx/if_enet_imx6.c	Tue Jul 30 06:26:31 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_enet_imx6.c,v 1.5 2019/07/23 06:36:36 hkenken Exp $	*/
+/*	$NetBSD: if_enet_imx6.c,v 1.6 2019/07/30 06:26:31 hkenken Exp $	*/
 
 /*
  * Copyright (c) 2014 Ryo Shimizu 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_enet_imx6.c,v 1.5 2019/07/23 06:36:36 hkenken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_enet_imx6.c,v 1.6 2019/07/30 06:26:31 hkenken Exp $");
 
 #include "locators.h"
 #include "imxccm.h"
@@ -47,6 +47,9 @@ __KERNEL_RCSID(0, "$NetBSD: if_enet_imx6
 #include 
 #include 
 
+CFATTACH_DECL_NEW(enet, sizeof(struct enet_softc),
+enet_match, enet_attach, NULL, NULL);
+
 static int enet_init_clocks(struct enet_softc *);
 
 int

Index: src/sys/arch/arm/imx/if_enet_imx7.c
diff -u src/sys/arch/arm/imx/if_enet_imx7.c:1.3 src/sys/arch/arm/imx/if_enet_imx7.c:1.4
--- src/sys/arch/arm/imx/if_enet_imx7.c:1.3	Tue Jul 23 06:36:36 2019
+++ src/sys/arch/arm/imx/if_enet_imx7.c	Tue Jul 30 06:26:31 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_enet_imx7.c,v 1.3 2019/07/23 06:36:36 hkenken Exp $	*/
+/*	$NetBSD: if_enet_imx7.c,v 1.4 2019/07/30 06:26:31 hkenken Exp $	*/
 
 /*
  * Copyright (c) 2014 Ryo Shimizu 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_enet_imx7.c,v 1.3 2019/07/23 06:36:36 hkenken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_enet_imx7.c,v 1.4 2019/07/30 06:26:31 hkenken Exp $");
 
 #include "locators.h"
 #include "imxccm.h"
@@ -46,6 +46,9 @@ __KERNEL_RCSID(0, "$NetBSD: if_enet_imx7
 #include 
 #include 
 
+CFATTACH_DECL_NEW(enet, sizeof(struct enet_softc),
+enet_match, enet_attach, NULL, NULL);
+
 static void get_mac_from_ocotp(struct enet_softc *, device_t self,
 const char *);
 

Index: src/sys/arch/arm/imx/fdt/files.imx6
diff -u src/sys/arch/arm/imx/fdt/files.imx6:1.2 src/sys/arch/arm/imx/fdt/files.imx6:1.3
--- src/sys/arch/arm/imx/fdt/files.imx6:1.2	Sat Jul 27 08:02:04 2019
+++ src/sys/arch/arm/imx/fdt/files.imx6	Tue Jul 30 06:26:31 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: files.imx6,v 1.2 2019/07/27 08:02:04 skrll Exp $
+#	$NetBSD: files.imx6,v 1.3 2019/07/30 06:26:31 hkenken Exp $
 #
 # Configuration info for the Freescale i.MX6
 #
@@ -48,9 +48,9 @@ defflag opt_imxuart.h			IMXUARTCONSOLE
 
 # FEC
 device	enet: ether, ifnet, arp, mii, bus_dma_generic
-attach	enet at fdt
+attach	enet at fdt with enet_fdt
 file	arch/arm/imx/if_enet.c		enet
-file	arch/arm/imx/fdt/if_enet_imx.c	enet
+file	arch/arm/imx/fdt/if_enet_imx.c	enet_fdt
 
 # SATA
 attach	ahcisata at fdt with imx6_ahcisata

Index: src/sys/arch/arm/imx/fdt/if_enet_imx.c
diff -u src/sys/arch/arm/imx/fdt/if_enet_imx.c:1.1 src/sys/arch/arm/imx/fdt/if_enet_imx.c:1.2
--- src/sys/arch/arm/imx/fdt/if_enet_imx.c:1.1	Wed Jul 24 13:12:33 2019
+++ src/sys/arch/arm/imx/fdt/if_enet_imx.c	Tue Jul 30 06:26:31 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_enet_imx.c,v 1.1 2019/07/24 13:12:33 hkenken Exp $	*/
+/*	$NetBSD: if_enet_imx.c,v 1.2 2019/07/30 06:26:31 hkenken Exp $	*/
 /*-
  * Copyright (c) 2019 Genetec Corporation.  All rights reserved.
  *