CVS commit: src/tests/syscall

2011-04-06 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Wed Apr  6 06:46:15 UTC 2011

Modified Files:
src/tests/syscall: t_getrusage.c

Log Message:
Add heuristic evaluation of PR kern/30115.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/syscall/t_getrusage.c

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

Modified files:

Index: src/tests/syscall/t_getrusage.c
diff -u src/tests/syscall/t_getrusage.c:1.2 src/tests/syscall/t_getrusage.c:1.3
--- src/tests/syscall/t_getrusage.c:1.2	Wed Apr  6 05:56:05 2011
+++ src/tests/syscall/t_getrusage.c	Wed Apr  6 06:46:14 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: t_getrusage.c,v 1.2 2011/04/06 05:56:05 jruoho Exp $ */
+/* $NetBSD: t_getrusage.c,v 1.3 2011/04/06 06:46:14 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -29,9 +29,10 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include sys/cdefs.h
-__RCSID($NetBSD: t_getrusage.c,v 1.2 2011/04/06 05:56:05 jruoho Exp $);
+__RCSID($NetBSD: t_getrusage.c,v 1.3 2011/04/06 06:46:14 jruoho Exp $);
 
 #include sys/resource.h
+#include sys/time.h
 
 #include atf-c.h
 #include errno.h
@@ -39,6 +40,7 @@
 #include signal.h
 #include string.h
 
+static void	work(void);
 static void	sighandler(int);
 
 static const int who[] = {
@@ -52,6 +54,17 @@
 	/* Nothing. */
 }
 
+static void
+work(void)
+{
+	size_t n = UINT16_MAX * 100;
+
+	while (n  0) {
+		 asm volatile(nop);	/* Do something. */
+		 n--;
+	}
+}
+
 ATF_TC(getrusage_err);
 ATF_TC_HEAD(getrusage_err, tc)
 {
@@ -104,30 +117,60 @@
 		atf_tc_fail(getrusage(2) did not record signals);
 }
 
-ATF_TC(getrusage_utime);
-ATF_TC_HEAD(getrusage_utime, tc)
+ATF_TC(getrusage_utime_back);
+ATF_TC_HEAD(getrusage_utime_back, tc)
+{
+	atf_tc_set_md_var(tc, descr, Test bogus values from getrusage(2));
+}
+
+ATF_TC_BODY(getrusage_utime_back, tc)
+{
+	struct rusage ru1, ru2;
+	size_t i, n = 100;
+
+	/*
+	 * Test that two consecutive calls are sane.
+	 */
+	atf_tc_expect_fail(PR kern/30115);
+
+	for (i = 0; i  n; i++) {
+
+		(void)memset(ru1, 0, sizeof(struct rusage));
+		(void)memset(ru1, 0, sizeof(struct rusage));
+
+		work();
+
+		ATF_REQUIRE(getrusage(RUSAGE_SELF, ru1) == 0);
+
+		work();
+
+		ATF_REQUIRE(getrusage(RUSAGE_SELF, ru2) == 0);
+
+		if (timercmp(ru2.ru_utime, ru1.ru_utime, ) != 0)
+			atf_tc_fail(user time went backwards);
+	}
+}
+
+ATF_TC(getrusage_utime_zero);
+ATF_TC_HEAD(getrusage_utime_zero, tc)
 {
 	atf_tc_set_md_var(tc, descr, Test zero utime from getrusage(2));
 }
 
-ATF_TC_BODY(getrusage_utime, tc)
+ATF_TC_BODY(getrusage_utime_zero, tc)
 {
-	size_t n = UINT16_MAX * 100;
 	struct rusage ru;
 
 	/*
 	 * Test that getrusage(2) does not return
 	 * zero user time for the calling process.
-	 * Note that this does not trigger always.
 	 */
 	atf_tc_expect_fail(PR port-amd64/41734);
 
-	while (n  0) {
-		 asm volatile(nop);	/* Do something. */
-		 n--;
-	}
+	work();
 
 	(void)memset(ru, 0, sizeof(struct rusage));
+
 	ATF_REQUIRE(getrusage(RUSAGE_SELF, ru) == 0);
 
 	if (ru.ru_utime.tv_sec == 0  ru.ru_utime.tv_usec == 0)
@@ -139,7 +182,8 @@
 
 	ATF_TP_ADD_TC(tp, getrusage_err);
 	ATF_TP_ADD_TC(tp, getrusage_sig);
-	ATF_TP_ADD_TC(tp, getrusage_utime);
+	ATF_TP_ADD_TC(tp, getrusage_utime_back);
+	ATF_TP_ADD_TC(tp, getrusage_utime_zero);
 
 	return atf_no_error();
 }



CVS commit: src/tests/lib/libc/stdlib

2011-04-06 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Wed Apr  6 07:25:34 UTC 2011

Modified Files:
src/tests/lib/libc/stdlib: t_strtod.c

Log Message:
Verify the existence of PR lib/33262.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libc/stdlib/t_strtod.c

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

Modified files:

Index: src/tests/lib/libc/stdlib/t_strtod.c
diff -u src/tests/lib/libc/stdlib/t_strtod.c:1.2 src/tests/lib/libc/stdlib/t_strtod.c:1.3
--- src/tests/lib/libc/stdlib/t_strtod.c:1.2	Tue Apr  5 08:24:28 2011
+++ src/tests/lib/libc/stdlib/t_strtod.c	Wed Apr  6 07:25:34 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_strtod.c,v 1.2 2011/04/05 08:24:28 jruoho Exp $ */
+/*	$NetBSD: t_strtod.c,v 1.3 2011/04/06 07:25:34 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
 /* Public domain, Otto Moerbeek o...@drijf.net, 2006. */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: t_strtod.c,v 1.2 2011/04/05 08:24:28 jruoho Exp $);
+__RCSID($NetBSD: t_strtod.c,v 1.3 2011/04/06 07:25:34 jruoho Exp $);
 
 #include atf-c.h
 #include errno.h
@@ -94,6 +94,30 @@
 	ATF_REQUIRE(fabs(d)  1.0e-40);
 }
 
+ATF_TC(strtod_inf);
+ATF_TC_HEAD(strtod_inf, tc)
+{
+	atf_tc_set_md_var(tc, descr, A strtod(3) with INF);
+}
+
+ATF_TC_BODY(strtod_inf, tc)
+{
+	long double ld;
+	double d;
+	float f;
+
+	atf_tc_expect_fail(PR lib/33262);
+
+	d = strtod(INF, NULL);
+	ATF_REQUIRE(isinf(d) != 0);
+
+	f = strtof(INF, NULL);
+	ATF_REQUIRE(isinf(f) != 0);
+
+	ld = strtold(INF, NULL);
+	ATF_REQUIRE(isinf(ld) != 0);
+}
+
 ATF_TC(strtod_underflow);
 ATF_TC_HEAD(strtod_underflow, tc)
 {
@@ -127,6 +151,7 @@
 
 	ATF_TP_ADD_TC(tp, strtod_basic);
 	ATF_TP_ADD_TC(tp, strtod_hex);
+	ATF_TP_ADD_TC(tp, strtod_inf);
 	ATF_TP_ADD_TC(tp, strtod_underflow);
 
 	return atf_no_error();



CVS commit: src/sys/sys

2011-04-06 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Wed Apr  6 08:15:45 UTC 2011

Modified Files:
src/sys/sys: power.h

Log Message:
Include stdint(3) for user space. Fixes PR # 39744.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/sys/power.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/sys/power.h
diff -u src/sys/sys/power.h:1.15 src/sys/sys/power.h:1.16
--- src/sys/sys/power.h:1.15	Mon Feb 15 22:32:04 2010
+++ src/sys/sys/power.h	Wed Apr  6 08:15:44 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: power.h,v 1.15 2010/02/15 22:32:04 pgoyette Exp $	*/
+/*	$NetBSD: power.h,v 1.16 2011/04/06 08:15:44 jruoho Exp $	*/
 
 /*
  * Copyright (c) 2003 Wasabi Systems, Inc.
@@ -44,6 +44,10 @@
 
 #include sys/ioccom.h
 
+#ifndef _KERNEL
+#include stdint.h
+#endif
+
 /*
  * Power Switches:
  *



CVS commit: src/lib/libcurses

2011-04-06 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Wed Apr  6 08:38:44 UTC 2011

Modified Files:
src/lib/libcurses: curses_print.3

Log Message:
Fix PR # 41894.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/lib/libcurses/curses_print.3

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

Modified files:

Index: src/lib/libcurses/curses_print.3
diff -u src/lib/libcurses/curses_print.3:1.6 src/lib/libcurses/curses_print.3:1.7
--- src/lib/libcurses/curses_print.3:1.6	Wed Apr 16 13:35:01 2003
+++ src/lib/libcurses/curses_print.3	Wed Apr  6 08:38:43 2011
@@ -1,4 +1,4 @@
-.\	$NetBSD: curses_print.3,v 1.6 2003/04/16 13:35:01 wiz Exp $
+.\	$NetBSD: curses_print.3,v 1.7 2011/04/06 08:38:43 jruoho Exp $
 .\
 .\ Copyright (c) 2002
 .\	Brett Lymn (bl...@netbsd.org, brett_l...@yahoo.com.au)
@@ -30,7 +30,7 @@
 .\ SUCH DAMAGE.
 .\
 .\
-.Dd August 12, 2002
+.Dd April 6, 2011
 .Dt CURSES_PRINT 3
 .Os
 .Sh NAME
@@ -64,8 +64,9 @@
 .Fn printw
 function formats and prints its arguments on
 .Dv stdscr .
-The behaviour is the same as that of
-.Fn printf .
+The behavior is deliberately similar to that of
+.Xr printf 3 ,
+but, notably, the return value differs.
 .Pp
 The
 .Fn wprintw
@@ -104,7 +105,7 @@
 The functions that return an int will return one of the following
 values:
 .Pp
-.Bl -tag -width ERR -compact
+.Bl -tag -width ERR -offset indent
 .It Er OK
 The function completed successfully.
 .It Er ERR



CVS commit: src/tests/lib/libc/gen

2011-04-06 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Wed Apr  6 08:47:55 UTC 2011

Modified Files:
src/tests/lib/libc/gen: t_nice.c

Log Message:
As there is PR lib/42587, mark tiny POSIX error as expected failure.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libc/gen/t_nice.c

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

Modified files:

Index: src/tests/lib/libc/gen/t_nice.c
diff -u src/tests/lib/libc/gen/t_nice.c:1.2 src/tests/lib/libc/gen/t_nice.c:1.3
--- src/tests/lib/libc/gen/t_nice.c:1.2	Mon Apr  4 10:30:29 2011
+++ src/tests/lib/libc/gen/t_nice.c	Wed Apr  6 08:47:55 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_nice.c,v 1.2 2011/04/04 10:30:29 jruoho Exp $ */
+/*	$NetBSD: t_nice.c,v 1.3 2011/04/06 08:47:55 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include sys/cdefs.h
-__RCSID($NetBSD: t_nice.c,v 1.2 2011/04/04 10:30:29 jruoho Exp $);
+__RCSID($NetBSD: t_nice.c,v 1.3 2011/04/06 08:47:55 jruoho Exp $);
 
 #include sys/resource.h
 #include sys/wait.h
@@ -57,12 +57,16 @@
 	 * caller does not have privileges. Note
 	 * that the errno is thus wrong in NetBSD.
 	 */
+	atf_tc_expect_fail(PR lib/42587);
+
 	for (i = -20; i  0; i++) {
 
 		errno = 0;
 
 		ATF_REQUIRE(nice(i) == -1);
-		ATF_REQUIRE(errno == EACCES);
+
+		if (errno != EPERM)
+			atf_tc_fail(wrong return value);
 	}
 }
 



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

2011-04-06 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Wed Apr  6 09:06:44 UTC 2011

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

Log Message:
Import dhcpcd-5.1.12 with the following changes:
* 20-resolv.conf now uses the correct variable for $IF_METRIC
* Exclude interface values when dumping the lease
* Parse static value subnet_mask when it exists instead of deriving from
  ip address
* logger calls now resemble dhcpcd calls to syslog(3)
* Reject offered IP address if INADDR_BROADCAST or INADDR_ANY
* Change the route if source address has changed
* Note the address we are requesting in the broadcast log entry
* When operating on one interface, respect the timeout for in dhcpcd.conf
* Escape | and  characters before passing the value to the shell
  Ensure we set a valid hostname, DNS domain and NIS domain.
  Document the need for input validation in dhcpcd-run-hooks(8).
  Fixes CVE-2011-996
  Based on a patch to dhcpcd-3 by Marius Tomaschewski m...@suse.de


Status:

Vendor Tag: roy
Release Tags:   dhcpcd-5-2-12

U src/external/bsd/dhcpcd/dist/arp.c
U src/external/bsd/dhcpcd/dist/bind.c
U src/external/bsd/dhcpcd/dist/common.c
U src/external/bsd/dhcpcd/dist/control.c
U src/external/bsd/dhcpcd/dist/dhcp.c
U src/external/bsd/dhcpcd/dist/dhcpcd.c
U src/external/bsd/dhcpcd/dist/duid.c
U src/external/bsd/dhcpcd/dist/eloop.c
U src/external/bsd/dhcpcd/dist/if-options.c
U src/external/bsd/dhcpcd/dist/if-pref.c
U src/external/bsd/dhcpcd/dist/ipv4ll.c
U src/external/bsd/dhcpcd/dist/net.c
U src/external/bsd/dhcpcd/dist/signals.c
U src/external/bsd/dhcpcd/dist/configure.c
U src/external/bsd/dhcpcd/dist/bpf.c
U src/external/bsd/dhcpcd/dist/if-bsd.c
U src/external/bsd/dhcpcd/dist/platform-bsd.c
U src/external/bsd/dhcpcd/dist/dhcpcd.conf
U src/external/bsd/dhcpcd/dist/dhcpcd-run-hooks.8.in
U src/external/bsd/dhcpcd/dist/dhcpcd-run-hooks.in
C src/external/bsd/dhcpcd/dist/dhcpcd.8.in
U src/external/bsd/dhcpcd/dist/dhcpcd.conf.5.in
U src/external/bsd/dhcpcd/dist/arp.h
U src/external/bsd/dhcpcd/dist/bind.h
U src/external/bsd/dhcpcd/dist/bpf-filter.h
U src/external/bsd/dhcpcd/dist/common.h
U src/external/bsd/dhcpcd/dist/config.h
U src/external/bsd/dhcpcd/dist/configure.h
U src/external/bsd/dhcpcd/dist/control.h
U src/external/bsd/dhcpcd/dist/defs.h
U src/external/bsd/dhcpcd/dist/dhcp.h
U src/external/bsd/dhcpcd/dist/dhcpcd.h
U src/external/bsd/dhcpcd/dist/duid.h
U src/external/bsd/dhcpcd/dist/eloop.h
U src/external/bsd/dhcpcd/dist/if-options.h
U src/external/bsd/dhcpcd/dist/if-pref.h
U src/external/bsd/dhcpcd/dist/ipv4ll.h
U src/external/bsd/dhcpcd/dist/net.h
U src/external/bsd/dhcpcd/dist/platform.h
U src/external/bsd/dhcpcd/dist/signals.h
U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/01-test
U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/02-dump
U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/10-mtu
U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/20-resolv.conf
U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/29-lookup-hostname
U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/30-hostname
U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/50-ntp.conf
U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/50-ypbind

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

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



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

2011-04-06 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Wed Apr  6 09:09:05 UTC 2011

Modified Files:
src/external/bsd/dhcpcd/dist: dhcpcd.8.in

Log Message:
Sync


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/external/bsd/dhcpcd/dist/dhcpcd.8.in

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

Modified files:

Index: src/external/bsd/dhcpcd/dist/dhcpcd.8.in
diff -u src/external/bsd/dhcpcd/dist/dhcpcd.8.in:1.9 src/external/bsd/dhcpcd/dist/dhcpcd.8.in:1.10
--- src/external/bsd/dhcpcd/dist/dhcpcd.8.in:1.9	Fri Feb  4 16:30:32 2011
+++ src/external/bsd/dhcpcd/dist/dhcpcd.8.in	Wed Apr  6 09:09:05 2011
@@ -22,7 +22,7 @@
 .\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\ SUCH DAMAGE.
 .\
-.Dd January 3, 2011
+.Dd February 4, 2011
 .Dt DHCPCD 8 SMM
 .Os
 .Sh NAME



CVS commit: src/doc

2011-04-06 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Wed Apr  6 09:11:09 UTC 2011

Modified Files:
src/doc: 3RDPARTY CHANGES

Log Message:
import dhcpcd-5.2.12


To generate a diff of this commit:
cvs rdiff -u -r1.828 -r1.829 src/doc/3RDPARTY
cvs rdiff -u -r1.1536 -r1.1537 src/doc/CHANGES

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

Modified files:

Index: src/doc/3RDPARTY
diff -u src/doc/3RDPARTY:1.828 src/doc/3RDPARTY:1.829
--- src/doc/3RDPARTY:1.828	Tue Apr  5 08:51:05 2011
+++ src/doc/3RDPARTY	Wed Apr  6 09:11:08 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.828 2011/04/05 08:51:05 wiz Exp $
+#	$NetBSD: 3RDPARTY,v 1.829 2011/04/06 09:11:08 roy Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -269,8 +269,8 @@
 top of the current tree.
 
 Package:	dhcpcd
-Version:	5.2.11
-Current Vers:	5.2.11
+Version:	5.2.12
+Current Vers:	5.2.12
 Maintainer:	roy
 Archive Site:	ftp://roy.marples.name/pub/dhcpcd/
 Home Page:	http://roy.marples.name/projects/dhcpcd/

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.1536 src/doc/CHANGES:1.1537
--- src/doc/CHANGES:1.1536	Tue Apr  5 12:18:11 2011
+++ src/doc/CHANGES	Wed Apr  6 09:11:08 2011
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1536 $
+# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1537 $
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -986,3 +986,4 @@
 	s390rtc(4): Add a todr(9) driver for Seiko Instruments S-35390A.
 		[phx 20110404]
 	sandpoint: QNAP support. [phx 20110405]
+	dhcpcd(8): Import dhcpcd-5.2.12. [roy 20110406]



CVS commit: src

2011-04-06 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Wed Apr  6 09:35:49 UTC 2011

Modified Files:
src/distrib/sets/lists/tests: mi
src/tests/lib/libm: Makefile
Added Files:
src/tests/lib/libm: t_tanh.c

Log Message:
A test case for PR lib/44057.


To generate a diff of this commit:
cvs rdiff -u -r1.295 -r1.296 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libm/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/lib/libm/t_tanh.c

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/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.295 src/distrib/sets/lists/tests/mi:1.296
--- src/distrib/sets/lists/tests/mi:1.295	Wed Apr  6 05:53:16 2011
+++ src/distrib/sets/lists/tests/mi	Wed Apr  6 09:35:49 2011
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.295 2011/04/06 05:53:16 jruoho Exp $
+# $NetBSD: mi,v 1.296 2011/04/06 09:35:49 jruoho Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -453,6 +453,7 @@
 ./usr/libdata/debug/usr/tests/lib/libm/t_ceil.debug			tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libm/t_floor.debug			tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libm/t_libm.debug			tests-lib-debug		debug,atf
+./usr/libdata/debug/usr/tests/lib/libm/t_tanh.debug			tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libobjctests-lib-debug
 ./usr/libdata/debug/usr/tests/lib/libobjc/t_threads.debug		tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libposixtests-lib-debug
@@ -1926,6 +1927,7 @@
 ./usr/tests/lib/libm/t_ceil			tests-lib-tests		atf
 ./usr/tests/lib/libm/t_floor			tests-lib-tests		atf
 ./usr/tests/lib/libm/t_libm			tests-lib-tests		atf
+./usr/tests/lib/libm/t_tanh			tests-lib-tests		atf
 ./usr/tests/lib/libobjctests-lib-tests		atf
 ./usr/tests/lib/libobjc/Atffile			tests-lib-tests		atf
 ./usr/tests/lib/libobjc/t_threads		tests-lib-tests		atf

Index: src/tests/lib/libm/Makefile
diff -u src/tests/lib/libm/Makefile:1.2 src/tests/lib/libm/Makefile:1.3
--- src/tests/lib/libm/Makefile:1.2	Thu Mar 24 15:43:06 2011
+++ src/tests/lib/libm/Makefile	Wed Apr  6 09:35:49 2011
@@ -1,10 +1,10 @@
-# $NetBSD: Makefile,v 1.2 2011/03/24 15:43:06 jruoho Exp $
+# $NetBSD: Makefile,v 1.3 2011/04/06 09:35:49 jruoho Exp $
 
 .include bsd.own.mk
 
 TESTSDIR=	${TESTSBASE}/lib/libm
 
-TESTS_C+=	t_ceil t_floor t_libm
+TESTS_C+=	t_ceil t_floor t_libm t_tanh
 
 LDADD+=-lm
 

Added files:

Index: src/tests/lib/libm/t_tanh.c
diff -u /dev/null src/tests/lib/libm/t_tanh.c:1.1
--- /dev/null	Wed Apr  6 09:35:49 2011
+++ src/tests/lib/libm/t_tanh.c	Wed Apr  6 09:35:49 2011
@@ -0,0 +1,64 @@
+/* $NetBSD: t_tanh.c,v 1.1 2011/04/06 09:35:49 jruoho Exp $ */
+
+/*-
+ * Copyright (c) 2011 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Jukka Ruohonen.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+#include sys/cdefs.h
+__RCSID($NetBSD: t_tanh.c,v 1.1 2011/04/06 09:35:49 jruoho Exp $);
+
+#include math.h
+
+#include atf-c.h
+
+ATF_TC(tanh_sign);
+ATF_TC_HEAD(tanh_sign, tc)
+{
+	atf_tc_set_md_var(tc, descr, Test signs in tanh(3) and tanhf(3));
+}
+
+ATF_TC_BODY(tanh_sign, tc)
+{
+	double d;
+	float f;
+
+	/*
+	 * PR lib/44057.
+	 */
+	d = tanh(-0.0);
+	f = tanhf(-0.0);
+
+	ATF_REQUIRE(signbit(d) != 0);
+	ATF_REQUIRE(signbit(f) != 0);
+}
+
+ATF_TP_ADD_TCS(tp)
+{
+	ATF_TP_ADD_TC(tp, tanh_sign);
+
+	return atf_no_error();
+}



CVS commit: src/tests/lib/libc/gen

2011-04-06 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Wed Apr  6 10:04:53 UTC 2011

Modified Files:
src/tests/lib/libc/gen: t_humanize_number.c

Log Message:
Formally verify the numerous bugs in humanize_number(3).
From PR lib/44097, by yamt@.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libc/gen/t_humanize_number.c

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

Modified files:

Index: src/tests/lib/libc/gen/t_humanize_number.c
diff -u src/tests/lib/libc/gen/t_humanize_number.c:1.1 src/tests/lib/libc/gen/t_humanize_number.c:1.2
--- src/tests/lib/libc/gen/t_humanize_number.c:1.1	Tue Dec 28 12:46:15 2010
+++ src/tests/lib/libc/gen/t_humanize_number.c	Wed Apr  6 10:04:53 2011
@@ -1,12 +1,9 @@
-/*	$NetBSD: t_humanize_number.c,v 1.1 2010/12/28 12:46:15 pgoyette Exp $	*/
+/*	$NetBSD: t_humanize_number.c,v 1.2 2011/04/06 10:04:53 jruoho Exp $	*/
 
 /*-
- * Copyright (c) 2010 The NetBSD Foundation, Inc.
+ * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
- * This code is derived from software contributed to The NetBSD Foundation
- * by 
- *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
@@ -113,11 +110,10 @@
 	{ HN_DIVISOR_1000, HN_DIVISOR_1000 },
 };
 
-const char *
-	formatflags(char *, size_t, const struct hnflags *, size_t, int);
-void	newline(void);
-void	w_printf(const char *, ...);
-int	main(int, char *[]);
+const char *formatflags(char *, size_t, const struct hnflags *, size_t, int);
+void	newline(void);
+void	w_printf(const char *, ...);
+int	main(int, char *[]);
 
 const char *
 formatflags(char *buf, size_t buflen, const struct hnflags *hfs,
@@ -198,15 +194,15 @@
 	va_end(ap);
 }
 
-ATF_TC(humanize);
+ATF_TC(humanize_basic);
 
-ATF_TC_HEAD(humanize, tc)
+ATF_TC_HEAD(humanize_basic, tc)
 {
 
 	atf_tc_set_md_var(tc, descr, Test humanize_number(3));
 }
 
-ATF_TC_BODY(humanize, tc)
+ATF_TC_BODY(humanize_basic, tc)
 {
 	char fbuf[128];
 	const struct hnopts *ho;
@@ -248,10 +244,70 @@
 	}
 }
 
+ATF_TC(humanize_big);
+
+ATF_TC_HEAD(humanize_big, tc)
+{
+
+	atf_tc_set_md_var(tc, descr, Test humanize big numbers);
+}
+
+ATF_TC_BODY(humanize_big, tc)
+{
+	char buf[1024];
+	int rv;
+
+	/*
+	 * Seems to works.
+	 */
+	(void)memset(buf, 0, sizeof(buf));
+
+	rv = humanize_number(buf, 10, 1, ,
+	HN_AUTOSCALE, HN_NOSPACE);
+
+	ATF_REQUIRE(rv != -1);
+	ATF_REQUIRE(strcmp(buf, 1) == 0);
+
+	/*
+	 * A bogus value with large number.
+	 */
+	(void)memset(buf, 0, sizeof(buf));
+
+	rv = humanize_number(buf, 10, INT64_MAX, ,
+	HN_AUTOSCALE, HN_NOSPACE);
+
+	ATF_REQUIRE(rv != -1);
+	ATF_REQUIRE(strcmp(buf, 0) != 0);
+
+	/*
+	 * Large buffer with HN_AUTOSCALE. Entirely bogus.
+	 */
+	(void)memset(buf, 0, sizeof(buf));
+
+	rv = humanize_number(buf, sizeof(buf), 1, ,
+	HN_AUTOSCALE, HN_NOSPACE);
+
+	ATF_REQUIRE(rv != -1);
+	ATF_REQUIRE(strcmp(buf, 0%d%s%d%s%s%s) != 0);
+
+	/*
+	 * Tight buffer.
+	 *
+	 * The man page says that len must be at least 4, but...
+	 */
+	(void)memset(buf, 0, sizeof(buf));
+
+	rv = humanize_number(buf, 1, 1, ,
+	HN_AUTOSCALE, HN_NOSPACE);
+
+	ATF_REQUIRE(rv != -1);
+}
+
 ATF_TP_ADD_TCS(tp)
 {
 
-	ATF_TP_ADD_TC(tp, humanize);
+	ATF_TP_ADD_TC(tp, humanize_basic);
+	ATF_TP_ADD_TC(tp, humanize_big);
 
 	return atf_no_error();
 }



CVS commit: src/tests/lib/libc/gen

2011-04-06 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Wed Apr  6 10:06:49 UTC 2011

Modified Files:
src/tests/lib/libc/gen: t_humanize_number.c

Log Message:
Mark this also as expected failure.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libc/gen/t_humanize_number.c

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

Modified files:

Index: src/tests/lib/libc/gen/t_humanize_number.c
diff -u src/tests/lib/libc/gen/t_humanize_number.c:1.2 src/tests/lib/libc/gen/t_humanize_number.c:1.3
--- src/tests/lib/libc/gen/t_humanize_number.c:1.2	Wed Apr  6 10:04:53 2011
+++ src/tests/lib/libc/gen/t_humanize_number.c	Wed Apr  6 10:06:49 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_humanize_number.c,v 1.2 2011/04/06 10:04:53 jruoho Exp $	*/
+/*	$NetBSD: t_humanize_number.c,v 1.3 2011/04/06 10:06:49 jruoho Exp $	*/
 
 /*-
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
@@ -257,8 +257,10 @@
 	char buf[1024];
 	int rv;
 
+	atf_tc_expect_fail(PR lib/44097);
+
 	/*
-	 * Seems to works.
+	 * Seems to work.
 	 */
 	(void)memset(buf, 0, sizeof(buf));
 



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

2011-04-06 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Wed Apr  6 13:30:34 UTC 2011

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

Log Message:
Fix build error in previous:
 ../arch/mips/mips/locore.S:632: Error: register value used as expression


To generate a diff of this commit:
cvs rdiff -u -r1.186 -r1.187 src/sys/arch/mips/mips/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/mips/mips/locore.S
diff -u src/sys/arch/mips/mips/locore.S:1.186 src/sys/arch/mips/mips/locore.S:1.187
--- src/sys/arch/mips/mips/locore.S:1.186	Wed Apr  6 05:37:59 2011
+++ src/sys/arch/mips/mips/locore.S	Wed Apr  6 13:30:33 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.S,v 1.186 2011/04/06 05:37:59 matt Exp $	*/
+/*	$NetBSD: locore.S,v 1.187 2011/04/06 13:30:33 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -629,7 +629,7 @@
  */
 	srl		v1, a2, 31		# move branch delay bit to LSB
 	sll		v1, 2			# shift it left by 2 (mult by 4)
-	PTR_ADDIU	a0, v1			# add to a0
+	PTR_ADDU	a0, v1			# add to a0
 	INT_L		a0, 0(a0)		# a0 = coproc instruction
 	NOP_L	# load delay
 



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

2011-04-06 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Wed Apr  6 14:04:32 UTC 2011

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

Log Message:
Sync with locore_mips1.S:
 Load pc into ta0 instead of ra and then saving to ta0.


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/sys/arch/mips/mips/mipsX_subr.S

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

Modified files:

Index: src/sys/arch/mips/mips/mipsX_subr.S
diff -u src/sys/arch/mips/mips/mipsX_subr.S:1.42 src/sys/arch/mips/mips/mipsX_subr.S:1.43
--- src/sys/arch/mips/mips/mipsX_subr.S:1.42	Wed Apr  6 05:13:36 2011
+++ src/sys/arch/mips/mips/mipsX_subr.S	Wed Apr  6 14:04:32 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: mipsX_subr.S,v 1.42 2011/04/06 05:13:36 matt Exp $	*/
+/*	$NetBSD: mipsX_subr.S,v 1.43 2011/04/06 14:04:32 tsutsui Exp $	*/
 
 /*
  * Copyright 2002 Wasabi Systems, Inc.
@@ -823,14 +823,13 @@
 /*
  * Call the interrupt handler.
  */
-	_MFC0	ra, MIPS_COP_0_EXC_PC		# grab exception PC
+	_MFC0	ta0, MIPS_COP_0_EXC_PC		# grab exception PC
 	PTR_L	s2, L_CPU(MIPS_CURLWP)		# delay slot
-	REG_S	ra, TF_BASE+TF_REG_EPC(sp)	# and save it
+	REG_S	ta0, TF_BASE+TF_REG_EPC(sp)	# and save it
 
 #if defined(DDB) || defined(DEBUG) || defined(KGDB)
-	REG_S	ra, KERNFRAME_RA(sp)		# for debugging
+	REG_S	ta0, KERNFRAME_RA(sp)		# for debugging
 #endif
-	move	ta0, ra# save across spl* calls
 
 #ifdef PARANOIA
 	INT_L	s0, CPU_INFO_CPL(s2)
@@ -1192,20 +1191,19 @@
 	REG_S	sp, CALLFRAME_SIZ+TF_REG_SP(k0)		# $29
 	REG_S	ra, CALLFRAME_SIZ+TF_REG_RA(k0)		# $31
 	REG_S	s1, CALLFRAME_SIZ+TF_REG_SR(k0)
-	_MFC0	ra, MIPS_COP_0_EXC_PC
+	_MFC0	ta0, MIPS_COP_0_EXC_PC
 	REG_S	v0, CALLFRAME_SIZ+TF_REG_MULLO(k0)
 	REG_S	v1, CALLFRAME_SIZ+TF_REG_MULHI(k0)
-	REG_S	ra, CALLFRAME_SIZ+TF_REG_EPC(k0)
+	REG_S	ta0, CALLFRAME_SIZ+TF_REG_EPC(k0)
 	REG_S	t0, CALLFRAME_SIZ+TF_REG_CAUSE(k0)
 	move	sp, k0# switch to kernel SP
 	move	MIPS_CURLWP, k1			# set curlwp reg (t8)
 #if defined(DDB) || defined(DEBUG) || defined(KGDB)
-	REG_S	ra, CALLFRAME_RA(sp)		# for debugging
+	REG_S	ta0, CALLFRAME_RA(sp)		# for debugging
 #endif
 #ifdef __GP_SUPPORT__
 	PTR_LA	gp, _C_LABEL(_gp)		# switch to kernel GP
 #endif
-	move	ta0, ra# save across SPL calls
 
 	/*
 	 * We first need to get to IPL_HIGH so that interrupts are masked.



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

2011-04-06 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Wed Apr  6 14:12:36 UTC 2011

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

Log Message:
Sync with mipsX_subr.S:
 Rename kernel_tlb_miss to kern_tlb_miss (everything else kern_xxx)


To generate a diff of this commit:
cvs rdiff -u -r1.76 -r1.77 src/sys/arch/mips/mips/locore_mips1.S

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

Modified files:

Index: src/sys/arch/mips/mips/locore_mips1.S
diff -u src/sys/arch/mips/mips/locore_mips1.S:1.76 src/sys/arch/mips/mips/locore_mips1.S:1.77
--- src/sys/arch/mips/mips/locore_mips1.S:1.76	Wed Apr  6 05:39:51 2011
+++ src/sys/arch/mips/mips/locore_mips1.S	Wed Apr  6 14:12:36 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore_mips1.S,v 1.76 2011/04/06 05:39:51 matt Exp $	*/
+/*	$NetBSD: locore_mips1.S,v 1.77 2011/04/06 14:12:36 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -987,7 +987,7 @@
 
 /*
  *
- * mipsN_kernel_tlb_miss --
+ * mipsN_kern_tlb_miss --
  *
  *	Handle a TLB miss exception from kernel mode in kernel space.
  *	The BaddVAddr, Context, and EntryHi registers contain the failed
@@ -1001,7 +1001,7 @@
  *
  *
  */
-LEAF_NOPROFILE(MIPSX(kernel_tlb_miss))
+LEAF_NOPROFILE(MIPSX(kern_tlb_miss))
 	.set	noat
 	_MFC0	k0, MIPS_COP_0_BAD_VADDR	# get the fault address
 	li	k1, VM_MIN_KERNEL_ADDRESS	# compute index
@@ -1026,7 +1026,7 @@
 	tlbwr	# write random TLB
 	j	k1
 	rfe
-END(MIPSX(kernel_tlb_miss))
+END(MIPSX(kern_tlb_miss))
 
 #if 0
 /*
@@ -1710,8 +1710,8 @@
 	
 	PTR_WORD _C_LABEL(MIPSX(kern_intr))	# 0 external interrupt
 	PTR_WORD _C_LABEL(MIPSX(kern_gen_exception))# 1 TLB modification
-	PTR_WORD _C_LABEL(MIPSX(kernel_tlb_miss))	# 2 TLB miss (LW/I-fetch)
-	PTR_WORD _C_LABEL(MIPSX(kernel_tlb_miss))	# 3 TLB miss (SW)
+	PTR_WORD _C_LABEL(MIPSX(kern_tlb_miss))	# 2 TLB miss (LW/I-fetch)
+	PTR_WORD _C_LABEL(MIPSX(kern_tlb_miss))	# 3 TLB miss (SW)
 	PTR_WORD _C_LABEL(MIPSX(kern_gen_exception))# 4 address error (LW/I-fetch)
 	PTR_WORD _C_LABEL(MIPSX(kern_gen_exception))# 5 address error (SW)
 	PTR_WORD _C_LABEL(MIPSX(kern_gen_exception))# 6 bus error (I-fetch)



CVS commit: src/sys/dev/dec

2011-04-06 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Wed Apr  6 14:51:12 UTC 2011

Modified Files:
src/sys/dev/dec: mcclock.c

Log Message:
Make this compile with options DEBUG. (PRId64 for time_t)


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/dev/dec/mcclock.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/dec/mcclock.c
diff -u src/sys/dev/dec/mcclock.c:1.25 src/sys/dev/dec/mcclock.c:1.26
--- src/sys/dev/dec/mcclock.c:1.25	Mon May  3 18:04:56 2010
+++ src/sys/dev/dec/mcclock.c	Wed Apr  6 14:51:12 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: mcclock.c,v 1.25 2010/05/03 18:04:56 mhitch Exp $ */
+/* $NetBSD: mcclock.c,v 1.26 2011/04/06 14:51:12 tsutsui Exp $ */
 
 /*
  * Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
@@ -28,7 +28,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: mcclock.c,v 1.25 2010/05/03 18:04:56 mhitch Exp $);
+__KERNEL_RCSID(0, $NetBSD: mcclock.c,v 1.26 2011/04/06 14:51:12 tsutsui Exp $);
 
 #include sys/param.h
 #include sys/kernel.h
@@ -219,7 +219,8 @@
 
 #ifdef DEBUG
 	if (dt.dt_year != 1972)
-		printf(resettodr: botch (%d, %ld)\n, yearsecs, time_second);
+		printf(resettodr: botch (%d, % PRId64 )\n,
+		yearsecs, time_second);
 #endif
 
 	s = splclock();



CVS commit: src/sys/arch/pmax/pmax

2011-04-06 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Wed Apr  6 15:31:08 UTC 2011

Modified Files:
src/sys/arch/pmax/pmax: machdep.c

Log Message:
Move intr_init() (which initializes evcnt(9) for interrupts)
from early machdep.c:mach_init() to autoconf.c:cpu_configure().

evcnt_init() isn't called yet when mach_init() is invoked from locore.S
and interrupts won't be enabled before cpu_configure(9).

Problem reported by Erik Bertelsen on port-pmax:
http://mail-index.NetBSD.org/port-pmax/2011/04/06/msg93.html


To generate a diff of this commit:
cvs rdiff -u -r1.242 -r1.243 src/sys/arch/pmax/pmax/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/pmax/pmax/machdep.c
diff -u src/sys/arch/pmax/pmax/machdep.c:1.242 src/sys/arch/pmax/pmax/machdep.c:1.243
--- src/sys/arch/pmax/pmax/machdep.c:1.242	Sun Feb 20 07:50:25 2011
+++ src/sys/arch/pmax/pmax/machdep.c	Wed Apr  6 15:31:08 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.242 2011/02/20 07:50:25 matt Exp $	*/
+/*	$NetBSD: machdep.c,v 1.243 2011/04/06 15:31:08 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.242 2011/02/20 07:50:25 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.243 2011/04/06 15:31:08 tsutsui Exp $);
 
 #include opt_ddb.h
 #include opt_modular.h
@@ -315,9 +315,6 @@
 	/* Machine specific initialization. */
 	(*sysinit[systype].init)();
 
-	/* Interrupt initialization. */
-	intr_init();
-
 	/* Find out how much memory is available. */
 	physmem = (*platform.memsize)(kernend);
 



CVS commit: src/sys/arch/pmax/pmax

2011-04-06 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Wed Apr  6 15:31:48 UTC 2011

Modified Files:
src/sys/arch/pmax/pmax: autoconf.c

Log Message:
Move intr_init() (which initializes evcnt(9) for interrupts)
from early machdep.c:mach_init() to autoconf.c:cpu_configure().

evcnt_init() isn't called yet when mach_init() is invoked from locore.S
and interrupts won't be enabled before cpu_configure(9).

Problem reported by Erik Bertelsen on port-pmax:
http://mail-index.NetBSD.org/port-pmax/2011/04/06/msg93.html


To generate a diff of this commit:
cvs rdiff -u -r1.76 -r1.77 src/sys/arch/pmax/pmax/autoconf.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/pmax/pmax/autoconf.c
diff -u src/sys/arch/pmax/pmax/autoconf.c:1.76 src/sys/arch/pmax/pmax/autoconf.c:1.77
--- src/sys/arch/pmax/pmax/autoconf.c:1.76	Sun Feb 20 07:50:25 2011
+++ src/sys/arch/pmax/pmax/autoconf.c	Wed Apr  6 15:31:48 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: autoconf.c,v 1.76 2011/02/20 07:50:25 matt Exp $	*/
+/*	$NetBSD: autoconf.c,v 1.77 2011/04/06 15:31:48 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.76 2011/02/20 07:50:25 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.77 2011/04/06 15:31:48 tsutsui Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -77,6 +77,9 @@
 	/* Kick off autoconfiguration. */
 	(void)splhigh();
 
+	/* Interrupt initialization. */
+	intr_init();
+
 	if (config_rootfound(mainbus, NULL) == NULL)
 		panic(no mainbus found);
 



CVS commit: src

2011-04-06 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Wed Apr  6 16:04:16 UTC 2011

Modified Files:
src/distrib/sets/lists/tests: mi
src/tests/lib/libpthread: Makefile
Removed Files:
src/tests/lib/libpthread: t_status.c

Log Message:
As per PR lib/44818, remove 'lib/libpthread/t_status'. It takes two minutes
to rewrite this properly if someone misses this.


To generate a diff of this commit:
cvs rdiff -u -r1.296 -r1.297 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.6 -r1.7 src/tests/lib/libpthread/Makefile
cvs rdiff -u -r1.2 -r0 src/tests/lib/libpthread/t_status.c

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/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.296 src/distrib/sets/lists/tests/mi:1.297
--- src/distrib/sets/lists/tests/mi:1.296	Wed Apr  6 09:35:49 2011
+++ src/distrib/sets/lists/tests/mi	Wed Apr  6 16:04:16 2011
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.296 2011/04/06 09:35:49 jruoho Exp $
+# $NetBSD: mi,v 1.297 2011/04/06 16:04:16 jruoho Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -488,7 +488,7 @@
 ./usr/libdata/debug/usr/tests/lib/libpthread/t_sigsuspend.debug		tests-lib-tests		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libpthread/t_siglongjmp.debug		tests-lib-tests		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libpthread/t_sleep.debug		tests-lib-tests		debug,atf
-./usr/libdata/debug/usr/tests/lib/libpthread/t_status.debug		tests-lib-tests		debug,atf
+./usr/libdata/debug/usr/tests/lib/libpthread/t_status.debug		tests-obsolete		obsolete
 ./usr/libdata/debug/usr/tests/lib/librt	tests-lib-debug
 ./usr/libdata/debug/usr/tests/lib/librt/t_sched.debug			tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/librt/t_sem.debug			tests-lib-debug		debug,atf
@@ -1974,7 +1974,7 @@
 ./usr/tests/lib/libpthread/t_sigsuspend		tests-lib-tests		atf
 ./usr/tests/lib/libpthread/t_siglongjmp		tests-lib-tests		atf
 ./usr/tests/lib/libpthread/t_sleep		tests-lib-tests		atf
-./usr/tests/lib/libpthread/t_status		tests-lib-tests		atf
+./usr/tests/lib/libpthread/t_status		tests-obsolete		obsolete
 ./usr/tests/lib/librttests-lib-tests		atf
 ./usr/tests/lib/librt/Atffile			tests-lib-tests		atf
 ./usr/tests/lib/librt/t_sched			tests-lib-tests		atf

Index: src/tests/lib/libpthread/Makefile
diff -u src/tests/lib/libpthread/Makefile:1.6 src/tests/lib/libpthread/Makefile:1.7
--- src/tests/lib/libpthread/Makefile:1.6	Thu Mar 24 13:52:04 2011
+++ src/tests/lib/libpthread/Makefile	Wed Apr  6 16:04:16 2011
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.6 2011/03/24 13:52:04 jruoho Exp $
+# $NetBSD: Makefile,v 1.7 2011/04/06 16:04:16 jruoho Exp $
 
 NOMAN=		# defined
 
@@ -35,7 +35,6 @@
 TESTS_C+=	t_sigsuspend
 TESTS_C+=	t_siglongjmp
 TESTS_C+=	t_sleep
-TESTS_C+=	t_status
 
 LDADD.t_sem+=	-lrt
 



CVS commit: src/tests/lib/libprop

2011-04-06 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Wed Apr  6 17:41:27 UTC 2011

Modified Files:
src/tests/lib/libprop: t_basic.c

Log Message:
Add a test case for the segfault reported in PR lib/43964.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libprop/t_basic.c

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

Modified files:

Index: src/tests/lib/libprop/t_basic.c
diff -u src/tests/lib/libprop/t_basic.c:1.2 src/tests/lib/libprop/t_basic.c:1.3
--- src/tests/lib/libprop/t_basic.c:1.2	Wed Nov  3 16:10:22 2010
+++ src/tests/lib/libprop/t_basic.c	Wed Apr  6 17:41:27 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: t_basic.c,v 1.2 2010/11/03 16:10:22 christos Exp $ */
+/* $NetBSD: t_basic.c,v 1.3 2011/04/06 17:41:27 jruoho Exp $ */
 
 /*
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
 #include sys/cdefs.h
 __COPYRIGHT(@(#) Copyright (c) 2008\
  The NetBSD Foundation, inc. All rights reserved.);
-__RCSID($NetBSD: t_basic.c,v 1.2 2010/11/03 16:10:22 christos Exp $);
+__RCSID($NetBSD: t_basic.c,v 1.3 2011/04/06 17:41:27 jruoho Exp $);
 
 #include stdlib.h
 #include string.h
@@ -79,12 +79,13 @@
 /dict\n
 /plist\n;
 
-ATF_TC(simple);
-ATF_TC_HEAD(simple, tc)
+ATF_TC(prop_basic);
+ATF_TC_HEAD(prop_basic, tc)
 {
-	atf_tc_set_md_var(tc, descr, Checks basic functionality of proplib);
+	atf_tc_set_md_var(tc, descr, A basic test of proplib(3));
 }
-ATF_TC_BODY(simple, tc)
+
+ATF_TC_BODY(prop_basic, tc)
 {
 	prop_dictionary_t dict;
 	char *ext1;
@@ -160,10 +161,38 @@
 	free(ext1);
 }
 
+ATF_TC(prop_dictionary_equals);
+ATF_TC_HEAD(prop_dictionary_equals, tc)
+{
+	atf_tc_set_md_var(tc, descr, Test prop_dictionary_equals(3));
+}
+
+ATF_TC_BODY(prop_dictionary_equals, tc)
+{
+	prop_dictionary_t c, d;
+
+	atf_tc_expect_death(PR lib/43964);
+
+	d = prop_dictionary_internalize(compare1);
+
+	ATF_REQUIRE(d != NULL);
+
+	c = prop_dictionary_copy(d);
+
+	ATF_REQUIRE(c != NULL);
+
+	if (prop_dictionary_equals(c, d) != true)
+		atf_tc_fail(dictionaries are not equal);
+
+	prop_object_release(c);
+	prop_object_release(d);
+}
+
 ATF_TP_ADD_TCS(tp)
 {
 
-	ATF_TP_ADD_TC(tp, simple);
+	ATF_TP_ADD_TC(tp, prop_basic);
+	ATF_TP_ADD_TC(tp, prop_dictionary_equals);
 
 	return atf_no_error();
 }



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

2011-04-06 Thread Frank Wille
Module Name:src
Committed By:   phx
Date:   Wed Apr  6 18:12:15 UTC 2011

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

Log Message:
Enable all known RTC drivers. The correct RTC will automatically be chosen as
an I2C device, depending on the NAS model.


To generate a diff of this commit:
cvs rdiff -u -r1.57 -r1.58 src/sys/arch/sandpoint/conf/GENERIC

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

Modified files:

Index: src/sys/arch/sandpoint/conf/GENERIC
diff -u src/sys/arch/sandpoint/conf/GENERIC:1.57 src/sys/arch/sandpoint/conf/GENERIC:1.58
--- src/sys/arch/sandpoint/conf/GENERIC:1.57	Sun Mar 20 17:10:46 2011
+++ src/sys/arch/sandpoint/conf/GENERIC	Wed Apr  6 18:12:15 2011
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.57 2011/03/20 17:10:46 phx Exp $
+# $NetBSD: GENERIC,v 1.58 2011/04/06 18:12:15 phx Exp $
 #
 # machine description file for GENERIC NAS
 # 
@@ -22,7 +22,7 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.57 $
+#ident 		GENERIC-$Revision: 1.58 $
 
 maxusers	32
 
@@ -185,8 +185,12 @@
 satmgr0 	at eumb? unit 1 		# satmgr at 0x4600
 ociic*		at eumb?
 iic*		at ociic?
+dsrtc*		at iic? addr 0x68
 rs5c372rtc*	at iic? addr 0x32
-#dsrtc*		at iic? addr 0x68
+s390rtc*	at iic? addr 0x30
+#strtc*		at iic? addr 0x68
+#options 	STRTC_NO_WATCHDOG
+#options 	STRTC_NO_USERRAM
 
 # PCI IDE controllers - see pciide(4) for supported hardware.
 acardide*	at pci? dev ? function ?	# Acard IDE controllers



CVS commit: src/tests/syscall

2011-04-06 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Wed Apr  6 19:09:16 UTC 2011

Modified Files:
src/tests/syscall: t_getrusage.c

Log Message:
Fix and improve as per suggestions from njoly@.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/syscall/t_getrusage.c

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

Modified files:

Index: src/tests/syscall/t_getrusage.c
diff -u src/tests/syscall/t_getrusage.c:1.3 src/tests/syscall/t_getrusage.c:1.4
--- src/tests/syscall/t_getrusage.c:1.3	Wed Apr  6 06:46:14 2011
+++ src/tests/syscall/t_getrusage.c	Wed Apr  6 19:09:16 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: t_getrusage.c,v 1.3 2011/04/06 06:46:14 jruoho Exp $ */
+/* $NetBSD: t_getrusage.c,v 1.4 2011/04/06 19:09:16 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include sys/cdefs.h
-__RCSID($NetBSD: t_getrusage.c,v 1.3 2011/04/06 06:46:14 jruoho Exp $);
+__RCSID($NetBSD: t_getrusage.c,v 1.4 2011/04/06 19:09:16 jruoho Exp $);
 
 #include sys/resource.h
 #include sys/time.h
@@ -43,11 +43,6 @@
 static void	work(void);
 static void	sighandler(int);
 
-static const int who[] = {
-	RUSAGE_SELF,
-	RUSAGE_CHILDREN
-};
-
 static void
 sighandler(int signo)
 {
@@ -74,20 +69,16 @@
 ATF_TC_BODY(getrusage_err, tc)
 {
 	struct rusage ru;
-	size_t i;
-
-	for (i = 0; i  __arraycount(who); i++) {
 
-		errno = 0;
+	errno = 0;
 
-		ATF_REQUIRE(getrusage(INT_MAX, ru) != 0);
-		ATF_REQUIRE(errno == EINVAL);
+	ATF_REQUIRE(getrusage(INT_MAX, ru) != 0);
+	ATF_REQUIRE(errno == EINVAL);
 
-		errno = 0;
+	errno = 0;
 
-		ATF_REQUIRE(getrusage(who[i], (void *)0) != 0);
-		ATF_REQUIRE(errno == EFAULT);
-	}
+	ATF_REQUIRE(getrusage(RUSAGE_SELF, (void *)0) != 0);
+	ATF_REQUIRE(errno == EFAULT);
 }
 
 ATF_TC(getrusage_sig);
@@ -136,7 +127,7 @@
 	for (i = 0; i  n; i++) {
 
 		(void)memset(ru1, 0, sizeof(struct rusage));
-		(void)memset(ru1, 0, sizeof(struct rusage));
+		(void)memset(ru2, 0, sizeof(struct rusage));
 
 		work();
 



CVS commit: src/lib/libc/arch/i386/gen

2011-04-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Apr  6 21:55:36 UTC 2011

Modified Files:
src/lib/libc/arch/i386/gen: infinityl.c

Log Message:
fix long double infinity.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/lib/libc/arch/i386/gen/infinityl.c

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

Modified files:

Index: src/lib/libc/arch/i386/gen/infinityl.c
diff -u src/lib/libc/arch/i386/gen/infinityl.c:1.2 src/lib/libc/arch/i386/gen/infinityl.c:1.3
--- src/lib/libc/arch/i386/gen/infinityl.c:1.2	Sun Jun 12 01:21:26 2005
+++ src/lib/libc/arch/i386/gen/infinityl.c	Wed Apr  6 17:55:36 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: infinityl.c,v 1.2 2005/06/12 05:21:26 lukem Exp $	*/
+/*	$NetBSD: infinityl.c,v 1.3 2011/04/06 21:55:36 christos Exp $	*/
 
 /*
  * IEEE-compatible infinityl.c for little-endian 80-bit format -- public domain.
@@ -7,10 +7,10 @@
 
 #include sys/cdefs.h
 #if defined(LIBC_SCCS)  !defined(lint)
-__RCSID($NetBSD: infinityl.c,v 1.2 2005/06/12 05:21:26 lukem Exp $);
+__RCSID($NetBSD: infinityl.c,v 1.3 2011/04/06 21:55:36 christos Exp $);
 #endif /* LIBC_SCCS and not lint */
 
 #include math.h
 
 const union __long_double_u __infinityl =
-	{ { 0, 0, 0, 0, 0, 0, 0, 0x80, 0xff, 0x7f, 0, 0 } };
+	{ { 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0x7f, 0, 0 } };



CVS commit: src

2011-04-06 Thread Jean-Yves Migeon
Module Name:src
Committed By:   jym
Date:   Wed Apr  6 23:51:56 UTC 2011

Modified Files:
src/share/man/man4: xvif.4
src/sys/arch/xen/xen: xennetback_xenbus.c

Log Message:
Alright, set xvif(4) syntax once and for all. Tested with ipf(4) under
XEN3_DOM0 amd64.

Fixes PR misc/39376.

See http://mail-index.netbsd.org/port-xen/2011/04/06/msg006603.html


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/share/man/man4/xvif.4
cvs rdiff -u -r1.39 -r1.40 src/sys/arch/xen/xen/xennetback_xenbus.c

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

Modified files:

Index: src/share/man/man4/xvif.4
diff -u src/share/man/man4/xvif.4:1.3 src/share/man/man4/xvif.4:1.4
--- src/share/man/man4/xvif.4:1.3	Sun Apr  3 23:44:46 2011
+++ src/share/man/man4/xvif.4	Wed Apr  6 23:51:56 2011
@@ -1,4 +1,4 @@
-.\	$NetBSD: xvif.4,v 1.3 2011/04/03 23:44:46 jym Exp $
+.\	$NetBSD: xvif.4,v 1.4 2011/04/06 23:51:56 jym Exp $
 .\
 .\ Copyright (c) 2011 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -27,7 +27,7 @@
 .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\ POSSIBILITY OF SUCH DAMAGE.
 .\
-.Dd April 4, 2011
+.Dd April 7, 2011
 .Dt XVIF 4 xen
 .Os
 .Sh NAME
@@ -62,7 +62,7 @@
 All
 .Nm
 interfaces follow the
-.Dq xvifX-Y
+.Dq xvifXiY
 naming convention, where
 .Sq X
 represents the guest domain identifier, and
@@ -80,12 +80,12 @@
 similar to two Ethernet cards connected via a crossover cable.
 .Sh DIAGNOSTICS
 .Bl -diag
-.It xvif%d-%d: can't read %s/mac: %d
+.It xvif%di%d: can't read %s/mac: %d
 The MAC address for this interface could not be read from XenStore.
-.It xvif%d-%d: %s is not a valid mac address
+.It xvif%di%d: %s is not a valid mac address
 The MAC address specified in the configuration file of the newly
 created guest domain is invalid.
-.It xvif%d-%d: Ethernet address %s
+.It xvif%di%d: Ethernet address %s
 MAC address of the
 .Nm
 interface.

Index: src/sys/arch/xen/xen/xennetback_xenbus.c
diff -u src/sys/arch/xen/xen/xennetback_xenbus.c:1.39 src/sys/arch/xen/xen/xennetback_xenbus.c:1.40
--- src/sys/arch/xen/xen/xennetback_xenbus.c:1.39	Sun Apr  3 23:21:37 2011
+++ src/sys/arch/xen/xen/xennetback_xenbus.c	Wed Apr  6 23:51:55 2011
@@ -1,4 +1,4 @@
-/*  $NetBSD: xennetback_xenbus.c,v 1.39 2011/04/03 23:21:37 jym Exp $  */
+/*  $NetBSD: xennetback_xenbus.c,v 1.40 2011/04/06 23:51:55 jym Exp $  */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -271,7 +271,7 @@
 
 	ifp = xneti-xni_if;
 	ifp-if_softc = xneti;
-	snprintf(ifp-if_xname, IFNAMSIZ, xvif%d-%d,
+	snprintf(ifp-if_xname, IFNAMSIZ, xvif%di%d,
 	(int)domid, (int)handle);
 
 	/* read mac address */



CVS commit: src/share/man/man5

2011-04-06 Thread Jean-Yves Migeon
Module Name:src
Committed By:   jym
Date:   Thu Apr  7 00:22:59 UTC 2011

Modified Files:
src/share/man/man5: ifconfig.if.5

Log Message:
Be more precise on the chars accepted for xxN in /etc/ifconfig.xxN
filenames, and ifconfig_xxN variables inside rc.conf(5).

Should fix PR misc/39376.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/share/man/man5/ifconfig.if.5

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

Modified files:

Index: src/share/man/man5/ifconfig.if.5
diff -u src/share/man/man5/ifconfig.if.5:1.14 src/share/man/man5/ifconfig.if.5:1.15
--- src/share/man/man5/ifconfig.if.5:1.14	Sun Sep 26 18:52:04 2010
+++ src/share/man/man5/ifconfig.if.5	Thu Apr  7 00:22:59 2011
@@ -1,4 +1,4 @@
-.\	$NetBSD: ifconfig.if.5,v 1.14 2010/09/26 18:52:04 apb Exp $
+.\	$NetBSD: ifconfig.if.5,v 1.15 2011/04/07 00:22:59 jym Exp $
 .\
 .\ Copyright (c) 1996 Matthew R. Green
 .\ All rights reserved.
@@ -24,7 +24,7 @@
 .\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\ SUCH DAMAGE.
 .\
-.Dd September 26, 2010
+.Dd April 7, 2011
 .Dt IFCONFIG.IF 5
 .Os
 .Sh NAME
@@ -56,6 +56,14 @@
 file for the
 .Sy fxp0
 interface).
+Only characters allowed in
+.Xr sh 1
+variables names should be used for
+.Ar nnX
+.Po Xr ascii 7
+uppercase and lowercase letters, digits, and underscore
+.Pc .
+.Pp
 The variable or file will get evaluated only if the interface exists on
 the system.
 Multiple lines can be placed in a variable or file, and will be



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

2011-04-06 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Thu Apr  7 01:07:31 UTC 2011

Modified Files:
src/sys/arch/sgimips/dev: files.dev

Log Message:
defflag CRMFB_DEBUG


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/sgimips/dev/files.dev

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/sgimips/dev/files.dev
diff -u src/sys/arch/sgimips/dev/files.dev:1.11 src/sys/arch/sgimips/dev/files.dev:1.12
--- src/sys/arch/sgimips/dev/files.dev:1.11	Mon Apr  4 22:15:13 2011
+++ src/sys/arch/sgimips/dev/files.dev	Thu Apr  7 01:07:31 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: files.dev,v 1.11 2011/04/04 22:15:13 macallan Exp $
+#	$NetBSD: files.dev,v 1.12 2011/04/07 01:07:31 macallan Exp $
 
 define giobus {}
 
@@ -34,6 +34,7 @@
 device	crmfb: wsemuldisplaydev, vcons, rasops8, i2cbus, iic, i2c_bitbang, ddc_read_edid, edid 
 attach	crmfb at mainbus
 file	arch/sgimips/dev/crmfb.c		crmfb needs-flag
+defflag	opt_crmfb.h	CRMFB_DEBUG
 
 device	scn: tty
 attach	scn at mainbus



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

2011-04-06 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Thu Apr  7 01:20:31 UTC 2011

Modified Files:
src/sys/arch/sgimips/dev: crmfb.c crmfbreg.h

Log Message:
add mode setting support
If we find a monitor via DDC we switch to its preferred mode if it reports one,
otherwise stick with whatever the firmware set up.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/sgimips/dev/crmfb.c
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/sgimips/dev/crmfbreg.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/sgimips/dev/crmfb.c
diff -u src/sys/arch/sgimips/dev/crmfb.c:1.31 src/sys/arch/sgimips/dev/crmfb.c:1.32
--- src/sys/arch/sgimips/dev/crmfb.c:1.31	Mon Apr  4 22:50:36 2011
+++ src/sys/arch/sgimips/dev/crmfb.c	Thu Apr  7 01:20:31 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: crmfb.c,v 1.31 2011/04/04 22:50:36 macallan Exp $ */
+/* $NetBSD: crmfb.c,v 1.32 2011/04/07 01:20:31 macallan Exp $ */
 
 /*-
  * Copyright (c) 2007 Jared D. McNeill jmcne...@invisible.ca
@@ -32,7 +32,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: crmfb.c,v 1.31 2011/04/04 22:50:36 macallan Exp $);
+__KERNEL_RCSID(0, $NetBSD: crmfb.c,v 1.32 2011/04/07 01:20:31 macallan Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -62,7 +62,13 @@
 
 #include arch/sgimips/dev/crmfbreg.h
 
-/*#define CRMFB_DEBUG*/
+#include opt_crmfb.h
+
+#ifdef CRMFB_DEBUG
+#define DPRINTF printf
+#else
+#define DPRINTF while (0) printf
+#endif
 
 struct wsscreen_descr crmfb_defaultscreen = {
 	default,
@@ -147,6 +153,7 @@
 	uint8_t			*sc_scratch;
 	paddr_t			sc_linear;
 	int			sc_wsmode;
+	struct edid_info sc_edid_info;
 
 	/* cursor stuff */
 	int			sc_cur_x;
@@ -213,6 +220,10 @@
 };
 static void crmfb_setup_ddc(struct crmfb_softc *);
 
+/* mode setting stuff */
+static uint32_t calc_pll(int);	/* frequency in kHz */
+static int crmfb_set_mode(struct crmfb_softc *, const struct videomode *);
+
 CFATTACH_DECL_NEW(crmfb, sizeof(struct crmfb_softc),
 crmfb_match, crmfb_attach, NULL, NULL);
 
@@ -254,8 +265,6 @@
 	if (rv)
 		panic(crmfb_attach: can't map rendering engine);
 
-	//crmfb_setup_ddc(sc);
-
 	/* determine mode configured by firmware */
 	d = bus_space_read_4(sc-sc_iot, sc-sc_ioh, CRMFB_VT_HCMAP);
 	sc-sc_width = (d  CRMFB_VT_HCMAP_ON_SHIFT)  0xfff;
@@ -280,6 +289,12 @@
 	aprint_normal_dev(sc-sc_dev, initial resolution %dx%d\n,
 	sc-sc_width, sc-sc_height);
 
+	crmfb_setup_ddc(sc);
+	if ((sc-sc_edid_info.edid_preferred_mode != NULL)) {
+		if (crmfb_set_mode(sc, sc-sc_edid_info.edid_preferred_mode))
+			aprint_normal_dev(sc-sc_dev, using %dx%d\n,
+			sc-sc_width, sc-sc_height);
+	}
 	/*
 	 * first determine how many tiles we need
 	 * in 32bit each tile is 128x128 pixels
@@ -381,7 +396,6 @@
 	sc-sc_hot_x = 0;
 	sc-sc_hot_y = 0;
 
-	crmfb_setup_ddc(sc);
 	return;
 }
 
@@ -798,7 +812,7 @@
 {
 	uint64_t reg;
 	uint32_t d, h, mode, page;
-	int i, bail, tile_width, tlbptr, lptr, j, tx, shift;
+	int i, bail, tile_width, tlbptr, lptr, j, tx, shift, overhang;
 	const char *wantsync;
 	uint16_t v;
 
@@ -811,7 +825,7 @@
 	d = ~(1  CRMFB_FRM_CONTROL_DMAEN_SHIFT);
 	crmfb_write_reg(sc, CRMFB_FRM_CONTROL, d);
 	DELAY(5);
-	crmfb_write_reg(sc, CRMFB_DID_CONTROL, 0);
+	crmfb_write_reg(sc, CRMFB_DID_CONTROL, d);
 	DELAY(5);
 
 	if (!crmfb_wait_dma_idle(sc))
@@ -875,8 +889,16 @@
 
 	d = ((int)(sc-sc_width / tile_width))  
 	CRMFB_FRM_TILESIZE_WIDTH_SHIFT;
-	if ((sc-sc_width  (tile_width - 1)) != 0)
-		d |= sc-sc_tiles_y;
+	overhang = sc-sc_width % tile_width;
+	if (overhang != 0) {
+		uint32_t val; 
+		DPRINTF(tile width: %d\n, tile_width);
+		DPRINTF(overhang: %d\n, overhang);
+		val = (overhang * (depth  3))  5;
+		DPRINTF(reg: %08x\n, val);
+		d |= (val  0x1f);
+		DPRINTF(d: %08x\n, d);
+	}
 
 	switch (depth) {
 	case 8:
@@ -903,17 +925,17 @@
 	crmfb_write_reg(sc, CRMFB_OVR_WIDTH_TILE, 0);
 	crmfb_write_reg(sc, CRMFB_CURSOR_CONTROL, 0);
 
-	/* enable drawing again */
-	d = bus_space_read_4(sc-sc_iot, sc-sc_ioh, CRMFB_DOTCLOCK);
-	d |= (1  CRMFB_DOTCLOCK_CLKRUN_SHIFT);
-	crmfb_write_reg(sc, CRMFB_DOTCLOCK, d);
-	crmfb_write_reg(sc, CRMFB_VT_XY, 0);
-
 	/* turn on DMA for the framebuffer */
 	d = bus_space_read_4(sc-sc_iot, sc-sc_ioh, CRMFB_FRM_CONTROL);
 	d |= (1  CRMFB_FRM_CONTROL_DMAEN_SHIFT);
 	crmfb_write_reg(sc, CRMFB_FRM_CONTROL, d);
 
+	/* enable drawing again */
+	crmfb_write_reg(sc, CRMFB_VT_XY, 0);
+	d = bus_space_read_4(sc-sc_iot, sc-sc_ioh, CRMFB_DOTCLOCK);
+	d |= (1  CRMFB_DOTCLOCK_CLKRUN_SHIFT);
+	crmfb_write_reg(sc, CRMFB_DOTCLOCK, d);
+
 	/* turn off sync-on-green */
 
 	wantsync = arcbios_GetEnvironmentVariable(SyncOnGreen);
@@ -932,9 +954,7 @@
 	tx = ((sc-sc_width + (tile_width - 1))  ~(tile_width - 1)) / 
 	tile_width;
 
-#ifdef CRMFB_DEBUG
-	printf(tx: %d\n, tx);
-#endif
+	DPRINTF(tx: %d\n, tx);
 
 	for (i = 0; i  16; i++) {
 		reg = 0;
@@ -948,9 +968,7 @@
 bus_space_write_8(sc-sc_iot, 

CVS commit: src/usr.bin/make

2011-04-06 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Thu Apr  7 01:40:02 UTC 2011

Modified Files:
src/usr.bin/make: make.1 var.c
src/usr.bin/make/unit-tests: Makefile test.exp
Added Files:
src/usr.bin/make/unit-tests: hash

Log Message:
Add the :hash modifier to compute a 32bit hash of an variable.
This uses MurmurHash3 to get a reasonable collission-free hash with
small code. The result is endian neutral.


To generate a diff of this commit:
cvs rdiff -u -r1.185 -r1.186 src/usr.bin/make/make.1
cvs rdiff -u -r1.162 -r1.163 src/usr.bin/make/var.c
cvs rdiff -u -r1.31 -r1.32 src/usr.bin/make/unit-tests/Makefile
cvs rdiff -u -r0 -r1.1 src/usr.bin/make/unit-tests/hash
cvs rdiff -u -r1.35 -r1.36 src/usr.bin/make/unit-tests/test.exp

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

Modified files:

Index: src/usr.bin/make/make.1
diff -u src/usr.bin/make/make.1:1.185 src/usr.bin/make/make.1:1.186
--- src/usr.bin/make/make.1:1.185	Sun Mar 27 19:47:46 2011
+++ src/usr.bin/make/make.1	Thu Apr  7 01:40:01 2011
@@ -1,4 +1,4 @@
-.\	$NetBSD: make.1,v 1.185 2011/03/27 19:47:46 sjg Exp $
+.\	$NetBSD: make.1,v 1.186 2011/04/07 01:40:01 joerg Exp $
 .\
 .\ Copyright (c) 1990, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\
 .\	from: @(#)make.1	8.4 (Berkeley) 3/19/94
 .\
-.Dd March 27, 2011
+.Dd April 2, 2011
 .Dt MAKE 1
 .Os
 .Sh NAME
@@ -1042,6 +1042,8 @@
 .Nm .
 .It Cm \:R
 Replaces each word in the variable with everything but its suffix.
+.It Cm \:hash
+Compute a 32bit hash of the value and encode it as hex digits.
 .It Cm \:tA
 Attempt to convert variable to an absolute path using
 .Xr realpath 3 ,

Index: src/usr.bin/make/var.c
diff -u src/usr.bin/make/var.c:1.162 src/usr.bin/make/var.c:1.163
--- src/usr.bin/make/var.c:1.162	Sun Mar  6 00:02:15 2011
+++ src/usr.bin/make/var.c	Thu Apr  7 01:40:01 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: var.c,v 1.162 2011/03/06 00:02:15 sjg Exp $	*/
+/*	$NetBSD: var.c,v 1.163 2011/04/07 01:40:01 joerg Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = $NetBSD: var.c,v 1.162 2011/03/06 00:02:15 sjg Exp $;
+static char rcsid[] = $NetBSD: var.c,v 1.163 2011/04/07 01:40:01 joerg Exp $;
 #else
 #include sys/cdefs.h
 #ifndef lint
 #if 0
 static char sccsid[] = @(#)var.c	8.3 (Berkeley) 3/19/94;
 #else
-__RCSID($NetBSD: var.c,v 1.162 2011/03/06 00:02:15 sjg Exp $);
+__RCSID($NetBSD: var.c,v 1.163 2011/04/07 01:40:01 joerg Exp $);
 #endif
 #endif /* not lint */
 #endif
@@ -129,6 +129,7 @@
 #includeregex.h
 #endif
 #includectype.h
+#includeinttypes.h
 #includestdlib.h
 #includelimits.h
 
@@ -302,6 +303,7 @@
 			   VarPattern *);
 static char *VarQuote(char *);
 static char *VarChangeCase(char *, int);
+static char *VarHash(char *);
 static char *VarModify(GNode *, Var_Parse_State *,
 const char *,
 Boolean (*)(GNode *, Var_Parse_State *, char *, Boolean, Buffer *, void *),
@@ -2262,6 +2264,79 @@
 
 /*-
  *---
+ * VarHash --
+ *  Hash the string using the MurmurHash3 algorithm.
+ *  Output is computed using 32bit Little Endian arithmetic.
+ *
+ * Input:
+ *	str		String to modify
+ *
+ * Results:
+ *  Hash value of str, encoded as 8 hex digits.
+ *
+ * Side Effects:
+ *  None.
+ *
+ *---
+ */
+static char *
+VarHash(char *str)
+{
+static const charhexdigits[16] = 0123456789abcdef;
+Buffer buf;
+size_t len, len2;
+unsigned char  *ustr = (unsigned char *)str;
+uint32_t   h, k, c1, c2;
+intdone;
+
+done = 1;
+h  = 0x971e137bU;
+c1 = 0x95543787U;
+c2 = 0x2ad7eb25U;
+len2 = strlen(str);
+
+for (len = len2; len; ) {
+	k = 0;
+	switch (len) {
+	default:
+	k = (ustr[3]  24) | (ustr[2]  16) | (ustr[1]  8) | ustr[0];
+	len -= 4;
+	ustr += 4;
+	break;
+	case 3:
+	k |= (ustr[2]  16);
+	case 2:
+	k |= (ustr[1]  8);
+	case 1:
+	k |= ustr[0];
+	len = 0;
+	}
+	c1 = c1 * 5 + 0x7b7d159cU;
+	c2 = c2 * 5 + 0x6bce6396U;
+	k *= c1;
+	k = (k  11) ^ (k  21);
+	k *= c2;
+	h = (h  13) ^ (h  19);
+	h = h * 5 + 0x52dce729U;
+	h ^= k;
+   } while (!done);
+   h ^= len2;
+   h *= 0x85ebca6b;
+   h ^= h  13;
+   h *= 0xc2b2ae35;
+   h ^= h  16;
+
+   Buf_Init(buf, 0);
+   for (len = 0; len  8; ++len) {
+   Buf_AddByte(buf, hexdigits[h  15]);
+   h = 4;
+   }
+
+   return Buf_Destroy(buf, FALSE);
+}
+
+/*-
+ *---
  * VarChangeCase --
  *  Change the string to all uppercase or all lowercase
  *
@@ -2821,6 +2896,17 @@
 		}
 
 	}
+	case 'h':
+	cp = tstr + 1;	/* make sure it is set */
+	if (strncmp(tstr, hash, 4) == 0 
+		(tstr[4] == endc || 

CVS commit: src/sys/arch/powerpc

2011-04-06 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Apr  7 02:04:07 UTC 2011

Modified Files:
src/sys/arch/powerpc/include: types.h
src/sys/arch/powerpc/powerpc: sys_machdep.c

Log Message:
Get rid of cpu_lwp_setprivate since it's not needed on powerpc.


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/sys/arch/powerpc/include/types.h
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/powerpc/powerpc/sys_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/powerpc/include/types.h
diff -u src/sys/arch/powerpc/include/types.h:1.38 src/sys/arch/powerpc/include/types.h:1.39
--- src/sys/arch/powerpc/include/types.h:1.38	Sat Mar 12 07:29:41 2011
+++ src/sys/arch/powerpc/include/types.h	Thu Apr  7 02:04:06 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: types.h,v 1.38 2011/03/12 07:29:41 matt Exp $	*/
+/*	$NetBSD: types.h,v 1.39 2011/04/07 02:04:06 matt Exp $	*/
 
 /*-
  * Copyright (C) 1995 Wolfgang Solfrank.
@@ -73,7 +73,6 @@
 
 #define __HAVE_CPU_COUNTER
 #define __HAVE_SYSCALL_INTERN
-#define __HAVE_CPU_LWP_SETPRIVATE
 #define	__HAVE_CPU_DATA_FIRST
 #ifdef _LP64
 #define	__HAVE_ATOMIC64_OPS

Index: src/sys/arch/powerpc/powerpc/sys_machdep.c
diff -u src/sys/arch/powerpc/powerpc/sys_machdep.c:1.12 src/sys/arch/powerpc/powerpc/sys_machdep.c:1.13
--- src/sys/arch/powerpc/powerpc/sys_machdep.c:1.12	Sat Mar 12 07:27:20 2011
+++ src/sys/arch/powerpc/powerpc/sys_machdep.c	Thu Apr  7 02:04:07 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: sys_machdep.c,v 1.12 2011/03/12 07:27:20 matt Exp $	*/
+/*	$NetBSD: sys_machdep.c,v 1.13 2011/04/07 02:04:07 matt Exp $	*/
 
 /*
  * Copyright (C) 1996 Wolfgang Solfrank.
@@ -32,7 +32,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: sys_machdep.c,v 1.12 2011/03/12 07:27:20 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: sys_machdep.c,v 1.13 2011/04/07 02:04:07 matt Exp $);
 
 #include sys/param.h
 
@@ -50,12 +50,3 @@
 	 */
 	return (ENOSYS);
 }
-
-int
-cpu_lwp_setprivate(lwp_t *l, void *addr)
-{
-
-	l-l_md.md_utf-tf_fixreg[2] = (register_t)addr;
-
-	return 0;
-}



CVS commit: src/sys/arch/powerpc/powerpc

2011-04-06 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Apr  7 02:05:02 UTC 2011

Modified Files:
src/sys/arch/powerpc/powerpc: trap_subr.S

Log Message:
Fix bogus idepth on OEA.


To generate a diff of this commit:
cvs rdiff -u -r1.67 -r1.68 src/sys/arch/powerpc/powerpc/trap_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/powerpc/powerpc/trap_subr.S
diff -u src/sys/arch/powerpc/powerpc/trap_subr.S:1.67 src/sys/arch/powerpc/powerpc/trap_subr.S:1.68
--- src/sys/arch/powerpc/powerpc/trap_subr.S:1.67	Tue Jan 18 01:02:55 2011
+++ src/sys/arch/powerpc/powerpc/trap_subr.S	Thu Apr  7 02:05:02 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: trap_subr.S,v 1.67 2011/01/18 01:02:55 matt Exp $	*/
+/*	$NetBSD: trap_subr.S,v 1.68 2011/04/07 02:05:02 matt Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -1072,8 +1072,8 @@
 	ldreg	%r11,(savearea+CPUSAVE_SRR0)(%r2); /* get saved SRR0 */	\
 	ldreg	%r12,(savearea+CPUSAVE_SRR1)(%r2); /* get saved SRR1 */	\
 	ldint	%r3,CI_IDEPTH(%r2);	\
-	addi	%r3,%r3,1;		\
-	stint	%r3,CI_IDEPTH(%r2);	\
+	addi	%r4,%r3,1;		\
+	stint	%r4,CI_IDEPTH(%r2);	\
 	stint	%r3,FRAME_IDEPTH(%r1);	\
 	mfxer	%r3;			\
 	mfctr	%r4;			\



CVS commit: src

2011-04-06 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Apr  7 02:19:28 UTC 2011

Modified Files:
src/lib/libc/tls: tls.c
src/libexec/ld.elf_so: tls.c

Log Message:
Add a workaround for older crt0.o that overwrite r2 (tcb pointer).
(save tcb pointer using _lwp_setprivate in ld.elf_so and retrieve the tcb
via _lwp_getprivate in libc and use it to restore the value in r2).


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/lib/libc/tls/tls.c
cvs rdiff -u -r1.5 -r1.6 src/libexec/ld.elf_so/tls.c

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

Modified files:

Index: src/lib/libc/tls/tls.c
diff -u src/lib/libc/tls/tls.c:1.5 src/lib/libc/tls/tls.c:1.6
--- src/lib/libc/tls/tls.c:1.5	Fri Mar 18 14:56:01 2011
+++ src/lib/libc/tls/tls.c	Thu Apr  7 02:19:28 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: tls.c,v 1.5 2011/03/18 14:56:01 he Exp $	*/
+/*	$NetBSD: tls.c,v 1.6 2011/04/07 02:19:28 matt Exp $	*/
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: tls.c,v 1.5 2011/03/18 14:56:01 he Exp $);
+__RCSID($NetBSD: tls.c,v 1.6 2011/04/07 02:19:28 matt Exp $);
 
 #include namespace.h
 
@@ -154,8 +154,18 @@
 {
 	struct tls_tcb *tcb;
 
-	if (rtld_DYNAMIC != NULL)
+	if (rtld_DYNAMIC != NULL) {
+#ifdef __powerpc__
+		/*
+		 * Old powerpc crt0's are going to overwrite r2 so we need to
+		 * restore it but only do so if the saved value isn't NULL (if
+		 * it is NULL, ld.elf_so doesn't have the matching change).
+		 */
+		if ((tcb = _lwp_getprivate()) != NULL)
+			__lwp_settcb(tcb);
+#endif
 		return;
+	}
 
 	dl_iterate_phdr(__libc_static_tls_setup_cb, NULL);
 

Index: src/libexec/ld.elf_so/tls.c
diff -u src/libexec/ld.elf_so/tls.c:1.5 src/libexec/ld.elf_so/tls.c:1.6
--- src/libexec/ld.elf_so/tls.c:1.5	Tue Mar 29 20:56:35 2011
+++ src/libexec/ld.elf_so/tls.c	Thu Apr  7 02:19:28 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: tls.c,v 1.5 2011/03/29 20:56:35 joerg Exp $	*/
+/*	$NetBSD: tls.c,v 1.6 2011/04/07 02:19:28 matt Exp $	*/
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -29,7 +29,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: tls.c,v 1.5 2011/03/29 20:56:35 joerg Exp $);
+__RCSID($NetBSD: tls.c,v 1.6 2011/04/07 02:19:28 matt Exp $);
 
 #include sys/param.h
 #include sys/ucontext.h
@@ -104,6 +104,13 @@
 	tcb = _rtld_tls_allocate_locked();
 #ifdef __HAVE___LWP_SETTCB
 	__lwp_settcb(tcb);
+#ifdef __powerpc__
+	/*
+	 * Save the tcb pointer so that libc can retrieve it.  Older
+	 * crt0 will obliterate r2 so there is code in libc to restore it.
+	 */
+	_lwp_setprivate(tcb);
+#endif
 #else
 	_lwp_setprivate(tcb);
 #endif



CVS commit: src/sys/arch/algor/algor

2011-04-06 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Thu Apr  7 04:01:41 UTC 2011

Modified Files:
src/sys/arch/algor/algor: algor_p4032_intr.c algor_p6032_intr.c

Log Message:
Fix more const pci_attach_args fallout.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/algor/algor/algor_p4032_intr.c
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/algor/algor/algor_p6032_intr.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/algor/algor/algor_p4032_intr.c
diff -u src/sys/arch/algor/algor/algor_p4032_intr.c:1.21 src/sys/arch/algor/algor/algor_p4032_intr.c:1.22
--- src/sys/arch/algor/algor/algor_p4032_intr.c:1.21	Sun Feb 20 07:51:21 2011
+++ src/sys/arch/algor/algor/algor_p4032_intr.c	Thu Apr  7 04:01:40 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: algor_p4032_intr.c,v 1.21 2011/02/20 07:51:21 matt Exp $	*/
+/*	$NetBSD: algor_p4032_intr.c,v 1.22 2011/04/07 04:01:40 dyoung Exp $	*/
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: algor_p4032_intr.c,v 1.21 2011/02/20 07:51:21 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: algor_p4032_intr.c,v 1.22 2011/04/07 04:01:40 dyoung Exp $);
 
 #include opt_ddb.h
 #define	__INTR_PRIVATE
@@ -219,7 +219,8 @@
 void	*algor_p4032_intr_establish(int, int (*)(void *), void *);
 void	algor_p4032_intr_disestablish(void *);
 
-int	algor_p4032_pci_intr_map(struct pci_attach_args *, pci_intr_handle_t *);
+int	algor_p4032_pci_intr_map(const struct pci_attach_args *,
+	pci_intr_handle_t *);
 const char *algor_p4032_pci_intr_string(void *, pci_intr_handle_t);
 const struct evcnt *algor_p4032_pci_intr_evcnt(void *, pci_intr_handle_t);
 void	*algor_p4032_pci_intr_establish(void *, pci_intr_handle_t, int,
@@ -485,7 +486,7 @@
  */
 
 int
-algor_p4032_pci_intr_map(struct pci_attach_args *pa,
+algor_p4032_pci_intr_map(const struct pci_attach_args *pa,
 pci_intr_handle_t *ihp)
 {
 	static const int pciirqmap[6/*device*/][4/*pin*/] = {

Index: src/sys/arch/algor/algor/algor_p6032_intr.c
diff -u src/sys/arch/algor/algor/algor_p6032_intr.c:1.18 src/sys/arch/algor/algor/algor_p6032_intr.c:1.19
--- src/sys/arch/algor/algor/algor_p6032_intr.c:1.18	Sat Mar  5 14:04:02 2011
+++ src/sys/arch/algor/algor/algor_p6032_intr.c	Thu Apr  7 04:01:40 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: algor_p6032_intr.c,v 1.18 2011/03/05 14:04:02 matt Exp $	*/
+/*	$NetBSD: algor_p6032_intr.c,v 1.19 2011/04/07 04:01:40 dyoung Exp $	*/
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: algor_p6032_intr.c,v 1.18 2011/03/05 14:04:02 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: algor_p6032_intr.c,v 1.19 2011/04/07 04:01:40 dyoung Exp $);
 
 #include opt_ddb.h
 #define	__INTR_PRIVATE
@@ -175,7 +175,8 @@
 void	*algor_p6032_intr_establish(int, int (*)(void *), void *);
 void	algor_p6032_intr_disestablish(void *);
 
-int	algor_p6032_pci_intr_map(struct pci_attach_args *, pci_intr_handle_t *);
+int	algor_p6032_pci_intr_map(const struct pci_attach_args *,
+	pci_intr_handle_t *);
 const char *algor_p6032_pci_intr_string(void *, pci_intr_handle_t);
 const struct evcnt *algor_p6032_pci_intr_evcnt(void *, pci_intr_handle_t);
 void	*algor_p6032_pci_intr_establish(void *, pci_intr_handle_t, int,
@@ -419,7 +420,7 @@
  */
 
 int
-algor_p6032_pci_intr_map(struct pci_attach_args *pa,
+algor_p6032_pci_intr_map(const struct pci_attach_args *pa,
 pci_intr_handle_t *ihp)
 {
 	static const int pciirqmap[6/*device*/][4/*pin*/] = {



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

2011-04-06 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Thu Apr  7 04:02:29 UTC 2011

Modified Files:
src/sys/arch/algor/conf: P6032

Log Message:
Increase SYMTAB_SPACE so that this kernel will build.


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 src/sys/arch/algor/conf/P6032

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/algor/conf/P6032
diff -u src/sys/arch/algor/conf/P6032:1.55 src/sys/arch/algor/conf/P6032:1.56
--- src/sys/arch/algor/conf/P6032:1.55	Sat Mar  5 14:02:08 2011
+++ src/sys/arch/algor/conf/P6032	Thu Apr  7 04:02:29 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: P6032,v 1.55 2011/03/05 14:02:08 matt Exp $
+#	$NetBSD: P6032,v 1.56 2011/04/07 04:02:29 dyoung Exp $
 #
 # Algorithmics P-6032 kernel.
 #
@@ -7,7 +7,7 @@
 
 #options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		P6032-$Revision: 1.55 $
+#ident 		P6032-$Revision: 1.56 $
 
 maxusers 32
 
@@ -25,7 +25,7 @@
 options 	DDB			# kernel debugger
 makeoptions	DEBUG=-g
 #makeoptions	DEBUGLIST=pattern1 pattern2 ...
-options 	SYMTAB_SPACE=37
+options 	SYMTAB_SPACE=38
 
 # File systems
 file-system	FFS		# Fast file system