CVS commit: src/share/mk

2016-09-16 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Sat Sep 17 04:01:43 UTC 2016

Modified Files:
src/share/mk: bsd.own.mk

Log Message:
Fix the fix...


To generate a diff of this commit:
cvs rdiff -u -r1.958 -r1.959 src/share/mk/bsd.own.mk

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

Modified files:

Index: src/share/mk/bsd.own.mk
diff -u src/share/mk/bsd.own.mk:1.958 src/share/mk/bsd.own.mk:1.959
--- src/share/mk/bsd.own.mk:1.958	Sat Sep 17 02:50:08 2016
+++ src/share/mk/bsd.own.mk	Sat Sep 17 04:01:43 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.own.mk,v 1.958 2016/09/17 02:50:08 christos Exp $
+#	$NetBSD: bsd.own.mk,v 1.959 2016/09/17 04:01:43 kre Exp $
 
 # This needs to be before bsd.init.mk
 .if defined(BSD_MK_COMPAT_FILE)
@@ -173,7 +173,7 @@ EXTERNAL_GDB_SUBDIR=		gdb
 ${MACHINE} == "sparc" || \
 ${MACHINE} == "sparc64" || \
 ${MACHINE} == "vax" || \
-${MACHINE_CPU} == "m68k" || \\
+${MACHINE_CPU} == "m68k" || \
 ${MACHINE_CPU} == "sh3" || \
 ${MACHINE_ARCH} == "mipseb" || ${MACHINE_ARCH} == "mipsel" || \
 ${MACHINE_ARCH} == "powerpc"



CVS commit: src/sys/dev/pci

2016-09-16 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Sep 17 03:02:03 UTC 2016

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

Log Message:
Since the ld code included with the nvme module references stuff in
the dk_subr module, add a dependency.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/pci/nvme_pci.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/nvme_pci.c
diff -u src/sys/dev/pci/nvme_pci.c:1.7 src/sys/dev/pci/nvme_pci.c:1.8
--- src/sys/dev/pci/nvme_pci.c:1.7	Fri Sep 16 23:20:31 2016
+++ src/sys/dev/pci/nvme_pci.c	Sat Sep 17 03:02:03 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: nvme_pci.c,v 1.7 2016/09/16 23:20:31 pgoyette Exp $	*/
+/*	$NetBSD: nvme_pci.c,v 1.8 2016/09/17 03:02:03 pgoyette Exp $	*/
 /*	$OpenBSD: nvme_pci.c,v 1.3 2016/04/14 11:18:32 dlg Exp $ */
 
 /*
@@ -43,7 +43,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: nvme_pci.c,v 1.7 2016/09/16 23:20:31 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nvme_pci.c,v 1.8 2016/09/17 03:02:03 pgoyette Exp $");
 
 #include 
 #include 
@@ -417,7 +417,7 @@ retry:
 	return 0;
 }
 
-MODULE(MODULE_CLASS_DRIVER, nvme, "pci");
+MODULE(MODULE_CLASS_DRIVER, nvme, "pci,dk_subr");
 
 #ifdef _MODULE
 #include "ioconf.c"



CVS commit: src/share/mk

2016-09-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Sep 17 02:50:08 UTC 2016

Modified Files:
src/share/mk: bsd.own.mk

Log Message:
add \


To generate a diff of this commit:
cvs rdiff -u -r1.957 -r1.958 src/share/mk/bsd.own.mk

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

Modified files:

Index: src/share/mk/bsd.own.mk
diff -u src/share/mk/bsd.own.mk:1.957 src/share/mk/bsd.own.mk:1.958
--- src/share/mk/bsd.own.mk:1.957	Fri Sep 16 20:59:59 2016
+++ src/share/mk/bsd.own.mk	Fri Sep 16 22:50:08 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.own.mk,v 1.957 2016/09/17 00:59:59 christos Exp $
+#	$NetBSD: bsd.own.mk,v 1.958 2016/09/17 02:50:08 christos Exp $
 
 # This needs to be before bsd.init.mk
 .if defined(BSD_MK_COMPAT_FILE)
@@ -173,7 +173,7 @@ EXTERNAL_GDB_SUBDIR=		gdb
 ${MACHINE} == "sparc" || \
 ${MACHINE} == "sparc64" || \
 ${MACHINE} == "vax" || \
-${MACHINE_CPU} == "m68k" ||
+${MACHINE_CPU} == "m68k" || \\
 ${MACHINE_CPU} == "sh3" || \
 ${MACHINE_ARCH} == "mipseb" || ${MACHINE_ARCH} == "mipsel" || \
 ${MACHINE_ARCH} == "powerpc"



CVS commit: src/sys/modules/compat_netbsd32

2016-09-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Sep 17 02:45:24 UTC 2016

Modified Files:
src/sys/modules/compat_netbsd32: Makefile

Log Message:
Add KTRACE


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/modules/compat_netbsd32/Makefile

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

Modified files:

Index: src/sys/modules/compat_netbsd32/Makefile
diff -u src/sys/modules/compat_netbsd32/Makefile:1.18 src/sys/modules/compat_netbsd32/Makefile:1.19
--- src/sys/modules/compat_netbsd32/Makefile:1.18	Thu Dec  3 05:38:21 2015
+++ src/sys/modules/compat_netbsd32/Makefile	Fri Sep 16 22:45:24 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.18 2015/12/03 10:38:21 pgoyette Exp $
+#	$NetBSD: Makefile,v 1.19 2016/09/17 02:45:24 christos Exp $
 
 .include "../Makefile.inc"
 .include "../Makefile.assym"
@@ -21,7 +21,7 @@ CPPFLAGS+=	-DCOMPAT_43
 CPPFLAGS+=	-DCOMPAT_NETBSD32
 CPPFLAGS+=	-DEXEC_ELF32 -DEXEC_ELF64
 CPPFLAGS+=	-DCOREDUMP -DNTP -DVMSWAP
-CPPFLAGS+=	-DNTP
+CPPFLAGS+=	-DNTP -DKTRACE
 
 .PATH:	${S}/compat/netbsd32
 SRCS+=	netbsd32_compat_09.c netbsd32_compat_10.c



CVS commit: src/sys/compat/netbsd32

2016-09-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Sep 17 02:44:38 UTC 2016

Modified Files:
src/sys/compat/netbsd32: netbsd32.h netbsd32_netbsd.c netbsd32_signal.c

Log Message:
deal with not having KTRACE


To generate a diff of this commit:
cvs rdiff -u -r1.109 -r1.110 src/sys/compat/netbsd32/netbsd32.h
cvs rdiff -u -r1.203 -r1.204 src/sys/compat/netbsd32/netbsd32_netbsd.c
cvs rdiff -u -r1.40 -r1.41 src/sys/compat/netbsd32/netbsd32_signal.c

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

Modified files:

Index: src/sys/compat/netbsd32/netbsd32.h
diff -u src/sys/compat/netbsd32/netbsd32.h:1.109 src/sys/compat/netbsd32/netbsd32.h:1.110
--- src/sys/compat/netbsd32/netbsd32.h:1.109	Thu Nov 26 08:15:34 2015
+++ src/sys/compat/netbsd32/netbsd32.h	Fri Sep 16 22:44:38 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32.h,v 1.109 2015/11/26 13:15:34 martin Exp $	*/
+/*	$NetBSD: netbsd32.h,v 1.110 2016/09/17 02:44:38 christos Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001, 2008, 2015 Matthew R. Green
@@ -1106,6 +1106,12 @@ void netbsd32_adjust_limits(struct proc 
 void	netbsd32_si_to_si32(siginfo32_t *, const siginfo_t *);
 void	netbsd32_ksi32_to_ksi(struct _ksiginfo *si, const struct __ksiginfo32 *si32);
 
+#ifdef KTRACE
+void netbsd32_ktrpsig(int, sig_t, const sigset_t *, const ksiginfo_t *);
+#else
+#define netbsd32_ktrpsig NULL
+#endif
+
 
 void	startlwp32(void *);
 struct compat_50_netbsd32___semctl14_args;

Index: src/sys/compat/netbsd32/netbsd32_netbsd.c
diff -u src/sys/compat/netbsd32/netbsd32_netbsd.c:1.203 src/sys/compat/netbsd32/netbsd32_netbsd.c:1.204
--- src/sys/compat/netbsd32/netbsd32_netbsd.c:1.203	Tue Sep 13 03:39:45 2016
+++ src/sys/compat/netbsd32/netbsd32_netbsd.c	Fri Sep 16 22:44:38 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_netbsd.c,v 1.203 2016/09/13 07:39:45 martin Exp $	*/
+/*	$NetBSD: netbsd32_netbsd.c,v 1.204 2016/09/17 02:44:38 christos Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001, 2008 Matthew R. Green
@@ -27,11 +27,12 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_netbsd.c,v 1.203 2016/09/13 07:39:45 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_netbsd.c,v 1.204 2016/09/17 02:44:38 christos Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_ddb.h"
 #include "opt_ntp.h"
+#include "opt_ktrace.h"
 #include "opt_compat_netbsd.h"
 #include "opt_compat_43.h"
 #include "opt_sysv.h"
@@ -103,8 +104,6 @@ void netbsd32_syscall_intern(struct proc
 void syscall(void);
 #endif
 
-void netbsd32_ktrpsig(int, sig_t, const sigset_t *, const ksiginfo_t *);
-
 #define LIMITCHECK(a, b) ((a) != RLIM_INFINITY && (a) > (b))
 
 #ifdef COMPAT_16

Index: src/sys/compat/netbsd32/netbsd32_signal.c
diff -u src/sys/compat/netbsd32/netbsd32_signal.c:1.40 src/sys/compat/netbsd32/netbsd32_signal.c:1.41
--- src/sys/compat/netbsd32/netbsd32_signal.c:1.40	Tue Sep 13 03:39:45 2016
+++ src/sys/compat/netbsd32/netbsd32_signal.c	Fri Sep 16 22:44:38 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_signal.c,v 1.40 2016/09/13 07:39:45 martin Exp $	*/
+/*	$NetBSD: netbsd32_signal.c,v 1.41 2016/09/17 02:44:38 christos Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -27,7 +27,11 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_signal.c,v 1.40 2016/09/13 07:39:45 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_signal.c,v 1.41 2016/09/17 02:44:38 christos Exp $");
+
+#if defined(_KERNEL_OPT) 
+#include "opt_ktrace.h"
+#endif
 
 #include 
 #include 
@@ -52,8 +56,6 @@ __KERNEL_RCSID(0, "$NetBSD: netbsd32_sig
 #include 
 #include 
 
-void netbsd32_ktrpsig(int, sig_t, const sigset_t *, const ksiginfo_t *);
-
 int
 netbsd32_sigaction(struct lwp *l, const struct netbsd32_sigaction_args *uap, register_t *retval)
 {
@@ -506,6 +508,7 @@ struct netbsd32_ktr_psig {
 	/* and optional siginfo_t */
 };
 
+#ifdef KTRACE
 void
 netbsd32_ktrpsig(int sig, sig_t action, const sigset_t *mask,
 	 const ksiginfo_t *ksi)
@@ -539,5 +542,6 @@ netbsd32_ktrpsig(int sig, sig_t action, 
 
 	ktraddentry(l, kte, KTA_WAITOK);
 }
+#endif
 
 



CVS commit: src/sys/netinet

2016-09-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Sep 17 02:37:59 UTC 2016

Modified Files:
src/sys/netinet: in_var.h

Log Message:
protect arplog with INET


To generate a diff of this commit:
cvs rdiff -u -r1.83 -r1.84 src/sys/netinet/in_var.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/netinet/in_var.h
diff -u src/sys/netinet/in_var.h:1.83 src/sys/netinet/in_var.h:1.84
--- src/sys/netinet/in_var.h:1.83	Fri Sep 16 10:17:23 2016
+++ src/sys/netinet/in_var.h	Fri Sep 16 22:37:59 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: in_var.h,v 1.83 2016/09/16 14:17:23 roy Exp $	*/
+/*	$NetBSD: in_var.h,v 1.84 2016/09/17 02:37:59 christos Exp $	*/
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -378,9 +378,13 @@ struct in_multi {
 extern pktqueue_t *ip_pktq;
 
 extern int ip_dad_count;		/* Duplicate Address Detection probes */
+#ifdef INET
 extern int arp_debug;
 #define arplog(level, fmt, args...) \
 	do { if (arp_debug) log(level, "%s: " fmt, __func__, ##args);} while (0)
+#else
+#define arplog(level, fmt, args...)
+#endif
 
 /*
  * Structure used by functions below to remember position when stepping



CVS commit: src/sys/kern

2016-09-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Sep 17 02:29:11 UTC 2016

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

Log Message:
move aslr stuff to the aslr section


To generate a diff of this commit:
cvs rdiff -u -r1.56 -r1.57 src/sys/kern/kern_pax.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_pax.c
diff -u src/sys/kern/kern_pax.c:1.56 src/sys/kern/kern_pax.c:1.57
--- src/sys/kern/kern_pax.c:1.56	Sat Sep  3 08:20:58 2016
+++ src/sys/kern/kern_pax.c	Fri Sep 16 22:29:11 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_pax.c,v 1.56 2016/09/03 12:20:58 christos Exp $	*/
+/*	$NetBSD: kern_pax.c,v 1.57 2016/09/17 02:29:11 christos Exp $	*/
 
 /*
  * Copyright (c) 2015 The NetBSD Foundation, Inc.
@@ -57,7 +57,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_pax.c,v 1.56 2016/09/03 12:20:58 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_pax.c,v 1.57 2016/09/17 02:29:11 christos Exp $");
 
 #include "opt_pax.h"
 
@@ -111,6 +111,19 @@ int pax_aslr_global = PAX_ASLR;
 #endif
 #define PAX_ASLR_MAX_STACK_WASTE	8
 
+#ifdef PAX_ASLR_DEBUG
+int pax_aslr_debug;
+/* flag set means disable */
+int pax_aslr_flags;
+uint32_t pax_aslr_rand;
+#define PAX_ASLR_STACK		0x01
+#define PAX_ASLR_STACK_GAP	0x02
+#define PAX_ASLR_MMAP		0x04
+#define PAX_ASLR_EXEC_OFFSET	0x08
+#define PAX_ASLR_RTLD_OFFSET	0x10
+#define PAX_ASLR_FIXED		0x20
+#endif
+
 static bool pax_aslr_elf_flags_active(uint32_t);
 #endif /* PAX_ASLR */
 
@@ -135,18 +148,6 @@ int pax_mprotect_debug;
 #define	PAX_SEGVGUARD_MAXCRASHES	5
 #endif
 
-#ifdef PAX_ASLR_DEBUG
-int pax_aslr_debug;
-/* flag set means disable */
-int pax_aslr_flags;
-uint32_t pax_aslr_rand;
-#define PAX_ASLR_STACK		0x01
-#define PAX_ASLR_STACK_GAP	0x02
-#define PAX_ASLR_MMAP		0x04
-#define PAX_ASLR_EXEC_OFFSET	0x08
-#define PAX_ASLR_RTLD_OFFSET	0x10
-#define PAX_ASLR_FIXED		0x20
-#endif
 
 static int pax_segvguard_enabled = 1;
 static int pax_segvguard_global = PAX_SEGVGUARD;



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

2016-09-16 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Sep 17 02:27:19 UTC 2016

Modified Files:
src/distrib/sets/lists/modules: md.amd64 md.i386 mi

Log Message:
Fix sets lists for nvme module.  Since it is being built only for the
i386 and amd64 platforms, the entries belong in the md.xxx lists, not
in the mi list.


To generate a diff of this commit:
cvs rdiff -u -r1.66 -r1.67 src/distrib/sets/lists/modules/md.amd64
cvs rdiff -u -r1.68 -r1.69 src/distrib/sets/lists/modules/md.i386
cvs rdiff -u -r1.95 -r1.96 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/md.amd64
diff -u src/distrib/sets/lists/modules/md.amd64:1.66 src/distrib/sets/lists/modules/md.amd64:1.67
--- src/distrib/sets/lists/modules/md.amd64:1.66	Thu Dec  3 10:38:21 2015
+++ src/distrib/sets/lists/modules/md.amd64	Sat Sep 17 02:27:19 2016
@@ -1,4 +1,4 @@
-# $NetBSD: md.amd64,v 1.66 2015/12/03 10:38:21 pgoyette Exp $
+# $NetBSD: md.amd64,v 1.67 2016/09/17 02:27:19 pgoyette Exp $
 #
 # NOTE that there are two sets of files here:
 # @MODULEDIR@ and amd64-xen
@@ -123,6 +123,8 @@
 ./@MODULEDIR@/lm_wbsio/lm_wbsio.kmod		base-kernel-modules	kmod
 ./@MODULEDIR@/mt2131base-kernel-modules	kmod
 ./@MODULEDIR@/mt2131/mt2131.kmod		base-kernel-modules	kmod
+./@MODULEDIR@/nvmebase-kernel-modules	kmod
+./@MODULEDIR@/nvme/nvme.kmod			base-kernel-modules	kmod
 ./@MODULEDIR@/nxt2kbase-kernel-modules	kmod
 ./@MODULEDIR@/nxt2k/nxt2k.kmod			base-kernel-modules	kmod
 ./@MODULEDIR@/odcmbase-kernel-modules	kmod

Index: src/distrib/sets/lists/modules/md.i386
diff -u src/distrib/sets/lists/modules/md.i386:1.68 src/distrib/sets/lists/modules/md.i386:1.69
--- src/distrib/sets/lists/modules/md.i386:1.68	Tue Jun 23 14:38:49 2015
+++ src/distrib/sets/lists/modules/md.i386	Sat Sep 17 02:27:19 2016
@@ -1,4 +1,4 @@
-# $NetBSD: md.i386,v 1.68 2015/06/23 14:38:49 matt Exp $
+# $NetBSD: md.i386,v 1.69 2016/09/17 02:27:19 pgoyette Exp $
 #
 # NOTE that there are three sets of files here:
 # @MODULEDIR@, i386-xen, and i386pae-xen
@@ -123,6 +123,9 @@
 ./@MODULEDIR@/mt2131/mt2131.kmod		base-kernel-modules	kmod
 ./@MODULEDIR@/nsclpcsiobase-kernel-modules	kmod
 ./@MODULEDIR@/nsclpcsio/nsclpcsio.kmod		base-kernel-modules	kmod
+./@MODULEDIR@/nvmebase-kernel-modules	kmod
+./@MODULEDIR@/nvme/nvme.kmod			base-kernel-modules	kmod
+
 ./@MODULEDIR@/nxt2kbase-kernel-modules	kmod
 ./@MODULEDIR@/nxt2k/nxt2k.kmod			base-kernel-modules	kmod
 ./@MODULEDIR@/odcmbase-kernel-modules	kmod

Index: src/distrib/sets/lists/modules/mi
diff -u src/distrib/sets/lists/modules/mi:1.95 src/distrib/sets/lists/modules/mi:1.96
--- src/distrib/sets/lists/modules/mi:1.95	Fri Sep 16 23:01:53 2016
+++ src/distrib/sets/lists/modules/mi	Sat Sep 17 02:27:19 2016
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.95 2016/09/16 23:01:53 pgoyette Exp $
+# $NetBSD: mi,v 1.96 2016/09/17 02:27:19 pgoyette Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -214,8 +214,6 @@
 ./@MODULEDIR@/ntfs/ntfs.kmod			base-kernel-modules	kmod
 ./@MODULEDIR@/nullbase-kernel-modules	kmod
 ./@MODULEDIR@/null/null.kmod			base-kernel-modules	kmod
-./@MODULEDIR@/nvmebase-kernel-modules	kmod
-./@MODULEDIR@/nvme/nvme.kmod			base-kernel-modules	kmod
 ./@MODULEDIR@/onewirebase-kernel-modules	kmod
 ./@MODULEDIR@/onewire/onewire.kmod		base-kernel-modules	kmod
 ./@MODULEDIR@/opencrypto			base-kernel-modules	kmod



CVS commit: src/share/mk

2016-09-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Sep 17 01:00:00 UTC 2016

Modified Files:
src/share/mk: bsd.own.mk

Log Message:
switch m68k to new gcc/gdb/binutils and pie. Tested with sun3 and tmesh.
Too bad there is not enough memory for ASLR :-)


To generate a diff of this commit:
cvs rdiff -u -r1.956 -r1.957 src/share/mk/bsd.own.mk

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

Modified files:

Index: src/share/mk/bsd.own.mk
diff -u src/share/mk/bsd.own.mk:1.956 src/share/mk/bsd.own.mk:1.957
--- src/share/mk/bsd.own.mk:1.956	Thu Sep 15 03:49:08 2016
+++ src/share/mk/bsd.own.mk	Fri Sep 16 20:59:59 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.own.mk,v 1.956 2016/09/15 07:49:08 mrg Exp $
+#	$NetBSD: bsd.own.mk,v 1.957 2016/09/17 00:59:59 christos Exp $
 
 # This needs to be before bsd.init.mk
 .if defined(BSD_MK_COMPAT_FILE)
@@ -68,9 +68,6 @@ MKGCC?=		no
 HAVE_GCC?=	0
 .elif \
 ${MACHINE_ARCH} == "mips64el" || ${MACHINE_ARCH} == "mips64eb" || \
-${MACHINE_CPU} == "m68k" || \
-${MACHINE_ARCH} == "coldfire" || \
-${MACHINE_ARCH} == "m68000" || \
 ${MACHINE} == "or1k" || \
 ${MACHINE} == "riscv"
 HAVE_GCC?=	48
@@ -149,9 +146,10 @@ USE_SSP?=	yes
 ${MACHINE} == "sparc64" || \
 ${MACHINE} == "vax" || \
 ${MACHINE_CPU} == "arm" || \
+${MACHINE_CPU} == "m68k" || \
+${MACHINE_CPU} == "mips" || \
 ${MACHINE_CPU} == "powerpc" || \
-${MACHINE_CPU} == "sh3" || \
-${MACHINE_CPU} == "mips"
+${MACHINE_CPU} == "sh3" ||
 HAVE_GDB?=	710
 .else
 HAVE_GDB?=	79
@@ -175,7 +173,7 @@ EXTERNAL_GDB_SUBDIR=		gdb
 ${MACHINE} == "sparc" || \
 ${MACHINE} == "sparc64" || \
 ${MACHINE} == "vax" || \
-${MACHINE_CPU} == "arm" || \
+${MACHINE_CPU} == "m68k" ||
 ${MACHINE_CPU} == "sh3" || \
 ${MACHINE_ARCH} == "mipseb" || ${MACHINE_ARCH} == "mipsel" || \
 ${MACHINE_ARCH} == "powerpc"
@@ -1072,6 +1070,7 @@ MKCTF?=		yes
 ${MACHINE_ARCH} == "x86_64" || \
 ${MACHINE_ARCH} == "mipsel" || ${MACHINE_ARCH} == "mipseb" || \
 ${MACHINE_CPU} == "arm" || \
+${MACHINE_CPU} == "m68k" || \
 ${MACHINE_CPU} == "sh3" || \
 ${MACHINE} == "sparc64"
 MKPIE?=		yes



CVS commit: src/external/gpl3/gcc/dist/gcc/config/m68k

2016-09-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Sep 17 00:55:40 UTC 2016

Modified Files:
src/external/gpl3/gcc/dist/gcc/config/m68k: m68k.md

Log Message:
undo the attempt to figure out mult clobbering; breaks compilation; revert
to the fsf version


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/gpl3/gcc/dist/gcc/config/m68k/m68k.md

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/gcc/config/m68k/m68k.md
diff -u src/external/gpl3/gcc/dist/gcc/config/m68k/m68k.md:1.5 src/external/gpl3/gcc/dist/gcc/config/m68k/m68k.md:1.6
--- src/external/gpl3/gcc/dist/gcc/config/m68k/m68k.md:1.5	Fri Sep 16 16:30:14 2016
+++ src/external/gpl3/gcc/dist/gcc/config/m68k/m68k.md	Fri Sep 16 20:55:40 2016
@@ -3135,34 +3135,16 @@
 ;; We need a separate DEFINE_EXPAND for u?mulsidi3 to be able to use the
 ;; proper matching constraint.  This is because the matching is between
 ;; the high-numbered word of the DImode operand[0] and operand[1].
-;;
-;; Note: life_analysis() does not keep track of the individual halves of the
-;; DImode register.  To prevent spurious liveness before the u?mulsidi3 insn
-;; (which causes "uninitialized variable" warnings), we explicitly clobber
-;; the DImode register.
 (define_expand "umulsidi3"
-  [(set (match_operand:DI 0 "register_operand" "")
-	(mult:DI (zero_extend:DI (match_operand:SI 1 "register_operand" ""))
-		 (zero_extend:DI (match_operand:SI 2 "register_operand" ""]
-  "TARGET_68020 && !TUNE_68060 && !TARGET_COLDFIRE"
-  "")
-
-(define_insn_and_split "*umulsidi3_split"
-  [(set (match_operand:DI 0 "register_operand" "")
-	(mult:DI (zero_extend:DI (match_operand:SI 1 "register_operand" ""))
-		 (zero_extend:DI (match_operand:SI 2 "register_operand" ""]
-  "TARGET_68020 && !TUNE_68060 && !TARGET_COLDFIRE"
-  "#"
-  "TARGET_68020 && !TUNE_68060 && !TARGET_COLDFIRE"
-  [
-   (parallel
-[(set (subreg:SI (match_dup 0) 4)
-	  (mult:SI (match_dup 1) (match_dup 2)))
+  [(parallel
+[(set (subreg:SI (match_operand:DI 0 "register_operand" "") 4)
+	  (mult:SI (match_operand:SI 1 "register_operand" "")
+		   (match_operand:SI 2 "register_operand" "")))
  (set (subreg:SI (match_dup 0) 0)
 	  (truncate:SI (lshiftrt:DI (mult:DI (zero_extend:DI (match_dup 1))
 	 (zero_extend:DI (match_dup 2)))
-(const_int 32])
-   (clobber (match_dup 0))]
+(const_int 32])]
+  "TARGET_68020 && !TUNE_68060 && !TARGET_COLDFIRE"
   "")
 
 (define_insn ""
@@ -3193,27 +3175,15 @@
   "mulu%.l %2,%3:%0")
 
 (define_expand "mulsidi3"
-  [(set (match_operand:DI 0 "register_operand" "")
-	(mult:DI (sign_extend:DI (match_operand:SI 1 "register_operand" ""))
-		 (sign_extend:DI (match_operand:SI 2 "register_operand" ""]
-  "TARGET_68020 && !TUNE_68060 && !TARGET_COLDFIRE"
-  "")
-
-(define_insn_and_split "*mulsidi3_split"
-  [(set (match_operand:DI 0 "register_operand" "")
-	(mult:DI (sign_extend:DI (match_operand:SI 1 "register_operand" ""))
-		 (sign_extend:DI (match_operand:SI 2 "register_operand" ""]
-  "TARGET_68020 && !TUNE_68060 && !TARGET_COLDFIRE"
-  "#"
-  "TARGET_68020 && !TUNE_68060 && !TARGET_COLDFIRE"
   [(parallel
-[(set (subreg:SI (match_dup 0) 4)
-	  (mult:SI (match_dup 1) (match_dup 2)))
+[(set (subreg:SI (match_operand:DI 0 "register_operand" "") 4)
+	  (mult:SI (match_operand:SI 1 "register_operand" "")
+		   (match_operand:SI 2 "register_operand" "")))
  (set (subreg:SI (match_dup 0) 0)
 	  (truncate:SI (lshiftrt:DI (mult:DI (sign_extend:DI (match_dup 1))
 	 (sign_extend:DI (match_dup 2)))
-(const_int 32])
-   (clobber (match_dup 0))]
+(const_int 32])]
+  "TARGET_68020 && !TUNE_68060 && !TARGET_COLDFIRE"
   "")
 
 (define_insn ""



CVS commit: src/sys/dev/pci

2016-09-16 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri Sep 16 23:20:31 UTC 2016

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

Log Message:
We need sys/module.h for built-in modules as well as for the .kmod so
#include it unconditionally.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/pci/nvme_pci.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/nvme_pci.c
diff -u src/sys/dev/pci/nvme_pci.c:1.6 src/sys/dev/pci/nvme_pci.c:1.7
--- src/sys/dev/pci/nvme_pci.c:1.6	Fri Sep 16 11:35:07 2016
+++ src/sys/dev/pci/nvme_pci.c	Fri Sep 16 23:20:31 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: nvme_pci.c,v 1.6 2016/09/16 11:35:07 jdolecek Exp $	*/
+/*	$NetBSD: nvme_pci.c,v 1.7 2016/09/16 23:20:31 pgoyette Exp $	*/
 /*	$OpenBSD: nvme_pci.c,v 1.3 2016/04/14 11:18:32 dlg Exp $ */
 
 /*
@@ -43,7 +43,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: nvme_pci.c,v 1.6 2016/09/16 11:35:07 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nvme_pci.c,v 1.7 2016/09/16 23:20:31 pgoyette Exp $");
 
 #include 
 #include 
@@ -55,9 +55,7 @@ __KERNEL_RCSID(0, "$NetBSD: nvme_pci.c,v
 #include 
 #include 
 #include 
-#ifdef _MODULE
 #include 
-#endif
 
 #include 
 #include 



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

2016-09-16 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri Sep 16 23:01:53 UTC 2016

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

Log Message:
Add the new nvme module to the sets lists.


To generate a diff of this commit:
cvs rdiff -u -r1.94 -r1.95 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.94 src/distrib/sets/lists/modules/mi:1.95
--- src/distrib/sets/lists/modules/mi:1.94	Sat Sep 10 02:20:41 2016
+++ src/distrib/sets/lists/modules/mi	Fri Sep 16 23:01:53 2016
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.94 2016/09/10 02:20:41 pgoyette Exp $
+# $NetBSD: mi,v 1.95 2016/09/16 23:01:53 pgoyette Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -214,6 +214,8 @@
 ./@MODULEDIR@/ntfs/ntfs.kmod			base-kernel-modules	kmod
 ./@MODULEDIR@/nullbase-kernel-modules	kmod
 ./@MODULEDIR@/null/null.kmod			base-kernel-modules	kmod
+./@MODULEDIR@/nvmebase-kernel-modules	kmod
+./@MODULEDIR@/nvme/nvme.kmod			base-kernel-modules	kmod
 ./@MODULEDIR@/onewirebase-kernel-modules	kmod
 ./@MODULEDIR@/onewire/onewire.kmod		base-kernel-modules	kmod
 ./@MODULEDIR@/opencrypto			base-kernel-modules	kmod



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

2016-09-16 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Fri Sep 16 22:39:36 UTC 2016

Modified Files:
src/sys/arch/sparc/dev: cgfourteen.c

Log Message:
wipe glyph cache as needed when re-entering text mode
now the console is readable again when leaving X


To generate a diff of this commit:
cvs rdiff -u -r1.81 -r1.82 src/sys/arch/sparc/dev/cgfourteen.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/sparc/dev/cgfourteen.c
diff -u src/sys/arch/sparc/dev/cgfourteen.c:1.81 src/sys/arch/sparc/dev/cgfourteen.c:1.82
--- src/sys/arch/sparc/dev/cgfourteen.c:1.81	Thu Jun  2 21:19:24 2016
+++ src/sys/arch/sparc/dev/cgfourteen.c	Fri Sep 16 22:39:35 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: cgfourteen.c,v 1.81 2016/06/02 21:19:24 macallan Exp $ */
+/*	$NetBSD: cgfourteen.c,v 1.82 2016/09/16 22:39:35 macallan Exp $ */
 
 /*
  * Copyright (c) 1996
@@ -418,9 +418,13 @@ cgfourteenclose(dev_t dev, int flags, in
 	/*
 	 * Restore video state to make the PROM happy, on last close.
 	 */
-	if (opens == 0)
+	if (opens == 0) {
 		cg14_reset(sc);
-
+#if NSX > 0
+		if (sc->sc_sx)
+			glyphcache_wipe(>sc_gc);
+#endif
+	}
 	return (0);
 }
 
@@ -918,6 +922,10 @@ cg14_ioctl(void *v, void *vs, u_long cmd
 
 		cg14_set_depth(sc, 8);
 		cg14_init_cmap(sc);
+#if NSX > 0
+		if (sc->sc_sx)
+			glyphcache_wipe(>sc_gc);
+#endif
 		vcons_redraw_screen(ms);
 	} else {
 



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

2016-09-16 Thread Michael Lorenz
Module Name:xsrc
Committed By:   macallan
Date:   Fri Sep 16 22:07:25 UTC 2016

Modified Files:
xsrc/external/mit/xf86-video-suncg14/dist/src: cg14_render.c

Log Message:
do PictOpOver operations 4 pixels at a time - this is a vector processor,
let's do some vector processing
-> about 40% speed increase


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 \
xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_render.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-suncg14/dist/src/cg14_render.c
diff -u xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_render.c:1.8 xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_render.c:1.9
--- xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_render.c:1.8	Fri Sep 16 21:16:37 2016
+++ xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_render.c	Fri Sep 16 22:07:25 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: cg14_render.c,v 1.8 2016/09/16 21:16:37 macallan Exp $ */
+/* $NetBSD: cg14_render.c,v 1.9 2016/09/16 22:07:25 macallan Exp $ */
 /*
  * Copyright (c) 2013 Michael Lorenz
  * All rights reserved.
@@ -43,11 +43,11 @@
 #include "cg14.h"
 #include 
 
-#define SX_SINGLE
+/*#define SX_SINGLE*/
 /*#define SX_RENDER_DEBUG*/
 /*#define SX_ADD_SOFTWARE*/
 
-#ifdef SX__RENDER_DEBUG
+#ifdef SX_RENDER_DEBUG
 #define ENTER xf86Msg(X_ERROR, "%s>\n", __func__);
 #define DPRINTF xf86Msg
 #else
@@ -71,8 +71,47 @@ void CG14Comp_Over32Solid(Cg14Ptr p,
 	for (line = 0; line < height; line++) {
 		mskx = msk;
 		dstx = dst;
-#ifdef SX_SINGLE
-
+#ifndef SX_SINGLE
+		int rest;
+		for (x = 0; x < width; x += 4) {
+			rest = width - x;
+			/* fetch 4 mask values */
+			write_sx_io(p, mskx, SX_LDUQ0(12, 3, mskx & 7));
+			/* fetch destination pixels */
+			write_sx_io(p, dstx, SX_LDUQ0(60, 3, dstx & 7));
+			/* duplicate them for all channels */
+			write_sx_reg(p, SX_INSTRUCTIONS, SX_ORS(0, 12, 13, 2));
+			write_sx_reg(p, SX_INSTRUCTIONS, SX_ORS(0, 16, 17, 2));
+			write_sx_reg(p, SX_INSTRUCTIONS, SX_ORS(0, 20, 21, 2));
+			write_sx_reg(p, SX_INSTRUCTIONS, SX_ORS(0, 24, 25, 2));
+			/* generate inverted alpha */
+			write_sx_reg(p, SX_INSTRUCTIONS,
+			SX_XORS(12, 8, 28, 15));
+			/* multiply source */
+			write_sx_reg(p, SX_INSTRUCTIONS,
+			SX_MUL16X16SR8(8, 12, 44, 3));
+			write_sx_reg(p, SX_INSTRUCTIONS,
+			SX_MUL16X16SR8(8, 16, 48, 3));
+			write_sx_reg(p, SX_INSTRUCTIONS,
+			SX_MUL16X16SR8(8, 20, 52, 3));
+			write_sx_reg(p, SX_INSTRUCTIONS,
+			SX_MUL16X16SR8(8, 24, 56, 3));
+			/* multiply dest */
+			write_sx_reg(p, SX_INSTRUCTIONS,
+			SX_MUL16X16SR8(28, 60, 76, 15));
+			/* add up */
+			write_sx_reg(p, SX_INSTRUCTIONS,
+			SX_ADDV(44, 76, 92, 15));
+			/* write back */
+			if (rest < 4) {
+write_sx_io(p, dstx, SX_STUQ0C(92, rest - 1, dstx & 7));
+			} else {
+write_sx_io(p, dstx, SX_STUQ0C(92, 3, dstx & 7));
+			}
+			dstx += 16;
+			mskx += 16;
+		}
+#else /* SX_SINGLE */
 		for (x = 0; x < width; x++) {
 			m = *(volatile uint32_t *)(p->fb + mskx);
 			m = m >> 24;
@@ -114,17 +153,43 @@ void CG14Comp_Over32Solid(Cg14Ptr p,
 			dstx += 4;
 			mskx += 4;
 		}
-#else
+#endif /* SX_SINGLE */
+		dst += dstpitch;
+		msk += srcpitch;
+	}
+}
+
+void CG14Comp_Over8Solid(Cg14Ptr p,
+   uint32_t src, uint32_t srcpitch,
+   uint32_t dst, uint32_t dstpitch,
+   int width, int height)
+{
+	uint32_t msk = src, mskx, dstx, m;
+	int line, x, i;
+#ifdef SX_DEBUG
+	char buffer[256];
+#endif
+	ENTER;
+
+	DPRINTF(X_ERROR, "src: %d %d %d, %08x\n", read_sx_reg(p, SX_QUEUED(9)),
+	read_sx_reg(p, SX_QUEUED(10)), read_sx_reg(p, SX_QUEUED(11)),
+	*(uint32_t *)(p->fb + p->srcoff));
+	for (line = 0; line < height; line++) {
+		mskx = msk;
+		dstx = dst;
+#ifndef SX_SINGLE
+		int rest;
 		for (x = 0; x < width; x += 4) {
+			rest = width - x;			
 			/* fetch 4 mask values */
-			write_sx_io(p, mskx, SX_LDUQ0(12, 3, mskx & 7));
+			write_sx_io(p, mskx, SX_LDB(12, 3, mskx & 7));
 			/* fetch destination pixels */
 			write_sx_io(p, dstx, SX_LDUQ0(60, 3, dstx & 7));
 			/* duplicate them for all channels */
+			write_sx_reg(p, SX_INSTRUCTIONS, SX_ORS(0, 13, 16, 3));
+			write_sx_reg(p, SX_INSTRUCTIONS, SX_ORS(0, 14, 20, 3));
+			write_sx_reg(p, SX_INSTRUCTIONS, SX_ORS(0, 15, 24, 3));
 			write_sx_reg(p, SX_INSTRUCTIONS, SX_ORS(0, 12, 13, 2));
-			write_sx_reg(p, SX_INSTRUCTIONS, SX_ORS(0, 16, 17, 2));
-			write_sx_reg(p, SX_INSTRUCTIONS, SX_ORS(0, 20, 21, 2));
-			write_sx_reg(p, SX_INSTRUCTIONS, SX_ORS(0, 24, 25, 2));
 			/* generate inverted alpha */
 			write_sx_reg(p, SX_INSTRUCTIONS,
 			SX_XORS(12, 8, 28, 15));
@@ -144,36 +209,15 @@ void CG14Comp_Over32Solid(Cg14Ptr p,
 			write_sx_reg(p, SX_INSTRUCTIONS,
 			SX_ADDV(44, 76, 92, 15));
 			/* write back */
-			write_sx_io(p, dstx, SX_STUQ0C(92, 3, dstx & 7));
+			if (rest < 4) {
+write_sx_io(p, dstx, 

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

2016-09-16 Thread Michael Lorenz
Module Name:xsrc
Committed By:   macallan
Date:   Fri Sep 16 22:05:47 UTC 2016

Modified Files:
xsrc/external/mit/xf86-video-suncg14/dist/src: cg14_accel.c

Log Message:
- DPRINTF() some debug output
- remove unused #defines


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 \
xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_accel.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-suncg14/dist/src/cg14_accel.c
diff -u xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_accel.c:1.8 xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_accel.c:1.9
--- xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_accel.c:1.8	Fri Sep 16 21:16:37 2016
+++ xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_accel.c	Fri Sep 16 22:05:47 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: cg14_accel.c,v 1.8 2016/09/16 21:16:37 macallan Exp $ */
+/* $NetBSD: cg14_accel.c,v 1.9 2016/09/16 22:05:47 macallan Exp $ */
 /*
  * Copyright (c) 2013 Michael Lorenz
  * All rights reserved.
@@ -43,9 +43,7 @@
 #include "cg14.h"
 #include 
 
-#define SX_SINGLE
 /*#define SX_DEBUG*/
-/*#define SX_ADD_SOFTWARE*/
 
 #ifdef SX_DEBUG
 #define ENTER xf86Msg(X_ERROR, "%s>\n", __func__);
@@ -548,7 +546,7 @@ CG14CheckComposite(int op, PicturePtr pS
 	 */
 	
 	if ((op != PictOpOver) && (op != PictOpAdd) && (op != PictOpSrc)) {
-		xf86Msg(X_ERROR, "%s: rejecting %d\n", __func__, op);
+		DPRINTF(X_ERROR, "%s: rejecting %d\n", __func__, op);
 		return FALSE;
 	}
 	i = 0;
@@ -558,7 +556,7 @@ CG14CheckComposite(int op, PicturePtr pS
 	}
 
 	if (!ok) {
-		xf86Msg(X_ERROR, "%s: unsupported src format %x\n",
+		DPRINTF(X_ERROR, "%s: unsupported src format %x\n",
 		__func__, pSrcPicture->format);
 		return FALSE;
 	}
@@ -852,9 +850,9 @@ CG14InitAccel(ScreenPtr pScreen)
 	pExa->pixmapOffsetAlign = 8;
 	pExa->pixmapPitchAlign = 8;
 
-	pExa->flags = EXA_OFFSCREEN_PIXMAPS |
-		  /*EXA_SUPPORTS_OFFSCREEN_OVERLAPS |*/
-		  EXA_MIXED_PIXMAPS;
+	pExa->flags = EXA_OFFSCREEN_PIXMAPS
+		  /* | EXA_SUPPORTS_OFFSCREEN_OVERLAPS |*/
+		  | EXA_MIXED_PIXMAPS;
 
 	/*
 	 * these limits are bogus



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

2016-09-16 Thread Michael Lorenz
Module Name:xsrc
Committed By:   macallan
Date:   Fri Sep 16 21:16:37 UTC 2016

Modified Files:
xsrc/external/mit/xf86-video-suncg14/dist/src: cg14_accel.c
cg14_cursor.c cg14_driver.c cg14_render.c

Log Message:
adapt to xorg 1.18


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 \
xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_accel.c \
xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_render.c
cvs rdiff -u -r1.2 -r1.3 \
xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_cursor.c
cvs rdiff -u -r1.12 -r1.13 \
xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_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-suncg14/dist/src/cg14_accel.c
diff -u xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_accel.c:1.7 xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_accel.c:1.8
--- xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_accel.c:1.7	Tue Jul 30 21:49:38 2013
+++ xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_accel.c	Fri Sep 16 21:16:37 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: cg14_accel.c,v 1.7 2013/07/30 21:49:38 macallan Exp $ */
+/* $NetBSD: cg14_accel.c,v 1.8 2016/09/16 21:16:37 macallan Exp $ */
 /*
  * Copyright (c) 2013 Michael Lorenz
  * All rights reserved.
@@ -28,7 +28,11 @@
  * POSSIBILITY OF SUCH DAMAGE.
  *
  */
- 
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include 
 
 /* all driver need this */
Index: xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_render.c
diff -u xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_render.c:1.7 xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_render.c:1.8
--- xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_render.c:1.7	Tue Jul 30 21:49:38 2013
+++ xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_render.c	Fri Sep 16 21:16:37 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: cg14_render.c,v 1.7 2013/07/30 21:49:38 macallan Exp $ */
+/* $NetBSD: cg14_render.c,v 1.8 2016/09/16 21:16:37 macallan Exp $ */
 /*
  * Copyright (c) 2013 Michael Lorenz
  * All rights reserved.
@@ -29,6 +29,10 @@
  *
  */
  
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include 
 
 /* all driver need this */
@@ -224,10 +228,10 @@ void CG14Comp_Over8Solid(Cg14Ptr p,
 			/* fetch destination pixels */
 			write_sx_io(p, dstx, SX_LDUQ0(60, 3, dstx & 7));
 			/* duplicate them for all channels */
+			write_sx_reg(p, SX_INSTRUCTIONS, SX_ORS(0, 13, 16, 3));
+			write_sx_reg(p, SX_INSTRUCTIONS, SX_ORS(0, 14, 20, 3));
+			write_sx_reg(p, SX_INSTRUCTIONS, SX_ORS(0, 15, 24, 3));
 			write_sx_reg(p, SX_INSTRUCTIONS, SX_ORS(0, 12, 13, 2));
-			write_sx_reg(p, SX_INSTRUCTIONS, SX_ORS(0, 16, 17, 2));
-			write_sx_reg(p, SX_INSTRUCTIONS, SX_ORS(0, 20, 21, 2));
-			write_sx_reg(p, SX_INSTRUCTIONS, SX_ORS(0, 24, 25, 2));
 			/* generate inverted alpha */
 			write_sx_reg(p, SX_INSTRUCTIONS,
 			SX_XORS(12, 8, 28, 15));

Index: xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_cursor.c
diff -u xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_cursor.c:1.2 xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_cursor.c:1.3
--- xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_cursor.c:1.2	Wed Jun 19 13:20:05 2013
+++ xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_cursor.c	Fri Sep 16 21:16:37 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: cg14_cursor.c,v 1.2 2013/06/19 13:20:05 macallan Exp $ */
+/* $NetBSD: cg14_cursor.c,v 1.3 2016/09/16 21:16:37 macallan Exp $ */
 /*
  * Copyright (c) 2005 Michael Lorenz
  * All rights reserved.
@@ -29,6 +29,10 @@
  *
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include 
 
 /* all driver need this */

Index: xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_driver.c
diff -u xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_driver.c:1.12 xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_driver.c:1.13
--- xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_driver.c:1.12	Wed Sep  7 17:10:18 2016
+++ xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_driver.c	Fri Sep 16 21:16:37 2016
@@ -58,6 +58,8 @@ static void	CG14InitCplane24(ScrnInfoPtr
 static void	CG14ExitCplane24(ScrnInfoPtr pScrn);
 static void*CG14WindowLinear(ScreenPtr, CARD32, CARD32, int, CARD32 *,
 			  void *);
+static Bool	CG14DriverFunc(ScrnInfoPtr pScrn, xorgDriverFuncOp op,
+pointer ptr);
 
 /* Required if the driver supports mode switching */
 static Bool	CG14SwitchMode(SWITCH_MODE_ARGS_DECL);
@@ -93,7 +95,8 @@ _X_EXPORT DriverRec SUNCG14 = {
 CG14Probe,
 CG14AvailableOptions,
 NULL,
-0
+0,
+CG14DriverFunc
 };
 
 typedef enum {
@@ -140,7 +143,7 @@ cg14Setup(pointer module, pointer opts, 
 
 if (!setupDone) {
 	setupDone = TRUE;
-	xf86AddDriver(, module, 0);
+	xf86AddDriver(, module, HaveDriverFuncs);
 
 	/*
 	 * Modules that this driver always requires can be loaded here
@@ -299,7 +302,8 @@ CG14PreInit(ScrnInfoPtr pScrn, int flags
 {
 Cg14Ptr pCg14;

CVS commit: src/external/gpl3/gcc/dist/gcc/config/m68k

2016-09-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Sep 16 20:30:14 UTC 2016

Modified Files:
src/external/gpl3/gcc/dist/gcc/config/m68k: m68k.md

Log Message:
put the clobber after the instruction.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/gpl3/gcc/dist/gcc/config/m68k/m68k.md

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/gcc/config/m68k/m68k.md
diff -u src/external/gpl3/gcc/dist/gcc/config/m68k/m68k.md:1.4 src/external/gpl3/gcc/dist/gcc/config/m68k/m68k.md:1.5
--- src/external/gpl3/gcc/dist/gcc/config/m68k/m68k.md:1.4	Sun Jan 24 04:43:33 2016
+++ src/external/gpl3/gcc/dist/gcc/config/m68k/m68k.md	Fri Sep 16 16:30:14 2016
@@ -3154,14 +3154,15 @@
   "TARGET_68020 && !TUNE_68060 && !TARGET_COLDFIRE"
   "#"
   "TARGET_68020 && !TUNE_68060 && !TARGET_COLDFIRE"
-  [(clobber (match_dup 0))
+  [
(parallel
 [(set (subreg:SI (match_dup 0) 4)
 	  (mult:SI (match_dup 1) (match_dup 2)))
  (set (subreg:SI (match_dup 0) 0)
 	  (truncate:SI (lshiftrt:DI (mult:DI (zero_extend:DI (match_dup 1))
 	 (zero_extend:DI (match_dup 2)))
-(const_int 32])]
+(const_int 32])
+   (clobber (match_dup 0))]
   "")
 
 (define_insn ""
@@ -3205,14 +3206,14 @@
   "TARGET_68020 && !TUNE_68060 && !TARGET_COLDFIRE"
   "#"
   "TARGET_68020 && !TUNE_68060 && !TARGET_COLDFIRE"
-  [(clobber (match_dup 0))
-   (parallel
+  [(parallel
 [(set (subreg:SI (match_dup 0) 4)
 	  (mult:SI (match_dup 1) (match_dup 2)))
  (set (subreg:SI (match_dup 0) 0)
 	  (truncate:SI (lshiftrt:DI (mult:DI (sign_extend:DI (match_dup 1))
 	 (sign_extend:DI (match_dup 2)))
-(const_int 32])]
+(const_int 32])
+   (clobber (match_dup 0))]
   "")
 
 (define_insn ""



CVS commit: src/external/gpl3/gcc/dist/gcc/config/m68k

2016-09-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Sep 16 20:31:00 UTC 2016

Modified Files:
src/external/gpl3/gcc/dist/gcc/config/m68k: m68k.c

Log Message:
turn off split wide types to avoid gcc bug. Arguably this should be fixed
in m68k.md, but I will leave this to someone more qualified.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.3 -r1.2 \
src/external/gpl3/gcc/dist/gcc/config/m68k/m68k.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/gpl3/gcc/dist/gcc/config/m68k/m68k.c
diff -u src/external/gpl3/gcc/dist/gcc/config/m68k/m68k.c:1.1.1.3 src/external/gpl3/gcc/dist/gcc/config/m68k/m68k.c:1.2
--- src/external/gpl3/gcc/dist/gcc/config/m68k/m68k.c:1.1.1.3	Sun Jan 24 01:06:28 2016
+++ src/external/gpl3/gcc/dist/gcc/config/m68k/m68k.c	Fri Sep 16 16:31:00 2016
@@ -684,6 +684,8 @@ m68k_option_override (void)
   else
 	m68k_sched_mac = MAC_NO;
 }
+// XXX: Avoid https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71695
+flag_split_wide_types = 0;
 }
 
 /* Implement TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE.  */



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

2016-09-16 Thread Sean Cole
Module Name:src
Committed By:   scole
Date:   Fri Sep 16 17:32:36 UTC 2016

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

Log Message:
Add note about 16 bit console brokenness


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/macppc/dev/platinumfb.c

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

Modified files:

Index: src/sys/arch/macppc/dev/platinumfb.c
diff -u src/sys/arch/macppc/dev/platinumfb.c:1.2 src/sys/arch/macppc/dev/platinumfb.c:1.3
--- src/sys/arch/macppc/dev/platinumfb.c:1.2	Wed Jul  6 13:28:34 2016
+++ src/sys/arch/macppc/dev/platinumfb.c	Fri Sep 16 17:32:36 2016
@@ -47,7 +47,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: platinumfb.c,v 1.2 2016/07/06 13:28:34 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: platinumfb.c,v 1.3 2016/09/16 17:32:36 scole Exp $");
 
 #include 
 #include 
@@ -87,6 +87,13 @@ __KERNEL_RCSID(0, "$NetBSD: platinumfb.c
 #define PLATINUM_FB_DEPTH  16
 
 /*
+ * XXX 16 bit console not working without this patch to rasops15.c,
+ * http://mail-index.netbsd.org/current-users/2016/09/14/msg030132.html
+ * see thread, but rasops may need separate flags for host byte order
+ * and video hw byte order
+ */
+
+/*
  * resolution, from one of platinumfb_setting vmode_name's.
  */
 #define PLATINUM_FB_VMODE "1024x768x60"



CVS commit: src/sys/uvm/pmap

2016-09-16 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Sep 16 17:27:10 UTC 2016

Modified Files:
src/sys/uvm/pmap: pmap.c

Log Message:
When removing a page, make sure to clear its execness regardless of whether
the page is clean or dirty.  This fixes the problem of execpages leaking
into the freepage lists.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/uvm/pmap/pmap.c

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

Modified files:

Index: src/sys/uvm/pmap/pmap.c
diff -u src/sys/uvm/pmap/pmap.c:1.21 src/sys/uvm/pmap/pmap.c:1.22
--- src/sys/uvm/pmap/pmap.c:1.21	Sat Aug 20 20:09:47 2016
+++ src/sys/uvm/pmap/pmap.c	Fri Sep 16 17:27:09 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.21 2016/08/20 20:09:47 mrg Exp $	*/
+/*	$NetBSD: pmap.c,v 1.22 2016/09/16 17:27:09 matt Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2001 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
 
 #include 
 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.21 2016/08/20 20:09:47 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.22 2016/09/16 17:27:09 matt Exp $");
 
 /*
  *	Manages physical address maps.
@@ -713,6 +713,15 @@ pmap_page_remove(struct vm_page *pg)
 
 	UVMHIST_FUNC(__func__); UVMHIST_CALLED(pmaphist);
 
+	UVMHIST_LOG(pmapexechist, "pg %p (pa %#"PRIxPADDR")%s: %s",
+	pg, VM_PAGE_TO_PHYS(pg), " [page removed]", "execpage cleared");
+#ifdef PMAP_VIRTUAL_CACHE_ALIASES
+	pmap_page_clear_attributes(mdpg, VM_PAGEMD_EXECPAGE|VM_PAGEMD_UNCACHED);
+#else
+	pmap_page_clear_attributes(mdpg, VM_PAGEMD_EXECPAGE);
+#endif
+	PMAP_COUNT(exec_uncached_remove);
+
 	pv_entry_t pv = >mdpg_first;
 	if (pv->pv_pmap == NULL) {
 		VM_PAGEMD_PVLIST_UNLOCK(mdpg);
@@ -800,9 +809,6 @@ pmap_page_remove(struct vm_page *pg)
 		}
 	}
 
-#ifdef PMAP_VIRTUAL_CACHE_ALIASES
-	pmap_page_clear_attributes(mdpg, VM_PAGEMD_UNCACHED);
-#endif
 	pmap_pvlist_check(mdpg);
 	VM_PAGEMD_PVLIST_UNLOCK(mdpg);
 	kpreempt_enable();



CVS commit: src/doc

2016-09-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Sep 16 17:13:06 UTC 2016

Modified Files:
src/doc: 3RDPARTY CHANGES

Log Message:
new tzcode


To generate a diff of this commit:
cvs rdiff -u -r1.1360 -r1.1361 src/doc/3RDPARTY
cvs rdiff -u -r1.2184 -r1.2185 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.1360 src/doc/3RDPARTY:1.1361
--- src/doc/3RDPARTY:1.1360	Wed Sep  7 22:34:25 2016
+++ src/doc/3RDPARTY	Fri Sep 16 13:13:06 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1360 2016/09/08 02:34:25 salazar Exp $
+#	$NetBSD: 3RDPARTY,v 1.1361 2016/09/16 17:13:06 christos Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -1398,7 +1398,7 @@ Notes:
 Added changes from a5 -> a12 manually.
 
 Package:	tz
-Version:	tzcode2016b / tzdata2016f
+Version:	tzcode2016f / tzdata2016f
 Current Vers:	tzcode2016f / tzdata2016f
 Maintainer:	Paul Eggert <egg...@cs.ucla.edu>
 Archive Site:	ftp://ftp.iana.org/tz/releases/

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.2184 src/doc/CHANGES:1.2185
--- src/doc/CHANGES:1.2184	Thu Sep  8 17:33:56 2016
+++ src/doc/CHANGES	Fri Sep 16 13:13:06 2016
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2184 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2185 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -352,3 +352,4 @@ Changes from NetBSD 7.0 to NetBSD 8.0:
 	tmux(1): Import of tmux 2.2 [christos 20160831]
 	lua: updated to 5.3.3 and applied all three patches from 
 		http://lua.org/bugs.html [salazar 20160908]
+	libc: Update to tzcode2016f. [christos 20160916]



CVS commit: src/lib/libc/time

2016-09-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Sep 16 17:12:06 UTC 2016

Modified Files:
src/lib/libc/time: Makefile NEWS Theory tz-art.htm tz-link.htm zic.c
Added Files:
src/lib/libc/time: tz-how-to.html

Log Message:
welcome to tzcond-2016f


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/lib/libc/time/Makefile
cvs rdiff -u -r1.15 -r1.16 src/lib/libc/time/NEWS
cvs rdiff -u -r1.19 -r1.20 src/lib/libc/time/Theory
cvs rdiff -u -r1.12 -r1.13 src/lib/libc/time/tz-art.htm
cvs rdiff -u -r0 -r1.1 src/lib/libc/time/tz-how-to.html
cvs rdiff -u -r1.25 -r1.26 src/lib/libc/time/tz-link.htm
cvs rdiff -u -r1.58 -r1.59 src/lib/libc/time/zic.c

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/time/Makefile
diff -u src/lib/libc/time/Makefile:1.32 src/lib/libc/time/Makefile:1.33
--- src/lib/libc/time/Makefile:1.32	Tue Mar 15 11:16:01 2016
+++ src/lib/libc/time/Makefile	Fri Sep 16 13:12:06 2016
@@ -5,7 +5,7 @@
 PACKAGE=	tzcode
 
 # Version numbers of the code and data distributions.
-VERSION=	2016b
+VERSION=	2016f
 
 # Email address for bug reports.
 BUGEMAIL=	t...@iana.org

Index: src/lib/libc/time/NEWS
diff -u src/lib/libc/time/NEWS:1.15 src/lib/libc/time/NEWS:1.16
--- src/lib/libc/time/NEWS:1.15	Tue Mar 15 11:16:01 2016
+++ src/lib/libc/time/NEWS	Fri Sep 16 13:12:06 2016
@@ -1,7 +1,136 @@
 News for the tz database
 
+Release 2016f - 2016-07-05 16:26:51 +0200
+
+  Changes affecting future time stamps
+
+The Egyptian government changed its mind on short notice, and
+Africa/Cairo will not introduce DST starting 2016-07-07 after all.
+(Thanks to Mina Samuel.)
+
+Asia/Novosibirsk switches from +06 to +07 on 2016-07-24 at 02:00.
+(Thanks to Stepan Golosunov.)
+
+  Changes to past and future time stamps
+
+Asia/Novokuznetsk and Asia/Novosibirsk now use numeric time zone
+abbreviations instead of invented ones.
+
+  Changes affecting past time stamps
+
+Europe/Minsk's 1992-03-29 spring-forward transition was at 02:00 not 00:00.
+(Thanks to Stepan Golosunov.)
+
+
+Release 2016e - 2016-06-14 08:46:16 -0700
+
+  Changes affecting future time stamps
+
+Africa/Cairo observes DST in 2016 from July 7 to the end of October.
+Guess October 27 and 24:00 transitions.  (Thanks to Steffen Thorsen.)
+For future years, guess April's last Thursday to October's last
+Thursday except for Ramadan.
+
+  Changes affecting past time stamps
+
+Locations while uninhabited now use '-00', not 'zzz', as a
+placeholder time zone abbreviation.  This is inspired by Internet
+RFC 3339 and is more consistent with numeric time zone
+abbreviations already used elsewhere.  The change affects several
+arctic and antarctic locations, e.g., America/Cambridge_Bay before
+1920 and Antarctica/Troll before 2005.
+
+Asia/Baku's 1992-09-27 transition from +04 (DST) to +04 (non-DST) was
+at 03:00, not 23:00 the previous day.  (Thanks to Michael Deckers.)
+
+  Changes to code
+
+zic now outputs a dummy transition at time 2**31 - 1 in zones
+whose POSIX-style TZ strings contain a '<'.  This mostly works
+around Qt bug 53071 .
+(Thanks to Zhanibek Adilbekov for reporting the Qt bug.)
+
+  Changes affecting documentation and commentary
+
+tz-link.htm says why governments should give plenty of notice for
+time zone or DST changes, and refers to Matt Johnson's blog post.
+
+tz-link.htm mentions Tzdata for Elixir.  (Thanks to Matt Johnson.)
+
+
+Release 2016d - 2016-04-17 22:50:29 -0700
+
+  Changes affecting future time stamps
+
+America/Caracas switches from -0430 to -04 on 2016-05-01 at 02:30.
+(Thanks to Alexander Krivenyshev for the heads-up.)
+
+Asia/Magadan switches from +10 to +11 on 2016-04-24 at 02:00.
+(Thanks to Alexander Krivenyshev and Matt Johnson.)
+
+New zone Asia/Tomsk, split off from Asia/Novosibirsk.  It covers
+Tomsk Oblast, Russia, which switches from +06 to +07 on 2016-05-29
+at 02:00.  (Thanks to Stepan Golosunov.)
+
+  Changes affecting past time stamps
+
+New zone Europe/Kirov, split off from Europe/Volgograd.  It covers
+Kirov Oblast, Russia, which switched from +04/+05 to +03/+04 on
+1989-03-26 at 02:00, roughly a year after Europe/Volgograd made
+the same change.  (Thanks to Stepan Golosunov.)
+
+Russia and nearby locations had daylight-saving transitions on
+1992-03-29 at 02:00 and 1992-09-27 at 03:00, instead of on
+1992-03-28 at 23:00 and 1992-09-26 at 23:00.  (Thanks to Stepan
+Golosunov.)
+
+Many corrections to historical time in Kazakhstan from 1991
+through 2005.  (Thanks to Stepan Golosunov.)  Replace Kazakhstan's
+invented time zone abbreviations with numeric abbreviations.
+
+  Changes to commentary
+
+Mention Internet RFCs 7808 (TZDIST) and 7809 (CalDAV time 

CVS commit: src/sys/dev

2016-09-16 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Fri Sep 16 15:20:50 UTC 2016

Modified Files:
src/sys/dev: ld.c ldvar.h
src/sys/dev/ata: ld_ataraid.c
src/sys/dev/i2o: ld_iop.c
src/sys/dev/ic: ld_aac.c ld_cac.c ld_icp.c ld_mlx.c ld_nvme.c
src/sys/dev/pci: ld_amr.c ld_twa.c ld_twe.c ld_virtio.c
src/sys/dev/sdmmc: ld_sdmmc.c

Log Message:
modify ldattach() to have default strategy as a parameter


To generate a diff of this commit:
cvs rdiff -u -r1.94 -r1.95 src/sys/dev/ld.c
cvs rdiff -u -r1.27 -r1.28 src/sys/dev/ldvar.h
cvs rdiff -u -r1.41 -r1.42 src/sys/dev/ata/ld_ataraid.c
cvs rdiff -u -r1.35 -r1.36 src/sys/dev/i2o/ld_iop.c
cvs rdiff -u -r1.28 -r1.29 src/sys/dev/ic/ld_aac.c src/sys/dev/ic/ld_cac.c
cvs rdiff -u -r1.27 -r1.28 src/sys/dev/ic/ld_icp.c
cvs rdiff -u -r1.21 -r1.22 src/sys/dev/ic/ld_mlx.c
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/ic/ld_nvme.c
cvs rdiff -u -r1.23 -r1.24 src/sys/dev/pci/ld_amr.c
cvs rdiff -u -r1.17 -r1.18 src/sys/dev/pci/ld_twa.c
cvs rdiff -u -r1.37 -r1.38 src/sys/dev/pci/ld_twe.c
cvs rdiff -u -r1.10 -r1.11 src/sys/dev/pci/ld_virtio.c
cvs rdiff -u -r1.21 -r1.22 src/sys/dev/sdmmc/ld_sdmmc.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/ld.c
diff -u src/sys/dev/ld.c:1.94 src/sys/dev/ld.c:1.95
--- src/sys/dev/ld.c:1.94	Sat Feb 27 08:54:49 2016
+++ src/sys/dev/ld.c	Fri Sep 16 15:20:50 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: ld.c,v 1.94 2016/02/27 08:54:49 mlelstv Exp $	*/
+/*	$NetBSD: ld.c,v 1.95 2016/09/16 15:20:50 jdolecek Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ld.c,v 1.94 2016/02/27 08:54:49 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ld.c,v 1.95 2016/09/16 15:20:50 jdolecek Exp $");
 
 #include 
 #include 
@@ -122,7 +122,7 @@ static struct	dkdriver lddkdriver = {
 };
 
 void
-ldattach(struct ld_softc *sc)
+ldattach(struct ld_softc *sc, const char *default_strategy)
 {
 	device_t self = sc->sc_dv;
 	struct dk_softc *dksc = >sc_dksc;
@@ -153,7 +153,7 @@ ldattach(struct ld_softc *sc)
 	disk_attach(>sc_dkdev);
 	ld_set_geometry(sc);
 
-	bufq_alloc(>sc_bufq, BUFQ_DISK_DEFAULT_STRAT, BUFQ_SORT_RAWBLOCK);
+	bufq_alloc(>sc_bufq, default_strategy, BUFQ_SORT_RAWBLOCK);
 
 	/* Register with PMF */
 	if (!pmf_device_register1(dksc->sc_dev, ld_suspend, NULL, ld_shutdown))

Index: src/sys/dev/ldvar.h
diff -u src/sys/dev/ldvar.h:1.27 src/sys/dev/ldvar.h:1.28
--- src/sys/dev/ldvar.h:1.27	Fri Aug 28 17:41:49 2015
+++ src/sys/dev/ldvar.h	Fri Sep 16 15:20:50 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: ldvar.h,v 1.27 2015/08/28 17:41:49 mlelstv Exp $	*/
+/*	$NetBSD: ldvar.h,v 1.28 2016/09/16 15:20:50 jdolecek Exp $	*/
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -72,7 +72,7 @@ struct ld_softc {
 #define	LDFL_POLL	0x001		/* poll for completion */
 
 int	ldadjqparam(struct ld_softc *, int);
-void	ldattach(struct ld_softc *);
+void	ldattach(struct ld_softc *, const char *);
 int	ldbegindetach(struct ld_softc *, int);
 void	ldenddetach(struct ld_softc *);
 void	lddone(struct ld_softc *, struct buf *);

Index: src/sys/dev/ata/ld_ataraid.c
diff -u src/sys/dev/ata/ld_ataraid.c:1.41 src/sys/dev/ata/ld_ataraid.c:1.42
--- src/sys/dev/ata/ld_ataraid.c:1.41	Mon May  2 19:18:29 2016
+++ src/sys/dev/ata/ld_ataraid.c	Fri Sep 16 15:20:50 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: ld_ataraid.c,v 1.41 2016/05/02 19:18:29 christos Exp $	*/
+/*	$NetBSD: ld_ataraid.c,v 1.42 2016/09/16 15:20:50 jdolecek Exp $	*/
 
 /*
  * Copyright (c) 2003 Wasabi Systems, Inc.
@@ -47,7 +47,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ld_ataraid.c,v 1.41 2016/05/02 19:18:29 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ld_ataraid.c,v 1.42 2016/09/16 15:20:50 jdolecek Exp $");
 
 #include "bio.h"
 
@@ -249,8 +249,8 @@ ld_ataraid_attach(device_t parent, devic
 		panic("%s: bioctl registration failed\n",
 		device_xname(ld->sc_dv));
 #endif
-   SIMPLEQ_INIT(>sc_cbufq);
-	ldattach(ld);
+	SIMPLEQ_INIT(>sc_cbufq);
+	ldattach(ld, BUFQ_DISK_DEFAULT_STRAT);
 }
 
 static int

Index: src/sys/dev/i2o/ld_iop.c
diff -u src/sys/dev/i2o/ld_iop.c:1.35 src/sys/dev/i2o/ld_iop.c:1.36
--- src/sys/dev/i2o/ld_iop.c:1.35	Mon Apr 13 16:33:24 2015
+++ src/sys/dev/i2o/ld_iop.c	Fri Sep 16 15:20:50 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: ld_iop.c,v 1.35 2015/04/13 16:33:24 riastradh Exp $	*/
+/*	$NetBSD: ld_iop.c,v 1.36 2016/09/16 15:20:50 jdolecek Exp $	*/
 
 /*-
  * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ld_iop.c,v 1.35 2015/04/13 16:33:24 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ld_iop.c,v 1.36 2016/09/16 15:20:50 jdolecek Exp $");
 
 #include 
 #include 
@@ -266,7 +266,7 @@ ld_iop_attach(device_t parent, device_t 
 	else
 		aprint_error_dev(self, "device not yet supported\n");
 
-	ldattach(ld);
+	ldattach(ld, 

CVS commit: src/sys/dev/ic

2016-09-16 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Fri Sep 16 15:24:47 UTC 2016

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

Log Message:
change nvme(4) ld to use fcfs as default strategy to lower i/o processing
overhead and hence lower latency; the sorting doesn't provide any benefit
for SSDs


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/ic/ld_nvme.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/ld_nvme.c
diff -u src/sys/dev/ic/ld_nvme.c:1.2 src/sys/dev/ic/ld_nvme.c:1.3
--- src/sys/dev/ic/ld_nvme.c:1.2	Fri Sep 16 15:20:50 2016
+++ src/sys/dev/ic/ld_nvme.c	Fri Sep 16 15:24:47 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: ld_nvme.c,v 1.2 2016/09/16 15:20:50 jdolecek Exp $	*/
+/*	$NetBSD: ld_nvme.c,v 1.3 2016/09/16 15:24:47 jdolecek Exp $	*/
 
 /*-
  * Copyright (C) 2016 NONAKA Kimihiro 
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ld_nvme.c,v 1.2 2016/09/16 15:20:50 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ld_nvme.c,v 1.3 2016/09/16 15:24:47 jdolecek Exp $");
 
 #include 
 #include 
@@ -114,7 +114,7 @@ ld_nvme_attach(device_t parent, device_t
 	ld->sc_dump = ld_nvme_dump;
 	ld->sc_flush = ld_nvme_flush;
 	ld->sc_flags = LDF_ENABLED;
-	ldattach(ld, BUFQ_DISK_DEFAULT_STRAT);
+	ldattach(ld, "fcfs");
 }
 
 static int



CVS commit: src/doc/roadmaps

2016-09-16 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Fri Sep 16 15:02:23 UTC 2016

Modified Files:
src/doc/roadmaps: storage

Log Message:
volunteer for the ext3/ext4 also


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/doc/roadmaps/storage

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

Modified files:

Index: src/doc/roadmaps/storage
diff -u src/doc/roadmaps/storage:1.16 src/doc/roadmaps/storage:1.17
--- src/doc/roadmaps/storage:1.16	Fri Sep 16 14:55:28 2016
+++ src/doc/roadmaps/storage	Fri Sep 16 15:02:23 2016
@@ -1,4 +1,4 @@
-$NetBSD: storage,v 1.16 2016/09/16 14:55:28 jdolecek Exp $
+$NetBSD: storage,v 1.17 2016/09/16 15:02:23 jdolecek Exp $
 
 NetBSD Storage Roadmap
 ==
@@ -320,10 +320,15 @@ or less work than doing an implementatio
 Note however that implementing ext3 has already defeated several
 people; this is a harder project than it looks.
 
- - As of May 2016 there is a GSoC project to implement read-only ext4
-   support, but (it not being summer yet) no particular progress.
+ - GSoc 2016 brought support for extents, and also ro support for dir
+   hashes; jdolecek also implemented several frequently used ext4 features
+   so most contemporary ext filesystems should be possible to mount
+   read-write
+ - still need rw dir_nhash and xattr (semi-easy), and eventually journalling
+   (hard)
  - There is no clear timeframe or release target.
- - Contact ?? for further information.
+ - jdolecek is working on improving ext3/ext4 support (particularily
+   journalling) 
 
 
 14. Port hammer from Dragonfly



CVS commit: src/doc/roadmaps

2016-09-16 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Fri Sep 16 14:55:29 UTC 2016

Modified Files:
src/doc/roadmaps: storage

Log Message:
I'm working on WAPBL fixes, adjust the entry


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/doc/roadmaps/storage

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

Modified files:

Index: src/doc/roadmaps/storage
diff -u src/doc/roadmaps/storage:1.15 src/doc/roadmaps/storage:1.16
--- src/doc/roadmaps/storage:1.15	Tue May 17 21:03:36 2016
+++ src/doc/roadmaps/storage	Fri Sep 16 14:55:28 2016
@@ -1,4 +1,4 @@
-$NetBSD: storage,v 1.15 2016/05/17 21:03:36 christos Exp $
+$NetBSD: storage,v 1.16 2016/09/16 14:55:28 jdolecek Exp $
 
 NetBSD Storage Roadmap
 ==
@@ -93,8 +93,8 @@ best option at this point is:
 disk early) has been examined by several people who know the code base
 and judged difficult. Also, some other problems have come to light
 more recently; e.g. PR 50725, PR 47146, and a problem where truncating
-large sparse files takes ~forever. Also see PR 45676. Still, it might
-be the best way forward.
+large sparse files takes ~forever in PR 49175. Also see PR 45676. Still,
+it might be the best way forward.
 
 + There is another journaling FFS; the Harvard one done by Margo
 Seltzer's group some years back. We have a copy of this, but as it was
@@ -121,9 +121,8 @@ forward. Given the general manpower shor
 way is whatever looks best to someone who wants to work on the
 problem.
 
- - As of November 2015 nobody is working on fixing WAPBL. There has
-   been some interest in the Harvard journaling FFS but no significant
-   progress. Nobody is known to be working on or particularly
+ - There has been some interest in the Harvard journaling FFS but no
+   significant progress. Nobody is known to be working on or particularly
interested in porting softupdates-with-journaling. And, while
dholland has been mumbling for some time about a plan for a
specific new file system to solve this problem, there isn't any
@@ -133,6 +132,8 @@ problem.
  - There is no clear timeframe or release target; but given that WAPBL
has been disabled by default for new installs in -7 this problem
can reasonably be said to have become critical.
+ - jdolecek is working on fixing WAPBL, goal is to get WAPBL fixed
+   enough to be safe to re-enable as default for -8
  - Contact joerg or martin regarding WAPBL; contact dholland regarding
the Harvard journaling FFS.
 



CVS commit: src/sys

2016-09-16 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Fri Sep 16 14:17:23 UTC 2016

Modified Files:
src/sys/net: if_spppsubr.c
src/sys/netinet: in.c in_var.h

Log Message:
Drop hostIsNew from in_ifinit, let the function work out if the address
has changed.
Sync address flag setup with the IPv6 counterpart.
When scrubbing the address, or setting up the address fails, restore the
old address flags as well as the old address.


To generate a diff of this commit:
cvs rdiff -u -r1.151 -r1.152 src/sys/net/if_spppsubr.c
cvs rdiff -u -r1.181 -r1.182 src/sys/netinet/in.c
cvs rdiff -u -r1.82 -r1.83 src/sys/netinet/in_var.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/net/if_spppsubr.c
diff -u src/sys/net/if_spppsubr.c:1.151 src/sys/net/if_spppsubr.c:1.152
--- src/sys/net/if_spppsubr.c:1.151	Wed Sep 14 11:54:42 2016
+++ src/sys/net/if_spppsubr.c	Fri Sep 16 14:17:23 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_spppsubr.c,v 1.151 2016/09/14 11:54:42 roy Exp $	 */
+/*	$NetBSD: if_spppsubr.c,v 1.152 2016/09/16 14:17:23 roy Exp $	 */
 
 /*
  * Synchronous PPP/Cisco link level subroutines.
@@ -41,7 +41,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_spppsubr.c,v 1.151 2016/09/14 11:54:42 roy Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_spppsubr.c,v 1.152 2016/09/16 14:17:23 roy Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_inet.h"
@@ -4902,7 +4902,7 @@ sppp_set_ip_addrs(struct sppp *sp, uint3
 
 found:
 	{
-		int error, hostIsNew;
+		int error;
 		struct sockaddr_in new_sin = *si;
 		struct sockaddr_in new_dst = *dest;
 
@@ -4913,13 +4913,8 @@ found:
 		 */
 		in_ifscrub(ifp, ifatoia(ifa));
 
-		hostIsNew = 0;
-		if (myaddr != 0) {
-			if (new_sin.sin_addr.s_addr != htonl(myaddr)) {
-new_sin.sin_addr.s_addr = htonl(myaddr);
-hostIsNew = 1;
-			}
-		}
+		if (myaddr != 0)
+			new_sin.sin_addr.s_addr = htonl(myaddr);
 		if (hisaddr != 0) {
 			new_dst.sin_addr.s_addr = htonl(hisaddr);
 			if (new_dst.sin_addr.s_addr != dest->sin_addr.s_addr) {
@@ -4931,7 +4926,7 @@ found:
 		LIST_REMOVE(ifatoia(ifa), ia_hash);
 		IN_ADDRHASH_WRITER_REMOVE(ifatoia(ifa));
 
-		error = in_ifinit(ifp, ifatoia(ifa), _sin, 0, hostIsNew);
+		error = in_ifinit(ifp, ifatoia(ifa), _sin, 0);
 
 		LIST_INSERT_HEAD(_IFADDR_HASH(ifatoia(ifa)->ia_addr.sin_addr.s_addr),
 		ifatoia(ifa), ia_hash);
@@ -4993,7 +4988,7 @@ found:
 		LIST_REMOVE(ifatoia(ifa), ia_hash);
 		IN_ADDRHASH_WRITER_REMOVE(ifatoia(ifa));
 
-		in_ifinit(ifp, ifatoia(ifa), _sin, 0, 0);
+		in_ifinit(ifp, ifatoia(ifa), _sin, 0);
 
 		LIST_INSERT_HEAD(_IFADDR_HASH(ifatoia(ifa)->ia_addr.sin_addr.s_addr),
 		ifatoia(ifa), ia_hash);

Index: src/sys/netinet/in.c
diff -u src/sys/netinet/in.c:1.181 src/sys/netinet/in.c:1.182
--- src/sys/netinet/in.c:1.181	Tue Sep 13 15:57:50 2016
+++ src/sys/netinet/in.c	Fri Sep 16 14:17:23 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: in.c,v 1.181 2016/09/13 15:57:50 christos Exp $	*/
+/*	$NetBSD: in.c,v 1.182 2016/09/16 14:17:23 roy Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -91,7 +91,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: in.c,v 1.181 2016/09/13 15:57:50 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: in.c,v 1.182 2016/09/16 14:17:23 roy Exp $");
 
 #include "arp.h"
 
@@ -600,8 +600,7 @@ in_control0(struct socket *so, u_long cm
 			mutex_exit(_ifaddr_lock);
 			need_reinsert = true;
 		}
-		error = in_ifinit(ifp, ia, satocsin(ifreq_getaddr(cmd, ifr)),
-		1, hostIsNew);
+		error = in_ifinit(ifp, ia, satocsin(ifreq_getaddr(cmd, ifr)),1);
 
 		run_hook = true;
 		break;
@@ -617,7 +616,7 @@ in_control0(struct socket *so, u_long cm
 			mutex_exit(_ifaddr_lock);
 			need_reinsert = true;
 		}
-		error = in_ifinit(ifp, ia, NULL, 0, 0);
+		error = in_ifinit(ifp, ia, NULL, 0);
 		break;
 
 	case SIOCAIFADDR:
@@ -649,8 +648,7 @@ in_control0(struct socket *so, u_long cm
 mutex_exit(_ifaddr_lock);
 need_reinsert = true;
 			}
-			error = in_ifinit(ifp, ia, >ifra_addr, 0,
-			hostIsNew);
+			error = in_ifinit(ifp, ia, >ifra_addr, 0);
 		}
 		if ((ifp->if_flags & IFF_BROADCAST) &&
 		(ifra->ifra_broadaddr.sin_family == AF_INET))
@@ -1051,11 +1049,11 @@ in_ifscrub(struct ifnet *ifp, struct in_
  */
 int
 in_ifinit(struct ifnet *ifp, struct in_ifaddr *ia,
-const struct sockaddr_in *sin, int scrub, int hostIsNew)
+const struct sockaddr_in *sin, int scrub)
 {
 	u_int32_t i;
 	struct sockaddr_in oldaddr;
-	int s = splnet(), flags = RTF_UP, error;
+	int s, oldflags, flags = RTF_UP, error, hostIsNew;
 
 	if (sin == NULL)
 		sin = >ia_addr;
@@ -1064,32 +1062,50 @@ in_ifinit(struct ifnet *ifp, struct in_i
 	 * Set up new addresses.
 	 */
 	oldaddr = ia->ia_addr;
+	oldflags = ia->ia4_flags;
 	ia->ia_addr = *sin;
+	hostIsNew = oldaddr.sin_family != AF_INET ||
+	!in_hosteq(ia->ia_addr.sin_addr, oldaddr.sin_addr);
 
-	/* Set IN_IFF flags early for if_addr_init() */
-	if (hostIsNew && 

CVS commit: src/share/man/man9

2016-09-16 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Fri Sep 16 13:56:36 UTC 2016

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

Log Message:
bump date for the typo fix


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/share/man/man9/pci_msi.9

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

Modified files:

Index: src/share/man/man9/pci_msi.9
diff -u src/share/man/man9/pci_msi.9:1.12 src/share/man/man9/pci_msi.9:1.13
--- src/share/man/man9/pci_msi.9:1.12	Thu Sep 15 09:41:33 2016
+++ src/share/man/man9/pci_msi.9	Fri Sep 16 13:56:36 2016
@@ -1,4 +1,4 @@
-.\" $NetBSD: pci_msi.9,v 1.12 2016/09/15 09:41:33 jdolecek Exp $
+.\" $NetBSD: pci_msi.9,v 1.13 2016/09/16 13:56:36 jdolecek Exp $
 .\"
 .\" Copyright (c) 2015 Internet Initiative Japan Inc.
 .\" All rights reserved.
@@ -24,7 +24,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd July 12, 2016
+.Dd September 15, 2016
 .Dt PCI_MSI 9
 .Os
 .Sh NAME



CVS commit: src/sys/netinet

2016-09-16 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Fri Sep 16 13:47:47 UTC 2016

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

Log Message:
Clear IN_IFF_TENTATIVE when stopping DaD here.


To generate a diff of this commit:
cvs rdiff -u -r1.225 -r1.226 src/sys/netinet/if_arp.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/if_arp.c
diff -u src/sys/netinet/if_arp.c:1.225 src/sys/netinet/if_arp.c:1.226
--- src/sys/netinet/if_arp.c:1.225	Fri Sep 16 09:59:45 2016
+++ src/sys/netinet/if_arp.c	Fri Sep 16 13:47:47 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_arp.c,v 1.225 2016/09/16 09:59:45 roy Exp $	*/
+/*	$NetBSD: if_arp.c,v 1.226 2016/09/16 13:47:47 roy Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2000, 2008 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_arp.c,v 1.225 2016/09/16 09:59:45 roy Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_arp.c,v 1.226 2016/09/16 13:47:47 roy Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ddb.h"
@@ -1481,6 +1481,7 @@ arp_ifinit(struct ifnet *ifp, struct ifa
 			ia->ia_dad_stop(ifa);
 		ia->ia_dad_start = NULL;
 		ia->ia_dad_stop = NULL;
+		ia->ia4_flags &= ~IN_IFF_TENTATIVE;
 	} else {
 		ia->ia_dad_start = arp_dad_start;
 		ia->ia_dad_stop = arp_dad_stop;



CVS commit: src/sys/dev/ic

2016-09-16 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Fri Sep 16 12:57:26 UTC 2016

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

Log Message:
introduce optional timeout for the polled commands; currently 5 seconds for
queue creation/deletion, 10 seconds for controller/namespace identify,
and unlimited for cache sync and passthrough commands

this makes device attach error out instead of hanging the kernel when
the device fails to respond properly, such as under QEMU currently


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/ic/nvme.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/nvme.c
diff -u src/sys/dev/ic/nvme.c:1.6 src/sys/dev/ic/nvme.c:1.7
--- src/sys/dev/ic/nvme.c:1.6	Fri Sep 16 11:41:40 2016
+++ src/sys/dev/ic/nvme.c	Fri Sep 16 12:57:26 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: nvme.c,v 1.6 2016/09/16 11:41:40 jdolecek Exp $	*/
+/*	$NetBSD: nvme.c,v 1.7 2016/09/16 12:57:26 jdolecek Exp $	*/
 /*	$OpenBSD: nvme.c,v 1.49 2016/04/18 05:59:50 dlg Exp $ */
 
 /*
@@ -18,7 +18,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: nvme.c,v 1.6 2016/09/16 11:41:40 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nvme.c,v 1.7 2016/09/16 12:57:26 jdolecek Exp $");
 
 #include 
 #include 
@@ -67,7 +67,7 @@ static void	nvme_ccb_put(struct nvme_que
 
 static int	nvme_poll(struct nvme_softc *, struct nvme_queue *,
 		struct nvme_ccb *, void (*)(struct nvme_queue *,
-		struct nvme_ccb *, void *));
+		struct nvme_ccb *, void *), int);
 static void	nvme_poll_fill(struct nvme_queue *, struct nvme_ccb *, void *);
 static void	nvme_poll_done(struct nvme_queue *, struct nvme_ccb *,
 		struct nvme_cqe *);
@@ -107,6 +107,11 @@ static void	nvme_pt_done(struct nvme_que
 static int	nvme_command_passthrough(struct nvme_softc *,
 		struct nvme_pt_command *, uint16_t, struct lwp *, bool);
 
+#define NVME_TIMO_QOP		5	/* queue create and delete timeout */
+#define NVME_TIMO_IDENT		10	/* probe identify timeout */
+#define NVME_TIMO_PT		-1	/* passthrough cmd timeout */
+#define NVME_TIMO_SY		-1	/* sync cache timeout */
+
 #define nvme_read4(_s, _r) \
 	bus_space_read_4((_s)->sc_iot, (_s)->sc_ioh, (_r))
 #define nvme_write4(_s, _r, _v) \
@@ -250,8 +255,10 @@ nvme_enable(struct nvme_softc *sc, u_int
 	uint32_t cc;
 
 	cc = nvme_read4(sc, NVME_CC);
-	if (ISSET(cc, NVME_CC_EN))
-		return nvme_ready(sc, NVME_CSTS_RDY);
+	if (ISSET(cc, NVME_CC_EN)) {
+		aprint_error_dev(sc->sc_dev, "controller unexpectedly enabled, failed to stay disabled\n");
+		return 0;
+	}
 
 	nvme_write4(sc, NVME_AQA, NVME_AQA_ACQS(sc->sc_admin_q->q_entries) |
 	NVME_AQA_ASQS(sc->sc_admin_q->q_entries));
@@ -541,7 +548,7 @@ nvme_ns_identify(struct nvme_softc *sc, 
 	ccb->ccb_cookie = 
 
 	nvme_dmamem_sync(sc, mem, BUS_DMASYNC_PREREAD);
-	rv = nvme_poll(sc, sc->sc_admin_q, ccb, nvme_sqe_fill);
+	rv = nvme_poll(sc, sc->sc_admin_q, ccb, nvme_sqe_fill, NVME_TIMO_IDENT);
 	nvme_dmamem_sync(sc, mem, BUS_DMASYNC_POSTREAD);
 
 	nvme_ccb_put(sc->sc_admin_q, ccb);
@@ -610,7 +617,7 @@ nvme_ns_dobio(struct nvme_softc *sc, str
 	}
 
 	if (ISSET(ctx->nnc_flags, NVME_NS_CTX_F_POLL)) {
-		if (nvme_poll(sc, q, ccb, nvme_ns_io_fill) != 0)
+		if (nvme_poll(sc, q, ccb, nvme_ns_io_fill, NVME_TIMO_PT) != 0)
 			return EIO;
 		return 0;
 	}
@@ -691,7 +698,7 @@ nvme_ns_sync(struct nvme_softc *sc, stru
 	ccb->ccb_cookie = ctx;
 
 	if (ISSET(ctx->nnc_flags, NVME_NS_CTX_F_POLL)) {
-		if (nvme_poll(sc, q, ccb, nvme_ns_sync_fill) != 0)
+		if (nvme_poll(sc, q, ccb, nvme_ns_sync_fill, NVME_TIMO_SY) != 0)
 			return EIO;
 		return 0;
 	}
@@ -852,7 +859,7 @@ nvme_command_passthrough(struct nvme_sof
 	ccb->ccb_cookie = pt;
 
 	pt->cmd.nsid = nsid;
-	if (nvme_poll(sc, q, ccb, nvme_pt_fill)) {
+	if (nvme_poll(sc, q, ccb, nvme_pt_fill, NVME_TIMO_PT)) {
 		error = EIO;
 		goto out;
 	}
@@ -903,12 +910,15 @@ struct nvme_poll_state {
 
 static int
 nvme_poll(struct nvme_softc *sc, struct nvme_queue *q, struct nvme_ccb *ccb,
-void (*fill)(struct nvme_queue *, struct nvme_ccb *, void *))
+void (*fill)(struct nvme_queue *, struct nvme_ccb *, void *), int timo_sec)
 {
 	struct nvme_poll_state state;
 	void (*done)(struct nvme_queue *, struct nvme_ccb *, struct nvme_cqe *);
 	void *cookie;
 	uint16_t flags;
+	int step = 10;
+	int maxloop = timo_sec * 100 / step;
+	int error = 0;
 
 	memset(, 0, sizeof(state));
 	(*fill)(q, ccb, );
@@ -922,17 +932,23 @@ nvme_poll(struct nvme_softc *sc, struct 
 	nvme_q_submit(sc, q, ccb, nvme_poll_fill);
 	while (!ISSET(state.c.flags, htole16(NVME_CQE_PHASE))) {
 		if (nvme_q_complete(sc, q) == 0)
-			delay(10);
+			delay(step);
 
-		/* XXX no timeout? */
+		if (timo_sec >= 0 && --maxloop <= 0) {
+			error = ETIMEDOUT;
+			break;
+		}
 	}
 
 	ccb->ccb_cookie = cookie;
 	done(q, ccb, );
 
-	flags = lemtoh16();
-
-	return flags & ~NVME_CQE_PHASE;
+	if (error == 0) {
+		flags = lemtoh16();
+		return flags & 

CVS commit: src/share/man/man4

2016-09-16 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Fri Sep 16 12:43:37 UTC 2016

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

Log Message:
New sentence, new line. Use Dq.


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

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

Modified files:

Index: src/share/man/man4/nvme.4
diff -u src/share/man/man4/nvme.4:1.3 src/share/man/man4/nvme.4:1.4
--- src/share/man/man4/nvme.4:1.3	Fri Sep 16 12:31:27 2016
+++ src/share/man/man4/nvme.4	Fri Sep 16 12:43:37 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: nvme.4,v 1.3 2016/09/16 12:31:27 jdolecek Exp $
+.\"	$NetBSD: nvme.4,v 1.4 2016/09/16 12:43:37 wiz Exp $
 .\"	$OpenBSD: nvme.4,v 1.2 2016/04/14 11:53:37 jmc Exp $
 .\"
 .\" Copyright (c) 2016 David Gwynne 
@@ -69,8 +69,10 @@ attaches and works fine, but sometimes a
 When this happens, controller fails to properly disable/enable during probe,
 so the
 .Xr ld 4
-is not attached. Virtual machine must be completely powered off and started
+is not attached.
+Virtual machine must be completely powered off and started
 again to get the device working again.
 .Pp
 .Nm
-kernel module is currently only loadable for kernels configured with 'no ld'.
+kernel module is currently only loadable for kernels configured with
+.Dq no ld .



CVS commit: src/share/man/man4

2016-09-16 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Fri Sep 16 12:31:27 UTC 2016

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

Log Message:
document some bugs


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

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

Modified files:

Index: src/share/man/man4/nvme.4
diff -u src/share/man/man4/nvme.4:1.2 src/share/man/man4/nvme.4:1.3
--- src/share/man/man4/nvme.4:1.2	Mon May  2 09:43:33 2016
+++ src/share/man/man4/nvme.4	Fri Sep 16 12:31:27 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: nvme.4,v 1.2 2016/05/02 09:43:33 wiz Exp $
+.\"	$NetBSD: nvme.4,v 1.3 2016/09/16 12:31:27 jdolecek Exp $
 .\"	$OpenBSD: nvme.4,v 1.2 2016/04/14 11:53:37 jmc Exp $
 .\"
 .\" Copyright (c) 2016 David Gwynne 
@@ -15,7 +15,7 @@
 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 .\"
-.Dd May 1, 2016
+.Dd September 16, 2016
 .Dt NVME 4
 .Os
 .Sh NAME
@@ -54,3 +54,23 @@ and ported to
 by
 .An NONAKA Kimihiro
 .Aq Mt non...@netbsd.org .
+.Sh BUGS
+Emulated
+.Nm
+device under QEMU doesn't currently work - controller identify command times
+out.
+.Pp
+Emulated
+.Nm
+device under
+.Tn Oracle
+.Tn VirtualBox
+attaches and works fine, but sometimes after reboot device no longer works.
+When this happens, controller fails to properly disable/enable during probe,
+so the
+.Xr ld 4
+is not attached. Virtual machine must be completely powered off and started
+again to get the device working again.
+.Pp
+.Nm
+kernel module is currently only loadable for kernels configured with 'no ld'.



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

2016-09-16 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Fri Sep 16 12:28:41 UTC 2016

Modified Files:
src/sys/arch/i386/i386: copy.S

Log Message:
x86_copyargs takes as third argument a size, but still copies two chunks of
16 and 24 bytes, without checking the userland<->kernel limit accordingly.
Fix it by just checking the maximum size direcly.

It means that even if 16 bytes are copied, the kernel now makes sure 40
bytes are in userland. We could make it more fine-grained, but it would
probably unoptimize the function, and we don't care enough.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/i386/i386/copy.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/i386/i386/copy.S
diff -u src/sys/arch/i386/i386/copy.S:1.24 src/sys/arch/i386/i386/copy.S:1.25
--- src/sys/arch/i386/i386/copy.S:1.24	Fri May 13 13:24:01 2016
+++ src/sys/arch/i386/i386/copy.S	Fri Sep 16 12:28:41 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: copy.S,v 1.24 2016/05/13 13:24:01 maxv Exp $	*/
+/*	$NetBSD: copy.S,v 1.25 2016/09/16 12:28:41 maxv Exp $	*/
 /*	NetBSD: locore.S,v 1.34 2005/04/01 11:59:31 yamt Exp $	*/
 
 /*-
@@ -65,7 +65,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: copy.S,v 1.24 2016/05/13 13:24:01 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: copy.S,v 1.25 2016/09/16 12:28:41 maxv Exp $");
 
 #include "assym.h"
 
@@ -687,13 +687,16 @@ ENTRY(x86_copyargs)
 	movl	16(%esp),%ecx
 
 	/*
-	 * We check that the end of the destination buffer is not past the end
-	 * of the user's address space.  If it's not, then we only need to
-	 * check that each page is readable, and the CPU will do that for us.
+	 * In this function, we may copy more than the size given in the third
+	 * argument. In order to make sure the real end of the destination
+	 * buffer is not past the end of the user's address space, we don't
+	 * check the third argument but rather the largest possible size, which
+	 * is:
+	 * 	(2 + SYS_MAXSYSARGS) * 4 = 10 * 4
 	 */
 .Lx86_copyargs_start:
 	movl	%esi,%eax
-	addl	%ecx,%eax
+	addl	$(10 * 4),%eax
 	jc	_C_LABEL(x86_copyargs_efault)
 	cmpl	$VM_MAXUSER_ADDRESS,%eax
 	ja	_C_LABEL(x86_copyargs_efault)



CVS commit: src/sys/arch

2016-09-16 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Fri Sep 16 11:48:10 UTC 2016

Modified Files:
src/sys/arch/amd64/amd64: trap.c
src/sys/arch/i386/i386: trap.c

Log Message:
Put two KASSERTs, to make sure the fault is happening in the correct
half of the vm space when using special copy functions. It can detect
bugs where the kernel would fault when copying a kernel buffer which
it wrongly believes comes from userland.


To generate a diff of this commit:
cvs rdiff -u -r1.84 -r1.85 src/sys/arch/amd64/amd64/trap.c
cvs rdiff -u -r1.278 -r1.279 src/sys/arch/i386/i386/trap.c

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

Modified files:

Index: src/sys/arch/amd64/amd64/trap.c
diff -u src/sys/arch/amd64/amd64/trap.c:1.84 src/sys/arch/amd64/amd64/trap.c:1.85
--- src/sys/arch/amd64/amd64/trap.c:1.84	Thu Aug 11 14:58:29 2016
+++ src/sys/arch/amd64/amd64/trap.c	Fri Sep 16 11:48:10 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: trap.c,v 1.84 2016/08/11 14:58:29 maxv Exp $	*/
+/*	$NetBSD: trap.c,v 1.85 2016/09/16 11:48:10 maxv Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.84 2016/08/11 14:58:29 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.85 2016/09/16 11:48:10 maxv Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -310,6 +310,10 @@ trap(struct trapframe *frame)
 copyefault:
 			error = EFAULT;
 copyfault:
+			KASSERT(onfault == kcopy_fault ||
+			rcr2() < VM_MAXUSER_ADDRESS);
+			KASSERT(onfault != kcopy_fault ||
+			rcr2() >= VM_MAXUSER_ADDRESS);
 			frame->tf_rip = (uintptr_t)onfault;
 			frame->tf_rax = error;
 			return;

Index: src/sys/arch/i386/i386/trap.c
diff -u src/sys/arch/i386/i386/trap.c:1.278 src/sys/arch/i386/i386/trap.c:1.279
--- src/sys/arch/i386/i386/trap.c:1.278	Thu Aug 11 15:03:23 2016
+++ src/sys/arch/i386/i386/trap.c	Fri Sep 16 11:48:10 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: trap.c,v 1.278 2016/08/11 15:03:23 maxv Exp $	*/
+/*	$NetBSD: trap.c,v 1.279 2016/09/16 11:48:10 maxv Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2000, 2005, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.278 2016/08/11 15:03:23 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.279 2016/09/16 11:48:10 maxv Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -354,6 +354,10 @@ trap(struct trapframe *frame)
 copyefault:
 			error = EFAULT;
 copyfault:
+			KASSERT(onfault == kcopy_fault ||
+			rcr2() < VM_MAXUSER_ADDRESS);
+			KASSERT(onfault != kcopy_fault ||
+			rcr2() >= VM_MAXUSER_ADDRESS);
 			frame->tf_eip = (uintptr_t)onfault;
 			frame->tf_eax = error;
 			return;



CVS commit: src/sys/dev/ic

2016-09-16 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Fri Sep 16 11:41:40 UTC 2016

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

Log Message:
make nvme_dumpregs() compile when NVME_DEBUG is defined


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/ic/nvme.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/nvme.c
diff -u src/sys/dev/ic/nvme.c:1.5 src/sys/dev/ic/nvme.c:1.6
--- src/sys/dev/ic/nvme.c:1.5	Thu Sep  8 15:00:08 2016
+++ src/sys/dev/ic/nvme.c	Fri Sep 16 11:41:40 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: nvme.c,v 1.5 2016/09/08 15:00:08 nonaka Exp $	*/
+/*	$NetBSD: nvme.c,v 1.6 2016/09/16 11:41:40 jdolecek Exp $	*/
 /*	$OpenBSD: nvme.c,v 1.49 2016/04/18 05:59:50 dlg Exp $ */
 
 /*
@@ -18,7 +18,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: nvme.c,v 1.5 2016/09/08 15:00:08 nonaka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nvme.c,v 1.6 2016/09/16 11:41:40 jdolecek Exp $");
 
 #include 
 #include 
@@ -187,7 +187,7 @@ nvme_version(struct nvme_softc *sc, uint
 }
 
 #ifdef NVME_DEBUG
-static void
+static __used void
 nvme_dumpregs(struct nvme_softc *sc)
 {
 	uint64_t r8;
@@ -202,7 +202,7 @@ nvme_dumpregs(struct nvme_softc *sc)
 	(u_int)NVME_CAP_MPSMIN(r8), (1 << NVME_CAP_MPSMIN(r8)));
 	printf("%s:  css %llu\n", DEVNAME(sc), NVME_CAP_CSS(r8));
 	printf("%s:  nssrs %llu\n", DEVNAME(sc), NVME_CAP_NSSRS(r8));
-	printf("%s:  dstrd %u\n", DEVNAME(sc), NVME_CAP_DSTRD(r8));
+	printf("%s:  dstrd %llu\n", DEVNAME(sc), NVME_CAP_DSTRD(r8));
 	printf("%s:  to %llu msec\n", DEVNAME(sc), NVME_CAP_TO(r8));
 	printf("%s:  ams %llu\n", DEVNAME(sc), NVME_CAP_AMS(r8));
 	printf("%s:  cqr %llu\n", DEVNAME(sc), NVME_CAP_CQR(r8));
@@ -218,7 +218,7 @@ nvme_dumpregs(struct nvme_softc *sc)
 	printf("%s:  ams %u\n", DEVNAME(sc), NVME_CC_AMS_R(r4));
 	printf("%s:  mps %u\n", DEVNAME(sc), NVME_CC_MPS_R(r4));
 	printf("%s:  css %u\n", DEVNAME(sc), NVME_CC_CSS_R(r4));
-	printf("%s:  en %u\n", DEVNAME(sc), ISSET(r4, NVME_CC_EN));
+	printf("%s:  en %u\n", DEVNAME(sc), ISSET(r4, NVME_CC_EN) ? 1 : 0);
 
 	printf("%s: csts 0x%08x\n", DEVNAME(sc), nvme_read4(sc, NVME_CSTS));
 	printf("%s: aqa  0x%08x\n", DEVNAME(sc), nvme_read4(sc, NVME_AQA));



CVS commit: src/sys

2016-09-16 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Fri Sep 16 11:35:07 UTC 2016

Modified Files:
src/sys/dev/pci: nvme_pci.c
src/sys/modules: Makefile
Added Files:
src/sys/modules/nvme: Makefile nvme.ioconf

Log Message:
make it possible to load nvme(4) as module to ease testing; currently somewhat
non-optimal, since it includes the ld(4) code also and hence requires the
kernel config to have 'no ld'


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/pci/nvme_pci.c
cvs rdiff -u -r1.176 -r1.177 src/sys/modules/Makefile
cvs rdiff -u -r0 -r1.1 src/sys/modules/nvme/Makefile \
src/sys/modules/nvme/nvme.ioconf

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/nvme_pci.c
diff -u src/sys/dev/pci/nvme_pci.c:1.5 src/sys/dev/pci/nvme_pci.c:1.6
--- src/sys/dev/pci/nvme_pci.c:1.5	Fri Sep 16 10:59:28 2016
+++ src/sys/dev/pci/nvme_pci.c	Fri Sep 16 11:35:07 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: nvme_pci.c,v 1.5 2016/09/16 10:59:28 jdolecek Exp $	*/
+/*	$NetBSD: nvme_pci.c,v 1.6 2016/09/16 11:35:07 jdolecek Exp $	*/
 /*	$OpenBSD: nvme_pci.c,v 1.3 2016/04/14 11:18:32 dlg Exp $ */
 
 /*
@@ -43,7 +43,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: nvme_pci.c,v 1.5 2016/09/16 10:59:28 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nvme_pci.c,v 1.6 2016/09/16 11:35:07 jdolecek Exp $");
 
 #include 
 #include 
@@ -55,6 +55,9 @@ __KERNEL_RCSID(0, "$NetBSD: nvme_pci.c,v
 #include 
 #include 
 #include 
+#ifdef _MODULE
+#include 
+#endif
 
 #include 
 #include 
@@ -415,3 +418,57 @@ retry:
 	sc->sc_nq = sc->sc_use_mq ? alloced_counts[intr_type] - 1 : 1;
 	return 0;
 }
+
+MODULE(MODULE_CLASS_DRIVER, nvme, "pci");
+
+#ifdef _MODULE
+#include "ioconf.c"
+
+extern const struct bdevsw ld_bdevsw;
+extern const struct cdevsw ld_cdevsw;
+#endif
+
+static int
+nvme_modcmd(modcmd_t cmd, void *opaque)
+{
+#ifdef _MODULE
+	devmajor_t cmajor, bmajor;
+#endif
+	int error = 0;
+
+	switch (cmd) {
+	case MODULE_CMD_INIT:
+#ifdef _MODULE
+		/* devsw must be done before configuring the pci device,
+		 * otherwise ldattach() fails
+		 */
+		bmajor = cmajor = NODEVMAJOR;
+		error = devsw_attach(ld_cd.cd_name, _bdevsw, ,
+		_cdevsw, );
+		if (error && error != EEXIST) {
+			aprint_error("%s: unable to register devsw\n",
+			ld_cd.cd_name);
+			return error;
+		}
+
+		error = config_init_component(cfdriver_ioconf_nvme_pci,
+		cfattach_ioconf_nvme_pci, cfdata_ioconf_nvme_pci);
+		if (error)
+			return error;
+
+#endif
+		return error;
+	case MODULE_CMD_FINI:
+#ifdef _MODULE
+		error = config_fini_component(cfdriver_ioconf_nvme_pci,
+		cfattach_ioconf_nvme_pci, cfdata_ioconf_nvme_pci);
+		if (error)
+			return error;
+
+		/* devsw not detached, it's static data and fine to stay */
+#endif
+		return error;
+	default:
+		return ENOTTY;
+	}
+}

Index: src/sys/modules/Makefile
diff -u src/sys/modules/Makefile:1.176 src/sys/modules/Makefile:1.177
--- src/sys/modules/Makefile:1.176	Sat Sep 10 02:20:10 2016
+++ src/sys/modules/Makefile	Fri Sep 16 11:35:07 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.176 2016/09/10 02:20:10 pgoyette Exp $
+#	$NetBSD: Makefile,v 1.177 2016/09/16 11:35:07 jdolecek Exp $
 
 .include 
 
@@ -183,6 +183,7 @@ SUBDIR+=	vmt
 .if ${MACHINE_ARCH} == "i386" || \
 ${MACHINE_ARCH} == "x86_64"
 SUBDIR+=	ubsec		# Builds on architectures with PCI bus
+SUBDIR+=	nvme
 .endif
 
 .if ${MKSLJIT} != "no"

Added files:

Index: src/sys/modules/nvme/Makefile
diff -u /dev/null src/sys/modules/nvme/Makefile:1.1
--- /dev/null	Fri Sep 16 11:35:07 2016
+++ src/sys/modules/nvme/Makefile	Fri Sep 16 11:35:07 2016
@@ -0,0 +1,14 @@
+#	$NetBSD: Makefile,v 1.1 2016/09/16 11:35:07 jdolecek Exp $
+
+.include "../Makefile.inc"
+
+.PATH:	${S}/dev/pci ${S}/dev/ic ${S}/dev
+
+KMOD=	nvme
+IOCONF=	nvme.ioconf
+SRCS=	nvme.c nvme_pci.c
+
+# move to separate module?
+SRCS+=	ld_nvme.c ld.c
+
+.include 
Index: src/sys/modules/nvme/nvme.ioconf
diff -u /dev/null src/sys/modules/nvme/nvme.ioconf:1.1
--- /dev/null	Fri Sep 16 11:35:07 2016
+++ src/sys/modules/nvme/nvme.ioconf	Fri Sep 16 11:35:07 2016
@@ -0,0 +1,11 @@
+#   $NetBSD: nvme.ioconf,v 1.1 2016/09/16 11:35:07 jdolecek Exp $
+
+ioconf nvme_pci
+
+include "conf/files"
+include "dev/pci/files.pci"
+
+pseudo-root pci*
+
+nvme* at pci? dev ? function ?
+ld* at nvme? nsid ?



CVS commit: src/sbin/fsck_lfs

2016-09-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Sep 16 11:13:47 UTC 2016

Modified Files:
src/sbin/fsck_lfs: lfs.c

Log Message:
PR/51478: Jose Luis Rodriguez Garcia: Fix leak mem fsck_lfs/lfs.c


To generate a diff of this commit:
cvs rdiff -u -r1.71 -r1.72 src/sbin/fsck_lfs/lfs.c

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

Modified files:

Index: src/sbin/fsck_lfs/lfs.c
diff -u src/sbin/fsck_lfs/lfs.c:1.71 src/sbin/fsck_lfs/lfs.c:1.72
--- src/sbin/fsck_lfs/lfs.c:1.71	Sun Mar 20 00:24:46 2016
+++ src/sbin/fsck_lfs/lfs.c	Fri Sep 16 07:13:47 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: lfs.c,v 1.71 2016/03/20 04:24:46 dholland Exp $ */
+/* $NetBSD: lfs.c,v 1.72 2016/09/16 11:13:47 christos Exp $ */
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -376,6 +376,8 @@ lfs_raw_vget(struct lfs * fs, ino_t ino,
 		dip = lfs_ifind(fs, ino, bp);
 		if (dip == NULL) {
 			brelse(bp, 0);
+			free(ip->i_din);
+			free(ip->inode_ext.lfs);
 			free(ip);
 			free(vp);
 			return NULL;



CVS commit: src/sys/dev/pci

2016-09-16 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Fri Sep 16 10:59:28 UTC 2016

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

Log Message:
fix nvme_pci_detach() to not pci_intr_disestablish(); the interrupts
are disestablished and handler pointers are set to NULL already by
nvme_detach(), leading to panic here; this was happening when running
on system without MSI/MSI-X

change all the alloc/dealloc code for sc_ih to use psc->psc_nintrs, so
that we avoid some duplicated logic


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/pci/nvme_pci.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/nvme_pci.c
diff -u src/sys/dev/pci/nvme_pci.c:1.4 src/sys/dev/pci/nvme_pci.c:1.5
--- src/sys/dev/pci/nvme_pci.c:1.4	Mon Jul 11 06:14:51 2016
+++ src/sys/dev/pci/nvme_pci.c	Fri Sep 16 10:59:28 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: nvme_pci.c,v 1.4 2016/07/11 06:14:51 knakahara Exp $	*/
+/*	$NetBSD: nvme_pci.c,v 1.5 2016/09/16 10:59:28 jdolecek Exp $	*/
 /*	$OpenBSD: nvme_pci.c,v 1.3 2016/04/14 11:18:32 dlg Exp $ */
 
 /*
@@ -43,7 +43,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: nvme_pci.c,v 1.4 2016/07/11 06:14:51 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nvme_pci.c,v 1.5 2016/09/16 10:59:28 jdolecek Exp $");
 
 #include 
 #include 
@@ -112,7 +112,7 @@ nvme_pci_attach(device_t parent, device_
 	pcireg_t memtype;
 	bus_addr_t memaddr;
 	int flags, msixoff;
-	int nq, error;
+	int error;
 
 	sc->sc_dev = self;
 	psc->psc_pc = pa->pa_pc;
@@ -166,8 +166,7 @@ nvme_pci_attach(device_t parent, device_
 	sc->sc_intr_establish = nvme_pci_intr_establish;
 	sc->sc_intr_disestablish = nvme_pci_intr_disestablish;
 
-	nq = sc->sc_nq + (sc->sc_use_mq ? 1 : 0);
-	sc->sc_ih = kmem_zalloc(sizeof(*sc->sc_ih) * nq, KM_SLEEP);
+	sc->sc_ih = kmem_zalloc(sizeof(*sc->sc_ih) * psc->psc_nintrs, KM_SLEEP);
 	if (sc->sc_ih == NULL) {
 		aprint_error_dev(self, "unable to allocate ih memory\n");
 		goto intr_release;
@@ -185,7 +184,7 @@ nvme_pci_attach(device_t parent, device_
 	return;
 
 intr_free:
-	kmem_free(sc->sc_ih, sizeof(*sc->sc_ih) * nq);
+	kmem_free(sc->sc_ih, sizeof(*sc->sc_ih) * psc->psc_nintrs);
 	sc->sc_nq = 0;
 intr_release:
 	pci_intr_release(pa->pa_pc, psc->psc_intrs, psc->psc_nintrs);
@@ -200,7 +199,7 @@ nvme_pci_detach(device_t self, int flags
 {
 	struct nvme_pci_softc *psc = device_private(self);
 	struct nvme_softc *sc = >psc_nvme;
-	int i, nq, error;
+	int error;
 
 	if (!ISSET(sc->sc_flags, NVME_F_ATTACHED))
 		return 0;
@@ -209,12 +208,7 @@ nvme_pci_detach(device_t self, int flags
 	if (error)
 		return error;
 
-	nq = sc->sc_nq + (sc->sc_use_mq ? 1 : 0);
-	if (!sc->sc_use_mq) {
-		for (i = 0; i < nq; i++)
-			pci_intr_disestablish(psc->psc_pc, sc->sc_ih[i]);
-	}
-	kmem_free(sc->sc_ih, sizeof(*sc->sc_ih) * nq);
+	kmem_free(sc->sc_ih, sizeof(*sc->sc_ih) * psc->psc_nintrs);
 	pci_intr_release(psc->psc_pc, psc->psc_intrs, psc->psc_nintrs);
 	bus_space_unmap(sc->sc_iot, sc->sc_ioh, sc->sc_ios);
 	return 0;
@@ -274,7 +268,7 @@ nvme_pci_intr_establish(struct nvme_soft
 	sizeof(intrbuf));
 	if (!sc->sc_use_mq) {
 		aprint_normal_dev(sc->sc_dev, "interrupting at %s\n", intrstr);
-	} else if (qid == 0) {
+	} else if (qid == NVME_ADMIN_Q) {
 		aprint_normal_dev(sc->sc_dev,
 		"for admin queue interrupting at %s\n", intrstr);
 	} else if (!nvme_pci_mpsafe) {



CVS commit: src/sys/dev/ic

2016-09-16 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Fri Sep 16 10:54:45 UTC 2016

Modified Files:
src/sys/dev/ic: nvmereg.h

Log Message:
add IO flags for FUA and also LR while here


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/ic/nvmereg.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/ic/nvmereg.h
diff -u src/sys/dev/ic/nvmereg.h:1.3 src/sys/dev/ic/nvmereg.h:1.4
--- src/sys/dev/ic/nvmereg.h:1.3	Sat Jun  4 16:29:35 2016
+++ src/sys/dev/ic/nvmereg.h	Fri Sep 16 10:54:45 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: nvmereg.h,v 1.3 2016/06/04 16:29:35 nonaka Exp $	*/
+/*	$NetBSD: nvmereg.h,v 1.4 2016/09/16 10:54:45 jdolecek Exp $	*/
 /*	$OpenBSD: nvmereg.h,v 1.10 2016/04/14 11:18:32 dlg Exp $ */
 
 /*
@@ -186,6 +186,8 @@ struct nvme_sqe_io {
 
 	uint16_t	nlb;	/* Number of Logical Blocks */
 	uint16_t	ioflags;
+#define NVM_SQE_IO_FUA	__BIT(14)	/* Force Unit Access (bypass cache) */
+#define NVM_SQE_IO_LR	__BIT(15)	/* Limited Retry */
 
 	uint8_t		dsm;	/* Dataset Management */
 	uint8_t		_reserved2[3];



CVS commit: src/sys/netinet

2016-09-16 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Fri Sep 16 09:59:45 UTC 2016

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

Log Message:
Don't setup DaD for INADDR_ANY


To generate a diff of this commit:
cvs rdiff -u -r1.224 -r1.225 src/sys/netinet/if_arp.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/if_arp.c
diff -u src/sys/netinet/if_arp.c:1.224 src/sys/netinet/if_arp.c:1.225
--- src/sys/netinet/if_arp.c:1.224	Thu Sep 15 18:17:29 2016
+++ src/sys/netinet/if_arp.c	Fri Sep 16 09:59:45 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_arp.c,v 1.224 2016/09/15 18:17:29 roy Exp $	*/
+/*	$NetBSD: if_arp.c,v 1.225 2016/09/16 09:59:45 roy Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2000, 2008 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_arp.c,v 1.224 2016/09/15 18:17:29 roy Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_arp.c,v 1.225 2016/09/16 09:59:45 roy Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ddb.h"
@@ -1476,10 +1476,16 @@ arp_ifinit(struct ifnet *ifp, struct ifa
 	ifa->ifa_flags |= RTF_CONNECTED;
 
 	/* ARP will handle DAD for this address. */
-	if (ia->ia4_flags & IN_IFF_TRYTENTATIVE) {
-		ia->ia4_flags |= IN_IFF_TENTATIVE;
+	if (in_nullhost(*ip)) {
+		if (ia->ia_dad_stop != NULL)	/* safety */
+			ia->ia_dad_stop(ifa);
+		ia->ia_dad_start = NULL;
+		ia->ia_dad_stop = NULL;
+	} else {
 		ia->ia_dad_start = arp_dad_start;
 		ia->ia_dad_stop = arp_dad_stop;
+		if (ia->ia4_flags & IN_IFF_TRYTENTATIVE)
+			ia->ia4_flags |= IN_IFF_TENTATIVE;
 	}
 }
 



CVS commit: src/sys

2016-09-16 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Fri Sep 16 09:25:30 UTC 2016

Modified Files:
src/sys/dev/ic: rt2860reg.h
src/sys/dev/usb: if_run.c if_runvar.h
src/sys/net80211: ieee80211.h

Log Message:
Merge enough FreeBSD code to make RT5592 work.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/ic/rt2860reg.h
cvs rdiff -u -r1.15 -r1.16 src/sys/dev/usb/if_run.c
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/usb/if_runvar.h
cvs rdiff -u -r1.27 -r1.28 src/sys/net80211/ieee80211.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/ic/rt2860reg.h
diff -u src/sys/dev/ic/rt2860reg.h:1.5 src/sys/dev/ic/rt2860reg.h:1.6
--- src/sys/dev/ic/rt2860reg.h:1.5	Fri Jul  8 01:24:53 2016
+++ src/sys/dev/ic/rt2860reg.h	Fri Sep 16 09:25:30 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: rt2860reg.h,v 1.5 2016/07/08 01:24:53 christos Exp $	*/
+/*	$NetBSD: rt2860reg.h,v 1.6 2016/09/16 09:25:30 mlelstv Exp $	*/
 /*	$OpenBSD: rt2860reg.h,v 1.32 2014/05/24 10:10:17 stsp Exp $	*/
 
 /*-
@@ -83,6 +83,8 @@
 #define RT3070_LDO_CFG0			0x05d4
 #define RT3070_GPIO_SWITCH		0x05dc
 
+
+
 /* RT5592 registers */
 #define RT5592_DEBUG_INDEX		0x05e8
 
@@ -783,6 +785,12 @@
 /* possible flags for RT3053 RF register 51 */
 #define RT3593_TX_LO1	(1U << 4)
 
+/* Possible flags for RT5390 RF register 2. */
+#define RT5390_RESCAL	(1 << 7)
+
+/* Possible flags for RT5390 RF register 3. */
+#define RT5390_VCOCAL	(1 << 7)
+
 /* Possible flags for RT5390 BBP register 4. */
 #define RT5390_MAC_IF_CTRL	(1U << 6)
 

Index: src/sys/dev/usb/if_run.c
diff -u src/sys/dev/usb/if_run.c:1.15 src/sys/dev/usb/if_run.c:1.16
--- src/sys/dev/usb/if_run.c:1.15	Fri Jun 10 13:27:15 2016
+++ src/sys/dev/usb/if_run.c	Fri Sep 16 09:25:30 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_run.c,v 1.15 2016/06/10 13:27:15 ozaki-r Exp $	*/
+/*	$NetBSD: if_run.c,v 1.16 2016/09/16 09:25:30 mlelstv Exp $	*/
 /*	$OpenBSD: if_run.c,v 1.90 2012/03/24 15:11:04 jsg Exp $	*/
 
 /*-
@@ -23,7 +23,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_run.c,v 1.15 2016/06/10 13:27:15 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_run.c,v 1.16 2016/09/16 09:25:30 mlelstv Exp $");
 
 #include 
 #include 
@@ -74,6 +74,8 @@ int run_debug = 0;
 #define DPRINTFN(n, x)
 #endif
 
+#define IEEE80211_HAS_ADDR4(wh) IEEE80211_IS_DSTODS(wh)
+
 #define USB_ID(v, p)	{ USB_VENDOR_##v, USB_PRODUCT_##v##_##p }
 static const struct usb_devno run_devs[] = {
 	USB_ID(ABOCOM,		RT2770),
@@ -251,6 +253,7 @@ static const struct usb_devno run_devs[]
 	USB_ID(RALINK,		RT3072),
 	USB_ID(RALINK,		RT3370),
 	USB_ID(RALINK,		RT3572),
+	USB_ID(RALINK,		RT5572),
 	USB_ID(RALINK,		RT8070),
 	USB_ID(SAMSUNG,		RT2870_1),
 	USB_ID(SENAO,		RT2870_1),
@@ -329,6 +332,8 @@ static int		run_write_region_1(struct ru
 			const uint8_t *, int);
 static int		run_set_region_4(struct run_softc *, uint16_t,
 			uint32_t, int);
+static int		run_efuse_read(struct run_softc *, uint16_t,
+			uint16_t *, int);
 static int		run_efuse_read_2(struct run_softc *, uint16_t,
 			uint16_t *);
 static int		run_eeprom_read_2(struct run_softc *, uint16_t,
@@ -343,6 +348,8 @@ static int		run_bbp_read(struct run_soft
 static int		run_bbp_write(struct run_softc *, uint8_t, uint8_t);
 static int		run_mcu_cmd(struct run_softc *, uint8_t, uint16_t);
 static const char *	run_get_rf(int);
+static void		run_rt3593_get_txpower(struct run_softc *);
+static void		run_get_txpower(struct run_softc *);
 static int		run_read_eeprom(struct run_softc *);
 static struct ieee80211_node *
 			run_node_alloc(struct ieee80211_node_table *);
@@ -378,13 +385,18 @@ static void		run_start(struct ifnet *);
 static void		run_watchdog(struct ifnet *);
 static int		run_ioctl(struct ifnet *, u_long, void *);
 static void		run_select_chan_group(struct run_softc *, int);
+static void		run_iq_calib(struct run_softc *, u_int);
 static void		run_set_agc(struct run_softc *, uint8_t);
 static void		run_set_rx_antenna(struct run_softc *, int);
 static void		run_rt2870_set_chan(struct run_softc *, u_int);
 static void		run_rt3070_set_chan(struct run_softc *, u_int);
 static void		run_rt3572_set_chan(struct run_softc *, u_int);
+static void		run_rt3593_set_chan(struct run_softc *, u_int);
+static void		run_rt5390_set_chan(struct run_softc *, u_int);
+static void		run_rt5592_set_chan(struct run_softc *, u_int);
 static int		run_set_chan(struct run_softc *,
 			struct ieee80211_channel *);
+static void		run_updateprot(struct run_softc *);
 static void		run_enable_tsf_sync(struct run_softc *);
 static void		run_enable_mrr(struct run_softc *);
 static void		run_set_txpreamble(struct run_softc *);
@@ -395,12 +407,18 @@ static void		run_set_macaddr(struct run_
 static void		run_updateslot(struct ifnet *);
 static void		run_updateslot_cb(struct run_softc *, void *);
 static int8_t		run_rssi2dbm(struct run_softc *, uint8_t, uint8_t);
+static void		

CVS commit: src/share/man/man9

2016-09-16 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Fri Sep 16 08:26:16 UTC 2016

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

Log Message:
Use Nm instead of Xr to itself. Add missing space. Bump date for previous.


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/share/man/man9/bus_space.9

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

Modified files:

Index: src/share/man/man9/bus_space.9
diff -u src/share/man/man9/bus_space.9:1.49 src/share/man/man9/bus_space.9:1.50
--- src/share/man/man9/bus_space.9:1.49	Thu Sep 15 21:47:26 2016
+++ src/share/man/man9/bus_space.9	Fri Sep 16 08:26:16 2016
@@ -1,4 +1,4 @@
-.\" $NetBSD: bus_space.9,v 1.49 2016/09/15 21:47:26 jdolecek Exp $
+.\" $NetBSD: bus_space.9,v 1.50 2016/09/16 08:26:16 wiz Exp $
 .\"
 .\" Copyright (c) 1997 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd June 1, 2016
+.Dd September 15, 2016
 .Dt BUS_SPACE 9
 .Os
 .Sh NAME
@@ -1363,12 +1363,12 @@ Supported flags are:
 .Bl -tag -width BUS_SPACE_BARRIER_WRITE -offset indent
 .It Dv BUS_SPACE_BARRIER_READ
 Force all
-.Xr bus_space 9
+.Nm
 operations before the barrier to complete before any reads
 after the barrier may be issued.
 .It Dv BUS_SPACE_BARRIER_WRITE
 Force all
-.Xr bus_space 9
+.Nm
 operations before the barrier to complete before any writes
 after the barrier may be issued.
 .El
@@ -1984,7 +1984,7 @@ developer
 community.
 Primary contributors and implementors were
 .An Chris Demetriou ,
-.An Jason Thorpe,
+.An Jason Thorpe ,
 and
 .An Charles Hannum ,
 but the rest of the