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

2010-01-09 Thread Tetsuya Isaki
Module Name:src
Committed By:   isaki
Date:   Sat Jan  9 09:16:33 UTC 2010

Modified Files:
src/sys/arch/x68k/dev: grf.c par.c

Log Message:
Make compile with DEBUG.


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/sys/arch/x68k/dev/grf.c
cvs rdiff -u -r1.37 -r1.38 src/sys/arch/x68k/dev/par.c

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

Modified files:

Index: src/sys/arch/x68k/dev/grf.c
diff -u src/sys/arch/x68k/dev/grf.c:1.38 src/sys/arch/x68k/dev/grf.c:1.39
--- src/sys/arch/x68k/dev/grf.c:1.38	Sun Jan 18 02:40:05 2009
+++ src/sys/arch/x68k/dev/grf.c	Sat Jan  9 09:16:32 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: grf.c,v 1.38 2009/01/18 02:40:05 isaki Exp $	*/
+/*	$NetBSD: grf.c,v 1.39 2010/01/09 09:16:32 isaki Exp $	*/
 
 /*
  * Copyright (c) 1990, 1993
@@ -83,7 +83,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: grf.c,v 1.38 2009/01/18 02:40:05 isaki Exp $);
+__KERNEL_RCSID(0, $NetBSD: grf.c,v 1.39 2010/01/09 09:16:32 isaki Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -329,8 +329,10 @@
 	vsize_t size;
 
 #ifdef DEBUG
-	if (grfdebug  GDB_MMAP)
-		printf(grfunmap(%d): dev %x addr %p\n, p-p_pid, dev, addr);
+	if (grfdebug  GDB_MMAP) {
+		printf(grfunmap(%d): dev %x addr %p\n,
+			p-p_pid, GRFUNIT(dev), addr);
+	}
 #endif
 	if (addr == 0)
 		return EINVAL;		/* XXX: how do we deal with this? */

Index: src/sys/arch/x68k/dev/par.c
diff -u src/sys/arch/x68k/dev/par.c:1.37 src/sys/arch/x68k/dev/par.c:1.38
--- src/sys/arch/x68k/dev/par.c:1.37	Wed Jun 25 08:14:59 2008
+++ src/sys/arch/x68k/dev/par.c	Sat Jan  9 09:16:32 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: par.c,v 1.37 2008/06/25 08:14:59 isaki Exp $	*/
+/*	$NetBSD: par.c,v 1.38 2010/01/09 09:16:32 isaki Exp $	*/
 
 /*
  * Copyright (c) 1982, 1990 The Regents of the University of California.
@@ -36,7 +36,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: par.c,v 1.37 2008/06/25 08:14:59 isaki Exp $);
+__KERNEL_RCSID(0, $NetBSD: par.c,v 1.38 2010/01/09 09:16:32 isaki Exp $);
 
 #include sys/param.h
 #include sys/errno.h
@@ -266,7 +266,7 @@
 	
 #ifdef DEBUG
 	if (pardebug  PDB_FOLLOW)
-		printf(parwrite(%x, %p)\n, dev, uio);
+		printf(parwrite(%x, %p)\n, UNIT(dev), uio);
 #endif
 	return (parrw(dev, uio));
 }



CVS commit: src/share/man/man4

2010-01-09 Thread Marc Balmer
Module Name:src
Committed By:   mbalmer
Date:   Sat Jan  9 09:19:19 UTC 2010

Modified Files:
src/share/man/man4: faith.4

Log Message:
Various language fixes.  From FreeBSD.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/share/man/man4/faith.4

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/man4/faith.4
diff -u src/share/man/man4/faith.4:1.10 src/share/man/man4/faith.4:1.11
--- src/share/man/man4/faith.4:1.10	Sun Sep  7 16:22:27 2003
+++ src/share/man/man4/faith.4	Sat Jan  9 09:19:18 2010
@@ -1,4 +1,4 @@
-.\	$NetBSD: faith.4,v 1.10 2003/09/07 16:22:27 wiz Exp $
+.\	$NetBSD: faith.4,v 1.11 2010/01/09 09:19:18 mbalmer Exp $
 .\	$KAME: faith.4,v 1.10 2001/06/30 00:42:48 itojun Exp $
 .\
 .\ Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -53,15 +53,15 @@
 subcommands.
 .Pp
 Special action will be taken when IPv6 TCP traffic is seen on a router,
-and routing table suggests to route it to
+and the routing table suggests to route it to the
 .Nm
 interface.
 In this case, the packet will be accepted by the router,
-regardless of list of IPv6 interface addresses assigned to the router.
-The packet will be captured by an IPv6 TCP socket, if it has
+regardless of the list of IPv6 interface addresses assigned to the router.
+The packet will be captured by an IPv6 TCP socket, if it has the
 .Dv IN6P_FAITH
-flag turned on and it has matching address/port pairs.
-In result,
+flag turned on and matching address/port pairs.
+As a result,
 .Nm
 will let you capture IPv6 TCP traffic to some specific destination addresses.
 Userland programs, such as
@@ -73,43 +73,42 @@
 and perform application-specific address mapping to relay IPv6 TCP to IPv4 TCP.
 .Pp
 .Dv IN6P_FAITH
-flag on IPv6 TCP socket can be set by using
+flag on a IPv6 TCP socket can be set by using
 .Xr setsockopt 2 ,
-with level equals to
+with level
 .Dv IPPROTO_IPV6
-and optname equals to
+and optname
 .Dv IPv6_FAITH .
 .Pp
-To handle error reports by ICMPv6, some of ICMPv6 packets routed to
+To handle error reports by ICMPv6, some ICMPv6 packets routed to an
 .Nm
 interface will be delivered to IPv6 TCP, as well.
 .Pp
 To understand how
 .Nm
-can be used, take a look at source code of
+can be used, take a look at the source code of
 .Xr faithd 8 .
 .Pp
-As
+As the
 .Nm
-interface implements potentially dangerous operation,
-great care must be taken when configuring
-.Nm
-interface.
-To avoid possible misuse,
+interface implements potentially dangerous operations,
+great care must be taken when configuring it.
+To avoid possible misuse, the
 .Xr sysctl 8
 variable
 .Li net.inet6.ip6.keepfaith
 must be set to
 .Li 1
-prior to the use of the interface.
+prior to using the interface.
 When
 .Li net.inet6.ip6.keepfaith
 is
 .Li 0 ,
-no packet will be captured by
+no packets will be captured by the
 .Nm
 interface.
 .Pp
+The
 .Nm
 interface is intended to be used on routers, not on hosts.
 .\
@@ -126,5 +125,5 @@
 .%D June 2001
 .Re
 .Sh HISTORY
-The FAITH IPv6-to-IPv4 TCP relay translator was first appeared in
+The FAITH IPv6-to-IPv4 TCP relay translator first appeared in the
 WIDE hydrangea IPv6 stack.



CVS commit: src/usr.bin/unzip

2010-01-09 Thread Marc Balmer
Module Name:src
Committed By:   mbalmer
Date:   Sat Jan  9 09:27:42 UTC 2010

Modified Files:
src/usr.bin/unzip: unzip.c

Log Message:
When restoring files, use the mode, not the filetype, for the mode.
From FreeBSD (r201630)


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/usr.bin/unzip/unzip.c

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

Modified files:

Index: src/usr.bin/unzip/unzip.c
diff -u src/usr.bin/unzip/unzip.c:1.10 src/usr.bin/unzip/unzip.c:1.11
--- src/usr.bin/unzip/unzip.c:1.10	Sun Oct 25 20:14:50 2009
+++ src/usr.bin/unzip/unzip.c	Sat Jan  9 09:27:42 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: unzip.c,v 1.10 2009/10/25 20:14:50 wiz Exp $ */
+/* $NetBSD: unzip.c,v 1.11 2010/01/09 09:27:42 mbalmer Exp $ */
 
 /*-
  * Copyright (c) 2009 Joerg Sonnenberger jo...@netbsd.org
@@ -37,7 +37,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: unzip.c,v 1.10 2009/10/25 20:14:50 wiz Exp $);
+__RCSID($NetBSD: unzip.c,v 1.11 2010/01/09 09:27:42 mbalmer Exp $);
 
 #include sys/queue.h
 #include sys/stat.h
@@ -388,7 +388,7 @@
 {
 	int mode;
 
-	mode = archive_entry_filetype(e)  0777;
+	mode = archive_entry_mode(e)  0777;
 	if (mode == 0)
 		mode = 0755;
 
@@ -472,7 +472,7 @@
 	ssize_t len;
 	unsigned char *p, *q, *end;
 
-	mode = archive_entry_filetype(e)  0777;
+	mode = archive_entry_mode(e)  0777;
 	if (mode == 0)
 		mode = 0644;
 	mtime = archive_entry_mtime(e);



CVS commit: src/share/man/man4

2010-01-09 Thread Marc Balmer
Module Name:src
Committed By:   mbalmer
Date:   Sat Jan  9 09:44:29 UTC 2010

Modified Files:
src/share/man/man4: bridge.4

Log Message:
A bridge works like a switch, not like a hub.
From FreeBSD.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/share/man/man4/bridge.4

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/man4/bridge.4
diff -u src/share/man/man4/bridge.4:1.8 src/share/man/man4/bridge.4:1.9
--- src/share/man/man4/bridge.4:1.8	Mon Dec 18 00:16:10 2006
+++ src/share/man/man4/bridge.4	Sat Jan  9 09:44:29 2010
@@ -1,4 +1,4 @@
-.\	$NetBSD: bridge.4,v 1.8 2006/12/18 00:16:10 wiz Exp $
+.\	$NetBSD: bridge.4,v 1.9 2010/01/09 09:44:29 mbalmer Exp $
 .\
 .\ Copyright 2001 Wasabi Systems, Inc.
 .\ All rights reserved.
@@ -33,7 +33,7 @@
 .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\ POSSIBILITY OF SUCH DAMAGE.
 .\
-.Dd December 18, 2006
+.Dd January 9, 2010
 .Dt BRIDGE 4
 .Os
 .Sh NAME
@@ -67,7 +67,7 @@
 A bridge can be used to provide several services, such as a simple
 802.11-to-Ethernet bridge for wireless hosts, and traffic isolation.
 .Pp
-A bridge works like a hub, forwarding traffic from one interface
+A bridge works like a switch, forwarding traffic from one interface
 to another.
 Multicast and broadcast packets are always forwarded to all
 interfaces that are part of the bridge.



CVS commit: src/share/man/man4

2010-01-09 Thread Marc Balmer
Module Name:src
Committed By:   mbalmer
Date:   Sat Jan  9 09:44:41 UTC 2010

Modified Files:
src/share/man/man4: faith.4

Log Message:
Fix date.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/share/man/man4/faith.4

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/man4/faith.4
diff -u src/share/man/man4/faith.4:1.11 src/share/man/man4/faith.4:1.12
--- src/share/man/man4/faith.4:1.11	Sat Jan  9 09:19:18 2010
+++ src/share/man/man4/faith.4	Sat Jan  9 09:44:41 2010
@@ -1,4 +1,4 @@
-.\	$NetBSD: faith.4,v 1.11 2010/01/09 09:19:18 mbalmer Exp $
+.\	$NetBSD: faith.4,v 1.12 2010/01/09 09:44:41 mbalmer Exp $
 .\	$KAME: faith.4,v 1.10 2001/06/30 00:42:48 itojun Exp $
 .\
 .\ Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -28,7 +28,7 @@
 .\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\ SUCH DAMAGE.
 .\
-.Dd April 10, 1999
+.Dd January 9, 2010
 .Dt FAITH 4
 .Os
 .Sh NAME



CVS commit: src/usr.sbin/faithd

2010-01-09 Thread Marc Balmer
Module Name:src
Committed By:   mbalmer
Date:   Sat Jan  9 10:43:12 UTC 2010

Modified Files:
src/usr.sbin/faithd: faithd.8

Log Message:
Various language fixes.
From FreeBSD.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/usr.sbin/faithd/faithd.8

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

Modified files:

Index: src/usr.sbin/faithd/faithd.8
diff -u src/usr.sbin/faithd/faithd.8:1.26 src/usr.sbin/faithd/faithd.8:1.27
--- src/usr.sbin/faithd/faithd.8:1.26	Sun Oct 25 01:34:40 2009
+++ src/usr.sbin/faithd/faithd.8	Sat Jan  9 10:43:11 2010
@@ -1,4 +1,4 @@
-.\	$NetBSD: faithd.8,v 1.26 2009/10/25 01:34:40 wiz Exp $
+.\	$NetBSD: faithd.8,v 1.27 2010/01/09 10:43:11 mbalmer Exp $
 .\	$KAME: faithd.8,v 1.37 2002/05/09 14:21:23 itojun Exp $
 .\
 .\ Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -28,7 +28,7 @@
 .\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\ SUCH DAMAGE.
 .\
-.Dd October 25, 2009
+.Dd January 9, 2010
 .Dt FAITHD 8
 .Os
 .Sh NAME
@@ -42,22 +42,20 @@
 .Op Ar serverpath Op Ar serverargs
 .Nm
 .Sh DESCRIPTION
+The
 .Nm
-provides IPv6-to-IPv4 TCP relay.
-.Nm
-must be used on an IPv4/v6 dual stack router.
+utility provides IPv6-to-IPv4 TCP relaying.
+It can only be used on an IPv4/v6 dual stack router.
 .Pp
 When
 .Nm
 receives
 .Tn TCPv6
-traffic,
-.Nm
-will relay the
+traffic, it will relay the
 .Tn TCPv6
 traffic to
 .Tn TCPv4 .
-Destination for relayed
+The destination for the relayed
 .Tn TCPv4
 connection will be determined by the last 4 octets of the original
 .Tn IPv6
@@ -73,14 +71,14 @@
 the traffic will be relayed to IPv4 destination
 .Li 10.1.1.1 .
 .Pp
-To use
+To use the
 .Nm
 translation service,
 an IPv6 address prefix must be reserved for mapping IPv4 addresses into.
-Kernel must be properly configured to route all the TCP connection
+The kernel must be properly configured to route all the TCP connections
 toward the reserved IPv6 address prefix into the
 .Xr faith 4
-pseudo interface, by using
+pseudo interface, using the
 .Xr route 8
 command.
 Also,
@@ -91,7 +89,7 @@
 .Dv 1 .
 .Pp
 The router must be configured to capture all the TCP traffic
-toward reserved
+for the reserved
 .Tn IPv6
 address prefix, by using
 .Xr route 8
@@ -99,22 +97,22 @@
 .Xr sysctl 8
 commands.
 .Pp
+The
 .Nm
-needs a special name-to-address translation logic, so that
-hostnames gets resolved into special
+utility needs special name-to-address translation logic, so that
+hostnames gets resolved into the special
 .Tn IPv6
 address prefix.
-For small-scale installation, use
-.Xr hosts 5 .
-For large-scale installation, it is useful to have
+For small-scale installations, use
+.Xr hosts 5 ;
+For large-scale installations, it is useful to have
 a DNS server with special address translation support.
 An implementation called
 .Nm totd
-is available
-at
+is available at
 .Pa http://www.vermicelli.pasta.cs.uit.no/software/totd.html .
-Make sure you do not propagate translated DNS records to normal DNS cloud,
-it is highly harmful.
+Make sure you do not propagate translated DNS records over to normal
+DNS, as it can cause severe problems.
 .Ss Daemon mode
 When
 .Nm
@@ -146,10 +144,11 @@
 to
 .Nm ,
 you can run local daemons on the router.
+The
 .Nm
-will invoke local daemon at
+utility will invoke ia local daemon at
 .Ar serverpath
-if the destination address is local interface address,
+if the destination address is a local interface address,
 and will perform translation to IPv4 TCP in other cases.
 You can also specify
 .Ar serverargs
@@ -177,7 +176,7 @@
 .Nm
 includes special support for protocols used by
 .Xr ftp 1 .
-When translating FTP protocol,
+When translating the FTP protocol,
 .Nm
 translates network level addresses in
 .Li PORT/LPRT/EPRT
@@ -186,8 +185,8 @@
 commands.
 .Pp
 Inactive sessions will be disconnected in 30 minutes,
-to avoid stale sessions from chewing up resources.
-This may be inappropriate for some of the services
+to prevent stale sessions from chewing up resources.
+This may be inappropriate for some services
 .Pq should this be configurable? .
 .Ss inetd mode
 When
@@ -195,13 +194,13 @@
 is invoked via
 .Xr inetd 8 ,
 .Nm
-will handle connection passed from standard input.
+will handle connections passed from standard input.
 If the connection endpoint is in the reserved IPv6 address prefix,
 .Nm
 will relay the connection.
 Otherwise,
 .Nm
-will invoke service-specific daemon like
+will invoke a service-specific daemon like
 .Xr telnetd 8 ,
 by using the command argument passed from
 .Xr inetd 8 .
@@ -213,14 +212,14 @@
 .Nm
 is invoked via
 .Xr inetd 8
-on FTP port, it will operate as a FTP relay.
+on the FTP port, it will operate as an FTP relay.
 .\.Pp
 .\The operation mode requires special support for
 .\.Nm
 .\in
 .\.Xr inetd 8 .
 .Ss Access control
-To prevent malicious accesses,
+To prevent malicious access,
 .Nm
 implements a simple 

CVS commit: src/libexec/tftpd

2010-01-09 Thread Marc Balmer
Module Name:src
Committed By:   mbalmer
Date:   Sat Jan  9 10:46:31 UTC 2010

Modified Files:
src/libexec/tftpd: tftpd.c

Log Message:
fix build


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/libexec/tftpd/tftpd.c

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

Modified files:

Index: src/libexec/tftpd/tftpd.c
diff -u src/libexec/tftpd/tftpd.c:1.35 src/libexec/tftpd/tftpd.c:1.36
--- src/libexec/tftpd/tftpd.c:1.35	Sat Jan  9 01:25:09 2010
+++ src/libexec/tftpd/tftpd.c	Sat Jan  9 10:46:31 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: tftpd.c,v 1.35 2010/01/09 01:25:09 christos Exp $	*/
+/*	$NetBSD: tftpd.c,v 1.36 2010/01/09 10:46:31 mbalmer Exp $	*/
 
 /*
  * Copyright (c) 1983, 1993
@@ -36,7 +36,7 @@
 #if 0
 static char sccsid[] = @(#)tftpd.c	8.1 (Berkeley) 6/4/93;
 #else
-__RCSID($NetBSD: tftpd.c,v 1.35 2010/01/09 01:25:09 christos Exp $);
+__RCSID($NetBSD: tftpd.c,v 1.36 2010/01/09 10:46:31 mbalmer Exp $);
 #endif
 #endif /* not lint */
 
@@ -228,7 +228,7 @@
 
 	nid = (strtol(tgtuser, ep, 10));
 	if (*ep == '\0') {
-		if (nid  UID_MAX) {
+		if ((uid_t)nid  UID_MAX) {
 			syslog(LOG_ERR, uid %ld is too large, nid);
 			exit(1);
 		}
@@ -245,7 +245,7 @@
 	if (tgtgroup != NULL) {
 		nid = (strtol(tgtgroup, ep, 10));
 		if (*ep == '\0') {
-			if (nid  GID_MAX) {
+			if ((uid_t)nid  GID_MAX) {
 syslog(LOG_ERR, gid %ld is too large, nid);
 exit(1);
 			}



CVS commit: src/share/man/man4

2010-01-09 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sat Jan  9 11:18:32 UTC 2010

Modified Files:
src/share/man/man4: faith.4

Log Message:
an before a vowel, not a.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/share/man/man4/faith.4

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/man4/faith.4
diff -u src/share/man/man4/faith.4:1.12 src/share/man/man4/faith.4:1.13
--- src/share/man/man4/faith.4:1.12	Sat Jan  9 09:44:41 2010
+++ src/share/man/man4/faith.4	Sat Jan  9 11:18:32 2010
@@ -1,4 +1,4 @@
-.\	$NetBSD: faith.4,v 1.12 2010/01/09 09:44:41 mbalmer Exp $
+.\	$NetBSD: faith.4,v 1.13 2010/01/09 11:18:32 wiz Exp $
 .\	$KAME: faith.4,v 1.10 2001/06/30 00:42:48 itojun Exp $
 .\
 .\ Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -73,7 +73,7 @@
 and perform application-specific address mapping to relay IPv6 TCP to IPv4 TCP.
 .Pp
 .Dv IN6P_FAITH
-flag on a IPv6 TCP socket can be set by using
+flag on an IPv6 TCP socket can be set by using
 .Xr setsockopt 2 ,
 with level
 .Dv IPPROTO_IPV6



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

2010-01-09 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Sat Jan  9 11:49:17 UTC 2010

Modified Files:
src/sys/arch/mips/mips: lock_stubs.S

Log Message:
Don't always use .set mips3 - that explicitly uses 64-bit instructions
and we may be on a 32-bit CPU.  Instead use .set mips3/mips32/mips64
depending on current build arch.

Should fix boot problems on a Alchemy CPU reported by KIYOHARA Takashi
on port-mips.

A couple of niggles/concerns:
 * XXX Clean up with a macro?  Same code fragment is in mipsX_subr.S too.
 * XXX Key off build abi instead of processor type?


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/mips/mips/lock_stubs.S

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

Modified files:

Index: src/sys/arch/mips/mips/lock_stubs.S
diff -u src/sys/arch/mips/mips/lock_stubs.S:1.10 src/sys/arch/mips/mips/lock_stubs.S:1.11
--- src/sys/arch/mips/mips/lock_stubs.S:1.10	Mon Dec 14 00:46:06 2009
+++ src/sys/arch/mips/mips/lock_stubs.S	Sat Jan  9 11:49:16 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: lock_stubs.S,v 1.10 2009/12/14 00:46:06 matt Exp $	*/
+/*	$NetBSD: lock_stubs.S,v 1.11 2010/01/09 11:49:16 simonb Exp $	*/
 
 /*-
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -53,7 +53,23 @@
 
 #if MIPS_HAS_LLSC != 0
 
+/*
+ * Set ISA level for the assembler.
+ * XXX Clean up with a macro?  Same code fragment is in mipsX_subr.S too.
+ * XXX Key off build abi instead of processor type?
+ */
+#if defined(MIPS3)
 	.set	mips3
+#endif
+
+#if defined(MIPS32)
+	.set	mips32
+#endif
+
+#if defined(MIPS64)
+	.set	mips64
+#endif
+
 	.set	noreorder
 	.set	noat
 



CVS commit: src/sys/dev/pci

2010-01-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Jan  9 13:34:34 UTC 2010

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

Log Message:
adapt to recent pmf changes


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

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

Modified files:

Index: src/sys/dev/pci/if_cas.c
diff -u src/sys/dev/pci/if_cas.c:1.1 src/sys/dev/pci/if_cas.c:1.2
--- src/sys/dev/pci/if_cas.c:1.1	Thu Jan  7 09:19:55 2010
+++ src/sys/dev/pci/if_cas.c	Sat Jan  9 13:34:33 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_cas.c,v 1.1 2010/01/07 09:19:55 jdc Exp $	*/
+/*	$NetBSD: if_cas.c,v 1.2 2010/01/09 13:34:33 martin Exp $	*/
 /*	$OpenBSD: if_cas.c,v 1.29 2009/11/29 16:19:38 kettenis Exp $	*/
 
 /*
@@ -44,7 +44,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_cas.c,v 1.1 2010/01/07 09:19:55 jdc Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_cas.c,v 1.2 2010/01/09 13:34:33 martin Exp $);
 
 #include opt_inet.h
 #include bpfilter.h
@@ -117,8 +117,8 @@
 
 static bool	cas_estintr(struct cas_softc *sc);
 bool		cas_shutdown(device_t, int);
-static bool	cas_suspend(device_t PMF_FN_PROTO);
-static bool	cas_resume(device_t PMF_FN_PROTO);
+static bool	cas_suspend(device_t, pmf_qual_t);
+static bool	cas_resume(device_t, pmf_qual_t);
 static int	cas_detach(device_t, int);
 static void	cas_partial_detach(struct cas_softc *, enum cas_attach_stage);
 
@@ -1843,7 +1843,7 @@
 }
 
 static bool
-cas_suspend(device_t self PMF_FN_ARGS)
+cas_suspend(device_t self, pmf_qual_t qual)
 {
 	struct cas_softc *sc = device_private(self);
 
@@ -1856,7 +1856,7 @@
 }
 
 static bool
-cas_resume(device_t self PMF_FN_ARGS)
+cas_resume(device_t self, pmf_qual_t qual)
 {
 	struct cas_softc *sc = device_private(self);
 



CVS commit: src/sys/dev/ic

2010-01-09 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Jan  9 14:15:49 UTC 2010

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

Log Message:
To print bus_addr_t value, cast it to u_long rather than size_t.


To generate a diff of this commit:
cvs rdiff -u -r1.293 -r1.294 src/sys/dev/ic/com.c

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

Modified files:

Index: src/sys/dev/ic/com.c
diff -u src/sys/dev/ic/com.c:1.293 src/sys/dev/ic/com.c:1.294
--- src/sys/dev/ic/com.c:1.293	Fri Jan  8 20:02:39 2010
+++ src/sys/dev/ic/com.c	Sat Jan  9 14:15:48 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: com.c,v 1.293 2010/01/08 20:02:39 dyoung Exp $ */
+/* $NetBSD: com.c,v 1.294 2010/01/09 14:15:48 tsutsui Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999, 2004, 2008 The NetBSD Foundation, Inc.
@@ -66,7 +66,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: com.c,v 1.293 2010/01/08 20:02:39 dyoung Exp $);
+__KERNEL_RCSID(0, $NetBSD: com.c,v 1.294 2010/01/09 14:15:48 tsutsui Exp $);
 
 #include opt_com.h
 #include opt_ddb.h
@@ -397,8 +397,8 @@
 		comconsattached = 1;
 
 		if (cn_tab == NULL  comcnreattach() != 0) {
-			printf(can't re-init serial console @%zx\n,
-			(size_t)comcons_info.regs.cr_iobase);
+			printf(can't re-init serial console @%lx\n,
+			(u_long)comcons_info.regs.cr_iobase);
 		}
 
 		/* Make sure the console is always hardwired. */



CVS commit: src/sys/dev/acpi

2010-01-09 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Sat Jan  9 15:34:59 UTC 2010

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

Log Message:
Fix the casts in the event handler.


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

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

Modified files:

Index: src/sys/dev/acpi/wmi_acpi.c
diff -u src/sys/dev/acpi/wmi_acpi.c:1.8 src/sys/dev/acpi/wmi_acpi.c:1.9
--- src/sys/dev/acpi/wmi_acpi.c:1.8	Fri Jan  8 20:40:41 2010
+++ src/sys/dev/acpi/wmi_acpi.c	Sat Jan  9 15:34:59 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: wmi_acpi.c,v 1.8 2010/01/08 20:40:41 dyoung Exp $	*/
+/*	$NetBSD: wmi_acpi.c,v 1.9 2010/01/09 15:34:59 jruoho Exp $	*/
 
 /*-
  * Copyright (c) 2009, 2010 Jukka Ruohonen jruoho...@iki.fi
@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  */
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: wmi_acpi.c,v 1.8 2010/01/08 20:40:41 dyoung Exp $);
+__KERNEL_RCSID(0, $NetBSD: wmi_acpi.c,v 1.9 2010/01/09 15:34:59 jruoho Exp $);
 
 #include sys/param.h
 #include sys/device.h
@@ -505,8 +505,7 @@
 static void
 acpi_wmi_event_handler(ACPI_HANDLE hdl, uint32_t evt, void *aux)
 {
-	device_t self = aux;
-	struct acpi_wmi_softc *sc = device_private(self);
+	struct acpi_wmi_softc *sc = aux;
 
 	if (sc-sc_handler == NULL)
 		return;



CVS commit: src/libexec/ld.elf_so/arch/hppa

2010-01-09 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Jan  9 15:36:44 UTC 2010

Modified Files:
src/libexec/ld.elf_so/arch/hppa: rtld_start.S

Log Message:
Small tidyup.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/libexec/ld.elf_so/arch/hppa/rtld_start.S

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

Modified files:

Index: src/libexec/ld.elf_so/arch/hppa/rtld_start.S
diff -u src/libexec/ld.elf_so/arch/hppa/rtld_start.S:1.6 src/libexec/ld.elf_so/arch/hppa/rtld_start.S:1.7
--- src/libexec/ld.elf_so/arch/hppa/rtld_start.S:1.6	Mon Apr 28 20:23:03 2008
+++ src/libexec/ld.elf_so/arch/hppa/rtld_start.S	Sat Jan  9 15:36:43 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: rtld_start.S,v 1.6 2008/04/28 20:23:03 martin Exp $	*/
+/*	$NetBSD: rtld_start.S,v 1.7 2010/01/09 15:36:43 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -30,9 +30,7 @@
  */
 
 #include machine/asm.h
-#define _LOCORE /* XXX fredette we MUST get rid of this */
 #include machine/frame.h
-#undef _LOCORE
 
 	.import _GLOBAL_OFFSET_TABLE_
 



CVS commit: src/sys/dev/acpi

2010-01-09 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Sat Jan  9 15:43:12 UTC 2010

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

Log Message:
Add ACPI fans to the list of ignored HIDs, as discussed on port-i...@.


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

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

Modified files:

Index: src/sys/dev/acpi/acpi.c
diff -u src/sys/dev/acpi/acpi.c:1.142 src/sys/dev/acpi/acpi.c:1.143
--- src/sys/dev/acpi/acpi.c:1.142	Fri Jan  8 20:40:40 2010
+++ src/sys/dev/acpi/acpi.c	Sat Jan  9 15:43:12 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: acpi.c,v 1.142 2010/01/08 20:40:40 dyoung Exp $	*/
+/*	$NetBSD: acpi.c,v 1.143 2010/01/09 15:43:12 jruoho Exp $	*/
 
 /*-
  * Copyright (c) 2003, 2007 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: acpi.c,v 1.142 2010/01/08 20:40:40 dyoung Exp $);
+__KERNEL_RCSID(0, $NetBSD: acpi.c,v 1.143 2010/01/09 15:43:12 jruoho Exp $);
 
 #include opt_acpi.h
 #include opt_pcifixup.h
@@ -171,6 +171,7 @@
 	PNP0B00,	/* AT RTC is handled internally */
 	PNP0C01,	/* No System Board driver */
 	PNP0C02,	/* No PnP motherboard register resources driver */
+	PNP0C0B,	/* No need for ACPI fan driver */
 	PNP0C0F,	/* ACPI PCI link devices are handled internally */
 	INT0800,	/* Intel HW RNG is handled internally */
 #endif



CVS commit: src/share/examples/rump

2010-01-09 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Sat Jan  9 16:19:17 UTC 2010

Added Files:
src/share/examples/rump: Makefile

Log Message:
Stick a top-level subdir-makefile here for easy build-testing.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/share/examples/rump/Makefile

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

Added files:

Index: src/share/examples/rump/Makefile
diff -u /dev/null src/share/examples/rump/Makefile:1.1
--- /dev/null	Sat Jan  9 16:19:17 2010
+++ src/share/examples/rump/Makefile	Sat Jan  9 16:19:17 2010
@@ -0,0 +1,6 @@
+#	$NetBSD: Makefile,v 1.1 2010/01/09 16:19:17 pooka Exp $
+#
+
+SUBDIR=	img2cgd sdread tipsy ulptprint umserv wirelessconf
+
+.include bsd.subdir.mk



CVS commit: src/sys/rump/librump

2010-01-09 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Sat Jan  9 16:29:32 UTC 2010

Modified Files:
src/sys/rump/librump/rumpdev: Makefile.rumpdev
src/sys/rump/librump/rumpkern: emul.c
Added Files:
src/sys/rump/librump/rumpdev/opt: wsdisplay.h

Log Message:
Include kern_pmf.c in rumpdev.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/rump/librump/rumpdev/Makefile.rumpdev
cvs rdiff -u -r0 -r1.1 src/sys/rump/librump/rumpdev/opt/wsdisplay.h
cvs rdiff -u -r1.115 -r1.116 src/sys/rump/librump/rumpkern/emul.c

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

Modified files:

Index: src/sys/rump/librump/rumpdev/Makefile.rumpdev
diff -u src/sys/rump/librump/rumpdev/Makefile.rumpdev:1.2 src/sys/rump/librump/rumpdev/Makefile.rumpdev:1.3
--- src/sys/rump/librump/rumpdev/Makefile.rumpdev:1.2	Sun Sep  6 20:42:26 2009
+++ src/sys/rump/librump/rumpdev/Makefile.rumpdev	Sat Jan  9 16:29:32 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.rumpdev,v 1.2 2009/09/06 20:42:26 pooka Exp $
+#	$NetBSD: Makefile.rumpdev,v 1.3 2010/01/09 16:29:32 pooka Exp $
 #
 
 .include ${RUMPTOP}/Makefile.rump
@@ -11,13 +11,13 @@
 SRCS=	rump_dev.c autoconf.c
 
 # sys/kern
-SRCS+=	subr_autoconf.c
+SRCS+=	kern_pmf.c subr_autoconf.c
 
 # automatically in sync src/lib
 SHLIB_MAJOR=0
 SHLIB_MINOR=0
 
-CPPFLAGS+=	-I${RUMPTOP}/librump/rumpkern
+CPPFLAGS+=	-I${RUMPTOP}/librump/rumpkern -I${RUMPTOP}/librump/rumpdev/opt
 CPPFLAGS+=	-Wno-pointer-sign
 
 .include bsd.lib.mk

Index: src/sys/rump/librump/rumpkern/emul.c
diff -u src/sys/rump/librump/rumpkern/emul.c:1.115 src/sys/rump/librump/rumpkern/emul.c:1.116
--- src/sys/rump/librump/rumpkern/emul.c:1.115	Fri Jan  8 20:04:06 2010
+++ src/sys/rump/librump/rumpkern/emul.c	Sat Jan  9 16:29:32 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: emul.c,v 1.115 2010/01/08 20:04:06 dyoung Exp $	*/
+/*	$NetBSD: emul.c,v 1.116 2010/01/09 16:29:32 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007 Antti Kantee.  All Rights Reserved.
@@ -28,7 +28,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: emul.c,v 1.115 2010/01/08 20:04:06 dyoung Exp $);
+__KERNEL_RCSID(0, $NetBSD: emul.c,v 1.116 2010/01/09 16:29:32 pooka Exp $);
 
 #include sys/param.h
 #include sys/null.h
@@ -451,23 +451,6 @@
 	rumpuser_exit(0);
 }
 
-bool
-pmf_device_register1(struct device *dev,
-	bool (*suspend)(device_t, pmf_qual_t),
-	bool (*resume)(device_t, pmf_qual_t),
-	bool (*shutdown)(device_t, int))
-{
-
-	return true;
-}
-
-void
-pmf_device_deregister(struct device *dev)
-{
-
-	/* nada */
-}
-
 int
 syscall_establish(const struct emul *em, const struct syscall_package *sp)
 {

Added files:

Index: src/sys/rump/librump/rumpdev/opt/wsdisplay.h
diff -u /dev/null src/sys/rump/librump/rumpdev/opt/wsdisplay.h:1.1
--- /dev/null	Sat Jan  9 16:29:32 2010
+++ src/sys/rump/librump/rumpdev/opt/wsdisplay.h	Sat Jan  9 16:29:32 2010
@@ -0,0 +1 @@
+/*	$NetBSD: wsdisplay.h,v 1.1 2010/01/09 16:29:32 pooka Exp $	*/



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

2010-01-09 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Sat Jan  9 16:32:57 UTC 2010

Modified Files:
src/sys/rump/librump/rumpdev: rump_dev.c

Log Message:
pmf_init()


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/rump/librump/rumpdev/rump_dev.c

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

Modified files:

Index: src/sys/rump/librump/rumpdev/rump_dev.c
diff -u src/sys/rump/librump/rumpdev/rump_dev.c:1.9 src/sys/rump/librump/rumpdev/rump_dev.c:1.10
--- src/sys/rump/librump/rumpdev/rump_dev.c:1.9	Fri Dec  4 22:13:59 2009
+++ src/sys/rump/librump/rumpdev/rump_dev.c	Sat Jan  9 16:32:57 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: rump_dev.c,v 1.9 2009/12/04 22:13:59 haad Exp $	*/
+/*	$NetBSD: rump_dev.c,v 1.10 2010/01/09 16:32:57 pooka Exp $	*/
 
 /*
  * Copyright (c) 2009 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rump_dev.c,v 1.9 2009/12/04 22:13:59 haad Exp $);
+__KERNEL_RCSID(0, $NetBSD: rump_dev.c,v 1.10 2010/01/09 16:32:57 pooka Exp $);
 
 #include sys/param.h
 #include sys/device.h
@@ -51,6 +51,8 @@
 {
 	extern int cold;
 
+	pmf_init();
+
 	KERNEL_LOCK(1, curlwp);
 
 	config_init_mi();



CVS commit: src/share/man/man7

2010-01-09 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sat Jan  9 17:28:06 UTC 2010

Modified Files:
src/share/man/man7: sysctl.7

Log Message:
It's hw.acpi.supported_states, not hw.acpi.support_states.  From
rudolf on netbsd-d...@.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/share/man/man7/sysctl.7

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/man7/sysctl.7
diff -u src/share/man/man7/sysctl.7:1.29 src/share/man/man7/sysctl.7:1.30
--- src/share/man/man7/sysctl.7:1.29	Mon Dec  7 23:48:01 2009
+++ src/share/man/man7/sysctl.7	Sat Jan  9 17:28:06 2010
@@ -1,4 +1,4 @@
-.\	$NetBSD: sysctl.7,v 1.29 2009/12/07 23:48:01 wiz Exp $
+.\	$NetBSD: sysctl.7,v 1.30 2010/01/09 17:28:06 snj Exp $
 .\
 .\ Copyright (c) 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\
 .\	@(#)sysctl.3	8.4 (Berkeley) 5/9/95
 .\
-.Dd December 7, 2009
+.Dd January 9, 2010
 .Dt SYSCTL 7
 .Os
 .Sh NAME
@@ -174,7 +174,7 @@
 .El
 .Pp
 .Bl -tag -width 123456
-.It Li hw.acpi.support_states
+.It Li hw.acpi.supported_states
 List of possible
 .Tn ACPI
 sleep states.



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

2010-01-09 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Sat Jan  9 20:50:11 UTC 2010

Modified Files:
src/sys/arch/x86/include: i82489reg.h

Log Message:
add LAPIC_MSR_ENABLE_x2 MSR. from mur...@river-styx via port-amd64@
   '...as documented in the Intel 64 and IA32 Architectures Software
   Developers Manual 3A, chapter 10.5.1.'


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/x86/include/i82489reg.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/x86/include/i82489reg.h
diff -u src/sys/arch/x86/include/i82489reg.h:1.8 src/sys/arch/x86/include/i82489reg.h:1.9
--- src/sys/arch/x86/include/i82489reg.h:1.8	Mon May 12 18:36:20 2008
+++ src/sys/arch/x86/include/i82489reg.h	Sat Jan  9 20:50:11 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: i82489reg.h,v 1.8 2008/05/12 18:36:20 ad Exp $	*/
+/*	$NetBSD: i82489reg.h,v 1.9 2010/01/09 20:50:11 cegger Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2008 The NetBSD Foundation, Inc.
@@ -149,6 +149,7 @@
 
 #define	LAPIC_MSR	0x001b
 #	define	LAPIC_MSR_BSP		0x0100	/* boot processor */
+#	define	LAPIC_MSR_ENABLE_x2	0x0400	/* x2APIC mode */
 #	define	LAPIC_MSR_ENABLE	0x0800	/* software enable */
 #	define	LAPIC_MSR_ADDR		0xf000	/* physical address */
 



CVS commit: src/sys/arch/x86

2010-01-09 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Sat Jan  9 20:56:17 UTC 2010

Modified Files:
src/sys/arch/x86/include: cpu.h mpconfig.h
src/sys/arch/x86/x86: mpacpi.c

Log Message:
add x2apic support.
patch presented on current-users@, port-i386@ and port-amd64@ on 2009-12-22

No comments.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/x86/include/cpu.h
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/x86/include/mpconfig.h
cvs rdiff -u -r1.83 -r1.84 src/sys/arch/x86/x86/mpacpi.c

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

Modified files:

Index: src/sys/arch/x86/include/cpu.h
diff -u src/sys/arch/x86/include/cpu.h:1.18 src/sys/arch/x86/include/cpu.h:1.19
--- src/sys/arch/x86/include/cpu.h:1.18	Sat Nov 21 03:11:01 2009
+++ src/sys/arch/x86/include/cpu.h	Sat Jan  9 20:56:17 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.h,v 1.18 2009/11/21 03:11:01 rmind Exp $	*/
+/*	$NetBSD: cpu.h,v 1.19 2010/01/09 20:56:17 cegger Exp $	*/
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -59,6 +59,7 @@
 
 #include sys/cpu_data.h
 #include sys/evcnt.h
+#include sys/device_if.h /* for device_t */
 
 struct intrsource;
 struct pmap;
@@ -76,7 +77,7 @@
  */
 
 struct cpu_info {
-	struct device *ci_dev;		/* pointer to our device */
+	device_t ci_dev;		/* pointer to our device */
 	struct cpu_info *ci_self;	/* self-pointer */
 	volatile struct vcpu_info *ci_vcpu; /* for XEN */
 	void	*ci_tlog_base;		/* Trap log base */
@@ -93,7 +94,7 @@
 	int	ci_fpused;		/* XEN: FPU was used by curlwp */
 	cpuid_t ci_cpuid;		/* our CPU ID */
 	int	ci_cpumask;		/* (1  CPU ID) */
-	uint8_t ci_initapicid;		/* our intitial APIC ID */
+	uint32_t ci_initapicid;		/* our intitial APIC ID */
 	uint8_t ci_packageid;
 	uint8_t ci_coreid;
 	uint8_t ci_smtid;
@@ -137,7 +138,7 @@
 
 	uint32_t ci_flags;		/* flags; see below */
 	uint32_t ci_ipis;		/* interprocessor interrupts pending */
-	int sc_apic_version;		/* local APIC version */
+	uint32_t sc_apic_version;	/* local APIC version */
 
 	uint32_t	ci_signature;	 /* X86 cpuid type */
 	uint32_t	ci_feature_flags;/* X86 %edx CPUID feature bits */

Index: src/sys/arch/x86/include/mpconfig.h
diff -u src/sys/arch/x86/include/mpconfig.h:1.11 src/sys/arch/x86/include/mpconfig.h:1.12
--- src/sys/arch/x86/include/mpconfig.h:1.11	Fri Apr 17 21:07:58 2009
+++ src/sys/arch/x86/include/mpconfig.h	Sat Jan  9 20:56:17 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: mpconfig.h,v 1.11 2009/04/17 21:07:58 dyoung Exp $	*/
+/*	$NetBSD: mpconfig.h,v 1.12 2010/01/09 20:56:17 cegger Exp $	*/
 
 /*
  * Definitions originally from the mpbios code, but now used for ACPI
@@ -59,7 +59,7 @@
 	int type;		/* from mp spec intr record */
  	int flags;		/* from mp spec intr record */
 	uint32_t redir;
-	int cpu_id;
+	uint32_t cpu_id;
 	int global_int;		/* ACPI global interrupt number */
 	int sflags;		/* other, software flags (see below) */
 	void *linkdev;

Index: src/sys/arch/x86/x86/mpacpi.c
diff -u src/sys/arch/x86/x86/mpacpi.c:1.83 src/sys/arch/x86/x86/mpacpi.c:1.84
--- src/sys/arch/x86/x86/mpacpi.c:1.83	Tue Jan  5 17:23:18 2010
+++ src/sys/arch/x86/x86/mpacpi.c	Sat Jan  9 20:56:17 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: mpacpi.c,v 1.83 2010/01/05 17:23:18 jruoho Exp $	*/
+/*	$NetBSD: mpacpi.c,v 1.84 2010/01/09 20:56:17 cegger Exp $	*/
 
 /*
  * Copyright (c) 2003 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: mpacpi.c,v 1.83 2010/01/05 17:23:18 jruoho Exp $);
+__KERNEL_RCSID(0, $NetBSD: mpacpi.c,v 1.84 2010/01/09 20:56:17 cegger Exp $);
 
 #include acpica.h
 #include opt_acpi.h
@@ -181,6 +181,7 @@
 	ACPI_MADT_NMI_SOURCE *ioapic_nmi;
 	ACPI_MADT_LOCAL_APIC_NMI *lapic_nmi;
 	ACPI_MADT_INTERRUPT_OVERRIDE *isa_ovr;
+	ACPI_MADT_LOCAL_X2APIC_NMI *x2apic_nmi;
 	struct pic *pic;
 	extern struct acpi_softc *acpi_softc;	/* XXX */
 
@@ -308,6 +309,22 @@
 			mpacpi_sci_override = mpi;
 
 		break;
+
+	case ACPI_MADT_TYPE_LOCAL_X2APIC_NMI:
+		x2apic_nmi = (ACPI_MADT_LOCAL_X2APIC_NMI *)hdrp;
+
+		mpi = mp_intrs[*index];
+		(*index)++;
+		mpi-next = NULL;
+		mpi-bus = NULL;
+		mpi-ioapic = NULL;
+		mpi-type = MPS_INTTYPE_NMI;
+		mpi-ioapic_pin = x2apic_nmi-Lint;
+		mpi-cpu_id = x2apic_nmi-Uid;
+		mpi-redir = (IOAPIC_REDLO_DEL_NMIIOAPIC_REDLO_DEL_SHIFT);
+		mpi-global_int = -1;
+		break;
+
 	default:
 		break;
 	}
@@ -325,6 +342,7 @@
 
 	switch (hdrp-Type) {
 	case ACPI_MADT_TYPE_LOCAL_APIC:
+	case ACPI_MADT_TYPE_LOCAL_X2APIC:
 		mpacpi_ncpu++;
 		break;
 	case ACPI_MADT_TYPE_IO_APIC:
@@ -332,6 +350,7 @@
 		break;
 	case ACPI_MADT_TYPE_NMI_SOURCE:
 	case ACPI_MADT_TYPE_LOCAL_APIC_NMI:
+	case ACPI_MADT_TYPE_LOCAL_X2APIC_NMI:
 		mpacpi_nintsrc++;
 		break;
 	case ACPI_MADT_TYPE_LOCAL_APIC_OVERRIDE:
@@ -347,7 +366,8 @@
 mpacpi_config_cpu(ACPI_SUBTABLE_HEADER *hdrp, void *aux)
 {
 	device_t parent = aux;
-	ACPI_MADT_LOCAL_APIC *p;
+	ACPI_MADT_LOCAL_APIC *lapic;
+	ACPI_MADT_LOCAL_X2APIC 

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

2010-01-09 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Sat Jan  9 22:54:00 UTC 2010

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

Log Message:
TOPLIMIT for i386 PAE is 64GB.


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/sys/arch/x86/x86/x86_machdep.c

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

Modified files:

Index: src/sys/arch/x86/x86/x86_machdep.c
diff -u src/sys/arch/x86/x86/x86_machdep.c:1.37 src/sys/arch/x86/x86/x86_machdep.c:1.38
--- src/sys/arch/x86/x86/x86_machdep.c:1.37	Sun Nov 22 21:41:03 2009
+++ src/sys/arch/x86/x86/x86_machdep.c	Sat Jan  9 22:54:00 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: x86_machdep.c,v 1.37 2009/11/22 21:41:03 bouyer Exp $	*/
+/*	$NetBSD: x86_machdep.c,v 1.38 2010/01/09 22:54:00 cegger Exp $	*/
 
 /*-
  * Copyright (c) 2002, 2006, 2007 YAMAMOTO Takashi,
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: x86_machdep.c,v 1.37 2009/11/22 21:41:03 bouyer Exp $);
+__KERNEL_RCSID(0, $NetBSD: x86_machdep.c,v 1.38 2010/01/09 22:54:00 cegger Exp $);
 
 #include opt_modular.h
 
@@ -367,9 +367,13 @@
 	int i;
 
 #ifdef i386
-#define TOPLIMIT	0x1ULL
+#ifdef PAE
+#define TOPLIMIT	0x10ULL	/* 64GB */
 #else
-#define TOPLIMIT	0x1000ULL
+#define TOPLIMIT	0x1ULL	/* 4GB */
+#endif
+#else
+#define TOPLIMIT	0x1000ULL /* 16TB */
 #endif
 
 	if (seg_end  TOPLIMIT) {



CVS commit: src/usr.bin/patch

2010-01-09 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sun Jan 10 01:10:16 UTC 2010

Modified Files:
src/usr.bin/patch: util.c

Log Message:
Plug a memory leak. From Igor Zinovik.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/usr.bin/patch/util.c

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

Modified files:

Index: src/usr.bin/patch/util.c
diff -u src/usr.bin/patch/util.c:1.24 src/usr.bin/patch/util.c:1.25
--- src/usr.bin/patch/util.c:1.24	Fri Sep 19 18:33:34 2008
+++ src/usr.bin/patch/util.c	Sun Jan 10 01:10:16 2010
@@ -1,7 +1,7 @@
 /*
  * $OpenBSD: util.c,v 1.32 2006/03/11 19:41:30 otto Exp $
  * $DragonFly: src/usr.bin/patch/util.c,v 1.9 2007/09/29 23:11:10 swildner Exp $
- * $NetBSD: util.c,v 1.24 2008/09/19 18:33:34 joerg Exp $
+ * $NetBSD: util.c,v 1.25 2010/01/10 01:10:16 joerg Exp $
  */
 
 /*
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: util.c,v 1.24 2008/09/19 18:33:34 joerg Exp $);
+__RCSID($NetBSD: util.c,v 1.25 2010/01/10 01:10:16 joerg Exp $);
 
 #include sys/param.h
 #include sys/stat.h
@@ -326,8 +326,10 @@
 
 	if (striplast) {
 		char	*s = strrchr(tmpbuf, '/');
-		if (s == NULL)
+		if (s == NULL) {
+			free(tmpbuf);
 			return;	/* nothing to be done */
+		}
 		*s = '\0';
 	}
 	if (mkpath(tmpbuf) != 0)



CVS commit: src/external/cddl/osnet/dist/uts/common/fs/zfs

2010-01-09 Thread Adam Hamsik
Module Name:src
Committed By:   haad
Date:   Sun Jan 10 01:35:39 UTC 2010

Modified Files:
src/external/cddl/osnet/dist/uts/common/fs/zfs: zfs_replay.c

Log Message:
Fix problem in ZFS ZIL layer where unclean shutdown of filesystem can change
replayed file permissions to 777. Patch from FreeBSD. Original commit message:

Be careful which vattr fields are set during setattr replay.
Without this fix strange things can appear after unclean shutdown like
files with mode set to 0.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_replay.c

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

Modified files:

Index: src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_replay.c
diff -u src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_replay.c:1.2 src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_replay.c:1.3
--- src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_replay.c:1.2	Fri Aug  7 20:16:45 2009
+++ src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_replay.c	Sun Jan 10 01:35:39 2010
@@ -60,10 +60,14 @@
 {
 	VATTR_NULL(vap);
 	vap-va_mask = (uint_t)mask;
-	vap-va_type = IFTOVT(mode);
-	vap-va_mode = mode  MODEMASK;
-	vap-va_uid = (uid_t)(IS_EPHEMERAL(uid)) ? -1 : uid;
-	vap-va_gid = (gid_t)(IS_EPHEMERAL(gid)) ? -1 : gid;
+	if (mask  AT_TYPE)
+		vap-va_type = IFTOVT(mode);
+	if (mask  AT_MODE)
+		vap-va_mode = mode  MODEMASK;
+	if (mask  AT_UID)
+		vap-va_uid = (uid_t)(IS_EPHEMERAL(uid)) ? -1 : uid;
+	if (mask  AT_GID)
+		vap-va_gid = (gid_t)(IS_EPHEMERAL(gid)) ? -1 : gid;
 	vap-va_rdev = zfs_cmpldev(rdev);
 	vap-va_nodeid = nodeid;
 }



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

2010-01-09 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Jan 10 03:08:35 UTC 2010

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

Log Message:
Actually use a 32bit limit for the 32bit bus_dma_tag.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.9 -r1.1.2.10 src/sys/arch/mips/rmi/rmixl_obio.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/rmi/rmixl_obio.c
diff -u src/sys/arch/mips/rmi/rmixl_obio.c:1.1.2.9 src/sys/arch/mips/rmi/rmixl_obio.c:1.1.2.10
--- src/sys/arch/mips/rmi/rmixl_obio.c:1.1.2.9	Sun Jan 10 02:48:47 2010
+++ src/sys/arch/mips/rmi/rmixl_obio.c	Sun Jan 10 03:08:35 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: rmixl_obio.c,v 1.1.2.9 2010/01/10 02:48:47 matt Exp $	*/
+/*	$NetBSD: rmixl_obio.c,v 1.1.2.10 2010/01/10 03:08:35 matt Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002, 2003 Wasabi Systems, Inc.
@@ -40,7 +40,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rmixl_obio.c,v 1.1.2.9 2010/01/10 02:48:47 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: rmixl_obio.c,v 1.1.2.10 2010/01/10 03:08:35 matt Exp $);
 
 #include locators.h
 #include obio.h
@@ -180,11 +180,10 @@
 	if (rcp-rc_64bit_dmat._cookie == 0)
 		obio_dma_init_64(rcp-rc_64bit_dmat);
 
-	/* dma space for addr  512MB */
+	/* dma space for addr  4GB */
 	if (rcp-rc_32bit_dmat == NULL) {
 		error = bus_dmatag_subregion(rcp-rc_64bit_dmat,
-		0, MIPS_KSEG1_START - MIPS_KSEG0_START,
-		rcp-rc_32bit_dmat, 0);
+		0, (bus_addr_t)1  32, rcp-rc_32bit_dmat, 0);
 		if (error)
 			panic(%s: failed to create 32bit dma tag: %d,
 			__func__, error);
@@ -193,8 +192,7 @@
 	/* dma space for addr  512MB */
 	if (rcp-rc_29bit_dmat == NULL) {
 		error = bus_dmatag_subregion(rcp-rc_32bit_dmat,
-		0, MIPS_KSEG1_START - MIPS_KSEG0_START,
-		rcp-rc_29bit_dmat, 0);
+		0, (bus_addr_t)1  29, rcp-rc_29bit_dmat, 0);
 		if (error)
 			panic(%s: failed to create 29bit dma tag: %d,
 			__func__, error);



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

2010-01-09 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Jan 10 03:36:30 UTC 2010

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

Log Message:
put the cpu_number() into some messages.


To generate a diff of this commit:
cvs rdiff -u -r1.179 -r1.180 src/sys/arch/sparc/sparc/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/sparc/sparc/trap.c
diff -u src/sys/arch/sparc/sparc/trap.c:1.179 src/sys/arch/sparc/sparc/trap.c:1.180
--- src/sys/arch/sparc/sparc/trap.c:1.179	Sat Nov 21 04:16:52 2009
+++ src/sys/arch/sparc/sparc/trap.c	Sun Jan 10 03:36:30 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: trap.c,v 1.179 2009/11/21 04:16:52 rmind Exp $ */
+/*	$NetBSD: trap.c,v 1.180 2010/01/10 03:36:30 mrg Exp $ */
 
 /*
  * Copyright (c) 1996
@@ -49,7 +49,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: trap.c,v 1.179 2009/11/21 04:16:52 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: trap.c,v 1.180 2010/01/10 03:36:30 mrg Exp $);
 
 #include opt_ddb.h
 #include opt_compat_svr4.h
@@ -841,7 +841,8 @@
 		if (type == T_TEXTFAULT) {
 			(void) splhigh();
 		snprintb(bits, sizeof(bits), SER_BITS, ser);
-			printf(text fault: pc=0x%x ser=%s\n, pc, bits);
+			printf(cpu%d: text fault: pc=0x%x ser=%s\n,
+			   cpu_number(), pc, bits);
 			panic(kernel fault);
 			/* NOTREACHED */
 		}
@@ -942,8 +943,9 @@
 			if (!onfault) {
 (void) splhigh();
 snprintb(bits, sizeof(bits), SER_BITS, ser);
-printf(data fault: pc=0x%x addr=0x%x ser=%s\n,
-pc, v, bits);
+printf(cpu%d: data fault: pc=0x%x 
+   addr=0x%x ser=%s\n,
+   cpu_number(), pc, v, bits);
 panic(kernel fault);
 /* NOTREACHED */
 			}
@@ -1160,8 +1162,8 @@
 		if (sfsr  SFSR_AT_TEXT || type == T_TEXTFAULT) {
 			(void) splhigh();
 			snprintb(bits, sizeof(bits), SFSR_BITS, sfsr);
-			printf(text fault: pc=0x%x sfsr=%s sfva=0x%x\n, pc,
-			bits, sfva);
+			printf(cpu%d text fault: pc=0x%x sfsr=%s sfva=0x%x\n,
+			   cpu_number(), pc, bits, sfva);
 			panic(kernel fault);
 			/* NOTREACHED */
 		}
@@ -1229,8 +1231,9 @@
 			if (!onfault) {
 (void) splhigh();
 snprintb(bits, sizeof(bits), SFSR_BITS, sfsr);
-printf(data fault: pc=0x%x addr=0x%x sfsr=%s\n,
-pc, sfva, bits);
+printf(cpu%d: data fault: pc=0x%x 
+   addr=0x%x sfsr=%s\n,
+   cpu_number(), pc, sfva, bits);
 panic(kernel fault);
 /* NOTREACHED */
 			}



CVS commit: src/etc

2010-01-09 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sun Jan 10 06:13:25 UTC 2010

Modified Files:
src/etc: Makefile

Log Message:
Fix installation permissions of /var/db/locate.database as per PR misc/41544.


To generate a diff of this commit:
cvs rdiff -u -r1.376 -r1.377 src/etc/Makefile

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

Modified files:

Index: src/etc/Makefile
diff -u src/etc/Makefile:1.376 src/etc/Makefile:1.377
--- src/etc/Makefile:1.376	Fri Dec 11 15:22:33 2009
+++ src/etc/Makefile	Sun Jan 10 06:13:25 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.376 2009/12/11 15:22:33 he Exp $
+#	$NetBSD: Makefile,v 1.377 2010/01/10 06:13:25 dholland Exp $
 #	from: @(#)Makefile	8.7 (Berkeley) 5/25/95
 
 # Environment variables without default values:
@@ -307,7 +307,7 @@
 		${BINOWN} operator	664	/etc/dumpdates  \
 		${BINOWN} operator	600	/etc/skeykeys \
 		root wheel		600	/var/at/at.deny \
-		nobody ${BINGRP}	664	/var/db/locate.database \
+		root wheel		664	/var/db/locate.database \
 		${BINOWN} ${BINGRP}	600	/var/log/authlog \
 		root wheel		600	/var/log/cron \
 		${BINOWN} ${UTMPGRP}	664	/var/log/lastlog \



CVS commit: src/libexec/ld.elf_so

2010-01-09 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Jan 10 06:37:33 UTC 2010

Modified Files:
src/libexec/ld.elf_so: rtld.c

Log Message:
Fixup comment.


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

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

Modified files:

Index: src/libexec/ld.elf_so/rtld.c
diff -u src/libexec/ld.elf_so/rtld.c:1.127 src/libexec/ld.elf_so/rtld.c:1.128
--- src/libexec/ld.elf_so/rtld.c:1.127	Wed Dec  2 15:50:13 2009
+++ src/libexec/ld.elf_so/rtld.c	Sun Jan 10 06:37:32 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: rtld.c,v 1.127 2009/12/02 15:50:13 christos Exp $	 */
+/*	$NetBSD: rtld.c,v 1.128 2010/01/10 06:37:32 skrll Exp $	 */
 
 /*
  * Copyright 1996 John D. Polstra.
@@ -40,7 +40,7 @@
 
 #include sys/cdefs.h
 #ifndef lint
-__RCSID($NetBSD: rtld.c,v 1.127 2009/12/02 15:50:13 christos Exp $);
+__RCSID($NetBSD: rtld.c,v 1.128 2010/01/10 06:37:32 skrll Exp $);
 #endif /* not lint */
 
 #include err.h
@@ -231,10 +231,12 @@
 	_rtld_objself.strtab = _rtld_sym_zero;
 
 	/*
-	 * Set value to -relocabase so that
-	 * _rtld_objself.relocbase + _rtld_smy_zero.st_value == 0
+	 * Set value to -relocbase so that
+	 *
+	 * _rtld_objself.relocbase + _rtld_sym_zero.st_value == 0
+	 *
 	 * This allows unresolved references to weak symbols to be computed
-	 * to value a value of 0.
+	 * to a value of 0.
 	 */
 	_rtld_sym_zero.st_value = -(uintptr_t)relocbase;
 



CVS commit: src/sys/dev/ic

2010-01-09 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sun Jan 10 07:06:13 UTC 2010

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

Log Message:
Add a missing closing parenthesis in a few places.  From Henning Petersen
in PR kern/42527.


To generate a diff of this commit:
cvs rdiff -u -r1.60 -r1.61 src/sys/dev/ic/smc90cx6.c

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

Modified files:

Index: src/sys/dev/ic/smc90cx6.c
diff -u src/sys/dev/ic/smc90cx6.c:1.60 src/sys/dev/ic/smc90cx6.c:1.61
--- src/sys/dev/ic/smc90cx6.c:1.60	Sun May 31 14:11:17 2009
+++ src/sys/dev/ic/smc90cx6.c	Sun Jan 10 07:06:12 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: smc90cx6.c,v 1.60 2009/05/31 14:11:17 he Exp $ */
+/*	$NetBSD: smc90cx6.c,v 1.61 2010/01/10 07:06:12 snj Exp $ */
 
 /*-
  * Copyright (c) 1994, 1995, 1998 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: smc90cx6.c,v 1.60 2009/05/31 14:11:17 he Exp $);
+__KERNEL_RCSID(0, $NetBSD: smc90cx6.c,v 1.61 2010/01/10 07:06:12 snj Exp $);
 
 /* #define BAHSOFTCOPY */
 #define BAHRETRANSMIT /**/
@@ -288,7 +288,7 @@
 
 #ifdef BAH_DEBUG
 	printf(%s: reset: bits cleared, status=0x%02x\n,
-	device_xname(sc-sc_dev), GETREG(BAHSTAT);
+	device_xname(sc-sc_dev), GETREG(BAHSTAT));
 #endif
 
 	sc-sc_reconcount_excessive = ARC_EXCESSIVE_RECONS;
@@ -304,7 +304,7 @@
 
 #ifdef BAH_DEBUG
 	printf(%s: reset: started receiver, status=0x%02x\n,
-	device_xname(sc-sc_dev), GETREG(BAHSTAT);
+	device_xname(sc-sc_dev), GETREG(BAHSTAT));
 #endif
 
 	/* and init transmitter status */
@@ -845,7 +845,7 @@
 	printf(%s: strt rx for buf %ld, 
 	stat 0x%02x\n,
 	device_xname(sc-sc_dev), sc-sc_rx_act,
-	GETREG(BAHSTAT);
+	GETREG(BAHSTAT));
 #endif
 }
 



CVS commit: src/libexec/ld.elf_so

2010-01-09 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Jan 10 07:29:47 UTC 2010

Modified Files:
src/libexec/ld.elf_so: map_object.c rtld.h symbol.c

Log Message:
Reset the COMBRELOC cache Obj_Entry if it was freed.

Fixes PR 41482. Done slightly differently to the patch in the PR.


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/libexec/ld.elf_so/map_object.c
cvs rdiff -u -r1.82 -r1.83 src/libexec/ld.elf_so/rtld.h
cvs rdiff -u -r1.48 -r1.49 src/libexec/ld.elf_so/symbol.c

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

Modified files:

Index: src/libexec/ld.elf_so/map_object.c
diff -u src/libexec/ld.elf_so/map_object.c:1.38 src/libexec/ld.elf_so/map_object.c:1.39
--- src/libexec/ld.elf_so/map_object.c:1.38	Tue May 19 20:44:52 2009
+++ src/libexec/ld.elf_so/map_object.c	Sun Jan 10 07:29:47 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: map_object.c,v 1.38 2009/05/19 20:44:52 christos Exp $	 */
+/*	$NetBSD: map_object.c,v 1.39 2010/01/10 07:29:47 skrll Exp $	 */
 
 /*
  * Copyright 1996 John D. Polstra.
@@ -34,7 +34,7 @@
 
 #include sys/cdefs.h
 #ifndef lint
-__RCSID($NetBSD: map_object.c,v 1.38 2009/05/19 20:44:52 christos Exp $);
+__RCSID($NetBSD: map_object.c,v 1.39 2010/01/10 07:29:47 skrll Exp $);
 #endif /* not lint */
 
 #include errno.h
@@ -325,6 +325,9 @@
 		xfree(elm);
 	}
 	xfree(obj);
+#ifdef COMBRELOC
+	_rtld_combreloc_reset(obj);
+#endif
 }
 
 Obj_Entry *

Index: src/libexec/ld.elf_so/rtld.h
diff -u src/libexec/ld.elf_so/rtld.h:1.82 src/libexec/ld.elf_so/rtld.h:1.83
--- src/libexec/ld.elf_so/rtld.h:1.82	Tue Nov 17 18:44:33 2009
+++ src/libexec/ld.elf_so/rtld.h	Sun Jan 10 07:29:47 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: rtld.h,v 1.82 2009/11/17 18:44:33 skrll Exp $	 */
+/*	$NetBSD: rtld.h,v 1.83 2010/01/10 07:29:47 skrll Exp $	 */
 
 /*
  * Copyright 1996 John D. Polstra.
@@ -278,6 +278,9 @@
 const Obj_Entry *, const Obj_Entry **, bool);
 const Elf_Sym *_rtld_symlook_needed(const char *, unsigned long,
 const Needed_Entry *, const Obj_Entry **, bool);
+#ifdef COMBRELOC
+void _rtld_combreloc_reset(const Obj_Entry *);
+#endif
 
 /* map_object.c */
 Obj_Entry *_rtld_map_object(const char *, int, const struct stat *);

Index: src/libexec/ld.elf_so/symbol.c
diff -u src/libexec/ld.elf_so/symbol.c:1.48 src/libexec/ld.elf_so/symbol.c:1.49
--- src/libexec/ld.elf_so/symbol.c:1.48	Thu Sep 24 21:21:34 2009
+++ src/libexec/ld.elf_so/symbol.c	Sun Jan 10 07:29:47 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: symbol.c,v 1.48 2009/09/24 21:21:34 pooka Exp $	 */
+/*	$NetBSD: symbol.c,v 1.49 2010/01/10 07:29:47 skrll Exp $	 */
 
 /*
  * Copyright 1996 John D. Polstra.
@@ -40,7 +40,7 @@
 
 #include sys/cdefs.h
 #ifndef lint
-__RCSID($NetBSD: symbol.c,v 1.48 2009/09/24 21:21:34 pooka Exp $);
+__RCSID($NetBSD: symbol.c,v 1.49 2010/01/10 07:29:47 skrll Exp $);
 #endif /* not lint */
 
 #include err.h
@@ -236,6 +236,21 @@
 	return NULL;
 }
 
+#ifdef COMBRELOC
+static const Obj_Entry *_rtld_last_refobj;
+
+/*
+ * Called when an object is freed. Reset the cached symbol look up if
+ * our last referencing or definition object just got unloaded.
+ */
+void
+_rtld_combreloc_reset(const Obj_Entry *obj)
+{
+	if (_rtld_last_refobj == obj)
+		_rtld_last_refobj = NULL;
+}
+#endif
+
 /*
  * Given a symbol number in a referencing object, find the corresponding
  * definition of the symbol.  Returns a pointer to the symbol, or NULL if
@@ -261,11 +276,10 @@
 	 * return the cached results.
 	 */
 	static unsigned long last_symnum;
-	static const Elf_Sym *last_def;
-	static const Obj_Entry *last_refobj;
 	static const Obj_Entry *last_defobj;
+	static const Elf_Sym *last_def;
 
-	if (symnum == last_symnum  refobj == last_refobj
+	if (symnum == last_symnum  refobj == _rtld_last_refobj
 	 in_plt == false) {
 		*defobj_out = last_defobj;
 		return last_def;
@@ -319,7 +333,7 @@
 			 * non-PLT lookup.
 			 */
 			last_symnum = symnum;
-			last_refobj = refobj;
+			_rtld_last_refobj = refobj;
 			last_def = def;
 			last_defobj = defobj;
 		}



CVS commit: src/doc

2010-01-09 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sun Jan 10 07:37:09 UTC 2010

Modified Files:
src/doc: 3RDPARTY

Log Message:
new tzcode


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

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

Modified files:

Index: src/doc/3RDPARTY
diff -u src/doc/3RDPARTY:1.743 src/doc/3RDPARTY:1.744
--- src/doc/3RDPARTY:1.743	Sun Dec 27 01:44:13 2009
+++ src/doc/3RDPARTY	Sun Jan 10 07:37:09 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.743 2009/12/27 01:44:13 christos Exp $
+#	$NetBSD: 3RDPARTY,v 1.744 2010/01/10 07:37:09 mlelstv Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -1052,8 +1052,8 @@
 Notes:
 
 Package:	tz
-Version:	tzcode2004a / tzdata2009h
-Current Vers:	tzcode2009h / tzdata2009h
+Version:	tzcode2009k / tzdata2009h
+Current Vers:	tzcode2009k / tzdata2009h
 Maintainer:	Arthur David Olson a...@elsie.nci.nih.gov
 Archive Site:	ftp://elsie.nci.nih.gov/pub/
 Home Page: