CVS commit: src/usr.bin/vmstat

2017-01-04 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Thu Jan  5 07:53:20 UTC 2017

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

Log Message:
"vmstat -ie[v]" auto fit to minimum columns

Reviewed by msaitoh@


To generate a diff of this commit:
cvs rdiff -u -r1.215 -r1.216 src/usr.bin/vmstat/vmstat.c

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

Modified files:

Index: src/usr.bin/vmstat/vmstat.c
diff -u src/usr.bin/vmstat/vmstat.c:1.215 src/usr.bin/vmstat/vmstat.c:1.216
--- src/usr.bin/vmstat/vmstat.c:1.215	Thu Jan  5 03:42:27 2017
+++ src/usr.bin/vmstat/vmstat.c	Thu Jan  5 07:53:20 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: vmstat.c,v 1.215 2017/01/05 03:42:27 pgoyette Exp $ */
+/* $NetBSD: vmstat.c,v 1.216 2017/01/05 07:53:20 ryo Exp $ */
 
 /*-
  * Copyright (c) 1998, 2000, 2001, 2007 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 19
 #if 0
 static char sccsid[] = "@(#)vmstat.c	8.2 (Berkeley) 3/1/95";
 #else
-__RCSID("$NetBSD: vmstat.c,v 1.215 2017/01/05 03:42:27 pgoyette Exp $");
+__RCSID("$NetBSD: vmstat.c,v 1.216 2017/01/05 07:53:20 ryo Exp $");
 #endif
 #endif /* not lint */
 
@@ -1216,10 +1216,11 @@ dointr(int verbose)
 
 	inttotal = 0;
 	uptime = getuptime();
-	(void)printf("%-34s %16s %8s\n", "interrupt", "total", "rate");
 	nintr = intrnl[X_EINTRCNT].n_value - intrnl[X_INTRCNT].n_value;
 	inamlen = intrnl[X_EINTRNAMES].n_value - intrnl[X_INTRNAMES].n_value;
 	if (nintr != 0 && inamlen != 0) {
+		(void)printf("%-34s %16s %8s\n", "interrupt", "total", "rate");
+
 		ointrcnt = intrcnt = malloc((size_t)nintr);
 		ointrname = intrname = malloc((size_t)inamlen);
 		if (intrcnt == NULL || intrname == NULL)
@@ -1250,19 +1251,17 @@ doevcnt(int verbose, int type)
 	uint64_t counttotal, uptime;
 	struct evcntlist allevents;
 	struct evcnt evcnt, *evptr;
+	size_t evlen_max, total_max, rate_max;
 	char evgroup[EVCNT_STRING_MAX], evname[EVCNT_STRING_MAX];
 
 	counttotal = 0;
 	uptime = getuptime();
-	if (type == EVCNT_TYPE_ANY)
-		(void)printf("%-34s %16s %8s %s\n", "event", "total", "rate",
-		"type");
 
 	if (memf == NULL) do {
 		const int mib[4] = { CTL_KERN, KERN_EVCNT, type,
 		verbose ? KERN_EVCNT_COUNT_ANY : KERN_EVCNT_COUNT_NONZERO };
-		size_t buflen = 0;
-		void *buf = NULL;
+		size_t buflen0, buflen = 0;
+		void *buf0, *buf = NULL;
 		const struct evcnt_sysctl *evs, *last_evs;
 		for (;;) {
 			size_t newlen;
@@ -1285,33 +1284,80 @@ doevcnt(int verbose, int type)
 free(buf);
 			buflen = newlen;
 		}
-		evs = buf;
+		buflen0 = buflen;
+		evs = buf0 = buf;
+		last_evs = (void *)((char *)buf + buflen);
+		buflen /= sizeof(uint64_t);
+		/* calc columns */
+		evlen_max = 0;
+		total_max = sizeof("total") - 1;
+		rate_max = sizeof("rate") - 1;
+		while (evs < last_evs
+		&& buflen >= sizeof(*evs)/sizeof(uint64_t)
+		&& buflen >= evs->ev_len) {
+			char cbuf[64];
+			size_t len;
+			len = strlen(evs->ev_strings + evs->ev_grouplen + 1);
+			len += evs->ev_grouplen + 1;
+			if (evlen_max < len)
+evlen_max= len;
+			len = snprintf(cbuf, sizeof(cbuf), "%"PRIu64,
+			evs->ev_count);
+			if (total_max < len)
+total_max = len;
+			len = snprintf(cbuf, sizeof(cbuf), "%"PRIu64,
+			evs->ev_count / uptime);
+			if (rate_max < len)
+rate_max = len;
+			buflen -= evs->ev_len;
+			evs = (const void *)
+			((const uint64_t *)evs + evs->ev_len);
+		}
+
+		(void)printf(type == EVCNT_TYPE_ANY ?
+		"%-*s  %*s %*s %s\n" :
+		"%-*s  %*s %*s\n",
+		(int)evlen_max, "interrupt",
+		(int)total_max, "total",
+		(int)rate_max, "rate",
+		"type");
+
+		buflen = buflen0;
+		evs = buf0;
 		last_evs = (void *)((char *)buf + buflen);
 		buflen /= sizeof(uint64_t);
 		while (evs < last_evs
 		&& buflen >= sizeof(*evs)/sizeof(uint64_t)
 		&& buflen >= evs->ev_len) {
 			(void)printf(type == EVCNT_TYPE_ANY ?
-			"%s %s%*s %16"PRIu64" %8"PRIu64" %s\n" :
-			"%s %s%*s %16"PRIu64" %8"PRIu64"\n",
+			"%s %s%*s  %*"PRIu64" %*"PRIu64" %s\n" :
+			"%s %s%*s  %*"PRIu64" %*"PRIu64"\n",
 			evs->ev_strings,
 			evs->ev_strings + evs->ev_grouplen + 1,
-			34 - (evs->ev_grouplen + 1 + evs->ev_namelen), "",
-			evs->ev_count,
-			evs->ev_count / uptime,
+			(int)evlen_max - (evs->ev_grouplen + 1
+			+ evs->ev_namelen), "",
+			(int)total_max, evs->ev_count,
+			(int)rate_max, evs->ev_count / uptime,
 			(evs->ev_type < __arraycount(evtypes) ?
-evtypes[evs->ev_type] : "?"));
+			evtypes[evs->ev_type] : "?"));
 			buflen -= evs->ev_len;
 			counttotal += evs->ev_count;
-			evs = (const void *)((const uint64_t *)evs + evs->ev_len);
+			evs = (const void *)
+			((const uint64_t *)evs + evs->ev_len);
 		}
 		free(buf);
 		if (type != EVCNT_TYPE_ANY)
-			(void)printf("%-34s %16"PRIu64" %8"PRIu64"\n",
-			"Total", counttotal, counttotal / uptime);
+			(void)printf("%-*s  %*"PRIu64" %*"PRIu64"\n",
+			

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

2017-01-04 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Jan  5 05:53:23 UTC 2017

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

Log Message:
 Fix INIT_DEBUGOUT() messages.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/dev/pci/ixgbe/ix_txrx.c
cvs rdiff -u -r1.58 -r1.59 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.30 -r1.31 src/sys/dev/pci/ixgbe/ixv.c

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

Modified files:

Index: src/sys/dev/pci/ixgbe/ix_txrx.c
diff -u src/sys/dev/pci/ixgbe/ix_txrx.c:1.13 src/sys/dev/pci/ixgbe/ix_txrx.c:1.14
--- src/sys/dev/pci/ixgbe/ix_txrx.c:1.13	Fri Dec 16 08:24:40 2016
+++ src/sys/dev/pci/ixgbe/ix_txrx.c	Thu Jan  5 05:53:23 2017
@@ -59,7 +59,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 /*$FreeBSD: head/sys/dev/ixgbe/ix_txrx.c 301538 2016-06-07 04:51:50Z sephe $*/
-/*$NetBSD: ix_txrx.c,v 1.13 2016/12/16 08:24:40 msaitoh Exp $*/
+/*$NetBSD: ix_txrx.c,v 1.14 2017/01/05 05:53:23 msaitoh Exp $*/
 
 #include "opt_inet.h"
 #include "opt_inet6.h"
@@ -693,7 +693,7 @@ ixgbe_free_transmit_buffers(struct tx_ri
 	struct ixgbe_tx_buf *tx_buffer;
 	int i;
 
-	INIT_DEBUGOUT("ixgbe_free_transmit_ring: begin");
+	INIT_DEBUGOUT("ixgbe_free_transmit_buffers: begin");
 
 	if (txr->tx_buffers == NULL)
 		return;

Index: src/sys/dev/pci/ixgbe/ixgbe.c
diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.58 src/sys/dev/pci/ixgbe/ixgbe.c:1.59
--- src/sys/dev/pci/ixgbe/ixgbe.c:1.58	Wed Dec 28 09:29:35 2016
+++ src/sys/dev/pci/ixgbe/ixgbe.c	Thu Jan  5 05:53:23 2017
@@ -59,7 +59,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 /*$FreeBSD: head/sys/dev/ixgbe/if_ix.c 302384 2016-07-07 03:39:18Z sbruno $*/
-/*$NetBSD: ixgbe.c,v 1.58 2016/12/28 09:29:35 msaitoh Exp $*/
+/*$NetBSD: ixgbe.c,v 1.59 2017/01/05 05:53:23 msaitoh Exp $*/
 
 #include "opt_inet.h"
 #include "opt_inet6.h"
@@ -413,7 +413,7 @@ ixgbe_lookup(const struct pci_attach_arg
 	pcireg_t subid;
 	ixgbe_vendor_info_t *ent;
 
-	INIT_DEBUGOUT("ixgbe_probe: begin");
+	INIT_DEBUGOUT("ixgbe_lookup: begin");
 
 	if (PCI_VENDOR(pa->pa_id) != IXGBE_INTEL_VENDOR_ID)
 		return NULL;

Index: src/sys/dev/pci/ixgbe/ixv.c
diff -u src/sys/dev/pci/ixgbe/ixv.c:1.30 src/sys/dev/pci/ixgbe/ixv.c:1.31
--- src/sys/dev/pci/ixgbe/ixv.c:1.30	Fri Dec 16 08:30:20 2016
+++ src/sys/dev/pci/ixgbe/ixv.c	Thu Jan  5 05:53:23 2017
@@ -31,7 +31,7 @@
 
 **/
 /*$FreeBSD: head/sys/dev/ixgbe/if_ixv.c 302384 2016-07-07 03:39:18Z sbruno $*/
-/*$NetBSD: ixv.c,v 1.30 2016/12/16 08:30:20 msaitoh Exp $*/
+/*$NetBSD: ixv.c,v 1.31 2017/01/05 05:53:23 msaitoh Exp $*/
 
 #include "opt_inet.h"
 #include "opt_inet6.h"
@@ -253,7 +253,7 @@ ixv_lookup(const struct pci_attach_args 
 	pcireg_t subid;
 	ixgbe_vendor_info_t *ent;
 
-	INIT_DEBUGOUT("ixv_probe: begin");
+	INIT_DEBUGOUT("ixv_lookup: begin");
 
 	if (PCI_VENDOR(pa->pa_id) != IXGBE_INTEL_VENDOR_ID)
 		return NULL;



CVS commit: src

2017-01-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Jan  5 05:40:46 UTC 2017

Modified Files:
src: UPDATING

Log Message:
xinput update build hint


To generate a diff of this commit:
cvs rdiff -u -r1.276 -r1.277 src/UPDATING

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

Modified files:

Index: src/UPDATING
diff -u src/UPDATING:1.276 src/UPDATING:1.277
--- src/UPDATING:1.276	Wed Jan  4 19:34:47 2017
+++ src/UPDATING	Thu Jan  5 05:40:46 2017
@@ -1,4 +1,4 @@
-$NetBSD: UPDATING,v 1.276 2017/01/04 19:34:47 martin Exp $
+$NetBSD: UPDATING,v 1.277 2017/01/05 05:40:46 martin Exp $
 
 This file (UPDATING) is intended to be a brief reference to recent
 changes that might cause problems in the build process, and a guide for
@@ -19,6 +19,11 @@ See also: BUILDING, build.sh, Makefile.
 Recent changes:
 ^^^
 
+20170104:
+	xinput build options have changed.
+	Remove the obj directory (external/mit/xorg/bin/xinput)
+	if you build.sh -u
+
 20170103:
 	a new version of flex has been imported.
 	Remove the file from obj (external/bsd/flex)



CVS commit: src/usr.bin/vmstat

2017-01-04 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Jan  5 03:42:27 UTC 2017

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

Log Message:
Adapt to use of bintime(9) for kernel history timestamps (7.99.55).


To generate a diff of this commit:
cvs rdiff -u -r1.214 -r1.215 src/usr.bin/vmstat/vmstat.c

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

Modified files:

Index: src/usr.bin/vmstat/vmstat.c
diff -u src/usr.bin/vmstat/vmstat.c:1.214 src/usr.bin/vmstat/vmstat.c:1.215
--- src/usr.bin/vmstat/vmstat.c:1.214	Wed Jan  4 01:29:18 2017
+++ src/usr.bin/vmstat/vmstat.c	Thu Jan  5 03:42:27 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: vmstat.c,v 1.214 2017/01/04 01:29:18 pgoyette Exp $ */
+/* $NetBSD: vmstat.c,v 1.215 2017/01/05 03:42:27 pgoyette Exp $ */
 
 /*-
  * Copyright (c) 1998, 2000, 2001, 2007 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 19
 #if 0
 static char sccsid[] = "@(#)vmstat.c	8.2 (Berkeley) 3/1/95";
 #else
-__RCSID("$NetBSD: vmstat.c,v 1.214 2017/01/04 01:29:18 pgoyette Exp $");
+__RCSID("$NetBSD: vmstat.c,v 1.215 2017/01/05 03:42:27 pgoyette Exp $");
 #endif
 #endif /* not lint */
 
@@ -2069,6 +2069,7 @@ void
 hist_dodump(struct kern_history *histp)
 {
 	struct kern_history_ent *histents, *e;
+	struct timeval tv;
 	size_t histsize;
 	char *fmt = NULL, *fn = NULL;
 	size_t fmtlen = 0, fnlen = 0;
@@ -2110,8 +2111,9 @@ hist_dodump(struct kern_history *histp)
 			deref_kptr(e->fn, fn, fnlen, "function name");
 			fn[fnlen] = '\0';
 
-			(void)printf("%06ld.%06ld ", (long int)e->tv.tv_sec,
-			(long int)e->tv.tv_usec);
+			bintime2timeval(>bt, );
+			(void)printf("%06ld.%06ld ", (long int)tv.tv_sec,
+			(long int)tv.tv_usec);
 			(void)printf("%s#%ld@%d: ", fn, e->call, e->cpunum);
 			(void)printf(fmt, e->v[0], e->v[1], e->v[2], e->v[3]);
 			(void)putchar('\n');
@@ -2198,6 +2200,7 @@ hist_traverse_sysctl(int todo, const cha
 hist_dodump_sysctl(int mib[], unsigned int miblen)
  {
 	struct sysctl_history *hist;
+	struct timeval tv;
 	struct sysctl_history_event *e;
  	size_t histsize;
 	char *strp;
@@ -2231,9 +2234,9 @@ hist_dodump_sysctl(int mib[], unsigned i
 		if (e->she_fmtoffset != 0) {
 			fmt = [e->she_fmtoffset];
 			fn = [e->she_funcoffset];
+			bintime2timeval(>she_bintime, );
 			(void)printf("%06ld.%06ld %s#%"PRIu64"@%"PRIu32": ",
-			(long int)e->she_time_sec,
-			(long int)e->she_time_usec,
+			(long int)tv.tv_sec, (long int)tv.tv_usec,
 			fn, e->she_callnumber, e->she_cpunum);
 			(void)printf(fmt, e->she_values[0], e->she_values[1],
 			 e->she_values[2], e->she_values[3]);



CVS commit: src/sys

2017-01-04 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Jan  5 03:40:33 UTC 2017

Modified Files:
src/sys/kern: kern_history.c
src/sys/sys: kernhist.h param.h

Log Message:
By popular demand, update kernhist to use bintime(9) as the basis for
its timestamps.

As this changes storage structures for data passed between kernel and
userland, welcome to 7.99.55!

XXX Output routines still use microsecond resolution when printf()ing.

XXX Possible future feature would be addition of option to use
XXX getbintime(9) for less time-critical histories.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/kern/kern_history.c
cvs rdiff -u -r1.16 -r1.17 src/sys/sys/kernhist.h
cvs rdiff -u -r1.521 -r1.522 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/sys/kern/kern_history.c
diff -u src/sys/kern/kern_history.c:1.10 src/sys/kern/kern_history.c:1.11
--- src/sys/kern/kern_history.c:1.10	Wed Jan  4 01:05:58 2017
+++ src/sys/kern/kern_history.c	Thu Jan  5 03:40:33 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_history.c,v 1.10 2017/01/04 01:05:58 pgoyette Exp $	 */
+/*	$NetBSD: kern_history.c,v 1.11 2017/01/05 03:40:33 pgoyette Exp $	 */
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -33,7 +33,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_history.c,v 1.10 2017/01/04 01:05:58 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_history.c,v 1.11 2017/01/05 03:40:33 pgoyette Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kernhist.h"
@@ -120,7 +120,7 @@ kernhist_dump(struct kern_history *l, vo
 static void
 kernhist_dump_histories(struct kern_history *hists[], void (*pr)(const char *, ...))
 {
-	struct timeval  tv;
+	struct bintime	bt;
 	int	cur[MAXHISTS];
 	int	lcv, hi;
 
@@ -136,7 +136,7 @@ kernhist_dump_histories(struct kern_hist
 	 */
 	for (;;) {
 		hi = -1;
-		tv.tv_sec = tv.tv_usec = 0;
+		bt.sec = 0; bt.frac = 0;
 
 		/* loop over each history */
 		for (lcv = 0; hists[lcv]; lcv++) {
@@ -159,12 +159,12 @@ restart:
 
 			/*
 			 * if the time hasn't been set yet, or this entry is
-			 * earlier than the current tv, set the time and history
+			 * earlier than the current bt, set the time and history
 			 * index.
 			 */
-			if (tv.tv_sec == 0 ||
-			timercmp([lcv]->e[cur[lcv]].tv, , <)) {
-tv = hists[lcv]->e[cur[lcv]].tv;
+			if (bt.sec == 0 ||
+			bintimecmp([lcv]->e[cur[lcv]].bt, , <)) {
+bt = hists[lcv]->e[cur[lcv]].bt;
 hi = lcv;
 			}
 		}
@@ -466,8 +466,7 @@ sysctl_kernhist_helper(SYSCTLFN_ARGS)
 			out_evt->she_fmtoffset = 0;
 			continue;
 		}
-		out_evt->she_time_sec = in_evt->tv.tv_sec;
-		out_evt->she_time_usec = in_evt->tv.tv_usec;
+		out_evt->she_bintime = in_evt->bt;
 		out_evt->she_callnumber = in_evt->call;
 		out_evt->she_cpunum = in_evt->cpunum;
 		out_evt->she_values[0] = in_evt->v[0];

Index: src/sys/sys/kernhist.h
diff -u src/sys/sys/kernhist.h:1.16 src/sys/sys/kernhist.h:1.17
--- src/sys/sys/kernhist.h:1.16	Wed Jan  4 01:52:13 2017
+++ src/sys/sys/kernhist.h	Thu Jan  5 03:40:33 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: kernhist.h,v 1.16 2017/01/04 01:52:13 pgoyette Exp $	*/
+/*	$NetBSD: kernhist.h,v 1.17 2017/01/05 03:40:33 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -46,7 +46,7 @@
  */
 
 struct kern_history_ent {
-	struct timeval tv; 		/* time stamp */
+	struct bintime bt; 		/* time stamp */
 	int cpunum;
 	const char *fmt;		/* printf format */
 	size_t fmtlen;			/* length of printf format */
@@ -80,8 +80,7 @@ struct sysctl_history_list_entry {
 
 /* info for a single history event */
 struct sysctl_history_event {
-	uint64_t	she_time_sec;
-	uint64_t	she_time_usec;
+	struct bintime	she_bintime;
 	uint64_t	she_callnumber;
 	uint64_t	she_values[4];
 	uint32_t	she_cpunum;
@@ -213,7 +212,7 @@ do { \
 	} while (atomic_cas_uint(&(NAME).f, _i_, _j_) != _i_); \
 	struct kern_history_ent * const _e_ = &(NAME).e[_i_]; \
 	if (__predict_true(!cold)) \
-		microtime(&_e_->tv); \
+		bintime(&_e_->bt); \
 	_e_->cpunum = cpu_number(); \
 	_e_->fmt = (FMT); \
 	_e_->fmtlen = strlen(FMT); \
@@ -257,7 +256,10 @@ do { \
 static inline void
 kernhist_entry_print(const struct kern_history_ent *e, void (*pr)(const char *, ...) __printflike(1, 2))
 {
-	pr("%06" PRIu64 ".%06d ", e->tv.tv_sec, e->tv.tv_usec);
+	struct timeval tv;
+
+	bintime2timeval(>bt, );
+	pr("%06" PRIu64 ".%06d ", tv.tv_sec, tv.tv_usec);
 	pr("%s#%ld@%d: ", e->fn, e->call, e->cpunum);
 	pr(e->fmt, e->v[0], e->v[1], e->v[2], e->v[3]);
 	pr("\n");

Index: src/sys/sys/param.h
diff -u src/sys/sys/param.h:1.521 src/sys/sys/param.h:1.522
--- src/sys/sys/param.h:1.521	Mon Jan  2 10:33:28 2017
+++ src/sys/sys/param.h	Thu Jan  5 03:40:33 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: param.h,v 1.521 2017/01/02 10:33:28 hannken Exp $	*/
+/*	$NetBSD: param.h,v 1.522 2017/01/05 03:40:33 pgoyette Exp $	*/
 
 /*-
  * Copyright 

CVS commit: src/sys/kern

2017-01-04 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Jan  5 03:22:20 UTC 2017

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

Log Message:
Actually initialize the sysctl stuff for kernhist!  Missed this file
in earlier commits.


To generate a diff of this commit:
cvs rdiff -u -r1.488 -r1.489 src/sys/kern/init_main.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/init_main.c
diff -u src/sys/kern/init_main.c:1.488 src/sys/kern/init_main.c:1.489
--- src/sys/kern/init_main.c:1.488	Mon Dec 26 23:12:33 2016
+++ src/sys/kern/init_main.c	Thu Jan  5 03:22:20 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: init_main.c,v 1.488 2016/12/26 23:12:33 pgoyette Exp $	*/
+/*	$NetBSD: init_main.c,v 1.489 2017/01/05 03:22:20 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -97,7 +97,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.488 2016/12/26 23:12:33 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.489 2017/01/05 03:22:20 pgoyette Exp $");
 
 #include "opt_ddb.h"
 #include "opt_inet.h"
@@ -115,6 +115,7 @@ __KERNEL_RCSID(0, "$NetBSD: init_main.c,
 #include "opt_ptrace.h"
 #include "opt_rnd_printf.h"
 #include "opt_splash.h"
+#include "opt_kernhist.h"
 
 #if defined(SPLASHSCREEN) && defined(makeoptions_SPLASHSCREEN_IMAGE)
 extern void *_binary_splash_image_start;
@@ -351,6 +352,10 @@ main(void)
 	bufinit();
 	biohist_init();
 
+#ifdef KERNHIST
+	sysctl_kernhist_init();
+#endif
+
 
 #if defined(SPLASHSCREEN) && defined(SPLASHSCREEN_IMAGE)
 	size_t splash_size = (&_binary_splash_image_end -



CVS commit: src/distrib/sets/lists

2017-01-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Jan  5 02:22:19 UTC 2017

Modified Files:
src/distrib/sets/lists/xcomp: mi
src/distrib/sets/lists/xserver: md.alpha md.amd64 md.amiga md.bebox
md.cats md.dreamcast md.evbarm md.evbmips md.ews4800mips md.hp300
md.hpcarm md.hpcmips md.hpcsh md.i386 md.ibmnws md.luna68k
md.mac68k md.macppc md.netwinder md.newsmips md.ofppc md.prep
md.sgimips md.shark md.sparc md.sparc64 md.vax md.zaurus

Log Message:
move xtrans.m4 to comp, since it gets installed with the headers.


To generate a diff of this commit:
cvs rdiff -u -r1.187 -r1.188 src/distrib/sets/lists/xcomp/mi
cvs rdiff -u -r1.45 -r1.46 src/distrib/sets/lists/xserver/md.alpha
cvs rdiff -u -r1.99 -r1.100 src/distrib/sets/lists/xserver/md.amd64
cvs rdiff -u -r1.26 -r1.27 src/distrib/sets/lists/xserver/md.amiga
cvs rdiff -u -r1.15 -r1.16 src/distrib/sets/lists/xserver/md.bebox
cvs rdiff -u -r1.55 -r1.56 src/distrib/sets/lists/xserver/md.cats
cvs rdiff -u -r1.24 -r1.25 src/distrib/sets/lists/xserver/md.dreamcast
cvs rdiff -u -r1.14 -r1.15 src/distrib/sets/lists/xserver/md.evbarm
cvs rdiff -u -r1.9 -r1.10 src/distrib/sets/lists/xserver/md.evbmips
cvs rdiff -u -r1.20 -r1.21 src/distrib/sets/lists/xserver/md.ews4800mips \
src/distrib/sets/lists/xserver/md.hp300
cvs rdiff -u -r1.23 -r1.24 src/distrib/sets/lists/xserver/md.hpcarm
cvs rdiff -u -r1.29 -r1.30 src/distrib/sets/lists/xserver/md.hpcmips
cvs rdiff -u -r1.22 -r1.23 src/distrib/sets/lists/xserver/md.hpcsh
cvs rdiff -u -r1.116 -r1.117 src/distrib/sets/lists/xserver/md.i386
cvs rdiff -u -r1.4 -r1.5 src/distrib/sets/lists/xserver/md.ibmnws
cvs rdiff -u -r1.17 -r1.18 src/distrib/sets/lists/xserver/md.luna68k \
src/distrib/sets/lists/xserver/md.vax
cvs rdiff -u -r1.19 -r1.20 src/distrib/sets/lists/xserver/md.mac68k \
src/distrib/sets/lists/xserver/md.newsmips \
src/distrib/sets/lists/xserver/md.prep \
src/distrib/sets/lists/xserver/md.zaurus
cvs rdiff -u -r1.75 -r1.76 src/distrib/sets/lists/xserver/md.macppc
cvs rdiff -u -r1.37 -r1.38 src/distrib/sets/lists/xserver/md.netwinder
cvs rdiff -u -r1.27 -r1.28 src/distrib/sets/lists/xserver/md.ofppc
cvs rdiff -u -r1.56 -r1.57 src/distrib/sets/lists/xserver/md.sgimips
cvs rdiff -u -r1.51 -r1.52 src/distrib/sets/lists/xserver/md.shark
cvs rdiff -u -r1.66 -r1.67 src/distrib/sets/lists/xserver/md.sparc
cvs rdiff -u -r1.64 -r1.65 src/distrib/sets/lists/xserver/md.sparc64

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

Modified files:

Index: src/distrib/sets/lists/xcomp/mi
diff -u src/distrib/sets/lists/xcomp/mi:1.187 src/distrib/sets/lists/xcomp/mi:1.188
--- src/distrib/sets/lists/xcomp/mi:1.187	Thu Dec 15 07:56:52 2016
+++ src/distrib/sets/lists/xcomp/mi	Wed Jan  4 21:22:19 2017
@@ -1,4 +1,4 @@
-#	 $NetBSD: mi,v 1.187 2016/12/15 12:56:52 kre Exp $
+#	 $NetBSD: mi,v 1.188 2017/01/05 02:22:19 christos Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -4151,6 +4151,7 @@
 ./usr/X11R7/man/man3/XvUngrabPort.3			-unknown-	.man,xorg
 ./usr/X11R7/man/man3/XvVideoNotify.3			-unknown-	.man,xorg
 ./usr/X11R7/man/man3/libXp.3-obsolete-	obsolete
+./usr/X11R7/share/aclocal/xtrans.m4			-unknown-	xorg
 ./usr/X11R7/share/xcb/bigreq.xml			-unknown-	xorg
 ./usr/X11R7/share/xcb/composite.xml			-unknown-	xorg
 ./usr/X11R7/share/xcb/damage.xml			-unknown-	xorg

Index: src/distrib/sets/lists/xserver/md.alpha
diff -u src/distrib/sets/lists/xserver/md.alpha:1.45 src/distrib/sets/lists/xserver/md.alpha:1.46
--- src/distrib/sets/lists/xserver/md.alpha:1.45	Wed Jan  4 10:41:24 2017
+++ src/distrib/sets/lists/xserver/md.alpha	Wed Jan  4 21:22:19 2017
@@ -1,4 +1,4 @@
-# $NetBSD: md.alpha,v 1.45 2017/01/04 15:41:24 christos Exp $
+# $NetBSD: md.alpha,v 1.46 2017/01/05 02:22:19 christos Exp $
 ./usr/X11R7/bin/X	-unknown-	xorg
 ./usr/X11R7/bin/Xorg	-unknown-	xorg
 ./usr/X11R7/bin/cvt	-unknown-	xorg
@@ -403,4 +403,3 @@
 ./usr/X11R7/man/man4/wsfb.4-unknown-	.man,xorg
 ./usr/X11R7/man/man5/xorg.conf.5			-unknown-	.man,xorg
 ./usr/X11R7/share/aclocal/xorg-server.m4		-unknown-	xorg
-./usr/X11R7/share/aclocal/xtrans.m4			-unknown-	xorg

Index: src/distrib/sets/lists/xserver/md.amd64
diff -u src/distrib/sets/lists/xserver/md.amd64:1.99 src/distrib/sets/lists/xserver/md.amd64:1.100
--- src/distrib/sets/lists/xserver/md.amd64:1.99	Wed Jan  4 10:41:24 2017
+++ src/distrib/sets/lists/xserver/md.amd64	Wed Jan  4 21:22:19 2017
@@ -1,4 +1,4 @@
-# $NetBSD: md.amd64,v 1.99 2017/01/04 15:41:24 christos Exp $
+# $NetBSD: md.amd64,v 1.100 2017/01/05 02:22:19 christos Exp $
 ./usr/X11R7/bin/X	-unknown-	xorg
 ./usr/X11R7/bin/Xorg	-unknown-	xorg
 ./usr/X11R7/bin/cvt	-unknown-	xorg
@@ -461,4 +461,3 @@
 ./usr/X11R7/man/man4/xgi.4-unknown-	.man,xorg,xorg_server_ver=118,obsolete
 ./usr/X11R7/man/man5/xorg.conf.5			-unknown-	.man,xorg
 

CVS commit: src/sys/uvm

2017-01-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jan  4 23:59:27 UTC 2017

Modified Files:
src/sys/uvm: Makefile

Log Message:
really, don't install uvm_physseg.h!


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/uvm/Makefile

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

Modified files:

Index: src/sys/uvm/Makefile
diff -u src/sys/uvm/Makefile:1.10 src/sys/uvm/Makefile:1.11
--- src/sys/uvm/Makefile:1.10	Thu Dec 22 08:26:24 2016
+++ src/sys/uvm/Makefile	Wed Jan  4 18:59:27 2017
@@ -1,11 +1,11 @@
-#	$NetBSD: Makefile,v 1.10 2016/12/22 13:26:24 cherry Exp $
+#	$NetBSD: Makefile,v 1.11 2017/01/04 23:59:27 christos Exp $
 
 INCSDIR= /usr/include/uvm
 
 INCS=	uvm.h uvm_amap.h uvm_anon.h uvm_aobj.h uvm_device.h \
 	uvm_extern.h uvm_fault.h uvm_fault_i.h uvm_glue.h \
 	uvm_km.h uvm_loan.h \
-	uvm_map.h uvm_object.h uvm_page.h uvm_physseg.h \
+	uvm_map.h uvm_object.h uvm_page.h \
 	uvm_pager.h uvm_param.h uvm_pdaemon.h uvm_pglist.h \
 	uvm_pmap.h uvm_prot.h uvm_stat.h \
 	uvm_swap.h



CVS commit: src/sys/uvm

2017-01-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jan  4 23:59:49 UTC 2017

Modified Files:
src/sys/uvm: uvm_extern.h

Log Message:
don't include uvm_physseg.h for kmem grovellers.


To generate a diff of this commit:
cvs rdiff -u -r1.202 -r1.203 src/sys/uvm/uvm_extern.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/uvm/uvm_extern.h
diff -u src/sys/uvm/uvm_extern.h:1.202 src/sys/uvm/uvm_extern.h:1.203
--- src/sys/uvm/uvm_extern.h:1.202	Mon Jan  2 15:22:20 2017
+++ src/sys/uvm/uvm_extern.h	Wed Jan  4 18:59:49 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_extern.h,v 1.202 2017/01/02 20:22:20 cherry Exp $	*/
+/*	$NetBSD: uvm_extern.h,v 1.203 2017/01/04 23:59:49 christos Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -472,7 +472,9 @@ extern bool vm_page_zero_enable;
 #if defined(_KERNEL) || defined(_KMEMUSER)
 #include 
 #include 
+#endif
 
+#ifdef _KERNEL
 /*
  * Include the uvm_hotplug(9) API unconditionally until
  * uvm_page_physload() et. al. are obsoleted



CVS commit: xsrc/external/mit/xf86-video-chips/dist/src

2017-01-04 Thread Michael Lorenz
Module Name:xsrc
Committed By:   macallan
Date:   Wed Jan  4 23:55:43 UTC 2017

Modified Files:
xsrc/external/mit/xf86-video-chips/dist/src: ct_driver.c

Log Message:
pci_device_map_legacy() doesn't help us when we need to map VL ranges - just
call mmap() directly on consoleFd for those. Now this works again on shark.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 \
xsrc/external/mit/xf86-video-chips/dist/src/ct_driver.c

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

Modified files:

Index: xsrc/external/mit/xf86-video-chips/dist/src/ct_driver.c
diff -u xsrc/external/mit/xf86-video-chips/dist/src/ct_driver.c:1.24 xsrc/external/mit/xf86-video-chips/dist/src/ct_driver.c:1.25
--- xsrc/external/mit/xf86-video-chips/dist/src/ct_driver.c:1.24	Wed Nov  2 15:56:01 2016
+++ xsrc/external/mit/xf86-video-chips/dist/src/ct_driver.c	Wed Jan  4 23:55:43 2017
@@ -77,6 +77,10 @@
 #include "xf86_OSproc.h"
 #include "xf86Priv.h"
 
+#if defined(HAVE_ISA)
+#include 
+#endif
+
 /* Everything using inb/outb, etc needs "compiler.h" */
 #include "compiler.h"
 
@@ -770,8 +774,10 @@ CHIPSAvailableOptions(int chipid, int bu
 
 #ifdef HAVE_ISA
 if (busid == BUS_ISA) {
-	if ((chip == CHIPS_CT64200) || (chip == CHIPS_CT64300)) 
+	if ((chip == CHIPS_CT64200) || (chip == CHIPS_CT64300)) { 
 	return ChipsWingineOptions;
+	} else if ((chip >= CHIPS_CT65550) && (chip <= CHIPS_CT69030))
+	return ChipsHiQVOptions;
 }
 #endif
 if (busid == BUS_PCI) {
@@ -4062,7 +4068,7 @@ CHIPSScreenInit(SCREEN_INIT_ARGS_DECL)
 	miDCInitialize (pScreen, xf86GetPointerScreenFuncs());
 
 } else
-#endif /* HAVE_ISA */
+#endif /* USE_MIBANK */
 {
 /* !!! Only support linear addressing for now. This might change */
 	/* Setup pointers to free space in video ram */
@@ -6861,14 +6867,16 @@ chipsMapMem(ScrnInfoPtr pScrn)
 		   PCI_DEV_MAP_FLAG_WRITABLE,
 		   result);
 		} else {
-			err = pci_device_map_legacy(cPtr->PciInfo,
-		cPtr->IOAddress,
-		0x0002U,
-		PCI_DEV_MAP_FLAG_WRITABLE,
-		result);
+			*result = mmap(NULL,
+			   0x0002U,
+			   PROT_READ | PROT_WRITE,
+			   MAP_SHARED,
+			   xf86Info.consoleFd,
+			   cPtr->IOAddress);
+			err = (*result == MAP_FAILED);
 		}
 		if (err) {
-			xf86Msg(X_ERROR, "PCI mmap failed\n");
+			xf86Msg(X_ERROR, "PCI mmap registers failed\n");
 		return FALSE;
 		}
 		}
@@ -6894,11 +6902,13 @@ chipsMapMem(ScrnInfoPtr pScrn)
 		   PCI_DEV_MAP_FLAG_WRITABLE,
 		   result);
 		} else {
-			err = pci_device_map_legacy(cPtr->PciInfo,
-		cPtr->IOAddress,
-		0x0001U,
-		PCI_DEV_MAP_FLAG_WRITABLE,
-		result);
+			*result = mmap(NULL,
+			   0x0001U,
+			   PROT_READ | PROT_WRITE,
+			   MAP_SHARED,
+			   xf86Info.consoleFd,
+			   cPtr->IOAddress);
+			err = (*result == MAP_FAILED);
 		}
 		if (err) {
 			xf86Msg(X_ERROR, "PCI mmap failed\n");
@@ -6950,12 +6960,13 @@ chipsMapMem(ScrnInfoPtr pScrn)
 	   PCI_DEV_MAP_FLAG_WRITE_COMBINE,
 	   result);
 	} else
-		err = pci_device_map_legacy(cPtr->PciInfo,
-	Addr,
-	Map,
-	PCI_DEV_MAP_FLAG_WRITABLE |
-	PCI_DEV_MAP_FLAG_WRITE_COMBINE,
-	result);
+			*result = mmap(NULL,
+			   Map,
+			   PROT_READ | PROT_WRITE,
+			   MAP_SHARED,
+			   xf86Info.consoleFd,
+			   Addr);
+			err = (*result == MAP_FAILED);
 	if (err) {
 		xf86Msg(X_ERROR, "PCI mmap fb failed\n");
 		return FALSE;



CVS commit: src/tests/kernel

2017-01-04 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Wed Jan  4 22:27:20 UTC 2017

Modified Files:
src/tests/kernel: t_ptrace_wait.c t_ptrace_wait.h

Log Message:
Add new tests siginfo[123] in t_ptrace_wait{,3,4,6,id,pid}

These tests are for the proposed PT_[GS]ET_SIGINFO interface for ptrace(2),
accessors for signal information that caused tracee to be interrupted.

siginfo1:
Verify basic PT_GET_SIGINFO call for SIGTRAP from tracee

siginfo2:
Verify basic PT_GET_SIGINFO and PT_SET_SIGINFO calls without
modification of SIGINT from tracee

siginfo3:
Verify basic PT_GET_SIGINFO and PT_SET_SIGINFO calls with
setting signal to new value

New tests are protected with #ifded and currently disabled in the HEAD branch.
They will be automatically enabled once the final implementation will land the
sources.

Sponsored by 


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/tests/kernel/t_ptrace_wait.c
cvs rdiff -u -r1.5 -r1.6 src/tests/kernel/t_ptrace_wait.h

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

Modified files:

Index: src/tests/kernel/t_ptrace_wait.c
diff -u src/tests/kernel/t_ptrace_wait.c:1.48 src/tests/kernel/t_ptrace_wait.c:1.49
--- src/tests/kernel/t_ptrace_wait.c:1.48	Mon Jan  2 21:02:03 2017
+++ src/tests/kernel/t_ptrace_wait.c	Wed Jan  4 22:27:20 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_ptrace_wait.c,v 1.48 2017/01/02 21:02:03 kamil Exp $	*/
+/*	$NetBSD: t_ptrace_wait.c,v 1.49 2017/01/04 22:27:20 kamil Exp $	*/
 
 /*-
  * Copyright (c) 2016 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: t_ptrace_wait.c,v 1.48 2017/01/02 21:02:03 kamil Exp $");
+__RCSID("$NetBSD: t_ptrace_wait.c,v 1.49 2017/01/04 22:27:20 kamil Exp $");
 
 #include 
 #include 
@@ -4458,6 +4458,249 @@ ATF_TC_BODY(lwpinfo2, tc)
 }
 #endif
 
+#if defined(HAVE_SIGINFO)
+ATF_TC(siginfo1);
+ATF_TC_HEAD(siginfo1, tc)
+{
+	atf_tc_set_md_var(tc, "descr",
+	"Verify basic PT_GET_SIGINFO call for SIGTRAP from tracee");
+}
+
+ATF_TC_BODY(siginfo1, tc)
+{
+	const int exitval = 5;
+	const int sigval = SIGTRAP;
+	pid_t child, wpid;
+#if defined(TWAIT_HAVE_STATUS)
+	int status;
+#endif
+	struct ptrace_siginfo info;
+	memset(, 0, sizeof(info));
+
+	printf("Before forking process PID=%d\n", getpid());
+	ATF_REQUIRE((child = fork()) != -1);
+	if (child == 0) {
+		printf("Before calling PT_TRACE_ME from child %d\n", getpid());
+		FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1);
+
+		printf("Before raising %s from child\n", strsignal(sigval));
+		FORKEE_ASSERT(raise(sigval) == 0);
+
+		printf("Before exiting of the child process\n");
+		_exit(exitval);
+	}
+	printf("Parent process PID=%d, child's PID=%d\n", getpid(), child);
+
+	printf("Before calling %s() for the child\n", TWAIT_FNAME);
+	TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, , 0), child);
+
+	validate_status_stopped(status, sigval);
+
+	printf("Before calling ptrace(2) with PT_GET_SIGINFO for child\n");
+	ATF_REQUIRE(ptrace(PT_GET_SIGINFO, child, , sizeof(info)) != -1);
+
+	printf("Signal traced to lwpid=%d\n", info.psi_lwpid);
+	printf("Signal properties: si_signo=%#x si_code=%#x si_errno=%#x\n",
+	info.psi_siginfo.si_signo, info.psi_siginfo.si_code,
+	info.psi_siginfo.si_errno);
+
+	printf("Before resuming the child process where it left off and "
+	"without signal to be sent\n");
+	ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1);
+
+	printf("Before calling %s() for the child\n", TWAIT_FNAME);
+	TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, , 0), child);
+
+	validate_status_exited(status, exitval);
+
+	printf("Before calling %s() for the child\n", TWAIT_FNAME);
+	TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, , 0));
+}
+#endif
+
+#if defined(HAVE_SIGINFO)
+ATF_TC(siginfo2);
+ATF_TC_HEAD(siginfo2, tc)
+{
+	atf_tc_set_md_var(tc, "descr",
+	"Verify basic PT_GET_SIGINFO and PT_SET_SIGINFO calls without "
+	"modification of SIGINT from tracee");
+}
+
+static int siginfo2_caught = 0;
+
+static void
+siginfo2_sighandler(int sig)
+{
+	FORKEE_ASSERT_EQ(sig, SIGINT);
+
+	++siginfo2_caught;
+}
+
+ATF_TC_BODY(siginfo2, tc)
+{
+	const int exitval = 5;
+	const int sigval = SIGINT;
+	pid_t child, wpid;
+	struct sigaction sa;
+#if defined(TWAIT_HAVE_STATUS)
+	int status;
+#endif
+	struct ptrace_siginfo info;
+	memset(, 0, sizeof(info));
+
+	printf("Before forking process PID=%d\n", getpid());
+	ATF_REQUIRE((child = fork()) != -1);
+	if (child == 0) {
+		printf("Before calling PT_TRACE_ME from child %d\n", getpid());
+		FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1);
+
+		sa.sa_handler = siginfo2_sighandler;
+		sa.sa_flags = SA_SIGINFO;
+		sigemptyset(_mask);
+
+		FORKEE_ASSERT(sigaction(sigval, , NULL) != -1);
+
+		printf("Before raising %s from child\n", strsignal(sigval));
+		FORKEE_ASSERT(raise(sigval) == 0);
+
+		FORKEE_ASSERT_EQ(siginfo2_caught, 1);
+
+		printf("Before exiting of the child 

CVS commit: src/sys/conf

2017-01-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jan  4 21:37:46 UTC 2017

Modified Files:
src/sys/conf: Makefile.kern.inc

Log Message:
Collect a list of kernel swap files to be removed (Yorick Hardy)


To generate a diff of this commit:
cvs rdiff -u -r1.252 -r1.253 src/sys/conf/Makefile.kern.inc

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

Modified files:

Index: src/sys/conf/Makefile.kern.inc
diff -u src/sys/conf/Makefile.kern.inc:1.252 src/sys/conf/Makefile.kern.inc:1.253
--- src/sys/conf/Makefile.kern.inc:1.252	Wed Jan  4 14:55:06 2017
+++ src/sys/conf/Makefile.kern.inc	Wed Jan  4 16:37:46 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.kern.inc,v 1.252 2017/01/04 19:55:06 christos Exp $
+#	$NetBSD: Makefile.kern.inc,v 1.253 2017/01/04 21:37:46 christos Exp $
 #
 # This file contains common `MI' targets and definitions and it is included
 # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}.
@@ -209,14 +209,20 @@ SYSTEM_CTFMERGE= ${CTFMERGE} ${CTFMFLAGS
 .else
 SYSTEM_CTFMERGE= ${_MKSHECHO}
 .endif
+
+REMOVE_SWAP=   [@]
+.for k in ${KERNELS}
+REMOVE_SWAP:=  ${REMOVE_SWAP}:Nswap${k}.o
+.endfor
+
 SYSTEM_LD_HEAD?=@rm -f $@
 SYSTEM_LD?=	${_MKSHMSG} "   link  ${.CURDIR:T}/${.TARGET}"; \
 		${_MKSHECHO}\
 		${LD} -Map ${.TARGET}.map --cref ${LINKFLAGS} -o ${.TARGET} \
-		'$${SYSTEM_OBJ:N*swap${.TARGET}.o}' '$${EXTRA_OBJ}' vers.o \
+		'$${SYSTEM_OBJ:${REMOVE_SWAP}}' '$${EXTRA_OBJ}' vers.o \
 		${OBJS:M*swap${.TARGET}.o}; \
 		${LD} -Map ${.TARGET}.map --cref ${LINKFLAGS} -o ${.TARGET} \
-		${SYSTEM_OBJ:N*swap${.TARGET}.o} ${EXTRA_OBJ} vers.o \
+		${SYSTEM_OBJ:${REMOVE_SWAP}} ${EXTRA_OBJ} vers.o \
 		${OBJS:M*swap${.TARGET}.o}
 
 TEXTADDR?=	${LOADADDRESS}			# backwards compatibility



CVS commit: src/sys/ddb

2017-01-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jan  4 21:25:41 UTC 2017

Modified Files:
src/sys/ddb: db_interface.h

Log Message:
add a simple stacktrace macro


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/ddb/db_interface.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/ddb/db_interface.h
diff -u src/sys/ddb/db_interface.h:1.32 src/sys/ddb/db_interface.h:1.33
--- src/sys/ddb/db_interface.h:1.32	Tue Apr 12 20:47:02 2016
+++ src/sys/ddb/db_interface.h	Wed Jan  4 16:25:41 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: db_interface.h,v 1.32 2016/04/13 00:47:02 ozaki-r Exp $	*/
+/*	$NetBSD: db_interface.h,v 1.33 2017/01/04 21:25:41 christos Exp $	*/
 
 /*-
  * Copyright (c) 1995 The NetBSD Foundation, Inc.
@@ -73,4 +73,8 @@ void		db_show_module_cmd(db_expr_t, bool
 /* kern/subr_vmem.c */
 void		db_show_all_vmems(db_expr_t, bool, db_expr_t, const char *);
 
+#define	db_stacktrace() \
+db_stack_trace_print((db_expr_t)(intptr_t)__builtin_frame_address(0), \
+	true, 65535, "", printf)
+
 #endif /* _DDB_DB_INTERFACE_H_ */



CVS commit: src/sys/arch/sparc64/sparc64

2017-01-04 Thread Palle Lyckegaard
Module Name:src
Committed By:   palle
Date:   Wed Jan  4 20:19:29 UTC 2017

Modified Files:
src/sys/arch/sparc64/sparc64: locore.s

Log Message:
sun4v: make debugging kernel bringup a bit easier by using the slowtrap code 
path for currently unhandled trap level 1 trap entries 0x00-0x23 and 0x28-0x30


To generate a diff of this commit:
cvs rdiff -u -r1.402 -r1.403 src/sys/arch/sparc64/sparc64/locore.s

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

Modified files:

Index: src/sys/arch/sparc64/sparc64/locore.s
diff -u src/sys/arch/sparc64/sparc64/locore.s:1.402 src/sys/arch/sparc64/sparc64/locore.s:1.403
--- src/sys/arch/sparc64/sparc64/locore.s:1.402	Thu Dec 29 20:59:31 2016
+++ src/sys/arch/sparc64/sparc64/locore.s	Wed Jan  4 20:19:29 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.s,v 1.402 2016/12/29 20:59:31 palle Exp $	*/
+/*	$NetBSD: locore.s,v 1.403 2017/01/04 20:19:29 palle Exp $	*/
 
 /*
  * Copyright (c) 2006-2010 Matthew R. Green
@@ -1140,9 +1140,9 @@ _C_LABEL(trapbase_sun4v):
 	!
 	! trap level 1
 	!
-	sun4v_trap_entry_fail 36! 0x000-0x023
+	sun4v_trap_entry 36	! 0x000-0x023
 	CLEANWIN1		! 0x24-0x27 = clean window
-	sun4v_trap_entry_fail 9	! 0x028-0x030			
+	sun4v_trap_entry 9	! 0x028-0x030
 	VTRAP(T_DATA_MMU_MISS, sun4v_dtsb_miss)			! 0x031 = data MMU miss
 	sun4v_trap_entry 78	! 0x032-0x07f
 	SPILL64(uspill8_sun4vt1,ASI_AIUS)			! 0x080 spill_0_normal -- save user windows



CVS commit: src/sys/conf

2017-01-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jan  4 19:55:06 UTC 2017

Modified Files:
src/sys/conf: Makefile.kern.inc

Log Message:
match the M* and N* targets.


To generate a diff of this commit:
cvs rdiff -u -r1.251 -r1.252 src/sys/conf/Makefile.kern.inc

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

Modified files:

Index: src/sys/conf/Makefile.kern.inc
diff -u src/sys/conf/Makefile.kern.inc:1.251 src/sys/conf/Makefile.kern.inc:1.252
--- src/sys/conf/Makefile.kern.inc:1.251	Wed Jan  4 10:43:04 2017
+++ src/sys/conf/Makefile.kern.inc	Wed Jan  4 14:55:06 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.kern.inc,v 1.251 2017/01/04 15:43:04 christos Exp $
+#	$NetBSD: Makefile.kern.inc,v 1.252 2017/01/04 19:55:06 christos Exp $
 #
 # This file contains common `MI' targets and definitions and it is included
 # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}.
@@ -213,10 +213,10 @@ SYSTEM_LD_HEAD?=@rm -f $@
 SYSTEM_LD?=	${_MKSHMSG} "   link  ${.CURDIR:T}/${.TARGET}"; \
 		${_MKSHECHO}\
 		${LD} -Map ${.TARGET}.map --cref ${LINKFLAGS} -o ${.TARGET} \
-		'$${SYSTEM_OBJ:N*swap*${.TARGET}*}' '$${EXTRA_OBJ}' vers.o \
+		'$${SYSTEM_OBJ:N*swap${.TARGET}.o}' '$${EXTRA_OBJ}' vers.o \
 		${OBJS:M*swap${.TARGET}.o}; \
 		${LD} -Map ${.TARGET}.map --cref ${LINKFLAGS} -o ${.TARGET} \
-		${SYSTEM_OBJ:N*swap*${.TARGET}*} ${EXTRA_OBJ} vers.o \
+		${SYSTEM_OBJ:N*swap${.TARGET}.o} ${EXTRA_OBJ} vers.o \
 		${OBJS:M*swap${.TARGET}.o}
 
 TEXTADDR?=	${LOADADDRESS}			# backwards compatibility



CVS commit: src/sys/netinet6

2017-01-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jan  4 19:37:14 UTC 2017

Modified Files:
src/sys/netinet6: in6.c in6_ifattach.c in6_var.h nd6_rtr.c

Log Message:
- kill NULL argument from in6_update_ifa
- amend in6_update_ifa1 to return the ia, so that we can use it in pfil hooks
  to avoid NULL pointer crash.


To generate a diff of this commit:
cvs rdiff -u -r1.229 -r1.230 src/sys/netinet6/in6.c
cvs rdiff -u -r1.108 -r1.109 src/sys/netinet6/in6_ifattach.c
cvs rdiff -u -r1.87 -r1.88 src/sys/netinet6/in6_var.h
cvs rdiff -u -r1.128 -r1.129 src/sys/netinet6/nd6_rtr.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/netinet6/in6.c
diff -u src/sys/netinet6/in6.c:1.229 src/sys/netinet6/in6.c:1.230
--- src/sys/netinet6/in6.c:1.229	Tue Jan  3 10:14:31 2017
+++ src/sys/netinet6/in6.c	Wed Jan  4 14:37:14 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: in6.c,v 1.229 2017/01/03 15:14:31 christos Exp $	*/
+/*	$NetBSD: in6.c,v 1.230 2017/01/04 19:37:14 christos Exp $	*/
 /*	$KAME: in6.c,v 1.198 2001/07/18 09:12:38 itojun Exp $	*/
 
 /*
@@ -62,7 +62,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: in6.c,v 1.229 2017/01/03 15:14:31 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: in6.c,v 1.230 2017/01/04 19:37:14 christos Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -153,6 +153,8 @@ static int in6_ifremprefix(struct in6_if
 static int in6_ifinit(struct ifnet *, struct in6_ifaddr *,
 	const struct sockaddr_in6 *, int);
 static void in6_unlink_ifa(struct in6_ifaddr *, struct ifnet *);
+static int in6_update_ifa1(struct ifnet *, struct in6_aliasreq *,
+struct in6_ifaddr **, struct psref *, int);
 
 void
 in6_init(void)
@@ -701,7 +703,10 @@ in6_control1(struct socket *so, u_long c
 		 * make (ia == NULL) or update (ia != NULL) the interface
 		 * address structure, and link it to the list.
 		 */
-		if ((error = in6_update_ifa(ifp, ifra, ia, 0)) != 0)
+		int s = splnet();
+		error = in6_update_ifa1(ifp, ifra, , , 0);
+		splx(s);
+		if (error)
 			break;
 		pfil_run_addrhooks(if_pfil, cmd, >ia_ifa);
 		break;
@@ -779,7 +784,7 @@ in6_control(struct socket *so, u_long cm
  */
 static int
 in6_update_ifa1(struct ifnet *ifp, struct in6_aliasreq *ifra,
-struct in6_ifaddr *ia, int flags)
+struct in6_ifaddr **iap, struct psref *psref, int flags)
 {
 	int error = 0, hostIsNew = 0, plen = -1;
 	struct sockaddr_in6 dst6;
@@ -788,6 +793,7 @@ in6_update_ifa1(struct ifnet *ifp, struc
 	struct in6_multi *in6m_sol;
 	struct rtentry *rt;
 	int dad_delay, was_tentative;
+	struct in6_ifaddr *ia = iap ? *iap : NULL;
 
 	in6m_sol = NULL;
 
@@ -919,11 +925,9 @@ in6_update_ifa1(struct ifnet *ifp, struc
 		 * RA, it is called under an interrupt context.  So, we should
 		 * call malloc with M_NOWAIT.
 		 */
-		ia = (struct in6_ifaddr *) malloc(sizeof(*ia), M_IFADDR,
-		M_NOWAIT);
+		ia = malloc(sizeof(*ia), M_IFADDR, M_NOWAIT|M_ZERO);
 		if (ia == NULL)
 			return ENOBUFS;
-		memset(ia, 0, sizeof(*ia));
 		LIST_INIT(>ia6_memberships);
 		/* Initialize the address and masks, and put time stamp */
 		ia->ia_ifa.ifa_addr = sin6tosa(>ia_addr);
@@ -944,6 +948,8 @@ in6_update_ifa1(struct ifnet *ifp, struc
 		ia->ia_ifp = ifp;
 		IN6_ADDRLIST_ENTRY_INIT(ia);
 		ifa_psref_init(>ia_ifa);
+		if (psref)
+			ia6_acquire(ia, psref);
 	}
 
 	/* update timestamp */
@@ -1292,6 +1298,9 @@ in6_update_ifa1(struct ifnet *ifp, struc
 		nd6_dad_start(>ia_ifa, dad_delay + 1);
 	}
 
+	if (iap)
+		*iap = ia;
+
 	return 0;
 
   cleanup:
@@ -1301,13 +1310,12 @@ in6_update_ifa1(struct ifnet *ifp, struc
 }
 
 int
-in6_update_ifa(struct ifnet *ifp, struct in6_aliasreq *ifra,
-struct in6_ifaddr *ia, int flags)
+in6_update_ifa(struct ifnet *ifp, struct in6_aliasreq *ifra, int flags)
 {
 	int rc, s;
 
 	s = splnet();
-	rc = in6_update_ifa1(ifp, ifra, ia, flags);
+	rc = in6_update_ifa1(ifp, ifra, NULL, NULL, flags);
 	splx(s);
 	return rc;
 }

Index: src/sys/netinet6/in6_ifattach.c
diff -u src/sys/netinet6/in6_ifattach.c:1.108 src/sys/netinet6/in6_ifattach.c:1.109
--- src/sys/netinet6/in6_ifattach.c:1.108	Sun Dec 18 22:32:54 2016
+++ src/sys/netinet6/in6_ifattach.c	Wed Jan  4 14:37:14 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: in6_ifattach.c,v 1.108 2016/12/19 03:32:54 ozaki-r Exp $	*/
+/*	$NetBSD: in6_ifattach.c,v 1.109 2017/01/04 19:37:14 christos Exp $	*/
 /*	$KAME: in6_ifattach.c,v 1.124 2001/07/18 08:32:51 jinmei Exp $	*/
 
 /*
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: in6_ifattach.c,v 1.108 2016/12/19 03:32:54 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: in6_ifattach.c,v 1.109 2017/01/04 19:37:14 christos Exp $");
 
 #include 
 #include 
@@ -576,8 +576,7 @@ in6_ifattach_linklocal(struct ifnet *ifp
 	 * we know there's no other link-local address on the interface
 	 * and therefore we are adding one (instead of updating one).
 	 */
-	if ((error = in6_update_ifa(ifp, , NULL,
-	IN6_IFAUPDATE_DADDELAY)) != 0) {
+	if 

CVS commit: src

2017-01-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jan  4 19:34:47 UTC 2017

Modified Files:
src: UPDATING

Log Message:
Not flex update build issue


To generate a diff of this commit:
cvs rdiff -u -r1.275 -r1.276 src/UPDATING

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

Modified files:

Index: src/UPDATING
diff -u src/UPDATING:1.275 src/UPDATING:1.276
--- src/UPDATING:1.275	Fri Oct 14 16:39:05 2016
+++ src/UPDATING	Wed Jan  4 19:34:47 2017
@@ -1,4 +1,4 @@
-$NetBSD: UPDATING,v 1.275 2016/10/14 16:39:05 spz Exp $
+$NetBSD: UPDATING,v 1.276 2017/01/04 19:34:47 martin Exp $
 
 This file (UPDATING) is intended to be a brief reference to recent
 changes that might cause problems in the build process, and a guide for
@@ -19,6 +19,11 @@ See also: BUILDING, build.sh, Makefile.
 Recent changes:
 ^^^
 
+20170103:
+	a new version of flex has been imported.
+	Remove the file from obj (external/bsd/flex)
+	if you build.sh -u
+
 20161014:
 	a new version of OpenSSL has been imported.
 	Remove the files from obj (crypto/external/bsd/openssl) 



CVS commit: src/sys/kern

2017-01-04 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Wed Jan  4 17:13:50 UTC 2017

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

Log Message:
Expand struct vcache to individual variables (vcache.* -> vcache_*).
No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.68 -r1.69 src/sys/kern/vfs_vnode.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/vfs_vnode.c
diff -u src/sys/kern/vfs_vnode.c:1.68 src/sys/kern/vfs_vnode.c:1.69
--- src/sys/kern/vfs_vnode.c:1.68	Mon Jan  2 10:36:58 2017
+++ src/sys/kern/vfs_vnode.c	Wed Jan  4 17:13:50 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_vnode.c,v 1.68 2017/01/02 10:36:58 hannken Exp $	*/
+/*	$NetBSD: vfs_vnode.c,v 1.69 2017/01/04 17:13:50 hannken Exp $	*/
 
 /*-
  * Copyright (c) 1997-2011 The NetBSD Foundation, Inc.
@@ -132,7 +132,7 @@
  *	and it is possible to wait for state change.
  *
  *	State is protected with v_interlock with one exception:
- *	to change from LOADING both v_interlock and vcache.lock must be held
+ *	to change from LOADING both v_interlock and vcache_lock must be held
  *	so it is possible to check "state == LOADING" without holding
  *	v_interlock.  See vcache_get() for details.
  *
@@ -156,7 +156,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vfs_vnode.c,v 1.68 2017/01/02 10:36:58 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_vnode.c,v 1.69 2017/01/04 17:13:50 hannken Exp $");
 
 #include 
 #include 
@@ -202,15 +202,12 @@ static kcondvar_t	vdrain_gen_cv;
 static bool		vdrain_retry;
 static lwp_t *		vdrain_lwp;
 SLIST_HEAD(hashhead, vnode_impl);
-static struct {
-	kmutex_t	lock;
-	kcondvar_t	cv;
-	u_int		hashsize;
-	u_long		hashmask;
-	struct hashhead	*hashtab;
-	pool_cache_t	pool;
-}			vcache			__cacheline_aligned;
-
+static kmutex_t		vcache_lock		__cacheline_aligned;
+static kcondvar_t	vcache_cv		__cacheline_aligned;
+static u_int		vcache_hashsize;
+static u_long		vcache_hashmask;
+static struct hashhead	*vcache_hashtab		__cacheline_aligned;
+static pool_cache_t	vcache_pool;
 static void		lru_requeue(vnode_t *, vnodelst_t *);
 static vnodelst_t *	lru_which(vnode_t *);
 static vnode_impl_t *	vcache_alloc(void);
@@ -293,7 +290,7 @@ vstate_assert_change(vnode_t *vp, enum v
 
 	KASSERTMSG(mutex_owned(vp->v_interlock), "at %s:%d", func, line);
 	if (from == VS_LOADING)
-		KASSERTMSG(mutex_owned(), "at %s:%d", func, line);
+		KASSERTMSG(mutex_owned(_lock), "at %s:%d", func, line);
 
 	if (from == VS_MARKER)
 		vnpanic(vp, "from is %s at %s:%d",
@@ -311,7 +308,7 @@ vstate_assert_change(vnode_t *vp, enum v
 
 	node->vi_state = to;
 	if (from == VS_LOADING)
-		cv_broadcast();
+		cv_broadcast(_cv);
 	if (to == VS_ACTIVE || to == VS_RECLAIMED)
 		cv_broadcast(>v_cv);
 }
@@ -342,7 +339,7 @@ vstate_change(vnode_t *vp, enum vnode_st
 
 	node->vi_state = to;
 	if (from == VS_LOADING)
-		cv_broadcast();
+		cv_broadcast(_cv);
 	if (to == VS_ACTIVE || to == VS_RECLAIMED)
 		cv_broadcast(>v_cv);
 }
@@ -381,7 +378,7 @@ vnalloc_marker(struct mount *mp)
 	vnode_impl_t *node;
 	vnode_t *vp;
 
-	node = pool_cache_get(vcache.pool, PR_WAITOK);
+	node = pool_cache_get(vcache_pool, PR_WAITOK);
 	memset(node, 0, sizeof(*node));
 	vp = VIMPL_TO_VNODE(node);
 	uvm_obj_init(>v_uobj, _vnodeops, true, 0);
@@ -403,7 +400,7 @@ vnfree_marker(vnode_t *vp)
 	node = VNODE_TO_VIMPL(vp);
 	KASSERT(node->vi_state == VS_MARKER);
 	uvm_obj_destroy(>v_uobj, true);
-	pool_cache_put(vcache.pool, node);
+	pool_cache_put(vcache_pool, node);
 }
 
 /*
@@ -954,14 +951,14 @@ static void
 vcache_init(void)
 {
 
-	vcache.pool = pool_cache_init(sizeof(vnode_impl_t), 0, 0, 0,
+	vcache_pool = pool_cache_init(sizeof(vnode_impl_t), 0, 0, 0,
 	"vcachepl", NULL, IPL_NONE, NULL, NULL, NULL);
-	KASSERT(vcache.pool != NULL);
-	mutex_init(, MUTEX_DEFAULT, IPL_NONE);
-	cv_init(, "vcache");
-	vcache.hashsize = desiredvnodes;
-	vcache.hashtab = hashinit(desiredvnodes, HASH_SLIST, true,
-	);
+	KASSERT(vcache_pool != NULL);
+	mutex_init(_lock, MUTEX_DEFAULT, IPL_NONE);
+	cv_init(_cv, "vcache");
+	vcache_hashsize = desiredvnodes;
+	vcache_hashtab = hashinit(desiredvnodes, HASH_SLIST, true,
+	_hashmask);
 }
 
 static void
@@ -974,21 +971,21 @@ vcache_reinit(void)
 	vnode_impl_t *node;
 
 	newtab = hashinit(desiredvnodes, HASH_SLIST, true, );
-	mutex_enter();
-	oldtab = vcache.hashtab;
-	oldmask = vcache.hashmask;
-	vcache.hashsize = desiredvnodes;
-	vcache.hashtab = newtab;
-	vcache.hashmask = newmask;
+	mutex_enter(_lock);
+	oldtab = vcache_hashtab;
+	oldmask = vcache_hashmask;
+	vcache_hashsize = desiredvnodes;
+	vcache_hashtab = newtab;
+	vcache_hashmask = newmask;
 	for (i = 0; i <= oldmask; i++) {
 		while ((node = SLIST_FIRST([i])) != NULL) {
 			SLIST_REMOVE([i], node, vnode_impl, vi_hash);
 			hash = vcache_hash(>vi_key);
-			SLIST_INSERT_HEAD([hash & vcache.hashmask],
+			SLIST_INSERT_HEAD([hash & vcache_hashmask],
 			node, vi_hash);
 		}
 	}
-	

CVS commit: src/sys/sys

2017-01-04 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Wed Jan  4 17:06:13 UTC 2017

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

Log Message:
Comment the fields of struct vnode_impl.
No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/sys/vnode_impl.h

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

Modified files:

Index: src/sys/sys/vnode_impl.h
diff -u src/sys/sys/vnode_impl.h:1.5 src/sys/sys/vnode_impl.h:1.6
--- src/sys/sys/vnode_impl.h:1.5	Mon Jan  2 10:33:28 2017
+++ src/sys/sys/vnode_impl.h	Wed Jan  4 17:06:13 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: vnode_impl.h,v 1.5 2017/01/02 10:33:28 hannken Exp $	*/
+/*	$NetBSD: vnode_impl.h,v 1.6 2017/01/04 17:06:13 hannken Exp $	*/
 
 /*-
  * Copyright (c) 2016 The NetBSD Foundation, Inc.
@@ -42,20 +42,31 @@ enum vnode_state {
 	VS_RECLAIMING,	/* Intermediate, detaching the fs node. */
 	VS_RECLAIMED	/* Stable, no fs node attached. */
 };
+
 TAILQ_HEAD(vnodelst, vnode_impl);
 typedef struct vnodelst vnodelst_t;
+
 struct vcache_key {
 	struct mount *vk_mount;
 	const void *vk_key;
 	size_t vk_key_len;
 };
+
+/*
+ * Reading or writing any of these items requires holding the appropriate
+ * lock.  Field markings and the corresponding locks:
+ *
+ *	c	vcache_lock
+ *	d	vdrain_lock
+ *	i	v_interlock
+ */
 struct vnode_impl {
 	struct vnode vi_vnode;
-	enum vnode_state vi_state;
-	struct vnodelst *vi_lrulisthd;
-	TAILQ_ENTRY(vnode_impl) vi_lrulist;
-	SLIST_ENTRY(vnode_impl) vi_hash;
-	struct vcache_key vi_key;
+	enum vnode_state vi_state;		/* i: current state */
+	struct vnodelst *vi_lrulisthd;		/* d: current lru list head */
+	TAILQ_ENTRY(vnode_impl) vi_lrulist;	/* d: lru list */
+	SLIST_ENTRY(vnode_impl) vi_hash;	/* c: vnode cache list */
+	struct vcache_key vi_key;		/* c: vnode cache key */
 };
 typedef struct vnode_impl vnode_impl_t;
 



CVS commit: src/external/gpl2/xcvs/dist/src

2017-01-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jan  4 16:11:20 UTC 2017

Modified Files:
src/external/gpl2/xcvs/dist/src: update.c

Log Message:
only preserve timestamps on specific revisions if we've been asked to.
found by martin@


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/external/gpl2/xcvs/dist/src/update.c

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

Modified files:

Index: src/external/gpl2/xcvs/dist/src/update.c
diff -u src/external/gpl2/xcvs/dist/src/update.c:1.10 src/external/gpl2/xcvs/dist/src/update.c:1.11
--- src/external/gpl2/xcvs/dist/src/update.c:1.10	Mon Dec 19 12:31:47 2016
+++ src/external/gpl2/xcvs/dist/src/update.c	Wed Jan  4 11:11:20 2017
@@ -38,7 +38,7 @@
  * as well.
  */
 #include 
-__RCSID("$NetBSD: update.c,v 1.10 2016/12/19 17:31:47 christos Exp $");
+__RCSID("$NetBSD: update.c,v 1.11 2017/01/04 16:11:20 christos Exp $");
 
 #include "cvs.h"
 #include 
@@ -1382,7 +1382,6 @@ VERS: ", 0);
 
 	xvers_ts = Version_TS (finfo, options, tag, date, 
    force_tag_match, set_time);
-
 	if (strcmp (xvers_ts->options, "-V4") == 0)
 		xvers_ts->options[0] = '\0';
 
@@ -1777,7 +1776,7 @@ patch_file (struct file_info *finfo, Ver
 /* This stuff is just copied blindly from checkout_file.  I
 	   don't really know what it does.  */
 xvers_ts = Version_TS (finfo, options, tag, date,
-			   force_tag_match, 1);
+			   force_tag_match, preserve_timestamps_on_update);
 	if (strcmp (xvers_ts->options, "-V4") == 0)
 	xvers_ts->options[0] = '\0';
 



CVS commit: src/sys/fs/udf

2017-01-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jan  4 15:53:14 UTC 2017

Modified Files:
src/sys/fs/udf: udf_allocation.c

Log Message:
PR/51777: David Binderman: Remove unused computation


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/sys/fs/udf/udf_allocation.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/fs/udf/udf_allocation.c
diff -u src/sys/fs/udf/udf_allocation.c:1.38 src/sys/fs/udf/udf_allocation.c:1.39
--- src/sys/fs/udf/udf_allocation.c:1.38	Mon Aug 24 04:30:17 2015
+++ src/sys/fs/udf/udf_allocation.c	Wed Jan  4 10:53:14 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: udf_allocation.c,v 1.38 2015/08/24 08:30:17 hannken Exp $ */
+/* $NetBSD: udf_allocation.c,v 1.39 2017/01/04 15:53:14 christos Exp $ */
 
 /*
  * Copyright (c) 2006, 2008 Reinoud Zandijk
@@ -28,7 +28,7 @@
 
 #include 
 #ifndef lint
-__KERNEL_RCSID(0, "$NetBSD: udf_allocation.c,v 1.38 2015/08/24 08:30:17 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: udf_allocation.c,v 1.39 2017/01/04 15:53:14 christos Exp $");
 #endif /* not lint */
 
 
@@ -1001,7 +1001,7 @@ udf_bitmap_check_trunc_free(struct udf_b
 		bitval = (1 << bit);
 		if (!(*bpos & bitval))
 			seq_free = 0;
-		offset++; to_trunc--;
+		to_trunc--;
 		bit++;
 		if (bit == 8) {
 			bpos++;



CVS commit: src/sys/dev/raidframe

2017-01-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jan  4 15:51:41 UTC 2017

Modified Files:
src/sys/dev/raidframe: rf_reconmap.c

Log Message:
PR/51776: David Binderman: Remove unused variable.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sys/dev/raidframe/rf_reconmap.c

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

Modified files:

Index: src/sys/dev/raidframe/rf_reconmap.c
diff -u src/sys/dev/raidframe/rf_reconmap.c:1.34 src/sys/dev/raidframe/rf_reconmap.c:1.35
--- src/sys/dev/raidframe/rf_reconmap.c:1.34	Mon Feb 20 17:42:05 2012
+++ src/sys/dev/raidframe/rf_reconmap.c	Wed Jan  4 10:51:41 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: rf_reconmap.c,v 1.34 2012/02/20 22:42:05 oster Exp $	*/
+/*	$NetBSD: rf_reconmap.c,v 1.35 2017/01/04 15:51:41 christos Exp $	*/
 /*
  * Copyright (c) 1995 Carnegie-Mellon University.
  * All rights reserved.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rf_reconmap.c,v 1.34 2012/02/20 22:42:05 oster Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_reconmap.c,v 1.35 2017/01/04 15:51:41 christos Exp $");
 
 #include "rf_raid.h"
 #include 
@@ -324,13 +324,8 @@ void
 rf_FreeReconMap(RF_ReconMap_t *mapPtr)
 {
 	RF_ReconMapListElem_t *p, *q;
-	RF_ReconUnitCount_t numRUs;
 	RF_ReconUnitNum_t i;
 
-	numRUs = mapPtr->sectorsInDisk / mapPtr->sectorsPerReconUnit;
-	if (mapPtr->sectorsInDisk % mapPtr->sectorsPerReconUnit)
-		numRUs++;
-
 	for (i = 0; i < mapPtr->status_size; i++) {
 		p = mapPtr->status[i];
 		while (p != RU_NOTHING && p != RU_ALL) {



CVS commit: src/sys/dev/raidframe

2017-01-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jan  4 15:50:34 UTC 2017

Modified Files:
src/sys/dev/raidframe: rf_aselect.c

Log Message:
PR/51775: David Binderman: Remove unused variable.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/dev/raidframe/rf_aselect.c

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

Modified files:

Index: src/sys/dev/raidframe/rf_aselect.c
diff -u src/sys/dev/raidframe/rf_aselect.c:1.28 src/sys/dev/raidframe/rf_aselect.c:1.29
--- src/sys/dev/raidframe/rf_aselect.c:1.28	Sun Sep 15 08:11:16 2013
+++ src/sys/dev/raidframe/rf_aselect.c	Wed Jan  4 10:50:34 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: rf_aselect.c,v 1.28 2013/09/15 12:11:16 martin Exp $	*/
+/*	$NetBSD: rf_aselect.c,v 1.29 2017/01/04 15:50:34 christos Exp $	*/
 /*
  * Copyright (c) 1995 Carnegie-Mellon University.
  * All rights reserved.
@@ -33,7 +33,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rf_aselect.c,v 1.28 2013/09/15 12:11:16 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_aselect.c,v 1.29 2017/01/04 15:50:34 christos Exp $");
 
 #include 
 
@@ -128,7 +128,7 @@ rf_SelectAlgorithm(RF_RaidAccessDesc_t *
 	RF_VoidFuncPtr bFunc;
 	int numStripesBailed = 0, cantCreateDAGs = RF_FALSE;
 	int numStripeUnitsBailed = 0;
-	int stripeNum, numUnitDags = 0, stripeUnitNum, numBlockDags = 0;
+	int stripeNum, stripeUnitNum, numBlockDags = 0;
 	RF_StripeNum_t numStripeUnits;
 	RF_SectorNum_t numBlocks;
 	RF_RaidAddr_t address;
@@ -266,8 +266,6 @@ rf_SelectAlgorithm(RF_RaidAccessDesc_t *
 			cantCreateDAGs = RF_TRUE;
 	}
 	numStripeUnitsBailed++;
-} else {
-	numUnitDags++;
 }
 			}
 			RF_ASSERT(j == numStripeUnits);



CVS commit: src/sys/dev/pci

2017-01-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jan  4 15:49:28 UTC 2017

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

Log Message:
PR/51774: David Binderman: Remove unused variable.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/dev/pci/nside.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/nside.c
diff -u src/sys/dev/pci/nside.c:1.9 src/sys/dev/pci/nside.c:1.10
--- src/sys/dev/pci/nside.c:1.9	Mon Oct  7 15:51:55 2013
+++ src/sys/dev/pci/nside.c	Wed Jan  4 10:49:28 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: nside.c,v 1.9 2013/10/07 19:51:55 jakllsch Exp $	*/
+/*	$NetBSD: nside.c,v 1.10 2017/01/04 15:49:28 christos Exp $	*/
 
 /*
  * Copyright (c) 1999, 2000, 2001 Manuel Bouyer.
@@ -25,7 +25,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: nside.c,v 1.9 2013/10/07 19:51:55 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nside.c,v 1.10 2017/01/04 15:49:28 christos Exp $");
 
 #include 
 #include 
@@ -156,7 +156,7 @@ void
 natsemi_setup_channel(struct ata_channel *chp)
 {
 	struct ata_drive_datas *drvp;
-	int drive, ndrives = 0;
+	int drive;
 	uint32_t idedma_ctl = 0;
 struct pciide_channel *cp = CHAN_TO_PCHAN(chp);
 struct pciide_softc *sc = CHAN_TO_PCIIDE(chp);
@@ -171,7 +171,6 @@ natsemi_setup_channel(struct ata_channel
 		if (drvp->drive_type == ATA_DRIVET_NONE)
 			continue;
 
-		ndrives++;
 		/* add timing values, setup DMA if needed */
 		if ((drvp->drive_flags & ATA_DRIVE_DMA) == 0) {
 			tim = natsemi_pio_pulse[drvp->PIO_mode] |



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

2017-01-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jan  4 15:45:18 UTC 2017

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

Log Message:
PR/51773: Yorick Hardy: drvctl module is not part of lvm


To generate a diff of this commit:
cvs rdiff -u -r1.106 -r1.107 src/distrib/sets/lists/modules/mi

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

Modified files:

Index: src/distrib/sets/lists/modules/mi
diff -u src/distrib/sets/lists/modules/mi:1.106 src/distrib/sets/lists/modules/mi:1.107
--- src/distrib/sets/lists/modules/mi:1.106	Thu Dec 15 07:56:52 2016
+++ src/distrib/sets/lists/modules/mi	Wed Jan  4 10:45:18 2017
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.106 2016/12/15 12:56:52 kre Exp $
+# $NetBSD: mi,v 1.107 2017/01/04 15:45:18 christos Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -82,8 +82,8 @@
 ./@MODULEDIR@/dk_subr/dk_subr.kmod		base-kernel-modules	kmod
 ./@MODULEDIR@/dmbase-kernel-modules	lvm,kmod
 ./@MODULEDIR@/dm/dm.kmod			base-kernel-modules	lvm,kmod
-./@MODULEDIR@/drvctlbase-kernel-modules	lvm,kmod
-./@MODULEDIR@/drvctl/drvctl.kmod		base-kernel-modules	lvm,kmod
+./@MODULEDIR@/drvctlbase-kernel-modules	kmod
+./@MODULEDIR@/drvctl/drvctl.kmod		base-kernel-modules	kmod
 ./@MODULEDIR@/dtracebase-kernel-modules	kmod,dtrace
 ./@MODULEDIR@/dtrace/dtrace.kmod		base-kernel-modules	kmod,dtrace
 ./@MODULEDIR@/dtrace_fbtbase-kernel-modules	kmod,dtrace



CVS commit: src/external/mit/xorg/bin/xinput

2017-01-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jan  4 15:44:06 UTC 2017

Modified Files:
src/external/mit/xorg/bin/xinput: Makefile

Log Message:
PR/51771: Yorick Hardy: Use newer xinput features


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/mit/xorg/bin/xinput/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/mit/xorg/bin/xinput/Makefile
diff -u src/external/mit/xorg/bin/xinput/Makefile:1.5 src/external/mit/xorg/bin/xinput/Makefile:1.6
--- src/external/mit/xorg/bin/xinput/Makefile:1.5	Mon May 23 13:44:41 2011
+++ src/external/mit/xorg/bin/xinput/Makefile	Wed Jan  4 10:44:06 2017
@@ -1,14 +1,15 @@
-#	$NetBSD: Makefile,v 1.5 2011/05/23 17:44:41 dsl Exp $
+#	$NetBSD: Makefile,v 1.6 2017/01/04 15:44:06 christos Exp $
 
 .include 
 
 PROG=	xinput
-SRCS=	buttonmap.c feedback.c list.c property.c setint.c setmode.c \
-	setptr.c state.c test.c xinput.c
+SRCS=	buttonmap.c feedback.c hierarchy.c list.c property.c setcp.c setint.c \
+	setmode.c setptr.c state.c test.c test_xi2.c transform.c xinput.c
 
-CPPFLAGS+=	-DVERSION='"1.4.0"'
+CPPFLAGS+=	-DVERSION='"1.6.2"'
+CPPFLAGS+=	-DHAVE_XI2 -DHAVE_XI22
 
-LDADD+=	-lXi -lX11 -lm
+LDADD+=	-lXi -lX11 -lXrandr -lXinerama -lm
 DPADD+=	${LIBXI} ${LIBM}
 .PATH:	${X11SRCDIR.${PROG}}/src
 .PATH:	${X11SRCDIR.${PROG}}/man



CVS commit: src/sys/conf

2017-01-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jan  4 15:43:04 UTC 2017

Modified Files:
src/sys/conf: Makefile.kern.inc

Log Message:
PR/51772: Yorick Hardy: Don't hard-code "netbsd", use ${.TARGET} consistently.


To generate a diff of this commit:
cvs rdiff -u -r1.250 -r1.251 src/sys/conf/Makefile.kern.inc

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

Modified files:

Index: src/sys/conf/Makefile.kern.inc
diff -u src/sys/conf/Makefile.kern.inc:1.250 src/sys/conf/Makefile.kern.inc:1.251
--- src/sys/conf/Makefile.kern.inc:1.250	Sat Apr  9 14:51:44 2016
+++ src/sys/conf/Makefile.kern.inc	Wed Jan  4 10:43:04 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.kern.inc,v 1.250 2016/04/09 18:51:44 riastradh Exp $
+#	$NetBSD: Makefile.kern.inc,v 1.251 2017/01/04 15:43:04 christos Exp $
 #
 # This file contains common `MI' targets and definitions and it is included
 # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}.
@@ -213,10 +213,10 @@ SYSTEM_LD_HEAD?=@rm -f $@
 SYSTEM_LD?=	${_MKSHMSG} "   link  ${.CURDIR:T}/${.TARGET}"; \
 		${_MKSHECHO}\
 		${LD} -Map ${.TARGET}.map --cref ${LINKFLAGS} -o ${.TARGET} \
-		'$${SYSTEM_OBJ:N*swap*netbsd*}' '$${EXTRA_OBJ}' vers.o \
+		'$${SYSTEM_OBJ:N*swap*${.TARGET}*}' '$${EXTRA_OBJ}' vers.o \
 		${OBJS:M*swap${.TARGET}.o}; \
 		${LD} -Map ${.TARGET}.map --cref ${LINKFLAGS} -o ${.TARGET} \
-		${SYSTEM_OBJ:N*swap*netbsd*} ${EXTRA_OBJ} vers.o \
+		${SYSTEM_OBJ:N*swap*${.TARGET}*} ${EXTRA_OBJ} vers.o \
 		${OBJS:M*swap${.TARGET}.o}
 
 TEXTADDR?=	${LOADADDRESS}			# backwards compatibility



CVS commit: src

2017-01-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jan  4 15:41:24 UTC 2017

Modified Files:
src/distrib/sets/lists/xserver: md.alpha md.amd64 md.amiga md.bebox
md.cats md.dreamcast md.evbarm md.evbmips md.ews4800mips md.hp300
md.hpcarm md.hpcmips md.hpcsh md.i386 md.ibmnws md.luna68k
md.mac68k md.macppc md.netwinder md.newsmips md.ofppc md.prep
md.sgimips md.shark md.sparc md.sparc64 md.vax md.zaurus
src/external/mit/xorg/include/xtrans: Makefile

Log Message:
PR/51770: Yorick Hardy: Install xtrans.m4 (needed by net/tigervnc)


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/distrib/sets/lists/xserver/md.alpha
cvs rdiff -u -r1.98 -r1.99 src/distrib/sets/lists/xserver/md.amd64
cvs rdiff -u -r1.25 -r1.26 src/distrib/sets/lists/xserver/md.amiga
cvs rdiff -u -r1.14 -r1.15 src/distrib/sets/lists/xserver/md.bebox
cvs rdiff -u -r1.54 -r1.55 src/distrib/sets/lists/xserver/md.cats
cvs rdiff -u -r1.23 -r1.24 src/distrib/sets/lists/xserver/md.dreamcast
cvs rdiff -u -r1.13 -r1.14 src/distrib/sets/lists/xserver/md.evbarm
cvs rdiff -u -r1.8 -r1.9 src/distrib/sets/lists/xserver/md.evbmips
cvs rdiff -u -r1.19 -r1.20 src/distrib/sets/lists/xserver/md.ews4800mips \
src/distrib/sets/lists/xserver/md.hp300
cvs rdiff -u -r1.22 -r1.23 src/distrib/sets/lists/xserver/md.hpcarm
cvs rdiff -u -r1.28 -r1.29 src/distrib/sets/lists/xserver/md.hpcmips
cvs rdiff -u -r1.21 -r1.22 src/distrib/sets/lists/xserver/md.hpcsh
cvs rdiff -u -r1.115 -r1.116 src/distrib/sets/lists/xserver/md.i386
cvs rdiff -u -r1.3 -r1.4 src/distrib/sets/lists/xserver/md.ibmnws
cvs rdiff -u -r1.16 -r1.17 src/distrib/sets/lists/xserver/md.luna68k \
src/distrib/sets/lists/xserver/md.vax
cvs rdiff -u -r1.18 -r1.19 src/distrib/sets/lists/xserver/md.mac68k \
src/distrib/sets/lists/xserver/md.newsmips \
src/distrib/sets/lists/xserver/md.prep \
src/distrib/sets/lists/xserver/md.zaurus
cvs rdiff -u -r1.74 -r1.75 src/distrib/sets/lists/xserver/md.macppc
cvs rdiff -u -r1.36 -r1.37 src/distrib/sets/lists/xserver/md.netwinder
cvs rdiff -u -r1.26 -r1.27 src/distrib/sets/lists/xserver/md.ofppc
cvs rdiff -u -r1.55 -r1.56 src/distrib/sets/lists/xserver/md.sgimips
cvs rdiff -u -r1.50 -r1.51 src/distrib/sets/lists/xserver/md.shark
cvs rdiff -u -r1.65 -r1.66 src/distrib/sets/lists/xserver/md.sparc
cvs rdiff -u -r1.63 -r1.64 src/distrib/sets/lists/xserver/md.sparc64
cvs rdiff -u -r1.4 -r1.5 src/external/mit/xorg/include/xtrans/Makefile

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

Modified files:

Index: src/distrib/sets/lists/xserver/md.alpha
diff -u src/distrib/sets/lists/xserver/md.alpha:1.44 src/distrib/sets/lists/xserver/md.alpha:1.45
--- src/distrib/sets/lists/xserver/md.alpha:1.44	Sat Sep 24 17:57:38 2016
+++ src/distrib/sets/lists/xserver/md.alpha	Wed Jan  4 10:41:24 2017
@@ -1,4 +1,4 @@
-# $NetBSD: md.alpha,v 1.44 2016/09/24 21:57:38 mrg Exp $
+# $NetBSD: md.alpha,v 1.45 2017/01/04 15:41:24 christos Exp $
 ./usr/X11R7/bin/X	-unknown-	xorg
 ./usr/X11R7/bin/Xorg	-unknown-	xorg
 ./usr/X11R7/bin/cvt	-unknown-	xorg
@@ -403,3 +403,4 @@
 ./usr/X11R7/man/man4/wsfb.4-unknown-	.man,xorg
 ./usr/X11R7/man/man5/xorg.conf.5			-unknown-	.man,xorg
 ./usr/X11R7/share/aclocal/xorg-server.m4		-unknown-	xorg
+./usr/X11R7/share/aclocal/xtrans.m4			-unknown-	xorg

Index: src/distrib/sets/lists/xserver/md.amd64
diff -u src/distrib/sets/lists/xserver/md.amd64:1.98 src/distrib/sets/lists/xserver/md.amd64:1.99
--- src/distrib/sets/lists/xserver/md.amd64:1.98	Mon Sep 26 18:37:31 2016
+++ src/distrib/sets/lists/xserver/md.amd64	Wed Jan  4 10:41:24 2017
@@ -1,4 +1,4 @@
-# $NetBSD: md.amd64,v 1.98 2016/09/26 22:37:31 mrg Exp $
+# $NetBSD: md.amd64,v 1.99 2017/01/04 15:41:24 christos Exp $
 ./usr/X11R7/bin/X	-unknown-	xorg
 ./usr/X11R7/bin/Xorg	-unknown-	xorg
 ./usr/X11R7/bin/cvt	-unknown-	xorg
@@ -461,3 +461,4 @@
 ./usr/X11R7/man/man4/xgi.4-unknown-	.man,xorg,xorg_server_ver=118,obsolete
 ./usr/X11R7/man/man5/xorg.conf.5			-unknown-	.man,xorg
 ./usr/X11R7/share/aclocal/xorg-server.m4		-unknown-	xorg
+./usr/X11R7/share/aclocal/xtrans.m4			-unknown-	xorg

Index: src/distrib/sets/lists/xserver/md.amiga
diff -u src/distrib/sets/lists/xserver/md.amiga:1.25 src/distrib/sets/lists/xserver/md.amiga:1.26
--- src/distrib/sets/lists/xserver/md.amiga:1.25	Sat Sep 24 17:57:38 2016
+++ src/distrib/sets/lists/xserver/md.amiga	Wed Jan  4 10:41:24 2017
@@ -1,4 +1,4 @@
-# $NetBSD: md.amiga,v 1.25 2016/09/24 21:57:38 mrg Exp $
+# $NetBSD: md.amiga,v 1.26 2017/01/04 15:41:24 christos Exp $
 ./usr/X11R7/bin/X	-unknown-	xorg
 ./usr/X11R7/bin/Xorg	-unknown-	xorg
 ./usr/X11R7/bin/cvt	-unknown-	xorg
@@ -108,3 +108,4 @@
 ./usr/X11R7/man/man4/wsfb.4-unknown-	.man,xorg
 ./usr/X11R7/man/man5/xorg.conf.5			-unknown-	.man,xorg
 ./usr/X11R7/share/aclocal/xorg-server.m4		-unknown-	xorg

CVS commit: src/sys/netinet

2017-01-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jan  4 15:09:37 UTC 2017

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

Log Message:
Fix optlen calculation for the SACK block - 2 bytes too few were
calculated, causing corruption in PR kern/51767.


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

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

Modified files:

Index: src/sys/netinet/tcp_output.c
diff -u src/sys/netinet/tcp_output.c:1.193 src/sys/netinet/tcp_output.c:1.194
--- src/sys/netinet/tcp_output.c:1.193	Wed Jan  4 12:35:14 2017
+++ src/sys/netinet/tcp_output.c	Wed Jan  4 15:09:37 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: tcp_output.c,v 1.193 2017/01/04 12:35:14 kre Exp $	*/
+/*	$NetBSD: tcp_output.c,v 1.194 2017/01/04 15:09:37 martin Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -135,7 +135,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tcp_output.c,v 1.193 2017/01/04 12:35:14 kre Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tcp_output.c,v 1.194 2017/01/04 15:09:37 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -1267,7 +1267,7 @@ send:
 *lp++ = htonl(tiqe->ipqe_seq + tiqe->ipqe_len +
 ((tiqe->ipqe_flags & TH_FIN) != 0 ? 1 : 0));
 			}
-			optlen += sack_len;
+			optlen += sack_len + 2;
 			optp += sack_len;
 		} else {
 			optp -= alen;



CVS commit: src/sys/net

2017-01-04 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Wed Jan  4 13:03:41 UTC 2017

Modified Files:
src/sys/net: pfil.c

Log Message:
Not to use ph_inout[2]. dir (= PFIL_IN or PFIL_OUT) is 1 or 2, not 0 or 1.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/sys/net/pfil.c

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

Modified files:

Index: src/sys/net/pfil.c
diff -u src/sys/net/pfil.c:1.29 src/sys/net/pfil.c:1.30
--- src/sys/net/pfil.c:1.29	Mon Dec 26 23:21:49 2016
+++ src/sys/net/pfil.c	Wed Jan  4 13:03:41 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: pfil.c,v 1.29 2016/12/26 23:21:49 christos Exp $	*/
+/*	$NetBSD: pfil.c,v 1.30 2017/01/04 13:03:41 ryo Exp $	*/
 
 /*
  * Copyright (c) 2013 Mindaugas Rasiukevicius 
@@ -28,7 +28,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pfil.c,v 1.29 2016/12/26 23:21:49 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pfil.c,v 1.30 2017/01/04 13:03:41 ryo Exp $");
 
 #include 
 #include 
@@ -57,7 +57,8 @@ CTASSERT(PFIL_IN == 1);
 CTASSERT(PFIL_OUT == 2);
 
 struct pfil_head {
-	pfil_list_t	ph_inout[2];
+	pfil_list_t	ph_in;
+	pfil_list_t	ph_out;
 	pfil_list_t	ph_ifaddr;
 	pfil_list_t	ph_ifevent;
 	int		ph_type;
@@ -121,8 +122,9 @@ pfil_hook_get(int dir, pfil_head_t *ph)
 {
 	switch (dir) {
 	case PFIL_IN:
+		return >ph_in;
 	case PFIL_OUT:
-		return >ph_inout[dir];
+		return >ph_out;
 	case PFIL_IFADDR:
 		return >ph_ifaddr;
 	case PFIL_IFNET:
@@ -286,7 +288,7 @@ pfil_run_hooks(pfil_head_t *ph, struct m
 	int ret = 0;
 
 	KASSERT((dir & ~PFIL_ALL) == 0);
-	if (__predict_false((phlist = >ph_inout[dir]) == NULL)) {
+	if (__predict_false((phlist = pfil_hook_get(dir, ph)) == NULL)) {
 		return ret;
 	}
 



CVS commit: src/sys/netinet

2017-01-04 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Wed Jan  4 12:35:14 UTC 2017

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

Log Message:
Remove redundant tests:  if optlen === 0, then optlen % 4 != 2 (it is 0)
so there is no need to test both.


To generate a diff of this commit:
cvs rdiff -u -r1.352 -r1.353 src/sys/netinet/tcp_input.c
cvs rdiff -u -r1.192 -r1.193 src/sys/netinet/tcp_output.c

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

Modified files:

Index: src/sys/netinet/tcp_input.c
diff -u src/sys/netinet/tcp_input.c:1.352 src/sys/netinet/tcp_input.c:1.353
--- src/sys/netinet/tcp_input.c:1.352	Mon Jan  2 01:18:42 2017
+++ src/sys/netinet/tcp_input.c	Wed Jan  4 12:35:14 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: tcp_input.c,v 1.352 2017/01/02 01:18:42 christos Exp $	*/
+/*	$NetBSD: tcp_input.c,v 1.353 2017/01/04 12:35:14 kre Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -148,7 +148,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tcp_input.c,v 1.352 2017/01/02 01:18:42 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tcp_input.c,v 1.353 2017/01/04 12:35:14 kre Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -4656,7 +4656,7 @@ syn_cache_respond(struct syn_cache *sc, 
 	}
 
 	if (sc->sc_flags & SCF_TIMESTAMP) {
-while (!optlen || optlen % 4 != 2) {
+while (optlen % 4 != 2) {
 optlen += TCPOLEN_NOP;
 *optp++ = TCPOPT_NOP;
 }

Index: src/sys/netinet/tcp_output.c
diff -u src/sys/netinet/tcp_output.c:1.192 src/sys/netinet/tcp_output.c:1.193
--- src/sys/netinet/tcp_output.c:1.192	Tue Jan  3 20:59:32 2017
+++ src/sys/netinet/tcp_output.c	Wed Jan  4 12:35:14 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: tcp_output.c,v 1.192 2017/01/03 20:59:32 christos Exp $	*/
+/*	$NetBSD: tcp_output.c,v 1.193 2017/01/04 12:35:14 kre Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -135,7 +135,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tcp_output.c,v 1.192 2017/01/03 20:59:32 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tcp_output.c,v 1.193 2017/01/04 12:35:14 kre Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -1194,7 +1194,7 @@ send:
 	((flags & (TH_SYN|TH_ACK)) == TH_SYN ||
 	 (tp->t_flags & TF_RCVD_TSTMP))) {
 		int alen = 0;
-		while (!optlen || optlen % 4 != 2) {
+		while (optlen % 4 != 2) {
 			optlen += TCPOLEN_NOP;
 			*optp++ = TCPOPT_NOP;
 			alen++;
@@ -1242,7 +1242,7 @@ send:
 	if (sack_numblks) {
 		int alen = 0;
 		int sack_len = sack_numblks * 8;
-		while (!optlen || optlen % 4 != 2) {
+		while (optlen % 4 != 2) {
 			optlen += TCPOLEN_NOP;
 			*optp++ = TCPOPT_NOP;
 			alen++;



CVS commit: src/sys/fs/tmpfs

2017-01-04 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Wed Jan  4 10:06:43 UTC 2017

Modified Files:
src/sys/fs/tmpfs: tmpfs_subr.c

Log Message:
Change tmpfs_chsize() to update mtime etc. even if "length == node->tn_size".

Adresses PR kern/51762 "mtime not updated by open(O_TRUNC)"


To generate a diff of this commit:
cvs rdiff -u -r1.101 -r1.102 src/sys/fs/tmpfs/tmpfs_subr.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/fs/tmpfs/tmpfs_subr.c
diff -u src/sys/fs/tmpfs/tmpfs_subr.c:1.101 src/sys/fs/tmpfs/tmpfs_subr.c:1.102
--- src/sys/fs/tmpfs/tmpfs_subr.c:1.101	Thu Oct 29 16:19:44 2015
+++ src/sys/fs/tmpfs/tmpfs_subr.c	Wed Jan  4 10:06:43 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: tmpfs_subr.c,v 1.101 2015/10/29 16:19:44 leot Exp $	*/
+/*	$NetBSD: tmpfs_subr.c,v 1.102 2017/01/04 10:06:43 hannken Exp $	*/
 
 /*
  * Copyright (c) 2005-2013 The NetBSD Foundation, Inc.
@@ -73,7 +73,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tmpfs_subr.c,v 1.101 2015/10/29 16:19:44 leot Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tmpfs_subr.c,v 1.102 2017/01/04 10:06:43 hannken Exp $");
 
 #include 
 #include 
@@ -1125,12 +1125,10 @@ tmpfs_chsize(vnode_t *vp, u_quad_t size,
 	if (length < 0) {
 		return EINVAL;
 	}
-	if (node->tn_size == length) {
-		return 0;
-	}
 
 	/* Note: tmpfs_reg_resize() will raise NOTE_EXTEND and NOTE_ATTRIB. */
-	if ((error = tmpfs_reg_resize(vp, length)) != 0) {
+	if (node->tn_size != length &&
+	(error = tmpfs_reg_resize(vp, length)) != 0) {
 		return error;
 	}
 	tmpfs_update(vp, TMPFS_UPDATE_CTIME | TMPFS_UPDATE_MTIME);



CVS commit: src/sys/ufs/ufs

2017-01-04 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Wed Jan  4 10:04:17 UTC 2017

Modified Files:
src/sys/ufs/ufs: ufs_inode.c

Log Message:
Change ufs_truncate_retry() to call UFS_TRUNCATE() at least once.
Even with "newsize == ip->i_size" it must set mtime etc.

Adresses PR kern/51762 "mtime not updated by open(O_TRUNC)"


To generate a diff of this commit:
cvs rdiff -u -r1.97 -r1.98 src/sys/ufs/ufs/ufs_inode.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/ufs/ufs/ufs_inode.c
diff -u src/sys/ufs/ufs/ufs_inode.c:1.97 src/sys/ufs/ufs/ufs_inode.c:1.98
--- src/sys/ufs/ufs/ufs_inode.c:1.97	Fri Oct 28 20:38:12 2016
+++ src/sys/ufs/ufs/ufs_inode.c	Wed Jan  4 10:04:17 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: ufs_inode.c,v 1.97 2016/10/28 20:38:12 jdolecek Exp $	*/
+/*	$NetBSD: ufs_inode.c,v 1.98 2017/01/04 10:04:17 hannken Exp $	*/
 
 /*
  * Copyright (c) 1991, 1993
@@ -37,7 +37,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ufs_inode.c,v 1.97 2016/10/28 20:38:12 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ufs_inode.c,v 1.98 2017/01/04 10:04:17 hannken Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_ffs.h"
@@ -303,7 +303,7 @@ ufs_truncate_retry(struct vnode *vp, uin
 	/*
 	 * Truncate might temporarily fail, loop until done.
 	 */
-	while (ip->i_size != newsize) {
+	do {
 		error = UFS_WAPBL_BEGIN(mp);
 		if (error)
 			goto out;
@@ -313,7 +313,7 @@ ufs_truncate_retry(struct vnode *vp, uin
 
 		if (error != 0 && error != EAGAIN)
 			goto out;
-	}
+	} while (ip->i_size != newsize);
 
   out:
 	return error;