CVS commit: src/libexec/httpd

2015-12-27 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Dec 27 10:21:36 UTC 2015

Modified Files:
src/libexec/httpd: auth-bozo.c bozohttpd.8 bozohttpd.c bozohttpd.h
cgi-bozo.c dir-index-bozo.c lua-bozo.c main.c ssl-bozo.c
tilde-luzah-bozo.c
src/libexec/httpd/lua: glue.c

Log Message:
several clean ups:

- bozostrdup() gains a request parameter, and uses it to determine
  what sort of error handling is required
- bozo_strdup() dies
- size_arrays() reduced slightly, pushing error handling into the caller
- convert to size_t for some array indices
- bozo_set_pref() and bozo_init_prefs() gain httpd parameters
- apply a bunch of manual CSE to vastly reduce the number of times the
  string "request->hr_httpd" appears.
- CGI parse_header() takes a request not httpd now

XXX: lua glue updated to call bozo_init_prefs() with htttpd parameter,
 but i'm only guessing here.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/libexec/httpd/auth-bozo.c
cvs rdiff -u -r1.57 -r1.58 src/libexec/httpd/bozohttpd.8
cvs rdiff -u -r1.72 -r1.73 src/libexec/httpd/bozohttpd.c
cvs rdiff -u -r1.40 -r1.41 src/libexec/httpd/bozohttpd.h
cvs rdiff -u -r1.28 -r1.29 src/libexec/httpd/cgi-bozo.c
cvs rdiff -u -r1.22 -r1.23 src/libexec/httpd/dir-index-bozo.c
cvs rdiff -u -r1.12 -r1.13 src/libexec/httpd/lua-bozo.c \
src/libexec/httpd/tilde-luzah-bozo.c
cvs rdiff -u -r1.11 -r1.12 src/libexec/httpd/main.c
cvs rdiff -u -r1.20 -r1.21 src/libexec/httpd/ssl-bozo.c
cvs rdiff -u -r1.1.1.1 -r1.2 src/libexec/httpd/lua/glue.c

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

Modified files:

Index: src/libexec/httpd/auth-bozo.c
diff -u src/libexec/httpd/auth-bozo.c:1.17 src/libexec/httpd/auth-bozo.c:1.18
--- src/libexec/httpd/auth-bozo.c:1.17	Wed Oct 28 09:20:15 2015
+++ src/libexec/httpd/auth-bozo.c	Sun Dec 27 10:21:35 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: auth-bozo.c,v 1.17 2015/10/28 09:20:15 shm Exp $	*/
+/*	$NetBSD: auth-bozo.c,v 1.18 2015/12/27 10:21:35 mrg Exp $	*/
 
 /*	$eterna: auth-bozo.c,v 1.17 2011/11/18 09:21:15 mrg Exp $	*/
 
@@ -72,10 +72,10 @@ bozo_auth_check(bozo_httpreq_t *request,
 		if (bozo_check_special_files(request, basename))
 			return 1;
 	}
-	request->hr_authrealm = bozostrdup(httpd, dir);
+	request->hr_authrealm = bozostrdup(httpd, request, dir);
 
-	if ((size_t)snprintf(authfile, sizeof(authfile), "%s/%s", dir, AUTH_FILE) >= 
-	  sizeof(authfile)) {
+	if ((size_t)snprintf(authfile, sizeof(authfile), "%s/%s", dir,
+			 AUTH_FILE) >= sizeof(authfile)) {
 		return bozo_http_error(httpd, 404, request,
 			"authfile path too long");
 	}
@@ -136,7 +136,8 @@ bozo_auth_cleanup(bozo_httpreq_t *reques
 }
 
 int
-bozo_auth_check_headers(bozo_httpreq_t *request, char *val, char *str, ssize_t len)
+bozo_auth_check_headers(bozo_httpreq_t *request, char *val, char *str,
+			ssize_t len)
 {
 	bozohttpd_t *httpd = request->hr_httpd;
 
@@ -159,8 +160,8 @@ bozo_auth_check_headers(bozo_httpreq_t *
 		*pass++ = '\0';
 		free(request->hr_authuser);
 		free(request->hr_authpass);
-		request->hr_authuser = bozostrdup(httpd, authbuf);
-		request->hr_authpass = bozostrdup(httpd, pass);
+		request->hr_authuser = bozostrdup(httpd, request, authbuf);
+		request->hr_authpass = bozostrdup(httpd, request, pass);
 		debug((httpd, DEBUG_FAT,
 		"decoded authorization `%s' as `%s':`%s'",
 		str, request->hr_authuser, request->hr_authpass));
@@ -190,7 +191,8 @@ bozo_auth_check_401(bozo_httpreq_t *requ
 	if (code == 401)
 		bozo_printf(httpd,
 			"WWW-Authenticate: Basic realm=\"%s\"\r\n",
-			request->hr_authrealm ? request->hr_authrealm : "default realm");
+			request->hr_authrealm ?
+			request->hr_authrealm : "default realm");
 }
 
 #ifndef NO_CGIBIN_SUPPORT

Index: src/libexec/httpd/bozohttpd.8
diff -u src/libexec/httpd/bozohttpd.8:1.57 src/libexec/httpd/bozohttpd.8:1.58
--- src/libexec/httpd/bozohttpd.8:1.57	Sat Dec 12 16:57:53 2015
+++ src/libexec/httpd/bozohttpd.8	Sun Dec 27 10:21:35 2015
@@ -1,4 +1,4 @@
-.\"	$NetBSD: bozohttpd.8,v 1.57 2015/12/12 16:57:53 christos Exp $
+.\"	$NetBSD: bozohttpd.8,v 1.58 2015/12/27 10:21:35 mrg Exp $
 .\"
 .\"	$eterna: bozohttpd.8,v 1.101 2011/11/18 01:25:11 mrg Exp $
 .\"
@@ -337,7 +337,8 @@ by default to process incoming TCP conne
 option),
 .Nm
 has little internal networking knowledge.
-(Indeed, you can run it on the command line with little change of functionality.)
+(Indeed, you can run it on the command line with little change of
+functionality.)
 A typical
 .Xr inetd.conf 5
 entry would be:

Index: src/libexec/httpd/bozohttpd.c
diff -u src/libexec/httpd/bozohttpd.c:1.72 src/libexec/httpd/bozohttpd.c:1.73
--- src/libexec/httpd/bozohttpd.c:1.72	Sat Dec 12 18:06:58 2015
+++ src/libexec/httpd/bozohttpd.c	Sun Dec 27 10:21:35 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: bozohttpd.c,v 1.72 2015/12/12 18:06:58 christos Exp $	*/
+/*	$NetBSD: bozohttpd.c,v 1.73 2015/12/27 10:21:35 mrg Exp $	*/
 
 

CVS commit: [nick-nhusb] src/sys

2015-12-27 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Dec 27 12:10:19 UTC 2015

Modified Files:
src/sys/arch/aarch64/include [nick-nhusb]: ptrace.h
src/sys/arch/acorn32/podulebus [nick-nhusb]: esc.c
src/sys/arch/algor/include [nick-nhusb]: Makefile
src/sys/arch/algor/pci [nick-nhusb]: vtpbc.c
src/sys/arch/alpha/alpha [nick-nhusb]: cpu.c dec_kn300.c pmap.c
src/sys/arch/alpha/conf [nick-nhusb]: GENERIC
src/sys/arch/alpha/include [nick-nhusb]: ptrace.h
src/sys/arch/alpha/pci [nick-nhusb]: apecs_pci.c cia.c cia_pci.c
dwlpx_pci.c irongate_pci.c lca_pci.c mcpcia_pci.c tsp_pci.c
ttwoga_pci.c
src/sys/arch/alpha/stand/standtest [nick-nhusb]: test.c
src/sys/arch/amd64/amd64 [nick-nhusb]: amd64_trap.S autoconf.c bios32.c
copy.S gdt.c genassym.cf kgdb_machdep.c linux32_sigcode.S locore.S
machdep.c mptramp.S netbsd32_machdep.c spl.S trap.c vector.S
src/sys/arch/amd64/conf [nick-nhusb]: ALL GENERIC XEN3_DOM0 XEN3_DOMU
kern.ldscript
src/sys/arch/amd64/include [nick-nhusb]: param.h ptrace.h
src/sys/arch/amiga/amiga [nick-nhusb]: bus.c
src/sys/arch/amiga/conf [nick-nhusb]: WSCONS
src/sys/arch/amiga/dev [nick-nhusb]: amidisplaycc.c clock.c grf.c
grf_cl.c grf_cv.c grf_cv3d.c grfvar.h if_bah_zbus.c view.c
src/sys/arch/amiga/include [nick-nhusb]: Makefile param.h vmparam.h
src/sys/arch/amiga/pci [nick-nhusb]: cv3dpb.c em4k.c empb.c mppb.c
p5pb.c
src/sys/arch/amiga/stand/loadbsd [nick-nhusb]: Makefile README
src/sys/arch/amigappc/include [nick-nhusb]: Makefile param.h
src/sys/arch/arc/include [nick-nhusb]: Makefile
src/sys/arch/arc/pci [nick-nhusb]: necpb.c
src/sys/arch/arm/allwinner [nick-nhusb]: awin_board.c awin_debe.c
awin_gpio.c awin_hdmi.c awin_hdmiaudio.c awin_mmc.c awin_reg.h
awin_tcon.c awin_var.h files.awin
src/sys/arch/arm/amlogic [nick-nhusb]: amlogic_board.c
amlogic_cpufreq.c amlogic_crureg.h amlogic_io.c amlogic_sdhc.c
amlogic_var.h files.amlogic
src/sys/arch/arm/arm [nick-nhusb]: cpufunc.c disassem.c
src/sys/arch/arm/arm32 [nick-nhusb]: arm32_kvminit.c arm32_reboot.c
armv7_generic_space.c bus_dma.c cpu.c netbsd32_machdep.c pmap.c
src/sys/arch/arm/broadcom [nick-nhusb]: bcm2835_obio.c bcm2835_space.c
bcm2835reg.h bcm53xx_pax.c files.bcm2835
src/sys/arch/arm/conf [nick-nhusb]: files.arm
src/sys/arch/arm/cortex [nick-nhusb]: a9_mpsubr.S
src/sys/arch/arm/footbridge [nick-nhusb]: footbridge_pci.c
src/sys/arch/arm/gemini [nick-nhusb]: gemini_pci.c
src/sys/arch/arm/imx [nick-nhusb]: files.imx51 imx51_ipuv3.c
imx51_ipuv3var.h imx51var.h
src/sys/arch/arm/include [nick-nhusb]: armreg.h cpufunc.h ptrace.h
src/sys/arch/arm/include/arm32 [nick-nhusb]: machdep.h pmap.h vmparam.h
src/sys/arch/arm/ixp12x0 [nick-nhusb]: ixp12x0_pci.c
src/sys/arch/arm/marvell [nick-nhusb]: armadaxpreg.h mvsoc.c mvsocts.c
pci_machdep.c
src/sys/arch/arm/nvidia [nick-nhusb]: files.tegra soc_tegra124.c
tegra_ahcisata.c tegra_ahcisatareg.h tegra_cec.c tegra_com.c
tegra_cpufreq.c tegra_dcreg.h tegra_ehci.c tegra_gpio.c
tegra_hdaudio.c tegra_hdmireg.h tegra_i2c.c tegra_intr.h tegra_mc.c
tegra_mcreg.h tegra_mpio.c tegra_pcie.c tegra_pciereg.h tegra_pmc.c
tegra_pmcreg.h tegra_reg.h tegra_rtc.c tegra_sdhc.c tegra_soc.c
tegra_timer.c tegra_timerreg.h tegra_var.h tegra_xusbpad.c
src/sys/arch/arm/omap [nick-nhusb]: files.omap2 omap3_ehci.c
omap3_sdhc.c
src/sys/arch/arm/pic [nick-nhusb]: pic.c
src/sys/arch/arm/s3c2xx0 [nick-nhusb]: s3c2800_pci.c
src/sys/arch/arm/samsung [nick-nhusb]: exynos5_reg.h exynos_gpio.c
exynos_i2c.c exynos_soc.c exynos_sscom.c exynos_usb.c exynos_var.h
exynos_wdt.c files.exynos mct.c mct_var.h
src/sys/arch/arm/vfp [nick-nhusb]: vfp_init.c
src/sys/arch/arm/xscale [nick-nhusb]: becc_pci.c i80312_pci.c
i80321_pci.c ixp425_pci.c pxa2x0_lcd.c
src/sys/arch/atari/dev [nick-nhusb]: hdfd.c
src/sys/arch/atari/include [nick-nhusb]: Makefile
src/sys/arch/atari/pci [nick-nhusb]: pci_hades.c pci_milan.c
src/sys/arch/bebox/bebox [nick-nhusb]: autoconf.c
src/sys/arch/bebox/include [nick-nhusb]: Makefile
src/sys/arch/cesfic/cesfic [nick-nhusb]: machdep.c
src/sys/arch/cesfic/include [nick-nhusb]: Makefile
src/sys/arch/cobalt/include [nick-nhusb]: Makefile
src/sys/arch/cobalt/pci [nick-nhusb]: pci_machdep.c
src/sys/arch/dreamcast/dev/g2 [nick-nhusb]: gapspci_pci.c
src/sys/arch/dreamcast/dev/maple [nick-nhusb]: maple.c maplevar.h

CVS commit: src/tests/rump/modautoload

2015-12-27 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sun Dec 27 08:21:44 UTC 2015

Modified Files:
src/tests/rump/modautoload: t_modautoload.c

Log Message:
Remove a left-over debugging variable.  Fix the build.


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

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

Modified files:

Index: src/tests/rump/modautoload/t_modautoload.c
diff -u src/tests/rump/modautoload/t_modautoload.c:1.3 src/tests/rump/modautoload/t_modautoload.c:1.4
--- src/tests/rump/modautoload/t_modautoload.c:1.3	Sun Dec 27 06:36:36 2015
+++ src/tests/rump/modautoload/t_modautoload.c	Sun Dec 27 08:21:44 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_modautoload.c,v 1.3 2015/12/27 06:36:36 pgoyette Exp $	*/
+/*	$NetBSD: t_modautoload.c,v 1.4 2015/12/27 08:21:44 pgoyette Exp $	*/
 
 #include 
 #include 
@@ -45,7 +45,7 @@ mountkernfs(void)
 	if (rump_sys_mkdir("/kern", 0777) == -1)
 		atf_tc_fail_errno("mkdir /kern");
 
-	new_autoload = new_verbose = true;
+	new_autoload = true;
 	new_len = sizeof(new_autoload);
 	error = sysctlbyname("kern.module.autoload",
   _autoload, _len,



CVS commit: src/share/man/man5

2015-12-27 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sun Dec 27 08:43:51 UTC 2015

Modified Files:
src/share/man/man5: rc.conf.5

Log Message:
Fix typo. Remove trailing whitespace.


To generate a diff of this commit:
cvs rdiff -u -r1.164 -r1.165 src/share/man/man5/rc.conf.5

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/man5/rc.conf.5
diff -u src/share/man/man5/rc.conf.5:1.164 src/share/man/man5/rc.conf.5:1.165
--- src/share/man/man5/rc.conf.5:1.164	Sun Dec 27 02:42:33 2015
+++ src/share/man/man5/rc.conf.5	Sun Dec 27 08:43:51 2015
@@ -1,4 +1,4 @@
-.\"	$NetBSD: rc.conf.5,v 1.164 2015/12/27 02:42:33 christos Exp $
+.\"	$NetBSD: rc.conf.5,v 1.165 2015/12/27 08:43:51 wiz Exp $
 .\"
 .\" Copyright (c) 1996 Matthew R. Green
 .\" All rights reserved.
@@ -752,14 +752,14 @@ Passes
 .Sy ifwatchd_flags .
 .It Sy ip6addrctl
 Boolean value.
-Fine grain control of address and routing priorities. 
+Fine grain control of address and routing priorities.
 .It Sy ip6addrctl_policy
 A string.
 Can be:
 .Bl -tag -width auto -compact
 .It Li auto
 automatically determine from system settings; will read priorities from
-.Pa /etc/ip6addrcl.conf
+.Pa /etc/ip6addrctl.conf
 or if that file does not exist it will default to IPv6 first, then IPv4.
 .It Li ipv4_prefer
 try IPv4 before IPv6.



CVS commit: src/tools/libctf

2015-12-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec 27 21:37:50 UTC 2015

Modified Files:
src/tools/libctf: Makefile

Log Message:
libelf has moved.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tools/libctf/Makefile

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

Modified files:

Index: src/tools/libctf/Makefile
diff -u src/tools/libctf/Makefile:1.5 src/tools/libctf/Makefile:1.6
--- src/tools/libctf/Makefile:1.5	Sun Dec 16 01:47:39 2012
+++ src/tools/libctf/Makefile	Sun Dec 27 16:37:50 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.5 2012/12/16 06:47:39 apb Exp $
+#	$NetBSD: Makefile,v 1.6 2015/12/27 21:37:50 christos Exp $
 
 HOSTLIB=	ctf
 
@@ -18,7 +18,7 @@ SRCS=		ctf_create.c \
 
 OSNETDIR=	${.CURDIR}/../../external/cddl/osnet
 OPENSOLARIS_DISTDIR= ${OSNETDIR}/dist
-LIBELF_DIR=	${.CURDIR}/../../external/bsd/libelf/dist
+LIBELF_DIR=	${.CURDIR}/../../external/bsd/elftoolchain/dist/libelf
 
 CPPFLAGS+=	-DCTF_OLD_VERSIONS
 



CVS commit: src/sys/kern

2015-12-27 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Sun Dec 27 20:52:25 UTC 2015

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

Log Message:
KSYMS_MAX_ID is too small for i386 kernels built with MKDEBUG=yes,
causing a number of ATF tests to fail.  Increase it by 50%, from 65536
to 98304.


To generate a diff of this commit:
cvs rdiff -u -r1.82 -r1.83 src/sys/kern/kern_ksyms.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_ksyms.c
diff -u src/sys/kern/kern_ksyms.c:1.82 src/sys/kern/kern_ksyms.c:1.83
--- src/sys/kern/kern_ksyms.c:1.82	Wed Dec  9 16:26:16 2015
+++ src/sys/kern/kern_ksyms.c	Sun Dec 27 20:52:25 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_ksyms.c,v 1.82 2015/12/09 16:26:16 maxv Exp $	*/
+/*	$NetBSD: kern_ksyms.c,v 1.83 2015/12/27 20:52:25 gson Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -73,7 +73,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_ksyms.c,v 1.82 2015/12/09 16:26:16 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_ksyms.c,v 1.83 2015/12/27 20:52:25 gson Exp $");
 
 #if defined(_KERNEL) && defined(_KERNEL_OPT)
 #include "opt_copy_symtab.h"
@@ -102,7 +102,7 @@ __KERNEL_RCSID(0, "$NetBSD: kern_ksyms.c
 #include "ioconf.h"
 #endif
 
-#define KSYMS_MAX_ID	65536
+#define KSYMS_MAX_ID	98304
 #ifdef KDTRACE_HOOKS
 static uint32_t ksyms_nmap[KSYMS_MAX_ID];	/* sorted symbol table map */
 #else



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

2015-12-27 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Dec 27 20:49:01 UTC 2015

Modified Files:
src/sys/arch/arm/samsung: exynos_dwcmmc.c

Log Message:
get fifo depth from fdt, use default clock parent for biu


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/samsung/exynos_dwcmmc.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/samsung/exynos_dwcmmc.c
diff -u src/sys/arch/arm/samsung/exynos_dwcmmc.c:1.1 src/sys/arch/arm/samsung/exynos_dwcmmc.c:1.2
--- src/sys/arch/arm/samsung/exynos_dwcmmc.c:1.1	Sat Dec 26 23:13:50 2015
+++ src/sys/arch/arm/samsung/exynos_dwcmmc.c	Sun Dec 27 20:49:01 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: exynos_dwcmmc.c,v 1.1 2015/12/26 23:13:50 jmcneill Exp $ */
+/* $NetBSD: exynos_dwcmmc.c,v 1.2 2015/12/27 20:49:01 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: exynos_dwcmmc.c,v 1.1 2015/12/26 23:13:50 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: exynos_dwcmmc.c,v 1.2 2015/12/27 20:49:01 jmcneill Exp $");
 
 #include 
 #include 
@@ -81,11 +81,10 @@ exynos_dwcmmc_attach(device_t parent, de
 	struct dwc_mmc_softc *sc = >sc;
 	struct fdt_attach_args * const faa = aux;
 	const int phandle = faa->faa_phandle;
-	struct clk *clk_cpll;
 	char intrstr[128];
 	bus_addr_t addr;
 	bus_size_t size;
-	u_int bus_width, ciu_div;
+	u_int bus_width, ciu_div, fifo_depth;
 	int error;
 
 	if (fdtbus_get_reg(phandle, 0, , ) != 0) {
@@ -96,35 +95,28 @@ exynos_dwcmmc_attach(device_t parent, de
 	if (of_getprop_uint32(phandle, "bus-width", _width)) {
 		bus_width = 4;
 	}
+	if (of_getprop_uint32(phandle, "fifo-depth", _depth)) {
+		fifo_depth = 64;
+	}
 	if (of_getprop_uint32(phandle, "samsung,dw-mshc-ciu-div", _div)) {
 		aprint_error(": missing samsung,dw-mshc-ciu-div property\n");
 		return;
 	}
 
-	clk_cpll = clk_get("sclk_cpll");
-	if (clk_cpll == NULL) {
-		aprint_error(": clock \"sclk_cpll\" not found\n");
-		return;
-	}
 	esc->sc_clk_biu = fdtbus_clock_get(phandle, "biu");
 	if (esc->sc_clk_biu == NULL) {
 		aprint_error(": couldn't get clock biu\n");
 		return;
 	}
-	error = clk_set_parent(esc->sc_clk_biu, clk_cpll);
-	if (error) {
-		aprint_error(": couldn't set clock biu parent: %d\n", error);
-		return;
-	}
-
 	esc->sc_clk_ciu = fdtbus_clock_get(phandle, "ciu");
 	if (esc->sc_clk_ciu == NULL) {
 		aprint_error(": couldn't get clock ciu\n");
 		return;
 	}
-	error = clk_set_rate(esc->sc_clk_ciu, 66600);
+
+	error = clk_enable(esc->sc_clk_biu);
 	if (error) {
-		aprint_error(": couldn't set clock ciu rate: %d\n", error);
+		aprint_error(": couldn't enable clock biu: %d\n", error);
 		return;
 	}
 	error = clk_enable(esc->sc_clk_ciu);
@@ -143,14 +135,8 @@ exynos_dwcmmc_attach(device_t parent, de
 		return;
 	}
 
-	sc->sc_flags |= DWC_MMC_F_USE_HOLD_REG;
-#if 0
-	sc->sc_flags = DWC_MMC_F_USE_HOLD_REG | DWC_MMC_F_PWREN_CLEAR |
-		   DWC_MMC_F_FORCE_CLK;
-#endif
-
 	sc->sc_clock_freq = clk_get_rate(esc->sc_clk_ciu) / (ciu_div + 1);
-	sc->sc_fifo_depth = 64;
+	sc->sc_fifo_depth = fifo_depth;
 
 	esc->sc_pin_cd = fdtbus_gpio_acquire(phandle, "cd-gpios",
 	GPIO_PIN_INPUT);



CVS commit: src/distrib/hp300/ramdisk

2015-12-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec 27 19:33:40 UTC 2015

Modified Files:
src/distrib/hp300/ramdisk: Makefile

Log Message:
Bump


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/distrib/hp300/ramdisk/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/hp300/ramdisk/Makefile
diff -u src/distrib/hp300/ramdisk/Makefile:1.32 src/distrib/hp300/ramdisk/Makefile:1.33
--- src/distrib/hp300/ramdisk/Makefile:1.32	Sun Apr 28 04:08:03 2013
+++ src/distrib/hp300/ramdisk/Makefile	Sun Dec 27 14:33:40 2015
@@ -1,10 +1,10 @@
-#	$NetBSD: Makefile,v 1.32 2013/04/28 08:08:03 tsutsui Exp $
+#	$NetBSD: Makefile,v 1.33 2015/12/27 19:33:40 christos Exp $
 
 .include 
 .include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
 
 IMAGE=		ramdisk.fs
-IMAGESIZE=	1600k
+IMAGESIZE=	1800k
 MAKEFS_FLAGS=	-f 15 -o density=1k
 
 WARNS=		1



CVS commit: src/sys/dev/ic

2015-12-27 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Dec 27 18:35:01 UTC 2015

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

Log Message:
add some extra regs


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/ic/dwc_mmc_reg.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/dwc_mmc_reg.h
diff -u src/sys/dev/ic/dwc_mmc_reg.h:1.4 src/sys/dev/ic/dwc_mmc_reg.h:1.5
--- src/sys/dev/ic/dwc_mmc_reg.h:1.4	Sat Jan 17 19:32:50 2015
+++ src/sys/dev/ic/dwc_mmc_reg.h	Sun Dec 27 18:35:01 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: dwc_mmc_reg.h,v 1.4 2015/01/17 19:32:50 jmcneill Exp $ */
+/* $NetBSD: dwc_mmc_reg.h,v 1.5 2015/12/27 18:35:01 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2014 Jared D. McNeill 
@@ -58,10 +58,18 @@
 #define DWC_MMC_VERID_REG			0x006c
 #define DWC_MMC_UHS_REG0x0074
 #define DWC_MMC_RST_REG0x0078
+#define DWC_MMC_BMODE_REG			0x0080
+#define DWC_MMC_PLDMND_REG			0x0084
+#define DWC_MMC_DBADDR_REG			0x0088
+#define DWC_MMC_IDSTS_REG			0x008c
+#define DWC_MMC_IDINTEN_REG			0x0090
+#define DWC_MMC_DSCADDR_REG			0x0094
+#define DWC_MMC_BUFADDR_REG			0x0098
 #define DWC_MMC_CARDTHRCTL_REG			0x0100
 #define DWC_MMC_BACK_END_POWER_REG		0x0104
 #define DWC_MMC_FIFO_BASE_REG			0x0200
 
+#define DWC_MMC_CTRL_SEND_AUTO_STOP		__BIT(10)
 #define DWC_MMC_CTRL_ABORT_READ_DATA		__BIT(8)
 #define DWC_MMC_CTRL_SEND_IRQ_RESPONSE		__BIT(7)
 #define DWC_MMC_CTRL_READ_WAIT			__BIT(6)



CVS commit: src/sys/dev/ic

2015-12-27 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Dec 27 18:35:12 UTC 2015

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

Log Message:
reduce timeouts, fix clk div calculation


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/ic/dwc_mmc.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/dwc_mmc.c
diff -u src/sys/dev/ic/dwc_mmc.c:1.8 src/sys/dev/ic/dwc_mmc.c:1.9
--- src/sys/dev/ic/dwc_mmc.c:1.8	Sat Dec 26 23:13:10 2015
+++ src/sys/dev/ic/dwc_mmc.c	Sun Dec 27 18:35:12 2015
@@ -1,4 +1,6 @@
-/* $NetBSD: dwc_mmc.c,v 1.8 2015/12/26 23:13:10 jmcneill Exp $ */
+/* $NetBSD: dwc_mmc.c,v 1.9 2015/12/27 18:35:12 jmcneill Exp $ */
+
+#define DWC_MMC_DEBUG
 
 /*-
  * Copyright (c) 2014 Jared D. McNeill 
@@ -29,7 +31,7 @@
 #include "opt_dwc_mmc.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: dwc_mmc.c,v 1.8 2015/12/26 23:13:10 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dwc_mmc.c,v 1.9 2015/12/27 18:35:12 jmcneill Exp $");
 
 #include 
 #include 
@@ -175,12 +177,8 @@ dwc_mmc_intr(void *priv)
 static int
 dwc_mmc_set_clock(struct dwc_mmc_softc *sc, u_int freq)
 {
-	u_int pll_freq, clk_div;
-
-	pll_freq = sc->sc_clock_freq / 1000;
-	clk_div = (pll_freq / freq) >> 1;
-	if (pll_freq % freq)
-		clk_div++;
+	const u_int pll_freq = sc->sc_clock_freq / 1000;
+	const u_int clk_div = howmany(pll_freq, freq * 2);
 
 #ifdef DWC_MMC_DEBUG
 	printf("%s: using clk_div %d for freq %d (act %u)\n",
@@ -189,6 +187,8 @@ dwc_mmc_set_clock(struct dwc_mmc_softc *
 
 	MMC_WRITE(sc, DWC_MMC_CLKDIV_REG,
 	__SHIFTIN(clk_div, DWC_MMC_CLKDIV_CLK_DIVIDER0));
+	MMC_WRITE(sc, DWC_MMC_CLKSRC_REG, 0);	/* clock divider 0 */
+
 	return dwc_mmc_update_clock(sc);
 }
 
@@ -462,6 +462,9 @@ dwc_mmc_exec_command(sdmmc_chipset_handl
 		cmdval |= DWC_MMC_CMD_USE_HOLD_REG;
 
 	mutex_enter(>sc_intr_lock);
+
+	MMC_WRITE(sc, DWC_MMC_RINTSTS_REG, 0x);
+
 	if (cmd->c_opcode == 0)
 		cmdval |= DWC_MMC_CMD_SEND_INIT;
 	if (cmd->c_flags & SCF_RSP_PRESENT)
@@ -500,7 +503,7 @@ dwc_mmc_exec_command(sdmmc_chipset_handl
 	MMC_WRITE(sc, DWC_MMC_CMD_REG, cmdval | cmd->c_opcode);
 
 	cmd->c_error = dwc_mmc_wait_rint(sc,
-	DWC_MMC_INT_ERROR|DWC_MMC_INT_CD, hz * 10);
+	DWC_MMC_INT_ERROR|DWC_MMC_INT_CD, hz * 5);
 	if (cmd->c_error == 0 && (sc->sc_intr_rint & DWC_MMC_INT_ERROR)) {
 #ifdef DWC_MMC_DEBUG
 		dwc_mmc_print_rint(sc, "exec1", sc->sc_intr_rint);
@@ -523,7 +526,7 @@ dwc_mmc_exec_command(sdmmc_chipset_handl
 
 		cmd->c_error = dwc_mmc_wait_rint(sc,
 		DWC_MMC_INT_ERROR|DWC_MMC_INT_ACD|DWC_MMC_INT_DTO,
-		hz * 10);
+		hz * 5);
 		if (cmd->c_error == 0 &&
 		(sc->sc_intr_rint & DWC_MMC_INT_ERROR)) {
 #ifdef DWC_MMC_DEBUG



CVS commit: src/sys/dev/ic

2015-12-27 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Dec 27 18:35:29 UTC 2015

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

Log Message:
remove DWC_MMC_DEBUG


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/dev/ic/dwc_mmc.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/dwc_mmc.c
diff -u src/sys/dev/ic/dwc_mmc.c:1.9 src/sys/dev/ic/dwc_mmc.c:1.10
--- src/sys/dev/ic/dwc_mmc.c:1.9	Sun Dec 27 18:35:12 2015
+++ src/sys/dev/ic/dwc_mmc.c	Sun Dec 27 18:35:29 2015
@@ -1,6 +1,4 @@
-/* $NetBSD: dwc_mmc.c,v 1.9 2015/12/27 18:35:12 jmcneill Exp $ */
-
-#define DWC_MMC_DEBUG
+/* $NetBSD: dwc_mmc.c,v 1.10 2015/12/27 18:35:29 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2014 Jared D. McNeill 
@@ -31,7 +29,7 @@
 #include "opt_dwc_mmc.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: dwc_mmc.c,v 1.9 2015/12/27 18:35:12 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dwc_mmc.c,v 1.10 2015/12/27 18:35:29 jmcneill Exp $");
 
 #include 
 #include 



CVS commit: src/include

2015-12-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec 27 19:50:31 UTC 2015

Modified Files:
src/include: fenv.h

Log Message:
We need at least 68010 or coldfire for fenv.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/include/fenv.h

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

Modified files:

Index: src/include/fenv.h
diff -u src/include/fenv.h:1.18 src/include/fenv.h:1.19
--- src/include/fenv.h:1.18	Thu Dec 24 09:13:59 2015
+++ src/include/fenv.h	Sun Dec 27 14:50:31 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: fenv.h,v 1.18 2015/12/24 14:13:59 christos Exp $	*/
+/*	$NetBSD: fenv.h,v 1.19 2015/12/27 19:50:31 christos Exp $	*/
 /*
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -32,7 +32,8 @@
 #if !defined(__aarch64__) && !defined(__arm__) && !defined(__i386__) \
 && !defined(__hppa__) && !defined(__powerpc__) && !defined(__mips__) \
 && !defined(__or1k__) && !defined(__riscv__) && !defined(__sparc__) \
-&& !defined(__x86_64__) && !defined(__m68k__)
+&& !defined(__x86_64__)
+&& !(defined(__m68k__) && (defined(__mc68010__) || defined(__mcoldfire__)))
 # ifndef __TEST_FENV
 #  error	"fenv.h is currently not supported for this architecture"
 # endif



CVS commit: src/external/cddl/osnet/sys

2015-12-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec 27 21:39:34 UTC 2015

Modified Files:
src/external/cddl/osnet/sys: assert.h

Log Message:
don't re-define __assert.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/external/cddl/osnet/sys/assert.h

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

Modified files:

Index: src/external/cddl/osnet/sys/assert.h
diff -u src/external/cddl/osnet/sys/assert.h:1.1 src/external/cddl/osnet/sys/assert.h:1.2
--- src/external/cddl/osnet/sys/assert.h:1.1	Fri Aug  7 16:57:57 2009
+++ src/external/cddl/osnet/sys/assert.h	Sun Dec 27 16:39:34 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: assert.h,v 1.1 2009/08/07 20:57:57 haad Exp $	*/
+/*	$NetBSD: assert.h,v 1.2 2015/12/27 21:39:34 christos Exp $	*/
 
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -31,4 +31,6 @@
 
 #include_next "assert.h"
 
+#ifndef __assert
 #define __assert(a, b, c)   __assert(a, c, b)
+#endif



CVS commit: src/external/cddl/osnet/sys/sys

2015-12-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec 27 21:40:21 UTC 2015

Modified Files:
src/external/cddl/osnet/sys/sys: sysmacros.h

Log Message:
Override roundup.


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

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

Modified files:

Index: src/external/cddl/osnet/sys/sys/sysmacros.h
diff -u src/external/cddl/osnet/sys/sys/sysmacros.h:1.5 src/external/cddl/osnet/sys/sys/sysmacros.h:1.6
--- src/external/cddl/osnet/sys/sys/sysmacros.h:1.5	Sat Feb  7 15:30:04 2015
+++ src/external/cddl/osnet/sys/sys/sysmacros.h	Sun Dec 27 16:40:21 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: sysmacros.h,v 1.5 2015/02/07 20:30:04 christos Exp $	*/
+/*	$NetBSD: sysmacros.h,v 1.6 2015/12/27 21:40:21 christos Exp $	*/
 
 /*
  * CDDL HEADER START
@@ -230,6 +230,7 @@ extern unsigned char bcd_to_byte[256];
  */
 #undef howmany
 #define	howmany(x, y)	(((x)+((y)-1))/(y))
+#undef roundup
 #define	roundup(x, y)	x)+((y)-1))/(y))*(y))
 
 #endif	/* !__NetBSD__ */



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

2015-12-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec 27 22:26:19 UTC 2015

Modified Files:
src/external/bsd/mdocml/dist: configure

Log Message:
- Don't look for tests in the local directory, we might be running this from
  somewhere else.
- Clear MAKEFLAGS so that make(1) behaves as it is supposed to.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/mdocml/dist/configure

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

Modified files:

Index: src/external/bsd/mdocml/dist/configure
diff -u src/external/bsd/mdocml/dist/configure:1.3 src/external/bsd/mdocml/dist/configure:1.4
--- src/external/bsd/mdocml/dist/configure:1.3	Sat Dec 19 14:28:06 2015
+++ src/external/bsd/mdocml/dist/configure	Sun Dec 27 17:26:19 2015
@@ -15,6 +15,7 @@
 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
 set -e
+DIR="`dirname "$0"`"
 
 [ -e config.log ] && mv config.log config.log.old
 [ -e config.h   ] && mv config.h config.h.old
@@ -32,6 +33,7 @@ echo "config.log: writing..."
 # such that nothing can leak in from the environment.
 
 OSNAME=
+MAKEFLAGS=
 
 CC=`printf "all:\\n\\t@echo \\\$(CC)\\n" | make -f -`
 CFLAGS="-g -W -Wall -Wstrict-prototypes -Wno-unused-parameter -Wwrite-strings"
@@ -127,7 +129,7 @@ ${1}: testing...
 ${COMP} ${3} -o test-${1} test-${1}.c
 __HEREDOC__
 
-	if ${COMP} ${3} -o "test-${1}" "test-${1}.c" 1>&3 2>&3; then
+	if ${COMP} ${3} -o "test-${1}" "${DIR}/test-${1}.c" 1>&3 2>&3; then
 		echo "${1}: ${CC} succeeded" 1>&3
 	else
 		echo "${1}: ${CC} failed with $?" 1>&3



CVS commit: src/external/cddl/osnet/dist/common/ctf

2015-12-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec 27 21:39:01 UTC 2015

Modified Files:
src/external/cddl/osnet/dist/common/ctf: ctf_create.c ctf_decl.c
ctf_error.c ctf_hash.c ctf_labels.c ctf_lookup.c ctf_open.c
ctf_types.c ctf_util.c

Log Message:
add nbtool_config.h


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/cddl/osnet/dist/common/ctf/ctf_create.c \
src/external/cddl/osnet/dist/common/ctf/ctf_open.c
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/cddl/osnet/dist/common/ctf/ctf_decl.c \
src/external/cddl/osnet/dist/common/ctf/ctf_util.c
cvs rdiff -u -r1.2 -r1.3 src/external/cddl/osnet/dist/common/ctf/ctf_error.c \
src/external/cddl/osnet/dist/common/ctf/ctf_hash.c \
src/external/cddl/osnet/dist/common/ctf/ctf_lookup.c
cvs rdiff -u -r1.3 -r1.4 src/external/cddl/osnet/dist/common/ctf/ctf_labels.c \
src/external/cddl/osnet/dist/common/ctf/ctf_types.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/cddl/osnet/dist/common/ctf/ctf_create.c
diff -u src/external/cddl/osnet/dist/common/ctf/ctf_create.c:1.4 src/external/cddl/osnet/dist/common/ctf/ctf_create.c:1.5
--- src/external/cddl/osnet/dist/common/ctf/ctf_create.c:1.4	Thu Sep 24 10:18:24 2015
+++ src/external/cddl/osnet/dist/common/ctf/ctf_create.c	Sun Dec 27 16:39:01 2015
@@ -19,6 +19,9 @@
  *
  * CDDL HEADER END
  */
+#ifdef HAVE_NBTOOL_CONFIG_H
+#include "nbtool_config.h"
+#endif
 
 /*
  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
Index: src/external/cddl/osnet/dist/common/ctf/ctf_open.c
diff -u src/external/cddl/osnet/dist/common/ctf/ctf_open.c:1.4 src/external/cddl/osnet/dist/common/ctf/ctf_open.c:1.5
--- src/external/cddl/osnet/dist/common/ctf/ctf_open.c:1.4	Thu Sep 24 10:18:24 2015
+++ src/external/cddl/osnet/dist/common/ctf/ctf_open.c	Sun Dec 27 16:39:01 2015
@@ -20,6 +20,9 @@
  * CDDL HEADER END
  */
 
+#ifdef HAVE_NBTOOL_CONFIG_H
+#include "nbtool_config.h"
+#endif
 /*
  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.

Index: src/external/cddl/osnet/dist/common/ctf/ctf_decl.c
diff -u src/external/cddl/osnet/dist/common/ctf/ctf_decl.c:1.1.1.1 src/external/cddl/osnet/dist/common/ctf/ctf_decl.c:1.2
--- src/external/cddl/osnet/dist/common/ctf/ctf_decl.c:1.1.1.1	Fri Feb 19 23:33:52 2010
+++ src/external/cddl/osnet/dist/common/ctf/ctf_decl.c	Sun Dec 27 16:39:01 2015
@@ -19,6 +19,9 @@
  *
  * CDDL HEADER END
  */
+#ifdef HAVE_NBTOOL_CONFIG_H
+#include "nbtool_config.h"
+#endif
 /*
  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
Index: src/external/cddl/osnet/dist/common/ctf/ctf_util.c
diff -u src/external/cddl/osnet/dist/common/ctf/ctf_util.c:1.1.1.1 src/external/cddl/osnet/dist/common/ctf/ctf_util.c:1.2
--- src/external/cddl/osnet/dist/common/ctf/ctf_util.c:1.1.1.1	Fri Feb 19 23:33:52 2010
+++ src/external/cddl/osnet/dist/common/ctf/ctf_util.c	Sun Dec 27 16:39:01 2015
@@ -19,6 +19,9 @@
  *
  * CDDL HEADER END
  */
+#ifdef HAVE_NBTOOL_CONFIG_H
+#include "nbtool_config.h"
+#endif
 /*
  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.

Index: src/external/cddl/osnet/dist/common/ctf/ctf_error.c
diff -u src/external/cddl/osnet/dist/common/ctf/ctf_error.c:1.2 src/external/cddl/osnet/dist/common/ctf/ctf_error.c:1.3
--- src/external/cddl/osnet/dist/common/ctf/ctf_error.c:1.2	Thu Sep 24 10:18:24 2015
+++ src/external/cddl/osnet/dist/common/ctf/ctf_error.c	Sun Dec 27 16:39:01 2015
@@ -19,6 +19,9 @@
  *
  * CDDL HEADER END
  */
+#ifdef HAVE_NBTOOL_CONFIG_H
+#include "nbtool_config.h"
+#endif
 /*
  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
Index: src/external/cddl/osnet/dist/common/ctf/ctf_hash.c
diff -u src/external/cddl/osnet/dist/common/ctf/ctf_hash.c:1.2 src/external/cddl/osnet/dist/common/ctf/ctf_hash.c:1.3
--- src/external/cddl/osnet/dist/common/ctf/ctf_hash.c:1.2	Sat Feb  7 15:30:03 2015
+++ src/external/cddl/osnet/dist/common/ctf/ctf_hash.c	Sun Dec 27 16:39:01 2015
@@ -20,6 +20,9 @@
  * CDDL HEADER END
  */
 
+#ifdef HAVE_NBTOOL_CONFIG_H
+#include "nbtool_config.h"
+#endif
 /*
  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
Index: src/external/cddl/osnet/dist/common/ctf/ctf_lookup.c
diff -u src/external/cddl/osnet/dist/common/ctf/ctf_lookup.c:1.2 src/external/cddl/osnet/dist/common/ctf/ctf_lookup.c:1.3
--- src/external/cddl/osnet/dist/common/ctf/ctf_lookup.c:1.2	Sat Feb  7 15:30:03 2015
+++ src/external/cddl/osnet/dist/common/ctf/ctf_lookup.c	Sun Dec 27 16:39:01 2015
@@ -20,6 +20,9 @@
  * CDDL HEADER END
  */
 
+#ifdef HAVE_NBTOOL_CONFIG_H
+#include "nbtool_config.h"
+#endif
 /*
  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.


CVS commit: src/external/cddl/osnet/dist/tools/ctf/cvt

2015-12-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec 27 21:38:46 UTC 2015

Modified Files:
src/external/cddl/osnet/dist/tools/ctf/cvt: dwarf.c

Log Message:
add return


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/external/cddl/osnet/dist/tools/ctf/cvt/dwarf.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/cddl/osnet/dist/tools/ctf/cvt/dwarf.c
diff -u src/external/cddl/osnet/dist/tools/ctf/cvt/dwarf.c:1.14 src/external/cddl/osnet/dist/tools/ctf/cvt/dwarf.c:1.15
--- src/external/cddl/osnet/dist/tools/ctf/cvt/dwarf.c:1.14	Tue Sep 29 16:43:16 2015
+++ src/external/cddl/osnet/dist/tools/ctf/cvt/dwarf.c	Sun Dec 27 16:38:46 2015
@@ -2088,4 +2088,5 @@ dw_read(tdata_t *td, Elf *elf, char *fil
 out:
 	terminate("file does not contain dwarf type data "
 	"(try compiling with -g)\n");
+	return -1;
 }



CVS commit: src/external/cddl/osnet/sys/sys

2015-12-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec 27 21:42:09 UTC 2015

Modified Files:
src/external/cddl/osnet/sys/sys: time.h

Log Message:
We don't need to declare clock_gettime if we don't have it and we don't need
to __RENAME if we are not NetBSD.


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

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

Modified files:

Index: src/external/cddl/osnet/sys/sys/time.h
diff -u src/external/cddl/osnet/sys/sys/time.h:1.5 src/external/cddl/osnet/sys/sys/time.h:1.6
--- src/external/cddl/osnet/sys/sys/time.h:1.5	Mon Dec 21 08:28:39 2015
+++ src/external/cddl/osnet/sys/sys/time.h	Sun Dec 27 16:42:09 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: time.h,v 1.5 2015/12/21 13:28:39 joerg Exp $	*/
+/*	$NetBSD: time.h,v 1.6 2015/12/27 21:42:09 christos Exp $	*/
 
 /*-
  * Copyright (c) 2007 Pawel Jakub Dawidek 
@@ -66,8 +66,13 @@ gethrtime(void) {
 
 #else
 
+#ifdef CLOCK_REALTIME
 int clock_gettime(clockid_t, struct timespec *)
-__RENAME(__clock_gettime50);
+#ifdef __RENAME
+__RENAME(__clock_gettime50)
+#endif
+;
+#endif
 
 static __inline hrtime_t gethrtime(void) {
 #ifdef CLOCK_REALTIME



CVS commit: src/libexec/httpd

2015-12-27 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Dec 28 07:37:59 UTC 2015

Modified Files:
src/libexec/httpd: bozohttpd.c bozohttpd.h cgi-bozo.c content-bozo.c
daemon-bozo.c dir-index-bozo.c lua-bozo.c main.c ssl-bozo.c
tilde-luzah-bozo.c

Log Message:
rename bozo_err/bozo_warn/bozo_asprintf to bozoerr/etc.
new rule is that function that mirror libc-style functions get no underscore.


To generate a diff of this commit:
cvs rdiff -u -r1.73 -r1.74 src/libexec/httpd/bozohttpd.c
cvs rdiff -u -r1.41 -r1.42 src/libexec/httpd/bozohttpd.h
cvs rdiff -u -r1.29 -r1.30 src/libexec/httpd/cgi-bozo.c
cvs rdiff -u -r1.12 -r1.13 src/libexec/httpd/content-bozo.c \
src/libexec/httpd/main.c
cvs rdiff -u -r1.16 -r1.17 src/libexec/httpd/daemon-bozo.c
cvs rdiff -u -r1.23 -r1.24 src/libexec/httpd/dir-index-bozo.c
cvs rdiff -u -r1.13 -r1.14 src/libexec/httpd/lua-bozo.c \
src/libexec/httpd/tilde-luzah-bozo.c
cvs rdiff -u -r1.21 -r1.22 src/libexec/httpd/ssl-bozo.c

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

Modified files:

Index: src/libexec/httpd/bozohttpd.c
diff -u src/libexec/httpd/bozohttpd.c:1.73 src/libexec/httpd/bozohttpd.c:1.74
--- src/libexec/httpd/bozohttpd.c:1.73	Sun Dec 27 10:21:35 2015
+++ src/libexec/httpd/bozohttpd.c	Mon Dec 28 07:37:59 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: bozohttpd.c,v 1.73 2015/12/27 10:21:35 mrg Exp $	*/
+/*	$NetBSD: bozohttpd.c,v 1.74 2015/12/28 07:37:59 mrg Exp $	*/
 
 /*	$eterna: bozohttpd.c,v 1.178 2011/11/18 09:21:15 mrg Exp $	*/
 
@@ -597,7 +597,7 @@ bozo_read_request(bozohttpd_t *httpd)
 	sigemptyset(_mask);
 	sigaddset(_mask, SIGALRM);
 	sa.sa_flags = 0;
-	sigaction(SIGALRM, , NULL);	/* XXX */
+	sigaction(SIGALRM, , NULL);
 
 	alarm(MAX_WAIT_TIME);
 	while ((str = bozodgetln(httpd, STDIN_FILENO, , bozo_read)) != NULL) {
@@ -616,7 +616,7 @@ bozo_read_request(bozohttpd_t *httpd)
 		"null method");
 goto cleanup;
 			}
-			bozo_warn(httpd,
+			bozowarn(httpd,
   "got request ``%s'' from host %s to port %s",
   str,
   host ? host : addr ? addr : "",
@@ -800,7 +800,7 @@ mmap_and_write_part(bozohttpd_t *httpd, 
 
 	addr = mmap(0, mappedsz, PROT_READ, MAP_SHARED, fd, mappedoffset);
 	if (addr == (char *)-1) {
-		bozo_warn(httpd, "mmap failed: %s", strerror(errno));
+		bozowarn(httpd, "mmap failed: %s", strerror(errno));
 		return -1;
 	}
 	mappedaddr = addr;
@@ -811,7 +811,7 @@ mmap_and_write_part(bozohttpd_t *httpd, 
 	while (sz > BOZO_WRSZ) {
 		if (bozo_write(httpd, STDOUT_FILENO, addr + wroffset,
 BOZO_WRSZ) != BOZO_WRSZ) {
-			bozo_warn(httpd, "write failed: %s", strerror(errno));
+			bozowarn(httpd, "write failed: %s", strerror(errno));
 			goto out;
 		}
 		debug((httpd, DEBUG_OBESE, "wrote %d bytes", BOZO_WRSZ));
@@ -820,13 +820,13 @@ mmap_and_write_part(bozohttpd_t *httpd, 
 	}
 	if (sz && (size_t)bozo_write(httpd, STDOUT_FILENO, addr + wroffset,
 sz) != sz) {
-		bozo_warn(httpd, "final write failed: %s", strerror(errno));
+		bozowarn(httpd, "final write failed: %s", strerror(errno));
 		goto out;
 	}
 	debug((httpd, DEBUG_OBESE, "wrote %d bytes", (int)sz));
  out:
 	if (munmap(mappedaddr, mappedsz) < 0) {
-		bozo_warn(httpd, "munmap failed");
+		bozowarn(httpd, "munmap failed");
 		return -1;
 	}
 
@@ -922,8 +922,7 @@ bozo_escape_rfc3986(bozohttpd_t *httpd, 
  * the URL we will tack these on to the new (redirected) URL.
  */
 static void
-handle_redirect(bozo_httpreq_t *request,
-		const char *url, int absolute)
+handle_redirect(bozo_httpreq_t *request, const char *url, int absolute)
 {
 	bozohttpd_t *httpd = request->hr_httpd;
 	char *finalurl, *urlbuf;
@@ -938,14 +937,14 @@ handle_redirect(bozo_httpreq_t *request,
 			   * eg. https:// */
 
 	if (url == NULL) {
-		bozo_asprintf(httpd, , "/%s/", request->hr_file);
+		bozoasprintf(httpd, , "/%s/", request->hr_file);
 		url = urlbuf;
 	} else
 		urlbuf = NULL;
 
 #ifndef NO_USER_SUPPORT
 	if (request->hr_user && !absolute) {
-		bozo_asprintf(httpd, , "/~%s%s", request->hr_user, url);
+		bozoasprintf(httpd, , "/~%s%s", request->hr_user, url);
 		url = userbuf;
 	} else
 		userbuf = NULL;
@@ -1024,7 +1023,7 @@ handle_redirect(bozo_httpreq_t *request,
 		strlcat(finalurl, request->hr_query, finalurl_len);
 	}
 
-	bozo_warn(httpd, "redirecting %s", finalurl);
+	bozowarn(httpd, "redirecting %s", finalurl);
 	debug((httpd, DEBUG_FAT, "redirecting %s", finalurl));
 
 	bozo_printf(httpd, "%s 301 Document Moved\r\n", request->hr_proto);
@@ -1144,7 +1143,7 @@ check_virtual(bozo_httpreq_t *request)
 	debug((httpd, DEBUG_OBESE, "found it punch it"));
 	request->hr_virthostname =
 	bozostrdup(httpd, request, d->d_name);
-	bozo_asprintf(httpd, , "%s/%s",
+	bozoasprintf(httpd, , "%s/%s",
 	httpd->virtbase,
 	request->hr_virthostname);
 	break;
@@ -1396,7 +1395,7 @@ transform_request(bozo_httpreq_t *reques
 		}
 		if (strchr(file + 2, '/') == NULL) {
 			char 

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

2015-12-27 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Dec 27 12:21:37 UTC 2015

Modified Files:
src/sys/arch/arm/samsung: exynos_pinctrl.c

Log Message:
update compatible string to match exynos5422-odroidxu3.dts


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arm/samsung/exynos_pinctrl.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/samsung/exynos_pinctrl.c
diff -u src/sys/arch/arm/samsung/exynos_pinctrl.c:1.6 src/sys/arch/arm/samsung/exynos_pinctrl.c:1.7
--- src/sys/arch/arm/samsung/exynos_pinctrl.c:1.6	Thu Dec 24 01:10:51 2015
+++ src/sys/arch/arm/samsung/exynos_pinctrl.c	Sun Dec 27 12:21:37 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: exynos_pinctrl.c,v 1.6 2015/12/24 01:10:51 marty Exp $ */
+/*	$NetBSD: exynos_pinctrl.c,v 1.7 2015/12/27 12:21:37 jmcneill Exp $ */
 
 /*-
 * Copyright (c) 2015 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
 #include "gpio.h"
 
 #include 
-__KERNEL_RCSID(1, "$NetBSD: exynos_pinctrl.c,v 1.6 2015/12/24 01:10:51 marty Exp $");
+__KERNEL_RCSID(1, "$NetBSD: exynos_pinctrl.c,v 1.7 2015/12/27 12:21:37 jmcneill Exp $");
 
 #include 
 #include 
@@ -62,7 +62,7 @@ CFATTACH_DECL_NEW(exynos_pinctrl, sizeof
 static int
 exynos_pinctrl_match(device_t parent, cfdata_t cf, void *aux)
 {
-	const char * const compatible[] = { "samsung,exynos5422-pinctrl",
+	const char * const compatible[] = { "samsung,exynos5420-pinctrl",
 	NULL };
 	struct fdt_attach_args * const faa = aux;
 	return of_match_compatible(faa->faa_phandle, compatible);
@@ -94,14 +94,13 @@ exynos_pinctrl_attach(device_t parent, d
 		return;
 	}
 
+	aprint_naive("\n");
+	aprint_normal("\n");
+
 	for (child = OF_child(faa->faa_phandle); child;
 	 child = OF_peer(child)) {
 		if (of_getprop_bool(child, "gpio-controller") == false)
 			continue;
 		exynos_gpio_bank_config(sc, faa, child);
 	}
-
-	aprint_naive("\n");
-	aprint_normal("\n");
-
 }



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

2015-12-27 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Dec 27 12:21:12 UTC 2015

Modified Files:
src/sys/arch/arm/samsung: exynos_fdt.c

Log Message:
update exynosfdt_init to match the devices in exynos5422-odroidxu3.dts


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/samsung/exynos_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/arch/arm/samsung/exynos_fdt.c
diff -u src/sys/arch/arm/samsung/exynos_fdt.c:1.2 src/sys/arch/arm/samsung/exynos_fdt.c:1.3
--- src/sys/arch/arm/samsung/exynos_fdt.c:1.2	Tue Dec 15 23:13:51 2015
+++ src/sys/arch/arm/samsung/exynos_fdt.c	Sun Dec 27 12:21:12 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: exynos_fdt.c,v 1.2 2015/12/15 23:13:51 marty Exp $ */
+/* $NetBSD: exynos_fdt.c,v 1.3 2015/12/27 12:21:12 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill 
@@ -29,7 +29,7 @@
 #include "opt_exynos.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: exynos_fdt.c,v 1.2 2015/12/15 23:13:51 marty Exp $");
+__KERNEL_RCSID(0, "$NetBSD: exynos_fdt.c,v 1.3 2015/12/27 12:21:12 jmcneill Exp $");
 
 #include 
 #include 
@@ -66,15 +66,10 @@ exynosfdt_attach(device_t parent, device
 {
 	const char *exynosfdt_init[] = {
 		"interrupt-controller",
-		"clock",
-		"pinmux",
-		"gpio",
-		"regulators",
-		"dma",
-		"pmc",
-		"memory-controller",
+		"clock-controller",
+		"pinctrl",
 		"i2c",
-		"usb-phy"
+		"phy"
 	};
 
 	exynosfdt_found = true;



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

2015-12-27 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Dec 27 12:22:28 UTC 2015

Modified Files:
src/sys/arch/arm/samsung: exynos_gpio.c

Log Message:
handle active low flag, simplify bank / pin name parsing, no need to panic if 
bank lookup fails


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/arm/samsung/exynos_gpio.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/samsung/exynos_gpio.c
diff -u src/sys/arch/arm/samsung/exynos_gpio.c:1.19 src/sys/arch/arm/samsung/exynos_gpio.c:1.20
--- src/sys/arch/arm/samsung/exynos_gpio.c:1.19	Sun Dec 27 02:43:42 2015
+++ src/sys/arch/arm/samsung/exynos_gpio.c	Sun Dec 27 12:22:28 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: exynos_gpio.c,v 1.19 2015/12/27 02:43:42 marty Exp $ */
+/*	$NetBSD: exynos_gpio.c,v 1.20 2015/12/27 12:22:28 jmcneill Exp $ */
 
 /*-
 * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
 #include "gpio.h"
 
 #include 
-__KERNEL_RCSID(1, "$NetBSD: exynos_gpio.c,v 1.19 2015/12/27 02:43:42 marty Exp $");
+__KERNEL_RCSID(1, "$NetBSD: exynos_gpio.c,v 1.20 2015/12/27 12:22:28 jmcneill Exp $");
 
 #include 
 #include 
@@ -159,8 +159,7 @@ static void exynos_gpio_fdt_release(devi
 
 static int exynos_gpio_fdt_read(device_t, void *, bool);
 static void exynos_gpio_fdt_write(device_t, void *, int, bool);
-static struct exynos_gpio_bank *
-exynos_gpio_pin_lookup(const char *pinname, int *ppin);
+static struct exynos_gpio_bank *exynos_gpio_bank_lookup(const char *);
 static int exynos_gpio_cfprint(void *, const char *);
 
 struct fdtbus_gpio_controller_func exynos_gpio_funcs = {
@@ -291,8 +290,12 @@ exynos_gpio_bank_config(struct exynos_pi
 	char result[64];
 
 	OF_getprop(node, "name", result, sizeof(result));
-	bank = exynos_gpio_pin_lookup(result, 0);
-	KASSERT(bank);
+	bank = exynos_gpio_bank_lookup(result);
+	if (bank == NULL) {
+		aprint_error_dev(parent->sc_dev, "no bank found for %s\n",
+		result);
+		return;
+	}
 	
 	sc->sc_dev = parent->sc_dev;
 	sc->sc_bst = _generic_bs_tag;
@@ -326,35 +329,12 @@ exynos_gpio_bank_config(struct exynos_pi
 	_gpio_funcs);
 }
 
-/*
- * pinmame = gpLD[-N]
- * L = 'a' - 'z' -+
- * D = '0' - '9' -+ = bank name
- * N = '0' - '7'= pin number
- */
-
 static struct exynos_gpio_bank *
-exynos_gpio_pin_lookup(const char *pinname, int *ppin)
+exynos_gpio_bank_lookup(const char *name)
 {
-	char bankname[5];
-	int pin = 0;
-	int n;
-	struct exynos_gpio_bank *bank;
-
-	memset(bankname, 0, sizeof(bankname));
-	for (n = 0; n < 4; n++)
-		bankname[n] = pinname[n];
-	bankname[n] = 0;
-	if (ppin && pinname[4] == '-') {
-		pin = pinname[5] - '0';	  /* skip the '-' */
-		if (pin < 0 || pin > 8)
-			return NULL;
-	}
-	for (n = 0; n < __arraycount(exynos5_banks); n++) {
-		bank = _gpio_banks[n];
-		if (strcmp(bank->bank_name, bankname) == 0) {
-			if (ppin)
-*ppin = pin;
+	for (u_int n = 0; n < __arraycount(exynos5_banks); n++) {
+		struct exynos_gpio_bank *bank = _gpio_banks[n];
+		if (strncmp(bank->bank_name, name, strlen(name)) == 0) {
 			return bank;
 		}
 	}
@@ -362,15 +342,34 @@ exynos_gpio_pin_lookup(const char *pinna
 	return NULL;
 }
 
+#if notyet
+static int
+exynos_gpio_pin_lookup(const char *name)
+{
+	char *p;
+
+	p = strchr(name, '-');
+	if (p == NULL || p[1] < '0' || p[1] > '9')
+		return -1;
+
+	return p[1] - '0';
+}
+#endif
+
 static void *
 exynos_gpio_fdt_acquire(device_t dev, const void *data, size_t len, int flags)
 {
 	const u_int *cells = data;
 	const struct exynos_gpio_bank *bank = NULL;
 	struct exynos_gpio_pin *gpin;
-	int pin = be32toh(cells[0]) & 0x0f;
 	int n;
 
+	if (len != 2)
+		return NULL;
+
+	const int pin = be32toh(cells[0]) & 0x0f;
+	const int actlo = be32toh(cells[1]) & 0x01;
+
 	for (n = 0; n < __arraycount(exynos5_banks); n++) {
 		if (exynos_gpio_banks[n].bank_sc->sc_dev == dev) {
 			bank = _gpio_banks[n];
@@ -386,7 +385,7 @@ exynos_gpio_fdt_acquire(device_t dev, co
 	gpin->pin_bank = bank;
 	gpin->pin_no = pin;
 	gpin->pin_flags = flags;
-	gpin->pin_actlo = 0;
+	gpin->pin_actlo = actlo;
 
 	exynos_gpio_pin_ctl(>pin_bank, gpin->pin_no, gpin->pin_flags);
 



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

2015-12-27 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Dec 27 12:26:42 UTC 2015

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

Log Message:
wildcard attachments to fdtbus


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/evbarm/conf/EXYNOS

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/EXYNOS
diff -u src/sys/arch/evbarm/conf/EXYNOS:1.8 src/sys/arch/evbarm/conf/EXYNOS:1.9
--- src/sys/arch/evbarm/conf/EXYNOS:1.8	Sun Dec 27 02:54:13 2015
+++ src/sys/arch/evbarm/conf/EXYNOS	Sun Dec 27 12:26:42 2015
@@ -1,5 +1,5 @@
 #
-#	$NetBSD: EXYNOS,v 1.8 2015/12/27 02:54:13 marty Exp $
+#	$NetBSD: EXYNOS,v 1.9 2015/12/27 12:26:42 jmcneill Exp $
 #
 #	ODROID-XU -- ODROID-XU4 Exynos5422 based kernel
 #
@@ -218,26 +218,21 @@ exy5422clk*	at fdt?# Exynos5422 cloc
 
 # Integrated Samsung UARTs
 sscom*		at fdt?# UART ?
-#sscom2		at fdt?# console
 
 # Exynos Watchdog Timer
-exyowdt0 	at fdt?# watchdog
+exyowdt* 	at fdt?# watchdog
 
 # Exynos chip id
-chipid0		at fdt?
+chipid*		at fdt?
 
 # Exynos RTC
-exyortc0 	at fdt?
+exyortc* 	at fdt?
 
 # Exynos Multi Core timer (MCT)
-mct0	   at fdt?
+mct*	   at fdt?
 
 # GPIO
-exyopctl0	at fdt?
-exyopctl1	at fdt?
-exyopctl2	at fdt?
-exyopctl3	at fdt?
-exyopctl4	at fdt?
+exyopctl*	at fdt?
 gpio*		at gpiobus?
 
 # On-board USB 2.0
@@ -253,10 +248,7 @@ exyousb*   at fdt?
 #usb*	   at xhci?
 
 # I2C devices
-exyoi2c0	at fdt?
-exyoi2c1	at fdt?
-exyoi2c2	at fdt?
-exyoi2c3	at fdt?
+exyoi2c*	at fdt?
 #i2c*		at exyoi2c?
 
 # SD/MMC



CVS commit: src/usr.sbin/ip6addrctl

2015-12-27 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sun Dec 27 12:42:52 UTC 2015

Modified Files:
src/usr.sbin/ip6addrctl: ip6addrctl.c

Log Message:
usage is dead


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/ip6addrctl/ip6addrctl.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/ip6addrctl/ip6addrctl.c
diff -u src/usr.sbin/ip6addrctl/ip6addrctl.c:1.1 src/usr.sbin/ip6addrctl/ip6addrctl.c:1.2
--- src/usr.sbin/ip6addrctl/ip6addrctl.c:1.1	Sat Dec 12 23:35:56 2015
+++ src/usr.sbin/ip6addrctl/ip6addrctl.c	Sun Dec 27 12:42:52 2015
@@ -31,7 +31,7 @@
  * $FreeBSD: head/usr.sbin/ip6addrctl/ip6addrctl.c 281143 2015-04-06 09:42:23Z glebius $
  */
 #include 
-__RCSID("$NetBSD: ip6addrctl.c,v 1.1 2015/12/12 23:35:56 christos Exp $");
+__RCSID("$NetBSD: ip6addrctl.c,v 1.2 2015/12/27 12:42:52 joerg Exp $");
 
 #include 
 #include 
@@ -62,7 +62,7 @@ struct policyqueue {
 TAILQ_HEAD(policyhead, policyqueue);
 static struct policyhead policyhead;
 
-static void usage(void);
+static void usage(void) __dead;
 static void get_policy(void);
 static void dump_policy(void);
 static int mask2plen(struct sockaddr_in6 *);



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

2015-12-27 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Dec 27 12:42:14 UTC 2015

Modified Files:
src/sys/arch/arm/samsung: exynos_gpio.c

Log Message:
make exynos_gpio_fdt_acquire actually work, now dwcmmc properly does card 
detect for micro SD slot


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/arm/samsung/exynos_gpio.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/samsung/exynos_gpio.c
diff -u src/sys/arch/arm/samsung/exynos_gpio.c:1.20 src/sys/arch/arm/samsung/exynos_gpio.c:1.21
--- src/sys/arch/arm/samsung/exynos_gpio.c:1.20	Sun Dec 27 12:22:28 2015
+++ src/sys/arch/arm/samsung/exynos_gpio.c	Sun Dec 27 12:42:14 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: exynos_gpio.c,v 1.20 2015/12/27 12:22:28 jmcneill Exp $ */
+/*	$NetBSD: exynos_gpio.c,v 1.21 2015/12/27 12:42:14 jmcneill Exp $ */
 
 /*-
 * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
 #include "gpio.h"
 
 #include 
-__KERNEL_RCSID(1, "$NetBSD: exynos_gpio.c,v 1.20 2015/12/27 12:22:28 jmcneill Exp $");
+__KERNEL_RCSID(1, "$NetBSD: exynos_gpio.c,v 1.21 2015/12/27 12:42:14 jmcneill Exp $");
 
 #include 
 #include 
@@ -325,7 +325,7 @@ exynos_gpio_bank_config(struct exynos_pi
 	bank->bank_cfg.conpwd = GPIO_READ(bank, EXYNOS_GPIO_CONPWD);
 	bank->bank_cfg.pudpwd = GPIO_READ(bank, EXYNOS_GPIO_PUDPWD);
 
-	fdtbus_register_gpio_controller(bank->bank_dev, faa->faa_phandle,
+	fdtbus_register_gpio_controller(bank->bank_dev, node,
 	_gpio_funcs);
 }
 
@@ -360,18 +360,18 @@ static void *
 exynos_gpio_fdt_acquire(device_t dev, const void *data, size_t len, int flags)
 {
 	const u_int *cells = data;
-	const struct exynos_gpio_bank *bank = NULL;
+	struct exynos_gpio_bank *bank = NULL;
 	struct exynos_gpio_pin *gpin;
 	int n;
 
-	if (len != 2)
+	if (len != 12)
 		return NULL;
 
-	const int pin = be32toh(cells[0]) & 0x0f;
-	const int actlo = be32toh(cells[1]) & 0x01;
+	const int pin = be32toh(cells[1]) & 0x0f;
+	const int actlo = be32toh(cells[2]) & 0x01;
 
 	for (n = 0; n < __arraycount(exynos5_banks); n++) {
-		if (exynos_gpio_banks[n].bank_sc->sc_dev == dev) {
+		if (exynos_gpio_banks[n].bank_dev == dev) {
 			bank = _gpio_banks[n];
 			break;
 		}
@@ -387,7 +387,7 @@ exynos_gpio_fdt_acquire(device_t dev, co
 	gpin->pin_flags = flags;
 	gpin->pin_actlo = actlo;
 
-	exynos_gpio_pin_ctl(>pin_bank, gpin->pin_no, gpin->pin_flags);
+	exynos_gpio_pin_ctl(bank, gpin->pin_no, gpin->pin_flags);
 
 	return gpin;
 }



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

2015-12-27 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sun Dec 27 12:42:18 UTC 2015

Modified Files:
src/external/bsd/mdocml/dist: mandoc_aux.h

Log Message:
Mark mandoc_asprintf as printf-like


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/mdocml/dist/mandoc_aux.h

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

Modified files:

Index: src/external/bsd/mdocml/dist/mandoc_aux.h
diff -u src/external/bsd/mdocml/dist/mandoc_aux.h:1.1.1.1 src/external/bsd/mdocml/dist/mandoc_aux.h:1.2
--- src/external/bsd/mdocml/dist/mandoc_aux.h:1.1.1.1	Thu Dec 17 21:58:48 2015
+++ src/external/bsd/mdocml/dist/mandoc_aux.h	Sun Dec 27 12:42:17 2015
@@ -1,4 +1,4 @@
-/*	$Id: mandoc_aux.h,v 1.1.1.1 2015/12/17 21:58:48 christos Exp $ */
+/*	$Id: mandoc_aux.h,v 1.2 2015/12/27 12:42:17 joerg Exp $ */
 /*
  * Copyright (c) 2009, 2011 Kristaps Dzonsons 
  * Copyright (c) 2014 Ingo Schwarze 
@@ -18,6 +18,9 @@
 
 __BEGIN_DECLS
 
+#if __GNUC__ - 0 >= 4
+__attribute__((__format__ (__printf__, 2, 3)))
+#endif
 int		  mandoc_asprintf(char **, const char *, ...);
 void		 *mandoc_calloc(size_t, size_t);
 void		 *mandoc_malloc(size_t);