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

2012-01-14 Thread Matthias Scheler
Module Name:src
Committed By:   tron
Date:   Sat Jan 14 12:14:28 UTC 2012

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

Log Message:
Use optionsSPCTABCPU_UCODE to keep the indentation if the option
is commented out.


To generate a diff of this commit:
cvs rdiff -u -r1.1062 -r1.1063 src/sys/arch/i386/conf/GENERIC
cvs rdiff -u -r1.59 -r1.60 src/sys/arch/i386/conf/XEN3_DOM0

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/GENERIC
diff -u src/sys/arch/i386/conf/GENERIC:1.1062 src/sys/arch/i386/conf/GENERIC:1.1063
--- src/sys/arch/i386/conf/GENERIC:1.1062	Fri Jan 13 16:05:14 2012
+++ src/sys/arch/i386/conf/GENERIC	Sat Jan 14 12:14:28 2012
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.1062 2012/01/13 16:05:14 cegger Exp $
+# $NetBSD: GENERIC,v 1.1063 2012/01/14 12:14:28 tron Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@ include 	arch/i386/conf/std.i386
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.1062 $
+#ident 		GENERIC-$Revision: 1.1063 $
 
 maxusers	64		# estimated number of users
 
@@ -80,7 +80,7 @@ options 	NTP		# NTP phase/frequency lock
 
 options 	KTRACE		# system call tracing via ktrace(1)
 
-options		CPU_UCODE	# cpu ucode loading support
+options 	CPU_UCODE	# cpu ucode loading support
 
 # Note: SysV IPC parameters can be changed dynamically; see sysctl(8).
 options 	SYSVMSG		# System V-like message queues

Index: src/sys/arch/i386/conf/XEN3_DOM0
diff -u src/sys/arch/i386/conf/XEN3_DOM0:1.59 src/sys/arch/i386/conf/XEN3_DOM0:1.60
--- src/sys/arch/i386/conf/XEN3_DOM0:1.59	Fri Jan 13 16:05:14 2012
+++ src/sys/arch/i386/conf/XEN3_DOM0	Sat Jan 14 12:14:28 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: XEN3_DOM0,v 1.59 2012/01/13 16:05:14 cegger Exp $
+#	$NetBSD: XEN3_DOM0,v 1.60 2012/01/14 12:14:28 tron Exp $
 #
 #	XEN3_0: Xen 3.0 domain0 kernel
 
@@ -45,7 +45,7 @@ options 	NTP		# NTP phase/frequency lock
 
 options 	KTRACE		# system call tracing via ktrace(1)
 
-options		CPU_UCODE	# cpu ucode loading support
+options 	CPU_UCODE	# cpu ucode loading support
 
 options 	SYSVMSG		# System V-like message queues
 options 	SYSVSEM		# System V-like semaphores



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

2012-01-14 Thread Matthias Scheler
Module Name:src
Committed By:   tron
Date:   Sat Jan 14 12:30:12 UTC 2012

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

Log Message:
Add CPU_UCODE option.


To generate a diff of this commit:
cvs rdiff -u -r1.329 -r1.330 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.

Modified files:

Index: src/sys/arch/i386/conf/ALL
diff -u src/sys/arch/i386/conf/ALL:1.329 src/sys/arch/i386/conf/ALL:1.330
--- src/sys/arch/i386/conf/ALL:1.329	Sat Dec 31 00:11:20 2011
+++ src/sys/arch/i386/conf/ALL	Sat Jan 14 12:30:12 2012
@@ -1,4 +1,4 @@
-# $NetBSD: ALL,v 1.329 2011/12/31 00:11:20 christos Exp $
+# $NetBSD: ALL,v 1.330 2012/01/14 12:30:12 tron Exp $
 # From NetBSD: GENERIC,v 1.787 2006/10/01 18:37:54 bouyer Exp
 #
 # ALL machine description file
@@ -17,7 +17,7 @@ include 	arch/i386/conf/std.i386
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		ALL-$Revision: 1.329 $
+#ident 		ALL-$Revision: 1.330 $
 
 maxusers	64		# estimated number of users
 
@@ -79,6 +79,8 @@ options 	NTP		# NTP phase/frequency lock
 
 options 	KTRACE		# system call tracing via ktrace(1)
 
+options 	CPU_UCODE	# cpu ucode loading support
+
 # Note: SysV IPC parameters could be changed dynamically, see sysctl(8).
 options 	SYSVMSG		# System V-like message queues
 options 	SYSVSEM		# System V-like semaphores



CVS commit: src/doc

2012-01-14 Thread Takahiro Kambe
Module Name:src
Committed By:   taca
Date:   Sat Jan 14 13:46:57 UTC 2012

Modified Files:
src/doc: 3RDPARTY

Log Message:
Update ISC DHCP's current version and remove EOL'd.


To generate a diff of this commit:
cvs rdiff -u -r1.894 -r1.895 src/doc/3RDPARTY

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

Modified files:

Index: src/doc/3RDPARTY
diff -u src/doc/3RDPARTY:1.894 src/doc/3RDPARTY:1.895
--- src/doc/3RDPARTY:1.894	Wed Jan 11 01:20:10 2012
+++ src/doc/3RDPARTY	Sat Jan 14 13:46:56 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.894 2012/01/11 01:20:10 riz Exp $
+#	$NetBSD: 3RDPARTY,v 1.895 2012/01/14 13:46:56 taca Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -255,7 +255,7 @@ src/lib/libc/db/db2netbsd.
 
 Package:	dhcp
 Version:	3.0.3
-Current Vers:	3.1.3/4.0.2/4.1-ESV-R4/4.2.3-P1
+Current Vers:	4.1-ESV-R4/4.2.3-P2
 Maintainer:	mellon
 Archive Site:	ftp://ftp.isc.org/isc/dhcp/
 Home Page:	http://www.isc.org/software/dhcp/



CVS commit: src/sys/arch/mips/alchemy

2012-01-14 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Sat Jan 14 16:09:19 UTC 2012

Modified Files:
src/sys/arch/mips/alchemy: au_icu.c

Log Message:
+ Fix IPL_VM sr_bits for alchemy_ipl_sr_map.  Alchemy peripherals connects to
  MIPS_INT_MASK_[0-3].
+ Also add IPL_DDB.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/mips/alchemy/au_icu.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/mips/alchemy/au_icu.c
diff -u src/sys/arch/mips/alchemy/au_icu.c:1.28 src/sys/arch/mips/alchemy/au_icu.c:1.29
--- src/sys/arch/mips/alchemy/au_icu.c:1.28	Sun Jul 10 23:13:23 2011
+++ src/sys/arch/mips/alchemy/au_icu.c	Sat Jan 14 16:09:19 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: au_icu.c,v 1.28 2011/07/10 23:13:23 matt Exp $	*/
+/*	$NetBSD: au_icu.c,v 1.29 2012/01/14 16:09:19 kiyohara Exp $	*/
 
 /*-
  * Copyright (c) 2006 Itronix Inc.
@@ -68,7 +68,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: au_icu.c,v 1.28 2011/07/10 23:13:23 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: au_icu.c,v 1.29 2012/01/14 16:09:19 kiyohara Exp $);
 
 #include opt_ddb.h
 #define __INTR_PRIVATE
@@ -99,8 +99,13 @@ static const struct ipl_sr_map alchemy_i
 	[IPL_SOFTBIO] =		MIPS_SOFT_INT_MASK_0,
 	[IPL_SOFTNET] =		MIPS_SOFT_INT_MASK,
 	[IPL_SOFTSERIAL] =	MIPS_SOFT_INT_MASK,
-	[IPL_VM] =		MIPS_SOFT_INT_MASK|MIPS_INT_MASK_0,
+	[IPL_VM] =		MIPS_SOFT_INT_MASK |
+MIPS_INT_MASK_0	|
+MIPS_INT_MASK_1	|
+MIPS_INT_MASK_2 |
+MIPS_INT_MASK_3,
 	[IPL_SCHED] =		MIPS_INT_MASK,
+	[IPL_DDB] =		MIPS_INT_MASK,
 	[IPL_HIGH] =		MIPS_INT_MASK,
 },
 };



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

2012-01-14 Thread Reinoud Zandijk
Module Name:src
Committed By:   reinoud
Date:   Sat Jan 14 17:31:09 UTC 2012

Modified Files:
src/sys/arch/usermode/include: machdep.h

Log Message:
Add md_get_sp() for MI stack frame manipulation. Note that NetBSD/usermode
only works on decending stacks for now!


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/usermode/include/machdep.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/usermode/include/machdep.h
diff -u src/sys/arch/usermode/include/machdep.h:1.7 src/sys/arch/usermode/include/machdep.h:1.8
--- src/sys/arch/usermode/include/machdep.h:1.7	Tue Jan  3 10:53:46 2012
+++ src/sys/arch/usermode/include/machdep.h	Sat Jan 14 17:31:09 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.h,v 1.7 2012/01/03 10:53:46 reinoud Exp $ */
+/* $NetBSD: machdep.h,v 1.8 2012/01/14 17:31:09 reinoud Exp $ */
 
 /*-
  * Copyright (c) 2011 Reinoud Zandijk rein...@netbsd.org
@@ -36,10 +36,7 @@ void	md_syscall_set_returnargs(lwp_t *l,
 void	md_syscall_inc_pc(ucontext_t *ucp, uint32_t opcode);
 void	md_syscall_dec_pc(ucontext_t *ucp, uint32_t opcode);
 register_t md_get_pc(ucontext_t *ucp);
+register_t md_get_sp(ucontext_t *ucp);
 
 /* handlers */
 void	syscall(void);
-void	pagefault(void);
-
-/* signal stack */
-stack_t *usermode_signal_stack(void);



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

2012-01-14 Thread Reinoud Zandijk
Module Name:src
Committed By:   reinoud
Date:   Sat Jan 14 17:36:32 UTC 2012

Modified Files:
src/sys/arch/usermode/include: asm.h bswap.h byte_swap.h disklabel.h
elf_machdep.h endian.h endian_machdep.h genheaders.sh int_const.h
int_fmtio.h int_limits.h int_mwgwtypes.h int_types.h limits.h
netbsd32_machdep.h param.h ptrace.h wchar_limits.h

Log Message:
Update automatically generated headers


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/usermode/include/asm.h \
src/sys/arch/usermode/include/bswap.h \
src/sys/arch/usermode/include/byte_swap.h \
src/sys/arch/usermode/include/elf_machdep.h \
src/sys/arch/usermode/include/endian.h \
src/sys/arch/usermode/include/endian_machdep.h \
src/sys/arch/usermode/include/int_const.h \
src/sys/arch/usermode/include/int_fmtio.h \
src/sys/arch/usermode/include/int_limits.h \
src/sys/arch/usermode/include/int_mwgwtypes.h \
src/sys/arch/usermode/include/int_types.h \
src/sys/arch/usermode/include/limits.h \
src/sys/arch/usermode/include/netbsd32_machdep.h \
src/sys/arch/usermode/include/wchar_limits.h
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/usermode/include/disklabel.h \
src/sys/arch/usermode/include/ptrace.h
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/usermode/include/genheaders.sh
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/usermode/include/param.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/usermode/include/asm.h
diff -u src/sys/arch/usermode/include/asm.h:1.5 src/sys/arch/usermode/include/asm.h:1.6
--- src/sys/arch/usermode/include/asm.h:1.5	Sun Jan  8 18:05:43 2012
+++ src/sys/arch/usermode/include/asm.h	Sat Jan 14 17:36:32 2012
@@ -1,7 +1,7 @@
-/* $NetBSD: asm.h,v 1.5 2012/01/08 18:05:43 jmcneill Exp $ */
+/* $NetBSD: asm.h,v 1.6 2012/01/14 17:36:32 reinoud Exp $ */
 
 /*
- * Automatically generated by genheaders.sh on Sat Jan  7 19:13:27 EST 2012
+ * Automatically generated by ./genheaders.sh on Sat Jan 14 12:29:08 CET 2012
  * Do not modify directly!
  */
 #ifndef _USERMODE_ASM_H
Index: src/sys/arch/usermode/include/bswap.h
diff -u src/sys/arch/usermode/include/bswap.h:1.5 src/sys/arch/usermode/include/bswap.h:1.6
--- src/sys/arch/usermode/include/bswap.h:1.5	Sun Jan  8 18:05:43 2012
+++ src/sys/arch/usermode/include/bswap.h	Sat Jan 14 17:36:32 2012
@@ -1,7 +1,7 @@
-/* $NetBSD: bswap.h,v 1.5 2012/01/08 18:05:43 jmcneill Exp $ */
+/* $NetBSD: bswap.h,v 1.6 2012/01/14 17:36:32 reinoud Exp $ */
 
 /*
- * Automatically generated by genheaders.sh on Sat Jan  7 19:13:27 EST 2012
+ * Automatically generated by ./genheaders.sh on Sat Jan 14 12:29:08 CET 2012
  * Do not modify directly!
  */
 #ifndef _USERMODE_BSWAP_H
Index: src/sys/arch/usermode/include/byte_swap.h
diff -u src/sys/arch/usermode/include/byte_swap.h:1.5 src/sys/arch/usermode/include/byte_swap.h:1.6
--- src/sys/arch/usermode/include/byte_swap.h:1.5	Sun Jan  8 18:05:43 2012
+++ src/sys/arch/usermode/include/byte_swap.h	Sat Jan 14 17:36:32 2012
@@ -1,7 +1,7 @@
-/* $NetBSD: byte_swap.h,v 1.5 2012/01/08 18:05:43 jmcneill Exp $ */
+/* $NetBSD: byte_swap.h,v 1.6 2012/01/14 17:36:32 reinoud Exp $ */
 
 /*
- * Automatically generated by genheaders.sh on Sat Jan  7 19:13:27 EST 2012
+ * Automatically generated by ./genheaders.sh on Sat Jan 14 12:29:08 CET 2012
  * Do not modify directly!
  */
 #ifndef _USERMODE_BYTE_SWAP_H
Index: src/sys/arch/usermode/include/elf_machdep.h
diff -u src/sys/arch/usermode/include/elf_machdep.h:1.5 src/sys/arch/usermode/include/elf_machdep.h:1.6
--- src/sys/arch/usermode/include/elf_machdep.h:1.5	Sun Jan  8 18:05:43 2012
+++ src/sys/arch/usermode/include/elf_machdep.h	Sat Jan 14 17:36:32 2012
@@ -1,7 +1,7 @@
-/* $NetBSD: elf_machdep.h,v 1.5 2012/01/08 18:05:43 jmcneill Exp $ */
+/* $NetBSD: elf_machdep.h,v 1.6 2012/01/14 17:36:32 reinoud Exp $ */
 
 /*
- * Automatically generated by genheaders.sh on Sat Jan  7 19:13:27 EST 2012
+ * Automatically generated by ./genheaders.sh on Sat Jan 14 12:29:08 CET 2012
  * Do not modify directly!
  */
 #ifndef _USERMODE_ELF_MACHDEP_H
Index: src/sys/arch/usermode/include/endian.h
diff -u src/sys/arch/usermode/include/endian.h:1.5 src/sys/arch/usermode/include/endian.h:1.6
--- src/sys/arch/usermode/include/endian.h:1.5	Sun Jan  8 18:05:43 2012
+++ src/sys/arch/usermode/include/endian.h	Sat Jan 14 17:36:32 2012
@@ -1,7 +1,7 @@
-/* $NetBSD: endian.h,v 1.5 2012/01/08 18:05:43 jmcneill Exp $ */
+/* $NetBSD: endian.h,v 1.6 2012/01/14 17:36:32 reinoud Exp $ */
 
 /*
- * Automatically generated by genheaders.sh on Sat Jan  7 19:13:27 EST 2012
+ * Automatically generated by ./genheaders.sh on Sat Jan 14 12:29:08 CET 2012
  * Do not modify directly!
  */
 #ifndef _USERMODE_ENDIAN_H
Index: src/sys/arch/usermode/include/endian_machdep.h
diff -u src/sys/arch/usermode/include/endian_machdep.h:1.5 

CVS commit: src/sys/arch/usermode

2012-01-14 Thread Reinoud Zandijk
Module Name:src
Committed By:   reinoud
Date:   Sat Jan 14 17:42:52 UTC 2012

Modified Files:
src/sys/arch/usermode/dev: cpu.c
src/sys/arch/usermode/include: pcb.h
src/sys/arch/usermode/target/i386: cpu_i386.c
src/sys/arch/usermode/target/x86_64: cpu_x86_64.c
src/sys/arch/usermode/usermode: copy.c pmap.c syscall.c thunk.c trap.c

Log Message:
Revamp the NetBSD/usermode pagefault and illegal instruction handing. It now
can handle recursive entry and is a lot more memory tight compared to the old
implementation. Performance wise:

* slightly less number of syscalls/sec possible though could be optimized
* a lot faster context creation / destruction making overall operation faster.


To generate a diff of this commit:
cvs rdiff -u -r1.63 -r1.64 src/sys/arch/usermode/dev/cpu.c
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/usermode/include/pcb.h
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/usermode/target/i386/cpu_i386.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/usermode/target/x86_64/cpu_x86_64.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/usermode/usermode/copy.c
cvs rdiff -u -r1.101 -r1.102 src/sys/arch/usermode/usermode/pmap.c
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/usermode/usermode/syscall.c
cvs rdiff -u -r1.77 -r1.78 src/sys/arch/usermode/usermode/thunk.c
cvs rdiff -u -r1.55 -r1.56 src/sys/arch/usermode/usermode/trap.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/usermode/dev/cpu.c
diff -u src/sys/arch/usermode/dev/cpu.c:1.63 src/sys/arch/usermode/dev/cpu.c:1.64
--- src/sys/arch/usermode/dev/cpu.c:1.63	Thu Jan 12 13:28:54 2012
+++ src/sys/arch/usermode/dev/cpu.c	Sat Jan 14 17:42:51 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.c,v 1.63 2012/01/12 13:28:54 reinoud Exp $ */
+/* $NetBSD: cpu.c,v 1.64 2012/01/14 17:42:51 reinoud Exp $ */
 
 /*-
  * Copyright (c) 2007 Jared D. McNeill jmcne...@invisible.ca
@@ -30,7 +30,7 @@
 #include opt_hz.h
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.63 2012/01/12 13:28:54 reinoud Exp $);
+__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.64 2012/01/14 17:42:51 reinoud Exp $);
 
 #include sys/param.h
 #include sys/conf.h
@@ -78,9 +78,13 @@ typedef struct cpu_softc {
 	struct cpu_info	*sc_ci;
 } cpu_softc_t;
 
+
+/* statics */
 static struct pcb lwp0pcb;
 static void *um_msgbuf;
 
+
+/* attachment */
 CFATTACH_DECL_NEW(cpu, sizeof(cpu_softc_t), cpu_match, cpu_attach, NULL, NULL);
 
 static int
@@ -115,6 +119,8 @@ cpu_configure(void)
 	spl0();
 }
 
+
+/* main guts */
 void
 cpu_reboot(int howto, char *bootstr)
 {
@@ -226,7 +232,7 @@ cpu_getmcontext(struct lwp *l, mcontext_
 {
 	struct pcb *pcb = lwp_getpcb(l);
 	ucontext_t *ucp = pcb-pcb_userret_ucp;
-
+	
 #ifdef CPU_DEBUG
 	thunk_printf_debug(cpu_getmcontext\n);
 #endif
@@ -277,25 +283,7 @@ cpu_lwp_free2(struct lwp *l)
 
 	if (pcb == NULL)
 		return;
-
-	if (pcb-pcb_stack_userland) {
-		free(pcb-pcb_stack_userland, M_TEMP);
-		pcb-pcb_stack_userland = NULL;
-		pcb-pcb_ucp.uc_stack.ss_sp = NULL;
-		pcb-pcb_ucp.uc_stack.ss_size = 0;
-	}
-
-	if (pcb-pcb_stack_syscall) {
-		free(pcb-pcb_stack_syscall, M_TEMP);
-		pcb-pcb_syscall_ucp.uc_stack.ss_sp = NULL;
-		pcb-pcb_syscall_ucp.uc_stack.ss_size = 0;
-	}
-
-	if (pcb-pcb_stack_pagefault) {
-		free(pcb-pcb_stack_pagefault, M_TEMP);
-		pcb-pcb_pagefault_ucp.uc_stack.ss_sp = NULL;
-		pcb-pcb_pagefault_ucp.uc_stack.ss_size = 0;
-	}
+	/* XXX nothing to do? */
 }
 
 static void
@@ -332,42 +320,21 @@ cpu_lwp_fork(struct lwp *l1, struct lwp 
 	/* copy the PCB and its switchframes from parent */
 	memcpy(pcb2, pcb1, sizeof(struct pcb));
 
-	stacksize = 2*PAGE_SIZE;
-	pcb2-pcb_stack_userland  = malloc(stacksize, M_TEMP, M_WAITOK | M_ZERO);
-	pcb2-pcb_stack_syscall   = malloc(stacksize, M_TEMP, M_WAITOK | M_ZERO);
-	pcb2-pcb_stack_pagefault = malloc(stacksize, M_TEMP, M_WAITOK | M_ZERO);
-
-	KASSERT(pcb2-pcb_stack_userland);
-	KASSERT(pcb2-pcb_stack_syscall);
-	KASSERT(pcb2-pcb_stack_pagefault);
-
+	/* refresh context */
 	if (thunk_getcontext(pcb2-pcb_ucp))
 		panic(getcontext failed);
 
-	/* set up the ucontext for the userland switch */
-	pcb2-pcb_ucp.uc_stack.ss_sp = pcb2-pcb_stack_userland;
-	pcb2-pcb_ucp.uc_stack.ss_size = stacksize;
+	/* recalculate the system stack top */
+	pcb2-sys_stack_top = pcb2-sys_stack + TRAPSTACKSIZE;
+
+	/* get l2 its own stack */
+	pcb2-pcb_ucp.uc_stack.ss_sp = pcb2-sys_stack;
+	pcb2-pcb_ucp.uc_stack.ss_size = pcb2-sys_stack_top - pcb2-sys_stack;
 	pcb2-pcb_ucp.uc_flags = _UC_STACK | _UC_CPU;
 	pcb2-pcb_ucp.uc_link = pcb2-pcb_userret_ucp;
 	thunk_makecontext(pcb2-pcb_ucp,
 	(void (*)(void)) cpu_lwp_trampoline,
 	3, pcb2-pcb_ucp, func, arg);
-
-	/* set up the ucontext for the syscall */
-	pcb2-pcb_syscall_ucp.uc_stack.ss_sp = pcb2-pcb_stack_syscall;
-	pcb2-pcb_syscall_ucp.uc_stack.ss_size = stacksize;
-	pcb2-pcb_syscall_ucp.uc_flags = _UC_STACK | _UC_CPU;
-	pcb2-pcb_syscall_ucp.uc_link = pcb2-pcb_userret_ucp;
-	

CVS commit: src/sys/arch/powerpc

2012-01-14 Thread Frank Wille
Module Name:src
Committed By:   phx
Date:   Sat Jan 14 19:35:59 UTC 2012

Modified Files:
src/sys/arch/powerpc/include: intr.h
src/sys/arch/powerpc/pic: intr.c pic_distopenpic.c pic_mpcsoc.c
pic_openpic.c

Log Message:
Some PICs have the capability to define the interrupt's polarity (OpenPIC
for example). So the accepted interrupt types have been extended to:
- IST_EDGE_FALLING (which is the same as IST_EDGE)
- IST_EDGE_RISING (new)
- IST_LEVEL_LOW (is the same as IST_LEVEL)
- IST_LEVEL_HIGH (new)
Old code will continue to work without modification.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/powerpc/include/intr.h
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/powerpc/pic/intr.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/powerpc/pic/pic_distopenpic.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/powerpc/pic/pic_mpcsoc.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/powerpc/pic/pic_openpic.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/powerpc/include/intr.h
diff -u src/sys/arch/powerpc/include/intr.h:1.9 src/sys/arch/powerpc/include/intr.h:1.10
--- src/sys/arch/powerpc/include/intr.h:1.9	Mon Jun 20 20:24:28 2011
+++ src/sys/arch/powerpc/include/intr.h	Sat Jan 14 19:35:58 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: intr.h,v 1.9 2011/06/20 20:24:28 matt Exp $ */
+/*	$NetBSD: intr.h,v 1.10 2012/01/14 19:35:58 phx Exp $ */
 
 /*-
  * Copyright (c) 2007 Michael Lorenz
@@ -28,7 +28,7 @@
 
 #ifndef _LOCORE
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: intr.h,v 1.9 2011/06/20 20:24:28 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: intr.h,v 1.10 2012/01/14 19:35:58 phx Exp $);
 #endif
 
 #ifndef POWERPC_INTR_MACHDEP_H
@@ -38,21 +38,26 @@ __KERNEL_RCSID(0, $NetBSD: intr.h,v 1.9
 
 
 /* Interrupt priority `levels'. */
-#define	IPL_NONE	0	/* nothing */
-#define	IPL_SOFTCLOCK	1	/* timeouts */
-#define	IPL_SOFTBIO	2	/* block I/O */
-#define	IPL_SOFTNET	3	/* protocol stacks */
-#define	IPL_SOFTSERIAL	4	/* serial */
-#define	IPL_VM		5	/* memory allocation */
-#define	IPL_SCHED	6
-#define	IPL_HIGH	7	/* everything */
-#define	NIPL		8
+#define	IPL_NONE		0	/* nothing */
+#define	IPL_SOFTCLOCK		1	/* timeouts */
+#define	IPL_SOFTBIO		2	/* block I/O */
+#define	IPL_SOFTNET		3	/* protocol stacks */
+#define	IPL_SOFTSERIAL		4	/* serial */
+#define	IPL_VM			5	/* memory allocation */
+#define	IPL_SCHED		6
+#define	IPL_HIGH		7	/* everything */
+#define	NIPL			8
 
 /* Interrupt sharing types. */
-#define	IST_NONE	0	/* none */
-#define	IST_PULSE	1	/* pulsed */
-#define	IST_EDGE	2	/* edge-triggered */
-#define	IST_LEVEL	3	/* level-triggered */
+#define	IST_NONE		0	/* none */
+#define	IST_PULSE		1	/* pulsed */
+#define	IST_EDGE		2	/* falling edge triggered */
+#define	IST_LEVEL		3	/* low level triggered */
+
+#define IST_EDGE_FALLING	IST_EDGE
+#define IST_EDGE_RISING		4	/* rising edge triggered */
+#define IST_LEVEL_LOW		IST_LEVEL
+#define IST_LEVEL_HIGH		5	/* high level triggered */
 
 #if !defined(_LOCORE)
 void *	intr_establish(int, int, int, int (*)(void *), void *);

Index: src/sys/arch/powerpc/pic/intr.c
diff -u src/sys/arch/powerpc/pic/intr.c:1.18 src/sys/arch/powerpc/pic/intr.c:1.19
--- src/sys/arch/powerpc/pic/intr.c:1.18	Tue Sep 27 01:02:36 2011
+++ src/sys/arch/powerpc/pic/intr.c	Sat Jan 14 19:35:59 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: intr.c,v 1.18 2011/09/27 01:02:36 jym Exp $ */
+/*	$NetBSD: intr.c,v 1.19 2012/01/14 19:35:59 phx Exp $ */
 
 /*-
  * Copyright (c) 2007 Michael Lorenz
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.18 2011/09/27 01:02:36 jym Exp $);
+__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.19 2012/01/14 19:35:59 phx Exp $);
 
 #include opt_interrupt.h
 #include opt_multiprocessor.h
@@ -168,8 +168,10 @@ intr_establish(int hwirq, int type, int 
 	case IST_NONE:
 		is-is_type = type;
 		break;
-	case IST_EDGE:
-	case IST_LEVEL:
+	case IST_EDGE_FALLING:
+	case IST_EDGE_RISING:
+	case IST_LEVEL_LOW:
+	case IST_LEVEL_HIGH:
 		if (type == is-is_type)
 			break;
 		/* FALLTHROUGH */
@@ -327,8 +329,10 @@ mapirq(int hwirq)
 static const char * const intr_typenames[] = {
[IST_NONE]  = none,
[IST_PULSE] = pulsed,
-   [IST_EDGE]  = edge-triggered,
-   [IST_LEVEL] = level-triggered,
+   [IST_EDGE_FALLING]  = falling edge triggered,
+   [IST_EDGE_RISING]  = rising edge triggered,
+   [IST_LEVEL_LOW] = low level triggered,
+   [IST_LEVEL_HIGH] = high level triggered,
 };
 
 const char *

Index: src/sys/arch/powerpc/pic/pic_distopenpic.c
diff -u src/sys/arch/powerpc/pic/pic_distopenpic.c:1.7 src/sys/arch/powerpc/pic/pic_distopenpic.c:1.8
--- src/sys/arch/powerpc/pic/pic_distopenpic.c:1.7	Sat Jul  2 13:08:25 2011
+++ src/sys/arch/powerpc/pic/pic_distopenpic.c	Sat Jan 14 19:35:59 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: pic_distopenpic.c,v 1.7 2011/07/02 13:08:25 mrg Exp $ */
+/*	$NetBSD: pic_distopenpic.c,v 1.8 2012/01/14 19:35:59 phx Exp $ */
 
 /*-
  * 

CVS commit: src/sys/arch/sandpoint

2012-01-14 Thread Frank Wille
Module Name:src
Committed By:   phx
Date:   Sat Jan 14 19:39:25 UTC 2012

Modified Files:
src/sys/arch/sandpoint/conf: GENERIC KUROBOX files.sandpoint
src/sys/arch/sandpoint/include: bus_funcs.h
src/sys/arch/sandpoint/sandpoint: machdep.c mainbus.c
Added Files:
src/sys/arch/sandpoint/sandpoint: nhpow.c

Log Message:
New device nhpow(4) to support the onboard GPIO pins on a NH230/231 board for
buttons, powerdown, reset, LEDs and fan control. It attaches gpio(4) for
its 8 pins on demand.


To generate a diff of this commit:
cvs rdiff -u -r1.65 -r1.66 src/sys/arch/sandpoint/conf/GENERIC
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/sandpoint/conf/KUROBOX
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/sandpoint/conf/files.sandpoint
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/sandpoint/include/bus_funcs.h
cvs rdiff -u -r1.60 -r1.61 src/sys/arch/sandpoint/sandpoint/machdep.c
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/sandpoint/sandpoint/mainbus.c
cvs rdiff -u -r0 -r1.1 src/sys/arch/sandpoint/sandpoint/nhpow.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/sandpoint/conf/GENERIC
diff -u src/sys/arch/sandpoint/conf/GENERIC:1.65 src/sys/arch/sandpoint/conf/GENERIC:1.66
--- src/sys/arch/sandpoint/conf/GENERIC:1.65	Sat Jan  7 20:51:23 2012
+++ src/sys/arch/sandpoint/conf/GENERIC	Sat Jan 14 19:39:25 2012
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.65 2012/01/07 20:51:23 phx Exp $
+# $NetBSD: GENERIC,v 1.66 2012/01/14 19:39:25 phx Exp $
 #
 # machine description file for GENERIC NAS
 # 
@@ -22,7 +22,7 @@ include 	arch/sandpoint/conf/std.sandpo
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.65 $
+#ident 		GENERIC-$Revision: 1.66 $
 
 maxusers	32
 
@@ -179,6 +179,8 @@ cpu*		at mainbus0
 #nor*		at cfi?
 #flash*		at nor?
 
+nhpow0		at mainbus0			# NH230/231 power,LED,buttons
+
 pci*		at mainbus0 bus ?
 pchb*		at pci? dev ? function ?	# PCI host bridge
 
@@ -225,6 +227,9 @@ rgephy* at mii? phy ?			# Realtek 8169S/
 makphy* at mii? phy ?			# Marvell Semiconductor 88E1000 PHYs
 ukphy*	at mii? phy ?			# generic unknown PHYs
 
+# GPIO devices
+gpio*	at gpiobus?
+
 # USB Controller and Devices
 ehci*	at pci?	dev ? function ?	# Enhanced Host Controller
 ohci*	at pci?	dev ? function ?	# Open Host Controller

Index: src/sys/arch/sandpoint/conf/KUROBOX
diff -u src/sys/arch/sandpoint/conf/KUROBOX:1.3 src/sys/arch/sandpoint/conf/KUROBOX:1.4
--- src/sys/arch/sandpoint/conf/KUROBOX:1.3	Wed Jun  9 17:34:32 2010
+++ src/sys/arch/sandpoint/conf/KUROBOX	Sat Jan 14 19:39:25 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: KUROBOX,v 1.3 2010/06/09 17:34:32 phx Exp $
+#	$NetBSD: KUROBOX,v 1.4 2012/01/14 19:39:25 phx Exp $
 #
 # KuroBox/LinkStation support
 #
@@ -10,3 +10,6 @@ no satmgr0
 com0	at eumb? unit 1			# console at 0x4600
 #com1	at eumb? unit 0
 satmgr0 at eumb? unit 0			# satmgr at 0x4500
+
+no nhpow0
+no gpio*

Index: src/sys/arch/sandpoint/conf/files.sandpoint
diff -u src/sys/arch/sandpoint/conf/files.sandpoint:1.30 src/sys/arch/sandpoint/conf/files.sandpoint:1.31
--- src/sys/arch/sandpoint/conf/files.sandpoint:1.30	Sat Dec 17 20:20:37 2011
+++ src/sys/arch/sandpoint/conf/files.sandpoint	Sat Jan 14 19:39:25 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: files.sandpoint,v 1.30 2011/12/17 20:20:37 phx Exp $
+#	$NetBSD: files.sandpoint,v 1.31 2012/01/14 19:39:25 phx Exp $
 #
 # Motorola's SandPoint evaluation board and multiplied descendents.
 #
@@ -31,12 +31,12 @@ include dev/ata/files.ata
 #
 # Memory Disk for install floppy
 #
-file dev/md_root.c	memory_disk_hooks
+file	dev/md_root.c	memory_disk_hooks
 
 #
 # System bus types
 #
-define mainbus { }
+define	mainbus { }
 device	mainbus: isabus, pcibus, mainbus
 attach	mainbus at root
 
@@ -48,15 +48,19 @@ device	cfi: norbus
 attach	cfi at mainbus with sandpointcfi
 file	arch/sandpoint/sandpoint/flash_cfi.c	sandpointcfi
 
-device eumb { [ unit = -1 ] }: mainbus
-attach eumb at mainbus
+device	nhpow: sysmon_power, sysmon_taskq, gpiobus
+attach	nhpow at mainbus
+file	arch/sandpoint/sandpoint/nhpow.c	nhpow
+
+device	eumb { [ unit = -1 ] }: mainbus
+attach	eumb at mainbus
 file	arch/sandpoint/sandpoint/eumb.c		eumb
 
-attach com at eumb with com_eumb
+attach	com at eumb with com_eumb
 file	arch/sandpoint/sandpoint/com_eumb.c	com_eumb needs-flag
 
 device	ociic: motoi2c, i2cbus
-attach ociic at eumb with iic_eumb
+attach	ociic at eumb with iic_eumb
 file	arch/sandpoint/sandpoint/iic_eumb.c	iic_eumb
 
 device	satmgr: sysmon_power, sysmon_taskq

Index: src/sys/arch/sandpoint/include/bus_funcs.h
diff -u src/sys/arch/sandpoint/include/bus_funcs.h:1.2 src/sys/arch/sandpoint/include/bus_funcs.h:1.3
--- src/sys/arch/sandpoint/include/bus_funcs.h:1.2	Sat Dec 17 20:20:37 2011
+++ src/sys/arch/sandpoint/include/bus_funcs.h	Sat Jan 14 19:39:25 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: bus_funcs.h,v 1.2 2011/12/17 20:20:37 phx Exp $	*/
+/*	$NetBSD: bus_funcs.h,v 1.3 

CVS commit: src/sys/arch/sandpoint/stand/altboot

2012-01-14 Thread Frank Wille
Module Name:src
Committed By:   phx
Date:   Sat Jan 14 20:03:12 UTC 2012

Modified Files:
src/sys/arch/sandpoint/stand/altboot: brdsetup.c entry.S

Log Message:
Add 0x7000 BAT-mapping for NH230/231.
NH23x: Initialize LEDs on startup (status off, to indicate the bootloader
is running). Hardware reset routine.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/sandpoint/stand/altboot/brdsetup.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/sandpoint/stand/altboot/entry.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/sandpoint/stand/altboot/brdsetup.c
diff -u src/sys/arch/sandpoint/stand/altboot/brdsetup.c:1.25 src/sys/arch/sandpoint/stand/altboot/brdsetup.c:1.26
--- src/sys/arch/sandpoint/stand/altboot/brdsetup.c:1.25	Sun Jan  8 14:53:54 2012
+++ src/sys/arch/sandpoint/stand/altboot/brdsetup.c	Sat Jan 14 20:03:11 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: brdsetup.c,v 1.25 2012/01/08 14:53:54 phx Exp $ */
+/* $NetBSD: brdsetup.c,v 1.26 2012/01/14 20:03:11 phx Exp $ */
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -57,6 +57,60 @@ BRD_DECL(iomega);
 BRD_DECL(dlink);
 BRD_DECL(nhnas);
 
+static void brdfixup(void);
+static void setup(void);
+static void send_iomega(int, int, int, int, int, int);
+static inline uint32_t mfmsr(void);
+static inline void mtmsr(uint32_t);
+static inline uint32_t cputype(void);
+static inline u_quad_t mftb(void);
+static void init_uart(unsigned, unsigned, uint8_t);
+static void send_sat(char *);
+static unsigned mpc107memsize(void);
+
+/* UART registers */
+#define RBR		0
+#define THR		0
+#define DLB		0
+#define DMB		1
+#define IER		1
+#define FCR		2
+#define LCR		3
+#define  LCR_DLAB	0x80
+#define  LCR_PEVEN	0x18
+#define  LCR_PNONE	0x00
+#define  LCR_8BITS	0x03
+#define MCR		4
+#define  MCR_RTS	0x02
+#define  MCR_DTR	0x01
+#define LSR		5
+#define  LSR_THRE	0x20
+#define  LSR_DRDY	0x01
+#define DCR		0x11
+#define UART_READ(base, r)	in8(base + (r))
+#define UART_WRITE(base, r, v)	out8(base + (r), (v))
+
+/* MPC106 and MPC824x PCI bridge memory configuration */
+#define MPC106_MEMSTARTADDR1	0x80
+#define MPC106_EXTMEMSTARTADDR1	0x88
+#define MPC106_MEMENDADDR1	0x90
+#define MPC106_EXTMEMENDADDR1	0x98
+#define MPC106_MEMEN		0xa0
+
+/* Iomega StorCenter MC68HC908 microcontroller data packet */
+#define IOMEGA_POWER		0
+#define IOMEGA_LED		1
+#define IOMEGA_FLASH_RATE	2
+#define IOMEGA_FAN		3
+#define IOMEGA_HIGH_TEMP	4
+#define IOMEGA_LOW_TEMP		5
+#define IOMEGA_ID		6
+#define IOMEGA_CHECKSUM		7
+#define IOMEGA_PACKETSIZE	8
+
+/* NH230/231 GPIO */
+#define NHGPIO_WRITE(x)		*((uint8_t *)0x7000) = x
+
 static struct brdprop brdlist[] = {
 {
 	sandpoint,
@@ -78,7 +132,7 @@ static struct brdprop brdlist[] = {
 	BRD_KUROBOX,
 	0,
 	eumb, 0x4600, 57600,
-	kurosetup, kurobrdfix, NULL, NULL },
+	kurosetup, kurobrdfix, NULL, kuroreset },
 {
 	synology,
 	Synology DS,
@@ -114,7 +168,7 @@ static struct brdprop brdlist[] = {
 	BRD_NH230NAS,
 	3300,
 	eumb, 0x4500, 9600,
-	NULL, nhnasbrdfix, NULL, NULL },
+	NULL, nhnasbrdfix, NULL, nhnasreset },
 {
 	unknown,
 	Unknown board,
@@ -124,63 +178,14 @@ static struct brdprop brdlist[] = {
 	NULL, NULL, NULL, NULL }, /* must be the last */
 };
 
-/* MPC106 and MPC824x PCI bridge memory configuration */
-#define MPC106_MEMSTARTADDR1	0x80
-#define MPC106_EXTMEMSTARTADDR1	0x88
-#define MPC106_MEMENDADDR1	0x90
-#define MPC106_EXTMEMENDADDR1	0x98
-#define MPC106_MEMEN		0xa0
-
-/* Iomega StorCenter MC68HC908 microcontroller data packet */
-#define IOMEGA_POWER		0
-#define IOMEGA_LED		1
-#define IOMEGA_FLASH_RATE	2
-#define IOMEGA_FAN		3
-#define IOMEGA_HIGH_TEMP	4
-#define IOMEGA_LOW_TEMP		5
-#define IOMEGA_ID		6
-#define IOMEGA_CHECKSUM		7
-#define IOMEGA_PACKETSIZE	8
-
 static struct brdprop *brdprop;
 static uint32_t ticks_per_sec, ns_per_tick;
 
-static void brdfixup(void);
-static void setup(void);
-static void send_iomega(int, int, int, int, int, int);
-static inline uint32_t mfmsr(void);
-static inline void mtmsr(uint32_t);
-static inline uint32_t cputype(void);
-static inline u_quad_t mftb(void);
-static void init_uart(unsigned, unsigned, uint8_t);
-static void send_sat(char *);
-static unsigned mpc107memsize(void);
-
 const unsigned dcache_line_size = 32;		/* 32B linesize */
 const unsigned dcache_range_size = 4 * 1024;	/* 16KB / 4-way */
 
 unsigned uart1base;	/* console */
 unsigned uart2base;	/* optional satellite processor */
-#define RBR		0
-#define THR		0
-#define DLB		0
-#define DMB		1
-#define IER		1
-#define FCR		2
-#define LCR		3
-#define  LCR_DLAB	0x80
-#define  LCR_PEVEN	0x18
-#define  LCR_PNONE	0x00
-#define  LCR_8BITS	0x03
-#define MCR		4
-#define  MCR_RTS	0x02
-#define  MCR_DTR	0x01
-#define LSR		5
-#define  LSR_THRE	0x20
-#define  LSR_DRDY	0x01
-#define DCR		0x11
-#define UART_READ(base, r)	in8(base + (r))
-#define UART_WRITE(base, r, v)	out8(base + (r), (v))
 
 void 

CVS commit: src/sys/arch/sandpoint/stand/altboot

2012-01-14 Thread Frank Wille
Module Name:src
Committed By:   phx
Date:   Sat Jan 14 20:16:53 UTC 2012

Modified Files:
src/sys/arch/sandpoint/stand/altboot: README.altboot

Log Message:
Add NH230 PPCboot version.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/sandpoint/stand/altboot/README.altboot

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/sandpoint/stand/altboot/README.altboot
diff -u src/sys/arch/sandpoint/stand/altboot/README.altboot:1.7 src/sys/arch/sandpoint/stand/altboot/README.altboot:1.8
--- src/sys/arch/sandpoint/stand/altboot/README.altboot:1.7	Sun Jan  1 14:16:41 2012
+++ src/sys/arch/sandpoint/stand/altboot/README.altboot	Sat Jan 14 20:16:53 2012
@@ -1,6 +1,6 @@
 /// notes about altboot ///
 
-$NetBSD: README.altboot,v 1.7 2012/01/01 14:16:41 phx Exp $
+$NetBSD: README.altboot,v 1.8 2012/01/14 20:16:53 phx Exp $
 
 Altboot is a functional bridge to fill the gap between a NAS product
 custom bootloader and the NetBSD kernel startup environment.  Altboot
@@ -44,6 +44,10 @@ Altboot is known working on at least the
 
U-Boot 1.0.0 (Sep  2 2005 - 14:49:11)
 
+- Netronics NH230/231 and compatible with restricted vendor custom PPCboot
+
+   PPCBoot 2.0.0-A9 (Feb 13 2006 - 14:56:11)
+
 The standard use of altboot is to invoke it with a short script from
 U-Boot/PPCboot, where the altboot.bin image is stored in an unoccupied 128KB
 section of the target's HW NOR flash.  Combined with standard



CVS commit: src/doc

2012-01-14 Thread Frank Wille
Module Name:src
Committed By:   phx
Date:   Sat Jan 14 20:20:31 UTC 2012

Modified Files:
src/doc: CHANGES

Log Message:
Note sandpoint NH230/231 NAS support.


To generate a diff of this commit:
cvs rdiff -u -r1.1644 -r1.1645 src/doc/CHANGES

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
diff -u src/doc/CHANGES:1.1644 src/doc/CHANGES:1.1645
--- src/doc/CHANGES:1.1644	Fri Jan 13 16:15:48 2012
+++ src/doc/CHANGES	Sat Jan 14 20:20:31 2012
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1644 $
+# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1645 $
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -1199,3 +1199,5 @@ Changes from NetBSD 5.0 to NetBSD 6.0:
 	adventure(6): New save file format. Please regenerate (restore
 		and re-save) any old save files. [dholland 20120107]
 	x86, xen: Add cpu ucode loading support via cpuctl(8). [cegger 20120113]
+	sandpoint: Netronics NH230/231 and compatible NAS are supported.
+		[phx 20120114]



CVS commit: src/sys/dev/usb

2012-01-14 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Sat Jan 14 20:25:46 UTC 2012

Modified Files:
src/sys/dev/usb: ucom.c

Log Message:
In ucompoll() also bail out if we don't have a valid softc.
Seems to prevent occasional crashes when a open ucom is removed.


To generate a diff of this commit:
cvs rdiff -u -r1.93 -r1.94 src/sys/dev/usb/ucom.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/usb/ucom.c
diff -u src/sys/dev/usb/ucom.c:1.93 src/sys/dev/usb/ucom.c:1.94
--- src/sys/dev/usb/ucom.c:1.93	Fri Dec 23 00:51:45 2011
+++ src/sys/dev/usb/ucom.c	Sat Jan 14 20:25:45 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: ucom.c,v 1.93 2011/12/23 00:51:45 jakllsch Exp $	*/
+/*	$NetBSD: ucom.c,v 1.94 2012/01/14 20:25:45 jakllsch Exp $	*/
 
 /*
  * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ucom.c,v 1.93 2011/12/23 00:51:45 jakllsch Exp $);
+__KERNEL_RCSID(0, $NetBSD: ucom.c,v 1.94 2012/01/14 20:25:45 jakllsch Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -656,13 +656,16 @@ ucomwrite(dev_t dev, struct uio *uio, in
 int
 ucompoll(dev_t dev, int events, struct lwp *l)
 {
-	struct ucom_softc *sc = device_lookup_private(ucom_cd, UCOMUNIT(dev));
-	struct tty *tp = sc-sc_tty;
+	struct ucom_softc *sc;
+	struct tty *tp;
 	int revents;
 
-	if (sc-sc_dying)
+	sc = device_lookup_private(ucom_cd, UCOMUNIT(dev));
+	if (sc == NULL || sc-sc_dying)
 		return (POLLHUP);
 
+	tp = sc-sc_tty;
+
 	sc-sc_refcnt++;
 	revents = ((*tp-t_linesw-l_poll)(tp, events, l));
 	if (--sc-sc_refcnt  0)



CVS commit: src/sys/dev/usb

2012-01-14 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Sat Jan 14 20:41:49 UTC 2012

Modified Files:
src/sys/dev/usb: ucom.c

Log Message:
Don't notify about zero length reads without UCOM_DEBUG  ucomdebug  0.
It's typical for uslsa(4) hardware to do this occasionally.


To generate a diff of this commit:
cvs rdiff -u -r1.94 -r1.95 src/sys/dev/usb/ucom.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/usb/ucom.c
diff -u src/sys/dev/usb/ucom.c:1.94 src/sys/dev/usb/ucom.c:1.95
--- src/sys/dev/usb/ucom.c:1.94	Sat Jan 14 20:25:45 2012
+++ src/sys/dev/usb/ucom.c	Sat Jan 14 20:41:49 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: ucom.c,v 1.94 2012/01/14 20:25:45 jakllsch Exp $	*/
+/*	$NetBSD: ucom.c,v 1.95 2012/01/14 20:41:49 jakllsch Exp $	*/
 
 /*
  * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ucom.c,v 1.94 2012/01/14 20:25:45 jakllsch Exp $);
+__KERNEL_RCSID(0, $NetBSD: ucom.c,v 1.95 2012/01/14 20:41:49 jakllsch Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -1246,10 +1246,12 @@ ucomreadcb(usbd_xfer_handle xfer, usbd_p
 
 	usbd_get_xfer_status(xfer, NULL, (void *)cp, cc, NULL);
 
-	if (cc == 0) {
-		aprint_normal_dev(sc-sc_dev,
-		ucomreadcb: zero length xfer!\n);
+#ifdef UCOM_DEBUG
+	/* This is triggered by uslsa(4) occasionally. */
+	if ((ucomdebug  0)  (cc == 0)) {
+		device_printf(sc-sc_dev, ucomreadcb: zero length xfer!\n);
 	}
+#endif
 
 	KDASSERT(cp == ub-ub_data);
 



CVS commit: src/sys/dev/usb

2012-01-14 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Sat Jan 14 20:51:00 UTC 2012

Modified Files:
src/sys/dev/usb: ucom.c

Log Message:
Stopgap XXX kludge for PR kern/42848 and PR kern/45013.

Someone should really find and fix the real problem,
but it's better to not crash in the meantime.


To generate a diff of this commit:
cvs rdiff -u -r1.95 -r1.96 src/sys/dev/usb/ucom.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/usb/ucom.c
diff -u src/sys/dev/usb/ucom.c:1.95 src/sys/dev/usb/ucom.c:1.96
--- src/sys/dev/usb/ucom.c:1.95	Sat Jan 14 20:41:49 2012
+++ src/sys/dev/usb/ucom.c	Sat Jan 14 20:51:00 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: ucom.c,v 1.95 2012/01/14 20:41:49 jakllsch Exp $	*/
+/*	$NetBSD: ucom.c,v 1.96 2012/01/14 20:51:00 jakllsch Exp $	*/
 
 /*
  * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ucom.c,v 1.95 2012/01/14 20:41:49 jakllsch Exp $);
+__KERNEL_RCSID(0, $NetBSD: ucom.c,v 1.96 2012/01/14 20:51:00 jakllsch Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -370,6 +370,10 @@ ucomopen(dev_t dev, int flag, int mode, 
 	int s, i;
 	int error;
 
+	/* XXX This is a hopefully temporary stopgap for kern/42848. */
+	if ((flag  (FREAD|FWRITE)) != (FREAD|FWRITE))
+		return (EINVAL);
+
 	if (sc == NULL)
 		return (ENXIO);
 



CVS commit: src/sys/dev/usb

2012-01-14 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Sat Jan 14 21:06:01 UTC 2012

Modified Files:
src/sys/dev/usb: files.usb uslsa.c
Added Files:
src/sys/dev/usb: uslsareg.h

Log Message:
Rework uslsa(4) based on publicly-available Silicon Labs AN571 document.


To generate a diff of this commit:
cvs rdiff -u -r1.117 -r1.118 src/sys/dev/usb/files.usb
cvs rdiff -u -r1.16 -r1.17 src/sys/dev/usb/uslsa.c
cvs rdiff -u -r0 -r1.1 src/sys/dev/usb/uslsareg.h

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

Modified files:

Index: src/sys/dev/usb/files.usb
diff -u src/sys/dev/usb/files.usb:1.117 src/sys/dev/usb/files.usb:1.118
--- src/sys/dev/usb/files.usb:1.117	Sat Dec 31 00:08:48 2011
+++ src/sys/dev/usb/files.usb	Sat Jan 14 21:06:01 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: files.usb,v 1.117 2011/12/31 00:08:48 christos Exp $
+#	$NetBSD: files.usb,v 1.118 2012/01/14 21:06:01 jakllsch Exp $
 #
 # Config file and device description for machine-independent USB code.
 # Included by ports that need it.  Ports that use it must provide
@@ -339,7 +339,7 @@ file	dev/usb/uark.c		uark
 
 # Silicon Labs CP210x serial driver
 device	uslsa: ucombus
-attach	uslsa at usbdevif
+attach	uslsa at usbifif
 file	dev/usb/uslsa.c			uslsa
 
 # WinChipHead CH341/340 serial driver

Index: src/sys/dev/usb/uslsa.c
diff -u src/sys/dev/usb/uslsa.c:1.16 src/sys/dev/usb/uslsa.c:1.17
--- src/sys/dev/usb/uslsa.c:1.16	Fri Dec 23 00:51:49 2011
+++ src/sys/dev/usb/uslsa.c	Sat Jan 14 21:06:01 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: uslsa.c,v 1.16 2011/12/23 00:51:49 jakllsch Exp $ */
+/* $NetBSD: uslsa.c,v 1.17 2012/01/14 21:06:01 jakllsch Exp $ */
 
 /* from ugensa.c */
 
@@ -57,12 +57,8 @@
  *
  */
 
-/*
- * Craig Shelley's Linux driver was used for documentation.
- */
-
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: uslsa.c,v 1.16 2011/12/23 00:51:49 jakllsch Exp $);
+__KERNEL_RCSID(0, $NetBSD: uslsa.c,v 1.17 2012/01/14 21:06:01 jakllsch Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -79,102 +75,45 @@ __KERNEL_RCSID(0, $NetBSD: uslsa.c,v 1.
 
 #include dev/usb/ucomvar.h
 
-#ifdef DEBUG
-#define USLSA_DEBUG
-#endif
+#include dev/usb/uslsareg.h
+
+#include fs/unicode.h
 
 #ifdef USLSA_DEBUG
-#define DPRINTF(x)	if (uslsadebug) printf x
-#define DPRINTFN(n,x)	if (uslsadebug(n)) printf x
+#define DPRINTF(x)	if (uslsadebug) device_printf x
 int uslsadebug = 0;
 #else
 #define DPRINTF(x)
-#define DPRINTFN(n,x)
 #endif
 
-#define USLSA_REQ_SET_STATE	0x00
-
-#define USLSA_REQ_SET_BPS	0x01
-#define USLSA_REQ_GET_BPS	0x02
-
-#define USLSA_REQ_SET_DPS	0x03
-#define USLSA_REQ_GET_DPS	0x04
-
-#define USLSA_REQ_SET_BREAK	0x05
-
-#define USLSA_REQ_SET_FLOW	0x07
-#define USLSA_REQ_GET_FLOW	0x08
-
-#define USLSA_REQ_SET_MODEM	0x13
-#define USLSA_REQ_GET_MODEM	0x14
-
-#define USLSA_REQ_SET_MISC	0x19
-#define USLSA_REQ_GET_MISC	0x20
-
-#define USLSA_STATE_DISABLE	0x
-#define USLSA_STATE_ENABLE	0x0001
-
-#define USLSA_BPS(b)	(3686400/b)
-
-#define USLSA_DPS_DATA_MASK		0x0f00
-#define	USLSA_DPS_DATA_FIVE		0x0500
-#define	USLSA_DPS_DATA_SIX		0x0600
-#define	USLSA_DPS_DATA_SEVEN		0x0700
-#define	USLSA_DPS_DATA_EIGHT		0x0800
-#define	USLSA_DPS_DATA_NINE		0x0900
-
-#define USLSA_DPS_PARITY_MASK		0x00f0
-#define USLSA_DPS_PARITY_SPACE		0x0040
-#define USLSA_DPS_PARITY_MARK		0x0030
-#define USLSA_DPS_PARITY_EVEN		0x0020
-#define USLSA_DPS_PARITY_ODD		0x0010
-#define USLSA_DPS_PARITY_NONE		0x
-
-#define USLSA_DPS_STOP_MASK		0x000f
-#define USLSA_DPS_STOP_TWO		0x0002
-#define USLSA_DPS_STOP_ONE_FIVE		0x0001
-#define USLSA_DPS_STOP_ONE		0x
-
-#define USLSA_BREAK_DISABLE	0x
-#define USLSA_BREAK_ENABLE	0x0001
-
-#define USLSA_FLOW_SET_RTS	0x0200
-#define USLSA_FLOW_SET_DTR	0x0100
-#define USLSA_FLOW_MSR_MASK	0x00f0
-#define USLSA_FLOW_MSR_DCD	0x0080
-#define USLSA_FLOW_MSR_RI	0x0040
-#define USLSA_FLOW_MSR_DSR	0x0020
-#define USLSA_FLOW_MSR_CTS	0x0010
-#define USLSA_FLOW_RTS		0x0002
-#define USLSA_FLOW_DTR		0x0001
-
 struct uslsa_softc {
 	device_t		sc_dev;		/* base device */
-	usbd_device_handle	sc_udev;	/* device */
-	usbd_interface_handle	sc_iface;	/* interface */
-
 	device_t		sc_subdev;	/* ucom device */
-
-	u_char			sc_dying;	/* disconnecting */
-
-	u_char			sc_lsr;		/* local status register */
-	u_char			sc_msr;		/* uslsa status register */
+	usbd_device_handle	sc_udev;	/* usb device */
+	usbd_interface_handle	sc_iface;	/* interface */
+	uint8_t			sc_ifnum;	/* interface number */
+	bool			sc_dying;	/* disconnecting */
 };
 
 static void uslsa_get_status(void *sc, int, u_char *, u_char *);
 static void uslsa_set(void *, int, int, int);
 static int uslsa_param(void *, int, struct termios *);
+static int uslsa_ioctl(void *, int, u_long, void *, int, proc_t *);
+
 static int uslsa_open(void *, int);
 static void uslsa_close(void *, int);
 
+static int uslsa_usbd_errno(usbd_status);
 static int uslsa_request_set(struct uslsa_softc *, uint8_t, uint16_t);
-static void 

CVS commit: src/sys/dev/usb

2012-01-14 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Sat Jan 14 21:15:48 UTC 2012

Modified Files:
src/sys/dev/usb: uslsa.c

Log Message:
Remove small vestige of debug code.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/dev/usb/uslsa.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/usb/uslsa.c
diff -u src/sys/dev/usb/uslsa.c:1.17 src/sys/dev/usb/uslsa.c:1.18
--- src/sys/dev/usb/uslsa.c:1.17	Sat Jan 14 21:06:01 2012
+++ src/sys/dev/usb/uslsa.c	Sat Jan 14 21:15:48 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: uslsa.c,v 1.17 2012/01/14 21:06:01 jakllsch Exp $ */
+/* $NetBSD: uslsa.c,v 1.18 2012/01/14 21:15:48 jakllsch Exp $ */
 
 /* from ugensa.c */
 
@@ -58,7 +58,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: uslsa.c,v 1.17 2012/01/14 21:06:01 jakllsch Exp $);
+__KERNEL_RCSID(0, $NetBSD: uslsa.c,v 1.18 2012/01/14 21:15:48 jakllsch Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -107,8 +107,6 @@ static int uslsa_usbd_errno(usbd_status)
 static int uslsa_request_set(struct uslsa_softc *, uint8_t, uint16_t);
 static int uslsa_set_flow(struct uslsa_softc *, tcflag_t, tcflag_t);
 
-static void uslsa_props(struct uslsa_softc *);
-
 static const struct ucom_methods uslsa_methods = {
 	uslsa_get_status,
 	uslsa_set,



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

2012-01-14 Thread Reinoud Zandijk
Module Name:src
Committed By:   reinoud
Date:   Sat Jan 14 21:20:56 UTC 2012

Modified Files:
src/sys/arch/usermode/include: genheaders.sh

Log Message:
Bump UPAGES with one more to allow for AST processing. Somehow the space was a
bit tight OR i am checking too regorously on stack space needed.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/usermode/include/genheaders.sh

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/usermode/include/genheaders.sh
diff -u src/sys/arch/usermode/include/genheaders.sh:1.4 src/sys/arch/usermode/include/genheaders.sh:1.5
--- src/sys/arch/usermode/include/genheaders.sh:1.4	Sat Jan 14 17:36:32 2012
+++ src/sys/arch/usermode/include/genheaders.sh	Sat Jan 14 21:20:56 2012
@@ -56,7 +56,7 @@ EOF
 		echo #undef __HAVE_PROCFS_MACHDEP  ${hdr}
 	elif [ $hdr = param.h ]; then
 		echo #undef UPAGES  ${hdr}
-		echo #define UPAGES 7  ${hdr}
+		echo #define UPAGES 8  ${hdr}
 		echo #undef USPACE  ${hdr}
 		echo #define USPACE (PAGE_SIZE*UPAGES)  ${hdr}
 	fi



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

2012-01-14 Thread Reinoud Zandijk
Module Name:src
Committed By:   reinoud
Date:   Sat Jan 14 21:21:48 UTC 2012

Modified Files:
src/sys/arch/usermode/include: asm.h bswap.h byte_swap.h disklabel.h
elf_machdep.h endian.h endian_machdep.h int_const.h int_fmtio.h
int_limits.h int_mwgwtypes.h int_types.h limits.h
netbsd32_machdep.h param.h ptrace.h wchar_limits.h

Log Message:
Regen


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/usermode/include/asm.h \
src/sys/arch/usermode/include/bswap.h \
src/sys/arch/usermode/include/byte_swap.h \
src/sys/arch/usermode/include/elf_machdep.h \
src/sys/arch/usermode/include/endian.h \
src/sys/arch/usermode/include/endian_machdep.h \
src/sys/arch/usermode/include/int_const.h \
src/sys/arch/usermode/include/int_fmtio.h \
src/sys/arch/usermode/include/int_limits.h \
src/sys/arch/usermode/include/int_mwgwtypes.h \
src/sys/arch/usermode/include/int_types.h \
src/sys/arch/usermode/include/limits.h \
src/sys/arch/usermode/include/netbsd32_machdep.h \
src/sys/arch/usermode/include/wchar_limits.h
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/usermode/include/disklabel.h \
src/sys/arch/usermode/include/ptrace.h
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/usermode/include/param.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/usermode/include/asm.h
diff -u src/sys/arch/usermode/include/asm.h:1.6 src/sys/arch/usermode/include/asm.h:1.7
--- src/sys/arch/usermode/include/asm.h:1.6	Sat Jan 14 17:36:32 2012
+++ src/sys/arch/usermode/include/asm.h	Sat Jan 14 21:21:48 2012
@@ -1,7 +1,7 @@
-/* $NetBSD: asm.h,v 1.6 2012/01/14 17:36:32 reinoud Exp $ */
+/* $NetBSD: asm.h,v 1.7 2012/01/14 21:21:48 reinoud Exp $ */
 
 /*
- * Automatically generated by ./genheaders.sh on Sat Jan 14 12:29:08 CET 2012
+ * Automatically generated by ./genheaders.sh on Sat Jan 14 22:20:59 CET 2012
  * Do not modify directly!
  */
 #ifndef _USERMODE_ASM_H
Index: src/sys/arch/usermode/include/bswap.h
diff -u src/sys/arch/usermode/include/bswap.h:1.6 src/sys/arch/usermode/include/bswap.h:1.7
--- src/sys/arch/usermode/include/bswap.h:1.6	Sat Jan 14 17:36:32 2012
+++ src/sys/arch/usermode/include/bswap.h	Sat Jan 14 21:21:48 2012
@@ -1,7 +1,7 @@
-/* $NetBSD: bswap.h,v 1.6 2012/01/14 17:36:32 reinoud Exp $ */
+/* $NetBSD: bswap.h,v 1.7 2012/01/14 21:21:48 reinoud Exp $ */
 
 /*
- * Automatically generated by ./genheaders.sh on Sat Jan 14 12:29:08 CET 2012
+ * Automatically generated by ./genheaders.sh on Sat Jan 14 22:20:59 CET 2012
  * Do not modify directly!
  */
 #ifndef _USERMODE_BSWAP_H
Index: src/sys/arch/usermode/include/byte_swap.h
diff -u src/sys/arch/usermode/include/byte_swap.h:1.6 src/sys/arch/usermode/include/byte_swap.h:1.7
--- src/sys/arch/usermode/include/byte_swap.h:1.6	Sat Jan 14 17:36:32 2012
+++ src/sys/arch/usermode/include/byte_swap.h	Sat Jan 14 21:21:48 2012
@@ -1,7 +1,7 @@
-/* $NetBSD: byte_swap.h,v 1.6 2012/01/14 17:36:32 reinoud Exp $ */
+/* $NetBSD: byte_swap.h,v 1.7 2012/01/14 21:21:48 reinoud Exp $ */
 
 /*
- * Automatically generated by ./genheaders.sh on Sat Jan 14 12:29:08 CET 2012
+ * Automatically generated by ./genheaders.sh on Sat Jan 14 22:20:59 CET 2012
  * Do not modify directly!
  */
 #ifndef _USERMODE_BYTE_SWAP_H
Index: src/sys/arch/usermode/include/elf_machdep.h
diff -u src/sys/arch/usermode/include/elf_machdep.h:1.6 src/sys/arch/usermode/include/elf_machdep.h:1.7
--- src/sys/arch/usermode/include/elf_machdep.h:1.6	Sat Jan 14 17:36:32 2012
+++ src/sys/arch/usermode/include/elf_machdep.h	Sat Jan 14 21:21:48 2012
@@ -1,7 +1,7 @@
-/* $NetBSD: elf_machdep.h,v 1.6 2012/01/14 17:36:32 reinoud Exp $ */
+/* $NetBSD: elf_machdep.h,v 1.7 2012/01/14 21:21:48 reinoud Exp $ */
 
 /*
- * Automatically generated by ./genheaders.sh on Sat Jan 14 12:29:08 CET 2012
+ * Automatically generated by ./genheaders.sh on Sat Jan 14 22:20:59 CET 2012
  * Do not modify directly!
  */
 #ifndef _USERMODE_ELF_MACHDEP_H
Index: src/sys/arch/usermode/include/endian.h
diff -u src/sys/arch/usermode/include/endian.h:1.6 src/sys/arch/usermode/include/endian.h:1.7
--- src/sys/arch/usermode/include/endian.h:1.6	Sat Jan 14 17:36:32 2012
+++ src/sys/arch/usermode/include/endian.h	Sat Jan 14 21:21:48 2012
@@ -1,7 +1,7 @@
-/* $NetBSD: endian.h,v 1.6 2012/01/14 17:36:32 reinoud Exp $ */
+/* $NetBSD: endian.h,v 1.7 2012/01/14 21:21:48 reinoud Exp $ */
 
 /*
- * Automatically generated by ./genheaders.sh on Sat Jan 14 12:29:08 CET 2012
+ * Automatically generated by ./genheaders.sh on Sat Jan 14 22:20:59 CET 2012
  * Do not modify directly!
  */
 #ifndef _USERMODE_ENDIAN_H
Index: src/sys/arch/usermode/include/endian_machdep.h
diff -u src/sys/arch/usermode/include/endian_machdep.h:1.6 src/sys/arch/usermode/include/endian_machdep.h:1.7
--- src/sys/arch/usermode/include/endian_machdep.h:1.6	Sat Jan 14 17:36:32 2012
+++ 

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

2012-01-14 Thread Reinoud Zandijk
Module Name:src
Committed By:   reinoud
Date:   Sat Jan 14 21:23:24 UTC 2012

Modified Files:
src/sys/arch/usermode/include: cpu.h

Log Message:
Define astpending flag and the aston() setter


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/usermode/include/cpu.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/usermode/include/cpu.h
diff -u src/sys/arch/usermode/include/cpu.h:1.6 src/sys/arch/usermode/include/cpu.h:1.7
--- src/sys/arch/usermode/include/cpu.h:1.6	Sat Aug 13 10:31:24 2011
+++ src/sys/arch/usermode/include/cpu.h	Sat Jan 14 21:23:24 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.h,v 1.6 2011/08/13 10:31:24 jmcneill Exp $ */
+/* $NetBSD: cpu.h,v 1.7 2012/01/14 21:23:24 reinoud Exp $ */
 
 /*-
  * Copyright (c) 2007 Jared D. McNeill jmcne...@invisible.ca
@@ -36,6 +36,16 @@
 
 extern void	cpu_signotify(struct lwp *);
 extern void	cpu_need_proftick(struct lwp *);
+extern void	userret(struct lwp *);
+
+#define	curcpu()	usermode_curcpu()
+#define cpu_number()	0
+
+#define cpu_proc_fork(p1, p2)
+
+extern int	astpending;
+#define aston(ci) (astpending++)
+
 
 struct cpu_info {
 	device_t	ci_dev;
@@ -66,11 +76,6 @@ usermode_delay(unsigned int ms)
 	thunk_usleep(ms);
 }
 
-#define	curcpu()	usermode_curcpu()
-#define cpu_number()	0
-
-#define cpu_proc_fork(p1, p2)
-
 #define delay(ms)	usermode_delay(ms)
 #define DELAY(ms)	usermode_delay(ms)
 



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

2012-01-14 Thread Reinoud Zandijk
Module Name:src
Committed By:   reinoud
Date:   Sat Jan 14 21:24:52 UTC 2012

Modified Files:
src/sys/arch/usermode/dev: clock.c

Log Message:
Cleanup clock.c removing unneeded function


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/usermode/dev/clock.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/usermode/dev/clock.c
diff -u src/sys/arch/usermode/dev/clock.c:1.23 src/sys/arch/usermode/dev/clock.c:1.24
--- src/sys/arch/usermode/dev/clock.c:1.23	Thu Dec 15 03:42:32 2011
+++ src/sys/arch/usermode/dev/clock.c	Sat Jan 14 21:24:52 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: clock.c,v 1.23 2011/12/15 03:42:32 jmcneill Exp $ */
+/* $NetBSD: clock.c,v 1.24 2012/01/14 21:24:52 reinoud Exp $ */
 
 /*-
  * Copyright (c) 2007 Jared D. McNeill jmcne...@invisible.ca
@@ -29,7 +29,7 @@
 #include opt_hz.h
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: clock.c,v 1.23 2011/12/15 03:42:32 jmcneill Exp $);
+__KERNEL_RCSID(0, $NetBSD: clock.c,v 1.24 2012/01/14 21:24:52 reinoud Exp $);
 
 #include sys/param.h
 #include sys/proc.h
@@ -50,7 +50,6 @@ __KERNEL_RCSID(0, $NetBSD: clock.c,v 1.
 static int	clock_match(device_t, cfdata_t, void *);
 static void	clock_attach(device_t, device_t, void *);
 
-static void	clock(void);
 static void	clock_signal(int sig, siginfo_t *info, void *ctx);
 static unsigned int clock_getcounter(struct timecounter *);
 
@@ -124,35 +123,17 @@ clock_intr(void *priv)
 
 	while (nticks--  0) {
 		hardclock(cf);
-	};
+	}
 }
 
 static void
-clock(void)
+clock_signal(int sig, siginfo_t *info, void *ctx)
 {
 	curcpu()-ci_idepth++;
-	spl_intr(IPL_SOFTCLOCK, clock_intr, NULL);
+	spl_intr(IPL_CLOCK, clock_intr, NULL);
 	curcpu()-ci_idepth--;
 }
 
-static void
-clock_signal(int sig, siginfo_t *info, void *ctx)
-{
-#if 0
-	ucontext_t *uct = ctx;
-	struct lwp *l;
-	struct pcb *pcb;
-
-	l = curlwp;
-	pcb = lwp_getpcb(l);
-
-	/* copy this state as where the lwp was XXX NEEDED? */
-	memcpy(pcb-pcb_ucp, uct, sizeof(ucontext_t));
-#endif
-
-	clock();
-}
-
 static unsigned int
 clock_getcounter(struct timecounter *tc)
 {



CVS commit: src/sys/dev/usb

2012-01-14 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Sat Jan 14 21:37:18 UTC 2012

Modified Files:
src/sys/dev/usb: ubt.c

Log Message:
don't behave differently when DIAGNOSTIC is defined


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/sys/dev/usb/ubt.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/usb/ubt.c
diff -u src/sys/dev/usb/ubt.c:1.42 src/sys/dev/usb/ubt.c:1.43
--- src/sys/dev/usb/ubt.c:1.42	Fri Dec 23 00:51:45 2011
+++ src/sys/dev/usb/ubt.c	Sat Jan 14 21:37:17 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: ubt.c,v 1.42 2011/12/23 00:51:45 jakllsch Exp $	*/
+/*	$NetBSD: ubt.c,v 1.43 2012/01/14 21:37:17 plunky Exp $	*/
 
 /*-
  * Copyright (c) 2006 Itronix Inc.
@@ -67,7 +67,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ubt.c,v 1.42 2011/12/23 00:51:45 jakllsch Exp $);
+__KERNEL_RCSID(0, $NetBSD: ubt.c,v 1.43 2012/01/14 21:37:17 plunky Exp $);
 
 #include sys/param.h
 #include sys/device.h
@@ -680,7 +680,6 @@ ubt_set_isoc_config(struct ubt_softc *sc
 		return ENOENT;
 	}
 
-#ifdef DIAGNOSTIC
 	if (rd_size  MLEN) {
 		aprint_error_dev(sc-sc_dev, rd_size=%d exceeds MLEN\n,
 		rd_size);
@@ -694,7 +693,6 @@ ubt_set_isoc_config(struct ubt_softc *sc
 
 		return EOVERFLOW;
 	}
-#endif
 
 	sc-sc_scord_size = rd_size;
 	sc-sc_scord_addr = rd_addr;



CVS commit: src/sys/dev/pcmcia

2012-01-14 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Sat Jan 14 21:38:00 UTC 2012

Modified Files:
src/sys/dev/pcmcia: bt3c.c

Log Message:
don't behave differently when DIAGNOSTIC is defined


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/dev/pcmcia/bt3c.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/pcmcia/bt3c.c
diff -u src/sys/dev/pcmcia/bt3c.c:1.21 src/sys/dev/pcmcia/bt3c.c:1.22
--- src/sys/dev/pcmcia/bt3c.c:1.21	Wed Feb 24 22:38:08 2010
+++ src/sys/dev/pcmcia/bt3c.c	Sat Jan 14 21:38:00 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: bt3c.c,v 1.21 2010/02/24 22:38:08 dyoung Exp $ */
+/* $NetBSD: bt3c.c,v 1.22 2012/01/14 21:38:00 plunky Exp $ */
 
 /*-
  * Copyright (c) 2005 Iain D. Hibbert,
@@ -69,7 +69,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: bt3c.c,v 1.21 2010/02/24 22:38:08 dyoung Exp $);
+__KERNEL_RCSID(0, $NetBSD: bt3c.c,v 1.22 2012/01/14 21:38:00 plunky Exp $);
 
 #include sys/param.h
 #include sys/device.h
@@ -596,13 +596,11 @@ bt3c_load_firmware(struct bt3c_softc *sc
 	}
 
 	size = (size_t)firmware_get_size(fh);
-#ifdef DIAGNOSTIC
 	if (size  10 * 1024) {	/* sanity check */
 		aprint_error_dev(sc-sc_dev, insane firmware file size!\n);
 		firmware_close(fh);
 		return EFBIG;
 	}
-#endif
 
 	buf = firmware_malloc(size);
 	KASSERT(buf != NULL);



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

2012-01-14 Thread Reinoud Zandijk
Module Name:src
Committed By:   reinoud
Date:   Sat Jan 14 21:42:52 UTC 2012

Modified Files:
src/sys/arch/usermode/dev: clock.c

Log Message:
Revert back to IPL_SOFTCLOCK so its lower than IPL_SHED


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/usermode/dev/clock.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/usermode/dev/clock.c
diff -u src/sys/arch/usermode/dev/clock.c:1.24 src/sys/arch/usermode/dev/clock.c:1.25
--- src/sys/arch/usermode/dev/clock.c:1.24	Sat Jan 14 21:24:52 2012
+++ src/sys/arch/usermode/dev/clock.c	Sat Jan 14 21:42:51 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: clock.c,v 1.24 2012/01/14 21:24:52 reinoud Exp $ */
+/* $NetBSD: clock.c,v 1.25 2012/01/14 21:42:51 reinoud Exp $ */
 
 /*-
  * Copyright (c) 2007 Jared D. McNeill jmcne...@invisible.ca
@@ -29,7 +29,7 @@
 #include opt_hz.h
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: clock.c,v 1.24 2012/01/14 21:24:52 reinoud Exp $);
+__KERNEL_RCSID(0, $NetBSD: clock.c,v 1.25 2012/01/14 21:42:51 reinoud Exp $);
 
 #include sys/param.h
 #include sys/proc.h
@@ -130,7 +130,7 @@ static void
 clock_signal(int sig, siginfo_t *info, void *ctx)
 {
 	curcpu()-ci_idepth++;
-	spl_intr(IPL_CLOCK, clock_intr, NULL);
+	spl_intr(IPL_SOFTCLOCK, clock_intr, NULL);
 	curcpu()-ci_idepth--;
 }
 



CVS commit: src/sys/arch/usermode

2012-01-14 Thread Reinoud Zandijk
Module Name:src
Committed By:   reinoud
Date:   Sat Jan 14 21:45:29 UTC 2012

Modified Files:
src/sys/arch/usermode/dev: cpu.c
src/sys/arch/usermode/usermode: syscall.c trap.c

Log Message:
Reimplement userret() to also include AST for preemption.

Note it would be nice if we could do the check are we going to userland? in
a less intrusive way.


To generate a diff of this commit:
cvs rdiff -u -r1.64 -r1.65 src/sys/arch/usermode/dev/cpu.c
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/usermode/usermode/syscall.c
cvs rdiff -u -r1.56 -r1.57 src/sys/arch/usermode/usermode/trap.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/usermode/dev/cpu.c
diff -u src/sys/arch/usermode/dev/cpu.c:1.64 src/sys/arch/usermode/dev/cpu.c:1.65
--- src/sys/arch/usermode/dev/cpu.c:1.64	Sat Jan 14 17:42:51 2012
+++ src/sys/arch/usermode/dev/cpu.c	Sat Jan 14 21:45:28 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.c,v 1.64 2012/01/14 17:42:51 reinoud Exp $ */
+/* $NetBSD: cpu.c,v 1.65 2012/01/14 21:45:28 reinoud Exp $ */
 
 /*-
  * Copyright (c) 2007 Jared D. McNeill jmcne...@invisible.ca
@@ -30,7 +30,7 @@
 #include opt_hz.h
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.64 2012/01/14 17:42:51 reinoud Exp $);
+__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.65 2012/01/14 21:45:28 reinoud Exp $);
 
 #include sys/param.h
 #include sys/conf.h
@@ -43,6 +43,7 @@ __KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.64
 #include sys/mbuf.h
 #include sys/msgbuf.h
 #include sys/kmem.h
+#include sys/kernel.h
 
 #include dev/cons.h
 
@@ -155,6 +156,7 @@ void
 cpu_need_resched(struct cpu_info *ci, int flags)
 {
 	ci-ci_want_resched |= flags;
+	aston(ci);
 }
 
 void

Index: src/sys/arch/usermode/usermode/syscall.c
diff -u src/sys/arch/usermode/usermode/syscall.c:1.21 src/sys/arch/usermode/usermode/syscall.c:1.22
--- src/sys/arch/usermode/usermode/syscall.c:1.21	Sat Jan 14 17:42:52 2012
+++ src/sys/arch/usermode/usermode/syscall.c	Sat Jan 14 21:45:28 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: syscall.c,v 1.21 2012/01/14 17:42:52 reinoud Exp $ */
+/* $NetBSD: syscall.c,v 1.22 2012/01/14 21:45:28 reinoud Exp $ */
 
 /*-
  * Copyright (c) 2007 Jared D. McNeill jmcne...@invisible.ca
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: syscall.c,v 1.21 2012/01/14 17:42:52 reinoud Exp $);
+__KERNEL_RCSID(0, $NetBSD: syscall.c,v 1.22 2012/01/14 21:45:28 reinoud Exp $);
 
 #include sys/types.h
 #include sys/param.h
@@ -45,16 +45,6 @@ __KERNEL_RCSID(0, $NetBSD: syscall.c,v 
 #include machine/thunk.h
 #include machine/machdep.h
 
-
-void userret(struct lwp *l);
-
-void
-userret(struct lwp *l)
-{
-	/* invoke MI userret code */
-	mi_userret(l);
-}
-
 void
 child_return(void *arg)
 {
@@ -161,7 +151,6 @@ syscall(void)
 	}
 	//thunk_printf_debug(end of syscall : return to userland\n);
 //if (code != 4) thunk_printf(userret() code %d\n, code);
-	userret(l);
 }
 
 

Index: src/sys/arch/usermode/usermode/trap.c
diff -u src/sys/arch/usermode/usermode/trap.c:1.56 src/sys/arch/usermode/usermode/trap.c:1.57
--- src/sys/arch/usermode/usermode/trap.c:1.56	Sat Jan 14 17:42:52 2012
+++ src/sys/arch/usermode/usermode/trap.c	Sat Jan 14 21:45:28 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: trap.c,v 1.56 2012/01/14 17:42:52 reinoud Exp $ */
+/* $NetBSD: trap.c,v 1.57 2012/01/14 21:45:28 reinoud Exp $ */
 
 /*-
  * Copyright (c) 2011 Reinoud Zandijk rein...@netbsd.org
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: trap.c,v 1.56 2012/01/14 17:42:52 reinoud Exp $);
+__KERNEL_RCSID(0, $NetBSD: trap.c,v 1.57 2012/01/14 21:45:28 reinoud Exp $);
 
 #include sys/types.h
 #include sys/param.h
@@ -50,6 +50,7 @@ __KERNEL_RCSID(0, $NetBSD: trap.c,v 1.5
 /* forwards and externals */
 void setup_signal_handlers(void);
 void stop_all_signal_handlers(void);
+void userret(struct lwp *l);
 
 static void mem_access_handler(int sig, siginfo_t *info, void *ctx);
 static void illegal_instruction_handler(int sig, siginfo_t *info, void *ctx);
@@ -62,6 +63,7 @@ bool pmap_fault(pmap_t pmap, vaddr_t va,
 
 static stack_t sigstk;
 
+int astpending;
 
 void
 startlwp(void *arg)
@@ -203,6 +205,49 @@ mem_access_handler(int sig, siginfo_t *i
 }
 
 
+/* ast and userret */
+void
+userret(struct lwp *l)
+{
+	struct pcb *pcb;
+	ucontext_t ucp, *nucp;
+	vaddr_t pc;
+	
+	KASSERT(l);
+
+	/* are we going back to userland? */
+	pcb = lwp_getpcb(l);
+	KASSERT(pcb);
+
+	/* where are we going back to ? */
+	thunk_getcontext(ucp);
+	nucp = (ucontext_t *) ucp.uc_link;
+	pc = md_get_pc(nucp);
+
+	if (pc = kmem_k_start)
+		return;
+
+	/* ok, going to userland, proceed! */
+	if (astpending) {
+		astpending = 0;
+
+		curcpu()-ci_data.cpu_ntrap++;
+#if 0
+		/* profiling */
+		if (l-l_pflag  LP_OWEUPC) {
+			l-l_pflag = ~LP_OWEUPC;
+			ADDUPROF(l);
+		}
+#endif
+		/* allow a forced task switch */
+		if (l-l_cpu-ci_want_resched)
+			preempt();
+	}
+
+	/* invoke MI userret code */
+	mi_userret(l);

CVS commit: src/doc/roadmaps

2012-01-14 Thread Alistair G. Crooks
Module Name:src
Committed By:   agc
Date:   Sat Jan 14 22:06:16 UTC 2012

Modified Files:
src/doc/roadmaps: storage

Log Message:
Bring the storage roadmap up to date wrt 6.0 and features. A huge thank you
to dholland for his help on this.

This still has some updates to happen for post-6.0 features; they will
be added RSN.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/doc/roadmaps/storage

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

Modified files:

Index: src/doc/roadmaps/storage
diff -u src/doc/roadmaps/storage:1.8 src/doc/roadmaps/storage:1.9
--- src/doc/roadmaps/storage:1.8	Tue Nov 17 21:09:54 2009
+++ src/doc/roadmaps/storage	Sat Jan 14 22:06:16 2012
@@ -1,4 +1,4 @@
-$NetBSD: storage,v 1.8 2009/11/17 21:09:54 agc Exp $
+$NetBSD: storage,v 1.9 2012/01/14 22:06:16 agc Exp $
 
 NetBSD Storage Roadmap
 ==
@@ -12,38 +12,35 @@ please do not rely on them being there.
 Features that will be in 6.0:
 2. logical volume management
 3. a native port of Sun's ZFS
+4. ReFUSE, perfuse and pud
+6. Support for flash devices - NAND, and flash file system
 7. rump extensions
+9. in-kernel iSCSI initiator
 10. RAIDframe parity map
+11. quota system re-work
 
-Features that are planned for 6.0:
-1. devfs
-4. ReFUSE-lowlevel
+Features that are planned for future releases:
+1. devfs/udevfsd
 5. web-based management tools for storage subsystems
-6. support for flash devices - NAND and MMC/SD
 8. virtualised disks in userland
-9. in-kernel iSCSI initiator
-
-We currently expect to branch 6.0 in the March 2010 timeframe, with a view
-to a 6.0 release later in 2010.
+12. lfs renovation
 
 We'll continue to update this roadmap as features and dates get firmed up.
 
 Some explanations
 =
 
-1. devfs
--
+1. udevfsd
+--
 
-Devfs will allow device special files (the files used to access
-devices) to be created dynamically as and when they are attached to
-the system.  This will greatly reduce the number of files in a /dev
-directory and removes the need to run the MAKEDEV script when support
-for new devices is added to the NetBSD kernel.  NetBSD's devfs
-implementation will also allow multiple instances of the file system
-to be mounted simultaneously, which is very useful for chroot jails.
-Please contact core@ if you are interested in devfs development.
+There has always been discussion over devfs, and experience with it
+seems mixed (to be kind). At the same time, carrying around a whole
+populated /dev seems quite possible and effective, but maybe a bit
+unwieldy. jmcneill's udevfsd addresses this in a different way, and
+is currently in othersrc/external/bsd/udevfsd. Not planned for 6.0
+right now.
 
-Responsible: mjf
+Responsible: jmcneill
 
 2. Logical Volume Management
 
@@ -68,35 +65,41 @@ The ZFS source code has been committed t
 
 Responsible: haad, ad, ver
 
-4. ReFUSE-lowlevel
---
+4. ReFUSE, perfuse and pud
+--
 
 FUSE has two interfaces, the normal high-level one, and a lower-level
-interface which is closer to the way standard file systems operate. This
-adds the low-level functionality in the same way that ReFUSE adds the
-high-level functionality
+interface which is closer to the way standard file systems operate. 
+manu's perfuse adds the low-level functionality in the same way that
+ReFUSE adds the high-level functionality.  In addition, there is the
+pass to userspace device framework added by pooka as part of rump. 
+All 3 will be in 6.0.
 
-Responsible: pooka, agc
+Responsible: pooka, manu, agc
 
 5. Web-based Management tools for Storage Subsystems
 
 
-Standard tools for managing the storage subsystems that NetBSD provides,
-using a standard web-server as the basic user interface on the storage
-device, allowing remote management by a standard web browser.
+Standard tools for managing the storage subsystems that NetBSD
+provides, using a standard web-server as the basic user interface on
+the storage device, allowing remote management by a standard web
+browser.  CIM and related functinoality are interesting datapoints in
+this space, although credentials and authentication are always
+challenges in this space. Will not make it into 6.0
 
 Responsible: agc
 
-6. Support for flash devices - NAND and MMC/SD
---
+6. Support for flash devices - NAND, and flash file system
+--
 
-The NetBSD Foundation is interested in having a file system which is
-optimised to work with today's flash devices, including SSDs both with
-wear-levelling functionality and without, as well as support for NAND,
-and MMC/SD devices. Please get in touch with core@ if you're interested
-in helping out with this area of development.
+ahoka has have contributed 

CVS commit: src/sys/arch/sandpoint/stand/altboot

2012-01-14 Thread Frank Wille
Module Name:src
Committed By:   phx
Date:   Sat Jan 14 22:36:54 UTC 2012

Modified Files:
src/sys/arch/sandpoint/stand/altboot: README.altboot brdsetup.c

Log Message:
Netronics is spelled Netronix.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/sandpoint/stand/altboot/README.altboot
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/sandpoint/stand/altboot/brdsetup.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/sandpoint/stand/altboot/README.altboot
diff -u src/sys/arch/sandpoint/stand/altboot/README.altboot:1.8 src/sys/arch/sandpoint/stand/altboot/README.altboot:1.9
--- src/sys/arch/sandpoint/stand/altboot/README.altboot:1.8	Sat Jan 14 20:16:53 2012
+++ src/sys/arch/sandpoint/stand/altboot/README.altboot	Sat Jan 14 22:36:54 2012
@@ -1,6 +1,6 @@
 /// notes about altboot ///
 
-$NetBSD: README.altboot,v 1.8 2012/01/14 20:16:53 phx Exp $
+$NetBSD: README.altboot,v 1.9 2012/01/14 22:36:54 phx Exp $
 
 Altboot is a functional bridge to fill the gap between a NAS product
 custom bootloader and the NetBSD kernel startup environment.  Altboot
@@ -44,7 +44,7 @@ Altboot is known working on at least the
 
U-Boot 1.0.0 (Sep  2 2005 - 14:49:11)
 
-- Netronics NH230/231 and compatible with restricted vendor custom PPCboot
+- Allnet 6250 and compatible with restricted vendor custom PPCboot
 
PPCBoot 2.0.0-A9 (Feb 13 2006 - 14:56:11)
 

Index: src/sys/arch/sandpoint/stand/altboot/brdsetup.c
diff -u src/sys/arch/sandpoint/stand/altboot/brdsetup.c:1.26 src/sys/arch/sandpoint/stand/altboot/brdsetup.c:1.27
--- src/sys/arch/sandpoint/stand/altboot/brdsetup.c:1.26	Sat Jan 14 20:03:11 2012
+++ src/sys/arch/sandpoint/stand/altboot/brdsetup.c	Sat Jan 14 22:36:54 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: brdsetup.c,v 1.26 2012/01/14 20:03:11 phx Exp $ */
+/* $NetBSD: brdsetup.c,v 1.27 2012/01/14 22:36:54 phx Exp $ */
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -164,7 +164,7 @@ static struct brdprop brdlist[] = {
 	NULL, dlinkbrdfix, NULL, NULL },
 {
 	nhnas,
-	Netronics NH230/231,
+	Netronix NH-230/231,
 	BRD_NH230NAS,
 	3300,
 	eumb, 0x4500, 9600,



CVS commit: src/doc

2012-01-14 Thread Frank Wille
Module Name:src
Committed By:   phx
Date:   Sat Jan 14 22:40:29 UTC 2012

Modified Files:
src/doc: CHANGES

Log Message:
The manufacturer is called Netronix, not Netronics.


To generate a diff of this commit:
cvs rdiff -u -r1.1645 -r1.1646 src/doc/CHANGES

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
diff -u src/doc/CHANGES:1.1645 src/doc/CHANGES:1.1646
--- src/doc/CHANGES:1.1645	Sat Jan 14 20:20:31 2012
+++ src/doc/CHANGES	Sat Jan 14 22:40:29 2012
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1645 $
+# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1646 $
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -1199,5 +1199,5 @@ Changes from NetBSD 5.0 to NetBSD 6.0:
 	adventure(6): New save file format. Please regenerate (restore
 		and re-save) any old save files. [dholland 20120107]
 	x86, xen: Add cpu ucode loading support via cpuctl(8). [cegger 20120113]
-	sandpoint: Netronics NH230/231 and compatible NAS are supported.
+	sandpoint: Netronix NH-230/231 and compatible NAS are supported.
 		[phx 20120114]



CVS commit: src

2012-01-14 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sat Jan 14 22:56:31 UTC 2012

Modified Files:
src/distrib/common: Makefile.bootcd
src/distrib/notes/common: main
src/distrib/notes/macppc: prep.OPENFIRMWARE
src/distrib/notes/sparc: install
src/etc: Makefile
src/share/man/man7: release.7

Log Message:
PR# install/44593: Please give release ISO's more meaningful names

Change release ISO filenames, what was once 'i386cd.iso' will now look
like 'NetBSD-5.99.60-i386.iso'.

ok snj@


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/distrib/common/Makefile.bootcd
cvs rdiff -u -r1.483 -r1.484 src/distrib/notes/common/main
cvs rdiff -u -r1.14 -r1.15 src/distrib/notes/macppc/prep.OPENFIRMWARE
cvs rdiff -u -r1.56 -r1.57 src/distrib/notes/sparc/install
cvs rdiff -u -r1.393 -r1.394 src/etc/Makefile
cvs rdiff -u -r1.31 -r1.32 src/share/man/man7/release.7

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

Modified files:

Index: src/distrib/common/Makefile.bootcd
diff -u src/distrib/common/Makefile.bootcd:1.17 src/distrib/common/Makefile.bootcd:1.18
--- src/distrib/common/Makefile.bootcd:1.17	Fri Sep 25 14:09:27 2009
+++ src/distrib/common/Makefile.bootcd	Sat Jan 14 22:56:30 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.bootcd,v 1.17 2009/09/25 14:09:27 christos Exp $
+#	$NetBSD: Makefile.bootcd,v 1.18 2012/01/14 22:56:30 jmcneill Exp $
 #
 # Makefile snipped to create a CD/DVD ISO
 #
@@ -53,6 +53,7 @@ CDRELEASE_EXCLUDE=	-s ',./installation/c
 .include bsd.own.mk 		# For PRINTOBJDIR
 .include bsd.kernobj.mk	# For KERNSRCDIR
 
+DISTRIBVER!=	${HOST_SH} ${KERNSRCDIR}/conf/osrelease.sh
 DISTRIBREV!=	${HOST_SH} ${KERNSRCDIR}/conf/osrelease.sh -s
 ISO_VOLID!=	echo NETBSD_${DISTRIBREV} | tr a-z A-Z
 PUBLISHER?= The_NetBSD_Project
@@ -69,8 +70,13 @@ MKDIR?=		mkdir -p
 CHMOD?=		chmod
 ECHO?=		echo
 
+.if ${CDRELEASE} == false
+CDIMAGE=	${CDBASE}.iso
+.else
+CDIMAGE=	NetBSD-${DISTRIBVER}-${CDBASE:S/cd$//}.iso
+.endif
 
-CLEANFILES+=	${CDBASE}.iso
+CLEANFILES+=	${CDIMAGE}
 CLEANFILES+=	bootxx.${MACHINE}
 
 
@@ -111,7 +117,7 @@ prepare:
 # XXX include more than one directory on the image - HF
 #
 copy-releasedir:
-	${RM} -f ${RELEASEDIR}/${CDROMS_RELEASEDIR}/${CDBASE}.iso
+	${RM} -f ${RELEASEDIR}/${CDROMS_RELEASEDIR}/${CDIMAGE}
 	if ${CDRELEASE}; then 		\
 		if [ ! -d ${RELEASEDIR}/${RELEASEMACHINEDIR} ]; then 		\
 			echo Missing ${RELEASEDIR}/${RELEASEMACHINEDIR}, aborting; \
@@ -189,12 +195,12 @@ copy-releasedir:
 	fi
 
 image:
-	${TOOL_MAKEFS} -t cd9660 -o ${_CDMAKEFSOPTIONS:Q} ${CDBASE}.iso cdrom
+	${TOOL_MAKEFS} -t cd9660 -o ${_CDMAKEFSOPTIONS:Q} ${CDIMAGE} cdrom
 
 .if ${CDRELEASE} == false
 release: prepare .WAIT prepare_md_post .WAIT copy-releasedir .WAIT image_md_pre .WAIT image .WAIT image_md_post
 	${MKDIR} ${RELEASEDIR}/${CDROMS_RELEASEDIR}
-	${RELEASE_INSTALL} ${CDBASE}.iso ${RELEASEDIR}/${CDROMS_RELEASEDIR}
+	${RELEASE_INSTALL} ${CDIMAGE} ${RELEASEDIR}/${CDROMS_RELEASEDIR}
 
 iso_image:
 .else
@@ -202,7 +208,7 @@ release:
 
 iso_image: prepare .WAIT prepare_md_post .WAIT copy-releasedir .WAIT image_md_pre .WAIT image .WAIT image_md_post
 	${MKDIR} ${RELEASEDIR}/${CDROMS_RELEASEDIR}
-	${RELEASE_INSTALL} ${CDBASE}.iso ${RELEASEDIR}/${CDROMS_RELEASEDIR}
+	${RELEASE_INSTALL} ${CDIMAGE} ${RELEASEDIR}/${CDROMS_RELEASEDIR}
 .endif
 
 clean:

Index: src/distrib/notes/common/main
diff -u src/distrib/notes/common/main:1.483 src/distrib/notes/common/main:1.484
--- src/distrib/notes/common/main:1.483	Thu Jan  5 05:48:27 2012
+++ src/distrib/notes/common/main	Sat Jan 14 22:56:30 2012
@@ -1,4 +1,4 @@
-.\	$NetBSD: main,v 1.483 2012/01/05 05:48:27 ast Exp $
+.\	$NetBSD: main,v 1.484 2012/01/14 22:56:30 jmcneill Exp $
 .\
 .\ Copyright (c) 1999-2008 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -171,18 +171,18 @@ bootloader
 and the installation kernel
 .Pa macppc/binary/kernel/netbsd-GENERIC_MD.gz .
 If you have a CD-R, you can fetch the CD image,
-.Pa macppccd-\*V.iso .
+.Pa NetBSD-\*V-macppc.iso .
 .\}
 .if \n[sparc] \{\
 Fetch a CD image,
-.Pa sparccd-\*V.iso
+.Pa NetBSD-\*V-sparc.iso
 or the floppy disk images,
 .Pa sparc/install/floppy/disk1.gz No and Pa sparc/install/floppy/disk2 .
 You need either the pair of floppies or the CD to boot your system.
 .\}
 .if \n[sparc64] \{\
 This is either a CD image,
-.Pa sparc64cd-\*V.iso
+.Pa NetBSD-\*V-sparc64.iso
 or the installation kernel and bootloader,
 .Pa sparc64/binary/kernel/netbsd-INSTALL.gz No and Pa sparc64/installation/misc/ofwboot
 which can be booted from a

Index: src/distrib/notes/macppc/prep.OPENFIRMWARE
diff -u src/distrib/notes/macppc/prep.OPENFIRMWARE:1.14 src/distrib/notes/macppc/prep.OPENFIRMWARE:1.15
--- src/distrib/notes/macppc/prep.OPENFIRMWARE:1.14	Wed Oct 27 14:41:46 2010
+++ src/distrib/notes/macppc/prep.OPENFIRMWARE	Sat Jan 14 22:56:30 2012
@@ -1,4 +1,4 @@
-.\	$NetBSD: prep.OPENFIRMWARE,v 1.14 2010/10/27 14:41:46 

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

2012-01-14 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Jan 15 00:15:24 UTC 2012

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

Log Message:
add cd9660


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/usermode/conf/GENERIC.common

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

Modified files:

Index: src/sys/arch/usermode/conf/GENERIC.common
diff -u src/sys/arch/usermode/conf/GENERIC.common:1.15 src/sys/arch/usermode/conf/GENERIC.common:1.16
--- src/sys/arch/usermode/conf/GENERIC.common:1.15	Mon Jan  9 19:25:40 2012
+++ src/sys/arch/usermode/conf/GENERIC.common	Sun Jan 15 00:15:23 2012
@@ -1,9 +1,9 @@
-# $NetBSD: GENERIC.common,v 1.15 2012/01/09 19:25:40 agc Exp $
+# $NetBSD: GENERIC.common,v 1.16 2012/01/15 00:15:23 jmcneill Exp $
 
 include arch/usermode/conf/std.usermode
 
 options 	INCLUDE_CONFIG_FILE
-#ident 		GENERIC-$Revision: 1.15 $
+#ident 		GENERIC-$Revision: 1.16 $
 maxusers 	32
 
 makeoptions	DEBUG=-O1 -g3
@@ -42,6 +42,7 @@ file-system	UNION
 file-system	PTYFS
 file-system	TMPFS
 file-system	NFS
+file-system	CD9660
 file-system	UDF
 file-system	NILFS
 options		WAPBL



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

2012-01-14 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Jan 15 00:25:33 UTC 2012

Modified Files:
src/sys/arch/usermode/conf: GENERIC.amd64 GENERIC.i386

Log Message:
Add options INSECURE, as sysinst requires it. Now I can boot an x86 install
CD image.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/usermode/conf/GENERIC.amd64
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/usermode/conf/GENERIC.i386

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/usermode/conf/GENERIC.amd64
diff -u src/sys/arch/usermode/conf/GENERIC.amd64:1.2 src/sys/arch/usermode/conf/GENERIC.amd64:1.3
--- src/sys/arch/usermode/conf/GENERIC.amd64:1.2	Sat Jan  7 20:44:41 2012
+++ src/sys/arch/usermode/conf/GENERIC.amd64	Sun Jan 15 00:25:33 2012
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC.amd64,v 1.2 2012/01/07 20:44:41 reinoud Exp $
+# $NetBSD: GENERIC.amd64,v 1.3 2012/01/15 00:25:33 jmcneill Exp $
 
 machine usermode
 include arch/usermode/conf/GENERIC.common
@@ -6,6 +6,8 @@ include arch/amd64/conf/majors.amd64
 
 no options EXEC_ELF32
 
+options 	INSECURE		# required by sysinst
+
 options		TEXTADDR=0x4000	# 1 Gb `phys ram' / total space
 options		KVMSIZE= 0x1000	# KVM space reserved in VM map, 256 Mb
 options		NKMEMPAGES_MAX=32768	# 128 Mb max
@@ -14,5 +16,5 @@ makeoptions	COPTS+=-m64
 makeoptions	LD=ld -melf_amd64
 
 #options 	INCLUDE_CONFIG_FILE
-#ident 		GENERIC32-$Revision: 1.2 $
+#ident 		GENERIC32-$Revision: 1.3 $
 

Index: src/sys/arch/usermode/conf/GENERIC.i386
diff -u src/sys/arch/usermode/conf/GENERIC.i386:1.4 src/sys/arch/usermode/conf/GENERIC.i386:1.5
--- src/sys/arch/usermode/conf/GENERIC.i386:1.4	Sat Jan  7 20:44:41 2012
+++ src/sys/arch/usermode/conf/GENERIC.i386	Sun Jan 15 00:25:33 2012
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC.i386,v 1.4 2012/01/07 20:44:41 reinoud Exp $
+# $NetBSD: GENERIC.i386,v 1.5 2012/01/15 00:25:33 jmcneill Exp $
 
 machine usermode
 include arch/usermode/conf/GENERIC.common
@@ -6,6 +6,8 @@ include arch/i386/conf/majors.i386
 
 no options EXEC_ELF64
 
+options 	INSECURE		# required by sysinst
+
 options		TEXTADDR=0x4000	# 1 Gb `phys ram' / total space
 options		KVMSIZE= 0x1000	# KVM space reserved in VM map, 256 Mb
 options		NKMEMPAGES_MAX=32768	# 128 Mb max
@@ -14,5 +16,5 @@ makeoptions	COPTS+=-m32
 makeoptions	LD=ld -melf_i386
 
 #options 	INCLUDE_CONFIG_FILE
-#ident 		GENERIC32-$Revision: 1.4 $
+#ident 		GENERIC32-$Revision: 1.5 $
 



CVS commit: src

2012-01-14 Thread Mindaugas Rasiukevicius
Module Name:src
Committed By:   rmind
Date:   Sun Jan 15 00:49:49 UTC 2012

Modified Files:
src/lib/libnpf: npf.3 npf.c npf.h
src/sys/net/npf: npf.c npf.h npf_ctl.c npf_handler.c npf_instr.c
npf_nat.c npf_processor.c npf_ruleset.c npf_tableset.c
src/usr.sbin/npf/npfctl: npf_build.c npf_parse.y npf_var.c npfctl.c
npfctl.h

Log Message:
- Expire all sessions on flush.
- Enable checking for zero mask in IP{4,6}MATCH after npfctl changes.
- Make locking symmetric for npf_ruleset_inspect().
- Sync function prototypes in npf(3) man page with reality.
- Rename NPF_TABLE_RBTREE to NPF_TABLE_TREE.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/lib/libnpf/npf.3
cvs rdiff -u -r1.5 -r1.6 src/lib/libnpf/npf.c
cvs rdiff -u -r1.4 -r1.5 src/lib/libnpf/npf.h
cvs rdiff -u -r1.6 -r1.7 src/sys/net/npf/npf.c
cvs rdiff -u -r1.11 -r1.12 src/sys/net/npf/npf.h \
src/sys/net/npf/npf_handler.c
cvs rdiff -u -r1.10 -r1.11 src/sys/net/npf/npf_ctl.c
cvs rdiff -u -r1.8 -r1.9 src/sys/net/npf/npf_instr.c \
src/sys/net/npf/npf_nat.c src/sys/net/npf/npf_ruleset.c \
src/sys/net/npf/npf_tableset.c
cvs rdiff -u -r1.7 -r1.8 src/sys/net/npf/npf_processor.c
cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/npf/npfctl/npf_build.c
cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/npf/npfctl/npf_parse.y \
src/usr.sbin/npf/npfctl/npf_var.c
cvs rdiff -u -r1.8 -r1.9 src/usr.sbin/npf/npfctl/npfctl.c
cvs rdiff -u -r1.9 -r1.10 src/usr.sbin/npf/npfctl/npfctl.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/libnpf/npf.3
diff -u src/lib/libnpf/npf.3:1.3 src/lib/libnpf/npf.3:1.4
--- src/lib/libnpf/npf.3:1.3	Tue Mar 22 07:28:41 2011
+++ src/lib/libnpf/npf.3	Sun Jan 15 00:49:47 2012
@@ -1,6 +1,6 @@
-.\	$NetBSD: npf.3,v 1.3 2011/03/22 07:28:41 jruoho Exp $
+.\	$NetBSD: npf.3,v 1.4 2012/01/15 00:49:47 rmind Exp $
 .\
-.\ Copyright (c) 2011 The NetBSD Foundation, Inc.
+.\ Copyright (c) 2011-2012 The NetBSD Foundation, Inc.
 .\ All rights reserved.
 .\
 .\ This material is based upon work partially supported by The
@@ -27,7 +27,7 @@
 .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\ POSSIBILITY OF SUCH DAMAGE.
 .\
-.Dd March 22, 2011
+.Dd January 14, 2012
 .Dt NPF 3
 .Os
 .Sh NAME
@@ -44,6 +44,8 @@
 .Fn npf_config_submit nl_config_t *ncf int fd
 .Ft void
 .Fn npf_config_destroy nl_config_t *ncf
+.Ft int
+.Fn npf_config_flush int fd
 .\ ---
 .Ft nl_rule_t *
 .Fn npf_rule_create char *name uint32_t attr u_int if_idx
@@ -67,13 +69,13 @@
 .Fn npf_rproc_insert nl_config_t *ncf nl_rproc_t *rp
 .\ ---
 .Ft nl_nat_t *
-.Fn npf_nat_create int type int flags u_int if_idx \
+.Fn npf_nat_create int type u_int flags u_int if_idx \
 npf_addr_t *addr int af in_port_t port
 .Ft int
 .Fn npf_nat_insert nl_config_t *ncf nl_nat_t *nt pri_t pri
 .\ ---
 .Ft nl_table_t *
-.Fn npf_table_create int index int type
+.Fn npf_table_create u_int id int type
 .Ft int
 .Fn npf_table_add_entry nl_table_t *tl in_addr_t addr in_addr_t mask
 .Ft bool
@@ -84,7 +86,7 @@
 .Fn npf_table_destroy nl_table_t *tl
 .\ ---
 .Ft int
-.Fn npf_update_rule int fd char *rname nl_rule_t *rl
+.Fn npf_update_rule int fd const char *rname nl_rule_t *rl
 .Ft int
 .Fn npf_sessions_send int fd const char *fpath
 .Ft int
@@ -109,6 +111,8 @@ to the kernel.
 .It Fn npf_config_destroy ncf
 Destroy the configuration
 .Fa ncf .
+.It Fn npf_config_flush fd
+Flush the current configuration.
 .El
 .\ ---
 .Ss Rule interface
@@ -247,10 +251,10 @@ Insert NAT policy, its rule, into the sp
 .It Fn npf_table_create index type
 Create NPF table of specified type.
 The following types are supported:
-.Bl -tag -width NPF_TABLE_RBTREE 
+.Bl -tag -width NPF_TABLE_TREE 
 .It Dv NPF_TABLE_HASH
 Indicates to use hash table for storage.
-.It Dv NPF_TABLE_RBTREE
+.It Dv NPF_TABLE_TREE
 Indicates to use red-black tree for storage.
 Table is identified by
 .Fa index ,

Index: src/lib/libnpf/npf.c
diff -u src/lib/libnpf/npf.c:1.5 src/lib/libnpf/npf.c:1.6
--- src/lib/libnpf/npf.c:1.5	Sat Nov 26 23:42:27 2011
+++ src/lib/libnpf/npf.c	Sun Jan 15 00:49:47 2012
@@ -1,7 +1,7 @@
-/*	$NetBSD: npf.c,v 1.5 2011/11/26 23:42:27 christos Exp $	*/
+/*	$NetBSD: npf.c,v 1.6 2012/01/15 00:49:47 rmind Exp $	*/
 
 /*-
- * Copyright (c) 2010-2011 The NetBSD Foundation, Inc.
+ * Copyright (c) 2010-2012 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * This material is based upon work partially supported by The
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: npf.c,v 1.5 2011/11/26 23:42:27 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: npf.c,v 1.6 2012/01/15 00:49:47 rmind Exp $);
 
 #include sys/types.h
 #include netinet/in_systm.h
@@ -56,6 +56,7 @@ struct nl_config {
 	pri_t			ncf_nat_pri;
 	/* Custom file to externalise property-list. */
 	const char *		ncf_plist;
+	bool			ncf_flush;
 };
 
 struct nl_rule {
@@ -92,6 +93,7 @@ 

CVS commit: src/distrib/utils/embedded

2012-01-14 Thread Alistair G. Crooks
Module Name:src
Committed By:   agc
Date:   Sun Jan 15 02:01:03 UTC 2012

Added Files:
src/distrib/utils/embedded: mkimage mkpkgs usermode

Log Message:
Add 3 scripts which are useful for making images for usermode, or any
embedded platform in particular.

+ mkimage will make an autosized image in a file (using vnd) from sets
the resulting image can be mounted read-only, with tmpfs used for volatile
files on top of read-only bases

+ mkpkgs will make an autosized image in a file (using vnd) from binary
packages

+ usermode is an easy way to invoke usermode, making sure that bridging
is set up properly, and that the host syscallemu module is loaded. This
script then runs usermode with two file images (as produced by mkimage
and mkpkgs)


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/distrib/utils/embedded/mkimage \
src/distrib/utils/embedded/mkpkgs src/distrib/utils/embedded/usermode

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

Added files:

Index: src/distrib/utils/embedded/mkimage
diff -u /dev/null src/distrib/utils/embedded/mkimage:1.1
--- /dev/null	Sun Jan 15 02:01:03 2012
+++ src/distrib/utils/embedded/mkimage	Sun Jan 15 02:01:02 2012
@@ -0,0 +1,233 @@
+#! /bin/sh
+
+# $NetBSD: mkimage,v 1.1 2012/01/15 02:01:02 agc Exp $
+
+# Copyright (c) 2012 Alistair Crooks a...@netbsd.org
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#notice, this list of conditions and the following disclaimer in the
+#documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+# find next available vnd, from kre
+next_avail ()
+{
+	local dev=$1
+	local N=$(( ${#dev} + 1 ))
+	local unit units
+
+	units=$(
+		sysctl -n hw.disknames		|
+			tr ' ' '\012'		|
+			grep '^'${dev}'[0-9]'	|
+			sort -n -k 1.$N			)
+
+	test -z ${units}  {
+		test -e /dev/${dev}0a || {
+			echo 2 No ${dev}s available!
+			return 1
+		}
+		echo ${dev}0
+		return
+	}
+
+	N=0
+	for unit in ${units}
+	do
+		if [ ${unit} = ${dev}${N} ]
+		then
+			N=$(( N + 1 ))
+		else
+			echo ${dev}${N}
+			return
+		fi
+	done
+
+	test -e /dev/${dev}${N}a || {
+		echo 2 All ${dev}s in use
+		return 1
+	}
+
+	echo ${dev}${N}
+}
+
+# find the size of the gzipped files in a .tgz archive
+sizeone() {
+case $1 in 
+*.tgz|*.tar.gz)
+tar tvzf $1 | awk '{ tot += $5 } END { print tot }'
+;;
+*.tbz|*.tar.bz2)
+tar tvjf $1 | awk '{ tot += $5 } END { print tot }' 
+;;
+*)
+echo 0
+;; 
+esac
+}
+
+setsdir=/usr/build/release/i386/binary/sets
+size=0	# in MB
+overhead=8 # in MB
+image=usermode.img
+h=usermode1.$(uname -n)
+sets=base etc modules
+usermodedirs=/var.run /var.log /etc.cow /root.cow /pkgs
+specialdirs=/kern /proc
+bar
+
+while [ $# -gt 0 ]; do
+	case $1 in
+	-S)	setsdir=$2; shift ;;
+	-h)	h=$2; shift ;;
+	-s)	size=$2; shift ;;
+	-x)	set -x ;;
+	*)	break ;;
+	esac
+	shift
+done
+
+if [ $# -gt 0 ]; then
+	# take the next argument as being the image name
+	image=$1
+	shift
+fi
+
+total=0
+for s in ${sets}; do
+	total=$(expr ${total} + $(sizeone ${setsdir}/${s}.tgz))
+done
+total=$(expr \( ${total} / 100 \) + ${overhead})
+if [ $size -eq 0 ]; then
+# auto-size the pkgs fs
+size=${total}
+else
+# check that we've been given enough space
+if [ ${total} -gt ${size} ]; then
+echo File system size given as ${size} MB, but it needs ${total} MB 2
+exit 1
+fi
+fi
+
+echo ${bar} making a new ${size} MB image in ${image} ${bar}
+dd if=/dev/zero of=${image} bs=1m count=${size}
+
+vnddev=$(next_avail vnd)
+echo ${bar} mounting image via vnd ${vnddev} ${bar}
+sudo vnconfig ${vnddev} ${image}
+sudo newfs /dev/r${vnddev}a
+sudo mount /dev/${vnddev}a /mnt
+
+echo ${bar} installing sets ${bar}
+(cd 

CVS commit: src/doc/roadmaps

2012-01-14 Thread Alistair G. Crooks
Module Name:src
Committed By:   agc
Date:   Sun Jan 15 02:45:42 UTC 2012

Modified Files:
src/doc/roadmaps: virtualization

Log Message:
bring the virtualization roadmap up to date.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/doc/roadmaps/virtualization

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

Modified files:

Index: src/doc/roadmaps/virtualization
diff -u src/doc/roadmaps/virtualization:1.4 src/doc/roadmaps/virtualization:1.5
--- src/doc/roadmaps/virtualization:1.4	Tue Sep 15 21:07:58 2009
+++ src/doc/roadmaps/virtualization	Sun Jan 15 02:45:42 2012
@@ -1,4 +1,4 @@
-$NetBSD: virtualization,v 1.4 2009/09/15 21:07:58 agc Exp $
+$NetBSD: virtualization,v 1.5 2012/01/15 02:45:42 agc Exp $
 
 NetBSD Virtualization Roadmap
 =
@@ -6,15 +6,15 @@ NetBSD Virtualization Roadmap
 This is a small roadmap document, and deals with the virtualization
 side of the operating system.
 
+Features that will be in 6.0:
 1. NetBSD/usermode
-2. virtualization jails via secmodel
-3. iSCSI booting
-4. iSCSI device cloning
 5. Xen domU migration, suspend and resume
 6. Xen balloon driver support
 
-We currently expect to branch 6.0 in the March 2010 timeframe, with a view
-to a 6.0 release later in 2010.
+Features which may make future releases:
+2. virtualization jails via secmodel
+3. iSCSI booting
+4. iSCSI device cloning
 
 We'll continue to update this roadmap as features and dates get firmed up.
 
@@ -28,9 +28,11 @@ Some explanations
 NetBSD/usermode is an port of NetBSD to a POSIX-compatible user-space,
 with the intention that it should be possible to run the usermode
 version of NetBSD on any POSIX-compatible operating system.  This code
-has been committed to the repository, but more work is needed.
+has been committed to the repository by jmcneill, and updated by reinoud
+and jmcneill. usermode can now boot up to X11, can use a vnc console,
+and is under active development now. This is most definitely in 6.0.
 
-Responsible: jmcneill
+Responsible: jmcneill, reinoud
 
 2. Virtualization Jails via secmodel
 
@@ -38,7 +40,7 @@ Responsible: jmcneill
 One novel way of creating jails for virtualization is to use a new
 secmodel (part of the kauth framework), to isolate processes into
 jail-based virtual machines. This is the basis of a paper given by
-bad@ at AsiaBSDcon in March 2008.
+bad@ at AsiaBSDcon in March 2008. This will not make 6.0
 
 Responsible: bad
 
@@ -48,7 +50,7 @@ Responsible: bad
 In order to make Xen domains migration-friendly, the storage that the
 domain uses must be based on some form of network-centric storage, either
 NFS, or a SAN or IP-SAN. For IP-SANs, iSCSI booting will be used. This
-is dependent on the in-kernel iSCSI initiator project completing.
+is dependent on the in-kernel iSCSI initiator project completing. This will not make 6.0
 
 Responsible: agc
 
@@ -58,7 +60,7 @@ Responsible: agc
 To minimise the storage requirements for multiple domU booting, using
 a standard root filesystem or block device for the domU is required, along
 with some form of copy-on-write mechanism to preserve any modifications
-that are made.
+that are made. This will not make 6.0
 
 Responsible: agc
 
@@ -67,8 +69,8 @@ Responsible: agc
 
 Xen domU migration is where a domU domain is moved from one dom0 to
 another dom0 on the same vlan (to avoid networking problems, the
-virtual arp address migrates with the domU itself). jym is actively
-working on this, and preliminary results are good.
+virtual arp address migrates with the domU itself). jym has committed
+this code, and it will be in 6.0
 
 Responsible: jym, bouyer
 
@@ -77,11 +79,11 @@ Responsible: jym, bouyer
 
 The balloon driver allows more memory to be added to a running Xen domU
 instance; this allows extra memory to be used by the domU for resource
-peak needs. cherry has made a preliminary balloon driver - some testing
-is needed before it can be committed.
+peak needs. cherry has made a preliminary balloon driver and this has been
+further updated and tested by jym. This will be in 6.0.
 
-Responsible: cherry
+Responsible: jym, cherry
 
 
 Alistair Crooks
-Tue 15 Sep 2009 08:06:34 PDT
+Sat Jan 14 11:38:50 PST 2012



CVS commit: src/doc/roadmaps

2012-01-14 Thread Alistair G. Crooks
Module Name:src
Committed By:   agc
Date:   Sun Jan 15 02:49:13 UTC 2012

Modified Files:
src/doc/roadmaps: system

Log Message:
sync the system roadmap with reality


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/doc/roadmaps/system

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

Modified files:

Index: src/doc/roadmaps/system
diff -u src/doc/roadmaps/system:1.8 src/doc/roadmaps/system:1.9
--- src/doc/roadmaps/system:1.8	Tue Nov 17 21:09:54 2009
+++ src/doc/roadmaps/system	Sun Jan 15 02:49:12 2012
@@ -1,4 +1,4 @@
-$NetBSD: system,v 1.8 2009/11/17 21:09:54 agc Exp $
+$NetBSD: system,v 1.9 2012/01/15 02:49:12 agc Exp $
 
 NetBSD System Roadmap
 =
@@ -6,26 +6,20 @@ NetBSD System Roadmap
 This is a small roadmap document, and deals with the main system
 aspects of the operating system.
 
-The following projects are already in NetBSD-current and will appear
-in NetBSD 6.0:
-
+The following projects will appear in NetBSD 6.0:
 1. 64-bit time values supported
 2. Better Kernel Modules support
 5. namei() tactical changes
+9. namei() strategic changes
 10. emap (ephemeral mapping) support for i386 and amd64
 11. support for mDNSResponder
 
-The following projects are expected to be included in NetBSD 6.0
-
+The following projects may make it into future releases:
 3. Full kernel preemption for real-time threads
 4. POSIX shared memory
 6. Better resource controls
 7. Improved observability: online crashdumps, remote debugging
 8. Processor and cache topology aware scheduler
-9. namei() strategic changes
-
-We currently expect to branch 6.0 in the March 2010 timeframe, with a view
-to a 6.0 release later in 2010.
 
 We'll continue to update this roadmap as features and dates get firmed up.
 
@@ -69,6 +63,7 @@ be extended to support the ARM, MIPS and
 
 Responsible: rmind
 
+
 4. POSIX shared memory
 --
 
@@ -78,6 +73,7 @@ a process.
 
 Responsible: rmind
 
+
 5. Incremental namei improvements, Phase 1
 --
 
@@ -88,18 +84,25 @@ be in 6.0.
 
 Responsible: dholland
 
+
 6. Better resource controls
 ---
 
 A resource provisioning and control framework that extends beyond the
 traditional Unix process limits.
 
+Responsible: TBD
+
+
 7. Improved observability: online crashdumps, remote debugging
 --
 
 XXX crashdumps while the system is running
 XXX firewire support in libkvm
 
+Responsible: TBD
+
+
 8. Processor and cache topology aware scheduler
 ---
 
@@ -111,6 +114,7 @@ systems.
 
 Responsible: rmind
 
+
 9. Incremental namei improvements, Phase 2
 --
 
@@ -140,4 +144,4 @@ will appear in NetBSD 6.0.
 
 
 Alistair Crooks
-Thu Nov  5 07:47:34 PST 2009
+Sat Jan 14 11:40:49 PST 2012



CVS commit: src/doc/roadmaps

2012-01-14 Thread Alistair G. Crooks
Module Name:src
Committed By:   agc
Date:   Sun Jan 15 02:56:17 UTC 2012

Modified Files:
src/doc/roadmaps: networking

Log Message:
bring the networking roadmap up to date.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/doc/roadmaps/networking

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

Modified files:

Index: src/doc/roadmaps/networking
diff -u src/doc/roadmaps/networking:1.8 src/doc/roadmaps/networking:1.9
--- src/doc/roadmaps/networking:1.8	Sat Sep 26 05:36:22 2009
+++ src/doc/roadmaps/networking	Sun Jan 15 02:56:17 2012
@@ -1,4 +1,4 @@
-$NetBSD: networking,v 1.8 2009/09/26 05:36:22 tsarna Exp $
+$NetBSD: networking,v 1.9 2012/01/15 02:56:17 agc Exp $
 
 NetBSD Networking Roadmap
 =
@@ -7,7 +7,9 @@ This is a small roadmap document, and de
 side of the operating system.
 
 The following projects are expected to be included in NetBSD 6.0
+8. SMP-aware Network Packet Filter
 
+The following features are expected to be in future releases:
 1. Mobile IPv6
 2. SCTP
 3. network driver polling
@@ -16,9 +18,6 @@ The following projects are expected to b
 6. tcp support in libsa
 7. netboot from http
 
-We currently expect to branch 6.0 in the March 2010 timeframe, with a view
-to a 6.0 release later in 2010.
-
 We'll continue to update this roadmap as features and dates get firmed up.
 
 
@@ -30,16 +29,21 @@ Some explanations
 
 Add support for the SCTP for both IPv4 and IPv6.
 
+Responsible: TBD
+
+
 3. network driver polling
 -
 
 Responsible: matt
 
+
 4. ALTQ processing for input
 
 
 Responsible: matt
 
+
 5. multicast DNS / zeroconf
 ---
 
@@ -47,6 +51,7 @@ Add support for multicast DNS (name.loca
 
 Responsible: tsarna
 
+
 6. tcp support in libsa
 ---
 
@@ -54,14 +59,26 @@ Add a tiny tcp implementation to libsa.
 
 Responsible: matt
 
+
 7. http netbooting
 --
 
 Be able to use a HTTP server hosting a kernel and/or disk image as a
 read-only root device.
 
-Responsible: ???
+Responsible: TBD
+
+8. SMP-aware Packet Filter
+--
+
+A new packet filter which is SMP-aware has been written by rmind, as a
+project funded by the NetBSD Foundation.  zoltan has updated it for
+IPv6, and various bits contributed by christos, dholland and martin. 
+This will be in 6.0
+
+Responsible: rmind, zoltan, christos, dholland, martin
+
 
 Matt Thomas
 Alistair Crooks
-Sun 25 Jan 2009 21:06:42 PST
+Sat Jan 14 11:44:46 PST 2012



CVS commit: src/doc

2012-01-14 Thread Alistair G. Crooks
Module Name:src
Committed By:   agc
Date:   Sun Jan 15 02:58:40 UTC 2012

Modified Files:
src/doc: NetBSD-6

Log Message:
update the things in NetBSD 6.0


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/doc/NetBSD-6

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

Modified files:

Index: src/doc/NetBSD-6
diff -u src/doc/NetBSD-6:1.9 src/doc/NetBSD-6:1.10
--- src/doc/NetBSD-6:1.9	Tue Sep 20 00:31:06 2011
+++ src/doc/NetBSD-6	Sun Jan 15 02:58:39 2012
@@ -35,12 +35,12 @@ Will be in 6.0
 + GPT-aware bootloader for i386/amd64 - jakllsch
 + gcc 4.5
 + clang - joerg
++ NetBSD/usermode - jmcneill, reinoud
 
 Possibly in 6.0
 ---
 + mobile IPv6 - we have the mods, need application of same to the repo
 + kernel modules need work
-+ TNF funding for release engineering
 
 May not make 6.0
 



CVS commit: src/doc/roadmaps

2012-01-14 Thread Alistair G. Crooks
Module Name:src
Committed By:   agc
Date:   Sun Jan 15 03:11:13 UTC 2012

Modified Files:
src/doc/roadmaps: system

Log Message:
Thanks to rmind for the feedback; explain the status of some roadmap items
a bit more fully.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/doc/roadmaps/system

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

Modified files:

Index: src/doc/roadmaps/system
diff -u src/doc/roadmaps/system:1.9 src/doc/roadmaps/system:1.10
--- src/doc/roadmaps/system:1.9	Sun Jan 15 02:49:12 2012
+++ src/doc/roadmaps/system	Sun Jan 15 03:11:13 2012
@@ -1,4 +1,4 @@
-$NetBSD: system,v 1.9 2012/01/15 02:49:12 agc Exp $
+$NetBSD: system,v 1.10 2012/01/15 03:11:13 agc Exp $
 
 NetBSD System Roadmap
 =
@@ -38,6 +38,7 @@ major bump - kudos and respect), and wil
 
 Responsible: christos
 
+
 2. Better Kernel Module Support
 ---
 
@@ -51,6 +52,7 @@ modules.tgz has been created.
 
 Responsible: ad, lukem
 
+
 3. Full kernel preemption for real-time threads on non-x86
 --
 
@@ -59,7 +61,8 @@ fully multi-threaded and can therefore b
 support of lower context switch and dispatch times for real-time
 threads, full kernel preemption is being implemented.  This has been
 implemented already for i386 and x86_64 (and is in 5.0), but needs to
-be extended to support the ARM, MIPS and SuperH ports.
+be extended to support ARM and other ports.  MIPS has this, as does
+PowerPC, but it is not yet enabled.
 
 Responsible: rmind
 
@@ -67,9 +70,12 @@ Responsible: rmind
 4. POSIX shared memory
 --
 
-Implement POSIX shared memory facilities, which can be used to create the
-shared memory objects and add the memory locations to the address space of
-a process.
+Implement POSIX shared memory facilities, which can be used to create
+the shared memory objects and add the memory locations to the address
+space of a process.  Changes were proposed on tech-kern, although
+there were some concerns with the kernel implementation, and so a
+different approach using wrapper functions on tmpfs is being aimed at
+for 6.0.
 
 Responsible: rmind
 
@@ -110,7 +116,8 @@ Implement the detection of the topology 
 Improve the scheduler to make decisions about thread migration
 according to the topology, to get better thread affinity and less
 cache thrashing, and thus improve overall performance in modern SMP
-systems.
+systems. Code has been written, but did not show any performance
+impreovment. We will continue to monitor this area.
 
 Responsible: rmind
 



CVS commit: src/usr.bin/ftp

2012-01-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jan 15 03:58:28 UTC 2012

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

Log Message:
make -R work the same in ftp:// like it does for http:// (i.e. work if
there is no local file).


To generate a diff of this commit:
cvs rdiff -u -r1.132 -r1.133 src/usr.bin/ftp/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/ftp/cmds.c
diff -u src/usr.bin/ftp/cmds.c:1.132 src/usr.bin/ftp/cmds.c:1.133
--- src/usr.bin/ftp/cmds.c:1.132	Fri Sep 16 11:39:26 2011
+++ src/usr.bin/ftp/cmds.c	Sat Jan 14 22:58:28 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: cmds.c,v 1.132 2011/09/16 15:39:26 joerg Exp $	*/
+/*	$NetBSD: cmds.c,v 1.133 2012/01/15 03:58:28 christos Exp $	*/
 
 /*-
  * Copyright (c) 1996-2009 The NetBSD Foundation, Inc.
@@ -96,7 +96,7 @@
 #if 0
 static char sccsid[] = @(#)cmds.c	8.6 (Berkeley) 10/9/94;
 #else
-__RCSID($NetBSD: cmds.c,v 1.132 2011/09/16 15:39:26 joerg Exp $);
+__RCSID($NetBSD: cmds.c,v 1.133 2012/01/15 03:58:28 christos Exp $);
 #endif
 #endif /* not lint */
 
@@ -111,6 +111,7 @@ __RCSID($NetBSD: cmds.c,v 1.132 2011/09
 
 #include ctype.h
 #include err.h
+#include errno.h
 #include glob.h
 #include limits.h
 #include netdb.h
@@ -556,7 +557,7 @@ void
 reget(int argc, char *argv[])
 {
 
-	(void)getit(argc, argv, 1, r+);
+	(void)getit(argc, argv, 1, restart_point ? r+ : w );
 }
 
 void
@@ -612,10 +613,14 @@ getit(int argc, char *argv[], int restar
 		ret = stat(locfile, stbuf);
 		if (restartit == 1) {
 			if (ret  0) {
-warn(Can't stat `%s', locfile);
-goto freegetit;
+if (errno != ENOENT) {
+	warn(Can't stat `%s', locfile);
+	goto freegetit;
+}
+restart_point = 0;
 			}
-			restart_point = stbuf.st_size;
+			else
+restart_point = stbuf.st_size;
 		} else {
 			if (ret == 0) {
 time_t mtime;



CVS commit: src/sys/ufs/lfs

2012-01-14 Thread Konrad Schroder
Module Name:src
Committed By:   perseant
Date:   Sun Jan 15 04:42:04 UTC 2012

Modified Files:
src/sys/ufs/lfs: lfs_syscalls.c

Log Message:
Corrections to part of rev 1.140. lfs_bmapv, not lfs_markv, marks vnodes
LFSI_BMAP and recycles them.  This greatly reduces the writing leakage
occurring when the filesystem has no space available for non-cleaning
writes.


To generate a diff of this commit:
cvs rdiff -u -r1.140 -r1.141 src/sys/ufs/lfs/lfs_syscalls.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/ufs/lfs/lfs_syscalls.c
diff -u src/sys/ufs/lfs/lfs_syscalls.c:1.140 src/sys/ufs/lfs/lfs_syscalls.c:1.141
--- src/sys/ufs/lfs/lfs_syscalls.c:1.140	Mon Jan  2 22:10:45 2012
+++ src/sys/ufs/lfs/lfs_syscalls.c	Sun Jan 15 04:42:04 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: lfs_syscalls.c,v 1.140 2012/01/02 22:10:45 perseant Exp $	*/
+/*	$NetBSD: lfs_syscalls.c,v 1.141 2012/01/15 04:42:04 perseant Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2002, 2003, 2007, 2007, 2008
@@ -61,7 +61,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: lfs_syscalls.c,v 1.140 2012/01/02 22:10:45 perseant Exp $);
+__KERNEL_RCSID(0, $NetBSD: lfs_syscalls.c,v 1.141 2012/01/15 04:42:04 perseant Exp $);
 
 #ifndef LFS
 # define LFS		/* for prototypes in syscallargs.h */
@@ -291,17 +291,6 @@ lfs_markv(struct proc *p, fsid_t *fsidp,
 			 */
 			if (v_daddr != LFS_UNUSED_DADDR) {
 lfs_vunref(vp);
-/*
- * If the vnode has LFSI_BMAP, it was
- * not found in the cache.  Dump it so
- * we can reuse the vnode.
- * XXX If we knew what segment we were
- * XXX supposed to be looking for, we
- * XXX would be able to be more selective
- * XXX here.
- */
-if (ip-i_lfs_iflags  LFSI_BMAP)
-	vrecycle(vp, NULL, NULL);
 numrefed--;
 			}
 
@@ -719,6 +708,8 @@ lfs_bmapv(struct proc *p, fsid_t *fsidp,
 			 */
 			if (v_daddr != LFS_UNUSED_DADDR) {
 lfs_vunref(vp);
+if (VTOI(vp)-i_lfs_iflags  LFSI_BMAP)
+	vrecycle(vp, NULL, NULL);
 numrefed--;
 			}
 
@@ -1139,6 +1130,11 @@ lfs_fastvget(struct mount *mp, ino_t ino
 	ufs_ihashins(ip);
 	mutex_exit(ufs_hashlock);
 
+#ifdef notyet
+	/* Not found in the cache = this vnode was loaded only for cleaning. */
+	ip-i_lfs_iflags |= LFSI_BMAP;
+#endif
+
 	/*
 	 * XXX
 	 * This may not need to be here, logically it should go down with



CVS commit: src/doc/roadmaps

2012-01-14 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sun Jan 15 06:53:23 UTC 2012

Modified Files:
src/doc/roadmaps: system

Log Message:
typo


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/doc/roadmaps/system

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

Modified files:

Index: src/doc/roadmaps/system
diff -u src/doc/roadmaps/system:1.10 src/doc/roadmaps/system:1.11
--- src/doc/roadmaps/system:1.10	Sun Jan 15 03:11:13 2012
+++ src/doc/roadmaps/system	Sun Jan 15 06:53:23 2012
@@ -1,4 +1,4 @@
-$NetBSD: system,v 1.10 2012/01/15 03:11:13 agc Exp $
+$NetBSD: system,v 1.11 2012/01/15 06:53:23 dholland Exp $
 
 NetBSD System Roadmap
 =
@@ -117,7 +117,7 @@ Improve the scheduler to make decisions 
 according to the topology, to get better thread affinity and less
 cache thrashing, and thus improve overall performance in modern SMP
 systems. Code has been written, but did not show any performance
-impreovment. We will continue to monitor this area.
+improvement. We will continue to monitor this area.
 
 Responsible: rmind