CVS commit: src/sys/arch

2012-02-24 Thread Cherry G. Mathew
Module Name:src
Committed By:   cherry
Date:   Fri Feb 24 08:06:08 UTC 2012

Modified Files:
src/sys/arch/amd64/amd64: locore.S
src/sys/arch/i386/i386: gdt.c locore.S machdep.c
src/sys/arch/xen/x86: cpu.c x86_xpmap.c xen_pmap.c

Log Message:
(xen) - remove the (*xpq_cpu)() shim.We hasten the %fs/%gs setup process during 
boot.Although this is hacky, it lets us use the non-xen specificpmap_pte_xxx() 
functions in pmap code (and others).


To generate a diff of this commit:
cvs rdiff -u -r1.66 -r1.67 src/sys/arch/amd64/amd64/locore.S
cvs rdiff -u -r1.52 -r1.53 src/sys/arch/i386/i386/gdt.c
cvs rdiff -u -r1.95 -r1.96 src/sys/arch/i386/i386/locore.S
cvs rdiff -u -r1.720 -r1.721 src/sys/arch/i386/i386/machdep.c
cvs rdiff -u -r1.85 -r1.86 src/sys/arch/xen/x86/cpu.c
cvs rdiff -u -r1.40 -r1.41 src/sys/arch/xen/x86/x86_xpmap.c
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/xen/x86/xen_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/amd64/amd64/locore.S
diff -u src/sys/arch/amd64/amd64/locore.S:1.66 src/sys/arch/amd64/amd64/locore.S:1.67
--- src/sys/arch/amd64/amd64/locore.S:1.66	Sun Dec  4 16:24:13 2011
+++ src/sys/arch/amd64/amd64/locore.S	Fri Feb 24 08:06:07 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.S,v 1.66 2011/12/04 16:24:13 chs Exp $	*/
+/*	$NetBSD: locore.S,v 1.67 2012/02/24 08:06:07 cherry Exp $	*/
 
 /*
  * Copyright-o-rama!
@@ -778,6 +778,11 @@ start:
 	cpuid
 	movl	%eax,_C_LABEL(cpuid_level)
 
+	movq	$cpu_info_primary, %rdi
+	movq	%rdi, CPU_INFO_SELF(%rdi) /* ci-ci_self = ci */
+	movq	$1, %rsi
+	call	cpu_init_msrs	/* cpu_init_msrs(ci, true); */
+
 	call	xen_pmap_bootstrap
 
 	/*

Index: src/sys/arch/i386/i386/gdt.c
diff -u src/sys/arch/i386/i386/gdt.c:1.52 src/sys/arch/i386/i386/gdt.c:1.53
--- src/sys/arch/i386/i386/gdt.c:1.52	Sun Nov  6 11:40:46 2011
+++ src/sys/arch/i386/i386/gdt.c	Fri Feb 24 08:06:07 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: gdt.c,v 1.52 2011/11/06 11:40:46 cherry Exp $	*/
+/*	$NetBSD: gdt.c,v 1.53 2012/02/24 08:06:07 cherry Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 2009 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: gdt.c,v 1.52 2011/11/06 11:40:46 cherry Exp $);
+__KERNEL_RCSID(0, $NetBSD: gdt.c,v 1.53 2012/02/24 08:06:07 cherry Exp $);
 
 #include opt_multiprocessor.h
 #include opt_xen.h
@@ -214,9 +214,10 @@ gdt_init_cpu(struct cpu_info *ci)
 		* properly yet, ie; curcpu() won't work at this
 		* point and spl() will break.
 		*/
-		   xpq_queue_pte_update(xpmap_ptetomach(ptp),
-	*ptp  ~PG_RW);
-		   xpq_flush_queue();
+			if (HYPERVISOR_update_va_mapping((vaddr_t)va,
+*ptp  ~PG_RW, UVMF_INVLPG)  0) {
+panic(%s page RO update failed.\n, __func__);
+			}
 		}
 	}
 

Index: src/sys/arch/i386/i386/locore.S
diff -u src/sys/arch/i386/i386/locore.S:1.95 src/sys/arch/i386/i386/locore.S:1.96
--- src/sys/arch/i386/i386/locore.S:1.95	Fri Mar 18 15:18:16 2011
+++ src/sys/arch/i386/i386/locore.S	Fri Feb 24 08:06:07 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.S,v 1.95 2011/03/18 15:18:16 joerg Exp $	*/
+/*	$NetBSD: locore.S,v 1.96 2012/02/24 08:06:07 cherry Exp $	*/
 
 /*
  * Copyright-o-rama!
@@ -129,7 +129,7 @@
  */
 
 #include machine/asm.h
-__KERNEL_RCSID(0, $NetBSD: locore.S,v 1.95 2011/03/18 15:18:16 joerg Exp $);
+__KERNEL_RCSID(0, $NetBSD: locore.S,v 1.96 2012/02/24 08:06:07 cherry Exp $);
 
 #include opt_compat_oldboot.h
 #include opt_ddb.h
@@ -238,7 +238,12 @@ _C_LABEL(tablesize):	.long	0
 
 	.space 512
 tmpstk:
-
+#ifdef XEN
+	.align 		PAGE_SIZE, 0x0	# Align on page boundary
+_C_LABEL(tmpgdt):
+	.space 		PAGE_SIZE	# Xen expects a page
+#endif /* XEN */
+	.globl tmpgdt
 #ifndef XEN
 #define	_RELOC(x)	((x) - KERNBASE)
 #else
@@ -787,6 +792,15 @@ start:
 	cpuid
 	movl	%eax,RELOC(cpuid_level)
 
+	/*
+	 * Use a temp page. We'll re- add it to uvm(9) once we're
+	 * done using it.
+	 */
+	movl	$RELOC(tmpgdt), %eax
+	pushl	%eax		# start of temporary gdt
+	call	_C_LABEL(initgdt)
+	addl	$4,%esp
+
 	call	xen_pmap_bootstrap
 
 	/*

Index: src/sys/arch/i386/i386/machdep.c
diff -u src/sys/arch/i386/i386/machdep.c:1.720 src/sys/arch/i386/i386/machdep.c:1.721
--- src/sys/arch/i386/i386/machdep.c:1.720	Thu Feb 23 14:45:55 2012
+++ src/sys/arch/i386/i386/machdep.c	Fri Feb 24 08:06:07 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.720 2012/02/23 14:45:55 chs Exp $	*/
+/*	$NetBSD: machdep.c,v 1.721 2012/02/24 08:06:07 cherry Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2000, 2004, 2006, 2008, 2009
@@ -67,7 +67,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.720 2012/02/23 14:45:55 chs Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.721 2012/02/24 08:06:07 cherry Exp $);
 
 #include opt_beep.h
 #include opt_compat_ibcs2.h
@@ -525,9 +525,6 @@ i386_proc0_tss_ldt_init(void)
 }
 
 #ifdef XEN
-/* Shim for curcpu() until %fs is ready */
-extern struct cpu_info	* 

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

2012-02-24 Thread Cherry G. Mathew
Module Name:src
Committed By:   cherry
Date:   Fri Feb 24 08:11:14 UTC 2012

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

Log Message:
kernel page attribute change should be reflected on all cpus, since
the page is going to be released after the _dtor() hook is called.


To generate a diff of this commit:
cvs rdiff -u -r1.170 -r1.171 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/x86/pmap.c
diff -u src/sys/arch/x86/x86/pmap.c:1.170 src/sys/arch/x86/x86/pmap.c:1.171
--- src/sys/arch/x86/x86/pmap.c:1.170	Thu Feb 23 18:59:21 2012
+++ src/sys/arch/x86/x86/pmap.c	Fri Feb 24 08:11:14 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.170 2012/02/23 18:59:21 bouyer Exp $	*/
+/*	$NetBSD: pmap.c,v 1.171 2012/02/24 08:11:14 cherry 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.170 2012/02/23 18:59:21 bouyer Exp $);
+__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.171 2012/02/24 08:11:14 cherry Exp $);
 
 #include opt_user_ldt.h
 #include opt_lockdebug.h
@@ -2172,7 +2172,7 @@ pmap_pdp_dtor(void *arg, void *v)
 		/* Set page RW again */
 		pte = kvtopte(object);
 		xpq_queue_pte_update(xpmap_ptetomach(pte), *pte | PG_RW);
-		xpq_queue_invlpg((vaddr_t)object);
+		xpq_bcast_invlpg((vaddr_t)object);
 	}
 	splx(s);
 #endif  /* XEN */



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

2012-02-24 Thread Cherry G. Mathew
Module Name:src
Committed By:   cherry
Date:   Fri Feb 24 08:17:20 UTC 2012

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

Log Message:
Revert previous


To generate a diff of this commit:
cvs rdiff -u -r1.171 -r1.172 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/x86/pmap.c
diff -u src/sys/arch/x86/x86/pmap.c:1.171 src/sys/arch/x86/x86/pmap.c:1.172
--- src/sys/arch/x86/x86/pmap.c:1.171	Fri Feb 24 08:11:14 2012
+++ src/sys/arch/x86/x86/pmap.c	Fri Feb 24 08:17:20 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.171 2012/02/24 08:11:14 cherry Exp $	*/
+/*	$NetBSD: pmap.c,v 1.172 2012/02/24 08:17:20 cherry 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.171 2012/02/24 08:11:14 cherry Exp $);
+__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.172 2012/02/24 08:17:20 cherry Exp $);
 
 #include opt_user_ldt.h
 #include opt_lockdebug.h
@@ -2172,7 +2172,7 @@ pmap_pdp_dtor(void *arg, void *v)
 		/* Set page RW again */
 		pte = kvtopte(object);
 		xpq_queue_pte_update(xpmap_ptetomach(pte), *pte | PG_RW);
-		xpq_bcast_invlpg((vaddr_t)object);
+		xpq_queue_invlpg((vaddr_t)object);
 	}
 	splx(s);
 #endif  /* XEN */



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

2012-02-24 Thread Cherry G. Mathew
Module Name:src
Committed By:   cherry
Date:   Fri Feb 24 08:44:44 UTC 2012

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

Log Message:
kernel page attribute change should be reflected on all cpus, since
the page is going to be released after the _dtor() hook is called.


To generate a diff of this commit:
cvs rdiff -u -r1.172 -r1.173 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/x86/pmap.c
diff -u src/sys/arch/x86/x86/pmap.c:1.172 src/sys/arch/x86/x86/pmap.c:1.173
--- src/sys/arch/x86/x86/pmap.c:1.172	Fri Feb 24 08:17:20 2012
+++ src/sys/arch/x86/x86/pmap.c	Fri Feb 24 08:44:44 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.172 2012/02/24 08:17:20 cherry Exp $	*/
+/*	$NetBSD: pmap.c,v 1.173 2012/02/24 08:44:44 cherry 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.172 2012/02/24 08:17:20 cherry Exp $);
+__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.173 2012/02/24 08:44:44 cherry Exp $);
 
 #include opt_user_ldt.h
 #include opt_lockdebug.h
@@ -2172,7 +2172,7 @@ pmap_pdp_dtor(void *arg, void *v)
 		/* Set page RW again */
 		pte = kvtopte(object);
 		xpq_queue_pte_update(xpmap_ptetomach(pte), *pte | PG_RW);
-		xpq_queue_invlpg((vaddr_t)object);
+		xen_bcast_invlpg((vaddr_t)object);
 	}
 	splx(s);
 #endif  /* XEN */



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

2012-02-24 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Fri Feb 24 11:31:23 UTC 2012

Modified Files:
src/sys/arch/xen/x86: cpu.c

Log Message:
Get rid of phycpus_attached bitmask; it's maintained but not used and
will limit the number of physical CPUs to 32 without good reasons.


To generate a diff of this commit:
cvs rdiff -u -r1.86 -r1.87 src/sys/arch/xen/x86/cpu.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/xen/x86/cpu.c
diff -u src/sys/arch/xen/x86/cpu.c:1.86 src/sys/arch/xen/x86/cpu.c:1.87
--- src/sys/arch/xen/x86/cpu.c:1.86	Fri Feb 24 08:06:07 2012
+++ src/sys/arch/xen/x86/cpu.c	Fri Feb 24 11:31:23 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.c,v 1.86 2012/02/24 08:06:07 cherry Exp $	*/
+/*	$NetBSD: cpu.c,v 1.87 2012/02/24 11:31:23 bouyer Exp $	*/
 /* NetBSD: cpu.c,v 1.18 2004/02/20 17:35:01 yamt Exp  */
 
 /*-
@@ -66,7 +66,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.86 2012/02/24 08:06:07 cherry Exp $);
+__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.87 2012/02/24 11:31:23 bouyer Exp $);
 
 #include opt_ddb.h
 #include opt_multiprocessor.h
@@ -184,9 +184,6 @@ struct cpu_info *phycpu_info_list = phy
 uint32_t cpus_attached = 1;
 uint32_t cpus_running = 1;
 
-uint32_t phycpus_attached = 0;
-uint32_t phycpus_running = 0;
-
 uint32_t cpu_feature[5]; /* X86 CPUID feature bits
 			  *	[0] basic features %edx
 			  *	[1] basic features %ecx
@@ -222,11 +219,6 @@ cpu_attach(device_t parent, device_t sel
 
 	sc-sc_dev = self;
 
-	if (phycpus_attached == ~0) {
-		aprint_error(: increase MAXCPUS\n);
-		return;
-	}
-
 	/*
 	 * If we're an Application Processor, allocate a cpu_info
 	 * If we're the first attached CPU use the primary cpu_info,
@@ -260,8 +252,6 @@ cpu_attach(device_t parent, device_t sel
 	ci-ci_index = nphycpu++;
 	ci-ci_cpumask = (1  cpu_index(ci));
 
-	atomic_or_32(phycpus_attached, ci-ci_cpumask);
-
 	if (!pmf_device_register(self, NULL, NULL))
 		aprint_error_dev(self, couldn't establish power handler\n);
 



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

2012-02-24 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Fri Feb 24 11:43:06 UTC 2012

Modified Files:
src/sys/arch/xen/x86: cpu.c

Log Message:
Don't maintain ci_cpumask for physical CPUs, it's not used.


To generate a diff of this commit:
cvs rdiff -u -r1.87 -r1.88 src/sys/arch/xen/x86/cpu.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/xen/x86/cpu.c
diff -u src/sys/arch/xen/x86/cpu.c:1.87 src/sys/arch/xen/x86/cpu.c:1.88
--- src/sys/arch/xen/x86/cpu.c:1.87	Fri Feb 24 11:31:23 2012
+++ src/sys/arch/xen/x86/cpu.c	Fri Feb 24 11:43:06 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.c,v 1.87 2012/02/24 11:31:23 bouyer Exp $	*/
+/*	$NetBSD: cpu.c,v 1.88 2012/02/24 11:43:06 bouyer Exp $	*/
 /* NetBSD: cpu.c,v 1.18 2004/02/20 17:35:01 yamt Exp  */
 
 /*-
@@ -66,7 +66,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.87 2012/02/24 11:31:23 bouyer Exp $);
+__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.88 2012/02/24 11:43:06 bouyer Exp $);
 
 #include opt_ddb.h
 #include opt_multiprocessor.h
@@ -250,7 +250,6 @@ cpu_attach(device_t parent, device_t sel
 	ci-ci_cpuid = caa-cpu_number;
 	ci-ci_vcpu = NULL;
 	ci-ci_index = nphycpu++;
-	ci-ci_cpumask = (1  cpu_index(ci));
 
 	if (!pmf_device_register(self, NULL, NULL))
 		aprint_error_dev(self, couldn't establish power handler\n);



CVS commit: src/tests/fs/nfs

2012-02-24 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Fri Feb 24 13:53:47 UTC 2012

Modified Files:
src/tests/fs/nfs: Makefile t_mountd.c

Log Message:
Fix obvious code issues and remove the original -Wno-error for clang
builds to not hide them in the future:
(1) Don't use a pointer to a local variables if all that is done is
comparing it against NULL. The function itself works fine for that
purpose.

(2) Initialise the fail counter, giving the test a chance to work
reliably.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/tests/fs/nfs/Makefile
cvs rdiff -u -r1.4 -r1.5 src/tests/fs/nfs/t_mountd.c

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

Modified files:

Index: src/tests/fs/nfs/Makefile
diff -u src/tests/fs/nfs/Makefile:1.7 src/tests/fs/nfs/Makefile:1.8
--- src/tests/fs/nfs/Makefile:1.7	Mon Feb 13 22:40:43 2012
+++ src/tests/fs/nfs/Makefile	Fri Feb 24 13:53:46 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.7 2012/02/13 22:40:43 bouyer Exp $
+#	$NetBSD: Makefile,v 1.8 2012/02/24 13:53:46 joerg Exp $
 #
 
 .include bsd.own.mk
@@ -26,6 +26,4 @@ LDADD+=-lrump -lrumpuser -lpthread  
 
 LDADD+=-lutil
 
-NOCLANGERROR=	# defined
-
 .include bsd.test.mk

Index: src/tests/fs/nfs/t_mountd.c
diff -u src/tests/fs/nfs/t_mountd.c:1.4 src/tests/fs/nfs/t_mountd.c:1.5
--- src/tests/fs/nfs/t_mountd.c:1.4	Sun Jun 26 13:08:08 2011
+++ src/tests/fs/nfs/t_mountd.c	Fri Feb 24 13:53:46 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_mountd.c,v 1.4 2011/06/26 13:08:08 christos Exp $	*/
+/*	$NetBSD: t_mountd.c,v 1.5 2012/02/24 13:53:46 joerg Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -59,6 +59,8 @@ wrkwrkwrk(void *unused)
 {
 	int fd, fail;
 
+	fail = 0;
+
 	rump_sys_chdir(FSTEST_MNTNAME);
 	while (!quit) {
 		fd = rump_sys_open(file, O_RDWR | O_CREAT);
@@ -79,7 +81,7 @@ wrkwrkwrk(void *unused)
 	rump_sys_chdir(/);
 	quit = 1;
 
-	return fail ? fail : NULL;
+	return fail ? wrkwrkwrk : NULL;
 }
 
 ATF_TC_BODY(mountdhup, tc)



CVS commit: src/tests/lib/libc/stdlib

2012-02-24 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Fri Feb 24 14:02:55 UTC 2012

Modified Files:
src/tests/lib/libc/stdlib: Makefile

Log Message:
Restrict -ffloat-store to t_strtod.c.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/tests/lib/libc/stdlib/Makefile

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

Modified files:

Index: src/tests/lib/libc/stdlib/Makefile
diff -u src/tests/lib/libc/stdlib/Makefile:1.18 src/tests/lib/libc/stdlib/Makefile:1.19
--- src/tests/lib/libc/stdlib/Makefile:1.18	Sun Sep 11 10:32:23 2011
+++ src/tests/lib/libc/stdlib/Makefile	Fri Feb 24 14:02:55 2012
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.18 2011/09/11 10:32:23 jruoho Exp $
+# $NetBSD: Makefile,v 1.19 2012/02/24 14:02:55 joerg Exp $
 
 .include bsd.own.mk
 
@@ -25,9 +25,9 @@ BINDIR=		${TESTSDIR}
 PROGS+=		h_atexit
 PROGS+=		h_getopt h_getopt_long
 
+COPTS.t_strtod.c+=		-ffloat-store
 LDADD.t_strtod=			-lm
-LDADD.t_getenv_thread=		-lpthread
 
-COPTS+=-ffloat-store
+LDADD.t_getenv_thread=		-lpthread
 
 .include bsd.test.mk



CVS commit: src/usr.bin/tip

2012-02-24 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Fri Feb 24 16:03:39 UTC 2012

Modified Files:
src/usr.bin/tip: cmds.c

Log Message:
Add explicit continue to empty loop body.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/usr.bin/tip/cmds.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/tip/cmds.c
diff -u src/usr.bin/tip/cmds.c:1.34 src/usr.bin/tip/cmds.c:1.35
--- src/usr.bin/tip/cmds.c:1.34	Thu Feb 23 23:39:19 2012
+++ src/usr.bin/tip/cmds.c	Fri Feb 24 16:03:39 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: cmds.c,v 1.34 2012/02/23 23:39:19 joerg Exp $	*/
+/*	$NetBSD: cmds.c,v 1.35 2012/02/24 16:03:39 joerg Exp $	*/
 
 /*
  * Copyright (c) 1983, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = @(#)cmds.c	8.1 (Berkeley) 6/6/93;
 #endif
-__RCSID($NetBSD: cmds.c,v 1.34 2012/02/23 23:39:19 joerg Exp $);
+__RCSID($NetBSD: cmds.c,v 1.35 2012/02/24 16:03:39 joerg Exp $);
 #endif /* not lint */
 
 #include tip.h
@@ -888,7 +888,7 @@ expand(char aname[])
 	l = read(pivec[0], xname, BUFSIZ);
 	(void)close(pivec[0]);
 	while (wait(s) != mypid)
-		;
+		continue;
 	s = 0377;
 	if (s != 0  s != SIGPIPE) {
 		(void)fprintf(stderr, \Echo\ failed\n);



CVS commit: src/lib/libc

2012-02-24 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Fri Feb 24 16:06:39 UTC 2012

Modified Files:
src/lib/libc: shlib_version

Log Message:
Note that gets() is finally dead in C11 and can be removed if we ever
bump libc.


To generate a diff of this commit:
cvs rdiff -u -r1.228 -r1.229 src/lib/libc/shlib_version

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

Modified files:

Index: src/lib/libc/shlib_version
diff -u src/lib/libc/shlib_version:1.228 src/lib/libc/shlib_version:1.229
--- src/lib/libc/shlib_version:1.228	Thu Feb 16 23:00:39 2012
+++ src/lib/libc/shlib_version	Fri Feb 24 16:06:39 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: shlib_version,v 1.228 2012/02/16 23:00:39 joerg Exp $
+#	$NetBSD: shlib_version,v 1.229 2012/02/24 16:06:39 dholland Exp $
 #	Remember to update distrib/sets/lists/base/shl.* when changing
 #
 # things we wish to do on next major version bump:
@@ -28,5 +28,6 @@
 # - change _ctype_ table in ctype.h and gen/ctype_.c 8bit - 16 or 32bit.
 #   it's insufficient bitwidth to implement all ctype class.
 #   see isblank's comment in ctype.h.
+# - remove gets(); it is finally dead in c11.
 major=12
 minor=182



CVS commit: [netbsd-6] src/sys/arch/hp700/gsc

2012-02-24 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Feb 24 16:27:53 UTC 2012

Modified Files:
src/sys/arch/hp700/gsc [netbsd-6]: harmony.c

Log Message:
Pull up following revision(s) (requested by skrll in ticket #41):
sys/arch/hp700/gsc/harmony.c: revision 1.27
Don't take sc_intr_lock in harmony_trigger_input it's already taken by
our caller.
Found by /usr/tests/include/t_paths.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.26.2.1 src/sys/arch/hp700/gsc/harmony.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/hp700/gsc/harmony.c
diff -u src/sys/arch/hp700/gsc/harmony.c:1.26 src/sys/arch/hp700/gsc/harmony.c:1.26.2.1
--- src/sys/arch/hp700/gsc/harmony.c:1.26	Thu Feb  2 19:42:59 2012
+++ src/sys/arch/hp700/gsc/harmony.c	Fri Feb 24 16:27:53 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: harmony.c,v 1.26 2012/02/02 19:42:59 tls Exp $	*/
+/*	$NetBSD: harmony.c,v 1.26.2.1 2012/02/24 16:27:53 riz Exp $	*/
 
 /*	$OpenBSD: harmony.c,v 1.23 2004/02/13 21:28:19 mickey Exp $	*/
 
@@ -1259,12 +1259,12 @@ int
 harmony_trigger_input(void *vsc, void *start, void *end, int blksize,
 void (*intr)(void *), void *intrarg, const audio_params_t *param)
 {
-	struct harmony_softc *sc;
-	struct harmony_channel *c;
+	struct harmony_softc *sc = vsc;
+	struct harmony_channel *c = sc-sc_capture;
 	struct harmony_dma *d;
 
-	sc = vsc;
-	c = sc-sc_capture;
+	KASSERT(mutex_owned(sc-sc_intr_lock));
+
 	for (d = sc-sc_dmas; d-d_kva != start; d = d-d_next)
 		continue;
 	if (d == NULL) {
@@ -1273,8 +1273,6 @@ harmony_trigger_input(void *vsc, void *s
 		return EINVAL;
 	}
 
-	mutex_spin_enter(sc-sc_intr_lock);
-
 	c-c_intr = intr;
 	c-c_intrarg = intrarg;
 	c-c_blksz = blksize;
@@ -1288,8 +1286,6 @@ harmony_trigger_input(void *vsc, void *s
 	harmony_start_cp(sc, 1);
 	harmony_intr_enable(sc);
 
-	mutex_spin_exit(sc-sc_intr_lock);
-
 	return 0;
 }
 



CVS commit: [netbsd-6] src/lib/libterminfo

2012-02-24 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Feb 24 16:29:33 UTC 2012

Modified Files:
src/lib/libterminfo [netbsd-6]: term.h

Log Message:
Pull up following revision(s) (requested by asau in ticket #42):
lib/libterminfo/term.h: revision 1.11
PR/46075: Asau: fix typo set_color_paid - set_color_pair


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.10.4.1 src/lib/libterminfo/term.h

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

Modified files:

Index: src/lib/libterminfo/term.h
diff -u src/lib/libterminfo/term.h:1.10 src/lib/libterminfo/term.h:1.10.4.1
--- src/lib/libterminfo/term.h:1.10	Tue Oct  4 11:01:14 2011
+++ src/lib/libterminfo/term.h	Fri Feb 24 16:29:33 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: term.h,v 1.10 2011/10/04 11:01:14 roy Exp $ */
+/* $NetBSD: term.h,v 1.10.4.1 2012/02/24 16:29:33 riz Exp $ */
 
 /*
  * Copyright (c) 2009, 2010, 2011 The NetBSD Foundation, Inc.
@@ -1012,7 +1012,7 @@ enum TISTRS{
 #define t_set_bottom_margin_parm(t)	(t)-strs[TICODE_smgbp]
 #define t_set_clock(t)			(t)-strs[TICODE_sclk]
 #define t_set_color_band(t)		(t)-strs[TICODE_setcolor]
-#define t_set_color_paid(t)		(t)-strs[TICODE_scp]
+#define t_set_color_pair(t)		(t)-strs[TICODE_scp]
 #define t_set_foreground(t)		(t)-strs[TICODE_setf]
 #define t_set_left_margin(t)		(t)-strs[TICODE_smgl]
 #define t_set_left_margin_parm(t)	(t)-strs[TICODE_smglp]
@@ -1407,7 +1407,7 @@ enum TISTRS{
 #define set_bottom_margin_parm		 t_set_bottom_margin_parm(cur_term)
 #define set_clock			 t_set_clock(cur_term)
 #define set_color_band			 t_set_color_band(cur_term)
-#define set_color_paid			 t_set_color_paid(cur_term)
+#define set_color_pair			 t_set_color_pair(cur_term)
 #define set_foreground			 t_set_foreground(cur_term)
 #define set_left_margin			 t_set_left_margin(cur_term)
 #define set_left_margin_parm		 t_set_left_margin_parm(cur_term)



CVS commit: [netbsd-6] src/doc

2012-02-24 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Feb 24 16:30:28 UTC 2012

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

Log Message:
Tickets 41, 42.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.15 -r1.1.2.16 src/doc/CHANGES-6.0

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

Modified files:

Index: src/doc/CHANGES-6.0
diff -u src/doc/CHANGES-6.0:1.1.2.15 src/doc/CHANGES-6.0:1.1.2.16
--- src/doc/CHANGES-6.0:1.1.2.15	Thu Feb 23 21:20:39 2012
+++ src/doc/CHANGES-6.0	Fri Feb 24 16:30:28 2012
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.0,v 1.1.2.15 2012/02/23 21:20:39 riz Exp $
+# $NetBSD: CHANGES-6.0,v 1.1.2.16 2012/02/24 16:30:28 riz Exp $
 
 A complete list of changes from the initial NetBSD 6.0 branch on 15 Feb 2012
 until the 6.0 release:
@@ -457,3 +457,18 @@ sys/arch/xen/xen/xengnt.c			1.23
 	Fix locking in xengnt_get_entry() and xengnt_more_entries().
 	[bouyer, ticket #40]
 
+usr.sbin/postinstall/postinstall		1.133
+
+	Fix a call to pwd_mkdb in the case that DEST_DIR is the empty string.
+	[nakayama, ticket #44]
+
+sys/arch/hp700/gsc/harmony.c			1.27
+
+	Fix locking in harmony(4) driver.
+	[skrll, ticket #41]
+
+lib/libterminfo/term.h1.11
+
+	PR/46075: fix typo set_color_paid - set_color_pair
+	[asau, ticket #42]
+



CVS commit: [netbsd-6] src/sys/arch/xen/x86

2012-02-24 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Feb 24 16:35:08 UTC 2012

Modified Files:
src/sys/arch/xen/x86 [netbsd-6]: cpu.c

Log Message:
Pull up following revision(s) (requested by bouyer in ticket #45):
sys/arch/xen/x86/cpu.c: revision 1.87
sys/arch/xen/x86/cpu.c: revision 1.88
Get rid of phycpus_attached bitmask; it's maintained but not used and
will limit the number of physical CPUs to 32 without good reasons.
Don't maintain ci_cpumask for physical CPUs, it's not used.


To generate a diff of this commit:
cvs rdiff -u -r1.80.2.2 -r1.80.2.3 src/sys/arch/xen/x86/cpu.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/xen/x86/cpu.c
diff -u src/sys/arch/xen/x86/cpu.c:1.80.2.2 src/sys/arch/xen/x86/cpu.c:1.80.2.3
--- src/sys/arch/xen/x86/cpu.c:1.80.2.2	Wed Feb 22 18:59:05 2012
+++ src/sys/arch/xen/x86/cpu.c	Fri Feb 24 16:35:08 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.c,v 1.80.2.2 2012/02/22 18:59:05 riz Exp $	*/
+/*	$NetBSD: cpu.c,v 1.80.2.3 2012/02/24 16:35:08 riz Exp $	*/
 /* NetBSD: cpu.c,v 1.18 2004/02/20 17:35:01 yamt Exp  */
 
 /*-
@@ -66,7 +66,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.80.2.2 2012/02/22 18:59:05 riz Exp $);
+__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.80.2.3 2012/02/24 16:35:08 riz Exp $);
 
 #include opt_ddb.h
 #include opt_multiprocessor.h
@@ -184,9 +184,6 @@ struct cpu_info *phycpu_info_list = phy
 uint32_t cpus_attached = 1;
 uint32_t cpus_running = 1;
 
-uint32_t phycpus_attached = 0;
-uint32_t phycpus_running = 0;
-
 uint32_t cpu_feature[5]; /* X86 CPUID feature bits
 			  *	[0] basic features %edx
 			  *	[1] basic features %ecx
@@ -222,11 +219,6 @@ cpu_attach(device_t parent, device_t sel
 
 	sc-sc_dev = self;
 
-	if (phycpus_attached == ~0) {
-		aprint_error(: increase MAXCPUS\n);
-		return;
-	}
-
 	/*
 	 * If we're an Application Processor, allocate a cpu_info
 	 * If we're the first attached CPU use the primary cpu_info,
@@ -258,9 +250,6 @@ cpu_attach(device_t parent, device_t sel
 	ci-ci_cpuid = caa-cpu_number;
 	ci-ci_vcpu = NULL;
 	ci-ci_index = nphycpu++;
-	ci-ci_cpumask = (1  cpu_index(ci));
-
-	atomic_or_32(phycpus_attached, ci-ci_cpumask);
 
 	if (!pmf_device_register(self, NULL, NULL))
 		aprint_error_dev(self, couldn't establish power handler\n);



CVS commit: [netbsd-6] src/sys/compat/linux/arch/powerpc

2012-02-24 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Feb 24 16:38:07 UTC 2012

Modified Files:
src/sys/compat/linux/arch/powerpc [netbsd-6]: linux_exec_powerpc.c

Log Message:
Pull up following revision(s) (requested by rjs in ticket #46):
sys/compat/linux/arch/powerpc/linux_exec_powerpc.c: revision 1.24
Switch to ANSI style declaration.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.23.2.1 \
src/sys/compat/linux/arch/powerpc/linux_exec_powerpc.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/linux/arch/powerpc/linux_exec_powerpc.c
diff -u src/sys/compat/linux/arch/powerpc/linux_exec_powerpc.c:1.23 src/sys/compat/linux/arch/powerpc/linux_exec_powerpc.c:1.23.2.1
--- src/sys/compat/linux/arch/powerpc/linux_exec_powerpc.c:1.23	Fri Feb  3 20:11:53 2012
+++ src/sys/compat/linux/arch/powerpc/linux_exec_powerpc.c	Fri Feb 24 16:38:07 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_exec_powerpc.c,v 1.23 2012/02/03 20:11:53 matt Exp $ */
+/* $NetBSD: linux_exec_powerpc.c,v 1.23.2.1 2012/02/24 16:38:07 riz Exp $ */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: linux_exec_powerpc.c,v 1.23 2012/02/03 20:11:53 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: linux_exec_powerpc.c,v 1.23.2.1 2012/02/24 16:38:07 riz Exp $);
 
 #define ELFSIZE 32
 
@@ -62,12 +62,9 @@ __KERNEL_RCSID(0, $NetBSD: linux_exec_p
  * Alpha and PowerPC specific linux copyargs function.
  */
 int
-ELFNAME2(linux,copyargs)(l, pack, arginfo, stackp, argp)
-	struct lwp *l;
-	struct exec_package *pack;
-	struct ps_strings *arginfo;
-	char **stackp;
-	void *argp;
+ELFNAME2(linux,copyargs)(struct lwp *l, struct exec_package *pack,
+			 struct ps_strings *arginfo, char **stackp,
+			 void *argp)
 {
 	size_t len;
 	AuxInfo ai[LINUX_ELF_AUX_ENTRIES], *a;



CVS commit: [netbsd-6] src/doc

2012-02-24 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Feb 24 16:41:05 UTC 2012

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

Log Message:
Tickets 43, 45, 46.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.16 -r1.1.2.17 src/doc/CHANGES-6.0

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

Modified files:

Index: src/doc/CHANGES-6.0
diff -u src/doc/CHANGES-6.0:1.1.2.16 src/doc/CHANGES-6.0:1.1.2.17
--- src/doc/CHANGES-6.0:1.1.2.16	Fri Feb 24 16:30:28 2012
+++ src/doc/CHANGES-6.0	Fri Feb 24 16:41:05 2012
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.0,v 1.1.2.16 2012/02/24 16:30:28 riz Exp $
+# $NetBSD: CHANGES-6.0,v 1.1.2.17 2012/02/24 16:41:05 riz Exp $
 
 A complete list of changes from the initial NetBSD 6.0 branch on 15 Feb 2012
 until the 6.0 release:
@@ -472,3 +472,18 @@ lib/libterminfo/term.h1.11
 	PR/46075: fix typo set_color_paid - set_color_pair
 	[asau, ticket #42]
 
+external/gpl3/gcc/lib/libgomp/Makefile		1.7
+
+	Fix build failure on mips64.
+	[nonaka, ticket #43]
+
+sys/arch/xen/x86/cpu.c1.87-88
+
+	Remove artificial restriction on the number of physical CPUs.
+	[bouyer, ticket #45]
+
+sys/compat/linux/arch/powerpc/linux_exec_powerpc.c 1.24
+
+	Fix builds of Linux emulation on PowerPC platforms.
+	[rjs, ticket #46]
+



CVS commit: [netbsd-6] src/sys/arch/hp700/hp700

2012-02-24 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Feb 24 16:57:35 UTC 2012

Modified Files:
src/sys/arch/hp700/hp700 [netbsd-6]: disksubr.c machdep.c machdep.h
mainbus.c

Log Message:
Pull up following revision(s) (requested by skrll in ticket #47):
sys/arch/hp700/hp700/machdep.c: revision 1.108
sys/arch/hp700/hp700/mainbus.c: revision 1.81
sys/arch/hp700/hp700/disksubr.c: revision 1.27
sys/arch/hp700/hp700/machdep.h: revision 1.9
u_intXX_t - uintXX_t
Same code before and after.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.26.18.1 src/sys/arch/hp700/hp700/disksubr.c
cvs rdiff -u -r1.107 -r1.107.2.1 src/sys/arch/hp700/hp700/machdep.c
cvs rdiff -u -r1.8 -r1.8.18.1 src/sys/arch/hp700/hp700/machdep.h
cvs rdiff -u -r1.80 -r1.80.2.1 src/sys/arch/hp700/hp700/mainbus.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/hp700/hp700/disksubr.c
diff -u src/sys/arch/hp700/hp700/disksubr.c:1.26 src/sys/arch/hp700/hp700/disksubr.c:1.26.18.1
--- src/sys/arch/hp700/hp700/disksubr.c:1.26	Fri May  8 09:33:58 2009
+++ src/sys/arch/hp700/hp700/disksubr.c	Fri Feb 24 16:57:35 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: disksubr.c,v 1.26 2009/05/08 09:33:58 skrll Exp $	*/
+/*	$NetBSD: disksubr.c,v 1.26.18.1 2012/02/24 16:57:35 riz Exp $	*/
 
 /*	$OpenBSD: disksubr.c,v 1.6 2000/10/18 21:00:34 mickey Exp $	*/
 
@@ -68,7 +68,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: disksubr.c,v 1.26 2009/05/08 09:33:58 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: disksubr.c,v 1.26.18.1 2012/02/24 16:57:35 riz Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -92,7 +92,7 @@ readbsdlabel(struct buf *bp, void (*stra
 {
 	struct disklabel *dlp;
 	const char *msg = NULL;
-	u_int16_t cksum;
+	uint16_t cksum;
 
 	/* don't read the on-disk label if we are in spoofed-only mode */
 	if (spoofonly)

Index: src/sys/arch/hp700/hp700/machdep.c
diff -u src/sys/arch/hp700/hp700/machdep.c:1.107 src/sys/arch/hp700/hp700/machdep.c:1.107.2.1
--- src/sys/arch/hp700/hp700/machdep.c:1.107	Sun Feb  5 08:24:43 2012
+++ src/sys/arch/hp700/hp700/machdep.c	Fri Feb 24 16:57:35 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.107 2012/02/05 08:24:43 skrll Exp $	*/
+/*	$NetBSD: machdep.c,v 1.107.2.1 2012/02/24 16:57:35 riz Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.107 2012/02/05 08:24:43 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.107.2.1 2012/02/24 16:57:35 riz Exp $);
 
 #include opt_cputype.h
 #include opt_ddb.h
@@ -152,7 +152,7 @@ int dcache_stride, dcache_line_mask;
 /*
  * things to not kill
  */
-volatile u_int8_t *machine_ledaddr;
+volatile uint8_t *machine_ledaddr;
 int machine_ledword, machine_leds;
 
 /*
@@ -1457,7 +1457,7 @@ cpu_reboot(int howto, char *user_boot_st
 	/* NOTREACHED */
 }
 
-u_int32_t dumpmag = 0x8fca0101;	/* magic number */
+uint32_t dumpmag = 0x8fca0101;	/* magic number */
 int	dumpsize = 0;		/* pages */
 long	dumplo = 0;		/* blocks */
 

Index: src/sys/arch/hp700/hp700/machdep.h
diff -u src/sys/arch/hp700/hp700/machdep.h:1.8 src/sys/arch/hp700/hp700/machdep.h:1.8.18.1
--- src/sys/arch/hp700/hp700/machdep.h:1.8	Tue Nov  3 05:07:25 2009
+++ src/sys/arch/hp700/hp700/machdep.h	Fri Feb 24 16:57:35 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.h,v 1.8 2009/11/03 05:07:25 snj Exp $	*/
+/*	$NetBSD: machdep.h,v 1.8.18.1 2012/02/24 16:57:35 riz Exp $	*/
 
 /*	$OpenBSD: cpufunc.h,v 1.17 2000/05/15 17:22:40 mickey Exp $	*/
 
@@ -95,7 +95,7 @@ void hp700_pagezero_unmap(int);
 /* Blinking the LEDs. */
 #ifdef USELEDS
 #define	_HP700_LED_FREQ		(16)
-extern volatile u_int8_t *machine_ledaddr;
+extern volatile uint8_t *machine_ledaddr;
 extern int machine_ledword, machine_leds;
 extern int _hp700_led_on_cycles[];
 #define hp700_led_blink(i)			\

Index: src/sys/arch/hp700/hp700/mainbus.c
diff -u src/sys/arch/hp700/hp700/mainbus.c:1.80 src/sys/arch/hp700/hp700/mainbus.c:1.80.2.1
--- src/sys/arch/hp700/hp700/mainbus.c:1.80	Mon Jan  9 15:15:40 2012
+++ src/sys/arch/hp700/hp700/mainbus.c	Fri Feb 24 16:57:35 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: mainbus.c,v 1.80 2012/01/09 15:15:40 martin Exp $	*/
+/*	$NetBSD: mainbus.c,v 1.80.2.1 2012/02/24 16:57:35 riz Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.80 2012/01/09 15:15:40 martin Exp $);
+__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.80.2.1 2012/02/24 16:57:35 riz Exp $);
 
 #include locators.h
 #include power.h
@@ -118,38 +118,38 @@ static int mb_attached;
 /* from machdep.c */
 extern struct extent *hp700_io_extent;
 
-u_int8_t mbus_r1(void *, bus_space_handle_t, bus_size_t);
-u_int16_t mbus_r2(void *, bus_space_handle_t, bus_size_t);
-u_int32_t mbus_r4(void *, bus_space_handle_t, bus_size_t);

CVS commit: [netbsd-6] src/doc

2012-02-24 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Feb 24 17:00:02 UTC 2012

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

Log Message:
Ticket 47.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.17 -r1.1.2.18 src/doc/CHANGES-6.0

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

Modified files:

Index: src/doc/CHANGES-6.0
diff -u src/doc/CHANGES-6.0:1.1.2.17 src/doc/CHANGES-6.0:1.1.2.18
--- src/doc/CHANGES-6.0:1.1.2.17	Fri Feb 24 16:41:05 2012
+++ src/doc/CHANGES-6.0	Fri Feb 24 17:00:02 2012
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.0,v 1.1.2.17 2012/02/24 16:41:05 riz Exp $
+# $NetBSD: CHANGES-6.0,v 1.1.2.18 2012/02/24 17:00:02 riz Exp $
 
 A complete list of changes from the initial NetBSD 6.0 branch on 15 Feb 2012
 until the 6.0 release:
@@ -487,3 +487,11 @@ sys/compat/linux/arch/powerpc/linux_exec
 	Fix builds of Linux emulation on PowerPC platforms.
 	[rjs, ticket #46]
 
+sys/arch/hp700/hp700/disksubr.c			1.27
+sys/arch/hp700/hp700/machdep.c			1.108
+sys/arch/hp700/hp700/machdep.h			1.9
+sys/arch/hp700/hp700/mainbus.c			1.81
+
+	u_intXX_t - uintXX_t changes to ease future pullups.
+	[skrll, ticket #47]
+



CVS commit: [netbsd-6] src

2012-02-24 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Feb 24 17:18:58 UTC 2012

Modified Files:
src/external/bsd/acpica/bin/iasl [netbsd-6]: Makefile
src/sys/external/bsd/acpica/dist/include [netbsd-6]: acapps.h

Log Message:
Pull up following revision(s) (requested by go in ticket #48):
external/bsd/acpica/bin/iasl/Makefile: revision 1.5
sys/external/bsd/acpica/dist/include/acapps.h: revision 1.2
Fix MKREPRO = yes
XXX: pullup to 6
Fix for MKREPRO = yes
XXX: pullup to 6
Use the release date as suggested.
XXX: I bet this is going to be broken in the next import because nobody
will remember to fix it.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.4.4.1 src/external/bsd/acpica/bin/iasl/Makefile
cvs rdiff -u -r1.1.1.2 -r1.1.1.2.16.1 \
src/sys/external/bsd/acpica/dist/include/acapps.h

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

Modified files:

Index: src/external/bsd/acpica/bin/iasl/Makefile
diff -u src/external/bsd/acpica/bin/iasl/Makefile:1.4 src/external/bsd/acpica/bin/iasl/Makefile:1.4.4.1
--- src/external/bsd/acpica/bin/iasl/Makefile:1.4	Tue Jun 28 09:11:33 2011
+++ src/external/bsd/acpica/bin/iasl/Makefile	Fri Feb 24 17:18:58 2012
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.4 2011/06/28 09:11:33 jruoho Exp $
+# $NetBSD: Makefile,v 1.4.4.1 2012/02/24 17:18:58 riz Exp $
 
 .if (${MACHINE_ARCH} == i386 || ${MACHINE_ARCH} == x86_64)
 PROG=	iasl
@@ -13,6 +13,9 @@ TOPDIR=	${NETBSDSRCDIR}/sys/external/bsd
 CPPFLAGS+=	-I${TOPDIR}/../include -I${TOPDIR} -I.
 CPPFLAGS+=	-D__NetBSD__ -DACPI_ASL_COMPILER -DACPI_USE_ALTERNATE_TIMEOUT
 CPPFLAGS+=	-D_USE_BERKELEY_YACC
+.if ${MKREPRO:Uno} == yes
+CPPFLAGS+=	-DACPI_REPRO
+.endif
 LDADD+=		-ll -ly -lrt -lpthread
 DPADD+=		${LIBL} ${LIBY} ${LIBRT} ${LIBPTHREAD}
 

Index: src/sys/external/bsd/acpica/dist/include/acapps.h
diff -u src/sys/external/bsd/acpica/dist/include/acapps.h:1.1.1.2 src/sys/external/bsd/acpica/dist/include/acapps.h:1.1.1.2.16.1
--- src/sys/external/bsd/acpica/dist/include/acapps.h:1.1.1.2	Thu Feb 17 10:01:18 2011
+++ src/sys/external/bsd/acpica/dist/include/acapps.h	Fri Feb 24 17:18:58 2012
@@ -67,17 +67,22 @@
 #endif
 
 /* Macros for signons and file headers */
+#ifdef ACPI_REPRO
+#define ACPI_DATE 23 Jun 2011
+#else
+#define ACPI_DATE __DATE__
+#endif
 
 #define ACPI_COMMON_SIGNON(UtilityName) \
 \n%s\n%s version %8.8X%s [%s]\n%s\n\n, \
 ACPICA_NAME, \
-UtilityName, ((UINT32) ACPI_CA_VERSION), ACPI_WIDTH, __DATE__, \
+UtilityName, ((UINT32) ACPI_CA_VERSION), ACPI_WIDTH, ACPI_DATE, \
 ACPICA_COPYRIGHT
 
 #define ACPI_COMMON_HEADER(UtilityName, Prefix) \
 %s%s\n%s%s version %8.8X%s [%s]\n%s%s\n%s\n, \
 Prefix, ACPICA_NAME, \
-Prefix, UtilityName, ((UINT32) ACPI_CA_VERSION), ACPI_WIDTH, __DATE__, \
+Prefix, UtilityName, ((UINT32) ACPI_CA_VERSION), ACPI_WIDTH, ACPI_DATE, \
 Prefix, ACPICA_COPYRIGHT, \
 Prefix
 



CVS commit: [netbsd-6] src/doc

2012-02-24 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Feb 24 17:19:14 UTC 2012

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

Log Message:
Ticket 48


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.18 -r1.1.2.19 src/doc/CHANGES-6.0

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

Modified files:

Index: src/doc/CHANGES-6.0
diff -u src/doc/CHANGES-6.0:1.1.2.18 src/doc/CHANGES-6.0:1.1.2.19
--- src/doc/CHANGES-6.0:1.1.2.18	Fri Feb 24 17:00:02 2012
+++ src/doc/CHANGES-6.0	Fri Feb 24 17:19:14 2012
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.0,v 1.1.2.18 2012/02/24 17:00:02 riz Exp $
+# $NetBSD: CHANGES-6.0,v 1.1.2.19 2012/02/24 17:19:14 riz Exp $
 
 A complete list of changes from the initial NetBSD 6.0 branch on 15 Feb 2012
 until the 6.0 release:
@@ -495,3 +495,9 @@ sys/arch/hp700/hp700/mainbus.c			1.81
 	u_intXX_t - uintXX_t changes to ease future pullups.
 	[skrll, ticket #47]
 
+external/bsd/acpica/bin/iasl/Makefile		1.5
+sys/external/bsd/acpica/dist/include/acapps.h	1.2-3
+
+	Fixes for MKREPRO=yes builds.
+	[go, ticket #48]
+



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

2012-02-24 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Fri Feb 24 17:29:32 UTC 2012

Modified Files:
src/sys/arch/x86/x86 [netbsd-5]: pmap.c
src/sys/arch/xen/x86 [netbsd-5]: x86_xpmap.c

Log Message:
Pull up the following revisions(s) (requested by bouyer in ticket #1729):
sys/arch/x86/x86/pmap.c:revision 1.170 via patch
sys/arch/xen/x86/x86_xpmap.c:   revision 1.40 via patch

Fix random kernel panic on domains with large memory.
May fix PR port-xen/38699


To generate a diff of this commit:
cvs rdiff -u -r1.74.4.3 -r1.74.4.4 src/sys/arch/x86/x86/pmap.c
cvs rdiff -u -r1.11 -r1.11.4.1 src/sys/arch/xen/x86/x86_xpmap.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/pmap.c
diff -u src/sys/arch/x86/x86/pmap.c:1.74.4.3 src/sys/arch/x86/x86/pmap.c:1.74.4.4
--- src/sys/arch/x86/x86/pmap.c:1.74.4.3	Thu Apr 22 20:02:48 2010
+++ src/sys/arch/x86/x86/pmap.c	Fri Feb 24 17:29:32 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.74.4.3 2010/04/22 20:02:48 snj Exp $	*/
+/*	$NetBSD: pmap.c,v 1.74.4.4 2012/02/24 17:29:32 sborrill Exp $	*/
 
 /*
  * Copyright (c) 2007 Manuel Bouyer.
@@ -154,7 +154,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.74.4.3 2010/04/22 20:02:48 snj Exp $);
+__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.74.4.4 2012/02/24 17:29:32 sborrill Exp $);
 
 #include opt_user_ldt.h
 #include opt_lockdebug.h
@@ -535,7 +535,12 @@ static struct pool_cache pmap_pv_cache;
  * special VAs and the PTEs that map them
  */
 static pt_entry_t *csrc_pte, *cdst_pte, *zero_pte, *ptp_pte, *early_zero_pte;
-static char *csrcp, *cdstp, *zerop, *ptpp, *early_zerop;
+static char *csrcp, *cdstp, *zerop, *ptpp;
+#ifdef XEN
+char *early_zerop; /* also referenced from xen_pmap_bootstrap() */
+#else
+static char *early_zerop;
+#endif
 
 /*
  * pool and cache that PDPs are allocated from
@@ -1340,8 +1345,11 @@ pmap_bootstrap(vaddr_t kva_start)
 		 * when it's called for the first time.
 		 * XXXfvdl fix this for MULTIPROCESSOR later.
 		 */
-
+#ifdef XEN
+		/* early_zerop initialized in xen_pmap_bootstrap() */
+#else
 		early_zerop = (void *)(KERNBASE + NKL2_KIMG_ENTRIES * NBPD_L2);
+#endif
 		early_zero_pte = PTE_BASE + pl1_i((unsigned long)early_zerop);
 	}
 

Index: src/sys/arch/xen/x86/x86_xpmap.c
diff -u src/sys/arch/xen/x86/x86_xpmap.c:1.11 src/sys/arch/xen/x86/x86_xpmap.c:1.11.4.1
--- src/sys/arch/xen/x86/x86_xpmap.c:1.11	Fri Oct 24 21:09:24 2008
+++ src/sys/arch/xen/x86/x86_xpmap.c	Fri Feb 24 17:29:32 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: x86_xpmap.c,v 1.11 2008/10/24 21:09:24 jym Exp $	*/
+/*	$NetBSD: x86_xpmap.c,v 1.11.4.1 2012/02/24 17:29:32 sborrill Exp $	*/
 
 /*
  * Copyright (c) 2006 Mathieu Ropert m...@adviseo.fr
@@ -79,7 +79,7 @@
 
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: x86_xpmap.c,v 1.11 2008/10/24 21:09:24 jym Exp $);
+__KERNEL_RCSID(0, $NetBSD: x86_xpmap.c,v 1.11.4.1 2012/02/24 17:29:32 sborrill Exp $);
 
 #include opt_xen.h
 #include opt_ddb.h
@@ -545,6 +545,7 @@ xen_pmap_bootstrap(void)
 	 *  - UAREA
 	 *  - dummy user PGD (x86_64)
 	 *  - HYPERVISOR_shared_info
+	 *  - early_zerop
 	 *  - ISA I/O mem (if needed)
 	 */
 	mapsize += UPAGES * NBPG;
@@ -552,6 +553,7 @@ xen_pmap_bootstrap(void)
 	mapsize += NBPG;
 #endif
 	mapsize += NBPG;
+	mapsize += NBPG;
 
 #ifdef DOM0OPS
 	if (xendomain_is_dom0()) {
@@ -639,6 +641,7 @@ xen_bootstrap_tables (vaddr_t old_pgd, v
 	vaddr_t page, avail, text_end, map_end;
 	int i;
 	extern char __data_start;
+	extern char *early_zerop; /* from pmap.c */
 
 	__PRINTK((xen_bootstrap_tables(0x%lx, 0x%lx, %d, %d)\n,
 	old_pgd, new_pgd, old_count, new_count));
@@ -652,6 +655,7 @@ xen_bootstrap_tables (vaddr_t old_pgd, v
 	 *  UAREA
 	 *  dummy user PGD (x86_64 only)/gdt page (i386 only)
 	 *  HYPERVISOR_shared_info
+	 *  early_zerop
 	 *  ISA I/O mem (if needed)
 	 */
 	map_end = new_pgd + ((new_count + l2_4_count) * NBPG);
@@ -659,6 +663,8 @@ xen_bootstrap_tables (vaddr_t old_pgd, v
 		map_end += (UPAGES + 1) * NBPG;
 		HYPERVISOR_shared_info = (shared_info_t *)map_end;
 		map_end += NBPG;
+		early_zerop = (char *)map_end;
+		map_end += NBPG;
 	}
 	/*
 	 * we always set atdevbase, as it's used by init386 to find the first



CVS commit: [netbsd-5] src/doc

2012-02-24 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Fri Feb 24 17:30:24 UTC 2012

Modified Files:
src/doc [netbsd-5]: CHANGES-5.2

Log Message:
Ticket #1729


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.138 -r1.1.2.139 src/doc/CHANGES-5.2

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

Modified files:

Index: src/doc/CHANGES-5.2
diff -u src/doc/CHANGES-5.2:1.1.2.138 src/doc/CHANGES-5.2:1.1.2.139
--- src/doc/CHANGES-5.2:1.1.2.138	Fri Feb 24 00:01:59 2012
+++ src/doc/CHANGES-5.2	Fri Feb 24 17:30:24 2012
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.2,v 1.1.2.138 2012/02/24 00:01:59 riz Exp $
+# $NetBSD: CHANGES-5.2,v 1.1.2.139 2012/02/24 17:30:24 sborrill Exp $
 
 A complete list of changes from the NetBSD 5.1 release to the NetBSD 5.2
 release:
@@ -6039,3 +6039,10 @@ dist/nvi/cl/cl_main.c1.3
 	Print a warning if TERM is not set and stdin is a tty. PR bin/42144.
 	[spz, ticket #1723]
 
+sys/arch/x86/x86/pmap.c1.170 via patch
+sys/arch/xen/x86/x86_xpmap.c			1.40 via patch
+
+	Fix random kernel panic on domains with large memory.
+	May fix PR port-xen/38699
+	[bouyer, ticket #1729]
+



CVS commit: [netbsd-5] src/sys/arch/xen/xen

2012-02-24 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Fri Feb 24 17:45:29 UTC 2012

Modified Files:
src/sys/arch/xen/xen [netbsd-5]: if_xennet_xenbus.c

Log Message:
Pull up the following revisions(s) (requested by bouyer in ticket #1730):
sys/arch/xen/xen/if_xennet_xenbus.c:revision 1.59 via patch

Fix receive stall on the domU side when buffers stay a long time in the
network stack or socket buffers.


To generate a diff of this commit:
cvs rdiff -u -r1.29.2.6 -r1.29.2.7 src/sys/arch/xen/xen/if_xennet_xenbus.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/xen/xen/if_xennet_xenbus.c
diff -u src/sys/arch/xen/xen/if_xennet_xenbus.c:1.29.2.6 src/sys/arch/xen/xen/if_xennet_xenbus.c:1.29.2.7
--- src/sys/arch/xen/xen/if_xennet_xenbus.c:1.29.2.6	Thu May 19 21:13:07 2011
+++ src/sys/arch/xen/xen/if_xennet_xenbus.c	Fri Feb 24 17:45:29 2012
@@ -1,4 +1,4 @@
-/*  $NetBSD: if_xennet_xenbus.c,v 1.29.2.6 2011/05/19 21:13:07 bouyer Exp $  */
+/*  $NetBSD: if_xennet_xenbus.c,v 1.29.2.7 2012/02/24 17:45:29 sborrill Exp $  */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -61,7 +61,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_xennet_xenbus.c,v 1.29.2.6 2011/05/19 21:13:07 bouyer Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_xennet_xenbus.c,v 1.29.2.7 2012/02/24 17:45:29 sborrill Exp $);
 
 #include opt_xen.h
 #include opt_nfs_boot.h
@@ -130,7 +130,6 @@ int xennet_debug = 0xff;
 #endif
 
 #define GRANT_INVALID_REF -1 /* entry is free */
-#define GRANT_STACK_REF   -2 /* entry owned by the network stack */
 
 #define NET_TX_RING_SIZE __RING_SIZE((netif_tx_sring_t *)0, PAGE_SIZE)
 #define NET_RX_RING_SIZE __RING_SIZE((netif_rx_sring_t *)0, PAGE_SIZE)
@@ -192,6 +191,9 @@ struct xennet_xenbus_softc {
 static multicall_entry_t rx_mcl[NET_RX_RING_SIZE+1];
 static u_long xennet_pages[NET_RX_RING_SIZE];
 
+static pool_cache_t if_xennetrxbuf_cache;
+static int if_xennetrxbuf_cache_inited=0;
+
 static int  xennet_xenbus_match(device_t, cfdata_t, void *);
 static void xennet_xenbus_attach(device_t, device_t, void *);
 static int  xennet_xenbus_detach(device_t, int);
@@ -202,6 +204,7 @@ static void xennet_alloc_rx_buffer(struc
 static void xennet_free_rx_buffer(struct xennet_xenbus_softc *);
 static void xennet_tx_complete(struct xennet_xenbus_softc *);
 static void xennet_rx_mbuf_free(struct mbuf *, void *, size_t, void *);
+static void xennet_rx_free_req(struct xennet_rxreq *);
 static int  xennet_handler(void *);
 static int  xennet_talk_to_backend(struct xennet_xenbus_softc *);
 #ifdef XENNET_DEBUG_DUMP
@@ -278,6 +281,14 @@ xennet_xenbus_attach(device_t parent, de
 	sc-sc_xbusd = xa-xa_xbusd;
 	sc-sc_xbusd-xbusd_otherend_changed = xennet_backend_changed;
 
+	/* xenbus ensure 2 devices can't be probed at the same time */
+	if (if_xennetrxbuf_cache_inited == 0) {
+		if_xennetrxbuf_cache = pool_cache_init(PAGE_SIZE, 0, 0, 0,
+		xnfrx, NULL, IPL_VM, NULL, NULL, NULL);
+		if_xennetrxbuf_cache_inited = 1;
+	}
+		
+
 	/* initialize free RX and RX request lists */
 	SLIST_INIT(sc-sc_txreq_head);
 	for (i = 0; i  NET_TX_RING_SIZE; i++) {
@@ -291,13 +302,10 @@ xennet_xenbus_attach(device_t parent, de
 		struct xennet_rxreq *rxreq = sc-sc_rxreqs[i];
 		rxreq-rxreq_id = i;
 		rxreq-rxreq_sc = sc;
-		rxreq-rxreq_va = uvm_km_alloc(kernel_map,
-		PAGE_SIZE, PAGE_SIZE, UVM_KMF_WIRED | UVM_KMF_ZERO);
+		rxreq-rxreq_va = (vaddr_t)pool_cache_get_paddr(
+		if_xennetrxbuf_cache, PR_WAITOK, rxreq-rxreq_pa);
 		if (rxreq-rxreq_va == 0)
 			break;
-		if (!pmap_extract(pmap_kernel(), rxreq-rxreq_va,
-		rxreq-rxreq_pa))
-			panic(%s: no pa for mapped va ?, device_xname(self));
 		rxreq-rxreq_gntref = GRANT_INVALID_REF;
 		SLIST_INSERT_HEAD(sc-sc_rxreq_head, rxreq, rxreq_next);
 	}
@@ -560,7 +568,7 @@ xennet_alloc_rx_buffer(struct xennet_xen
 	RING_IDX i;
 	struct xennet_rxreq *req;
 	struct xen_memory_reservation reservation;
-	int s1, s2, otherend_id;
+	int s1, s2, otherend_id, notify;
 	paddr_t pfn;
 
 	otherend_id = sc-sc_xbusd-xbusd_otherend_id;
@@ -647,9 +655,10 @@ out_loop:
 	}
 
 	sc-sc_rx_ring.req_prod_pvt = req_prod + i;
-	RING_PUSH_REQUESTS(sc-sc_rx_ring);
-
+	RING_PUSH_REQUESTS_AND_CHECK_NOTIFY(sc-sc_rx_ring, notify);
 	splx(s1);
+	if (notify)
+		hypervisor_notify_via_evtchn(sc-sc_evtchn);
 	return;
 }
 
@@ -669,14 +678,6 @@ xennet_free_rx_buffer(struct xennet_xenb
 	for (i = 0; i  NET_RX_RING_SIZE; i++) {
 		struct xennet_rxreq *rxreq = sc-sc_rxreqs[i];
 
-		/*
-		 * if the buffer is in transit in the network stack, wait for
-		 * the network stack to free it.
-		 */
-		while ((volatile grant_ref_t)rxreq-rxreq_gntref ==
-		GRANT_STACK_REF)
-			tsleep(xennet_xenbus_detach, PRIBIO, xnet_free, hz/2);
-
 		if (rxreq-rxreq_gntref != GRANT_INVALID_REF) {
 			/*
 			 * this req is still granted. Get back the page or
@@ -746,7 +747,20 @@ xennet_free_rx_buffer(struct xennet_xenb

CVS commit: [netbsd-5] src/doc

2012-02-24 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Fri Feb 24 17:45:53 UTC 2012

Modified Files:
src/doc [netbsd-5]: CHANGES-5.2

Log Message:
Ticket #1730


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.139 -r1.1.2.140 src/doc/CHANGES-5.2

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

Modified files:

Index: src/doc/CHANGES-5.2
diff -u src/doc/CHANGES-5.2:1.1.2.139 src/doc/CHANGES-5.2:1.1.2.140
--- src/doc/CHANGES-5.2:1.1.2.139	Fri Feb 24 17:30:24 2012
+++ src/doc/CHANGES-5.2	Fri Feb 24 17:45:53 2012
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.2,v 1.1.2.139 2012/02/24 17:30:24 sborrill Exp $
+# $NetBSD: CHANGES-5.2,v 1.1.2.140 2012/02/24 17:45:53 sborrill Exp $
 
 A complete list of changes from the NetBSD 5.1 release to the NetBSD 5.2
 release:
@@ -6046,3 +6046,9 @@ sys/arch/xen/x86/x86_xpmap.c			1.40 via 
 	May fix PR port-xen/38699
 	[bouyer, ticket #1729]
 
+sys/arch/xen/xen/if_xennet_xenbus.c		1.59 via patch
+
+	Fix receive stall on the domU side when buffer stays a
+	long time in the network stack or socket buffers.
+	[bouyer, ticket #1730]
+



CVS commit: [netbsd-6] src/external/bsd/pkg_install/dist

2012-02-24 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Feb 24 17:50:18 UTC 2012

Modified Files:
src/external/bsd/pkg_install/dist/add [netbsd-6]: perform.c
src/external/bsd/pkg_install/dist/lib [netbsd-6]: version.h
Removed Files:
src/external/bsd/pkg_install/dist/admin [netbsd-6]: README
src/external/bsd/pkg_install/dist/delete [netbsd-6]: pkg_delete.1.in

Log Message:
external/bsd/pkg_install/dist/lib/version.h 1.9 via patch
external/bsd/pkg_install/dist/add/perform.c 1.3 via patch
external/bsd/pkg_install/dist/admin/README  delete
external/bsd/pkg_install/dist/delete/pkg_delete.1.indelete

Sync with the most recent version of pkg_install(1).
[wiz, ticket #24]


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.18.6.1 -r1.1.1.18.6.2 \
src/external/bsd/pkg_install/dist/add/perform.c
cvs rdiff -u -r1.1.1.1 -r0 src/external/bsd/pkg_install/dist/admin/README
cvs rdiff -u -r1.1.1.1 -r0 \
src/external/bsd/pkg_install/dist/delete/pkg_delete.1.in
cvs rdiff -u -r1.7.6.1 -r1.7.6.2 \
src/external/bsd/pkg_install/dist/lib/version.h

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

Modified files:

Index: src/external/bsd/pkg_install/dist/add/perform.c
diff -u src/external/bsd/pkg_install/dist/add/perform.c:1.1.1.18.6.1 src/external/bsd/pkg_install/dist/add/perform.c:1.1.1.18.6.2
--- src/external/bsd/pkg_install/dist/add/perform.c:1.1.1.18.6.1	Mon Feb 20 21:41:29 2012
+++ src/external/bsd/pkg_install/dist/add/perform.c	Fri Feb 24 17:50:17 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: perform.c,v 1.1.1.18.6.1 2012/02/20 21:41:29 sborrill Exp $	*/
+/*	$NetBSD: perform.c,v 1.1.1.18.6.2 2012/02/24 17:50:17 riz Exp $	*/
 #if HAVE_CONFIG_H
 #include config.h
 #endif
@@ -6,7 +6,7 @@
 #if HAVE_SYS_CDEFS_H
 #include sys/cdefs.h
 #endif
-__RCSID($NetBSD: perform.c,v 1.1.1.18.6.1 2012/02/20 21:41:29 sborrill Exp $);
+__RCSID($NetBSD: perform.c,v 1.1.1.18.6.2 2012/02/24 17:50:17 riz Exp $);
 
 /*-
  * Copyright (c) 2003 Grant Beattie gr...@netbsd.org
@@ -206,7 +206,7 @@ mkdir_p(const char *path)
 
 		if (mkdir(p, 0777) == -1) {
 			saved_errno = errno;
-			if (stat(path, sb) == 0) {
+			if (stat(p, sb) == 0) {
 if (S_ISDIR(sb.st_mode))
 	goto pass;
 errno = ENOTDIR;

Index: src/external/bsd/pkg_install/dist/lib/version.h
diff -u src/external/bsd/pkg_install/dist/lib/version.h:1.7.6.1 src/external/bsd/pkg_install/dist/lib/version.h:1.7.6.2
--- src/external/bsd/pkg_install/dist/lib/version.h:1.7.6.1	Mon Feb 20 21:41:30 2012
+++ src/external/bsd/pkg_install/dist/lib/version.h	Fri Feb 24 17:50:18 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: version.h,v 1.7.6.1 2012/02/20 21:41:30 sborrill Exp $	*/
+/*	$NetBSD: version.h,v 1.7.6.2 2012/02/24 17:50:18 riz Exp $	*/
 
 /*
  * Copyright (c) 2001 Thomas Klausner.  All rights reserved.
@@ -27,6 +27,6 @@
 #ifndef _INST_LIB_VERSION_H_
 #define _INST_LIB_VERSION_H_
 
-#define PKGTOOLS_VERSION 20120128
+#define PKGTOOLS_VERSION 20120221
 
 #endif /* _INST_LIB_VERSION_H_ */



CVS commit: [netbsd-6] src/doc

2012-02-24 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Feb 24 17:50:35 UTC 2012

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

Log Message:
Ticket #24.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.19 -r1.1.2.20 src/doc/CHANGES-6.0

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

Modified files:

Index: src/doc/CHANGES-6.0
diff -u src/doc/CHANGES-6.0:1.1.2.19 src/doc/CHANGES-6.0:1.1.2.20
--- src/doc/CHANGES-6.0:1.1.2.19	Fri Feb 24 17:19:14 2012
+++ src/doc/CHANGES-6.0	Fri Feb 24 17:50:35 2012
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.0,v 1.1.2.19 2012/02/24 17:19:14 riz Exp $
+# $NetBSD: CHANGES-6.0,v 1.1.2.20 2012/02/24 17:50:35 riz Exp $
 
 A complete list of changes from the initial NetBSD 6.0 branch on 15 Feb 2012
 until the 6.0 release:
@@ -501,3 +501,11 @@ sys/external/bsd/acpica/dist/include/aca
 	Fixes for MKREPRO=yes builds.
 	[go, ticket #48]
 
+external/bsd/pkg_install/dist/lib/version.h		1.9 via patch
+external/bsd/pkg_install/dist/add/perform.c		1.3 via patch
+external/bsd/pkg_install/dist/admin/README		delete
+external/bsd/pkg_install/dist/delete/pkg_delete.1.in	delete
+
+	Sync with the most recent version of pkg_install(1).
+	[wiz, ticket #24]
+



CVS commit: [netbsd-5] src/sys/dev/raidframe

2012-02-24 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Fri Feb 24 17:58:45 UTC 2012

Modified Files:
src/sys/dev/raidframe [netbsd-5]: rf_reconmap.c rf_reconstruct.c

Log Message:
Pull up the following revisions(s) (requested by oster in ticket #1728):
sys/dev/raidframe/rf_reconmap.c:revision 1.34
sys/dev/raidframe/rf_reconstruct.c: revision 1.118

Remove a DIAGNOSTIC check that is invalid for RAID5_RS.
Add logic to the main reconstruction loop to handle RAID5 with rotated
spares. Correct issue where we were doing one more stripe than necessary.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.31.8.1 src/sys/dev/raidframe/rf_reconmap.c
cvs rdiff -u -r1.105.4.4 -r1.105.4.5 src/sys/dev/raidframe/rf_reconstruct.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/raidframe/rf_reconmap.c
diff -u src/sys/dev/raidframe/rf_reconmap.c:1.31 src/sys/dev/raidframe/rf_reconmap.c:1.31.8.1
--- src/sys/dev/raidframe/rf_reconmap.c:1.31	Mon May 19 19:49:54 2008
+++ src/sys/dev/raidframe/rf_reconmap.c	Fri Feb 24 17:58:44 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: rf_reconmap.c,v 1.31 2008/05/19 19:49:54 oster Exp $	*/
+/*	$NetBSD: rf_reconmap.c,v 1.31.8.1 2012/02/24 17:58:44 sborrill Exp $	*/
 /*
  * Copyright (c) 1995 Carnegie-Mellon University.
  * All rights reserved.
@@ -34,7 +34,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rf_reconmap.c,v 1.31 2008/05/19 19:49:54 oster Exp $);
+__KERNEL_RCSID(0, $NetBSD: rf_reconmap.c,v 1.31.8.1 2012/02/24 17:58:44 sborrill Exp $);
 
 #include rf_raid.h
 #include sys/time.h
@@ -156,7 +156,14 @@ rf_ReconMapUpdate(RF_Raid_t *raidPtr, RF
 
 		/* do we need to move the queue? */
 		while (i  mapPtr-high_ru) {
+#if 0
 #ifdef DIAGNOSTIC
+			/* XXX: The check below is not valid for
+			 * RAID5_RS.  It is valid for RAID 1 and RAID 5.
+			 * The issue is that we can easily have
+			 * RU_NOTHING entries here too, and those are
+			 * quite correct.
+			 */
 			if (mapPtr-status[mapPtr-head]!=RU_ALL) {
 printf(\nraid%d: reconmap incorrect -- working on i % PRIu64 \n,
    raidPtr-raidid, i);
@@ -169,6 +176,7 @@ rf_ReconMapUpdate(RF_Raid_t *raidPtr, RF
 panic(reconmap incorrect);
 			} 
 #endif
+#endif
 			mapPtr-low_ru++;
 			mapPtr-high_ru++;
 			/* initialize highest RU status entry, which

Index: src/sys/dev/raidframe/rf_reconstruct.c
diff -u src/sys/dev/raidframe/rf_reconstruct.c:1.105.4.4 src/sys/dev/raidframe/rf_reconstruct.c:1.105.4.5
--- src/sys/dev/raidframe/rf_reconstruct.c:1.105.4.4	Sun Nov 21 22:06:53 2010
+++ src/sys/dev/raidframe/rf_reconstruct.c	Fri Feb 24 17:58:44 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: rf_reconstruct.c,v 1.105.4.4 2010/11/21 22:06:53 riz Exp $	*/
+/*	$NetBSD: rf_reconstruct.c,v 1.105.4.5 2012/02/24 17:58:44 sborrill Exp $	*/
 /*
  * Copyright (c) 1995 Carnegie-Mellon University.
  * All rights reserved.
@@ -33,7 +33,7 @@
  /
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rf_reconstruct.c,v 1.105.4.4 2010/11/21 22:06:53 riz Exp $);
+__KERNEL_RCSID(0, $NetBSD: rf_reconstruct.c,v 1.105.4.5 2012/02/24 17:58:44 sborrill Exp $);
 
 #include sys/param.h
 #include sys/time.h
@@ -557,6 +557,9 @@ rf_ContinueReconstructFailedDisk(RF_Raid
 	RF_ReconCtrl_t *tmp_reconctrl;
 	RF_ReconEvent_t *event;
 	RF_StripeCount_t incPSID,lastPSID,num_writes,pending_writes,prev;
+#if RF_INCLUDE_RAID5_RS  0
+	RF_StripeCount_t startPSID,endPSID,aPSID,bPSID,offPSID;
+#endif
 	RF_ReconUnitCount_t RUsPerPU;
 	struct timeval etime, elpsd;
 	unsigned long xor_s, xor_resid_us;
@@ -609,7 +612,17 @@ rf_ContinueReconstructFailedDisk(RF_Raid
 	recon_error = 0;
 	write_error = 0;
 	pending_writes = incPSID;
-	raidPtr-reconControl-lastPSID = incPSID;
+	raidPtr-reconControl-lastPSID = incPSID - 1;
+
+	/* bounds check raidPtr-reconControl-lastPSID and
+	   pending_writes so that we don't attempt to wait for more IO
+	   than can possibly happen */
+
+	if (raidPtr-reconControl-lastPSID  lastPSID)
+		raidPtr-reconControl-lastPSID = lastPSID;
+
+	if (pending_writes  lastPSID)
+		pending_writes = lastPSID;
 
 	/* start the actual reconstruction */
 
@@ -623,6 +636,49 @@ rf_ContinueReconstructFailedDisk(RF_Raid
 		}
 
 		num_writes = 0;
+
+#if RF_INCLUDE_RAID5_RS  0
+		/* For RAID5 with Rotated Spares we will be 'short'
+		   some number of writes since no writes will get
+		   issued for stripes where the spare is on the
+		   component being rebuilt.  Account for the shortage
+		   here so that we don't hang indefinitely below
+		   waiting for writes to complete that were never
+		   scheduled.
+
+		   XXX: Should be fixed for PARITY_DECLUSTERING and
+		   others too! 
+
+		*/
+
+		if (raidPtr-Layout.numDataCol  
+		raidPtr-numCol - raidPtr-Layout.numParityCol) {
+			/* numDataCol is at least 2 less 

CVS commit: [netbsd-5] src/doc

2012-02-24 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Fri Feb 24 17:59:26 UTC 2012

Modified Files:
src/doc [netbsd-5]: CHANGES-5.2

Log Message:
Ticket #1728


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.140 -r1.1.2.141 src/doc/CHANGES-5.2

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

Modified files:

Index: src/doc/CHANGES-5.2
diff -u src/doc/CHANGES-5.2:1.1.2.140 src/doc/CHANGES-5.2:1.1.2.141
--- src/doc/CHANGES-5.2:1.1.2.140	Fri Feb 24 17:45:53 2012
+++ src/doc/CHANGES-5.2	Fri Feb 24 17:59:26 2012
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.2,v 1.1.2.140 2012/02/24 17:45:53 sborrill Exp $
+# $NetBSD: CHANGES-5.2,v 1.1.2.141 2012/02/24 17:59:26 sborrill Exp $
 
 A complete list of changes from the NetBSD 5.1 release to the NetBSD 5.2
 release:
@@ -6052,3 +6052,12 @@ sys/arch/xen/xen/if_xennet_xenbus.c		1.5
 	long time in the network stack or socket buffers.
 	[bouyer, ticket #1730]
 
+sys/dev/raidframe/rf_reconmap.c			1.34
+sys/dev/raidframe/rf_reconstruct.c		1.118
+
+	Remove a DIAGNOSTIC check that is invalid for RAID5_RS.
+	Add logic to the main reconstruction loop to handle RAID5 with
+	rotated spares. Correct issues where we were doing one more
+	stripe than necessary.
+	[oster, ticket #1728]
+



CVS commit: src/lib/libquota

2012-02-24 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Fri Feb 24 18:00:09 UTC 2012

Modified Files:
src/lib/libquota: quota_oldfiles.c

Log Message:
Check if fstab file exists before trying to parse it, to avoid
warnings from {get,set}fsent() functions if missing.

dholland ok.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/lib/libquota/quota_oldfiles.c

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

Modified files:

Index: src/lib/libquota/quota_oldfiles.c
diff -u src/lib/libquota/quota_oldfiles.c:1.8 src/lib/libquota/quota_oldfiles.c:1.9
--- src/lib/libquota/quota_oldfiles.c:1.8	Wed Feb  1 06:12:37 2012
+++ src/lib/libquota/quota_oldfiles.c	Fri Feb 24 18:00:09 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: quota_oldfiles.c,v 1.8 2012/02/01 06:12:37 dholland Exp $	*/
+/*	$NetBSD: quota_oldfiles.c,v 1.9 2012/02/24 18:00:09 njoly Exp $	*/
 
 /*
  * Copyright (c) 1980, 1990, 1993
@@ -33,7 +33,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: quota_oldfiles.c,v 1.8 2012/02/01 06:12:37 dholland Exp $);
+__RCSID($NetBSD: quota_oldfiles.c,v 1.9 2012/02/24 18:00:09 njoly Exp $);
 
 #include sys/types.h
 #include sys/stat.h
@@ -205,6 +205,13 @@ __quota_oldfiles_load_fstab(void)
 	}
 
 	/*
+	 * Check if fstab file exists before trying to parse it.
+	 * Avoid warnings from {get,set}fsent() if missing.
+	 */
+	if (access(_PATH_FSTAB, F_OK) == -1  errno == ENOENT)
+		return;
+
+	/*
 	 * XXX: should be able to handle ext2fs quota1 files too
 	 *
 	 * XXX: should use getfsent_r(), but there isn't one.



CVS commit: src/sys/dev/ic

2012-02-24 Thread Michael L. Hitch
Module Name:src
Committed By:   mhitch
Date:   Fri Feb 24 18:04:51 UTC 2012

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

Log Message:
Reserve a CCB for the driver.  Stops the annoying cac0: unable to alloc CCB
messages.


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

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

Modified files:

Index: src/sys/dev/ic/ld_cac.c
diff -u src/sys/dev/ic/ld_cac.c:1.26 src/sys/dev/ic/ld_cac.c:1.27
--- src/sys/dev/ic/ld_cac.c:1.26	Thu Feb  2 19:43:03 2012
+++ src/sys/dev/ic/ld_cac.c	Fri Feb 24 18:04:51 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: ld_cac.c,v 1.26 2012/02/02 19:43:03 tls Exp $	*/
+/*	$NetBSD: ld_cac.c,v 1.27 2012/02/24 18:04:51 mhitch Exp $	*/
 
 /*-
  * Copyright (c) 2000, 2006 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ld_cac.c,v 1.26 2012/02/02 19:43:03 tls Exp $);
+__KERNEL_RCSID(0, $NetBSD: ld_cac.c,v 1.27 2012/02/24 18:04:51 mhitch Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -103,7 +103,7 @@ ld_cac_attach(device_t parent, device_t 
 
 	ld-sc_secsize = CAC_GET2(dinfo.secsize);
 	ld-sc_maxxfer = CAC_MAX_XFER;
-	ld-sc_maxqueuecnt = CAC_MAX_CCBS / cac-sc_nunits;	/* XXX */
+	ld-sc_maxqueuecnt = (CAC_MAX_CCBS - 1) / cac-sc_nunits;
 	ld-sc_secperunit = CAC_GET2(dinfo.ncylinders) *
 	CAC_GET1(dinfo.nheads) * CAC_GET1(dinfo.nsectors);
 	ld-sc_start = ld_cac_start;



CVS commit: src/sys/arch/hp700/stand

2012-02-24 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Feb 24 18:45:20 UTC 2012

Modified Files:
src/sys/arch/hp700/stand/mkboot: mkboot.c
src/sys/arch/hp700/stand/xxboot: iplsum.c main.c readufs.h

Log Message:
More u_intXX_t - uintXX_t

Same code before and after.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/hp700/stand/mkboot/mkboot.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/hp700/stand/xxboot/iplsum.c \
src/sys/arch/hp700/stand/xxboot/readufs.h
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/hp700/stand/xxboot/main.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/hp700/stand/mkboot/mkboot.c
diff -u src/sys/arch/hp700/stand/mkboot/mkboot.c:1.7 src/sys/arch/hp700/stand/mkboot/mkboot.c:1.8
--- src/sys/arch/hp700/stand/mkboot/mkboot.c:1.7	Wed Mar 18 16:00:11 2009
+++ src/sys/arch/hp700/stand/mkboot/mkboot.c	Fri Feb 24 18:45:20 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: mkboot.c,v 1.7 2009/03/18 16:00:11 cegger Exp $	*/
+/*	$NetBSD: mkboot.c,v 1.8 2012/02/24 18:45:20 skrll Exp $	*/
 
 /*	$OpenBSD: mkboot.c,v 1.9 2001/05/17 00:57:55 pvalchev Exp $	*/
 
@@ -101,7 +101,7 @@ struct exec {
 
 #define N_GETMAGIC(ex) \
 ex).a_midmag)0x) ? \
-(ntohl((u_int32_t)((ex).a_midmag))0x) : ((ex).a_midmag))
+(ntohl((uint32_t)((ex).a_midmag))0x) : ((ex).a_midmag))
 
 #include stdio.h
 #include ctype.h

Index: src/sys/arch/hp700/stand/xxboot/iplsum.c
diff -u src/sys/arch/hp700/stand/xxboot/iplsum.c:1.5 src/sys/arch/hp700/stand/xxboot/iplsum.c:1.6
--- src/sys/arch/hp700/stand/xxboot/iplsum.c:1.5	Mon Feb 21 02:31:57 2011
+++ src/sys/arch/hp700/stand/xxboot/iplsum.c	Fri Feb 24 18:45:20 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: iplsum.c,v 1.5 2011/02/21 02:31:57 itohy Exp $	*/
+/*	$NetBSD: iplsum.c,v 1.6 2012/02/24 18:45:20 skrll Exp $	*/
 
 /*
  * Calculate 32bit checksum of IPL and store in a certain location
@@ -13,7 +13,7 @@
 #include netinet/in.h
 
 #ifndef __BIT_TYPES_DEFINED__
-typedef unsigned int	u_int32_t;
+typedef unsigned int	uint32_t;
 #endif
 
 /* see README.ipl */
@@ -27,9 +27,9 @@ typedef unsigned int	u_int32_t;
 #define BOOTSIZE	(IPLOFF + IPLSIZE)
 #define BOOTBLOCKSIZE	8192
 
-u_int32_t bootblk[BOOTSIZE / sizeof(u_int32_t) + 1];
+uint32_t bootblk[BOOTSIZE / sizeof(uint32_t) + 1];
 
-#define SUMOFF		((IPLOFF + 4) / sizeof(u_int32_t))
+#define SUMOFF		((IPLOFF + 4) / sizeof(uint32_t))
 
 #ifdef __STDC__
 int main(int, char *[]);
@@ -40,7 +40,7 @@ main(int argc, char *argv[])
 {
 	FILE *fp;
 	int len;
-	u_int32_t sum, *p;
+	uint32_t sum, *p;
 	int iploff, iplsumsize;
 
 	if (argc != 3) {
@@ -67,8 +67,8 @@ main(int argc, char *argv[])
 		fprintf(stderr, %s: bad LIF magic\n, argv[1]);
 		return 1;
 	}
-	iploff = ntohl(bootblk[0xf0 / sizeof(u_int32_t)]);
-	iplsumsize = ntohl(bootblk[0xf4 / sizeof(u_int32_t)]);
+	iploff = ntohl(bootblk[0xf0 / sizeof(uint32_t)]);
+	iplsumsize = ntohl(bootblk[0xf4 / sizeof(uint32_t)]);
 	printf(%d bytes free, ipl offset = %d, ipl sum size = %d\n,
 	BOOTSIZE - len, iploff, iplsumsize);
 	if (iploff != IPLOFF || iplsumsize = 0 || iplsumsize % 2048 ||
@@ -79,20 +79,20 @@ main(int argc, char *argv[])
 
 	/* checksum */
 	sum = 0;
-	for (p = bootblk + IPLOFF / sizeof(u_int32_t);
-	p  bootblk + (IPLOFF + IPL1SIZE) / sizeof(u_int32_t); p++)
+	for (p = bootblk + IPLOFF / sizeof(uint32_t);
+	p  bootblk + (IPLOFF + IPL1SIZE) / sizeof(uint32_t); p++)
 		sum += ntohl(*p);
 
 	bootblk[SUMOFF] = htonl(ntohl(bootblk[SUMOFF]) - sum);
 
 	/* transfer ipl part 2 */
-	memcpy(bootblk + IPL2ONDISK / sizeof(u_int32_t),
-	bootblk + (IPLOFF + IPL1SIZE) / sizeof(u_int32_t),
+	memcpy(bootblk + IPL2ONDISK / sizeof(uint32_t),
+	bootblk + (IPLOFF + IPL1SIZE) / sizeof(uint32_t),
 	IPL2SIZE);
 
 	/* transfer ipl part 3 */
-	memcpy(bootblk + IPL3ONDISK / sizeof(u_int32_t),
-	bootblk + (IPLOFF + IPL1SIZE + IPL2SIZE) / sizeof(u_int32_t),
+	memcpy(bootblk + IPL3ONDISK / sizeof(uint32_t),
+	bootblk + (IPLOFF + IPL1SIZE + IPL2SIZE) / sizeof(uint32_t),
 	IPL3SIZE);
 
 	/* write file */
Index: src/sys/arch/hp700/stand/xxboot/readufs.h
diff -u src/sys/arch/hp700/stand/xxboot/readufs.h:1.5 src/sys/arch/hp700/stand/xxboot/readufs.h:1.6
--- src/sys/arch/hp700/stand/xxboot/readufs.h:1.5	Mon Feb 21 02:31:57 2011
+++ src/sys/arch/hp700/stand/xxboot/readufs.h	Fri Feb 24 18:45:20 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: readufs.h,v 1.5 2011/02/21 02:31:57 itohy Exp $	*/
+/*	$NetBSD: readufs.h,v 1.6 2012/02/24 18:45:20 skrll Exp $	*/
 /*	from Id: readufs.h,v 1.10 2003/12/16 13:54:11 itohy Exp	*/
 
 /*
@@ -76,9 +76,9 @@ struct ufs_info {
 #endif
 
 	/* superblock information */
-	u_int32_t bsize;	/* fs block size */
-	u_int32_t nindir;	/* # indirect per block */
-	u_int32_t fsbtodb;	/* block - sector shift count */
+	uint32_t bsize;	/* fs block size */
+	uint32_t nindir;	/* # indirect per block */
+	uint32_t fsbtodb;	/* block - sector shift count 

CVS commit: src/usr.bin/ftp

2012-02-24 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Fri Feb 24 19:40:49 UTC 2012

Modified Files:
src/usr.bin/ftp: fetch.c

Log Message:
When given an URL that contains :// but is not recognised,
print an error message.  Now ftp https://foo/bar; prints

ftp: Unsupported URL scheme `https'

instead of

ftp: Can't lookup `https:ftp': No address associated with hostname
ftp: Can't connect or login to host `https:?'


To generate a diff of this commit:
cvs rdiff -u -r1.195 -r1.196 src/usr.bin/ftp/fetch.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/ftp/fetch.c
diff -u src/usr.bin/ftp/fetch.c:1.195 src/usr.bin/ftp/fetch.c:1.196
--- src/usr.bin/ftp/fetch.c:1.195	Sat Dec 10 05:53:58 2011
+++ src/usr.bin/ftp/fetch.c	Fri Feb 24 19:40:49 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: fetch.c,v 1.195 2011/12/10 05:53:58 lukem Exp $	*/
+/*	$NetBSD: fetch.c,v 1.196 2012/02/24 19:40:49 apb Exp $	*/
 
 /*-
  * Copyright (c) 1997-2009 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
 
 #include sys/cdefs.h
 #ifndef lint
-__RCSID($NetBSD: fetch.c,v 1.195 2011/12/10 05:53:58 lukem Exp $);
+__RCSID($NetBSD: fetch.c,v 1.196 2012/02/24 19:40:49 apb Exp $);
 #endif /* not lint */
 
 /*
@@ -700,7 +700,7 @@ fetch_url(const char *url, const char *p
 		hints.ai_protocol = 0;
 		error = getaddrinfo(host, port, hints, res0);
 		if (error) {
-			warnx(Can't lookup `%s:%s': %s, host, port,
+			warnx(Can't LOOKUP `%s:%s': %s, host, port,
 			(error == EAI_SYSTEM) ? strerror(errno)
 		  : gai_strerror(error));
 			goto cleanup_fetch_url;
@@ -1687,6 +1687,7 @@ static int
 go_fetch(const char *url)
 {
 	char *proxyenv;
+	char *p;
 
 #ifndef NO_ABOUT
 	/*
@@ -1731,6 +1732,18 @@ go_fetch(const char *url)
 		return (fetch_url(url, NULL, NULL, NULL));
 
 	/*
+	 * If it contains :// but does not begin with ftp://
+	 * or something that was already handled, then it's
+	 * unsupported.
+	 *
+	 * If it contains : but not :// then we assume the
+	 * part before the colon is a host name, not an URL scheme,
+	 * so we don't try to match that here.
+	 */
+	if ((p = strstr(url, ://)) != NULL  ! STRNEQUAL(url, FTP_URL))
+		errx(1, Unsupported URL scheme `%.*s', (p - url), url);
+
+	/*
 	 * Try FTP URL-style and host:file arguments next.
 	 * If ftpproxy is set with an FTP URL, use fetch_url()
 	 * Othewise, use fetch_ftp().



CVS commit: src/usr.bin/ftp

2012-02-24 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Fri Feb 24 19:53:31 UTC 2012

Modified Files:
src/usr.bin/ftp: fetch.c

Log Message:
subtracting two pointers yields ptrdiff_t, so cast it to int.


To generate a diff of this commit:
cvs rdiff -u -r1.196 -r1.197 src/usr.bin/ftp/fetch.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/ftp/fetch.c
diff -u src/usr.bin/ftp/fetch.c:1.196 src/usr.bin/ftp/fetch.c:1.197
--- src/usr.bin/ftp/fetch.c:1.196	Fri Feb 24 19:40:49 2012
+++ src/usr.bin/ftp/fetch.c	Fri Feb 24 19:53:31 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: fetch.c,v 1.196 2012/02/24 19:40:49 apb Exp $	*/
+/*	$NetBSD: fetch.c,v 1.197 2012/02/24 19:53:31 apb Exp $	*/
 
 /*-
  * Copyright (c) 1997-2009 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
 
 #include sys/cdefs.h
 #ifndef lint
-__RCSID($NetBSD: fetch.c,v 1.196 2012/02/24 19:40:49 apb Exp $);
+__RCSID($NetBSD: fetch.c,v 1.197 2012/02/24 19:53:31 apb Exp $);
 #endif /* not lint */
 
 /*
@@ -1741,7 +1741,7 @@ go_fetch(const char *url)
 	 * so we don't try to match that here.
 	 */
 	if ((p = strstr(url, ://)) != NULL  ! STRNEQUAL(url, FTP_URL))
-		errx(1, Unsupported URL scheme `%.*s', (p - url), url);
+		errx(1, Unsupported URL scheme `%.*s', (int)(p - url), url);
 
 	/*
 	 * Try FTP URL-style and host:file arguments next.



CVS commit: src/external/gpl3/gdb/dist/gdb

2012-02-24 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Feb 24 22:41:12 UTC 2012

Modified Files:
src/external/gpl3/gdb/dist/gdb: objfiles.c

Log Message:
PR/46068: Fix symbol loading on i386 kernels. On i386 lma != vma and gdb7
depends on them being != to detect overlays and avoid loading them. I've
disabled the test for now.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/gpl3/gdb/dist/gdb/objfiles.c

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

Modified files:

Index: src/external/gpl3/gdb/dist/gdb/objfiles.c
diff -u src/external/gpl3/gdb/dist/gdb/objfiles.c:1.1.1.1 src/external/gpl3/gdb/dist/gdb/objfiles.c:1.2
--- src/external/gpl3/gdb/dist/gdb/objfiles.c:1.1.1.1	Sat Sep 24 16:11:41 2011
+++ src/external/gpl3/gdb/dist/gdb/objfiles.c	Fri Feb 24 17:41:12 2012
@@ -1125,6 +1125,13 @@ static int
 insert_section_p (const struct bfd *abfd,
 		  const struct bfd_section *section)
 {
+#ifndef __NetBSD__
+  /*
+   * On NetBSD we don't typically have overlay sections and in some of
+   * our kernels (i386 vma = lma | 0xc000), so the following test
+   * makes kernels not load any symbols. There must be a better way to
+   * detect overlays.
+   */
   const bfd_vma lma = bfd_section_lma (abfd, section);
 
   if (lma != 0  lma != bfd_section_vma (abfd, section)
@@ -1133,6 +1140,7 @@ insert_section_p (const struct bfd *abfd
discarding sections from the system supplied DSO (aka vdso)
on some Linux systems (e.g. Fedora 11).  */
 return 0;
+#endif
   if ((bfd_get_section_flags (abfd, section)  SEC_THREAD_LOCAL) != 0)
 /* This is a TLS section.  */
 return 0;



CVS commit: src/dist/nvi

2012-02-24 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sat Feb 25 00:13:00 UTC 2012

Modified Files:
src/dist/nvi/ex: ex_tag.c
src/dist/nvi/vi: vs_msg.c

Log Message:
Don't use loops with empty body.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/dist/nvi/ex/ex_tag.c
cvs rdiff -u -r1.4 -r1.5 src/dist/nvi/vi/vs_msg.c

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

Modified files:

Index: src/dist/nvi/ex/ex_tag.c
diff -u src/dist/nvi/ex/ex_tag.c:1.10 src/dist/nvi/ex/ex_tag.c:1.11
--- src/dist/nvi/ex/ex_tag.c:1.10	Wed Aug 17 12:56:55 2011
+++ src/dist/nvi/ex/ex_tag.c	Sat Feb 25 00:13:00 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: ex_tag.c,v 1.10 2011/08/17 12:56:55 christos Exp $ */
+/*	$NetBSD: ex_tag.c,v 1.11 2012/02/25 00:13:00 joerg Exp $ */
 
 /*-
  * Copyright (c) 1992, 1993, 1994
@@ -1411,7 +1411,7 @@ ctag_file(SCR *sp, TAGF *tfp, char *name
 #define	GREATER		1
 #define	LESS		(-1)
 
-#define	SKIP_PAST_NEWLINE(p, back)	while (p  back  *p++ != '\n');
+#define	SKIP_PAST_NEWLINE(p, back)	while (p  back  *p++ != '\n') continue;
 
 static char *
 binary_search(register char *string, register char *front, register char *back)

Index: src/dist/nvi/vi/vs_msg.c
diff -u src/dist/nvi/vi/vs_msg.c:1.4 src/dist/nvi/vi/vs_msg.c:1.5
--- src/dist/nvi/vi/vs_msg.c:1.4	Thu May 13 17:52:11 2010
+++ src/dist/nvi/vi/vs_msg.c	Sat Feb 25 00:13:00 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: vs_msg.c,v 1.4 2010/05/13 17:52:11 tnozaki Exp $ */
+/*	$NetBSD: vs_msg.c,v 1.5 2012/02/25 00:13:00 joerg Exp $ */
 
 /*-
  * Copyright (c) 1993, 1994
@@ -897,7 +897,8 @@ vs_msgsave(SCR *sp, mtype_t mt, char *p,
 	if ((mp_c = gp-msgq.lh_first) == NULL) {
 		LIST_INSERT_HEAD(gp-msgq, mp_n, q);
 	} else {
-		for (; mp_c-q.le_next != NULL; mp_c = mp_c-q.le_next);
+		while (mp_c-q.le_next != NULL)
+			mp_c = mp_c-q.le_next;
 		LIST_INSERT_AFTER(mp_c, mp_n, q);
 	}
 	return;



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

2012-02-24 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sat Feb 25 00:13:28 UTC 2012

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

Log Message:
Avoid empty loop bodies.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/amd64/amd64/bios32.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/bios32.c
diff -u src/sys/arch/amd64/amd64/bios32.c:1.19 src/sys/arch/amd64/amd64/bios32.c:1.20
--- src/sys/arch/amd64/amd64/bios32.c:1.19	Sat Nov  7 07:27:40 2009
+++ src/sys/arch/amd64/amd64/bios32.c	Sat Feb 25 00:13:28 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: bios32.c,v 1.19 2009/11/07 07:27:40 cegger Exp $	*/
+/*	$NetBSD: bios32.c,v 1.20 2012/02/25 00:13:28 joerg Exp $	*/
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: bios32.c,v 1.19 2009/11/07 07:27:40 cegger Exp $);
+__KERNEL_RCSID(0, $NetBSD: bios32.c,v 1.20 2012/02/25 00:13:28 joerg Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -145,16 +145,16 @@ bios32_init(void)
 		if (sh-sig != BIOS32_MAKESIG('_', 'S', 'M', '_'))
 			continue;
 		i = sh-len;
-		for (chksum = 0; i--; chksum += p[i])
-			;
+		for (chksum = 0; i--; )
+			chksum += p[i];
 		if (chksum != 0)
 			continue;
 		p += 0x10;
 		if (p[0] != '_'  p[1] != 'D'  p[2] != 'M' 
 		p[3] != 'I'  p[4] != '_')
 			continue;
-		for (chksum = 0, i = 0xf; i--; chksum += p[i]);
-			;
+		for (chksum = 0, i = 0xf; i--; )
+			chksum += p[i];
 		if (chksum != 0)
 			continue;
 



CVS commit: src/sys/arch/x68k/x68k

2012-02-24 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Feb 25 02:43:08 UTC 2012

Modified Files:
src/sys/arch/x68k/x68k: pmap_bootstrap.c

Log Message:
Reserve more bootstrap kernel PT pages if options EXTENDED_MEMORY is defined
for VA allocation in the extended memory probe function and possible 128MB
memory on 060turbo, as worksaround for x68k specific part of PR/45915.
Fixes GENERIC kernel panic on X68030 even without extended memory.
XXX: we should rather have proper probe function before pmap_bootstrap()

Tested on 060turbo with 128MB SIMM by Y.Sugahara, and also
tested on XM6i with 68030 and custom 128MB memory settings by isaki@.

Should be pulled up to netbsd-6.


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/sys/arch/x68k/x68k/pmap_bootstrap.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/x68k/x68k/pmap_bootstrap.c
diff -u src/sys/arch/x68k/x68k/pmap_bootstrap.c:1.58 src/sys/arch/x68k/x68k/pmap_bootstrap.c:1.59
--- src/sys/arch/x68k/x68k/pmap_bootstrap.c:1.58	Fri Feb 10 06:28:39 2012
+++ src/sys/arch/x68k/x68k/pmap_bootstrap.c	Sat Feb 25 02:43:08 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap_bootstrap.c,v 1.58 2012/02/10 06:28:39 mhitch Exp $	*/
+/*	$NetBSD: pmap_bootstrap.c,v 1.59 2012/02/25 02:43:08 tsutsui Exp $	*/
 
 /* 
  * Copyright (c) 1991, 1993
@@ -36,9 +36,10 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pmap_bootstrap.c,v 1.58 2012/02/10 06:28:39 mhitch Exp $);
+__KERNEL_RCSID(0, $NetBSD: pmap_bootstrap.c,v 1.59 2012/02/25 02:43:08 tsutsui Exp $);
 
 #include opt_m68k_arch.h
+#include opt_extmem.h
 
 #include sys/param.h
 #include uvm/uvm_extern.h
@@ -124,6 +125,19 @@ pmap_bootstrap(paddr_t nextpa, paddr_t f
 	kptpa = nextpa;
 	nptpages = RELOC(Sysptsize, int) + howmany(RELOC(physmem, int), NPTEPG) +
 		(IIOMAPSIZE + NPTEPG - 1) / NPTEPG;
+#ifdef EXTENDED_MEMORY
+	/*
+	 * Current supported maximum EXTENDED_MEMORY is 128MB on 060turbo.
+	 */
+#define MAX_EXTENDED_MEMORY	(128 * 1024 * 1024)
+	nptpages += howmany(btoc(MAX_EXTENDED_MEMORY), NPTEPG);
+
+	/*
+	 * mem_exist() in machdep.c needs two extra VA pages before pmap_init()
+	 * to probe 16MB memory.
+	 */
+	nptpages += 1;
+#endif
 	nextpa += nptpages * PAGE_SIZE;
 
 	/*



CVS commit: [jmcneill-usbmp] src/sys/dev/usb

2012-02-24 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat Feb 25 07:59:03 UTC 2012

Added Files:
src/sys/dev/usb [jmcneill-usbmp]: TODO.usbmp

Log Message:
document the status of usbmp branch.  major remaining tasks:

- port slhci, adm5120 usb and rump usb host controllers [*]
- implement usb_detach_wait/wakeup based upon cv/mutex [*]
- port drivers that use tsleep/wakeup to modern facilities
- port cdev/bdev drivers to D_MPSAFE
- update callouts to CALLOUT_MPSAFE
- test more devices [*]

only really more testing is necessary at this point, all the above
can be done after merging this code into -current.  items marked
with [*] are planned to be done before this.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1.2.1 src/sys/dev/usb/TODO.usbmp

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

Added files:

Index: src/sys/dev/usb/TODO.usbmp
diff -u /dev/null src/sys/dev/usb/TODO.usbmp:1.1.2.1
--- /dev/null	Sat Feb 25 07:59:04 2012
+++ src/sys/dev/usb/TODO.usbmp	Sat Feb 25 07:59:03 2012
@@ -0,0 +1,157 @@
+$NetBSD: TODO.usbmp,v 1.1.2.1 2012/02/25 07:59:03 mrg Exp $
+
+
+the majority of the USB MP device interface is documented in usbdivar.h.
+
+
+host controller porting:
+  - slhci
+  - arch/mips/adm5120/dev/ahci.c
+  - rump/dev/lib/libugenhc/ugenhc.c
+
+
+use /* XXXSMP ok */ markers for non-SMP-safe host controller driver uses.
+eg, if (lock_ptr) mutex_enter(lock_ptr); else s = splusb();
+
+
+add lots of asserts
+
+
+wakeup removal core:
+  - usb_detach_wait/wakeup() - add a usb_detach_cvwait/broadcast() that
+take a mutex
+
+
+convert uhidev users to MPSAFE:
+  ucycom(4) 
+  - own cdevsw that isn't D_MPSAFE; need to check intr handlers
+
+  uhid(4)
+  - needs some locking here (not completely tested changes)
+
+  ukbd(4)
+  ums(4)
+  uts(4)
+  pbms(4)
+  - depends upon wscons? check intr
+
+  uyurex(4)
+  - sysmon -- hm?
+
+
+wakeup/tsleep drivers:
+  - if_otus.c
+  - if_upgt.c
+  - if_zyd.c
+  - ucom.c
+  - ucycom.c
+  - ugen.c
+  - uirda.c
+  - ulpt.c
+  - umass_isdata.c
+  - usb.c
+  - usb_subr.c
+  - ustir.c
+  - uthum.c
+  - utoppy.c
+  - uvscom.c
+  - uyurex.c
+
+
+missing D_MPSAFE drivers:
+  - ucom
+  - ucycom
+  - ugen
+  - uhso
+  - ulpt
+  - urio
+  - usb
+  - uscanner
+  - utoppy
+
+
+missing CALLOUT_MPSAFE drivers:
+  - if_aue
+  - if_axe
+  - if_cue
+  - if_otus
+  - if_rum
+  - if_udav
+  - if_upgt
+  - if_ural
+  - if_url
+  - if_zyd
+  - ohci
+  - uhci
+  - ukbd
+  - ulpt
+  - usbdi
+  - uyurex
+
+
+driver testing:		STATUS
+  - uhub		working
+  - uhid		working, MPSAFE patches not yet fully tested
+  - uhidev		working
+  - ums			working
+  - uts
+  - ukbd		working
+  - ucycom
+  - uep
+  - udl
+  - ulpt
+  - uhso		? (must take kernel lock for scsipi)
+  - umass		working (must take kernel lock for scsipi)
+  - uaudio		working
+  - umidi		working
+  - uirda
+  - stuirda
+  - ustir
+  - irmce
+  - aue
+  - axe
+  - cdce
+  - cue
+  - kue
+  - udav
+  - url
+  - urndis
+  - atu
+  - otus
+  - ral
+  - rum
+  - upgt
+  - zyd
+  - upl
+  - uberry
+  - uipad
+  - urio
+  - uscanner		? (must take kernel lock for scsipi)
+  - usscanner
+  - utoppy
+  - uyap
+  - udsbr
+  - ugen
+  - pseye
+  - uvideo
+  - auvitek
+  - emdtv
+  - ubt
+  - aubtfwl
+  - u3ginit
+ucom attachments:
+  - umodem
+  - uark
+  - ubsa
+  - uchcom
+  - uftdi
+  - uipaq
+  - umct
+  - uplcom
+  - uslsa
+  - uvscom
+  - moscom
+  - uvisor
+  - ukyopon
+  - u3g
+  - ugensa