CVS commit: src

2012-12-01 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Sun Dec  2 00:05:39 UTC 2012

Modified Files:
src/external/cddl/osnet/dev/cyclic: cyclic.c
src/external/cddl/osnet/dev/cyclic/i386: cyclic_machdep.c
src/external/cddl/osnet/sys/sys: cyclic.h cyclic_impl.h
src/sys/sys: dtrace_bsd.h
Removed Files:
src/external/cddl/osnet/dev/cyclic/amd64: cyclic_machdep.c

Log Message:
update cyclic module to the freebsd 8-stable version as of svn r219520.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/cddl/osnet/dev/cyclic/cyclic.c
cvs rdiff -u -r1.2 -r0 \
src/external/cddl/osnet/dev/cyclic/amd64/cyclic_machdep.c
cvs rdiff -u -r1.2 -r1.3 \
src/external/cddl/osnet/dev/cyclic/i386/cyclic_machdep.c
cvs rdiff -u -r1.3 -r1.4 src/external/cddl/osnet/sys/sys/cyclic.h
cvs rdiff -u -r1.2 -r1.3 src/external/cddl/osnet/sys/sys/cyclic_impl.h
cvs rdiff -u -r1.5 -r1.6 src/sys/sys/dtrace_bsd.h

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

Modified files:

Index: src/external/cddl/osnet/dev/cyclic/cyclic.c
diff -u src/external/cddl/osnet/dev/cyclic/cyclic.c:1.2 src/external/cddl/osnet/dev/cyclic/cyclic.c:1.3
--- src/external/cddl/osnet/dev/cyclic/cyclic.c:1.2	Sun Feb 21 01:46:33 2010
+++ src/external/cddl/osnet/dev/cyclic/cyclic.c	Sun Dec  2 00:05:38 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: cyclic.c,v 1.2 2010/02/21 01:46:33 darran Exp $	*/
+/*	$NetBSD: cyclic.c,v 1.3 2012/12/02 00:05:38 chs Exp $	*/
 
 /*
  * CDDL HEADER START
@@ -23,7 +23,7 @@
  *
  * Portions Copyright 2008 John Birrell j...@freebsd.org
  *
- * $FreeBSD: src/sys/cddl/dev/cyclic/cyclic.c,v 1.2.2.1 2009/08/03 08:13:06 kensmith Exp $
+ * $FreeBSD$
  *
  * This is a simplified version of the cyclic timer subsystem from
  * OpenSolaris. In the FreeBSD version, we don't use interrupt levels.
@@ -475,73 +475,6 @@ cyclic_expire(cyc_cpu_t *cpu, cyc_index_
 	(*handler)(arg);
 }
 
-static void
-cyclic_enable_xcall(void *v)
-{
-	cyc_xcallarg_t *argp = v;
-	cyc_cpu_t *cpu = argp-cyx_cpu;
-	cyc_backend_t *be = cpu-cyp_backend;
-
-	be-cyb_enable(be-cyb_arg);
-}
-
-static void
-cyclic_enable(cyc_cpu_t *cpu)
-{
-	cyc_backend_t *be = cpu-cyp_backend;
-	cyc_xcallarg_t arg;
-
-	arg.cyx_cpu = cpu;
-
-	/* Cross call to the target CPU */
-	be-cyb_xcall(be-cyb_arg, cpu-cyp_cpu, cyclic_enable_xcall, arg);
-}
-
-static void
-cyclic_disable_xcall(void *v)
-{
-	cyc_xcallarg_t *argp = v;
-	cyc_cpu_t *cpu = argp-cyx_cpu;
-	cyc_backend_t *be = cpu-cyp_backend;
-
-	be-cyb_disable(be-cyb_arg);
-}
-
-static void
-cyclic_disable(cyc_cpu_t *cpu)
-{
-	cyc_backend_t *be = cpu-cyp_backend;
-	cyc_xcallarg_t arg;
-
-	arg.cyx_cpu = cpu;
-
-	/* Cross call to the target CPU */
-	be-cyb_xcall(be-cyb_arg, cpu-cyp_cpu, cyclic_disable_xcall, arg);
-}
-
-static void
-cyclic_reprogram_xcall(void *v)
-{
-	cyc_xcallarg_t *argp = v;
-	cyc_cpu_t *cpu = argp-cyx_cpu;
-	cyc_backend_t *be = cpu-cyp_backend;
-
-	be-cyb_reprogram(be-cyb_arg, argp-cyx_exp);
-}
-
-static void
-cyclic_reprogram(cyc_cpu_t *cpu, hrtime_t exp)
-{
-	cyc_backend_t *be = cpu-cyp_backend;
-	cyc_xcallarg_t arg;
-
-	arg.cyx_cpu = cpu;
-	arg.cyx_exp = exp;
-
-	/* Cross call to the target CPU */
-	be-cyb_xcall(be-cyb_arg, cpu-cyp_cpu, cyclic_reprogram_xcall, arg);
-}
-
 /*
  *  cyclic_fire(cpu_t *)
  *
@@ -572,17 +505,15 @@ static void
 cyclic_fire(cpu_t *c)
 {
 	cyc_cpu_t *cpu = c-cpu_cyclic;
-
-	mtx_lock_spin(cpu-cyp_mtx);
-
+	cyc_backend_t *be = cpu-cyp_backend;
 	cyc_index_t *heap = cpu-cyp_heap;
 	cyclic_t *cyclic, *cyclics = cpu-cyp_cyclics;
+	void *arg = be-cyb_arg;
 	hrtime_t now = gethrtime();
 	hrtime_t exp;
 
 	if (cpu-cyp_nelems == 0) {
 		/* This is a spurious fire. */
-		mtx_unlock_spin(cpu-cyp_mtx);
 		return;
 	}
 
@@ -633,8 +564,45 @@ cyclic_fire(cpu_t *c)
 	 * Now we have a cyclic in the root slot which isn't in the past;
 	 * reprogram the interrupt source.
 	 */
-	cyclic_reprogram(cpu, exp);
+	be-cyb_reprogram(arg, exp);
+}
+
+static void
+cyclic_expand_xcall(cyc_xcallarg_t *arg)
+{
+	cyc_cpu_t *cpu = arg-cyx_cpu;
+	cyc_index_t new_size = arg-cyx_size, size = cpu-cyp_size, i;
+	cyc_index_t *new_heap = arg-cyx_heap;
+	cyclic_t *cyclics = cpu-cyp_cyclics, *new_cyclics = arg-cyx_cyclics;
+
+	/* Disable preemption and interrupts. */
+	mtx_lock_spin(cpu-cyp_mtx);
+
+	/*
+	 * Assert that the new size is a power of 2.
+	 */
+	ASSERT((new_size  (new_size - 1)) == 0);
+	ASSERT(new_size == (size  1));
+	ASSERT(cpu-cyp_heap != NULL  cpu-cyp_cyclics != NULL);
+
+	bcopy(cpu-cyp_heap, new_heap, sizeof (cyc_index_t) * size);
+	bcopy(cyclics, new_cyclics, sizeof (cyclic_t) * size);
+
+	/*
+	 * Set up the free list, and set all of the new cyclics to be CYF_FREE.
+	 */
+	for (i = size; i  new_size; i++) {
+		new_heap[i] = i;
+		new_cyclics[i].cy_flags = CYF_FREE;
+	}
 
+	/*
+	 * We can go ahead and plow the value of cyp_heap and cyp_cyclics;
+	 * cyclic_expand() has kept a copy.
+	 */
+	cpu-cyp_heap = new_heap;
+	

CVS commit: src/sys/modules/dtrace

2012-12-01 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Sun Dec  2 00:47:37 UTC 2012

Modified Files:
src/sys/modules/dtrace/fbt: Makefile
src/sys/modules/dtrace/sdt: Makefile

Log Message:
remove unneeded include dirs.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/modules/dtrace/fbt/Makefile
cvs rdiff -u -r1.4 -r1.5 src/sys/modules/dtrace/sdt/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/dtrace/fbt/Makefile
diff -u src/sys/modules/dtrace/fbt/Makefile:1.3 src/sys/modules/dtrace/fbt/Makefile:1.4
--- src/sys/modules/dtrace/fbt/Makefile:1.3	Tue Dec 14 23:27:48 2010
+++ src/sys/modules/dtrace/fbt/Makefile	Sun Dec  2 00:47:37 2012
@@ -8,7 +8,6 @@ KMOD=		fbt
 SRCS=		fbt.c
 
 CPPFLAGS+=	-I${NETBSDSRCDIR}/external/cddl/osnet/sys \
-		-I${NETBSDSRCDIR}/external/cddl/osnet/dev/sdt \
 		-I${NETBSDSRCDIR}/external/cddl/osnet/dist/uts/common 
 
 CPPFLAGS+=	-Wno-unknown-pragmas

Index: src/sys/modules/dtrace/sdt/Makefile
diff -u src/sys/modules/dtrace/sdt/Makefile:1.4 src/sys/modules/dtrace/sdt/Makefile:1.5
--- src/sys/modules/dtrace/sdt/Makefile:1.4	Tue Dec 14 23:27:48 2010
+++ src/sys/modules/dtrace/sdt/Makefile	Sun Dec  2 00:47:37 2012
@@ -8,8 +8,7 @@ KMOD=		sdt
 SRCS=		sdt.c
 
 CPPFLAGS+=	-I${NETBSDSRCDIR}/external/cddl/osnet/sys \
-		-I${NETBSDSRCDIR}/external/cddl/osnet/dev/sdt \
-		-I${NETBSDSRCDIR}/external/cddl/osnet/dist/uts/common 
+		-I${NETBSDSRCDIR}/external/cddl/osnet/dist/uts/common
 
 CPPFLAGS+=	-Wno-unknown-pragmas
 



CVS commit: src

2012-12-01 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Sun Dec  2 01:05:17 UTC 2012

Modified Files:
src/external/cddl/osnet/dev/cyclic: cyclic.c
src/external/cddl/osnet/dev/cyclic/i386: cyclic_machdep.c
src/external/cddl/osnet/sys/sys: cyclic_impl.h
src/sys/kern: kern_clock.c
src/sys/modules: Makefile
src/sys/modules/dtrace: Makefile
src/sys/sys: dtrace_bsd.h
Added Files:
src/sys/modules/cyclic: Makefile
src/sys/modules/dtrace/profile: Makefile

Log Message:
adapt the cyclic module and profile dtrace provider to netbsd.
for now, just hook the cyclic callback into hardclock().


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/cddl/osnet/dev/cyclic/cyclic.c
cvs rdiff -u -r1.3 -r1.4 \
src/external/cddl/osnet/dev/cyclic/i386/cyclic_machdep.c
cvs rdiff -u -r1.3 -r1.4 src/external/cddl/osnet/sys/sys/cyclic_impl.h
cvs rdiff -u -r1.130 -r1.131 src/sys/kern/kern_clock.c
cvs rdiff -u -r1.115 -r1.116 src/sys/modules/Makefile
cvs rdiff -u -r0 -r1.1 src/sys/modules/cyclic/Makefile
cvs rdiff -u -r1.3 -r1.4 src/sys/modules/dtrace/Makefile
cvs rdiff -u -r0 -r1.1 src/sys/modules/dtrace/profile/Makefile
cvs rdiff -u -r1.6 -r1.7 src/sys/sys/dtrace_bsd.h

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

Modified files:

Index: src/external/cddl/osnet/dev/cyclic/cyclic.c
diff -u src/external/cddl/osnet/dev/cyclic/cyclic.c:1.3 src/external/cddl/osnet/dev/cyclic/cyclic.c:1.4
--- src/external/cddl/osnet/dev/cyclic/cyclic.c:1.3	Sun Dec  2 00:05:38 2012
+++ src/external/cddl/osnet/dev/cyclic/cyclic.c	Sun Dec  2 01:05:16 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: cyclic.c,v 1.3 2012/12/02 00:05:38 chs Exp $	*/
+/*	$NetBSD: cyclic.c,v 1.4 2012/12/02 01:05:16 chs Exp $	*/
 
 /*
  * CDDL HEADER START
@@ -326,8 +326,10 @@
 #include sys/param.h
 #include sys/conf.h
 #include sys/kernel.h
+#ifdef __FreeBSD___
 #include sys/lock.h
 #include sys/sx.h
+#endif
 #include sys/cyclic_impl.h
 #include sys/module.h
 #include sys/systm.h
@@ -335,7 +337,32 @@
 #include sys/kmem.h
 #include sys/cmn_err.h
 #include sys/dtrace_bsd.h
+#ifdef __FreeBSD__
 #include machine/cpu.h
+#endif
+
+#ifdef __NetBSD__
+#include sys/cpu.h
+#include sys/malloc.h
+#include sys/xcall.h
+
+#undef mutex_init
+#define mtx_init(m, d, p, f) mutex_init(m, MUTEX_DEFAULT, IPL_CLOCK)
+#define mtx_lock_spin(x) mutex_spin_enter(x)
+#define mtx_unlock_spin(x) mutex_spin_exit(x)
+#define mtx_destroy(x) mutex_destroy(x)
+
+#define ASSERT(x) KASSERT(x)
+#define SYSINIT(a1, a2, a3, a4, a5)
+#define SYSUNINIT(a1, a2, a3, a4, a5)
+#define CPU_FOREACH(var) \
+	CPU_INFO_ITERATOR cii; \
+	struct cpu_info *ci; \
+	for (CPU_INFO_FOREACH(cii, ci))
+#define MAXCPU MAXCPUS
+#define TRAPF_USERMODE(x) CLKF_USERMODE(x)
+#define TRAPF_PC(x) CLKF_PC(x)
+#endif
 
 static kmem_cache_t *cyclic_id_cache;
 static cyc_id_t *cyclic_id_head;
@@ -873,7 +900,7 @@ cyclic_configure(cpu_t *c)
 	ASSERT(MUTEX_HELD(cpu_lock));
 
 	if (cyclic_id_cache == NULL)
-		cyclic_id_cache = kmem_cache_create(cyclic_id_cache,
+		cyclic_id_cache = kmem_cache_create(__UNCONST(cyclic_id_cache),
 		sizeof (cyc_id_t), 0, NULL, NULL, NULL, NULL, NULL, 0);
 
 	cpu-cyp_cpu = c;
@@ -1110,7 +1137,7 @@ cyclic_id_t
 cyclic_add(cyc_handler_t *hdlr, cyc_time_t *when)
 {
 	cyc_id_t *idp = cyclic_new_id();
-	solaris_cpu_t *c = solaris_cpu[curcpu];
+	solaris_cpu_t *c = solaris_cpu[cpu_number()];
 
 	ASSERT(MUTEX_HELD(cpu_lock));
 	ASSERT(when-cyt_when = 0  when-cyt_interval  0);
@@ -1217,6 +1244,7 @@ cyclic_add_omni(cyc_omni_handler_t *omni
 	idp-cyi_omni_hdlr = *omni;
 
 	CPU_FOREACH(i) {
+		i = cpu_index(ci);
 		c = solaris_cpu[i];
 		if ((cpu = c-cpu_cyclic) == NULL)
 			continue;
@@ -1305,7 +1333,7 @@ cyclic_init(cyc_backend_t *be)
 	 */
 	bcopy(be, cyclic_backend, sizeof (cyc_backend_t));
 
-	cyclic_configure(solaris_cpu[curcpu]);
+	cyclic_configure(solaris_cpu[cpu_number()]);
 }
 
 /*
@@ -1320,15 +1348,20 @@ cyclic_mp_init(void)
 	cpu_t *c;
 	int i;
 
+#ifndef __NetBSD__
 	mutex_enter(cpu_lock);
+#endif
 
 	CPU_FOREACH(i) {
+		i = cpu_index(ci);
 		c = solaris_cpu[i];
 		if (c-cpu_cyclic == NULL)
 			cyclic_configure(c);
 	}
 
+#ifndef __NetBSD__
 	mutex_exit(cpu_lock);
+#endif
 }
 
 static void
@@ -1338,6 +1371,7 @@ cyclic_uninit(void)
 	int id;
 
 	CPU_FOREACH(id) {
+		id = cpu_index(ci);
 		c = solaris_cpu[id];
 		if (c-cpu_cyclic == NULL)
 			continue;
@@ -1379,6 +1413,7 @@ cyclic_unload(void)
 
 SYSUNINIT(cyclic_unregister, SI_SUB_CYCLIC, SI_ORDER_SECOND, cyclic_unload, NULL);
 
+#ifdef __FreeBSD__
 /* ARGSUSED */
 static int
 cyclic_modevent(module_t mod __unused, int type, void *data __unused)
@@ -1406,3 +1441,24 @@ cyclic_modevent(module_t mod __unused, i
 DEV_MODULE(cyclic, cyclic_modevent, NULL);
 MODULE_VERSION(cyclic, 1);
 MODULE_DEPEND(cyclic, opensolaris, 1, 1, 1);
+#endif
+
+#ifdef __NetBSD__
+static int
+cyclic_modcmd(modcmd_t cmd, void *data)
+{
+	switch (cmd) {

CVS commit: src

2012-12-01 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Sun Dec  2 00:05:39 UTC 2012

Modified Files:
src/external/cddl/osnet/dev/cyclic: cyclic.c
src/external/cddl/osnet/dev/cyclic/i386: cyclic_machdep.c
src/external/cddl/osnet/sys/sys: cyclic.h cyclic_impl.h
src/sys/sys: dtrace_bsd.h
Removed Files:
src/external/cddl/osnet/dev/cyclic/amd64: cyclic_machdep.c

Log Message:
update cyclic module to the freebsd 8-stable version as of svn r219520.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/cddl/osnet/dev/cyclic/cyclic.c
cvs rdiff -u -r1.2 -r0 \
src/external/cddl/osnet/dev/cyclic/amd64/cyclic_machdep.c
cvs rdiff -u -r1.2 -r1.3 \
src/external/cddl/osnet/dev/cyclic/i386/cyclic_machdep.c
cvs rdiff -u -r1.3 -r1.4 src/external/cddl/osnet/sys/sys/cyclic.h
cvs rdiff -u -r1.2 -r1.3 src/external/cddl/osnet/sys/sys/cyclic_impl.h
cvs rdiff -u -r1.5 -r1.6 src/sys/sys/dtrace_bsd.h

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



CVS commit: src/sys/modules/dtrace

2012-12-01 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Sun Dec  2 00:47:37 UTC 2012

Modified Files:
src/sys/modules/dtrace/fbt: Makefile
src/sys/modules/dtrace/sdt: Makefile

Log Message:
remove unneeded include dirs.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/modules/dtrace/fbt/Makefile
cvs rdiff -u -r1.4 -r1.5 src/sys/modules/dtrace/sdt/Makefile

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



CVS commit: src/sys

2012-11-17 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Sun Nov 18 00:06:57 UTC 2012

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

Log Message:
make ksyms structures not depend on KDTRACE_HOOKS.
always include a CTF section, even though it might be empty.
this fixes savecore's generated kernel symbol table files.


To generate a diff of this commit:
cvs rdiff -u -r1.67 -r1.68 src/sys/kern/kern_ksyms.c
cvs rdiff -u -r1.27 -r1.28 src/sys/sys/ksyms.h

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

Modified files:

Index: src/sys/kern/kern_ksyms.c
diff -u src/sys/kern/kern_ksyms.c:1.67 src/sys/kern/kern_ksyms.c:1.68
--- src/sys/kern/kern_ksyms.c:1.67	Mon Dec  5 21:30:48 2011
+++ src/sys/kern/kern_ksyms.c	Sun Nov 18 00:06:57 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_ksyms.c,v 1.67 2011/12/05 21:30:48 christos Exp $	*/
+/*	$NetBSD: kern_ksyms.c,v 1.68 2012/11/18 00:06:57 chs Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -71,7 +71,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: kern_ksyms.c,v 1.67 2011/12/05 21:30:48 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: kern_ksyms.c,v 1.68 2012/11/18 00:06:57 chs Exp $);
 
 #if defined(_KERNEL)  defined(_KERNEL_OPT)
 #include opt_ddb.h
@@ -299,12 +299,10 @@ addsymtab(const char *name, void *symsta
 	tab-sd_maxsym = 0;
 	tab-sd_usroffset = 0;
 	tab-sd_gone = false;
-#ifdef KDTRACE_HOOKS
 	tab-sd_ctfstart = ctfstart;
 	tab-sd_ctfsize = ctfsize;
 	tab-sd_nmap = nmap;
 	tab-sd_nmapsize = nsyms;
-#endif
 #ifdef KSYMS_DEBUG
 	printf(newstart %p sym %p ksyms_symsz %zu str %p strsz %zu send %p\n,
 	newstart, symstart, symsize, strstart, strsize,
@@ -896,7 +894,6 @@ ksyms_hdr_init(void *hdraddr)
 	ksyms_hdr.kh_shdr[SHBSS].sh_addralign = PAGE_SIZE;
 	ksyms_hdr.kh_shdr[SHBSS].sh_flags = SHF_ALLOC | SHF_EXECINSTR;
 
-#ifdef KDTRACE_HOOKS
 	/* Sixth section header; .SUNW_ctf */
 	ksyms_hdr.kh_shdr[SHCTF].sh_name = 32; /* Section 6 offset */
 	ksyms_hdr.kh_shdr[SHCTF].sh_type = SHT_PROGBITS;
@@ -904,7 +901,6 @@ ksyms_hdr_init(void *hdraddr)
 /*	ksyms_hdr.kh_shdr[SHCTF].sh_size = filled in at open */
 	ksyms_hdr.kh_shdr[SHCTF].sh_link = SYMTAB; /* Corresponding symtab */
 	ksyms_hdr.kh_shdr[SHCTF].sh_addralign = sizeof(char);
-#endif
 
 	/* Set section names */
 	strlcpy(ksyms_hdr.kh_strtab[1], .symtab,
@@ -915,10 +911,8 @@ ksyms_hdr_init(void *hdraddr)
 	sizeof(ksyms_hdr.kh_strtab) - 17);
 	strlcpy(ksyms_hdr.kh_strtab[27], .bss,
 	sizeof(ksyms_hdr.kh_strtab) - 27);
-#ifdef KDTRACE_HOOKS
 	strlcpy(ksyms_hdr.kh_strtab[32], .SUNW_ctf,
 	sizeof(ksyms_hdr.kh_strtab) - 32);
-#endif
 }
 
 static int
@@ -938,11 +932,9 @@ ksymsopen(dev_t dev, int oflags, int dev
 	ksyms_hdr.kh_shdr[STRTAB].sh_offset = ksyms_symsz +
 	ksyms_hdr.kh_shdr[SYMTAB].sh_offset;
 	ksyms_hdr.kh_shdr[STRTAB].sh_size = ksyms_strsz;
-#ifdef KDTRACE_HOOKS
 	ksyms_hdr.kh_shdr[SHCTF].sh_offset = ksyms_strsz +
 	ksyms_hdr.kh_shdr[STRTAB].sh_offset;
 	ksyms_hdr.kh_shdr[SHCTF].sh_size = ksyms_ctfsz;
-#endif
 	ksyms_isopen = true;
 	mutex_exit(ksyms_lock);
 
@@ -980,9 +972,6 @@ ksymsread(dev_t dev, struct uio *uio, in
 	struct ksyms_symtab *st;
 	size_t filepos, inpos, off;
 	int error;
-#ifdef KDTRACE_HOOKS
-	struct ksyms_symtab *cst;
-#endif
 
 	/*
 	 * First: Copy out the ELF header.   XXX Lose if ksymsopen()
@@ -1031,24 +1020,22 @@ ksymsread(dev_t dev, struct uio *uio, in
 		filepos += st-sd_strsize;
 	}
 
-#ifdef KDTRACE_HOOKS
 	/*
 	 * Copy out the CTF table.
 	 */
-	cst = TAILQ_FIRST(ksyms_symtabs);
-	if (cst-sd_ctfstart != NULL) {
+	st = TAILQ_FIRST(ksyms_symtabs);
+	if (st-sd_ctfstart != NULL) {
 		if (uio-uio_resid == 0)
 			return 0;
-		if (uio-uio_offset = cst-sd_ctfsize + filepos) {
+		if (uio-uio_offset = st-sd_ctfsize + filepos) {
 			inpos = uio-uio_offset - filepos;
-			error = uiomove((char *)cst-sd_ctfstart + inpos,
-			   cst-sd_ctfsize - inpos, uio);
+			error = uiomove((char *)st-sd_ctfstart + inpos,
+			st-sd_ctfsize - inpos, uio);
 			if (error != 0)
 return error;
 		}
-		filepos += cst-sd_ctfsize;
+		filepos += st-sd_ctfsize;
 	}
-#endif
 
 	return 0;
 }

Index: src/sys/sys/ksyms.h
diff -u src/sys/sys/ksyms.h:1.27 src/sys/sys/ksyms.h:1.28
--- src/sys/sys/ksyms.h:1.27	Mon Mar 15 02:28:59 2010
+++ src/sys/sys/ksyms.h	Sun Nov 18 00:06:56 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: ksyms.h,v 1.27 2010/03/15 02:28:59 darran Exp $	*/
+/*	$NetBSD: ksyms.h,v 1.28 2012/11/18 00:06:56 chs Exp $	*/
 
 /*
  * Copyright (c) 2001, 2003 Anders Magnusson (ra...@ludd.luth.se).
@@ -32,10 +32,6 @@
 
 #ifdef _KSYMS_PRIVATE
 
-#if defined(_KERNEL_OPT)
-#include opt_dtrace.h
-#endif
-
 #define	ELFSIZE	ARCH_ELFSIZE
 #include sys/exec_elf.h
 #include sys/queue.h
@@ -52,12 +48,10 @@ struct ksyms_symtab {
 	int sd_strsize;		/* Size of string table */
 	int sd_nglob;		/* Number of global symbols */
 	bool sd_gone;		/* dead but around for open() */
-#ifdef KDTRACE_HOOKS
 	void 

CVS commit: src/sys

2012-11-17 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Sun Nov 18 00:06:57 UTC 2012

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

Log Message:
make ksyms structures not depend on KDTRACE_HOOKS.
always include a CTF section, even though it might be empty.
this fixes savecore's generated kernel symbol table files.


To generate a diff of this commit:
cvs rdiff -u -r1.67 -r1.68 src/sys/kern/kern_ksyms.c
cvs rdiff -u -r1.27 -r1.28 src/sys/sys/ksyms.h

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



CVS commit: src/sys/arch/x86

2012-11-13 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Tue Nov 13 14:07:43 UTC 2012

Modified Files:
src/sys/arch/x86/include: pmap.h
src/sys/arch/x86/x86: pmap.c

Log Message:
add a pmap_kremove_local() that doesn't do TLB invalidations
on other CPUs.  this is only intended for use while writing
kernel crash dumps.  remove unused pmap_map().


To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.53 src/sys/arch/x86/include/pmap.h
cvs rdiff -u -r1.178 -r1.179 src/sys/arch/x86/x86/pmap.c

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

Modified files:

Index: src/sys/arch/x86/include/pmap.h
diff -u src/sys/arch/x86/include/pmap.h:1.52 src/sys/arch/x86/include/pmap.h:1.53
--- src/sys/arch/x86/include/pmap.h:1.52	Fri Apr 20 22:23:24 2012
+++ src/sys/arch/x86/include/pmap.h	Tue Nov 13 14:07:42 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.h,v 1.52 2012/04/20 22:23:24 rmind Exp $	*/
+/*	$NetBSD: pmap.h,v 1.53 2012/11/13 14:07:42 chs Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -255,6 +255,7 @@ void		pmap_load(void);
 paddr_t		pmap_init_tmp_pgtbl(paddr_t);
 void		pmap_remove_all(struct pmap *);
 void		pmap_ldt_sync(struct pmap *);
+void		pmap_kremove_local(vaddr_t, vsize_t);
 
 void		pmap_emap_enter(vaddr_t, paddr_t, vm_prot_t);
 void		pmap_emap_remove(vaddr_t, vsize_t);

Index: src/sys/arch/x86/x86/pmap.c
diff -u src/sys/arch/x86/x86/pmap.c:1.178 src/sys/arch/x86/x86/pmap.c:1.179
--- src/sys/arch/x86/x86/pmap.c:1.178	Fri Jun 15 13:53:40 2012
+++ src/sys/arch/x86/x86/pmap.c	Tue Nov 13 14:07:42 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.178 2012/06/15 13:53:40 yamt Exp $	*/
+/*	$NetBSD: pmap.c,v 1.179 2012/11/13 14:07:42 chs Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2010 The NetBSD Foundation, Inc.
@@ -171,7 +171,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.178 2012/06/15 13:53:40 yamt Exp $);
+__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.179 2012/11/13 14:07:42 chs Exp $);
 
 #include opt_user_ldt.h
 #include opt_lockdebug.h
@@ -1118,8 +1118,8 @@ pmap_changeprot_local(vaddr_t va, vm_pro
  * = must be followed by call to pmap_update() before reuse of page
  */
 
-void
-pmap_kremove(vaddr_t sva, vsize_t len)
+static inline void
+pmap_kremove1(vaddr_t sva, vsize_t len, bool localonly)
 {
 	pt_entry_t *pte, opte;
 	vaddr_t va, eva;
@@ -1128,21 +1128,42 @@ pmap_kremove(vaddr_t sva, vsize_t len)
 
 	kpreempt_disable();
 	for (va = sva; va  eva; va += PAGE_SIZE) {
-		if (va  VM_MIN_KERNEL_ADDRESS)
-			pte = vtopte(va);
-		else
-			pte = kvtopte(va);
+		pte = kvtopte(va);
 		opte = pmap_pte_testset(pte, 0); /* zap! */
-		if ((opte  (PG_V | PG_U)) == (PG_V | PG_U)) {
+		if ((opte  (PG_V | PG_U)) == (PG_V | PG_U)  !localonly) {
 			pmap_tlb_shootdown(pmap_kernel(), va, opte,
 			TLBSHOOT_KREMOVE);
 		}
 		KASSERT((opte  PG_PS) == 0);
 		KASSERT((opte  PG_PVLIST) == 0);
 	}
+	if (localonly) {
+		tlbflushg();
+	}
 	kpreempt_enable();
 }
 
+void
+pmap_kremove(vaddr_t sva, vsize_t len)
+{
+
+	pmap_kremove1(sva, len, false);
+}
+
+/*
+ * pmap_kremove_local: like pmap_kremove(), but only worry about
+ * TLB invalidations on the current CPU.  this is only intended
+ * for use while writing kernel crash dumps.
+ */
+
+void
+pmap_kremove_local(vaddr_t sva, vsize_t len)
+{
+
+	KASSERT(panicstr != NULL);
+	pmap_kremove1(sva, len, true);
+}
+
 /*
  * p m a p   i n i t   f u n c t i o n s
  *
@@ -2984,25 +3005,6 @@ pmap_virtual_space(vaddr_t *startp, vadd
 }
 
 /*
- * pmap_map: map a range of PAs into kvm.
- *
- * = used during crash dump
- * = XXX: pmap_map() should be phased out?
- */
-
-vaddr_t
-pmap_map(vaddr_t va, paddr_t spa, paddr_t epa, vm_prot_t prot)
-{
-	while (spa  epa) {
-		pmap_kenter_pa(va, spa, prot, 0);
-		va += PAGE_SIZE;
-		spa += PAGE_SIZE;
-	}
-	pmap_update(pmap_kernel());
-	return va;
-}
-
-/*
  * pmap_zero_page: zero a page
  */
 



CVS commit: src/sys/kern

2012-11-13 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Tue Nov 13 14:08:08 UTC 2012

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

Log Message:
in pmf_system_shutdown(), don't do anything if we're panicing.
this prevents a hang trying to shut down other CPUs on x86,
and in general we could be called in any context from a panic
so it's best to skip unnecessary operations in that case.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/sys/kern/kern_pmf.c

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

Modified files:

Index: src/sys/kern/kern_pmf.c
diff -u src/sys/kern/kern_pmf.c:1.35 src/sys/kern/kern_pmf.c:1.36
--- src/sys/kern/kern_pmf.c:1.35	Sun Jun  5 09:04:22 2011
+++ src/sys/kern/kern_pmf.c	Tue Nov 13 14:08:07 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_pmf.c,v 1.35 2011/06/05 09:04:22 dsl Exp $ */
+/* $NetBSD: kern_pmf.c,v 1.36 2012/11/13 14:08:07 chs Exp $ */
 
 /*-
  * Copyright (c) 2007 Jared D. McNeill jmcne...@invisible.ca
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: kern_pmf.c,v 1.35 2011/06/05 09:04:22 dsl Exp $);
+__KERNEL_RCSID(0, $NetBSD: kern_pmf.c,v 1.36 2012/11/13 14:08:07 chs Exp $);
 
 #include sys/types.h
 #include sys/param.h
@@ -381,6 +381,10 @@ shutdown_all(int how)
 void
 pmf_system_shutdown(int how)
 {
+
+	if (panicstr != NULL)
+		return;
+
 	aprint_debug(Shutting down devices:);
 	shutdown_all(how);
 }



CVS commit: src/sys/arch/amd64/amd64

2012-11-13 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Tue Nov 13 14:09:36 UTC 2012

Modified Files:
src/sys/arch/amd64/amd64: machdep.c

Log Message:
fix sparse crash dumps to contain enough data to be useful,
in particular the top-level page table pages.
use pmap_kremove_local() while writing crash dumps
to avoid spurious warning messages.


To generate a diff of this commit:
cvs rdiff -u -r1.190 -r1.191 src/sys/arch/amd64/amd64/machdep.c

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

Modified files:

Index: src/sys/arch/amd64/amd64/machdep.c
diff -u src/sys/arch/amd64/amd64/machdep.c:1.190 src/sys/arch/amd64/amd64/machdep.c:1.191
--- src/sys/arch/amd64/amd64/machdep.c:1.190	Mon Sep  3 05:01:44 2012
+++ src/sys/arch/amd64/amd64/machdep.c	Tue Nov 13 14:09:36 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.190 2012/09/03 05:01:44 cherry Exp $	*/
+/*	$NetBSD: machdep.c,v 1.191 2012/11/13 14:09:36 chs Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008, 2011
@@ -111,7 +111,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.190 2012/09/03 05:01:44 cherry Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.191 2012/11/13 14:09:36 chs Exp $);
 
 /* #define XENDEBUG_LOW  */
 
@@ -317,7 +317,7 @@ int dump_seg_iter(int (*)(paddr_t, paddr
 
 #ifndef NO_SPARSE_DUMP
 void sparse_dump_reset(void);
-void sparse_dump_mark(vaddr_t, vaddr_t, int);
+void sparse_dump_mark(void);
 void cpu_dump_prep_sparse(void);
 #endif
 
@@ -821,7 +821,7 @@ haltsys:
  * XXXfvdl share dumpcode.
  */
 
- /*
+/*
  * Perform assorted dump-related initialization tasks.  Assumes that
  * the maximum physical memory address will not increase afterwards.
  */
@@ -873,34 +873,39 @@ sparse_dump_reset(void)
 }
 
 /*
- * Include or exclude pages in a sparse dump, by half-open virtual
- * address interval (which may wrap around the end of the space).
+ * Include or exclude pages in a sparse dump.
  */
 void
-sparse_dump_mark(vaddr_t vbegin, vaddr_t vend, int includep)
+sparse_dump_mark(void)
 {
-	pmap_t pmap;
-	paddr_t p;
-	vaddr_t v;
+	paddr_t p, pstart, pend;
+	struct vm_page *pg;
+	int i;
 
 	/*
-	 * If a partial page is called for, the whole page must be included.
+	 * Mark all memory pages, then unmark pages that are uninteresting.
+	 * Dereferenceing pg-uobject might crash again if another CPU
+	 * frees the object out from under us, but we can't lock anything
+	 * so it's a risk we have to take.
 	 */
-	if (includep) {
-		vbegin = rounddown(vbegin, PAGE_SIZE);
-		vend = roundup(vend, PAGE_SIZE);
-	} else {
-		vbegin = roundup(vbegin, PAGE_SIZE);
-		vend = rounddown(vend, PAGE_SIZE);
+
+	for (i = 0; i  mem_cluster_cnt; ++i) {
+		pstart = mem_clusters[i].start / PAGE_SIZE;
+		pend = pstart + mem_clusters[i].size / PAGE_SIZE;
+
+		for (p = pstart; p  pend; p++) {
+			setbit(sparse_dump_physmap, p);
+		}
 	}
+	for (i = 0; i  vm_nphysseg; i++) {
+		struct vm_physseg *seg = VM_PHYSMEM_PTR(i);
 
-	pmap = pmap_kernel();
-	for (v = vbegin; v != vend; v += PAGE_SIZE) {
-		if (pmap_extract(pmap, v, p)) {
-			if (includep)
-setbit(sparse_dump_physmap, p/PAGE_SIZE);
-			else
-clrbit(sparse_dump_physmap, p/PAGE_SIZE);
+		for (pg = seg-pgs; pg  seg-lastpg; pg++) {
+			if (pg-uanon || (pg-pqflags  PQ_FREE) ||
+			(pg-uobject  pg-uobject-pgops)) {
+p = VM_PAGE_TO_PHYS(pg) / PAGE_SIZE;
+clrbit(sparse_dump_physmap, p);
+			}
 		}
 	}
 }
@@ -914,7 +919,7 @@ cpu_dump_prep_sparse(void)
 {
 	sparse_dump_reset();
 	/* XXX could the alternate recursive page table be skipped? */
-	sparse_dump_mark((vaddr_t)PTE_BASE, (vaddr_t)KERN_BASE, 1);
+	sparse_dump_mark();
 	/* Memory for I/O buffers could be unmarked here, for example. */
 	/* The kernel text could also be unmarked, but gdb would be upset. */
 }
@@ -1206,6 +1211,7 @@ dumpsys_seg(paddr_t maddr, paddr_t bytes
 		pmap_update(pmap_kernel());
 
 		error = (*dump)(dumpdev, blkno, (void *)dumpspace, n);
+		pmap_kremove_local(dumpspace, n);
 		if (error)
 			return error;
 		maddr += n;



CVS commit: src/usr.bin/vmstat

2012-11-13 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Tue Nov 13 14:09:58 UTC 2012

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

Log Message:
fix operation on core files:  cur_drive.io_name is an embedded array
in the structure we already fetched, not a pointer, so don't try to
dereference its address as a kernel address.


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

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

Modified files:

Index: src/usr.bin/vmstat/drvstats.c
diff -u src/usr.bin/vmstat/drvstats.c:1.5 src/usr.bin/vmstat/drvstats.c:1.6
--- src/usr.bin/vmstat/drvstats.c:1.5	Sun Jan 18 07:20:00 2009
+++ src/usr.bin/vmstat/drvstats.c	Tue Nov 13 14:09:58 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: drvstats.c,v 1.5 2009/01/18 07:20:00 lukem Exp $	*/
+/*	$NetBSD: drvstats.c,v 1.6 2012/11/13 14:09:58 chs Exp $	*/
 
 /*
  * Copyright (c) 1996 John M. Vinopal
@@ -425,10 +425,8 @@ drvinit(int selected)
 	} else {
 		p = iostathead;
 		for (i = 0; i  ndrive; i++) {
-			char	buf[10];
 			deref_kptr(p, cur_drive, sizeof(cur_drive));
-			deref_kptr(cur_drive.io_name, buf, sizeof(buf));
-			cur.name[i] = strdup(buf);
+			cur.name[i] = strdup(cur_drive.io_name);
 			if (!cur.name[i])
 err(1, strdup);
 			cur.select[i] = selected;



CVS commit: src/sys/arch

2012-11-13 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Tue Nov 13 14:10:24 UTC 2012

Modified Files:
src/sys/arch/amd64/include: vmparam.h
src/sys/arch/i386/include: vmparam.h

Log Message:
bump VM_PHYSSEG_MAX to 32, we've seen a system where 16 wasn't enough.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/amd64/include/vmparam.h
cvs rdiff -u -r1.75 -r1.76 src/sys/arch/i386/include/vmparam.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/arch/amd64/include/vmparam.h
diff -u src/sys/arch/amd64/include/vmparam.h:1.31 src/sys/arch/amd64/include/vmparam.h:1.32
--- src/sys/arch/amd64/include/vmparam.h:1.31	Wed Aug 15 08:09:57 2012
+++ src/sys/arch/amd64/include/vmparam.h	Tue Nov 13 14:10:24 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: vmparam.h,v 1.31 2012/08/15 08:09:57 sborrill Exp $	*/
+/*	$NetBSD: vmparam.h,v 1.32 2012/11/13 14:10:24 chs Exp $	*/
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -148,7 +148,7 @@
 /* virtual sizes (bytes) for various kernel submaps */
 #define VM_PHYS_SIZE		(USRIOSIZE*PAGE_SIZE)
 
-#define VM_PHYSSEG_MAX		16	/* 1 hole + 15 free lists */
+#define VM_PHYSSEG_MAX		32	/* 1 hole + 31 free lists */
 #define VM_PHYSSEG_STRAT	VM_PSTRAT_BIGFIRST
 
 #define	VM_NFREELIST		3

Index: src/sys/arch/i386/include/vmparam.h
diff -u src/sys/arch/i386/include/vmparam.h:1.75 src/sys/arch/i386/include/vmparam.h:1.76
--- src/sys/arch/i386/include/vmparam.h:1.75	Wed Aug 15 08:10:28 2012
+++ src/sys/arch/i386/include/vmparam.h	Tue Nov 13 14:10:24 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: vmparam.h,v 1.75 2012/08/15 08:10:28 sborrill Exp $	*/
+/*	$NetBSD: vmparam.h,v 1.76 2012/11/13 14:10:24 chs Exp $	*/
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -127,7 +127,7 @@
 #define	VM_PHYSSEG_MAX		1
 #define	VM_NFREELIST		1
 #else
-#define	VM_PHYSSEG_MAX		16	/* 1 hole + 15 free lists */
+#define	VM_PHYSSEG_MAX		32	/* 1 hole + 31 free lists */
 #define	VM_NFREELIST		2
 #define	VM_FREELIST_FIRST16	1
 #endif /* XEN */



CVS commit: src/sys/arch/x86

2012-11-13 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Tue Nov 13 14:07:43 UTC 2012

Modified Files:
src/sys/arch/x86/include: pmap.h
src/sys/arch/x86/x86: pmap.c

Log Message:
add a pmap_kremove_local() that doesn't do TLB invalidations
on other CPUs.  this is only intended for use while writing
kernel crash dumps.  remove unused pmap_map().


To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.53 src/sys/arch/x86/include/pmap.h
cvs rdiff -u -r1.178 -r1.179 src/sys/arch/x86/x86/pmap.c

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



CVS commit: src/sys/kern

2012-11-13 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Tue Nov 13 14:08:08 UTC 2012

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

Log Message:
in pmf_system_shutdown(), don't do anything if we're panicing.
this prevents a hang trying to shut down other CPUs on x86,
and in general we could be called in any context from a panic
so it's best to skip unnecessary operations in that case.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/sys/kern/kern_pmf.c

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



CVS commit: src/sys/arch/amd64/amd64

2012-11-13 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Tue Nov 13 14:09:36 UTC 2012

Modified Files:
src/sys/arch/amd64/amd64: machdep.c

Log Message:
fix sparse crash dumps to contain enough data to be useful,
in particular the top-level page table pages.
use pmap_kremove_local() while writing crash dumps
to avoid spurious warning messages.


To generate a diff of this commit:
cvs rdiff -u -r1.190 -r1.191 src/sys/arch/amd64/amd64/machdep.c

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



CVS commit: src/usr.bin/vmstat

2012-11-13 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Tue Nov 13 14:09:58 UTC 2012

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

Log Message:
fix operation on core files:  cur_drive.io_name is an embedded array
in the structure we already fetched, not a pointer, so don't try to
dereference its address as a kernel address.


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

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



CVS commit: src/sys/arch

2012-11-13 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Tue Nov 13 14:10:24 UTC 2012

Modified Files:
src/sys/arch/amd64/include: vmparam.h
src/sys/arch/i386/include: vmparam.h

Log Message:
bump VM_PHYSSEG_MAX to 32, we've seen a system where 16 wasn't enough.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/amd64/include/vmparam.h
cvs rdiff -u -r1.75 -r1.76 src/sys/arch/i386/include/vmparam.h

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



CVS commit: src/sys/arch/amd64/amd64

2012-11-07 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Thu Nov  8 02:00:44 UTC 2012

Modified Files:
src/sys/arch/amd64/amd64: autoconf.c

Log Message:
add include of opt_intrdebug.h.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/amd64/amd64/autoconf.c

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

Modified files:

Index: src/sys/arch/amd64/amd64/autoconf.c
diff -u src/sys/arch/amd64/amd64/autoconf.c:1.23 src/sys/arch/amd64/amd64/autoconf.c:1.24
--- src/sys/arch/amd64/amd64/autoconf.c:1.23	Tue Feb 22 06:37:24 2011
+++ src/sys/arch/amd64/amd64/autoconf.c	Thu Nov  8 02:00:44 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: autoconf.c,v 1.23 2011/02/22 06:37:24 dholland Exp $	*/
+/*	$NetBSD: autoconf.c,v 1.24 2012/11/08 02:00:44 chs Exp $	*/
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -46,9 +46,10 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.23 2011/02/22 06:37:24 dholland Exp $);
+__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.24 2012/11/08 02:00:44 chs Exp $);
 
 #include opt_multiprocessor.h
+#include opt_intrdebug.h
 
 #include sys/param.h
 #include sys/systm.h



CVS commit: src/sys/arch/amd64/amd64

2012-11-07 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Thu Nov  8 02:00:44 UTC 2012

Modified Files:
src/sys/arch/amd64/amd64: autoconf.c

Log Message:
add include of opt_intrdebug.h.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/amd64/amd64/autoconf.c

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



CVS commit: src/sys/arch/ia64/ia64

2012-11-05 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Mon Nov  5 15:11:37 UTC 2012

Modified Files:
src/sys/arch/ia64/ia64: pmap.c

Log Message:
remove pmap_track_modified() since it references kmem globals
that no longer exist.  this check was a hold-over from freebsd,
kmem pages on netbsd are not managed and thus mod/ref state is
anyway not tracked.  also remove commented-out assertions about
pageq locking, this was another freebsd hold-over since pmaps
do not use the pageq lock on netbsd.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/ia64/ia64/pmap.c

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

Modified files:

Index: src/sys/arch/ia64/ia64/pmap.c
diff -u src/sys/arch/ia64/ia64/pmap.c:1.28 src/sys/arch/ia64/ia64/pmap.c:1.29
--- src/sys/arch/ia64/ia64/pmap.c:1.28	Fri Aug 31 14:31:46 2012
+++ src/sys/arch/ia64/ia64/pmap.c	Mon Nov  5 15:11:36 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.28 2012/08/31 14:31:46 chs Exp $ */
+/* $NetBSD: pmap.c,v 1.29 2012/11/05 15:11:36 chs Exp $ */
 
 
 /*-
@@ -85,7 +85,7 @@
 
 #include sys/cdefs.h
 
-__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.28 2012/08/31 14:31:46 chs Exp $);
+__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.29 2012/11/05 15:11:36 chs Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -273,9 +273,6 @@ pmap_remove_entry(pmap_t pmap, struct vm
 static void
 pmap_insert_entry(pmap_t pmap, vaddr_t va, struct vm_page *pg);
 
-static __inline int
-pmap_track_modified(vaddr_t va);
-
 static void
 pmap_enter_vhpt(struct ia64_lpte *, vaddr_t);
 static int pmap_remove_vhpt(vaddr_t);
@@ -1162,7 +1159,6 @@ pmap_protect(pmap_t pmap, vaddr_t sva, v
 	if ((sva  PAGE_MASK) || (eva  PAGE_MASK))
 		panic(pmap_protect: unaligned addresses);
 
-	//uvm_lock_pageq();
 	PMAP_LOCK(pmap);
 	oldpmap = pmap_install(pmap);
 	while (sva  eva) {
@@ -1179,7 +1175,8 @@ pmap_protect(pmap_t pmap, vaddr_t sva, v
 			if (pmap_managed(pte)) {
 pa = pmap_ppn(pte);
 pg = PHYS_TO_VM_PAGE(pa);
-if (pmap_dirty(pte)) pmap_clear_dirty(pte);
+if (pmap_dirty(pte))
+	pmap_clear_dirty(pte);
 if (pmap_accessed(pte)) {
 	pmap_clear_accessed(pte);
 }
@@ -1190,7 +1187,6 @@ pmap_protect(pmap_t pmap, vaddr_t sva, v
 
 		sva += PAGE_SIZE;
 	}
-	//uvm_unlock_pageq();
 	pmap_install(oldpmap);
 	PMAP_UNLOCK(pmap);
 }
@@ -1286,8 +1282,6 @@ pmap_page_protect(struct vm_page *pg, vm
 PMAP_UNLOCK(pmap);
 }
 
-		//UVM_LOCK_ASSERT_PAGEQ(); 
-
 pg-flags |= PG_RDONLY;
 } else {
 pmap_page_purge(pg);
@@ -1425,7 +1419,7 @@ pmap_enter(pmap_t pmap, vaddr_t va, padd
  * We might be turning off write access to the page,
  * so we go ahead and sense modify status.
  */
-if (managed  pmap_dirty(origpte)  pmap_track_modified(va)) 
+if (managed  pmap_dirty(origpte))
 			pg-flags = ~PG_CLEAN;
 
 pmap_invalidate_page(pmap, va);
@@ -1494,8 +1488,6 @@ pmap_page_purge(struct vm_page *pg)
 	pmap_t oldpmap;
 	pv_entry_t pv;
 
-	//UVM_LOCK_ASSERT_PAGEQ();
-
 	while ((pv = TAILQ_FIRST(md-pv_list)) != NULL) {
 		struct ia64_lpte *pte;
 		pmap_t pmap = pv-pv_pmap;
@@ -1512,7 +1504,6 @@ pmap_page_purge(struct vm_page *pg)
 		PMAP_UNLOCK(pmap);
 	}
 
-	//UVM_LOCK_ASSERT_PAGEQ(); 
 	pg-flags |= PG_RDONLY;
 
 }
@@ -1766,8 +1757,7 @@ pmap_remove_pte(pmap_t pmap, struct ia64
 	if (pmap_managed(pte)) {
 		pg = PHYS_TO_VM_PAGE(pmap_ppn(pte));
 		if (pmap_dirty(pte))
-			if (pmap_track_modified(va))
-pg-flags = ~(PG_CLEAN);
+			pg-flags = ~(PG_CLEAN);
 		if (pmap_accessed(pte))
 			pg-flags = ~PG_CLEAN; /* XXX: Do we need this ? */
 
@@ -1801,21 +1791,6 @@ pmap_free_pte(struct ia64_lpte *pte, vad
 }
 
 
-/*
- * this routine defines the region(s) of memory that should
- * not be tested for the modified bit.
- */
-static __inline int
-pmap_track_modified(vaddr_t va)
-{
-	extern char *kmembase, kmemlimit;
-	if ((va  (vaddr_t) kmembase) || (va = (vaddr_t) kmemlimit)) 
-		return 1;
-	else
-		return 0;
-}
-
-
 /***
  * page management routines.
  ***/
@@ -1837,7 +1812,6 @@ get_pv_entry(pmap_t locked_pmap)
 	pv_entry_t allocated_pv;
 
 	//LOCK_ASSERT(simple_lock_held(locked_pmap-slock));
-	//UVM_LOCK_ASSERT_PAGEQ();
 	allocated_pv = 	pool_get(pmap_pv_pool, PR_NOWAIT);
 	return allocated_pv;
 
@@ -1985,7 +1959,6 @@ pmap_remove_entry(pmap_t pmap, struct vm
 		TAILQ_REMOVE(md-pv_list, pv, pv_list);
 		md-pv_list_count--;
 		if (TAILQ_FIRST(md-pv_list) == NULL) {
-			//UVM_LOCK_ASSERT_PAGEQ(); 
 			pg-flags |= PG_RDONLY;
 		}
 
@@ -2013,7 +1986,6 @@ pmap_insert_entry(pmap_t pmap, vaddr_t v
 	pv-pv_va = va;
 
 	//LOCK_ASSERT(simple_lock_held(pmap-slock));
-	//UVM_LOCK_ASSERT_PAGEQ(); 
 	TAILQ_INSERT_TAIL(pmap-pm_pvlist, pv, pv_plist);
 	

CVS commit: src/sys/arch/ia64/ia64

2012-11-05 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Mon Nov  5 15:13:04 UTC 2012

Modified Files:
src/sys/arch/ia64/ia64: machdep.c

Log Message:
add a stub cpu_mcontext_validate().


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/ia64/ia64/machdep.c

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

Modified files:

Index: src/sys/arch/ia64/ia64/machdep.c
diff -u src/sys/arch/ia64/ia64/machdep.c:1.32 src/sys/arch/ia64/ia64/machdep.c:1.33
--- src/sys/arch/ia64/ia64/machdep.c:1.32	Sat Jul 28 19:08:24 2012
+++ src/sys/arch/ia64/ia64/machdep.c	Mon Nov  5 15:13:04 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.32 2012/07/28 19:08:24 matt Exp $	*/
+/*	$NetBSD: machdep.c,v 1.33 2012/11/05 15:13:04 chs Exp $	*/
 
 /*-
  * Copyright (c) 2003,2004 Marcel Moolenaar
@@ -787,6 +787,12 @@ cpu_setmcontext(struct lwp *l, const mco
 }
 
 int
+cpu_mcontext_validate(struct lwp *l, const mcontext_t *mcp)
+{
+	return EINVAL;
+}
+
+int
 mm_md_physacc(paddr_t pa, vm_prot_t prot)
 {
 



CVS commit: src/sys/arch/ia64/ia64

2012-11-05 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Mon Nov  5 15:14:34 UTC 2012

Modified Files:
src/sys/arch/ia64/ia64: syscall.c

Log Message:
add a cpu_spawn_return() that just calls userret().


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/ia64/ia64/syscall.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/ia64/ia64/syscall.c
diff -u src/sys/arch/ia64/ia64/syscall.c:1.5 src/sys/arch/ia64/ia64/syscall.c:1.6
--- src/sys/arch/ia64/ia64/syscall.c:1.5	Sat Jan 23 06:20:31 2010
+++ src/sys/arch/ia64/ia64/syscall.c	Mon Nov  5 15:14:34 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: syscall.c,v 1.5 2010/01/23 06:20:31 kiyohara Exp $ */
+/* $NetBSD: syscall.c,v 1.6 2012/11/05 15:14:34 chs Exp $ */
 
 /*
  * Copyright (c) 2006 The NetBSD Foundation, Inc.
@@ -32,13 +32,14 @@
 
 #include sys/cdefs.h			/* RCS ID  Copyright macro defns */
 
-__KERNEL_RCSID(0, $NetBSD: syscall.c,v 1.5 2010/01/23 06:20:31 kiyohara Exp $);
+__KERNEL_RCSID(0, $NetBSD: syscall.c,v 1.6 2012/11/05 15:14:34 chs Exp $);
 
 #include sys/param.h
 #include sys/systm.h
 #include sys/proc.h
 
 #include machine/frame.h
+#include machine/userret.h
 
 void	syscall_intern(struct proc *);
 void	syscall_plain(struct lwp *, u_int64_t, struct trapframe *);
@@ -80,3 +81,13 @@ child_return(void *arg)
 printf(%s: not yet\n, __func__);
 	return;
 }
+
+/*
+ * Process the tail end of a posix_spawn() for the child.
+ */
+void
+cpu_spawn_return(struct lwp *l)
+{
+
+	userret(l);
+}



CVS commit: src/sys/arch/ia64/ia64

2012-11-05 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Mon Nov  5 15:11:37 UTC 2012

Modified Files:
src/sys/arch/ia64/ia64: pmap.c

Log Message:
remove pmap_track_modified() since it references kmem globals
that no longer exist.  this check was a hold-over from freebsd,
kmem pages on netbsd are not managed and thus mod/ref state is
anyway not tracked.  also remove commented-out assertions about
pageq locking, this was another freebsd hold-over since pmaps
do not use the pageq lock on netbsd.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/ia64/ia64/pmap.c

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



CVS commit: src/sys/arch/ia64/ia64

2012-11-05 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Mon Nov  5 15:13:04 UTC 2012

Modified Files:
src/sys/arch/ia64/ia64: machdep.c

Log Message:
add a stub cpu_mcontext_validate().


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/ia64/ia64/machdep.c

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



CVS commit: src/sys/arch/ia64/ia64

2012-11-05 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Mon Nov  5 15:14:34 UTC 2012

Modified Files:
src/sys/arch/ia64/ia64: syscall.c

Log Message:
add a cpu_spawn_return() that just calls userret().


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/ia64/ia64/syscall.c

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



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

2012-11-04 Thread Chuck Silvers
On Sun, Nov 04, 2012 at 01:35:04PM +1100, matthew green wrote:
 
  Module Name:src
  Committed By:   chs
  Date:   Sun Nov  4 00:32:47 UTC 2012
  
  Modified Files:
  src/sys/arch/sparc/sparc: locore.s pmap.c
  
  Log Message:
  in cpu_switchto(), remove the MP-unsafe code to mark a pmap active on a CPU,
  pmap_activate() already does this.  add MP locking to pmap_activate()
  and pmap_deactivate().  move flushing of user windows and virtual caches
  from pamp_activate() to pmap_deactivate().
 
 
 hmm.  this makes pmap_deactivate() do things in UP that weren't being
 done before at all.  switching to/from kernel/lwp for the same lwp will
 now be flushing the ctx every time.  that seems suboptimal?

do you just mean that I should have left the #ifdef MULTIPROCESSOR
around the sp_tlb_flush()?  or something more than that?


 we should really update PMAP_LOCK() to not be kernel lock.

agreed.

beyond that, there's still plenty of room for improvement on most platforms.
I think the best example in our tree at this point is the x86 scheme
of deferring the MMU-switch work to points where we're actually about to
reference user mappings, eg. returning to user mode, copyin/copyout, etc.


-Chuck


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

2012-11-03 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Sun Nov  4 00:32:47 UTC 2012

Modified Files:
src/sys/arch/sparc/sparc: locore.s pmap.c

Log Message:
in cpu_switchto(), remove the MP-unsafe code to mark a pmap active on a CPU,
pmap_activate() already does this.  add MP locking to pmap_activate()
and pmap_deactivate().  move flushing of user windows and virtual caches
from pamp_activate() to pmap_deactivate().


To generate a diff of this commit:
cvs rdiff -u -r1.267 -r1.268 src/sys/arch/sparc/sparc/locore.s
cvs rdiff -u -r1.348 -r1.349 src/sys/arch/sparc/sparc/pmap.c

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

Modified files:

Index: src/sys/arch/sparc/sparc/locore.s
diff -u src/sys/arch/sparc/sparc/locore.s:1.267 src/sys/arch/sparc/sparc/locore.s:1.268
--- src/sys/arch/sparc/sparc/locore.s:1.267	Fri Nov  2 00:01:19 2012
+++ src/sys/arch/sparc/sparc/locore.s	Sun Nov  4 00:32:47 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.s,v 1.267 2012/11/02 00:01:19 chs Exp $	*/
+/*	$NetBSD: locore.s,v 1.268 2012/11/04 00:32:47 chs Exp $	*/
 
 /*
  * Copyright (c) 1996 Paul Kranenburg
@@ -4935,19 +4935,6 @@ Lnosaveoldlwp:
 	/*
 	 * Now running p.  
 	 */
-#if defined(MULTIPROCESSOR)
-	ld	[%g3 + L_PROC], %o2	! p = l-l_proc;
-	ld	[%o2 + P_VMSPACE], %o3	! vm = p-p_vmspace;
-	ld	[%o3 + VM_PMAP], %o4	! pm = vm-vm_map.vm_pmap;
-	/* Add this CPU to the pmap's CPU set */
-	sethi	%hi(CPUINFO_VA + CPUINFO_CPUNO), %o0
-	ld	[%o0 + %lo(CPUINFO_VA + CPUINFO_CPUNO)], %o1
-	mov	1, %o2
-	ld	[%o4 + PMAP_CPUSET], %o0
-	sll	%o2, %o1, %o2
-	or	%o0, %o2, %o0		! pm-pm_cpuset |= cpu_number();
-	st	%o0, [%o4 + PMAP_CPUSET]
-#endif
 
 	/*
 	 * Check for restartable atomic sequences (RAS)

Index: src/sys/arch/sparc/sparc/pmap.c
diff -u src/sys/arch/sparc/sparc/pmap.c:1.348 src/sys/arch/sparc/sparc/pmap.c:1.349
--- src/sys/arch/sparc/sparc/pmap.c:1.348	Sun Jan 29 11:49:58 2012
+++ src/sys/arch/sparc/sparc/pmap.c	Sun Nov  4 00:32:47 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.348 2012/01/29 11:49:58 para Exp $ */
+/*	$NetBSD: pmap.c,v 1.349 2012/11/04 00:32:47 chs Exp $ */
 
 /*
  * Copyright (c) 1996
@@ -56,7 +56,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.348 2012/01/29 11:49:58 para Exp $);
+__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.349 2012/11/04 00:32:47 chs Exp $);
 
 #include opt_ddb.h
 #include opt_kgdb.h
@@ -7440,31 +7440,19 @@ void
 pmap_activate(struct lwp *l)
 {
 	pmap_t pm = l-l_proc-p_vmspace-vm_map.pmap;
-	int s;
 
-	/*
-	 * This is essentially the same thing that happens in cpu_switch()
-	 * when the newly selected process is about to run, except that we
-	 * have to make sure to clean the register windows before we set
-	 * the new context.
-	 */
+	if (pm == pmap_kernel() || l != curlwp) {
+		return;
+	}
 
-	s = splvm();
-	if (l == curlwp) {
-		write_user_windows();
-		if (pm-pm_ctx == NULL) {
-			ctx_alloc(pm);	/* performs setcontext() */
-		} else {
-			/* Do any cache flush needed on context switch */
-			(*cpuinfo.pure_vcache_flush)();
-			setcontext(pm-pm_ctxnum);
-		}
-#if defined(MULTIPROCESSOR)
-		if (pm != pmap_kernel())
-			PMAP_SET_CPUSET(pm, cpuinfo);
-#endif
+	PMAP_LOCK();
+	if (pm-pm_ctx == NULL) {
+		ctx_alloc(pm);	/* performs setcontext() */
+	} else {
+		setcontext(pm-pm_ctxnum);
 	}
-	splx(s);
+	PMAP_SET_CPUSET(pm, cpuinfo);
+	PMAP_UNLOCK();
 }
 
 /*
@@ -7473,22 +7461,27 @@ pmap_activate(struct lwp *l)
 void
 pmap_deactivate(struct lwp *l)
 {
-#if defined(MULTIPROCESSOR)
-	pmap_t pm;
-	struct proc *p;
+	struct proc *p = l-l_proc;
+	pmap_t pm = p-p_vmspace-vm_map.pmap;
+
+	if (pm == pmap_kernel() || l != curlwp) {
+		return;
+	}
+
+	write_user_windows();
+	PMAP_LOCK();
+	if (pm-pm_ctx) {
+		(*cpuinfo.pure_vcache_flush)();
 
-	p = l-l_proc;
-	if (p-p_vmspace 
-	(pm = p-p_vmspace-vm_map.pmap) != pmap_kernel()) {
 #if defined(SUN4M) || defined(SUN4D)
-		if (pm-pm_ctx  CPU_HAS_SRMMU)
+		if (CPU_HAS_SRMMU)
 			sp_tlb_flush(0, pm-pm_ctxnum, ASI_SRMMUFP_L0);
 #endif
-
-		/* we no longer need broadcast tlb flushes for this pmap. */
-		PMAP_CLR_CPUSET(pm, cpuinfo);
 	}
-#endif
+
+	/* we no longer need broadcast tlb flushes for this pmap. */
+	PMAP_CLR_CPUSET(pm, cpuinfo);
+	PMAP_UNLOCK();
 }
 
 #ifdef DEBUG



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

2012-11-03 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Sun Nov  4 00:32:47 UTC 2012

Modified Files:
src/sys/arch/sparc/sparc: locore.s pmap.c

Log Message:
in cpu_switchto(), remove the MP-unsafe code to mark a pmap active on a CPU,
pmap_activate() already does this.  add MP locking to pmap_activate()
and pmap_deactivate().  move flushing of user windows and virtual caches
from pamp_activate() to pmap_deactivate().


To generate a diff of this commit:
cvs rdiff -u -r1.267 -r1.268 src/sys/arch/sparc/sparc/locore.s
cvs rdiff -u -r1.348 -r1.349 src/sys/arch/sparc/sparc/pmap.c

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



CVS commit: src/regress/sys/kern/ras

2012-11-02 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Fri Nov  2 14:53:04 UTC 2012

Modified Files:
src/regress/sys/kern/ras/ras1: ras1.c
src/regress/sys/kern/ras/ras2: ras2.c
src/regress/sys/kern/ras/ras3: ras3.c

Log Message:
our current gcc puts the loop after the RAS_END() label on several
platforms, adjust the code so that gcc does the right thing again.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/regress/sys/kern/ras/ras1/ras1.c
cvs rdiff -u -r1.10 -r1.11 src/regress/sys/kern/ras/ras2/ras2.c
cvs rdiff -u -r1.9 -r1.10 src/regress/sys/kern/ras/ras3/ras3.c

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

Modified files:

Index: src/regress/sys/kern/ras/ras1/ras1.c
diff -u src/regress/sys/kern/ras/ras1/ras1.c:1.8 src/regress/sys/kern/ras/ras1/ras1.c:1.9
--- src/regress/sys/kern/ras/ras1/ras1.c:1.8	Mon Apr 28 20:23:07 2008
+++ src/regress/sys/kern/ras/ras1/ras1.c	Fri Nov  2 14:53:03 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: ras1.c,v 1.8 2008/04/28 20:23:07 martin Exp $ */
+/* $NetBSD: ras1.c,v 1.9 2012/11/02 14:53:03 chs Exp $ */
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -26,6 +26,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include stdlib.h
 #include errno.h
 #include inttypes.h
 #include stdio.h
@@ -73,12 +74,11 @@ main(void)
 	RAS_START(main);
 	count++;
 	if (count  COUNT)
-		goto end;
+		exit(handled != 0);
 
 	while (!handled) {
 		continue;
 	}
- end:
 	RAS_END(main);
 
 	return (handled != 0);

Index: src/regress/sys/kern/ras/ras2/ras2.c
diff -u src/regress/sys/kern/ras/ras2/ras2.c:1.10 src/regress/sys/kern/ras/ras2/ras2.c:1.11
--- src/regress/sys/kern/ras/ras2/ras2.c:1.10	Mon Apr 28 20:23:07 2008
+++ src/regress/sys/kern/ras/ras2/ras2.c	Fri Nov  2 14:53:03 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: ras2.c,v 1.10 2008/04/28 20:23:07 martin Exp $ */
+/* $NetBSD: ras2.c,v 1.11 2012/11/02 14:53:03 chs Exp $ */
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -26,6 +26,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include stdlib.h
 #include errno.h
 #include inttypes.h
 #include stdio.h
@@ -81,12 +82,11 @@ main(void)
 	RAS_START(main);
 	count++;
 	if (count  COUNT)
-		goto end;
+		exit(handled != 0);
 
 	while (!handled) {
 		continue;
 	}
-end:
 	RAS_END(main);
 
 	return (handled != 0);

Index: src/regress/sys/kern/ras/ras3/ras3.c
diff -u src/regress/sys/kern/ras/ras3/ras3.c:1.9 src/regress/sys/kern/ras/ras3/ras3.c:1.10
--- src/regress/sys/kern/ras/ras3/ras3.c:1.9	Mon Apr 28 20:23:07 2008
+++ src/regress/sys/kern/ras/ras3/ras3.c	Fri Nov  2 14:53:04 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: ras3.c,v 1.9 2008/04/28 20:23:07 martin Exp $ */
+/* $NetBSD: ras3.c,v 1.10 2012/11/02 14:53:04 chs Exp $ */
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -26,6 +26,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include stdlib.h
 #include errno.h
 #include inttypes.h
 #include stdio.h
@@ -88,12 +89,11 @@ main(int argc, char *argv[])
 	RAS_START(main);
 	count++;
 	if (count  COUNT)
-		goto end;
+		exit(handled != 0);
 
 	while (!handled) {
 		continue;
 	}
-end:
 	RAS_END(main);
 
 	return (handled != 0);



CVS commit: src/sys/dev/pci

2012-11-02 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Fri Nov  2 14:59:11 UTC 2012

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

Log Message:
fix autoconf output (don't print from the match routine).


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/sys/dev/pci/twa.c

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

Modified files:

Index: src/sys/dev/pci/twa.c
diff -u src/sys/dev/pci/twa.c:1.42 src/sys/dev/pci/twa.c:1.43
--- src/sys/dev/pci/twa.c:1.42	Sat Jul 28 00:42:47 2012
+++ src/sys/dev/pci/twa.c	Fri Nov  2 14:59:11 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: twa.c,v 1.42 2012/07/28 00:42:47 matt Exp $ */
+/*	$NetBSD: twa.c,v 1.43 2012/11/02 14:59:11 chs Exp $ */
 /*	$wasabi: twa.c,v 1.27 2006/07/28 18:17:21 wrstuden Exp $	*/
 
 /*-
@@ -67,7 +67,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: twa.c,v 1.42 2012/07/28 00:42:47 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: twa.c,v 1.43 2012/11/02 14:59:11 chs Exp $);
 
 //#define TWA_DEBUG
 
@@ -86,9 +86,6 @@ __KERNEL_RCSID(0, $NetBSD: twa.c,v 1.42
 #include sys/disk.h
 #include sys/sysctl.h
 #include sys/syslog.h
-#if 1
-#include sys/ktrace.h
-#endif
 
 #include sys/bus.h
 
@@ -388,7 +385,7 @@ struct twa_pci_identity {
 	const char	*name;
 };
 
-static const struct twa_pci_identity pci_twa_products[] = {
+static const struct twa_pci_identity twa_pci_products[] = {
 	{ PCI_VENDOR_3WARE,
 	  PCI_PRODUCT_3WARE_9000,
 	  3ware 9000 series,
@@ -436,24 +433,32 @@ twa_request_wait_handler(struct twa_requ
 	wakeup(tr);
 }
 
-static int
-twa_match(device_t parent, cfdata_t cfdata,
-void *aux)
+static const struct twa_pci_identity *
+twa_lookup(pcireg_t id)
 {
+	const struct twa_pci_identity *entry;
 	int i;
-	struct pci_attach_args *pa = aux;
-	const struct twa_pci_identity *entry = 0;
 
-	if (PCI_VENDOR(pa-pa_id) == PCI_VENDOR_3WARE) {
-		for (i = 0; (pci_twa_products[i].product_id); i++) {
-			entry = pci_twa_products[i];
-			if (entry-product_id == PCI_PRODUCT(pa-pa_id)) {
-aprint_normal(%s: (rev. 0x%02x)\n,
-entry-name, PCI_REVISION(pa-pa_class));
-return (1);
-			}
+	for (i = 0; i  __arraycount(twa_pci_products); i++) {
+		entry = twa_pci_products[i];
+		if (entry-vendor_id == PCI_VENDOR(id) 
+		entry-product_id == PCI_PRODUCT(id)) {
+			return entry;
 		}
 	}
+	return NULL;
+}
+
+static int
+twa_match(device_t parent, cfdata_t cfdata, void *aux)
+{
+	struct pci_attach_args *pa = aux;
+	const struct twa_pci_identity *entry;
+
+	entry = twa_lookup(pa-pa_id);
+	if (entry != NULL) {
+		return 1;
+	}
 	return (0);
 }
 
@@ -715,7 +720,6 @@ twa_inquiry(struct twa_request *tr, int 
 		SID_QUAL_LU_NOTPRESENT;
 
 	error = twa_immediate_request(tr, TWA_REQUEST_TIMEOUT_PERIOD);
-
 	if (error != 0)
 		return (error);
 
@@ -1497,6 +1501,7 @@ twa_attach(device_t parent, device_t sel
 	pci_intr_handle_t ih;
 	const char *intrstr;
 	const struct sysctlnode *node; 
+	const struct twa_pci_identity *entry;
 	int i;
 	bool use_64bit;
 
@@ -1509,7 +1514,8 @@ twa_attach(device_t parent, device_t sel
 	sc-pc = pa-pa_pc;
 	sc-tag = pa-pa_tag;
 
-	pci_aprint_devinfo_fancy(pa, RAID controller, 3ware Apache, 0);
+	entry = twa_lookup(pa-pa_id);
+	pci_aprint_devinfo_fancy(pa, RAID controller, entry-name, 1);
 
 	sc-sc_quirks = 0;
 		



CVS commit: src/regress/sys/kern/ras

2012-11-02 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Fri Nov  2 14:53:04 UTC 2012

Modified Files:
src/regress/sys/kern/ras/ras1: ras1.c
src/regress/sys/kern/ras/ras2: ras2.c
src/regress/sys/kern/ras/ras3: ras3.c

Log Message:
our current gcc puts the loop after the RAS_END() label on several
platforms, adjust the code so that gcc does the right thing again.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/regress/sys/kern/ras/ras1/ras1.c
cvs rdiff -u -r1.10 -r1.11 src/regress/sys/kern/ras/ras2/ras2.c
cvs rdiff -u -r1.9 -r1.10 src/regress/sys/kern/ras/ras3/ras3.c

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



CVS commit: src/sys/dev/pci

2012-11-02 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Fri Nov  2 14:59:11 UTC 2012

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

Log Message:
fix autoconf output (don't print from the match routine).


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/sys/dev/pci/twa.c

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



CVS commit: src/sys/arch/sparc

2012-11-01 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Fri Nov  2 00:01:20 UTC 2012

Modified Files:
src/sys/arch/sparc/include: types.h
src/sys/arch/sparc/sparc: genassym.cf locore.s machdep.c

Log Message:
Add RAS support for sparc.


To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 src/sys/arch/sparc/include/types.h
cvs rdiff -u -r1.67 -r1.68 src/sys/arch/sparc/sparc/genassym.cf
cvs rdiff -u -r1.266 -r1.267 src/sys/arch/sparc/sparc/locore.s
cvs rdiff -u -r1.324 -r1.325 src/sys/arch/sparc/sparc/machdep.c

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

Modified files:

Index: src/sys/arch/sparc/include/types.h
diff -u src/sys/arch/sparc/include/types.h:1.61 src/sys/arch/sparc/include/types.h:1.62
--- src/sys/arch/sparc/include/types.h:1.61	Sat Jul 30 19:29:12 2011
+++ src/sys/arch/sparc/include/types.h	Fri Nov  2 00:01:19 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: types.h,v 1.61 2011/07/30 19:29:12 martin Exp $ */
+/*	$NetBSD: types.h,v 1.62 2012/11/02 00:01:19 chs Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -122,15 +122,13 @@ typedef	volatile unsigned char		__cpu_si
 #define	__GENERIC_SOFT_INTERRUPTS_ALL_LEVELS
 #define __HAVE_CPU_DATA_FIRST
 #define	__HAVE_CPU_VMSPACE_EXEC
+#define	__HAVE_RAS
 
 #ifdef SUN4U
 #define	__HAVE_DEVICE_REGISTER_POSTCONFIG
 #define	__HAVE_ATOMIC64_OPS
 #define	__HAVE_CPU_COUNTER	/* sparc v9 CPUs have %tick */
 #define	__HAVE_FAST_SOFTINTS
-#if defined(_KERNEL)
-#define	__HAVE_RAS
-#endif
 #else
 #define	__HAVE_MM_MD_READWRITE
 #endif

Index: src/sys/arch/sparc/sparc/genassym.cf
diff -u src/sys/arch/sparc/sparc/genassym.cf:1.67 src/sys/arch/sparc/sparc/genassym.cf:1.68
--- src/sys/arch/sparc/sparc/genassym.cf:1.67	Mon Aug 15 02:19:44 2011
+++ src/sys/arch/sparc/sparc/genassym.cf	Fri Nov  2 00:01:19 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: genassym.cf,v 1.67 2011/08/15 02:19:44 mrg Exp $
+#	$NetBSD: genassym.cf,v 1.68 2012/11/02 00:01:19 chs Exp $
 
 #
 # Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -106,18 +106,23 @@ include sparc/dev/fdvar.h
 define	BSD		BSD
 define	USRSTACK	USRSTACK
 
-# proc fields and values
+# LWP fields and values
 define	L_PCB		offsetof(struct lwp, l_addr)
 define	L_PROC		offsetof(struct lwp, l_proc)
 define	L_STAT		offsetof(struct lwp, l_stat)
 define	L_WCHAN		offsetof(struct lwp, l_wchan)
 define	L_CPU		offsetof(struct lwp, l_cpu)
 define	L_PRIORITY	offsetof(struct lwp, l_priority)
-define	P_VMSPACE	offsetof(struct proc, p_vmspace)
-define	P_MD_SYSCALL	offsetof(struct proc, p_md.md_syscall)
+define	L_TF		offsetof(struct lwp, l_md.md_tf)
+
 define	LSRUN		LSRUN
 define	LSONPROC	LSONPROC
 
+# proc fields
+define	P_VMSPACE	offsetof(struct proc, p_vmspace)
+define	P_RASLIST	offsetof(struct proc, p_raslist)
+define	P_MD_SYSCALL	offsetof(struct proc, p_md.md_syscall)
+
 # VM structure fields
 define	VM_PMAP		offsetof(struct vmspace, vm_map.pmap)
 define	PMAP_CTX	offsetof(struct pmap, pm_ctx)
@@ -219,6 +224,10 @@ define	PCB_PC		offsetof(struct pcb, pcb_
 define	PCB_UW		offsetof(struct pcb, pcb_uw)
 define	PCB_WIM		offsetof(struct pcb, pcb_wim)
 
+# trapframe fields
+define	TF_PC		offsetof(struct trapframe, tf_pc)
+define	TF_NPC		offsetof(struct trapframe, tf_npc)
+
 # interrupt enable register PTE
 define	IE_REG_PTE_PG	(PG_V | PG_W | PG_S | PG_NC | PG_OBIO)
 

Index: src/sys/arch/sparc/sparc/locore.s
diff -u src/sys/arch/sparc/sparc/locore.s:1.266 src/sys/arch/sparc/sparc/locore.s:1.267
--- src/sys/arch/sparc/sparc/locore.s:1.266	Sun Feb 19 21:06:28 2012
+++ src/sys/arch/sparc/sparc/locore.s	Fri Nov  2 00:01:19 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.s,v 1.266 2012/02/19 21:06:28 rmind Exp $	*/
+/*	$NetBSD: locore.s,v 1.267 2012/11/02 00:01:19 chs Exp $	*/
 
 /*
  * Copyright (c) 1996 Paul Kranenburg
@@ -4949,8 +4949,27 @@ Lnosaveoldlwp:
 	st	%o0, [%o4 + PMAP_CPUSET]
 #endif
 
+	/*
+	 * Check for restartable atomic sequences (RAS)
+	 */
+	ld	[%g3 + L_PROC], %o0	! now %o0 points to p
+	ld	[%o0 + P_RASLIST], %o1	! any RAS in p?
+	cmp	%o1, 0
+	be	Lsw_noras		! no, skip RAS check
+	 mov	%g1, %i0		! restore oldlwp (for return value)
+	ld	[%g3 + L_TF], %l3	! pointer to trap frame
+	call	_C_LABEL(ras_lookup)
+	 ld	[%l3 + TF_PC], %o1
+	cmp	%o0, -1
+	be	Lsw_noras
+	 add	%o0, 4, %o1
+	st	%o0, [%l3 + TF_PC]	! store rewound %pc
+	st	%o1, [%l3 + TF_NPC]	! and %npc
+
+Lsw_noras:
+
 	ret
-	 restore %g0, %g1, %o0		! return (lastproc)
+	 restore			! return (oldlwp)
 
 /*
  * Call the idlespin() function if it exists, otherwise just return.

Index: src/sys/arch/sparc/sparc/machdep.c
diff -u src/sys/arch/sparc/sparc/machdep.c:1.324 src/sys/arch/sparc/sparc/machdep.c:1.325
--- src/sys/arch/sparc/sparc/machdep.c:1.324	Thu Sep 13 11:49:16 2012
+++ src/sys/arch/sparc/sparc/machdep.c	Fri Nov  2 00:01:20 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.324 2012/09/13 11:49:16 martin Exp $ */
+/*	$NetBSD: machdep.c,v 1.325 2012/11/02 00:01:20 chs Exp $ */
 
 /*-
  * Copyright (c) 1996, 1997, 1998 The 

CVS commit: src/sys/arch/sparc

2012-11-01 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Fri Nov  2 00:01:20 UTC 2012

Modified Files:
src/sys/arch/sparc/include: types.h
src/sys/arch/sparc/sparc: genassym.cf locore.s machdep.c

Log Message:
Add RAS support for sparc.


To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 src/sys/arch/sparc/include/types.h
cvs rdiff -u -r1.67 -r1.68 src/sys/arch/sparc/sparc/genassym.cf
cvs rdiff -u -r1.266 -r1.267 src/sys/arch/sparc/sparc/locore.s
cvs rdiff -u -r1.324 -r1.325 src/sys/arch/sparc/sparc/machdep.c

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



CVS commit: src/sys

2012-10-29 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Mon Oct 29 12:51:39 UTC 2012

Modified Files:
src/sys/arch/hpcsh/dev: psh3pwr.c
src/sys/arch/hpcsh/dev/hd64465: hd64465pcmcia.c
src/sys/arch/mvme68k/dev: pcc.c
src/sys/arch/sgimips/dev: zs_kbd.c
src/sys/arch/sh3/dev: sci.c
src/sys/arch/shark/shark: scr.c
src/sys/dev/pci: if_lmc.c

Log Message:
fix device/softc split errors.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/hpcsh/dev/psh3pwr.c
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/hpcsh/dev/hd64465/hd64465pcmcia.c
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/mvme68k/dev/pcc.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/sgimips/dev/zs_kbd.c
cvs rdiff -u -r1.55 -r1.56 src/sys/arch/sh3/dev/sci.c
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/shark/shark/scr.c
cvs rdiff -u -r1.51 -r1.52 src/sys/dev/pci/if_lmc.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/hpcsh/dev/psh3pwr.c
diff -u src/sys/arch/hpcsh/dev/psh3pwr.c:1.5 src/sys/arch/hpcsh/dev/psh3pwr.c:1.6
--- src/sys/arch/hpcsh/dev/psh3pwr.c:1.5	Sat Oct 27 17:17:56 2012
+++ src/sys/arch/hpcsh/dev/psh3pwr.c	Mon Oct 29 12:51:38 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: psh3pwr.c,v 1.5 2012/10/27 17:17:56 chs Exp $	*/
+/*	$NetBSD: psh3pwr.c,v 1.6 2012/10/29 12:51:38 chs Exp $	*/
 /*
  * Copyright (c) 2005, 2007 KIYOHARA Takashi
  * All rights reserved.
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: psh3pwr.c,v 1.5 2012/10/27 17:17:56 chs Exp $);
+__KERNEL_RCSID(0, $NetBSD: psh3pwr.c,v 1.6 2012/10/29 12:51:38 chs Exp $);
 
 #include sys/param.h
 #include sys/kernel.h
@@ -150,9 +150,9 @@ psh3pwr_attach(device_t parent, device_t
 	aprint_normal(\n);
 
 	sc-sc_ih_pout = intc_intr_establish(SH7709_INTEVT2_IRQ0,
-	IST_EDGE, IPL_TTY, psh3pwr_intr_plug_out, sc);
+	IST_EDGE, IPL_TTY, psh3pwr_intr_plug_out, self);
 	sc-sc_ih_pin = intc_intr_establish(SH7709_INTEVT2_IRQ1,
-	IST_EDGE, IPL_TTY, psh3pwr_intr_plug_in, sc);
+	IST_EDGE, IPL_TTY, psh3pwr_intr_plug_in, self);
 
 	/* : WindowsCE sets this bit. */
 	aprint_normal_dev(self, plug status: %s\n,
@@ -164,10 +164,8 @@ psh3pwr_attach(device_t parent, device_t
 
 
 static int
-psh3pwr_intr_plug_out(void *self)
+psh3pwr_intr_plug_out(void *dev)
 {
-	struct psh3pwr_softc *sc __attribute__((__unused__)) =
-	(struct psh3pwr_softc *)self;
 	uint8_t irr0, scpdr;
 
 	irr0 = _reg_read_1(SH7709_IRR0);
@@ -180,16 +178,14 @@ psh3pwr_intr_plug_out(void *self)
 	scpdr = _reg_read_1(SH7709_SCPDR);
 	_reg_write_1(SH7709_SCPDR, scpdr | PSH3PWR_PLUG_OUT);
 
-	DPRINTF((%s: plug out\n, device_xname(sc-sc_dev)));
+	DPRINTF((%s: plug out\n, device_xname(dev)));
 
 	return 1;
 }
 
 static int
-psh3pwr_intr_plug_in(void *self)
+psh3pwr_intr_plug_in(void *dev)
 {
-	struct psh3pwr_softc *sc __attribute__((__unused__)) =
-	(struct psh3pwr_softc *)self;
 	uint8_t irr0, scpdr;
 
 	irr0 = _reg_read_1(SH7709_IRR0);
@@ -201,13 +197,13 @@ psh3pwr_intr_plug_in(void *self)
 	scpdr = _reg_read_1(SH7709_SCPDR);
 	_reg_write_1(SH7709_SCPDR, scpdr  ~PSH3PWR_PLUG_OUT);
 
-	DPRINTF((%s: plug in\n, device_xname(sc-sc_dev)));
+	DPRINTF((%s: plug in\n, device_xname(dev)));
 
 	return 1;
 }
 
 void
-psh3pwr_sleep(void *self)
+psh3pwr_sleep(void *v)
 {
 	/* splhigh on entry */
 	extern void pfckbd_poll_hitachi_power(void);

Index: src/sys/arch/hpcsh/dev/hd64465/hd64465pcmcia.c
diff -u src/sys/arch/hpcsh/dev/hd64465/hd64465pcmcia.c:1.29 src/sys/arch/hpcsh/dev/hd64465/hd64465pcmcia.c:1.30
--- src/sys/arch/hpcsh/dev/hd64465/hd64465pcmcia.c:1.29	Sat Oct 27 17:17:56 2012
+++ src/sys/arch/hpcsh/dev/hd64465/hd64465pcmcia.c	Mon Oct 29 12:51:38 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: hd64465pcmcia.c,v 1.29 2012/10/27 17:17:56 chs Exp $	*/
+/*	$NetBSD: hd64465pcmcia.c,v 1.30 2012/10/29 12:51:38 chs Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: hd64465pcmcia.c,v 1.29 2012/10/27 17:17:56 chs Exp $);
+__KERNEL_RCSID(0, $NetBSD: hd64465pcmcia.c,v 1.30 2012/10/29 12:51:38 chs Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -289,7 +289,7 @@ hd64465pcmcia_print(void *arg, const cha
 }
 
 int
-hd64465pcmcia_submatch(device_t parent, cfdata_tcf, const int *ldesc, void *aux)
+hd64465pcmcia_submatch(device_t parent, cfdata_t cf, const int *ldesc, void *aux)
 {
 	struct pcmciabus_attach_args *paa = aux;
 	struct hd64465pcmcia_channel *ch =

Index: src/sys/arch/mvme68k/dev/pcc.c
diff -u src/sys/arch/mvme68k/dev/pcc.c:1.32 src/sys/arch/mvme68k/dev/pcc.c:1.33
--- src/sys/arch/mvme68k/dev/pcc.c:1.32	Sat Oct 27 17:18:04 2012
+++ src/sys/arch/mvme68k/dev/pcc.c	Mon Oct 29 12:51:38 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: pcc.c,v 1.32 2012/10/27 17:18:04 chs Exp $	*/
+/*	$NetBSD: pcc.c,v 1.33 2012/10/29 12:51:38 chs Exp $	*/
 
 /*
  * Copyright (c) 1996, 1997 The NetBSD Foundation, 

CVS commit: src/sys/arch

2012-10-29 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Mon Oct 29 12:52:44 UTC 2012

Modified Files:
src/sys/arch/macppc/macppc: failsafe.c
src/sys/arch/powerpc/oea: ofw_consinit.c

Log Message:
fix compile problems (for POWERMAC_G5).


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/macppc/macppc/failsafe.c
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/powerpc/oea/ofw_consinit.c

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

Modified files:

Index: src/sys/arch/macppc/macppc/failsafe.c
diff -u src/sys/arch/macppc/macppc/failsafe.c:1.2 src/sys/arch/macppc/macppc/failsafe.c:1.3
--- src/sys/arch/macppc/macppc/failsafe.c:1.2	Wed Aug 23 05:58:39 2006
+++ src/sys/arch/macppc/macppc/failsafe.c	Mon Oct 29 12:52:43 2012
@@ -39,7 +39,9 @@
 #include sys/conf.h
 #include dev/cons.h
 #include sys/tty.h
+
 #include powerpc/cpu.h
+#include machine/psl.h
 
 #if defined (PMAC_G5)
 extern void mfhid4(volatile uint64_t * ret_hid4);

Index: src/sys/arch/powerpc/oea/ofw_consinit.c
diff -u src/sys/arch/powerpc/oea/ofw_consinit.c:1.14 src/sys/arch/powerpc/oea/ofw_consinit.c:1.15
--- src/sys/arch/powerpc/oea/ofw_consinit.c:1.14	Sat Oct 13 17:58:55 2012
+++ src/sys/arch/powerpc/oea/ofw_consinit.c	Mon Oct 29 12:52:43 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: ofw_consinit.c,v 1.14 2012/10/13 17:58:55 jdc Exp $ */
+/* $NetBSD: ofw_consinit.c,v 1.15 2012/10/29 12:52:43 chs Exp $ */
 
 /*-
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ofw_consinit.c,v 1.14 2012/10/13 17:58:55 jdc Exp $);
+__KERNEL_RCSID(0, $NetBSD: ofw_consinit.c,v 1.15 2012/10/29 12:52:43 chs Exp $);
 
 #include sys/param.h
 #include sys/buf.h
@@ -150,6 +150,7 @@ cninit(void)
 
 #ifdef PMAC_G5
 		/* The MMU hasn't been initialized yet, use failsafe for now */
+		extern struct consdev failsafe_cons;
 		cp = failsafe_cons;
 		cn_tab = cp;
 		(*cp-cn_probe)(cp);



CVS commit: src/sys/arch

2012-10-29 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Mon Oct 29 12:55:42 UTC 2012

Modified Files:
src/sys/arch/sun3/dev: fd.c
src/sys/arch/vax/vax: ka730.c ubi.c

Log Message:
fix compile problems.


To generate a diff of this commit:
cvs rdiff -u -r1.73 -r1.74 src/sys/arch/sun3/dev/fd.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/vax/vax/ka730.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/vax/vax/ubi.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/sun3/dev/fd.c
diff -u src/sys/arch/sun3/dev/fd.c:1.73 src/sys/arch/sun3/dev/fd.c:1.74
--- src/sys/arch/sun3/dev/fd.c:1.73	Sat Oct 13 06:37:16 2012
+++ src/sys/arch/sun3/dev/fd.c	Mon Oct 29 12:55:41 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: fd.c,v 1.73 2012/10/13 06:37:16 tsutsui Exp $	*/
+/*	$NetBSD: fd.c,v 1.74 2012/10/29 12:55:41 chs Exp $	*/
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -72,7 +72,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: fd.c,v 1.73 2012/10/13 06:37:16 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: fd.c,v 1.74 2012/10/29 12:55:41 chs Exp $);
 
 #include opt_ddb.h
 
@@ -1766,10 +1766,11 @@ fdioctl(dev_t dev, u_long cmd, void *add
 		for (k = 0; k  fdc-sc_nstat; k++)
 			printf( %x, fdc-sc_status[k]);
 		printf(\n);
-		}
 		return 0;
+		}
 
 	case _IOW('f', 101, int):
+		{
 		struct fdc_softc *fdc =
 		device_private(device_parent(fd-sc_dv));
 
@@ -1777,6 +1778,7 @@ fdioctl(dev_t dev, u_long cmd, void *add
 		fdc-sc_cfg |= (*(int *)addr  CFG_THRHLD_MASK);
 		fdconf(fdc);
 		return 0;
+		}
 
 	case _IO('f', 102):
 		{
@@ -1789,10 +1791,11 @@ fdioctl(dev_t dev, u_long cmd, void *add
 		printf(sensei(%d regs): , fdc-sc_nstat);
 		for (k=0; k  fdc-sc_nstat; k++)
 			printf( 0x%x, fdc-sc_status[k]);
-		}
 		printf(\n);
 		return 0;
+		}
 #endif
+
 	default:
 		return ENOTTY;
 	}

Index: src/sys/arch/vax/vax/ka730.c
diff -u src/sys/arch/vax/vax/ka730.c:1.3 src/sys/arch/vax/vax/ka730.c:1.4
--- src/sys/arch/vax/vax/ka730.c:1.3	Sun Jun  5 16:59:21 2011
+++ src/sys/arch/vax/vax/ka730.c	Mon Oct 29 12:55:41 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: ka730.c,v 1.3 2011/06/05 16:59:21 matt Exp $ */
+/*	$NetBSD: ka730.c,v 1.4 2012/10/29 12:55:41 chs Exp $ */
 /*
  * Copyright (c) 1982, 1986, 1988 The Regents of the University of California.
  * All rights reserved.
@@ -68,7 +68,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ka730.c,v 1.3 2011/06/05 16:59:21 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: ka730.c,v 1.4 2012/10/29 12:55:41 chs Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -108,7 +108,7 @@ struct	cpu_dep ka730_calls = {
 };
 
 void
-ka730_conf()
+ka730_conf(void)
 {
 	/* Call ctuattach() here so it can setup its vectors. */
 	ctuattach();
@@ -154,7 +154,7 @@ ka730_memenable(device_t parent, device_
 
 /* log crd errors */
 void
-ka730_memerr()
+ka730_memerr(void)
 {
 }
 
@@ -186,7 +186,7 @@ ka730_mchk(void *cmcf)
 }
 
 void
-ka730_clrf()
+ka730_clrf(void)
 {
 	int s = splhigh();
 

Index: src/sys/arch/vax/vax/ubi.c
diff -u src/sys/arch/vax/vax/ubi.c:1.4 src/sys/arch/vax/vax/ubi.c:1.5
--- src/sys/arch/vax/vax/ubi.c:1.4	Sun Jun  5 16:59:21 2011
+++ src/sys/arch/vax/vax/ubi.c	Mon Oct 29 12:55:41 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: ubi.c,v 1.4 2011/06/05 16:59:21 matt Exp $ */
+/*	$NetBSD: ubi.c,v 1.5 2012/10/29 12:55:41 chs Exp $ */
 /*
  * Copyright (c) 1999 Ludd, University of Lule}, Sweden.
  * All rights reserved.
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ubi.c,v 1.4 2011/06/05 16:59:21 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: ubi.c,v 1.5 2012/10/29 12:55:41 chs Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -78,7 +78,7 @@ ubi_attach(device_t parent, device_t sel
 
 	printf(\n);
 
-sa.sa_base = NEX730;
+sa.sa_base = (bus_addr_t)NEX730;
 
 #define NEXPAGES (sizeof(struct nexus) / VAX_NBPG)
 



CVS commit: src/sys/dev/pci

2012-10-29 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Mon Oct 29 12:59:44 UTC 2012

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

Log Message:
remove an unnecessary cast.
use the standard name for the third arg to attach.
adjust some whitespace.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/dev/pci/coram.c

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

Modified files:

Index: src/sys/dev/pci/coram.c
diff -u src/sys/dev/pci/coram.c:1.10 src/sys/dev/pci/coram.c:1.11
--- src/sys/dev/pci/coram.c:1.10	Mon Jan 30 19:41:18 2012
+++ src/sys/dev/pci/coram.c	Mon Oct 29 12:59:43 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: coram.c,v 1.10 2012/01/30 19:41:18 drochner Exp $ */
+/* $NetBSD: coram.c,v 1.11 2012/10/29 12:59:43 chs Exp $ */
 
 /*
  * Copyright (c) 2008, 2011 Jonathan A. Kollasch
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: coram.c,v 1.10 2012/01/30 19:41:18 drochner Exp $);
+__KERNEL_RCSID(0, $NetBSD: coram.c,v 1.11 2012/10/29 12:59:43 chs Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -157,10 +157,10 @@ coram_match(device_t parent, cfdata_t ma
 }
 
 static void
-coram_attach(device_t parent, device_t self, void *v)
+coram_attach(device_t parent, device_t self, void *aux)
 {
 	struct coram_softc *sc = device_private(self);
-	const struct pci_attach_args *pa = v;
+	const struct pci_attach_args *pa = aux;
 	pci_intr_handle_t ih;
 	pcireg_t reg;
 	const char *intrstr;
@@ -193,8 +193,7 @@ coram_attach(device_t parent, device_t s
 		return;
 	}
 	intrstr = pci_intr_string(pa-pa_pc, ih);
-	sc-sc_ih = pci_intr_establish(pa-pa_pc, ih, IPL_VM,
-	coram_intr, (void *)self);
+	sc-sc_ih = pci_intr_establish(pa-pa_pc, ih, IPL_VM, coram_intr, self);
 	if (sc-sc_ih == NULL) {
 		aprint_error_dev(self, couldn't establish interrupt);
 		if (intrstr != NULL)
@@ -214,7 +213,8 @@ coram_attach(device_t parent, device_t s
 		cic = sc-sc_iic[i];
 
 		cic-cic_sc = sc;
-		if(bus_space_subregion(sc-sc_memt, sc-sc_memh, I2C_BASE + (I2C_SIZE * i), I2C_SIZE, cic-cic_regh))
+		if (bus_space_subregion(sc-sc_memt, sc-sc_memh,
+		I2C_BASE + (I2C_SIZE * i), I2C_SIZE, cic-cic_regh))
 			panic(failed to subregion i2c);
 
 		mutex_init(cic-cic_busmutex, MUTEX_DRIVER, IPL_NONE);
@@ -228,8 +228,8 @@ coram_attach(device_t parent, device_t s
 		memset(iba, 0, sizeof(iba));
 		iba.iba_tag = cic-cic_i2c;
 		iba.iba_type = I2C_TYPE_SMBUS;
-		cic-cic_i2cdev = config_found_ia(self, i2cbus,
-		iba, iicbus_print);
+		cic-cic_i2cdev = config_found_ia(self, i2cbus, iba,
+		iicbus_print);
 #endif
 	}
 
@@ -251,7 +251,8 @@ coram_attach(device_t parent, device_t s
 //	seeprom_bootstrap_read(sc-sc_i2c, 0x50, 0, 256, foo, 256);
 
 	iic_acquire_bus(sc-sc_i2c, I2C_F_POLL);
-	iic_exec(sc-sc_i2c, I2C_OP_READ_WITH_STOP, 0x50, bar, 1, foo, 256, I2C_F_POLL);
+	iic_exec(sc-sc_i2c, I2C_OP_READ_WITH_STOP, 0x50, bar, 1, foo, 256,
+	I2C_F_POLL);
 	iic_release_bus(sc-sc_i2c, I2C_F_POLL);
 
 	printf(\n);



CVS commit: src/sys/dev/tc

2012-10-29 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Mon Oct 29 13:19:15 UTC 2012

Removed Files:
src/sys/dev/tc: ascvar.h

Log Message:
remove unused file.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r0 src/sys/dev/tc/ascvar.h

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



CVS commit: src/sys/arch/hpcsh/dev/hd64465

2012-10-29 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Mon Oct 29 13:40:56 UTC 2012

Modified Files:
src/sys/arch/hpcsh/dev/hd64465: hd64465pcmcia.c

Log Message:
third try is the charm: really make this build again.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/hpcsh/dev/hd64465/hd64465pcmcia.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/hpcsh/dev/hd64465/hd64465pcmcia.c
diff -u src/sys/arch/hpcsh/dev/hd64465/hd64465pcmcia.c:1.30 src/sys/arch/hpcsh/dev/hd64465/hd64465pcmcia.c:1.31
--- src/sys/arch/hpcsh/dev/hd64465/hd64465pcmcia.c:1.30	Mon Oct 29 12:51:38 2012
+++ src/sys/arch/hpcsh/dev/hd64465/hd64465pcmcia.c	Mon Oct 29 13:40:56 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: hd64465pcmcia.c,v 1.30 2012/10/29 12:51:38 chs Exp $	*/
+/*	$NetBSD: hd64465pcmcia.c,v 1.31 2012/10/29 13:40:56 chs Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: hd64465pcmcia.c,v 1.30 2012/10/29 12:51:38 chs Exp $);
+__KERNEL_RCSID(0, $NetBSD: hd64465pcmcia.c,v 1.31 2012/10/29 13:40:56 chs Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -119,6 +119,7 @@ struct hd64465pcmcia_event {
 };
 
 struct hd64465pcmcia_softc {
+	device_t sc_dev;
 	enum hd64465_module_id sc_module_id;
 	int sc_shutdown;
 



CVS commit: src/sys/arch/hpcsh/dev/hd64465

2012-10-29 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Mon Oct 29 13:46:26 UTC 2012

Modified Files:
src/sys/arch/hpcsh/dev/hd64465: hd64465pcmcia.c

Log Message:
and finally, initialize sc_dev now that I added it back.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/hpcsh/dev/hd64465/hd64465pcmcia.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/hpcsh/dev/hd64465/hd64465pcmcia.c
diff -u src/sys/arch/hpcsh/dev/hd64465/hd64465pcmcia.c:1.31 src/sys/arch/hpcsh/dev/hd64465/hd64465pcmcia.c:1.32
--- src/sys/arch/hpcsh/dev/hd64465/hd64465pcmcia.c:1.31	Mon Oct 29 13:40:56 2012
+++ src/sys/arch/hpcsh/dev/hd64465/hd64465pcmcia.c	Mon Oct 29 13:46:26 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: hd64465pcmcia.c,v 1.31 2012/10/29 13:40:56 chs Exp $	*/
+/*	$NetBSD: hd64465pcmcia.c,v 1.32 2012/10/29 13:46:26 chs Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: hd64465pcmcia.c,v 1.31 2012/10/29 13:40:56 chs Exp $);
+__KERNEL_RCSID(0, $NetBSD: hd64465pcmcia.c,v 1.32 2012/10/29 13:46:26 chs Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -214,6 +214,7 @@ hd64465pcmcia_attach(device_t parent, de
 	struct hd64465pcmcia_softc *sc = device_private(self);
 	int error;
 
+	sc-sc_dev = self;
 	sc-sc_module_id = ha-ha_module_id;
 
 	printf(\n);



CVS commit: src/sys/arch

2012-10-29 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Mon Oct 29 14:01:33 UTC 2012

Modified Files:
src/sys/arch/arm/at91: at91bus.c
src/sys/arch/evbarm/evbarm: initarm_common.c

Log Message:
add missing arg to cpu_setttb().


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/arm/at91/at91bus.c
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/evbarm/evbarm/initarm_common.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/at91/at91bus.c
diff -u src/sys/arch/arm/at91/at91bus.c:1.14 src/sys/arch/arm/at91/at91bus.c:1.15
--- src/sys/arch/arm/at91/at91bus.c:1.14	Sat Sep  1 14:48:06 2012
+++ src/sys/arch/arm/at91/at91bus.c	Mon Oct 29 14:01:33 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: at91bus.c,v 1.14 2012/09/01 14:48:06 matt Exp $	*/
+/*	$NetBSD: at91bus.c,v 1.15 2012/10/29 14:01:33 chs Exp $	*/
 
 /*
  * Copyright (c) 2007 Embedtronics Oy
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: at91bus.c,v 1.14 2012/09/01 14:48:06 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: at91bus.c,v 1.15 2012/10/29 14:01:33 chs Exp $);
 
 #include opt_ddb.h
 #include opt_kgdb.h
@@ -448,7 +448,7 @@ at91bus_setup(BootConfig *mem)
 	printf(switching to new L1 page table  @%#lx..., kernel_l1pt.pv_pa);
 #endif
 	cpu_domains((DOMAIN_CLIENT  (PMAP_DOMAIN_KERNEL*2)) | DOMAIN_CLIENT);
-	cpu_setttb(kernel_l1pt.pv_pa);
+	cpu_setttb(kernel_l1pt.pv_pa, true);
 	cpu_tlb_flushID();
 	cpu_domains(DOMAIN_CLIENT  (PMAP_DOMAIN_KERNEL*2));
 

Index: src/sys/arch/evbarm/evbarm/initarm_common.c
diff -u src/sys/arch/evbarm/evbarm/initarm_common.c:1.11 src/sys/arch/evbarm/evbarm/initarm_common.c:1.12
--- src/sys/arch/evbarm/evbarm/initarm_common.c:1.11	Sun Jul 29 00:07:07 2012
+++ src/sys/arch/evbarm/evbarm/initarm_common.c	Mon Oct 29 14:01:33 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: initarm_common.c,v 1.11 2012/07/29 00:07:07 matt Exp $	*/
+/*	$NetBSD: initarm_common.c,v 1.12 2012/10/29 14:01:33 chs Exp $	*/
 
 /*
  * Copyright 2003 Wasabi Systems, Inc.
@@ -69,7 +69,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: initarm_common.c,v 1.11 2012/07/29 00:07:07 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: initarm_common.c,v 1.12 2012/10/29 14:01:33 chs Exp $);
 
 #include sys/systm.h
 #include sys/param.h
@@ -402,7 +402,7 @@ initarm_common(const struct initarm_conf
 
 	/* Switch tables */
 	cpu_domains((DOMAIN_CLIENT  (PMAP_DOMAIN_KERNEL*2)) | DOMAIN_CLIENT);
-	cpu_setttb(kernel_l1pt.pv_pa);
+	cpu_setttb(kernel_l1pt.pv_pa, true);
 	cpu_tlb_flushID();
 	cpu_domains(DOMAIN_CLIENT  (PMAP_DOMAIN_KERNEL*2));
 



CVS commit: src

2012-10-29 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Mon Oct 29 14:09:38 UTC 2012

Modified Files:
src/common/lib/libc/arch/arm/atomic: atomic_cas_32.S atomic_cas_64.S
atomic_cas_8.S atomic_inc_32.S atomic_inc_64.S
src/sys/arch/arm/arm: bcopyinout.S

Log Message:
_ARCH_ARM_6 - _ARM_ARCH_6


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/common/lib/libc/arch/arm/atomic/atomic_cas_32.S \
src/common/lib/libc/arch/arm/atomic/atomic_cas_8.S \
src/common/lib/libc/arch/arm/atomic/atomic_inc_32.S
cvs rdiff -u -r1.1 -r1.2 src/common/lib/libc/arch/arm/atomic/atomic_cas_64.S
cvs rdiff -u -r1.2 -r1.3 src/common/lib/libc/arch/arm/atomic/atomic_inc_64.S
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/arm/arm/bcopyinout.S

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

Modified files:

Index: src/common/lib/libc/arch/arm/atomic/atomic_cas_32.S
diff -u src/common/lib/libc/arch/arm/atomic/atomic_cas_32.S:1.3 src/common/lib/libc/arch/arm/atomic/atomic_cas_32.S:1.4
--- src/common/lib/libc/arch/arm/atomic/atomic_cas_32.S:1.3	Fri Aug 31 23:41:52 2012
+++ src/common/lib/libc/arch/arm/atomic/atomic_cas_32.S	Mon Oct 29 14:09:38 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: atomic_cas_32.S,v 1.3 2012/08/31 23:41:52 matt Exp $	*/
+/*	$NetBSD: atomic_cas_32.S,v 1.4 2012/10/29 14:09:38 chs Exp $	*/
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -68,4 +68,4 @@ STRONG_ALIAS(_atomic_cas_uint_ni,_atomic
 STRONG_ALIAS(_atomic_cas_ulong_ni,_atomic_cas_32)
 STRONG_ALIAS(_atomic_cas_ptr,_atomic_cas_32)
 
-#endif /* _ARCH_ARM_6 */
+#endif /* _ARM_ARCH_6 */
Index: src/common/lib/libc/arch/arm/atomic/atomic_cas_8.S
diff -u src/common/lib/libc/arch/arm/atomic/atomic_cas_8.S:1.3 src/common/lib/libc/arch/arm/atomic/atomic_cas_8.S:1.4
--- src/common/lib/libc/arch/arm/atomic/atomic_cas_8.S:1.3	Fri Aug 31 23:41:52 2012
+++ src/common/lib/libc/arch/arm/atomic/atomic_cas_8.S	Mon Oct 29 14:09:38 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: atomic_cas_8.S,v 1.3 2012/08/31 23:41:52 matt Exp $ */
+/* $NetBSD: atomic_cas_8.S,v 1.4 2012/10/29 14:09:38 chs Exp $ */
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -56,4 +56,4 @@ ATOMIC_OP_ALIAS(atomic_cas_8,_atomic_cas
 STRONG_ALIAS(_atomic_cas_char,_atomic_cas_8)
 STRONG_ALIAS(_atomic_cas_uchar,_atomic_cas_8)
 
-#endif /* _ARCH_ARM_6 */
+#endif /* _ARM_ARCH_6 */
Index: src/common/lib/libc/arch/arm/atomic/atomic_inc_32.S
diff -u src/common/lib/libc/arch/arm/atomic/atomic_inc_32.S:1.3 src/common/lib/libc/arch/arm/atomic/atomic_inc_32.S:1.4
--- src/common/lib/libc/arch/arm/atomic/atomic_inc_32.S:1.3	Fri Aug 31 23:41:52 2012
+++ src/common/lib/libc/arch/arm/atomic/atomic_inc_32.S	Mon Oct 29 14:09:38 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: atomic_inc_32.S,v 1.3 2012/08/31 23:41:52 matt Exp $	*/
+/*	$NetBSD: atomic_inc_32.S,v 1.4 2012/10/29 14:09:38 chs Exp $	*/
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -76,4 +76,4 @@ STRONG_ALIAS(_atomic_inc_uint_nv,_atomic
 STRONG_ALIAS(_atomic_inc_ulong_nv,_atomic_inc_32_nv)
 STRONG_ALIAS(_atomic_inc_ptr_nv,_atomic_inc_32_nv)
 
-#endif /* _ARCH_ARM_6 */
+#endif /* _ARM_ARCH_6 */

Index: src/common/lib/libc/arch/arm/atomic/atomic_cas_64.S
diff -u src/common/lib/libc/arch/arm/atomic/atomic_cas_64.S:1.1 src/common/lib/libc/arch/arm/atomic/atomic_cas_64.S:1.2
--- src/common/lib/libc/arch/arm/atomic/atomic_cas_64.S:1.1	Tue Sep 11 20:51:25 2012
+++ src/common/lib/libc/arch/arm/atomic/atomic_cas_64.S	Mon Oct 29 14:09:38 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: atomic_cas_64.S,v 1.1 2012/09/11 20:51:25 matt Exp $	*/
+/*	$NetBSD: atomic_cas_64.S,v 1.2 2012/10/29 14:09:38 chs Exp $	*/
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -66,4 +66,4 @@ ENTRY_NP(_atomic_cas_64)
 
 ATOMIC_OP_ALIAS(atomic_cas_64,_atomic_cas_64)
 
-#endif /* _ARCH_ARM_6 */
+#endif /* _ARM_ARCH_6 */

Index: src/common/lib/libc/arch/arm/atomic/atomic_inc_64.S
diff -u src/common/lib/libc/arch/arm/atomic/atomic_inc_64.S:1.2 src/common/lib/libc/arch/arm/atomic/atomic_inc_64.S:1.3
--- src/common/lib/libc/arch/arm/atomic/atomic_inc_64.S:1.2	Thu Sep 13 00:36:12 2012
+++ src/common/lib/libc/arch/arm/atomic/atomic_inc_64.S	Mon Oct 29 14:09:38 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: atomic_inc_64.S,v 1.2 2012/09/13 00:36:12 matt Exp $	*/
+/*	$NetBSD: atomic_inc_64.S,v 1.3 2012/10/29 14:09:38 chs Exp $	*/
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -69,4 +69,4 @@ ENTRY_NP(_atomic_inc_64_nv)
 	END(_atomic_inc_64_nv)
 ATOMIC_OP_ALIAS(atomic_inc_64_nv,_atomic_inc_64_nv)
 
-#endif /* _ARCH_ARM_6 */
+#endif /* _ARM_ARCH_6 */

Index: src/sys/arch/arm/arm/bcopyinout.S
diff -u src/sys/arch/arm/arm/bcopyinout.S:1.18 src/sys/arch/arm/arm/bcopyinout.S:1.19
--- src/sys/arch/arm/arm/bcopyinout.S:1.18	Tue Jul 31 06:54:16 2012
+++ src/sys/arch/arm/arm/bcopyinout.S	Mon Oct 29 14:09:38 

CVS commit: src/sys

2012-10-29 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Mon Oct 29 12:51:39 UTC 2012

Modified Files:
src/sys/arch/hpcsh/dev: psh3pwr.c
src/sys/arch/hpcsh/dev/hd64465: hd64465pcmcia.c
src/sys/arch/mvme68k/dev: pcc.c
src/sys/arch/sgimips/dev: zs_kbd.c
src/sys/arch/sh3/dev: sci.c
src/sys/arch/shark/shark: scr.c
src/sys/dev/pci: if_lmc.c

Log Message:
fix device/softc split errors.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/hpcsh/dev/psh3pwr.c
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/hpcsh/dev/hd64465/hd64465pcmcia.c
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/mvme68k/dev/pcc.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/sgimips/dev/zs_kbd.c
cvs rdiff -u -r1.55 -r1.56 src/sys/arch/sh3/dev/sci.c
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/shark/shark/scr.c
cvs rdiff -u -r1.51 -r1.52 src/sys/dev/pci/if_lmc.c

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



CVS commit: src/sys/arch

2012-10-29 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Mon Oct 29 12:52:44 UTC 2012

Modified Files:
src/sys/arch/macppc/macppc: failsafe.c
src/sys/arch/powerpc/oea: ofw_consinit.c

Log Message:
fix compile problems (for POWERMAC_G5).


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/macppc/macppc/failsafe.c
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/powerpc/oea/ofw_consinit.c

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



CVS commit: src/sys/arch

2012-10-29 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Mon Oct 29 12:55:42 UTC 2012

Modified Files:
src/sys/arch/sun3/dev: fd.c
src/sys/arch/vax/vax: ka730.c ubi.c

Log Message:
fix compile problems.


To generate a diff of this commit:
cvs rdiff -u -r1.73 -r1.74 src/sys/arch/sun3/dev/fd.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/vax/vax/ka730.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/vax/vax/ubi.c

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



CVS commit: src/sys/dev/pci

2012-10-29 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Mon Oct 29 12:59:44 UTC 2012

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

Log Message:
remove an unnecessary cast.
use the standard name for the third arg to attach.
adjust some whitespace.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/dev/pci/coram.c

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



CVS commit: src/sys/dev/tc

2012-10-29 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Mon Oct 29 13:19:15 UTC 2012

Removed Files:
src/sys/dev/tc: ascvar.h

Log Message:
remove unused file.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r0 src/sys/dev/tc/ascvar.h

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



CVS commit: src/sys/arch/hpcsh/dev/hd64465

2012-10-29 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Mon Oct 29 13:40:56 UTC 2012

Modified Files:
src/sys/arch/hpcsh/dev/hd64465: hd64465pcmcia.c

Log Message:
third try is the charm: really make this build again.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/hpcsh/dev/hd64465/hd64465pcmcia.c

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



CVS commit: src/sys/arch/hpcsh/dev/hd64465

2012-10-29 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Mon Oct 29 13:46:26 UTC 2012

Modified Files:
src/sys/arch/hpcsh/dev/hd64465: hd64465pcmcia.c

Log Message:
and finally, initialize sc_dev now that I added it back.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/hpcsh/dev/hd64465/hd64465pcmcia.c

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



CVS commit: src/sys/arch

2012-10-29 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Mon Oct 29 14:01:33 UTC 2012

Modified Files:
src/sys/arch/arm/at91: at91bus.c
src/sys/arch/evbarm/evbarm: initarm_common.c

Log Message:
add missing arg to cpu_setttb().


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/arm/at91/at91bus.c
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/evbarm/evbarm/initarm_common.c

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



CVS commit: src

2012-10-29 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Mon Oct 29 14:09:38 UTC 2012

Modified Files:
src/common/lib/libc/arch/arm/atomic: atomic_cas_32.S atomic_cas_64.S
atomic_cas_8.S atomic_inc_32.S atomic_inc_64.S
src/sys/arch/arm/arm: bcopyinout.S

Log Message:
_ARCH_ARM_6 - _ARM_ARCH_6


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/common/lib/libc/arch/arm/atomic/atomic_cas_32.S \
src/common/lib/libc/arch/arm/atomic/atomic_cas_8.S \
src/common/lib/libc/arch/arm/atomic/atomic_inc_32.S
cvs rdiff -u -r1.1 -r1.2 src/common/lib/libc/arch/arm/atomic/atomic_cas_64.S
cvs rdiff -u -r1.2 -r1.3 src/common/lib/libc/arch/arm/atomic/atomic_inc_64.S
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/arm/arm/bcopyinout.S

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



CVS commit: src/sys/arch/ia64/ia64

2012-10-27 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Sat Oct 27 17:29:03 UTC 2012

Modified Files:
src/sys/arch/ia64/ia64: sapic.c

Log Message:
malloc - kmem_zalloc.  this also fixes a build error.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/ia64/ia64/sapic.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/ia64/ia64/sapic.c
diff -u src/sys/arch/ia64/ia64/sapic.c:1.1 src/sys/arch/ia64/ia64/sapic.c:1.2
--- src/sys/arch/ia64/ia64/sapic.c:1.1	Mon Jul 20 04:41:36 2009
+++ src/sys/arch/ia64/ia64/sapic.c	Sat Oct 27 17:29:03 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: sapic.c,v 1.1 2009/07/20 04:41:36 kiyohara Exp $	*/
+/*	$NetBSD: sapic.c,v 1.2 2012/10/27 17:29:03 chs Exp $	*/
 /*-
  * Copyright (c) 2001 Doug Rabson
  * All rights reserved.
@@ -30,7 +30,7 @@
 #include opt_ddb.h
 
 #include sys/param.h
-#include sys/malloc.h
+#include sys/kmem.h
 #include sys/kernel.h
 #include sys/systm.h
 #include sys/bus.h
@@ -44,8 +44,6 @@
 #include machine/sapicvar.h
 
 
-static MALLOC_DEFINE(M_SAPIC, sapic, I/O SAPIC devices);
-
 struct sapic *ia64_sapics[16]; /* XXX make this resizable */
 static int ia64_sapic_count;
 
@@ -146,7 +144,7 @@ sapic_create(u_int id, u_int base, uint6
 	struct sapic *sa;
 	u_int i;
 
-	sa = malloc(sizeof(struct sapic), M_SAPIC, M_ZERO | M_NOWAIT);
+	sa = kmem_zalloc(sizeof(struct sapic), KM_NOSLEEP);
 	if (sa == NULL)
 		return NULL;
 



CVS commit: src/sys/arch/sun3/include

2012-10-27 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Sun Oct 28 00:25:59 UTC 2012

Modified Files:
src/sys/arch/sun3/include: types.h

Log Message:
no need to define __BROKEN_CONFIG_UNIT_USAGE, the code that this enabled
has been gone for years.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/sun3/include/types.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/arch/sun3/include/types.h
diff -u src/sys/arch/sun3/include/types.h:1.18 src/sys/arch/sun3/include/types.h:1.19
--- src/sys/arch/sun3/include/types.h:1.18	Sun Jun 12 03:35:48 2011
+++ src/sys/arch/sun3/include/types.h	Sun Oct 28 00:25:59 2012
@@ -1,8 +1,7 @@
-/*	$NetBSD: types.h,v 1.18 2011/06/12 03:35:48 rmind Exp $	*/
+/*	$NetBSD: types.h,v 1.19 2012/10/28 00:25:59 chs Exp $	*/
 
 #include m68k/types.h
 
-#define	__BROKEN_CONFIG_UNIT_USAGE
 #define	__HAVE_MM_MD_KERNACC
 #define	__HAVE_MM_MD_DIRECT_MAPPED_PHYS
 #define	__HAVE_MM_MD_MMAP



CVS commit: src/sys/arch/ia64/ia64

2012-10-27 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Sat Oct 27 17:29:03 UTC 2012

Modified Files:
src/sys/arch/ia64/ia64: sapic.c

Log Message:
malloc - kmem_zalloc.  this also fixes a build error.


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

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



CVS commit: src/sys/arch/sun3/include

2012-10-27 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Sun Oct 28 00:25:59 UTC 2012

Modified Files:
src/sys/arch/sun3/include: types.h

Log Message:
no need to define __BROKEN_CONFIG_UNIT_USAGE, the code that this enabled
has been gone for years.


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

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



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

2012-10-26 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Fri Oct 26 14:46:44 UTC 2012

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

Log Message:
in osyscall, set the PSL_I bit into the correct field of the trapframe.
it was going into tf_eip instead of tf_eflags, which would sometimes
corrupt %eip and always return to user mode with interrupts disabled.
this was found with a netbsd 1.0 binary, and dsl@ points out that
this should also fix PR 41342.


To generate a diff of this commit:
cvs rdiff -u -r1.102 -r1.103 src/sys/arch/i386/i386/locore.S

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

Modified files:

Index: src/sys/arch/i386/i386/locore.S
diff -u src/sys/arch/i386/i386/locore.S:1.102 src/sys/arch/i386/i386/locore.S:1.103
--- src/sys/arch/i386/i386/locore.S:1.102	Sat Sep  1 23:19:46 2012
+++ src/sys/arch/i386/i386/locore.S	Fri Oct 26 14:46:44 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.S,v 1.102 2012/09/01 23:19:46 cherry Exp $	*/
+/*	$NetBSD: locore.S,v 1.103 2012/10/26 14:46:44 chs Exp $	*/
 
 /*
  * Copyright-o-rama!
@@ -129,7 +129,7 @@
  */
 
 #include machine/asm.h
-__KERNEL_RCSID(0, $NetBSD: locore.S,v 1.102 2012/09/01 23:19:46 cherry Exp $);
+__KERNEL_RCSID(0, $NetBSD: locore.S,v 1.103 2012/10/26 14:46:44 chs Exp $);
 
 #include opt_compat_oldboot.h
 #include opt_ddb.h
@@ -1130,7 +1130,7 @@ IDTVEC(osyscall)
 #endif
 	pushfl			# set eflags in trap frame
 	popl	8(%esp)
-	orl	$PSL_I,(%esp)	# re-enable ints on return to user
+	orl	$PSL_I,8(%esp)	# re-enable ints on return to user
 	pushl	$7		# size of instruction for restart
 	jmp	syscall1
 IDTVEC_END(osyscall)



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

2012-10-26 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Fri Oct 26 14:46:44 UTC 2012

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

Log Message:
in osyscall, set the PSL_I bit into the correct field of the trapframe.
it was going into tf_eip instead of tf_eflags, which would sometimes
corrupt %eip and always return to user mode with interrupts disabled.
this was found with a netbsd 1.0 binary, and dsl@ points out that
this should also fix PR 41342.


To generate a diff of this commit:
cvs rdiff -u -r1.102 -r1.103 src/sys/arch/i386/i386/locore.S

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



Re: CVS commit: [tls-maxphys] src/sys/dev

2012-10-09 Thread Chuck Silvers
On Tue, Oct 09, 2012 at 11:24:13AM -0400, Thor Lancelot Simon wrote:
 On Tue, Oct 09, 2012 at 05:21:17PM +0200, Manuel Bouyer wrote:
  On Tue, Oct 09, 2012 at 11:04:20AM -0400, Thor Lancelot Simon wrote:
   Hm.
   
   This will be an attempt to transfer an entire file -- 139264 will be the
   entire file size of something, probably an executable it's paging in.
   
   I saw this before -- I can't remember what caused it -- the bad 
   chunksize
   is, I think, because it's not power-of-2.  The cause will be in the UVM
   readahead code.
  
  It is. It looks like this code is different in tls-maxphys and HEAD.
 
 Is it different in tls-maxphys-base and HEAD?  I played with this code
 quite a bit while debugging previously, I believe.
 
  I wonder if we really want to read in power-of-2 chunks here, or just
  multiple of page size. Reading the code which calls ra_startio(),
  I'm not sure why size of chunksize would be a power-of-2.
 
 I wondered that myself.  I think multiple of pagesize is probably okay,
 but -- IIRC -- I couldn't convince myself we'd always do the right thing
 with the residual.  Try it?

the underlying mechanism used by the UVM read ahead code (pgo_get / 
VOP_GETPAGES)
can handle any number of pages, not just power-of-2-sized groups of pages.
there's no reason for the read ahead code to limit itself that way.

-Chuck


Re: CVS commit: [tls-maxphys] src/sys/dev

2012-10-09 Thread Chuck Silvers
On Tue, Oct 09, 2012 at 11:50:27PM +0200, Manuel Bouyer wrote:
 On Tue, Oct 09, 2012 at 11:13:52PM +0200, Manuel Bouyer wrote:
  There is still a reference to MAXPHYS in ufs_bmaparray(), which, if I got
  it right, will limit the *runp in VOP_BMAP(), which will limit iobytes
  in genfs_do_io().
  
  but that doens't explain why I see 32k xfers. And, to make things worse,
  I see 64k if I start the big file read with debug enabled, so it looks
  timing-dependant :(
 
 OK, after fixing the issue I created in ra_startio(), and replacing the
 MAXPHYS above with mnt_maxphys, I get:
 device  read KB/tr/s   time MB/s write KB/tw/s   time MB/s
 wd0504.22129   0.9063.45   0.00  0   0.90 0.00
 
 with a 'cat big_file  /dev/null'
 writes are still limited to 64k ...

I would hope that cat'ing a file to /dev/null wouldn't result in any writes.  
:-)
I assume you meant 'cat big_file  other_file' ?

if so, then the reason for the 64k writes would be this block of code in 
ffs_write():

if (!async  oldoff  16 != uio-uio_offset  16) {
mutex_enter(vp-v_interlock);
error = VOP_PUTPAGES(vp, (oldoff  16)  16,
(uio-uio_offset  16)  16,
PGO_CLEANIT | PGO_JOURNALLOCKED | PGO_LAZY);
if (error)
break;
}


there's a similar block in many file systems at this point.  when I wrote that
I intended to replace it with something better before very long, but I just 
never
got back to it, alas.

-Chuck


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

2012-10-03 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Wed Oct  3 16:51:44 UTC 2012

Modified Files:
src/sys/arch/evbarm/iq80310: i80312_mainbus.c iq80310_intr.c
iq80310var.h

Log Message:
defer evcnt attachment correctly.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/evbarm/iq80310/i80312_mainbus.c
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/evbarm/iq80310/iq80310_intr.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/evbarm/iq80310/iq80310var.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/arch/evbarm/iq80310/i80312_mainbus.c
diff -u src/sys/arch/evbarm/iq80310/i80312_mainbus.c:1.14 src/sys/arch/evbarm/iq80310/i80312_mainbus.c:1.15
--- src/sys/arch/evbarm/iq80310/i80312_mainbus.c:1.14	Fri Jul  1 20:41:16 2011
+++ src/sys/arch/evbarm/iq80310/i80312_mainbus.c	Wed Oct  3 16:51:44 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: i80312_mainbus.c,v 1.14 2011/07/01 20:41:16 dyoung Exp $	*/
+/*	$NetBSD: i80312_mainbus.c,v 1.15 2012/10/03 16:51:44 chs Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002 Wasabi Systems, Inc.
@@ -42,7 +42,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: i80312_mainbus.c,v 1.14 2011/07/01 20:41:16 dyoung Exp $);
+__KERNEL_RCSID(0, $NetBSD: i80312_mainbus.c,v 1.15 2012/10/03 16:51:44 chs Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -98,6 +98,7 @@ i80312_mainbus_attach(struct device *par
 	psize_t memsize;
 
 	i80312_mainbus_found = 1;
+	iq80310_intr_evcnt_attach();
 
 	/*
 	 * Fill in the space tag for the i80312's own devices,

Index: src/sys/arch/evbarm/iq80310/iq80310_intr.c
diff -u src/sys/arch/evbarm/iq80310/iq80310_intr.c:1.31 src/sys/arch/evbarm/iq80310/iq80310_intr.c:1.32
--- src/sys/arch/evbarm/iq80310/iq80310_intr.c:1.31	Tue Aug 14 15:46:21 2012
+++ src/sys/arch/evbarm/iq80310/iq80310_intr.c	Wed Oct  3 16:51:44 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: iq80310_intr.c,v 1.31 2012/08/14 15:46:21 chs Exp $	*/
+/*	$NetBSD: iq80310_intr.c,v 1.32 2012/10/03 16:51:44 chs Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: iq80310_intr.c,v 1.31 2012/08/14 15:46:21 chs Exp $);
+__KERNEL_RCSID(0, $NetBSD: iq80310_intr.c,v 1.32 2012/10/03 16:51:44 chs Exp $);
 
 #ifndef EVBARM_SPL_NOINLINE
 #define	EVBARM_SPL_NOINLINE
@@ -350,6 +350,19 @@ iq80310_intr_init(void)
 	enable_interrupts(I32_bit);
 }
 
+void
+iq80310_intr_evcnt_attach(void)
+{
+	struct intrq *iq;
+	int i;
+
+	for (i = 0; i  NIRQ; i++) {
+		iq = intrq[i];
+		evcnt_attach_dynamic(iq-iq_ev, EVCNT_TYPE_INTR,
+		NULL, iq80310, iq-iq_name);
+	}
+}
+
 void *
 iq80310_intr_establish(int irq, int ipl, int (*func)(void *), void *arg)
 {
@@ -377,8 +390,6 @@ iq80310_intr_establish(int irq, int ipl,
 	oldirqstate = disable_interrupts(I32_bit);
 
 	TAILQ_INSERT_TAIL(iq-iq_list, ih, ih_list);
-	evcnt_attach_dynamic(iq-iq_ev, EVCNT_TYPE_INTR,
-	NULL, iq80310, iq-iq_name);
 
 	iq80310_intr_calculate_masks();
 

Index: src/sys/arch/evbarm/iq80310/iq80310var.h
diff -u src/sys/arch/evbarm/iq80310/iq80310var.h:1.7 src/sys/arch/evbarm/iq80310/iq80310var.h:1.8
--- src/sys/arch/evbarm/iq80310/iq80310var.h:1.7	Tue Oct  8 17:39:17 2002
+++ src/sys/arch/evbarm/iq80310/iq80310var.h	Wed Oct  3 16:51:44 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: iq80310var.h,v 1.7 2002/10/08 17:39:17 thorpej Exp $	*/
+/*	$NetBSD: iq80310var.h,v 1.8 2012/10/03 16:51:44 chs Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002 Wasabi Systems, Inc.
@@ -94,6 +94,7 @@ void	iq80310_7seg_snake(void);
 void	iq80310_pci_init(pci_chipset_tag_t, void *);
 
 void	iq80310_intr_init(void);
+void	iq80310_intr_evcnt_attach(void);
 void	*iq80310_intr_establish(int, int, int (*)(void *), void *);
 void	iq80310_intr_disestablish(void *);
 



CVS commit: src/sys/arch/x86/x86

2012-10-03 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Wed Oct  3 17:04:25 UTC 2012

Modified Files:
src/sys/arch/x86/x86: mpacpi.c

Log Message:
as a workaround for PR 47016, call ioapic_reenable() at the end of
ACPI interrupt routing to fix the settings for the SCI interrupt.
the problem is that after my recent changes, the SCI handler is
installed before the MADT info is parsed, so we don't know what
polarity it should have.  the real fix for this will be to rearrange
the ACPI initialization so that everything is done in a more sensible
order, but that will take some more time.


To generate a diff of this commit:
cvs rdiff -u -r1.95 -r1.96 src/sys/arch/x86/x86/mpacpi.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/x86/x86/mpacpi.c
diff -u src/sys/arch/x86/x86/mpacpi.c:1.95 src/sys/arch/x86/x86/mpacpi.c:1.96
--- src/sys/arch/x86/x86/mpacpi.c:1.95	Sun Sep 23 00:31:05 2012
+++ src/sys/arch/x86/x86/mpacpi.c	Wed Oct  3 17:04:25 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: mpacpi.c,v 1.95 2012/09/23 00:31:05 chs Exp $	*/
+/*	$NetBSD: mpacpi.c,v 1.96 2012/10/03 17:04:25 chs Exp $	*/
 
 /*
  * Copyright (c) 2003 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: mpacpi.c,v 1.95 2012/09/23 00:31:05 chs Exp $);
+__KERNEL_RCSID(0, $NetBSD: mpacpi.c,v 1.96 2012/10/03 17:04:25 chs Exp $);
 
 #include acpica.h
 #include opt_acpi.h
@@ -942,6 +942,13 @@ mpacpi_find_interrupts(void *self)
 		printf(mpacpi: %d PCI busses\n, mpacpi_npci);
 #endif
 	mpacpi_config_irouting(acpi);
+#if NIOAPIC  0
+	/*
+	 * XXX fix up the SCI interrupt polarity.
+	 * it's installed before we have parsed the MADT.
+	 */
+	ioapic_reenable();
+#endif
 	if (mp_verbose)
 		for (i = 0; i  mp_nintr; i++)
 			mpacpi_print_intr(mp_intrs[i]);



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

2012-10-03 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Wed Oct  3 16:51:44 UTC 2012

Modified Files:
src/sys/arch/evbarm/iq80310: i80312_mainbus.c iq80310_intr.c
iq80310var.h

Log Message:
defer evcnt attachment correctly.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/evbarm/iq80310/i80312_mainbus.c
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/evbarm/iq80310/iq80310_intr.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/evbarm/iq80310/iq80310var.h

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



CVS commit: src/sys/arch/x86/x86

2012-10-03 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Wed Oct  3 17:04:25 UTC 2012

Modified Files:
src/sys/arch/x86/x86: mpacpi.c

Log Message:
as a workaround for PR 47016, call ioapic_reenable() at the end of
ACPI interrupt routing to fix the settings for the SCI interrupt.
the problem is that after my recent changes, the SCI handler is
installed before the MADT info is parsed, so we don't know what
polarity it should have.  the real fix for this will be to rearrange
the ACPI initialization so that everything is done in a more sensible
order, but that will take some more time.


To generate a diff of this commit:
cvs rdiff -u -r1.95 -r1.96 src/sys/arch/x86/x86/mpacpi.c

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



CVS commit: src/sys/external/bsd/drm/dist/bsd-core

2012-09-29 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Sat Sep 29 14:19:43 UTC 2012

Modified Files:
src/sys/external/bsd/drm/dist/bsd-core: drm_sysctl.c

Log Message:
fix the DRM string sysctls to use copyout() instead of strcat()
to deliver the data to the user buffer.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/external/bsd/drm/dist/bsd-core/drm_sysctl.c

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



CVS commit: src/sys/dev/acpi

2012-09-22 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Sun Sep 23 00:26:26 UTC 2012

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

Log Message:
re-enable the code to disable link devices at startup, ie. revert rev 1.3.
this fixes PCI interrupts on some systems (eg. HP XW9400) and we suspect that
the problems which led to the original change were caused by buggy early
implementations of ACPI, which are now ignored by date.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/dev/acpi/acpi_pci_link.c

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

Modified files:

Index: src/sys/dev/acpi/acpi_pci_link.c
diff -u src/sys/dev/acpi/acpi_pci_link.c:1.18 src/sys/dev/acpi/acpi_pci_link.c:1.19
--- src/sys/dev/acpi/acpi_pci_link.c:1.18	Fri Apr 23 15:52:26 2010
+++ src/sys/dev/acpi/acpi_pci_link.c	Sun Sep 23 00:26:25 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: acpi_pci_link.c,v 1.18 2010/04/23 15:52:26 jruoho Exp $	*/
+/*	$NetBSD: acpi_pci_link.c,v 1.19 2012/09/23 00:26:25 chs Exp $	*/
 
 /*-
  * Copyright (c) 2002 Mitsuru IWASAKI iwas...@jp.freebsd.org
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: acpi_pci_link.c,v 1.18 2010/04/23 15:52:26 jruoho Exp $);
+__KERNEL_RCSID(0, $NetBSD: acpi_pci_link.c,v 1.19 2012/09/23 00:26:25 chs Exp $);
 
 #include sys/param.h
 #include sys/malloc.h
@@ -533,13 +533,11 @@ acpi_pci_link_attach(struct acpi_pci_lin
 	 * run _DIS (i.e., the method doesn't exist), assume the initial
 	 * IRQ was routed by the BIOS.
 	 */
-#if 0	/* XXX causes spontaneaous resets on some systems. Disabled for now. */
 	if (ACPI_SUCCESS(AcpiEvaluateObject(sc-pl_handle, _DIS, NULL,
 	NULL)))
 		for (i = 0; i  sc-pl_num_links; i++)
 			sc-pl_links[i].l_irq = PCI_INVALID_IRQ;
 	else
-#endif
 		for (i = 0; i  sc-pl_num_links; i++)
 			if (PCI_INTERRUPT_VALID(sc-pl_links[i].l_irq))
 sc-pl_links[i].l_routed = TRUE;



CVS commit: src/sys

2012-09-22 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Sun Sep 23 00:31:06 UTC 2012

Modified Files:
src/sys/arch/ia64/acpi: acpi_machdep.c
src/sys/arch/ia64/include: acpi_machdep.h
src/sys/arch/x86/acpi: acpi_machdep.c
src/sys/arch/x86/include: acpi_machdep.h
src/sys/arch/x86/x86: mpacpi.c
src/sys/dev/acpi: acpi.c

Log Message:
locate PCI buses and determine their bus numbers using the info
previously extracted from ACPICA rather than trying to figure it out again.
allow PCI buses that don't have a _PRT method.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/ia64/acpi/acpi_machdep.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/ia64/include/acpi_machdep.h
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/x86/acpi/acpi_machdep.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/x86/include/acpi_machdep.h
cvs rdiff -u -r1.94 -r1.95 src/sys/arch/x86/x86/mpacpi.c
cvs rdiff -u -r1.254 -r1.255 src/sys/dev/acpi/acpi.c

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

Modified files:

Index: src/sys/arch/ia64/acpi/acpi_machdep.c
diff -u src/sys/arch/ia64/acpi/acpi_machdep.c:1.5 src/sys/arch/ia64/acpi/acpi_machdep.c:1.6
--- src/sys/arch/ia64/acpi/acpi_machdep.c:1.5	Sun Jun 12 11:31:30 2011
+++ src/sys/arch/ia64/acpi/acpi_machdep.c	Sun Sep 23 00:31:05 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: acpi_machdep.c,v 1.5 2011/06/12 11:31:30 jruoho Exp $	*/
+/*	$NetBSD: acpi_machdep.c,v 1.6 2012/09/23 00:31:05 chs Exp $	*/
 /*
  * Copyright (c) 2009 KIYOHARA Takashi
  * All rights reserved.
@@ -28,7 +28,7 @@
  * Machine-dependent routines for ACPICA.
  */
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: acpi_machdep.c,v 1.5 2011/06/12 11:31:30 jruoho Exp $);
+__KERNEL_RCSID(0, $NetBSD: acpi_machdep.c,v 1.6 2012/09/23 00:31:05 chs Exp $);
 
 #include sys/param.h
 
@@ -189,7 +189,7 @@ acpi_md_ncpus(void)
 }
 
 void
-acpi_md_callback(void)
+acpi_md_callback(struct acpi_softc *sc)
 {
 	/* Nothing. */
 }

Index: src/sys/arch/ia64/include/acpi_machdep.h
diff -u src/sys/arch/ia64/include/acpi_machdep.h:1.5 src/sys/arch/ia64/include/acpi_machdep.h:1.6
--- src/sys/arch/ia64/include/acpi_machdep.h:1.5	Sun Jun 12 11:31:30 2011
+++ src/sys/arch/ia64/include/acpi_machdep.h	Sun Sep 23 00:31:05 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: acpi_machdep.h,v 1.5 2011/06/12 11:31:30 jruoho Exp $	*/
+/*	$NetBSD: acpi_machdep.h,v 1.6 2012/09/23 00:31:05 chs Exp $	*/
 
 ACPI_STATUS		acpi_md_OsInitialize(void);
 ACPI_PHYSICAL_ADDRESS	acpi_md_OsGetRootPointer(void);
@@ -28,4 +28,5 @@ void		acpi_md_OsDisableInterrupt(void);
 int		acpi_md_sleep(int);
 uint32_t	acpi_md_pdc(void);
 uint32_t	acpi_md_ncpus(void);
-void		acpi_md_callback(void);
+struct acpi_softc;
+void		acpi_md_callback(struct acpi_softc *);

Index: src/sys/arch/x86/acpi/acpi_machdep.c
diff -u src/sys/arch/x86/acpi/acpi_machdep.c:1.3 src/sys/arch/x86/acpi/acpi_machdep.c:1.4
--- src/sys/arch/x86/acpi/acpi_machdep.c:1.3	Mon Jan 30 21:47:24 2012
+++ src/sys/arch/x86/acpi/acpi_machdep.c	Sun Sep 23 00:31:05 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_machdep.c,v 1.3 2012/01/30 21:47:24 rmind Exp $ */
+/* $NetBSD: acpi_machdep.c,v 1.4 2012/09/23 00:31:05 chs Exp $ */
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -40,7 +40,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: acpi_machdep.c,v 1.3 2012/01/30 21:47:24 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: acpi_machdep.c,v 1.4 2012/09/23 00:31:05 chs Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -283,12 +283,12 @@ acpi_md_ncpus(void)
 }
 
 void
-acpi_md_callback(void)
+acpi_md_callback(struct acpi_softc *sc)
 {
 #ifdef MPBIOS
 	if (!mpbios_scanned)
 #endif
-	mpacpi_find_interrupts(acpi_softc);
+	mpacpi_find_interrupts(sc);
 
 #ifndef XEN
 	acpi_md_sleep_init();

Index: src/sys/arch/x86/include/acpi_machdep.h
diff -u src/sys/arch/x86/include/acpi_machdep.h:1.10 src/sys/arch/x86/include/acpi_machdep.h:1.11
--- src/sys/arch/x86/include/acpi_machdep.h:1.10	Sun Jun 12 11:31:31 2011
+++ src/sys/arch/x86/include/acpi_machdep.h	Sun Sep 23 00:31:05 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: acpi_machdep.h,v 1.10 2011/06/12 11:31:31 jruoho Exp $	*/
+/*	$NetBSD: acpi_machdep.h,v 1.11 2012/09/23 00:31:05 chs Exp $	*/
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -75,6 +75,7 @@ void		acpi_md_sleep_init(void);
 
 uint32_t	acpi_md_pdc(void);
 uint32_t	acpi_md_ncpus(void);
-void		acpi_md_callback(void);
+struct acpi_softc;
+void		acpi_md_callback(struct acpi_softc *);
 
 #endif /* !_X86_ACPI_MACHDEP_H_ */

Index: src/sys/arch/x86/x86/mpacpi.c
diff -u src/sys/arch/x86/x86/mpacpi.c:1.94 src/sys/arch/x86/x86/mpacpi.c:1.95
--- src/sys/arch/x86/x86/mpacpi.c:1.94	Fri Apr 27 04:32:27 2012
+++ src/sys/arch/x86/x86/mpacpi.c	Sun Sep 23 00:31:05 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: mpacpi.c,v 1.94 2012/04/27 04:32:27 jruoho Exp $	*/
+/*	$NetBSD: mpacpi.c,v 1.95 2012/09/23 00:31:05 chs Exp $	*/
 
 /*
  * Copyright (c) 2003 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 

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

2012-09-22 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Sun Sep 23 01:01:18 UTC 2012

Modified Files:
src/sys/arch/i386/conf: kern.ldscript kern.ldscript.4MB
kern.ldscript.Xen

Log Message:
sync ldscripts; add cacheline_aligned and read_mostly handling
to the non-default ones.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/i386/conf/kern.ldscript
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/i386/conf/kern.ldscript.4MB
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/i386/conf/kern.ldscript.Xen

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

Modified files:

Index: src/sys/arch/i386/conf/kern.ldscript
diff -u src/sys/arch/i386/conf/kern.ldscript:1.8 src/sys/arch/i386/conf/kern.ldscript:1.9
--- src/sys/arch/i386/conf/kern.ldscript:1.8	Tue Jun  1 22:13:30 2010
+++ src/sys/arch/i386/conf/kern.ldscript	Sun Sep 23 01:01:17 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern.ldscript,v 1.8 2010/06/01 22:13:30 mjf Exp $	*/
+/*	$NetBSD: kern.ldscript,v 1.9 2012/09/23 01:01:17 chs Exp $	*/
 
 OUTPUT_FORMAT(elf32-i386, elf32-i386,
 	  elf32-i386)
@@ -23,7 +23,7 @@ SECTIONS
  *(.rodata)
  *(.rodata.*)
}
- 
+
/* Adjust the address for the data segment.  We want to adjust up to
   the same address within the page on the next page up.  */
. = ALIGN(0x1000) + (.  (0x1000 - 1));
@@ -39,7 +39,6 @@ SECTIONS
{
  *(.data.cacheline_aligned)
}
-
. = ALIGN(64);	/* COHERENCY_UNIT */
.data.read_mostly :
AT (LOADADDR(.text) + (ADDR(.data.read_mostly) - ADDR(.text)))

Index: src/sys/arch/i386/conf/kern.ldscript.4MB
diff -u src/sys/arch/i386/conf/kern.ldscript.4MB:1.9 src/sys/arch/i386/conf/kern.ldscript.4MB:1.10
--- src/sys/arch/i386/conf/kern.ldscript.4MB:1.9	Thu Oct 18 15:28:34 2007
+++ src/sys/arch/i386/conf/kern.ldscript.4MB	Sun Sep 23 01:01:17 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern.ldscript.4MB,v 1.9 2007/10/18 15:28:34 yamt Exp $	*/
+/*	$NetBSD: kern.ldscript.4MB,v 1.10 2012/09/23 01:01:17 chs Exp $	*/
 
 OUTPUT_FORMAT(elf32-i386, elf32-i386,
 	  elf32-i386)
@@ -33,8 +33,20 @@ SECTIONS
AT (LOADADDR(.text) + (ADDR(.data) - ADDR(.text)))
{
  *(.data)
- *(.data.*)
}
+   . = ALIGN(64);	/* COHERENCY_UNIT */
+   .data.cacheline_aligned :
+   AT (LOADADDR(.text) + (ADDR(.data.cacheline_aligned) - ADDR(.text)))
+   {
+ *(.data.cacheline_aligned)
+   }
+   . = ALIGN(64);	/* COHERENCY_UNIT */
+   .data.read_mostly :
+   AT (LOADADDR(.text) + (ADDR(.data.read_mostly) - ADDR(.text)))
+   {
+ *(.data.read_mostly)
+   }
+   . = ALIGN(64);	/* COHERENCY_UNIT */
_edata = . ;
PROVIDE (edata = .) ;
__bss_start = . ;

Index: src/sys/arch/i386/conf/kern.ldscript.Xen
diff -u src/sys/arch/i386/conf/kern.ldscript.Xen:1.3 src/sys/arch/i386/conf/kern.ldscript.Xen:1.4
--- src/sys/arch/i386/conf/kern.ldscript.Xen:1.3	Thu Oct 18 15:28:34 2007
+++ src/sys/arch/i386/conf/kern.ldscript.Xen	Sun Sep 23 01:01:17 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern.ldscript.Xen,v 1.3 2007/10/18 15:28:34 yamt Exp $	*/
+/*	$NetBSD: kern.ldscript.Xen,v 1.4 2012/09/23 01:01:17 chs Exp $	*/
 
 OUTPUT_FORMAT(elf32-i386, elf32-i386,
 	  elf32-i386)
@@ -28,8 +28,20 @@ SECTIONS
.data :
{
  *(.data)
- *(.data.*)
}
+   . = ALIGN(64);	/* COHERENCY_UNIT */
+   .data.cacheline_aligned :
+   AT (LOADADDR(.text) + (ADDR(.data.cacheline_aligned) - ADDR(.text)))
+   {
+ *(.data.cacheline_aligned)
+   }
+   . = ALIGN(64);	/* COHERENCY_UNIT */
+   .data.read_mostly :
+   AT (LOADADDR(.text) + (ADDR(.data.read_mostly) - ADDR(.text)))
+   {
+ *(.data.read_mostly)
+   }
+   . = ALIGN(64);	/* COHERENCY_UNIT */
_edata = . ;
PROVIDE (edata = .) ;
__bss_start = . ;



CVS commit: src/sys/dev/pci

2012-09-22 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Sun Sep 23 01:09:10 UTC 2012

Modified Files:
src/sys/dev/pci: pcidevs

Log Message:
add a bunch of devices.


To generate a diff of this commit:
cvs rdiff -u -r1.1136 -r1.1137 src/sys/dev/pci/pcidevs

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

Modified files:

Index: src/sys/dev/pci/pcidevs
diff -u src/sys/dev/pci/pcidevs:1.1136 src/sys/dev/pci/pcidevs:1.1137
--- src/sys/dev/pci/pcidevs:1.1136	Tue Sep 18 05:08:10 2012
+++ src/sys/dev/pci/pcidevs	Sun Sep 23 01:09:10 2012
@@ -1,4 +1,4 @@
-$NetBSD: pcidevs,v 1.1136 2012/09/18 05:08:10 matt Exp $
+$NetBSD: pcidevs,v 1.1137 2012/09/23 01:09:10 chs Exp $
 
 /*
  * Copyright (c) 1995, 1996 Christopher G. Demetriou
@@ -544,6 +544,7 @@ vendor ADMTEK		0x1317	ADMtek
 vendor PACKETENGINES	0x1318	Packet Engines
 vendor FORTEMEDIA	0x1319	Forte Media
 vendor SIIG		0x131f	Siig
+vendor MICROMEMORY	0x1332	Micro Memory
 vendor DOMEX		0x134a	Domex
 vendor QUATECH		0x135c	Quatech
 vendor LMC		0x1376	LAN Media
@@ -551,10 +552,12 @@ vendor NETGEAR		0x1385	Netgear
 vendor MOXA		0x1393	Moxa Technologies
 vendor LEVELONE		0x1394	Level One
 vendor COLOGNECHIP	0x1397	Cologne Chip Designs
+vendor ALACRITECH	0x139a	Alacritech
 vendor HIFN		0x13a3	Hifn
 vendor EXAR		0x13a8	EXAR
 vendor 3WARE		0x13c1	3ware
 vendor ABOCOM		0x13d1	AboCom Systems
+vendor PHOBOS		0x13d8	Phobos
 vendor NETBOOST		0x13dc	NetBoost
 vendor SUNDANCETI	0x13f0	Sundance Technology
 vendor CMEDIA		0x13f6	C-Media Electronics
@@ -602,6 +605,7 @@ vendor ATHEROS		0x168c	Atheros Communica
 vendor GLOBALSUN	0x16ab	Global Sun Tech
 vendor SAFENET		0x16ae	SafeNet
 vendor MICREL		0x16c6	Micrel
+vendor NETOCTAVE	0x170b	Netoctave
 vendor LINKSYS		0x1737	Linksys
 vendor ALTIMA		0x173b	Altima
 vendor ANTARES		0x1754	Antares Microsystems
@@ -803,6 +807,7 @@ product ALI M1533	0x1533	M1533 PCI-ISA B
 product ALI M1541	0x1541	M1541 Host-PCI Bridge
 product ALI M1543	0x1543	M1543 PCI-ISA Bridge
 product ALI M1563	0x1563	M1563 PCI-ISA Bridge
+product ALI M1647	0x1647	M1647 Host-PCI Bridge
 product ALI M1689	0x1689	M1689 Host-PCI Bridge
 product ALI M3309	0x3309	M3309 MPEG Decoder
 product ALI M4803	0x5215	M4803
@@ -811,6 +816,7 @@ product ALI M5229	0x5229	M5229 UDMA IDE 
 product ALI M5237	0x5237	M5237 USB 1.1 Host Controller
 product ALI M5239	0x5239	M5239 USB 2.0 Host Controller
 product ALI M5243	0x5243	M5243 PCI-AGP Bridge
+product ALI M5247	0x5247	M5247 PCI-AGP Bridge
 product ALI M5249	0x5249	M5249 Hypertransport to PCI Bridge
 product ALI M5261	0x5261	M5261 Tulip Ethernet Controller
 product ALI M5288	0x5288	M5288 SATA/Raid Controller
@@ -820,6 +826,7 @@ product ALI M5455	0x5455	M5455 AC-Link C
 product ALI M7101	0x7101	M7101 Power Management Controller
 
 /* Adaptec products */
+product ADP AIC1160	0x1160	AIC-1160
 product ADP AIC7850	0x5078	AIC-7850
 product ADP AIC7855	0x5578	AIC-7855
 product ADP AIC5900	0x5900	AIC-5900 ATM
@@ -865,6 +872,8 @@ product ADP2 ASR2200S_SUB2M	0x0287	ASR-2
 product ADP2 ASR2410SA		0x0290	ASR-2410SA
 product ADP2 AAR2810SA		0x0292	AAR-2810SA
 product ADP2 3405		0x02bb	RAID 3405
+product ADP2 3805		0x02bc	RAID 3805
+product ADP2 2405		0x02d5	RAID 2405
 product ADP2 AAC364		0x0364	AAC-364
 product ADP2 ASR5400S		0x0365	ASR-5400S
 product ADP2 PERC_2QC		0x1364	Dell PERC 2/QC
@@ -904,6 +913,9 @@ product AIRONET MPI350		0xa504	MPI350 Mi
 product AIRONET PC4500		0x4500	PC4500 Wireless LAN Adapter
 product AIRONET PC4800		0x4800	PC4800 Wireless LAN Adapter
 
+/* Alacritech products */
+product ALACRITECH SES1001T	0x0005	SES1001T iSCSI Accelerator
+
 /* Alliance products */
 product ALLIANCE AT24	0x6424	AT24
 product ALLIANCE AT25	0x643d	AT25
@@ -1040,6 +1052,7 @@ product AMI MEGARAID2		0x9060	MegaRAID 2
 product AMI MEGARAID3		0x1960	MegaRAID 3
 
 /* Analog Devices products */
+product ANALOG AD1889	0x1889	AD1889 PCI SoundMAX Controller
 product ANALOG SAFENET	0x2f44	SafeNet Crypto Accelerator ADSP-2141
 
 /* Antares Microsystems products */
@@ -1357,6 +1370,7 @@ product ATI RAGE24XPCI		0x534b	Rage 128 
 product ATI RAGE24XA2X		0x534c	Rage 128 4x AGP 2x
 product ATI RAGE24XA4X		0x534d	Rage 128 4x AGP 4x
 product ATI RAGE24X		0x534e	Rage 128 4x
+product ATI RAGE128PROULTRATF	0x5446	Rage 128 Pro Ultra TF AGP
 product ATI RADEON_RV370_5460	0x5460	Radeon Mobility M300 (M22) 5460
 product ATI RADEON_RV370_5464	0x5464	FireGL M22 GL 5464
 product ATI RADEON_R423_UH	0x5548	Radeon X800 (R423) UH
@@ -1438,10 +1452,15 @@ product ATI RADEON_X850XT_S	0x5d72	Radeo
 product ATI RADEON_X700		0x5e4b	Radeon X700 Pro
 product ATI RADEON_X700_S	0x5e6b	Radeon X700 Pro Secondary
 product ATI RADEON_HD5870	0x6898	Radeon HD 5870 Cypress
-product ATI RADEON_HD5600_RD	0x68c1	Redwood
+product ATI RADEON_HD5600_RD	0x68c1	Radeon HD 5600 Redwood
+product ATI RADEON_HD5450	0x68f9	Radeon HD 5450
 product ATI RADEON_X1300	0x7146	Radeon X1300 Series (RV515)
 product ATI RADEON_X1300_S	0x7166	Radeon X1300 

CVS commit: src/sys/dev/pci

2012-09-22 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Sun Sep 23 01:10:10 UTC 2012

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

Log Message:
add an entry for subclass HD audio.


To generate a diff of this commit:
cvs rdiff -u -r1.92 -r1.93 src/sys/dev/pci/pci_subr.c

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

Modified files:

Index: src/sys/dev/pci/pci_subr.c
diff -u src/sys/dev/pci/pci_subr.c:1.92 src/sys/dev/pci/pci_subr.c:1.93
--- src/sys/dev/pci/pci_subr.c:1.92	Tue Apr 24 09:53:41 2012
+++ src/sys/dev/pci/pci_subr.c	Sun Sep 23 01:10:10 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: pci_subr.c,v 1.92 2012/04/24 09:53:41 drochner Exp $	*/
+/*	$NetBSD: pci_subr.c,v 1.93 2012/09/23 01:10:10 chs Exp $	*/
 
 /*
  * Copyright (c) 1997 Zubin D. Dittia.  All rights reserved.
@@ -40,7 +40,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pci_subr.c,v 1.92 2012/04/24 09:53:41 drochner Exp $);
+__KERNEL_RCSID(0, $NetBSD: pci_subr.c,v 1.93 2012/09/23 01:10:10 chs Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_pci.h
@@ -118,6 +118,7 @@ static const struct pci_class pci_subcla
 	{ video,		PCI_SUBCLASS_MULTIMEDIA_VIDEO,	NULL,	},
 	{ audio,		PCI_SUBCLASS_MULTIMEDIA_AUDIO,	NULL,	},
 	{ telephony,		PCI_SUBCLASS_MULTIMEDIA_TELEPHONY, NULL,},
+	{ HD audio,		PCI_SUBCLASS_MULTIMEDIA_HDAUDIO, NULL,	},
 	{ miscellaneous,	PCI_SUBCLASS_MULTIMEDIA_MISC,	NULL,	},
 	{ NULL,			0,NULL,	},
 };



CVS commit: src/sys/dev/pci

2012-09-22 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Sun Sep 23 01:10:59 UTC 2012

Modified Files:
src/sys/dev/pci: aac_pci.c if_an_pci.c if_sip.c if_tlp_pci.c

Log Message:
match some more devices.


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/sys/dev/pci/aac_pci.c \
src/sys/dev/pci/if_an_pci.c
cvs rdiff -u -r1.154 -r1.155 src/sys/dev/pci/if_sip.c
cvs rdiff -u -r1.121 -r1.122 src/sys/dev/pci/if_tlp_pci.c

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

Modified files:

Index: src/sys/dev/pci/aac_pci.c
diff -u src/sys/dev/pci/aac_pci.c:1.33 src/sys/dev/pci/aac_pci.c:1.34
--- src/sys/dev/pci/aac_pci.c:1.33	Thu Sep 29 12:51:28 2011
+++ src/sys/dev/pci/aac_pci.c	Sun Sep 23 01:10:59 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: aac_pci.c,v 1.33 2011/09/29 12:51:28 is Exp $	*/
+/*	$NetBSD: aac_pci.c,v 1.34 2012/09/23 01:10:59 chs Exp $	*/
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -65,7 +65,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: aac_pci.c,v 1.33 2011/09/29 12:51:28 is Exp $);
+__KERNEL_RCSID(0, $NetBSD: aac_pci.c,v 1.34 2012/09/23 01:10:59 chs Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -356,11 +356,27 @@ static struct aac_ident {
 	{	PCI_VENDOR_ADP2,
 		PCI_PRODUCT_ADP2_ASR2200S,
 		PCI_VENDOR_ADP2,
+		PCI_PRODUCT_ADP2_2405,
+		AAC_HWIF_I960RX,
+		0,
+		Adaptec RAID 2405
+	},
+	{	PCI_VENDOR_ADP2,
+		PCI_PRODUCT_ADP2_ASR2200S,
+		PCI_VENDOR_ADP2,
 		PCI_PRODUCT_ADP2_3405,
 		AAC_HWIF_I960RX,
 		0,
 		Adaptec RAID 3405
 	},
+	{	PCI_VENDOR_ADP2,
+		PCI_PRODUCT_ADP2_ASR2200S,
+		PCI_VENDOR_ADP2,
+		PCI_PRODUCT_ADP2_3805,
+		AAC_HWIF_I960RX,
+		0,
+		Adaptec RAID 3805
+	},
 	{
 		PCI_VENDOR_DEC,
 		PCI_PRODUCT_DEC_21554,
Index: src/sys/dev/pci/if_an_pci.c
diff -u src/sys/dev/pci/if_an_pci.c:1.33 src/sys/dev/pci/if_an_pci.c:1.34
--- src/sys/dev/pci/if_an_pci.c:1.33	Mon Jan 30 19:41:19 2012
+++ src/sys/dev/pci/if_an_pci.c	Sun Sep 23 01:10:59 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_an_pci.c,v 1.33 2012/01/30 19:41:19 drochner Exp $	*/
+/*	$NetBSD: if_an_pci.c,v 1.34 2012/09/23 01:10:59 chs Exp $	*/
 
 /*
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_an_pci.c,v 1.33 2012/01/30 19:41:19 drochner Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_an_pci.c,v 1.34 2012/09/23 01:10:59 chs Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -95,6 +95,7 @@ static const struct an_pci_product {
 	{ PCI_VENDOR_AIRONET,		PCI_PRODUCT_AIRONET_PC4500 },
 	{ PCI_VENDOR_AIRONET,		PCI_PRODUCT_AIRONET_PC4800 },
 	{ PCI_VENDOR_AIRONET,		PCI_PRODUCT_AIRONET_PCI350 },
+	{ PCI_VENDOR_AIRONET,		PCI_PRODUCT_AIRONET_MPI350 },
 	{ 0,0			   }
 };
 

Index: src/sys/dev/pci/if_sip.c
diff -u src/sys/dev/pci/if_sip.c:1.154 src/sys/dev/pci/if_sip.c:1.155
--- src/sys/dev/pci/if_sip.c:1.154	Sun Jul 22 14:33:03 2012
+++ src/sys/dev/pci/if_sip.c	Sun Sep 23 01:10:59 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_sip.c,v 1.154 2012/07/22 14:33:03 matt Exp $	*/
+/*	$NetBSD: if_sip.c,v 1.155 2012/09/23 01:10:59 chs Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -73,7 +73,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_sip.c,v 1.154 2012/07/22 14:33:03 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_sip.c,v 1.155 2012/09/23 01:10:59 chs Exp $);
 
 
 
@@ -737,10 +737,13 @@ sipcom_check_64bit(const struct pci_atta
 		/* Accton EN1407-T, Planex GN-1000TE */
 		{ 0x1113,	0x1407 },
 
-		/* Netgear GA-621 */
+		/* Netgear GA621 */
 		{ 0x1385,	0x621a },
 
-		/* SMC EZ Card */
+		/* Netgear GA622 */
+		{ 0x1385,	0x622a },
+
+		/* SMC EZ Card 1000 (9462TX) */
 		{ 0x10b8,	0x9462 },
 
 		{ 0, 0}

Index: src/sys/dev/pci/if_tlp_pci.c
diff -u src/sys/dev/pci/if_tlp_pci.c:1.121 src/sys/dev/pci/if_tlp_pci.c:1.122
--- src/sys/dev/pci/if_tlp_pci.c:1.121	Fri Nov 11 23:01:59 2011
+++ src/sys/dev/pci/if_tlp_pci.c	Sun Sep 23 01:10:59 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_tlp_pci.c,v 1.121 2011/11/11 23:01:59 jakllsch Exp $	*/
+/*	$NetBSD: if_tlp_pci.c,v 1.122 2012/09/23 01:10:59 chs Exp $	*/
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2002 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_tlp_pci.c,v 1.121 2011/11/11 23:01:59 jakllsch Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_tlp_pci.c,v 1.122 2012/09/23 01:10:59 chs Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -1544,6 +1544,13 @@ tlp_pci_adaptec_quirks(struct tulip_pci_
 			sc-sc_mediasw = tlp_cogent_em1x0_mediasw;
 			break;
 
+		case 0x13:
+			strcpy(psc-sc_tulip.sc_name, Cogent ???);
+ 			sc-sc_mediasw = tlp_cogent_em1x0_mediasw;
+			psc-sc_flags |= TULIP_PCI_SHAREDINTR |
+			TULIP_PCI_SHAREDROM;
+			break;
+
 		case 0x15:
 			strcpy(psc-sc_tulip.sc_name, Cogent EM100FX);
 			sc-sc_mediasw = tlp_cogent_em1x0_mediasw;



CVS commit: src/sys/dev/pci

2012-09-22 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Sun Sep 23 01:11:14 UTC 2012

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

Log Message:
fix a debug printf.


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/sys/dev/pci/if_gem_pci.c

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

Modified files:

Index: src/sys/dev/pci/if_gem_pci.c
diff -u src/sys/dev/pci/if_gem_pci.c:1.44 src/sys/dev/pci/if_gem_pci.c:1.45
--- src/sys/dev/pci/if_gem_pci.c:1.44	Mon Jan 30 19:41:20 2012
+++ src/sys/dev/pci/if_gem_pci.c	Sun Sep 23 01:11:14 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_gem_pci.c,v 1.44 2012/01/30 19:41:20 drochner Exp $ */
+/*	$NetBSD: if_gem_pci.c,v 1.45 2012/09/23 01:11:14 chs Exp $ */
 
 /*
  *
@@ -34,7 +34,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_gem_pci.c,v 1.44 2012/01/30 19:41:20 drochner Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_gem_pci.c,v 1.45 2012/09/23 01:11:14 chs Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -276,7 +276,7 @@ gem_pci_attach(device_t parent, device_t
 			}
 #ifdef GEM_DEBUG
 			/* PROM dump */
-			printf(%s: PROM dump (0x to %04lx)\n, device_xname(sc-sc_dev),
+			printf(%s: PROM dump (0x to %04zx)\n, device_xname(sc-sc_dev),
 			(sizeof buf) - 1);
 			i = 0;
 			j = 0;



CVS commit: src/sys/dev/pci

2012-09-22 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Sun Sep 23 01:12:01 UTC 2012

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

Log Message:
use 64-bit DMA where possible.


To generate a diff of this commit:
cvs rdiff -u -r1.56 -r1.57 src/sys/dev/pci/if_nfe.c

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

Modified files:

Index: src/sys/dev/pci/if_nfe.c
diff -u src/sys/dev/pci/if_nfe.c:1.56 src/sys/dev/pci/if_nfe.c:1.57
--- src/sys/dev/pci/if_nfe.c:1.56	Sun Jul 22 14:33:03 2012
+++ src/sys/dev/pci/if_nfe.c	Sun Sep 23 01:12:01 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_nfe.c,v 1.56 2012/07/22 14:33:03 matt Exp $	*/
+/*	$NetBSD: if_nfe.c,v 1.57 2012/09/23 01:12:01 chs Exp $	*/
 /*	$OpenBSD: if_nfe.c,v 1.77 2008/02/05 16:52:50 brad Exp $	*/
 
 /*-
@@ -21,7 +21,7 @@
 /* Driver for NVIDIA nForce MCP Fast Ethernet and Gigabit Ethernet */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_nfe.c,v 1.56 2012/07/22 14:33:03 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_nfe.c,v 1.57 2012/09/23 01:12:01 chs Exp $);
 
 #include opt_inet.h
 #include vlan.h
@@ -255,8 +255,6 @@ nfe_attach(device_t parent, device_t sel
 	}
 	aprint_normal_dev(self, interrupting at %s\n, intrstr);
 
-	sc-sc_dmat = pa-pa_dmat;
-
 	csr = pci_conf_read(pa-pa_pc, pa-pa_tag, PCI_COMMAND_STATUS_REG);
 	csr |= PCI_COMMAND_MASTER_ENABLE;
 	pci_conf_write(pa-pa_pc, pa-pa_tag, PCI_COMMAND_STATUS_REG, csr);
@@ -324,6 +322,11 @@ nfe_attach(device_t parent, device_t sel
 		break;
 	}
 
+	if (pci_dma64_available(pa)  (sc-sc_flags  NFE_40BIT_ADDR) != 0)
+		sc-sc_dmat = pa-pa_dmat64;
+	else
+		sc-sc_dmat = pa-pa_dmat;
+
 	nfe_poweron(self);
 
 #ifndef NFE_NO_JUMBO



CVS commit: src/sys/dev/pci

2012-09-22 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Sun Sep 23 01:12:51 UTC 2012

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

Log Message:
reformat product array to match openbsd.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/dev/pci/if_rtw_pci.c

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

Modified files:

Index: src/sys/dev/pci/if_rtw_pci.c
diff -u src/sys/dev/pci/if_rtw_pci.c:1.20 src/sys/dev/pci/if_rtw_pci.c:1.21
--- src/sys/dev/pci/if_rtw_pci.c:1.20	Tue Jul 26 20:51:24 2011
+++ src/sys/dev/pci/if_rtw_pci.c	Sun Sep 23 01:12:51 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: if_rtw_pci.c,v 1.20 2011/07/26 20:51:24 dyoung Exp $ */
+/* $NetBSD: if_rtw_pci.c,v 1.21 2012/09/23 01:12:51 chs Exp $ */
 
 /*-
  * Copyright (c) 2004, 2005, 2010 David Young.  All rights reserved.
@@ -66,7 +66,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_rtw_pci.c,v 1.20 2011/07/26 20:51:24 dyoung Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_rtw_pci.c,v 1.21 2012/09/23 01:12:51 chs Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -136,14 +136,21 @@ static const struct rtw_pci_product {
 	u_int32_t	rpp_product;	/* PCI product ID */
 	const char	*rpp_product_name;
 } rtw_pci_products[] = {
-	  {PCI_VENDOR_REALTEK, PCI_PRODUCT_REALTEK_RT8180,
-	   Realtek RTL8180 802.11 MAC/BBP}
-	, {PCI_VENDOR_BELKIN, PCI_PRODUCT_BELKIN_F5D6001, Belkin F5D6001}
-	, {PCI_VENDOR_BELKIN, PCI_PRODUCT_BELKIN_F5D6020V3,
-	   Belkin F5D6020v3 802.11b (RTL8180 MAC/BBP)}
-	, {PCI_VENDOR_DLINK, PCI_PRODUCT_DLINK_DWL610,
-	   DWL-610 D-Link Air 802.11b (RTL8180 MAC/BBP)}
-	, {0, 0, NULL}
+	{ PCI_VENDOR_REALTEK,		PCI_PRODUCT_REALTEK_RT8180,
+	  Realtek RTL8180 802.11 MAC/BBP },
+#ifdef RTW_DEBUG
+	{ PCI_VENDOR_REALTEK,		PCI_PRODUCT_REALTEK_RT8185,
+	  Realtek RTL8185 802.11 MAC/BBP },
+	{ PCI_VENDOR_BELKIN2,		PCI_PRODUCT_BELKIN2_F5D7010,
+	  Belkin F5D7010 },
+#endif
+	{ PCI_VENDOR_BELKIN,		PCI_PRODUCT_BELKIN_F5D6001,
+	  Belkin F5D6001 },
+	{ PCI_VENDOR_BELKIN,		PCI_PRODUCT_BELKIN_F5D6020V3,
+	  Belkin F5D6020v3 },
+	{PCI_VENDOR_DLINK,		PCI_PRODUCT_DLINK_DWL610,
+	  DWL-610 D-Link Air 802.11b (RTL8180 MAC/BBP)},
+	{ 0,0,NULL },
 };
 
 static const struct rtw_pci_product *



CVS commit: src/sys/dev/ic

2012-09-22 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Sun Sep 23 01:13:21 UTC 2012

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

Log Message:
set chan_bustype correctly.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/dev/ic/mpt_netbsd.c

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

Modified files:

Index: src/sys/dev/ic/mpt_netbsd.c
diff -u src/sys/dev/ic/mpt_netbsd.c:1.18 src/sys/dev/ic/mpt_netbsd.c:1.19
--- src/sys/dev/ic/mpt_netbsd.c:1.18	Sun Mar 18 21:05:21 2012
+++ src/sys/dev/ic/mpt_netbsd.c	Sun Sep 23 01:13:21 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: mpt_netbsd.c,v 1.18 2012/03/18 21:05:21 martin Exp $	*/
+/*	$NetBSD: mpt_netbsd.c,v 1.19 2012/09/23 01:13:21 chs Exp $	*/
 
 /*
  * Copyright (c) 2003 Wasabi Systems, Inc.
@@ -77,7 +77,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: mpt_netbsd.c,v 1.18 2012/03/18 21:05:21 martin Exp $);
+__KERNEL_RCSID(0, $NetBSD: mpt_netbsd.c,v 1.19 2012/09/23 01:13:21 chs Exp $);
 
 #include dev/ic/mpt.h			/* pulls in all headers */
 
@@ -125,7 +125,13 @@ mpt_scsipi_attach(mpt_softc_t *mpt)
 	/* Fill in the scsipi_channel. */
 	memset(chan, 0, sizeof(*chan));
 	chan-chan_adapter = adapt;
-	chan-chan_bustype = scsi_bustype;
+	if (mpt-is_sas) {
+		chan-chan_bustype = scsi_sas_bustype;
+	} else if (mpt-is_fc) {
+		chan-chan_bustype = scsi_fc_bustype;
+	} else {
+		chan-chan_bustype = scsi_bustype;
+	}
 	chan-chan_channel = 0;
 	chan-chan_flags = 0;
 	chan-chan_nluns = 8;



CVS commit: src/sys/dev/ic

2012-09-22 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Sun Sep 23 01:13:52 UTC 2012

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

Log Message:
don't try to handle sensors if there aren't any.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/sys/dev/ic/ciss.c

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

Modified files:

Index: src/sys/dev/ic/ciss.c
diff -u src/sys/dev/ic/ciss.c:1.27 src/sys/dev/ic/ciss.c:1.28
--- src/sys/dev/ic/ciss.c:1.27	Mon Jun 20 22:02:55 2011
+++ src/sys/dev/ic/ciss.c	Sun Sep 23 01:13:52 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: ciss.c,v 1.27 2011/06/20 22:02:55 pgoyette Exp $	*/
+/*	$NetBSD: ciss.c,v 1.28 2012/09/23 01:13:52 chs Exp $	*/
 /*	$OpenBSD: ciss.c,v 1.14 2006/03/13 16:02:23 mickey Exp $	*/
 
 /*
@@ -19,7 +19,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ciss.c,v 1.27 2011/06/20 22:02:55 pgoyette Exp $);
+__KERNEL_RCSID(0, $NetBSD: ciss.c,v 1.28 2012/09/23 01:13:52 chs Exp $);
 
 #include bio.h
 
@@ -1411,6 +1411,10 @@ ciss_create_sensors(struct ciss_softc *s
 	int			i;
 	int nsensors = sc-maxunits;
 
+	if (nsensors == 0) {
+		return 0;
+	}
+
 	sc-sc_sme = sysmon_envsys_create();
 	sc-sc_sensor = malloc(sizeof(envsys_data_t) * nsensors,
 		M_DEVBUF, M_NOWAIT | M_ZERO);



CVS commit: src/sys/net

2012-09-22 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Sun Sep 23 01:14:19 UTC 2012

Modified Files:
src/sys/net: ethertypes.h

Log Message:
add entries for AOE and FCOE.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/net/ethertypes.h

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

Modified files:

Index: src/sys/net/ethertypes.h
diff -u src/sys/net/ethertypes.h:1.17 src/sys/net/ethertypes.h:1.18
--- src/sys/net/ethertypes.h:1.17	Sat Dec 10 23:21:38 2005
+++ src/sys/net/ethertypes.h	Sun Sep 23 01:14:19 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: ethertypes.h,v 1.17 2005/12/10 23:21:38 elad Exp $	*/
+/*	$NetBSD: ethertypes.h,v 1.18 2012/09/23 01:14:19 chs Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1993
@@ -298,6 +298,8 @@
 #define	ETHERTYPE_PPPOE		0x8864	/* PPP Over Ethernet Session Stage */
 #define	ETHERTYPE_LANPROBE	0x	/* HP LanProbe test? */
 #define	ETHERTYPE_PAE		0x888e	/* EAPOL PAE/802.1x */
+#define	ETHERTYPE_AOE		0x88a2	/* ATA over Ethernet */
+#define	ETHERTYPE_FCOE		0x8906	/* Fibre Channel over Ethernet */
 #define	ETHERTYPE_LOOPBACK	0x9000	/* Loopback */
 #define	ETHERTYPE_LBACK		ETHERTYPE_LOOPBACK	/* DEC MOP loopback */
 #define	ETHERTYPE_XNSSM		0x9001	/* 3Com (Formerly Bridge Communications), XNS Systems Management */



CVS commit: src/sys/compat/ndis

2012-09-22 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Sun Sep 23 01:14:41 UTC 2012

Modified Files:
src/sys/compat/ndis: kern_ndis.c

Log Message:
remove a debug printf.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/compat/ndis/kern_ndis.c

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

Modified files:

Index: src/sys/compat/ndis/kern_ndis.c
diff -u src/sys/compat/ndis/kern_ndis.c:1.22 src/sys/compat/ndis/kern_ndis.c:1.23
--- src/sys/compat/ndis/kern_ndis.c:1.22	Sat May 14 12:44:16 2011
+++ src/sys/compat/ndis/kern_ndis.c	Sun Sep 23 01:14:40 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_ndis.c,v 1.22 2011/05/14 12:44:16 rmind Exp $	*/
+/*	$NetBSD: kern_ndis.c,v 1.23 2012/09/23 01:14:40 chs Exp $	*/
 
 /*-
  * Copyright (c) 2003
@@ -37,7 +37,7 @@
 __FBSDID($FreeBSD: src/sys/compat/ndis/kern_ndis.c,v 1.60.2.5 2005/04/01 17:14:20 wpaul Exp $);
 #endif
 #ifdef __NetBSD__
-__KERNEL_RCSID(0, $NetBSD: kern_ndis.c,v 1.22 2011/05/14 12:44:16 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: kern_ndis.c,v 1.23 2012/09/23 01:14:40 chs Exp $);
 #endif
 
 #include sys/param.h
@@ -410,8 +410,6 @@ ndis_create_kthreads(void)
 	struct ndis_req		*r;
 	int			i, error = 0;
 
-	printf(in ndis_create_kthreads\n);
-	
 #ifdef __FreeBSD__
 	mtx_init(ndis_thr_mtx, NDIS thread lock, NULL, MTX_SPIN);
 #else /* __NetBSD__ */



CVS commit: src/etc

2012-09-22 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Sun Sep 23 01:15:18 UTC 2012

Modified Files:
src/etc/etc.amd64: MAKEDEV.conf
src/etc/etc.i386: MAKEDEV.conf

Log Message:
add more sd and pci devices.
remove duplicate ch0.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/etc/etc.amd64/MAKEDEV.conf
cvs rdiff -u -r1.24 -r1.25 src/etc/etc.i386/MAKEDEV.conf

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

Modified files:

Index: src/etc/etc.amd64/MAKEDEV.conf
diff -u src/etc/etc.amd64/MAKEDEV.conf:1.19 src/etc/etc.amd64/MAKEDEV.conf:1.20
--- src/etc/etc.amd64/MAKEDEV.conf:1.19	Wed Sep 19 21:24:29 2012
+++ src/etc/etc.amd64/MAKEDEV.conf	Sun Sep 23 01:15:17 2012
@@ -1,15 +1,15 @@
-# $NetBSD: MAKEDEV.conf,v 1.19 2012/09/19 21:24:29 bouyer Exp $
+# $NetBSD: MAKEDEV.conf,v 1.20 2012/09/23 01:15:17 chs Exp $
 
 # As of 2003-04-17, the init case must not create more than 890 entries.
 all_md)
 	makedev std wscons wt0 fd0 fd1
 	makedev wd0 wd1 wd2 wd3 wd4 wd5 wd6 wd7
-	makedev sd0 sd1 sd2 sd3 sd4
+	makedev sd0 sd1 sd2 sd3 sd4 sd5 sd6 sd7
 	makedev flash0 flash1 flash2 flash3 flash4 flash5 flash6 flash7
 	makedev tty0 tty1 tty2 tty3
 	makedev st0 st1 ch0 cd0 cd1 mcd0 vnd0
 	makedev bpf
-	makedev ccd0 md0 ch0 random
+	makedev ccd0 md0 random
 	makedev cgd0 cgd1
 	makedev amr0 iop0 mfi0 mlx0 mly0 dpti0 dpt0 twe0
 	makedev raid0 raid1 raid2 raid3
@@ -35,6 +35,7 @@ all_md)
 	makedev ttyCZ0 ttyCY0
 	makedev agp0
 	makedev pci0 pci1 pci2 pci3 pci4 pci5 pci6 pci7
+	makedev pci8 pci9 pci10 pci11
 	makedev altq
 	makedev cir0 cir1 irframe0 irframe1
 	makedev kttcp

Index: src/etc/etc.i386/MAKEDEV.conf
diff -u src/etc/etc.i386/MAKEDEV.conf:1.24 src/etc/etc.i386/MAKEDEV.conf:1.25
--- src/etc/etc.i386/MAKEDEV.conf:1.24	Wed Sep 19 21:24:29 2012
+++ src/etc/etc.i386/MAKEDEV.conf	Sun Sep 23 01:15:17 2012
@@ -1,15 +1,15 @@
-# $NetBSD: MAKEDEV.conf,v 1.24 2012/09/19 21:24:29 bouyer Exp $
+# $NetBSD: MAKEDEV.conf,v 1.25 2012/09/23 01:15:17 chs Exp $
 
 # As of 2005-03-15, the init case must not create more than 1024 entries.
 all_md)
 	makedev std wscons wt0 fd0 fd1
 	makedev wd0 wd1 wd2 wd3 wd4 wd5 wd6 wd7
-	makedev sd0 sd1 sd2 sd3 sd4
+	makedev sd0 sd1 sd2 sd3 sd4 sd5 sd6 sd7
 	makedev flash0 flash1 flash2 flash3 flash4 flash5 flash6 flash7
 	makedev tty0 tty1 tty2 tty3
 	makedev st0 st1 ch0 cd0 cd1 mcd0 vnd0
 	makedev bpf
-	makedev ccd0 md0 ch0 random
+	makedev ccd0 md0 random
 	makedev cgd0 cgd1
 	makedev amr0 iop0 mfi0 mlx0 mly0 dpti0 dpt0 twe0 icp0
 	makedev ed0 ed1
@@ -36,6 +36,7 @@ all_md)
 	makedev ttyCZ0 ttyCY0
 	makedev agp0
 	makedev pci0 pci1 pci2 pci3 pci4 pci5 pci6 pci7
+	makedev pci8 pci9 pci10 pci11
 	makedev altq
 	makedev cir0 cir1 irframe0 irframe1
 	makedev dmoverio



CVS commit: src/sys/dev/acpi

2012-09-22 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Sun Sep 23 00:26:26 UTC 2012

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

Log Message:
re-enable the code to disable link devices at startup, ie. revert rev 1.3.
this fixes PCI interrupts on some systems (eg. HP XW9400) and we suspect that
the problems which led to the original change were caused by buggy early
implementations of ACPI, which are now ignored by date.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/dev/acpi/acpi_pci_link.c

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



CVS commit: src/sys

2012-09-22 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Sun Sep 23 00:31:06 UTC 2012

Modified Files:
src/sys/arch/ia64/acpi: acpi_machdep.c
src/sys/arch/ia64/include: acpi_machdep.h
src/sys/arch/x86/acpi: acpi_machdep.c
src/sys/arch/x86/include: acpi_machdep.h
src/sys/arch/x86/x86: mpacpi.c
src/sys/dev/acpi: acpi.c

Log Message:
locate PCI buses and determine their bus numbers using the info
previously extracted from ACPICA rather than trying to figure it out again.
allow PCI buses that don't have a _PRT method.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/ia64/acpi/acpi_machdep.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/ia64/include/acpi_machdep.h
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/x86/acpi/acpi_machdep.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/x86/include/acpi_machdep.h
cvs rdiff -u -r1.94 -r1.95 src/sys/arch/x86/x86/mpacpi.c
cvs rdiff -u -r1.254 -r1.255 src/sys/dev/acpi/acpi.c

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



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

2012-09-22 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Sun Sep 23 01:01:18 UTC 2012

Modified Files:
src/sys/arch/i386/conf: kern.ldscript kern.ldscript.4MB
kern.ldscript.Xen

Log Message:
sync ldscripts; add cacheline_aligned and read_mostly handling
to the non-default ones.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/i386/conf/kern.ldscript
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/i386/conf/kern.ldscript.4MB
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/i386/conf/kern.ldscript.Xen

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



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

2012-09-22 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Sun Sep 23 01:03:40 UTC 2012

Modified Files:
src/sys/arch/i386/conf: ALL

Log Message:
add some more devices and options.


To generate a diff of this commit:
cvs rdiff -u -r1.343 -r1.344 src/sys/arch/i386/conf/ALL

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



CVS commit: src/sys/arch

2012-09-22 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Sun Sep 23 01:05:22 UTC 2012

Modified Files:
src/sys/arch/amd64/conf: GENERIC XEN3_DOM0 XEN3_DOMU
src/sys/arch/i386/conf: GENERIC XEN3_DOM0 XEN3_DOMU

Log Message:
add vmt entry to GENERIC.
standardize commented pfsync and npf entries.


To generate a diff of this commit:
cvs rdiff -u -r1.363 -r1.364 src/sys/arch/amd64/conf/GENERIC
cvs rdiff -u -r1.86 -r1.87 src/sys/arch/amd64/conf/XEN3_DOM0
cvs rdiff -u -r1.38 -r1.39 src/sys/arch/amd64/conf/XEN3_DOMU
cvs rdiff -u -r1.1079 -r1.1080 src/sys/arch/i386/conf/GENERIC
cvs rdiff -u -r1.68 -r1.69 src/sys/arch/i386/conf/XEN3_DOM0
cvs rdiff -u -r1.44 -r1.45 src/sys/arch/i386/conf/XEN3_DOMU

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



CVS commit: src/sys/dev/usb

2012-09-22 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Sun Sep 23 01:06:31 UTC 2012

Modified Files:
src/sys/dev/usb: usbdevs

Log Message:
add a bunch of devices.  from openbsd.


To generate a diff of this commit:
cvs rdiff -u -r1.626 -r1.627 src/sys/dev/usb/usbdevs

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



CVS commit: src/sys/dev/usb

2012-09-22 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Sun Sep 23 01:07:38 UTC 2012

Modified Files:
src/sys/dev/usb: usbdevs.h usbdevs_data.h

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.618 -r1.619 src/sys/dev/usb/usbdevs.h
cvs rdiff -u -r1.619 -r1.620 src/sys/dev/usb/usbdevs_data.h

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



CVS commit: src/sys/dev/usb

2012-09-22 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Sun Sep 23 01:08:18 UTC 2012

Modified Files:
src/sys/dev/usb: if_atu.c if_atureg.h if_rum.c if_zyd.c moscom.c

Log Message:
add a bunch of devices.  from openbsd.


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/sys/dev/usb/if_atu.c
cvs rdiff -u -r1.9 -r1.10 src/sys/dev/usb/if_atureg.h
cvs rdiff -u -r1.42 -r1.43 src/sys/dev/usb/if_rum.c
cvs rdiff -u -r1.30 -r1.31 src/sys/dev/usb/if_zyd.c
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/usb/moscom.c

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



CVS commit: src/sys/dev/pci

2012-09-22 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Sun Sep 23 01:09:10 UTC 2012

Modified Files:
src/sys/dev/pci: pcidevs

Log Message:
add a bunch of devices.


To generate a diff of this commit:
cvs rdiff -u -r1.1136 -r1.1137 src/sys/dev/pci/pcidevs

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



CVS commit: src/sys/dev/pci

2012-09-22 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Sun Sep 23 01:09:46 UTC 2012

Modified Files:
src/sys/dev/pci: pcidevs.h pcidevs_data.h

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.1129 -r1.1130 src/sys/dev/pci/pcidevs.h
cvs rdiff -u -r1.1128 -r1.1129 src/sys/dev/pci/pcidevs_data.h

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



CVS commit: src/sys/dev/pci

2012-09-22 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Sun Sep 23 01:10:10 UTC 2012

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

Log Message:
add an entry for subclass HD audio.


To generate a diff of this commit:
cvs rdiff -u -r1.92 -r1.93 src/sys/dev/pci/pci_subr.c

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



CVS commit: src/sys/dev/pci

2012-09-22 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Sun Sep 23 01:10:59 UTC 2012

Modified Files:
src/sys/dev/pci: aac_pci.c if_an_pci.c if_sip.c if_tlp_pci.c

Log Message:
match some more devices.


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/sys/dev/pci/aac_pci.c \
src/sys/dev/pci/if_an_pci.c
cvs rdiff -u -r1.154 -r1.155 src/sys/dev/pci/if_sip.c
cvs rdiff -u -r1.121 -r1.122 src/sys/dev/pci/if_tlp_pci.c

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



CVS commit: src/sys/dev/pci

2012-09-22 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Sun Sep 23 01:11:14 UTC 2012

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

Log Message:
fix a debug printf.


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/sys/dev/pci/if_gem_pci.c

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



CVS commit: src/sys/dev/pci

2012-09-22 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Sun Sep 23 01:12:01 UTC 2012

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

Log Message:
use 64-bit DMA where possible.


To generate a diff of this commit:
cvs rdiff -u -r1.56 -r1.57 src/sys/dev/pci/if_nfe.c

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



CVS commit: src/sys/dev/pci

2012-09-22 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Sun Sep 23 01:12:51 UTC 2012

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

Log Message:
reformat product array to match openbsd.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/dev/pci/if_rtw_pci.c

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



CVS commit: src/sys/dev/ic

2012-09-22 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Sun Sep 23 01:13:21 UTC 2012

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

Log Message:
set chan_bustype correctly.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/dev/ic/mpt_netbsd.c

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



CVS commit: src/sys/dev/ic

2012-09-22 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Sun Sep 23 01:13:52 UTC 2012

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

Log Message:
don't try to handle sensors if there aren't any.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/sys/dev/ic/ciss.c

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



CVS commit: src/sys/net

2012-09-22 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Sun Sep 23 01:14:19 UTC 2012

Modified Files:
src/sys/net: ethertypes.h

Log Message:
add entries for AOE and FCOE.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/net/ethertypes.h

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



CVS commit: src/sys/compat/ndis

2012-09-22 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Sun Sep 23 01:14:41 UTC 2012

Modified Files:
src/sys/compat/ndis: kern_ndis.c

Log Message:
remove a debug printf.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/compat/ndis/kern_ndis.c

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



CVS commit: src/etc

2012-09-22 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Sun Sep 23 01:15:18 UTC 2012

Modified Files:
src/etc/etc.amd64: MAKEDEV.conf
src/etc/etc.i386: MAKEDEV.conf

Log Message:
add more sd and pci devices.
remove duplicate ch0.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/etc/etc.amd64/MAKEDEV.conf
cvs rdiff -u -r1.24 -r1.25 src/etc/etc.i386/MAKEDEV.conf

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



Re: CVS commit: src/sys/arch/evbarm/iq80310

2012-09-17 Thread Chuck Silvers
On Mon, Sep 17, 2012 at 03:40:12AM +0900, Izumi Tsutsui wrote:
 chs@ wrote:
 
  Module Name:src
  Committed By:   chs
  Date:   Tue Aug 14 15:46:21 UTC 2012
  
  Modified Files:
  src/sys/arch/evbarm/iq80310: iq80310_intr.c
  
  Log Message:
  move evcnt_attach_dynamic() calls later to avoid assertions.
 
 
 - what happens if intr_establish function is called more than once
   against the same irq?
 
 - shouldn't disestablish function have evcnt_detach()?
 
 - isn't it better to defer intr_init() calls after evcnt_init(),
   rather than calling evcnt_attach_dynamic() in intr_establish() ?
 
 
 It looks many other arm intr_init functions
 (arm/ep93xx/ep93xx_intr.c, arm/xscale/ixp425_intr.c etc)
 have the same problem, though.
 (on the other hand marvell variants don't have evcnt at all)


gah, you'r right.

I thought I based the change I checked in on someone else making
a similar change to another arm platform earlier this year,
but I can't find that now.  I probably ended up copying the bad logic
from one of the other broken arm platforms.

are you suggesting to undo my change and instead move the call to
iq80310_intr_init() from initarm() to somewhere else?  if so, where?

or are you suggesting to move the calls to evcnt_attach_dynamic()
from iq80310_intr_init() to a separate function which could be called
later?  if so, where would be a good place to call that other function?

or something else?

-Chuck


<    2   3   4   5   6   7   8   9   10   >