CVS commit: src/sys/arch/news68k/news68k

2009-12-12 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Dec 12 09:54:42 UTC 2009

Modified Files:
src/sys/arch/news68k/news68k: locore.s

Log Message:
Allow NetBSD/news68k kernel work with PGSHIFT==13, i.e. 8KB/page.
Tested on NWS-1750 with 68030.


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/sys/arch/news68k/news68k/locore.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/news68k/news68k/locore.s
diff -u src/sys/arch/news68k/news68k/locore.s:1.50 src/sys/arch/news68k/news68k/locore.s:1.51
--- src/sys/arch/news68k/news68k/locore.s:1.50	Fri Dec 11 18:28:35 2009
+++ src/sys/arch/news68k/news68k/locore.s	Sat Dec 12 09:54:42 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.s,v 1.50 2009/12/11 18:28:35 tsutsui Exp $	*/
+/*	$NetBSD: locore.s,v 1.51 2009/12/12 09:54:42 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1980, 1990, 1993
@@ -423,7 +423,11 @@
 	.long	0x4e7b0007		| movc %d0,%dtt1
 	.word	0xf4d8			| cinva bc
 	.word	0xf518			| pflusha
+#if PGSHIFT == 13
+	movl	#0xc000,%d0
+#else
 	movl	#0x8000,%d0
+#endif
 	.long	0x4e7b0003		| movc %d0,%tc
 	movl	#CACHE40_ON,%d0
 	movc	%d0,%cacr		| turn on both caches
@@ -435,7 +439,11 @@
 	.long	0xf0100800		| pmove %a0@,%tt0
 #endif
 	RELOC(prototc, %a2)
+#if PGSHIFT == 13
+	movl	#0x82d08b00,%a2@	| value to load TC with
+#else
 	movl	#0x82c0aa00,%a2@	| value to load TC with
+#endif
 	pmove	%a2@,%tc		| load it
 
 /*



CVS commit: src/sys/compat

2009-12-12 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Sat Dec 12 10:30:09 UTC 2009

Modified Files:
src/sys/compat/linux32/common: linux32_socket.c
src/sys/compat/netbsd32: netbsd32_ipc.c netbsd32_netbsd.c

Log Message:
Add missing semicolons after NETBSD32TOx_UAP macro calls.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/compat/linux32/common/linux32_socket.c
cvs rdiff -u -r1.16 -r1.17 src/sys/compat/netbsd32/netbsd32_ipc.c
cvs rdiff -u -r1.161 -r1.162 src/sys/compat/netbsd32/netbsd32_netbsd.c

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

Modified files:

Index: src/sys/compat/linux32/common/linux32_socket.c
diff -u src/sys/compat/linux32/common/linux32_socket.c:1.14 src/sys/compat/linux32/common/linux32_socket.c:1.15
--- src/sys/compat/linux32/common/linux32_socket.c:1.14	Thu Dec 10 17:07:26 2009
+++ src/sys/compat/linux32/common/linux32_socket.c	Sat Dec 12 10:30:09 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux32_socket.c,v 1.14 2009/12/10 17:07:26 njoly Exp $ */
+/*	$NetBSD: linux32_socket.c,v 1.15 2009/12/12 10:30:09 njoly Exp $ */
 
 /*-
  * Copyright (c) 2006 Emmanuel Dreyfus, all rights reserved.
@@ -33,7 +33,7 @@
 
 #include sys/cdefs.h
 
-__KERNEL_RCSID(0, $NetBSD: linux32_socket.c,v 1.14 2009/12/10 17:07:26 njoly Exp $);
+__KERNEL_RCSID(0, $NetBSD: linux32_socket.c,v 1.15 2009/12/12 10:30:09 njoly Exp $);
 
 #include sys/types.h
 #include sys/param.h
@@ -109,7 +109,7 @@
 	NETBSD32TO64_UAP(domain);
 	NETBSD32TO64_UAP(type);
 	NETBSD32TO64_UAP(protocol);
-	NETBSD32TOP_UAP(rsv, int)
+	NETBSD32TOP_UAP(rsv, int);
 
 	return linux_sys_socketpair(l, ua, retval);
 }
@@ -232,7 +232,7 @@
 	struct linux_sys_bind_args ua;
 
 	NETBSD32TO64_UAP(s);
-	NETBSD32TOP_UAP(name, struct osockaddr)
+	NETBSD32TOP_UAP(name, struct osockaddr);
 	NETBSD32TO64_UAP(namelen);
 
 	return linux_sys_bind(l, ua, retval);
@@ -249,7 +249,7 @@
 	struct linux_sys_connect_args ua;
 
 	NETBSD32TO64_UAP(s);
-	NETBSD32TOP_UAP(name, struct osockaddr)
+	NETBSD32TOP_UAP(name, struct osockaddr);
 	NETBSD32TO64_UAP(namelen);
 
 #ifdef DEBUG_LINUX
@@ -271,7 +271,7 @@
 	struct linux_sys_accept_args ua;
 
 	NETBSD32TO64_UAP(s);
-	NETBSD32TOP_UAP(name, struct osockaddr)
+	NETBSD32TOP_UAP(name, struct osockaddr);
 	NETBSD32TOP_UAP(anamelen, int);
 
 	return linux_sys_accept(l, ua, retval);
@@ -288,7 +288,7 @@
 	struct linux_sys_getpeername_args ua;
 
 	NETBSD32TO64_UAP(fdes);
-	NETBSD32TOP_UAP(asa, struct sockaddr)
+	NETBSD32TOP_UAP(asa, struct sockaddr);
 	NETBSD32TOP_UAP(alen, int);
 
 	return linux_sys_getpeername(l, ua, retval);
@@ -305,7 +305,7 @@
 	struct linux_sys_getsockname_args ua;
 
 	NETBSD32TO64_UAP(fdec);
-	NETBSD32TOP_UAP(asa, char)
+	NETBSD32TOP_UAP(asa, char);
 	NETBSD32TOP_UAP(alen, int);
 
 	return linux_sys_getsockname(l, ua, retval);

Index: src/sys/compat/netbsd32/netbsd32_ipc.c
diff -u src/sys/compat/netbsd32/netbsd32_ipc.c:1.16 src/sys/compat/netbsd32/netbsd32_ipc.c:1.17
--- src/sys/compat/netbsd32/netbsd32_ipc.c:1.16	Sun Jan 11 02:45:49 2009
+++ src/sys/compat/netbsd32/netbsd32_ipc.c	Sat Dec 12 10:30:09 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_ipc.c,v 1.16 2009/01/11 02:45:49 christos Exp $	*/
+/*	$NetBSD: netbsd32_ipc.c,v 1.17 2009/12/12 10:30:09 njoly Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: netbsd32_ipc.c,v 1.16 2009/01/11 02:45:49 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: netbsd32_ipc.c,v 1.17 2009/12/12 10:30:09 njoly Exp $);
 
 #if defined(_KERNEL_OPT)
 #include opt_sysv.h
@@ -347,8 +347,8 @@
 	} */
 	struct sys_shmget_args ua;
 
-	NETBSD32TOX_UAP(key, key_t)
-	NETBSD32TOX_UAP(size, size_t)
+	NETBSD32TOX_UAP(key, key_t);
+	NETBSD32TOX_UAP(size, size_t);
 	NETBSD32TO64_UAP(shmflg);
 	return (sys_shmget(l, ua, retval));
 }

Index: src/sys/compat/netbsd32/netbsd32_netbsd.c
diff -u src/sys/compat/netbsd32/netbsd32_netbsd.c:1.161 src/sys/compat/netbsd32/netbsd32_netbsd.c:1.162
--- src/sys/compat/netbsd32/netbsd32_netbsd.c:1.161	Thu Dec 10 14:10:35 2009
+++ src/sys/compat/netbsd32/netbsd32_netbsd.c	Sat Dec 12 10:30:09 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_netbsd.c,v 1.161 2009/12/10 14:10:35 matt Exp $	*/
+/*	$NetBSD: netbsd32_netbsd.c,v 1.162 2009/12/12 10:30:09 njoly Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001, 2008 Matthew R. Green
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: netbsd32_netbsd.c,v 1.161 2009/12/10 14:10:35 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: netbsd32_netbsd.c,v 1.162 2009/12/12 10:30:09 njoly Exp $);
 
 #if defined(_KERNEL_OPT)
 #include opt_ddb.h
@@ -1096,7 +1096,7 @@
 	struct sys_rename_args ua;
 
 	NETBSD32TOP_UAP(from, const char);
-	NETBSD32TOP_UAP(to, const char)
+	NETBSD32TOP_UAP(to, const char);
 
 	return (sys_rename(l, ua, retval));
 }
@@ -,7 +,7 @@
 	struct sys_flock_args ua;
 
 	NETBSD32TO64_UAP(fd);
-	NETBSD32TO64_UAP(how)
+	

CVS commit: src/sys/compat/netbsd32

2009-12-12 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Sat Dec 12 10:32:26 UTC 2009

Modified Files:
src/sys/compat/netbsd32: netbsd32.h

Log Message:
Remove semicolon from NETBSD32TOx_UAP macro definitions.


To generate a diff of this commit:
cvs rdiff -u -r1.82 -r1.83 src/sys/compat/netbsd32/netbsd32.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/compat/netbsd32/netbsd32.h
diff -u src/sys/compat/netbsd32/netbsd32.h:1.82 src/sys/compat/netbsd32/netbsd32.h:1.83
--- src/sys/compat/netbsd32/netbsd32.h:1.82	Mon Mar 16 20:48:13 2009
+++ src/sys/compat/netbsd32/netbsd32.h	Sat Dec 12 10:32:26 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32.h,v 1.82 2009/03/16 20:48:13 njoly Exp $	*/
+/*	$NetBSD: netbsd32.h,v 1.83 2009/12/12 10:32:26 njoly Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001, 2008 Matthew R. Green
@@ -832,10 +832,10 @@
 	SCARG(uap, name) = (type)(long)SCARG(s32uap, name)
 
 /* and some standard versions */
-#define	NETBSD32TO64_UAP(name)		NETBSD32TO64(uap, ua, name);
-#define	NETBSD32TOP_UAP(name, type)	NETBSD32TOP(uap, ua, name, type);
-#define	NETBSD32TOX_UAP(name, type)	NETBSD32TOX(uap, ua, name, type);
-#define	NETBSD32TOX64_UAP(name, type)	NETBSD32TOX64(uap, ua, name, type);
+#define	NETBSD32TO64_UAP(name)		NETBSD32TO64(uap, ua, name)
+#define	NETBSD32TOP_UAP(name, type)	NETBSD32TOP(uap, ua, name, type)
+#define	NETBSD32TOX_UAP(name, type)	NETBSD32TOX(uap, ua, name, type)
+#define	NETBSD32TOX64_UAP(name, type)	NETBSD32TOX64(uap, ua, name, type)
 
 #define	SCARG_P32(uap, name) NETBSD32PTR64(SCARG(uap, name))
 



CVS commit: src/sys/dev

2009-12-12 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Dec 12 11:16:33 UTC 2009

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

Log Message:
KNF


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/dev/clock_subr.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/clock_subr.c
diff -u src/sys/dev/clock_subr.c:1.13 src/sys/dev/clock_subr.c:1.14
--- src/sys/dev/clock_subr.c:1.13	Sat Feb 14 20:32:29 2009
+++ src/sys/dev/clock_subr.c	Sat Dec 12 11:16:33 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: clock_subr.c,v 1.13 2009/02/14 20:32:29 perry Exp $	*/
+/*	$NetBSD: clock_subr.c,v 1.14 2009/12/12 11:16:33 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1982, 1990, 1993
@@ -84,7 +84,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: clock_subr.c,v 1.13 2009/02/14 20:32:29 perry Exp $);
+__KERNEL_RCSID(0, $NetBSD: clock_subr.c,v 1.14 2009/12/12 11:16:33 tsutsui Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -121,7 +121,7 @@
 rv = 1;
 		}
 	}
-	return (rv);
+	return rv;
 }
 
 time_t
@@ -136,7 +136,8 @@
 	 * Compute days since start of time
 	 * First from years, then from months.
 	 */
-	if (year  POSIX_BASE_YEAR) return -1;
+	if (year  POSIX_BASE_YEAR)
+		return -1;
 	days = 0;
 	for (i = POSIX_BASE_YEAR; i  year; i++)
 		days += days_in_year(i);
@@ -154,8 +155,9 @@
 	* 60 + dt-dt_min)
 	* 60 + dt-dt_sec;
 
-	if ((time_t)secs != secs) return -1;
-	return (secs);
+	if ((time_t)secs != secs)
+		return -1;
+	return secs;
 }
 
 void



CVS commit: src/sys/dev

2009-12-12 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Dec 12 11:22:59 UTC 2009

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

Log Message:
Use time_t to calculate days and secs to avoid potential overflow.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/dev/clock_subr.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/clock_subr.c
diff -u src/sys/dev/clock_subr.c:1.14 src/sys/dev/clock_subr.c:1.15
--- src/sys/dev/clock_subr.c:1.14	Sat Dec 12 11:16:33 2009
+++ src/sys/dev/clock_subr.c	Sat Dec 12 11:22:59 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: clock_subr.c,v 1.14 2009/12/12 11:16:33 tsutsui Exp $	*/
+/*	$NetBSD: clock_subr.c,v 1.15 2009/12/12 11:22:59 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1982, 1990, 1993
@@ -84,7 +84,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: clock_subr.c,v 1.14 2009/12/12 11:16:33 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: clock_subr.c,v 1.15 2009/12/12 11:22:59 tsutsui Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -164,8 +164,9 @@
 clock_secs_to_ymdhms(time_t secs, struct clock_ymdhms *dt)
 {
 	int mthdays[12];
-	int i, days;
-	int rsec;	/* remainder seconds */
+	int i;
+	time_t days;
+	time_t rsec;	/* remainder seconds */
 
 	/*
 	 * This function uses a local copy of month_days[]



CVS commit: src/sys/kern

2009-12-12 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Dec 12 11:28:40 UTC 2009

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

Log Message:
Don't use int to get delta of time_t values.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/sys/kern/kern_todr.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/kern_todr.c
diff -u src/sys/kern/kern_todr.c:1.29 src/sys/kern/kern_todr.c:1.30
--- src/sys/kern/kern_todr.c:1.29	Sat Mar 21 15:01:57 2009
+++ src/sys/kern/kern_todr.c	Sat Dec 12 11:28:40 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_todr.c,v 1.29 2009/03/21 15:01:57 ad Exp $	*/
+/*	$NetBSD: kern_todr.c,v 1.30 2009/12/12 11:28:40 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -76,7 +76,7 @@
  *	@(#)clock.c	8.1 (Berkeley) 6/10/93
  */
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: kern_todr.c,v 1.29 2009/03/21 15:01:57 ad Exp $);
+__KERNEL_RCSID(0, $NetBSD: kern_todr.c,v 1.30 2009/12/12 11:28:40 tsutsui Exp $);
 
 #include sys/param.h
 #include sys/kernel.h
@@ -152,7 +152,7 @@
 			printf(WARNING: no TOD clock present\n);
 		badrtc = 1;
 	} else {
-		int deltat = tv.tv_sec - base;
+		time_t deltat = tv.tv_sec - base;
 
 		if (deltat  0)
 			deltat = -deltat;
@@ -166,12 +166,12 @@
  * does by more than the threshold,
  * believe the filesystem.
  */
-printf(WARNING: clock lost %d days\n,
+printf(WARNING: clock lost % PRId64  days\n,
 deltat / SECDAY);
 badrtc = 1;
 			} else {
-aprint_verbose(WARNING: clock gained %d 
-days\n, deltat / SECDAY);
+aprint_verbose(WARNING: clock gained % PRId64
+ days\n, deltat / SECDAY);
 goodtime = 1;
 			}
 		} else {



CVS commit: src/sys/kern

2009-12-12 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Dec 12 11:35:16 UTC 2009

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

Log Message:
Use bool where appropriate.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/sys/kern/kern_todr.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/kern_todr.c
diff -u src/sys/kern/kern_todr.c:1.30 src/sys/kern/kern_todr.c:1.31
--- src/sys/kern/kern_todr.c:1.30	Sat Dec 12 11:28:40 2009
+++ src/sys/kern/kern_todr.c	Sat Dec 12 11:35:16 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_todr.c,v 1.30 2009/12/12 11:28:40 tsutsui Exp $	*/
+/*	$NetBSD: kern_todr.c,v 1.31 2009/12/12 11:35:16 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -76,7 +76,7 @@
  *	@(#)clock.c	8.1 (Berkeley) 6/10/93
  */
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: kern_todr.c,v 1.30 2009/12/12 11:28:40 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: kern_todr.c,v 1.31 2009/12/12 11:35:16 tsutsui Exp $);
 
 #include sys/param.h
 #include sys/kernel.h
@@ -103,7 +103,7 @@
 	todr_handle = todr;
 }
 
-static int timeset = 0;
+static bool timeset = false;
 
 /*
  * Set up the system's time, given a `reasonable' time value.
@@ -111,7 +111,10 @@
 void
 inittodr(time_t base)
 {
-	int badbase = 0, waszero = (base == 0), goodtime = 0, badrtc = 0;
+	bool badbase = false;
+	bool waszero = (base == 0);
+	bool goodtime = false;
+	bool badrtc = false;
 	int s;
 	struct timespec ts;
 	struct timeval tv;
@@ -133,7 +136,7 @@
 		basedate.dt_min = 0;
 		basedate.dt_sec = 0;
 		base = clock_ymdhms_to_secs(basedate);
-		badbase = 1;
+		badbase = true;
 	}
 
 	/*
@@ -150,14 +153,14 @@
 			printf(WARNING: preposterous TOD clock time\n);
 		else
 			printf(WARNING: no TOD clock present\n);
-		badrtc = 1;
+		badrtc = true;
 	} else {
 		time_t deltat = tv.tv_sec - base;
 
 		if (deltat  0)
 			deltat = -deltat;
 
-		if ((badbase == 0)  deltat = 2 * SECDAY) {
+		if (!badbase  deltat = 2 * SECDAY) {
 			
 			if (tv.tv_sec  base) {
 /*
@@ -168,14 +171,14 @@
  */
 printf(WARNING: clock lost % PRId64  days\n,
 deltat / SECDAY);
-badrtc = 1;
+badrtc = true;
 			} else {
 aprint_verbose(WARNING: clock gained % PRId64
  days\n, deltat / SECDAY);
-goodtime = 1;
+goodtime = true;
 			}
 		} else {
-			goodtime = 1;
+			goodtime = true;
 		}
 	}
 
@@ -190,7 +193,7 @@
 		tv.tv_usec = 0;
 	}
 
-	timeset = 1;
+	timeset = true;
 
 	ts.tv_sec = tv.tv_sec;
 	ts.tv_nsec = tv.tv_usec * 1000;



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

2009-12-12 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Sat Dec 12 11:38:45 UTC 2009

Modified Files:
src/sys/arch/zaurus/dev: zapm.c

Log Message:
use APM_BATT_FLAG_CHARGING.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/zaurus/dev/zapm.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/zaurus/dev/zapm.c
diff -u src/sys/arch/zaurus/dev/zapm.c:1.6 src/sys/arch/zaurus/dev/zapm.c:1.7
--- src/sys/arch/zaurus/dev/zapm.c:1.6	Fri Apr  3 04:13:17 2009
+++ src/sys/arch/zaurus/dev/zapm.c	Sat Dec 12 11:38:45 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: zapm.c,v 1.6 2009/04/03 04:13:17 uwe Exp $	*/
+/*	$NetBSD: zapm.c,v 1.7 2009/12/12 11:38:45 nonaka Exp $	*/
 /*	$OpenBSD: zaurus_apm.c,v 1.13 2006/12/12 23:14:28 dim Exp $	*/
 
 /*
@@ -18,7 +18,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: zapm.c,v 1.6 2009/04/03 04:13:17 uwe Exp $);
+__KERNEL_RCSID(0, $NetBSD: zapm.c,v 1.7 2009/12/12 11:38:45 nonaka Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -809,7 +809,7 @@
 zapm_set_charging(sc, 0);
 			}
 		} else if (!charge_completed) {
-			charging = 1;
+			charging = APM_BATT_FLAG_CHARGING;
 			volt = zapm_get_battery_volt();
 			zapm_set_charging(sc, 1);
 			DPRINTF((zapm_poll: start charging volt %d\n, volt));



CVS commit: src/sys/arch/vax/vax

2009-12-12 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Dec 12 12:19:21 UTC 2009

Modified Files:
src/sys/arch/vax/vax: subr.S

Log Message:
Fix register usage in previous proc0paddr-lwp0.l_addr change: do not
overwrite %r1 yet, it is later used to calculate the kernel stack pointer.
As a side effect the right value is stored in $PR_PCBB again.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/vax/vax/subr.S

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

Modified files:

Index: src/sys/arch/vax/vax/subr.S
diff -u src/sys/arch/vax/vax/subr.S:1.28 src/sys/arch/vax/vax/subr.S:1.29
--- src/sys/arch/vax/vax/subr.S:1.28	Thu Dec 10 05:10:04 2009
+++ src/sys/arch/vax/vax/subr.S	Sat Dec 12 12:19:21 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr.S,v 1.28 2009/12/10 05:10:04 rmind Exp $	   */
+/*	$NetBSD: subr.S,v 1.29 2009/12/12 12:19:21 martin Exp $	   */
 
 /*
  * Copyright (c) 1994 Ludd, University of Lule}, Sweden.
@@ -124,7 +124,7 @@
 3:	addl3	_C_LABEL(esym),$0x3ff,%r0	# Round symbol table end
 	bicl3	$0x3ff,%r0,%r1			# 
 	movl	%r1,_C_LABEL(lwp0)+L_PCB	# lwp0 pcb, XXXuvm_lwp_getuarea
-	bicl2	$0x8000,%r1			# get phys lwp0 uarea addr
+	bicl3	$0x8000,%r1,%r0		# get phys lwp0 uarea addr
 	mtpr	%r0,$PR_PCBB			# Save in IPR PCBB
 	addl3	$USPACE,%r1,%r0			# Get kernel stack top
 	mtpr	%r0,$PR_KSP			# put in IPR KSP



CVS commit: src/sys/arch/vax/vax

2009-12-12 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Dec 12 12:23:29 UTC 2009

Modified Files:
src/sys/arch/vax/vax: vm_machdep.c

Log Message:
Clear new pcb in cpu_lwp_fork, now that this seems to no longer be
guaranteed to be zeroed memory after the uarea swap changes.
XXX shouldn't we zero the new uarea upfront in MI code before calling
uvm_lwp_fork?


To generate a diff of this commit:
cvs rdiff -u -r1.110 -r1.111 src/sys/arch/vax/vax/vm_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/vax/vax/vm_machdep.c
diff -u src/sys/arch/vax/vax/vm_machdep.c:1.110 src/sys/arch/vax/vax/vm_machdep.c:1.111
--- src/sys/arch/vax/vax/vm_machdep.c:1.110	Sun Nov 29 04:15:43 2009
+++ src/sys/arch/vax/vax/vm_machdep.c	Sat Dec 12 12:23:29 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: vm_machdep.c,v 1.110 2009/11/29 04:15:43 rmind Exp $	 */
+/*	$NetBSD: vm_machdep.c,v 1.111 2009/12/12 12:23:29 martin Exp $	 */
 
 /*
  * Copyright (c) 1994 Ludd, University of Lule}, Sweden.
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: vm_machdep.c,v 1.110 2009/11/29 04:15:43 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: vm_machdep.c,v 1.111 2009/12/12 12:23:29 martin Exp $);
 
 #include opt_execfmt.h
 #include opt_compat_ultrix.h
@@ -113,6 +113,11 @@
 #endif
 
 	/*
+	 * Clear new pcb
+	 */
+	memset(pcb2, 0, sizeof(*pcb2));
+
+	/*
 	 * Copy the trap frame.
 	 */
 	uv = uvm_lwp_getuarea(l2);



CVS commit: src/sys/arch/amiga

2009-12-12 Thread Frank Wille
Module Name:src
Committed By:   phx
Date:   Sat Dec 12 13:10:36 UTC 2009

Modified Files:
src/sys/arch/amiga/amiga: amiga_init.c locore.s
src/sys/arch/amiga/dev: clock.c kbd.c

Log Message:
Reverted the CIA-timer based delay() to the pre-5.0 method of a calibrated
delay loop.
This fixes keyboard handshaking problems with some A1200 models since 5.0
and restores the precision for short delays on DraCo systems (the QuickLogic
timer has only a seventh of the CIA precision).
Changed the keyboard handshaking delay from 2000 back to 200ms, although
even the recommended 85ms were successfully tested on the most problematic
A1200 keyboards.
All those changes were tested on an A3000 and A1200 with 68060/50 CPU, and
previously discussed on the port-amiga ML.


To generate a diff of this commit:
cvs rdiff -u -r1.117 -r1.118 src/sys/arch/amiga/amiga/amiga_init.c
cvs rdiff -u -r1.148 -r1.149 src/sys/arch/amiga/amiga/locore.s
cvs rdiff -u -r1.50 -r1.51 src/sys/arch/amiga/dev/clock.c
cvs rdiff -u -r1.52 -r1.53 src/sys/arch/amiga/dev/kbd.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/amiga/amiga/amiga_init.c
diff -u src/sys/arch/amiga/amiga/amiga_init.c:1.117 src/sys/arch/amiga/amiga/amiga_init.c:1.118
--- src/sys/arch/amiga/amiga/amiga_init.c:1.117	Fri Dec 11 22:23:08 2009
+++ src/sys/arch/amiga/amiga/amiga_init.c	Sat Dec 12 13:10:36 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: amiga_init.c,v 1.117 2009/12/11 22:23:08 tsutsui Exp $	*/
+/*	$NetBSD: amiga_init.c,v 1.118 2009/12/12 13:10:36 phx Exp $	*/
 
 /*
  * Copyright (c) 1994 Michael L. Hitch
@@ -36,7 +36,7 @@
 #include opt_devreload.h
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: amiga_init.c,v 1.117 2009/12/11 22:23:08 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: amiga_init.c,v 1.118 2009/12/12 13:10:36 phx Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -765,6 +765,7 @@
 void
 start_c_finish(void)
 {
+	extern u_int32_t delaydivisor;
 #ifdef	P5PPC68KBOARD
 struct cfdev *cdp, *ecdp;
 #endif
@@ -895,6 +896,21 @@
 			}
 }
 #endif
+	/*
+	 * preliminary delay divisor value
+	 */
+
+	if (machineid  AMIGA_68060)
+		delaydivisor = (1024 * 1) / 80;	/* 80 MHz 68060 w. BTC */
+
+	else if (machineid  AMIGA_68040)
+		delaydivisor = (1024 * 3) / 40;	/* 40 MHz 68040 */
+
+	else if (machineid  AMIGA_68030)
+		delaydivisor = (1024 * 8) / 50;	/* 50 MHz 68030 */
+
+	else
+		delaydivisor = (1024 * 8) / 33; /* 33 MHz 68020 */
 }
 
 void

Index: src/sys/arch/amiga/amiga/locore.s
diff -u src/sys/arch/amiga/amiga/locore.s:1.148 src/sys/arch/amiga/amiga/locore.s:1.149
--- src/sys/arch/amiga/amiga/locore.s:1.148	Fri Dec  4 17:28:54 2009
+++ src/sys/arch/amiga/amiga/locore.s	Sat Dec 12 13:10:36 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.s,v 1.148 2009/12/04 17:28:54 tsutsui Exp $	*/
+/*	$NetBSD: locore.s,v 1.149 2009/12/12 13:10:36 phx Exp $	*/
 
 /*
  * Copyright (c) 1980, 1990 The Regents of the University of California.
@@ -1573,6 +1573,16 @@
 	.align 2
 #endif
 	nop
+ENTRY_NOPROFILE(delay)
+ENTRY_NOPROFILE(DELAY)
+	movql #10,%d1		| 2 +2
+	movl %sp@(4),%d0	| 4 +4
+	lsll %d1,%d0		| 8 +2
+	movl _C_LABEL(delaydivisor),%d1	| A +6
+Ldelay:| longword aligned again.
+	subl %d1,%d0
+	jcc Ldelay
+	rts
 
 #ifdef M68060
 ENTRY_NOPROFILE(intemu60)
@@ -1603,7 +1613,11 @@
 	.long	FPU_NONE
 GLOBAL(protorp)
 	.long	0x8002,0	| prototype root pointer
-
+GLOBAL(delaydivisor)
+	.long	12		| should be enough for 80 MHz 68060
+| will be adapted to other CPUs in
+| start_c_cleanup and calibrated
+| at clock attach time.
 #ifdef DEBUG
 ASGLOBAL(fulltflush)
 	.long	0

Index: src/sys/arch/amiga/dev/clock.c
diff -u src/sys/arch/amiga/dev/clock.c:1.50 src/sys/arch/amiga/dev/clock.c:1.51
--- src/sys/arch/amiga/dev/clock.c:1.50	Fri Sep 11 19:43:08 2009
+++ src/sys/arch/amiga/dev/clock.c	Sat Dec 12 13:10:36 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: clock.c,v 1.50 2009/09/11 19:43:08 phx Exp $ */
+/*	$NetBSD: clock.c,v 1.51 2009/12/12 13:10:36 phx Exp $ */
 
 /*
  * Copyright (c) 1982, 1990 The Regents of the University of California.
@@ -77,7 +77,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: clock.c,v 1.50 2009/09/11 19:43:08 phx Exp $);
+__KERNEL_RCSID(0, $NetBSD: clock.c,v 1.51 2009/12/12 13:10:36 phx Exp $);
 
 #include sys/param.h
 #include sys/kernel.h
@@ -100,26 +100,6 @@
 #include sys/PROF.h
 #endif
 
-/* the clocks run at NTSC: 715.909kHz or PAL: 709.379kHz.
-   We're using a 100 Hz clock. */
-int amiga_clk_interval;
-int eclockfreq;
-unsigned int fast_delay_limit;
-struct CIA *clockcia;
-
-static u_int clk_getcounter(struct timecounter *);
-
-static struct timecounter clk_timecounter = {
-	clk_getcounter,	/* get_timecount */
-	0,		/* no poll_pps */
-	~0u,		/* counter_mask */
-	0,		/* frequency */
-	clock,	/* name, overriden later */
-	100,		/* quality */
-	NULL,		/* prev */
-	NULL,		/* next */
-};
-
 /*
  * Machine-dependent clock 

CVS commit: src/sys/dev/usb

2009-12-12 Thread Cherry G. Mathew
Module Name:src
Committed By:   cherry
Date:   Sat Dec 12 14:01:54 UTC 2009

Modified Files:
src/sys/dev/usb: usbdevs

Log Message:
Add product IDs for Qualcomm RWT FCT-CDMA 2000 1xRTT Modem, ZTE Storage and 
CDMA 1xEVDO Modem
From $FreeBSD: head/sys/dev/usb/usbdevs 199331 2009-11-16 20:35:16Z thompsa $


To generate a diff of this commit:
cvs rdiff -u -r1.537 -r1.538 src/sys/dev/usb/usbdevs

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/usbdevs
diff -u src/sys/dev/usb/usbdevs:1.537 src/sys/dev/usb/usbdevs:1.538
--- src/sys/dev/usb/usbdevs:1.537	Sun Nov 15 17:33:28 2009
+++ src/sys/dev/usb/usbdevs	Sat Dec 12 14:01:54 2009
@@ -1,4 +1,4 @@
-$NetBSD: usbdevs,v 1.537 2009/11/15 17:33:28 tsutsui Exp $
+$NetBSD: usbdevs,v 1.538 2009/12/12 14:01:54 cherry Exp $
 
 /*
  * Copyright (c) 1998-2004 The NetBSD Foundation, Inc.
@@ -1940,8 +1940,11 @@
 /* Qualcomm products */
 product QUALCOMM CDMA_MSM	0x6000	CDMA Technologies MSM phone
 product QUALCOMM MSM_HSDPA	0x6613	HSDPA MSM
+product QUALCOMM2 RWT_FCT   0x3100  RWT FCT-CDMA 2000 1xRTT modem
 product QUALCOMM2 CDMA_MSM	0x3196	CDMA Technologies MSM modem
 product QUALCOMMINC CDMA_MSM	0x0001	CDMA Technologies MSM modem
+product QUALCOMMINC ZTE_STOR	0x2000  USB ZTE Storage
+product QUALCOMMINC AC8700	0xfffe	CDMA 1xEVDO USB modem
 
 /* Qualcomm Kyocera products */
 product QUALCOMM_K CDMA_MSM_K	0x17da	Qualcomm Kyocera CDMA Technologies MSM



CVS commit: src/sys/dev/usb

2009-12-12 Thread Cherry G. Mathew
Module Name:src
Committed By:   cherry
Date:   Sat Dec 12 14:03:48 UTC 2009

Modified Files:
src/sys/dev/usb: usbdevs.h usbdevs_data.h

Log Message:
regen from usbdevs 1.538
 Add product IDs for Qualcomm RWT FCT-CDMA 2000 1xRTT Modem, ZTE Storage and 
 CDMA 1xEVDO Modem
 From $FreeBSD: head/sys/dev/usb/usbdevs 199331 2009-11-16 20:35:16Z thompsa $


To generate a diff of this commit:
cvs rdiff -u -r1.531 -r1.532 src/sys/dev/usb/usbdevs.h
cvs rdiff -u -r1.532 -r1.533 src/sys/dev/usb/usbdevs_data.h

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

Modified files:

Index: src/sys/dev/usb/usbdevs.h
diff -u src/sys/dev/usb/usbdevs.h:1.531 src/sys/dev/usb/usbdevs.h:1.532
--- src/sys/dev/usb/usbdevs.h:1.531	Sun Nov 15 17:34:32 2009
+++ src/sys/dev/usb/usbdevs.h	Sat Dec 12 14:03:48 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: usbdevs.h,v 1.531 2009/11/15 17:34:32 tsutsui Exp $	*/
+/*	$NetBSD: usbdevs.h,v 1.532 2009/12/12 14:03:48 cherry Exp $	*/
 
 /*
  * THIS FILE IS AUTOMATICALLY GENERATED.  DO NOT EDIT.
@@ -1947,8 +1947,11 @@
 /* Qualcomm products */
 #define	USB_PRODUCT_QUALCOMM_CDMA_MSM	0x6000		/* CDMA Technologies MSM phone */
 #define	USB_PRODUCT_QUALCOMM_MSM_HSDPA	0x6613		/* HSDPA MSM */
+#define	USB_PRODUCT_QUALCOMM2_RWT_FCT	0x3100		/* RWT FCT-CDMA 2000 1xRTT modem */
 #define	USB_PRODUCT_QUALCOMM2_CDMA_MSM	0x3196		/* CDMA Technologies MSM modem */
 #define	USB_PRODUCT_QUALCOMMINC_CDMA_MSM	0x0001		/* CDMA Technologies MSM modem */
+#define	USB_PRODUCT_QUALCOMMINC_ZTE_STOR	0x2000		/* USB ZTE Storage */
+#define	USB_PRODUCT_QUALCOMMINC_AC8700	0xfffe		/* CDMA 1xEVDO USB modem */
 
 /* Qualcomm Kyocera products */
 #define	USB_PRODUCT_QUALCOMM_K_CDMA_MSM_K	0x17da		/* Qualcomm Kyocera CDMA Technologies MSM */

Index: src/sys/dev/usb/usbdevs_data.h
diff -u src/sys/dev/usb/usbdevs_data.h:1.532 src/sys/dev/usb/usbdevs_data.h:1.533
--- src/sys/dev/usb/usbdevs_data.h:1.532	Sun Nov 15 17:34:32 2009
+++ src/sys/dev/usb/usbdevs_data.h	Sat Dec 12 14:03:48 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: usbdevs_data.h,v 1.532 2009/11/15 17:34:32 tsutsui Exp $	*/
+/*	$NetBSD: usbdevs_data.h,v 1.533 2009/12/12 14:03:48 cherry Exp $	*/
 
 /*
  * THIS FILE IS AUTOMATICALLY GENERATED.  DO NOT EDIT.
@@ -5659,6 +5659,10 @@
 	HSDPA MSM,
 	},
 	{
+	USB_VENDOR_QUALCOMM2, USB_PRODUCT_QUALCOMM2_RWT_FCT,
+	RWT FCT-CDMA 2000 1xRTT modem,
+	},
+	{
 	USB_VENDOR_QUALCOMM2, USB_PRODUCT_QUALCOMM2_CDMA_MSM,
 	CDMA Technologies MSM modem,
 	},
@@ -5667,6 +5671,14 @@
 	CDMA Technologies MSM modem,
 	},
 	{
+	USB_VENDOR_QUALCOMMINC, USB_PRODUCT_QUALCOMMINC_ZTE_STOR,
+	USB ZTE Storage,
+	},
+	{
+	USB_VENDOR_QUALCOMMINC, USB_PRODUCT_QUALCOMMINC_AC8700,
+	CDMA 1xEVDO USB modem,
+	},
+	{
 	USB_VENDOR_QUALCOMM_K, USB_PRODUCT_QUALCOMM_K_CDMA_MSM_K,
 	Qualcomm Kyocera CDMA Technologies MSM,
 	},
@@ -7019,4 +7031,4 @@
 	Prestige,
 	},
 };
-const int usb_nproducts = 1281;
+const int usb_nproducts = 1284;



CVS commit: src/sys/external/bsd/drm/dist/bsd-core

2009-12-12 Thread Mihai Chelaru
Module Name:src
Committed By:   kefren
Date:   Sat Dec 12 14:15:25 UTC 2009

Modified Files:
src/sys/external/bsd/drm/dist/bsd-core: radeon_drv.c

Log Message:
add stub pmf hook


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/external/bsd/drm/dist/bsd-core/radeon_drv.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/external/bsd/drm/dist/bsd-core/radeon_drv.c
diff -u src/sys/external/bsd/drm/dist/bsd-core/radeon_drv.c:1.4 src/sys/external/bsd/drm/dist/bsd-core/radeon_drv.c:1.5
--- src/sys/external/bsd/drm/dist/bsd-core/radeon_drv.c:1.4	Sun Dec  6 22:51:25 2009
+++ src/sys/external/bsd/drm/dist/bsd-core/radeon_drv.c	Sat Dec 12 14:15:25 2009
@@ -152,6 +152,9 @@
 
 	radeon_configure(dev);
 
+	if (!pmf_device_register(self, NULL, NULL))
+		aprint_error_dev(self, couldn't establish power handler\n);
+
 	drm_attach(self, pa, radeon_pciidlist);
 }
 



CVS commit: src/sys/dev/usb

2009-12-12 Thread Cherry G. Mathew
Module Name:src
Committed By:   cherry
Date:   Sat Dec 12 14:18:28 UTC 2009

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

Log Message:
Add ID for Qualcomminc AC8700 as found in ZTE, Incorporated ZTE CDMA Tech, rev 
1.10/0.00,  Works with BSNL (http://www.bsnl.co.in) EVDO service


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/dev/usb/ugensa.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/ugensa.c
diff -u src/sys/dev/usb/ugensa.c:1.24 src/sys/dev/usb/ugensa.c:1.25
--- src/sys/dev/usb/ugensa.c:1.24	Thu Nov 12 19:51:44 2009
+++ src/sys/dev/usb/ugensa.c	Sat Dec 12 14:18:27 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: ugensa.c,v 1.24 2009/11/12 19:51:44 dyoung Exp $	*/
+/*	$NetBSD: ugensa.c,v 1.25 2009/12/12 14:18:27 cherry Exp $	*/
 
 /*
  * Copyright (c) 2004, 2005 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ugensa.c,v 1.24 2009/11/12 19:51:44 dyoung Exp $);
+__KERNEL_RCSID(0, $NetBSD: ugensa.c,v 1.25 2009/12/12 14:18:27 cherry Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -96,6 +96,7 @@
 	{{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_FLEXPACKGPS }, 0 },
 	{{ USB_VENDOR_QUALCOMM_K, USB_PRODUCT_QUALCOMM_K_CDMA_MSM_K }, 0 },
 	{{ USB_VENDOR_DELL, USB_PRODUCT_DELL_HSDPA }, 0 },
+	{{ USB_VENDOR_QUALCOMMINC, USB_PRODUCT_QUALCOMMINC_AC8700 }, 0 },
 
 	/*
 	 * The following devices are untested, but they are purported to



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

2009-12-12 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Sat Dec 12 14:29:34 UTC 2009

Modified Files:
src/sys/arch/zaurus/dev: zapm.c

Log Message:
report collect charge state.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/zaurus/dev/zapm.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/zaurus/dev/zapm.c
diff -u src/sys/arch/zaurus/dev/zapm.c:1.8 src/sys/arch/zaurus/dev/zapm.c:1.9
--- src/sys/arch/zaurus/dev/zapm.c:1.8	Sat Dec 12 13:12:49 2009
+++ src/sys/arch/zaurus/dev/zapm.c	Sat Dec 12 14:29:34 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: zapm.c,v 1.8 2009/12/12 13:12:49 nonaka Exp $	*/
+/*	$NetBSD: zapm.c,v 1.9 2009/12/12 14:29:34 nonaka Exp $	*/
 /*	$OpenBSD: zaurus_apm.c,v 1.13 2006/12/12 23:14:28 dim Exp $	*/
 
 /*
@@ -18,7 +18,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: zapm.c,v 1.8 2009/12/12 13:12:49 nonaka Exp $);
+__KERNEL_RCSID(0, $NetBSD: zapm.c,v 1.9 2009/12/12 14:29:34 nonaka Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -402,16 +402,32 @@
 		pinfo-ac_state = val;
 	else
 		pinfo-ac_state = sc-ac_state;
+	DPRINTF((zapm: pinfo-ac_state: %d\n, pinfo-ac_state));
+
 	if (config_hook_call(CONFIG_HOOK_GET,
 			 CONFIG_HOOK_CHARGE, val) != -1)
 		pinfo-battery_state = val;
-	else
-		pinfo-battery_state = sc-battery_state;
+	else {
+		DPRINTF((zapm: sc-battery_state: %#x\n, sc-battery_state));
+		if (sc-battery_state  APM_BATT_FLAG_CHARGING)
+			pinfo-battery_flags = APM_BATT_FLAG_CHARGING;
+		else if (sc-battery_state  APM_BATT_FLAG_CRITICAL)
+			pinfo-battery_flags = APM_BATT_FLAG_CRITICAL;
+		else if (sc-battery_state  APM_BATT_FLAG_LOW)
+			pinfo-battery_flags = APM_BATT_FLAG_LOW;
+		else if (sc-battery_state  APM_BATT_FLAG_HIGH)
+			pinfo-battery_flags = APM_BATT_FLAG_HIGH;
+		else
+			pinfo-battery_flags = APM_BATT_FLAG_UNKNOWN;
+	}
+	DPRINTF((zapm: pinfo-battery_flags: %#x\n, pinfo-battery_flags));
+
 	if (config_hook_call(CONFIG_HOOK_GET,
 			 CONFIG_HOOK_BATTERYVAL, val) != -1)
 		pinfo-battery_life = val;
 	else
 		pinfo-battery_life = sc-battery_life;
+	DPRINTF((zapm: pinfo-battery_life: %d\n, pinfo-battery_life));
 
 	return 0;
 }



CVS commit: src/sys/dev/usb

2009-12-12 Thread Cherry G. Mathew
Module Name:src
Committed By:   cherry
Date:   Sat Dec 12 14:30:59 UTC 2009

Modified Files:
src/sys/dev/usb: usbdevs.h usbdevs_data.h

Log Message:
regen properly for usbdevs, 1.538, _after_ commit


To generate a diff of this commit:
cvs rdiff -u -r1.532 -r1.533 src/sys/dev/usb/usbdevs.h
cvs rdiff -u -r1.533 -r1.534 src/sys/dev/usb/usbdevs_data.h

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

Modified files:

Index: src/sys/dev/usb/usbdevs.h
diff -u src/sys/dev/usb/usbdevs.h:1.532 src/sys/dev/usb/usbdevs.h:1.533
--- src/sys/dev/usb/usbdevs.h:1.532	Sat Dec 12 14:03:48 2009
+++ src/sys/dev/usb/usbdevs.h	Sat Dec 12 14:30:59 2009
@@ -1,10 +1,10 @@
-/*	$NetBSD: usbdevs.h,v 1.532 2009/12/12 14:03:48 cherry Exp $	*/
+/*	$NetBSD: usbdevs.h,v 1.533 2009/12/12 14:30:59 cherry Exp $	*/
 
 /*
  * THIS FILE IS AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: usbdevs,v 1.537 2009/11/15 17:33:28 tsutsui Exp
+ *	NetBSD: usbdevs,v 1.538 2009/12/12 14:01:54 cherry Exp
  */
 
 /*

Index: src/sys/dev/usb/usbdevs_data.h
diff -u src/sys/dev/usb/usbdevs_data.h:1.533 src/sys/dev/usb/usbdevs_data.h:1.534
--- src/sys/dev/usb/usbdevs_data.h:1.533	Sat Dec 12 14:03:48 2009
+++ src/sys/dev/usb/usbdevs_data.h	Sat Dec 12 14:30:59 2009
@@ -1,10 +1,10 @@
-/*	$NetBSD: usbdevs_data.h,v 1.533 2009/12/12 14:03:48 cherry Exp $	*/
+/*	$NetBSD: usbdevs_data.h,v 1.534 2009/12/12 14:30:59 cherry Exp $	*/
 
 /*
  * THIS FILE IS AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: usbdevs,v 1.537 2009/11/15 17:33:28 tsutsui Exp
+ *	NetBSD: usbdevs,v 1.538 2009/12/12 14:01:54 cherry Exp
  */
 
 /*



CVS commit: src/sys

2009-12-12 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Dec 12 14:44:10 UTC 2009

Modified Files:
src/sys/arch/amiga/dev: drbbc.c
src/sys/arch/arm/ep93xx: eprtc.c
src/sys/arch/arm/xscale: pxa2x0_rtc.c
src/sys/arch/dreamcast/dev/g2: g2rtc.c
src/sys/arch/evbarm/ifpga: pl030_rtc.c
src/sys/arch/hp700/dev: pdc.c
src/sys/arch/hpcmips/vr: rtc.c
src/sys/arch/mac68k/mac68k: clock.c
src/sys/arch/macppc/dev: adb.c cuda.c pmu.c
src/sys/arch/mips/alchemy/dev: aurtc.c
src/sys/arch/next68k/next68k: rtc.c
src/sys/arch/sgimips/dev: dpclock.c dsclock.c
src/sys/arch/sgimips/mace: mcclock_mace.c
src/sys/arch/sparc/dev: rtc.c
src/sys/arch/vax/include: clock.h cpu.h
src/sys/arch/vax/vax: clock.c ka820.c
src/sys/arch/xen/xen: clock.c
src/sys/dev/dec: mcclock.c
src/sys/dev/i2c: m41st84.c m41t00.c max6900.c pcf8583.c r2025.c
rs5c372.c x1226.c
src/sys/dev/ic: mm58167.c

Log Message:
Remove `volatile' qualifier from argument types of
struct timeval passed to todr_gettime(9) and todr_settime(9).
We no longer have an ancient and volatile struct timeval `time'
global since we have switched to MI timercounter(9) on all port.

XXX1: some of these RTC drivers still assume 32bit time_t
XXX2: some of these should be rewritten to use todr_[gs]ettime_ymdhms()
XXX3: todr(9) man page doesn't mention todr_[gs]ettime_ymdhms()


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/amiga/dev/drbbc.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/ep93xx/eprtc.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/xscale/pxa2x0_rtc.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/dreamcast/dev/g2/g2rtc.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/evbarm/ifpga/pl030_rtc.c
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/hp700/dev/pdc.c
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/hpcmips/vr/rtc.c
cvs rdiff -u -r1.47 -r1.48 src/sys/arch/mac68k/mac68k/clock.c
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/macppc/dev/adb.c
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/macppc/dev/cuda.c
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/macppc/dev/pmu.c
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/mips/alchemy/dev/aurtc.c
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/next68k/next68k/rtc.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/sgimips/dev/dpclock.c \
src/sys/arch/sgimips/dev/dsclock.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/sgimips/mace/mcclock_mace.c
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/sparc/dev/rtc.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/vax/include/clock.h
cvs rdiff -u -r1.86 -r1.87 src/sys/arch/vax/include/cpu.h
cvs rdiff -u -r1.51 -r1.52 src/sys/arch/vax/vax/clock.c \
src/sys/arch/vax/vax/ka820.c
cvs rdiff -u -r1.52 -r1.53 src/sys/arch/xen/xen/clock.c
cvs rdiff -u -r1.23 -r1.24 src/sys/dev/dec/mcclock.c
cvs rdiff -u -r1.14 -r1.15 src/sys/dev/i2c/m41st84.c
cvs rdiff -u -r1.15 -r1.16 src/sys/dev/i2c/m41t00.c
cvs rdiff -u -r1.11 -r1.12 src/sys/dev/i2c/max6900.c \
src/sys/dev/i2c/pcf8583.c
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/i2c/r2025.c
cvs rdiff -u -r1.9 -r1.10 src/sys/dev/i2c/rs5c372.c
cvs rdiff -u -r1.13 -r1.14 src/sys/dev/i2c/x1226.c
cvs rdiff -u -r1.12 -r1.13 src/sys/dev/ic/mm58167.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/amiga/dev/drbbc.c
diff -u src/sys/arch/amiga/dev/drbbc.c:1.17 src/sys/arch/amiga/dev/drbbc.c:1.18
--- src/sys/arch/amiga/dev/drbbc.c:1.17	Mon Apr 28 20:23:12 2008
+++ src/sys/arch/amiga/dev/drbbc.c	Sat Dec 12 14:44:08 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: drbbc.c,v 1.17 2008/04/28 20:23:12 martin Exp $ */
+/*	$NetBSD: drbbc.c,v 1.18 2009/12/12 14:44:08 tsutsui Exp $ */
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: drbbc.c,v 1.17 2008/04/28 20:23:12 martin Exp $);
+__KERNEL_RCSID(0, $NetBSD: drbbc.c,v 1.18 2009/12/12 14:44:08 tsutsui Exp $);
 
 #include sys/param.h
 #include sys/kernel.h
@@ -59,8 +59,8 @@
 void drbbc_attach(struct device *, struct device *, void *);
 int drbbc_match(struct device *, struct cfdata *, void *);
 
-int dracougettod(todr_chip_handle_t, volatile struct timeval *);
-int dracousettod(todr_chip_handle_t, volatile struct timeval *);
+int dracougettod(todr_chip_handle_t, struct timeval *);
+int dracousettod(todr_chip_handle_t, struct timeval *);
 
 static struct todr_chip_handle dracotodr;
 struct drbbc_softc {
@@ -163,7 +163,7 @@
 }
 
 int
-dracougettod(todr_chip_handle_t h, volatile struct timeval *tvp)
+dracougettod(todr_chip_handle_t h, struct timeval *tvp)
 {
 	u_int32_t clkbuf;
 	u_int32_t usecs;
@@ -194,7 +194,7 @@
 }
 
 int
-dracousettod(todr_chip_handle_t h, volatile struct timeval *tvp)
+dracousettod(todr_chip_handle_t h, struct timeval *tvp)
 {
 	return (ENXIO);
 }

Index: src/sys/arch/arm/ep93xx/eprtc.c
diff -u src/sys/arch/arm/ep93xx/eprtc.c:1.2 

CVS commit: src/sys/dev

2009-12-12 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Dec 12 15:10:34 UTC 2009

Modified Files:
src/sys/dev: clock_subr.h

Log Message:
Remove `volatile' qualifier from argument types of
struct timeval passed to todr_gettime(9) and todr_settime(9).
We no longer have an ancient and volatile struct timeval `time'
global since we have switched to MI timercounter(9) on all port.

XXX1: some of these RTC drivers still assume 32bit time_t
XXX2: some of these should be rewritten to use todr_[gs]ettime_ymdhms()
XXX3: todr(9) man page doesn't mention todr_[gs]ettime_ymdhms()


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/dev/clock_subr.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/clock_subr.h
diff -u src/sys/dev/clock_subr.h:1.20 src/sys/dev/clock_subr.h:1.21
--- src/sys/dev/clock_subr.h:1.20	Mon Apr 28 20:23:46 2008
+++ src/sys/dev/clock_subr.h	Sat Dec 12 15:10:34 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: clock_subr.h,v 1.20 2008/04/28 20:23:46 martin Exp $	*/
+/*	$NetBSD: clock_subr.h,v 1.21 2009/12/12 15:10:34 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -77,10 +77,8 @@
 	void	*bus_cookie;	/* Bus specific data */
 	time_t	base_time;	/* Base time (e.g. rootfs time) */
 
-	int	(*todr_gettime)(struct todr_chip_handle *,
-volatile struct timeval *);
-	int	(*todr_settime)(struct todr_chip_handle *,
-volatile struct timeval *);
+	int	(*todr_gettime)(struct todr_chip_handle *, struct timeval *);
+	int	(*todr_settime)(struct todr_chip_handle *, struct timeval *);
 	int	(*todr_gettime_ymdhms)(struct todr_chip_handle *,
 				struct clock_ymdhms *);
 	int	(*todr_settime_ymdhms)(struct todr_chip_handle *,
@@ -96,8 +94,8 @@
 /*
  * Probably these should evolve into internal routines in kern_todr.c.
  */
-extern int todr_gettime(todr_chip_handle_t tch, volatile struct timeval *);
-extern int todr_settime(todr_chip_handle_t tch, volatile struct timeval *);
+extern int todr_gettime(todr_chip_handle_t tch, struct timeval *);
+extern int todr_settime(todr_chip_handle_t tch, struct timeval *);
 
 /*
  * Machine-dependent function that machine-independent RTC drivers can



CVS commit: src/sys/kern

2009-12-12 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Dec 12 15:17:23 UTC 2009

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

Log Message:
Remove `volatile' qualifier from argument types of
struct timeval passed to todr_gettime(9) and todr_settime(9).
We no longer have an ancient and volatile struct timeval `time'
global since we have switched to MI timercounter(9) on all port.

XXX1: some of these RTC drivers still assume 32bit time_t
XXX2: some of these should be rewritten to use todr_[gs]ettime_ymdhms()
XXX3: todr(9) man page doesn't mention todr_[gs]ettime_ymdhms()


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/kern/kern_todr.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/kern_todr.c
diff -u src/sys/kern/kern_todr.c:1.31 src/sys/kern/kern_todr.c:1.32
--- src/sys/kern/kern_todr.c:1.31	Sat Dec 12 11:35:16 2009
+++ src/sys/kern/kern_todr.c	Sat Dec 12 15:17:23 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_todr.c,v 1.31 2009/12/12 11:35:16 tsutsui Exp $	*/
+/*	$NetBSD: kern_todr.c,v 1.32 2009/12/12 15:17:23 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -76,7 +76,7 @@
  *	@(#)clock.c	8.1 (Berkeley) 6/10/93
  */
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: kern_todr.c,v 1.31 2009/12/12 11:35:16 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: kern_todr.c,v 1.32 2009/12/12 15:17:23 tsutsui Exp $);
 
 #include sys/param.h
 #include sys/kernel.h
@@ -240,7 +240,7 @@
 #ifdef	TODR_DEBUG
 static void
 todr_debug(const char *prefix, int rv, struct clock_ymdhms *dt,
-volatile struct timeval *tvp)
+struct timeval *tvp)
 {
 	struct timeval tv_val;
 	struct clock_ymdhms dt_val;
@@ -268,7 +268,7 @@
 
 
 int
-todr_gettime(todr_chip_handle_t tch, volatile struct timeval *tvp)
+todr_gettime(todr_chip_handle_t tch, struct timeval *tvp)
 {
 	struct clock_ymdhms	dt;
 	int			rv;
@@ -317,7 +317,7 @@
 }
 
 int
-todr_settime(todr_chip_handle_t tch, volatile struct timeval *tvp)
+todr_settime(todr_chip_handle_t tch, struct timeval *tvp)
 {
 	struct clock_ymdhms	dt;
 	int			rv;



CVS commit: src/sys/arch/hppa/hppa

2009-12-12 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Dec 12 15:25:32 UTC 2009

Modified Files:
src/sys/arch/hppa/hppa: trap.S

Log Message:
Correct/add comments.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/hppa/hppa/trap.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/hppa/hppa/trap.S
diff -u src/sys/arch/hppa/hppa/trap.S:1.32 src/sys/arch/hppa/hppa/trap.S:1.33
--- src/sys/arch/hppa/hppa/trap.S:1.32	Thu Dec 10 05:10:01 2009
+++ src/sys/arch/hppa/hppa/trap.S	Sat Dec 12 15:25:32 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: trap.S,v 1.32 2009/12/10 05:10:01 rmind Exp $	*/
+/*	$NetBSD: trap.S,v 1.33 2009/12/12 15:25:32 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -1302,14 +1302,15 @@
 	extru	%r17, 24, 25, %r17
 
 	.align	32
+
 /*
- * This is a handler for interruption 20, TLB dirty bit trap.  It
- * is used on the PA7000 (PCX), PA7000 (PCX-S), and PA7100 (PCX-T). XXXNH
+ * This is a handler for interruption 20, TLB dirty bit trap.  It is used on
+ * the PA7000 (PCX), PA7000 (PCX-S), and PA7100 (PCX-T).
  * Only shadowed registers are available, and they are:
  *
  * %r1 = C trap number
- * %r8 = data address space identifier
- * %r9 = data address offset
+ * %r8 = data address space identifier. Copied from %isr
+ * %r9 = data address offset. Copied from %ior
  * %r16 = undefined
  * %r17 = undefined
  * %r24 = undefined
@@ -1331,15 +1332,13 @@
 EXIT(TLABEL(tlbd_s))
 
 /*
- * This is a handler for interruption 6, Instruction TLB miss fault,
- * and interruption 16, Non-access instruction TLB miss fault.  It
- * is used on the PA7000 (PCX), PA7000 (PCX-S), PA7100 (PCX-T) and
- * PA7200 (PCX-T')
+ * This is a handler for interruption 6, Instruction TLB miss fault. It is
+ * used on the PA7000 (PCX), PA7000 (PCX-S), PA7100 (PCX-T) and PA7200 (PCX-T')
  * Only shadowed registers are available, and they are:
  *
  * %r1 = C trap number
- * %r8 = instruction address space identifier
- * %r9 = instruction address offset
+ * %r8 = instruction address space identifier. Copied from %pcsq
+ * %r9 = instruction address offset. Copied from %pcoq
  * %r16 = undefined
  * %r17 = undefined
  * %r24 = undefined
@@ -1363,15 +1362,13 @@
 EXIT(TLABEL(itlb_s))
 
 /*
- * This is a handler for interruption 15, Data TLB miss fault,
- * and interruption 17, Non-access data TLB miss fault.  It is
- * used on the PA7000 (PCX), PA7000 (PCX-S), PA7100 (PCX-T) and
- * PA7200 (PCX-T')
+ * This is a handler for interruption 15, Data TLB miss fault.  It is used on
+ * the PA7000 (PCX), PA7000 (PCX-S), PA7100 (PCX-T) and PA7200 (PCX-T').
  * Only shadowed registers are available, and they are:
  *
  * %r1 = C trap number
- * %r8 = data address space identifier
- * %r9 = data address offset
+ * %r8 = data address space identifier.  Copied from %isr.
+ * %r9 = data address offset.  Copied from %ior.
  * %r16 = undefined
  * %r17 = undefined
  * %r24 = undefined
@@ -1392,6 +1389,22 @@
 	nop
 EXIT(TLABEL(dtlb_s))
 
+/*
+ * This is a handler for interruption 16, Non-access instruction TLB miss
+ * fault, and interrupt 17, Non-access data TLB miss fault / Non-access data
+ * page fault.  It is used on the PA7000 (PCX), PA7000 (PCX-S), PA7100 (PCX-T)
+ * and PA7200 (PCX-T').
+ *
+ * Only shadowed registers are available, and they are:
+ *
+ * %r1 = C trap number
+ * %r8 = instruction address space identifier. Copied from %isr.
+ * %r9 = instruction address offset. Copied from %ior.
+ * %r16 = undefined
+ * %r17 = undefined
+ * %r24 = undefined
+ * %r25 = undefined
+ */
 LEAF_ENTRY_NOPROFILE(TLABEL(dtlbna_s))
 ALTENTRY(TLABEL(itlbna_s))
 ALTENTRY(TLABEL(dtlbna_t))
@@ -1470,36 +1483,22 @@
 	extru	%r17, 24, 25, %r17	/* tlbbtop(%r17) */		! \
 	sync
 
-/*
- * This is a handler for interruption 20, TLB dirty bit trap.  It
- * is used on the PA7100LC (PCX-L), PA7300LC (PCX-L2), PA8000 (PCX-U),
- * PA8200 (PCX-W), PA8500 (PCX-W), and PA8600 (PCX-W+).  Only shadowed 
- * registers are available, and they are:
- *
- * %r1 = C trap number
- * %r8 = data address space identifier
- * %r9 = data address offset
- * %r16 = undefined
- * %r17 = undefined
- * %r24 = undefined
- * %r25 = undefined
- */
+	.align	32
 
 /*
- * This is a handler for interruption 20, TLB dirty bit trap.  It
- * is used on the PA7100LC (PCX-L), PA7300LC (PCX-L2). Only shadowed
- * registers are available, and they are:
+ * This is a handler for interruption 20, TLB dirty bit trap.  It is used on
+ * the PA7100LC (PCX-L), PA7300LC (PCX-L2).
+ * Only shadowed registers are available, and they are:
  *
  * %r1 = C trap number
- * %r8 = data address space identifier
- * %r9 = data address offset
+ * %r8 = data address space identifier.  Copied from %ior.
+ * %r9 = data address offset  Copied from %isr.
  * %r16 = undefined
  * %r17 = undefined
  * %r24 = undefined
  * %r25 = undefined
  */
 
-	.align	32
 

CVS commit: src/sys/dev/ic

2009-12-12 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Dec 12 16:12:05 UTC 2009

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

Log Message:
Switch to using todr_[gs]ettime_ymdhms() format
which don't require struct timeval details.
Also fix a botch calling MI todr_settime(9) without rtc_offset adjustment.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/dev/ic/mm58167.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/mm58167.c
diff -u src/sys/dev/ic/mm58167.c:1.13 src/sys/dev/ic/mm58167.c:1.14
--- src/sys/dev/ic/mm58167.c:1.13	Sat Dec 12 14:44:10 2009
+++ src/sys/dev/ic/mm58167.c	Sat Dec 12 16:12:05 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: mm58167.c,v 1.13 2009/12/12 14:44:10 tsutsui Exp $	*/
+/*	$NetBSD: mm58167.c,v 1.14 2009/12/12 16:12:05 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: mm58167.c,v 1.13 2009/12/12 14:44:10 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: mm58167.c,v 1.14 2009/12/12 16:12:05 tsutsui Exp $);
 
 #include sys/param.h
 #include sys/malloc.h
@@ -46,8 +46,8 @@
 #include dev/clock_subr.h
 #include dev/ic/mm58167var.h
 
-int mm58167_gettime(todr_chip_handle_t, struct timeval *);
-int mm58167_settime(todr_chip_handle_t, struct timeval *);
+static int mm58167_gettime_ymdhms(todr_chip_handle_t, struct clock_ymdhms *);
+static int mm58167_settime_ymdhms(todr_chip_handle_t, struct clock_ymdhms *);
 
 /*
  * To quote SunOS's todreg.h:
@@ -70,8 +70,8 @@
 	handle = sc-_mm58167_todr_handle;
 	memset(handle, 0, sizeof(handle));
 	handle-cookie = sc;
-	handle-todr_gettime = mm58167_gettime;
-	handle-todr_settime = mm58167_settime;
+	handle-todr_gettime_ymdhms = mm58167_gettime_ymdhms;
+	handle-todr_settime_ymdhms = mm58167_settime_ymdhms;
 	return handle;
 }
 
@@ -79,10 +79,9 @@
  * Set up the system's time, given a `reasonable' time value.
  */
 int
-mm58167_gettime(todr_chip_handle_t handle, struct timeval *tv)
+mm58167_gettime_ymdhms(todr_chip_handle_t handle, struct clock_ymdhms *dt)
 {
 	struct mm58167_softc *sc = handle-cookie;
-	struct clock_ymdhms dt_hardware;
 	struct clock_ymdhms dt_reasonable;
 	struct timeval now;
 	int s;
@@ -105,7 +104,7 @@
 	do {
 #define _MM58167_GET(dt_f, mm_f)	\
 	byte_value = mm58167_read(sc, mm_f);\
-	dt_hardware.dt_f = FROMBCD(byte_value)
+	dt-dt_f = FROMBCD(byte_value)
 
 		_MM58167_GET(dt_mon, mm58167_mon);
 		_MM58167_GET(dt_day, mm58167_day);
@@ -135,24 +134,20 @@
 	 * HH:MM:SS, call it the reasonable year plus one, else call
 	 * it the reasonable year.
 	 */
-	if (dt_hardware.dt_mon  dt_reasonable.dt_mon ||
-	(dt_hardware.dt_mon == dt_reasonable.dt_mon 
-	 (dt_hardware.dt_day  dt_reasonable.dt_day ||
-	  (dt_hardware.dt_day == dt_reasonable.dt_day 
-	   (dt_hardware.dt_hour  dt_reasonable.dt_hour ||
-	(dt_hardware.dt_hour == dt_reasonable.dt_hour 
-	 (dt_hardware.dt_min  dt_reasonable.dt_min ||
-	  (dt_hardware.dt_min == dt_reasonable.dt_min 
-	   (dt_hardware.dt_sec  dt_reasonable.dt_sec) {
-		dt_hardware.dt_year = dt_reasonable.dt_year + 1;
+	if (dt-dt_mon  dt_reasonable.dt_mon ||
+	(dt-dt_mon == dt_reasonable.dt_mon 
+	 (dt-dt_day  dt_reasonable.dt_day ||
+	  (dt-dt_day == dt_reasonable.dt_day 
+	   (dt-dt_hour  dt_reasonable.dt_hour ||
+	(dt-dt_hour == dt_reasonable.dt_hour 
+	 (dt-dt_min  dt_reasonable.dt_min ||
+	  (dt-dt_min == dt_reasonable.dt_min 
+	   (dt-dt_sec  dt_reasonable.dt_sec) {
+		dt-dt_year = dt_reasonable.dt_year + 1;
 	} else {
-		dt_hardware.dt_year = dt_reasonable.dt_year;
+		dt-dt_year = dt_reasonable.dt_year;
 	}
 
-	/* convert the hardware date into a time: */
-	tv-tv_sec = clock_ymdhms_to_secs(dt_hardware);
-	tv-tv_usec = 0;
-
 	/*
 	 * Make a reasonable effort to see if a leap day has passed
 	 * that we need to account for.  This does the right thing
@@ -169,9 +164,9 @@
 	 * March in the following year.  Check that following year for
 	 * a leap day.
 	 */
-	if (dt_hardware.dt_year  dt_reasonable.dt_year 
-	dt_hardware.dt_mon = 3) {
-		leap_year = dt_hardware.dt_year;
+	if (dt-dt_year  dt_reasonable.dt_year 
+	dt-dt_mon = 3) {
+		leap_year = dt-dt_year;
 	}
 
 	/*
@@ -180,7 +175,7 @@
 	 * the previous year.  check that previous year for a leap
 	 * day.
 	 */
-	else if (dt_hardware.dt_year  dt_reasonable.dt_year 
+	else if (dt-dt_year  dt_reasonable.dt_year 
 	dt_reasonable.dt_mon  3) {
 		leap_year = dt_reasonable.dt_year;
 	}
@@ -190,9 +185,9 @@
 	 * same year, but we weren't to March before, and we're in or
 	 * past March now.  Check this year for a leap day.
 	 */
-	else if (dt_hardware.dt_year == dt_reasonable.dt_year
+	else if (dt-dt_year == dt_reasonable.dt_year
 	 dt_reasonable.dt_mon  3
-	 dt_hardware.dt_mon = 3) {
+	 dt-dt_mon = 3) {
 		

CVS commit: src/sys/arch/hp300/hp300

2009-12-12 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Dec 12 16:37:22 UTC 2009

Modified Files:
src/sys/arch/hp300/hp300: locore.s

Log Message:
Allow NetBSD/hp300 kernel work with PGSHIFT==13, i.e. 8KB/page.
Tested on HP9000/382 with 68040.

XXX: 8KB/page won't work on HP MMU machines (i.e. HP320 and HP350).


To generate a diff of this commit:
cvs rdiff -u -r1.149 -r1.150 src/sys/arch/hp300/hp300/locore.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/hp300/hp300/locore.s
diff -u src/sys/arch/hp300/hp300/locore.s:1.149 src/sys/arch/hp300/hp300/locore.s:1.150
--- src/sys/arch/hp300/hp300/locore.s:1.149	Fri Dec 11 18:28:35 2009
+++ src/sys/arch/hp300/hp300/locore.s	Sat Dec 12 16:37:22 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.s,v 1.149 2009/12/11 18:28:35 tsutsui Exp $	*/
+/*	$NetBSD: locore.s,v 1.150 2009/12/12 16:37:22 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1980, 1990, 1993
@@ -523,7 +523,11 @@
 	.long	0x4e7b0007		| movc %d0,%dtt1
 	.word	0xf4d8			| cinva bc
 	.word	0xf518			| pflusha
+#if PGSHIFT == 13
+	movl	#0xc000,%d0
+#else
 	movl	#0x8000,%d0
+#endif
 	.long	0x4e7b0003		| movc %d0,%tc
 	movl	#0x80008000,%d0
 	movc	%d0,%cacr		| turn on both caches
@@ -532,7 +536,11 @@
 	movl	#MMU_IEN+MMU_FPE,INTIOBASE+MMUBASE+MMUCMD
 	| enable 68881 and i-cache
 	RELOC(prototc, %a2)
+#if PGSHIFT == 13
+	movl	#0x82d08b00,%a2@	| value to load TC with
+#else
 	movl	#0x82c0aa00,%a2@	| value to load TC with
+#endif
 	pmove	%a2@,%tc		| load it
 	jmp	Lenab1:l		| forced not be pc-relative
 Lhpmmu3:



CVS commit: src/sys/kern

2009-12-12 Thread David Laight
Module Name:src
Committed By:   dsl
Date:   Sat Dec 12 17:03:19 UTC 2009

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

Log Message:
Always set L_INMEM to maintain binary compatibility.


To generate a diff of this commit:
cvs rdiff -u -r1.168 -r1.169 src/sys/kern/init_sysctl.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/init_sysctl.c
diff -u src/sys/kern/init_sysctl.c:1.168 src/sys/kern/init_sysctl.c:1.169
--- src/sys/kern/init_sysctl.c:1.168	Wed Oct 21 21:12:06 2009
+++ src/sys/kern/init_sysctl.c	Sat Dec 12 17:03:19 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: init_sysctl.c,v 1.168 2009/10/21 21:12:06 rmind Exp $ */
+/*	$NetBSD: init_sysctl.c,v 1.169 2009/12/12 17:03:19 dsl Exp $ */
 
 /*-
  * Copyright (c) 2003, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: init_sysctl.c,v 1.168 2009/10/21 21:12:06 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: init_sysctl.c,v 1.169 2009/12/12 17:03:19 dsl Exp $);
 
 #include opt_sysv.h
 #include opt_compat_netbsd32.h
@@ -2875,7 +2875,8 @@
 	ki-p_ru = PTRTOUINT64(p-p_stats-p_ru);
 	ki-p_eflag = 0;
 	ki-p_exitsig = p-p_exitsig;
-	ki-p_flag = sysctl_map_flags(sysctl_flagmap, p-p_flag);
+	ki-p_flag = L_INMEM;   /* Process never swapped out */
+	ki-p_flag |= sysctl_map_flags(sysctl_flagmap, p-p_flag);
 	ki-p_flag |= sysctl_map_flags(sysctl_sflagmap, p-p_sflag);
 	ki-p_flag |= sysctl_map_flags(sysctl_slflagmap, p-p_slflag);
 	ki-p_flag |= sysctl_map_flags(sysctl_lflagmap, p-p_lflag);



CVS commit: src/sys/rump

2009-12-12 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Sat Dec 12 17:10:20 UTC 2009

Modified Files:
src/sys/rump: Makefile.rump
src/sys/rump/fs/lib: Makefile.inc
src/sys/rump/net/lib/liblocal: Makefile
src/sys/rump/net/lib/libnet: Makefile
src/sys/rump/net/lib/libsockin: Makefile
Added Files:
src/sys/rump: ldscript.rump
Removed Files:
src/sys/rump/librump: rump_domain.c rump_module.c

Log Message:
Use linker script to make __start/stop_link_set_modules be present
in libs built with binutils =2.19.  This is a less error-prone
method than the previous where components had to be tagged in the
Makefile as modules (and if they weren't, things broke.  and vice
versa).


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/sys/rump/Makefile.rump
cvs rdiff -u -r0 -r1.1 src/sys/rump/ldscript.rump
cvs rdiff -u -r1.13 -r1.14 src/sys/rump/fs/lib/Makefile.inc
cvs rdiff -u -r1.1 -r0 src/sys/rump/librump/rump_domain.c \
src/sys/rump/librump/rump_module.c
cvs rdiff -u -r1.3 -r1.4 src/sys/rump/net/lib/liblocal/Makefile
cvs rdiff -u -r1.6 -r1.7 src/sys/rump/net/lib/libnet/Makefile
cvs rdiff -u -r1.4 -r1.5 src/sys/rump/net/lib/libsockin/Makefile

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/Makefile.rump
diff -u src/sys/rump/Makefile.rump:1.44 src/sys/rump/Makefile.rump:1.45
--- src/sys/rump/Makefile.rump:1.44	Fri Nov 27 13:36:30 2009
+++ src/sys/rump/Makefile.rump	Sat Dec 12 17:10:19 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.rump,v 1.44 2009/11/27 13:36:30 pooka Exp $
+#	$NetBSD: Makefile.rump,v 1.45 2009/12/12 17:10:19 pooka Exp $
 #
 
 WARNS?=		3	# XXX: src/sys won't compile with -Wsign-compare yet
@@ -24,6 +24,7 @@
 CPPFLAGS+=	-I${RUMPTOP}/include
 CPPFLAGS+=	-I${RUMPTOP}/librump/rumpkern/opt
 CPPFLAGS+=	-nostdinc -I${RUMPTOP}/..
+LDFLAGS+=	-T ${RUMPTOP}/ldscript.rump
 #CPPFLAGS+=	-DDEBUG
 
 # kernel libs should not get linked against libc
@@ -45,15 +46,6 @@
 # If this file changes, we need a full rebuild
 DPSRCS+=	${RUMPTOP}/Makefile.rump
 
-.ifdef RUMP_ISMODULE
-.PATH:		${RUMPTOP}/librump
-SRCS+=		rump_module.c
-.endif
-.ifdef RUMP_ISDOMAIN
-.PATH:		${RUMPTOP}/librump
-SRCS+=		rump_domain.c
-.endif
-
 #
 # Rename library symbols before use.  If a symbol does not already belong
 # to a rump namespace (rump or RUMP), prefix it with rumpns.  This

Index: src/sys/rump/fs/lib/Makefile.inc
diff -u src/sys/rump/fs/lib/Makefile.inc:1.13 src/sys/rump/fs/lib/Makefile.inc:1.14
--- src/sys/rump/fs/lib/Makefile.inc:1.13	Sun Sep 13 22:51:41 2009
+++ src/sys/rump/fs/lib/Makefile.inc	Sat Dec 12 17:10:19 2009
@@ -1,7 +1,6 @@
-#	$NetBSD: Makefile.inc,v 1.13 2009/09/13 22:51:41 pooka Exp $
+#	$NetBSD: Makefile.inc,v 1.14 2009/12/12 17:10:19 pooka Exp $
 #
 
 RUMPTOP=	${.CURDIR}/../../..
-RUMP_ISMODULE=	# defined
 
 .include ${RUMPTOP}/Makefile.rump

Index: src/sys/rump/net/lib/liblocal/Makefile
diff -u src/sys/rump/net/lib/liblocal/Makefile:1.3 src/sys/rump/net/lib/liblocal/Makefile:1.4
--- src/sys/rump/net/lib/liblocal/Makefile:1.3	Sun Sep 13 22:51:42 2009
+++ src/sys/rump/net/lib/liblocal/Makefile	Sat Dec 12 17:10:19 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.3 2009/09/13 22:51:42 pooka Exp $
+#	$NetBSD: Makefile,v 1.4 2009/12/12 17:10:19 pooka Exp $
 #
 
 .PATH:	${.CURDIR}/../../../../kern
@@ -10,7 +10,5 @@
 
 CFLAGS+= -Wno-pointer-sign
 
-RUMP_ISDOMAIN=
-
 .include bsd.lib.mk
 .include bsd.klinks.mk

Index: src/sys/rump/net/lib/libnet/Makefile
diff -u src/sys/rump/net/lib/libnet/Makefile:1.6 src/sys/rump/net/lib/libnet/Makefile:1.7
--- src/sys/rump/net/lib/libnet/Makefile:1.6	Sun Sep 13 22:51:42 2009
+++ src/sys/rump/net/lib/libnet/Makefile	Sat Dec 12 17:10:19 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.6 2009/09/13 22:51:42 pooka Exp $
+#	$NetBSD: Makefile,v 1.7 2009/12/12 17:10:19 pooka Exp $
 #
 
 .PATH:	${.CURDIR}/../../../../net
@@ -12,8 +12,6 @@
 
 CPPFLAGS+=	-I${.CURDIR}/opt -I${.CURDIR}/../libnetinet/opt
 
-RUMP_ISDOMAIN=
-
 .include ${.CURDIR}/../libnetinet/Makefile.inc
 
 .include bsd.lib.mk

Index: src/sys/rump/net/lib/libsockin/Makefile
diff -u src/sys/rump/net/lib/libsockin/Makefile:1.4 src/sys/rump/net/lib/libsockin/Makefile:1.5
--- src/sys/rump/net/lib/libsockin/Makefile:1.4	Sun Sep 13 22:51:42 2009
+++ src/sys/rump/net/lib/libsockin/Makefile	Sat Dec 12 17:10:20 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.4 2009/09/13 22:51:42 pooka Exp $
+#	$NetBSD: Makefile,v 1.5 2009/12/12 17:10:20 pooka Exp $
 #
 
 LIB=	rumpnet_sockin
@@ -8,7 +8,5 @@
 
 CPPFLAGS+= -I${RUMPTOP}/librump/rumpkern
 
-RUMP_ISDOMAIN=
-
 .include bsd.lib.mk
 .include bsd.klinks.mk

Added files:

Index: src/sys/rump/ldscript.rump
diff -u /dev/null src/sys/rump/ldscript.rump:1.1
--- /dev/null	Sat Dec 12 17:10:20 2009
+++ src/sys/rump/ldscript.rump	Sat Dec 12 17:10:19 2009
@@ -0,0 +1,28 @@
+/*	$NetBSD: ldscript.rump,v 1.1 2009/12/12 17:10:19 pooka Exp $	*/
+
+/*
+ * From 

CVS commit: src/sys/kern

2009-12-12 Thread David Laight
Module Name:src
Committed By:   dsl
Date:   Sat Dec 12 17:29:34 UTC 2009

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

Log Message:
Report L_INMEM in the lwp info as well.


To generate a diff of this commit:
cvs rdiff -u -r1.169 -r1.170 src/sys/kern/init_sysctl.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/init_sysctl.c
diff -u src/sys/kern/init_sysctl.c:1.169 src/sys/kern/init_sysctl.c:1.170
--- src/sys/kern/init_sysctl.c:1.169	Sat Dec 12 17:03:19 2009
+++ src/sys/kern/init_sysctl.c	Sat Dec 12 17:29:34 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: init_sysctl.c,v 1.169 2009/12/12 17:03:19 dsl Exp $ */
+/*	$NetBSD: init_sysctl.c,v 1.170 2009/12/12 17:29:34 dsl Exp $ */
 
 /*-
  * Copyright (c) 2003, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: init_sysctl.c,v 1.169 2009/12/12 17:03:19 dsl Exp $);
+__KERNEL_RCSID(0, $NetBSD: init_sysctl.c,v 1.170 2009/12/12 17:29:34 dsl Exp $);
 
 #include opt_sysv.h
 #include opt_compat_netbsd32.h
@@ -3051,7 +3051,8 @@
 	kl-l_addr = PTRTOUINT64(l-l_addr);
 	kl-l_stat = l-l_stat;
 	kl-l_lid = l-l_lid;
-	kl-l_flag = sysctl_map_flags(sysctl_lwpprflagmap, l-l_prflag);
+	kl-l_flag = L_INMEM;
+	kl-l_flag |= sysctl_map_flags(sysctl_lwpprflagmap, l-l_prflag);
 	kl-l_flag |= sysctl_map_flags(sysctl_lwpflagmap, l-l_flag);
 
 	kl-l_swtime = l-l_swtime;



CVS commit: src/sys/kern

2009-12-12 Thread David Laight
Module Name:src
Committed By:   dsl
Date:   Sat Dec 12 17:47:05 UTC 2009

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

Log Message:
Bounding the 'nfds' arg to poll() at the current process limit for actual
open files is rather gross - the poll map isn't required to be dense.
Instead limit to a much larger value (1000 + dt_nfiles) so that user
programs cannot allocate indefinite sized blocks of kvm.
If the limit is exceeded, then return EINVAL instead of silently truncating
the list.
(The silent truncation in select isn't quite as bad - although even there
any high bits that are set ought to generate an EBADF response.)
Move the code that converts ERESTART and EWOULDBLOCK into common code.
Effectively fixes PR/17507 since the new limit is unlikely to be detected.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/kern/sys_select.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/sys_select.c
diff -u src/sys/kern/sys_select.c:1.19 src/sys/kern/sys_select.c:1.20
--- src/sys/kern/sys_select.c:1.19	Wed Nov 11 09:48:51 2009
+++ src/sys/kern/sys_select.c	Sat Dec 12 17:47:05 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: sys_select.c,v 1.19 2009/11/11 09:48:51 rmind Exp $	*/
+/*	$NetBSD: sys_select.c,v 1.20 2009/12/12 17:47:05 dsl Exp $	*/
 
 /*-
  * Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: sys_select.c,v 1.19 2009/11/11 09:48:51 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: sys_select.c,v 1.20 2009/12/12 17:47:05 dsl Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -261,6 +261,12 @@
 		l-l_sigmask = oldmask;
 		mutex_exit(p-p_lock);
 	}
+
+	/* select and poll are not restarted after signals... */
+	if (error == ERESTART)
+		return EINTR;
+	if (error == EWOULDBLOCK)
+		return 0;
 	return error;
 }
 
@@ -293,7 +299,7 @@
 	if (u_ ## name) {		\
 		error = copyin(u_ ## name, bits + ni * x, ni);		\
 		if (error)		\
-			goto done;	\
+			goto fail;	\
 	} else\
 		memset(bits + ni * x, 0, ni);
 	getbits(in, 0);
@@ -302,18 +308,13 @@
 #undef	getbits
 
 	error = sel_do_scan(bits, nd, ts, mask, retval, 1);
- done:
-	/* select is not restarted after signals... */
-	if (error == ERESTART)
-		error = EINTR;
-	if (error == EWOULDBLOCK)
-		error = 0;
 	if (error == 0  u_in != NULL)
 		error = copyout(bits + ni * 3, u_in, ni);
 	if (error == 0  u_ou != NULL)
 		error = copyout(bits + ni * 4, u_ou, ni);
 	if (error == 0  u_ex != NULL)
 		error = copyout(bits + ni * 5, u_ex, ni);
+ fail:
 	if (bits != smallbits)
 		kmem_free(bits, ni * 6);
 	return (error);
@@ -418,12 +419,19 @@
 	struct pollfd	smallfds[32];
 	struct pollfd	*fds;
 	int		error;
-	size_t		ni, nf;
+	size_t		ni;
 
-	nf = curlwp-l_fd-fd_dt-dt_nfiles;
-	if (nfds  nf) {
-		/* forgiving; slightly wrong */
-		nfds = nf;
+	if (nfds  1000 + curlwp-l_fd-fd_dt-dt_nfiles) {
+		/*
+		 * Either the user passed in a very sparse 'fds' or junk!
+		 * The kmem_alloc() call below would be bad news.
+		 * We could process the 'fds' array in chunks, but that
+		 * is a lot of code that isn't normally useful.
+		 * (Or just move the copyin/out into pollscan().)
+		 * Historically the code silently truncated 'fds' to
+		 * dt_nfiles entries - but that does cause issues.
+		 */
+		return EINVAL;
 	}
 	ni = nfds * sizeof(struct pollfd);
 	if (ni  sizeof(smallfds)) {
@@ -435,17 +443,12 @@
 
 	error = copyin(u_fds, fds, ni);
 	if (error)
-		goto done;
+		goto fail;
 
 	error = sel_do_scan(fds, nfds, ts, mask, retval, 0);
- done:
-	/* poll is not restarted after signals... */
-	if (error == ERESTART)
-		error = EINTR;
-	if (error == EWOULDBLOCK)
-		error = 0;
 	if (error == 0)
 		error = copyout(fds, u_fds, ni);
+ fail:
 	if (fds != smallfds)
 		kmem_free(fds, ni);
 	return (error);



CVS commit: src/sys/kern

2009-12-12 Thread David Laight
Module Name:src
Committed By:   dsl
Date:   Sat Dec 12 17:48:54 UTC 2009

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

Log Message:
Fix comment for arg types of sys_profil().


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/sys/kern/subr_prof.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_prof.c
diff -u src/sys/kern/subr_prof.c:1.43 src/sys/kern/subr_prof.c:1.44
--- src/sys/kern/subr_prof.c:1.43	Thu Dec 20 23:03:10 2007
+++ src/sys/kern/subr_prof.c	Sat Dec 12 17:48:54 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr_prof.c,v 1.43 2007/12/20 23:03:10 dsl Exp $	*/
+/*	$NetBSD: subr_prof.c,v 1.44 2009/12/12 17:48:54 dsl Exp $	*/
 
 /*-
  * Copyright (c) 1982, 1986, 1993
@@ -32,7 +32,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: subr_prof.c,v 1.43 2007/12/20 23:03:10 dsl Exp $);
+__KERNEL_RCSID(0, $NetBSD: subr_prof.c,v 1.44 2009/12/12 17:48:54 dsl Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -219,8 +219,8 @@
 {
 	/* {
 		syscallarg(char *) samples;
-		syscallarg(u_int) size;
-		syscallarg(u_int) offset;
+		syscallarg(size_t) size;
+		syscallarg(u_long) offset;
 		syscallarg(u_int) scale;
 	} */
 	struct proc *p = l-l_proc;



CVS commit: [matt-nb5-mips64] src/lib/libc/arch/mips/gen

2009-12-12 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Sat Dec 12 19:08:57 UTC 2009

Modified Files:
src/lib/libc/arch/mips/gen [matt-nb5-mips64]: _setjmp.S setjmp.S

Log Message:
#ifndef SOFTFLOAT_FOR_GCC around blocks of FP code.


To generate a diff of this commit:
cvs rdiff -u -r1.20.34.2 -r1.20.34.3 src/lib/libc/arch/mips/gen/_setjmp.S
cvs rdiff -u -r1.17.34.2 -r1.17.34.3 src/lib/libc/arch/mips/gen/setjmp.S

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

Modified files:

Index: src/lib/libc/arch/mips/gen/_setjmp.S
diff -u src/lib/libc/arch/mips/gen/_setjmp.S:1.20.34.2 src/lib/libc/arch/mips/gen/_setjmp.S:1.20.34.3
--- src/lib/libc/arch/mips/gen/_setjmp.S:1.20.34.2	Tue Aug 18 06:49:17 2009
+++ src/lib/libc/arch/mips/gen/_setjmp.S	Sat Dec 12 19:08:57 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: _setjmp.S,v 1.20.34.2 2009/08/18 06:49:17 matt Exp $	*/
+/*	$NetBSD: _setjmp.S,v 1.20.34.3 2009/12/12 19:08:57 cliff Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -46,7 +46,7 @@
 #if 0
 	RCSID(from: @(#)_setjmp.s	8.1 (Berkeley) 6/4/93)
 #else
-	RCSID($NetBSD: _setjmp.S,v 1.20.34.2 2009/08/18 06:49:17 matt Exp $)
+	RCSID($NetBSD: _setjmp.S,v 1.20.34.3 2009/12/12 19:08:57 cliff Exp $)
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -88,6 +88,7 @@
 	 * In N64, FP registers F23 .. F31 are callee-saved.
 	 * In O32, FP registers F20 .. F23 are callee-saved.
 	 */
+#ifndef SOFTFLOAT_FOR_GCC
 #if defined(__mips_n64) || defined(__mips_n32)
 	FP_S	$f30, _OFFSETOF_SC_FPREGS_F30(a0)
 	FP_S	$f28, _OFFSETOF_SC_FPREGS_F28(a0)
@@ -108,6 +109,7 @@
 	FP_S	$f29, _OFFSETOF_SC_FPREGS_F29(a0)
 	FP_S	$f31, _OFFSETOF_SC_FPREGS_F31(a0)
 #endif
+#endif	/* SOFTFLOAT_FOR_GCC */
 	INT_S	v0, _OFFSETOF_SC_FPREGS_FCSR(a0)
 	REG_EPILOGUE
 
@@ -147,6 +149,7 @@
 	 * In N64, FP registers F23 .. F31 are callee-saved.
 	 * In O32, FP registers F20 .. F23 are callee-saved.
 	 */
+#ifndef SOFTFLOAT_FOR_GCC
 #if defined(__mips_n64) || defined(__mips_n32)
 	FP_L	$f30, _OFFSETOF_SC_FPREGS_F30(a0)
 	FP_L	$f28, _OFFSETOF_SC_FPREGS_F28(a0)
@@ -167,6 +170,7 @@
 	FP_L	$f29, _OFFSETOF_SC_FPREGS_F29(a0)
 	FP_L	$f31, _OFFSETOF_SC_FPREGS_F31(a0)
 #endif
+#endif	/* SOFTFLOAT_FOR_GCC */
 
 	REG_EPILOGUE
 	REG_L	v0, _OFFSETOF_SC_REGS_V0(a0)

Index: src/lib/libc/arch/mips/gen/setjmp.S
diff -u src/lib/libc/arch/mips/gen/setjmp.S:1.17.34.2 src/lib/libc/arch/mips/gen/setjmp.S:1.17.34.3
--- src/lib/libc/arch/mips/gen/setjmp.S:1.17.34.2	Tue Aug 18 06:52:09 2009
+++ src/lib/libc/arch/mips/gen/setjmp.S	Sat Dec 12 19:08:57 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: setjmp.S,v 1.17.34.2 2009/08/18 06:52:09 matt Exp $	*/
+/*	$NetBSD: setjmp.S,v 1.17.34.3 2009/12/12 19:08:57 cliff Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -41,7 +41,7 @@
 #if 0
 	RCSID(from: @(#)setjmp.s	8.1 (Berkeley) 6/4/93)
 #else
-	RCSID($NetBSD: setjmp.S,v 1.17.34.2 2009/08/18 06:52:09 matt Exp $)
+	RCSID($NetBSD: setjmp.S,v 1.17.34.3 2009/12/12 19:08:57 cliff Exp $)
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -115,6 +115,7 @@
 	INT_S	v0, _OFFSETOF_SC_FPUSED(a0)	# sc_fpused = 1
 	cfc1	v0, $31
 	INT_S	v0, _OFFSETOF_SC_FPREGS_FCSR(a0)
+#ifndef SOFTFLOAT_FOR_GCC
 #if defined(__mips_o32) || defined(__mips_o64) || defined(__mips_n32)
 	FP_S	$f20, _OFFSETOF_SC_FPREGS_F20(a0)
 	FP_S	$f22, _OFFSETOF_SC_FPREGS_F22(a0)
@@ -135,6 +136,7 @@
 	FP_S	$f29, _OFFSETOF_SC_FPREGS_F29(a0)
 	FP_S	$f31, _OFFSETOF_SC_FPREGS_F31(a0)
 #endif
+#endif	/* SOFTFLOAT_FOR_GCC */
 	REG_EPILOGUE
 	j	ra
 	move	v0, zero



CVS commit: src/sys

2009-12-12 Thread David Laight
Module Name:src
Committed By:   dsl
Date:   Sat Dec 12 21:28:04 UTC 2009

Modified Files:
src/sys/kern: sys_pipe.c
src/sys/sys: pipe.h

Log Message:
Add support for unblocking read/write when close called.
Fixes PR/26567 for pipes.
(NB ad backed out the fix for sockets)


To generate a diff of this commit:
cvs rdiff -u -r1.122 -r1.123 src/sys/kern/sys_pipe.c
cvs rdiff -u -r1.29 -r1.30 src/sys/sys/pipe.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/kern/sys_pipe.c
diff -u src/sys/kern/sys_pipe.c:1.122 src/sys/kern/sys_pipe.c:1.123
--- src/sys/kern/sys_pipe.c:1.122	Thu Dec 10 20:55:17 2009
+++ src/sys/kern/sys_pipe.c	Sat Dec 12 21:28:04 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: sys_pipe.c,v 1.122 2009/12/10 20:55:17 dsl Exp $	*/
+/*	$NetBSD: sys_pipe.c,v 1.123 2009/12/12 21:28:04 dsl Exp $	*/
 
 /*-
  * Copyright (c) 2003, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: sys_pipe.c,v 1.122 2009/12/10 20:55:17 dsl Exp $);
+__KERNEL_RCSID(0, $NetBSD: sys_pipe.c,v 1.123 2009/12/12 21:28:04 dsl Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -109,6 +109,7 @@
 static int	pipe_kqfilter(file_t *, struct knote *);
 static int	pipe_stat(file_t *, struct stat *);
 static int	pipe_ioctl(file_t *, u_long, void *);
+static void	pipe_abort(file_t *);
 
 static const struct fileops pipeops = {
 	.fo_read = pipe_read,
@@ -119,7 +120,7 @@
 	.fo_stat = pipe_stat,
 	.fo_close = pipe_close,
 	.fo_kqfilter = pipe_kqfilter,
-	.fo_abort = fnullop_abort,
+	.fo_abort = pipe_abort,
 };
 
 /*
@@ -541,8 +542,12 @@
 		 * Detect EOF condition.
 		 * Read returns 0 on EOF, no need to set error.
 		 */
-		if (rpipe-pipe_state  PIPE_EOF)
+		if (rpipe-pipe_state  (PIPE_EOF | PIPE_ABORTED)) {
+			if (rpipe-pipe_state  PIPE_ABORTED)
+/* Another thread has called close() */
+error = EBADF;
 			break;
+		}
 
 		/*
 		 * Don't block on non-blocking I/O.
@@ -979,6 +984,13 @@
 break;
 			}
 
+			if (wpipe-pipe_state  PIPE_ABORTED) {
+/* Another thread has called close() */
+if (uio-uio_resid == 0)
+	error = EBADF;
+break;
+			}
+
 			/*
 			 * We have no more space and have something to offer,
 			 * wake up select/poll.
@@ -1204,6 +1216,19 @@
 }
 
 static void
+pipe_abort(file_t *fp)
+{
+	struct pipe *pipe = fp-f_data;
+
+	/* Unblock blocked reads/writes - they will return EBADF. */
+	mutex_enter(pipe-pipe_lock);
+	pipe-pipe_state |= PIPE_ABORTED;
+	cv_broadcast(pipe-pipe_rcv);
+	cv_broadcast(pipe-pipe_wcv);
+	mutex_exit(pipe-pipe_lock);
+}
+
+static void
 pipe_free_kmem(struct pipe *pipe)
 {
 

Index: src/sys/sys/pipe.h
diff -u src/sys/sys/pipe.h:1.29 src/sys/sys/pipe.h:1.30
--- src/sys/sys/pipe.h:1.29	Thu Nov 26 16:18:37 2009
+++ src/sys/sys/pipe.h	Sat Dec 12 21:28:04 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: pipe.h,v 1.29 2009/11/26 16:18:37 pooka Exp $ */
+/* $NetBSD: pipe.h,v 1.30 2009/12/12 21:28:04 dsl Exp $ */
 
 /*
  * Copyright (c) 1996 John S. Dyson
@@ -96,6 +96,7 @@
    pointers/data. */
 #define	PIPE_LWANT	0x200	/* Process wants exclusive access to
    pointers/data. */
+#define	PIPE_ABORTED	0x400	/* fo_abort()ed, unblock read/write */
 
 /*
  * Per-pipe data structure.



CVS commit: src/share/mk

2009-12-12 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat Dec 12 21:33:51 UTC 2009

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

Log Message:
replace /usr/lib with ${_GCC_CRTDIR} or ${SHLIBDIR} as appropriate.


To generate a diff of this commit:
cvs rdiff -u -r1.300 -r1.301 src/share/mk/bsd.lib.mk

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

Modified files:

Index: src/share/mk/bsd.lib.mk
diff -u src/share/mk/bsd.lib.mk:1.300 src/share/mk/bsd.lib.mk:1.301
--- src/share/mk/bsd.lib.mk:1.300	Tue Dec  8 15:18:42 2009
+++ src/share/mk/bsd.lib.mk	Sat Dec 12 21:33:50 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.lib.mk,v 1.300 2009/12/08 15:18:42 uebayasi Exp $
+#	$NetBSD: bsd.lib.mk,v 1.301 2009/12/12 21:33:50 mrg Exp $
 #	@(#)bsd.lib.mk	8.3 (Berkeley) 4/22/94
 
 .include bsd.init.mk
@@ -205,8 +205,8 @@
 SHLIB_SOVERSION=	${SHLIB_MAJOR}
 SHLIB_SHFLAGS=		-Wl,-soname,${_LIB_PREFIX}${LIB}.so.${SHLIB_SOVERSION}
 SHLIB_SHFLAGS+=		-Wl,--warn-shared-textrel
-SHLIB_LDSTARTFILE?=	${DESTDIR}/usr/lib/crti.o ${_GCC_CRTBEGINS}
-SHLIB_LDENDFILE?=	${_GCC_CRTENDS} ${DESTDIR}/usr/lib/crtn.o
+SHLIB_LDSTARTFILE?=	${_GCC_CRTDIR}/crti.o ${_GCC_CRTBEGINS}
+SHLIB_LDENDFILE?=	${_GCC_CRTENDS} ${_GCC_CRTDIR}/crtn.o
 .endif
 
 CFLAGS+=	${COPTS}
@@ -523,7 +523,7 @@
 	${_MKTARGET_BUILD}
 	rm -f lib${LIB}.so.${SHLIB_FULLVERSION}
 .if defined(DESTDIR)
-	${LIBCC} ${LDLIBC} -Wl,-nostdlib -B${_GCC_CRTDIR}/ -B${DESTDIR}/usr/lib/ \
+	${LIBCC} ${LDLIBC} -Wl,-nostdlib -B${_GCC_CRTDIR}/ -B${DESTDIR}${SHLIBDIR}/ \
 	-Wl,-x -shared ${SHLIB_SHFLAGS} -o ${.TARGET} \
 	-Wl,--whole-archive ${SOLIB} \
 	-Wl,--no-whole-archive ${_LDADD.lib${LIB}} \



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

2009-12-12 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Dec 13 00:25:30 UTC 2009

Modified Files:
src/sys/arch/mips/include [matt-nb5-mips64]: locore.h

Log Message:
TLBUpdate (all forms) takes vaddr_t, uint32_t


To generate a diff of this commit:
cvs rdiff -u -r1.78.36.1.2.5 -r1.78.36.1.2.6 \
src/sys/arch/mips/include/locore.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/mips/include/locore.h
diff -u src/sys/arch/mips/include/locore.h:1.78.36.1.2.5 src/sys/arch/mips/include/locore.h:1.78.36.1.2.6
--- src/sys/arch/mips/include/locore.h:1.78.36.1.2.5	Mon Nov 23 18:28:46 2009
+++ src/sys/arch/mips/include/locore.h	Sun Dec 13 00:25:30 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.h,v 1.78.36.1.2.5 2009/11/23 18:28:46 matt Exp $ */
+/* $NetBSD: locore.h,v 1.78.36.1.2.6 2009/12/13 00:25:30 matt Exp $ */
 
 /*
  * Copyright 1996 The Board of Trustees of The Leland Stanford
@@ -50,7 +50,7 @@
 void	mips1_TBIA(int);
 void	mips1_TBIAP(int);
 void	mips1_TBIS(vaddr_t);
-int	mips1_TLBUpdate(u_int, u_int);
+int	mips1_TLBUpdate(vaddr_t, uint32_t);
 void	mips1_wbflush(void);
 void	mips1_lwp_trampoline(void);
 void	mips1_setfunc_trampoline(void);
@@ -64,7 +64,7 @@
 void	mips3_TBIA(int);
 void	mips3_TBIAP(int);
 void	mips3_TBIS(vaddr_t);
-int	mips3_TLBUpdate(u_int, u_int);
+int	mips3_TLBUpdate(vaddr_t, uint32_t);
 void	mips3_TLBRead(int, struct tlb *);
 void	mips3_TLBWriteIndexedVPS(int, struct tlb *);
 void	mips3_wbflush(void);
@@ -78,7 +78,7 @@
 void	mips5900_TBIA(int);
 void	mips5900_TBIAP(int);
 void	mips5900_TBIS(vaddr_t);
-int	mips5900_TLBUpdate(u_int, u_int);
+int	mips5900_TLBUpdate(vaddr_t, uint32_t);
 void	mips5900_TLBRead(int, struct tlb *);
 void	mips5900_TLBWriteIndexedVPS(int, struct tlb *);
 void	mips5900_wbflush(void);
@@ -94,7 +94,7 @@
 void	mips32_TBIA(int);
 void	mips32_TBIAP(int);
 void	mips32_TBIS(vaddr_t);
-int	mips32_TLBUpdate(u_int, u_int);
+int	mips32_TLBUpdate(vaddr_t, uint32_t);
 void	mips32_TLBRead(int, struct tlb *);
 void	mips32_TLBWriteIndexedVPS(int, struct tlb *);
 void	mips32_wbflush(void);
@@ -108,7 +108,7 @@
 void	mips64_TBIA(int);
 void	mips64_TBIAP(int);
 void	mips64_TBIS(vaddr_t);
-int	mips64_TLBUpdate(u_int, u_int);
+int	mips64_TLBUpdate(vaddr_t, uint32_t);
 void	mips64_TLBRead(int, struct tlb *);
 void	mips64_TLBWriteIndexedVPS(int, struct tlb *);
 void	mips64_wbflush(void);
@@ -290,7 +290,7 @@
 	void (*setTLBpid)(int pid);
 	void (*TBIAP)(int);
 	void (*TBIS)(vaddr_t);
-	int  (*tlbUpdate)(u_int highreg, u_int lowreg);
+	int  (*tlbUpdate)(vaddr_t, uint32_t);
 	void (*wbflush)(void);
 } mips_locore_jumpvec_t;
 



CVS commit: src/share/mk

2009-12-12 Thread Takeshi Nakayama
Module Name:src
Committed By:   nakayama
Date:   Sun Dec 13 03:06:23 UTC 2009

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

Log Message:
32-bit compat is CPU specific rather than machine.
So use MACHINE_ARCH instead.


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

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

Modified files:

Index: src/share/mk/bsd.own.mk
diff -u src/share/mk/bsd.own.mk:1.609 src/share/mk/bsd.own.mk:1.610
--- src/share/mk/bsd.own.mk:1.609	Sat Dec 12 23:45:36 2009
+++ src/share/mk/bsd.own.mk	Sun Dec 13 03:06:22 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.own.mk,v 1.609 2009/12/12 23:45:36 snj Exp $
+#	$NetBSD: bsd.own.mk,v 1.610 2009/12/13 03:06:22 nakayama Exp $
 
 .if !defined(_BSD_OWN_MK_)
 _BSD_OWN_MK_=1
@@ -648,7 +648,7 @@
 #
 # MK* options which have variable defaults.
 #
-.if ${MACHINE} == amd64 || ${MACHINE} == sparc64
+.if ${MACHINE_ARCH} == x86_64 || ${MACHINE_ARCH} == sparc64
 MKCOMPAT?=	yes
 .else
 # Don't let this build where it really isn't supported.



CVS commit: src

2009-12-12 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Sun Dec 13 04:57:16 UTC 2009

Modified Files:
src/distrib/sets/lists/xbase: mi
src/etc/mtree: NetBSD.dist.Xorg
src/external/mit/xorg/lib/xkeyboard-config/symbols: Makefile
Added Files:
src/external/mit/xorg/lib/xkeyboard-config/symbols/sharp_vndr: Makefile

Log Message:
Added keyboard config files for Sharp Zaurus SL-C3x00.


To generate a diff of this commit:
cvs rdiff -u -r1.83 -r1.84 src/distrib/sets/lists/xbase/mi
cvs rdiff -u -r1.3 -r1.4 src/etc/mtree/NetBSD.dist.Xorg
cvs rdiff -u -r1.1 -r1.2 \
src/external/mit/xorg/lib/xkeyboard-config/symbols/Makefile
cvs rdiff -u -r0 -r1.1 \
src/external/mit/xorg/lib/xkeyboard-config/symbols/sharp_vndr/Makefile

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/xbase/mi
diff -u src/distrib/sets/lists/xbase/mi:1.83 src/distrib/sets/lists/xbase/mi:1.84
--- src/distrib/sets/lists/xbase/mi:1.83	Thu Nov 12 13:17:46 2009
+++ src/distrib/sets/lists/xbase/mi	Sun Dec 13 04:57:16 2009
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.83 2009/11/12 13:17:46 nakayama Exp $
+# $NetBSD: mi,v 1.84 2009/12/13 04:57:16 nonaka Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -2298,6 +2298,8 @@
 ./usr/X11R7/lib/X11/xkb/symbols/sgi_vndr		base-x11-root	xorg
 ./usr/X11R7/lib/X11/xkb/symbols/sgi_vndr/jp		-unknown-	xorg
 ./usr/X11R7/lib/X11/xkb/symbols/sharp			-obsolete-	obsolete
+./usr/X11R7/lib/X11/xkb/symbols/sharp_vndr		base-x11-root	xorg
+./usr/X11R7/lib/X11/xkb/symbols/sharp_vndr/sl-c3x00	-unknown-	xorg
 ./usr/X11R7/lib/X11/xkb/symbols/shift			-unknown-	xorg
 ./usr/X11R7/lib/X11/xkb/symbols/si			-unknown-	xorg
 ./usr/X11R7/lib/X11/xkb/symbols/sk			-unknown-	xorg

Index: src/etc/mtree/NetBSD.dist.Xorg
diff -u src/etc/mtree/NetBSD.dist.Xorg:1.3 src/etc/mtree/NetBSD.dist.Xorg:1.4
--- src/etc/mtree/NetBSD.dist.Xorg:1.3	Thu Oct  8 19:06:50 2009
+++ src/etc/mtree/NetBSD.dist.Xorg	Sun Dec 13 04:57:16 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: NetBSD.dist.Xorg,v 1.3 2009/10/08 19:06:50 snj Exp $
+#	$NetBSD: NetBSD.dist.Xorg,v 1.4 2009/12/13 04:57:16 nonaka Exp $
 
 ./usr/X11R7
 ./usr/X11R7/bin
@@ -135,6 +135,7 @@
 ./usr/X11R7/lib/X11/xkb/symbols/macintosh_vndr
 ./usr/X11R7/lib/X11/xkb/symbols/nec_vndr
 ./usr/X11R7/lib/X11/xkb/symbols/sgi_vndr
+./usr/X11R7/lib/X11/xkb/symbols/sharp_vndr
 ./usr/X11R7/lib/X11/xkb/symbols/sony_vndr
 ./usr/X11R7/lib/X11/xkb/symbols/sun_vndr
 ./usr/X11R7/lib/X11/xkb/symbols/xfree68_vndr

Index: src/external/mit/xorg/lib/xkeyboard-config/symbols/Makefile
diff -u src/external/mit/xorg/lib/xkeyboard-config/symbols/Makefile:1.1 src/external/mit/xorg/lib/xkeyboard-config/symbols/Makefile:1.2
--- src/external/mit/xorg/lib/xkeyboard-config/symbols/Makefile:1.1	Thu Jun 11 01:49:22 2009
+++ src/external/mit/xorg/lib/xkeyboard-config/symbols/Makefile	Sun Dec 13 04:57:16 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.1 2009/06/11 01:49:22 mrg Exp $
+#	$NetBSD: Makefile,v 1.2 2009/12/13 04:57:16 nonaka Exp $
 
 .include bsd.own.mk
 
@@ -28,7 +28,7 @@
 	za
 
 SUBDIR=		digital_vndr fujitsu_vndr hp_vndr macintosh_vndr nec_vndr \
-		sgi_vndr sony_vndr sun_vndr xfree68_vndr
+		sgi_vndr sharp_vndr sony_vndr sun_vndr xfree68_vndr
 
 XKBDIR=		1
 

Added files:

Index: src/external/mit/xorg/lib/xkeyboard-config/symbols/sharp_vndr/Makefile
diff -u /dev/null src/external/mit/xorg/lib/xkeyboard-config/symbols/sharp_vndr/Makefile:1.1
--- /dev/null	Sun Dec 13 04:57:16 2009
+++ src/external/mit/xorg/lib/xkeyboard-config/symbols/sharp_vndr/Makefile	Sun Dec 13 04:57:16 2009
@@ -0,0 +1,11 @@
+#	$NetBSD: Makefile,v 1.1 2009/12/13 04:57:16 nonaka Exp $
+
+.include bsd.own.mk
+
+FILESDIR=	${X11LIBDIR}/xkb/symbols/sharp_vndr
+FILES=		sl-c3x00
+
+.PATH:		${X11SRCDIR.xkeyboard-config}/symbols/sharp_vndr
+
+.include bsd.x11.mk
+.include bsd.prog.mk



CVS commit: src

2009-12-12 Thread Takeshi Nakayama
Module Name:src
Committed By:   nakayama
Date:   Sun Dec 13 05:01:34 UTC 2009

Modified Files:
src/sbin/disklabel: Makefile
src/sbin/edlabel: Makefile
src/sys/arch: Makefile
src/sys/arch/sparc/stand: Makefile
src/sys/arch/sparc/stand/boot: Makefile
src/sys/arch/sparc64/stand: Makefile
src/sys/modules/compat_sunos: Makefile
src/sys/modules/compat_sunos32: Makefile
src/usr.sbin/apm: Makefile
src/usr.sbin/apmd: Makefile
src/usr.sbin/eeprom: Makefile
src/usr.sbin/ofctl: Makefile
src/usr.sbin/screenblank: Makefile
src/usr.sbin/tadpolectl: Makefile

Log Message:
System utilities, boot programs and kernel modules are machine
(port) specific not CPU, so use MACHINE not MACHINE_ARCH.


To generate a diff of this commit:
cvs rdiff -u -r1.65 -r1.66 src/sbin/disklabel/Makefile
cvs rdiff -u -r1.17 -r1.18 src/sbin/edlabel/Makefile
cvs rdiff -u -r1.39 -r1.40 src/sys/arch/Makefile
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/sparc/stand/Makefile
cvs rdiff -u -r1.35 -r1.36 src/sys/arch/sparc/stand/boot/Makefile
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/sparc64/stand/Makefile
cvs rdiff -u -r1.3 -r1.4 src/sys/modules/compat_sunos/Makefile
cvs rdiff -u -r1.3 -r1.4 src/sys/modules/compat_sunos32/Makefile
cvs rdiff -u -r1.16 -r1.17 src/usr.sbin/apm/Makefile
cvs rdiff -u -r1.14 -r1.15 src/usr.sbin/apmd/Makefile
cvs rdiff -u -r1.15 -r1.16 src/usr.sbin/eeprom/Makefile
cvs rdiff -u -r1.5 -r1.6 src/usr.sbin/ofctl/Makefile
cvs rdiff -u -r1.11 -r1.12 src/usr.sbin/screenblank/Makefile
cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/tadpolectl/Makefile

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

Modified files:

Index: src/sbin/disklabel/Makefile
diff -u src/sbin/disklabel/Makefile:1.65 src/sbin/disklabel/Makefile:1.66
--- src/sbin/disklabel/Makefile:1.65	Sat Dec  5 16:29:11 2009
+++ src/sbin/disklabel/Makefile	Sun Dec 13 05:01:32 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.65 2009/12/05 16:29:11 pooka Exp $
+#	$NetBSD: Makefile,v 1.66 2009/12/13 05:01:32 nakayama Exp $
 #	@(#)Makefile	8.2 (Berkeley) 3/17/94
 
 PROG=	disklabel
@@ -10,7 +10,7 @@
 .endif
 
 # these have additional requirements on the alignment of a partition
-.if (${MACHINE_ARCH} == sparc) || (${MACHINE_ARCH} == sparc64) \
+.if (${MACHINE} == sparc) || (${MACHINE} == sparc64) \
 	|| (${MACHINE} == sun3)
 CPPFLAGS+= -DSTRICT_CYLINDER_ALIGNMENT
 .endif

Index: src/sbin/edlabel/Makefile
diff -u src/sbin/edlabel/Makefile:1.17 src/sbin/edlabel/Makefile:1.18
--- src/sbin/edlabel/Makefile:1.17	Mon Feb 16 13:38:21 2009
+++ src/sbin/edlabel/Makefile	Sun Dec 13 05:01:32 2009
@@ -1,10 +1,10 @@
-# $NetBSD: Makefile,v 1.17 2009/02/16 13:38:21 is Exp $
+# $NetBSD: Makefile,v 1.18 2009/12/13 05:01:32 nakayama Exp $
 # edlabel (Edit Disk LABEL)
 
 NOMAN=	# defined
 
 .if ${MACHINE_ARCH} == m68000 || ${MACHINE_ARCH} == m68k || \
-${MACHINE_ARCH} == sparc || ${MACHINE_ARCH} == sparc64
+${MACHINE} == sparc || ${MACHINE} == sparc64
 PROG=	edlabel
 LDADD+=-lutil
 DPADD+=${LIBUTIL}

Index: src/sys/arch/Makefile
diff -u src/sys/arch/Makefile:1.39 src/sys/arch/Makefile:1.40
--- src/sys/arch/Makefile:1.39	Sat Dec  5 16:29:12 2009
+++ src/sys/arch/Makefile	Sun Dec 13 05:01:33 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.39 2009/12/05 16:29:12 pooka Exp $
+#	$NetBSD: Makefile,v 1.40 2009/12/13 05:01:33 nakayama Exp $
 
 # For now, we install the machine and arch includes, and symlink 'machine'
 # to the location of the machine includes (usually).
@@ -22,7 +22,7 @@
 SUBDIR+= ${ARCHSUBDIR}
 .endif
 .endif
-.if ${MACHINE_ARCH} == sparc
+.if ${MACHINE} == sparc
 SUBDIR+= sparc64
 .endif
 .if (${MACHINE} == hpcmips || ${MACHINE} == hpcsh)

Index: src/sys/arch/sparc/stand/Makefile
diff -u src/sys/arch/sparc/stand/Makefile:1.21 src/sys/arch/sparc/stand/Makefile:1.22
--- src/sys/arch/sparc/stand/Makefile:1.21	Sat Feb 14 13:52:51 2009
+++ src/sys/arch/sparc/stand/Makefile	Sun Dec 13 05:01:33 2009
@@ -1,6 +1,6 @@
-#	$NetBSD: Makefile,v 1.21 2009/02/14 13:52:51 abs Exp $
+#	$NetBSD: Makefile,v 1.22 2009/12/13 05:01:33 nakayama Exp $
 
-.if ${MACHINE_ARCH} == sparc
+.if ${MACHINE} == sparc
 SUBDIR= boot bootxx bootblk ofwboot binstall
 .endif
 

Index: src/sys/arch/sparc/stand/boot/Makefile
diff -u src/sys/arch/sparc/stand/boot/Makefile:1.35 src/sys/arch/sparc/stand/boot/Makefile:1.36
--- src/sys/arch/sparc/stand/boot/Makefile:1.35	Sat Feb 14 13:52:51 2009
+++ src/sys/arch/sparc/stand/boot/Makefile	Sun Dec 13 05:01:33 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.35 2009/02/14 13:52:51 abs Exp $
+#	$NetBSD: Makefile,v 1.36 2009/12/13 05:01:33 nakayama Exp $
 
 STRIPFLAG=
 PROGSOURCE=	boot.c net.c netif_sun.c conf.c openfirm.c bootinfo.c \
@@ -16,7 +16,7 @@
 
 .include ../Makefile.buildboot
 
-.if ${MACHINE_ARCH} == sparc64
+.if ${MACHINE} == sparc64
 CFLAGS+=	-m32
 LDFLAGS+=	-m elf32_sparc
 AFLAGS+=	-Wa,-32

Index: 

CVS commit: src

2009-12-12 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Sun Dec 13 05:04:37 UTC 2009

Modified Files:
src/external/mit/xorg/server/drivers: Makefile
src/external/mit/xorg/server/xorg-server: Makefile.common
src/external/mit/xorg/server/xorg-server/hw/xfree86/xorgos: Makefile
src/share/mk: bsd.x11.mk
Added Files:
src/distrib/sets/lists/xserver: md.zaurus

Log Message:
The support of X for zaurus is added.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/distrib/sets/lists/xserver/md.zaurus
cvs rdiff -u -r1.37 -r1.38 src/external/mit/xorg/server/drivers/Makefile
cvs rdiff -u -r1.9 -r1.10 \
src/external/mit/xorg/server/xorg-server/Makefile.common
cvs rdiff -u -r1.18 -r1.19 \
src/external/mit/xorg/server/xorg-server/hw/xfree86/xorgos/Makefile
cvs rdiff -u -r1.80 -r1.81 src/share/mk/bsd.x11.mk

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

Modified files:

Index: src/external/mit/xorg/server/drivers/Makefile
diff -u src/external/mit/xorg/server/drivers/Makefile:1.37 src/external/mit/xorg/server/drivers/Makefile:1.38
--- src/external/mit/xorg/server/drivers/Makefile:1.37	Fri Dec 11 22:37:39 2009
+++ src/external/mit/xorg/server/drivers/Makefile	Sun Dec 13 05:04:36 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.37 2009/12/11 22:37:39 snj Exp $
+#	$NetBSD: Makefile,v 1.38 2009/12/13 05:04:36 nonaka Exp $
 
 SUBDIR= \
 	xf86-input-keyboard \
@@ -166,6 +166,9 @@
 
 # replace with xf86-video-openchrome
 #	xf86-video-via
+.elif ${MACHINE} == zaurus
+SUBDIR+= \
+	xf86-video-wsfb
 .endif
 
 # broken with xorg-server 1.6

Index: src/external/mit/xorg/server/xorg-server/Makefile.common
diff -u src/external/mit/xorg/server/xorg-server/Makefile.common:1.9 src/external/mit/xorg/server/xorg-server/Makefile.common:1.10
--- src/external/mit/xorg/server/xorg-server/Makefile.common:1.9	Mon Feb 16 12:41:11 2009
+++ src/external/mit/xorg/server/xorg-server/Makefile.common	Sun Dec 13 05:04:36 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.common,v 1.9 2009/02/16 12:41:11 abs Exp $
+#	$NetBSD: Makefile.common,v 1.10 2009/12/13 05:04:36 nonaka Exp $
 
 # These define parts of the Xserver tree that are to be
 # conditionally compiled for different platforms.  See
@@ -44,7 +44,8 @@
 ${MACHINE} == macppc || ${MACHINE} == cats || \
 ${MACHINE} == sgimips || ${MACHINE} == shark || \
 ${MACHINE} == netwinder || ${MACHINE} == sparc64 || \
-${MACHINE} == sparc || ${MACHINE} == alpha
+${MACHINE} == sparc || ${MACHINE} == alpha || \
+${MACHINE} == zaurus
 XSERVER_NEEDS_XFONT=	yes
 XSERVER_XFREE86=	yes
 .endif

Index: src/external/mit/xorg/server/xorg-server/hw/xfree86/xorgos/Makefile
diff -u src/external/mit/xorg/server/xorg-server/hw/xfree86/xorgos/Makefile:1.18 src/external/mit/xorg/server/xorg-server/hw/xfree86/xorgos/Makefile:1.19
--- src/external/mit/xorg/server/xorg-server/hw/xfree86/xorgos/Makefile:1.18	Thu Aug 27 04:34:13 2009
+++ src/external/mit/xorg/server/xorg-server/hw/xfree86/xorgos/Makefile	Sun Dec 13 05:04:36 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.18 2009/08/27 04:34:13 mrg Exp $
+#	$NetBSD: Makefile,v 1.19 2009/12/13 05:04:36 nonaka Exp $
 
 .include ../../../Makefile.serverlib
 .include ../../../Makefile.servermod
@@ -63,7 +63,8 @@
 
 .if ${MACHINE} == cats || \
 ${MACHINE} == shark || \
-${MACHINE} == netwinder
+${MACHINE} == netwinder || \
+${MACHINE} == zaurus
 SRCS.bsd+=  ppc_video.c stdResource.c pm_noop.c agp_noop.c
 .for _FN in ${SRCS.bsd}
 CPPFLAGS.${_FN}=-DWSCONS_SUPPORT -DUSESTDRES -DHAVE_SYSV_IPC

Index: src/share/mk/bsd.x11.mk
diff -u src/share/mk/bsd.x11.mk:1.80 src/share/mk/bsd.x11.mk:1.81
--- src/share/mk/bsd.x11.mk:1.80	Wed Nov 11 16:35:45 2009
+++ src/share/mk/bsd.x11.mk	Sun Dec 13 05:04:37 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.x11.mk,v 1.80 2009/11/11 16:35:45 tron Exp $
+#	$NetBSD: bsd.x11.mk,v 1.81 2009/12/13 05:04:37 nonaka Exp $
 
 .include bsd.init.mk
 
@@ -116,7 +116,8 @@
 ${MACHINE} == sgimips	|| \
 ${MACHINE} == sparc64	|| \
 ${MACHINE} == sparc	|| \
-${MACHINE} == shark
+${MACHINE} == shark	|| \
+${MACHINE} == zaurus
 #	LOADABLE
 X11FLAGS.LOADABLE=	-DXFree86LOADER -DIN_MODULE -DXFree86Module \
 			-fno-merge-constants

Added files:

Index: src/distrib/sets/lists/xserver/md.zaurus
diff -u /dev/null src/distrib/sets/lists/xserver/md.zaurus:1.1
--- /dev/null	Sun Dec 13 05:04:37 2009
+++ src/distrib/sets/lists/xserver/md.zaurus	Sun Dec 13 05:04:36 2009
@@ -0,0 +1,119 @@
+./usr/X11R7/bin/X	-unknown-	xorg
+./usr/X11R7/bin/Xorg	-unknown-	xorg
+./usr/X11R7/bin/cvt	-unknown-	xorg
+./usr/X11R7/bin/gtf	-unknown-	xorg
+./usr/X11R7/lib/X11/doc/README.DRI			-unknown-	xorg
+./usr/X11R7/lib/X11/doc/README.rapidaccess		-unknown-	xorg
+./usr/X11R7/lib/modules/drivers/kbd_drv.so		-unknown-	xorg
+./usr/X11R7/lib/modules/drivers/kbd_drv.so.1		-unknown-	xorg

CVS commit: src/doc

2009-12-12 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Sun Dec 13 05:11:04 UTC 2009

Modified Files:
src/doc: CHANGES

Log Message:
note support Xorg for zaurus.


To generate a diff of this commit:
cvs rdiff -u -r1.1329 -r1.1330 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.1329 src/doc/CHANGES:1.1330
--- src/doc/CHANGES:1.1329	Tue Dec  8 21:54:22 2009
+++ src/doc/CHANGES	Sun Dec 13 05:11:04 2009
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1329 $
+# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1330 $
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -502,3 +502,4 @@
 		mount_portal with a version implemented using puffs.
 		[pooka 20091205]
 	ntp:	Import ntp-4-2-4p8. [kardel 20091208]
+	zaurus: Add support Xorg. [nonaka 20091213]



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

2009-12-12 Thread Takeshi Nakayama
Module Name:src
Committed By:   nakayama
Date:   Sun Dec 13 05:21:06 UTC 2009

Modified Files:
src/sys/arch/sparc64/dev: lom.c

Log Message:
Merge change of OpenBSD rev 1.20:

Remove debug printf and properly dequeue command instead when a read times out
on LOMLite2.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/sparc64/dev/lom.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/sparc64/dev/lom.c
diff -u src/sys/arch/sparc64/dev/lom.c:1.3 src/sys/arch/sparc64/dev/lom.c:1.4
--- src/sys/arch/sparc64/dev/lom.c:1.3	Sat Nov 28 04:14:27 2009
+++ src/sys/arch/sparc64/dev/lom.c	Sun Dec 13 05:21:06 2009
@@ -1,5 +1,5 @@
-/*	$NetBSD: lom.c,v 1.3 2009/11/28 04:14:27 nakayama Exp $	*/
-/*	$OpenBSD: lom.c,v 1.19 2009/11/10 22:26:48 kettenis Exp $	*/
+/*	$NetBSD: lom.c,v 1.4 2009/12/13 05:21:06 nakayama Exp $	*/
+/*	$OpenBSD: lom.c,v 1.20 2009/12/12 13:01:00 kettenis Exp $	*/
 /*
  * Copyright (c) 2009 Mark Kettenis
  *
@@ -17,7 +17,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: lom.c,v 1.3 2009/11/28 04:14:27 nakayama Exp $);
+__KERNEL_RCSID(0, $NetBSD: lom.c,v 1.4 2009/12/13 05:21:06 nakayama Exp $);
 
 #include sys/param.h
 #include sys/device.h
@@ -643,7 +643,7 @@
 
 	error = tsleep(lc, PZERO, lom2rd, hz);
 	if (error)
-		aprint_error_dev(sc-sc_dev, lom2_read failed\n);
+		lom_dequeue_cmd(sc, lc);
 
 	*val = lc.lc_data;