CVS commit: src/sys/dev/acpi

2018-10-14 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Mon Oct 15 06:58:08 UTC 2018

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

Log Message:
use intr_establish_xname()


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/acpi/ahcisata_acpi.c

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

Modified files:

Index: src/sys/dev/acpi/ahcisata_acpi.c
diff -u src/sys/dev/acpi/ahcisata_acpi.c:1.1 src/sys/dev/acpi/ahcisata_acpi.c:1.2
--- src/sys/dev/acpi/ahcisata_acpi.c:1.1	Fri Oct 12 23:26:18 2018
+++ src/sys/dev/acpi/ahcisata_acpi.c	Mon Oct 15 06:58:08 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: ahcisata_acpi.c,v 1.1 2018/10/12 23:26:18 jmcneill Exp $ */
+/* $NetBSD: ahcisata_acpi.c,v 1.2 2018/10/15 06:58:08 jdolecek Exp $ */
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ahcisata_acpi.c,v 1.1 2018/10/12 23:26:18 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ahcisata_acpi.c,v 1.2 2018/10/15 06:58:08 jdolecek Exp $");
 
 #include 
 #include 
@@ -103,7 +103,8 @@ ahcisata_acpi_attach(device_t parent, de
 	}
 
 	const int type = (irq->ar_type == ACPI_EDGE_SENSITIVE) ? IST_EDGE : IST_LEVEL;
-	ih = intr_establish(irq->ar_irq, IPL_BIO, type, ahci_intr, sc);
+	ih = intr_establish_xname(irq->ar_irq, IPL_BIO, type, ahci_intr, sc,
+	device_xname(self));
 	if (ih == NULL) {
 		aprint_error_dev(self, "couldn't install interrupt handler\n");
 		return;



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

2018-10-14 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Mon Oct 15 05:44:09 UTC 2018

Modified Files:
src/sys/arch/arm/arm32: genassym.cf

Log Message:
Group/sort struct arm_cache_info members


To generate a diff of this commit:
cvs rdiff -u -r1.78 -r1.79 src/sys/arch/arm/arm32/genassym.cf

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

Modified files:

Index: src/sys/arch/arm/arm32/genassym.cf
diff -u src/sys/arch/arm/arm32/genassym.cf:1.78 src/sys/arch/arm/arm32/genassym.cf:1.79
--- src/sys/arch/arm/arm32/genassym.cf:1.78	Wed Jun 27 11:12:14 2018
+++ src/sys/arch/arm/arm32/genassym.cf	Mon Oct 15 05:44:09 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: genassym.cf,v 1.78 2018/06/27 11:12:14 ryo Exp $
+#	$NetBSD: genassym.cf,v 1.79 2018/10/15 05:44:09 skrll Exp $
 
 # Copyright (c) 1982, 1990 The Regents of the University of California.
 # All rights reserved.
@@ -94,8 +94,6 @@ define	KERNEL_BASE		KERNEL_BASE
 define	VM_MIN_ADDRESS		VM_MIN_ADDRESS
 define	VM_MAXUSER_ADDRESS	VM_MAXUSER_ADDRESS
 
-define	DCACHE_LINE_SIZE	offsetof(struct arm_cache_info, dcache_line_size)
-
 define	PV_PA			offsetof(pv_addr_t, pv_pa)
 define	PMAP_DOMAIN_KERNEL	PMAP_DOMAIN_KERNEL
 define	DOMAIN_CLIENT		DOMAIN_CLIENT
@@ -255,4 +253,5 @@ define	IP_SRC			offsetof(struct ip, ip_s
 define	IP_DST			offsetof(struct ip, ip_dst)
 
 # Cache information
+define	DCACHE_LINE_SIZE	offsetof(struct arm_cache_info, dcache_line_size)
 define	DCACHE_SIZE		offsetof(struct arm_cache_info, dcache_size)



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

2018-10-14 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Mon Oct 15 05:14:07 UTC 2018

Modified Files:
src/sys/arch/evbarm/conf: std.generic64

Log Message:
Sort options


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/evbarm/conf/std.generic64

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/evbarm/conf/std.generic64
diff -u src/sys/arch/evbarm/conf/std.generic64:1.4 src/sys/arch/evbarm/conf/std.generic64:1.5
--- src/sys/arch/evbarm/conf/std.generic64:1.4	Mon Oct 15 05:11:08 2018
+++ src/sys/arch/evbarm/conf/std.generic64	Mon Oct 15 05:14:07 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: std.generic64,v 1.4 2018/10/15 05:11:08 skrll Exp $
+#	$NetBSD: std.generic64,v 1.5 2018/10/15 05:14:07 skrll Exp $
 #
 #	generic NetBSD/evbarm64 with FDT support
 
@@ -9,15 +9,14 @@ include		"arch/aarch64/conf/std.aarch64"
 # Architecture options
 options 	AARCH64
 
-options 	__HAVE_PCI_CONF_HOOK
-
 options 	ARM_GENERIC_TODR
 options 	ARM_INTR_IMPL=""
-options 	FDT# Flattened Device Tree support
-options 	FPU_VFP
 options 	DRAM_BLOCKS=256
 options 	EVBARM_BOARDTYPE="FDT"
+options 	FDT# Flattened Device Tree support
+options 	FPU_VFP
 options 	PCI_NETBSD_CONFIGURE
+options 	__HAVE_PCI_CONF_HOOK
 
 # XXXNH not yet
 #options 	__HAVE_CPU_UAREA_ALLOC_IDLELWP



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

2018-10-14 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Mon Oct 15 05:11:08 UTC 2018

Modified Files:
src/sys/arch/evbarm/conf: std.generic64

Log Message:
G/C


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/evbarm/conf/std.generic64

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/evbarm/conf/std.generic64
diff -u src/sys/arch/evbarm/conf/std.generic64:1.3 src/sys/arch/evbarm/conf/std.generic64:1.4
--- src/sys/arch/evbarm/conf/std.generic64:1.3	Sun Oct  7 07:48:44 2018
+++ src/sys/arch/evbarm/conf/std.generic64	Mon Oct 15 05:11:08 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: std.generic64,v 1.3 2018/10/07 07:48:44 skrll Exp $
+#	$NetBSD: std.generic64,v 1.4 2018/10/15 05:11:08 skrll Exp $
 #
 #	generic NetBSD/evbarm64 with FDT support
 
@@ -23,8 +23,6 @@ options 	PCI_NETBSD_CONFIGURE
 #options 	__HAVE_CPU_UAREA_ALLOC_IDLELWP
 #options 	MODULAR
 #options 	MODULAR_DEFAULT_AUTOLOAD
-#options 	ARM_HAS_VBAR
-#options 	KERNEL_BASE_EXT=0x8000
 
 makeoptions	BOARDMKFRAG="${THISARM}/conf/mk.generic64"
 



CVS commit: [pgoyette-compat] src/sys

2018-10-14 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Oct 15 04:33:34 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: compat_40_mod.c if_43.c
rtsock_70.c uipc_syscalls_40.c uipc_syscalls_50.c
src/sys/compat/net [pgoyette-compat]: route.h route_70.h
src/sys/kern [pgoyette-compat]: compat_stub.c
src/sys/net [pgoyette-compat]: rtsock.c
src/sys/sys [pgoyette-compat]: compat_stub.h rnd.h
Removed Files:
src/sys/compat/common [pgoyette-compat]: if_40.h if_43.h
src/sys/compat/sys [pgoyette-compat]: if.h

Log Message:
Convert a couple more hooks to the MP-safe mechanism.

While here, clean up some headers and remove any that are now empty.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.6 -r1.1.2.7 src/sys/compat/common/compat_40_mod.c
cvs rdiff -u -r1.1.2.3 -r0 src/sys/compat/common/if_40.h
cvs rdiff -u -r1.14.2.9 -r1.14.2.10 src/sys/compat/common/if_43.c
cvs rdiff -u -r1.1.20.2 -r0 src/sys/compat/common/if_43.h
cvs rdiff -u -r1.2.2.1 -r1.2.2.2 src/sys/compat/common/rtsock_70.c
cvs rdiff -u -r1.15.2.11 -r1.15.2.12 src/sys/compat/common/uipc_syscalls_40.c
cvs rdiff -u -r1.3.56.11 -r1.3.56.12 src/sys/compat/common/uipc_syscalls_50.c
cvs rdiff -u -r1.2 -r1.2.14.1 src/sys/compat/net/route.h
cvs rdiff -u -r1.1.2.2 -r1.1.2.3 src/sys/compat/net/route_70.h
cvs rdiff -u -r1.1.2.1 -r0 src/sys/compat/sys/if.h
cvs rdiff -u -r1.1.2.27 -r1.1.2.28 src/sys/kern/compat_stub.c
cvs rdiff -u -r1.238.2.11 -r1.238.2.12 src/sys/net/rtsock.c
cvs rdiff -u -r1.1.2.39 -r1.1.2.40 src/sys/sys/compat_stub.h
cvs rdiff -u -r1.49.16.1 -r1.49.16.2 src/sys/sys/rnd.h

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

Modified files:

Index: src/sys/compat/common/compat_40_mod.c
diff -u src/sys/compat/common/compat_40_mod.c:1.1.2.6 src/sys/compat/common/compat_40_mod.c:1.1.2.7
--- src/sys/compat/common/compat_40_mod.c:1.1.2.6	Sat Sep 22 04:56:28 2018
+++ src/sys/compat/common/compat_40_mod.c	Mon Oct 15 04:33:34 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_40_mod.c,v 1.1.2.6 2018/09/22 04:56:28 pgoyette Exp $	*/
+/*	$NetBSD: compat_40_mod.c,v 1.1.2.7 2018/10/15 04:33:34 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: compat_40_mod.c,v 1.1.2.6 2018/09/22 04:56:28 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: compat_40_mod.c,v 1.1.2.7 2018/10/15 04:33:34 pgoyette Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd.h"
@@ -50,8 +50,6 @@ __KERNEL_RCSID(0, "$NetBSD: compat_40_mo
 #include 
 #include 
 
-#include 
-
 int
 compat_40_init(void)
 {

Index: src/sys/compat/common/if_43.c
diff -u src/sys/compat/common/if_43.c:1.14.2.9 src/sys/compat/common/if_43.c:1.14.2.10
--- src/sys/compat/common/if_43.c:1.14.2.9	Wed Oct  3 21:52:02 2018
+++ src/sys/compat/common/if_43.c	Mon Oct 15 04:33:34 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_43.c,v 1.14.2.9 2018/10/03 21:52:02 pgoyette Exp $	*/
+/*	$NetBSD: if_43.c,v 1.14.2.10 2018/10/15 04:33:34 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1989, 1990, 1993
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_43.c,v 1.14.2.9 2018/10/03 21:52:02 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_43.c,v 1.14.2.10 2018/10/15 04:33:34 pgoyette Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd.h"
@@ -74,7 +74,6 @@ __KERNEL_RCSID(0, "$NetBSD: if_43.c,v 1.
 
 #include 
 #include 
-#include 
 #include 
 
 #if defined(COMPAT_43)

Index: src/sys/compat/common/rtsock_70.c
diff -u src/sys/compat/common/rtsock_70.c:1.2.2.1 src/sys/compat/common/rtsock_70.c:1.2.2.2
--- src/sys/compat/common/rtsock_70.c:1.2.2.1	Thu Mar 15 05:10:05 2018
+++ src/sys/compat/common/rtsock_70.c	Mon Oct 15 04:33:34 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: rtsock_70.c,v 1.2.2.1 2018/03/15 05:10:05 pgoyette Exp $	*/
+/*	$NetBSD: rtsock_70.c,v 1.2.2.2 2018/10/15 04:33:34 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 2016 The NetBSD Foundation, Inc.
@@ -30,13 +30,15 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rtsock_70.c,v 1.2.2.1 2018/03/15 05:10:05 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rtsock_70.c,v 1.2.2.2 2018/10/15 04:33:34 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
 #endif
 
 #include 
+#include 
+
 #include 
 #include 
 
@@ -44,24 +46,7 @@ __KERNEL_RCSID(0, "$NetBSD: rtsock_70.c,
 #include 
 #include 
 
-static void (*orig_70_rt_newaddrmsg1)(int, struct ifaddr *);
-
-void
-rtsock_70_init(void)
-{
-
-	orig_70_rt_newaddrmsg1 = vec_70_rt_newaddrmsg1;
-	vec_70_rt_newaddrmsg1 = compat_70_rt_newaddrmsg1;
-}
-
-void
-rtsock_70_fini(void)
-{
-
-	vec_70_rt_newaddrmsg1 = orig_70_rt_newaddrmsg1;
-}
-
-void
+int
 compat_70_rt_newaddrmsg1(int cmd, struct ifaddr *ifa)
 {
 	struct rt_addrinfo info;
@@ -102,10 +87,12 @@ compat_70_rt_newaddrmsg1(int cmd, struct
 
 	m = rt_msg1(ncmd, &info, &ifam, sizeof(ifam));
 	if (m == NULL)
-		return

CVS commit: [netbsd-8] src/doc

2018-10-14 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Mon Oct 15 03:13:46 UTC 2018

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

Log Message:
1061, 1062


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.33 -r1.1.2.34 src/doc/CHANGES-8.1

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

Modified files:

Index: src/doc/CHANGES-8.1
diff -u src/doc/CHANGES-8.1:1.1.2.33 src/doc/CHANGES-8.1:1.1.2.34
--- src/doc/CHANGES-8.1:1.1.2.33	Sat Oct 13 17:32:32 2018
+++ src/doc/CHANGES-8.1	Mon Oct 15 03:13:46 2018
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-8.1,v 1.1.2.33 2018/10/13 17:32:32 martin Exp $
+# $NetBSD: CHANGES-8.1,v 1.1.2.34 2018/10/15 03:13:46 snj Exp $
 
 A complete list of changes from the NetBSD 8.0 release to the NetBSD 8.1
 release:
@@ -1379,3 +1379,20 @@ external/bsd/nsd/include/config.h   
 	Update from NSD 4.1.14 to 4.1.24.
 	[hannken, ticket #1060]
 
+sys/dev/i2c/gttwsi_core.c			1.4-1.8 via patch
+sys/dev/i2c/gttwsivar.h1.4 via patch
+
+	- allow i2c xfers from interrupt context
+	- don't print an error message when probing for non-existent devices
+	  (PR kern/53356)
+	- make sure we won't handle interrupts before end of xfer in the polling
+	  case. Should fix "send STOP failed" messages which cause axp20x0
+	  sensors to become non-functionnal.
+	[bouyer, ticket #1061]
+
+distrib/sets/lists/base/mi			1.1192
+etc/mtree/NetBSD.dist.base			1.178-1.179
+
+	Add unbound /var/chroot/unbound/var/run.
+	[hannken, ticket #1062]
+



CVS commit: [netbsd-8] src

2018-10-14 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Mon Oct 15 03:12:41 UTC 2018

Modified Files:
src/distrib/sets/lists/base [netbsd-8]: mi
src/etc/mtree [netbsd-8]: NetBSD.dist.base

Log Message:
Pull up following revision(s) (requested by hannken in ticket #1062):
etc/mtree/NetBSD.dist.base: 1.178-1.179
distrib/sets/lists/base/mi: 1.1192
Add unbound /var/run directory (reported by hannken@)
add intermediate directory.
add unbound /var/run


To generate a diff of this commit:
cvs rdiff -u -r1.1158.2.2 -r1.1158.2.3 src/distrib/sets/lists/base/mi
cvs rdiff -u -r1.160 -r1.160.2.1 src/etc/mtree/NetBSD.dist.base

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

Modified files:

Index: src/distrib/sets/lists/base/mi
diff -u src/distrib/sets/lists/base/mi:1.1158.2.2 src/distrib/sets/lists/base/mi:1.1158.2.3
--- src/distrib/sets/lists/base/mi:1.1158.2.2	Thu Nov  2 21:02:06 2017
+++ src/distrib/sets/lists/base/mi	Mon Oct 15 03:12:41 2018
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1158.2.2 2017/11/02 21:02:06 snj Exp $
+# $NetBSD: mi,v 1.1158.2.3 2018/10/15 03:12:41 snj Exp $
 #
 # Note:	Don't delete entries from here - mark them as "obsolete" instead,
 #	unless otherwise stated below.
@@ -5968,6 +5968,8 @@
 ./var/chroot/unboundbase-sys-root
 ./var/chroot/unbound/etc			base-sys-root
 ./var/chroot/unbound/etc/unbound		base-sys-root
+./var/chroot/unbound/var			base-sys-root
+./var/chroot/unbound/var/run			base-sys-root
 ./var/crash	base-sys-root
 ./var/cron	base-cron-root
 ./var/cron/tabs	base-cron-root

Index: src/etc/mtree/NetBSD.dist.base
diff -u src/etc/mtree/NetBSD.dist.base:1.160 src/etc/mtree/NetBSD.dist.base:1.160.2.1
--- src/etc/mtree/NetBSD.dist.base:1.160	Sat May 27 21:02:55 2017
+++ src/etc/mtree/NetBSD.dist.base	Mon Oct 15 03:12:41 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: NetBSD.dist.base,v 1.160 2017/05/27 21:02:55 bouyer Exp $
+#	$NetBSD: NetBSD.dist.base,v 1.160.2.1 2018/10/15 03:12:41 snj Exp $
 #	@(#)4.4BSD.dist	8.1 (Berkeley) 6/13/93
 
 # Do not customize this file as it may be overwritten on upgrades.
@@ -1299,6 +1299,8 @@
 ./var/chroot/unbound		mode=0755 uname=_unbound gname=_unbound
 ./var/chroot/unbound/etc	mode=0755 uname=_unbound gname=_unbound
 ./var/chroot/unbound/etc/unbound	mode=0755 uname=_unbound gname=_unbound
+./var/chroot/unbound/var
+./var/chroot/unbound/var/run	mode=0775 gname=_unbound
 ./var/crash			mode=0770
 ./var/cron
 ./var/cron/tabs			mode=0700



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

2018-10-14 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Mon Oct 15 03:09:07 UTC 2018

Modified Files:
src/sys/dev/i2c [netbsd-8]: gttwsi_core.c gttwsivar.h

Log Message:
Pull up following revision(s) (requested by bouyer in ticket #1061):
sys/dev/i2c/gttwsi_core.c: revision 1.4-1.8 via patch
sys/dev/i2c/gttwsivar.h: revision 1.4 via patch
Use IPL_VM for bus lock so we can do i2c xfers from interrupt context
Don't sleep with IPL_VM lock held.
When initiating a transfer, if a device isn't present, we won't
get an ACK after sending the address.  Check for this alternate
state and suppress the error message when it occurs.
Fixes PR kern/53356.
Bail early if gttwsi_send_start() fails in gttwsi_initiate_xfer() to
avoid unexpected state error message later (on Allwinner H5).
Expand code covered by sc->sc_mtx, to make sure an interrupt would not be
handled before the cv_timedwait_sig() call, or while polling.
Seems to fix "sunxitwi0: send STOP failed" messages frequently seen related
to axp20x0 sensors.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.2.12.1 src/sys/dev/i2c/gttwsi_core.c \
src/sys/dev/i2c/gttwsivar.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/i2c/gttwsi_core.c
diff -u src/sys/dev/i2c/gttwsi_core.c:1.2 src/sys/dev/i2c/gttwsi_core.c:1.2.12.1
--- src/sys/dev/i2c/gttwsi_core.c:1.2	Sun Nov 23 13:37:27 2014
+++ src/sys/dev/i2c/gttwsi_core.c	Mon Oct 15 03:09:07 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: gttwsi_core.c,v 1.2 2014/11/23 13:37:27 jmcneill Exp $	*/
+/*	$NetBSD: gttwsi_core.c,v 1.2.12.1 2018/10/15 03:09:07 snj Exp $	*/
 /*
  * Copyright (c) 2008 Eiji Kawauchi.
  * All rights reserved.
@@ -66,7 +66,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: gttwsi_core.c,v 1.2 2014/11/23 13:37:27 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gttwsi_core.c,v 1.2.12.1 2018/10/15 03:09:07 snj Exp $");
 #include "locators.h"
 
 #include 
@@ -91,7 +91,8 @@ static int	gttwsi_initiate_xfer(void *v,
 static int	gttwsi_read_byte(void *v, uint8_t *valp, int flags);
 static int	gttwsi_write_byte(void *v, uint8_t val, int flags);
 
-static int	gttwsi_wait(struct gttwsi_softc *, uint32_t, uint32_t, int);
+static int	gttwsi_wait(struct gttwsi_softc *, uint32_t, uint32_t,
+			uint32_t, int);
 
 static inline uint32_t
 gttwsi_read_4(struct gttwsi_softc *sc, uint32_t reg)
@@ -133,7 +134,7 @@ gttwsi_attach_subr(device_t self, bus_sp
 	sc->sc_bust = iot;
 	sc->sc_bush = ioh;
 
-	mutex_init(&sc->sc_buslock, MUTEX_DEFAULT, IPL_NONE);
+	mutex_init(&sc->sc_buslock, MUTEX_DEFAULT, IPL_VM);
 	mutex_init(&sc->sc_mtx, MUTEX_DEFAULT, IPL_BIO);
 	cv_init(&sc->sc_cv, device_xname(self));
 
@@ -176,15 +177,15 @@ gttwsi_intr(void *arg)
 	struct gttwsi_softc *sc = arg;
 	uint32_t val;
 
+	mutex_enter(&sc->sc_mtx);
 	val = gttwsi_read_4(sc, TWSI_CONTROL);
 	if (val & CONTROL_IFLG) {
 		gttwsi_write_4(sc, TWSI_CONTROL, val & ~CONTROL_INTEN);
-		mutex_enter(&sc->sc_mtx);
-		cv_signal(&sc->sc_cv);
+		cv_broadcast(&sc->sc_cv);
 		mutex_exit(&sc->sc_mtx);
-
 		return 1;	/* handled */
 	}
+	mutex_exit(&sc->sc_mtx);
 	return 0;
 }
 
@@ -195,6 +196,11 @@ gttwsi_acquire_bus(void *arg, int flags)
 	struct gttwsi_softc *sc = arg;
 
 	mutex_enter(&sc->sc_buslock);
+	while (sc->sc_inuse)
+		cv_wait(&sc->sc_cv, &sc->sc_buslock);
+	sc->sc_inuse = true;
+	mutex_exit(&sc->sc_buslock);
+
 	return 0;
 }
 
@@ -204,6 +210,9 @@ gttwsi_release_bus(void *arg, int flags)
 {
 	struct gttwsi_softc *sc = arg;
 
+	mutex_enter(&sc->sc_buslock);
+	sc->sc_inuse = false;
+	cv_broadcast(&sc->sc_cv);
 	mutex_exit(&sc->sc_buslock);
 }
 
@@ -213,12 +222,14 @@ gttwsi_send_start(void *v, int flags)
 	struct gttwsi_softc *sc = v;
 	int expect;
 
+	KASSERT(sc->sc_inuse);
+
 	if (sc->sc_started)
 		expect = STAT_RSCT;
 	else
 		expect = STAT_SCT;
 	sc->sc_started = true;
-	return gttwsi_wait(sc, CONTROL_START, expect, flags);
+	return gttwsi_wait(sc, CONTROL_START, expect, 0, flags);
 }
 
 static int
@@ -228,6 +239,8 @@ gttwsi_send_stop(void *v, int flags)
 	int retry = TWSI_RETRY_COUNT;
 	uint32_t control;
 
+	KASSERT(sc->sc_inuse);
+
 	sc->sc_started = false;
 
 	/* Interrupt is not generated for STAT_NRS. */
@@ -250,16 +263,23 @@ static int
 gttwsi_initiate_xfer(void *v, i2c_addr_t addr, int flags)
 {
 	struct gttwsi_softc *sc = v;
-	uint32_t data, expect;
+	uint32_t data, expect, alt;
 	int error, read;
 
-	gttwsi_send_start(v, flags);
+	KASSERT(sc->sc_inuse);
+
+	error = gttwsi_send_start(v, flags);
+	if (error)
+		return error;
 
 	read = (flags & I2C_F_READ) != 0;
-	if (read)
+	if (read) {
 		expect = STAT_ARBT_AR;
-	else
+		alt= STAT_ARBT_ANR;
+	} else {
 		expect = STAT_AWBT_AR;
+		alt= STAT_AWBT_ANR;
+	}
 
 	/*
 	 * First byte contains whether this xfer is a read or write.
@@ -272,23 +292,26 @@ gttwsi_initiate_xfer(void *v, i2c_addr_t
 		 */
 		data |= 0xf0 | ((addr & 0x300) >> 7);
 		gttwsi_write_4(sc, TWSI_DATA, data);

CVS commit: src/sbin/gpt

2018-10-14 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sun Oct 14 20:10:49 UTC 2018

Modified Files:
src/sbin/gpt: gpt.c

Log Message:
When changing entries skip those that do not match the -L option.
Should fix PR 53668.


To generate a diff of this commit:
cvs rdiff -u -r1.75 -r1.76 src/sbin/gpt/gpt.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/gpt/gpt.c
diff -u src/sbin/gpt/gpt.c:1.75 src/sbin/gpt/gpt.c:1.76
--- src/sbin/gpt/gpt.c:1.75	Tue Jul  3 03:41:23 2018
+++ src/sbin/gpt/gpt.c	Sun Oct 14 20:10:49 2018
@@ -35,7 +35,7 @@
 __FBSDID("$FreeBSD: src/sbin/gpt/gpt.c,v 1.16 2006/07/07 02:44:23 marcel Exp $");
 #endif
 #ifdef __RCSID
-__RCSID("$NetBSD: gpt.c,v 1.75 2018/07/03 03:41:23 jnemeth Exp $");
+__RCSID("$NetBSD: gpt.c,v 1.76 2018/10/14 20:10:49 mlelstv Exp $");
 #endif
 
 #include 
@@ -1043,7 +1043,7 @@ gpt_change_ent(gpt_t gpt, const struct g
 			utf16_to_utf8(ent->ent_name,
 			__arraycount(ent->ent_name),
 			utfbuf, __arraycount(utfbuf));
-			if (strcmp((char *)find->label, (char *)utfbuf) == 0)
+			if (strcmp((char *)find->label, (char *)utfbuf) != 0)
 continue;
 		}
 



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

2018-10-14 Thread Aymeric Vincent
Module Name:src
Committed By:   aymeric
Date:   Sun Oct 14 19:01:00 UTC 2018

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

Log Message:
Remove comment that the peripherals clock should be half of the cpu clock.
NFC


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/arm/cortex/a9tmr.c

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

Modified files:

Index: src/sys/arch/arm/cortex/a9tmr.c
diff -u src/sys/arch/arm/cortex/a9tmr.c:1.16 src/sys/arch/arm/cortex/a9tmr.c:1.17
--- src/sys/arch/arm/cortex/a9tmr.c:1.16	Wed Jun 20 05:01:39 2018
+++ src/sys/arch/arm/cortex/a9tmr.c	Sun Oct 14 19:01:00 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: a9tmr.c,v 1.16 2018/06/20 05:01:39 hkenken Exp $	*/
+/*	$NetBSD: a9tmr.c,v 1.17 2018/10/14 19:01:00 aymeric Exp $	*/
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: a9tmr.c,v 1.16 2018/06/20 05:01:39 hkenken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: a9tmr.c,v 1.17 2018/10/14 19:01:00 aymeric Exp $");
 
 #include 
 #include 
@@ -121,7 +121,7 @@ a9tmr_attach(device_t parent, device_t s
 	const char *cpu_type;
 
 	/*
-	 * This runs at the ARM PERIPHCLOCK which should be 1/2 of the CPU clock.
+	 * This runs at the ARM PERIPHCLOCK.
 	 * The MD code should have setup our frequency for us.
 	 */
 	if (!prop_dictionary_get_uint32(dict, "frequency", &sc->sc_freq)) {



CVS commit: src/sys/arch

2018-10-14 Thread Aymeric Vincent
Module Name:src
Committed By:   aymeric
Date:   Sun Oct 14 18:58:44 UTC 2018

Modified Files:
src/sys/arch/arm/altera: cycv_platform.c
src/sys/arch/evbarm/conf: mk.altera

Log Message:
Make the DE0 NanoSoC work also in big-endian mode


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/altera/cycv_platform.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/evbarm/conf/mk.altera

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

Modified files:

Index: src/sys/arch/arm/altera/cycv_platform.c
diff -u src/sys/arch/arm/altera/cycv_platform.c:1.1 src/sys/arch/arm/altera/cycv_platform.c:1.2
--- src/sys/arch/arm/altera/cycv_platform.c:1.1	Wed Sep 19 17:31:38 2018
+++ src/sys/arch/arm/altera/cycv_platform.c	Sun Oct 14 18:58:44 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: cycv_platform.c,v 1.1 2018/09/19 17:31:38 aymeric Exp $ */
+/* $NetBSD: cycv_platform.c,v 1.2 2018/10/14 18:58:44 aymeric Exp $ */
 
 /* This file is in the public domain. */
 
@@ -6,7 +6,7 @@
 #include "opt_multiprocessor.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cycv_platform.c,v 1.1 2018/09/19 17:31:38 aymeric Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cycv_platform.c,v 1.2 2018/10/14 18:58:44 aymeric Exp $");
 
 #define	_ARM32_BUS_DMA_PRIVATE
 #include 
@@ -71,7 +71,7 @@ cycv_platform_bootstrap(void) {
 	 * stored very low in RAM so we can't re-map the Boot ROM easily.
 	 */
 
-	*(volatile uint32_t *) 0x0 = 0xea00 | ((startfunc - 8 - 0x0) >> 2);
+	*(volatile uint32_t *) 0x0 = htole32(0xea00 | ((startfunc - 8 - 0x0) >> 2));
 
 	arm_cpu_max = 2;
 
@@ -97,10 +97,10 @@ cycv_platform_early_putchar(char c) {
 #define CONSADDR_VA (CONSADDR - CYCV_PERIPHERAL_BASE + CYCV_PERIPHERAL_VBASE)
 	volatile uint32_t *uartaddr = (volatile uint32_t *) CONSADDR_VA;
 
-	while ((uartaddr[com_lsr] & LSR_TXRDY) == 0)
+	while ((le32toh(uartaddr[com_lsr]) & LSR_TXRDY) == 0)
 		;
 
-	uartaddr[com_data] = c;
+	uartaddr[com_data] = htole32(c);
 #endif
 }
 

Index: src/sys/arch/evbarm/conf/mk.altera
diff -u src/sys/arch/evbarm/conf/mk.altera:1.1 src/sys/arch/evbarm/conf/mk.altera:1.2
--- src/sys/arch/evbarm/conf/mk.altera:1.1	Wed Sep 19 17:31:39 2018
+++ src/sys/arch/evbarm/conf/mk.altera	Sun Oct 14 18:58:44 2018
@@ -1,4 +1,9 @@
-#	$NetBSD: mk.altera,v 1.1 2018/09/19 17:31:39 aymeric Exp $
+#	$NetBSD: mk.altera,v 1.2 2018/10/14 18:58:44 aymeric Exp $
+
+.if !empty(MACHINE_ARCH:M*eb)
+EXTRA_LINKFLAGS+=	--be8
+.endif
+
 CPPFLAGS+=		-mcpu=cortex-a9 -mfpu=neon
 
 SYSTEM_FIRST_OBJ=	altera_start.o



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

2018-10-14 Thread Aymeric Vincent
Module Name:src
Committed By:   aymeric
Date:   Sun Oct 14 18:56:39 UTC 2018

Modified Files:
src/sys/arch/evbarm/conf: NANOSOC

Log Message:
Attach dwcwdt


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/evbarm/conf/NANOSOC

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/evbarm/conf/NANOSOC
diff -u src/sys/arch/evbarm/conf/NANOSOC:1.1 src/sys/arch/evbarm/conf/NANOSOC:1.2
--- src/sys/arch/evbarm/conf/NANOSOC:1.1	Wed Sep 19 17:31:39 2018
+++ src/sys/arch/evbarm/conf/NANOSOC	Sun Oct 14 18:56:39 2018
@@ -1,5 +1,5 @@
 #
-#	$NetBSD: NANOSOC,v 1.1 2018/09/19 17:31:39 aymeric Exp $
+#	$NetBSD: NANOSOC,v 1.2 2018/10/14 18:56:39 aymeric Exp $
 #
 #	Altera DE0 Nano SoC
 #
@@ -58,6 +58,8 @@ ld*		at sdmmc?
 dwctwo* 	at fdt?
 usb*		at dwctwo?
 
+dwcwdt* 	at fdt?
+
 include "dev/usb/usbdevices.config"
 
 no umidi



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

2018-10-14 Thread Aymeric Vincent
Module Name:src
Committed By:   aymeric
Date:   Sun Oct 14 18:55:41 UTC 2018

Modified Files:
src/sys/arch/arm/dts: socfpga_cyclone5_de0_sockit.dts

Log Message:
Add reset information for first watchdog timer


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/dts/socfpga_cyclone5_de0_sockit.dts

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

Modified files:

Index: src/sys/arch/arm/dts/socfpga_cyclone5_de0_sockit.dts
diff -u src/sys/arch/arm/dts/socfpga_cyclone5_de0_sockit.dts:1.1 src/sys/arch/arm/dts/socfpga_cyclone5_de0_sockit.dts:1.2
--- src/sys/arch/arm/dts/socfpga_cyclone5_de0_sockit.dts:1.1	Wed Sep 19 17:31:38 2018
+++ src/sys/arch/arm/dts/socfpga_cyclone5_de0_sockit.dts	Sun Oct 14 18:55:40 2018
@@ -13,5 +13,8 @@
 		usb@ffb4 {
 			dr_mode = "host";
 		};
+		watchdog@ffd02000 {
+			resets = <&rst L4WD0_RESET>;
+		};
 	};
 };



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

2018-10-14 Thread Aymeric Vincent
Module Name:src
Committed By:   aymeric
Date:   Sun Oct 14 18:53:01 UTC 2018

Modified Files:
src/sys/arch/arm/altera: cycv_rstmgr.c

Log Message:
Fix off-by-one when computing reset register address


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/altera/cycv_rstmgr.c

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

Modified files:

Index: src/sys/arch/arm/altera/cycv_rstmgr.c
diff -u src/sys/arch/arm/altera/cycv_rstmgr.c:1.1 src/sys/arch/arm/altera/cycv_rstmgr.c:1.2
--- src/sys/arch/arm/altera/cycv_rstmgr.c:1.1	Wed Sep 19 17:31:38 2018
+++ src/sys/arch/arm/altera/cycv_rstmgr.c	Sun Oct 14 18:53:01 2018
@@ -1,9 +1,9 @@
-/* $NetBSD: cycv_rstmgr.c,v 1.1 2018/09/19 17:31:38 aymeric Exp $ */
+/* $NetBSD: cycv_rstmgr.c,v 1.2 2018/10/14 18:53:01 aymeric Exp $ */
 
 /* This file is in the public domain. */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cycv_rstmgr.c,v 1.1 2018/09/19 17:31:38 aymeric Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cycv_rstmgr.c,v 1.2 2018/10/14 18:53:01 aymeric Exp $");
 
 #include 
 #include 
@@ -98,11 +98,11 @@ cycv_rst_acquire(device_t dev, const voi
 
 	value = of_decode_int(data);
 	if (value < 0 || value >
-	(CYCV_RSTMGR_MISCMODRST - CYCV_RSTMGR_PERMODRST + 4) / 4 * 32)
+	(CYCV_RSTMGR_MISCMODRST - CYCV_RSTMGR_MPUMODRST + 4) / 4 * 32)
 		goto err_decode;
 
 	reset = kmem_alloc(sizeof *reset, KM_SLEEP);
-	reset->address = CYCV_RSTMGR_PERMODRST + value / 32 * 4;
+	reset->address = CYCV_RSTMGR_MPUMODRST + value / 32 * 4;
 	reset->mask = 1 << (value % 32);
 
 	if (0) {



CVS commit: src/doc

2018-10-14 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Sun Oct 14 18:50:07 UTC 2018

Removed Files:
src/doc: TODO.kqueue

Log Message:
g/c, not really relevant


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r0 src/doc/TODO.kqueue

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



CVS commit: src/doc

2018-10-14 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Sun Oct 14 18:37:47 UTC 2018

Removed Files:
src/doc: TODO.8

Log Message:
netbsd-8 already branched


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r0 src/doc/TODO.8

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



CVS commit: src/sys/dev/fdt

2018-10-14 Thread Aymeric Vincent
Module Name:src
Committed By:   aymeric
Date:   Sun Oct 14 18:28:55 UTC 2018

Modified Files:
src/sys/dev/fdt: dwcwdt_fdt.c

Log Message:
Make compile


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/fdt/dwcwdt_fdt.c

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

Modified files:

Index: src/sys/dev/fdt/dwcwdt_fdt.c
diff -u src/sys/dev/fdt/dwcwdt_fdt.c:1.1 src/sys/dev/fdt/dwcwdt_fdt.c:1.2
--- src/sys/dev/fdt/dwcwdt_fdt.c:1.1	Sat Jun 30 10:50:30 2018
+++ src/sys/dev/fdt/dwcwdt_fdt.c	Sun Oct 14 18:28:55 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: dwcwdt_fdt.c,v 1.1 2018/06/30 10:50:30 jmcneill Exp $ */
+/* $NetBSD: dwcwdt_fdt.c,v 1.2 2018/10/14 18:28:55 aymeric Exp $ */
 
 /*-
  * Copyright (c) 2018 Jared McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: dwcwdt_fdt.c,v 1.1 2018/06/30 10:50:30 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dwcwdt_fdt.c,v 1.2 2018/10/14 18:28:55 aymeric Exp $");
 
 #include 
 #include 
@@ -61,7 +61,7 @@ __KERNEL_RCSID(0, "$NetBSD: dwcwdt_fdt.c
 #define	WDT_EOI0x14
 #define	 WDT_EOI_WDT_INT_CLR		__BIT(0)
 
-static const uint8_t wdt_torr[] = {
+static const uint32_t wdt_torr[] = {
 	0x,
 	0x0001,
 	0x0003,



CVS commit: src/share/man/man9

2018-10-14 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Sun Oct 14 17:40:28 UTC 2018

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

Log Message:
remove M_CANFAIL from list of supported flags for malloc(9)


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 src/share/man/man9/malloc.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/malloc.9
diff -u src/share/man/man9/malloc.9:1.54 src/share/man/man9/malloc.9:1.55
--- src/share/man/man9/malloc.9:1.54	Mon Jul  3 21:28:48 2017
+++ src/share/man/man9/malloc.9	Sun Oct 14 17:40:28 2018
@@ -1,4 +1,4 @@
-.\"	$NetBSD: malloc.9,v 1.54 2017/07/03 21:28:48 wiz Exp $
+.\"	$NetBSD: malloc.9,v 1.55 2018/10/14 17:40:28 jdolecek Exp $
 .\"
 .\" Copyright (c) 1996, 2003 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 August 7, 2015
+.Dd October 14, 2018
 .Dt MALLOC 9
 .Os
 .Sh NAME
@@ -126,7 +126,7 @@ The
 argument further qualifies
 .Fn malloc
 operational characteristics as follows:
-.Bl -tag -offset indent -width M_CANFAIL
+.Bl -tag -offset indent -width M_NOWAIT
 .It Dv M_NOWAIT
 Causes
 .Fn malloc
@@ -153,22 +153,6 @@ is conveniently defined to be 0, and hen
 argument to indicate that it's ok to wait for resources.
 .It Dv M_ZERO
 Causes the allocated memory to be set to all zeros.
-.It Dv M_CANFAIL
-Changes behaviour for
-.Dv M_WAITOK
-case - if the requested memory size is bigger than
-.Fn malloc
-can ever allocate, return failure, rather than calling
-.Xr panic 9 .
-This is different to M_NOWAIT, since
-the call can still wait for resources.
-.Pp
-Rather than depending on
-.Dv M_CANFAIL ,
-kernel code should do proper bound checking itself.
-This flag should only be used in cases where this is not feasible.
-Since it can hide real kernel bugs, its usage is
-.Em strongly discouraged .
 .El
 .Pp
 The



CVS commit: src

2018-10-14 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Sun Oct 14 17:37:40 UTC 2018

Modified Files:
src/common/lib/libprop: prop_kern.c
src/sys/arch/x86/x86: ipmi.c
src/sys/dev/ata: TODO.ncq
src/sys/dev/pci: mpii.c
src/sys/dev/sdmmc: sbt.c sdmmc_io.c
src/sys/fs/udf: udf_allocation.c udf_subr.c
src/sys/kern: kern_sysctl.c
src/sys/miscfs/procfs: procfs_vnops.c
src/sys/sys: malloc.h

Log Message:
remove M_CANFAIL flag for malloc(9) - it was completely ignored, so had
actually no effect


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/common/lib/libprop/prop_kern.c
cvs rdiff -u -r1.66 -r1.67 src/sys/arch/x86/x86/ipmi.c
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/ata/TODO.ncq
cvs rdiff -u -r1.11 -r1.12 src/sys/dev/pci/mpii.c
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/sdmmc/sbt.c
cvs rdiff -u -r1.13 -r1.14 src/sys/dev/sdmmc/sdmmc_io.c
cvs rdiff -u -r1.39 -r1.40 src/sys/fs/udf/udf_allocation.c
cvs rdiff -u -r1.143 -r1.144 src/sys/fs/udf/udf_subr.c
cvs rdiff -u -r1.261 -r1.262 src/sys/kern/kern_sysctl.c
cvs rdiff -u -r1.204 -r1.205 src/sys/miscfs/procfs/procfs_vnops.c
cvs rdiff -u -r1.116 -r1.117 src/sys/sys/malloc.h

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

Modified files:

Index: src/common/lib/libprop/prop_kern.c
diff -u src/common/lib/libprop/prop_kern.c:1.23 src/common/lib/libprop/prop_kern.c:1.24
--- src/common/lib/libprop/prop_kern.c:1.23	Sun Jan 29 02:29:06 2017
+++ src/common/lib/libprop/prop_kern.c	Sun Oct 14 17:37:40 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: prop_kern.c,v 1.23 2017/01/29 02:29:06 christos Exp $	*/
+/*	$NetBSD: prop_kern.c,v 1.24 2018/10/14 17:37:40 jdolecek Exp $	*/
 
 /*-
  * Copyright (c) 2006, 2009 The NetBSD Foundation, Inc.
@@ -412,10 +412,8 @@ _prop_object_copyin(const struct plistre
 
 	/*
 	 * Allocate an extra byte so we can guarantee NUL-termination.
-	 *
-	 * Allow malloc to fail in case pmap would be exhausted.
 	 */
-	buf = malloc(pref->pref_len + 1, M_TEMP, M_WAITOK | M_CANFAIL);
+	buf = malloc(pref->pref_len + 1, M_TEMP, M_WAITOK);
 	if (buf == NULL)
 		return (ENOMEM);
 	error = copyin(pref->pref_plist, buf, pref->pref_len);

Index: src/sys/arch/x86/x86/ipmi.c
diff -u src/sys/arch/x86/x86/ipmi.c:1.66 src/sys/arch/x86/x86/ipmi.c:1.67
--- src/sys/arch/x86/x86/ipmi.c:1.66	Thu Jun 22 13:32:47 2017
+++ src/sys/arch/x86/x86/ipmi.c	Sun Oct 14 17:37:40 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: ipmi.c,v 1.66 2017/06/22 13:32:47 joerg Exp $ */
+/*	$NetBSD: ipmi.c,v 1.67 2018/10/14 17:37:40 jdolecek Exp $ */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -52,7 +52,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ipmi.c,v 1.66 2017/06/22 13:32:47 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ipmi.c,v 1.67 2018/10/14 17:37:40 jdolecek Exp $");
 
 #include 
 #include 
@@ -1204,7 +1204,7 @@ get_sdr(struct ipmi_softc *sc, uint16_t 
 	/* Allocate space for entire SDR Length of SDR in header does not
 	 * include header length */
 	sdrlen = sizeof(shdr) + shdr.record_length;
-	psdr = malloc(sdrlen, M_DEVBUF, M_WAITOK|M_CANFAIL);
+	psdr = malloc(sdrlen, M_DEVBUF, M_WAITOK);
 	if (psdr == NULL)
 		return -1;
 
@@ -1832,7 +1832,7 @@ add_child_sensors(struct ipmi_softc *sc,
 	sc->sc_nsensors += count;
 	for (idx = 0; idx < count; idx++) {
 		psensor = malloc(sizeof(struct ipmi_sensor), M_DEVBUF,
-		M_WAITOK|M_CANFAIL);
+		M_WAITOK);
 		if (psensor == NULL)
 			break;
 

Index: src/sys/dev/ata/TODO.ncq
diff -u src/sys/dev/ata/TODO.ncq:1.4 src/sys/dev/ata/TODO.ncq:1.5
--- src/sys/dev/ata/TODO.ncq:1.4	Fri Aug 31 18:44:04 2018
+++ src/sys/dev/ata/TODO.ncq	Sun Oct 14 17:37:40 2018
@@ -36,5 +36,3 @@ mvsata - move pci-specific code to the p
 
 mvsata(4) 64-bit DMA
 - at least with AHA1430SA does not really work, crash in mvsata_intr() on boot
-
-malloc(M_CANFAIL) actually doesn't do anything

Index: src/sys/dev/pci/mpii.c
diff -u src/sys/dev/pci/mpii.c:1.11 src/sys/dev/pci/mpii.c:1.12
--- src/sys/dev/pci/mpii.c:1.11	Mon Jan 15 12:58:06 2018
+++ src/sys/dev/pci/mpii.c	Sun Oct 14 17:37:40 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: mpii.c,v 1.11 2018/01/15 12:58:06 maya Exp $ */
+/* $NetBSD: mpii.c,v 1.12 2018/10/14 17:37:40 jdolecek Exp $ */
 /*	OpenBSD: mpii.c,v 1.51 2012/04/11 13:29:14 naddy Exp 	*/
 /*
  * Copyright (c) 2010 Mike Belopuhov 
@@ -20,7 +20,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: mpii.c,v 1.11 2018/01/15 12:58:06 maya Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mpii.c,v 1.12 2018/10/14 17:37:40 jdolecek Exp $");
 
 #include "bio.h"
 
@@ -4905,7 +4905,7 @@ mpii_ioctl_cache(struct scsi_link *link,
 		return (EINVAL);
 
 	pagelen = hdr.page_length * 4;
-	vpg = malloc(pagelen, M_TEMP, M_WAITOK | M_CANFAIL | M_ZERO);
+	vpg = malloc(pagelen, M_TEMP, M_WAITOK | M_ZERO);
 	if (vpg == NULL)
 		return (ENOMEM);
 
@@ -5131,7 +5131,7 @@ mpii_ioctl_vol(struct mpii_softc *sc, st
 	}
 
 	pagelen = hdr.page_length * 4;
-	vpg = malloc(pagelen, M_TEMP, M_WAITO

CVS commit: src/sys/external/bsd/drm2/nouveau

2018-10-14 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Oct 14 17:25:22 UTC 2018

Modified Files:
src/sys/external/bsd/drm2/nouveau: files.nouveau

Log Message:
Limit warning suppression to nouveau files.

Make this match what I have in my drmkms update.

Please don't touch files under sys/external/bsd/drm2 without
consulting me while I'm updating drmkms!


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/external/bsd/drm2/nouveau/files.nouveau

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

Modified files:

Index: src/sys/external/bsd/drm2/nouveau/files.nouveau
diff -u src/sys/external/bsd/drm2/nouveau/files.nouveau:1.22 src/sys/external/bsd/drm2/nouveau/files.nouveau:1.23
--- src/sys/external/bsd/drm2/nouveau/files.nouveau:1.22	Fri Oct 12 01:16:20 2018
+++ src/sys/external/bsd/drm2/nouveau/files.nouveau	Sun Oct 14 17:25:21 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: files.nouveau,v 1.22 2018/10/12 01:16:20 christos Exp $
+#	$NetBSD: files.nouveau,v 1.23 2018/10/14 17:25:21 riastradh Exp $
 
 version	20180827
 
@@ -27,7 +27,7 @@ makeoptions	nouveau	CPPFLAGS+="-DCONFIG_
 
 makeoptions	nouveau	"CWARNFLAGS.nouveau"+="-Wno-missing-field-initializers"
 makeoptions	nouveau	"CWARNFLAGS.nouveau"+="-Wno-shadow"
-makeoptions	nouveau	"CWARNFLAGS.clang"+="-Wno-gnu-variable-sized-type-not-at-end"
+makeoptions	nouveau	"CWARNFLAGS.nouveau"+="${${ACTIVE_CC} == clang:? -Wno-error=gnu-variable-sized-type-not-at-end :}"
 
 file	external/bsd/drm2/nouveau/nouveau_module.c	nouveau
 



CVS commit: [jdolecek-ncqfixes] src/sys/dev/ata

2018-10-14 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Sun Oct 14 16:13:51 UTC 2018

Modified Files:
src/sys/dev/ata [jdolecek-ncqfixes]: ata.c

Log Message:
add comment to kthread_create() call to explain why atabus_thread is actually
running under KERNEL_LOCK()


To generate a diff of this commit:
cvs rdiff -u -r1.141.6.16 -r1.141.6.17 src/sys/dev/ata/ata.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/ata/ata.c
diff -u src/sys/dev/ata/ata.c:1.141.6.16 src/sys/dev/ata/ata.c:1.141.6.17
--- src/sys/dev/ata/ata.c:1.141.6.16	Thu Oct 11 20:57:51 2018
+++ src/sys/dev/ata/ata.c	Sun Oct 14 16:13:51 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: ata.c,v 1.141.6.16 2018/10/11 20:57:51 jdolecek Exp $	*/
+/*	$NetBSD: ata.c,v 1.141.6.17 2018/10/14 16:13:51 jdolecek Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Manuel Bouyer.  All rights reserved.
@@ -25,7 +25,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ata.c,v 1.141.6.16 2018/10/11 20:57:51 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ata.c,v 1.141.6.17 2018/10/14 16:13:51 jdolecek Exp $");
 
 #include "opt_ata.h"
 
@@ -593,6 +593,7 @@ atabus_attach(device_t parent, device_t 
 	mutex_exit(&atabus_qlock);
 	config_pending_incr(sc->sc_dev);
 
+	/* XXX MPSAFE - no KTHREAD_MPSAFE, so protected by KERNEL_LOCK() */
 	if ((error = kthread_create(PRI_NONE, 0, NULL, atabus_thread, sc,
 	&chp->ch_thread, "%s", device_xname(self))) != 0)
 		aprint_error_dev(self,



CVS commit: [jdolecek-ncqfixes] src/sys/dev

2018-10-14 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Sun Oct 14 14:50:55 UTC 2018

Modified Files:
src/sys/dev/ata [jdolecek-ncqfixes]: TODO.ncq
src/sys/dev/ic [jdolecek-ncqfixes]: mvsata.c

Log Message:
adjust mvsata_bio_intr() so it recognizes the 'tfd' parameter as passed
by recovery and hence works; use it also for passing state from
mvsata_edma_handle()


To generate a diff of this commit:
cvs rdiff -u -r1.4.2.13 -r1.4.2.14 src/sys/dev/ata/TODO.ncq
cvs rdiff -u -r1.41.2.9 -r1.41.2.10 src/sys/dev/ic/mvsata.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/ata/TODO.ncq
diff -u src/sys/dev/ata/TODO.ncq:1.4.2.13 src/sys/dev/ata/TODO.ncq:1.4.2.14
--- src/sys/dev/ata/TODO.ncq:1.4.2.13	Thu Oct 11 20:57:51 2018
+++ src/sys/dev/ata/TODO.ncq	Sun Oct 14 14:50:54 2018
@@ -4,8 +4,6 @@ jdolecek-ncqfixes goals:
 - run recovery via atathread, move to new function and share ahci/siisata/mvsata
 - maybe do device error handling in not-interrupt-context (maybe this should be
   done on a mpata branch?)
-- adjust mvsata() intr code to accept tfd (instead of irq 0/1) so that
-  ata_recovery_resume() works properly for it
 
 Bugs
 

Index: src/sys/dev/ic/mvsata.c
diff -u src/sys/dev/ic/mvsata.c:1.41.2.9 src/sys/dev/ic/mvsata.c:1.41.2.10
--- src/sys/dev/ic/mvsata.c:1.41.2.9	Sat Oct 13 09:31:46 2018
+++ src/sys/dev/ic/mvsata.c	Sun Oct 14 14:50:55 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: mvsata.c,v 1.41.2.9 2018/10/13 09:31:46 jdolecek Exp $	*/
+/*	$NetBSD: mvsata.c,v 1.41.2.10 2018/10/14 14:50:55 jdolecek Exp $	*/
 /*
  * Copyright (c) 2008 KIYOHARA Takashi
  * All rights reserved.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: mvsata.c,v 1.41.2.9 2018/10/13 09:31:46 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mvsata.c,v 1.41.2.10 2018/10/14 14:50:55 jdolecek Exp $");
 
 #include "opt_mvsata.h"
 
@@ -549,7 +549,7 @@ static void
 mvsata_channel_recover(struct mvsata_port *mvport)
 {
 	struct ata_channel *chp = &mvport->port_ata_channel;
-	int drive, tfd = 1;
+	int drive, tfd = ATACH_ERR_ST(0, WDCS_ERR);
 
 	ata_channel_lock(chp);
 	KASSERT(!ISSET(chp->ch_flags, ATACH_RECOVERING));
@@ -571,16 +571,6 @@ mvsata_channel_recover(struct mvsata_por
 	 * as if nothing happened.
 	 */
 
-#if 0
-	XXX recheck - mvsata used to have this to handle the successful
-	recovery via read_log_ext:
-
-			xfer = ata_queue_hwslot_to_xfer(chp, eslot);
-			xfer->c_flags |= C_RECOVERED;
-			xfer->c_bio.error = ERROR;
-			xfer->c_bio.r_error = err;
-			xfer->ops->c_intr(chp, xfer, 1);
-#endif
 	ata_recovery_resume(chp, drive, tfd, AT_POLL);
 
 	/* Drive unblocked, back to normal operation */
@@ -1244,6 +1234,11 @@ do_pio:
 	}
 
 intr:
+	KASSERTMSG(((xfer->c_flags & C_DMA) != 0)
+		== (mvport->port_edmamode_curr != nodma),
+		"DMA mode mismatch: flags %x vs edmamode %d != %d",
+		xfer->c_flags, mvport->port_edmamode_curr, nodma); 
+
 	/* Wait for IRQ (either real or polled) */
 	if ((ata_bio->flags & ATA_POLL) != 0)
 		return ATASTART_POLL;
@@ -1279,20 +1274,35 @@ mvsata_bio_poll(struct ata_channel *chp,
 }
 
 static int
-mvsata_bio_intr(struct ata_channel *chp, struct ata_xfer *xfer, int irq)
+mvsata_bio_intr(struct ata_channel *chp, struct ata_xfer *xfer, int intr_arg)
 {
 	struct atac_softc *atac = chp->ch_atac;
 	struct wdc_softc *wdc = CHAN_TO_WDC(chp);
 	struct ata_bio *ata_bio = &xfer->c_bio;
 	struct ata_drive_datas *drvp = &chp->ch_drive[xfer->c_drive];
-	int tfd;
+	int irq = ISSET(xfer->c_flags, (C_POLL|C_TIMEOU)) ? 0 : 1;
+	int tfd = 0;
+
+	if (ISSET(xfer->c_flags, C_DMA|C_RECOVERED) && irq) {
+		/* Invoked via mvsata_edma_handle() or recovery */
+		tfd = intr_arg;
+
+		if (tfd > 0 && ata_bio->error == NOERROR) {
+			if (ATACH_ST(tfd) & WDCS_ERR)
+ata_bio->error = ERROR;
+			if (ATACH_ST(tfd) & WDCS_BSY)
+ata_bio->error = TIMEOUT;
+			ata_bio->r_error = ATACH_ERR(tfd);
+		}
+	}
 
 	DPRINTF(DEBUG_FUNCS|DEBUG_XFERS, ("%s:%d: %s: drive=%d\n",
 	device_xname(atac->atac_dev), chp->ch_channel, __func__,
 	xfer->c_drive));
 
-	if (xfer->c_flags & C_TIMEOU && !irq) {
-		/* Cleanup EDMA if invoked from timeout handler */
+	/* Cleanup EDMA if invoked from wdctimeout()/ata_timeout() */
+	if (ISSET(xfer->c_flags, C_TIMEOU) && ISSET(xfer->c_flags, C_DMA)
+	&& !ISSET(xfer->c_flags, C_POLL)) {
 		mvsata_edma_rqq_remove((struct mvsata_port *)chp, xfer);
 	}
 
@@ -2814,17 +2824,14 @@ mvsata_edma_handle(struct mvsata_port *m
 
 		ata_bio = &xfer->c_bio;
 		ata_bio->error = NOERROR;
-		ata_bio->r_error = 0;
-		if (st & WDCS_ERR)
-			ata_bio->error = ERROR;
-		if (st & WDCS_BSY)
-			ata_bio->error = TIMEOUT;
 		if (dmaerr != 0)
 			ata_bio->error = ERR_DMA;
 
 		mvsata_dma_bufunload(mvport, quetag, ata_bio->flags);
 
-		mvsata_bio_intr(chp, xfer, 1);
+		KASSERT(xfer->c_flags & C_DMA);
+		mvsata_bio_intr(chp, xfer, ATACH_ERR_ST(0, st));
+
 		if (xfer1 == NULL)
 			handled++;
 		else if (xfer == xfer1) {

CVS commit: src/sys/arch

2018-10-14 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Oct 14 14:31:05 UTC 2018

Modified Files:
src/sys/arch/aarch64/aarch64: aarch64_machdep.c cpu.c pmap.c
src/sys/arch/arm/arm32: arm32_boot.c arm32_kvminit.c arm32_machdep.c
pmap.c
src/sys/arch/evbarm/fdt: fdt_machdep.c

Log Message:
Use __nothing


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/aarch64/aarch64/aarch64_machdep.c
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/aarch64/aarch64/cpu.c
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/aarch64/aarch64/pmap.c
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/arm/arm32/arm32_boot.c
cvs rdiff -u -r1.44 -r1.45 src/sys/arch/arm/arm32/arm32_kvminit.c
cvs rdiff -u -r1.121 -r1.122 src/sys/arch/arm/arm32/arm32_machdep.c
cvs rdiff -u -r1.368 -r1.369 src/sys/arch/arm/arm32/pmap.c
cvs rdiff -u -r1.42 -r1.43 src/sys/arch/evbarm/fdt/fdt_machdep.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/aarch64/aarch64/aarch64_machdep.c
diff -u src/sys/arch/aarch64/aarch64/aarch64_machdep.c:1.14 src/sys/arch/aarch64/aarch64/aarch64_machdep.c:1.15
--- src/sys/arch/aarch64/aarch64/aarch64_machdep.c:1.14	Sat Oct 13 08:32:36 2018
+++ src/sys/arch/aarch64/aarch64/aarch64_machdep.c	Sun Oct 14 14:31:05 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: aarch64_machdep.c,v 1.14 2018/10/13 08:32:36 ryo Exp $ */
+/* $NetBSD: aarch64_machdep.c,v 1.15 2018/10/14 14:31:05 skrll Exp $ */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(1, "$NetBSD: aarch64_machdep.c,v 1.14 2018/10/13 08:32:36 ryo Exp $");
+__KERNEL_RCSID(1, "$NetBSD: aarch64_machdep.c,v 1.15 2018/10/14 14:31:05 skrll Exp $");
 
 #include "opt_arm_debug.h"
 #include "opt_ddb.h"
@@ -69,7 +69,7 @@ __KERNEL_RCSID(1, "$NetBSD: aarch64_mach
 #ifdef VERBOSE_INIT_ARM
 #define VPRINTF(...)	printf(__VA_ARGS__)
 #else
-#define VPRINTF(...)	do { } while (/* CONSTCOND */ 0)
+#define VPRINTF(...)	__nothing
 #endif
 
 char cpu_model[32];

Index: src/sys/arch/aarch64/aarch64/cpu.c
diff -u src/sys/arch/aarch64/aarch64/cpu.c:1.11 src/sys/arch/aarch64/aarch64/cpu.c:1.12
--- src/sys/arch/aarch64/aarch64/cpu.c:1.11	Thu Oct  4 07:36:10 2018
+++ src/sys/arch/aarch64/aarch64/cpu.c	Sun Oct 14 14:31:05 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.c,v 1.11 2018/10/04 07:36:10 ryo Exp $ */
+/* $NetBSD: cpu.c,v 1.12 2018/10/14 14:31:05 skrll Exp $ */
 
 /*
  * Copyright (c) 2017 Ryo Shimizu 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(1, "$NetBSD: cpu.c,v 1.11 2018/10/04 07:36:10 ryo Exp $");
+__KERNEL_RCSID(1, "$NetBSD: cpu.c,v 1.12 2018/10/14 14:31:05 skrll Exp $");
 
 #include "locators.h"
 #include "opt_arm_debug.h"
@@ -53,7 +53,7 @@ __KERNEL_RCSID(1, "$NetBSD: cpu.c,v 1.11
 #ifdef VERBOSE_INIT_ARM
 #define VPRINTF(...)	printf(__VA_ARGS__)
 #else
-#define VPRINTF(...)	do { } while (/* CONSTCOND */ 0)
+#define VPRINTF(...)	__nothing
 #endif
 
 void cpu_attach(device_t, cpuid_t);

Index: src/sys/arch/aarch64/aarch64/pmap.c
diff -u src/sys/arch/aarch64/aarch64/pmap.c:1.29 src/sys/arch/aarch64/aarch64/pmap.c:1.30
--- src/sys/arch/aarch64/aarch64/pmap.c:1.29	Fri Oct 12 01:28:57 2018
+++ src/sys/arch/aarch64/aarch64/pmap.c	Sun Oct 14 14:31:05 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.29 2018/10/12 01:28:57 ryo Exp $	*/
+/*	$NetBSD: pmap.c,v 1.30 2018/10/14 14:31:05 skrll Exp $	*/
 
 /*
  * Copyright (c) 2017 Ryo Shimizu 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.29 2018/10/12 01:28:57 ryo Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.30 2018/10/14 14:31:05 skrll Exp $");
 
 #include "opt_arm_debug.h"
 #include "opt_ddb.h"
@@ -55,7 +55,7 @@ __KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.2
 #ifdef VERBOSE_INIT_ARM
 #define VPRINTF(...)	printf(__VA_ARGS__)
 #else
-#define VPRINTF(...)	do { } while (/* CONSTCOND */ 0)
+#define VPRINTF(...)	__nothing
 #endif
 
 UVMHIST_DEFINE(pmaphist);

Index: src/sys/arch/arm/arm32/arm32_boot.c
diff -u src/sys/arch/arm/arm32/arm32_boot.c:1.22 src/sys/arch/arm/arm32/arm32_boot.c:1.23
--- src/sys/arch/arm/arm32/arm32_boot.c:1.22	Sun Sep 16 11:34:20 2018
+++ src/sys/arch/arm/arm32/arm32_boot.c	Sun Oct 14 14:31:05 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: arm32_boot.c,v 1.22 2018/09/16 11:34:20 skrll Exp $	*/
+/*	$NetBSD: arm32_boot.c,v 1.23 2018/10/14 14:31:05 skrll Exp $	*/
 
 /*
  * Copyright (c) 2002, 2003, 2005  Genetec Corporation.  All rights reserved.
@@ -122,7 +122,7 @@
  */
 
 #include 
-__KERNEL_RCSID(1, "$NetBSD: arm32_boot.c,v 1.22 2018/09/16 11:34:20 skrll Exp $");
+__KERNEL_RCSID(1, "$NetBSD: arm32_boot.c,v 1.23 2018/10/14 14:31:05 skrll Exp $");
 
 #include "opt_arm_debug.h"
 #include "opt_cputypes.h"
@@ -155,7 +155,7 @@ __KERNEL_RCSID(1, "$NetBSD: arm32_boot.c
 #ifdef VERBOSE_INIT_ARM
 #define VPRINTF(...)	printf(__VA_ARGS__)
 #else
-#define VPRINTF(...)	do { } while (/* CONSTCOND */ 0)
+#define VPRINTF(...)	__nothing
 #endif
 
 #ifdef MULTI

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

2018-10-14 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Oct 14 14:09:53 UTC 2018

Modified Files:
src/sys/arch/arm/sunxi: sunxi_emac.c

Log Message:
Make debug code compile again


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/arm/sunxi/sunxi_emac.c

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

Modified files:

Index: src/sys/arch/arm/sunxi/sunxi_emac.c
diff -u src/sys/arch/arm/sunxi/sunxi_emac.c:1.17 src/sys/arch/arm/sunxi/sunxi_emac.c:1.18
--- src/sys/arch/arm/sunxi/sunxi_emac.c:1.17	Thu Jul 19 19:52:00 2018
+++ src/sys/arch/arm/sunxi/sunxi_emac.c	Sun Oct 14 14:09:53 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: sunxi_emac.c,v 1.17 2018/07/19 19:52:00 jmcneill Exp $ */
+/* $NetBSD: sunxi_emac.c,v 1.18 2018/10/14 14:09:53 martin Exp $ */
 
 /*-
  * Copyright (c) 2016-2017 Jared McNeill 
@@ -33,7 +33,7 @@
 #include "opt_net_mpsafe.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sunxi_emac.c,v 1.17 2018/07/19 19:52:00 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sunxi_emac.c,v 1.18 2018/10/14 14:09:53 martin Exp $");
 
 #include 
 #include 
@@ -1123,7 +1123,7 @@ sunxi_emac_dump_regs(struct sunxi_emac_s
 	u_int n;
 
 	for (n = 0; n < __arraycount(regs); n++)
-		device_printf(dev, "  %-20s %08x\n", regs[n].name,
+		device_printf(sc->dev, "  %-20s %08x\n", regs[n].name,
 		RD4(sc, regs[n].reg));
 }
 #endif



CVS commit: src

2018-10-14 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Oct 14 13:36:33 UTC 2018

Modified Files:
src/distrib/sets/lists/base: ad.aarch64
src/distrib/sets/lists/debug: ad.aarch64
src/external/bsd/acpica/bin/iasl: Makefile
src/usr.sbin/acpitools/acpidump: Makefile
src/usr.sbin/acpitools/amldb: Makefile

Log Message:
Add acpidump, amldb, and iasl to aarch64 build.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/distrib/sets/lists/base/ad.aarch64
cvs rdiff -u -r1.29 -r1.30 src/distrib/sets/lists/debug/ad.aarch64
cvs rdiff -u -r1.21 -r1.22 src/external/bsd/acpica/bin/iasl/Makefile
cvs rdiff -u -r1.6 -r1.7 src/usr.sbin/acpitools/acpidump/Makefile
cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/acpitools/amldb/Makefile

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

Modified files:

Index: src/distrib/sets/lists/base/ad.aarch64
diff -u src/distrib/sets/lists/base/ad.aarch64:1.30 src/distrib/sets/lists/base/ad.aarch64:1.31
--- src/distrib/sets/lists/base/ad.aarch64:1.30	Sat Aug 25 00:07:09 2018
+++ src/distrib/sets/lists/base/ad.aarch64	Sun Oct 14 13:36:32 2018
@@ -1,4 +1,4 @@
-# $NetBSD: ad.aarch64,v 1.30 2018/08/25 00:07:09 jmcneill Exp $
+# $NetBSD: ad.aarch64,v 1.31 2018/10/14 13:36:32 jmcneill Exp $
 ./lib/eabi	base-compat-lib		compat,llvm
 ./lib/eabi/npf	base-compat-lib		compat,llvm
 ./lib/eabihf	base-compat-lib		compat,llvm
@@ -8,6 +8,7 @@
 ./libexec/ld.elf_so-eabi			base-compat-shlib	compat,pic,llvm
 ./libexec/ld.elf_so-eabihf			base-compat-shlib	compat,pic,llvm
 ./libexec/ld.elf_so-oabi			base-sysutil-bin	compat,pic,llvm
+./usr/bin/iasl	base-util-bin
 ./usr/lib/eabi	base-compat-lib		compat,llvm
 ./usr/lib/eabi/i18nbase-compat-lib		compat,llvm
 ./usr/lib/eabi/libarm.so.0			base-compat-shlib	compat,pic,llvm
@@ -37,5 +38,7 @@
 ./usr/libexec/ld.elf_so-eabihf			base-compat-shlib	compat,pic,llvm
 ./usr/libexec/ld.elf_so-oabi			base-sysutil-bin	compat,pic,llvm
 ./usr/mdec/bootaa64.efibase-sysutil-bin
+./usr/sbin/acpidumpbase-sysutil-bin
+./usr/sbin/amldbbase-sysutil-bin
 ./usr/sbin/ofctlbase-sysutil-bin
 ./usr/sbin/tpctlbase-sysutil-bin

Index: src/distrib/sets/lists/debug/ad.aarch64
diff -u src/distrib/sets/lists/debug/ad.aarch64:1.29 src/distrib/sets/lists/debug/ad.aarch64:1.30
--- src/distrib/sets/lists/debug/ad.aarch64:1.29	Wed Jul 18 01:25:00 2018
+++ src/distrib/sets/lists/debug/ad.aarch64	Sun Oct 14 13:36:33 2018
@@ -1,4 +1,4 @@
-# $NetBSD: ad.aarch64,v 1.29 2018/07/18 01:25:00 christos Exp $
+# $NetBSD: ad.aarch64,v 1.30 2018/10/14 13:36:33 jmcneill Exp $
 ./usr/lib/eabi/libarm_g.a	comp-sys-debug	debuglib,compat,llvm
 ./usr/lib/eabi/libc_vfp_g.a	comp-sys-debug	debuglib,compat,llvm
 ./usr/lib/eabihf/libarm_g.a	comp-sys-debug	debuglib,compat,llvm
@@ -13,6 +13,7 @@
 ./usr/libdata/debug/libexec/ld.elf_so-eabi.debug		comp-sys-debug	debug,compat,llvm
 ./usr/libdata/debug/libexec/ld.elf_so-eabihf.debug		comp-sys-debug	debug,compat,llvm
 ./usr/libdata/debug/libexec/ld.elf_so-oabi.debug		comp-sys-debug	debug,compat,llvm
+./usr/libdata/debug/usr/bin/iasl.debugcomp-util-debug	debug
 ./usr/libdata/debug/usr/lib/eabicomp-sys-debug	compat,llvm
 ./usr/libdata/debug/usr/lib/eabi/i18ncomp-sys-debug	compat,llvm
 ./usr/libdata/debug/usr/lib/eabi/libarm.so.0.0.debug		comp-sys-debug	debug,compat,pic,llvm
@@ -27,5 +28,7 @@
 ./usr/libdata/debug/usr/libexec/ld.elf_so-eabi.debug		comp-sys-debug	debug,compat,llvm
 ./usr/libdata/debug/usr/libexec/ld.elf_so-eabihf.debug		comp-sys-debug	debug,compat,llvm
 ./usr/libdata/debug/usr/libexec/ld.elf_so-oabi.debug		comp-sys-debug	debug,compat,llvm
+./usr/libdata/debug/usr/sbin/acpidump.debug			comp-sysutil-debug	debug
+./usr/libdata/debug/usr/sbin/amldb.debug			comp-sysutil-debug	debug
 ./usr/libdata/debug/usr/sbin/ofctl.debug			comp-util-debug		debug
 ./usr/libdata/debug/usr/sbin/tpctl.debug			comp-sysutil-debug	debug

Index: src/external/bsd/acpica/bin/iasl/Makefile
diff -u src/external/bsd/acpica/bin/iasl/Makefile:1.21 src/external/bsd/acpica/bin/iasl/Makefile:1.22
--- src/external/bsd/acpica/bin/iasl/Makefile:1.21	Thu Jun 28 07:56:22 2018
+++ src/external/bsd/acpica/bin/iasl/Makefile	Sun Oct 14 13:36:33 2018
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.21 2018/06/28 07:56:22 maya Exp $
+# $NetBSD: Makefile,v 1.22 2018/10/14 13:36:33 jmcneill Exp $
 
-.if (${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64")
+.if (${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64" || ${MACHINE_ARCH} == "aarch64")
 PROG=	iasl
 .endif
 BINDIR=	/usr/bin

Index: src/usr.sbin/acpitools/acpidump/Makefile
diff -u src/usr.sbin/acpitools/acpidump/Makefile:1.6 src/usr.sbin/acpitools/acpidump/Makefile:1.7
--- src/usr.sbin/acpitools/acpidump/Makefile:1.6	Sat Jan 23 21:22:50 2016
+++ src/usr.sbin/acpitools/acpidump/Makefile	Sun Oct 14 13:36:32 2018
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.6 2016/01/23 21:22:50 christos 

CVS commit: src/usr.sbin/acpitools/amldb

2018-10-14 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Oct 14 12:43:58 UTC 2018

Modified Files:
src/usr.sbin/acpitools/amldb: amldb.c

Log Message:
getopt returns int, not char


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/acpitools/amldb/amldb.c

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

Modified files:

Index: src/usr.sbin/acpitools/amldb/amldb.c
diff -u src/usr.sbin/acpitools/amldb/amldb.c:1.3 src/usr.sbin/acpitools/amldb/amldb.c:1.4
--- src/usr.sbin/acpitools/amldb/amldb.c:1.3	Mon Aug 29 20:38:54 2011
+++ src/usr.sbin/acpitools/amldb/amldb.c	Sun Oct 14 12:43:58 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: amldb.c,v 1.3 2011/08/29 20:38:54 joerg Exp $	*/
+/*	$NetBSD: amldb.c,v 1.4 2018/10/14 12:43:58 jmcneill Exp $	*/
 
 /*-
  * Copyright (c) 1999 Mitsuru IWASAKI 
@@ -29,7 +29,7 @@
  *	$FreeBSD: src/usr.sbin/acpi/amldb/amldb.c,v 1.3 2001/10/22 17:25:32 iwasaki Exp $
  */
 #include 
-__RCSID("$NetBSD: amldb.c,v 1.3 2011/08/29 20:38:54 joerg Exp $");
+__RCSID("$NetBSD: amldb.c,v 1.4 2018/10/14 12:43:58 jmcneill Exp $");
 
 #include 
 #include 
@@ -156,8 +156,8 @@ usage(const char *progname)
 int
 main(int argc, char *argv[])
 {
-	char	c, *progname;
-	int	i;
+	char	*progname;
+	int	c, i;
 
 	progname = argv[0];
 	while ((c = getopt(argc, argv, "dsth")) != -1) {



CVS commit: src/tools

2018-10-14 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Oct 14 10:23:32 UTC 2018

Modified Files:
src/tools: Makefile.gnuhost

Log Message:
Add FLEX to the configure env, from Lloyd Parkes on tech-toolchain.
Some configure scripts seem to need both LEX and FLEX.


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/tools/Makefile.gnuhost

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

Modified files:

Index: src/tools/Makefile.gnuhost
diff -u src/tools/Makefile.gnuhost:1.48 src/tools/Makefile.gnuhost:1.49
--- src/tools/Makefile.gnuhost:1.48	Tue Apr 17 10:08:54 2018
+++ src/tools/Makefile.gnuhost	Sun Oct 14 10:23:32 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.gnuhost,v 1.48 2018/04/17 10:08:54 maya Exp $
+#	$NetBSD: Makefile.gnuhost,v 1.49 2018/10/14 10:23:32 martin Exp $
 #
 # Rules used when building a GNU host package.  Expects MODULE to be set.
 #
@@ -62,6 +62,7 @@ CONFIGURE_ENV+= \
 		INSTALL=${HOST_INSTALL_FILE:Q} \
 		LDFLAGS=${HOST_LDFLAGS:Q} \
 		LEX=${LEX:Q} \
+		FLEX=${LEX:Q} \
 		M4=${TOOL_M4:Q} \
 		MAKE=${MAKE_PROGRAM:Q} \
 		PATH="${TOOLDIR}/bin:$$PATH" \



CVS commit: src/crypto/dist/ipsec-tools/src/libipsec

2018-10-14 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Sun Oct 14 08:36:09 UTC 2018

Modified Files:
src/crypto/dist/ipsec-tools/src/libipsec: Makefile.am
Removed Files:
src/crypto/dist/ipsec-tools/src/libipsec: test-policy-priority.c
test-policy.c

Log Message:
Remove dead files that have never been built, and likely can't build since
they are not correct C files.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/crypto/dist/ipsec-tools/src/libipsec/Makefile.am
cvs rdiff -u -r1.4 -r0 \
src/crypto/dist/ipsec-tools/src/libipsec/test-policy-priority.c \
src/crypto/dist/ipsec-tools/src/libipsec/test-policy.c

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

Modified files:

Index: src/crypto/dist/ipsec-tools/src/libipsec/Makefile.am
diff -u src/crypto/dist/ipsec-tools/src/libipsec/Makefile.am:1.3 src/crypto/dist/ipsec-tools/src/libipsec/Makefile.am:1.4
--- src/crypto/dist/ipsec-tools/src/libipsec/Makefile.am:1.3	Wed Jul 23 09:06:51 2008
+++ src/crypto/dist/ipsec-tools/src/libipsec/Makefile.am	Sun Oct 14 08:36:09 2018
@@ -1,5 +1,4 @@
 
-#bin_PROGRAMS = test-policy test-policy-priority
 lib_LTLIBRARIES = libipsec.la
 
 libipsecdir = $(includedir)/libipsec
@@ -30,10 +29,4 @@ libipsec_la_LIBADD = $(LEXLIB)
 
 noinst_HEADERS = ipsec_strerror.h
 
-#test_policy_SOURCES = test-policy.c
-#test_policy_LDFLAGS = libipsec.la
-
-#test_policy_priority_SOURCES = test-policy-priority.c
-#test_policy_priority_LDFLAGS = libipsec.la
-
-EXTRA_DIST = ${man3_MANS} test-policy.c
+EXTRA_DIST = ${man3_MANS}



CVS commit: src/crypto/dist/ipsec-tools/src/setkey

2018-10-14 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Sun Oct 14 08:27:39 UTC 2018

Modified Files:
src/crypto/dist/ipsec-tools/src/setkey: Makefile.am extern.h parse.y
setkey.c token.l
Removed Files:
src/crypto/dist/ipsec-tools/src/setkey: scriptdump.pl test-pfkey.c

Log Message:
Clean up setkey: remove dead wood, KNF, localify, and slightly improve.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/crypto/dist/ipsec-tools/src/setkey/Makefile.am
cvs rdiff -u -r1.6 -r1.7 src/crypto/dist/ipsec-tools/src/setkey/extern.h
cvs rdiff -u -r1.21 -r1.22 src/crypto/dist/ipsec-tools/src/setkey/parse.y \
src/crypto/dist/ipsec-tools/src/setkey/token.l
cvs rdiff -u -r1.1.1.1 -r0 \
src/crypto/dist/ipsec-tools/src/setkey/scriptdump.pl
cvs rdiff -u -r1.18 -r1.19 src/crypto/dist/ipsec-tools/src/setkey/setkey.c
cvs rdiff -u -r1.7 -r0 src/crypto/dist/ipsec-tools/src/setkey/test-pfkey.c

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

Modified files:

Index: src/crypto/dist/ipsec-tools/src/setkey/Makefile.am
diff -u src/crypto/dist/ipsec-tools/src/setkey/Makefile.am:1.2 src/crypto/dist/ipsec-tools/src/setkey/Makefile.am:1.3
--- src/crypto/dist/ipsec-tools/src/setkey/Makefile.am:1.2	Wed Jul 23 09:06:51 2008
+++ src/crypto/dist/ipsec-tools/src/setkey/Makefile.am	Sun Oct 14 08:27:39 2018
@@ -18,5 +18,4 @@ setkey_LDADD = $(LEXLIB)
 noinst_HEADERS = vchar.h extern.h
 man8_MANS = setkey.8
 
-EXTRA_DIST = ${man8_MANS} sample-policy01.cf sample-policy02.cf sample.cf \
-	scriptdump.pl test-pfkey.c
+EXTRA_DIST = ${man8_MANS} sample-policy01.cf sample-policy02.cf sample.cf

Index: src/crypto/dist/ipsec-tools/src/setkey/extern.h
diff -u src/crypto/dist/ipsec-tools/src/setkey/extern.h:1.6 src/crypto/dist/ipsec-tools/src/setkey/extern.h:1.7
--- src/crypto/dist/ipsec-tools/src/setkey/extern.h:1.6	Mon May 28 20:34:45 2018
+++ src/crypto/dist/ipsec-tools/src/setkey/extern.h	Sun Oct 14 08:27:39 2018
@@ -1,33 +1,54 @@
-/*	$NetBSD: extern.h,v 1.6 2018/05/28 20:34:45 maxv Exp $	*/
-
+/*	$NetBSD: extern.h,v 1.7 2018/10/14 08:27:39 maxv Exp $	*/
 
+/*
+ * Copyright (c) 2018 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
 
+/* parse.y */
 void parse_init(void);
+
+/* token.l */
 int parse(FILE **);
 int parse_string(char *);
 
-int setkeymsg(char *, size_t *);
+/* setkey.c */
 int sendkeymsg(char *, size_t);
+uint32_t *sendkeymsg_spigrep(unsigned int, struct addrinfo *,
+struct addrinfo *, int *);
 
 int yylex(void);
 int yyparse(void);
 void yyfatal(const char *);
 void yyerror(const char *);
 
-u_int32_t *sendkeymsg_spigrep(unsigned int, struct addrinfo *,
-   struct addrinfo *, int *);
-
+#ifdef HAVE_POLICY_FWD
 extern int f_rfcmode;
+#endif
 extern int lineno;
-extern int last_msg_type;
-extern u_int32_t last_priority;
 extern int exit_now;
-
-extern u_char m_buf[BUFSIZ];
-extern u_int m_len;
-extern int f_debug;
-
 #ifdef HAVE_PFKEY_POLICY_PRIORITY
 extern int last_msg_type;
-extern u_int32_t last_priority;
+extern uint32_t last_priority;
 #endif

Index: src/crypto/dist/ipsec-tools/src/setkey/parse.y
diff -u src/crypto/dist/ipsec-tools/src/setkey/parse.y:1.21 src/crypto/dist/ipsec-tools/src/setkey/parse.y:1.22
--- src/crypto/dist/ipsec-tools/src/setkey/parse.y:1.21	Mon May 28 20:34:45 2018
+++ src/crypto/dist/ipsec-tools/src/setkey/parse.y	Sun Oct 14 08:27:39 2018
@@ -1,5 +1,4 @@
-/*	$NetBSD: parse.y,v 1.21 2018/05/28 20:34:45 maxv Exp $	*/
-
+/*	$NetBSD: parse.y,v 1.22 2018/10/14 08:27:39 maxv Exp $	*/
 /*	$KAME: parse.y,v 1.81 2003/07/01 04:01:48 itojun Exp $	*/
 
 /*
@@ -92,7 +91,7 @@ static int p_aiflag