Re: CVS commit: src

2011-11-23 Thread Martin Husemann
On Wed, Nov 23, 2011 at 03:19:55AM +, Christos Zoulas wrote:
 He does not want to write atf tests. In my opinion non-atf tests is better
 than no tests.

IMHO non-atf tests are just as useless as the whole src/regress hierachy
always was. BUT: finding someone to pick this new tests up and embed them
in atf should be easy.

Martin


Re: CVS commit: src/sys/fs/union

2011-11-23 Thread Alan Barrett
My vote would be to remove [unionfs]; it doesn't work and the 
only reason it was ever brought in had to do with alleged 
locking improvements.


Is anyone using it?


I used to make heavy use of unionfs, and I had no problems.  (That 
was on a uniprocessor machine several years ago.)  I sometimes 
used five layers: a base set of sources; a unionfs layer for third 
party changes; a unionfs layer for my own changes; a unionfs layer 
for the obj directories; and a final unionfs layer for files 
created or changed at build time.  For example, I could easily 
blow away all the build products but keep the obj directories, 
by unmounting the top layer unionfs, removing the files in its 
backing store, and then re-mounting it.


Today, I'd use a smarter revision control system instead of the 
unionfs layers to manage the source files, but I might still want 
a unionfs layer to isolate changes made at build time.


I have not used unionfs in the past few years, but it would be a 
pity to lose this functionality.


--apb (Alan Barrett)


Re: CVS commit: src/sys/fs/union

2011-11-23 Thread J. Hannken-Illjes

On Nov 23, 2011, at 11:11 AM, Alan Barrett wrote:

 My vote would be to remove [unionfs]; it doesn't work and the only reason 
 it was ever brought in had to do with alleged locking improvements.
 
 Is anyone using it?
 
 I used to make heavy use of unionfs, and I had no problems.  (That was on a 
 uniprocessor machine several years ago.)  I sometimes used five layers: a 
 base set of sources; a unionfs layer for third party changes; a unionfs layer 
 for my own changes; a unionfs layer for the obj directories; and a final 
 unionfs layer for files created or changed at build time.  For example, I 
 could easily blow away all the build products but keep the obj directories, 
 by unmounting the top layer unionfs, removing the files in its backing store, 
 and then re-mounting it.
 
 Today, I'd use a smarter revision control system instead of the unionfs 
 layers to manage the source files, but I might still want a unionfs layer to 
 isolate changes made at build time.
 
 I have not used unionfs in the past few years, but it would be a pity to lose 
 this functionality.

Do you mean `union'?

`unionfs' was imported 2008/02/18 and was never enabled in any kernel config.

--
Juergen Hannken-Illjes - hann...@eis.cs.tu-bs.de - TU Braunschweig (Germany)



Re: CVS commit: src

2011-11-23 Thread Christoph Egger

On 11/23/11 11:47, Thor Lancelot Simon wrote:

Module Name:src
Committed By:   tls
Date:   Wed Nov 23 10:47:50 UTC 2011

Modified Files:
src/distrib/sets/lists/etc: mi
src/etc/defaults: rc.conf
src/etc/rc.d: Makefile
src/sbin/rndctl: rndctl.8 rndctl.c
src/sys/dev: rnd.c
src/sys/secmodel/securelevel: secmodel_securelevel.c
src/sys/secmodel/suser: secmodel_suser.c
src/sys/sys: kauth.h rnd.h
Added Files:
src/etc/rc.d: random_seed

Log Message:
Load entropy at system boot (only works at securelevel  1); save
at system shutdown.  Disable with random_seed=NO in rc.conf if desired.

Goes to some trouble to never load or save to network filesystems.

Entropy should really be loaded by the boot loader but I am still
sorting out how to pass it to the kernel.


How about passing it as a module similar to the multiboot technique?

Christoph


Re: CVS commit: src/sys/fs/union

2011-11-23 Thread Alan Barrett

On Wed, 23 Nov 2011, J. Hannken-Illjes wrote:

I used to make heavy use of unionfs, and I had no problems.  [...]

Do you mean `union'?


I mean mount -t union.


`unionfs' was imported 2008/02/18 and was never enabled in any kernel config.


No, I haven't used that one.  I didn't even know about it.

--apb (Alan Barrett)


Re: CVS commit: src

2011-11-23 Thread Paul Goyette

On Wed, 23 Nov 2011, Martin Husemann wrote:


On Wed, Nov 23, 2011 at 03:19:55AM +, Christos Zoulas wrote:

He does not want to write atf tests. In my opinion non-atf tests is better
than no tests.


IMHO non-atf tests are just as useless as the whole src/regress hierachy
always was. BUT: finding someone to pick this new tests up and embed them
in atf should be easy.


I'll have a go at atf-ifying this over the upcoming 4-day holiday 
weekend (at least, in US).



-
| Paul Goyette | PGP Key fingerprint: | E-mail addresses:   |
| Customer Service | FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com|
| Network Engineer | 0786 F758 55DE 53BA 7731 | pgoyette at juniper.net |
| Kernel Developer |  | pgoyette at netbsd.org  |
-


Re: CVS commit: src

2011-11-23 Thread Paul Goyette

On Wed, 23 Nov 2011, Paul Goyette wrote:


IMHO non-atf tests are just as useless as the whole src/regress hierachy
always was. BUT: finding someone to pick this new tests up and embed them
in atf should be easy.


I'll have a go at atf-ifying this over the upcoming 4-day holiday weekend (at 
least, in US).


Actually, this test is already atf-ready, so there's nothing to do!

Thanks, Aleksey.

The new assign_NF test case is part of the existing test program:

# cd /usr/tests/util/awk
# atf-run | atf-report
Tests root: /usr/tests/util/awk

t_awk (1/1): 6 test cases
assign_NF: Passed.
big_regexp: Passed.
end: Passed.
multibyte: Passed.
period: Expected failure: PR bin/42320: atf-check failed; see the output of 
the test for details
string1: Passed.

Test cases for known bugs:
t_awk:period: PR bin/42320: atf-check failed; see the output of the
  test for details

Summary for 1 test programs:
5 passed test cases.
0 failed test cases.
1 expected failed test cases.
0 skipped test cases.
#


Much ado about nothing


-
| Paul Goyette | PGP Key fingerprint: | E-mail addresses:   |
| Customer Service | FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com|
| Network Engineer | 0786 F758 55DE 53BA 7731 | pgoyette at juniper.net |
| Kernel Developer |  | pgoyette at netbsd.org  |
-


Re: CVS commit: src

2011-11-23 Thread Christos Zoulas
On Nov 23,  9:07am, mar...@duskware.de (Martin Husemann) wrote:
-- Subject: Re: CVS commit: src

| On Wed, Nov 23, 2011 at 03:19:55AM +, Christos Zoulas wrote:
|  He does not want to write atf tests. In my opinion non-atf tests is better
|  than no tests.
| 
| IMHO non-atf tests are just as useless as the whole src/regress hierachy
| always was. BUT: finding someone to pick this new tests up and embed them
| in atf should be easy.

So we agree :-) regress tests are better than no tests.

christos


Re: CVS commit: src

2011-11-23 Thread Thor Lancelot Simon
On Wed, Nov 23, 2011 at 12:06:26PM +0100, Christoph Egger wrote:
 On 11/23/11 11:47, Thor Lancelot Simon wrote:
 Module Name: src
 Committed By:tls
 Date:Wed Nov 23 10:47:50 UTC 2011
 
 Modified Files:
  src/distrib/sets/lists/etc: mi
  src/etc/defaults: rc.conf
  src/etc/rc.d: Makefile
  src/sbin/rndctl: rndctl.8 rndctl.c
  src/sys/dev: rnd.c
  src/sys/secmodel/securelevel: secmodel_securelevel.c
  src/sys/secmodel/suser: secmodel_suser.c
  src/sys/sys: kauth.h rnd.h
 Added Files:
  src/etc/rc.d: random_seed
 
 Log Message:
 Load entropy at system boot (only works at securelevel  1); save
 at system shutdown.  Disable with random_seed=NO in rc.conf if desired.
 
 Goes to some trouble to never load or save to network filesystems.
 
 Entropy should really be loaded by the boot loader but I am still
 sorting out how to pass it to the kernel.
 
 How about passing it as a module similar to the multiboot technique?

Can't make one of those without an ELF toolchain, right?  The basic
idea's about right, but I actually need something less sophisticated in its
packaging -- a way to just give the kernel the address of blob-of-stuff
the bootloader's dropped into place for it, so the entropy pool code
can just take it and prime itself.

Thor


Re: CVS commit: src

2011-11-23 Thread Jared McNeill

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


It doesn't have to be ELF, I do it now on x86 for splash images. From 
/boot I load a .png, .jpg, or .bmp and add it to the module list but mark 
it as BI_MODULE_IMAGE (instead of BI_MODULE_ELF). I can then grab the blob 
from the kernel -- see arch/x86/x86/x86_machdep.c:module_init_md()


On Wed, 23 Nov 2011, Thor Lancelot Simon wrote:

Can't make one of those without an ELF toolchain, right?  The basic
idea's about right, but I actually need something less sophisticated in its
packaging -- a way to just give the kernel the address of blob-of-stuff
the bootloader's dropped into place for it, so the entropy pool code
can just take it and prime itself.

Thor



-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (NetBSD)

iQEcBAEBAgAGBQJOzVH9AAoJEKdMfxFXhnemlIUIALcDsuwTXTJ9LVuPZM+f/i4K
6z25M26KEz42EaqGGWa4iNY4vjS0hBPQFmnJFi9Eud+4RCmh469ClXp4g6yB/fSW
FgFZb5vEGCDto2AmPEyBWkz/g+hbG/+EvWmL12oHCYYh8wVIxN6VRo80LOq5M6Xb
v9nOBjgdiJ7ZuOlw00SK3dHSAoJkWY5/KevAN1UGmTNHfWtiNsgAJDQ5VBoDqNWl
U2J3IhPC9aSIjhavLOp0h4Nn5xnHq2ZxF1yQXdga7cddE8f2ru2vP2mdRFNOR/b3
qibTeQ5BRDS062UiiiLrhUIlOiS0S9vOD+MxCdd5aajvWnQPZK/6j3cH1+9jaZI=
=v/9x
-END PGP SIGNATURE-


CVS commit: src

2011-11-23 Thread Thor Lancelot Simon
Module Name:src
Committed By:   tls
Date:   Wed Nov 23 10:47:50 UTC 2011

Modified Files:
src/distrib/sets/lists/etc: mi
src/etc/defaults: rc.conf
src/etc/rc.d: Makefile
src/sbin/rndctl: rndctl.8 rndctl.c
src/sys/dev: rnd.c
src/sys/secmodel/securelevel: secmodel_securelevel.c
src/sys/secmodel/suser: secmodel_suser.c
src/sys/sys: kauth.h rnd.h
Added Files:
src/etc/rc.d: random_seed

Log Message:
Load entropy at system boot (only works at securelevel  1); save
at system shutdown.  Disable with random_seed=NO in rc.conf if desired.

Goes to some trouble to never load or save to network filesystems.

Entropy should really be loaded by the boot loader but I am still
sorting out how to pass it to the kernel.


To generate a diff of this commit:
cvs rdiff -u -r1.225 -r1.226 src/distrib/sets/lists/etc/mi
cvs rdiff -u -r1.116 -r1.117 src/etc/defaults/rc.conf
cvs rdiff -u -r1.85 -r1.86 src/etc/rc.d/Makefile
cvs rdiff -u -r0 -r1.1 src/etc/rc.d/random_seed
cvs rdiff -u -r1.18 -r1.19 src/sbin/rndctl/rndctl.8
cvs rdiff -u -r1.20 -r1.21 src/sbin/rndctl/rndctl.c
cvs rdiff -u -r1.85 -r1.86 src/sys/dev/rnd.c
cvs rdiff -u -r1.20 -r1.21 \
src/sys/secmodel/securelevel/secmodel_securelevel.c
cvs rdiff -u -r1.34 -r1.35 src/sys/secmodel/suser/secmodel_suser.c
cvs rdiff -u -r1.64 -r1.65 src/sys/sys/kauth.h
cvs rdiff -u -r1.22 -r1.23 src/sys/sys/rnd.h

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

Modified files:

Index: src/distrib/sets/lists/etc/mi
diff -u src/distrib/sets/lists/etc/mi:1.225 src/distrib/sets/lists/etc/mi:1.226
--- src/distrib/sets/lists/etc/mi:1.225	Tue Sep  6 21:32:30 2011
+++ src/distrib/sets/lists/etc/mi	Wed Nov 23 10:47:49 2011
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.225 2011/09/06 21:32:30 riz Exp $
+# $NetBSD: mi,v 1.226 2011/11/23 10:47:49 tls Exp $
 #
 # Note: end-user configuration files that are moved to another location
 #	should not be marked obsolete; they should just be removed from
@@ -254,6 +254,7 @@
 ./etc/rc.d/racoonetc-net-rc
 ./etc/rc.d/raidframeetc-sys-rc
 ./etc/rc.d/raidframeparity			etc-sys-rc
+./etc/rc.d/random_seedetc-sys-rc
 ./etc/rc.d/rarpdetc-bootserver-rc
 ./etc/rc.d/rbootdetc-bootserver-rc
 ./etc/rc.d/rndctletc-sys-rc

Index: src/etc/defaults/rc.conf
diff -u src/etc/defaults/rc.conf:1.116 src/etc/defaults/rc.conf:1.117
--- src/etc/defaults/rc.conf:1.116	Mon Nov 21 20:56:21 2011
+++ src/etc/defaults/rc.conf	Wed Nov 23 10:47:48 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: rc.conf,v 1.116 2011/11/21 20:56:21 darcy Exp $
+#	$NetBSD: rc.conf,v 1.117 2011/11/23 10:47:48 tls Exp $
 #
 # /etc/defaults/rc.conf --
 #	default configuration of /etc/rc.conf
@@ -362,3 +362,6 @@ veriexec_strict=0
 veriexec_verbose=0
 veriexec_flags=-k
 
+# Entropy load/save to/from /dev/random at startup/shutdown
+#
+random_seed=YES

Index: src/etc/rc.d/Makefile
diff -u src/etc/rc.d/Makefile:1.85 src/etc/rc.d/Makefile:1.86
--- src/etc/rc.d/Makefile:1.85	Tue Sep  6 21:32:29 2011
+++ src/etc/rc.d/Makefile	Wed Nov 23 10:47:48 2011
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.85 2011/09/06 21:32:29 riz Exp $
+# $NetBSD: Makefile,v 1.86 2011/11/23 10:47:48 tls Exp $
 
 .include bsd.own.mk
 
@@ -31,8 +31,9 @@ CONFIGFILES=\
 		named ndbootd network newsyslog nfsd nfslocking npf ntpd ntpdate \
 		perusertmp pf pf_boot pflogd postfix powerd ppp pwcheck \
 		quota \
-		racoon rpcbind raidframe raidframeparity rarpd rbootd rndctl \
-		root route6d routed rtadvd rtclocaltime rtsold rwho \
+		racoon rpcbind raidframe raidframeparity random_seed rarpd \
+		rbootd rndctl root route6d routed rtadvd rtclocaltime \
+		rtsold rwho \
 		savecore screenblank securelevel sshd \
 		staticroute swap1 swap2 sysctl sysdb syslogd \
 		timed tpctl ttys \

Index: src/sbin/rndctl/rndctl.8
diff -u src/sbin/rndctl/rndctl.8:1.18 src/sbin/rndctl/rndctl.8:1.19
--- src/sbin/rndctl/rndctl.8:1.18	Sat Oct  1 02:55:00 2011
+++ src/sbin/rndctl/rndctl.8	Wed Nov 23 10:47:49 2011
@@ -1,4 +1,4 @@
-.\	$NetBSD: rndctl.8,v 1.18 2011/10/01 02:55:00 pgoyette Exp $
+.\	$NetBSD: rndctl.8,v 1.19 2011/11/23 10:47:49 tls Exp $
 .\
 .\ Copyright (c) 1997 Michael Graff
 .\ All rights reserved.
@@ -39,6 +39,10 @@
 .Nm
 .Fl ls
 .Op Fl d Ar devname | Fl t Ar devtype
+.Nm
+.Fl L Ar save-file
+.Nm
+.Fl S Ar save-file
 .Sh DESCRIPTION
 The
 .Nm
@@ -104,6 +108,17 @@ Terminal, mouse, or other user input dev
 .It Ic rng
 Random number generators.
 .El
+.It Fl L
+Load saved entropy from file
+.Ar save-file ,
+which will be overwritten and deleted before the entropy is loaded into
+the kernel.
+.It Fl S
+Save entropy pool to file
+.Ar save-file .
+The file format is specific to
+.Nm
+and includes an estimate of the amount of saved entropy and a checksum.
 .El
 .Sh FILES
 .Bl -tag -width /dev/urandomx -compact

Index: src/sbin/rndctl/rndctl.c
diff -u src/sbin/rndctl/rndctl.c:1.20 src/sbin/rndctl/rndctl.c:1.21
--- 

CVS commit: src/sbin/rndctl

2011-11-23 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Nov 23 12:15:30 UTC 2011

Modified Files:
src/sbin/rndctl: rndctl.8

Log Message:
Sort option descriptions, bump date for previous.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sbin/rndctl/rndctl.8

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

Modified files:

Index: src/sbin/rndctl/rndctl.8
diff -u src/sbin/rndctl/rndctl.8:1.19 src/sbin/rndctl/rndctl.8:1.20
--- src/sbin/rndctl/rndctl.8:1.19	Wed Nov 23 10:47:49 2011
+++ src/sbin/rndctl/rndctl.8	Wed Nov 23 12:15:30 2011
@@ -1,4 +1,4 @@
-.\	$NetBSD: rndctl.8,v 1.19 2011/11/23 10:47:49 tls Exp $
+.\	$NetBSD: rndctl.8,v 1.20 2011/11/23 12:15:30 wiz Exp $
 .\
 .\ Copyright (c) 1997 Michael Graff
 .\ All rights reserved.
@@ -26,7 +26,7 @@
 .\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\ SUCH DAMAGE.
 .\
-.Dd January 4, 2009
+.Dd November 23, 2011
 .Dt RNDCTL 8
 .Os
 .Sh NAME
@@ -76,6 +76,11 @@ but no entropy is assumed to be present.
 .It Fl e
 Enable entropy estimation using the collected timing information
 for the given device name or device type.
+.It Fl L
+Load saved entropy from file
+.Ar save-file ,
+which will be overwritten and deleted before the entropy is loaded into
+the kernel.
 .It Fl l
 List all sources, or, if the
 .Fl t
@@ -86,6 +91,12 @@ flags are specified, only those specifie
 or
 .Ar devname
 specified.
+.It Fl S
+Save entropy pool to file
+.Ar save-file .
+The file format is specific to
+.Nm
+and includes an estimate of the amount of saved entropy and a checksum.
 .It Fl s
 Display statistics on the current state of the random collection pool.
 .It Fl t
@@ -108,17 +119,6 @@ Terminal, mouse, or other user input dev
 .It Ic rng
 Random number generators.
 .El
-.It Fl L
-Load saved entropy from file
-.Ar save-file ,
-which will be overwritten and deleted before the entropy is loaded into
-the kernel.
-.It Fl S
-Save entropy pool to file
-.Ar save-file .
-The file format is specific to
-.Nm
-and includes an estimate of the amount of saved entropy and a checksum.
 .El
 .Sh FILES
 .Bl -tag -width /dev/urandomx -compact



CVS commit: src/dist/nvi/ex

2011-11-23 Thread Takehiko NOZAKI
Module Name:src
Committed By:   tnozaki
Date:   Wed Nov 23 14:14:44 UTC 2011

Modified Files:
src/dist/nvi/ex: ex.c

Log Message:
don't use L prefix directly, for --disable-widechar.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/dist/nvi/ex/ex.c

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

Modified files:

Index: src/dist/nvi/ex/ex.c
diff -u src/dist/nvi/ex/ex.c:1.7 src/dist/nvi/ex/ex.c:1.8
--- src/dist/nvi/ex/ex.c:1.7	Mon Mar 21 14:53:03 2011
+++ src/dist/nvi/ex/ex.c	Wed Nov 23 14:14:43 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: ex.c,v 1.7 2011/03/21 14:53:03 tnozaki Exp $ */
+/*	$NetBSD: ex.c,v 1.8 2011/11/23 14:14:43 tnozaki Exp $ */
 
 /*-
  * Copyright (c) 1992, 1993, 1994
@@ -1842,7 +1842,7 @@ ex_line(SCR *sp, EXCMD *ecp, MARK *mp, i
 	F_CLR(ecp, E_DELTA);
 
 	/* No addresses permitted until a file has been read in. */
-	if (sp-ep == NULL  STRCHR(L$0123456789'\\/?.+-^, *ecp-cp)) {
+	if (sp-ep == NULL  STRCHR(L($0123456789'\\/?.+-^), *ecp-cp)) {
 		ex_badaddr(sp, NULL, A_EMPTY, NUM_OK);
 		*errp = 1;
 		return (0);



CVS commit: src/dist/nvi

2011-11-23 Thread Takehiko NOZAKI
Module Name:src
Committed By:   tnozaki
Date:   Wed Nov 23 15:43:39 UTC 2011

Modified Files:
src/dist/nvi/common: multibyte.h
src/dist/nvi/regex: regex2.h

Log Message:
don't use WEOF directly, for --disable-widechar.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/dist/nvi/common/multibyte.h
cvs rdiff -u -r1.4 -r1.5 src/dist/nvi/regex/regex2.h

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

Modified files:

Index: src/dist/nvi/common/multibyte.h
diff -u src/dist/nvi/common/multibyte.h:1.6 src/dist/nvi/common/multibyte.h:1.7
--- src/dist/nvi/common/multibyte.h:1.6	Mon Mar 21 14:53:02 2011
+++ src/dist/nvi/common/multibyte.h	Wed Nov 23 15:43:39 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: multibyte.h,v 1.6 2011/03/21 14:53:02 tnozaki Exp $ */
+/*	$NetBSD: multibyte.h,v 1.7 2011/11/23 15:43:39 tnozaki Exp $ */
 
 #ifndef MULTIBYTE_H
 #define MULTIBYTE_H
@@ -37,6 +37,7 @@
 #include wctype.h
 
 typedef wchar_t		RCHAR_T;
+#define REOF		WEOF
 typedef wchar_t		CHAR_T;
 typedef	wint_t		ARG_CHAR_T;
 typedef wint_t		UCHAR_T;
@@ -65,7 +66,10 @@ typedef wint_t		UCHAR_T;
 #define WC		%lc
 
 #else
+#include stdio.h
+
 typedef	char		RCHAR_T;
+#define REOF		EOF
 typedef	char		CHAR_T;
 typedef	int		ARG_CHAR_T;
 typedef	unsigned char	UCHAR_T;

Index: src/dist/nvi/regex/regex2.h
diff -u src/dist/nvi/regex/regex2.h:1.4 src/dist/nvi/regex/regex2.h:1.5
--- src/dist/nvi/regex/regex2.h:1.4	Sat Nov 19 17:45:11 2011
+++ src/dist/nvi/regex/regex2.h	Wed Nov 23 15:43:39 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: regex2.h,v 1.4 2011/11/19 17:45:11 tnozaki Exp $ */
+/*	$NetBSD: regex2.h,v 1.5 2011/11/23 15:43:39 tnozaki Exp $ */
 
 /*-
  * Copyright (c) 1992, 1993, 1994 Henry Spencer.
@@ -170,5 +170,5 @@ struct re_guts {
 };
 
 /* misc utilities */
-#define OUT	WEOF	/* a non-character value */
+#define OUT	REOF	/* a non-character value */
 #define	ISWORD(c) ((c) == '_' || (ISGRAPH((UCHAR_T)c)  !ISPUNCT((UCHAR_T)c)))



CVS commit: src/sys/arch/hpc/stand/hpcboot

2011-11-23 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Wed Nov 23 15:49:58 UTC 2011

Modified Files:
src/sys/arch/hpc/stand/hpcboot: file_ufs.cpp
src/sys/arch/hpc/stand/hpcboot/menu: menu.cpp
src/sys/arch/hpc/stand/hpcboot/res: hpcmenu.rc resource.h

Log Message:
modify for PSION NETBOOK PRO.
- ignore Network directory when finding the directory for configuration files.
- as the device name SMC (SD-MMC) to allow.
- add SMC1:/ entry to kernel directory.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/hpc/stand/hpcboot/file_ufs.cpp
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/hpc/stand/hpcboot/menu/menu.cpp
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/hpc/stand/hpcboot/res/hpcmenu.rc
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/hpc/stand/hpcboot/res/resource.h

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

Modified files:

Index: src/sys/arch/hpc/stand/hpcboot/file_ufs.cpp
diff -u src/sys/arch/hpc/stand/hpcboot/file_ufs.cpp:1.4 src/sys/arch/hpc/stand/hpcboot/file_ufs.cpp:1.5
--- src/sys/arch/hpc/stand/hpcboot/file_ufs.cpp:1.4	Mon Apr 28 20:23:20 2008
+++ src/sys/arch/hpc/stand/hpcboot/file_ufs.cpp	Wed Nov 23 15:49:57 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: file_ufs.cpp,v 1.4 2008/04/28 20:23:20 martin Exp $	*/
+/*	$NetBSD: file_ufs.cpp,v 1.5 2011/11/23 15:49:57 nonaka Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -67,15 +67,23 @@ BOOL
 UfsFile::setRoot(TCHAR *drive)
 {
 	char name[MAX_PATH];
-	int unit;
+	char devname[4] = DSK;
+	int unit = 1;
 
 	_to_ascii(name, drive, MAX_PATH);
 	if ('1' = name[0]  name[0] = '9'  name[1] == ':')
 		unit = name[0] - '0';
-	else
-		unit = 1;
+	else if (isalpha((unsigned char)name[0]) 
+	isalpha((unsigned char)name[1]) 
+	isalpha((unsigned char)name[2]) 
+	'1' = name[3]  name[3] = '9'  name[4] == ':') {
+		devname[0] = name[0];
+		devname[1] = name[1];
+		devname[2] = name[2];
+		unit = name[3] - '0';
+	}
 
-	winblkopen(_f, DSK, unit, 0);
+	winblkopen(_f, devname, unit, 0);
 
 	return TRUE;
 }

Index: src/sys/arch/hpc/stand/hpcboot/menu/menu.cpp
diff -u src/sys/arch/hpc/stand/hpcboot/menu/menu.cpp:1.12 src/sys/arch/hpc/stand/hpcboot/menu/menu.cpp:1.13
--- src/sys/arch/hpc/stand/hpcboot/menu/menu.cpp:1.12	Tue Apr  6 16:20:28 2010
+++ src/sys/arch/hpc/stand/hpcboot/menu/menu.cpp	Wed Nov 23 15:49:58 2011
@@ -1,4 +1,4 @@
-/* -*-C++-*-	$NetBSD: menu.cpp,v 1.12 2010/04/06 16:20:28 nonaka Exp $	*/
+/* -*-C++-*-	$NetBSD: menu.cpp,v 1.13 2011/11/23 15:49:58 nonaka Exp $	*/
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -549,6 +549,22 @@ ConsoleTabWindow::_open_log_file()
 //
 // Common utility
 //
+static BOOL
+is_ignore_directory(TCHAR *filename)
+{
+	static const TCHAR *dirs[] = {
+		// Network (in Japanese)
+		(const TCHAR *)\xcd\x30\xc3\x30\xc8\x30\xef\x30\xfc\x30\xaf\x30\x00\x00,
+	};
+
+	for (int i = 0; i  sizeof(dirs) / sizeof(dirs[0]); i++) {
+		if (wcscmp(filename, dirs[i]) == 0) {
+			return TRUE;
+		}
+	}
+	return FALSE;
+}
+
 BOOL
 _find_pref_dir(TCHAR *path)
 {
@@ -562,7 +578,8 @@ _find_pref_dir(TCHAR *path)
 		do {
 			int attr = fd.dwFileAttributes;
 			if ((attr  FILE_ATTRIBUTE_DIRECTORY) 
-			(attr  FILE_ATTRIBUTE_TEMPORARY)) {
+			(attr  FILE_ATTRIBUTE_TEMPORARY) 
+			!is_ignore_directory(fd.cFileName)) {
 wcscpy(path, fd.cFileName);
 FindClose(find);
 return TRUE;

Index: src/sys/arch/hpc/stand/hpcboot/res/hpcmenu.rc
diff -u src/sys/arch/hpc/stand/hpcboot/res/hpcmenu.rc:1.20 src/sys/arch/hpc/stand/hpcboot/res/hpcmenu.rc:1.21
--- src/sys/arch/hpc/stand/hpcboot/res/hpcmenu.rc:1.20	Wed Sep 28 14:19:13 2011
+++ src/sys/arch/hpc/stand/hpcboot/res/hpcmenu.rc	Wed Nov 23 15:49:58 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: hpcmenu.rc,v 1.20 2011/09/28 14:19:13 nonaka Exp $	*/
+/*	$NetBSD: hpcmenu.rc,v 1.21 2011/11/23 15:49:58 nonaka Exp $	*/
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -44,6 +44,7 @@ STRINGTABLE DISCARDABLE
 	IDS_HPCMENU			HPCBOOT
 	IDS_DIR_FFS_ROOT1		/
 	IDS_DIR_FFS_ROOT2		2:/
+	IDS_DIR_FFS_SMC_ROOT1		SMC1:/
 	IDS_DIR_FAT_ROOT		\\
 	IDS_DIR_FAT_MY_DOCUMENTS	\\My Documents\\
 	IDS_DIR_CARD_EN			\\Storage Card\\

Index: src/sys/arch/hpc/stand/hpcboot/res/resource.h
diff -u src/sys/arch/hpc/stand/hpcboot/res/resource.h:1.12 src/sys/arch/hpc/stand/hpcboot/res/resource.h:1.13
--- src/sys/arch/hpc/stand/hpcboot/res/resource.h:1.12	Wed Sep 28 14:19:13 2011
+++ src/sys/arch/hpc/stand/hpcboot/res/resource.h	Wed Nov 23 15:49:58 2011
@@ -1,4 +1,4 @@
-/* -*-C++-*-	$NetBSD: resource.h,v 1.12 2011/09/28 14:19:13 nonaka Exp $	*/
+/* -*-C++-*-	$NetBSD: resource.h,v 1.13 2011/11/23 15:49:58 nonaka Exp $	*/
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -114,19 +114,20 @@
 
 #define	IDS_DIR_FFS_ROOT1		10004
 #define	IDS_DIR_FFS_ROOT2		10006
-#define	IDS_DIR_FAT_ROOT		10008
-#define	IDS_DIR_FAT_MY_DOCUMENTS	10010
-#define	IDS_DIR_CARD_EN			10012
-#define	IDS_DIR_CARD_EN1		

CVS commit: [jmcneill-audiomp3] src/sys/dev/ebus

2011-11-23 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Wed Nov 23 16:53:57 UTC 2011

Modified Files:
src/sys/dev/ebus [jmcneill-audiomp3]: cs4231_ebus.c

Log Message:
initialize locks
now this works on my U60


To generate a diff of this commit:
cvs rdiff -u -r1.34.4.3 -r1.34.4.4 src/sys/dev/ebus/cs4231_ebus.c

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

Modified files:

Index: src/sys/dev/ebus/cs4231_ebus.c
diff -u src/sys/dev/ebus/cs4231_ebus.c:1.34.4.3 src/sys/dev/ebus/cs4231_ebus.c:1.34.4.4
--- src/sys/dev/ebus/cs4231_ebus.c:1.34.4.3	Tue Nov 22 22:47:05 2011
+++ src/sys/dev/ebus/cs4231_ebus.c	Wed Nov 23 16:53:57 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: cs4231_ebus.c,v 1.34.4.3 2011/11/22 22:47:05 jmcneill Exp $ */
+/*	$NetBSD: cs4231_ebus.c,v 1.34.4.4 2011/11/23 16:53:57 macallan Exp $ */
 
 /*
  * Copyright (c) 2002 Valeriy E. Ushakov
@@ -28,7 +28,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: cs4231_ebus.c,v 1.34.4.3 2011/11/22 22:47:05 jmcneill Exp $);
+__KERNEL_RCSID(0, $NetBSD: cs4231_ebus.c,v 1.34.4.4 2011/11/23 16:53:57 macallan Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_sparc_arch.h
@@ -248,6 +248,8 @@ cs4231_ebus_attach(device_t parent, devi
 		return;
 	}
 
+	ad1848_init_locks(sc-sc_ad1848, IPL_SCHED);
+
 	/* establish interrupt channels */
 	for (i = 0; i  ea-ea_nintr; ++i)
 		bus_intr_establish(ea-ea_bustag,



CVS commit: [jmcneill-audiomp3] src/sys/dev

2011-11-23 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Wed Nov 23 16:55:24 UTC 2011

Modified Files:
src/sys/dev [jmcneill-audiomp3]: TODO.audiomp

Log Message:
audiocs at ebus works on sparc64


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.27 -r1.1.2.28 src/sys/dev/TODO.audiomp

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/TODO.audiomp
diff -u src/sys/dev/TODO.audiomp:1.1.2.27 src/sys/dev/TODO.audiomp:1.1.2.28
--- src/sys/dev/TODO.audiomp:1.1.2.27	Tue Nov 22 18:29:06 2011
+++ src/sys/dev/TODO.audiomp	Wed Nov 23 16:55:24 2011
@@ -17,7 +17,7 @@ arch/sparc/dev/audioamd.c	done
 arch/x68k/dev/vs.c		done
 arch/zaurus/dev/zaudio.c	done
 dev/bluetooth/btsco.c		done
-dev/ebus/cs4231_ebus.c		done
+dev/ebus/cs4231_ebus.c		done		port-sparc64
 dev/ic/interwave.c		done
 dev/ic/mpu.c			done
 dev/ic/opl.c			done



CVS commit: [jmcneill-audiomp3] src/sys/dev

2011-11-23 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Wed Nov 23 18:43:53 UTC 2011

Modified Files:
src/sys/dev [jmcneill-audiomp3]: TODO.audiomp

Log Message:
wss(4) and clcs(4) tested successfully


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.28 -r1.1.2.29 src/sys/dev/TODO.audiomp

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/TODO.audiomp
diff -u src/sys/dev/TODO.audiomp:1.1.2.28 src/sys/dev/TODO.audiomp:1.1.2.29
--- src/sys/dev/TODO.audiomp:1.1.2.28	Wed Nov 23 16:55:24 2011
+++ src/sys/dev/TODO.audiomp	Wed Nov 23 18:43:53 2011
@@ -27,7 +27,7 @@ dev/isa/ess.c			done		port-shark
 dev/isa/gus.c			done
 dev/isa/pas.c			done
 dev/isa/sb.c			done		port-i386
-dev/isa/wss.c			done
+dev/isa/wss.c			done		port-i386
 dev/isa/ym.c			done		port-i386
 dev/isapnp/mpu_isapnp.c		done
 dev/pad/pad.c			done
@@ -38,7 +38,7 @@ dev/pci/autri.c			done		port-sparc64
 dev/pci/auvia.c			done
 dev/pci/azalia.c		done		port-i386
 dev/pci/cmpci.c			done
-dev/pci/cs4280.c		done
+dev/pci/cs4280.c		done		port-i386
 dev/pci/cs4281.c		done
 dev/pci/eap.c			done		port-i386
 dev/pci/emuxki.c		done		port-amd64



CVS commit: src/dist/nvi

2011-11-23 Thread Takehiko NOZAKI
Module Name:src
Committed By:   tnozaki
Date:   Wed Nov 23 19:18:53 UTC 2011

Modified Files:
src/dist/nvi/ex: ex_script.c
src/dist/nvi/vi: v_z.c

Log Message:
use e_key_t instead of u_int.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/dist/nvi/ex/ex_script.c
cvs rdiff -u -r1.1.1.2 -r1.2 src/dist/nvi/vi/v_z.c

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

Modified files:

Index: src/dist/nvi/ex/ex_script.c
diff -u src/dist/nvi/ex/ex_script.c:1.4 src/dist/nvi/ex/ex_script.c:1.5
--- src/dist/nvi/ex/ex_script.c:1.4	Sun Jan 18 03:45:50 2009
+++ src/dist/nvi/ex/ex_script.c	Wed Nov 23 19:18:53 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: ex_script.c,v 1.4 2009/01/18 03:45:50 lukem Exp $ */
+/*	$NetBSD: ex_script.c,v 1.5 2011/11/23 19:18:53 tnozaki Exp $ */
 
 /*-
  * Copyright (c) 1992, 1993, 1994
@@ -210,7 +210,7 @@ sscr_getprompt(SCR *sp)
 	fd_set fdset;
 	db_recno_t lline;
 	size_t llen, len;
-	u_int value;
+	e_key_t value;
 	int nr;
 
 	FD_ZERO(fdset);
@@ -472,7 +472,7 @@ sscr_insert(SCR *sp)
 	fd_set rdfd;
 	db_recno_t lno;
 	size_t blen, len = 0, tlen;
-	u_int value;
+	e_key_t value;
 	int nr, rval;
 	CHAR_T *bp;
 

Index: src/dist/nvi/vi/v_z.c
diff -u src/dist/nvi/vi/v_z.c:1.1.1.2 src/dist/nvi/vi/v_z.c:1.2
--- src/dist/nvi/vi/v_z.c:1.1.1.2	Sun May 18 14:31:48 2008
+++ src/dist/nvi/vi/v_z.c	Wed Nov 23 19:18:53 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: v_z.c,v 1.1.1.2 2008/05/18 14:31:48 aymeric Exp $ */
+/*	$NetBSD: v_z.c,v 1.2 2011/11/23 19:18:53 tnozaki Exp $ */
 
 /*-
  * Copyright (c) 1992, 1993, 1994
@@ -36,7 +36,7 @@ int
 v_z(SCR *sp, VICMD *vp)
 {
 	db_recno_t lno;
-	u_int value;
+	e_key_t value;
 
 	/*
 	 * The first count is the line to use.  If the value doesn't



CVS commit: src/dist/nvi

2011-11-23 Thread Takehiko NOZAKI
Module Name:src
Committed By:   tnozaki
Date:   Wed Nov 23 19:25:28 UTC 2011

Modified Files:
src/dist/nvi/cl: cl_term.c
src/dist/nvi/common: cut.c extern.h put.c screen.h
src/dist/nvi/ex: ex.c ex.h ex_at.c
src/dist/nvi/vi: v_at.c v_ch.c v_txt.c

Log Message:
use ARG_CHAR_T instead of CHAR_T for integer promotion.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/dist/nvi/cl/cl_term.c
cvs rdiff -u -r1.4 -r1.5 src/dist/nvi/common/cut.c \
src/dist/nvi/common/extern.h
cvs rdiff -u -r1.2 -r1.3 src/dist/nvi/common/put.c
cvs rdiff -u -r1.1.1.2 -r1.2 src/dist/nvi/common/screen.h
cvs rdiff -u -r1.8 -r1.9 src/dist/nvi/ex/ex.c
cvs rdiff -u -r1.3 -r1.4 src/dist/nvi/ex/ex.h
cvs rdiff -u -r1.2 -r1.3 src/dist/nvi/ex/ex_at.c
cvs rdiff -u -r1.3 -r1.4 src/dist/nvi/vi/v_at.c
cvs rdiff -u -r1.1.1.2 -r1.2 src/dist/nvi/vi/v_ch.c
cvs rdiff -u -r1.7 -r1.8 src/dist/nvi/vi/v_txt.c

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

Modified files:

Index: src/dist/nvi/cl/cl_term.c
diff -u src/dist/nvi/cl/cl_term.c:1.3 src/dist/nvi/cl/cl_term.c:1.4
--- src/dist/nvi/cl/cl_term.c:1.3	Sat Sep 24 18:57:46 2011
+++ src/dist/nvi/cl/cl_term.c	Wed Nov 23 19:25:27 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: cl_term.c,v 1.3 2011/09/24 18:57:46 jdc Exp $ */
+/*	$NetBSD: cl_term.c,v 1.4 2011/11/23 19:25:27 tnozaki Exp $ */
 
 /*-
  * Copyright (c) 1993, 1994
@@ -127,8 +127,9 @@ cl_term_init(SCR *sp)
 		MEMCPYW(name, wp, wlen);
 		CHAR2INT(sp, t, strlen(t), wp, wlen);
 		MEMCPYW(ts, wp, wlen);
+		output[0] = (UCHAR_T)kp-ch;
 		if (seq_set(sp, name, strlen(tkp-name), ts, strlen(t),
-		kp-ch, 1, SEQ_INPUT, SEQ_NOOVERWRITE | SEQ_SCREEN))
+		output, 1, SEQ_INPUT, SEQ_NOOVERWRITE | SEQ_SCREEN))
 			return (1);
 	}
 

Index: src/dist/nvi/common/cut.c
diff -u src/dist/nvi/common/cut.c:1.4 src/dist/nvi/common/cut.c:1.5
--- src/dist/nvi/common/cut.c:1.4	Mon Mar 21 14:53:02 2011
+++ src/dist/nvi/common/cut.c	Wed Nov 23 19:25:28 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: cut.c,v 1.4 2011/03/21 14:53:02 tnozaki Exp $ */
+/*	$NetBSD: cut.c,v 1.5 2011/11/23 19:25:28 tnozaki Exp $ */
 
 /*-
  * Copyright (c) 1992, 1993, 1994
@@ -63,10 +63,10 @@ static void	cb_rotate __P((SCR *));
  * replacing the contents.  Hopefully it's not worth getting right, and here
  * we just treat the numeric buffers like any other named buffer.
  *
- * PUBLIC: int cut __P((SCR *, CHAR_T *, MARK *, MARK *, int));
+ * PUBLIC: int cut __P((SCR *, ARG_CHAR_T *, MARK *, MARK *, int));
  */
 int
-cut(SCR *sp, CHAR_T *namep, MARK *fm, MARK *tm, int flags)
+cut(SCR *sp, ARG_CHAR_T *namep, MARK *fm, MARK *tm, int flags)
 {
 	CB *cbp;
 	ARG_CHAR_T name = '\0';
@@ -97,7 +97,7 @@ cut(SCR *sp, CHAR_T *namep, MARK *fm, MA
 	 */
 	append = copy_one = copy_def = 0;
 	if (namep != NULL) {
-		name = (UCHAR_T)*namep;
+		name = *namep;
 		if (LF_ISSET(CUT_NUMREQ) || (LF_ISSET(CUT_NUMOPT) 
 		(LF_ISSET(CUT_LINEMODE) || fm-lno != tm-lno))) {
 			copy_one = 1;
Index: src/dist/nvi/common/extern.h
diff -u src/dist/nvi/common/extern.h:1.4 src/dist/nvi/common/extern.h:1.5
--- src/dist/nvi/common/extern.h:1.4	Mon Mar 21 14:53:02 2011
+++ src/dist/nvi/common/extern.h	Wed Nov 23 19:25:28 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: extern.h,v 1.4 2011/03/21 14:53:02 tnozaki Exp $ */
+/*	$NetBSD: extern.h,v 1.5 2011/11/23 19:25:28 tnozaki Exp $ */
 
 /* Do not edit: automatically built by build/distrib. */
 SCR *api_fscreen __P((int, char *));
@@ -28,7 +28,7 @@ TAGQ * api_tagq_new __P((SCR*, char*));
 void api_tagq_add __P((SCR*, TAGQ*, char*, char *, char *));
 int api_tagq_push __P((SCR*, TAGQ**));
 void api_tagq_free __P((SCR*, TAGQ*));
-int cut __P((SCR *, CHAR_T *, MARK *, MARK *, int));
+int cut __P((SCR *, ARG_CHAR_T *, MARK *, MARK *, int));
 int cut_line __P((SCR *, db_recno_t, size_t, size_t, CB *));
 void cut_close __P((WIN *));
 TEXT *text_init __P((SCR *, const CHAR_T *, size_t, size_t));
@@ -133,7 +133,7 @@ int f_w9600 __P((SCR *, OPTION *, const 
 int f_window __P((SCR *, OPTION *, const char *, u_long *));
 int f_encoding __P((SCR *, OPTION *, const char *, u_long *));
 void thread_init __P((GS *gp));
-int put __P((SCR *, CB *, CHAR_T *, MARK *, MARK *, int));
+int put __P((SCR *, CB *, ARG_CHAR_T *, MARK *, MARK *, int));
 int rcv_tmp __P((SCR *, EXF *, char *));
 int rcv_init __P((SCR *));
 int rcv_sync __P((SCR *, u_int));

Index: src/dist/nvi/common/put.c
diff -u src/dist/nvi/common/put.c:1.2 src/dist/nvi/common/put.c:1.3
--- src/dist/nvi/common/put.c:1.2	Fri Dec  5 22:51:42 2008
+++ src/dist/nvi/common/put.c	Wed Nov 23 19:25:28 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: put.c,v 1.2 2008/12/05 22:51:42 christos Exp $ */
+/*	$NetBSD: put.c,v 1.3 2011/11/23 19:25:28 tnozaki Exp $ */
 
 /*-
  * Copyright (c) 1992, 1993, 1994
@@ -34,9 +34,9 @@ static const char sccsid[] = Id: put.c,
  * PUBLIC: int put __P((SCR *, CB *, CHAR_T *, MARK *, MARK *, int));
  */
 int
-put(SCR *sp, CB *cbp, CHAR_T *namep, 

CVS commit: src/sys/fs/union

2011-11-23 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Wed Nov 23 19:39:11 UTC 2011

Modified Files:
src/sys/fs/union: union.h union_subr.c union_vfsops.c

Log Message:
Use hashinit() / hashdone() to create the union node hash list.

Cleanup the hash lookup in union_allocvp().

Needs more work as there is still a possible deadlock between
union_allocvp() and vclean().


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/fs/union/union.h
cvs rdiff -u -r1.53 -r1.54 src/sys/fs/union/union_subr.c
cvs rdiff -u -r1.65 -r1.66 src/sys/fs/union/union_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/union/union.h
diff -u src/sys/fs/union/union.h:1.22 src/sys/fs/union/union.h:1.23
--- src/sys/fs/union/union.h:1.22	Mon Nov 21 18:29:22 2011
+++ src/sys/fs/union/union.h	Wed Nov 23 19:39:11 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: union.h,v 1.22 2011/11/21 18:29:22 hannken Exp $	*/
+/*	$NetBSD: union.h,v 1.23 2011/11/23 19:39:11 hannken Exp $	*/
 
 /*
  * Copyright (c) 1994 The Regents of the University of California.
@@ -175,6 +175,7 @@ int union_readdirhook(struct vnode **, s
 extern int (**union_vnodeop_p)(void *);
 
 void union_init(void);
+void union_reinit(void);
 void union_done(void);
 int union_freevp(struct vnode *);
 

Index: src/sys/fs/union/union_subr.c
diff -u src/sys/fs/union/union_subr.c:1.53 src/sys/fs/union/union_subr.c:1.54
--- src/sys/fs/union/union_subr.c:1.53	Mon Nov 21 18:29:22 2011
+++ src/sys/fs/union/union_subr.c	Wed Nov 23 19:39:11 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: union_subr.c,v 1.53 2011/11/21 18:29:22 hannken Exp $	*/
+/*	$NetBSD: union_subr.c,v 1.54 2011/11/23 19:39:11 hannken Exp $	*/
 
 /*
  * Copyright (c) 1994
@@ -72,7 +72,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: union_subr.c,v 1.53 2011/11/21 18:29:22 hannken Exp $);
+__KERNEL_RCSID(0, $NetBSD: union_subr.c,v 1.54 2011/11/23 19:39:11 hannken Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -96,15 +96,13 @@ __KERNEL_RCSID(0, $NetBSD: union_subr.c
 #include miscfs/genfs/genfs.h
 #include miscfs/specfs/specdev.h
 
-/* must be power of two, otherwise change UNION_HASH() */
-#define NHASH 32
-
-/* unsigned int ... */
+static LIST_HEAD(uhashhead, union_node) *uhashtbl;
+static u_long uhash_mask;		/* size of hash table - 1 */
 #define UNION_HASH(u, l) \
-	(unsigned long) (u)) + ((unsigned long) l))  8)  (NHASH-1))
+	u_long) (u) + (u_long) (l))  8)  uhash_mask)
+#define NOHASH	((u_long)-1)
 
-static LIST_HEAD(unhead, union_node) unhead[NHASH];
-static kmutex_t unheadlock[NHASH];
+static kmutex_t uhash_lock;
 
 void union_updatevp(struct union_node *, struct vnode *, struct vnode *);
 static int union_do_lookup(struct vnode *, struct componentname *, kauth_cred_t,const char *, u_long);
@@ -115,12 +113,34 @@ struct vnode *union_dircache(struct vnod
 void
 union_init(void)
 {
+
+	mutex_init(uhash_lock, MUTEX_DEFAULT, IPL_NONE);
+	uhashtbl = hashinit(desiredvnodes, HASH_LIST, true, uhash_mask);
+}
+
+void
+union_reinit(void)
+{
+	struct union_node *un;
+	struct uhashhead *oldhash, *hash;
+	u_long oldmask, mask, val;
 	int i;
 
-	for (i = 0; i  NHASH; i++) {
-		LIST_INIT(unhead[i]);
-		mutex_init(unheadlock[i], MUTEX_DEFAULT, IPL_NONE);
+	hash = hashinit(desiredvnodes, HASH_LIST, true, mask);
+	mutex_enter(uhash_lock);
+	oldhash = uhashtbl;
+	oldmask = uhash_mask;
+	uhashtbl = hash;
+	uhash_mask = mask;
+	for (i = 0; i = oldmask; i++) {
+		while ((un = LIST_FIRST(oldhash[i])) != NULL) {
+			LIST_REMOVE(un, un_cache);
+			val = UNION_HASH(un-un_uppervp, un-un_lowervp);
+			LIST_INSERT_HEAD(hash[val], un, un_cache);
+		}
 	}
+	mutex_exit(uhash_lock);
+	hashdone(oldhash, HASH_LIST, oldmask);
 }
 
 /*
@@ -129,10 +149,9 @@ union_init(void)
 void
 union_done(void)
 {
-	int i;
 
-	for (i = 0; i  NHASH; i++)
-		mutex_destroy(unheadlock[i]);
+	hashdone(uhashtbl, HASH_LIST, uhash_mask);
+	mutex_destroy(uhash_lock);
 
 	/* Make sure to unset the readdir hook. */
 	vn_union_readdir_hook = NULL;
@@ -145,37 +164,19 @@ union_updatevp(struct union_node *un, st
 	int ohash = UNION_HASH(un-un_uppervp, un-un_lowervp);
 	int nhash = UNION_HASH(uppervp, lowervp);
 	int docache = (lowervp != NULLVP || uppervp != NULLVP);
-	int lhash, uhash;
 	bool un_unlock;
 
 	KASSERT(VOP_ISLOCKED(UNIONTOV(un)) == LK_EXCLUSIVE);
-	/*
-	 * Ensure locking is ordered from lower to higher
-	 * to avoid deadlocks.
-	 */
-	if (nhash  ohash) {
-		lhash = nhash;
-		uhash = ohash;
-	} else {
-		lhash = ohash;
-		uhash = nhash;
-	}
-
-	if (lhash != uhash)
-		mutex_enter(unheadlock[lhash]);
 
-	mutex_enter(unheadlock[uhash]);
+	mutex_enter(uhash_lock);
 
-	if (ohash != nhash || !docache) {
+	if (!docache || ohash != nhash) {
 		if (un-un_cflags  UN_CACHED) {
 			un-un_cflags = ~UN_CACHED;
 			LIST_REMOVE(un, un_cache);
 		}
 	}
 
-	if (ohash != nhash)
-		mutex_exit(unheadlock[ohash]);
-
 	if (un-un_lowervp != lowervp) {
 		

CVS commit: src/sys/dev/pci

2011-11-23 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Wed Nov 23 19:40:42 UTC 2011

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

Log Message:
According to Virtio PCI Card Specification v0.9.2 DRAFT there is no
feature named VIRTIO_BLK_F_SECTOR_MAX so remove it.  Linux seems to use
this feature bit as VIRTIO_BLK_F_TOPOLOGY.

Use VIRTIO_BLK_F_BLK_SIZE * VIRTIO_BLK_F_SEG_MAX as the drivers maxxfer
and reorder so sc_secsize gets set before use.

As maxxfer may not be a multiple of page size add one more segment to
the dma maps.

Tested on Linux 3.1.1 host by Guillaume Lasmayous.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/pci/ld_virtio.c

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

Modified files:

Index: src/sys/dev/pci/ld_virtio.c
diff -u src/sys/dev/pci/ld_virtio.c:1.2 src/sys/dev/pci/ld_virtio.c:1.3
--- src/sys/dev/pci/ld_virtio.c:1.2	Wed Nov  2 14:34:09 2011
+++ src/sys/dev/pci/ld_virtio.c	Wed Nov 23 19:40:42 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: ld_virtio.c,v 1.2 2011/11/02 14:34:09 hannken Exp $	*/
+/*	$NetBSD: ld_virtio.c,v 1.3 2011/11/23 19:40:42 hannken Exp $	*/
 
 /*
  * Copyright (c) 2010 Minoura Makoto.
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ld_virtio.c,v 1.2 2011/11/02 14:34:09 hannken Exp $);
+__KERNEL_RCSID(0, $NetBSD: ld_virtio.c,v 1.3 2011/11/23 19:40:42 hannken Exp $);
 
 #include rnd.h
 
@@ -61,7 +61,6 @@ __KERNEL_RCSID(0, $NetBSD: ld_virtio.c,
 #define VIRTIO_BLK_CONFIG_GEOMETRY_H	18 /* 8bit */
 #define VIRTIO_BLK_CONFIG_GEOMETRY_S	19 /* 8bit */
 #define VIRTIO_BLK_CONFIG_BLK_SIZE	20 /* 32bit */
-#define VIRTIO_BLK_CONFIG_SECTORS_MAX	24 /* 32bit */
 
 /* Feature bits */
 #define VIRTIO_BLK_F_BARRIER	(10)
@@ -72,7 +71,6 @@ __KERNEL_RCSID(0, $NetBSD: ld_virtio.c,
 #define VIRTIO_BLK_F_BLK_SIZE	(16)
 #define VIRTIO_BLK_F_SCSI	(17)
 #define VIRTIO_BLK_F_FLUSH	(19)
-#define VIRTIO_BLK_F_SECTOR_MAX	(110)
 
 /* Command */
 #define VIRTIO_BLK_T_IN		0
@@ -194,7 +192,7 @@ ld_virtio_alloc_reqs(struct ld_virtio_so
 		}
 		r = bus_dmamap_create(sc-sc_virtio-sc_dmat,
   ld-sc_maxxfer,
-  (ld-sc_maxxfer / NBPG) + 1,
+  (ld-sc_maxxfer / NBPG) + 2,
   ld-sc_maxxfer,
   0,
   BUS_DMA_NOWAIT|BUS_DMA_ALLOCNOW,
@@ -262,17 +260,21 @@ ld_virtio_attach(device_t parent, device
 	  VIRTIO_BLK_F_SEG_MAX |
 	  VIRTIO_BLK_F_GEOMETRY |
 	  VIRTIO_BLK_F_RO |
-	  VIRTIO_BLK_F_BLK_SIZE |
-	  VIRTIO_BLK_F_SECTOR_MAX));
+	  VIRTIO_BLK_F_BLK_SIZE));
 	if (features  VIRTIO_BLK_F_RO)
 		sc-sc_readonly = 1;
 	else
 		sc-sc_readonly = 0;
 
+	ld-sc_secsize = 512;
+	if (features  VIRTIO_BLK_F_BLK_SIZE) {
+		ld-sc_secsize = virtio_read_device_config_4(vsc,
+	VIRTIO_BLK_CONFIG_BLK_SIZE);
+	}
 	maxxfersize = MAXPHYS;
-	if (features  VIRTIO_BLK_F_SECTOR_MAX) {
+	if (features  VIRTIO_BLK_F_SEG_MAX) {
 		maxxfersize = virtio_read_device_config_4(vsc,
-	VIRTIO_BLK_CONFIG_SECTORS_MAX)
+	VIRTIO_BLK_CONFIG_SEG_MAX)
 * ld-sc_secsize;
 		if (maxxfersize  MAXPHYS)
 			maxxfersize = MAXPHYS;
@@ -289,11 +291,6 @@ ld_virtio_attach(device_t parent, device
 	ld-sc_dv = self;
 	ld-sc_secperunit = virtio_read_device_config_8(vsc,
 VIRTIO_BLK_CONFIG_CAPACITY);
-	ld-sc_secsize = 512;
-	if (features  VIRTIO_BLK_F_BLK_SIZE) {
-		ld-sc_secsize = virtio_read_device_config_4(vsc,
-	VIRTIO_BLK_CONFIG_BLK_SIZE);
-	}
 	ld-sc_maxxfer = maxxfersize;
 	if (features  VIRTIO_BLK_F_GEOMETRY) {
 		ld-sc_ncylinders = virtio_read_device_config_2(vsc,



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

2011-11-23 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Nov 23 19:41:51 UTC 2011

Modified Files:
src/external/gpl3/gdb/dist/bfd: config.bfd

Log Message:
Add mips64*-netbsd* clauses


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

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

Modified files:

Index: src/external/gpl3/gdb/dist/bfd/config.bfd
diff -u src/external/gpl3/gdb/dist/bfd/config.bfd:1.1.1.1 src/external/gpl3/gdb/dist/bfd/config.bfd:1.2
--- src/external/gpl3/gdb/dist/bfd/config.bfd:1.1.1.1	Sat Sep 24 19:43:57 2011
+++ src/external/gpl3/gdb/dist/bfd/config.bfd	Wed Nov 23 19:41:50 2011
@@ -910,6 +910,16 @@ case ${targ} in
 targ_defvec=ecoff_big_vec
 targ_selvecs=ecoff_little_vec
 ;;
+#ifdef BFD64
+  mips64*el-*-netbsd*)
+targ_defvec=bfd_elf32_ntradlittlemips_vec
+targ_selvecs=bfd_elf64_tradbigmips_vec bfd_elf64_tradlittlemips_vec bfd_elf32_ntradbigmips_vec bfd_elf32_tradlittlemips_vec bfd_elf32_tradbigmips_vec
+;;
+  mips64*-*-netbsd*)
+targ_defvec=bfd_elf32_ntradbigmips_vec
+targ_selvecs=bfd_elf64_tradbigmips_vec bfd_elf64_tradlittlemips_vec bfd_elf32_ntradlittlemips_vec bfd_elf32_tradlittlemips_vec bfd_elf32_tradbigmips_vec
+;;
+#endif
   mips*el-*-netbsd*)
 targ_defvec=bfd_elf32_tradlittlemips_vec
 targ_selvecs=bfd_elf32_tradbigmips_vec bfd_elf64_tradbigmips_vec bfd_elf64_tradlittlemips_vec ecoff_little_vec ecoff_big_vec



CVS commit: src/sys/ufs

2011-11-23 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Wed Nov 23 19:42:10 UTC 2011

Modified Files:
src/sys/ufs/ffs: ffs_inode.c
src/sys/ufs/lfs: lfs_inode.c

Log Message:
If ufs_balloc_range() fails, make sure to call ?fs_truncate() to
reset v_writesize to the right value.
If v_writesize is left larger than the allocated blocks, we may have
the same issue as the one described in
http://mail-index.netbsd.org/tech-kern/2010/02/02/msg007156.html


To generate a diff of this commit:
cvs rdiff -u -r1.107 -r1.108 src/sys/ufs/ffs/ffs_inode.c
cvs rdiff -u -r1.125 -r1.126 src/sys/ufs/lfs/lfs_inode.c

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

Modified files:

Index: src/sys/ufs/ffs/ffs_inode.c
diff -u src/sys/ufs/ffs/ffs_inode.c:1.107 src/sys/ufs/ffs/ffs_inode.c:1.108
--- src/sys/ufs/ffs/ffs_inode.c:1.107	Thu Jun 16 09:21:03 2011
+++ src/sys/ufs/ffs/ffs_inode.c	Wed Nov 23 19:42:10 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: ffs_inode.c,v 1.107 2011/06/16 09:21:03 hannken Exp $	*/
+/*	$NetBSD: ffs_inode.c,v 1.108 2011/11/23 19:42:10 bouyer Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ffs_inode.c,v 1.107 2011/06/16 09:21:03 hannken Exp $);
+__KERNEL_RCSID(0, $NetBSD: ffs_inode.c,v 1.108 2011/11/23 19:42:10 bouyer Exp $);
 
 #if defined(_KERNEL_OPT)
 #include opt_ffs.h
@@ -269,8 +269,11 @@ ffs_truncate(struct vnode *ovp, off_t le
 			uvm_vnp_setwritesize(ovp, eob);
 			error = ufs_balloc_range(ovp, osize, eob - osize,
 			cred, aflag);
-			if (error)
+			if (error) {
+(void) ffs_truncate(ovp, osize,
+ioflag  IO_SYNC, cred);
 return error;
+			}
 			if (ioflag  IO_SYNC) {
 mutex_enter(ovp-v_interlock);
 VOP_PUTPAGES(ovp,

Index: src/sys/ufs/lfs/lfs_inode.c
diff -u src/sys/ufs/lfs/lfs_inode.c:1.125 src/sys/ufs/lfs/lfs_inode.c:1.126
--- src/sys/ufs/lfs/lfs_inode.c:1.125	Mon Jul 11 08:27:40 2011
+++ src/sys/ufs/lfs/lfs_inode.c	Wed Nov 23 19:42:10 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: lfs_inode.c,v 1.125 2011/07/11 08:27:40 hannken Exp $	*/
+/*	$NetBSD: lfs_inode.c,v 1.126 2011/11/23 19:42:10 bouyer Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: lfs_inode.c,v 1.125 2011/07/11 08:27:40 hannken Exp $);
+__KERNEL_RCSID(0, $NetBSD: lfs_inode.c,v 1.126 2011/11/23 19:42:10 bouyer Exp $);
 
 #if defined(_KERNEL_OPT)
 #include opt_quota.h
@@ -276,8 +276,11 @@ lfs_truncate(struct vnode *ovp, off_t le
 uvm_vnp_setwritesize(ovp, eob);
 error = ufs_balloc_range(ovp, osize,
 eob - osize, cred, aflags);
-if (error)
+if (error) {
+	(void) lfs_truncate(ovp, osize,
+		ioflag  IO_SYNC, cred);
 	return error;
+}
 if (ioflag  IO_SYNC) {
 	mutex_enter(ovp-v_interlock);
 	VOP_PUTPAGES(ovp,



CVS commit: src/sys/dev/nor

2011-11-23 Thread Frank Wille
Module Name:src
Committed By:   phx
Date:   Wed Nov 23 21:02:29 UTC 2011

Modified Files:
src/sys/dev/nor: cfi_0002.c

Log Message:
Make it compile without DEBUG option.


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

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

Modified files:

Index: src/sys/dev/nor/cfi_0002.c
diff -u src/sys/dev/nor/cfi_0002.c:1.4 src/sys/dev/nor/cfi_0002.c:1.5
--- src/sys/dev/nor/cfi_0002.c:1.4	Sat Jul 23 06:26:26 2011
+++ src/sys/dev/nor/cfi_0002.c	Wed Nov 23 21:02:28 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: cfi_0002.c,v 1.4 2011/07/23 06:26:26 cliff Exp $	*/
+/*	$NetBSD: cfi_0002.c,v 1.5 2011/11/23 21:02:28 phx Exp $	*/
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -31,7 +31,7 @@
 #include opt_flash.h
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: cfi_0002.c,v 1.4 2011/07/23 06:26:26 cliff Exp $); 
+__KERNEL_RCSID(0, $NetBSD: cfi_0002.c,v 1.5 2011/11/23 21:02:28 phx Exp $); 
 
 #include sys/param.h
 #include sys/systm.h
@@ -335,8 +335,6 @@ cfi_0002_erase_all(device_t self)
 	KASSERT(sc-sc_nor_if != NULL);
 	struct cfi *cfi = (struct cfi * const)sc-sc_nor_if-private;
 	KASSERT(cfi != NULL);
-	struct nor_chip * const chip = sc-sc_chip;
-	KASSERT(chip != NULL);
 
 	CFI_0002_STATS_INC(cfi, erase_all);
 
@@ -364,12 +362,6 @@ cfi_0002_erase_block(device_t self, flas
 	KASSERT(sc-sc_nor_if != NULL);
 	struct cfi *cfi = (struct cfi * const)sc-sc_nor_if-private;
 	KASSERT(cfi != NULL);
-	struct nor_chip * const chip = sc-sc_chip;
-	KASSERT(chip != NULL);
-	KASSERT(chip-nc_block_mask != 0);
-	KASSERT((offset  ~chip-nc_block_mask) == 0);
-	KASSERT(chip-nc_block_size != 0);
-	KASSERT((chip-nc_block_size  ((1  cfi-cfi_portwidth) - 1)) == 0);
 
 	CFI_0002_STATS_INC(cfi, erase_block);
 



CVS commit: src/doc

2011-11-23 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Wed Nov 23 22:57:24 UTC 2011

Modified Files:
src/doc: BRANCHES

Log Message:
terminate ad-audiomp2, add jmcneill-audiomp3


To generate a diff of this commit:
cvs rdiff -u -r1.311 -r1.312 src/doc/BRANCHES

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

Modified files:

Index: src/doc/BRANCHES
diff -u src/doc/BRANCHES:1.311 src/doc/BRANCHES:1.312
--- src/doc/BRANCHES:1.311	Sat Nov  5 14:35:34 2011
+++ src/doc/BRANCHES	Wed Nov 23 22:57:24 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: BRANCHES,v 1.311 2011/11/05 14:35:34 yamt Exp $
+#	$NetBSD: BRANCHES,v 1.312 2011/11/23 22:57:24 jmcneill Exp $
 #
 # This file contains a list of branches that exist in the NetBSD CVS
 # tree and their current state.
@@ -265,9 +265,9 @@ Notes:		Making the audio drivers MP safe
 
 Branch:		ad-audiomp2
 Description:	Add MP locking to the audio drivers
-Status:		Active
+Status:		Terminated
 Start Date:	7 December 2008
-End Date:	
+End Date:	19 November 2011
 Base Tag:	ad-audiomp2-base
 Maintainer:	Andrew Doran a...@netbsd.org
 Scope:		kernel
@@ -819,6 +819,16 @@ Maintainer:	Jared D. McNeill jmcneill@N
 Scope:		kernel
 Notes:		
 
+Branch:		jmcneill-audiomp3
+Description:	Add MP locking to the audio drivers
+Status:		Active
+Start Date:	19 Nov 2011
+End Date:	
+Base Tag:	jmcneill-audiomp3-base
+Maintainer:	Jared D. McNeill jmcne...@netbsd.org
+Scope:		kernel
+Notes:		Resurrect ad-audiomp2, make the audio drivers MP safe.
+
 Branch:		kenh-if-detach
 Description:	Interface detach support.
 Status:		?



CVS commit: src/share/man/man9

2011-11-23 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Wed Nov 23 23:11:56 UTC 2011

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

Log Message:
update audio(9) docs for audiomp changes


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/share/man/man9/audio.9

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

Modified files:

Index: src/share/man/man9/audio.9
diff -u src/share/man/man9/audio.9:1.42 src/share/man/man9/audio.9:1.43
--- src/share/man/man9/audio.9:1.42	Wed Apr 30 13:10:58 2008
+++ src/share/man/man9/audio.9	Wed Nov 23 23:11:56 2011
@@ -1,4 +1,4 @@
-.\	$NetBSD: audio.9,v 1.42 2008/04/30 13:10:58 martin Exp $
+.\	$NetBSD: audio.9,v 1.43 2011/11/23 23:11:56 jmcneill Exp $
 .\
 .\ Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -27,7 +27,7 @@
 .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\ POSSIBILITY OF SUCH DAMAGE.
 .\
-.Dd November 10, 2007
+.Dd November 23, 2011
 .Dt AUDIO 9
 .Os
 .Sh NAME
@@ -87,9 +87,7 @@ struct audio_hw_if {
 	int	(*trigger_input)(void *, void *, void *, int,
 		void (*)(void *), void *, const audio_params_t *);
 	int	(*dev_ioctl)(void *, u_long, void *, int, struct lwp *);
-	int	(*powerstate)(void *, int);
-#define	AUDIOPOWER_ON	1
-#define	AUDIOPOWER_OFF	0
+	void	(*get_locks)(void *, kmutex_t **, kmutex_t **);
 };
 
 typedef struct audio_params {
@@ -505,16 +503,8 @@ optional, is called when an
 .Xr ioctl 2
 is not recognized by the generic audio driver.
 Return 0 on success, otherwise an error code.
-.It Dv int powerstate(void *hdl, int state)
-.Pp
-optional, is called on the first open and last close of the audio
-device.
-.Va state
-may be one of
-.Dv AUDIOPOWER_ON
-or
-.Dv AUDIOPOWER_OFF .
-Returns 0 on success, otherwise an error code.
+.It Dv void get_locks(void *hdl, kmutex_t **intr, kmutex_t **thread)
+Returns the interrupt and thread locks to the common audio layer.
 .El
 .Pp
 The



CVS commit: src/doc

2011-11-23 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Wed Nov 23 23:12:48 UTC 2011

Modified Files:
src/doc: BRANCHES

Log Message:
jmcneill-audiomp3 is done


To generate a diff of this commit:
cvs rdiff -u -r1.312 -r1.313 src/doc/BRANCHES

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

Modified files:

Index: src/doc/BRANCHES
diff -u src/doc/BRANCHES:1.312 src/doc/BRANCHES:1.313
--- src/doc/BRANCHES:1.312	Wed Nov 23 22:57:24 2011
+++ src/doc/BRANCHES	Wed Nov 23 23:12:48 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: BRANCHES,v 1.312 2011/11/23 22:57:24 jmcneill Exp $
+#	$NetBSD: BRANCHES,v 1.313 2011/11/23 23:12:48 jmcneill Exp $
 #
 # This file contains a list of branches that exist in the NetBSD CVS
 # tree and their current state.
@@ -821,9 +821,9 @@ Notes:		
 
 Branch:		jmcneill-audiomp3
 Description:	Add MP locking to the audio drivers
-Status:		Active
+Status:		Terminated; merged before NetBSD 6.0
 Start Date:	19 Nov 2011
-End Date:	
+End Date:	23 Nov 2011
 Base Tag:	jmcneill-audiomp3-base
 Maintainer:	Jared D. McNeill jmcne...@netbsd.org
 Scope:		kernel



CVS commit: src/sys/dev/usb

2011-11-23 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Nov 23 23:50:47 UTC 2011

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

Log Message:
complete the port to audiomp:  take kernel lock in a few places for
USB (like uaudio), kill most of the spl* uses.


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sys/dev/usb/umidi.c

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

Modified files:

Index: src/sys/dev/usb/umidi.c
diff -u src/sys/dev/usb/umidi.c:1.45 src/sys/dev/usb/umidi.c:1.46
--- src/sys/dev/usb/umidi.c:1.45	Wed Nov 23 23:07:36 2011
+++ src/sys/dev/usb/umidi.c	Wed Nov 23 23:50:46 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: umidi.c,v 1.45 2011/11/23 23:07:36 jmcneill Exp $	*/
+/*	$NetBSD: umidi.c,v 1.46 2011/11/23 23:50:46 mrg Exp $	*/
 /*
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: umidi.c,v 1.45 2011/11/23 23:07:36 jmcneill Exp $);
+__KERNEL_RCSID(0, $NetBSD: umidi.c,v 1.46 2011/11/23 23:50:46 mrg Exp $);
 
 #include sys/types.h
 #include sys/param.h
@@ -204,6 +204,7 @@ umidi_attach(device_t parent, device_t s
 	mutex_init(sc-sc_lock, MUTEX_DEFAULT, IPL_NONE);
 	mutex_init(sc-sc_intr_lock, MUTEX_DEFAULT, IPL_USB);
 
+	KERNEL_LOCK(1, curlwp);
 	err = alloc_all_endpoints(sc);
 	if (err!=USBD_NORMAL_COMPLETION) {
 		aprint_error_dev(self,
@@ -236,6 +237,7 @@ umidi_attach(device_t parent, device_t s
 		aprint_error_dev(self,
 		attach_all_mididevs failed. (err=%d)\n, err);
 	}
+	KERNEL_UNLOCK_ONE(curlwp);
 
 #ifdef UMIDI_DEBUG
 	dump_sc(sc);
@@ -291,6 +293,7 @@ umidi_detach(device_t self, int flags)
 
 	DPRINTFN(1,(umidi_detach\n));
 
+	KERNEL_LOCK(1, curlwp);
 	sc-sc_dying = 1;
 	detach_all_mididevs(sc, flags);
 	free_all_mididevs(sc);
@@ -299,6 +302,7 @@ umidi_detach(device_t self, int flags)
 
 	usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, sc-sc_udev,
 			   sc-sc_dev);
+	KERNEL_UNLOCK_ONE(curlwp);
 
 	mutex_destroy(sc-sc_lock);
 	mutex_destroy(sc-sc_intr_lock);
@@ -354,16 +358,13 @@ bad:
 void
 umidi_close(void *addr)
 {
-	int s;
 	struct umidi_mididev *mididev = addr;
 
-	s = splusb();
 	if ((mididev-flags  FWRITE)  mididev-out_jack)
 		close_out_jack(mididev-out_jack);
 	if ((mididev-flags  FREAD)  mididev-in_jack)
 		close_in_jack(mididev-in_jack);
 	mididev-opened = 0;
-	splx(s);
 }
 
 int
@@ -539,7 +540,7 @@ alloc_all_endpoints(struct umidi_softc *
 	} else {
 		err = alloc_all_endpoints_genuine(sc);
 	}
-	if (err!=USBD_NORMAL_COMPLETION)
+	if (err != USBD_NORMAL_COMPLETION)
 		return err;
 
 	ep = sc-sc_endpoints;
@@ -560,8 +561,9 @@ static void
 free_all_endpoints(struct umidi_softc *sc)
 {
 	int i;
+
 	for (i=0; isc-sc_in_num_endpoints+sc-sc_out_num_endpoints; i++)
-	free_pipe(sc-sc_endpoints[i]);
+		free_pipe(sc-sc_endpoints[i]);
 	if (sc-sc_endpoints != NULL)
 		free(sc-sc_endpoints, M_USBDEV);
 	sc-sc_endpoints = sc-sc_out_ep = sc-sc_in_ep = NULL;
@@ -967,14 +969,13 @@ alloc_all_jacks(struct umidi_softc *sc)
 static void
 free_all_jacks(struct umidi_softc *sc)
 {
-	int s;
 
-	s = splaudio();
+	mutex_spin_enter(sc-sc_intr_lock);
 	if (sc-sc_out_jacks) {
 		free(sc-sc_jacks, M_USBDEV);
 		sc-sc_jacks = sc-sc_in_jacks = sc-sc_out_jacks = NULL;
 	}
-	splx(s);
+	mutex_spin_exit(sc-sc_intr_lock);
 }
 
 static usbd_status
@@ -1076,8 +1077,8 @@ static usbd_status
 open_out_jack(struct umidi_jack *jack, void *arg, void (*intr)(void *))
 {
 	struct umidi_endpoint *ep = jack-endpoint;
+	struct umidi_softc *sc = ep-sc;
 	umidi_packet_bufp end;
-	int s;
 	int err;
 
 	if (jack-opened)
@@ -1087,7 +1088,7 @@ open_out_jack(struct umidi_jack *jack, v
 	jack-u.out.intr = intr;
 	jack-midiman_ppkt = NULL;
 	end = ep-buffer + ep-buffer_size / sizeof *ep-buffer;
-	s = splusb();
+	mutex_spin_enter(sc-sc_intr_lock);
 	jack-opened = 1;
 	ep-num_open++;
 	/*
@@ -1101,11 +1102,11 @@ open_out_jack(struct umidi_jack *jack, v
 		if ( err ) {
 			ep-num_open--;
 			jack-opened = 0;
-			splx(s);
+			mutex_spin_exit(sc-sc_intr_lock);
 			return USBD_IOERROR;
 		}
 	}
-	splx(s);
+	mutex_spin_exit(sc-sc_intr_lock);
 
 	return USBD_NORMAL_COMPLETION;
 }
@@ -1137,14 +1138,15 @@ static void
 close_out_jack(struct umidi_jack *jack)
 {
 	struct umidi_endpoint *ep;
-	int s;
+	struct umidi_softc *sc;
 	u_int16_t mask;
 	int err;
 
 	if (jack-opened) {
 		ep = jack-endpoint;
+		sc = ep-sc;
 		mask = 1  (jack-cable_number);
-		s = splusb();
+		mutex_spin_enter(sc-sc_intr_lock);
 		while ( mask  (ep-this_schedule | ep-next_schedule) ) {
 			err = tsleep(ep, PWAIT|PCATCH, umi dr, mstohz(10));
 			if ( err )
@@ -1154,7 +1156,7 @@ close_out_jack(struct umidi_jack *jack)
 		jack-endpoint-num_open--;
 		ep-this_schedule = ~mask;
 		ep-next_schedule = ~mask;
-		splx(s);
+		mutex_spin_exit(sc-sc_intr_lock);
 	}
 }
 
@@ -1428,11 +1430,13 @@ start_output_transfer(struct umidi_endpo
 	length = (ep-next_slot - ep-buffer) * sizeof *ep-buffer;
 	

CVS commit: src/sys/dev

2011-11-23 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Nov 23 23:59:32 UTC 2011

Modified Files:
src/sys/dev: TODO.audiomp

Log Message:
note umidi as done


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/TODO.audiomp

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/TODO.audiomp
diff -u src/sys/dev/TODO.audiomp:1.2 src/sys/dev/TODO.audiomp:1.3
--- src/sys/dev/TODO.audiomp:1.2	Wed Nov 23 23:07:31 2011
+++ src/sys/dev/TODO.audiomp	Wed Nov 23 23:59:32 2011
@@ -55,4 +55,4 @@ dev/sbus/cs4231_sbus.c		done		port-sparc
 dev/sbus/dbri.c			done		port-sparc
 dev/tc/bba.c			done
 dev/usb/uaudio.c		done		port-amd64
-dev/usb/umidi.c
+dev/usb/umidi.c			done



CVS commit: src/external/bsd/openresolv/dist

2011-11-23 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Thu Nov 24 00:37:40 UTC 2011

Modified Files:
src/external/bsd/openresolv/dist: resolvconf.conf.5.in

Log Message:
sync


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
src/external/bsd/openresolv/dist/resolvconf.conf.5.in

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/dist/resolvconf.conf.5.in
diff -u src/external/bsd/openresolv/dist/resolvconf.conf.5.in:1.3 src/external/bsd/openresolv/dist/resolvconf.conf.5.in:1.4
--- src/external/bsd/openresolv/dist/resolvconf.conf.5.in:1.3	Mon Jun 13 11:07:50 2011
+++ src/external/bsd/openresolv/dist/resolvconf.conf.5.in	Thu Nov 24 00:37:40 2011
@@ -22,7 +22,7 @@
 .\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\ SUCH DAMAGE.
 .\
-.Dd April 21, 2011
+.Dd August 11, 2011
 .Dt RESOLVCONF.CONF 5 SMM
 .Os
 .Sh NAME
@@ -96,6 +96,9 @@ A list of libc resolver options, as spec
 When set to YES the latest resolv.conf is written to
 .Sy resolv_conf
 without any alteration.
+.It Sy resolv_conf_sortlist
+A libc resolver sortlist, as specified in
+.Xr resolv.conf 5 .
 .El
 .Sh SUBSCRIBER OPTIONS
 openresolv ships with subscribers for the name servers



CVS commit: src/doc

2011-11-23 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Thu Nov 24 00:40:31 UTC 2011

Modified Files:
src/doc: 3RDPARTY CHANGES

Log Message:
import openresolv-3.4.5


To generate a diff of this commit:
cvs rdiff -u -r1.888 -r1.889 src/doc/3RDPARTY
cvs rdiff -u -r1.1630 -r1.1631 src/doc/CHANGES

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

Modified files:

Index: src/doc/3RDPARTY
diff -u src/doc/3RDPARTY:1.888 src/doc/3RDPARTY:1.889
--- src/doc/3RDPARTY:1.888	Tue Nov 22 09:06:47 2011
+++ src/doc/3RDPARTY	Thu Nov 24 00:40:31 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.888 2011/11/22 09:06:47 wiz Exp $
+#	$NetBSD: 3RDPARTY,v 1.889 2011/11/24 00:40:31 roy Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -761,8 +761,8 @@ Notes:
 Next import will need $ Id removal..
 
 Package:	openresolv
-Version:	3.4.2
-Current Vers:	3.4.2
+Version:	3.4.5
+Current Vers:	3.4.5
 Maintainer:	roy
 Archive Site:	ftp://roy.marples.name/pub/openresolv/
 Home Page:	http://roy.marples.name/projects/openresolv/

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.1630 src/doc/CHANGES:1.1631
--- src/doc/CHANGES:1.1630	Tue Nov 22 15:30:17 2011
+++ src/doc/CHANGES	Thu Nov 24 00:40:31 2011
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1630 $
+# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1631 $
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -1175,3 +1175,4 @@ Changes from NetBSD 5.0 to NetBSD 6.0:
 		support. [tsutsui 2020]
 	arm: Add TLS (thread local storage) support.  [joerg 2018]
 	m68k: Add TLS (thread local storage) support.  [joerg 2022]
+	resolvconf(8): import openresolv-3.4.5 [roy 2024]



CVS commit: src/doc

2011-11-23 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Thu Nov 24 00:56:47 UTC 2011

Modified Files:
src/doc: CHANGES

Log Message:
audio: Audio drivers are now MP-safe.


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

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

Modified files:

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.1631 src/doc/CHANGES:1.1632
--- src/doc/CHANGES:1.1631	Thu Nov 24 00:40:31 2011
+++ src/doc/CHANGES	Thu Nov 24 00:56:46 2011
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1631 $
+# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1632 $
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -1176,3 +1176,4 @@ Changes from NetBSD 5.0 to NetBSD 6.0:
 	arm: Add TLS (thread local storage) support.  [joerg 2018]
 	m68k: Add TLS (thread local storage) support.  [joerg 2022]
 	resolvconf(8): import openresolv-3.4.5 [roy 2024]
+	audio: Audio drivers are now MP-safe. [jmcneill 2023]



CVS commit: src/sys/dev/pad

2011-11-23 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Thu Nov 24 01:11:05 UTC 2011

Modified Files:
src/sys/dev/pad: pad.c

Log Message:
splaudio is no more


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

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

Modified files:

Index: src/sys/dev/pad/pad.c
diff -u src/sys/dev/pad/pad.c:1.17 src/sys/dev/pad/pad.c:1.18
--- src/sys/dev/pad/pad.c:1.17	Wed Nov 23 23:07:33 2011
+++ src/sys/dev/pad/pad.c	Thu Nov 24 01:11:04 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: pad.c,v 1.17 2011/11/23 23:07:33 jmcneill Exp $ */
+/* $NetBSD: pad.c,v 1.18 2011/11/24 01:11:04 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2007 Jared D. McNeill jmcne...@invisible.ca
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pad.c,v 1.17 2011/11/23 23:07:33 jmcneill Exp $);
+__KERNEL_RCSID(0, $NetBSD: pad.c,v 1.18 2011/11/24 01:11:04 jmcneill Exp $);
 
 #include sys/types.h
 #include sys/param.h
@@ -672,9 +672,7 @@ pad_modcmd(modcmd_t cmd, void *arg)
 			return error;
 		}
 
-		s = splaudio();
 		error = config_cfdata_attach(pad_cfdata, 1);
-		splx(s);
 		if (error) {
 			config_cfattach_detach(pad_cd.cd_name, pad_ca);
 			config_cfdriver_detach(pad_cd);



CVS commit: src/sys/kern

2011-11-23 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Nov 24 01:14:19 UTC 2011

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

Log Message:
- don't let arguments in macros have side effects
- nul terminate properly


To generate a diff of this commit:
cvs rdiff -u -r1.146 -r1.147 src/sys/kern/subr_prf.c

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

Modified files:

Index: src/sys/kern/subr_prf.c
diff -u src/sys/kern/subr_prf.c:1.146 src/sys/kern/subr_prf.c:1.147
--- src/sys/kern/subr_prf.c:1.146	Tue Nov 22 16:25:04 2011
+++ src/sys/kern/subr_prf.c	Wed Nov 23 20:14:19 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr_prf.c,v 1.146 2011/11/22 21:25:04 christos Exp $	*/
+/*	$NetBSD: subr_prf.c,v 1.147 2011/11/24 01:14:19 christos Exp $	*/
 
 /*-
  * Copyright (c) 1986, 1988, 1991, 1993
@@ -37,7 +37,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: subr_prf.c,v 1.146 2011/11/22 21:25:04 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: subr_prf.c,v 1.147 2011/11/24 01:14:19 christos Exp $);
 
 #include opt_ddb.h
 #include opt_ipkdb.h
@@ -1079,10 +1079,10 @@ vsnprintf(char *bf, size_t size, const c
 	retval = kprintf(fmt, TOBUFONLY, p, bf, ap);
 	if (bf  size  0) {
 		/* nul terminate */
-		if (p  bf + size)
-			*p = '\0';
+		if (size = retval)
+			bf[size - 1] = '\0';
 		else
-			*--p = '\0';
+			bf[retval] = '\0';
 	}
 	return retval;
 }
@@ -1205,9 +1205,9 @@ kprintf(const char *fmt0, int oflags, vo
 	 * Scan the format for conversions (`%' character).
 	 */
 	for (;;) {
-		while (*fmt != '%'  *fmt) {
+		for (; *fmt != '%'  *fmt; fmt++) {
 			ret++;
-			KPRINTF_PUTCHAR(*fmt++);
+			KPRINTF_PUTCHAR(*fmt);
 		}
 		if (*fmt == 0)
 			goto done;
@@ -1520,8 +1520,8 @@ number:			if ((dprec = prec) = 0)
 			KPRINTF_PUTCHAR('0');
 
 		/* the string or number proper */
-		while (size--)
-			KPRINTF_PUTCHAR(*cp++);
+		for (; size--; cp++)
+			KPRINTF_PUTCHAR(*cp);
 		/* left-adjusting padding (always blank) */
 		if (flags  LADJUST) {
 			n = width - realsz;



CVS commit: src/sys/kern

2011-11-23 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Nov 24 01:45:39 UTC 2011

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

Log Message:
- fixed signed/unsigned comparison
- don't write/increment sbuf if NULL


To generate a diff of this commit:
cvs rdiff -u -r1.147 -r1.148 src/sys/kern/subr_prf.c

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

Modified files:

Index: src/sys/kern/subr_prf.c
diff -u src/sys/kern/subr_prf.c:1.147 src/sys/kern/subr_prf.c:1.148
--- src/sys/kern/subr_prf.c:1.147	Wed Nov 23 20:14:19 2011
+++ src/sys/kern/subr_prf.c	Wed Nov 23 20:45:39 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr_prf.c,v 1.147 2011/11/24 01:14:19 christos Exp $	*/
+/*	$NetBSD: subr_prf.c,v 1.148 2011/11/24 01:45:39 christos Exp $	*/
 
 /*-
  * Copyright (c) 1986, 1988, 1991, 1993
@@ -37,7 +37,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: subr_prf.c,v 1.147 2011/11/24 01:14:19 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: subr_prf.c,v 1.148 2011/11/24 01:45:39 christos Exp $);
 
 #include opt_ddb.h
 #include opt_ipkdb.h
@@ -1079,7 +1079,7 @@ vsnprintf(char *bf, size_t size, const c
 	retval = kprintf(fmt, TOBUFONLY, p, bf, ap);
 	if (bf  size  0) {
 		/* nul terminate */
-		if (size = retval)
+		if (size = (size_t)retval)
 			bf[size - 1] = '\0';
 		else
 			bf[retval] = '\0';
@@ -1142,10 +1142,8 @@ vsnprintf(char *bf, size_t size, const c
 
 #define KPRINTF_PUTCHAR(C) {		\
 	if (oflags == TOBUFONLY) {	\
-		if ((vp == NULL) || (sbuf  tailp)) 			\
+		if (sbuf  ((vp == NULL) || (sbuf  tailp))) 		\
 			*sbuf++ = (C);	\
-		else			\
-			sbuf++;		\
 	} else {			\
 		putchar((C), oflags, vp);\
 	}\



CVS commit: src/tests/kernel

2011-11-23 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Nov 24 01:46:40 UTC 2011

Modified Files:
src/tests/kernel: Makefile
Added Files:
src/tests/kernel: gen_t_subr_prf

Log Message:
Add a test for the kernel snprintf.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/tests/kernel/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/kernel/gen_t_subr_prf

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

Modified files:

Index: src/tests/kernel/Makefile
diff -u src/tests/kernel/Makefile:1.21 src/tests/kernel/Makefile:1.22
--- src/tests/kernel/Makefile:1.21	Sat Oct 15 03:00:49 2011
+++ src/tests/kernel/Makefile	Wed Nov 23 20:46:40 2011
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.21 2011/10/15 07:00:49 jruoho Exp $
+# $NetBSD: Makefile,v 1.22 2011/11/24 01:46:40 christos Exp $
 
 NOMAN=		# defined
 
@@ -14,6 +14,7 @@ TESTS_C+=	t_pty
 TESTS_C+=	t_rnd
 TESTS_C+=	t_extattrctl
 TESTS_C+=	t_filedesc
+TESTS_C+=	t_subr_prf
 
 TESTS_SH=	t_umount
 TESTS_SH+=	t_ps_strings
@@ -23,7 +24,7 @@ PROGS=		h_ps_strings1
 PROGS+=		h_ps_strings2
 
 LDADD.t_rnd+=  -lrumpvfs -lrumpdev_rnd -lrumpdev -lrump -lrumpuser -lpthread
-LDADD.t_filedesc+=  -lrumpvfs -lrumpdev_rnd -lrumpdev -lrump -lrumpuser -lpthread
+LDADD.t_filedesc+=  ${LDADD.t_rnd}
 LDADD.t_extattrctl+= -lrumpvfs -lrump -lrumpuser -lpthread
 
 .PATH:			${NETBSDSRCDIR}/sys/kern
@@ -32,4 +33,9 @@ SRCS.t_extent=		t_extent.c subr_extent.c
 CPPFLAGS.t_extent.c=	-D_EXTENT_TESTING -D__POOL_EXPOSE
 CPPFLAGS.subr_extent.c=	-D_EXTENT_TESTING -D__POOL_EXPOSE
 
+t_subr_prf.c: gen_t_subr_prf ${NETBSDSRCDIR}/sys/kern/subr_prf.c
+	${HOST_SH} ${.ALLSRC} ${.TARGET}
+
+CLEANFILES+=	t_subr_prf.c
+
 .include bsd.test.mk

Added files:

Index: src/tests/kernel/gen_t_subr_prf
diff -u /dev/null src/tests/kernel/gen_t_subr_prf:1.1
--- /dev/null	Wed Nov 23 20:46:41 2011
+++ src/tests/kernel/gen_t_subr_prf	Wed Nov 23 20:46:40 2011
@@ -0,0 +1,118 @@
+#!/bin/sh
+
+cat  _EOF  $2
+#include sys/types.h
+#include stdio.h
+#include stdarg.h
+#include stdint.h
+#include string.h
+
+#include atf-c.h
+
+#define KPRINTF_BUFSIZE 1024
+#undef putchar
+#define putchar xputchar
+static int putchar(char c, int foo, void *b)
+{
+	return fputc(c, stderr);
+}
+
+#define TOBUFONLY 1
+static const char HEXDIGITS[] = 0123456789ABCDEF;
+static const char hexdigits[] = 0123456789abcdef;
+
+typedef int device_t;
+
+#define device_xname(a) 
+int kprintf(const char *, int, void *, char *, va_list);
+void device_printf(device_t, const char *, ...);
+
+static void
+empty(void)
+{
+}
+
+static void (*v_flush)(void) = empty;
+
+ATF_TC(snprintf_print);
+ATF_TC_HEAD(snprintf_print, tc)
+{
+atf_tc_set_md_var(tc, descr, checks snprintf print);
+}
+ 
+ATF_TC_BODY(snprintf_print, tc)
+{
+	char buf[10];
+	int i;
+
+	memset(buf, 'x', sizeof(buf));
+	i = snprintf(buf, sizeof(buf), number %d, 10);
+	ATF_CHECK_EQ(i, 9);
+	ATF_CHECK_STREQ(buf, number 10);
+}
+
+ATF_TC(snprintf_print_overflow);
+ATF_TC_HEAD(snprintf_print_overflow, tc)
+{
+atf_tc_set_md_var(tc, descr, checks snprintf print with overflow);
+}
+ 
+ATF_TC_BODY(snprintf_print_overflow, tc)
+{
+	char buf[10];
+	int i;
+
+	memset(buf, 'x', sizeof(buf));
+	i = snprintf(buf, sizeof(buf), fjsdfsdjfsdf %d\n, 10);
+	ATF_CHECK_EQ(i, 16);
+	ATF_CHECK_STREQ(buf, fjsdfsdjf);
+}
+
+ATF_TC(snprintf_count);
+ATF_TC_HEAD(snprintf_count, tc)
+{
+atf_tc_set_md_var(tc, descr, checks snprintf count);
+}
+ 
+ATF_TC_BODY(snprintf_count, tc)
+{
+	int i;
+	
+	i = snprintf(NULL, 20, number %d, 10);
+	ATF_CHECK_EQ(i, 9);
+}
+
+ATF_TC(snprintf_count_overflow);
+ATF_TC_HEAD(snprintf_count_overflow, tc)
+{
+atf_tc_set_md_var(tc, descr, checks snprintf count with overflow);
+}
+ 
+ATF_TC_BODY(snprintf_count_overflow, tc)
+{
+	int i;
+
+	i = snprintf(NULL, 10, fjsdfsdjfsdf %d\n, 10);
+	ATF_CHECK_EQ(i, 16);
+}
+
+ATF_TP_ADD_TCS(tp)
+{
+ATF_TP_ADD_TC(tp, snprintf_print);
+ATF_TP_ADD_TC(tp, snprintf_print_overflow);
+ATF_TP_ADD_TC(tp, snprintf_count);
+ATF_TP_ADD_TC(tp, snprintf_count_overflow);
+
+return atf_no_error();
+}
+_EOF
+
+awk '
+/^snprintf\(/ {
+	print prevline
+	out = 1
+}
+{
+	if (out) print
+	else prevline = $0
+}' $1 $2



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

2011-11-23 Thread Jean-Yves Migeon
Module Name:src
Committed By:   jym
Date:   Thu Nov 24 01:47:18 UTC 2011

Modified Files:
src/sys/arch/xen/xen: xbdback_xenbus.c

Log Message:
Deep rework of the xbdback(4) driver; it now uses a thread per instance
instead of continuations directly from shm callbacks or interrupt
handlers. The whole CPS design remains but is adapted to cope with
a thread model.

This patch allows scheduling away I/O requests of domains that behave
abnormally, or even destroy them if there is a need to (without thrashing
dom0 with lots of error messages at IPL_BIO).

I took this opportunity to make the driver MPSAFE, so multiple instances
can run concurrently. Moved from home-grown pool(9) queues to
pool_cache(9), and rework the callback mechanism so that it delegates
I/O processing to thread instead of handling it itself through the
continuation trampoline.

This one fixes the potential DoS many have seen in a dom0 when trying to
suspend a NetBSD domU with a corrupted I/O ring.

Benchmarks (build.sh release runs and bonnie++) do not show any
performance regression, the new driver is on-par with the old one.

ok bouyer@.


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/sys/arch/xen/xen/xbdback_xenbus.c

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

Modified files:

Index: src/sys/arch/xen/xen/xbdback_xenbus.c
diff -u src/sys/arch/xen/xen/xbdback_xenbus.c:1.51 src/sys/arch/xen/xen/xbdback_xenbus.c:1.52
--- src/sys/arch/xen/xen/xbdback_xenbus.c:1.51	Mon Nov 14 21:34:50 2011
+++ src/sys/arch/xen/xen/xbdback_xenbus.c	Thu Nov 24 01:47:18 2011
@@ -1,4 +1,4 @@
-/*  $NetBSD: xbdback_xenbus.c,v 1.51 2011/11/14 21:34:50 christos Exp $  */
+/*  $NetBSD: xbdback_xenbus.c,v 1.52 2011/11/24 01:47:18 jym Exp $  */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -26,23 +26,27 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: xbdback_xenbus.c,v 1.51 2011/11/14 21:34:50 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: xbdback_xenbus.c,v 1.52 2011/11/24 01:47:18 jym Exp $);
 
-#include sys/types.h
-#include sys/param.h
-#include sys/systm.h
-#include sys/malloc.h
-#include sys/queue.h
-#include sys/kernel.h
 #include sys/atomic.h
+#include sys/buf.h
+#include sys/condvar.h
 #include sys/conf.h
 #include sys/disk.h
 #include sys/device.h
 #include sys/fcntl.h
-#include sys/vnode.h
 #include sys/kauth.h
-#include sys/workqueue.h
-#include sys/buf.h
+#include sys/kernel.h
+#include sys/kmem.h
+#include sys/kthread.h
+#include sys/malloc.h
+#include sys/mutex.h
+#include sys/param.h
+#include sys/queue.h
+#include sys/systm.h
+#include sys/time.h
+#include sys/types.h
+#include sys/vnode.h
 
 #include xen/xen.h
 #include xen/xen_shm.h
@@ -75,39 +79,54 @@ struct xbdback_io;
 struct xbdback_fragment;
 struct xbdback_instance;
 
-/* state of a xbdback instance */
-typedef enum {CONNECTED, DISCONNECTING, DISCONNECTED} xbdback_state_t;
+/*
+ * status of a xbdback instance:
+ * WAITING: xbdback instance is connected, waiting for requests
+ * RUN: xbdi thread must be woken up, I/Os have to be processed
+ * DISCONNECTING: the instance is closing, no more I/Os can be scheduled
+ * DISCONNECTED: no I/Os, no ring, the thread should terminate.
+ */
+typedef enum {WAITING, RUN, DISCONNECTING, DISCONNECTED} xbdback_state_t;
 
 /*
- * Since there are a variety of conditions that can block our I/O
- * processing, which isn't allowed to suspend its thread's execution,
- * such things will be done in a sort of continuation-passing style.
- * 
- * Return value is NULL to indicate that execution has blocked; if
- * it's finished, set xbdi-xbdi_cont (see below) to NULL and the return
- * doesn't matter.  Otherwise it's passed as the second parameter to
- * the new value of xbdi-xbdi_cont.
+ * Each xbdback instance is managed by a single thread that handles all
+ * the I/O processing. As there are a variety of conditions that can block,
+ * everything will be done in a sort of continuation-passing style.
+ *
+ * When the execution has to block to delay processing, for example to
+ * allow system to recover because of memory shortage (via shared memory
+ * callback), the return value of a continuation can be set to NULL. In that
+ * case, the thread will go back to sleeping and wait for the proper
+ * condition before it starts processing requests again from where it left.
+ * Continuation state is stored in the xbdback instance (xbdi_cont and
+ * xbdi_cont_aux), and should only be manipulated by the instance thread.
  *
+ * As xbdback(4) has to handle different sort of asynchronous events (Xen
+ * event channels, biointr() soft interrupts, xenbus commands), the xbdi_lock
+ * mutex is used to protect specific elements of the xbdback instance from
+ * concurrent access: thread status and ring access (when pushing responses).
+ * 
  * Here's how the call graph is supposed to be for a single I/O:
+ *
  * xbdback_co_main()
  *|
- *| 

CVS commit: src/sys/dev/pad

2011-11-23 Thread Alistair G. Crooks
Module Name:src
Committed By:   agc
Date:   Thu Nov 24 01:54:08 UTC 2011

Modified Files:
src/sys/dev/pad: pad.c

Log Message:
get rid of a variable which is no longer used after the demise of splaudio


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

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

Modified files:

Index: src/sys/dev/pad/pad.c
diff -u src/sys/dev/pad/pad.c:1.18 src/sys/dev/pad/pad.c:1.19
--- src/sys/dev/pad/pad.c:1.18	Thu Nov 24 01:11:04 2011
+++ src/sys/dev/pad/pad.c	Thu Nov 24 01:54:08 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: pad.c,v 1.18 2011/11/24 01:11:04 jmcneill Exp $ */
+/* $NetBSD: pad.c,v 1.19 2011/11/24 01:54:08 agc Exp $ */
 
 /*-
  * Copyright (c) 2007 Jared D. McNeill jmcne...@invisible.ca
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pad.c,v 1.18 2011/11/24 01:11:04 jmcneill Exp $);
+__KERNEL_RCSID(0, $NetBSD: pad.c,v 1.19 2011/11/24 01:54:08 agc Exp $);
 
 #include sys/types.h
 #include sys/param.h
@@ -654,7 +654,7 @@ static int
 pad_modcmd(modcmd_t cmd, void *arg)
 {
 	devmajor_t cmajor = NODEVMAJOR, bmajor = NODEVMAJOR;
-	int error, s;
+	int error;
 
 	switch (cmd) {
 	case MODULE_CMD_INIT:



CVS commit: src/lib/libpuffs

2011-11-23 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Thu Nov 24 01:55:33 UTC 2011

Modified Files:
src/lib/libpuffs: null.c

Log Message:
Remove pnode of overwritten file.

When puffs_null_node_rename() overwrites existing file, its pnode
must�be removed, because src pnode already represents this file.

From Evgeniy Ivanov lolkaanti...@gmail.com


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/lib/libpuffs/null.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/libpuffs/null.c
diff -u src/lib/libpuffs/null.c:1.30 src/lib/libpuffs/null.c:1.31
--- src/lib/libpuffs/null.c:1.30	Mon Jun 27 12:06:19 2011
+++ src/lib/libpuffs/null.c	Thu Nov 24 01:55:33 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: null.c,v 1.30 2011/06/27 12:06:19 manu Exp $	*/
+/*	$NetBSD: null.c,v 1.31 2011/11/24 01:55:33 manu Exp $	*/
 
 /*
  * Copyright (c) 2007  Antti Kantee.  All Rights Reserved.
@@ -27,7 +27,7 @@
 
 #include sys/cdefs.h
 #if !defined(lint)
-__RCSID($NetBSD: null.c,v 1.30 2011/06/27 12:06:19 manu Exp $);
+__RCSID($NetBSD: null.c,v 1.31 2011/11/24 01:55:33 manu Exp $);
 #endif /* !lint */
 
 /*
@@ -480,10 +480,14 @@ puffs_null_node_rename(struct puffs_user
 	puffs_cookie_t targ_dir, puffs_cookie_t targ,
 	const struct puffs_cn *pcn_targ)
 {
+	struct puffs_node *pn_targ = targ;
 
 	if (rename(PCNPATH(pcn_src), PCNPATH(pcn_targ)) == -1)
 		return errno;
 
+if (pn_targ)
+		puffs_pn_remove(pn_targ);
+
 	return 0;
 }
 



CVS commit: src/lib/librefuse

2011-11-23 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Thu Nov 24 01:56:22 UTC 2011

Modified Files:
src/lib/librefuse: refuse.c

Log Message:
Set eofflag in puffs_fuse_node_readdir() from librefuse.

From Evgeniy Ivanov lolkaanti...@gmail.com


To generate a diff of this commit:
cvs rdiff -u -r1.94 -r1.95 src/lib/librefuse/refuse.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/librefuse/refuse.c
diff -u src/lib/librefuse/refuse.c:1.94 src/lib/librefuse/refuse.c:1.95
--- src/lib/librefuse/refuse.c:1.94	Sat Jul  9 17:16:46 2011
+++ src/lib/librefuse/refuse.c	Thu Nov 24 01:56:22 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: refuse.c,v 1.94 2011/07/09 17:16:46 tron Exp $	*/
+/*	$NetBSD: refuse.c,v 1.95 2011/11/24 01:56:22 manu Exp $	*/
 
 /*
  * Copyright © 2007 Alistair Crooks.  All rights reserved.
@@ -31,7 +31,7 @@
 
 #include sys/cdefs.h
 #if !defined(lint)
-__RCSID($NetBSD: refuse.c,v 1.94 2011/07/09 17:16:46 tron Exp $);
+__RCSID($NetBSD: refuse.c,v 1.95 2011/11/24 01:56:22 manu Exp $);
 #endif /* !lint */
 
 #include sys/types.h
@@ -1139,6 +1139,9 @@ puffs_fuse_node_readdir(struct puffs_use
 			return -ret;
 	}
 
+/* Both op.readdir and op.getdir read full directory */
+*eofflag = 1;
+
 	/* now, stuff results into the kernel buffers */
 	while (*readoff  (off_t)(dirh-bufsize - dirh-reslen)) {
 		/*LINTED*/



CVS commit: src/lib/libpuffs

2011-11-23 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Thu Nov 24 01:58:52 UTC 2011

Modified Files:
src/lib/libpuffs: dispatcher.c null.c

Log Message:
Remove files specified in pcn.

When remove files using name from pnode, another link on this file
can be unlinked. E.g. touch 1; ln 1 2; rm 2 will remove file named
1. Thus puffs_null_node_remove should remove directory entry which
name is provided by pcn (as said in puffs_ops.3). Caller should
provide appropriately initialized pcn.

From Evgeniy Ivanov lolkaanti...@gmail.com


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/lib/libpuffs/dispatcher.c
cvs rdiff -u -r1.31 -r1.32 src/lib/libpuffs/null.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/libpuffs/dispatcher.c
diff -u src/lib/libpuffs/dispatcher.c:1.36 src/lib/libpuffs/dispatcher.c:1.37
--- src/lib/libpuffs/dispatcher.c:1.36	Mon Jul  4 08:07:30 2011
+++ src/lib/libpuffs/dispatcher.c	Thu Nov 24 01:58:52 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: dispatcher.c,v 1.36 2011/07/04 08:07:30 manu Exp $	*/
+/*	$NetBSD: dispatcher.c,v 1.37 2011/11/24 01:58:52 manu Exp $	*/
 
 /*
  * Copyright (c) 2006, 2007, 2008 Antti Kantee.  All Rights Reserved.
@@ -31,7 +31,7 @@
 
 #include sys/cdefs.h
 #if !defined(lint)
-__RCSID($NetBSD: dispatcher.c,v 1.36 2011/07/04 08:07:30 manu Exp $);
+__RCSID($NetBSD: dispatcher.c,v 1.37 2011/11/24 01:58:52 manu Exp $);
 #endif /* !lint */
 
 #include sys/types.h
@@ -512,8 +512,17 @@ dispatch(struct puffs_cc *pcc)
 			pcn.pcn_pkcnp = auxt-pvnr_cn;
 			PUFFS_KCREDTOCRED(pcn.pcn_cred, auxt-pvnr_cn_cred);
 
+			if (buildpath) {
+error = puffs_path_pcnbuild(pu, pcn, opcookie);
+if (error)
+	break;
+			}
+
 			error = pops-puffs_node_remove(pu,
 			opcookie, auxt-pvnr_cookie_targ, pcn);
+
+			pu-pu_pathfree(pu, pcn.pcn_po_full);
+
 			break;
 		}
 
@@ -661,8 +670,17 @@ dispatch(struct puffs_cc *pcc)
 			pcn.pcn_pkcnp = auxt-pvnr_cn;
 			PUFFS_KCREDTOCRED(pcn.pcn_cred, auxt-pvnr_cn_cred);
 
+			if (buildpath) {
+error = puffs_path_pcnbuild(pu, pcn, opcookie);
+if (error)
+	break;
+			}
+
 			error = pops-puffs_node_rmdir(pu,
 			opcookie, auxt-pvnr_cookie_targ, pcn);
+
+			pu-pu_pathfree(pu, pcn.pcn_po_full);
+
 			break;
 		}
 

Index: src/lib/libpuffs/null.c
diff -u src/lib/libpuffs/null.c:1.31 src/lib/libpuffs/null.c:1.32
--- src/lib/libpuffs/null.c:1.31	Thu Nov 24 01:55:33 2011
+++ src/lib/libpuffs/null.c	Thu Nov 24 01:58:52 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: null.c,v 1.31 2011/11/24 01:55:33 manu Exp $	*/
+/*	$NetBSD: null.c,v 1.32 2011/11/24 01:58:52 manu Exp $	*/
 
 /*
  * Copyright (c) 2007  Antti Kantee.  All Rights Reserved.
@@ -27,7 +27,7 @@
 
 #include sys/cdefs.h
 #if !defined(lint)
-__RCSID($NetBSD: null.c,v 1.31 2011/11/24 01:55:33 manu Exp $);
+__RCSID($NetBSD: null.c,v 1.32 2011/11/24 01:58:52 manu Exp $);
 #endif /* !lint */
 
 /*
@@ -453,7 +453,7 @@ puffs_null_node_remove(struct puffs_user
 {
 	struct puffs_node *pn_targ = targ;
 
-	if (unlink(PNPATH(pn_targ)) == -1)
+	if (unlink(PCNPATH(pcn)) == -1)
 		return errno;
 	puffs_pn_remove(pn_targ);
 
@@ -515,7 +515,7 @@ puffs_null_node_rmdir(struct puffs_userm
 {
 	struct puffs_node *pn_targ = targ;
 
-	if (rmdir(PNPATH(pn_targ)) == -1)
+	if (rmdir(PCNPATH(pcn)) == -1)
 		return errno;
 	puffs_pn_remove(pn_targ);
 



CVS commit: src/lib/libpuffs

2011-11-23 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Thu Nov 24 01:59:26 UTC 2011

Modified Files:
src/lib/libpuffs: puffs.3

Log Message:
Documentation fix

Evgeniy Ivanov lolkaanti...@gmail.com


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/lib/libpuffs/puffs.3

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

Modified files:

Index: src/lib/libpuffs/puffs.3
diff -u src/lib/libpuffs/puffs.3:1.47 src/lib/libpuffs/puffs.3:1.48
--- src/lib/libpuffs/puffs.3:1.47	Tue Jan 12 18:42:38 2010
+++ src/lib/libpuffs/puffs.3	Thu Nov 24 01:59:25 2011
@@ -1,4 +1,4 @@
-.\	$NetBSD: puffs.3,v 1.47 2010/01/12 18:42:38 pooka Exp $
+.\	$NetBSD: puffs.3,v 1.48 2011/11/24 01:59:25 manu Exp $
 .\
 .\ Copyright (c) 2006, 2007, 2008 Antti Kantee.  All rights reserved.
 .\
@@ -215,9 +215,9 @@ asked to resolve can be found from there
 .It Dv PUFFS_FLAG_BUILDPATH
 The framework will build a complete path name, which is supplied
 with each operation and can be found from the
-.Va pn_po.po_full_pcn
+.Va pcn_po_full.po_path
 field in a
-.Vt struct puffs_node .
+.Vt struct puffs_cn .
 The option assumes that the framework can map a cookie to a
 .Vt struct puffs_node .
 See



CVS commit: src/sys/dev

2011-11-23 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Thu Nov 24 02:54:32 UTC 2011

Modified Files:
src/sys/dev: midi.c

Log Message:
set hwif_softc around midi_attach()s call to -getinfo(), like the old
code, so that midi_register_hw_if_ext() works.  add a mutex for this
to avoid multiple midi_attach()s fighting over it.

XXX: this is an ugly interface


To generate a diff of this commit:
cvs rdiff -u -r1.73 -r1.74 src/sys/dev/midi.c

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

Modified files:

Index: src/sys/dev/midi.c
diff -u src/sys/dev/midi.c:1.73 src/sys/dev/midi.c:1.74
--- src/sys/dev/midi.c:1.73	Wed Nov 23 23:07:31 2011
+++ src/sys/dev/midi.c	Thu Nov 24 02:54:32 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: midi.c,v 1.73 2011/11/23 23:07:31 jmcneill Exp $	*/
+/*	$NetBSD: midi.c,v 1.74 2011/11/24 02:54:32 mrg Exp $	*/
 
 /*
  * Copyright (c) 1998, 2008 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: midi.c,v 1.73 2011/11/23 23:07:31 jmcneill Exp $);
+__KERNEL_RCSID(0, $NetBSD: midi.c,v 1.74 2011/11/24 02:54:32 mrg Exp $);
 
 #include midi.h
 #include sequencer.h
@@ -81,6 +81,7 @@ int	mididebug = 0;
 #endif
 
 static	struct midi_softc *hwif_softc = NULL;
+static	kmutex_t hwif_softc_lock;
 
 static void	midi_in(void *, int);
 static void	midi_out(void *);
@@ -242,6 +243,12 @@ midi_attach(struct midi_softc *sc, devic
 {
 	struct midi_info mi;
 	kmutex_t *dummy;
+	static int first = 1;
+
+	if (first) {
+		mutex_init(hwif_softc_lock, MUTEX_DEFAULT, IPL_NONE);
+		first = 0;
+	}
 
 	sc-hw_if-get_locks(sc-hw_hdl, sc-lock, dummy);
 
@@ -260,9 +267,13 @@ midi_attach(struct midi_softc *sc, devic
 	sc-isopen = 0;
 	sc-sc_dev = parent;
 
+	mutex_enter(hwif_softc_lock);
 	mutex_enter(sc-lock);
+	hwif_softc = sc;
 	sc-hw_if-getinfo(sc-hw_hdl, mi);
+	hwif_softc = NULL;
 	mutex_exit(sc-lock);
+	mutex_exit(hwif_softc_lock);
 
 	sc-props = mi.props;
 



CVS commit: src/sys/dev

2011-11-23 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Thu Nov 24 02:56:34 UTC 2011

Modified Files:
src/sys/dev: TODO.audiomp

Log Message:
add midi_pcppi.c to the list.  sort.  midi @ pcppi now works.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/TODO.audiomp

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/TODO.audiomp
diff -u src/sys/dev/TODO.audiomp:1.3 src/sys/dev/TODO.audiomp:1.4
--- src/sys/dev/TODO.audiomp:1.3	Wed Nov 23 23:59:32 2011
+++ src/sys/dev/TODO.audiomp	Thu Nov 24 02:56:34 2011
@@ -4,7 +4,7 @@ arch/amiga/dev/aucc.c		done
 arch/amiga/dev/repulse.c	done
 arch/amiga/dev/toccata.c	done
 arch/arm/iomd/vidcaudio.c	done
-arcm/arm/xscale/pxa2x0_ac97.c	done
+arch/arm/xscale/pxa2x0_ac97.c	done
 arch/dreamcast/dev/g2/aica.c	done
 arch/hp700/gsc/harmony.c	done
 arch/hpcmips/vr/vraiu.c		done
@@ -25,6 +25,7 @@ dev/ic/tms320av110.c		done
 dev/isa/aria.c			done
 dev/isa/ess.c			done		port-shark
 dev/isa/gus.c			done
+dev/isa/midi_pcppi.c		done		port-amd64
 dev/isa/pas.c			done
 dev/isa/sb.c			done		port-i386
 dev/isa/wss.c			done		port-i386
@@ -47,10 +48,10 @@ dev/pci/esm.c			done
 dev/pci/eso.c			done
 dev/pci/fms.c			done
 dev/pci/gcscaudio.c		done
+dev/pci/hdaudio/hdafg.c		done		port-i386, port-amd64
 dev/pci/neo.c			done
 dev/pci/sv.c			done
 dev/pci/yds.c			done
-dev/pci/hdaudio/hdafg.c		done		port-i386, port-amd64
 dev/sbus/cs4231_sbus.c		done		port-sparc, port-sparc64
 dev/sbus/dbri.c			done		port-sparc
 dev/tc/bba.c			done



CVS commit: src/sys/dev/pci

2011-11-23 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Thu Nov 24 03:23:08 UTC 2011

Modified Files:
src/sys/dev/pci: pm2reg.h

Log Message:
add MONITOR_DATA register


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/pci/pm2reg.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/pci/pm2reg.h
diff -u src/sys/dev/pci/pm2reg.h:1.4 src/sys/dev/pci/pm2reg.h:1.5
--- src/sys/dev/pci/pm2reg.h:1.4	Tue Mar 16 21:27:02 2010
+++ src/sys/dev/pci/pm2reg.h	Thu Nov 24 03:23:08 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: pm2reg.h,v 1.4 2010/03/16 21:27:02 macallan Exp $	*/
+/*	$NetBSD: pm2reg.h,v 1.5 2011/11/24 03:23:08 macallan Exp $	*/
 
 /*
  * Copyright (c) 2009 Michael Lorenz
@@ -61,6 +61,20 @@
 #define PM2_SCREEN_BASE		0x3000 /* in 64bit units */
 #define PM2_SCREEN_STRIDE	0x3008 /* in 64bit units */
 
+#define PM2_DISPLAY_DATA	0x3068
+#define		PM2_DD_SDA_IN		0x0001
+#define		PM2_DD_SCL_IN		0x0002
+#define		PM2_DD_SDA_OUT		0x0004
+#define		PM2_DD_SCL_OUT		0x0008
+#define		PM2_DD_LATCHED_DATA	0x0010
+#define		PM2_DD_DATA_VALID	0x0020	/* clear by 1 */
+#define		PM2_DD_START		0x0040	/* START detected */
+#define		PM2_DD_STOP		0x0080	/* STOP detected */
+#define		PM2_DD_INSERT_WAITS	0x0100
+#define		PM2_DD_USE_MONID	0x0200	/* DDC2 otherwise */
+#define		PM2_DD_MONID_IN_MASK	0x1c00
+#define		PM2_DD_MONID_OUT_MASK	0xe000
+
 /* RAMDAC */
 #define PM2_DAC_PAL_WRITE_IDX	0x4000
 #define PM2_DAC_DATA		0x4008



CVS commit: src/sys

2011-11-23 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Thu Nov 24 03:35:59 UTC 2011

Modified Files:
src/sys/arch/amigappc/amigappc: machdep.c
src/sys/arch/arm/iomd: vidcaudio.c
src/sys/arch/arm/xscale: pxa2x0_ac97.c
src/sys/arch/hp700/gsc: harmony.c
src/sys/arch/hpcmips/vr: vraiu.c
src/sys/arch/macppc/dev: awacs.c snapper.c
src/sys/arch/prep/isa: paud_isa.c
src/sys/arch/sgimips/hpc: haltwo.c
src/sys/dev/acpi: mpu_acpi.c
src/sys/dev/ic: interwave.c
src/sys/dev/isa: aria.c ess.c gus.c mpu_isa.c pas.c sb_isa.c wss.c ym.c
src/sys/dev/isapnp: mpu_isapnp.c
src/sys/dev/pci: auacer.c auich.c auixp.c autri.c auvia.c azalia.c
cmpci.c cs4280.c cs4281.c eap.c emuxki.c esa.c esm.c eso.c fms.c
gcscaudio.c neo.c sv.c yds.c
src/sys/dev/pci/hdaudio: hdaudio.c hdaudio_pci.c
src/sys/sys: intr.h

Log Message:
put back IPL_AUDIO and splaudio(), at the request of rmind.  they are
aliases and now we can easily revert audio to IPL_VM if necessary,
without having to revert the whole branch.


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/sys/arch/amigappc/amigappc/machdep.c
cvs rdiff -u -r1.47 -r1.48 src/sys/arch/arm/iomd/vidcaudio.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/arm/xscale/pxa2x0_ac97.c
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/hp700/gsc/harmony.c
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/hpcmips/vr/vraiu.c
cvs rdiff -u -r1.41 -r1.42 src/sys/arch/macppc/dev/awacs.c
cvs rdiff -u -r1.37 -r1.38 src/sys/arch/macppc/dev/snapper.c
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/prep/isa/paud_isa.c
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/sgimips/hpc/haltwo.c
cvs rdiff -u -r1.11 -r1.12 src/sys/dev/acpi/mpu_acpi.c
cvs rdiff -u -r1.35 -r1.36 src/sys/dev/ic/interwave.c
cvs rdiff -u -r1.34 -r1.35 src/sys/dev/isa/aria.c
cvs rdiff -u -r1.79 -r1.80 src/sys/dev/isa/ess.c
cvs rdiff -u -r1.107 -r1.108 src/sys/dev/isa/gus.c
cvs rdiff -u -r1.21 -r1.22 src/sys/dev/isa/mpu_isa.c
cvs rdiff -u -r1.69 -r1.70 src/sys/dev/isa/pas.c
cvs rdiff -u -r1.37 -r1.38 src/sys/dev/isa/sb_isa.c
cvs rdiff -u -r1.70 -r1.71 src/sys/dev/isa/wss.c
cvs rdiff -u -r1.42 -r1.43 src/sys/dev/isa/ym.c
cvs rdiff -u -r1.18 -r1.19 src/sys/dev/isapnp/mpu_isapnp.c
cvs rdiff -u -r1.29 -r1.30 src/sys/dev/pci/auacer.c
cvs rdiff -u -r1.139 -r1.140 src/sys/dev/pci/auich.c
cvs rdiff -u -r1.35 -r1.36 src/sys/dev/pci/auixp.c
cvs rdiff -u -r1.47 -r1.48 src/sys/dev/pci/autri.c
cvs rdiff -u -r1.74 -r1.75 src/sys/dev/pci/auvia.c
cvs rdiff -u -r1.78 -r1.79 src/sys/dev/pci/azalia.c
cvs rdiff -u -r1.43 -r1.44 src/sys/dev/pci/cmpci.c
cvs rdiff -u -r1.62 -r1.63 src/sys/dev/pci/cs4280.c
cvs rdiff -u -r1.45 -r1.46 src/sys/dev/pci/cs4281.c src/sys/dev/pci/sv.c
cvs rdiff -u -r1.93 -r1.94 src/sys/dev/pci/eap.c
cvs rdiff -u -r1.60 -r1.61 src/sys/dev/pci/emuxki.c
cvs rdiff -u -r1.55 -r1.56 src/sys/dev/pci/esa.c
cvs rdiff -u -r1.54 -r1.55 src/sys/dev/pci/esm.c
cvs rdiff -u -r1.58 -r1.59 src/sys/dev/pci/eso.c
cvs rdiff -u -r1.39 -r1.40 src/sys/dev/pci/fms.c
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/pci/gcscaudio.c
cvs rdiff -u -r1.46 -r1.47 src/sys/dev/pci/neo.c
cvs rdiff -u -r1.51 -r1.52 src/sys/dev/pci/yds.c
cvs rdiff -u -r1.17 -r1.18 src/sys/dev/pci/hdaudio/hdaudio.c
cvs rdiff -u -r1.9 -r1.10 src/sys/dev/pci/hdaudio/hdaudio_pci.c
cvs rdiff -u -r1.10 -r1.11 src/sys/sys/intr.h

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

Modified files:

Index: src/sys/arch/amigappc/amigappc/machdep.c
diff -u src/sys/arch/amigappc/amigappc/machdep.c:1.49 src/sys/arch/amigappc/amigappc/machdep.c:1.50
--- src/sys/arch/amigappc/amigappc/machdep.c:1.49	Wed Nov 23 23:07:28 2011
+++ src/sys/arch/amigappc/amigappc/machdep.c	Thu Nov 24 03:35:56 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.49 2011/11/23 23:07:28 jmcneill Exp $ */
+/* $NetBSD: machdep.c,v 1.50 2011/11/24 03:35:56 mrg Exp $ */
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -32,7 +32,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.49 2011/11/23 23:07:28 jmcneill Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.50 2011/11/24 03:35:56 mrg Exp $);
 
 #include sys/param.h
 #include sys/mount.h
@@ -241,7 +241,7 @@ amigappc_install_handlers(void)
 	intr_establish(1, IST_LEVEL, IPL_BIO, lev1_intr, NULL);
 	intr_establish(2, IST_LEVEL, IPL_BIO, ports_intr, isr_ports);
 	intr_establish(3, IST_LEVEL, IPL_TTY, lev3_intr, NULL);
-	intr_establish(4, IST_LEVEL, IPL_SCHED, lev4_intr, NULL);
+	intr_establish(4, IST_LEVEL, IPL_AUDIO, lev4_intr, NULL);
 	intr_establish(5, IST_LEVEL, IPL_SERIAL, lev5_intr, NULL);
 	intr_establish(6, IST_LEVEL, IPL_SERIAL, exter_intr, isr_exter);
 }

Index: src/sys/arch/arm/iomd/vidcaudio.c
diff -u src/sys/arch/arm/iomd/vidcaudio.c:1.47 src/sys/arch/arm/iomd/vidcaudio.c:1.48
--- src/sys/arch/arm/iomd/vidcaudio.c:1.47	Wed Nov 23 23:07:28 2011
+++ src/sys/arch/arm/iomd/vidcaudio.c	Thu Nov 24 

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

2011-11-23 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Nov 24 04:17:12 UTC 2011

Modified Files:
src/sys/arch/mips/mips: cache.c

Log Message:
Add workaround for RMI cpus (not really needed but good for completeness)


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/sys/arch/mips/mips/cache.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/cache.c
diff -u src/sys/arch/mips/mips/cache.c:1.47 src/sys/arch/mips/mips/cache.c:1.48
--- src/sys/arch/mips/mips/cache.c:1.47	Wed Jun  8 17:47:48 2011
+++ src/sys/arch/mips/mips/cache.c	Thu Nov 24 04:17:11 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: cache.c,v 1.47 2011/06/08 17:47:48 bouyer Exp $	*/
+/*	$NetBSD: cache.c,v 1.48 2011/11/24 04:17:11 matt Exp $	*/
 
 /*
  * Copyright 2001, 2002 Wasabi Systems, Inc.
@@ -68,7 +68,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: cache.c,v 1.47 2011/06/08 17:47:48 bouyer Exp $);
+__KERNEL_RCSID(0, $NetBSD: cache.c,v 1.48 2011/11/24 04:17:11 matt Exp $);
 
 #include opt_cputype.h
 #include opt_mips_cache.h
@@ -124,7 +124,7 @@ static void mips_config_cache_prehistori
 static void mips_config_cache_emips(void);
 #endif
 #if (MIPS32 + MIPS32R2 + MIPS64 + MIPS64R2)  0
-static void mips_config_cache_modern(void);
+static void mips_config_cache_modern(uint32_t);
 #endif
 
 #if defined(MIPS1) || defined(MIPS3) || defined(MIPS4)
@@ -184,7 +184,7 @@ mips_config_cache(void)
 #endif
 #if (MIPS32 + MIPS32R2 + MIPS64 + MIPS64R2)  0
 	if (MIPS_PRID_CID(cpu_id) != MIPS_PRID_CID_PREHISTORIC)
-		mips_config_cache_modern();
+		mips_config_cache_modern(cpu_id);
 #endif
 
 #ifdef DIAGNOSTIC
@@ -1011,7 +1011,7 @@ static void cache_noop(void) __unused;
 static void cache_noop(void) {}
 
 static void
-mips_config_cache_modern(void)
+mips_config_cache_modern(uint32_t cpu_id)
 {
 	struct mips_cache_info * const mci = mips_cache_info;
 	struct mips_cache_ops * const mco = mips_cache_ops;
@@ -1193,6 +1193,16 @@ mips_config_cache_modern(void)
 		mci-mci_pdcache_line_size);
 	}
 
+	/*
+	 * RMI (NetLogic/Broadcom) don't support WB (op 6) so we have to make
+	 * do with WBINV (op 5).  This is merely for correctness since because
+	 * the caches are coherent, these routines will become noops in a bit.
+	 */
+	if (MIPS_PRID_CID(cpu_id) == MIPS_PRID_CID_RMI) {
+		mco-mco_pdcache_wb_range = mco-mco_pdcache_wbinv_range;
+		mco-mco_intern_pdcache_wb_range = mco-mco_pdcache_wbinv_range;
+	}
+
 	mipsNN_cache_init(cfg, cfg1);
 
 	if (mips_options.mips_cpu_flags 



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

2011-11-23 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Nov 24 04:17:46 UTC 2011

Modified Files:
src/sys/arch/mips/mips: trap.c

Log Message:
Print out the address in the ktlbmod panic.


To generate a diff of this commit:
cvs rdiff -u -r1.233 -r1.234 src/sys/arch/mips/mips/trap.c

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

Modified files:

Index: src/sys/arch/mips/mips/trap.c
diff -u src/sys/arch/mips/mips/trap.c:1.233 src/sys/arch/mips/mips/trap.c:1.234
--- src/sys/arch/mips/mips/trap.c:1.233	Thu Aug 18 21:04:23 2011
+++ src/sys/arch/mips/mips/trap.c	Thu Nov 24 04:17:46 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: trap.c,v 1.233 2011/08/18 21:04:23 matt Exp $	*/
+/*	$NetBSD: trap.c,v 1.234 2011/11/24 04:17:46 matt Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: trap.c,v 1.233 2011/08/18 21:04:23 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: trap.c,v 1.234 2011/11/24 04:17:46 matt Exp $);
 
 #include opt_cputype.h	/* which mips CPU levels do we support? */
 #include opt_ddb.h
@@ -258,7 +258,8 @@ trap(uint32_t status, uint32_t cause, va
 			pte = kvtopte(vaddr);
 			pt_entry = pte-pt_entry;
 			if (!mips_pg_v(pt_entry)) {
-panic(ktlbmod: invalid pte);
+panic(ktlbmod: %#PRIxVADDR: invalid pte,
+vaddr);
 			}
 			if (pt_entry  mips_pg_ro_bit()) {
 /* write to read only page in the kernel */



CVS commit: src/sys/dev/pci

2011-11-23 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Thu Nov 24 05:51:18 UTC 2011

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

Log Message:
support DDC2, so far only for WSDISPLAYIO_GET_EDID


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/pci/pm2fb.c

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

Modified files:

Index: src/sys/dev/pci/pm2fb.c
diff -u src/sys/dev/pci/pm2fb.c:1.7 src/sys/dev/pci/pm2fb.c:1.8
--- src/sys/dev/pci/pm2fb.c:1.7	Sat Jan 22 15:14:28 2011
+++ src/sys/dev/pci/pm2fb.c	Thu Nov 24 05:51:17 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: pm2fb.c,v 1.7 2011/01/22 15:14:28 cegger Exp $	*/
+/*	$NetBSD: pm2fb.c,v 1.8 2011/11/24 05:51:17 macallan Exp $	*/
 
 /*
  * Copyright (c) 2009 Michael Lorenz
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pm2fb.c,v 1.7 2011/01/22 15:14:28 cegger Exp $);
+__KERNEL_RCSID(0, $NetBSD: pm2fb.c,v 1.8 2011/11/24 05:51:17 macallan Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -57,6 +57,17 @@ __KERNEL_RCSID(0, $NetBSD: pm2fb.c,v 1.
 #include dev/pci/wsdisplay_pci.h
 
 #include dev/i2c/i2cvar.h
+#include dev/i2c/i2c_bitbang.h
+#include dev/i2c/ddcvar.h
+#include dev/videomode/videomode.h
+#include dev/videomode/edidvar.h
+#include dev/videomode/edidreg.h
+
+#ifdef PM2FB_DEBUG
+#define DPRINTF aprint_error
+#else
+#define DPRINTF while (0) printf
+#endif
 
 struct pm2fb_softc {
 	device_t sc_dev;
@@ -84,6 +95,9 @@ struct pm2fb_softc {
 	u_char sc_cmap_blue[256];
 	/* engine stuff */
 	uint32_t sc_pprod;
+	/* i2c stuff */
+	struct i2c_controller sc_i2c;
+	uint8_t sc_edid_data[128];
 };
 
 static int	pm2fb_match(device_t, cfdata_t, void *);
@@ -130,6 +144,34 @@ struct wsdisplay_accessops pm2fb_accesso
 	NULL	/* scroll */
 };
 
+/* I2C glue */
+static int pm2fb_i2c_acquire_bus(void *, int);
+static void pm2fb_i2c_release_bus(void *, int);
+static int pm2fb_i2c_send_start(void *, int);
+static int pm2fb_i2c_send_stop(void *, int);
+static int pm2fb_i2c_initiate_xfer(void *, i2c_addr_t, int);
+static int pm2fb_i2c_read_byte(void *, uint8_t *, int);
+static int pm2fb_i2c_write_byte(void *, uint8_t, int);
+
+/* I2C bitbang glue */
+static void pm2fb_i2cbb_set_bits(void *, uint32_t);
+static void pm2fb_i2cbb_set_dir(void *, uint32_t);
+static uint32_t pm2fb_i2cbb_read(void *);
+
+static void pm2_setup_i2c(struct pm2fb_softc *);
+
+static const struct i2c_bitbang_ops pm2fb_i2cbb_ops = {
+	pm2fb_i2cbb_set_bits,
+	pm2fb_i2cbb_set_dir,
+	pm2fb_i2cbb_read,
+	{
+		PM2_DD_SDA_IN,
+		PM2_DD_SCL_IN,
+		0,
+		0
+	}
+};
+
 static inline void
 pm2fb_wait(struct pm2fb_softc *sc, int slots)
 {
@@ -248,6 +290,8 @@ pm2fb_attach(device_t parent, device_t s
 	sc-sc_mode = WSDISPLAYIO_MODE_EMUL;
 	sc-sc_locked = 0;
 
+	pm2_setup_i2c(sc);
+
 	vcons_init(sc-vd, sc, sc-sc_defaultscreen_descr,
 	pm2fb_accessops);
 	sc-vd.init_screen = pm2fb_init_screen;
@@ -356,6 +400,13 @@ pm2fb_ioctl(void *v, void *vs, u_long cm
 		}
 		}
 		return 0;
+	case WSDISPLAYIO_GET_EDID: {
+		struct wsdisplayio_edid_info *d = data;
+		d-data_size = 128;
+		if (d-buffer_size  128)
+			return EAGAIN;
+		return copyout(sc-sc_edid_data, d-edid_data, 128);
+	}
 	}
 	return EPASSTHROUGH;
 }
@@ -840,3 +891,114 @@ pm2fb_eraserows(void *cookie, int row, i
 	}
 }
 
+static void
+pm2_setup_i2c(struct pm2fb_softc *sc)
+{
+#ifdef PM2FB_DEBUG
+	struct edid_info ei;
+#endif
+	int i;
+
+	/* Fill in the i2c tag */
+	sc-sc_i2c.ic_cookie = sc;
+	sc-sc_i2c.ic_acquire_bus = pm2fb_i2c_acquire_bus;
+	sc-sc_i2c.ic_release_bus = pm2fb_i2c_release_bus;
+	sc-sc_i2c.ic_send_start = pm2fb_i2c_send_start;
+	sc-sc_i2c.ic_send_stop = pm2fb_i2c_send_stop;
+	sc-sc_i2c.ic_initiate_xfer = pm2fb_i2c_initiate_xfer;
+	sc-sc_i2c.ic_read_byte = pm2fb_i2c_read_byte;
+	sc-sc_i2c.ic_write_byte = pm2fb_i2c_write_byte;
+	sc-sc_i2c.ic_exec = NULL;
+
+	DPRINTF(data: %08x\n, bus_space_read_4(sc-sc_memt, sc-sc_regh,
+		PM2_DISPLAY_DATA));
+
+	/* make sure we're in i2c mode */
+	bus_space_write_4(sc-sc_memt, sc-sc_regh, PM2_DISPLAY_DATA, 0);
+
+	/* zero out the EDID buffer */
+	memset(sc-sc_edid_data, 0, 128);
+
+	/* Some monitors don't respond first time */
+	i = 0;
+	while (sc-sc_edid_data[1] == 0  i++  3)
+		ddc_read_edid(sc-sc_i2c, sc-sc_edid_data, 128);
+#ifdef PM2FB_DEBUG
+	if (edid_parse(edid_data[0], ei) != -1) {
+		edid_print(ei);
+	}
+#endif
+}
+
+/* I2C bitbanging */
+static void pm2fb_i2cbb_set_bits(void *cookie, uint32_t bits)
+{
+	struct pm2fb_softc *sc = cookie;
+	uint32_t out;
+
+	out = bits  2;	/* bitmasks match the IN bits */
+
+	bus_space_write_4(sc-sc_memt, sc-sc_regh, PM2_DISPLAY_DATA, out);
+}
+
+static void pm2fb_i2cbb_set_dir(void *cookie, uint32_t dir)
+{
+	/* Nothing to do */
+}
+
+static uint32_t pm2fb_i2cbb_read(void *cookie)
+{
+	struct pm2fb_softc *sc = cookie;
+	uint32_t bits;
+
+	bits = bus_space_read_4(sc-sc_memt, sc-sc_regh, PM2_DISPLAY_DATA);
+
+	return bits;
+}
+
+/* higher level I2C stuff */

CVS commit: src/sys/dev/pci

2011-11-23 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Thu Nov 24 05:53:05 UTC 2011

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

Log Message:
#include opt_pm2fb.h


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/pci/pm2fb.c

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

Modified files:

Index: src/sys/dev/pci/pm2fb.c
diff -u src/sys/dev/pci/pm2fb.c:1.8 src/sys/dev/pci/pm2fb.c:1.9
--- src/sys/dev/pci/pm2fb.c:1.8	Thu Nov 24 05:51:17 2011
+++ src/sys/dev/pci/pm2fb.c	Thu Nov 24 05:53:05 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: pm2fb.c,v 1.8 2011/11/24 05:51:17 macallan Exp $	*/
+/*	$NetBSD: pm2fb.c,v 1.9 2011/11/24 05:53:05 macallan Exp $	*/
 
 /*
  * Copyright (c) 2009 Michael Lorenz
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pm2fb.c,v 1.8 2011/11/24 05:51:17 macallan Exp $);
+__KERNEL_RCSID(0, $NetBSD: pm2fb.c,v 1.9 2011/11/24 05:53:05 macallan Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -63,6 +63,8 @@ __KERNEL_RCSID(0, $NetBSD: pm2fb.c,v 1.
 #include dev/videomode/edidvar.h
 #include dev/videomode/edidreg.h
 
+#include opt_pm2fb.h
+
 #ifdef PM2FB_DEBUG
 #define DPRINTF aprint_error
 #else



CVS commit: src/sys/dev/pci

2011-11-23 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Thu Nov 24 05:57:17 UTC 2011

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

Log Message:
fix debug build


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

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

Modified files:

Index: src/sys/dev/pci/pm2fb.c
diff -u src/sys/dev/pci/pm2fb.c:1.9 src/sys/dev/pci/pm2fb.c:1.10
--- src/sys/dev/pci/pm2fb.c:1.9	Thu Nov 24 05:53:05 2011
+++ src/sys/dev/pci/pm2fb.c	Thu Nov 24 05:57:17 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: pm2fb.c,v 1.9 2011/11/24 05:53:05 macallan Exp $	*/
+/*	$NetBSD: pm2fb.c,v 1.10 2011/11/24 05:57:17 macallan Exp $	*/
 
 /*
  * Copyright (c) 2009 Michael Lorenz
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pm2fb.c,v 1.9 2011/11/24 05:53:05 macallan Exp $);
+__KERNEL_RCSID(0, $NetBSD: pm2fb.c,v 1.10 2011/11/24 05:57:17 macallan Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -926,7 +926,7 @@ pm2_setup_i2c(struct pm2fb_softc *sc)
 	while (sc-sc_edid_data[1] == 0  i++  3)
 		ddc_read_edid(sc-sc_i2c, sc-sc_edid_data, 128);
 #ifdef PM2FB_DEBUG
-	if (edid_parse(edid_data[0], ei) != -1) {
+	if (edid_parse(sc-sc_edid_data[0], ei) != -1) {
 		edid_print(ei);
 	}
 #endif



CVS commit: src

2011-11-23 Thread Thor Lancelot Simon
Module Name:src
Committed By:   tls
Date:   Wed Nov 23 10:47:50 UTC 2011

Modified Files:
src/distrib/sets/lists/etc: mi
src/etc/defaults: rc.conf
src/etc/rc.d: Makefile
src/sbin/rndctl: rndctl.8 rndctl.c
src/sys/dev: rnd.c
src/sys/secmodel/securelevel: secmodel_securelevel.c
src/sys/secmodel/suser: secmodel_suser.c
src/sys/sys: kauth.h rnd.h
Added Files:
src/etc/rc.d: random_seed

Log Message:
Load entropy at system boot (only works at securelevel  1); save
at system shutdown.  Disable with random_seed=NO in rc.conf if desired.

Goes to some trouble to never load or save to network filesystems.

Entropy should really be loaded by the boot loader but I am still
sorting out how to pass it to the kernel.


To generate a diff of this commit:
cvs rdiff -u -r1.225 -r1.226 src/distrib/sets/lists/etc/mi
cvs rdiff -u -r1.116 -r1.117 src/etc/defaults/rc.conf
cvs rdiff -u -r1.85 -r1.86 src/etc/rc.d/Makefile
cvs rdiff -u -r0 -r1.1 src/etc/rc.d/random_seed
cvs rdiff -u -r1.18 -r1.19 src/sbin/rndctl/rndctl.8
cvs rdiff -u -r1.20 -r1.21 src/sbin/rndctl/rndctl.c
cvs rdiff -u -r1.85 -r1.86 src/sys/dev/rnd.c
cvs rdiff -u -r1.20 -r1.21 \
src/sys/secmodel/securelevel/secmodel_securelevel.c
cvs rdiff -u -r1.34 -r1.35 src/sys/secmodel/suser/secmodel_suser.c
cvs rdiff -u -r1.64 -r1.65 src/sys/sys/kauth.h
cvs rdiff -u -r1.22 -r1.23 src/sys/sys/rnd.h

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



CVS commit: src/sbin/rndctl

2011-11-23 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Nov 23 12:15:30 UTC 2011

Modified Files:
src/sbin/rndctl: rndctl.8

Log Message:
Sort option descriptions, bump date for previous.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sbin/rndctl/rndctl.8

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



CVS commit: src/dist/nvi/ex

2011-11-23 Thread Takehiko NOZAKI
Module Name:src
Committed By:   tnozaki
Date:   Wed Nov 23 14:14:44 UTC 2011

Modified Files:
src/dist/nvi/ex: ex.c

Log Message:
don't use L prefix directly, for --disable-widechar.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/dist/nvi/ex/ex.c

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



CVS commit: src/dist/nvi

2011-11-23 Thread Takehiko NOZAKI
Module Name:src
Committed By:   tnozaki
Date:   Wed Nov 23 15:43:39 UTC 2011

Modified Files:
src/dist/nvi/common: multibyte.h
src/dist/nvi/regex: regex2.h

Log Message:
don't use WEOF directly, for --disable-widechar.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/dist/nvi/common/multibyte.h
cvs rdiff -u -r1.4 -r1.5 src/dist/nvi/regex/regex2.h

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



CVS commit: [jmcneill-audiomp3] src/sys/dev/isa

2011-11-23 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Wed Nov 23 15:47:38 UTC 2011

Modified Files:
src/sys/dev/isa [jmcneill-audiomp3]: wss.c

Log Message:
Hold the intr lock for the duration of ad1848_isa_intr().


To generate a diff of this commit:
cvs rdiff -u -r1.69.4.2 -r1.69.4.3 src/sys/dev/isa/wss.c

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



CVS commit: src/sys/arch/hpc/stand/hpcboot

2011-11-23 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Wed Nov 23 15:49:58 UTC 2011

Modified Files:
src/sys/arch/hpc/stand/hpcboot: file_ufs.cpp
src/sys/arch/hpc/stand/hpcboot/menu: menu.cpp
src/sys/arch/hpc/stand/hpcboot/res: hpcmenu.rc resource.h

Log Message:
modify for PSION NETBOOK PRO.
- ignore Network directory when finding the directory for configuration files.
- as the device name SMC (SD-MMC) to allow.
- add SMC1:/ entry to kernel directory.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/hpc/stand/hpcboot/file_ufs.cpp
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/hpc/stand/hpcboot/menu/menu.cpp
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/hpc/stand/hpcboot/res/hpcmenu.rc
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/hpc/stand/hpcboot/res/resource.h

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



CVS commit: src/sys/arch/hpc/stand/binary/ARM

2011-11-23 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Wed Nov 23 15:51:02 UTC 2011

Modified Files:
src/sys/arch/hpc/stand/binary/ARM: hpcboot.exe.uue

Log Message:
recompile.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/hpc/stand/binary/ARM/hpcboot.exe.uue

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



CVS commit: [jmcneill-audiomp3] src/sys/dev/ebus

2011-11-23 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Wed Nov 23 16:53:57 UTC 2011

Modified Files:
src/sys/dev/ebus [jmcneill-audiomp3]: cs4231_ebus.c

Log Message:
initialize locks
now this works on my U60


To generate a diff of this commit:
cvs rdiff -u -r1.34.4.3 -r1.34.4.4 src/sys/dev/ebus/cs4231_ebus.c

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



CVS commit: [jmcneill-audiomp3] src/sys/dev

2011-11-23 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Wed Nov 23 16:55:24 UTC 2011

Modified Files:
src/sys/dev [jmcneill-audiomp3]: TODO.audiomp

Log Message:
audiocs at ebus works on sparc64


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.27 -r1.1.2.28 src/sys/dev/TODO.audiomp

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



CVS commit: [jmcneill-audiomp3] src/sys/dev

2011-11-23 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Wed Nov 23 18:43:53 UTC 2011

Modified Files:
src/sys/dev [jmcneill-audiomp3]: TODO.audiomp

Log Message:
wss(4) and clcs(4) tested successfully


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.28 -r1.1.2.29 src/sys/dev/TODO.audiomp

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



CVS commit: src/dist/nvi

2011-11-23 Thread Takehiko NOZAKI
Module Name:src
Committed By:   tnozaki
Date:   Wed Nov 23 19:18:53 UTC 2011

Modified Files:
src/dist/nvi/ex: ex_script.c
src/dist/nvi/vi: v_z.c

Log Message:
use e_key_t instead of u_int.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/dist/nvi/ex/ex_script.c
cvs rdiff -u -r1.1.1.2 -r1.2 src/dist/nvi/vi/v_z.c

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



CVS commit: src/dist/nvi

2011-11-23 Thread Takehiko NOZAKI
Module Name:src
Committed By:   tnozaki
Date:   Wed Nov 23 19:25:28 UTC 2011

Modified Files:
src/dist/nvi/cl: cl_term.c
src/dist/nvi/common: cut.c extern.h put.c screen.h
src/dist/nvi/ex: ex.c ex.h ex_at.c
src/dist/nvi/vi: v_at.c v_ch.c v_txt.c

Log Message:
use ARG_CHAR_T instead of CHAR_T for integer promotion.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/dist/nvi/cl/cl_term.c
cvs rdiff -u -r1.4 -r1.5 src/dist/nvi/common/cut.c \
src/dist/nvi/common/extern.h
cvs rdiff -u -r1.2 -r1.3 src/dist/nvi/common/put.c
cvs rdiff -u -r1.1.1.2 -r1.2 src/dist/nvi/common/screen.h
cvs rdiff -u -r1.8 -r1.9 src/dist/nvi/ex/ex.c
cvs rdiff -u -r1.3 -r1.4 src/dist/nvi/ex/ex.h
cvs rdiff -u -r1.2 -r1.3 src/dist/nvi/ex/ex_at.c
cvs rdiff -u -r1.3 -r1.4 src/dist/nvi/vi/v_at.c
cvs rdiff -u -r1.1.1.2 -r1.2 src/dist/nvi/vi/v_ch.c
cvs rdiff -u -r1.7 -r1.8 src/dist/nvi/vi/v_txt.c

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



CVS commit: src/sys/fs/union

2011-11-23 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Wed Nov 23 19:39:11 UTC 2011

Modified Files:
src/sys/fs/union: union.h union_subr.c union_vfsops.c

Log Message:
Use hashinit() / hashdone() to create the union node hash list.

Cleanup the hash lookup in union_allocvp().

Needs more work as there is still a possible deadlock between
union_allocvp() and vclean().


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/fs/union/union.h
cvs rdiff -u -r1.53 -r1.54 src/sys/fs/union/union_subr.c
cvs rdiff -u -r1.65 -r1.66 src/sys/fs/union/union_vfsops.c

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



CVS commit: src/sys/dev/pci

2011-11-23 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Wed Nov 23 19:40:42 UTC 2011

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

Log Message:
According to Virtio PCI Card Specification v0.9.2 DRAFT there is no
feature named VIRTIO_BLK_F_SECTOR_MAX so remove it.  Linux seems to use
this feature bit as VIRTIO_BLK_F_TOPOLOGY.

Use VIRTIO_BLK_F_BLK_SIZE * VIRTIO_BLK_F_SEG_MAX as the drivers maxxfer
and reorder so sc_secsize gets set before use.

As maxxfer may not be a multiple of page size add one more segment to
the dma maps.

Tested on Linux 3.1.1 host by Guillaume Lasmayous.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/pci/ld_virtio.c

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



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

2011-11-23 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Nov 23 19:41:51 UTC 2011

Modified Files:
src/external/gpl3/gdb/dist/bfd: config.bfd

Log Message:
Add mips64*-netbsd* clauses


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

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



CVS commit: src/sys/ufs

2011-11-23 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Wed Nov 23 19:42:10 UTC 2011

Modified Files:
src/sys/ufs/ffs: ffs_inode.c
src/sys/ufs/lfs: lfs_inode.c

Log Message:
If ufs_balloc_range() fails, make sure to call ?fs_truncate() to
reset v_writesize to the right value.
If v_writesize is left larger than the allocated blocks, we may have
the same issue as the one described in
http://mail-index.netbsd.org/tech-kern/2010/02/02/msg007156.html


To generate a diff of this commit:
cvs rdiff -u -r1.107 -r1.108 src/sys/ufs/ffs/ffs_inode.c
cvs rdiff -u -r1.125 -r1.126 src/sys/ufs/lfs/lfs_inode.c

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



CVS commit: src/sys/dev/nor

2011-11-23 Thread Frank Wille
Module Name:src
Committed By:   phx
Date:   Wed Nov 23 21:02:29 UTC 2011

Modified Files:
src/sys/dev/nor: cfi_0002.c

Log Message:
Make it compile without DEBUG option.


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

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



CVS commit: src/doc

2011-11-23 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Wed Nov 23 22:57:24 UTC 2011

Modified Files:
src/doc: BRANCHES

Log Message:
terminate ad-audiomp2, add jmcneill-audiomp3


To generate a diff of this commit:
cvs rdiff -u -r1.311 -r1.312 src/doc/BRANCHES

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



CVS commit: src/sys

2011-11-23 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Wed Nov 23 23:07:37 UTC 2011

Modified Files:
src/sys/arch/amiga/dev: aucc.c melody.c repulse.c toccata.c
src/sys/arch/amigappc/amigappc: machdep.c
src/sys/arch/arm/iomd: vidcaudio.c
src/sys/arch/arm/xscale: pxa2x0_ac97.c pxa2x0_dmac.c pxa2x0_dmac.h
pxa2x0_i2s.c pxa2x0_i2s.h pxa2x0_mci.c
src/sys/arch/dreamcast/dev/g2: aica.c
src/sys/arch/hp700/gsc: harmony.c harmonyvar.h
src/sys/arch/hpcmips/dev: ucbsnd.c
src/sys/arch/hpcmips/vr: vraiu.c
src/sys/arch/i386/pnpbios: joy_pnpbios.c
src/sys/arch/macppc/dev: awacs.c snapper.c
src/sys/arch/prep/isa: paud_isa.c
src/sys/arch/sgimips/hpc: haltwo.c haltwovar.h
src/sys/arch/sgimips/mace: mavb.c
src/sys/arch/shark/ofw: ofw.c
src/sys/arch/sparc/dev: audioamd.c
src/sys/arch/x68k/dev: vs.c vsvar.h
src/sys/arch/zaurus/dev: zaudio.c
src/sys/dev: auconv.c auconv.h audio.c audio_if.h audiovar.h
aurateconv.c midi.c midi_if.h midictl.c midictl.h midisyn.c
midisynvar.h midivar.h mulaw.c sequencer.c sequencervar.h
src/sys/dev/acpi: joy_acpi.c mpu_acpi.c
src/sys/dev/bluetooth: btsco.c
src/sys/dev/ebus: cs4231_ebus.c
src/sys/dev/ic: ac97.c ac97var.h ad1848.c ad1848var.h am7930.c
am7930var.h attimer.c cs4231.c cs4231var.h interwave.c
interwavevar.h joy.c joyvar.h mpu.c mpuvar.h msm6258.c opl.c
oplvar.h tms320av110.c tms320av110var.h
src/sys/dev/isa: ad1848_isa.c ad1848var.h aria.c cms.c ess.c essvar.h
gus.c ics2101.c joy_ess.c joy_isa.c midi_pcppi.c mpu_isa.c mpu_sb.c
mpu_ym.c opl_ess.c opl_isa.c opl_sb.c pas.c pcppi.c pcppivar.h sb.c
sb_isa.c sbdsp.c sbdspvar.h wss.c ym.c ymvar.h
src/sys/dev/isapnp: gus_isapnp.c joy_isapnp.c mpu_isapnp.c
src/sys/dev/ofisa: joy_ofisa.c
src/sys/dev/pad: pad.c padvar.h padvol.c padvol.h
src/sys/dev/pci: auacer.c auich.c auixp.c auixpvar.h autri.c autrivar.h
auvia.c auviavar.h azalia.c azalia.h azalia_codec.c cmpci.c
cmpcivar.h cs4280.c cs4281.c cs428x.c cs428x.h eap.c eapvar.h
emuxki.c emuxkivar.h esa.c esavar.h esm.c esmvar.h eso.c esovar.h
fms.c fmsvar.h gcscaudio.c joy_eap.c joy_eso.c joy_pci.c
mpu_cmpci.c mpu_eso.c mpu_fms.c mpu_yds.c neo.c opl_eso.c sv.c
svvar.h yds.c ydsvar.h
src/sys/dev/pci/hdaudio: hdafg.c hdaudio.c hdaudio_pci.c
src/sys/dev/sbus: cs4231_sbus.c dbri.c dbrivar.h
src/sys/dev/tc: bba.c
src/sys/dev/usb: uaudio.c umidi.c umidivar.h
src/sys/sys: intr.h param.h
Added Files:
src/sys/dev: TODO.audiomp

Log Message:
Merge jmcneill-audiomp3 branch, which is derived from ad-audiomp2. From
the original ad-audiomp branch notes:

  Add MP locking to the audio drivers.

  Making the audio drivers MP safe is necessary before efforts
  can be made to make the VM system MP safe.

  The are two locks per device instance, an ISR lock and
  a character device lock. The ISR lock replaces calls to
  splaudio()/splx(), and will be held across calls to device
  methods which were called at splaudio() before (e.g.
  trigger_output). The character device lock is held across
  calls to nearly all of the methods, excluding some only
  used for initialization, e.g. get_locks.

Welcome to 5.99.57.


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/sys/arch/amiga/dev/aucc.c
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/amiga/dev/melody.c
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/amiga/dev/repulse.c
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/amiga/dev/toccata.c
cvs rdiff -u -r1.48 -r1.49 src/sys/arch/amigappc/amigappc/machdep.c
cvs rdiff -u -r1.46 -r1.47 src/sys/arch/arm/iomd/vidcaudio.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arm/xscale/pxa2x0_ac97.c \
src/sys/arch/arm/xscale/pxa2x0_i2s.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arm/xscale/pxa2x0_dmac.c \
src/sys/arch/arm/xscale/pxa2x0_mci.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/xscale/pxa2x0_dmac.h
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/xscale/pxa2x0_i2s.h
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/dreamcast/dev/g2/aica.c
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/hp700/gsc/harmony.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/hp700/gsc/harmonyvar.h
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/hpcmips/dev/ucbsnd.c
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/hpcmips/vr/vraiu.c
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/i386/pnpbios/joy_pnpbios.c
cvs rdiff -u -r1.40 -r1.41 src/sys/arch/macppc/dev/awacs.c
cvs rdiff -u -r1.36 -r1.37 src/sys/arch/macppc/dev/snapper.c
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/prep/isa/paud_isa.c
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/sgimips/hpc/haltwo.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/sgimips/hpc/haltwovar.h
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/sgimips/mace/mavb.c
cvs rdiff -u -r1.56 

CVS commit: src/share/man/man9

2011-11-23 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Wed Nov 23 23:11:56 UTC 2011

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

Log Message:
update audio(9) docs for audiomp changes


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/share/man/man9/audio.9

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



CVS commit: src/doc

2011-11-23 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Wed Nov 23 23:12:48 UTC 2011

Modified Files:
src/doc: BRANCHES

Log Message:
jmcneill-audiomp3 is done


To generate a diff of this commit:
cvs rdiff -u -r1.312 -r1.313 src/doc/BRANCHES

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



CVS commit: src/sys/dev/usb

2011-11-23 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Nov 23 23:50:47 UTC 2011

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

Log Message:
complete the port to audiomp:  take kernel lock in a few places for
USB (like uaudio), kill most of the spl* uses.


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sys/dev/usb/umidi.c

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



CVS commit: src/sys/dev

2011-11-23 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Nov 23 23:59:32 UTC 2011

Modified Files:
src/sys/dev: TODO.audiomp

Log Message:
note umidi as done


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/TODO.audiomp

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



CVS commit: src/external/bsd/openresolv/dist

2011-11-23 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Thu Nov 24 00:36:08 UTC 2011

Update of /cvsroot/src/external/bsd/openresolv/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv5619

Log Message:
Import openresolv-3.4.5 with the following changes since the last version:
* More printf portabitiy fixes.
* Use read -r to avoid backslash problems.
* If we have a valid domain, put that in resolv.conf as well as search.
  This does not fix a technical problem, just stops me getting bug reports.
* Update metric and privacy even if resolv.conf didn't change.
* sortlist is now supported.
* Ensure subscriber config directories exist before writing the configs
* Don't create pdnsd.conf if it doesn't exist or is not writeable.

Status:

Vendor Tag: roy
Release Tags:   openresolv-3-4-5

U src/external/bsd/openresolv/dist/README
U src/external/bsd/openresolv/dist/resolvconf.in
U src/external/bsd/openresolv/dist/resolvconf.8.in
C src/external/bsd/openresolv/dist/resolvconf.conf.5.in
U src/external/bsd/openresolv/dist/libc.in
U src/external/bsd/openresolv/dist/dnsmasq.in
U src/external/bsd/openresolv/dist/named.in
U src/external/bsd/openresolv/dist/pdnsd.in
U src/external/bsd/openresolv/dist/unbound.in

1 conflicts created by this import.
Use the following command to help the merge:

cvs checkout -jroy:yesterday -jroy src/external/bsd/openresolv/dist



CVS commit: src/external/bsd/openresolv/dist

2011-11-23 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Thu Nov 24 00:37:40 UTC 2011

Modified Files:
src/external/bsd/openresolv/dist: resolvconf.conf.5.in

Log Message:
sync


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
src/external/bsd/openresolv/dist/resolvconf.conf.5.in

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



CVS commit: src/doc

2011-11-23 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Thu Nov 24 00:40:31 UTC 2011

Modified Files:
src/doc: 3RDPARTY CHANGES

Log Message:
import openresolv-3.4.5


To generate a diff of this commit:
cvs rdiff -u -r1.888 -r1.889 src/doc/3RDPARTY
cvs rdiff -u -r1.1630 -r1.1631 src/doc/CHANGES

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



CVS commit: src/doc

2011-11-23 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Thu Nov 24 00:56:47 UTC 2011

Modified Files:
src/doc: CHANGES

Log Message:
audio: Audio drivers are now MP-safe.


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

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



CVS commit: src/sys/dev/pad

2011-11-23 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Thu Nov 24 01:11:05 UTC 2011

Modified Files:
src/sys/dev/pad: pad.c

Log Message:
splaudio is no more


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

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



CVS commit: src/sys/kern

2011-11-23 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Nov 24 01:14:19 UTC 2011

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

Log Message:
- don't let arguments in macros have side effects
- nul terminate properly


To generate a diff of this commit:
cvs rdiff -u -r1.146 -r1.147 src/sys/kern/subr_prf.c

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



CVS commit: src/sys/kern

2011-11-23 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Nov 24 01:45:39 UTC 2011

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

Log Message:
- fixed signed/unsigned comparison
- don't write/increment sbuf if NULL


To generate a diff of this commit:
cvs rdiff -u -r1.147 -r1.148 src/sys/kern/subr_prf.c

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



CVS commit: src/tests/kernel

2011-11-23 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Nov 24 01:46:40 UTC 2011

Modified Files:
src/tests/kernel: Makefile
Added Files:
src/tests/kernel: gen_t_subr_prf

Log Message:
Add a test for the kernel snprintf.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/tests/kernel/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/kernel/gen_t_subr_prf

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



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

2011-11-23 Thread Jean-Yves Migeon
Module Name:src
Committed By:   jym
Date:   Thu Nov 24 01:47:18 UTC 2011

Modified Files:
src/sys/arch/xen/xen: xbdback_xenbus.c

Log Message:
Deep rework of the xbdback(4) driver; it now uses a thread per instance
instead of continuations directly from shm callbacks or interrupt
handlers. The whole CPS design remains but is adapted to cope with
a thread model.

This patch allows scheduling away I/O requests of domains that behave
abnormally, or even destroy them if there is a need to (without thrashing
dom0 with lots of error messages at IPL_BIO).

I took this opportunity to make the driver MPSAFE, so multiple instances
can run concurrently. Moved from home-grown pool(9) queues to
pool_cache(9), and rework the callback mechanism so that it delegates
I/O processing to thread instead of handling it itself through the
continuation trampoline.

This one fixes the potential DoS many have seen in a dom0 when trying to
suspend a NetBSD domU with a corrupted I/O ring.

Benchmarks (build.sh release runs and bonnie++) do not show any
performance regression, the new driver is on-par with the old one.

ok bouyer@.


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/sys/arch/xen/xen/xbdback_xenbus.c

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



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

2011-11-23 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Nov 24 01:49:39 UTC 2011

Modified Files:
src/distrib/sets/lists/tests: mi

Log Message:
add t_subr_prf


To generate a diff of this commit:
cvs rdiff -u -r1.426 -r1.427 src/distrib/sets/lists/tests/mi

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



CVS commit: src/sys/dev/pad

2011-11-23 Thread Alistair G. Crooks
Module Name:src
Committed By:   agc
Date:   Thu Nov 24 01:54:08 UTC 2011

Modified Files:
src/sys/dev/pad: pad.c

Log Message:
get rid of a variable which is no longer used after the demise of splaudio


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

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



CVS commit: src/lib/libpuffs

2011-11-23 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Thu Nov 24 01:55:33 UTC 2011

Modified Files:
src/lib/libpuffs: null.c

Log Message:
Remove pnode of overwritten file.

When puffs_null_node_rename() overwrites existing file, its pnode
must�be removed, because src pnode already represents this file.

From Evgeniy Ivanov lolkaanti...@gmail.com


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/lib/libpuffs/null.c

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



CVS commit: src/lib/librefuse

2011-11-23 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Thu Nov 24 01:56:22 UTC 2011

Modified Files:
src/lib/librefuse: refuse.c

Log Message:
Set eofflag in puffs_fuse_node_readdir() from librefuse.

From Evgeniy Ivanov lolkaanti...@gmail.com


To generate a diff of this commit:
cvs rdiff -u -r1.94 -r1.95 src/lib/librefuse/refuse.c

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



CVS commit: src/lib/libpuffs

2011-11-23 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Thu Nov 24 01:58:52 UTC 2011

Modified Files:
src/lib/libpuffs: dispatcher.c null.c

Log Message:
Remove files specified in pcn.

When remove files using name from pnode, another link on this file
can be unlinked. E.g. touch 1; ln 1 2; rm 2 will remove file named
1. Thus puffs_null_node_remove should remove directory entry which
name is provided by pcn (as said in puffs_ops.3). Caller should
provide appropriately initialized pcn.

From Evgeniy Ivanov lolkaanti...@gmail.com


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/lib/libpuffs/dispatcher.c
cvs rdiff -u -r1.31 -r1.32 src/lib/libpuffs/null.c

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



CVS commit: src/lib/libpuffs

2011-11-23 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Thu Nov 24 01:59:26 UTC 2011

Modified Files:
src/lib/libpuffs: puffs.3

Log Message:
Documentation fix

Evgeniy Ivanov lolkaanti...@gmail.com


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/lib/libpuffs/puffs.3

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



CVS commit: src/sys/dev

2011-11-23 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Thu Nov 24 02:54:32 UTC 2011

Modified Files:
src/sys/dev: midi.c

Log Message:
set hwif_softc around midi_attach()s call to -getinfo(), like the old
code, so that midi_register_hw_if_ext() works.  add a mutex for this
to avoid multiple midi_attach()s fighting over it.

XXX: this is an ugly interface


To generate a diff of this commit:
cvs rdiff -u -r1.73 -r1.74 src/sys/dev/midi.c

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



CVS commit: src/sys/dev

2011-11-23 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Thu Nov 24 02:56:34 UTC 2011

Modified Files:
src/sys/dev: TODO.audiomp

Log Message:
add midi_pcppi.c to the list.  sort.  midi @ pcppi now works.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/TODO.audiomp

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



CVS commit: src/sys/dev/pci

2011-11-23 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Thu Nov 24 03:23:08 UTC 2011

Modified Files:
src/sys/dev/pci: pm2reg.h

Log Message:
add MONITOR_DATA register


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/pci/pm2reg.h

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



CVS commit: src/sys

2011-11-23 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Thu Nov 24 03:35:59 UTC 2011

Modified Files:
src/sys/arch/amigappc/amigappc: machdep.c
src/sys/arch/arm/iomd: vidcaudio.c
src/sys/arch/arm/xscale: pxa2x0_ac97.c
src/sys/arch/hp700/gsc: harmony.c
src/sys/arch/hpcmips/vr: vraiu.c
src/sys/arch/macppc/dev: awacs.c snapper.c
src/sys/arch/prep/isa: paud_isa.c
src/sys/arch/sgimips/hpc: haltwo.c
src/sys/dev/acpi: mpu_acpi.c
src/sys/dev/ic: interwave.c
src/sys/dev/isa: aria.c ess.c gus.c mpu_isa.c pas.c sb_isa.c wss.c ym.c
src/sys/dev/isapnp: mpu_isapnp.c
src/sys/dev/pci: auacer.c auich.c auixp.c autri.c auvia.c azalia.c
cmpci.c cs4280.c cs4281.c eap.c emuxki.c esa.c esm.c eso.c fms.c
gcscaudio.c neo.c sv.c yds.c
src/sys/dev/pci/hdaudio: hdaudio.c hdaudio_pci.c
src/sys/sys: intr.h

Log Message:
put back IPL_AUDIO and splaudio(), at the request of rmind.  they are
aliases and now we can easily revert audio to IPL_VM if necessary,
without having to revert the whole branch.


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/sys/arch/amigappc/amigappc/machdep.c
cvs rdiff -u -r1.47 -r1.48 src/sys/arch/arm/iomd/vidcaudio.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/arm/xscale/pxa2x0_ac97.c
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/hp700/gsc/harmony.c
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/hpcmips/vr/vraiu.c
cvs rdiff -u -r1.41 -r1.42 src/sys/arch/macppc/dev/awacs.c
cvs rdiff -u -r1.37 -r1.38 src/sys/arch/macppc/dev/snapper.c
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/prep/isa/paud_isa.c
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/sgimips/hpc/haltwo.c
cvs rdiff -u -r1.11 -r1.12 src/sys/dev/acpi/mpu_acpi.c
cvs rdiff -u -r1.35 -r1.36 src/sys/dev/ic/interwave.c
cvs rdiff -u -r1.34 -r1.35 src/sys/dev/isa/aria.c
cvs rdiff -u -r1.79 -r1.80 src/sys/dev/isa/ess.c
cvs rdiff -u -r1.107 -r1.108 src/sys/dev/isa/gus.c
cvs rdiff -u -r1.21 -r1.22 src/sys/dev/isa/mpu_isa.c
cvs rdiff -u -r1.69 -r1.70 src/sys/dev/isa/pas.c
cvs rdiff -u -r1.37 -r1.38 src/sys/dev/isa/sb_isa.c
cvs rdiff -u -r1.70 -r1.71 src/sys/dev/isa/wss.c
cvs rdiff -u -r1.42 -r1.43 src/sys/dev/isa/ym.c
cvs rdiff -u -r1.18 -r1.19 src/sys/dev/isapnp/mpu_isapnp.c
cvs rdiff -u -r1.29 -r1.30 src/sys/dev/pci/auacer.c
cvs rdiff -u -r1.139 -r1.140 src/sys/dev/pci/auich.c
cvs rdiff -u -r1.35 -r1.36 src/sys/dev/pci/auixp.c
cvs rdiff -u -r1.47 -r1.48 src/sys/dev/pci/autri.c
cvs rdiff -u -r1.74 -r1.75 src/sys/dev/pci/auvia.c
cvs rdiff -u -r1.78 -r1.79 src/sys/dev/pci/azalia.c
cvs rdiff -u -r1.43 -r1.44 src/sys/dev/pci/cmpci.c
cvs rdiff -u -r1.62 -r1.63 src/sys/dev/pci/cs4280.c
cvs rdiff -u -r1.45 -r1.46 src/sys/dev/pci/cs4281.c src/sys/dev/pci/sv.c
cvs rdiff -u -r1.93 -r1.94 src/sys/dev/pci/eap.c
cvs rdiff -u -r1.60 -r1.61 src/sys/dev/pci/emuxki.c
cvs rdiff -u -r1.55 -r1.56 src/sys/dev/pci/esa.c
cvs rdiff -u -r1.54 -r1.55 src/sys/dev/pci/esm.c
cvs rdiff -u -r1.58 -r1.59 src/sys/dev/pci/eso.c
cvs rdiff -u -r1.39 -r1.40 src/sys/dev/pci/fms.c
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/pci/gcscaudio.c
cvs rdiff -u -r1.46 -r1.47 src/sys/dev/pci/neo.c
cvs rdiff -u -r1.51 -r1.52 src/sys/dev/pci/yds.c
cvs rdiff -u -r1.17 -r1.18 src/sys/dev/pci/hdaudio/hdaudio.c
cvs rdiff -u -r1.9 -r1.10 src/sys/dev/pci/hdaudio/hdaudio_pci.c
cvs rdiff -u -r1.10 -r1.11 src/sys/sys/intr.h

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



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

2011-11-23 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Nov 24 04:17:12 UTC 2011

Modified Files:
src/sys/arch/mips/mips: cache.c

Log Message:
Add workaround for RMI cpus (not really needed but good for completeness)


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/sys/arch/mips/mips/cache.c

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



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

2011-11-23 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Nov 24 04:17:46 UTC 2011

Modified Files:
src/sys/arch/mips/mips: trap.c

Log Message:
Print out the address in the ktlbmod panic.


To generate a diff of this commit:
cvs rdiff -u -r1.233 -r1.234 src/sys/arch/mips/mips/trap.c

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



CVS commit: src/sys/dev/pci

2011-11-23 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Thu Nov 24 05:51:18 UTC 2011

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

Log Message:
support DDC2, so far only for WSDISPLAYIO_GET_EDID


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/pci/pm2fb.c

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



CVS commit: src/sys/dev/pci

2011-11-23 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Thu Nov 24 05:53:05 UTC 2011

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

Log Message:
#include opt_pm2fb.h


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/pci/pm2fb.c

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



CVS commit: src/sys/dev/pci

2011-11-23 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Thu Nov 24 05:57:17 UTC 2011

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

Log Message:
fix debug build


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

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