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

2015-04-18 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Apr 18 11:04:49 UTC 2015

Modified Files:
src/sys/arch/evbarm/awin: awin_start.S

Log Message:
Use character constants instead of ascii values for readability

Print A80 in the A80 case and actually print the CPU number for A31/A80


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/evbarm/awin/awin_start.S

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

Modified files:

Index: src/sys/arch/evbarm/awin/awin_start.S
diff -u src/sys/arch/evbarm/awin/awin_start.S:1.11 src/sys/arch/evbarm/awin/awin_start.S:1.12
--- src/sys/arch/evbarm/awin/awin_start.S:1.11	Fri Dec 26 21:45:17 2014
+++ src/sys/arch/evbarm/awin/awin_start.S	Sat Apr 18 11:04:49 2015
@@ -41,7 +41,7 @@
 #include arm/allwinner/awin_reg.h
 #include evbarm/awin/platform.h  
 
-RCSID($NetBSD: awin_start.S,v 1.11 2014/12/26 21:45:17 martin Exp $)
+RCSID($NetBSD: awin_start.S,v 1.12 2015/04/18 11:04:49 skrll Exp $)
 
 #if defined(VERBOSE_INIT_ARM)
 #define	XPUTC(n)	mov r0, n; bl xputc
@@ -117,7 +117,7 @@ _C_LABEL(awin_start):
 	movw	r1, #:lower16:.Lmmu_init_table
 	movt	r1, #:upper16:.Lmmu_init_table
 	bl	arm_boot_l1pt_init
-	XPUTC(#68)
+	XPUTC(#'D')
 
 	/*
 	 * Turn on the MMU, Caches, etc.  Return to new enabled address space.
@@ -141,13 +141,13 @@ _C_LABEL(awin_start):
 	.pushsection .text,ax,%progbits
 1:
 #endif
-	XPUTC2(#90)
+	XPUTC2(#'Z')
 
 #if defined(MULTIPROCESSOR)
 	// Now spin up the second processors into the same state we are now.
-	XPUTC2(#77)
-	XPUTC2(#80)
-	XPUTC2(#60)
+	XPUTC2(#'M')
+	XPUTC2(#'P')
+	XPUTC2(#'')
 	// Make sure the cache is flushed out to RAM for the other CPUs
 	bl	_C_LABEL(armv7_dcache_wbinv_all)
 
@@ -193,7 +193,7 @@ _C_LABEL(awin_start):
 	bl	a80_mpinit
 #endif
 
-	XPUTC2(#62)
+	XPUTC2(#'')
 #endif /* MULTIPROCESSOR */
 	XPUTC2(#13)
 	XPUTC2(#10)
@@ -220,9 +220,9 @@ a20_mpinit:
 	movw	r5, #:lower16:(AWIN_CORE_PBASE+AWIN_CPUCFG_OFFSET)
 	movt	r5, #:upper16:(AWIN_CORE_PBASE+AWIN_CPUCFG_OFFSET)
 
-	XPUTC2(#65)
-	XPUTC2(#50)
-	XPUTC2(#48)
+	XPUTC2(#'A')
+	XPUTC2(#'2')
+	XPUTC2(#'0')
 
 #ifdef __ARMEB__
 	setend	le			// everything here is little-endian
@@ -315,9 +315,9 @@ a31_mpinit:
 	movw	r6, #:lower16:(AWIN_CORE_PBASE+AWIN_A31_PRCM_OFFSET)
 	movt	r6, #:upper16:(AWIN_CORE_PBASE+AWIN_A31_PRCM_OFFSET)
 
-	XPUTC2(#65)
-	XPUTC2(#51)
-	XPUTC2(#49)
+	XPUTC2(#'A')
+	XPUTC2(#'3')
+	XPUTC2(#'1')
 
 #ifdef __ARMEB__
 	setend	le			// everything here is little-endian
@@ -327,7 +327,8 @@ a31_mpinit:
 
 a31_mpinit_cpu:
 
-	XPUTC2(r12)
+	add	r1, r12, #'0'
+	XPUTC2(r1)
 
 	/* Set where the other CPU(s) are going to execute */
 	movw	r1, #:lower16:cortex_mpstart
@@ -453,9 +454,9 @@ a80_mpinit:
 	movw	r6, #:lower16:(AWIN_A80_RCPUS_PBASE+AWIN_A80_RPRCM_OFFSET)
 	movt	r6, #:upper16:(AWIN_A80_RCPUS_PBASE+AWIN_A80_RPRCM_OFFSET)
 
-	XPUTC2(#65)
-	XPUTC2(#51)
-	XPUTC2(#49)
+	XPUTC2(#'A')
+	XPUTC2(#'8')
+	XPUTC2(#'0')
 
 #ifdef __ARMEB__
 	setend	le			// everything here is little-endian
@@ -465,7 +466,8 @@ a80_mpinit:
 
 a80_mpinit_cpu:
 
-	XPUTC2(r12)
+	add	r1, r12, #'0'
+	XPUTC2(r1)
 
 	/* Set where the other CPU(s) are going to execute */
 	movw	r1, #:lower16:cortex_mpstart



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

2015-04-18 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Apr 18 11:32:37 UTC 2015

Modified Files:
src/sys/arch/evbarm/conf: GENERIC.common

Log Message:
Enable COMPAT_NETBSD32


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

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/GENERIC.common
diff -u src/sys/arch/evbarm/conf/GENERIC.common:1.4 src/sys/arch/evbarm/conf/GENERIC.common:1.5
--- src/sys/arch/evbarm/conf/GENERIC.common:1.4	Sun Apr 12 14:55:30 2015
+++ src/sys/arch/evbarm/conf/GENERIC.common	Sat Apr 18 11:32:37 2015
@@ -1,5 +1,5 @@
 #
-#	$NetBSD: GENERIC.common,v 1.4 2015/04/12 14:55:30 jmcneill Exp $
+#	$NetBSD: GENERIC.common,v 1.5 2015/04/18 11:32:37 skrll Exp $
 #
 #	GENERIC evbarm kernel config (template)
 #
@@ -60,7 +60,7 @@ options 	NFS_BOOT_RWSIZE=1024
 
 # Compatibility options
 
-#options 	COMPAT_NETBSD32	# allow running arm (e.g. non-earm) binaries
+options 	COMPAT_NETBSD32	# allow running arm (e.g. non-earm) binaries
 #options 	COMPAT_43	# 4.3BSD compatibility.
 #options 	COMPAT_09	# NetBSD 0.9,
 #options 	COMPAT_10	# NetBSD 1.0,



CVS commit: src/sys/rump

2015-04-18 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Sat Apr 18 15:49:18 UTC 2015

Modified Files:
src/sys/rump/kern/lib/libsysproxy: sysproxy.c
src/sys/rump/librump/rumpkern: emul.c lwproc.c rump_private.h
rumpcopy.c signals.c vm.c

Log Message:
Give remote clients struct pmap storage.  Although the pmap is unused,
that way we can sure that the pmap macro framework doesn't access all
the wrong places.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/rump/kern/lib/libsysproxy/sysproxy.c
cvs rdiff -u -r1.169 -r1.170 src/sys/rump/librump/rumpkern/emul.c
cvs rdiff -u -r1.34 -r1.35 src/sys/rump/librump/rumpkern/lwproc.c
cvs rdiff -u -r1.90 -r1.91 src/sys/rump/librump/rumpkern/rump_private.h
cvs rdiff -u -r1.19 -r1.20 src/sys/rump/librump/rumpkern/rumpcopy.c
cvs rdiff -u -r1.14 -r1.15 src/sys/rump/librump/rumpkern/signals.c
cvs rdiff -u -r1.165 -r1.166 src/sys/rump/librump/rumpkern/vm.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/rump/kern/lib/libsysproxy/sysproxy.c
diff -u src/sys/rump/kern/lib/libsysproxy/sysproxy.c:1.2 src/sys/rump/kern/lib/libsysproxy/sysproxy.c:1.3
--- src/sys/rump/kern/lib/libsysproxy/sysproxy.c:1.2	Fri Apr  3 16:40:55 2015
+++ src/sys/rump/kern/lib/libsysproxy/sysproxy.c	Sat Apr 18 15:49:18 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: sysproxy.c,v 1.2 2015/04/03 16:40:55 pooka Exp $	*/
+/*	$NetBSD: sysproxy.c,v 1.3 2015/04/18 15:49:18 pooka Exp $	*/
 
 /*
  * Copyright (c) 2010, 2011 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: sysproxy.c,v 1.2 2015/04/03 16:40:55 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: sysproxy.c,v 1.3 2015/04/18 15:49:18 pooka Exp $);
 
 #include sys/param.h
 #include sys/filedesc.h
@@ -76,9 +76,12 @@ hyp_syscall(int num, void *arg, long *re
 	return rv;
 }
 
+static struct pmap remotepmap;
+
 static int
 hyp_rfork(void *priv, int flags, const char *comm)
 {
+	struct rump_spctl *spctl;
 	struct vmspace *vm;
 	struct proc *p;
 	struct lwp *l;
@@ -97,10 +100,12 @@ hyp_rfork(void *priv, int flags, const c
 	}
 
 	/*
-	 * Since it's a proxy proc, we need create a vmspace for it.
+	 * Since it's a proxy proc, we create a vmspace for it.
 	 */
-	vm = kmem_zalloc(sizeof(*vm), KM_SLEEP);
-	uvmspace_init(vm, priv, 0, 0, false);
+	spctl = kmem_zalloc(sizeof(*spctl), KM_SLEEP);
+	vm = spctl-spctl_vm;
+	uvmspace_init(vm, remotepmap, 0, 0, false);
+	spctl-spctl = priv;
 
 	if ((error = rump_lwproc_rfork_vmspace(vm, flags)) != 0) {
 		kmem_free(vm, sizeof(*vm));

Index: src/sys/rump/librump/rumpkern/emul.c
diff -u src/sys/rump/librump/rumpkern/emul.c:1.169 src/sys/rump/librump/rumpkern/emul.c:1.170
--- src/sys/rump/librump/rumpkern/emul.c:1.169	Sat Jan  3 17:23:51 2015
+++ src/sys/rump/librump/rumpkern/emul.c	Sat Apr 18 15:49:18 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: emul.c,v 1.169 2015/01/03 17:23:51 pooka Exp $	*/
+/*	$NetBSD: emul.c,v 1.170 2015/04/18 15:49:18 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007-2011 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: emul.c,v 1.169 2015/01/03 17:23:51 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: emul.c,v 1.170 2015/04/18 15:49:18 pooka Exp $);
 
 #include sys/param.h
 #include sys/null.h
@@ -362,7 +362,7 @@ cpu_reboot(int howto, char *bootstr)
 	printf(rump kernel halting...\n);
 
 	if (!RUMP_LOCALPROC_P(curproc))
-		finiarg = curproc-p_vmspace-vm_map.pmap;
+		finiarg = RUMP_SPVM2CTL(curproc-p_vmspace);
 	else
 		finiarg = NULL;
 

Index: src/sys/rump/librump/rumpkern/lwproc.c
diff -u src/sys/rump/librump/rumpkern/lwproc.c:1.34 src/sys/rump/librump/rumpkern/lwproc.c:1.35
--- src/sys/rump/librump/rumpkern/lwproc.c:1.34	Fri Apr 17 13:03:38 2015
+++ src/sys/rump/librump/rumpkern/lwproc.c	Sat Apr 18 15:49:18 2015
@@ -1,4 +1,4 @@
-/*  $NetBSD: lwproc.c,v 1.34 2015/04/17 13:03:38 pooka Exp $	*/
+/*  $NetBSD: lwproc.c,v 1.35 2015/04/18 15:49:18 pooka Exp $	*/
 
 /*
  * Copyright (c) 2010, 2011 Antti Kantee.  All Rights Reserved.
@@ -28,7 +28,7 @@
 #define RUMP__CURLWP_PRIVATE
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: lwproc.c,v 1.34 2015/04/17 13:03:38 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: lwproc.c,v 1.35 2015/04/18 15:49:18 pooka Exp $);
 
 #include sys/param.h
 #include sys/atomic.h
@@ -132,8 +132,9 @@ lwproc_proc_free(struct proc *p)
 
 	/* non-local vmspaces are not shared */
 	if (!RUMP_LOCALPROC_P(p)) {
+		struct rump_spctl *ctl = (struct rump_spctl *)p-p_vmspace;
 		KASSERT(p-p_vmspace-vm_refcnt == 1);
-		kmem_free(p-p_vmspace, sizeof(*p-p_vmspace));
+		kmem_free(ctl, sizeof(*ctl));
 	}
 
 	proc_free_mem(p);

Index: src/sys/rump/librump/rumpkern/rump_private.h
diff -u src/sys/rump/librump/rumpkern/rump_private.h:1.90 src/sys/rump/librump/rumpkern/rump_private.h:1.91
--- src/sys/rump/librump/rumpkern/rump_private.h:1.90	Fri Apr 17 12:43:16 2015
+++ 

CVS commit: src/sys/dev/sysmon

2015-04-18 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Apr 18 10:49:32 UTC 2015

Modified Files:
src/sys/dev/sysmon: swwdog.c

Log Message:
Update attach/detach routines and provide MODULE interface.

Confirmed that atf tests (which run via rump) still pass, and also
confirmed that panic/reboot work in both monolithic kernel and
loaded module.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/dev/sysmon/swwdog.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/sysmon/swwdog.c
diff -u src/sys/dev/sysmon/swwdog.c:1.13 src/sys/dev/sysmon/swwdog.c:1.14
--- src/sys/dev/sysmon/swwdog.c:1.13	Sun Apr 13 13:19:50 2014
+++ src/sys/dev/sysmon/swwdog.c	Sat Apr 18 10:49:31 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: swwdog.c,v 1.13 2014/04/13 13:19:50 pgoyette Exp $	*/
+/*	$NetBSD: swwdog.c,v 1.14 2015/04/18 10:49:31 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 2004, 2005 Steven M. Bellovin
@@ -33,7 +33,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: swwdog.c,v 1.13 2014/04/13 13:19:50 pgoyette Exp $);
+__KERNEL_RCSID(0, $NetBSD: swwdog.c,v 1.14 2015/04/18 10:49:31 pgoyette Exp $);
 
 /*
  *
@@ -41,8 +41,8 @@ __KERNEL_RCSID(0, $NetBSD: swwdog.c,v 1
  *
  */
 #include sys/param.h
-#include sys/callout.h
 #include sys/device.h
+#include sys/callout.h
 #include sys/kernel.h
 #include sys/kmem.h
 #include sys/reboot.h
@@ -50,41 +50,58 @@ __KERNEL_RCSID(0, $NetBSD: swwdog.c,v 1
 #include sys/sysctl.h
 #include sys/wdog.h
 #include sys/workqueue.h
+#include sys/module.h
 #include dev/sysmon/sysmonvar.h
 
-#include ioconf.h
+#ifndef _MODULE
+#include opt_modular.h
+#endif
 
 struct swwdog_softc {
-	device_t sc_dev;
-	struct sysmon_wdog sc_smw;
-	struct callout sc_c;
-	int sc_wdog_armed;
+	device_t		sc_dev;
+	struct sysmon_wdog	sc_smw;
+	struct callout		sc_c;
+	int			sc_armed;
 };
 
-void		swwdogattach(int);
+bool	swwdog_reboot = false;	/* false -- panic , true  -- reboot */
 
-static int	swwdog_match(device_t, cfdata_t, void *);
-static void	swwdog_attach(device_t, device_t, void *);
-static int	swwdog_detach(device_t, int);
-static bool	swwdog_suspend(device_t, const pmf_qual_t *);
+static struct workqueue *wq;
+static device_t		swwdog_dev;
 
-static int swwdog_setmode(struct sysmon_wdog *);
-static int swwdog_tickle(struct sysmon_wdog *);
+MODULE(MODULE_CLASS_DRIVER, swwdog, NULL);
 
-static int swwdog_arm(struct swwdog_softc *);
-static int swwdog_disarm(struct swwdog_softc *);
+#ifdef _LKM
+CFDRIVER_DECL(swwdog, DV_DULL, NULL);
+#endif
 
-static void swwdog_panic(void *);
+int swwdogattach(int);
 
-bool swwdog_reboot = false;		/* set for panic instead of reboot */
+static int	swwdog_setmode(struct sysmon_wdog *);
+static int	swwdog_tickle(struct sysmon_wdog *);
+static bool	swwdog_suspend(device_t, const pmf_qual_t *);
+static int	swwdog_arm(struct swwdog_softc *);
+static int	swwdog_disarm(struct swwdog_softc *);
 
-#define	SWDOG_DEFAULT	60		/* 60-second default period */
+static void	swwdog_panic(void *);
+
+static void	swwdog_sysctl_setup(void);
+static struct sysctllog *swwdog_sysctllog = NULL;
+
+static int	swwdog_match(device_t, cfdata_t, void *);
+static void	swwdog_attach(device_t, device_t, void *);
+static int	swwdog_detach(device_t, int);
+static bool	swwdog_suspend(device_t, const pmf_qual_t *);
+
+static int	swwdog_init(void *);
+static int	swwdog_fini(void *);
+static int	swwdog_modcmd(modcmd_t, void *);
 
 CFATTACH_DECL_NEW(swwdog, sizeof(struct swwdog_softc),
 	swwdog_match, swwdog_attach, swwdog_detach, NULL);
+extern struct cfdriver swwdog_cd;
 
-static void swwdog_sysctl_setup(void);
-static struct sysctllog *swwdog_sysctllog;
+#define	SWDOG_DEFAULT	60		/* 60-second default period */
 
 static void
 doreboot(struct work *wrkwrkwrk, void *p)
@@ -93,41 +110,51 @@ doreboot(struct work *wrkwrkwrk, void *p
 	cpu_reboot(0, NULL);
 }
 
-static struct workqueue *wq;
-
-void
+int
 swwdogattach(int n __unused)
 {
-	int err;
+	int error;
 	static struct cfdata cf;
 
+printf(%s: entered\n, __func__); /* XXX PRG */
 	if (workqueue_create(wq, swwreboot, doreboot, NULL,
 	PRI_NONE, IPL_NONE, 0) != 0) {
 		aprint_error(failed to create swwdog reboot wq);
+		return 1;
 	}
 
-	err = config_cfattach_attach(swwdog_cd.cd_name, swwdog_ca);
-	if (err) {
-		aprint_error(%s: couldn't register cfattach: %d\n,
-		swwdog_cd.cd_name, err);
-		config_cfdriver_detach(swwdog_cd);
+	error = config_cfattach_attach(swwdog_cd.cd_name, swwdog_ca);
+	if (error) {
+		aprint_error(%s: unable to attach cfattach\n,
+		swwdog_cd.cd_name);
 		workqueue_destroy(wq);
-		return;
+		return error;
 	}
 
 	cf.cf_name = swwdog_cd.cd_name;
 	cf.cf_atname = swwdog_cd.cd_name;
 	cf.cf_unit = 0;
 	cf.cf_fstate = FSTATE_STAR;
-
-	(void)config_attach_pseudo(cf);
-
-	return;
+	cf.cf_pspec = NULL;
+	cf.cf_loc = NULL;
+	cf.cf_flags = 0;
+
+	swwdog_dev = config_attach_pseudo(cf);
+
+printf(%s: swwdog_dev = 

CVS commit: src/sys/dev

2015-04-18 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sat Apr 18 11:23:58 UTC 2015

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

Log Message:
add best match algorithm to wsfont and use this instead of a private
function in rasops.


To generate a diff of this commit:
cvs rdiff -u -r1.72 -r1.73 src/sys/dev/rasops/rasops.c
cvs rdiff -u -r1.57 -r1.58 src/sys/dev/wsfont/wsfont.c
cvs rdiff -u -r1.24 -r1.25 src/sys/dev/wsfont/wsfont.h

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

Modified files:

Index: src/sys/dev/rasops/rasops.c
diff -u src/sys/dev/rasops/rasops.c:1.72 src/sys/dev/rasops/rasops.c:1.73
--- src/sys/dev/rasops/rasops.c:1.72	Mon Aug 18 03:59:27 2014
+++ src/sys/dev/rasops/rasops.c	Sat Apr 18 11:23:58 2015
@@ -1,4 +1,4 @@
-/*	 $NetBSD: rasops.c,v 1.72 2014/08/18 03:59:27 riastradh Exp $	*/
+/*	 $NetBSD: rasops.c,v 1.73 2015/04/18 11:23:58 mlelstv Exp $	*/
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rasops.c,v 1.72 2014/08/18 03:59:27 riastradh Exp $);
+__KERNEL_RCSID(0, $NetBSD: rasops.c,v 1.73 2015/04/18 11:23:58 mlelstv Exp $);
 
 #include opt_rasops.h
 #include rasops_glue.h
@@ -181,57 +181,6 @@ void	rasops_make_box_chars_alpha(struct 
 extern int cold;
 
 /*
- * Rate a font based on how many character cells we would get out of it in the
- * current video mode. Lower is better.
- */
-static void
-rasops_matches(struct wsdisplay_font *font, void *cookie, int ident)
-{
-	struct rasops_matchdata *md = cookie;
-	struct rasops_info *ri = md-ri;
-	int cols, score = 1;
-
-	/* first weed out fonts the caller doesn't claim support for */
-	if (FONT_IS_ALPHA(font)) {
-		/*
-		 * If we end up with a bitmap font and an alpha font with
-		 * otherwise identical scores, prefer alpha
-		 */
-		score = 0;
-		if ((ri-ri_flg  RI_ENABLE_ALPHA) == 0)
-			return;
-	}
-	cols = ri-ri_width / font-fontwidth;
-	/*
-	 * if the font is too small to allow 80 columns give those closer to
-	 * 80 a better score but with a huge penalty compared to fonts that
-	 * give us 80 columns or more
-	 */ 
-	if (cols  md-wantcols) {
-		score += 10 + 2 * (md-wantcols - cols);
-	} else 
-		score += 2 * cols;
-	DPRINTF(%s: %d\n, font-name, score);
-	if (score  md-bestscore) {
-		md-bestscore = score;
-		md-pick = font;
-		md-ident = ident;
-	}
-}
-
-static int
-rasops_find(struct rasops_info *ri, int wantrows, int wantcols)
-{
-	struct rasops_matchdata md =
-	{ ri, wantcols, wantrows, 100, NULL, 0};
-
-	wsfont_walk(rasops_matches, md);
-	if (md.pick == NULL)
-		return -1;
-	return (wsfont_make_cookie(md.ident, WSDISPLAY_FONTORDER_L2R,
-			WSDISPLAY_FONTORDER_L2R));
-}
-/*
  * Initialize a 'rasops_info' descriptor.
  */
 int
@@ -243,6 +192,7 @@ rasops_init(struct rasops_info *ri, int 
 	/* Select a font if the caller doesn't care */
 	if (ri-ri_font == NULL) {
 		int cookie = -1;
+		int flags;
 
 		wsfont_init();
 
@@ -254,7 +204,18 @@ rasops_init(struct rasops_info *ri, int 
 			wantrows = RASOPS_DEFAULT_HEIGHT;
 		if (wantcols == 0)
 			wantcols = RASOPS_DEFAULT_WIDTH;
-		cookie = rasops_find(ri, wantrows, wantcols);
+
+		flags = WSFONT_FIND_BESTWIDTH | WSFONT_FIND_BITMAP;
+		if ((ri-ri_flg  RI_ENABLE_ALPHA) != 0)
+			flags |= WSFONT_FIND_ALPHA;
+
+		cookie = wsfont_find(NULL,
+			ri-ri_width / wantcols,
+			0,
+			0,
+			WSDISPLAY_FONTORDER_L2R,
+			WSDISPLAY_FONTORDER_L2R,
+			flags);
 
 		/*
 		 * this means there is no supported font in the list

Index: src/sys/dev/wsfont/wsfont.c
diff -u src/sys/dev/wsfont/wsfont.c:1.57 src/sys/dev/wsfont/wsfont.c:1.58
--- src/sys/dev/wsfont/wsfont.c:1.57	Sun Jan 25 20:09:42 2015
+++ src/sys/dev/wsfont/wsfont.c	Sat Apr 18 11:23:58 2015
@@ -1,4 +1,4 @@
-/* 	$NetBSD: wsfont.c,v 1.57 2015/01/25 20:09:42 christos Exp $	*/
+/* 	$NetBSD: wsfont.c,v 1.58 2015/04/18 11:23:58 mlelstv Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: wsfont.c,v 1.57 2015/01/25 20:09:42 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: wsfont.c,v 1.58 2015/04/18 11:23:58 mlelstv Exp $);
 
 #include opt_wsfont.h
 
@@ -570,6 +570,7 @@ int
 wsfont_matches(struct wsdisplay_font *font, const char *name,
 	   int width, int height, int stride, int flags)
 {
+	int score = 1;
 
 	/* first weed out fonts the caller doesn't claim support for */
 	if (FONT_IS_ALPHA(font)) {
@@ -583,8 +584,16 @@ wsfont_matches(struct wsdisplay_font *fo
 	if (height != 0  font-fontheight != height)
 		return (0);
 
-	if (width != 0  font-fontwidth != width)
-		return (0);
+	if (width != 0) {
+		if ((flags  WSFONT_FIND_BESTWIDTH) == 0) {
+			if (font-fontwidth != width)
+return (0);
+		} else {
+			if (font-fontwidth  width)
+return (0);
+			score -= min(width - font-fontwidth, );
+		}
+	}
 
 	if (stride 

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

2015-04-18 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Apr 18 14:09:32 UTC 2015

Modified Files:
src/sys/arch/arm/pic: pic.c

Log Message:
Serialise work in pic_add.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/arm/pic/pic.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/pic/pic.c
diff -u src/sys/arch/arm/pic/pic.c:1.34 src/sys/arch/arm/pic/pic.c:1.35
--- src/sys/arch/arm/pic/pic.c:1.34	Wed Apr 15 15:45:06 2015
+++ src/sys/arch/arm/pic/pic.c	Sat Apr 18 14:09:32 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: pic.c,v 1.34 2015/04/15 15:45:06 matt Exp $	*/
+/*	$NetBSD: pic.c,v 1.35 2015/04/18 14:09:32 skrll Exp $	*/
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -33,7 +33,7 @@
 #include opt_multiprocessor.h
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pic.c,v 1.34 2015/04/15 15:45:06 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: pic.c,v 1.35 2015/04/18 14:09:32 skrll Exp $);
 
 #include sys/param.h
 #include sys/atomic.h
@@ -42,6 +42,8 @@ __KERNEL_RCSID(0, $NetBSD: pic.c,v 1.34
 #include sys/intr.h
 #include sys/kernel.h
 #include sys/kmem.h
+#include sys/mutex.h
+#include sys/once.h
 #include sys/xcall.h
 #include sys/ipi.h
 
@@ -98,11 +100,15 @@ struct intrsource **pic_iplsource[NIPL] 
 	[0 ... NIPL-1] = pic__iplsources,
 };
 size_t pic_ipl_offset[NIPL+1];
+
+static kmutex_t pic_lock;
 size_t pic_sourcebase;
 static struct evcnt pic_deferral_ev = 
 EVCNT_INITIALIZER(EVCNT_TYPE_MISC, NULL, deferred, intr);
 EVCNT_ATTACH_STATIC(pic_deferral_ev);
 
+static int pic_init(void);
+
 #ifdef __HAVE_PIC_SET_PRIORITY
 void
 pic_set_priority(struct cpu_info *ci, int newipl)
@@ -622,10 +628,23 @@ pic_pending_zero(void *v0, void *v1, str
 }
 #endif /* __HAVE_PIC_PENDING_INTRS  MULTIPROCESSOR */
 
+static int
+pic_init(void)
+{
+
+	mutex_init(pic_lock, MUTEX_DEFAULT, IPL_HIGH);
+
+	return 0;
+}
+
 void
 pic_add(struct pic_softc *pic, int irqbase)
 {
 	int slot, maybe_slot = -1;
+	size_t sourcebase;
+	static ONCE_DECL(pic_once);
+
+	RUN_ONCE(pic_once, pic_init);
 
 	KASSERT(strlen(pic-pic_name)  0);
 
@@ -641,6 +660,7 @@ pic_add(struct pic_softc *pic, int irqba
 	}
 #endif /* __HAVE_PIC_PENDING_INTRS  MULTIPROCESSOR */
 
+	mutex_enter(pic_lock);
 	for (slot = 0; slot  PIC_MAXPICS; slot++) {
 		struct pic_softc * const xpic = pic_list[slot];
 		if (xpic == NULL) {
@@ -669,6 +689,10 @@ pic_add(struct pic_softc *pic, int irqba
 	KASSERTMSG(pic-pic_maxsources = PIC_MAXSOURCES, %zu,
 	pic-pic_maxsources);
 	KASSERT(pic_sourcebase + pic-pic_maxsources = PIC_MAXMAXSOURCES);
+	sourcebase = pic_sourcebase;
+	pic_sourcebase += pic-pic_maxsources;
+
+	mutex_exit(pic_lock);
 
 	/*
 	 * Allocate a pointer to each cpu's evcnts and then, for each cpu,
@@ -686,9 +710,8 @@ pic_add(struct pic_softc *pic, int irqba
 	 */
 	percpu_foreach(pic-pic_percpu, pic_percpu_allocate, pic);
 
-	pic-pic_sources = pic_sources[pic_sourcebase];
+	pic-pic_sources = pic_sources[sourcebase];
 	pic-pic_irqbase = irqbase;
-	pic_sourcebase += pic-pic_maxsources;
 	pic-pic_id = slot;
 #ifdef __HAVE_PIC_SET_PRIORITY
 	KASSERT((slot == 0) == (pic-pic_ops-pic_set_priority != NULL));



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

2015-04-18 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sat Apr 18 14:21:41 UTC 2015

Modified Files:
src/sys/arch/amiga/dev: wdc_amiga.c

Log Message:
detect a4000 hardware only once, then use the result.


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/sys/arch/amiga/dev/wdc_amiga.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/amiga/dev/wdc_amiga.c
diff -u src/sys/arch/amiga/dev/wdc_amiga.c:1.37 src/sys/arch/amiga/dev/wdc_amiga.c:1.38
--- src/sys/arch/amiga/dev/wdc_amiga.c:1.37	Fri Jan  3 00:33:06 2014
+++ src/sys/arch/amiga/dev/wdc_amiga.c	Sat Apr 18 14:21:41 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: wdc_amiga.c,v 1.37 2014/01/03 00:33:06 rkujawa Exp $ */
+/*	$NetBSD: wdc_amiga.c,v 1.38 2015/04/18 14:21:41 mlelstv Exp $ */
 
 /*-
  * Copyright (c) 2000, 2003 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: wdc_amiga.c,v 1.37 2014/01/03 00:33:06 rkujawa Exp $);
+__KERNEL_RCSID(0, $NetBSD: wdc_amiga.c,v 1.38 2015/04/18 14:21:41 mlelstv Exp $);
 
 #include sys/types.h
 #include sys/param.h
@@ -61,6 +61,7 @@ struct wdc_amiga_softc {
 	struct isr sc_isr;
 	struct bus_space_tag cmd_iot;
 	struct bus_space_tag ctl_iot;
+	bool gayle_intr;
 };
 
 int	wdc_amiga_probe(device_t, cfdata_t, void *);
@@ -95,8 +96,10 @@ wdc_amiga_attach(device_t parent, device
 
 	if (is_a4000()) {
 		sc-cmd_iot.base = (bus_addr_t) ztwomap(GAYLE_IDE_BASE_A4000 + 2);
+		sc-gayle_intr = false;
 	} else {
 		sc-cmd_iot.base = (bus_addr_t) ztwomap(GAYLE_IDE_BASE + 2);
+		sc-gayle_intr = true;
 	}
 
 	sc-cmd_iot.absm = sc-ctl_iot.absm = amiga_bus_stride_4swap;
@@ -142,7 +145,7 @@ wdc_amiga_attach(device_t parent, device
 	sc-sc_isr.isr_ipl = 2;
 	add_isr (sc-sc_isr);
 
-	if (!is_a4000())
+	if (sc-gayle_intr)
 		gayle_intr_enable_set(GAYLE_INT_IDE);
 
 	wdcattach(sc-sc_channel);
@@ -160,7 +163,7 @@ wdc_amiga_intr(void *arg)
 	intreq = gayle_intr_status();
 
 	if (intreq  GAYLE_INT_IDE) {
-		if (!is_a4000())
+		if (sc-gayle_intr)
 			gayle_intr_ack(0x7C | (intreq  GAYLE_INT_IDEACK));
 		ret = wdcintr(sc-sc_channel);
 	}



CVS commit: src/sys/dev/sysmon

2015-04-18 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sat Apr 18 14:44:44 UTC 2015

Modified Files:
src/sys/dev/sysmon: sysmon_envsys_events.c sysmonvar.h

Log Message:
use unsigned type for flag bits.


To generate a diff of this commit:
cvs rdiff -u -r1.114 -r1.115 src/sys/dev/sysmon/sysmon_envsys_events.c
cvs rdiff -u -r1.47 -r1.48 src/sys/dev/sysmon/sysmonvar.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/sysmon/sysmon_envsys_events.c
diff -u src/sys/dev/sysmon/sysmon_envsys_events.c:1.114 src/sys/dev/sysmon/sysmon_envsys_events.c:1.115
--- src/sys/dev/sysmon/sysmon_envsys_events.c:1.114	Sat Mar 14 09:52:49 2015
+++ src/sys/dev/sysmon/sysmon_envsys_events.c	Sat Apr 18 14:44:44 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: sysmon_envsys_events.c,v 1.114 2015/03/14 09:52:49 hannken Exp $ */
+/* $NetBSD: sysmon_envsys_events.c,v 1.115 2015/04/18 14:44:44 mlelstv Exp $ */
 
 /*-
  * Copyright (c) 2007, 2008 Juan Romero Pardines.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: sysmon_envsys_events.c,v 1.114 2015/03/14 09:52:49 hannken Exp $);
+__KERNEL_RCSID(0, $NetBSD: sysmon_envsys_events.c,v 1.115 2015/04/18 14:44:44 mlelstv Exp $);
 
 #include sys/param.h
 #include sys/types.h
@@ -784,7 +784,7 @@ sme_events_worker(struct work *wk, void 
 	}
 
 	DPRINTFOBJ((%s: (%s) desc=%s sensor=%d type=%d state=%d units=%d 
-	value_cur=%d upropset=%d\n, __func__, sme-sme_name, edata-desc,
+	value_cur=%d upropset=0x%04x\n, __func__, sme-sme_name, edata-desc,
 	edata-sensor, see-see_type, edata-state, edata-units,
 	edata-value_cur, edata-upropset));
 

Index: src/sys/dev/sysmon/sysmonvar.h
diff -u src/sys/dev/sysmon/sysmonvar.h:1.47 src/sys/dev/sysmon/sysmonvar.h:1.48
--- src/sys/dev/sysmon/sysmonvar.h:1.47	Mon Apr 13 16:33:25 2015
+++ src/sys/dev/sysmon/sysmonvar.h	Sat Apr 18 14:44:44 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: sysmonvar.h,v 1.47 2015/04/13 16:33:25 riastradh Exp $	*/
+/*	$NetBSD: sysmonvar.h,v 1.48 2015/04/18 14:44:44 mlelstv Exp $	*/
 
 /*-
  * Copyright (c) 2000 Zembu Labs, Inc.
@@ -104,7 +104,7 @@ struct envsys_data {
 	int32_t		value_min;	/* min value */
 	int32_t		private;	/* private data for drivers */
 	sysmon_envsys_lim_t limits;	/* thresholds for monitoring */
-	int		upropset;	/* userland property set? */
+	uint32_t	upropset;	/* userland property set? */
 	krndsource_t	rnd_src;	/* source element for rnd(4) */
 	char		desc[ENVSYS_DESCLEN];	/* sensor description */
 };



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

2015-04-18 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Apr 18 10:54:59 UTC 2015

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

Log Message:
Update sets lists for new swwdog module


To generate a diff of this commit:
cvs rdiff -u -r1.56 -r1.57 src/distrib/sets/lists/modules/md.amd64
cvs rdiff -u -r1.5 -r1.6 src/distrib/sets/lists/modules/md.evbppc.powerpc
cvs rdiff -u -r1.58 -r1.59 src/distrib/sets/lists/modules/md.i386
cvs rdiff -u -r1.73 -r1.74 src/distrib/sets/lists/modules/mi

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

Modified files:

Index: src/distrib/sets/lists/modules/md.amd64
diff -u src/distrib/sets/lists/modules/md.amd64:1.56 src/distrib/sets/lists/modules/md.amd64:1.57
--- src/distrib/sets/lists/modules/md.amd64:1.56	Sat Mar 28 14:09:58 2015
+++ src/distrib/sets/lists/modules/md.amd64	Sat Apr 18 10:54:59 2015
@@ -1,4 +1,4 @@
-# $NetBSD: md.amd64,v 1.56 2015/03/28 14:09:58 jmcneill Exp $
+# $NetBSD: md.amd64,v 1.57 2015/04/18 10:54:59 pgoyette Exp $
 #
 # NOTE that there are two sets of files here:
 # @MODULEDIR@ and amd64-xen
@@ -496,6 +496,8 @@
 ./stand/amd64-xen/@OSRELEASE@/modules/swcrypto/swcrypto.kmod		base-kernel-modules	kmod,compatmodules
 ./stand/amd64-xen/@OSRELEASE@/modules/swsensorbase-kernel-modules	kmod,compatmodules
 ./stand/amd64-xen/@OSRELEASE@/modules/swsensor/swsensor.kmod		base-kernel-modules	kmod,compatmodules
+./stand/amd64-xen/@OSRELEASE@/modules/swwdogbase-kernel-modules	kmod,compatmodules
+./stand/amd64-xen/@OSRELEASE@/modules/swwdog/swwdog.kmod		base-kernel-modules	kmod,compatmodules
 ./stand/amd64-xen/@OSRELEASE@/modules/syscallemu			base-kernel-modules	kmod,compatmodules
 ./stand/amd64-xen/@OSRELEASE@/modules/syscallemu/syscallemu.kmod		base-kernel-modules	kmod,compatmodules
 ./stand/amd64-xen/@OSRELEASE@/modules/sysvbfsbase-kernel-modules	kmod,compatmodules

Index: src/distrib/sets/lists/modules/md.evbppc.powerpc
diff -u src/distrib/sets/lists/modules/md.evbppc.powerpc:1.5 src/distrib/sets/lists/modules/md.evbppc.powerpc:1.6
--- src/distrib/sets/lists/modules/md.evbppc.powerpc:1.5	Sat Mar  7 14:16:51 2015
+++ src/distrib/sets/lists/modules/md.evbppc.powerpc	Sat Apr 18 10:54:59 2015
@@ -1,4 +1,4 @@
-# $NetBSD: md.evbppc.powerpc,v 1.5 2015/03/07 14:16:51 jmcneill Exp $
+# $NetBSD: md.evbppc.powerpc,v 1.6 2015/04/18 10:54:59 pgoyette Exp $
 ./stand/powerpc-4xx			base-kernel-modules	kmod,compatmodules
 ./stand/powerpc-4xx/@OSRELEASE@		base-kernel-modules	kmod,compatmodules
 ./stand/powerpc-4xx/@OSRELEASE@/modules	base-kernel-modules	kmod,compatmodules
@@ -214,6 +214,8 @@
 ./stand/powerpc-4xx/@OSRELEASE@/modules/swcrypto/swcrypto.kmod		base-kernel-modules	kmod,compatmodules
 ./stand/powerpc-4xx/@OSRELEASE@/modules/swsensorbase-kernel-modules	kmod,compatmodules
 ./stand/powerpc-4xx/@OSRELEASE@/modules/swsensor/swsensor.kmod		base-kernel-modules	kmod,compatmodules
+./stand/powerpc-4xx/@OSRELEASE@/modules/swwdogbase-kernel-modules	kmod,compatmodules
+./stand/powerpc-4xx/@OSRELEASE@/modules/swwdog/swwdog.kmod		base-kernel-modules	kmod,compatmodules
 ./stand/powerpc-4xx/@OSRELEASE@/modules/sysvbfsbase-kernel-modules	kmod,compatmodules
 ./stand/powerpc-4xx/@OSRELEASE@/modules/sysvbfs/sysvbfs.kmod		base-kernel-modules	kmod,compatmodules
 ./stand/powerpc-4xx/@OSRELEASE@/modules/tmpfsbase-kernel-modules	kmod,compatmodules
@@ -455,6 +457,8 @@
 ./stand/powerpc-booke/@OSRELEASE@/modules/swcrypto/swcrypto.kmod	base-kernel-modules	kmod,compatmodules
 ./stand/powerpc-booke/@OSRELEASE@/modules/swsensor			base-kernel-modules	kmod,compatmodules
 ./stand/powerpc-booke/@OSRELEASE@/modules/swsensor/swsensor.kmod	base-kernel-modules	kmod,compatmodules
+./stand/powerpc-booke/@OSRELEASE@/modules/swwdog			base-kernel-modules	kmod,compatmodules
+./stand/powerpc-booke/@OSRELEASE@/modules/swwdog/swwdog.kmod		base-kernel-modules	kmod,compatmodules
 ./stand/powerpc-booke/@OSRELEASE@/modules/sysvbfs			base-kernel-modules	kmod,compatmodules
 ./stand/powerpc-booke/@OSRELEASE@/modules/sysvbfs/sysvbfs.kmod		base-kernel-modules	kmod,compatmodules
 ./stand/powerpc-booke/@OSRELEASE@/modules/tmpfsbase-kernel-modules	kmod,compatmodules

Index: src/distrib/sets/lists/modules/md.i386
diff -u src/distrib/sets/lists/modules/md.i386:1.58 src/distrib/sets/lists/modules/md.i386:1.59
--- src/distrib/sets/lists/modules/md.i386:1.58	Sat Mar 28 14:09:58 2015
+++ src/distrib/sets/lists/modules/md.i386	Sat Apr 18 10:54:59 2015
@@ -1,4 +1,4 @@
-# $NetBSD: md.i386,v 1.58 2015/03/28 14:09:58 jmcneill Exp $
+# $NetBSD: md.i386,v 1.59 2015/04/18 10:54:59 pgoyette Exp $
 #
 # NOTE that there are three sets of files here:
 # @MODULEDIR@, i386-xen, and i386pae-xen
@@ -527,6 +527,8 @@
 ./stand/i386-xen/@OSRELEASE@/modules/swcrypto/swcrypto.kmod		base-kernel-modules	kmod,compatmodules
 ./stand/i386-xen/@OSRELEASE@/modules/swsensorbase-kernel-modules	

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

2015-04-18 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Apr 18 13:43:45 UTC 2015

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

Log Message:
Remove dmover(9) references


To generate a diff of this commit:
cvs rdiff -u -r1.62 -r1.63 src/sys/arch/evbarm/conf/RPI

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/RPI
diff -u src/sys/arch/evbarm/conf/RPI:1.62 src/sys/arch/evbarm/conf/RPI:1.63
--- src/sys/arch/evbarm/conf/RPI:1.62	Sat Apr 18 11:30:22 2015
+++ src/sys/arch/evbarm/conf/RPI	Sat Apr 18 13:43:45 2015
@@ -1,5 +1,5 @@
 #
-#	$NetBSD: RPI,v 1.62 2015/04/18 11:30:22 skrll Exp $
+#	$NetBSD: RPI,v 1.63 2015/04/18 13:43:45 skrll Exp $
 #
 #	RPi -- Raspberry Pi
 #
@@ -200,10 +200,6 @@ options 	WSDISPLAY_DEFAULTSCREENS=4
 pseudo-device	wsmux			# mouse  keyboard multiplexor
 pseudo-device	wsfont
 
-# data mover pseudo-devices
-#pseudo-device	swdmover		# software dmover(9) back-end
-#pseudo-device	dmoverio		# /dev/dmover dmover(9) interface
-
 # userland interface to drivers, including autoconf and properties retrieval
 
 # local configuration



CVS commit: src/sys/modules

2015-04-18 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Apr 18 10:52:44 UTC 2015

Modified Files:
src/sys/modules: Makefile
Added Files:
src/sys/modules/swwdog: Makefile

Log Message:
Add modularized swwdog driver.


To generate a diff of this commit:
cvs rdiff -u -r1.144 -r1.145 src/sys/modules/Makefile
cvs rdiff -u -r0 -r1.1 src/sys/modules/swwdog/Makefile

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

Modified files:

Index: src/sys/modules/Makefile
diff -u src/sys/modules/Makefile:1.144 src/sys/modules/Makefile:1.145
--- src/sys/modules/Makefile:1.144	Sat Mar 28 14:09:58 2015
+++ src/sys/modules/Makefile	Sat Apr 18 10:52:44 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.144 2015/03/28 14:09:58 jmcneill Exp $
+#	$NetBSD: Makefile,v 1.145 2015/04/18 10:52:44 pgoyette Exp $
 
 .include bsd.own.mk
 
@@ -93,6 +93,7 @@ SUBDIR+=	sysvbfs
 SUBDIR+=	suser
 SUBDIR+=	swcrypto
 SUBDIR+=	swsensor
+SUBDIR+=	swwdog
 SUBDIR+=	tmpfs
 SUBDIR+=	uatp
 SUBDIR+=	udf

Added files:

Index: src/sys/modules/swwdog/Makefile
diff -u /dev/null src/sys/modules/swwdog/Makefile:1.1
--- /dev/null	Sat Apr 18 10:52:44 2015
+++ src/sys/modules/swwdog/Makefile	Sat Apr 18 10:52:44 2015
@@ -0,0 +1,11 @@
+# $NetBSD: Makefile,v 1.1 2015/04/18 10:52:44 pgoyette Exp $
+
+.include ../Makefile.inc
+
+.PATH:	${S}/dev/sysmon
+
+KMOD=   swwdog
+
+SRCS=	swwdog.c
+
+.include bsd.kmodule.mk



CVS commit: src/sys/arch/evbarm

2015-04-18 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Apr 18 11:03:31 UTC 2015

Modified Files:
src/sys/arch/evbarm/rpi: rpi2_start.S
src/sys/arch/evbarm/tegra: tegra_start.S

Log Message:
Use character constants instead of ascii values for readability


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/evbarm/rpi/rpi2_start.S
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/evbarm/tegra/tegra_start.S

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

Modified files:

Index: src/sys/arch/evbarm/rpi/rpi2_start.S
diff -u src/sys/arch/evbarm/rpi/rpi2_start.S:1.1 src/sys/arch/evbarm/rpi/rpi2_start.S:1.2
--- src/sys/arch/evbarm/rpi/rpi2_start.S:1.1	Sat Feb 28 09:34:34 2015
+++ src/sys/arch/evbarm/rpi/rpi2_start.S	Sat Apr 18 11:03:31 2015
@@ -38,7 +38,7 @@
 
 #include assym.h
 
-RCSID($NetBSD: rpi2_start.S,v 1.1 2015/02/28 09:34:34 skrll Exp $)
+RCSID($NetBSD: rpi2_start.S,v 1.2 2015/04/18 11:03:31 skrll Exp $)
 
 #if defined(VERBOSE_INIT_ARM)
 #define	XPUTC(n)	mov r0, n; bl plputc
@@ -117,7 +117,7 @@ _C_LABEL(rpi_start):
 	sub	r8, r8, #KERNEL_BASE_VOFFSET
 #endif
 	bl	arm_boot_l1pt_init
-	XPUTC(#68)
+	XPUTC(#'D')
 
 	/*
 	 * Turn on the MMU, Caches, etc.  Return to new enabled address space.
@@ -142,17 +142,17 @@ _C_LABEL(rpi_start):
 	.pushsection .text,ax,%progbits
 1:
 #endif
-	XPUTC2(#90)
+	XPUTC2(#'Z')
 
 #if defined(MULTIPROCESSOR)
 	// Now spin up the second processors into the same state we are now.
-	XPUTC2(#77)		// 'M'
-	XPUTC2(#80)		// 'P'
-	XPUTC2(#60)		// ''
+	XPUTC2(#'M')
+	XPUTC2(#'P')		// 'P'
+	XPUTC2(#'')		// ''
 	// Make sure the cache is flushed out to RAM for the other CPUs
 	bl	_C_LABEL(armv7_dcache_wbinv_all)
 
-	XPUTC2(#62)		// ''
+	XPUTC2(#'')		// ''
 #endif /* MULTIPROCESSOR */
 	XPUTC2(#13)
 	XPUTC2(#10)

Index: src/sys/arch/evbarm/tegra/tegra_start.S
diff -u src/sys/arch/evbarm/tegra/tegra_start.S:1.1 src/sys/arch/evbarm/tegra/tegra_start.S:1.2
--- src/sys/arch/evbarm/tegra/tegra_start.S:1.1	Sun Mar 29 10:41:59 2015
+++ src/sys/arch/evbarm/tegra/tegra_start.S	Sat Apr 18 11:03:31 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_start.S,v 1.1 2015/03/29 10:41:59 jmcneill Exp $ */
+/* $NetBSD: tegra_start.S,v 1.2 2015/04/18 11:03:31 skrll Exp $ */
 
 /*-
  * Copyright (c) 2014, 2015 The NetBSD Foundation, Inc.
@@ -43,7 +43,7 @@
 #include arm/nvidia/tegra_reg.h
 #include evbarm/tegra/platform.h  
 
-RCSID($NetBSD: tegra_start.S,v 1.1 2015/03/29 10:41:59 jmcneill Exp $)
+RCSID($NetBSD: tegra_start.S,v 1.2 2015/04/18 11:03:31 skrll Exp $)
 
 #if defined(VERBOSE_INIT_ARM)
 #define	XPUTC(n)	mov r0, n; bl xputc
@@ -115,7 +115,7 @@ _C_LABEL(tegra_start):
 	movw	r1, #:lower16:mmu_init_table
 	movt	r1, #:upper16:mmu_init_table
 	bl	arm_boot_l1pt_init
-	XPUTC(#68)
+	XPUTC(#'D')
 
 	/*
 	 * Turn on the MMU, Caches, etc.  Return to new enabled address space.
@@ -139,7 +139,7 @@ _C_LABEL(tegra_start):
 	.pushsection .text,ax,%progbits
 1:
 #endif
-	XPUTC2(#90)
+	XPUTC2(#'Z')
 
 	/*
 	 * Jump to start in locore.S, which in turn will call initarm and main.



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

2015-04-18 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Apr 18 11:30:22 UTC 2015

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

Log Message:
Use GENERIC.common


To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 src/sys/arch/evbarm/conf/RPI

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/RPI
diff -u src/sys/arch/evbarm/conf/RPI:1.61 src/sys/arch/evbarm/conf/RPI:1.62
--- src/sys/arch/evbarm/conf/RPI:1.61	Sat Mar 14 14:59:43 2015
+++ src/sys/arch/evbarm/conf/RPI	Sat Apr 18 11:30:22 2015
@@ -1,24 +1,15 @@
 #
-#	$NetBSD: RPI,v 1.61 2015/03/14 14:59:43 jmcneill Exp $
+#	$NetBSD: RPI,v 1.62 2015/04/18 11:30:22 skrll Exp $
 #
 #	RPi -- Raspberry Pi
 #
 
 include	arch/evbarm/conf/std.rpi
-
-# estimated number of users
-
-maxusers	32
-
-# Standard system options
-
-options 	RTC_OFFSET=0	# hardware clock is this many mins. west of GMT
-#options 	NTP		# NTP phase/frequency locked loop
+include arch/evbarm/conf/GENERIC.common
 
 # CPU options
 
 options 	CPU_ARM1176
-options 	PMAPCOUNTERS
 options 	TPIDRPRW_IS_CURLWP
 options 	ARM11_COMPAT_MMU
 options 	__HAVE_MM_MD_CACHE_ALIASING
@@ -26,121 +17,7 @@ makeoptions 	CPUFLAGS=-march=armv6z -mt
 
 # Architecture options
 
-# File systems
-
-file-system	FFS		# UFS
-#file-system	LFS		# log-structured file system
-file-system	MFS		# memory file system
-file-system	NFS		# Network file system
-#file-system 	ADOSFS		# AmigaDOS-compatible file system
-file-system 	EXT2FS		# second extended file system (linux)
-#file-system	CD9660		# ISO 9660 + Rock Ridge file system
-file-system	MSDOSFS		# MS-DOS file system
-#file-system	FDESC		# /dev/fd
-file-system	KERNFS		# /kern
-file-system	NULLFS		# loopback file system
-file-system	PROCFS		# /proc
-file-system	PUFFS		# Userspace file systems (e.g. ntfs-3g  sshfs)
-#file-system	UMAPFS		# NULLFS + uid and gid remapping
-#file-system	UNION		# union file system
-file-system	TMPFS		# memory file system
-#file-system	UDF		# experimental - OSTA UDF CD/DVD file-system
-#file-system	HFS		# experimental - Apple HFS+ (read-only)
-#file-system	NILFS		# experimental - NTT's NiLFS(2)
-file-system	PTYFS		# /dev/pts/N support
-
-# File system options
-options 	QUOTA		# legacy UFS quotas
-options 	QUOTA2		# new, in-filesystem UFS quotas
-#options 	FFS_EI		# FFS Endian Independent support
-#options 	NFSSERVER
-options 	WAPBL		# File system journaling support
-#options 	FFS_NO_SNAPSHOT	# No FFS snapshot support
-
-# Networking options
-
-#options 	GATEWAY		# packet forwarding
-options 	INET		# IP + ICMP + TCP + UDP
-options 	INET6		# IPV6
-#options 	IPSEC		# IP security
-#options 	IPSEC_DEBUG	# debug for IP security
-#options 	MROUTING	# IP multicast routing
-#options 	PIM		# Protocol Independent Multicast
-#options 	NETATALK	# AppleTalk networking
-#options 	PPP_BSDCOMP	# BSD-Compress compression support for PPP
-#options 	PPP_DEFLATE	# Deflate compression support for PPP
-#options 	PPP_FILTER	# Active filter support for PPP (requires bpf)
-#options 	TCP_DEBUG	# Record last TCP_NDEBUG packets with SO_DEBUG
-
-options 	NFS_BOOT_BOOTP
-options 	NFS_BOOT_DHCP
-#options		NFS_BOOT_BOOTSTATIC
-#options		NFS_BOOTSTATIC_MYIP=\192.168.1.4\
-#options		NFS_BOOTSTATIC_GWIP=\192.168.1.1\
-#options		NFS_BOOTSTATIC_MASK=\255.255.255.0\
-#options		NFS_BOOTSTATIC_SERVADDR=\192.168.1.1\
-#options		NFS_BOOTSTATIC_SERVER=\192.168.1.1:/nfs/sdp2430\
-
-options		NFS_BOOT_RWSIZE=1024
-
-# Compatibility options
-
-options		COMPAT_NETBSD32	# allow running arm (e.g. non-earm) binaries
-#options 	COMPAT_43	# 4.3BSD compatibility.
-#options 	COMPAT_09	# NetBSD 0.9,
-#options 	COMPAT_10	# NetBSD 1.0,
-#options 	COMPAT_11	# NetBSD 1.1,
-#options 	COMPAT_12	# NetBSD 1.2,
-#options 	COMPAT_13	# NetBSD 1.3,
-#options 	COMPAT_14	# NetBSD 1.4,
-#options 	COMPAT_15	# NetBSD 1.5,
-#options 	COMPAT_16	# NetBSD 1.6,
-#options 	COMPAT_20	# NetBSD 2.0,
-#options 	COMPAT_30	# NetBSD 3.0,
-#options 	COMPAT_40	# NetBSD 4.0,
-#options 	COMPAT_50	# NetBSD 5.0,
-options 	COMPAT_60	# NetBSD 6.0, and
-options 	COMPAT_70	# NetBSD 7.0 binary compatibility.
-#options 	TCP_COMPAT_42	# 4.2BSD TCP/IP bug compat. Not recommended.
-#options		COMPAT_BSDPTY	# /dev/[pt]ty?? ptys.
-
-# Shared memory options
-
-options 	SYSVMSG		# System V-like message queues
-options 	SYSVSEM		# System V-like semaphores
-#options 	SEMMNI=10	# number of semaphore identifiers
-#options 	SEMMNS=60	# number of semaphores in system
-#options 	SEMUME=10	# max number of undo entries per process
-#options 	SEMMNU=30	# number of undo structures in system
-options 	SYSVSHM		# System V-like memory sharing
-
-# Device options
-
-#options 	MEMORY_DISK_HOOKS	# boottime setup of ramdisk
-#options 	MEMORY_DISK_ROOT_SIZE=8192	# Size in blocks
-#options 	MEMORY_DISK_DYNAMIC
-#options 	MINIROOTSIZE=1000	# Size in blocks
-#options 	MEMORY_DISK_IS_ROOT	# use memory disk as root
-
-# Miscellaneous kernel options

CVS commit: src/external/public-domain/xz/include

2015-04-18 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sat Apr 18 16:59:05 UTC 2015

Modified Files:
src/external/public-domain/xz/include: config.h

Log Message:
Use unaligned access if the platform supports it.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/public-domain/xz/include/config.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/public-domain/xz/include/config.h
diff -u src/external/public-domain/xz/include/config.h:1.4 src/external/public-domain/xz/include/config.h:1.5
--- src/external/public-domain/xz/include/config.h:1.4	Fri Apr 17 21:56:14 2015
+++ src/external/public-domain/xz/include/config.h	Sat Apr 18 16:59:05 2015
@@ -359,9 +359,9 @@
 
 /* Define to 1 if the system supports fast unaligned access to 16-bit and
32-bit integers. */
-#ifndef __NetBSD__
-/* Not all archs support this */
-#define TUKLIB_FAST_UNALIGNED_ACCESS 1
+#include machine/types.h
+#ifdef __NO_STRICT_ALIGNMENT
+# define TUKLIB_FAST_UNALIGNED_ACCESS 1
 #endif
 
 /* Define to 1 if the amount of physical memory can be detected with



CVS commit: src/sys/uvm/pmap

2015-04-18 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sat Apr 18 16:58:31 UTC 2015

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

Log Message:
pmap_tlb_intersecting_active_p is not used in some combinations of
platform options as seen by recent ARM changes.


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

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

Modified files:

Index: src/sys/uvm/pmap/pmap_tlb.c
diff -u src/sys/uvm/pmap/pmap_tlb.c:1.10 src/sys/uvm/pmap/pmap_tlb.c:1.11
--- src/sys/uvm/pmap/pmap_tlb.c:1.10	Wed Oct 29 10:53:41 2014
+++ src/sys/uvm/pmap/pmap_tlb.c	Sat Apr 18 16:58:31 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap_tlb.c,v 1.10 2014/10/29 10:53:41 skrll Exp $	*/
+/*	$NetBSD: pmap_tlb.c,v 1.11 2015/04/18 16:58:31 joerg Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include sys/cdefs.h
 
-__KERNEL_RCSID(0, $NetBSD: pmap_tlb.c,v 1.10 2014/10/29 10:53:41 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: pmap_tlb.c,v 1.11 2015/04/18 16:58:31 joerg Exp $);
 
 /*
  * Manages address spaces in a TLB.
@@ -196,7 +196,7 @@ pmap_pai_check(struct pmap_tlb_info *ti)
 }
 
 #ifdef MULTIPROCESSOR
-static inline bool
+__unused static inline bool
 pmap_tlb_intersecting_active_p(pmap_t pm, struct pmap_tlb_info *ti)
 {
 #if PMAP_TLB_MAX == 1



CVS commit: src/sys/net

2015-04-18 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Sat Apr 18 18:32:16 UTC 2015

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

Log Message:
Count up parent's obytes and omcasts counters

PR kern/49837


To generate a diff of this commit:
cvs rdiff -u -r1.80 -r1.81 src/sys/net/if_vlan.c

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

Modified files:

Index: src/sys/net/if_vlan.c
diff -u src/sys/net/if_vlan.c:1.80 src/sys/net/if_vlan.c:1.81
--- src/sys/net/if_vlan.c:1.80	Sun Mar 29 13:30:43 2015
+++ src/sys/net/if_vlan.c	Sat Apr 18 18:32:16 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_vlan.c,v 1.80 2015/03/29 13:30:43 ozaki-r Exp $	*/
+/*	$NetBSD: if_vlan.c,v 1.81 2015/04/18 18:32:16 ozaki-r Exp $	*/
 
 /*-
  * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc.
@@ -78,7 +78,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_vlan.c,v 1.80 2015/03/29 13:30:43 ozaki-r Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_vlan.c,v 1.81 2015/04/18 18:32:16 ozaki-r Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_inet.h
@@ -836,6 +836,10 @@ vlan_start(struct ifnet *ifp)
 		}
 
 		ifp-if_opackets++;
+
+		p-if_obytes += m-m_pkthdr.len;
+		if (m-m_flags  M_MCAST)
+			p-if_omcasts++;
 		if ((p-if_flags  (IFF_RUNNING|IFF_OACTIVE)) == IFF_RUNNING)
 			(*p-if_start)(p);
 	}



CVS commit: src/external/public-domain/xz/include

2015-04-18 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sat Apr 18 17:00:09 UTC 2015

Modified Files:
src/external/public-domain/xz/include: config.h

Log Message:
Drop condition around SIZEOF_SIZE_T to reduce diff against clean
version. The macro is only used on platforms without SIZE_MAX.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/public-domain/xz/include/config.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/public-domain/xz/include/config.h
diff -u src/external/public-domain/xz/include/config.h:1.5 src/external/public-domain/xz/include/config.h:1.6
--- src/external/public-domain/xz/include/config.h:1.5	Sat Apr 18 16:59:05 2015
+++ src/external/public-domain/xz/include/config.h	Sat Apr 18 17:00:09 2015
@@ -331,12 +331,8 @@
your system. */
 /* #undef PTHREAD_CREATE_JOINABLE */
 
-#ifdef _LP64
 /* The size of `size_t', as computed by sizeof. */
 #define SIZEOF_SIZE_T 8
-#else
-#define SIZEOF_SIZE_T 4
-#endif
 
 /* Define to 1 if you have the ANSI C header files. */
 #define STDC_HEADERS 1



CVS commit: src/distrib/utils/embedded

2015-04-18 Thread Hubert Feyrer
Module Name:src
Committed By:   hubertf
Date:   Sat Apr 18 22:06:48 UTC 2015

Modified Files:
src/distrib/utils/embedded: mkimage

Log Message:
Properly spell X' name. From X(7):

   The  X.Org  Foundation  requests  that the following names be used when
   referring to this software:

  X
   X Window System
X Version 11
 X Window System, Version 11
 X11


To generate a diff of this commit:
cvs rdiff -u -r1.56 -r1.57 src/distrib/utils/embedded/mkimage

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

Modified files:

Index: src/distrib/utils/embedded/mkimage
diff -u src/distrib/utils/embedded/mkimage:1.56 src/distrib/utils/embedded/mkimage:1.57
--- src/distrib/utils/embedded/mkimage:1.56	Mon Apr  6 22:20:52 2015
+++ src/distrib/utils/embedded/mkimage	Sat Apr 18 22:06:48 2015
@@ -1,5 +1,5 @@
 #!/bin/sh
-# $NetBSD: mkimage,v 1.56 2015/04/06 22:20:52 jmcneill Exp $
+# $NetBSD: mkimage,v 1.57 2015/04/18 22:06:48 hubertf Exp $
 #
 # Copyright (c) 2013, 2014 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -75,7 +75,7 @@ Usage: $PROG -h host-arch [-bdmx] [-K 
 -r	root device kind (sd, wd, ld)
 -d	Add the debug sets
 -m	Optimize the OS installation to mimimize disk writes for SSDs
--x	Load the x sets too, not just the base ones
+-x	Load the X sets too, not just the base ones
 EOF
 	exit 1
 }



CVS commit: src/lib/libc/stdlib

2015-04-18 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sat Apr 18 21:44:31 UTC 2015

Modified Files:
src/lib/libc/stdlib: atexit.c

Log Message:
Add __aeabi_atexit alias for another case of NIH on ARM.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/lib/libc/stdlib/atexit.c

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

Modified files:

Index: src/lib/libc/stdlib/atexit.c
diff -u src/lib/libc/stdlib/atexit.c:1.27 src/lib/libc/stdlib/atexit.c:1.28
--- src/lib/libc/stdlib/atexit.c:1.27	Tue Jan 20 18:31:25 2015
+++ src/lib/libc/stdlib/atexit.c	Sat Apr 18 21:44:31 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: atexit.c,v 1.27 2015/01/20 18:31:25 christos Exp $	*/
+/*	$NetBSD: atexit.c,v 1.28 2015/04/18 21:44:31 joerg Exp $	*/
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include sys/cdefs.h
 #if defined(LIBC_SCCS)  !defined(lint)
-__RCSID($NetBSD: atexit.c,v 1.27 2015/01/20 18:31:25 christos Exp $);
+__RCSID($NetBSD: atexit.c,v 1.28 2015/04/18 21:44:31 joerg Exp $);
 #endif /* LIBC_SCCS and not lint */
 
 #include reentrant.h
@@ -135,6 +135,10 @@ __libc_atexit_init(void)
  *
  *	http://www.codesourcery.com/cxx-abi/abi.html#dso-dtor
  */
+#if defined(__ARM_EABI__)  !defined(lint)
+__strong_alias(__aeabi_atexit,__cxa_atexit);
+#endif
+
 int
 __cxa_atexit(void (*func)(void *), void *arg, void *dso)
 {



CVS commit: src/sys/dev/sysmon

2015-04-18 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Apr 18 22:56:52 UTC 2015

Modified Files:
src/sys/dev/sysmon: swwdog.c

Log Message:
Remove some debugging printf()s that were erroneously committed.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/dev/sysmon/swwdog.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/sysmon/swwdog.c
diff -u src/sys/dev/sysmon/swwdog.c:1.14 src/sys/dev/sysmon/swwdog.c:1.15
--- src/sys/dev/sysmon/swwdog.c:1.14	Sat Apr 18 10:49:31 2015
+++ src/sys/dev/sysmon/swwdog.c	Sat Apr 18 22:56:52 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: swwdog.c,v 1.14 2015/04/18 10:49:31 pgoyette Exp $	*/
+/*	$NetBSD: swwdog.c,v 1.15 2015/04/18 22:56:52 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 2004, 2005 Steven M. Bellovin
@@ -33,7 +33,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: swwdog.c,v 1.14 2015/04/18 10:49:31 pgoyette Exp $);
+__KERNEL_RCSID(0, $NetBSD: swwdog.c,v 1.15 2015/04/18 22:56:52 pgoyette Exp $);
 
 /*
  *
@@ -116,7 +116,6 @@ swwdogattach(int n __unused)
 	int error;
 	static struct cfdata cf;
 
-printf(%s: entered\n, __func__); /* XXX PRG */
 	if (workqueue_create(wq, swwreboot, doreboot, NULL,
 	PRI_NONE, IPL_NONE, 0) != 0) {
 		aprint_error(failed to create swwdog reboot wq);
@@ -141,7 +140,6 @@ printf(%s: entered\n, __func__); /* XX
 
 	swwdog_dev = config_attach_pseudo(cf);
 
-printf(%s: swwdog_dev = 0x%p\n, __func__, swwdog_dev); /* XXX PRG */
 	if (swwdog_dev == NULL) {
 		config_cfattach_detach(swwdog_cd.cd_name, swwdog_ca);
 		workqueue_destroy(wq);
@@ -154,7 +152,6 @@ static int
 swwdog_match(device_t parent, cfdata_t data, void *aux)
 {
 
-printf(%s: entered\n, __func__); /* XXX PRG */
 	return 1;
 }
 
@@ -163,7 +160,6 @@ swwdog_attach(device_t parent, device_t 
 {
 	struct swwdog_softc *sc = device_private(self);
 
-printf(%s: entered\n, __func__); /* XXX PRG */
 	if (workqueue_create(wq, swwreboot, doreboot, NULL,
 	PRI_NONE, IPL_NONE, 0) != 0) {
 		aprint_error_dev(self, failed to create reboot workqueue);
@@ -200,7 +196,6 @@ swwdog_detach(device_t self, int flags)
 {
 	struct swwdog_softc *sc = device_private(self);
 
-printf(%s: entered\n, __func__); /* XXX PRG */
 	pmf_device_deregister(self);
 	swwdog_disarm(sc);
 	sysctl_teardown(swwdog_sysctllog);
@@ -365,7 +360,6 @@ swwdog_modcmd(modcmd_t cmd, void *arg)
 {
 	int ret;
  
-printf(%s: cmd %d\n, __func__, cmd); /* XXX PRG */
 	switch (cmd) {
 	case MODULE_CMD_INIT:
 		ret = swwdog_init(arg);



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

2015-04-18 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Apr 19 01:08:56 UTC 2015

Modified Files:
src/sys/external/bsd/drm2/radeon: radeon_pci.c

Log Message:
apply some of the additional changes from Arto Huusko in PR#49645:
- call pmf_device_deregister on detach.

i've kept the resume = true for radeon_resume_kms() call as it
seems to work for me (indeed, code inspection shows it is unused
on netbsd :-)

my old nforce4 box that can resume old drm (or could, last i tried
several years ago) while X and GL apps were running, can at least
survive a resume if X hasn't started.  my one attempt so far with
X exited, but having run, did not work.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/external/bsd/drm2/radeon/radeon_pci.c

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

Modified files:

Index: src/sys/external/bsd/drm2/radeon/radeon_pci.c
diff -u src/sys/external/bsd/drm2/radeon/radeon_pci.c:1.8 src/sys/external/bsd/drm2/radeon/radeon_pci.c:1.9
--- src/sys/external/bsd/drm2/radeon/radeon_pci.c:1.8	Fri Apr 10 02:03:14 2015
+++ src/sys/external/bsd/drm2/radeon/radeon_pci.c	Sun Apr 19 01:08:56 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: radeon_pci.c,v 1.8 2015/04/10 02:03:14 mrg Exp $	*/
+/*	$NetBSD: radeon_pci.c,v 1.9 2015/04/19 01:08:56 mrg Exp $	*/
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: radeon_pci.c,v 1.8 2015/04/10 02:03:14 mrg Exp $);
+__KERNEL_RCSID(0, $NetBSD: radeon_pci.c,v 1.9 2015/04/19 01:08:56 mrg Exp $);
 
 #ifdef _KERNEL_OPT
 #include vga.h
@@ -264,14 +264,14 @@ radeon_detach(device_t self, int flags)
 		return error;
 
 	if (sc-sc_task_state == RADEON_TASK_ATTACH)
-		return 0;
+		goto out;
 	if (sc-sc_task_u.workqueue != NULL) {
 		workqueue_destroy(sc-sc_task_u.workqueue);
 		sc-sc_task_u.workqueue = NULL;
 	}
 
 	if (sc-sc_drm_dev == NULL)
-		return 0;
+		goto out;
 	/* XXX errno Linux-NetBSD */
 	error = -drm_pci_detach(sc-sc_drm_dev, flags);
 	if (error)
@@ -279,6 +279,8 @@ radeon_detach(device_t self, int flags)
 		return error;
 	sc-sc_drm_dev = NULL;
 
+out:	pmf_device_deregister(self);
+
 	return 0;
 }
 
@@ -288,11 +290,12 @@ radeon_do_suspend(device_t self, const p
 	struct radeon_softc *const sc = device_private(self);
 	struct drm_device *const dev = sc-sc_drm_dev;
 	int ret;
+	bool is_console = true; /* XXX */
 
 	if (dev == NULL)
 		return true;
 
-	ret = radeon_suspend_kms(dev, true, true);
+	ret = radeon_suspend_kms(dev, true, is_console);
 	if (ret)
 		return false;
 
@@ -305,11 +308,12 @@ radeon_do_resume(device_t self, const pm
 	struct radeon_softc *const sc = device_private(self);
 	struct drm_device *const dev = sc-sc_drm_dev;
 	int ret;
+	bool is_console = true; /* XXX */
 
 	if (dev == NULL)
 		return true;
 
-	ret = radeon_resume_kms(dev, true, true);
+	ret = radeon_resume_kms(dev, true, is_console);
 	if (ret)
 		return false;
 



CVS commit: [netbsd-7] src/sys/dev/sdmmc

2015-04-18 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Apr 19 04:31:40 UTC 2015

Modified Files:
src/sys/dev/sdmmc [netbsd-7]: sdhc.c sdhcvar.h

Log Message:
Pull up following revision(s) (requested by bouyer in ticket #703):
sys/dev/sdmmc/sdhcvar.h: revision 1.16
sys/dev/sdmmc/sdhc.c: revision 1.55
Add a new SDHC_FLAG, SDHC_FLAG_EXTDMA_DMAEN, which request that the
SDHC_DMA_ENABLE bit be set in the command, even if we're using an
external DMA engine. Needed by the upcoming DMA support for AM335x
(beaglebone).


To generate a diff of this commit:
cvs rdiff -u -r1.44.2.7 -r1.44.2.8 src/sys/dev/sdmmc/sdhc.c
cvs rdiff -u -r1.13.12.2 -r1.13.12.3 src/sys/dev/sdmmc/sdhcvar.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/sdmmc/sdhc.c
diff -u src/sys/dev/sdmmc/sdhc.c:1.44.2.7 src/sys/dev/sdmmc/sdhc.c:1.44.2.8
--- src/sys/dev/sdmmc/sdhc.c:1.44.2.7	Mon Mar  9 09:29:33 2015
+++ src/sys/dev/sdmmc/sdhc.c	Sun Apr 19 04:31:40 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: sdhc.c,v 1.44.2.7 2015/03/09 09:29:33 snj Exp $	*/
+/*	$NetBSD: sdhc.c,v 1.44.2.8 2015/04/19 04:31:40 msaitoh Exp $	*/
 /*	$OpenBSD: sdhc.c,v 1.25 2009/01/13 19:44:20 grange Exp $	*/
 
 /*
@@ -23,7 +23,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: sdhc.c,v 1.44.2.7 2015/03/09 09:29:33 snj Exp $);
+__KERNEL_RCSID(0, $NetBSD: sdhc.c,v 1.44.2.8 2015/04/19 04:31:40 msaitoh Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_sdmmc.h
@@ -86,6 +86,7 @@ struct sdhc_host {
 #define SHF_USE_DMA		0x0001
 #define SHF_USE_4BIT_MODE	0x0002
 #define SHF_USE_8BIT_MODE	0x0004
+#define SHF_MODE_DMAEN		0x0008 /* needs SDHC_DMA_ENABLE in mode */
 };
 
 #define HDEVNAME(hp)	(device_xname((hp)-sc-sc_dev))
@@ -309,11 +310,19 @@ sdhc_host_found(struct sdhc_softc *sc, b
 		mutex_exit(hp-host_mtx);
 	}
 
-	/* Use DMA if the host system and the controller support it. */
+	/*
+	 * Use DMA if the host system and the controller support it.
+	 * Suports integrated or external DMA egine, with or without
+	 * SDHC_DMA_ENABLE in the command.
+	 */
 	if (ISSET(sc-sc_flags, SDHC_FLAG_FORCE_DMA) ||
 	(ISSET(sc-sc_flags, SDHC_FLAG_USE_DMA 
 	 ISSET(caps, SDHC_DMA_SUPPORT {
 		SET(hp-flags, SHF_USE_DMA);
+		if (!ISSET(sc-sc_flags, SDHC_FLAG_EXTERNAL_DMA) ||
+		ISSET(sc-sc_flags, SDHC_FLAG_EXTDMA_DMAEN))
+			SET(hp-flags, SHF_MODE_DMAEN);
+
 		aprint_normal_dev(sc-sc_dev, using DMA transfer\n);
 	}
 
@@ -1205,7 +1214,7 @@ sdhc_start_command(struct sdhc_host *hp,
 		mode |= SDHC_AUTO_CMD12_ENABLE;
 	}
 	if (cmd-c_dmamap != NULL  cmd-c_datalen  0 
-	!ISSET(sc-sc_flags, SDHC_FLAG_EXTERNAL_DMA)) {
+	ISSET(hp-flags,  SHF_MODE_DMAEN)) {
 		mode |= SDHC_DMA_ENABLE;
 	}
 
@@ -1251,7 +1260,8 @@ sdhc_start_command(struct sdhc_host *hp,
 	}
 
 	/* Set DMA start address. */
-	if (ISSET(mode, SDHC_DMA_ENABLE))
+	if (ISSET(mode, SDHC_DMA_ENABLE) 
+	!ISSET(sc-sc_flags, SDHC_FLAG_EXTERNAL_DMA))
 		HWRITE4(hp, SDHC_DMA_ADDR, cmd-c_dmamap-dm_segs[0].ds_addr);
 
 	/*

Index: src/sys/dev/sdmmc/sdhcvar.h
diff -u src/sys/dev/sdmmc/sdhcvar.h:1.13.12.2 src/sys/dev/sdmmc/sdhcvar.h:1.13.12.3
--- src/sys/dev/sdmmc/sdhcvar.h:1.13.12.2	Sun Oct  5 20:00:54 2014
+++ src/sys/dev/sdmmc/sdhcvar.h	Sun Apr 19 04:31:40 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: sdhcvar.h,v 1.13.12.2 2014/10/05 20:00:54 martin Exp $	*/
+/*	$NetBSD: sdhcvar.h,v 1.13.12.3 2015/04/19 04:31:40 msaitoh Exp $	*/
 /*	$OpenBSD: sdhcvar.h,v 1.3 2007/09/06 08:01:01 jsg Exp $	*/
 
 /*
@@ -36,21 +36,22 @@ struct sdhc_softc {
 	bus_dma_tag_t		sc_dmat;
 
 	uint32_t		sc_flags;
-#define	SDHC_FLAG_USE_DMA	0x0001
-#define	SDHC_FLAG_FORCE_DMA	0x0002
-#define	SDHC_FLAG_NO_PWR0	0x0004	/* Freescale ESDHC */
-#define	SDHC_FLAG_HAVE_DVS	0x0008	/* Freescale ESDHC */
-#define	SDHC_FLAG_32BIT_ACCESS	0x0010	/* Freescale ESDHC */
-#define	SDHC_FLAG_ENHANCED	0x0020	/* Freescale ESDHC */
-#define	SDHC_FLAG_8BIT_MODE	0x0040	/* MMC 8bit mode is supported */
-#define	SDHC_FLAG_HAVE_CGM	0x0080	/* Netlogic XLP */
-#define	SDHC_FLAG_NO_LED_ON	0x0100	/* LED_ON unsupported in HOST_CTL */
-#define	SDHC_FLAG_HOSTCAPS	0x0200	/* No device provided capabilities */
-#define	SDHC_FLAG_RSP136_CRC	0x0400	/* Resp 136 with CRC and end-bit */
-#define	SDHC_FLAG_SINGLE_ONLY	0x0800	/* Single transfer only */
-#define	SDHC_FLAG_WAIT_RESET	0x1000	/* Wait for soft resets to start */
-#define	SDHC_FLAG_NO_HS_BIT	0x2000	/* Don't set SDHC_HIGH_SPEED bit */
-#define	SDHC_FLAG_EXTERNAL_DMA	0x4000
+#define	SDHC_FLAG_USE_DMA	0x0001
+#define	SDHC_FLAG_FORCE_DMA	0x0002
+#define	SDHC_FLAG_NO_PWR0	0x0004 /* Freescale ESDHC */
+#define	SDHC_FLAG_HAVE_DVS	0x0008 /* Freescale ESDHC */
+#define	SDHC_FLAG_32BIT_ACCESS	0x0010 /* Freescale ESDHC */
+#define	SDHC_FLAG_ENHANCED	0x0020 /* Freescale ESDHC */
+#define	SDHC_FLAG_8BIT_MODE	0x0040 /* MMC 8bit mode is supported */
+#define	SDHC_FLAG_HAVE_CGM	0x0080 /* Netlogic XLP */
+#define	

CVS commit: [netbsd-7] src/sys/arch

2015-04-18 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Apr 19 04:37:17 UTC 2015

Modified Files:
src/sys/arch/arm/omap [netbsd-7]: files.omap2 omap2_obio.c
omap2_obiovar.h omap2_reg.h omap3_sdhc.c
src/sys/arch/evbarm/conf [netbsd-7]: BEAGLEBONE
Added Files:
src/sys/arch/arm/omap [netbsd-7]: omap_edma.c omap_edma.h

Log Message:
Pull up following revision(s) (requested by bouyer in ticket #704):
sys/arch/arm/omap/omap_edma.c: revision 1.1
sys/arch/arm/omap/omap_edma.h: revision 1.1
sys/arch/arm/omap/files.omap2: revision 1.30
sys/arch/arm/omap/omap2_obiovar.h: revision 1.3
sys/arch/arm/omap/omap3_sdhc.c: revision 1.16
sys/arch/arm/omap/omap2_reg.h: revision 1.29
sys/arch/evbarm/conf/BEAGLEBONE: revision 1.31
sys/arch/arm/omap/omap2_obio.c: revision 1.22
 - Add a driver for the Enhanced Direct Memory Access controller found
   in the AM335x SoC. Written by Jared D. McNeill, with some final debug by me.
 - Supports only DMA (not QDMA) yet, and there's no support for DMA event
   matrix yet (this means that only primary DMA events can be used)
 - Add support for DMA transfers. From Jared D. McNeill, with final debug by
   me. With this I can get nearly 20MB/s from my sdcard on the BB black at 1Ghz
   (not bad for a 50Mhz 4-bits bus), and still 15MB/s on the BB white at
   low speed (275Mhz).
 - Add the edma controller, and enable DMA for sdhc0 and sdhc1


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.28.2.1 src/sys/arch/arm/omap/files.omap2 \
src/sys/arch/arm/omap/omap2_reg.h
cvs rdiff -u -r1.21 -r1.21.8.1 src/sys/arch/arm/omap/omap2_obio.c
cvs rdiff -u -r1.2 -r1.2.14.1 src/sys/arch/arm/omap/omap2_obiovar.h
cvs rdiff -u -r1.14 -r1.14.4.1 src/sys/arch/arm/omap/omap3_sdhc.c
cvs rdiff -u -r0 -r1.1.2.2 src/sys/arch/arm/omap/omap_edma.c \
src/sys/arch/arm/omap/omap_edma.h
cvs rdiff -u -r1.24 -r1.24.2.1 src/sys/arch/evbarm/conf/BEAGLEBONE

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/omap/files.omap2
diff -u src/sys/arch/arm/omap/files.omap2:1.28 src/sys/arch/arm/omap/files.omap2:1.28.2.1
--- src/sys/arch/arm/omap/files.omap2:1.28	Wed Jul 16 18:31:17 2014
+++ src/sys/arch/arm/omap/files.omap2	Sun Apr 19 04:37:17 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: files.omap2,v 1.28 2014/07/16 18:31:17 bouyer Exp $
+#	$NetBSD: files.omap2,v 1.28.2.1 2015/04/19 04:37:17 msaitoh Exp $
 #
 # Configuration info for Texas Instruments OMAP2/OMAP3 CPU support
 # Based on xscale/files.pxa2x0
@@ -32,7 +32,7 @@ defflag opt_omap.hTI_AM335X: OMAP3
 defflag opt_omap.hTI_DM37XX: OMAP3
 
 # OBIO just an attach point
-device	obio { [addr=-1], [size=0], [intr=-1], [mult=1], [intrbase=-1], [nobyteacc=0]
+device	obio { [addr=-1], [size=0], [intr=-1], [mult=1], [intrbase=-1], [nobyteacc=0], [edmabase=-1]
 	 } : bus_space_generic
 attach	obio at mainbus
 file	arch/arm/omap/omap2_obio.c		obio needs-count
@@ -170,6 +170,10 @@ device 	omapdma
 attach 	omapdma at obio
 file	arch/arm/omap/omap3_sdma.c		omapdma needs-flag
 
+device	edma
+attach	edma at obio
+file	arch/arm/omap/omap_edma.c		edma needs-flag
+
 # these bus space methods are not bus-specific ...
 #
 file	arch/arm/omap/omap_nobyteacc_space.c	emifs | gpmc
Index: src/sys/arch/arm/omap/omap2_reg.h
diff -u src/sys/arch/arm/omap/omap2_reg.h:1.28 src/sys/arch/arm/omap/omap2_reg.h:1.28.2.1
--- src/sys/arch/arm/omap/omap2_reg.h:1.28	Sun Jul 20 23:08:43 2014
+++ src/sys/arch/arm/omap/omap2_reg.h	Sun Apr 19 04:37:17 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: omap2_reg.h,v 1.28 2014/07/20 23:08:43 bouyer Exp $ */
+/* $NetBSD: omap2_reg.h,v 1.28.2.1 2015/04/19 04:37:17 msaitoh Exp $ */
 
 /*
  * Copyright (c) 2007 Microsoft
@@ -896,5 +896,20 @@
 #define	SDRAM_CONFIG_EBANK		__BIT(3)
 #define	SDRAM_CONFIG_PAGESIZE		__BITS(2,0)
 #endif
-	
+
+/* EDMA3 */
+#define AM335X_TPCC_BASE		0x4900
+#define AM335X_TPCC_SIZE		0x0010
+#define AM335X_TPTC0_BASE		0x4980
+#define AM335X_TPTC0_SIZE		0x0010
+#define AM335X_TPTC1_BASE		0x4990
+#define AM335X_TPTC1_SIZE		0x0010
+#define AM335X_TPTC2_BASE		0x49a0
+#define AM335X_TPTC2_SIZE		0x0010
+#define AM335X_INT_EDMACOMPINT		12
+#define AM335X_INT_EDMAMPERR		13
+#define AM335X_INT_EDMAERRINT		14
+#define AM335X_INT_TCERRINT0		112
+#define AM335X_INT_TCERRINT1		113
+#define AM335X_INT_TCERRINT2		114
 #endif	/* _ARM_OMAP_OMAP2_REG_H_ */

Index: src/sys/arch/arm/omap/omap2_obio.c
diff -u src/sys/arch/arm/omap/omap2_obio.c:1.21 src/sys/arch/arm/omap/omap2_obio.c:1.21.8.1
--- src/sys/arch/arm/omap/omap2_obio.c:1.21	Sat Jun 15 21:58:20 2013
+++ src/sys/arch/arm/omap/omap2_obio.c	Sun Apr 19 04:37:17 2015
@@ -1,7 +1,7 @@
-/*	$Id: omap2_obio.c,v 1.21 2013/06/15 21:58:20 matt Exp $	*/
+/*	$Id: omap2_obio.c,v 1.21.8.1 2015/04/19 04:37:17 msaitoh Exp $	*/
 
 /* adapted from: */
-/*	$NetBSD: omap2_obio.c,v 1.21 2013/06/15 

CVS commit: [netbsd-7] src/libexec/httpd

2015-04-18 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Apr 19 04:44:03 UTC 2015

Modified Files:
src/libexec/httpd [netbsd-7]: CHANGES bozohttpd.8 bozohttpd.c

Log Message:
Pull up following revision(s) (requested by mrg in ticket #705):
libexec/httpd/CHANGES: revision 1.20
libexec/httpd/bozohttpd.8: revision 1.49
libexec/httpd/bozohttpd.c: revision 1.62-1.63
don't quote /.  it doesn't work.  this should fix PR#49765.
copyright maintenance, note shm@ in the manual and update the CHANGES
for recent changes.  call this 20150320.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.19.2.1 src/libexec/httpd/CHANGES
cvs rdiff -u -r1.46.4.1 -r1.46.4.2 src/libexec/httpd/bozohttpd.8
cvs rdiff -u -r1.56.2.2 -r1.56.2.3 src/libexec/httpd/bozohttpd.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/CHANGES
diff -u src/libexec/httpd/CHANGES:1.19 src/libexec/httpd/CHANGES:1.19.2.1
--- src/libexec/httpd/CHANGES:1.19	Thu Jul 17 10:21:51 2014
+++ src/libexec/httpd/CHANGES	Sun Apr 19 04:44:03 2015
@@ -1,7 +1,12 @@
 $eterna: CHANGES,v 1.78 2011/11/18 01:25:11 mrg Exp $
 
+changes in bozohttpd 20150320:
+	o  fix redirection handling
+	o  support transport stream (.ts) and video object (.vob) files
+	o  directory listings show correct file sizes for large files
+
 changes in bozohttpd 20140717:
-	o  properly handle SSL errors.
+	o  properly handle SSL errors
 
 changes in bozohttpd 20140708:
 	o  fixes for virtual host support, from rajeev_v_pil...@yahoo.com

Index: src/libexec/httpd/bozohttpd.8
diff -u src/libexec/httpd/bozohttpd.8:1.46.4.1 src/libexec/httpd/bozohttpd.8:1.46.4.2
--- src/libexec/httpd/bozohttpd.8:1.46.4.1	Mon Jan 12 10:02:29 2015
+++ src/libexec/httpd/bozohttpd.8	Sun Apr 19 04:44:03 2015
@@ -1,8 +1,8 @@
-.\	$NetBSD: bozohttpd.8,v 1.46.4.1 2015/01/12 10:02:29 martin Exp $
+.\	$NetBSD: bozohttpd.8,v 1.46.4.2 2015/04/19 04:44:03 msaitoh Exp $
 .\
 .\	$eterna: bozohttpd.8,v 1.101 2011/11/18 01:25:11 mrg Exp $
 .\
-.\ Copyright (c) 1997-2014 Matthew R. Green
+.\ Copyright (c) 1997-2015 Matthew R. Green
 .\ All rights reserved.
 .\
 .\ Redistribution and use in source and binary forms, with or without
@@ -26,7 +26,7 @@
 .\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\ SUCH DAMAGE.
 .\
-.Dd December 25, 2014
+.Dd March 20, 2015
 .Dt HTTPD 8
 .Os
 .Sh NAME
@@ -597,6 +597,11 @@ provided fixes for HTTP basic authorisat
 .Aq Mt w...@netbsd.org
 provided many fixes and enhancements for the man page
 .It
+.An Mateusz Kocielski
+.Aq Mt s...@netbsd.org
+fixed memory leaks, information disclosure issues and added support
+for using CGI handlers with directory indexing.
+.It
 .An Arnaud Lacombe
 .Aq Mt a...@netbsd.org
 provided some clean up for memory leaks

Index: src/libexec/httpd/bozohttpd.c
diff -u src/libexec/httpd/bozohttpd.c:1.56.2.2 src/libexec/httpd/bozohttpd.c:1.56.2.3
--- src/libexec/httpd/bozohttpd.c:1.56.2.2	Wed Feb  4 10:17:19 2015
+++ src/libexec/httpd/bozohttpd.c	Sun Apr 19 04:44:03 2015
@@ -1,9 +1,9 @@
-/*	$NetBSD: bozohttpd.c,v 1.56.2.2 2015/02/04 10:17:19 martin Exp $	*/
+/*	$NetBSD: bozohttpd.c,v 1.56.2.3 2015/04/19 04:44:03 msaitoh Exp $	*/
 
 /*	$eterna: bozohttpd.c,v 1.178 2011/11/18 09:21:15 mrg Exp $	*/
 
 /*
- * Copyright (c) 1997-2014 Matthew R. Green
+ * Copyright (c) 1997-2015 Matthew R. Green
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -109,7 +109,7 @@
 #define INDEX_HTML		index.html
 #endif
 #ifndef SERVER_SOFTWARE
-#define SERVER_SOFTWARE		bozohttpd/20141225
+#define SERVER_SOFTWARE		bozohttpd/20150320
 #endif
 #ifndef DIRECT_ACCESS_FILE
 #define DIRECT_ACCESS_FILE	.bzdirect
@@ -878,7 +878,6 @@ bozo_escape_rfc3986(bozohttpd_t *httpd, 
 			goto encode_it;
 		switch (*s) {
 		case ':':
-		case '/':
 		case '?':
 		case '#':
 		case '[':



CVS commit: [netbsd-7] xsrc/xfree/xc/lib/X11

2015-04-18 Thread SAITOH Masanobu
Module Name:xsrc
Committed By:   msaitoh
Date:   Sun Apr 19 04:57:35 UTC 2015

Modified Files:
xsrc/xfree/xc/lib/X11 [netbsd-7]: Xlibint.h

Log Message:
Pull up following revision(s) (requested by mrg in ticket #706):
xfree/xc/lib/X11/Xlibint.h: revision 1.2
Fix CVE-2013-7439: Buffer overflow in MakeBigReq macro in libX11 prior to 1.6
port the fixes in libX11 1.6 back to xfree tree from:
http://cgit.freedesktop.org/xorg/lib/libX11/commit/?id=39547d600a13713e15429f49768e54c3173c828d


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.7 -r1.1.1.7.24.1 xsrc/xfree/xc/lib/X11/Xlibint.h

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

Modified files:

Index: xsrc/xfree/xc/lib/X11/Xlibint.h
diff -u xsrc/xfree/xc/lib/X11/Xlibint.h:1.1.1.7 xsrc/xfree/xc/lib/X11/Xlibint.h:1.1.1.7.24.1
--- xsrc/xfree/xc/lib/X11/Xlibint.h:1.1.1.7	Fri Mar 18 13:04:29 2005
+++ xsrc/xfree/xc/lib/X11/Xlibint.h	Sun Apr 19 04:57:34 2015
@@ -528,6 +528,14 @@ extern LockInfoPtr _Xglobal_lock;
 #endif
 
 #ifdef WORD64
+/*
+ * MakeBigReq sets the CARD16 req-length to 0 and inserts a new CARD32
+ * length, after req-length, before the data in the request.  The new length
+ * includes the n extra 32-bit words.
+ *
+ * Do not use MakeBigReq if there is no data already in the request.
+ * req-length must already be = 2.
+ */
 #define MakeBigReq(req,n) \
 { \
 char _BRdat[4]; \
@@ -546,7 +554,7 @@ extern LockInfoPtr _Xglobal_lock;
 CARD32 _BRlen = req-length - 1; \
 req-length = 0; \
 _BRdat = ((CARD32 *)req)[_BRlen]; \
-memmove(((char *)req) + 8, ((char *)req) + 4, _BRlen  2); \
+memmove(((char *)req) + 8, ((char *)req) + 4, (_BRlen - 1)  2); \
 ((CARD32 *)req)[1] = _BRlen + n + 2; \
 Data32(dpy, _BRdat, 4); \
 }
@@ -557,13 +565,20 @@ extern LockInfoPtr _Xglobal_lock;
 CARD32 _BRlen = req-length - 1; \
 req-length = 0; \
 _BRdat = ((CARD32 *)req)[_BRlen]; \
-memmove(((char *)req) + 8, ((char *)req) + 4, _BRlen  2); \
+memmove(((char *)req) + 8, ((char *)req) + 4, (_BRlen - 1)  2); \
 ((CARD32 *)req)[1] = _BRlen + n + 2; \
 Data32(dpy, _BRdat, 4); \
 }
 #endif
 #endif
 
+/*
+ * SetReqLen increases the count of 32-bit words in the request by n,
+ * or by badlen if n is too large.
+ *
+ * Do not use SetReqLen if req does not already have data after the
+ * xReq header.  req-length must already be = 2.
+ */
 #define SetReqLen(req,n,badlen) \
 if ((req-length + n)  (unsigned)65535) { \
 	if (dpy-bigreq_size) { \



CVS commit: [netbsd-7] src/lib/libc/stdlib

2015-04-18 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Apr 19 05:03:02 UTC 2015

Modified Files:
src/lib/libc/stdlib [netbsd-7]: atexit.c

Log Message:
Pull up following revision(s) (requested by joerg in ticket #708):
lib/libc/stdlib/atexit.c: revision 1.28
Add __aeabi_atexit alias for another case of NIH on ARM.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.26.4.1 src/lib/libc/stdlib/atexit.c

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

Modified files:

Index: src/lib/libc/stdlib/atexit.c
diff -u src/lib/libc/stdlib/atexit.c:1.26 src/lib/libc/stdlib/atexit.c:1.26.4.1
--- src/lib/libc/stdlib/atexit.c:1.26	Mon Aug 19 22:14:37 2013
+++ src/lib/libc/stdlib/atexit.c	Sun Apr 19 05:03:02 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: atexit.c,v 1.26 2013/08/19 22:14:37 matt Exp $	*/
+/*	$NetBSD: atexit.c,v 1.26.4.1 2015/04/19 05:03:02 msaitoh Exp $	*/
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include sys/cdefs.h
 #if defined(LIBC_SCCS)  !defined(lint)
-__RCSID($NetBSD: atexit.c,v 1.26 2013/08/19 22:14:37 matt Exp $);
+__RCSID($NetBSD: atexit.c,v 1.26.4.1 2015/04/19 05:03:02 msaitoh Exp $);
 #endif /* LIBC_SCCS and not lint */
 
 #include reentrant.h
@@ -133,6 +133,10 @@ __libc_atexit_init(void)
  *
  *	http://www.codesourcery.com/cxx-abi/abi.html#dso-dtor
  */
+#if defined(__ARM_EABI__)  !defined(lint)
+__strong_alias(__aeabi_atexit,__cxa_atexit);
+#endif
+
 int
 __cxa_atexit(void (*func)(void *), void *arg, void *dso)
 {



CVS commit: [netbsd-7] src/lib/libc/arch/sh3/gen

2015-04-18 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Apr 19 05:05:41 UTC 2015

Modified Files:
src/lib/libc/arch/sh3/gen [netbsd-7]: swapcontext.S

Log Message:
Pull up following revision(s) (requested by uwe in ticket #709):
lib/libc/arch/sh3/gen/swapcontext.S: revision 1.11
lib/libc/arch/sh3/gen/swapcontext.S: revision 1.12
 - Adjust _UC_MACHINE_SP(oucp) to drop values we pushed to the stack.
   t_swapcontext tests pass now with gcc 4.8. From Yasushi Oshima in
   PR port-sh3/49597.
 - On swapcontext(3) preserve r12 too.  Properly fixes PR port-sh3/49597.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.10.4.1 src/lib/libc/arch/sh3/gen/swapcontext.S

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

Modified files:

Index: src/lib/libc/arch/sh3/gen/swapcontext.S
diff -u src/lib/libc/arch/sh3/gen/swapcontext.S:1.10 src/lib/libc/arch/sh3/gen/swapcontext.S:1.10.4.1
--- src/lib/libc/arch/sh3/gen/swapcontext.S:1.10	Thu Sep 12 15:36:15 2013
+++ src/lib/libc/arch/sh3/gen/swapcontext.S	Sun Apr 19 05:05:41 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: swapcontext.S,v 1.10 2013/09/12 15:36:15 joerg Exp $	*/
+/*	$NetBSD: swapcontext.S,v 1.10.4.1 2015/04/19 05:05:41 msaitoh Exp $	*/
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include machine/asm.h
 #if defined(SYSLIBC_SCCS)  !defined(lint)
-	RCSID($NetBSD: swapcontext.S,v 1.10 2013/09/12 15:36:15 joerg Exp $)
+	RCSID($NetBSD: swapcontext.S,v 1.10.4.1 2015/04/19 05:05:41 msaitoh Exp $)
 #endif /* SYSLIBC_SCCS and not lint */
 
 /*
@@ -40,33 +40,33 @@
  */
 ENTRY(swapcontext)
 	PIC_PROLOGUE(.L_got)
-	mov.l	r5, @-sp
 	sts.l	pr, @-sp
 
 	mov.l	.L__getcontext, r0
-1:	CALL	r0			/* _getcontext(oucp) */
+	mov.l	r5, @-sp
+1:	CALL	r0			! _getcontext(oucp)
 	 mov.l	r4, @-sp
-	mov.l	@sp+, r1
+	!! getcontext captures oucp resuming here with r12 (when PIC),
+	!! pr, r5 and r4 pushed onto the stack
+
 	tst	r0, r0
-	bf	3f			/* return error from getcontext */
+	bf.s	3f			! return error from getcontext
+	 mov.l	@sp, r1			! saved oucp
+
+	!! adjust oucp to resume after setcontext below
+	mova	3f, r0
+	mov.l	r0, @(36 + 1 * 4, r1)	! _UC_MACHINE_SET_PC(oucp, pr)
 
-	/* Note: getcontext does _UC_MACHINE_INTRV(oucp) = 0 for us */
-	mov.l	@sp, r0
-	mov.l	r0, @(36 + 1 * 4, r1)	/* _UC_MACHINE_SET_PC(oucp, pr) */
 	mov.l	.L_setcontext, r2
-2:	CALL	r2			/* setcontext(ucp) */
-	 mov.l	@(4, sp), r4
-	/* if we get here, return error from setcontext */
-3:
+2:	CALL	r2			! setcontext(ucp)
+	 mov.l	@(4, sp), r4		! saved ucp
+
+	.align	2
+3:	!! we get here on errors and when resuming oucp
+	add	#8, sp			! skip r4 and r5
 	lds.l	@sp+, pr
-#ifdef __PIC__
-	add	#4, sp
-	rts
-	 PIC_EPILOGUE
-#else
 	rts
-	 add	#4, sp
-#endif
+	 PIC_EPILOGUE_SLOT
 
 	.align	2
 .L_got:			PIC_GOT_DATUM



CVS commit: [netbsd-7] src/doc

2015-04-18 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Apr 19 05:14:07 UTC 2015

Modified Files:
src/doc [netbsd-7]: CHANGES-7.0

Log Message:
Ticket 703-706 and 708-709.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.258 -r1.1.2.259 src/doc/CHANGES-7.0

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-7.0
diff -u src/doc/CHANGES-7.0:1.1.2.258 src/doc/CHANGES-7.0:1.1.2.259
--- src/doc/CHANGES-7.0:1.1.2.258	Fri Apr 17 09:47:18 2015
+++ src/doc/CHANGES-7.0	Sun Apr 19 05:14:06 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.0,v 1.1.2.258 2015/04/17 09:47:18 msaitoh Exp $
+# $NetBSD: CHANGES-7.0,v 1.1.2.259 2015/04/19 05:14:06 msaitoh Exp $
 
 A complete list of changes from the initial NetBSD 7.0 branch on 11 Aug 2014
 until the 7.0 release:
@@ -19720,3 +19720,51 @@ sys/dev/i2c/files.i2c1.58
 	Fix break build on evbppc which was caused by ticket 672.
 	dsrtc depends on sysmon_envsys.
 	[nonaka, ticket #700]
+
+sys/dev/sdmmc/sdhc.c1.55
+sys/dev/sdmmc/sdhcvar.h1.16
+
+	Add a new SDHC_FLAG, SDHC_FLAG_EXTDMA_DMAEN, which request that the
+	SDHC_DMA_ENABLE bit be set in the command, even if we're using an
+	external DMA engine. Needed by the upcoming DMA support for AM335x
+	(beaglebone).
+	[bouyer, ticket #703]
+
+sys/arch/arm/omap/files.omap2			1.30
+sys/arch/arm/omap/omap2_obio.c			1.22
+sys/arch/arm/omap/omap2_obiovar.h		1.3
+sys/arch/arm/omap/omap2_reg.h			1.29
+sys/arch/arm/omap/omap3_sdhc.c			1.16
+sys/arch/arm/omap/omap_edma.c			1.1
+sys/arch/arm/omap/omap_edma.h			1.1
+sys/arch/evbarm/conf/BEAGLEBONE			1.31
+
+	Add a driver for the Enhanced Direct Memory Access controller found
+	in the AM335x SoC. Written by Jared D. McNeill.
+	[bouyer, ticket #704]
+
+libexec/httpd/CHANGES1.20
+libexec/httpd/bozohttpd.8			1.49
+libexec/httpd/bozohttpd.c			1.62
+libexec/httpd/bozohttpd.c			1.63
+
+	Don't quote /. It doesn't work.  This should fix PR#49765.
+	Update the copyright and version name.
+	[mrg, ticket #705]
+
+xfree/xc/lib/X11/Xlibint.h			1.2
+
+	Fix CVE-2013-7439: Buffer overflow in MakeBigReq macro in libX11 prior
+	to 1.6.
+	[mrg, ticket #706]
+
+lib/libc/stdlib/atexit.c			1.28
+
+	Add __aeabi_atexit alias for another case of NIH on ARM.
+	[joerg, ticket #708]
+
+lib/libc/arch/sh3/gen/swapcontext.S		1.11-1.12
+
+	Correctly preserve old sate in swapcontext(3).
+	Fixes PR port-sh3/49597 reported by Yasushi Oshima.
+	[uwe, ticket #709]



CVS commit: [netbsd-7] src/doc

2015-04-18 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Apr 19 05:27:29 UTC 2015

Modified Files:
src/doc [netbsd-7]: CHANGES-7.0

Log Message:
Optimize for ticket 705.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.259 -r1.1.2.260 src/doc/CHANGES-7.0

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-7.0
diff -u src/doc/CHANGES-7.0:1.1.2.259 src/doc/CHANGES-7.0:1.1.2.260
--- src/doc/CHANGES-7.0:1.1.2.259	Sun Apr 19 05:14:06 2015
+++ src/doc/CHANGES-7.0	Sun Apr 19 05:27:29 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.0,v 1.1.2.259 2015/04/19 05:14:06 msaitoh Exp $
+# $NetBSD: CHANGES-7.0,v 1.1.2.260 2015/04/19 05:27:29 msaitoh Exp $
 
 A complete list of changes from the initial NetBSD 7.0 branch on 11 Aug 2014
 until the 7.0 release:
@@ -19745,8 +19745,7 @@ sys/arch/evbarm/conf/BEAGLEBONE			1.31
 
 libexec/httpd/CHANGES1.20
 libexec/httpd/bozohttpd.8			1.49
-libexec/httpd/bozohttpd.c			1.62
-libexec/httpd/bozohttpd.c			1.63
+libexec/httpd/bozohttpd.c			1.62-1.63
 
 	Don't quote /. It doesn't work.  This should fix PR#49765.
 	Update the copyright and version name.



CVS commit: [netbsd-6] xsrc

2015-04-18 Thread SAITOH Masanobu
Module Name:xsrc
Committed By:   msaitoh
Date:   Sun Apr 19 05:48:30 UTC 2015

Modified Files:
xsrc/external/mit/libX11/dist/include/X11 [netbsd-6]: Xlibint.h
xsrc/xfree/xc/lib/X11 [netbsd-6]: Xlibint.h

Log Message:
Pull up following revision(s) (requested by mrg in ticket #1290):
xsrc/external/mit/libX11/dist/include/X11/Xlibint.h patch
xsrc/xfree/xc/lib/X11/Xlibint.h 1.2

Fix CVE-2013-7439: Buffer overflow in MakeBigReq macro in libX11.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.7 -r1.1.1.7.2.1 \
xsrc/external/mit/libX11/dist/include/X11/Xlibint.h
cvs rdiff -u -r1.1.1.7 -r1.1.1.7.14.1 xsrc/xfree/xc/lib/X11/Xlibint.h

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

Modified files:

Index: xsrc/external/mit/libX11/dist/include/X11/Xlibint.h
diff -u xsrc/external/mit/libX11/dist/include/X11/Xlibint.h:1.1.1.7 xsrc/external/mit/libX11/dist/include/X11/Xlibint.h:1.1.1.7.2.1
--- xsrc/external/mit/libX11/dist/include/X11/Xlibint.h:1.1.1.7	Wed Aug  3 03:01:44 2011
+++ xsrc/external/mit/libX11/dist/include/X11/Xlibint.h	Sun Apr 19 05:48:29 2015
@@ -536,6 +536,14 @@ extern LockInfoPtr _Xglobal_lock;
 #endif
 
 #ifdef WORD64
+/*
+ * MakeBigReq sets the CARD16 req-length to 0 and inserts a new CARD32
+ * length, after req-length, before the data in the request.  The new length
+ * includes the n extra 32-bit words.
+ *
+ * Do not use MakeBigReq if there is no data already in the request.
+ * req-length must already be = 2.
+ */
 #define MakeBigReq(req,n) \
 { \
 char _BRdat[4]; \
@@ -554,7 +562,7 @@ extern LockInfoPtr _Xglobal_lock;
 CARD32 _BRlen = req-length - 1; \
 req-length = 0; \
 _BRdat = ((CARD32 *)req)[_BRlen]; \
-memmove(((char *)req) + 8, ((char *)req) + 4, _BRlen  2); \
+memmove(((char *)req) + 8, ((char *)req) + 4, (_BRlen - 1)  2); \
 ((CARD32 *)req)[1] = _BRlen + n + 2; \
 Data32(dpy, _BRdat, 4); \
 }
@@ -565,13 +573,20 @@ extern LockInfoPtr _Xglobal_lock;
 CARD32 _BRlen = req-length - 1; \
 req-length = 0; \
 _BRdat = ((CARD32 *)req)[_BRlen]; \
-memmove(((char *)req) + 8, ((char *)req) + 4, _BRlen  2); \
+memmove(((char *)req) + 8, ((char *)req) + 4, (_BRlen - 1)  2); \
 ((CARD32 *)req)[1] = _BRlen + n + 2; \
 Data32(dpy, _BRdat, 4); \
 }
 #endif
 #endif
 
+/*
+ * SetReqLen increases the count of 32-bit words in the request by n,
+ * or by badlen if n is too large.
+ *
+ * Do not use SetReqLen if req does not already have data after the
+ * xReq header.  req-length must already be = 2.
+ */
 #ifndef __clang_analyzer__
 #define SetReqLen(req,n,badlen) \
 if ((req-length + n)  (unsigned)65535) { \

Index: xsrc/xfree/xc/lib/X11/Xlibint.h
diff -u xsrc/xfree/xc/lib/X11/Xlibint.h:1.1.1.7 xsrc/xfree/xc/lib/X11/Xlibint.h:1.1.1.7.14.1
--- xsrc/xfree/xc/lib/X11/Xlibint.h:1.1.1.7	Fri Mar 18 13:04:29 2005
+++ xsrc/xfree/xc/lib/X11/Xlibint.h	Sun Apr 19 05:48:29 2015
@@ -528,6 +528,14 @@ extern LockInfoPtr _Xglobal_lock;
 #endif
 
 #ifdef WORD64
+/*
+ * MakeBigReq sets the CARD16 req-length to 0 and inserts a new CARD32
+ * length, after req-length, before the data in the request.  The new length
+ * includes the n extra 32-bit words.
+ *
+ * Do not use MakeBigReq if there is no data already in the request.
+ * req-length must already be = 2.
+ */
 #define MakeBigReq(req,n) \
 { \
 char _BRdat[4]; \
@@ -546,7 +554,7 @@ extern LockInfoPtr _Xglobal_lock;
 CARD32 _BRlen = req-length - 1; \
 req-length = 0; \
 _BRdat = ((CARD32 *)req)[_BRlen]; \
-memmove(((char *)req) + 8, ((char *)req) + 4, _BRlen  2); \
+memmove(((char *)req) + 8, ((char *)req) + 4, (_BRlen - 1)  2); \
 ((CARD32 *)req)[1] = _BRlen + n + 2; \
 Data32(dpy, _BRdat, 4); \
 }
@@ -557,13 +565,20 @@ extern LockInfoPtr _Xglobal_lock;
 CARD32 _BRlen = req-length - 1; \
 req-length = 0; \
 _BRdat = ((CARD32 *)req)[_BRlen]; \
-memmove(((char *)req) + 8, ((char *)req) + 4, _BRlen  2); \
+memmove(((char *)req) + 8, ((char *)req) + 4, (_BRlen - 1)  2); \
 ((CARD32 *)req)[1] = _BRlen + n + 2; \
 Data32(dpy, _BRdat, 4); \
 }
 #endif
 #endif
 
+/*
+ * SetReqLen increases the count of 32-bit words in the request by n,
+ * or by badlen if n is too large.
+ *
+ * Do not use SetReqLen if req does not already have data after the
+ * xReq header.  req-length must already be = 2.
+ */
 #define SetReqLen(req,n,badlen) \
 if ((req-length + n)  (unsigned)65535) { \
 	if (dpy-bigreq_size) { \



CVS commit: [netbsd-6] src/lib/libc/arch/sh3/gen

2015-04-18 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Apr 19 05:51:57 UTC 2015

Modified Files:
src/lib/libc/arch/sh3/gen [netbsd-6]: swapcontext.S

Log Message:
Pull up following revision(s) (requested by uwe in ticket #1294):

lib/libc/arch/sh3/gen/swapcontext.S 1.11-1.12 via patch

Correctly preserve old sate in swapcontext(3).
Fixes PR port-sh3/49597 reported by Yasushi Oshima.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.9.24.1 src/lib/libc/arch/sh3/gen/swapcontext.S

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

Modified files:

Index: src/lib/libc/arch/sh3/gen/swapcontext.S
diff -u src/lib/libc/arch/sh3/gen/swapcontext.S:1.9 src/lib/libc/arch/sh3/gen/swapcontext.S:1.9.24.1
--- src/lib/libc/arch/sh3/gen/swapcontext.S:1.9	Mon Apr 28 20:22:57 2008
+++ src/lib/libc/arch/sh3/gen/swapcontext.S	Sun Apr 19 05:51:57 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: swapcontext.S,v 1.9 2008/04/28 20:22:57 martin Exp $	*/
+/*	$NetBSD: swapcontext.S,v 1.9.24.1 2015/04/19 05:51:57 msaitoh Exp $	*/
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include machine/asm.h
 #if defined(SYSLIBC_SCCS)  !defined(lint)
-	RCSID($NetBSD: swapcontext.S,v 1.9 2008/04/28 20:22:57 martin Exp $)
+	RCSID($NetBSD: swapcontext.S,v 1.9.24.1 2015/04/19 05:51:57 msaitoh Exp $)
 #endif /* SYSLIBC_SCCS and not lint */
 
 /*
@@ -40,33 +40,33 @@
  */
 ENTRY(swapcontext)
 	PIC_PROLOGUE(.L_got)
-	mov.l	r5, @-sp
 	sts.l	pr, @-sp
 
 	mov.l	.L__getcontext, r0
-1:	CALL	r0			/* _getcontext(oucp) */
+	mov.l	r5, @-sp
+1:	CALL	r0			! _getcontext(oucp)
 	 mov.l	r4, @-sp
-	mov.l	@sp+, r1
+	!! getcontext captures oucp resuming here with r12 (when PIC),
+	!! pr, r5 and r4 pushed onto the stack
+
 	tst	r0, r0
-	bf	3f			/* return error from getcontext */
+	bf.s	3f			! return error from getcontext
+	 mov.l	@sp, r1			! saved oucp
+
+	!! adjust oucp to resume after setcontext below
+	mova	3f, r0
+	mov.l	r0, @(36 + 1 * 4, r1)	! _UC_MACHINE_SET_PC(oucp, pr)
 
-	/* Note: getcontext does _UC_MACHINE_INTRV(oucp) = 0 for us */
-	mov.l	@sp, r0
-	mov.l	r0, @(36 + 1 * 4, r1)	/* _UC_MACHINE_SET_PC(oucp, pr) */
 	mov.l	.L_setcontext, r2
-2:	CALL	r2			/* setcontext(ucp) */
-	 mov.l	@(4, sp), r4
-	/* if we get here, return error from setcontext */
-3:
+2:	CALL	r2			! setcontext(ucp)
+	 mov.l	@(4, sp), r4		! saved ucp
+
+	.align	2
+3:	!! we get here on errors and when resuming oucp
+	add	#8, sp			! skip r4 and r5
 	lds.l	@sp+, pr
-#ifdef PIC
-	add	#4, sp
-	rts
-	 PIC_EPILOGUE
-#else
 	rts
-	 add	#4, sp
-#endif
+	 PIC_EPILOGUE_SLOT
 
 	.align	2
 .L_got:			PIC_GOT_DATUM



CVS commit: [netbsd-6-1] xsrc

2015-04-18 Thread SAITOH Masanobu
Module Name:xsrc
Committed By:   msaitoh
Date:   Sun Apr 19 05:54:40 UTC 2015

Modified Files:
xsrc/external/mit/libX11/dist/include/X11 [netbsd-6-1]: Xlibint.h
xsrc/xfree/xc/lib/X11 [netbsd-6-1]: Xlibint.h

Log Message:
Pull up following revision(s) (requested by mrg in ticket #1290):
xsrc/external/mit/libX11/dist/include/X11/Xlibint.h patch
xsrc/xfree/xc/lib/X11/Xlibint.h 1.2

Fix CVE-2013-7439: Buffer overflow in MakeBigReq macro in libX11.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.7 -r1.1.1.7.6.1 \
xsrc/external/mit/libX11/dist/include/X11/Xlibint.h
cvs rdiff -u -r1.1.1.7 -r1.1.1.7.20.1 xsrc/xfree/xc/lib/X11/Xlibint.h

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

Modified files:

Index: xsrc/external/mit/libX11/dist/include/X11/Xlibint.h
diff -u xsrc/external/mit/libX11/dist/include/X11/Xlibint.h:1.1.1.7 xsrc/external/mit/libX11/dist/include/X11/Xlibint.h:1.1.1.7.6.1
--- xsrc/external/mit/libX11/dist/include/X11/Xlibint.h:1.1.1.7	Wed Aug  3 03:01:44 2011
+++ xsrc/external/mit/libX11/dist/include/X11/Xlibint.h	Sun Apr 19 05:54:40 2015
@@ -536,6 +536,14 @@ extern LockInfoPtr _Xglobal_lock;
 #endif
 
 #ifdef WORD64
+/*
+ * MakeBigReq sets the CARD16 req-length to 0 and inserts a new CARD32
+ * length, after req-length, before the data in the request.  The new length
+ * includes the n extra 32-bit words.
+ *
+ * Do not use MakeBigReq if there is no data already in the request.
+ * req-length must already be = 2.
+ */
 #define MakeBigReq(req,n) \
 { \
 char _BRdat[4]; \
@@ -554,7 +562,7 @@ extern LockInfoPtr _Xglobal_lock;
 CARD32 _BRlen = req-length - 1; \
 req-length = 0; \
 _BRdat = ((CARD32 *)req)[_BRlen]; \
-memmove(((char *)req) + 8, ((char *)req) + 4, _BRlen  2); \
+memmove(((char *)req) + 8, ((char *)req) + 4, (_BRlen - 1)  2); \
 ((CARD32 *)req)[1] = _BRlen + n + 2; \
 Data32(dpy, _BRdat, 4); \
 }
@@ -565,13 +573,20 @@ extern LockInfoPtr _Xglobal_lock;
 CARD32 _BRlen = req-length - 1; \
 req-length = 0; \
 _BRdat = ((CARD32 *)req)[_BRlen]; \
-memmove(((char *)req) + 8, ((char *)req) + 4, _BRlen  2); \
+memmove(((char *)req) + 8, ((char *)req) + 4, (_BRlen - 1)  2); \
 ((CARD32 *)req)[1] = _BRlen + n + 2; \
 Data32(dpy, _BRdat, 4); \
 }
 #endif
 #endif
 
+/*
+ * SetReqLen increases the count of 32-bit words in the request by n,
+ * or by badlen if n is too large.
+ *
+ * Do not use SetReqLen if req does not already have data after the
+ * xReq header.  req-length must already be = 2.
+ */
 #ifndef __clang_analyzer__
 #define SetReqLen(req,n,badlen) \
 if ((req-length + n)  (unsigned)65535) { \

Index: xsrc/xfree/xc/lib/X11/Xlibint.h
diff -u xsrc/xfree/xc/lib/X11/Xlibint.h:1.1.1.7 xsrc/xfree/xc/lib/X11/Xlibint.h:1.1.1.7.20.1
--- xsrc/xfree/xc/lib/X11/Xlibint.h:1.1.1.7	Fri Mar 18 13:04:29 2005
+++ xsrc/xfree/xc/lib/X11/Xlibint.h	Sun Apr 19 05:54:40 2015
@@ -528,6 +528,14 @@ extern LockInfoPtr _Xglobal_lock;
 #endif
 
 #ifdef WORD64
+/*
+ * MakeBigReq sets the CARD16 req-length to 0 and inserts a new CARD32
+ * length, after req-length, before the data in the request.  The new length
+ * includes the n extra 32-bit words.
+ *
+ * Do not use MakeBigReq if there is no data already in the request.
+ * req-length must already be = 2.
+ */
 #define MakeBigReq(req,n) \
 { \
 char _BRdat[4]; \
@@ -546,7 +554,7 @@ extern LockInfoPtr _Xglobal_lock;
 CARD32 _BRlen = req-length - 1; \
 req-length = 0; \
 _BRdat = ((CARD32 *)req)[_BRlen]; \
-memmove(((char *)req) + 8, ((char *)req) + 4, _BRlen  2); \
+memmove(((char *)req) + 8, ((char *)req) + 4, (_BRlen - 1)  2); \
 ((CARD32 *)req)[1] = _BRlen + n + 2; \
 Data32(dpy, _BRdat, 4); \
 }
@@ -557,13 +565,20 @@ extern LockInfoPtr _Xglobal_lock;
 CARD32 _BRlen = req-length - 1; \
 req-length = 0; \
 _BRdat = ((CARD32 *)req)[_BRlen]; \
-memmove(((char *)req) + 8, ((char *)req) + 4, _BRlen  2); \
+memmove(((char *)req) + 8, ((char *)req) + 4, (_BRlen - 1)  2); \
 ((CARD32 *)req)[1] = _BRlen + n + 2; \
 Data32(dpy, _BRdat, 4); \
 }
 #endif
 #endif
 
+/*
+ * SetReqLen increases the count of 32-bit words in the request by n,
+ * or by badlen if n is too large.
+ *
+ * Do not use SetReqLen if req does not already have data after the
+ * xReq header.  req-length must already be = 2.
+ */
 #define SetReqLen(req,n,badlen) \
 if ((req-length + n)  (unsigned)65535) { \
 	if (dpy-bigreq_size) { \



CVS commit: [netbsd-6-0] xsrc

2015-04-18 Thread SAITOH Masanobu
Module Name:xsrc
Committed By:   msaitoh
Date:   Sun Apr 19 05:56:13 UTC 2015

Modified Files:
xsrc/external/mit/libX11/dist/include/X11 [netbsd-6-0]: Xlibint.h
xsrc/xfree/xc/lib/X11 [netbsd-6-0]: Xlibint.h

Log Message:
Pull up following revision(s) (requested by mrg in ticket #1290):
xsrc/external/mit/libX11/dist/include/X11/Xlibint.h patch
xsrc/xfree/xc/lib/X11/Xlibint.h 1.2

Fix CVE-2013-7439: Buffer overflow in MakeBigReq macro in libX11.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.7 -r1.1.1.7.4.1 \
xsrc/external/mit/libX11/dist/include/X11/Xlibint.h
cvs rdiff -u -r1.1.1.7 -r1.1.1.7.16.1 xsrc/xfree/xc/lib/X11/Xlibint.h

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

Modified files:

Index: xsrc/external/mit/libX11/dist/include/X11/Xlibint.h
diff -u xsrc/external/mit/libX11/dist/include/X11/Xlibint.h:1.1.1.7 xsrc/external/mit/libX11/dist/include/X11/Xlibint.h:1.1.1.7.4.1
--- xsrc/external/mit/libX11/dist/include/X11/Xlibint.h:1.1.1.7	Wed Aug  3 03:01:44 2011
+++ xsrc/external/mit/libX11/dist/include/X11/Xlibint.h	Sun Apr 19 05:56:13 2015
@@ -536,6 +536,14 @@ extern LockInfoPtr _Xglobal_lock;
 #endif
 
 #ifdef WORD64
+/*
+ * MakeBigReq sets the CARD16 req-length to 0 and inserts a new CARD32
+ * length, after req-length, before the data in the request.  The new length
+ * includes the n extra 32-bit words.
+ *
+ * Do not use MakeBigReq if there is no data already in the request.
+ * req-length must already be = 2.
+ */
 #define MakeBigReq(req,n) \
 { \
 char _BRdat[4]; \
@@ -554,7 +562,7 @@ extern LockInfoPtr _Xglobal_lock;
 CARD32 _BRlen = req-length - 1; \
 req-length = 0; \
 _BRdat = ((CARD32 *)req)[_BRlen]; \
-memmove(((char *)req) + 8, ((char *)req) + 4, _BRlen  2); \
+memmove(((char *)req) + 8, ((char *)req) + 4, (_BRlen - 1)  2); \
 ((CARD32 *)req)[1] = _BRlen + n + 2; \
 Data32(dpy, _BRdat, 4); \
 }
@@ -565,13 +573,20 @@ extern LockInfoPtr _Xglobal_lock;
 CARD32 _BRlen = req-length - 1; \
 req-length = 0; \
 _BRdat = ((CARD32 *)req)[_BRlen]; \
-memmove(((char *)req) + 8, ((char *)req) + 4, _BRlen  2); \
+memmove(((char *)req) + 8, ((char *)req) + 4, (_BRlen - 1)  2); \
 ((CARD32 *)req)[1] = _BRlen + n + 2; \
 Data32(dpy, _BRdat, 4); \
 }
 #endif
 #endif
 
+/*
+ * SetReqLen increases the count of 32-bit words in the request by n,
+ * or by badlen if n is too large.
+ *
+ * Do not use SetReqLen if req does not already have data after the
+ * xReq header.  req-length must already be = 2.
+ */
 #ifndef __clang_analyzer__
 #define SetReqLen(req,n,badlen) \
 if ((req-length + n)  (unsigned)65535) { \

Index: xsrc/xfree/xc/lib/X11/Xlibint.h
diff -u xsrc/xfree/xc/lib/X11/Xlibint.h:1.1.1.7 xsrc/xfree/xc/lib/X11/Xlibint.h:1.1.1.7.16.1
--- xsrc/xfree/xc/lib/X11/Xlibint.h:1.1.1.7	Fri Mar 18 13:04:29 2005
+++ xsrc/xfree/xc/lib/X11/Xlibint.h	Sun Apr 19 05:56:13 2015
@@ -528,6 +528,14 @@ extern LockInfoPtr _Xglobal_lock;
 #endif
 
 #ifdef WORD64
+/*
+ * MakeBigReq sets the CARD16 req-length to 0 and inserts a new CARD32
+ * length, after req-length, before the data in the request.  The new length
+ * includes the n extra 32-bit words.
+ *
+ * Do not use MakeBigReq if there is no data already in the request.
+ * req-length must already be = 2.
+ */
 #define MakeBigReq(req,n) \
 { \
 char _BRdat[4]; \
@@ -546,7 +554,7 @@ extern LockInfoPtr _Xglobal_lock;
 CARD32 _BRlen = req-length - 1; \
 req-length = 0; \
 _BRdat = ((CARD32 *)req)[_BRlen]; \
-memmove(((char *)req) + 8, ((char *)req) + 4, _BRlen  2); \
+memmove(((char *)req) + 8, ((char *)req) + 4, (_BRlen - 1)  2); \
 ((CARD32 *)req)[1] = _BRlen + n + 2; \
 Data32(dpy, _BRdat, 4); \
 }
@@ -557,13 +565,20 @@ extern LockInfoPtr _Xglobal_lock;
 CARD32 _BRlen = req-length - 1; \
 req-length = 0; \
 _BRdat = ((CARD32 *)req)[_BRlen]; \
-memmove(((char *)req) + 8, ((char *)req) + 4, _BRlen  2); \
+memmove(((char *)req) + 8, ((char *)req) + 4, (_BRlen - 1)  2); \
 ((CARD32 *)req)[1] = _BRlen + n + 2; \
 Data32(dpy, _BRdat, 4); \
 }
 #endif
 #endif
 
+/*
+ * SetReqLen increases the count of 32-bit words in the request by n,
+ * or by badlen if n is too large.
+ *
+ * Do not use SetReqLen if req does not already have data after the
+ * xReq header.  req-length must already be = 2.
+ */
 #define SetReqLen(req,n,badlen) \
 if ((req-length + n)  (unsigned)65535) { \
 	if (dpy-bigreq_size) { \



CVS commit: [netbsd-6] src/doc

2015-04-18 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Apr 19 05:58:46 UTC 2015

Modified Files:
src/doc [netbsd-6]: CHANGES-6.2

Log Message:
Ticket 1290 and 1294.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.212 -r1.1.2.213 src/doc/CHANGES-6.2

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-6.2
diff -u src/doc/CHANGES-6.2:1.1.2.212 src/doc/CHANGES-6.2:1.1.2.213
--- src/doc/CHANGES-6.2:1.1.2.212	Fri Apr 17 10:28:58 2015
+++ src/doc/CHANGES-6.2	Sun Apr 19 05:58:46 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.2,v 1.1.2.212 2015/04/17 10:28:58 msaitoh Exp $
+# $NetBSD: CHANGES-6.2,v 1.1.2.213 2015/04/19 05:58:46 msaitoh Exp $
 
 A complete list of changes from the 6.1 release until the 6.2 release:
 
@@ -11418,3 +11418,15 @@ tests/lib/libutil/t_parsedate.c			1.4-1.
 
 	Fix parsedate(3)'s bugs which include PR#47916.
 	[nonaka, ticket #1291]
+
+xsrc/external/mit/libX11/dist/include/X11/Xlibint.h	patch
+xsrc/xfree/xc/lib/X11/Xlibint.h1.2
+
+	Fix CVE-2013-7439: Buffer overflow in MakeBigReq macro in libX11.
+	[mrg, ticket #1290]
+
+lib/libc/arch/sh3/gen/swapcontext.S		1.11-1.12 via patch
+
+	Correctly preserve old sate in swapcontext(3).
+	Fixes PR port-sh3/49597 reported by Yasushi Oshima.
+	[uwe, ticket #1294]



CVS commit: [netbsd-6-1] src/doc

2015-04-18 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Apr 19 05:59:12 UTC 2015

Modified Files:
src/doc [netbsd-6-1]: CHANGES-6.1.6

Log Message:
Ticket 1290.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.39 -r1.1.2.40 src/doc/CHANGES-6.1.6

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-6.1.6
diff -u src/doc/CHANGES-6.1.6:1.1.2.39 src/doc/CHANGES-6.1.6:1.1.2.40
--- src/doc/CHANGES-6.1.6:1.1.2.39	Fri Apr 17 09:35:06 2015
+++ src/doc/CHANGES-6.1.6	Sun Apr 19 05:59:12 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.1.6,v 1.1.2.39 2015/04/17 09:35:06 msaitoh Exp $
+# $NetBSD: CHANGES-6.1.6,v 1.1.2.40 2015/04/19 05:59:12 msaitoh Exp $
 
 A complete list of changes from the NetBSD 6.1.5 release to the NetBSD 6.1.6
 release:
@@ -5702,3 +5702,9 @@ libexec/ld.elf_so/rtld.c			1.176
 
 	lib/49813: Release mutex on error.
 	[joerg, ticket #1288]
+
+xsrc/external/mit/libX11/dist/include/X11/Xlibint.h	patch
+xsrc/xfree/xc/lib/X11/Xlibint.h1.2
+
+	Fix CVE-2013-7439: Buffer overflow in MakeBigReq macro in libX11.
+	[mrg, ticket #1290]



CVS commit: src/share/man/man9

2015-04-18 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sat Apr 18 08:04:58 UTC 2015

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

Log Message:
fix reference to queue(3)


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/share/man/man9/pcq.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/pcq.9
diff -u src/share/man/man9/pcq.9:1.6 src/share/man/man9/pcq.9:1.7
--- src/share/man/man9/pcq.9:1.6	Sun Jan 22 02:55:47 2012
+++ src/share/man/man9/pcq.9	Sat Apr 18 08:04:58 2015
@@ -1,4 +1,4 @@
-.\ $NetBSD: pcq.9,v 1.6 2012/01/22 02:55:47 rmind Exp $
+.\ $NetBSD: pcq.9,v 1.7 2015/04/18 08:04:58 mlelstv Exp $
 .\
 .\ Copyright (c) 2010 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -126,7 +126,7 @@ interface is implemented within the file
 .\ .Sh EXAMPLES
 .Sh SEE ALSO
 .Xr atomic_ops 3 ,
-.Xr queue 9
+.Xr queue 3
 .Sh HISTORY
 The
 .Nm



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

2015-04-18 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Apr 18 08:06:13 UTC 2015

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

Log Message:
Typo


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

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/JETSONTK1
diff -u src/sys/arch/evbarm/conf/JETSONTK1:1.3 src/sys/arch/evbarm/conf/JETSONTK1:1.4
--- src/sys/arch/evbarm/conf/JETSONTK1:1.3	Fri Apr  3 23:25:07 2015
+++ src/sys/arch/evbarm/conf/JETSONTK1	Sat Apr 18 08:06:13 2015
@@ -1,5 +1,5 @@
 #
-#	$NetBSD: JETSONTK1,v 1.3 2015/04/03 23:25:07 jmcneill Exp $
+#	$NetBSD: JETSONTK1,v 1.4 2015/04/18 08:06:13 skrll Exp $
 #
 #	NVIDIA Jetson TK1 - Tegra K1 development kit
 #	https://developer.nvidia.com/jetson-tk1
@@ -27,7 +27,7 @@ config		netbsd		root on ? type ?
 mainbus0	at root
 cpu*		at mainbus?
 
-# A5 core devices
+# A15 core devices
 armperiph0	at mainbus?
 armgic0		at armperiph?# Interrupt Controller
 armgtmr0	at armperiph?# ARM Generic Timer



CVS commit: src/distrib

2015-04-18 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Apr 18 08:56:57 UTC 2015

Modified Files:
src/distrib/amd64/cdroms: Makefile.cdrom
src/distrib/i386/cdroms: Makefile.cdrom
src/distrib/sparc64/cdroms/installcd: Makefile
src/distrib/vax/cdroms/installcd: Makefile

Log Message:
Add libpthread.so* - new lzma needs it.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/distrib/amd64/cdroms/Makefile.cdrom
cvs rdiff -u -r1.32 -r1.33 src/distrib/i386/cdroms/Makefile.cdrom
cvs rdiff -u -r1.20 -r1.21 src/distrib/sparc64/cdroms/installcd/Makefile
cvs rdiff -u -r1.10 -r1.11 src/distrib/vax/cdroms/installcd/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/amd64/cdroms/Makefile.cdrom
diff -u src/distrib/amd64/cdroms/Makefile.cdrom:1.12 src/distrib/amd64/cdroms/Makefile.cdrom:1.13
--- src/distrib/amd64/cdroms/Makefile.cdrom:1.12	Sat Sep 13 10:18:24 2014
+++ src/distrib/amd64/cdroms/Makefile.cdrom	Sat Apr 18 08:56:56 2015
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.cdrom,v 1.12 2014/09/13 10:18:24 roy Exp $
+# $NetBSD: Makefile.cdrom,v 1.13 2015/04/18 08:56:56 martin Exp $
 
 .include bsd.own.mk
 
@@ -48,6 +48,7 @@ CDRUNTIME+=	./usr/lib/libgcc_s.so*
 CDRUNTIME+=	./usr/lib/libintl.so*
 CDRUNTIME+=	./usr/lib/libkvm.so*
 CDRUNTIME+=	./usr/lib/liblzma.so*
+CDRUNTIME+=	./usr/lib/libpthread.so*
 CDRUNTIME+=	./usr/lib/libterminfo.so*
 CDRUNTIME+=	./usr/lib/libutil.so*
 CDRUNTIME+=	./usr/lib/libz.so*

Index: src/distrib/i386/cdroms/Makefile.cdrom
diff -u src/distrib/i386/cdroms/Makefile.cdrom:1.32 src/distrib/i386/cdroms/Makefile.cdrom:1.33
--- src/distrib/i386/cdroms/Makefile.cdrom:1.32	Sat Sep 13 10:18:24 2014
+++ src/distrib/i386/cdroms/Makefile.cdrom	Sat Apr 18 08:56:57 2015
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.cdrom,v 1.32 2014/09/13 10:18:24 roy Exp $
+# $NetBSD: Makefile.cdrom,v 1.33 2015/04/18 08:56:57 martin Exp $
 
 .include bsd.own.mk
 
@@ -48,6 +48,7 @@ CDRUNTIME+=	./usr/lib/libgcc_s.so*
 CDRUNTIME+=	./usr/lib/libintl.so*
 CDRUNTIME+=	./usr/lib/libkvm.so*
 CDRUNTIME+=	./usr/lib/liblzma.so*
+CDRUNTIME+=	./usr/lib/libpthread.so*
 CDRUNTIME+=	./usr/lib/libterminfo.so*
 CDRUNTIME+=	./usr/lib/libutil.so*
 CDRUNTIME+=	./usr/lib/libz.so*

Index: src/distrib/sparc64/cdroms/installcd/Makefile
diff -u src/distrib/sparc64/cdroms/installcd/Makefile:1.20 src/distrib/sparc64/cdroms/installcd/Makefile:1.21
--- src/distrib/sparc64/cdroms/installcd/Makefile:1.20	Sat Sep 13 10:18:24 2014
+++ src/distrib/sparc64/cdroms/installcd/Makefile	Sat Apr 18 08:56:57 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.20 2014/09/13 10:18:24 roy Exp $
+#	$NetBSD: Makefile,v 1.21 2015/04/18 08:56:57 martin Exp $
 CDBASE=		sparc64cd		# gives ${CDBASE}.iso
 CDRELEASE=	true			# include $RELEASEDIR/$MACHINE
 
@@ -49,6 +49,7 @@ CDRUNTIME+=	./usr/lib/libgcc_s.so*
 CDRUNTIME+=	./usr/lib/libintl.so*
 CDRUNTIME+=	./usr/lib/libkvm.so*
 CDRUNTIME+=	./usr/lib/liblzma.so*
+CDRUNTIME+=	./usr/lib/libpthread.so*
 CDRUNTIME+=	./usr/lib/libterminfo.so*
 CDRUNTIME+=	./usr/lib/libutil.so*
 CDRUNTIME+=	./usr/lib/libz.so*

Index: src/distrib/vax/cdroms/installcd/Makefile
diff -u src/distrib/vax/cdroms/installcd/Makefile:1.10 src/distrib/vax/cdroms/installcd/Makefile:1.11
--- src/distrib/vax/cdroms/installcd/Makefile:1.10	Sat Sep 13 10:18:24 2014
+++ src/distrib/vax/cdroms/installcd/Makefile	Sat Apr 18 08:56:56 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.10 2014/09/13 10:18:24 roy Exp $
+#	$NetBSD: Makefile,v 1.11 2015/04/18 08:56:56 martin Exp $
 CDBASE=		vaxcd			# gives ${CDBASE}.iso
 CDRELEASE=	true			# include $RELEASEDIR/$MACHINE
 CDKERNELS=	${RELEASEDIR}/${MACHINE}/binary/kernel/netbsd-GENERIC.gz	netbsd.gz
@@ -75,6 +75,7 @@ CDRUNTIME+=	./usr/lib/libgcc_s.so*
 CDRUNTIME+=	./usr/lib/libintl.so*
 CDRUNTIME+=	./usr/lib/libkvm.so*
 CDRUNTIME+=	./usr/lib/liblzma.so*
+CDRUNTIME+=	./usr/lib/libpthread.so*
 CDRUNTIME+=	./usr/lib/libterminfo.so*
 CDRUNTIME+=	./usr/lib/libutil.so*
 CDRUNTIME+=	./usr/lib/libz.so*



CVS commit: [netbsd-7] src/usr.sbin/postinstall

2015-04-18 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Apr 18 09:39:17 UTC 2015

Modified Files:
src/usr.sbin/postinstall [netbsd-7]: postinstall

Log Message:
Apply patch to fix fallout from ticket #635, requested by tron in ticket
#707.


To generate a diff of this commit:
cvs rdiff -u -r1.175.2.3 -r1.175.2.4 src/usr.sbin/postinstall/postinstall

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/postinstall/postinstall
diff -u src/usr.sbin/postinstall/postinstall:1.175.2.3 src/usr.sbin/postinstall/postinstall:1.175.2.4
--- src/usr.sbin/postinstall/postinstall:1.175.2.3	Fri Nov 14 18:18:14 2014
+++ src/usr.sbin/postinstall/postinstall	Sat Apr 18 09:39:17 2015
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: postinstall,v 1.175.2.3 2014/11/14 18:18:14 snj Exp $
+# $NetBSD: postinstall,v 1.175.2.4 2015/04/18 09:39:17 martin Exp $
 #
 # Copyright (c) 2002-2008 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -1339,8 +1339,8 @@ do_rc()
 		irdaattach iscsi_target isdnd isibootd \
 		kdc \
 		ldconfig ldpd local lpd lvm \
-		makemandb mdnsd mixerctl mopd motd mountall mountcritlocal \
-		mountcritremote mountd moused mrouted \
+		makemandb mdnsd mixerctl modules mopd motd mountall \
+		mountcritlocal mountcritremote mountd moused mrouted \
 		named ndbootd network newsyslog nfsd nfslocking npf ntpd \
 		ntpdate \
 		perusertmp pf pf_boot pflogd postfix powerd ppp pwcheck \



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

2015-04-18 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Apr 18 09:47:13 UTC 2015

Modified Files:
src/sys/arch/arm/cortex: a9_mpsubr.S

Log Message:
Use character constants instead of ascii values for readability


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/arm/cortex/a9_mpsubr.S

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

Modified files:

Index: src/sys/arch/arm/cortex/a9_mpsubr.S
diff -u src/sys/arch/arm/cortex/a9_mpsubr.S:1.30 src/sys/arch/arm/cortex/a9_mpsubr.S:1.31
--- src/sys/arch/arm/cortex/a9_mpsubr.S:1.30	Wed Mar  4 17:02:17 2015
+++ src/sys/arch/arm/cortex/a9_mpsubr.S	Sat Apr 18 09:47:13 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: a9_mpsubr.S,v 1.30 2015/03/04 17:02:17 skrll Exp $	*/
+/*	$NetBSD: a9_mpsubr.S,v 1.31 2015/04/18 09:47:13 skrll Exp $	*/
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -180,52 +180,52 @@ arm_cpuinit:
 
 	mcr	p15, 0, r2, c1, c0, 0	// SCTRL write
 
-	XPUTC(#70)
+	XPUTC(#'F')
 	dsb// Drain the write buffers.
 1:
-	XPUTC(#71)
+	XPUTC(#'G')
 	mrc	p15, 0, r1, c0, c0, 5	// MPIDR read
 	cmp	r1, #0
 	orrlt	r10, r10, #0x5b		// MP, cachable (Normal WB)
 	orrge	r10, r10, #0x1b		// Non-MP, cacheable, normal WB
-	XPUTC(#48)
+	XPUTC(#'0')
 	mcr	p15, 0, r10, c2, c0, 0	// TTBR0 write
 #if defined(ARM_MMU_EXTENDED)
 	// When using split TTBRs, we need to set both since the physical
 	// addresses we were/are using might be in either.
-	XPUTC(#49)
+	XPUTC(#'1')
 	mcr	p15, 0, r10, c2, c0, 1	// TTBR1 write
 #endif
 
-	XPUTC(#72)
+	XPUTC(#'H')
 #if defined(ARM_MMU_EXTENDED)
-	XPUTC(#49)
+	XPUTC(#'1')
 	mov	r1, #TTBCR_S_N_1	// make sure TTBCR_S_N is 1
 #else
-	XPUTC(#48)
+	XPUTC(#'0')
 	mov	r1, #0			// make sure TTBCR is 0
 #endif
 	mcr	p15, 0, r1, c2, c0, 2	// TTBCR write
 
-#if !defined(CPU_CORTEXA5)
-	XPUTC(#73)
+	XPUTC(#'I')
 	mov	r1, #0
 	mcr	p15, 0, r1, c8, c7, 0	// TLBIALL (just this core)
-#endif
+	dsb
+	isb
 
-	XPUTC(#74)
+	XPUTC(#'J')
 	mov	r1, #0			// get KERNEL_PID
 	mcr	p15, 0, r1, c13, c0, 1	// CONTEXTIDR write
 
 	// Set the Domain Access register.  Very important!
-	XPUTC(#75)
+	XPUTC(#'K')
 	mov r1, #((DOMAIN_CLIENT  (PMAP_DOMAIN_KERNEL*2)) | DOMAIN_CLIENT)
 	mcr	p15, 0, r1, c3, c0, 0	// DACR write
 
 	//
 	// Enable the MMU, etc.
 	//
-	XPUTC(#76)
+	XPUTC(#'L')
 	mrc	p15, 0, r1, c1, c0, 0	// SCTRL read
 
 	movw	r3, #:lower16:CPU_CONTROL_SET
@@ -251,7 +251,7 @@ arm_cpuinit:
 	//
 	mrc	p15, 0, r0, c0, c0, 0	// Read an arbitrary value.
 	mov	r0, r0			// Stall until read completes.
-	XPUTC(#77)
+	XPUTC(#'M')
 
 	bx	ip			// return
 
@@ -335,7 +335,7 @@ cortex_init:
 mov	r0, #0
 msr	spsr_sxc, r0			// set SPSR[23:8] to known value
 
-	XPUTC(#64)
+	XPUTC(#'@')
 #if defined(CPU_CORTEXA7) || defined(CPU_CORTEXA15) || defined(CPU_CORTEXA17)
 	//
 	// If SMP is already enabled, don't do anything.
@@ -366,7 +366,7 @@ cortex_init:
 	//
 	// Step 1a, invalidate the all cache tags in all ways on the SCU.
 	//
-	XPUTC(#65)
+	XPUTC(#'A')
 #if defined(ARM_CBAR)
 	movw	r3, #:lower16:ARM_CBAR
 	movt	r3, #:upper16:ARM_CBAR
@@ -392,7 +392,7 @@ cortex_init:
 	//
 	// Step 1b, invalidate the data cache
 	//
-	XPUTC(#66)
+	XPUTC(#'B')
 #if defined(KERNEL_BASES_EQUAL)
 	bl	_C_LABEL(armv7_dcache_wbinv_all)
 #else
@@ -401,7 +401,7 @@ cortex_init:
 	sub	ip, ip, #KERNEL_BASE_VOFFSET
 	blx	ip// writeback  toss d-cache
 #endif
-	XPUTC(#67)
+	XPUTC(#'C')
 
 	//
 	// Check to see if we are really MP before enabling SMP mode
@@ -419,7 +419,7 @@ cortex_init:
 	bic	r2, r2, #CPU_CONTROL_DC_ENABLE	// clear data cache enable
 	mcr	p15, 0, r2, c1, c0, 0		// SCTLR write
 	isb
-	XPUTC(#49)
+	XPUTC(#'1')
 #endif
 
 #if defined(CPU_CORTEXA5) || defined(CPU_CORTEXA9)
@@ -443,7 +443,7 @@ cortex_init:
 #endif
 	dsb
 	isb
-	XPUTC(#50)
+	XPUTC(#'2')
 #endif /* CORTEXA5 || CORTEXA9 */
 
 #if defined(CPU_CORTEXA7) || defined(CPU_CORTEXA17)
@@ -491,7 +491,7 @@ cortex_init:
 	orr	r4, r4, #CPU_CONTROL_DC_ENABLE	// enable dcache
 	mcr	p15, 0, r4, c1, c0, 0		// SCTRL write
 	isb
-	XPUTC(#45)
+	XPUTC(#'-')
 
 	bx	r10
 ASEND(cortex_init)