CVS commit: [matt-nb5-mips64] src/sys/arch/mips/mips

2009-12-03 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Dec  4 04:42:09 UTC 2009

Modified Files:
src/sys/arch/mips/mips [matt-nb5-mips64]: mipsX_subr.S

Log Message:
Be consistent in use of _SLL/_SRL and WIRED_SHIFT


To generate a diff of this commit:
cvs rdiff -u -r1.26.36.1.2.14 -r1.26.36.1.2.15 \
src/sys/arch/mips/mips/mipsX_subr.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/mips/mips/mipsX_subr.S
diff -u src/sys/arch/mips/mips/mipsX_subr.S:1.26.36.1.2.14 src/sys/arch/mips/mips/mipsX_subr.S:1.26.36.1.2.15
--- src/sys/arch/mips/mips/mipsX_subr.S:1.26.36.1.2.14	Fri Dec  4 04:37:08 2009
+++ src/sys/arch/mips/mips/mipsX_subr.S	Fri Dec  4 04:42:09 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: mipsX_subr.S,v 1.26.36.1.2.14 2009/12/04 04:37:08 matt Exp $	*/
+/*	$NetBSD: mipsX_subr.S,v 1.26.36.1.2.15 2009/12/04 04:42:09 matt Exp $	*/
 
 /*
  * Copyright 2002 Wasabi Systems, Inc.
@@ -354,20 +354,20 @@
 	PTR_ADDU k1, k1, k0			#0c: k1=pte address
 	INT_L	k0, 0(k1)			#0d: k0=lo0 pte
 	INT_L	k1, 4(k1)			#0e: k1=lo1 pte
-	PTR_SLL	k0, WIRED_SHIFT			#0f: chop top 2 bits (part 1a)
-	PTR_SRL	k0, WIRED_SHIFT			#10: chop top 2 bits (part 1b)
+	_SLL	k0, WIRED_SHIFT			#0f: chop top 2 bits (part 1a)
+	_SRL	k0, WIRED_SHIFT			#10: chop top 2 bits (part 1b)
 #ifdef MIPS3_5900
-	mtc0	k0, MIPS_COP_0_TLB_LO0		#11: lo0 is loaded
+	_MTC0	k0, MIPS_COP_0_TLB_LO0		#11: lo0 is loaded
 	sync.p	#12: R5900 cop0 hazard
-	PTR_SLL	k1, WIRED_SHIFT			#13: chop top 2 bits (part 2a)
-	PTR_SRL	k1, WIRED_SHIFT			#14: chop top 2 bits (part 2b)
-	mtc0	k1, MIPS_COP_0_TLB_LO1		#15: lo1 is loaded
+	_SLL	k1, WIRED_SHIFT			#13: chop top 2 bits (part 2a)
+	_SRL	k1, WIRED_SHIFT			#14: chop top 2 bits (part 2b)
+	_MTC0	k1, MIPS_COP_0_TLB_LO1		#15: lo1 is loaded
 	sync.p	#16: R5900 cop0 hazard
 #else /* MIPS3_5900 */
-	mtc0	k0, MIPS_COP_0_TLB_LO0		#11: lo0 is loaded
-	PTR_SLL	k1, WIRED_SHIFT			#12: chop top 2 bits (part 2a)
-	PTR_SRL	k1, WIRED_SHIFT			#13: chop top 2 bits (part 2b)
-	mtc0	k1, MIPS_COP_0_TLB_LO1		#14: lo1 is loaded
+	_MTC0	k0, MIPS_COP_0_TLB_LO0		#11: lo0 is loaded
+	_SLL	k1, WIRED_SHIFT			#12: chop top 2 bits (part 2a)
+	_SRL	k1, WIRED_SHIFT			#13: chop top 2 bits (part 2b)
+	_MTC0	k1, MIPS_COP_0_TLB_LO1		#14: lo1 is loaded
 	nop	#15: standard nop
 	nop	#16: extra nop for QED5230
 #endif /* MIPS3_5900 */
@@ -416,12 +416,12 @@
 	PTR_ADDU k1, k1, k0			#0c: k1=pte address
 	INT_L	k0, 0(k1)			#0d: k0=lo0 pte
 	INT_L	k1, 4(k1)			#0e: k1=lo1 pte
-	PTR_SLL	k0, 2#0f: chop top 2 bits (part 1a)
-	PTR_SRL	k0, 2#10: chop top 2 bits (part 1b)
-	mtc0	k0, MIPS_COP_0_TLB_LO0		#11: lo0 is loaded
-	PTR_SLL	k1, 2#12: chop top 2 bits (part 2a)
-	PTR_SRL	k1, 2#13: chop top 2 bits (part 2b)
-	mtc0	k1, MIPS_COP_0_TLB_LO1		#14: lo1 is loaded
+	_SLL	k0, WIRED_SHIFT			#0f: chop top 2 bits (part 1a)
+	_SRL	k0, WIRED_SHIFT			#10: chop top 2 bits (part 1b)
+	_MTC0	k0, MIPS_COP_0_TLB_LO0		#11: lo0 is loaded
+	_SLL	k1, WIRED_SHIFT			#12: chop top 2 bits (part 2a)
+	_SRL	k1, WIRED_SHIFT			#13: chop top 2 bits (part 2b)
+	_MTC0	k1, MIPS_COP_0_TLB_LO1		#14: lo1 is loaded
 	nop	#15: standard nop
 	nop	#16: extra nop for QED5230
 	tlbwr	#17: write to tlb
@@ -1521,7 +1521,7 @@
 
 	_SLL	k0, k0, WIRED_SHIFT		# get rid of "wired" bit
 	_SRL	k0, k0, WIRED_SHIFT
-	mtc0	k0, MIPS_COP_0_TLB_LO0		# load PTE entry
+	_MTC0	k0, MIPS_COP_0_TLB_LO0		# load PTE entry
 	COP0_SYNC
 	and	k0, k0, MIPS3_PG_V		# check for valid entry
 	nop	# required for QED5230



CVS commit: [matt-nb5-mips64] src/sys/arch/mips/mips

2009-12-03 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Dec  4 04:37:08 UTC 2009

Modified Files:
src/sys/arch/mips/mips [matt-nb5-mips64]: mipsX_subr.S

Log Message:
Repeat after me: Hardwired constants are bad.


To generate a diff of this commit:
cvs rdiff -u -r1.26.36.1.2.13 -r1.26.36.1.2.14 \
src/sys/arch/mips/mips/mipsX_subr.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/mips/mips/mipsX_subr.S
diff -u src/sys/arch/mips/mips/mipsX_subr.S:1.26.36.1.2.13 src/sys/arch/mips/mips/mipsX_subr.S:1.26.36.1.2.14
--- src/sys/arch/mips/mips/mipsX_subr.S:1.26.36.1.2.13	Sun Nov 22 05:37:39 2009
+++ src/sys/arch/mips/mips/mipsX_subr.S	Fri Dec  4 04:37:08 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: mipsX_subr.S,v 1.26.36.1.2.13 2009/11/22 05:37:39 cyber Exp $	*/
+/*	$NetBSD: mipsX_subr.S,v 1.26.36.1.2.14 2009/12/04 04:37:08 matt Exp $	*/
 
 /*
  * Copyright 2002 Wasabi Systems, Inc.
@@ -354,19 +354,19 @@
 	PTR_ADDU k1, k1, k0			#0c: k1=pte address
 	INT_L	k0, 0(k1)			#0d: k0=lo0 pte
 	INT_L	k1, 4(k1)			#0e: k1=lo1 pte
-	PTR_SLL	k0, 2#0f: chop top 2 bits (part 1a)
-	PTR_SRL	k0, 2#10: chop top 2 bits (part 1b)
+	PTR_SLL	k0, WIRED_SHIFT			#0f: chop top 2 bits (part 1a)
+	PTR_SRL	k0, WIRED_SHIFT			#10: chop top 2 bits (part 1b)
 #ifdef MIPS3_5900
 	mtc0	k0, MIPS_COP_0_TLB_LO0		#11: lo0 is loaded
 	sync.p	#12: R5900 cop0 hazard
-	PTR_SLL	k1, 2#13: chop top 2 bits (part 2a)
-	PTR_SRL	k1, 2#14: chop top 2 bits (part 2b)
+	PTR_SLL	k1, WIRED_SHIFT			#13: chop top 2 bits (part 2a)
+	PTR_SRL	k1, WIRED_SHIFT			#14: chop top 2 bits (part 2b)
 	mtc0	k1, MIPS_COP_0_TLB_LO1		#15: lo1 is loaded
 	sync.p	#16: R5900 cop0 hazard
 #else /* MIPS3_5900 */
 	mtc0	k0, MIPS_COP_0_TLB_LO0		#11: lo0 is loaded
-	PTR_SLL	k1, 2#12: chop top 2 bits (part 2a)
-	PTR_SRL	k1, 2#13: chop top 2 bits (part 2b)
+	PTR_SLL	k1, WIRED_SHIFT			#12: chop top 2 bits (part 2a)
+	PTR_SRL	k1, WIRED_SHIFT			#13: chop top 2 bits (part 2b)
 	mtc0	k1, MIPS_COP_0_TLB_LO1		#14: lo1 is loaded
 	nop	#15: standard nop
 	nop	#16: extra nop for QED5230



CVS commit: [matt-nb5-mips64] src/sys/arch/mips/mips

2009-12-03 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Fri Dec  4 01:12:17 UTC 2009

Modified Files:
src/sys/arch/mips/mips [matt-nb5-mips64]:
bus_space_alignstride_chipdep.c

Log Message:
in BS(init) use ~0UL instead of 0xUL as end addr
when creating and allocating the mega extent used for
the one or more windows belonging to a bus space.


To generate a diff of this commit:
cvs rdiff -u -r1.10.18.10 -r1.10.18.11 \
src/sys/arch/mips/mips/bus_space_alignstride_chipdep.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/mips/bus_space_alignstride_chipdep.c
diff -u src/sys/arch/mips/mips/bus_space_alignstride_chipdep.c:1.10.18.10 src/sys/arch/mips/mips/bus_space_alignstride_chipdep.c:1.10.18.11
--- src/sys/arch/mips/mips/bus_space_alignstride_chipdep.c:1.10.18.10	Thu Dec  3 22:36:56 2009
+++ src/sys/arch/mips/mips/bus_space_alignstride_chipdep.c	Fri Dec  4 01:12:17 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: bus_space_alignstride_chipdep.c,v 1.10.18.10 2009/12/03 22:36:56 cliff Exp $ */
+/* $NetBSD: bus_space_alignstride_chipdep.c,v 1.10.18.11 2009/12/04 01:12:17 cliff Exp $ */
 
 /*-
  * Copyright (c) 1998, 2000, 2001 The NetBSD Foundation, Inc.
@@ -81,7 +81,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: bus_space_alignstride_chipdep.c,v 1.10.18.10 2009/12/03 22:36:56 cliff Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bus_space_alignstride_chipdep.c,v 1.10.18.11 2009/12/04 01:12:17 cliff Exp $");
 
 #ifdef CHIP_EXTENT
 #include 
@@ -552,9 +552,9 @@
 
 #ifdef CHIP_EXTENT
 	/* XXX WE WANT EXTENT_NOCOALESCE, BUT WE CAN'T USE IT. XXX */
-	ex = extent_create(__S(__BS(bus)), 0x0UL, 0xUL, M_DEVBUF,
+	ex = extent_create(__S(__BS(bus)), 0x0UL, ~0UL, M_DEVBUF,
 	(void *)CHIP_EX_STORE(v), CHIP_EX_STORE_SIZE(v), EX_NOWAIT);
-	extent_alloc_region(ex, 0, 0xUL, EX_NOWAIT);
+	extent_alloc_region(ex, 0, ~0UL, EX_NOWAIT);
 
 #ifdef CHIP_W1_BUS_START
 	/*



CVS commit: src/crypto/external/bsd/openssl/dist/ssl

2009-12-03 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Dec  3 23:44:33 UTC 2009

Modified Files:
src/crypto/external/bsd/openssl/dist/ssl: s3_lib.c s3_pkt.c s3_srvr.c

Log Message:
Disable SSL V3 session renegotiation since the protocol parameters of the
old session are not cryptographically tied to the new session ones.
NB: Applications that require session re-negotiation will fail after this
update.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/crypto/external/bsd/openssl/dist/ssl/s3_lib.c \
src/crypto/external/bsd/openssl/dist/ssl/s3_srvr.c
cvs rdiff -u -r1.3 -r1.4 src/crypto/external/bsd/openssl/dist/ssl/s3_pkt.c

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

Modified files:

Index: src/crypto/external/bsd/openssl/dist/ssl/s3_lib.c
diff -u src/crypto/external/bsd/openssl/dist/ssl/s3_lib.c:1.1.1.1 src/crypto/external/bsd/openssl/dist/ssl/s3_lib.c:1.2
--- src/crypto/external/bsd/openssl/dist/ssl/s3_lib.c:1.1.1.1	Sun Jul 19 19:05:48 2009
+++ src/crypto/external/bsd/openssl/dist/ssl/s3_lib.c	Thu Dec  3 18:44:33 2009
@@ -3297,6 +3297,8 @@
 	if (s->s3->flags & SSL3_FLAGS_NO_RENEGOTIATE_CIPHERS)
 		return(0);
 
+	if (1)
+		return(0);
 	s->s3->renegotiate=1;
 	return(1);
 	}
Index: src/crypto/external/bsd/openssl/dist/ssl/s3_srvr.c
diff -u src/crypto/external/bsd/openssl/dist/ssl/s3_srvr.c:1.1.1.1 src/crypto/external/bsd/openssl/dist/ssl/s3_srvr.c:1.2
--- src/crypto/external/bsd/openssl/dist/ssl/s3_srvr.c:1.1.1.1	Sun Jul 19 19:05:50 2009
+++ src/crypto/external/bsd/openssl/dist/ssl/s3_srvr.c	Thu Dec  3 18:44:33 2009
@@ -776,6 +776,13 @@
 #endif
 	STACK_OF(SSL_CIPHER) *ciphers=NULL;
 
+	if (s->new_session)
+		{
+		al=SSL_AD_HANDSHAKE_FAILURE;
+		SSLerr(SSL_F_SSL3_GET_CLIENT_HELLO, ERR_R_INTERNAL_ERROR);
+		goto f_err;
+		}
+
 	/* We do this so that we will respond with our native type.
 	 * If we are TLSv1 and we get SSLv3, we will respond with TLSv1,
 	 * This down switching should be handled by a different method.

Index: src/crypto/external/bsd/openssl/dist/ssl/s3_pkt.c
diff -u src/crypto/external/bsd/openssl/dist/ssl/s3_pkt.c:1.3 src/crypto/external/bsd/openssl/dist/ssl/s3_pkt.c:1.4
--- src/crypto/external/bsd/openssl/dist/ssl/s3_pkt.c:1.3	Wed Aug  5 14:38:22 2009
+++ src/crypto/external/bsd/openssl/dist/ssl/s3_pkt.c	Thu Dec  3 18:44:33 2009
@@ -1084,9 +1084,13 @@
 		if (s->msg_callback)
 			s->msg_callback(0, s->version, SSL3_RT_HANDSHAKE, s->s3->handshake_fragment, 4, s, s->msg_callback_arg);
 
+#if 0
 		if (SSL_is_init_finished(s) &&
 			!(s->s3->flags & SSL3_FLAGS_NO_RENEGOTIATE_CIPHERS) &&
 			!s->s3->renegotiate)
+#else
+		if (0)
+#endif
 			{
 			ssl3_renegotiate(s);
 			if (ssl3_renegotiate_check(s))
@@ -1217,8 +1221,12 @@
 	/* Unexpected handshake message (Client Hello, or protocol violation) */
 	if ((s->s3->handshake_fragment_len >= 4) &&	!s->in_handshake)
 		{
+#if 0
 		if (((s->state&SSL_ST_MASK) == SSL_ST_OK) &&
 			!(s->s3->flags & SSL3_FLAGS_NO_RENEGOTIATE_CIPHERS))
+#else
+		if (0)
+#endif
 			{
 #if 0 /* worked only because C operator preferences are not as expected (and
* because this is not really needed for clients except for detecting



CVS commit: [matt-nb5-mips64] src/sys/arch/mips/mips

2009-12-03 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Thu Dec  3 22:36:56 UTC 2009

Modified Files:
src/sys/arch/mips/mips [matt-nb5-mips64]:
bus_space_alignstride_chipdep.c

Log Message:
fix unused var warning when _LP64 is defined and CHIP_EXTENT is undefined


To generate a diff of this commit:
cvs rdiff -u -r1.10.18.9 -r1.10.18.10 \
src/sys/arch/mips/mips/bus_space_alignstride_chipdep.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/mips/bus_space_alignstride_chipdep.c
diff -u src/sys/arch/mips/mips/bus_space_alignstride_chipdep.c:1.10.18.9 src/sys/arch/mips/mips/bus_space_alignstride_chipdep.c:1.10.18.10
--- src/sys/arch/mips/mips/bus_space_alignstride_chipdep.c:1.10.18.9	Sun Nov 22 00:30:07 2009
+++ src/sys/arch/mips/mips/bus_space_alignstride_chipdep.c	Thu Dec  3 22:36:56 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: bus_space_alignstride_chipdep.c,v 1.10.18.9 2009/11/22 00:30:07 cliff Exp $ */
+/* $NetBSD: bus_space_alignstride_chipdep.c,v 1.10.18.10 2009/12/03 22:36:56 cliff Exp $ */
 
 /*-
  * Copyright (c) 1998, 2000, 2001 The NetBSD Foundation, Inc.
@@ -81,7 +81,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: bus_space_alignstride_chipdep.c,v 1.10.18.9 2009/11/22 00:30:07 cliff Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bus_space_alignstride_chipdep.c,v 1.10.18.10 2009/12/03 22:36:56 cliff Exp $");
 
 #ifdef CHIP_EXTENT
 #include 
@@ -793,8 +793,9 @@
 void
 __BS(unmap)(void *v, bus_space_handle_t h, bus_size_t size, int acct)
 {
+#if !defined(_LP64) || defined(CHIP_EXTENT)
 	bus_addr_t addr = 0;	/* initialize to appease gcc */
-
+#endif
 #ifndef _LP64
 	bool handle_is_kseg2;
 



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

2009-12-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Dec  3 22:18:05 UTC 2009

Modified Files:
src/sys/arch/hp700/dev: dino.c

Log Message:
Apply errata workarounds.

>From OpenBSD.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/hp700/dev/dino.c

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

Modified files:

Index: src/sys/arch/hp700/dev/dino.c
diff -u src/sys/arch/hp700/dev/dino.c:1.17 src/sys/arch/hp700/dev/dino.c:1.18
--- src/sys/arch/hp700/dev/dino.c:1.17	Tue Dec  1 22:36:31 2009
+++ src/sys/arch/hp700/dev/dino.c	Thu Dec  3 22:18:04 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: dino.c,v 1.17 2009/12/01 22:36:31 skrll Exp $ */
+/*	$NetBSD: dino.c,v 1.18 2009/12/03 22:18:04 skrll Exp $ */
 
 /*	$OpenBSD: dino.c,v 1.5 2004/02/13 20:39:31 mickey Exp $	*/
 
@@ -29,7 +29,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: dino.c,v 1.17 2009/12/01 22:36:31 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dino.c,v 1.18 2009/12/03 22:18:04 skrll Exp $");
 
 /* #include "cardbus.h" */
 
@@ -331,9 +331,18 @@
 	struct dino_softc *sc = v;
 	volatile struct dino_regs *r = sc->sc_regs;
 	pcireg_t data;
+	uint32_t pamr;
+
+	/* fix arbitration errata by disabling all pci devs on config read */
+	pamr = r->pamr;
+	r->pamr = 0;
 
 	r->pci_addr = tag | reg;
 	data = r->pci_conf_data;
+
+	/* restore arbitration */
+	r->pamr = pamr;
+
 	return le32toh(data);
 }
 
@@ -343,16 +352,21 @@
 	struct dino_softc *sc = v;
 	volatile struct dino_regs *r = sc->sc_regs;
 	pcireg_t data1;
+	uint32_t pamr;
 
-	/* fix coalescing config writes errata by interleaving w/ a read */
-	r->pci_addr = tag | PCI_ID_REG;
-	data1 = r->pci_conf_data;
+	/* fix arbitration errata by disabling all pci devs on config read */
+	pamr = r->pamr;
+	r->pamr = 0;
 
 	r->pci_addr = tag | reg;
 	r->pci_conf_data = htole32(data);
 
+	/* fix coalescing config and io writes by interleaving w/ a read */
 	r->pci_addr = tag | PCI_ID_REG;
 	data1 = r->pci_conf_data;
+
+	/* restore arbitration */
+	r->pamr = pamr;
 }
 
 int



CVS commit: src/sys/dev/acpi

2009-12-03 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Thu Dec  3 21:04:29 UTC 2009

Modified Files:
src/sys/dev/acpi: acpi.c files.acpi
Added Files:
src/sys/dev/acpi: acpi_pci.c acpi_pci.h

Log Message:
Enumerate ACPI PCI devices. Allows to link PCI with ACPI devices.
Patch presented on tech-kern@
http://mail-index.netbsd.org/tech-kern/2009/11/28/msg006552.html

'nice work' Jukka Ruohonen


To generate a diff of this commit:
cvs rdiff -u -r1.136 -r1.137 src/sys/dev/acpi/acpi.c
cvs rdiff -u -r0 -r1.1 src/sys/dev/acpi/acpi_pci.c \
src/sys/dev/acpi/acpi_pci.h
cvs rdiff -u -r1.62 -r1.63 src/sys/dev/acpi/files.acpi

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

Modified files:

Index: src/sys/dev/acpi/acpi.c
diff -u src/sys/dev/acpi/acpi.c:1.136 src/sys/dev/acpi/acpi.c:1.137
--- src/sys/dev/acpi/acpi.c:1.136	Sun Nov 29 21:32:50 2009
+++ src/sys/dev/acpi/acpi.c	Thu Dec  3 21:04:29 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: acpi.c,v 1.136 2009/11/29 21:32:50 cegger Exp $	*/
+/*	$NetBSD: acpi.c,v 1.137 2009/12/03 21:04:29 cegger Exp $	*/
 
 /*-
  * Copyright (c) 2003, 2007 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.136 2009/11/29 21:32:50 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.137 2009/12/03 21:04:29 cegger Exp $");
 
 #include "opt_acpi.h"
 #include "opt_pcifixup.h"
@@ -90,6 +90,7 @@
 #include 
 #include 
 #include 
+#include 
 #ifdef ACPIVERBOSE
 #include 
 #endif
@@ -168,7 +169,7 @@
 #if defined(i386) || defined(x86_64)
 	"PNP",	/* AT interrupt controller is handled internally */
 	"PNP0200",	/* AT DMA controller is handled internally */
-	"PNP0A??",	/* Busses aren't enumerated with ACPI yet */
+	"PNP0A??",	/* PCI Busses are handled internally */
 	"PNP0B00",	/* AT RTC is handled internally */
 	"PNP0C01",	/* No "System Board" driver */
 	"PNP0C02",	/* No "PnP motherboard register resources" driver */
@@ -712,6 +713,8 @@
 	acpi_rescan1(sc, NULL, NULL);
 
 	acpi_wakedev_scan(sc);
+
+	acpi_pcidev_scan(sc);
 }
 
 static int

Index: src/sys/dev/acpi/files.acpi
diff -u src/sys/dev/acpi/files.acpi:1.62 src/sys/dev/acpi/files.acpi:1.63
--- src/sys/dev/acpi/files.acpi:1.62	Wed Nov 25 13:21:49 2009
+++ src/sys/dev/acpi/files.acpi	Thu Dec  3 21:04:29 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: files.acpi,v 1.62 2009/11/25 13:21:49 cegger Exp $
+#	$NetBSD: files.acpi,v 1.63 2009/12/03 21:04:29 cegger Exp $
 
 include "dev/acpi/acpica/files.acpica"
 
@@ -16,6 +16,7 @@
 file	dev/acpi/acpi_resource.c	acpi
 file	dev/acpi/acpi_powerres.c	acpi
 file	dev/acpi/acpi_madt.c		acpi
+file	dev/acpi/acpi_pci.c		acpi
 file	dev/acpi/acpi_pci_link.c	acpi
 file	dev/acpi/acpi_quirks.c		acpi
 file	dev/acpi/acpi_timer.c		acpi

Added files:

Index: src/sys/dev/acpi/acpi_pci.c
diff -u /dev/null src/sys/dev/acpi/acpi_pci.c:1.1
--- /dev/null	Thu Dec  3 21:04:29 2009
+++ src/sys/dev/acpi/acpi_pci.c	Thu Dec  3 21:04:29 2009
@@ -0,0 +1,214 @@
+/* $NetBSD $ */
+
+/*
+ * Copyright (c) 2009 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Christoph Egger.
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ *derived from this software without specific prior written permission.
+ *
+ * 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.
+ */
+
+/*
+ * ACPI PCI Bus
+ */
+
+#include 
+__KERNEL_RCSID(0, "$NetBSD: acpi_pci.c,v 1.1 2009/12/03 21:04:29 cegger Exp $");
+
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+
+struct acpi_pcidev;
+
+static TAILQ_HEAD(, acpi_pcidev) acpi_pcidevlist =
+TAILQ_HEAD_INITIALIZER(acpi_pcidevlist);
+
+struct acpi_pcidev {
+	struct acpi_devnode *ap_node;
+	uint32_t ap_pciseg;
+	uint32_t ap_pcibus;
+	uint32_t ap_pcidev;
+	uint32_t ap_pcifunc;
+	bool ap_pcihost;
+	TAILQ_ENTRY(acpi_pcidev) ap_list;
+};
+
+
+st

CVS commit: src/distrib/sets

2009-12-03 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Thu Dec  3 18:26:34 UTC 2009

Modified Files:
src/distrib/sets: sets.subr

Log Message:
Add MKZFS to MKEXTRAVARS just to make sure.


To generate a diff of this commit:
cvs rdiff -u -r1.102 -r1.103 src/distrib/sets/sets.subr

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

Modified files:

Index: src/distrib/sets/sets.subr
diff -u src/distrib/sets/sets.subr:1.102 src/distrib/sets/sets.subr:1.103
--- src/distrib/sets/sets.subr:1.102	Thu Dec  3 13:45:11 2009
+++ src/distrib/sets/sets.subr	Thu Dec  3 18:26:34 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: sets.subr,v 1.102 2009/12/03 13:45:11 uebayasi Exp $
+#	$NetBSD: sets.subr,v 1.103 2009/12/03 18:26:34 uebayasi Exp $
 #
 
 #
@@ -32,6 +32,7 @@
 	MKDYNAMICROOT	\
 	MKMANPAGES	\
 	MKXORG		\
+	MKZFS		\
 	USE_INET6	\
 	USE_KERBEROS	\
 	USE_LDAP	\
@@ -219,7 +220,7 @@
 # In each file, a record consists of a path and a System Package name,
 # separated by whitespace. E.g.,
 #
-# 	# $NetBSD: sets.subr,v 1.102 2009/12/03 13:45:11 uebayasi Exp $
+# 	# $NetBSD: sets.subr,v 1.103 2009/12/03 18:26:34 uebayasi Exp $
 # 	.			base-sys-root	[keyword[,...]]
 # 	./altroot		base-sys-root
 # 	./bin			base-sys-root



CVS commit: [netbsd-5] src/doc

2009-12-03 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Thu Dec  3 17:40:26 UTC 2009

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

Log Message:
Ticket 1178.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.155 -r1.1.2.156 src/doc/CHANGES-5.1

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

Modified files:

Index: src/doc/CHANGES-5.1
diff -u src/doc/CHANGES-5.1:1.1.2.155 src/doc/CHANGES-5.1:1.1.2.156
--- src/doc/CHANGES-5.1:1.1.2.155	Thu Dec  3 09:40:20 2009
+++ src/doc/CHANGES-5.1	Thu Dec  3 17:40:26 2009
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.1,v 1.1.2.155 2009/12/03 09:40:20 sborrill Exp $
+# $NetBSD: CHANGES-5.1,v 1.1.2.156 2009/12/03 17:40:26 snj Exp $
 
 A complete list of changes from the NetBSD 5.0 release to the NetBSD 5.1
 release:
@@ -15097,3 +15097,403 @@
 	queue did not actually release the dequeued mbufs.
 	[plunky, ticket #1173]
 
+dist/bind/CHANGESpatch
+dist/bind/COPYRIGHTpatch
+dist/bind/FAQ	patch
+dist/bind/FAQ.xmlpatch
+dist/bind/KNOWN-DEFECTSdeleted
+dist/bind/Makefile.inpatch
+dist/bind/READMEpatch
+dist/bind/README.idnkitpatch
+dist/bind/acconfig.hpatch
+dist/bind/bind.keysnew file
+dist/bind/config.guesspatch
+dist/bind/config.h.inpatch
+dist/bind/configurepatch
+dist/bind/configure.inpatch
+dist/bind/isc-config.sh.1			new file
+dist/bind/isc-config.sh.docbook			new file
+dist/bind/isc-config.sh.html			new file
+dist/bind/libtool.m4patch
+dist/bind/ltmain.shpatch
+dist/bind/versionpatch
+dist/bind/bin/check/check-tool.c		patch
+dist/bind/bin/check/named-checkconf.8		patch
+dist/bind/bin/check/named-checkconf.c		patch
+dist/bind/bin/check/named-checkconf.html	patch
+dist/bind/bin/check/named-checkzone.8		patch
+dist/bind/bin/check/named-checkzone.c		patch
+dist/bind/bin/check/named-checkzone.docbook	patch
+dist/bind/bin/check/named-checkzone.html	patch
+dist/bind/bin/dig/dig.1patch
+dist/bind/bin/dig/dig.cpatch
+dist/bind/bin/dig/dig.docbook			patch
+dist/bind/bin/dig/dig.html			patch
+dist/bind/bin/dig/dighost.c			patch
+dist/bind/bin/dig/host.1			patch
+dist/bind/bin/dig/host.c			patch
+dist/bind/bin/dig/host.docbook			patch
+dist/bind/bin/dig/host.html			patch
+dist/bind/bin/dig/nslookup.1			patch
+dist/bind/bin/dig/nslookup.c			patch
+dist/bind/bin/dig/nslookup.html			patch
+dist/bind/bin/dig/include/dig/dig.h		patch
+dist/bind/bin/dnssec/dnssec-keygen.8		patch
+dist/bind/bin/dnssec/dnssec-keygen.docbook	patch
+dist/bind/bin/dnssec/dnssec-keygen.html		patch
+dist/bind/bin/dnssec/dnssec-signzone.8		patch
+dist/bind/bin/dnssec/dnssec-signzone.c		patch
+dist/bind/bin/dnssec/dnssec-signzone.docbook	patch
+dist/bind/bin/dnssec/dnssec-signzone.html	patch
+dist/bind/bin/named/bind9.xsl			patch
+dist/bind/bin/named/bind9.xsl.h			patch
+dist/bind/bin/named/client.c			patch
+dist/bind/bin/named/config.c			patch
+dist/bind/bin/named/control.c			patch
+dist/bind/bin/named/controlconf.c		patch
+dist/bind/bin/named/convertxsl.pl		patch
+dist/bind/bin/named/interfacemgr.c		patch
+dist/bind/bin/named/log.c			patch
+dist/bind/bin/named/lwresd.8			patch
+dist/bind/bin/named/lwresd.c			patch
+dist/bind/bin/named/lwresd.docbook		patch
+dist/bind/bin/named/lwresd.html			patch
+dist/bind/bin/named/main.c			patch
+dist/bind/bin/named/named.8			patch
+dist/bind/bin/named/named.conf.5		patch
+dist/bind/bin/named/named.conf.docbook		patch
+dist/bind/bin/named/named.conf.html		patch
+dist/bind/bin/named/named.docbook		patch
+dist/bind/bin/named/named.html			patch
+dist/bind/bin/named/query.c			patch
+dist/bind/bin/named/server.c			patch
+dist/bind/bin/named/statschannel.c		patch
+dist/bind/bin/named/update.c			patch
+dist/bind/bin/named/xfrout.c			patch
+dist/bind/bin/named/zoneconf.c			patch
+dist/bind/bin/named/include/named/client.h	patch
+dist/bind/bin/named/include/named/globals.h	patch
+dist/bind/bin/named/include/named/log.h		patch
+dist/bind/bin/named/include/named/lwdclient.h	patch
+dist/bind/bin/named/include/named/notify.h	patch
+dist/bind/bin/named/include/named/server.h	patch
+dist/bind/bin/named/unix/os.c			patch
+dist/bind/bin/named/unix/include/named/os.h	patch
+dist/bind/bin/named/win32/ntservice.c		patch
+dist/bind/bin/named/win32/os.c			patch
+dist/bind/bin/named/win32/include/named/os.h	patch
+dist/bind/bin/nsupdate/Makefile.in		patch
+dist/bind/bin/nsupdate/nsupdate.1		new file
+dist/bind/bin/nsupdate/nsupdate.8		deleted
+dist/bind/bin/nsupdate/nsupdate.c		patch
+dist/bind/bin/nsupdate/nsupdate.docbook		patch
+dist/bind/bin/nsupdate/nsupdate.html		patch
+dist/bind/bin/rndc/rndc-confgen.8		patch
+dist/bind/bin/rndc/rndc-confgen.c		patch
+dist/bind/bin/rndc/rndc-confgen.html		patch
+dist/bind/bin/rndc/rndc.8			patch
+dist/bind/bin/rndc/rndc.c			patch
+dist/bind/bin/rndc/rndc.conf.5			patch
+dist/bind/bin/rndc/rndc.conf.html		patch
+dist/bind/bin/rndc/rndc.html			patch
+dist/bind/bin/rndc/include/rndc/os.h		patch
+dist/bind/bin/test

CVS commit: [netbsd-5] src

2009-12-03 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Thu Dec  3 17:38:36 UTC 2009

Modified Files:
src/dist/bind [netbsd-5]: CHANGES COPYRIGHT FAQ FAQ.xml Makefile.in
README README.idnkit acconfig.h config.guess config.h.in configure
configure.in libtool.m4 ltmain.sh version
src/dist/bind/bin/check [netbsd-5]: check-tool.c named-checkconf.8
named-checkconf.c named-checkconf.html named-checkzone.8
named-checkzone.c named-checkzone.docbook named-checkzone.html
src/dist/bind/bin/dig [netbsd-5]: dig.1 dig.c dig.docbook dig.html
dighost.c host.1 host.c host.docbook host.html nslookup.1
nslookup.c nslookup.html
src/dist/bind/bin/dig/include/dig [netbsd-5]: dig.h
src/dist/bind/bin/dnssec [netbsd-5]: dnssec-keygen.8
dnssec-keygen.docbook dnssec-keygen.html dnssec-signzone.8
dnssec-signzone.c dnssec-signzone.docbook dnssec-signzone.html
src/dist/bind/bin/named [netbsd-5]: bind9.xsl bind9.xsl.h client.c
config.c control.c controlconf.c convertxsl.pl interfacemgr.c log.c
lwresd.8 lwresd.c lwresd.docbook lwresd.html main.c named.8
named.conf.5 named.conf.docbook named.conf.html named.docbook
named.html query.c server.c statschannel.c update.c xfrout.c
zoneconf.c
src/dist/bind/bin/named/include/named [netbsd-5]: client.h globals.h
log.h lwdclient.h notify.h server.h
src/dist/bind/bin/named/unix [netbsd-5]: os.c
src/dist/bind/bin/named/unix/include/named [netbsd-5]: os.h
src/dist/bind/bin/named/win32 [netbsd-5]: ntservice.c os.c
src/dist/bind/bin/named/win32/include/named [netbsd-5]: os.h
src/dist/bind/bin/nsupdate [netbsd-5]: Makefile.in nsupdate.c
nsupdate.docbook nsupdate.html
src/dist/bind/bin/rndc [netbsd-5]: rndc-confgen.8 rndc-confgen.c
rndc-confgen.html rndc.8 rndc.c rndc.conf.5 rndc.conf.html
rndc.html
src/dist/bind/bin/rndc/include/rndc [netbsd-5]: os.h
src/dist/bind/bin/tests [netbsd-5]: cfg_test.c sig0_test.c sock_test.c
src/dist/bind/bin/tests/db [netbsd-5]: t_db.c
src/dist/bind/bin/tests/dst [netbsd-5]: Makefile.in dst_test.c t_dst.c
src/dist/bind/bin/tests/master [netbsd-5]: t_master.c
src/dist/bind/bin/tests/mem [netbsd-5]: t_mem.c
src/dist/bind/bin/tests/names [netbsd-5]: t_names.c
src/dist/bind/bin/tests/rbt [netbsd-5]: t_rbt.c
src/dist/bind/bin/tests/system [netbsd-5]: ifconfig.sh
src/dist/bind/bin/tests/system/acl [netbsd-5]: tests.sh
src/dist/bind/bin/tests/system/glue/ns1 [netbsd-5]: named.conf
src/dist/bind/bin/tests/system/rrsetorder [netbsd-5]: tests.sh
src/dist/bind/bin/tests/system/tkey/ns1 [netbsd-5]: named.conf.in
src/dist/bind/bin/tests/tasks [netbsd-5]: t_tasks.c
src/dist/bind/bin/tests/timers [netbsd-5]: t_timers.c
src/dist/bind/bin/win32/BINDInstall [netbsd-5]: BINDInstall.rc
BINDInstallDlg.cpp BINDInstallDlg.h VersionInfo.cpp resource.h
src/dist/bind/contrib/dlz [netbsd-5]: config.dlz.in
src/dist/bind/contrib/dlz/drivers [netbsd-5]: dlz_bdb_driver.c
dlz_mysql_driver.c
src/dist/bind/contrib/idn/idnkit-1.0-src/tools/idnconv [netbsd-5]:
selectiveencode.h
src/dist/bind/contrib/queryperf/utils [netbsd-5]: gen-data-queryperf.py
src/dist/bind/contrib/sdb/pgsql [netbsd-5]: zonetodb.c
src/dist/bind/doc/arm [netbsd-5]: Bv9ARM-book.xml Bv9ARM.ch01.html
Bv9ARM.ch02.html Bv9ARM.ch03.html Bv9ARM.ch04.html Bv9ARM.ch05.html
Bv9ARM.ch06.html Bv9ARM.ch07.html Bv9ARM.ch08.html Bv9ARM.ch09.html
Bv9ARM.ch10.html Bv9ARM.html Bv9ARM.pdf Makefile.in man.dig.html
man.dnssec-keygen.html man.dnssec-signzone.html man.host.html
man.named-checkconf.html man.named-checkzone.html man.named.html
man.rndc-confgen.html man.rndc.conf.html man.rndc.html
src/dist/bind/doc/misc [netbsd-5]: Makefile.in options
src/dist/bind/doc/rfc [netbsd-5]: index
src/dist/bind/doc/xsl [netbsd-5]: copyright.xsl
src/dist/bind/lib/bind [netbsd-5]: api configure configure.in
src/dist/bind/lib/bind/dst [netbsd-5]: dst_api.c hmac_link.c support.c
src/dist/bind/lib/bind/include/isc [netbsd-5]: assertions.h
src/dist/bind/lib/bind/inet [netbsd-5]: inet_net_pton.c
src/dist/bind/lib/bind/irs [netbsd-5]: dns_ho.c
src/dist/bind/lib/bind/isc [netbsd-5]: assertions.c bitncmp.c
src/dist/bind/lib/bind9 [netbsd-5]: api check.c
src/dist/bind/lib/bind9/include/bind9 [netbsd-5]: getaddresses.h
src/dist/bind/lib/dns [netbsd-5]: acl.c adb.c api cache.c db.c diff.c
dispatch.c dlz.c dnssec.c dst_api.c dst_parse.c gen-unix.h
gen-win32.h gssapi_link.c iptable.c jou

CVS commit: [netbsd-5-0] src/doc

2009-12-03 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Thu Dec  3 17:34:35 UTC 2009

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

Log Message:
Ticket 1178.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.29 -r1.1.2.30 src/doc/CHANGES-5.0.2

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

Modified files:

Index: src/doc/CHANGES-5.0.2
diff -u src/doc/CHANGES-5.0.2:1.1.2.29 src/doc/CHANGES-5.0.2:1.1.2.30
--- src/doc/CHANGES-5.0.2:1.1.2.29	Fri Nov 27 09:19:36 2009
+++ src/doc/CHANGES-5.0.2	Thu Dec  3 17:34:35 2009
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.0.2,v 1.1.2.29 2009/11/27 09:19:36 sborrill Exp $
+# $NetBSD: CHANGES-5.0.2,v 1.1.2.30 2009/12/03 17:34:35 snj Exp $
 
 A complete list of changes from the NetBSD 5.0.1 release to the NetBSD 5.0.2
 release:
@@ -466,3 +466,403 @@
 	Fixes PR/42312.
 	[dsl, ticket #1141]
 
+dist/bind/CHANGESpatch
+dist/bind/COPYRIGHTpatch
+dist/bind/FAQ	patch
+dist/bind/FAQ.xmlpatch
+dist/bind/KNOWN-DEFECTSdeleted
+dist/bind/Makefile.inpatch
+dist/bind/READMEpatch
+dist/bind/README.idnkitpatch
+dist/bind/acconfig.hpatch
+dist/bind/bind.keysnew file
+dist/bind/config.guesspatch
+dist/bind/config.h.inpatch
+dist/bind/configurepatch
+dist/bind/configure.inpatch
+dist/bind/isc-config.sh.1			new file
+dist/bind/isc-config.sh.docbook			new file
+dist/bind/isc-config.sh.html			new file
+dist/bind/libtool.m4patch
+dist/bind/ltmain.shpatch
+dist/bind/versionpatch
+dist/bind/bin/check/check-tool.c		patch
+dist/bind/bin/check/named-checkconf.8		patch
+dist/bind/bin/check/named-checkconf.c		patch
+dist/bind/bin/check/named-checkconf.html	patch
+dist/bind/bin/check/named-checkzone.8		patch
+dist/bind/bin/check/named-checkzone.c		patch
+dist/bind/bin/check/named-checkzone.docbook	patch
+dist/bind/bin/check/named-checkzone.html	patch
+dist/bind/bin/dig/dig.1patch
+dist/bind/bin/dig/dig.cpatch
+dist/bind/bin/dig/dig.docbook			patch
+dist/bind/bin/dig/dig.html			patch
+dist/bind/bin/dig/dighost.c			patch
+dist/bind/bin/dig/host.1			patch
+dist/bind/bin/dig/host.c			patch
+dist/bind/bin/dig/host.docbook			patch
+dist/bind/bin/dig/host.html			patch
+dist/bind/bin/dig/nslookup.1			patch
+dist/bind/bin/dig/nslookup.c			patch
+dist/bind/bin/dig/nslookup.html			patch
+dist/bind/bin/dig/include/dig/dig.h		patch
+dist/bind/bin/dnssec/dnssec-keygen.8		patch
+dist/bind/bin/dnssec/dnssec-keygen.docbook	patch
+dist/bind/bin/dnssec/dnssec-keygen.html		patch
+dist/bind/bin/dnssec/dnssec-signzone.8		patch
+dist/bind/bin/dnssec/dnssec-signzone.c		patch
+dist/bind/bin/dnssec/dnssec-signzone.docbook	patch
+dist/bind/bin/dnssec/dnssec-signzone.html	patch
+dist/bind/bin/named/bind9.xsl			patch
+dist/bind/bin/named/bind9.xsl.h			patch
+dist/bind/bin/named/client.c			patch
+dist/bind/bin/named/config.c			patch
+dist/bind/bin/named/control.c			patch
+dist/bind/bin/named/controlconf.c		patch
+dist/bind/bin/named/convertxsl.pl		patch
+dist/bind/bin/named/interfacemgr.c		patch
+dist/bind/bin/named/log.c			patch
+dist/bind/bin/named/lwresd.8			patch
+dist/bind/bin/named/lwresd.c			patch
+dist/bind/bin/named/lwresd.docbook		patch
+dist/bind/bin/named/lwresd.html			patch
+dist/bind/bin/named/main.c			patch
+dist/bind/bin/named/named.8			patch
+dist/bind/bin/named/named.conf.5		patch
+dist/bind/bin/named/named.conf.docbook		patch
+dist/bind/bin/named/named.conf.html		patch
+dist/bind/bin/named/named.docbook		patch
+dist/bind/bin/named/named.html			patch
+dist/bind/bin/named/query.c			patch
+dist/bind/bin/named/server.c			patch
+dist/bind/bin/named/statschannel.c		patch
+dist/bind/bin/named/update.c			patch
+dist/bind/bin/named/xfrout.c			patch
+dist/bind/bin/named/zoneconf.c			patch
+dist/bind/bin/named/include/named/client.h	patch
+dist/bind/bin/named/include/named/globals.h	patch
+dist/bind/bin/named/include/named/log.h		patch
+dist/bind/bin/named/include/named/lwdclient.h	patch
+dist/bind/bin/named/include/named/notify.h	patch
+dist/bind/bin/named/include/named/server.h	patch
+dist/bind/bin/named/unix/os.c			patch
+dist/bind/bin/named/unix/include/named/os.h	patch
+dist/bind/bin/named/win32/ntservice.c		patch
+dist/bind/bin/named/win32/os.c			patch
+dist/bind/bin/named/win32/include/named/os.h	patch
+dist/bind/bin/nsupdate/Makefile.in		patch
+dist/bind/bin/nsupdate/nsupdate.1		new file
+dist/bind/bin/nsupdate/nsupdate.8		deleted
+dist/bind/bin/nsupdate/nsupdate.c		patch
+dist/bind/bin/nsupdate/nsupdate.docbook		patch
+dist/bind/bin/nsupdate/nsupdate.html		patch
+dist/bind/bin/rndc/rndc-confgen.8		patch
+dist/bind/bin/rndc/rndc-confgen.c		patch
+dist/bind/bin/rndc/rndc-confgen.html		patch
+dist/bind/bin/rndc/rndc.8			patch
+dist/bind/bin/rndc/rndc.c			patch
+dist/bind/bin/rndc/rndc.conf.5			patch
+dist/bind/bin/rndc/rndc.conf.html		patch
+dist/bind/bin/rndc/rndc.html			patch
+dist/bind/bin/rndc/include/rndc/os.h		patch
+dist/bind/bin/tests/cfg_test.c			patch
+dis

CVS commit: [netbsd-5-0] src

2009-12-03 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Thu Dec  3 17:31:47 UTC 2009

Modified Files:
src/dist/bind [netbsd-5-0]: CHANGES COPYRIGHT FAQ FAQ.xml Makefile.in
README README.idnkit acconfig.h config.guess config.h.in configure
configure.in libtool.m4 ltmain.sh version
src/dist/bind/bin/check [netbsd-5-0]: check-tool.c named-checkconf.8
named-checkconf.c named-checkconf.html named-checkzone.8
named-checkzone.c named-checkzone.docbook named-checkzone.html
src/dist/bind/bin/dig [netbsd-5-0]: dig.1 dig.c dig.docbook dig.html
dighost.c host.1 host.c host.docbook host.html nslookup.1
nslookup.c nslookup.html
src/dist/bind/bin/dig/include/dig [netbsd-5-0]: dig.h
src/dist/bind/bin/dnssec [netbsd-5-0]: dnssec-keygen.8
dnssec-keygen.docbook dnssec-keygen.html dnssec-signzone.8
dnssec-signzone.c dnssec-signzone.docbook dnssec-signzone.html
src/dist/bind/bin/named [netbsd-5-0]: bind9.xsl bind9.xsl.h client.c
config.c control.c controlconf.c convertxsl.pl interfacemgr.c log.c
lwresd.8 lwresd.c lwresd.docbook lwresd.html main.c named.8
named.conf.5 named.conf.docbook named.conf.html named.docbook
named.html query.c server.c statschannel.c update.c xfrout.c
zoneconf.c
src/dist/bind/bin/named/include/named [netbsd-5-0]: client.h globals.h
log.h lwdclient.h notify.h server.h
src/dist/bind/bin/named/unix [netbsd-5-0]: os.c
src/dist/bind/bin/named/unix/include/named [netbsd-5-0]: os.h
src/dist/bind/bin/named/win32 [netbsd-5-0]: ntservice.c os.c
src/dist/bind/bin/named/win32/include/named [netbsd-5-0]: os.h
src/dist/bind/bin/nsupdate [netbsd-5-0]: Makefile.in nsupdate.c
nsupdate.docbook nsupdate.html
src/dist/bind/bin/rndc [netbsd-5-0]: rndc-confgen.8 rndc-confgen.c
rndc-confgen.html rndc.8 rndc.c rndc.conf.5 rndc.conf.html
rndc.html
src/dist/bind/bin/rndc/include/rndc [netbsd-5-0]: os.h
src/dist/bind/bin/tests [netbsd-5-0]: cfg_test.c sig0_test.c
sock_test.c
src/dist/bind/bin/tests/db [netbsd-5-0]: t_db.c
src/dist/bind/bin/tests/dst [netbsd-5-0]: Makefile.in dst_test.c
t_dst.c
src/dist/bind/bin/tests/master [netbsd-5-0]: t_master.c
src/dist/bind/bin/tests/mem [netbsd-5-0]: t_mem.c
src/dist/bind/bin/tests/names [netbsd-5-0]: t_names.c
src/dist/bind/bin/tests/rbt [netbsd-5-0]: t_rbt.c
src/dist/bind/bin/tests/system [netbsd-5-0]: ifconfig.sh
src/dist/bind/bin/tests/system/acl [netbsd-5-0]: tests.sh
src/dist/bind/bin/tests/system/glue/ns1 [netbsd-5-0]: named.conf
src/dist/bind/bin/tests/system/rrsetorder [netbsd-5-0]: tests.sh
src/dist/bind/bin/tests/system/tkey/ns1 [netbsd-5-0]: named.conf.in
src/dist/bind/bin/tests/tasks [netbsd-5-0]: t_tasks.c
src/dist/bind/bin/tests/timers [netbsd-5-0]: t_timers.c
src/dist/bind/bin/win32/BINDInstall [netbsd-5-0]: BINDInstall.rc
BINDInstallDlg.cpp BINDInstallDlg.h VersionInfo.cpp resource.h
src/dist/bind/contrib/dlz [netbsd-5-0]: config.dlz.in
src/dist/bind/contrib/dlz/drivers [netbsd-5-0]: dlz_bdb_driver.c
dlz_mysql_driver.c
src/dist/bind/contrib/idn/idnkit-1.0-src/tools/idnconv [netbsd-5-0]:
selectiveencode.h
src/dist/bind/contrib/queryperf/utils [netbsd-5-0]:
gen-data-queryperf.py
src/dist/bind/contrib/sdb/pgsql [netbsd-5-0]: zonetodb.c
src/dist/bind/doc/arm [netbsd-5-0]: Bv9ARM-book.xml Bv9ARM.ch01.html
Bv9ARM.ch02.html Bv9ARM.ch03.html Bv9ARM.ch04.html Bv9ARM.ch05.html
Bv9ARM.ch06.html Bv9ARM.ch07.html Bv9ARM.ch08.html Bv9ARM.ch09.html
Bv9ARM.ch10.html Bv9ARM.html Bv9ARM.pdf Makefile.in man.dig.html
man.dnssec-keygen.html man.dnssec-signzone.html man.host.html
man.named-checkconf.html man.named-checkzone.html man.named.html
man.rndc-confgen.html man.rndc.conf.html man.rndc.html
src/dist/bind/doc/misc [netbsd-5-0]: Makefile.in options
src/dist/bind/doc/rfc [netbsd-5-0]: index
src/dist/bind/doc/xsl [netbsd-5-0]: copyright.xsl
src/dist/bind/lib/bind [netbsd-5-0]: api configure configure.in
src/dist/bind/lib/bind/dst [netbsd-5-0]: dst_api.c hmac_link.c
support.c
src/dist/bind/lib/bind/include/isc [netbsd-5-0]: assertions.h
src/dist/bind/lib/bind/inet [netbsd-5-0]: inet_net_pton.c
src/dist/bind/lib/bind/irs [netbsd-5-0]: dns_ho.c
src/dist/bind/lib/bind/isc [netbsd-5-0]: assertions.c bitncmp.c
src/dist/bind/lib/bind9 [netbsd-5-0]: api check.c
src/dist/bind/lib/bind9/include/bind9 [netbsd-5-0]: getaddresses.h
src/dist/bind/lib/dns [netbsd-5-0]: acl.c adb.c api 

CVS commit: src/share/mk

2009-12-03 Thread Matthias Scheler
Module Name:src
Committed By:   tron
Date:   Thu Dec  3 15:57:18 UTC 2009

Modified Files:
src/share/mk: bsd.own.mk

Log Message:
Add "MKZFS" to either "_MKVARS.yes" or "_MKVARS.no" depending on the
default of this platform. This fixed the build for NetBSD/amd64
and NetBSD/i386.

Yes, this horrible. There should be a better way to handle these
settings in general.


To generate a diff of this commit:
cvs rdiff -u -r1.600 -r1.601 src/share/mk/bsd.own.mk

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

Modified files:

Index: src/share/mk/bsd.own.mk
diff -u src/share/mk/bsd.own.mk:1.600 src/share/mk/bsd.own.mk:1.601
--- src/share/mk/bsd.own.mk:1.600	Wed Dec  2 14:11:20 2009
+++ src/share/mk/bsd.own.mk	Thu Dec  3 15:57:18 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.own.mk,v 1.600 2009/12/02 14:11:20 uebayasi Exp $
+#	$NetBSD: bsd.own.mk,v 1.601 2009/12/03 15:57:18 tron Exp $
 
 .if !defined(_BSD_OWN_MK_)
 _BSD_OWN_MK_=1
@@ -725,8 +725,10 @@
 #
 .if ${MACHINE} == "amd64" || ${MACHINE} == "i386"
 MKZFS?=		yes
+_MKVARS.yes+=	MKZFS
 .else
 MKZFS?=		no
+_MKVARS.no+=	MKZFS
 .endif
 
 #



CVS commit: src/sys/rump/librump/rumpvfs

2009-12-03 Thread Matthias Scheler
Module Name:src
Committed By:   tron
Date:   Thu Dec  3 15:28:49 UTC 2009

Modified Files:
src/sys/rump/librump/rumpvfs: devnodes.c

Log Message:
Make sure "error" gets initialised.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/rump/librump/rumpvfs/devnodes.c

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

Modified files:

Index: src/sys/rump/librump/rumpvfs/devnodes.c
diff -u src/sys/rump/librump/rumpvfs/devnodes.c:1.2 src/sys/rump/librump/rumpvfs/devnodes.c:1.3
--- src/sys/rump/librump/rumpvfs/devnodes.c:1.2	Thu Dec  3 15:06:04 2009
+++ src/sys/rump/librump/rumpvfs/devnodes.c	Thu Dec  3 15:28:49 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: devnodes.c,v 1.2 2009/12/03 15:06:04 pooka Exp $	*/
+/*	$NetBSD: devnodes.c,v 1.3 2009/12/03 15:28:49 tron Exp $	*/
 
 /*
  * Copyright (c) 2009 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: devnodes.c,v 1.2 2009/12/03 15:06:04 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: devnodes.c,v 1.3 2009/12/03 15:28:49 tron Exp $");
 
 #include 
 #include 
@@ -43,7 +43,7 @@
 rump_vfs_makedevnodes(dev_t devtype, const char *basename, char minchar,
 	devmajor_t maj, devminor_t minnum, int nnodes)
 {
-	int error;
+	int error = 0;
 	char *devname, *p;
 	size_t devlen;
 	register_t retval;



CVS commit: src/sys/rump/dev/wip/libumass

2009-12-03 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Thu Dec  3 15:07:09 UTC 2009

Modified Files:
src/sys/rump/dev/wip/libumass: sd_at_scsibus_at_umass.c

Log Message:
one more path adjustment for rump_vfs_makedevnodes() change


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/sys/rump/dev/wip/libumass/sd_at_scsibus_at_umass.c

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

Modified files:

Index: src/sys/rump/dev/wip/libumass/sd_at_scsibus_at_umass.c
diff -u src/sys/rump/dev/wip/libumass/sd_at_scsibus_at_umass.c:1.2 src/sys/rump/dev/wip/libumass/sd_at_scsibus_at_umass.c:1.3
--- src/sys/rump/dev/wip/libumass/sd_at_scsibus_at_umass.c:1.2	Mon Oct  5 08:34:53 2009
+++ src/sys/rump/dev/wip/libumass/sd_at_scsibus_at_umass.c	Thu Dec  3 15:07:09 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: sd_at_scsibus_at_umass.c,v 1.2 2009/10/05 08:34:53 pooka Exp $	*/
+/*	$NetBSD: sd_at_scsibus_at_umass.c,v 1.3 2009/12/03 15:07:09 pooka Exp $	*/
 
 #include 
 #include 
@@ -159,5 +159,6 @@
 	bmaj = cmaj = -1;
 	FLAWLESSCALL(devsw_attach("sd", &sd_bdevsw, &bmaj, &sd_cdevsw, &cmaj));
 
-	FLAWLESSCALL(rump_vfs_makedevnodes(S_IFBLK, "sd0", 'a', bmaj, 0, 8));
+	FLAWLESSCALL(rump_vfs_makedevnodes(S_IFBLK, "/dev/sd0", 'a',
+	bmaj, 0, 8));
 }



CVS commit: src/sys/rump

2009-12-03 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Thu Dec  3 15:06:04 UTC 2009

Modified Files:
src/sys/rump/dev/lib/libcgd: component.c
src/sys/rump/dev/lib/libnetsmb: component.c
src/sys/rump/dev/lib/libraidframe: component.c
src/sys/rump/dev/lib/librnd: component.c
src/sys/rump/librump/rumpvfs: devnodes.c rump_vfs.c

Log Message:
* create /dev on the rump rootfs automatically
* make rump_vfs_makedevnodes() take a full basepath instead of hardcoding
  an assumption that the device node is created in /dev
  + the caller is responsible that the directory the nodes are being
created in exists


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/rump/dev/lib/libcgd/component.c
cvs rdiff -u -r1.2 -r1.3 src/sys/rump/dev/lib/libnetsmb/component.c
cvs rdiff -u -r1.3 -r1.4 src/sys/rump/dev/lib/libraidframe/component.c
cvs rdiff -u -r1.1 -r1.2 src/sys/rump/dev/lib/librnd/component.c
cvs rdiff -u -r1.1 -r1.2 src/sys/rump/librump/rumpvfs/devnodes.c
cvs rdiff -u -r1.40 -r1.41 src/sys/rump/librump/rumpvfs/rump_vfs.c

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

Modified files:

Index: src/sys/rump/dev/lib/libcgd/component.c
diff -u src/sys/rump/dev/lib/libcgd/component.c:1.3 src/sys/rump/dev/lib/libcgd/component.c:1.4
--- src/sys/rump/dev/lib/libcgd/component.c:1.3	Tue Dec  1 09:04:21 2009
+++ src/sys/rump/dev/lib/libcgd/component.c	Thu Dec  3 15:06:04 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: component.c,v 1.3 2009/12/01 09:04:21 pooka Exp $	*/
+/*	$NetBSD: component.c,v 1.4 2009/12/03 15:06:04 pooka Exp $	*/
 
 /*
  * Copyright (c) 2009 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: component.c,v 1.3 2009/12/01 09:04:21 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: component.c,v 1.4 2009/12/03 15:06:04 pooka Exp $");
 
 #include 
 #include 
@@ -49,14 +49,14 @@
 	/* go, mydevfs */
 	bmaj = cmaj = -1;
 
-	if ((error = devsw_attach("cgd0", &cgd_bdevsw, &bmaj,
+	if ((error = devsw_attach("/dev/cgd0", &cgd_bdevsw, &bmaj,
 	&cgd_cdevsw, &cmaj)) != 0)
 		panic("cannot attach cgd: %d", error);
 
 	if ((error = rump_vfs_makedevnodes(S_IFBLK, "cgd0", 'a',
 	bmaj, 0, 7)) != 0)
 		panic("cannot create cooked cgd dev nodes: %d", error);
-	if ((error = rump_vfs_makedevnodes(S_IFCHR, "rcgd0", 'a',
+	if ((error = rump_vfs_makedevnodes(S_IFCHR, "/dev/rcgd0", 'a',
 	cmaj, 0, 7)) != 0)
 		panic("cannot create raw cgd dev nodes: %d", error);
 

Index: src/sys/rump/dev/lib/libnetsmb/component.c
diff -u src/sys/rump/dev/lib/libnetsmb/component.c:1.2 src/sys/rump/dev/lib/libnetsmb/component.c:1.3
--- src/sys/rump/dev/lib/libnetsmb/component.c:1.2	Sun Sep  6 20:42:26 2009
+++ src/sys/rump/dev/lib/libnetsmb/component.c	Thu Dec  3 15:06:04 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: component.c,v 1.2 2009/09/06 20:42:26 pooka Exp $	*/
+/*	$NetBSD: component.c,v 1.3 2009/12/03 15:06:04 pooka Exp $	*/
 
 /*
  * Copyright (c) 2009 Antti Kantee.  All Rights Reserved.
@@ -28,7 +28,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: component.c,v 1.2 2009/09/06 20:42:26 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: component.c,v 1.3 2009/12/03 15:06:04 pooka Exp $");
 
 #include 
 #include 
@@ -50,7 +50,7 @@
 	bmaj = cmaj = NODEVMAJOR;
 	if ((error = devsw_attach("nsmb", NULL, &bmaj, &nsmb_cdevsw, &cmaj))!=0)
 		panic("nsmb devsw attach failed: %d", error);
-	if ((error = rump_vfs_makedevnodes(S_IFCHR, "nsmb", '0',
+	if ((error = rump_vfs_makedevnodes(S_IFCHR, "/dev/nsmb", '0',
 	cmaj, 0, 4)) != 0)
 		panic("cannot create nsmb device nodes: %d", error);
 

Index: src/sys/rump/dev/lib/libraidframe/component.c
diff -u src/sys/rump/dev/lib/libraidframe/component.c:1.3 src/sys/rump/dev/lib/libraidframe/component.c:1.4
--- src/sys/rump/dev/lib/libraidframe/component.c:1.3	Mon Sep  7 14:28:18 2009
+++ src/sys/rump/dev/lib/libraidframe/component.c	Thu Dec  3 15:06:04 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: component.c,v 1.3 2009/09/07 14:28:18 pooka Exp $	*/
+/*	$NetBSD: component.c,v 1.4 2009/12/03 15:06:04 pooka Exp $	*/
 
 /*
  * Copyright (c) 2009 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: component.c,v 1.3 2009/09/07 14:28:18 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: component.c,v 1.4 2009/12/03 15:06:04 pooka Exp $");
 
 #include 
 #include 
@@ -55,10 +55,10 @@
 	&raid_cdevsw, &cmaj)) != 0)
 		panic("raid devsw attach failed: %d", error);
 
-	if ((error = rump_vfs_makedevnodes(S_IFBLK, "raid0", 'a',
+	if ((error = rump_vfs_makedevnodes(S_IFBLK, "/dev/raid0", 'a',
 	bmaj, 0, 7)) != 0)
 		panic("cannot create cooked raid dev nodes: %d", error);
-	if ((error = rump_vfs_makedevnodes(S_IFCHR, "rraid0", 'a',
+	if ((error = rump_vfs_makedevnodes(S_IFCHR, "/dev/rraid0", 'a',
 	cmaj, 0, 7)) != 0)
 		panic("cannot create raw raid dev nodes: %d", error);
 

Index: src/sys/rump/dev/lib/librnd/component.c
diff -u sr

CVS commit: othersrc/lib/libfsu_mount

2009-12-03 Thread Antti Kantee
Module Name:othersrc
Committed By:   pooka
Date:   Thu Dec  3 15:00:38 UTC 2009

Modified Files:
othersrc/lib/libfsu_mount: Makefile fsu_mount.c

Log Message:
Make compile with new ukfs_part interfaces (doesn't use them, though).


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 othersrc/lib/libfsu_mount/Makefile
cvs rdiff -u -r1.12 -r1.13 othersrc/lib/libfsu_mount/fsu_mount.c

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

Modified files:

Index: othersrc/lib/libfsu_mount/Makefile
diff -u othersrc/lib/libfsu_mount/Makefile:1.7 othersrc/lib/libfsu_mount/Makefile:1.8
--- othersrc/lib/libfsu_mount/Makefile:1.7	Thu Nov  5 14:02:42 2009
+++ othersrc/lib/libfsu_mount/Makefile	Thu Dec  3 15:00:38 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.7 2009/11/05 14:02:42 stacktic Exp $
+#	$NetBSD: Makefile,v 1.8 2009/12/03 15:00:38 pooka Exp $
 #
 .include 	"../Makefile.inc"
 
@@ -21,7 +21,7 @@
 OSNAME!=	uname -s
 
 .if ${OSNAME} == "NetBSD"
-UKFS_DISKLABEL!= nm /usr/lib/libukfs.so | grep ukfs_partition_probe
+UKFS_DISKLABEL!= nm /usr/lib/libukfs.so | grep ukfs_part_probe
 .if ${UKFS_DISKLABEL} != ""
 CFLAGS+=	-DHAVE_UKFS_DISKLABEL
 .endif

Index: othersrc/lib/libfsu_mount/fsu_mount.c
diff -u othersrc/lib/libfsu_mount/fsu_mount.c:1.12 othersrc/lib/libfsu_mount/fsu_mount.c:1.13
--- othersrc/lib/libfsu_mount/fsu_mount.c:1.12	Fri Nov  6 11:28:31 2009
+++ othersrc/lib/libfsu_mount/fsu_mount.c	Thu Dec  3 15:00:38 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: fsu_mount.c,v 1.12 2009/11/06 11:28:31 stacktic Exp $ */
+/* $NetBSD: fsu_mount.c,v 1.13 2009/12/03 15:00:38 pooka Exp $ */
 
 /*
  * Copyright (c) 2008,2009 Arnaud Ysmal.  All Rights Reserved.
@@ -437,7 +437,7 @@
 {
 struct ukfs *ukfs;
 fsu_fs_t *fs;
-int part, rv;
+int rv;
 
 ukfs = NULL;
 fs = mntd.mntd_fs;
@@ -447,11 +447,10 @@
 if (rv == 0) {
 #ifdef HAVE_UKFS_DISKLABEL
 if (fsu_blockfs) {
-part = UKFS_PARTITION_NONE;
-ukfs_partition_probe(mntd.mntd_canon_dev, &part);
 ukfs = ukfs_mount_disk(fs->fs_name,
-mntd.mntd_canon_dev, part, mntd.mntd_canon_dir,
-mntd.mntd_flags, fs->fs_args, fs->fs_args_size);
+mntd.mntd_canon_dev, ukfs_part_none,
+			mntd.mntd_canon_dir, mntd.mntd_flags,
+			fs->fs_args, fs->fs_args_size);
 } else
 #endif
 ukfs = ukfs_mount(fs->fs_name,



CVS commit: src/sys/dev/ic

2009-12-03 Thread Matthew Jacob
Module Name:src
Committed By:   mjacob
Date:   Thu Dec  3 14:51:48 UTC 2009

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

Log Message:
Have as a backup at least *some* usable WWN.


To generate a diff of this commit:
cvs rdiff -u -r1.69 -r1.70 src/sys/dev/ic/isp_netbsd.h

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

Modified files:

Index: src/sys/dev/ic/isp_netbsd.h
diff -u src/sys/dev/ic/isp_netbsd.h:1.69 src/sys/dev/ic/isp_netbsd.h:1.70
--- src/sys/dev/ic/isp_netbsd.h:1.69	Mon Nov 23 02:13:46 2009
+++ src/sys/dev/ic/isp_netbsd.h	Thu Dec  3 14:51:48 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: isp_netbsd.h,v 1.69 2009/11/23 02:13:46 rmind Exp $ */
+/* $NetBSD: isp_netbsd.h,v 1.70 2009/12/03 14:51:48 mjacob Exp $ */
 /*
  * NetBSD Specific definitions for the Qlogic ISP Host Adapter
  */
@@ -268,11 +268,13 @@
 #define	DEFAULT_NODEWWN(isp, chan)	(isp)->isp_osinfo.wwn
 #define	DEFAULT_PORTWWN(isp, chan)	(isp)->isp_osinfo.wwn
 #define	ACTIVE_NODEWWN(isp, chan)\
-	(isp)->isp_osinfo.wwn? (isp)->isp_osinfo.wwn :	\
-	FCPARAM(isp, chan)->isp_wwnn_nvram
+	((isp)->isp_osinfo.wwn? (isp)->isp_osinfo.wwn :	\
+	(FCPARAM(isp, chan)->isp_wwnn_nvram?		\
+	 FCPARAM(isp, chan)->isp_wwnn_nvram : 0x40007F08ull))
 #define	ACTIVE_PORTWWN(isp, chan)\
-	(isp)->isp_osinfo.wwn? (isp)->isp_osinfo.wwn :	\
-	FCPARAM(isp, chan)->isp_wwpn_nvram
+	((isp)->isp_osinfo.wwn? (isp)->isp_osinfo.wwn :	\
+	(FCPARAM(isp, chan)->isp_wwpn_nvram?		\
+	 FCPARAM(isp, chan)->isp_wwpn_nvram : 0x40007F08ull))
 
 #if	_BYTE_ORDER == _BIG_ENDIAN
 #ifdef	ISP_SBUS_SUPPORTED



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

2009-12-03 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Thu Dec  3 14:47:15 UTC 2009

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

Log Message:
Interim workaround for modern Xeons that don't have the simplistic view of
bus speed and therefore do not support MSR_FSB_FREQ (e.g. X3400). In the
long-term, ACPI should be used for this (c.f. FreeBSD).


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/x86/x86/intel_busclock.c

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

Modified files:

Index: src/sys/arch/x86/x86/intel_busclock.c
diff -u src/sys/arch/x86/x86/intel_busclock.c:1.8 src/sys/arch/x86/x86/intel_busclock.c:1.9
--- src/sys/arch/x86/x86/intel_busclock.c:1.8	Fri Oct  2 15:05:42 2009
+++ src/sys/arch/x86/x86/intel_busclock.c	Thu Dec  3 14:47:15 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: intel_busclock.c,v 1.8 2009/10/02 15:05:42 jmcneill Exp $	*/
+/*	$NetBSD: intel_busclock.c,v 1.9 2009/12/03 14:47:15 sborrill Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: intel_busclock.c,v 1.8 2009/10/02 15:05:42 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intel_busclock.c,v 1.9 2009/12/03 14:47:15 sborrill Exp $");
 
 #include 
 #include 
@@ -127,6 +127,18 @@
 		}
 		break;
 	case 0xe: /* Core Duo/Solo */
+		/*
+		 * XXX
+		 * Newer CPUs will GP when attemping to access MSR_FSB_FREQ.
+		 * In the long-term, use ACPI instead of all this.
+		 */
+		switch (CPUID2EXTMODEL(ci->ci_signature)) {
+		case 0x1:
+			aprint_debug("%s: unable to determine bus speed",
+			device_xname(ci->ci_dev));
+			goto print_msr;
+		}
+		/* FALLTHROUGH */
 	case 0xf: /* Core Xeon */
 		msr = rdmsr(MSR_FSB_FREQ);
 		bus = (msr >> 0) & 0x7;



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

2009-12-03 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Thu Dec  3 14:44:12 UTC 2009

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

Log Message:
CPU model and CPU extended model cannot simply be summed; the extended model
differentiates different CPUs within a given model type (i.e. model 0xe with
extended model 0x1 is NOT the same as a model 0xf).
Modern Xeons do not support MSR_IA32_EXT_CONFIG, so use model and extended
model correctly to avoid it


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/x86/x86/coretemp.c

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

Modified files:

Index: src/sys/arch/x86/x86/coretemp.c
diff -u src/sys/arch/x86/x86/coretemp.c:1.12 src/sys/arch/x86/x86/coretemp.c:1.13
--- src/sys/arch/x86/x86/coretemp.c:1.12	Wed Mar 25 22:53:51 2009
+++ src/sys/arch/x86/x86/coretemp.c	Thu Dec  3 14:44:12 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: coretemp.c,v 1.12 2009/03/25 22:53:51 dyoung Exp $ */
+/* $NetBSD: coretemp.c,v 1.13 2009/12/03 14:44:12 sborrill Exp $ */
 
 /*-
  * Copyright (c) 2007 Juan Romero Pardines.
@@ -36,7 +36,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: coretemp.c,v 1.12 2009/03/25 22:53:51 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: coretemp.c,v 1.13 2009/12/03 14:44:12 sborrill Exp $");
 
 #include 
 #include 
@@ -67,7 +67,7 @@
 	struct coretemp_softc *sc;
 	uint32_t regs[4];
 	uint64_t msr;
-	int cpumodel, cpumask;
+	int cpumodel, cpuextmodel, cpumask;
 
 	/*
 	 * CPUID 0x06 returns 1 if the processor has on-die thermal
@@ -85,7 +85,7 @@
 	(int)device_unit(ci->ci_dev));
 	cpumodel = CPUID2MODEL(ci->ci_signature);
 	/* extended model */
-	cpumodel += CPUID2EXTMODEL(ci->ci_signature);
+	cpuextmodel = CPUID2EXTMODEL(ci->ci_signature);
 	cpumask = ci->ci_signature & 15;
 
 	/*
@@ -111,9 +111,12 @@
 	 *
 	 * The if-clause for CPUs having the MSR_IA32_EXT_CONFIG was adapted
 	 * from the Linux coretemp driver.
+	 *
+	 * MSR_IA32_EXT_CONFIG is NOT safe on all CPUs
 	 */
 	sc->sc_tjmax = 100;
-	if ((cpumodel == 0xf && cpumask >= 2) || cpumodel == 0xe) {
+	if ((cpumodel == 0xf && cpumask >= 2) ||
+	(cpumodel == 0xe && cpuextmodel != 1)) {
 		msr = rdmsr(MSR_IA32_EXT_CONFIG);
 		if (msr & (1 << 30))
 			sc->sc_tjmax = 85;



CVS commit: src/sys/fs/hfs

2009-12-03 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Thu Dec  3 14:29:04 UTC 2009

Modified Files:
src/sys/fs/hfs: hfs_vfsops.c

Log Message:
vrele, not vput for unlocked devvp


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/fs/hfs/hfs_vfsops.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/fs/hfs/hfs_vfsops.c
diff -u src/sys/fs/hfs/hfs_vfsops.c:1.23 src/sys/fs/hfs/hfs_vfsops.c:1.24
--- src/sys/fs/hfs/hfs_vfsops.c:1.23	Fri Nov 27 16:11:35 2009
+++ src/sys/fs/hfs/hfs_vfsops.c	Thu Dec  3 14:29:04 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: hfs_vfsops.c,v 1.23 2009/11/27 16:11:35 pooka Exp $	*/
+/*	$NetBSD: hfs_vfsops.c,v 1.24 2009/12/03 14:29:04 pooka Exp $	*/
 
 /*-
  * Copyright (c) 2005, 2007 The NetBSD Foundation, Inc.
@@ -99,7 +99,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: hfs_vfsops.c,v 1.23 2009/11/27 16:11:35 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hfs_vfsops.c,v 1.24 2009/12/03 14:29:04 pooka Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -438,7 +438,7 @@
 	cbargs.closevol = (void*)&argsclose;
 	hfslib_close_volume(&hmp->hm_vol, &cbargs);
 	
-	vput(hmp->hm_devvp);
+	vrele(hmp->hm_devvp);
 
 	free(hmp, M_HFSMNT);
 	mp->mnt_data = NULL;



CVS commit: src

2009-12-03 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Thu Dec  3 14:27:17 UTC 2009

Modified Files:
src/lib/libp2k: p2k.c p2k.h
src/usr.sbin/puffs/rump_cd9660: rump_cd9660.c
src/usr.sbin/puffs/rump_efs: rump_efs.c
src/usr.sbin/puffs/rump_ext2fs: rump_ext2fs.c
src/usr.sbin/puffs/rump_ffs: rump_ffs.c
src/usr.sbin/puffs/rump_hfs: rump_hfs.c
src/usr.sbin/puffs/rump_lfs: rump_lfs.c
src/usr.sbin/puffs/rump_msdos: rump_msdos.c
src/usr.sbin/puffs/rump_ntfs: rump_ntfs.c
src/usr.sbin/puffs/rump_sysvbfs: rump_sysvbfs.c
src/usr.sbin/puffs/rump_udf: rump_udf.c

Log Message:
Adapt ukfs users to the new ukfs_part interface.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/lib/libp2k/p2k.c
cvs rdiff -u -r1.6 -r1.7 src/lib/libp2k/p2k.h
cvs rdiff -u -r1.5 -r1.6 src/usr.sbin/puffs/rump_cd9660/rump_cd9660.c
cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/puffs/rump_efs/rump_efs.c
cvs rdiff -u -r1.6 -r1.7 src/usr.sbin/puffs/rump_ext2fs/rump_ext2fs.c
cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/puffs/rump_ffs/rump_ffs.c
cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/puffs/rump_hfs/rump_hfs.c
cvs rdiff -u -r1.12 -r1.13 src/usr.sbin/puffs/rump_lfs/rump_lfs.c
cvs rdiff -u -r1.5 -r1.6 src/usr.sbin/puffs/rump_msdos/rump_msdos.c
cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/puffs/rump_ntfs/rump_ntfs.c
cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/puffs/rump_sysvbfs/rump_sysvbfs.c
cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/puffs/rump_udf/rump_udf.c

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

Modified files:

Index: src/lib/libp2k/p2k.c
diff -u src/lib/libp2k/p2k.c:1.29 src/lib/libp2k/p2k.c:1.30
--- src/lib/libp2k/p2k.c:1.29	Fri Nov 20 14:24:58 2009
+++ src/lib/libp2k/p2k.c	Thu Dec  3 14:27:16 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: p2k.c,v 1.29 2009/11/20 14:24:58 pooka Exp $	*/
+/*	$NetBSD: p2k.c,v 1.30 2009/12/03 14:27:16 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007, 2008, 2009  Antti Kantee.  All Rights Reserved.
@@ -364,10 +364,11 @@
 
 static int
 setupfs(struct p2k_mount *p2m, const char *vfsname, const char *devpath,
-	int partition, const char *mountpath, int mntflags,
+	struct ukfs_part *part, const char *mountpath, int mntflags,
 	void *arg, size_t alen)
 {
-	char partpath[UKFS_PARTITION_MAXPATHLEN];
+	char partpath[UKFS_DEVICE_MAXPATHLEN];
+	char partbuf[UKFS_DEVICE_MAXSTR];
 	char typebuf[PUFFS_TYPELEN];
 	struct puffs_usermount *pu = p2m->p2m_pu;
 	struct p2k_node *p2n_root;
@@ -383,22 +384,16 @@
 		strlcat(typebuf, vfsname, sizeof(typebuf));
 	}
 
-	if (UKFS_USEPARTITION(partition)) {
-		char partbuf[UKFS_PARTITION_MAGICLEN+1];
-
-		strlcpy(partpath, devpath, sizeof(partpath));
-		snprintf(partbuf, sizeof(partbuf), "%s%c%%",
-		UKFS_PARTITION_SCANMAGIC, partition + 'a');
+	strlcpy(partpath, devpath, sizeof(partpath));
+	if (ukfs_part_tostring(part, partbuf, sizeof(partbuf))) {
 		strlcat(partpath, partbuf, sizeof(partpath));
-	} else {
-		strlcpy(partpath, devpath, sizeof(partpath));
 	}
 	puffs_setmntinfo(pu, partpath, typebuf);
 
 	if (ukfs_init() == -1)
 		goto out;
-	if (partition != UKFS_PARTITION_NA)
-		ukfs = ukfs_mount_disk(vfsname, devpath, partition,
+	if (part != ukfs_part_na)
+		ukfs = ukfs_mount_disk(vfsname, devpath, part,
 		mountpath, mntflags, arg, alen);
 	else
 		ukfs = ukfs_mount(vfsname, devpath, mountpath, mntflags,
@@ -460,7 +455,7 @@
 	p2m = p2k_init(puffs_flags);
 	if (p2m == NULL)
 		return -1;
-	rv = setupfs(p2m, vfsname, devpath, UKFS_PARTITION_NA, mountpath,
+	rv = setupfs(p2m, vfsname, devpath, ukfs_part_na, mountpath,
 	mntflags, arg, alen);
 	if (rv == -1)
 		return rv;
@@ -468,7 +463,7 @@
 }
 
 int
-p2k_run_diskfs(const char *vfsname, const char *devpath, int partition,
+p2k_run_diskfs(const char *vfsname, const char *devpath, struct ukfs_part *part,
 	const char *mountpath, int mntflags, void *arg, size_t alen,
 	uint32_t puffs_flags)
 {
@@ -478,7 +473,7 @@
 	p2m = p2k_init(puffs_flags);
 	if (p2m == NULL)
 		return -1;
-	rv = setupfs(p2m, vfsname, devpath, partition, mountpath, mntflags,
+	rv = setupfs(p2m, vfsname, devpath, part, mountpath, mntflags,
 	arg, alen);
 	if (rv == -1)
 		return rv;
@@ -490,17 +485,17 @@
 	const char *mountpath, int mntflags, void *arg, size_t alen)
 {
 
-	return setupfs(p2m, vfsname, devpath, UKFS_PARTITION_NA, mountpath,
+	return setupfs(p2m, vfsname, devpath, ukfs_part_na, mountpath,
 	mntflags, arg, alen);
 }
 
 int
 p2k_setup_diskfs(struct p2k_mount *p2m, const char *vfsname,
-	const char *devpath, int partition, const char *mountpath,
+	const char *devpath, struct ukfs_part *part, const char *mountpath,
 	int mntflags, void *arg, size_t alen)
 {
 
-	return setupfs(p2m, vfsname, devpath, partition, mountpath, mntflags,
+	return setupfs(p2m, vfsname, devpath, part, mountpath, mntflags,
 	arg, alen);
 }
 

Index: src/lib/libp2k/p2k.h
diff -u src/lib/libp2k/p2k.h:1.6 src/lib/libp2k/p2k.h:1.7
--- src/lib/libp2

CVS commit: src/usr.sbin/puffs/rump_hfs

2009-12-03 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Thu Dec  3 14:26:44 UTC 2009

Modified Files:
src/usr.sbin/puffs/rump_hfs: Makefile

Log Message:
remove unnecessary LDADD


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/puffs/rump_hfs/Makefile

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

Modified files:

Index: src/usr.sbin/puffs/rump_hfs/Makefile
diff -u src/usr.sbin/puffs/rump_hfs/Makefile:1.2 src/usr.sbin/puffs/rump_hfs/Makefile:1.3
--- src/usr.sbin/puffs/rump_hfs/Makefile:1.2	Tue Aug  5 20:57:46 2008
+++ src/usr.sbin/puffs/rump_hfs/Makefile	Thu Dec  3 14:26:44 2009
@@ -1,9 +1,8 @@
-#	$NetBSD: Makefile,v 1.2 2008/08/05 20:57:46 pooka Exp $
+#	$NetBSD: Makefile,v 1.3 2009/12/03 14:26:44 pooka Exp $
 #
 
 MOUNTNAME=	hfs
 
-LDADD+=		-lrumpfs_hfs
 ISRUMP=		# rump roast
 
 .include 



CVS commit: src/lib/libukfs

2009-12-03 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Thu Dec  3 14:23:49 UTC 2009

Modified Files:
src/lib/libukfs: ukfs.c ukfs.h ukfs_disklabel.c ukfs_int_disklabel.h

Log Message:
Improve the ukfs magicpath interface a bit:
* rename PART to DISKLABEL
* allow to take an OFFSET range to make it possible to access an image
  where there is no disklabel present
* make future extensions easier and less intrusive for the callers


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/lib/libukfs/ukfs.c
cvs rdiff -u -r1.12 -r1.13 src/lib/libukfs/ukfs.h
cvs rdiff -u -r1.1 -r1.2 src/lib/libukfs/ukfs_disklabel.c \
src/lib/libukfs/ukfs_int_disklabel.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/libukfs/ukfs.c
diff -u src/lib/libukfs/ukfs.c:1.42 src/lib/libukfs/ukfs.c:1.43
--- src/lib/libukfs/ukfs.c:1.42	Mon Nov 16 17:21:26 2009
+++ src/lib/libukfs/ukfs.c	Thu Dec  3 14:23:49 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: ukfs.c,v 1.42 2009/11/16 17:21:26 njoly Exp $	*/
+/*	$NetBSD: ukfs.c,v 1.43 2009/12/03 14:23:49 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007, 2008, 2009  Antti Kantee.  All Rights Reserved.
@@ -62,6 +62,7 @@
 
 #include 
 #include 
+#include 
 
 #include "ukfs_int_disklabel.h"
 
@@ -161,6 +162,32 @@
 	rump_pub_lwp_release(rump_pub_lwp_curlwp());
 }
 
+struct ukfs_part {
+	int part_type;
+	char part_labelchar;
+	off_t part_devoff;
+	off_t part_devsize;
+};
+
+enum ukfs_parttype { UKFS_PART_NONE, UKFS_PART_DISKLABEL, UKFS_PART_OFFSET };
+
+static struct ukfs_part ukfs__part_none = {
+	.part_type = UKFS_PART_NONE,
+	.part_devoff = 0,
+	.part_devsize = RUMP_ETFS_SIZE_ENDOFF,
+};
+static struct ukfs_part ukfs__part_na;
+struct ukfs_part *ukfs_part_none;
+struct ukfs_part *ukfs_part_na;
+
+static void
+ukfs_initparts(void)
+{
+
+	ukfs_part_none = &ukfs__part_none;
+	ukfs_part_na = &ukfs__part_na;
+}
+
 int
 _ukfs_init(int version)
 {
@@ -173,6 +200,7 @@
 		return -1;
 	}
 
+	ukfs_initparts();
 	if ((rv = rump_init()) != 0) {
 		errno = rv;
 		return -1;
@@ -190,28 +218,180 @@
 }
 
 int
-ukfs_partition_probe(char *devpath, int *partition)
+ukfs_part_probe(char *devpath, struct ukfs_part **partp)
 {
+	struct ukfs_part *part;
 	char *p;
-	int rv = 0;
+	int error = 0;
+	int devfd = -1;
+
+	ukfs_initparts();
+	if ((p = strstr(devpath, UKFS_PARTITION_SCANMAGIC)) != NULL) {
+		fprintf(stderr, "ukfs: %%PART is deprecated.  use "
+		"%%DISKLABEL instead\n");
+		errno = ENODEV;
+		return -1;
+	}
+
+	part = malloc(sizeof(*part));
+	if (part == NULL) {
+		errno = ENOMEM;
+		return -1;
+	}
+	part->part_type = UKFS_PART_NONE;
 
 	/*
-	 * Check for disklabel magic in pathname:
-	 * /regularpath%PART:%\0
+	 * Check for magic in pathname:
+	 *   disklabel: /regularpath%DISKLABEL:labelchar%\0
+	 * offsets: /regularpath%OFFSET:start,end%\0
 	 */
-#define MAGICADJ(p, n) (p+sizeof(UKFS_PARTITION_SCANMAGIC)-1+n)
-	if ((p = strstr(devpath, UKFS_PARTITION_SCANMAGIC)) != NULL
-	&& strlen(p) == UKFS_PARTITION_MAGICLEN
-	&& *(MAGICADJ(p,1)) == '%') {
-		if (*(MAGICADJ(p,0)) >= 'a' &&
-		*(MAGICADJ(p,0)) < 'a' + UKFS_MAXPARTITIONS) {
-			*partition = *(MAGICADJ(p,0)) - 'a';
+#define MAGICADJ_DISKLABEL(p, n) (p+sizeof(UKFS_DISKLABEL_SCANMAGIC)-1+n)
+	if ((p = strstr(devpath, UKFS_DISKLABEL_SCANMAGIC)) != NULL
+	&& strlen(p) == UKFS_DISKLABEL_MAGICLEN
+	&& *(MAGICADJ_DISKLABEL(p,1)) == '%') {
+		if (*(MAGICADJ_DISKLABEL(p,0)) >= 'a' &&
+		*(MAGICADJ_DISKLABEL(p,0)) < 'a' + UKFS_MAXPARTITIONS) {
+			struct ukfs__disklabel dl;
+			struct ukfs__partition *pp;
+			char buf[65536];
+			char labelchar = *(MAGICADJ_DISKLABEL(p,0));
+			int partition = labelchar - 'a';
+
 			*p = '\0';
+			devfd = open(devpath, O_RDONLY);
+			if (devfd == -1) {
+error = errno;
+goto out;
+			}
+
+			/* Locate the disklabel and find the partition. */
+			if (pread(devfd, buf, sizeof(buf), 0) == -1) {
+error = errno;
+goto out;
+			}
+
+			if (ukfs__disklabel_scan(&dl, buf, sizeof(buf)) != 0) {
+error = ENOENT;
+goto out;
+			}
+
+			if (dl.d_npartitions < partition) {
+error = ENOENT;
+goto out;
+			}
+
+			pp = &dl.d_partitions[partition];
+			part->part_type = UKFS_PART_DISKLABEL;
+			part->part_labelchar = labelchar;
+			part->part_devoff = pp->p_offset << DEV_BSHIFT;
+			part->part_devsize = pp->p_size << DEV_BSHIFT;
 		} else {
-			rv = EINVAL;
+			error = EINVAL;
+		}
+#define MAGICADJ_OFFSET(p, n) (p+sizeof(UKFS_OFFSET_SCANMAGIC)-1+n)
+	} else if (((p = strstr(devpath, UKFS_OFFSET_SCANMAGIC)) != NULL)
+	&& (strlen(p) >= UKFS_OFFSET_MINLEN)) {
+		char *comma, *pers, *ep, *nptr;
+		u_quad_t val;
+
+		comma = strchr(p, ',');
+		if (comma == NULL) {
+			error = EINVAL;
+			goto out;
+		}
+		pers = strchr(comma, '%');
+		if (pers == NULL) {
+			error = EINVAL;
+			goto out;
+		}
+		*comma = '\0';
+		*pers = '\0';
+		*p = '\0';
+
+		nptr = MAGICADJ_OFFSET(p,0);
+		/* check if st

CVS commit: src/sys/rump/librump/rumpvfs

2009-12-03 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Thu Dec  3 14:05:46 UTC 2009

Modified Files:
src/sys/rump/librump/rumpvfs: rumpblk.c

Log Message:
Do bounds-checking before adding host offset.  Otherwise the host
offset would be counted in with "size" and incorrect operation
would ensue.


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/sys/rump/librump/rumpvfs/rumpblk.c

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

Modified files:

Index: src/sys/rump/librump/rumpvfs/rumpblk.c
diff -u src/sys/rump/librump/rumpvfs/rumpblk.c:1.33 src/sys/rump/librump/rumpvfs/rumpblk.c:1.34
--- src/sys/rump/librump/rumpvfs/rumpblk.c:1.33	Wed Dec  2 17:18:59 2009
+++ src/sys/rump/librump/rumpvfs/rumpblk.c	Thu Dec  3 14:05:46 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: rumpblk.c,v 1.33 2009/12/02 17:18:59 pooka Exp $	*/
+/*	$NetBSD: rumpblk.c,v 1.34 2009/12/03 14:05:46 pooka Exp $	*/
 
 /*
  * Copyright (c) 2009 Antti Kantee.  All Rights Reserved.
@@ -52,7 +52,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rumpblk.c,v 1.33 2009/12/02 17:18:59 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rumpblk.c,v 1.34 2009/12/03 14:05:46 pooka Exp $");
 
 #include 
 #include 
@@ -593,7 +593,6 @@
 	}
 
 	off = bp->b_blkno << DEV_BSHIFT;
-	off += rblk->rblk_hostoffset;
 	/*
 	 * Do bounds checking if we're working on a file.  Otherwise
 	 * invalid file systems might attempt to read beyond EOF.  This
@@ -618,6 +617,7 @@
 		bp->b_bcount = sz;
 	}
 
+	off += rblk->rblk_hostoffset;
 	DPRINTF(("rumpblk_strategy: 0x%x bytes %s off 0x%" PRIx64
 	" (0x%" PRIx64 " - 0x%" PRIx64 "), %ssync\n",
 	bp->b_bcount, BUF_ISREAD(bp) ? "READ" : "WRITE",



CVS commit: src/distrib/sets

2009-12-03 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Thu Dec  3 13:45:11 UTC 2009

Modified Files:
src/distrib/sets: sets.subr

Log Message:
Put ${MKXORG} back to MKVARS.  It doesn't exist in bsd.own.mk but used here
to generate th set list keywork "xorg" in list_set_files().  Hopefully fix
some of reported build failures.


To generate a diff of this commit:
cvs rdiff -u -r1.101 -r1.102 src/distrib/sets/sets.subr

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

Modified files:

Index: src/distrib/sets/sets.subr
diff -u src/distrib/sets/sets.subr:1.101 src/distrib/sets/sets.subr:1.102
--- src/distrib/sets/sets.subr:1.101	Wed Dec  2 17:56:14 2009
+++ src/distrib/sets/sets.subr	Thu Dec  3 13:45:11 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: sets.subr,v 1.101 2009/12/02 17:56:14 uebayasi Exp $
+#	$NetBSD: sets.subr,v 1.102 2009/12/03 13:45:11 uebayasi Exp $
 #
 
 #
@@ -31,6 +31,7 @@
 	MKCOMPAT	\
 	MKDYNAMICROOT	\
 	MKMANPAGES	\
+	MKXORG		\
 	USE_INET6	\
 	USE_KERBEROS	\
 	USE_LDAP	\
@@ -218,7 +219,7 @@
 # In each file, a record consists of a path and a System Package name,
 # separated by whitespace. E.g.,
 #
-# 	# $NetBSD: sets.subr,v 1.101 2009/12/02 17:56:14 uebayasi Exp $
+# 	# $NetBSD: sets.subr,v 1.102 2009/12/03 13:45:11 uebayasi Exp $
 # 	.			base-sys-root	[keyword[,...]]
 # 	./altroot		base-sys-root
 # 	./bin			base-sys-root



CVS commit: src/sys/rump/librump/rumpkern

2009-12-03 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Thu Dec  3 13:12:16 UTC 2009

Modified Files:
src/sys/rump/librump/rumpkern: locks.c rump_private.h

Log Message:
Remove last remnants of the long-ago-properly-fixed RUMP_LMUTEX_MAGIC hack.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/sys/rump/librump/rumpkern/locks.c
cvs rdiff -u -r1.39 -r1.40 src/sys/rump/librump/rumpkern/rump_private.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/rump/librump/rumpkern/locks.c
diff -u src/sys/rump/librump/rumpkern/locks.c:1.36 src/sys/rump/librump/rumpkern/locks.c:1.37
--- src/sys/rump/librump/rumpkern/locks.c:1.36	Tue Dec  1 09:50:51 2009
+++ src/sys/rump/librump/rumpkern/locks.c	Thu Dec  3 13:12:16 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: locks.c,v 1.36 2009/12/01 09:50:51 pooka Exp $	*/
+/*	$NetBSD: locks.c,v 1.37 2009/12/03 13:12:16 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007, 2008 Antti Kantee.  All Rights Reserved.
@@ -29,7 +29,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: locks.c,v 1.36 2009/12/01 09:50:51 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: locks.c,v 1.37 2009/12/03 13:12:16 pooka Exp $");
 
 #include 
 #include 
@@ -81,8 +81,7 @@
 mutex_spin_enter(kmutex_t *mtx)
 {
 
-	if (__predict_true(mtx != RUMP_LMUTEX_MAGIC))
-		mutex_enter(mtx);
+	mutex_enter(mtx);
 }
 
 int
@@ -103,8 +102,7 @@
 mutex_spin_exit(kmutex_t *mtx)
 {
 
-	if (__predict_true(mtx != RUMP_LMUTEX_MAGIC))
-		mutex_exit(mtx);
+	mutex_exit(mtx);
 }
 
 int

Index: src/sys/rump/librump/rumpkern/rump_private.h
diff -u src/sys/rump/librump/rumpkern/rump_private.h:1.39 src/sys/rump/librump/rumpkern/rump_private.h:1.40
--- src/sys/rump/librump/rumpkern/rump_private.h:1.39	Thu Dec  3 12:35:34 2009
+++ src/sys/rump/librump/rumpkern/rump_private.h	Thu Dec  3 13:12:16 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: rump_private.h,v 1.39 2009/12/03 12:35:34 pooka Exp $	*/
+/*	$NetBSD: rump_private.h,v 1.40 2009/12/03 13:12:16 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007 Antti Kantee.  All Rights Reserved.
@@ -54,8 +54,6 @@
 
 #define UIO_VMSPACE_SYS (&rump_vmspace)
 
-#define RUMP_LMUTEX_MAGIC ((kmutex_t *)0x101)
-
 extern int rump_threads;
 extern struct device rump_rootdev;
 



CVS commit: src/sys/rump/librump/rumpvfs

2009-12-03 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Thu Dec  3 12:54:30 UTC 2009

Modified Files:
src/sys/rump/librump/rumpvfs: rumpfs.c

Log Message:
Make sure node lengths match in addition to strncmp().
(I thought i fixed this already once?)


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/sys/rump/librump/rumpvfs/rumpfs.c

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

Modified files:

Index: src/sys/rump/librump/rumpvfs/rumpfs.c
diff -u src/sys/rump/librump/rumpvfs/rumpfs.c:1.35 src/sys/rump/librump/rumpvfs/rumpfs.c:1.36
--- src/sys/rump/librump/rumpvfs/rumpfs.c:1.35	Thu Dec  3 12:35:35 2009
+++ src/sys/rump/librump/rumpvfs/rumpfs.c	Thu Dec  3 12:54:30 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: rumpfs.c,v 1.35 2009/12/03 12:35:35 pooka Exp $	*/
+/*	$NetBSD: rumpfs.c,v 1.36 2009/12/03 12:54:30 pooka Exp $	*/
 
 /*
  * Copyright (c) 2009  Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rumpfs.c,v 1.35 2009/12/03 12:35:35 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rumpfs.c,v 1.36 2009/12/03 12:54:30 pooka Exp $");
 
 #include 
 #include 
@@ -458,8 +458,9 @@
 
 	if (!rd) {
 		LIST_FOREACH(rd, &rnd->rn_dir, rd_entries) {
-			if (strncmp(rd->rd_name, cnp->cn_nameptr,
-			cnp->cn_namelen) == 0)
+			if (strlen(rd->rd_name) == cnp->cn_namelen &&
+			strncmp(rd->rd_name, cnp->cn_nameptr,
+			  cnp->cn_namelen) == 0)
 break;
 		}
 	}



CVS commit: src/sys/rump/librump/rumpvfs

2009-12-03 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Thu Dec  3 12:52:42 UTC 2009

Modified Files:
src/sys/rump/librump/rumpvfs: rump_vfs.c

Log Message:
Call spec_init() to avoid device open lossage.


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/sys/rump/librump/rumpvfs/rump_vfs.c

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

Modified files:

Index: src/sys/rump/librump/rumpvfs/rump_vfs.c
diff -u src/sys/rump/librump/rumpvfs/rump_vfs.c:1.39 src/sys/rump/librump/rumpvfs/rump_vfs.c:1.40
--- src/sys/rump/librump/rumpvfs/rump_vfs.c:1.39	Thu Dec  3 12:35:35 2009
+++ src/sys/rump/librump/rumpvfs/rump_vfs.c	Thu Dec  3 12:52:42 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: rump_vfs.c,v 1.39 2009/12/03 12:35:35 pooka Exp $	*/
+/*	$NetBSD: rump_vfs.c,v 1.40 2009/12/03 12:52:42 pooka Exp $	*/
 
 /*
  * Copyright (c) 2008 Antti Kantee.  All Rights Reserved.
@@ -29,7 +29,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rump_vfs.c,v 1.39 2009/12/03 12:35:35 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rump_vfs.c,v 1.40 2009/12/03 12:52:42 pooka Exp $");
 
 #include 
 #include 
@@ -100,6 +100,7 @@
 	wapbl_init();
 	cwd_sys_init();
 	lf_init();
+	spec_init();
 
 	if (rump_threads) {
 		if ((rv = kthread_create(PRI_BIO, KTHREAD_MPSAFE, NULL,



CVS commit: src/distrib/sets

2009-12-03 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Thu Dec  3 12:44:58 UTC 2009

Modified Files:
src/distrib/sets: maketars

Log Message:
Exit with a sensible error message if makeflist output is empty.
This should be better than an incomprehensible error message from
mtree.


To generate a diff of this commit:
cvs rdiff -u -r1.70 -r1.71 src/distrib/sets/maketars

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

Modified files:

Index: src/distrib/sets/maketars
diff -u src/distrib/sets/maketars:1.70 src/distrib/sets/maketars:1.71
--- src/distrib/sets/maketars:1.70	Mon Nov 30 16:13:23 2009
+++ src/distrib/sets/maketars	Thu Dec  3 12:44:57 2009
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: maketars,v 1.70 2009/11/30 16:13:23 uebayasi Exp $
+# $NetBSD: maketars,v 1.71 2009/12/03 12:44:57 apb Exp $
 #
 # Make release tar files for some or all lists.  Usage:
 # maketars [-b] [-x] [-i installdir] [-a arch] [-m machine] [-s setsdir]
@@ -161,6 +161,10 @@
 	${HOST_SH} "${setsdir}/makeflist" -a "${MACHINE_ARCH}" -m "${MACHINE}" \
 	-s "${setsdir}" "${setname}" > "${SDIR}/flist.${setname}" \
 	|| exit 1
+	if ! [ -s "${SDIR}/flist.${setname}" ]; then
+		echo >&2 "makeflist output is empty for ${setname}"
+		exit 1
+	fi
 	if [ -n "${metalog}" ]; then
 		${setfilesonly} && msg "Creating ${setlistdir}/set.${setname}"
 		${AWK} -f "${rundir}/getdirs.awk" "${SDIR}/flist.${setname}" \



CVS commit: src/sys/rump/librump

2009-12-03 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Thu Dec  3 12:35:35 UTC 2009

Modified Files:
src/sys/rump/librump/rumpkern: emul.c rump.c rump_private.h
src/sys/rump/librump/rumpvfs: rump_vfs.c rump_vfs_private.h rumpfs.c

Log Message:
Decide it's not worth the fuss to have rumpfs as a module and just
hardcode attach into rump_vfs_init().  Saves us from a lot of
pingpong init bouncing from one component to another to get the order
right.


To generate a diff of this commit:
cvs rdiff -u -r1.111 -r1.112 src/sys/rump/librump/rumpkern/emul.c
cvs rdiff -u -r1.143 -r1.144 src/sys/rump/librump/rumpkern/rump.c
cvs rdiff -u -r1.38 -r1.39 src/sys/rump/librump/rumpkern/rump_private.h
cvs rdiff -u -r1.38 -r1.39 src/sys/rump/librump/rumpvfs/rump_vfs.c
cvs rdiff -u -r1.8 -r1.9 src/sys/rump/librump/rumpvfs/rump_vfs_private.h
cvs rdiff -u -r1.34 -r1.35 src/sys/rump/librump/rumpvfs/rumpfs.c

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

Modified files:

Index: src/sys/rump/librump/rumpkern/emul.c
diff -u src/sys/rump/librump/rumpkern/emul.c:1.111 src/sys/rump/librump/rumpkern/emul.c:1.112
--- src/sys/rump/librump/rumpkern/emul.c:1.111	Tue Dec  1 09:52:29 2009
+++ src/sys/rump/librump/rumpkern/emul.c	Thu Dec  3 12:35:34 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: emul.c,v 1.111 2009/12/01 09:52:29 pooka Exp $	*/
+/*	$NetBSD: emul.c,v 1.112 2009/12/03 12:35:34 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007 Antti Kantee.  All Rights Reserved.
@@ -28,7 +28,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: emul.c,v 1.111 2009/12/01 09:52:29 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: emul.c,v 1.112 2009/12/03 12:35:34 pooka Exp $");
 
 #include 
 #include 
@@ -123,10 +123,7 @@
 device_class(device_t dev)
 {
 
-	if (dev != RUMP_VFSROOTDEV)
-		panic("%s: dev != root_device not supported", __func__);
-
-	return DV_VIRTUAL;
+	return dev->dv_class;
 }
 
 void

Index: src/sys/rump/librump/rumpkern/rump.c
diff -u src/sys/rump/librump/rumpkern/rump.c:1.143 src/sys/rump/librump/rumpkern/rump.c:1.144
--- src/sys/rump/librump/rumpkern/rump.c:1.143	Tue Dec  1 09:50:51 2009
+++ src/sys/rump/librump/rumpkern/rump.c	Thu Dec  3 12:35:34 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: rump.c,v 1.143 2009/12/01 09:50:51 pooka Exp $	*/
+/*	$NetBSD: rump.c,v 1.144 2009/12/03 12:35:34 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007 Antti Kantee.  All Rights Reserved.
@@ -28,7 +28,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.143 2009/12/01 09:50:51 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.144 2009/12/03 12:35:34 pooka Exp $");
 
 #include 
 #include 
@@ -36,6 +36,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -102,6 +103,10 @@
 
 sigset_t sigcantmask;
 
+struct device rump_rootdev = {
+	.dv_class = DV_VIRTUAL
+};
+
 #ifdef RUMP_WITHOUT_THREADS
 int rump_threads = 0;
 #else
@@ -124,7 +129,6 @@
 int rump__unavailable() {return EOPNOTSUPP;}
 __weak_alias(rump_net_init,rump__unavailable);
 __weak_alias(rump_vfs_init,rump__unavailable);
-__weak_alias(rump_vfs_init2,rump__unavailable);
 __weak_alias(rump_dev_init,rump__unavailable);
 
 __weak_alias(rump_vfs_fini,rump__unavailable);
@@ -308,9 +312,6 @@
 
 	rumpuser_dl_module_bootstrap(rump_module_init, rump_kernelfsym_load);
 
-	/* mount rootfs, etcetc. */
-	rump_vfs_init2();
-
 	rumpuser_gethostname(hostname, MAXHOSTNAMELEN, &error);
 	hostnamelen = strlen(hostname);
 

Index: src/sys/rump/librump/rumpkern/rump_private.h
diff -u src/sys/rump/librump/rumpkern/rump_private.h:1.38 src/sys/rump/librump/rumpkern/rump_private.h:1.39
--- src/sys/rump/librump/rumpkern/rump_private.h:1.38	Wed Dec  2 08:31:56 2009
+++ src/sys/rump/librump/rumpkern/rump_private.h	Thu Dec  3 12:35:34 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: rump_private.h,v 1.38 2009/12/02 08:31:56 uebayasi Exp $	*/
+/*	$NetBSD: rump_private.h,v 1.39 2009/12/03 12:35:34 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007 Antti Kantee.  All Rights Reserved.
@@ -32,6 +32,7 @@
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -54,9 +55,9 @@
 #define UIO_VMSPACE_SYS (&rump_vmspace)
 
 #define RUMP_LMUTEX_MAGIC ((kmutex_t *)0x101)
-#define RUMP_VFSROOTDEV ((struct device *)-11)
 
 extern int rump_threads;
+extern struct device rump_rootdev;
 
 extern struct sysent rump_sysent[];
 

Index: src/sys/rump/librump/rumpvfs/rump_vfs.c
diff -u src/sys/rump/librump/rumpvfs/rump_vfs.c:1.38 src/sys/rump/librump/rumpvfs/rump_vfs.c:1.39
--- src/sys/rump/librump/rumpvfs/rump_vfs.c:1.38	Tue Dec  1 09:56:59 2009
+++ src/sys/rump/librump/rumpvfs/rump_vfs.c	Thu Dec  3 12:35:35 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: rump_vfs.c,v 1.38 2009/12/01 09:56:59 pooka Exp $	*/
+/*	$NetBSD: rump_vfs.c,v 1.39 2009/12/03 12:35:35 pooka Exp $	*/
 
 /*
  * Copyright (c) 2008 Antti Kantee.  All Rights Reserved.
@@ -29,7 +29,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rump_vfs.c,v 1.38 2009/12/01 09:56:59 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD:

CVS commit: src/distrib/sets

2009-12-03 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Thu Dec  3 12:22:58 UTC 2009

Modified Files:
src/distrib/sets: deps

Log Message:
Remove a superfluous base-extsrc-* entry.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/distrib/sets/deps

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

Modified files:

Index: src/distrib/sets/deps
diff -u src/distrib/sets/deps:1.11 src/distrib/sets/deps:1.12
--- src/distrib/sets/deps:1.11	Mon Nov 30 16:13:23 2009
+++ src/distrib/sets/deps	Thu Dec  3 12:22:58 2009
@@ -24,7 +24,6 @@
 base-dhcpd-examples base-sys-share
 base-efs-root base-sys-root
 base-ext2fs-root base-sys-root
-base-extsrc-root base-sys-root
 base-filecorefs-root base-sys-root
 base-fstab-examples base-sys-share
 base-games-root base-sys-root



CVS commit: src/sys/rump/librump/rumpkern

2009-12-03 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Thu Dec  3 12:16:36 UTC 2009

Modified Files:
src/sys/rump/librump/rumpkern: threads.c

Log Message:
Soft-fail xcall thread creation to make RUMP_THREADS=0 work again.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/rump/librump/rumpkern/threads.c

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

Modified files:

Index: src/sys/rump/librump/rumpkern/threads.c
diff -u src/sys/rump/librump/rumpkern/threads.c:1.4 src/sys/rump/librump/rumpkern/threads.c:1.5
--- src/sys/rump/librump/rumpkern/threads.c:1.4	Tue Dec  1 09:50:51 2009
+++ src/sys/rump/librump/rumpkern/threads.c	Thu Dec  3 12:16:36 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: threads.c,v 1.4 2009/12/01 09:50:51 pooka Exp $	*/
+/*	$NetBSD: threads.c,v 1.5 2009/12/03 12:16:36 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007-2009 Antti Kantee.  All Rights Reserved.
@@ -29,7 +29,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: threads.c,v 1.4 2009/12/01 09:50:51 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: threads.c,v 1.5 2009/12/03 12:16:36 pooka Exp $");
 
 #include 
 #include 
@@ -119,6 +119,10 @@
 			printf("rump warning: threads not enabled, not enabling"
 			   " UNP garbage collection\n");
 			return 0;
+		} else if (strncmp(thrstore, "xcall", sizeof("xcall")-1) == 0) {
+			printf("rump warning: threads not enabled, CPU xcall"
+			   " not functional\n");
+			return 0;
 		} else
 			panic("threads not available, setenv RUMP_THREADS 1");
 	}



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

2009-12-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Dec  3 11:54:09 UTC 2009

Modified Files:
src/sys/arch/hp700/dev: apic.c

Log Message:
Make the pdc_pat_io_num and pdc_pat_pci_rt structures static so they're
definitely VA==PA. Being on a stack doesn't guarantee this.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/hp700/dev/apic.c

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

Modified files:

Index: src/sys/arch/hp700/dev/apic.c
diff -u src/sys/arch/hp700/dev/apic.c:1.4 src/sys/arch/hp700/dev/apic.c:1.5
--- src/sys/arch/hp700/dev/apic.c:1.4	Sun Nov 29 10:30:07 2009
+++ src/sys/arch/hp700/dev/apic.c	Thu Dec  3 11:54:09 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: apic.c,v 1.4 2009/11/29 10:30:07 skrll Exp $	*/
+/*	$NetBSD: apic.c,v 1.5 2009/12/03 11:54:09 skrll Exp $	*/
 
 /*	$OpenBSD: apic.c,v 1.7 2007/10/06 23:50:54 krw Exp $	*/
 
@@ -258,15 +258,10 @@
 void
 apic_get_int_tbl(struct elroy_softc *sc)
 {
-	struct pdc_pat_io_num int_tbl_sz PDC_ALIGNMENT;
-	struct pdc_pat_pci_rt int_tbl[MAX_INT_TBL_SZ] PDC_ALIGNMENT;
+	static struct pdc_pat_io_num int_tbl_sz PDC_ALIGNMENT;
+	static struct pdc_pat_pci_rt int_tbl[MAX_INT_TBL_SZ] PDC_ALIGNMENT;
 	size_t size;
 
-	/*
-	 * XXX int_tbl should not be allocated on the stack, but we need a
-	 * 1:1 mapping, and malloc doesn't provide that.
-	 */
-
 	if (pdc_call((iodcio_t)pdc, 0, PDC_PCI_INDEX, PDC_PCI_GET_INT_TBL_SZ,
 	&int_tbl_sz, 0, 0, 0, 0, 0))
 		return;



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

2009-12-03 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Thu Dec  3 11:37:55 UTC 2009

Modified Files:
src/sys/arch/amd64/conf: GENERIC

Log Message:
Add udl(4)


To generate a diff of this commit:
cvs rdiff -u -r1.257 -r1.258 src/sys/arch/amd64/conf/GENERIC

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

Modified files:

Index: src/sys/arch/amd64/conf/GENERIC
diff -u src/sys/arch/amd64/conf/GENERIC:1.257 src/sys/arch/amd64/conf/GENERIC:1.258
--- src/sys/arch/amd64/conf/GENERIC:1.257	Fri Oct  2 16:47:52 2009
+++ src/sys/arch/amd64/conf/GENERIC	Thu Dec  3 11:37:55 2009
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.257 2009/10/02 16:47:52 jmcneill Exp $
+# $NetBSD: GENERIC,v 1.258 2009/12/03 11:37:55 sborrill Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		"GENERIC-$Revision: 1.257 $"
+#ident 		"GENERIC-$Revision: 1.258 $"
 
 maxusers	64		# estimated number of users
 
@@ -793,6 +793,10 @@
 # USB Generic HID devices
 uhid*	at uhidev? reportid ?
 
+# USB LCDs and USB-VGA adaptors
+udl*	at uhub? port ?		# DisplayLink DL-1x0/1x5
+wsdisplay* at udl?
+
 # USB Printer
 ulpt*	at uhub? port ? configuration ? interface ?
 



CVS commit: src/external/bsd/openresolv/sbin/resolvconf

2009-12-03 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Thu Dec  3 10:28:37 UTC 2009

Modified Files:
src/external/bsd/openresolv/sbin/resolvconf: Makefile

Log Message:
Fix subst so that the subcribers can restart their daemon.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/external/bsd/openresolv/sbin/resolvconf/Makefile

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

Modified files:

Index: src/external/bsd/openresolv/sbin/resolvconf/Makefile
diff -u src/external/bsd/openresolv/sbin/resolvconf/Makefile:1.1 src/external/bsd/openresolv/sbin/resolvconf/Makefile:1.2
--- src/external/bsd/openresolv/sbin/resolvconf/Makefile:1.1	Sat Nov 21 03:24:31 2009
+++ src/external/bsd/openresolv/sbin/resolvconf/Makefile	Thu Dec  3 10:28:37 2009
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1 2009/11/21 03:24:31 roy Exp $
+# $NetBSD: Makefile,v 1.2 2009/12/03 10:28:37 roy Exp $
 #
 
 .include 
@@ -16,16 +16,16 @@
 
 CLEANFILES=	${SCRIPTS} ${MAN}
 
-CMD1=		\\1 status >/dev/null 2>\\&1
-CMD2=		\\1 restart
-RESTART_CMD=	/etc/rc.d/${CMD1} \\&\\& /etc/rc.d/${CMD2}
+CMD1=		\1 status >/dev/null 2>\&1
+CMD2=		\1 restart
+RESTARTCMD=	/etc/rc.d/${CMD1} \&\& /etc/rc.d/${CMD2}
 .for f in ${SCRIPTS} ${MAN}
 ${f}:	${f}.in
 	${TOOL_SED} -e 's:@PREFIX@::g' \
 		-e 's:@SYSCONFDIR@:/etc:g' \
 		-e 's:@LIBEXECDIR@:/libexec/resolvconf:g' \
 		-e 's:@VARDIR@:/var/run/resolvconf:g' \
-		-e 's:@RESTARTCMD \(.*\)@:${RESARTCMD}:g' \
+		-e 's:@RESTARTCMD \(.*\)@:${RESTARTCMD}:g' \
 		${DIST}/${f}.in > $@
 .endfor
 



CVS commit: [netbsd-4] src/doc

2009-12-03 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Thu Dec  3 09:44:57 UTC 2009

Modified Files:
src/doc [netbsd-4]: CHANGES-4.1

Log Message:
Ticket 1368


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.184 -r1.1.2.185 src/doc/CHANGES-4.1

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-4.1
diff -u src/doc/CHANGES-4.1:1.1.2.184 src/doc/CHANGES-4.1:1.1.2.185
--- src/doc/CHANGES-4.1:1.1.2.184	Sat Nov 28 21:38:26 2009
+++ src/doc/CHANGES-4.1	Thu Dec  3 09:44:57 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: CHANGES-4.1,v 1.1.2.184 2009/11/28 21:38:26 sborrill Exp $
+#	$NetBSD: CHANGES-4.1,v 1.1.2.185 2009/12/03 09:44:57 sborrill Exp $
 
 A complete list of changes from the NetBSD 4.0 release to the NetBSD 4.1
 release:
@@ -3907,3 +3907,9 @@
 	lines have characters that sort lower such as tabs.
 	[darcy, ticket #1367]
 
+sys/net/if_tap.c1.60
+
+	Fix a potential leak on tap device close; purging the send
+	queue did not actually release the dequeued mbufs.
+	[plunky, ticket #1368]
+



CVS commit: [netbsd-4] src/sys/net

2009-12-03 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Thu Dec  3 09:44:35 UTC 2009

Modified Files:
src/sys/net [netbsd-4]: if_tap.c

Log Message:
Pull up the following revisions(s) (requested by plunky in ticket #1368):
sys/net/if_tap.c:   revision 1.60

Fix a potential leak on tap device close; purging the send queue did not
actually release the dequeued mbufs.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.24.2.1 src/sys/net/if_tap.c

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

Modified files:

Index: src/sys/net/if_tap.c
diff -u src/sys/net/if_tap.c:1.24 src/sys/net/if_tap.c:1.24.2.1
--- src/sys/net/if_tap.c:1.24	Fri Nov 24 01:04:30 2006
+++ src/sys/net/if_tap.c	Thu Dec  3 09:44:35 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_tap.c,v 1.24 2006/11/24 01:04:30 rpaulo Exp $	*/
+/*	$NetBSD: if_tap.c,v 1.24.2.1 2009/12/03 09:44:35 sborrill Exp $	*/
 
 /*
  *  Copyright (c) 2003, 2004 The NetBSD Foundation.
@@ -43,7 +43,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_tap.c,v 1.24 2006/11/24 01:04:30 rpaulo Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_tap.c,v 1.24.2.1 2009/12/03 09:44:35 sborrill Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "bpfilter.h"
@@ -799,6 +799,7 @@
 			if (ifp->if_bpf)
 bpf_mtap(ifp->if_bpf, m);
 #endif
+			m_freem(m);
 		}
 	}
 	splx(s);



CVS commit: [netbsd-5] src/doc

2009-12-03 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Thu Dec  3 09:40:21 UTC 2009

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

Log Message:
Ticket 1173


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.154 -r1.1.2.155 src/doc/CHANGES-5.1

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

Modified files:

Index: src/doc/CHANGES-5.1
diff -u src/doc/CHANGES-5.1:1.1.2.154 src/doc/CHANGES-5.1:1.1.2.155
--- src/doc/CHANGES-5.1:1.1.2.154	Thu Dec  3 09:34:02 2009
+++ src/doc/CHANGES-5.1	Thu Dec  3 09:40:20 2009
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.1,v 1.1.2.154 2009/12/03 09:34:02 sborrill Exp $
+# $NetBSD: CHANGES-5.1,v 1.1.2.155 2009/12/03 09:40:20 sborrill Exp $
 
 A complete list of changes from the NetBSD 5.0 release to the NetBSD 5.1
 release:
@@ -15091,3 +15091,9 @@
 	If the environment is corrupt, die. From FreeBSD.
 	[tron, ticket #1179]
 
+sys/net/if_tap.c1.60
+
+	Fix a potential leak on tap device close; purging the send
+	queue did not actually release the dequeued mbufs.
+	[plunky, ticket #1173]
+



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

2009-12-03 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Thu Dec  3 09:40:00 UTC 2009

Modified Files:
src/sys/net [netbsd-5]: if_tap.c

Log Message:
Pull up the following revisions(s) (requested by plunky in ticket #1173):
sys/net/if_tap.c:   revision 1.60

Fix a potential leak on tap device close; purging the send queue
did not actually release the dequeued mbufs.


To generate a diff of this commit:
cvs rdiff -u -r1.47.4.6 -r1.47.4.7 src/sys/net/if_tap.c

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

Modified files:

Index: src/sys/net/if_tap.c
diff -u src/sys/net/if_tap.c:1.47.4.6 src/sys/net/if_tap.c:1.47.4.7
--- src/sys/net/if_tap.c:1.47.4.6	Sat Apr  4 23:36:28 2009
+++ src/sys/net/if_tap.c	Thu Dec  3 09:40:00 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_tap.c,v 1.47.4.6 2009/04/04 23:36:28 snj Exp $	*/
+/*	$NetBSD: if_tap.c,v 1.47.4.7 2009/12/03 09:40:00 sborrill Exp $	*/
 
 /*
  *  Copyright (c) 2003, 2004, 2008, 2009 The NetBSD Foundation.
@@ -33,7 +33,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_tap.c,v 1.47.4.6 2009/04/04 23:36:28 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_tap.c,v 1.47.4.7 2009/12/03 09:40:00 sborrill Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "bpfilter.h"
@@ -852,6 +852,7 @@
 			if (ifp->if_bpf)
 bpf_mtap(ifp->if_bpf, m);
 #endif
+			m_freem(m);
 		}
 	}
 	splx(s);



CVS commit: [netbsd-5] src/doc

2009-12-03 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Thu Dec  3 09:34:02 UTC 2009

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

Log Message:
Ticket 1179


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.153 -r1.1.2.154 src/doc/CHANGES-5.1

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

Modified files:

Index: src/doc/CHANGES-5.1
diff -u src/doc/CHANGES-5.1:1.1.2.153 src/doc/CHANGES-5.1:1.1.2.154
--- src/doc/CHANGES-5.1:1.1.2.153	Thu Dec  3 09:27:22 2009
+++ src/doc/CHANGES-5.1	Thu Dec  3 09:34:02 2009
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.1,v 1.1.2.153 2009/12/03 09:27:22 sborrill Exp $
+# $NetBSD: CHANGES-5.1,v 1.1.2.154 2009/12/03 09:34:02 sborrill Exp $
 
 A complete list of changes from the NetBSD 5.0 release to the NetBSD 5.1
 release:
@@ -15086,3 +15086,8 @@
 	Addresses kern/41058.
 	[scw, ticket #1168]
 
+libexec/ld.elf_so/rtld.c			1.127
+
+	If the environment is corrupt, die. From FreeBSD.
+	[tron, ticket #1179]
+



CVS commit: [netbsd-5] src/libexec/ld.elf_so

2009-12-03 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Thu Dec  3 09:33:37 UTC 2009

Modified Files:
src/libexec/ld.elf_so [netbsd-5]: rtld.c

Log Message:
Pull up the following revisions(s) (requested by tron in ticket #1179):
libexec/ld.elf_so/rtld.c:   revision 1.127

If the environment is corrupt, die. From FreeBSD.


To generate a diff of this commit:
cvs rdiff -u -r1.123.2.1 -r1.123.2.2 src/libexec/ld.elf_so/rtld.c

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

Modified files:

Index: src/libexec/ld.elf_so/rtld.c
diff -u src/libexec/ld.elf_so/rtld.c:1.123.2.1 src/libexec/ld.elf_so/rtld.c:1.123.2.2
--- src/libexec/ld.elf_so/rtld.c:1.123.2.1	Wed Oct 14 09:31:27 2009
+++ src/libexec/ld.elf_so/rtld.c	Thu Dec  3 09:33:37 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: rtld.c,v 1.123.2.1 2009/10/14 09:31:27 sborrill Exp $	 */
+/*	$NetBSD: rtld.c,v 1.123.2.2 2009/12/03 09:33:37 sborrill Exp $	 */
 
 /*
  * Copyright 1996 John D. Polstra.
@@ -40,7 +40,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: rtld.c,v 1.123.2.1 2009/10/14 09:31:27 sborrill Exp $");
+__RCSID("$NetBSD: rtld.c,v 1.123.2.2 2009/12/03 09:33:37 sborrill Exp $");
 #endif /* not lint */
 
 #include 
@@ -439,8 +439,8 @@
 		getenv("LD_LIBRARY_PATH"));
 	} else {
 		execname = NULL;
-		unsetenv("LD_DEBUG");
-		unsetenv("LD_LIBRARY_PATH");
+		if (unsetenv("LD_DEBUG") || unsetenv("LD_LIBRARY_PATH"))
+			_rtld_die();
 	}
 	_rtld_process_hints(execname, &_rtld_paths, &_rtld_xforms,
 	_PATH_LD_HINTS);
@@ -514,7 +514,8 @@
 		if (_rtld_preload(getenv("LD_PRELOAD")) == -1)
 			_rtld_die();
 	} else
-		unsetenv("LD_PRELOAD");
+		if (unsetenv("LD_PRELOAD"))
+			_rtld_die();
 
 	dbg(("loading needed objects"));
 	if (_rtld_load_needed_objects(_rtld_objmain, RTLD_MAIN) == -1)



CVS commit: [netbsd-5] src/doc

2009-12-03 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Thu Dec  3 09:27:22 UTC 2009

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

Log Message:
Ticket 1168


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.152 -r1.1.2.153 src/doc/CHANGES-5.1

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

Modified files:

Index: src/doc/CHANGES-5.1
diff -u src/doc/CHANGES-5.1:1.1.2.152 src/doc/CHANGES-5.1:1.1.2.153
--- src/doc/CHANGES-5.1:1.1.2.152	Wed Dec  2 17:41:02 2009
+++ src/doc/CHANGES-5.1	Thu Dec  3 09:27:22 2009
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.1,v 1.1.2.152 2009/12/02 17:41:02 sborrill Exp $
+# $NetBSD: CHANGES-5.1,v 1.1.2.153 2009/12/03 09:27:22 sborrill Exp $
 
 A complete list of changes from the NetBSD 5.0 release to the NetBSD 5.1
 release:
@@ -15079,3 +15079,10 @@
 	Always treat sector size as 512 bytes.
 	[nonaka, ticket #1167]
 
+sys/arch/arm/arm32/pmap.c			1.203
+
+	Work-around a possible process exit corner case which can
+	leave stale data in the cache after a context-switch.
+	Addresses kern/41058.
+	[scw, ticket #1168]
+



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

2009-12-03 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Thu Dec  3 09:27:00 UTC 2009

Modified Files:
src/sys/arch/arm/arm32 [netbsd-5]: pmap.c

Log Message:
Pull up the following revisions(s) (requested by scw in ticket #1168):
sys/arch/arm/arm32/pmap.c:  revision 1.203

Work-around a possible process exit corner case which can leave stale
data in the cache after a context-switch. Addresses kern/41058.


To generate a diff of this commit:
cvs rdiff -u -r1.187 -r1.187.4.1 src/sys/arch/arm/arm32/pmap.c

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

Modified files:

Index: src/sys/arch/arm/arm32/pmap.c
diff -u src/sys/arch/arm/arm32/pmap.c:1.187 src/sys/arch/arm/arm32/pmap.c:1.187.4.1
--- src/sys/arch/arm/arm32/pmap.c:1.187	Sun Sep 28 21:27:11 2008
+++ src/sys/arch/arm/arm32/pmap.c	Thu Dec  3 09:26:59 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.187 2008/09/28 21:27:11 skrll Exp $	*/
+/*	$NetBSD: pmap.c,v 1.187.4.1 2009/12/03 09:26:59 sborrill Exp $	*/
 
 /*
  * Copyright 2003 Wasabi Systems, Inc.
@@ -212,7 +212,7 @@
 #include 
 #include 
 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.187 2008/09/28 21:27:11 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.187.4.1 2009/12/03 09:26:59 sborrill Exp $");
 
 #ifdef PMAP_DEBUG
 
@@ -3645,7 +3645,6 @@
 	pg, VM_PAGE_TO_PHYS(pg), prot));
 
 	switch(prot) {
-		return;
 	case VM_PROT_READ|VM_PROT_WRITE:
 #if defined(PMAP_CHECK_VIPT) && defined(PMAP_APX)
 		pmap_clearbit(pg, PVF_EXEC);
@@ -4076,6 +4075,15 @@
 	 * entire cache.
 	 */
 	rpm = pmap_recent_user;
+
+/*
+ * XXXSCW: There's a corner case here which can leave turds in the cache as
+ * reported in kern/41058. They're probably left over during tear-down and
+ * switching away from an exiting process. Until the root cause is identified
+ * and fixed, zap the cache when switching pmaps. This will result in a few
+ * unnecessary cache flushes, but that's better than silently corrupting data.
+ */
+#if 0
 	if (npm != pmap_kernel() && rpm && npm != rpm &&
 	rpm->pm_cstate.cs_cache) {
 		rpm->pm_cstate.cs_cache = 0;
@@ -4083,6 +4091,16 @@
 		cpu_idcache_wbinv_all();
 #endif
 	}
+#else
+	if (rpm) {
+		rpm->pm_cstate.cs_cache = 0;
+		if (npm == pmap_kernel())
+			pmap_recent_user = NULL;
+#ifdef PMAP_CACHE_VIVT
+		cpu_idcache_wbinv_all();
+#endif
+	}
+#endif
 
 	/* No interrupts while we frob the TTB/DACR */
 	oldirqstate = disable_interrupts(IF32_bits);