CVS commit: src/tests/modules

2012-04-17 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Tue Apr 17 06:23:52 UTC 2012

Modified Files:
src/tests/modules: t_modctl.c

Log Message:
Avoid zero-length format string.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/tests/modules/t_modctl.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/modules/t_modctl.c
diff -u src/tests/modules/t_modctl.c:1.8 src/tests/modules/t_modctl.c:1.9
--- src/tests/modules/t_modctl.c:1.8	Thu Mar 15 02:02:23 2012
+++ src/tests/modules/t_modctl.c	Tue Apr 17 06:23:52 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_modctl.c,v 1.8 2012/03/15 02:02:23 joerg Exp $	*/
+/*	$NetBSD: t_modctl.c,v 1.9 2012/04/17 06:23:52 jruoho Exp $	*/
 /*
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: t_modctl.c,v 1.8 2012/03/15 02:02:23 joerg Exp $);
+__KERNEL_RCSID(0, $NetBSD: t_modctl.c,v 1.9 2012/04/17 06:23:52 jruoho Exp $);
 
 #include sys/module.h
 #include sys/sysctl.h
@@ -294,7 +294,7 @@ ATF_TC_BODY(cmd_load, tc)
 	char longname[MAXPATHLEN];
 	size_t i;
 
-	ATF_CHECK(load(NULL, false, ) == ENOENT);
+	ATF_CHECK(load(NULL, false,  ) == ENOENT);
 	ATF_CHECK(load(NULL, false, non-existent.o) == ENOENT);
 
 	for (i = 0; i  MAXPATHLEN - 1; i++)



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

2012-04-17 Thread Hiroyuki Bessho
Module Name:src
Committed By:   bsh
Date:   Tue Apr 17 07:43:21 UTC 2012

Modified Files:
src/sys/arch/evbarm/conf: NETWALKER

Log Message:
fix comment


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/evbarm/conf/NETWALKER

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/evbarm/conf/NETWALKER
diff -u src/sys/arch/evbarm/conf/NETWALKER:1.8 src/sys/arch/evbarm/conf/NETWALKER:1.9
--- src/sys/arch/evbarm/conf/NETWALKER:1.8	Sat Apr  7 03:25:00 2012
+++ src/sys/arch/evbarm/conf/NETWALKER	Tue Apr 17 07:43:21 2012
@@ -1,6 +1,6 @@
-#	$NetBSD: NETWALKER,v 1.8 2012/04/07 03:25:00 tsutsui Exp $
+#	$NetBSD: NETWALKER,v 1.9 2012/04/17 07:43:21 bsh Exp $
 #
-#	NETWALKER -- Sharp
+#	NETWALKER -- http://www.sharp.co.jp/netwalker/
 #
 
 include	arch/evbarm/conf/std.netwalker
@@ -17,7 +17,7 @@ options 	RTC_OFFSET=0	# hardware clock i
 #options 	NTP		# NTP phase/frequency locked loop
 
 # CPU options
-options 	CPU_CORTEXA8	# Support the ARM11 core
+options 	CPU_CORTEXA8	# Support the ARM-v7a core
 options 	IMX51
 options 	PMAPCOUNTERS
 



CVS commit: src/share/man/man4

2012-04-17 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Apr 17 08:28:21 UTC 2012

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

Log Message:
New sentence, new line.
Sort type descriptions.
Bump date for previous.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/share/man/man4/rnd.4

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

Modified files:

Index: src/share/man/man4/rnd.4
diff -u src/share/man/man4/rnd.4:1.19 src/share/man/man4/rnd.4:1.20
--- src/share/man/man4/rnd.4:1.19	Tue Apr 17 02:50:39 2012
+++ src/share/man/man4/rnd.4	Tue Apr 17 08:28:20 2012
@@ -1,4 +1,4 @@
-.\	$NetBSD: rnd.4,v 1.19 2012/04/17 02:50:39 tls Exp $
+.\	$NetBSD: rnd.4,v 1.20 2012/04/17 08:28:20 wiz Exp $
 .\
 .\ Copyright (c) 1997 Michael Graff
 .\ All rights reserved.
@@ -26,7 +26,7 @@
 .\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\ SUCH DAMAGE.
 .\
-.Dd December 17, 2011
+.Dd April 17, 2012
 .Dt RND 4
 .Os
 .Sh NAME
@@ -62,17 +62,19 @@ iterative guessing attacks.
 .Pp
 Certain programs make very short reads from
 .Pa /dev/urandom
-each time they begin execution.  One program with this behavior is
+each time they begin execution.
+One program with this behavior is
 .Xr perl 1 .
 If such a program is run repeatedly (for example from a network
 service or shell script), the resulting repeated keying of the stream
-generator can quickly drain the entropy pool dry.  As an optimization
-for such cases, a separate per-CPU instance of the stream generator
-is used to handle reads from
+generator can quickly drain the entropy pool dry.
+As an optimization for such cases, a separate per-CPU instance of
+the stream generator is used to handle reads from
 .Pa /dev/urandom
-which are smaller than the key length of the underlying cipher.  Any
-read of a larger size causes an immediate allocation of a private
-instance of the stream generator for the reader.  Since all stream
+which are smaller than the key length of the underlying cipher.
+Any read of a larger size causes an immediate allocation of a
+private instance of the stream generator for the reader.
+Since all stream
 generators are automatically rekeyed upon use when sufficient entropy
 is available, the shared short-request generators do still offer
 some protection against other consumers of
@@ -147,7 +149,7 @@ Excessive use of
 can deplete the entropy pool (or, at least, its estimate of how many
 bits of entropy it contains) and reduce security for other consumers
 of randomness both in userspace
-.Em and within the kernel.
+.Em and within the kernel .
 Some system administrators may wish therefore to remove the
 .Pa /dev/random
 device node and replace it with a second copy of the node for the nonblocking
@@ -199,14 +201,16 @@ Currently, these types are defined:
 .Bl -tag -width RND_TYPE_DISK
 .It Dv RND_TYPE_DISK
 The device is a physical hard drive.
+.It Dv RND_TYPE_ENV
+The device is an environmental sensor such as a temperature sensor or
+a fan speed sensor.
 .It Dv RND_TYPE_NET
 The device is a network interface.
 By default, timing information is
 collected from this source type, but entropy is not estimated.
-.It Dv RND_TYPE_TAPE
-The device is a tape device.
-.It Dv RND_TYPE_TTY
-The device is a terminal, mouse, or other user input device.
+.It Dv RND_TYPE_POWER
+The device is a sensor returning changes in the power state of the
+system, such as battery charge state or A/C adapter state.
 .It Dv RND_TYPE_RNG
 The device is a random number generator.
 .It Dv RND_TYPE_SKEW
@@ -215,23 +219,21 @@ periodic device interrupt and the system
 an audio codec, or some other source of pairs of events where each
 member of each pair is derived from a different instance of some
 recurring physical process.
-.It Dv RND_TYPE_ENV
-The device is an environmental sensor such as a temperature sensor or
-a fan speed sensor.
+.It Dv RND_TYPE_TAPE
+The device is a tape device.
+.It Dv RND_TYPE_TTY
+The device is a terminal, mouse, or other user input device.
 .It Dv RND_TYPE_VM
 The device consists of timings of virtual memory system events.
-.It Dv RND_TYPE_POWER
-The device is a sensor returning changes in the power state of the
-system, such as battery charge state or A/C adapter state.
 .El
 .Pp
 .Va flags
 is a bitfield.
 .Bl -tag -width RND_FLAG_NO_ESTIMATE
-.It Dv RND_FLAG_NO_ESTIMATE
-Do not assume any entropy is in the timing information.
 .It Dv RND_FLAG_NO_COLLECT
 Do not even add timing information to the pool.
+.It Dv RND_FLAG_NO_ESTIMATE
+Do not assume any entropy is in the timing information.
 .El
 .Pp
 .Bl -tag -width RNDADDTOENTCNT



CVS commit: src/sys/arch/arm/imx

2012-04-17 Thread Hiroyuki Bessho
Module Name:src
Committed By:   bsh
Date:   Tue Apr 17 09:12:08 UTC 2012

Modified Files:
src/sys/arch/arm/imx: imxepitreg.h

Log Message:
add bit definitions for i.MX51 EPIT


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/imx/imxepitreg.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/arm/imx/imxepitreg.h
diff -u src/sys/arch/arm/imx/imxepitreg.h:1.1 src/sys/arch/arm/imx/imxepitreg.h:1.2
--- src/sys/arch/arm/imx/imxepitreg.h:1.1	Sat Nov 13 06:51:37 2010
+++ src/sys/arch/arm/imx/imxepitreg.h	Tue Apr 17 09:12:08 2012
@@ -1,6 +1,6 @@
-/*	$NetBSD: imxepitreg.h,v 1.1 2010/11/13 06:51:37 bsh Exp $ */
+/*	$NetBSD: imxepitreg.h,v 1.2 2012/04/17 09:12:08 bsh Exp $ */
 /*
- * Copyright (c) 2009, 2010  Genetec corp.  All rights reserved.
+ * Copyright (c) 2009, 2010, 2012  Genetec corp.  All rights reserved.
  * Written by Hashimoto Kenichi for Genetec corp.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -37,11 +37,15 @@
 #define	 EPITCR_IOVW	__BIT(17)
 #define	 EPITCR_DBGEN	__BIT(18)
 #define	 EPITCR_WAITEN	__BIT(19)
-#define	 EPITCR_DOZEN	__BIT(20)
+#define	 EPITCR_DOZEN	__BIT(20)	/* not in iMX51 */
 #define	 EPITCR_STOPEN	__BIT(21)
 #define	 EPITCR_OM	__BITS(22,23)
-#define	 EPITCR_CLKSRC_MASK	__BITS(24,25)
-#define	 EPITCR_CLKSRC_HIGH	(0x2  24)
+#define	 EPITCR_CLKSRC_SHIFT	24
+#define	 EPITCR_CLKSRC_MASK	__BITS(25, EPITCR_CLKSRC_SHIFT)
+#define	 EPITCR_CLKSRC_IPG	(1  EPITCR_CLKSRC_SHIFT)
+#define	 EPITCR_CLKSRC_IPGHIGH	(2  EPITCR_CLKSRC_SHIFT)
+#define	 EPITCR_CLKSRC_IPG32K	(3  EPITCR_CLKSRC_SHIFT)
+#define	 EPITCR_CLKSRC_HIGH	(2  EPITCR_CLKSRC_SHIFT)
 
 #define	EPIT_EPITSR	0x0004
 #define	EPIT_EPITLR	0x0008



CVS commit: src/tests/lib/librumphijack

2012-04-17 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Tue Apr 17 09:23:21 UTC 2012

Modified Files:
src/tests/lib/librumphijack: h_client.c h_cwd.c h_netget.c

Log Message:
Return from main() and use EXIT_FAILURE/EXIT_SUCCESS from stdlib(3).


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/tests/lib/librumphijack/h_client.c
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/librumphijack/h_cwd.c
cvs rdiff -u -r1.1 -r1.2 src/tests/lib/librumphijack/h_netget.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/librumphijack/h_client.c
diff -u src/tests/lib/librumphijack/h_client.c:1.6 src/tests/lib/librumphijack/h_client.c:1.7
--- src/tests/lib/librumphijack/h_client.c:1.6	Mon Mar 14 15:56:40 2011
+++ src/tests/lib/librumphijack/h_client.c	Tue Apr 17 09:23:21 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: h_client.c,v 1.6 2011/03/14 15:56:40 pooka Exp $	*/
+/*	$NetBSD: h_client.c,v 1.7 2012/04/17 09:23:21 jruoho Exp $	*/
 
 /*
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -57,19 +57,19 @@ main(int argc, char *argv[])
 		tv.tv_usec = 1;
 
 		if (pipe(pipefd) == -1)
-			err(1, pipe);
+			err(EXIT_FAILURE, pipe);
 		FD_ZERO(rfds);
 		FD_SET(pipefd[0], rfds);
 
 		rv = select(pipefd[0]+1, rfds, NULL, NULL, tv);
 		if (rv == -1)
-			err(1, select);
+			err(EXIT_FAILURE, select);
 		if (rv != 0)
-			errx(1, select succesful);
+			errx(EXIT_FAILURE, select succesful);
 
 		if (FD_ISSET(pipefd[0], rfds))
-			errx(1, stdin fileno is still set);
-		exit(0);
+			errx(EXIT_FAILURE, stdin fileno is still set);
+		return EXIT_SUCCESS;
 	} else if (strcmp(argv[1], select_allunset) == 0) {
 		fd_set fds;
 		struct timeval tv;
@@ -82,24 +82,24 @@ main(int argc, char *argv[])
 
 		rv = select(100, fds, fds, fds, tv);
 		if (rv == -1)
-			err(1, select);
+			err(EXIT_FAILURE, select);
 		if (rv != 0)
-			errx(1, select succesful);
+			errx(EXIT_FAILURE, select succesful);
 
 		rv = select(0, NULL, NULL, NULL, tv);
 		if (rv == -1)
-			err(1, select2);
+			err(EXIT_FAILURE, select2);
 		if (rv != 0)
-			errx(1, select2 succesful);
+			errx(EXIT_FAILURE, select2 succesful);
 
-		exit(0);
+		return EXIT_SUCCESS;
 	} else if (strcmp(argv[1], invafd) == 0) {
 		struct pollfd pfd[2];
 		int fd, rv;
 
 		fd = open(/rump/dev/null, O_RDWR);
 		if (fd == -1)
-			err(1, open);
+			err(EXIT_FAILURE, open);
 		close(fd);
 
 		pfd[0].fd = STDIN_FILENO;
@@ -108,26 +108,27 @@ main(int argc, char *argv[])
 		pfd[1].events = POLLIN;
 
 		if ((rv = poll(pfd, 2, INFTIM)) != 1)
-			errx(1, poll unexpected rv %d (%d), rv, errno);
+			errx(EXIT_FAILURE, poll unexpected rv %d (%d),
+			rv, errno);
 		if (pfd[1].revents != POLLNVAL || pfd[0].revents != 0)
-			errx(1, poll unexpected revents);
+			errx(EXIT_FAILURE, poll unexpected revents);
 
-		exit(0);
+		return EXIT_SUCCESS;
 	} else if (strcmp(argv[1], fdoff8) == 0) {
 		int fd;
 
 		do
 			if ((fd = open(/dev/null, O_RDWR)) == -1)
-err(1, open1);
+err(EXIT_FAILURE, open1);
 		while (fd  7);
 		fd = open(/dev/null, O_RDWR);
 		if (fd != -1 || errno != ENFILE)
-			errx(1, unexpected fd8 %d %d, fd, errno);
+			errx(EXIT_FAILURE, unexpected fd8 %d %d, fd, errno);
 		if (fcntl(0, F_MAXFD) != 7)
-			errx(1, fd leak?);
+			errx(EXIT_FAILURE, fd leak?);
 		if ((fd = open(/rump/dev/null, O_RDWR)) != 8)
-			errx(1, rump open %d %d, fd, errno);
-		exit(0);
+			errx(EXIT_FAILURE, rump open %d %d, fd, errno);
+		return EXIT_SUCCESS;
 	} else {
 		return ENOTSUP;
 	}

Index: src/tests/lib/librumphijack/h_cwd.c
diff -u src/tests/lib/librumphijack/h_cwd.c:1.2 src/tests/lib/librumphijack/h_cwd.c:1.3
--- src/tests/lib/librumphijack/h_cwd.c:1.2	Sat Feb 19 19:57:28 2011
+++ src/tests/lib/librumphijack/h_cwd.c	Tue Apr 17 09:23:21 2012
@@ -1,4 +1,4 @@
-/*  $NetBSD: h_cwd.c,v 1.2 2011/02/19 19:57:28 pooka Exp $	*/
+/*  $NetBSD: h_cwd.c,v 1.3 2012/04/17 09:23:21 jruoho Exp $	*/
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -33,6 +33,7 @@
 #include err.h
 #include errno.h
 #include fcntl.h
+#include stdlib.h
 #include string.h
 #include unistd.h
 
@@ -58,7 +59,7 @@ dochdir(const char *path, const char *er
 {
 
 	if (chdir(path) == -1)
-		err(1, %s, errmsg);
+		err(EXIT_FAILURE, %s, errmsg);
 }
 
 static void
@@ -68,9 +69,9 @@ dofchdir(const char *path, const char *e
 
 	fd = open(path, O_RDONLY);
 	if (fd == -1)
-		err(1, open %s, errmsg);
+		err(EXIT_FAILURE, open %s, errmsg);
 	if (fchdir(fd) == -1)
-		err(1, fchdir %s, errmsg);
+		err(EXIT_FAILURE, fchdir %s, errmsg);
 	close(fd);
 }
 static void (*thechdir)(const char *, const char *);
@@ -81,44 +82,44 @@ simple(void)
 
 	thechdir(prefix, chdir1);
 	if (getcwd(pwd, sizeof(pwd)) == NULL)
-		err(1, getcwd1);
+		err(EXIT_FAILURE, getcwd1);
 	if (strcmp(pwd, prefix) != 0)
-		errx(1, strcmp1);
+		errx(EXIT_FAILURE, strcmp1);
 
 	if (mkdir(dir, 0777) == -1)
-		err(1, mkdir2);
+		err(EXIT_FAILURE, mkdir2);
 	thechdir(dir, 

CVS commit: src/sys/arch

2012-04-17 Thread Hiroyuki Bessho
Module Name:src
Committed By:   bsh
Date:   Tue Apr 17 09:33:31 UTC 2012

Modified Files:
src/sys/arch/arm/imx: imx51_axi.c imx51_clock.c imxclock.c
imxclockvar.h
src/sys/arch/evbarm/conf: NETWALKER
Added Files:
src/sys/arch/arm/imx: imx51_ccm.c imx51_ccmreg.h imx51_ccmvar.h
imx51_dpllreg.h

Log Message:
driver for i.MX51 Clock Controller Module.
from Kenichi Hashimoto.

Currently used only to get peripheral clock frequencies.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/imx/imx51_axi.c \
src/sys/arch/arm/imx/imx51_clock.c
cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/imx/imx51_ccm.c \
src/sys/arch/arm/imx/imx51_ccmreg.h src/sys/arch/arm/imx/imx51_ccmvar.h \
src/sys/arch/arm/imx/imx51_dpllreg.h
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/imx/imxclock.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/imx/imxclockvar.h
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/evbarm/conf/NETWALKER

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

Modified files:

Index: src/sys/arch/arm/imx/imx51_axi.c
diff -u src/sys/arch/arm/imx/imx51_axi.c:1.2 src/sys/arch/arm/imx/imx51_axi.c:1.3
--- src/sys/arch/arm/imx/imx51_axi.c:1.2	Tue Nov 30 13:05:27 2010
+++ src/sys/arch/arm/imx/imx51_axi.c	Tue Apr 17 09:33:31 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: imx51_axi.c,v 1.2 2010/11/30 13:05:27 bsh Exp $	*/
+/*	$NetBSD: imx51_axi.c,v 1.3 2012/04/17 09:33:31 bsh Exp $	*/
 
 /*-
  * Copyright (c) 2010 SHIMIZU Ryo r...@nerv.org
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: imx51_axi.c,v 1.2 2010/11/30 13:05:27 bsh Exp $);
+__KERNEL_RCSID(0, $NetBSD: imx51_axi.c,v 1.3 2012/04/17 09:33:31 bsh Exp $);
 
 #include sys/param.h
 #include sys/bus.h
@@ -38,6 +38,7 @@ __KERNEL_RCSID(0, $NetBSD: imx51_axi.c,
 #include arm/imx/imx51reg.h
 #include arm/imx/imx51var.h
 
+#include bus_dma_generic.h
 #include locators.h
 
 struct axi_softc {
@@ -102,6 +103,7 @@ axi_critical_search(device_t parent, str
 
 	if ((strcmp(cf-cf_name, tzic) != 0) 
 	(strcmp(cf-cf_name, imxuart) != 0) 
+	(strcmp(cf-cf_name, imxccm) != 0) 
 	(strcmp(cf-cf_name, imxgpio) != 0))
 		return 0;
 
Index: src/sys/arch/arm/imx/imx51_clock.c
diff -u src/sys/arch/arm/imx/imx51_clock.c:1.2 src/sys/arch/arm/imx/imx51_clock.c:1.3
--- src/sys/arch/arm/imx/imx51_clock.c:1.2	Fri Jul  1 20:27:50 2011
+++ src/sys/arch/arm/imx/imx51_clock.c	Tue Apr 17 09:33:31 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: imx51_clock.c,v 1.2 2011/07/01 20:27:50 dyoung Exp $ */
+/*	$NetBSD: imx51_clock.c,v 1.3 2012/04/17 09:33:31 bsh Exp $ */
 /*
  * Copyright (c) 2009  Genetec corp.  All rights reserved.
  * Written by Hashimoto Kenichi for Genetec corp.
@@ -25,7 +25,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: imx51_clock.c,v 1.2 2011/07/01 20:27:50 dyoung Exp $);
+__KERNEL_RCSID(0, $NetBSD: imx51_clock.c,v 1.3 2012/04/17 09:33:31 bsh Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -48,7 +48,7 @@ __KERNEL_RCSID(0, $NetBSD: imx51_clock.
 #include arm/imx/imx51reg.h
 #include arm/imx/imx51var.h
 #include arm/imx/imxepitreg.h
-//#include arm/imx/imx51_ccmvar.h notyet
+#include arm/imx/imx51_ccmvar.h
 #include arm/imx/imxclockvar.h
 
 #include imxccm.h	/* if CCM driver is configured into the kernel */
@@ -90,8 +90,6 @@ imxclock_attach(device_t parent, device_
 	sc-sc_iot = aa-aa_iot;
 	sc-sc_intr = aa-aa_irq;
 
-	KASSERT((sc-sc_intr == IRQ_EPIT1) || (sc-sc_intr == IRQ_EPIT2));
-
 	switch ( aa-aa_addr ) {
 	case EPIT1_BASE:
 		epit1_sc = sc;
@@ -106,6 +104,8 @@ imxclock_attach(device_t parent, device_
 
 	if (bus_space_map(aa-aa_iot, aa-aa_addr, aa-aa_size, 0, sc-sc_ioh))
 		panic(%s: Cannot map registers, device_xname(self));
+
+	sc-sc_clksrc = EPITCR_CLKSRC_IPG;
 }
 
 int
@@ -113,11 +113,7 @@ imxclock_get_timerfreq(struct imxclock_s
 {
 	unsigned int ipg_freq;
 #if NIMXCCM  0
-	struct imx51_clocks clk;
-
-	imx51_get_clocks(clk);
-
-	ipg_freq = clk.ipg_clk;
+	ipg_freq = imx51_get_clock(IMX51CLK_IPG_CLK_ROOT);
 #else
 #ifndef	IMX51_IPGCLK_FREQ
 #error	IMX51_IPGCLK_FREQ need to be defined.

Index: src/sys/arch/arm/imx/imxclock.c
diff -u src/sys/arch/arm/imx/imxclock.c:1.4 src/sys/arch/arm/imx/imxclock.c:1.5
--- src/sys/arch/arm/imx/imxclock.c:1.4	Fri Jul  1 20:27:50 2011
+++ src/sys/arch/arm/imx/imxclock.c	Tue Apr 17 09:33:31 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: imxclock.c,v 1.4 2011/07/01 20:27:50 dyoung Exp $ */
+/*	$NetBSD: imxclock.c,v 1.5 2012/04/17 09:33:31 bsh Exp $ */
 /*
  * Copyright (c) 2009, 2010  Genetec corp.  All rights reserved.
  * Written by Hashimoto Kenichi for Genetec corp.
@@ -70,7 +70,7 @@ void
 cpu_initclocks(void)
 {
 	uint32_t reg;
-	int freq;
+	u_int freq;
 
 	if (!epit1_sc) {
 		panic(%s: driver has not been initialized!, __FUNCTION__);
@@ -80,6 +80,9 @@ cpu_initclocks(void)
 	imx_epit_timecounter.tc_frequency = freq;
 	tc_init(imx_epit_timecounter);
 
+	

CVS commit: src/sys/arch/amiga

2012-04-17 Thread Radoslaw Kujawa
Module Name:src
Committed By:   rkujawa
Date:   Tue Apr 17 09:59:03 UTC 2012

Modified Files:
src/sys/arch/amiga/amiga: autoconf.c
src/sys/arch/amiga/conf: GENERIC.in files.amiga
Added Files:
src/sys/arch/amiga/clockport: a1k2cp.c clockport.c clockport_common.c
clockportvar.h com_ss.c files.clockport

Log Message:
Add clockport(4) layer, which provides support for expansion bus present on
Amiga-style clockports. Also add a1k2cp(4) backend driver and the first
clockport device driver com_ss, that supports com(4) on clockport(4)
(particurarly Individual Computers SilverSurfer). Disabled by default,
since probe procedure is not written yet.


To generate a diff of this commit:
cvs rdiff -u -r1.110 -r1.111 src/sys/arch/amiga/amiga/autoconf.c
cvs rdiff -u -r0 -r1.1 src/sys/arch/amiga/clockport/a1k2cp.c \
src/sys/arch/amiga/clockport/clockport.c \
src/sys/arch/amiga/clockport/clockport_common.c \
src/sys/arch/amiga/clockport/clockportvar.h \
src/sys/arch/amiga/clockport/com_ss.c \
src/sys/arch/amiga/clockport/files.clockport
cvs rdiff -u -r1.97 -r1.98 src/sys/arch/amiga/conf/GENERIC.in
cvs rdiff -u -r1.154 -r1.155 src/sys/arch/amiga/conf/files.amiga

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/autoconf.c
diff -u src/sys/arch/amiga/amiga/autoconf.c:1.110 src/sys/arch/amiga/amiga/autoconf.c:1.111
--- src/sys/arch/amiga/amiga/autoconf.c:1.110	Sun Feb 12 16:34:06 2012
+++ src/sys/arch/amiga/amiga/autoconf.c	Tue Apr 17 09:59:03 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: autoconf.c,v 1.110 2012/02/12 16:34:06 matt Exp $	*/
+/*	$NetBSD: autoconf.c,v 1.111 2012/04/17 09:59:03 rkujawa Exp $	*/
 
 /*
  * Copyright (c) 1994 Christian E. Hopps
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.110 2012/02/12 16:34:06 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.111 2012/04/17 09:59:03 rkujawa Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -295,6 +295,8 @@ mbattach(device_t pdp, device_t dp, void
 		config_found(dp, __UNCONST(ahsc), simple_devprint);
 	if (is_a600() || is_a1200())
 		config_found(dp, __UNCONST(pccard), simple_devprint);
+	if (is_a1200())
+		config_found(dp, __UNCONST(a1k2cp), simple_devprint);
 #ifdef DRACO
 	if (!is_draco())
 #endif

Index: src/sys/arch/amiga/conf/GENERIC.in
diff -u src/sys/arch/amiga/conf/GENERIC.in:1.97 src/sys/arch/amiga/conf/GENERIC.in:1.98
--- src/sys/arch/amiga/conf/GENERIC.in:1.97	Sat Mar 10 21:51:49 2012
+++ src/sys/arch/amiga/conf/GENERIC.in	Tue Apr 17 09:59:03 2012
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC.in,v 1.97 2012/03/10 21:51:49 joerg Exp $
+# $NetBSD: GENERIC.in,v 1.98 2012/04/17 09:59:03 rkujawa Exp $
 #
 ##
 # GENERIC machine description file
@@ -52,7 +52,7 @@ include arch/amiga/conf/std.amiga
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.97 $
+#ident 		GENERIC-$Revision: 1.98 $
 
 m4_ifdef(`INSTALL_CONFIGURATION', `m4_dnl
 makeoptions	COPTS=-Os
@@ -415,6 +415,11 @@ a2kbbc0 	at mainbus0		# A2000 battery ba
 m4_ifdef(`INSTALL_CONFIGURATION', `', `m4_dnl
 aucc*		at mainbus0		# Amiga CC audio
 audio*		at aucc?
+
+#a1k2cp0 at mainbus0 # A1200 on-board clockport
+#clockport*  at a1k2cp0
+
+#com*at clockport?   # Individual Computers SilverSurfer
 ')m4_dnl
 ')m4_dnl
 

Index: src/sys/arch/amiga/conf/files.amiga
diff -u src/sys/arch/amiga/conf/files.amiga:1.154 src/sys/arch/amiga/conf/files.amiga:1.155
--- src/sys/arch/amiga/conf/files.amiga:1.154	Tue Jan 24 00:19:39 2012
+++ src/sys/arch/amiga/conf/files.amiga	Tue Apr 17 09:59:03 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: files.amiga,v 1.154 2012/01/24 00:19:39 rkujawa Exp $
+#	$NetBSD: files.amiga,v 1.155 2012/04/17 09:59:03 rkujawa Exp $
 
 # maxpartitions must be first item in files.${ARCH}.newconf
 maxpartitions 16			# NOTE THAT AMIGA IS SPECIAL!
@@ -527,5 +527,7 @@ attach	cv3dpb at zbus
 include	dev/i2o/files.i2o
 include	dev/pci/files.pci
 
+include arch/amiga/clockport/files.clockport
+
 include	arch/amiga/conf/majors.amiga
 

Added files:

Index: src/sys/arch/amiga/clockport/a1k2cp.c
diff -u /dev/null src/sys/arch/amiga/clockport/a1k2cp.c:1.1
--- /dev/null	Tue Apr 17 09:59:03 2012
+++ src/sys/arch/amiga/clockport/a1k2cp.c	Tue Apr 17 09:59:03 2012
@@ -0,0 +1,109 @@
+/*  $NetBSD: a1k2cp.c,v 1.1 2012/04/17 09:59:03 rkujawa Exp $ */
+
+/*-
+ * Copyright (c) 2012 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Radoslaw Kujawa.
+ *
+ * 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 

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

2012-04-17 Thread Radoslaw Kujawa
Module Name:src
Committed By:   rkujawa
Date:   Tue Apr 17 10:06:32 UTC 2012

Modified Files:
src/sys/arch/amiga/conf: DRACO GENERIC INSTALL

Log Message:
regen configs


To generate a diff of this commit:
cvs rdiff -u -r1.155 -r1.156 src/sys/arch/amiga/conf/DRACO
cvs rdiff -u -r1.285 -r1.286 src/sys/arch/amiga/conf/GENERIC
cvs rdiff -u -r1.106 -r1.107 src/sys/arch/amiga/conf/INSTALL

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/conf/DRACO
diff -u src/sys/arch/amiga/conf/DRACO:1.155 src/sys/arch/amiga/conf/DRACO:1.156
--- src/sys/arch/amiga/conf/DRACO:1.155	Sat Mar 10 21:51:49 2012
+++ src/sys/arch/amiga/conf/DRACO	Tue Apr 17 10:06:32 2012
@@ -1,9 +1,9 @@
-# $NetBSD: DRACO,v 1.155 2012/03/10 21:51:49 joerg Exp $
+# $NetBSD: DRACO,v 1.156 2012/04/17 10:06:32 rkujawa Exp $
 #
 # This file was automatically created.
 # Changes will be lost when make is run in this directory.
 #
-# Created from: # NetBSD: GENERIC.in,v 1.95 2012/01/19 22:43:11 rkujawa Exp $
+# Created from: # NetBSD: GENERIC.in,v 1.98 2012/04/17 09:59:03 rkujawa Exp $
 #
 ##
 # GENERIC machine description file
@@ -29,7 +29,7 @@ include arch/amiga/conf/std.amiga
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.155 $
+#ident 		GENERIC-$Revision: 1.156 $
 
 
 maxusers	8

Index: src/sys/arch/amiga/conf/GENERIC
diff -u src/sys/arch/amiga/conf/GENERIC:1.285 src/sys/arch/amiga/conf/GENERIC:1.286
--- src/sys/arch/amiga/conf/GENERIC:1.285	Sat Mar 10 21:51:49 2012
+++ src/sys/arch/amiga/conf/GENERIC	Tue Apr 17 10:06:32 2012
@@ -1,9 +1,9 @@
-# $NetBSD: GENERIC,v 1.285 2012/03/10 21:51:49 joerg Exp $
+# $NetBSD: GENERIC,v 1.286 2012/04/17 10:06:32 rkujawa Exp $
 #
 # This file was automatically created.
 # Changes will be lost when make is run in this directory.
 #
-# Created from: # NetBSD: GENERIC.in,v 1.95 2012/01/19 22:43:11 rkujawa Exp $
+# Created from: # NetBSD: GENERIC.in,v 1.98 2012/04/17 09:59:03 rkujawa Exp $
 #
 ##
 # GENERIC machine description file
@@ -29,7 +29,7 @@ include arch/amiga/conf/std.amiga
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.285 $
+#ident 		GENERIC-$Revision: 1.286 $
 
 
 maxusers	8
@@ -347,6 +347,11 @@ a2kbbc0 	at mainbus0		# A2000 battery ba
 aucc*		at mainbus0		# Amiga CC audio
 audio*		at aucc?
 
+#a1k2cp0 at mainbus0 # A1200 on-board clockport
+#clockport*  at a1k2cp0
+
+#com*at clockport?   # Individual Computers SilverSurfer
+
 #wsmouse*	at ms?
 
 #

Index: src/sys/arch/amiga/conf/INSTALL
diff -u src/sys/arch/amiga/conf/INSTALL:1.106 src/sys/arch/amiga/conf/INSTALL:1.107
--- src/sys/arch/amiga/conf/INSTALL:1.106	Tue Jan 24 00:19:39 2012
+++ src/sys/arch/amiga/conf/INSTALL	Tue Apr 17 10:06:32 2012
@@ -1,9 +1,9 @@
-# $NetBSD: INSTALL,v 1.106 2012/01/24 00:19:39 rkujawa Exp $
+# $NetBSD: INSTALL,v 1.107 2012/04/17 10:06:32 rkujawa Exp $
 #
 # This file was automatically created.
 # Changes will be lost when make is run in this directory.
 #
-# Created from: # NetBSD: GENERIC.in,v 1.95 2012/01/19 22:43:11 rkujawa Exp $
+# Created from: # NetBSD: GENERIC.in,v 1.98 2012/04/17 09:59:03 rkujawa Exp $
 #
 ##
 # GENERIC machine description file
@@ -29,7 +29,7 @@ include arch/amiga/conf/std.amiga
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.106 $
+#ident 		GENERIC-$Revision: 1.107 $
 
 makeoptions	COPTS=-Os
 



CVS commit: src/sys/dev

2012-04-17 Thread Radoslaw Kujawa
Module Name:src
Committed By:   rkujawa
Date:   Tue Apr 17 10:08:07 UTC 2012

Modified Files:
src/sys/dev: DEVNAMES

Log Message:
add missing amiga device names


To generate a diff of this commit:
cvs rdiff -u -r1.271 -r1.272 src/sys/dev/DEVNAMES

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/DEVNAMES
diff -u src/sys/dev/DEVNAMES:1.271 src/sys/dev/DEVNAMES:1.272
--- src/sys/dev/DEVNAMES:1.271	Sun Jan 22 13:53:48 2012
+++ src/sys/dev/DEVNAMES	Tue Apr 17 10:08:07 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: DEVNAMES,v 1.271 2012/01/22 13:53:48 christos Exp $
+#	$NetBSD: DEVNAMES,v 1.272 2012/04/17 10:08:07 rkujawa Exp $
 #
 # This file contains all used device names and defined attributes in
 # alphabetical order. New devices added to the system somewhere should first
@@ -258,6 +258,8 @@ clock			sun2
 clock			sun3
 clock			x68k
 clockctl		MI
+clockport		amiga
+clockportbus		amiga
 cmdide			MI
 cmi			vax
 cmpci			MI
@@ -375,6 +377,7 @@ eeprom			sparc
 eeprom			sparc64
 eeprom			sun3
 ef			MI
+efa			amiga
 eg			MI
 ega			MI
 eh			acorn26
@@ -874,6 +877,8 @@ mms			dreamcast
 mms			i386
 motoi2c			MI		Attribute
 moxa			MI
+mppb			amiga
+mppb			amigappc
 mpt			MI
 mpu			MI
 mr			MI
@@ -985,6 +990,12 @@ optiide			MI
 osiop			MI
 otgsc			amiga
 otgsc			amigappc
+p5bus			amiga
+p5bus			amigappc
+p5membar		amiga
+p5membar		amigappc
+p5pb			amiga
+p5pb			amigappc
 panel			cobalt
 pad			MI
 par			amiga



CVS commit: src/share/man/man4/man4.amiga

2012-04-17 Thread Radoslaw Kujawa
Module Name:src
Committed By:   rkujawa
Date:   Tue Apr 17 10:12:35 UTC 2012

Modified Files:
src/share/man/man4/man4.amiga: Makefile
Added Files:
src/share/man/man4/man4.amiga: a1k2cp.4 clockport.4

Log Message:
Add man pages for the new clockport(4) and a1k2cp(4).


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/share/man/man4/man4.amiga/Makefile
cvs rdiff -u -r0 -r1.1 src/share/man/man4/man4.amiga/a1k2cp.4 \
src/share/man/man4/man4.amiga/clockport.4

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

Modified files:

Index: src/share/man/man4/man4.amiga/Makefile
diff -u src/share/man/man4/man4.amiga/Makefile:1.23 src/share/man/man4/man4.amiga/Makefile:1.24
--- src/share/man/man4/man4.amiga/Makefile:1.23	Wed Jan 11 17:25:19 2012
+++ src/share/man/man4/man4.amiga/Makefile	Tue Apr 17 10:12:35 2012
@@ -1,8 +1,8 @@
 # 	from: @(#)Makefile	8.2 (Berkeley) 2/16/94
-#	$NetBSD: Makefile,v 1.23 2012/01/11 17:25:19 rkujawa Exp $
+#	$NetBSD: Makefile,v 1.24 2012/04/17 10:12:35 rkujawa Exp $
 
-MAN=	afsc.4 ahsc.4 amidisplaycc.4 atzsc.4 autoconf.4 console.4 bah.4 \
-	bppcsc.4 cv3dpb.4 ed.4 efa.4 es.4 fdc.4 grf.4 \
+MAN=	a1k2cp.4 afsc.4 ahsc.4 amidisplaycc.4 atzsc.4 autoconf.4 console.4 \
+	bah.4 bppcsc.4 clockport.4 cv3dpb.4 ed.4 efa.4 es.4 fdc.4 grf.4 \
 	grfcl.4 grfcv.4 grfcv3d.4 grfet.4 grfrh.4 grfrt.4 grful.4 \
 	gtsc.4 intro.4 ite.4 mem.4 mfcs.4 mgnsc.4 mppb.4 p5membar.4 p5pb.4 \
 	qn.4 ser.4 wesc.4 zssc.4

Added files:

Index: src/share/man/man4/man4.amiga/a1k2cp.4
diff -u /dev/null src/share/man/man4/man4.amiga/a1k2cp.4:1.1
--- /dev/null	Tue Apr 17 10:12:35 2012
+++ src/share/man/man4/man4.amiga/a1k2cp.4	Tue Apr 17 10:12:35 2012
@@ -0,0 +1,73 @@
+.\ $NetBSD: a1k2cp.4,v 1.1 2012/04/17 10:12:35 rkujawa Exp $
+.\
+.\ Copyright (c) 2012 The NetBSD Foundation, Inc.
+.\ All rights reserved.
+.\
+.\ This code is derived from software contributed to The NetBSD Foundation
+.\ by Radoslaw Kujawa.
+.\
+.\ 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.
+.\
+.Dd April 16, 2012
+.Dt A1K2CP 4 amiga
+.Os
+.Sh NAME
+.Nm a1k2cp 
+.Nd Amiga 1200 on-board clockport driver
+.Sh SYNOPSIS
+.Cd a1k2cp0 at mainbus0
+.Cd clockport* at a1k2cp0
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for the spare I/O pins present on Amiga 1200 on-board
+clockport.
+.Sh HARDWARE
+The
+.Nm
+driver supports the following clockports:
+.Bl -tag -offset indent
+.It Amiga 1200 on-board clockport header (0xD90001)
+.El
+.Sh SEE ALSO
+.Xr clockport 4
+.Sh HISTORY
+The
+.Nm
+device first appeared in
+.Nx 7.0 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An Radoslaw Kujawa Aq radoslaw.kuj...@gmail.com .
+.Sh CAVEATS
+Even if connected to clockport header, Real Time Clock modules are
+supported by the
+.Xr a2kbbc
+and
+.Xr a34kbbc 
+drivers.
+.Pp
+Only one clockport is supported, even if clockport expander is present. This is
+a driver limitation.
Index: src/share/man/man4/man4.amiga/clockport.4
diff -u /dev/null src/share/man/man4/man4.amiga/clockport.4:1.1
--- /dev/null	Tue Apr 17 10:12:35 2012
+++ src/share/man/man4/man4.amiga/clockport.4	Tue Apr 17 10:12:35 2012
@@ -0,0 +1,67 @@
+.\ $NetBSD: clockport.4,v 1.1 2012/04/17 10:12:35 rkujawa Exp $
+.\
+.\ Copyright (c) 2012 The NetBSD Foundation, Inc.
+.\ All rights reserved.
+.\
+.\ This code is derived from software contributed to The NetBSD Foundation
+.\ by Radoslaw Kujawa.
+.\
+.\ 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 

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

2012-04-17 Thread Radoslaw Kujawa
Module Name:src
Committed By:   rkujawa
Date:   Tue Apr 17 10:14:12 UTC 2012

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

Log Message:
add a1k2cp(4) and clockport(4) man pages to distribution list


To generate a diff of this commit:
cvs rdiff -u -r1.1385 -r1.1386 src/distrib/sets/lists/man/mi

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/man/mi
diff -u src/distrib/sets/lists/man/mi:1.1385 src/distrib/sets/lists/man/mi:1.1386
--- src/distrib/sets/lists/man/mi:1.1385	Sun Mar 25 00:11:17 2012
+++ src/distrib/sets/lists/man/mi	Tue Apr 17 10:14:12 2012
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1385 2012/03/25 00:11:17 nonaka Exp $
+# $NetBSD: mi,v 1.1386 2012/04/17 10:14:12 rkujawa Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -723,6 +723,7 @@
 ./usr/share/man/cat4/amdpm.0			man-sys-catman		.cat
 ./usr/share/man/cat4/amdtemp.0			man-sys-catman		.cat
 ./usr/share/man/cat4/amhphy.0			man-sys-catman		.cat
+./usr/share/man/cat4/amiga/a1k2cp.0		man-sys-catman		.cat
 ./usr/share/man/cat4/amiga/afsc.0		man-sys-catman		.cat
 ./usr/share/man/cat4/amiga/ahsc.0		man-sys-catman		.cat
 ./usr/share/man/cat4/amiga/amidisplaycc.0	man-sys-catman		.cat
@@ -730,6 +731,7 @@
 ./usr/share/man/cat4/amiga/autoconf.0		man-sys-catman		.cat
 ./usr/share/man/cat4/amiga/bah.0		man-sys-catman		.cat
 ./usr/share/man/cat4/amiga/bppcsc.0		man-sys-catman		.cat
+./usr/share/man/cat4/amiga/clockport.0		man-sys-catman		.cat
 ./usr/share/man/cat4/amiga/console.0		man-sys-catman		.cat
 ./usr/share/man/cat4/amiga/cv3dpb.0		man-sys-catman		.cat
 ./usr/share/man/cat4/amiga/ed.0			man-sys-catman		.cat
@@ -3631,6 +3633,7 @@
 ./usr/share/man/html4/amdpm.html		man-sys-htmlman		html
 ./usr/share/man/html4/amdtemp.html		man-sys-htmlman		html
 ./usr/share/man/html4/amhphy.html		man-sys-htmlman		html
+./usr/share/man/html4/amiga/a1k2cp.html		man-sys-htmlman		html
 ./usr/share/man/html4/amiga/afsc.html		man-sys-htmlman		html
 ./usr/share/man/html4/amiga/ahsc.html		man-sys-htmlman		html
 ./usr/share/man/html4/amiga/amidisplaycc.html	man-sys-htmlman		html
@@ -3638,6 +3641,7 @@
 ./usr/share/man/html4/amiga/autoconf.html	man-sys-htmlman		html
 ./usr/share/man/html4/amiga/bah.html		man-sys-htmlman		html
 ./usr/share/man/html4/amiga/bppcsc.html		man-sys-htmlman		html
+./usr/share/man/html4/amiga/clockport.html	man-sys-htmlman		html
 ./usr/share/man/html4/amiga/console.html	man-sys-htmlman		html
 ./usr/share/man/html4/amiga/cv3dpb.html		man-sys-htmlman		html
 ./usr/share/man/html4/amiga/ed.html		man-sys-htmlman		html
@@ -6236,6 +6240,7 @@
 ./usr/share/man/man4/amdpm.4			man-sys-man		.man
 ./usr/share/man/man4/amdtemp.4			man-sys-man		.man
 ./usr/share/man/man4/amhphy.4			man-sys-man		.man
+./usr/share/man/man4/amiga/a1k2cp.4		man-sys-man		.man
 ./usr/share/man/man4/amiga/afsc.4		man-sys-man		.man
 ./usr/share/man/man4/amiga/ahsc.4		man-sys-man		.man
 ./usr/share/man/man4/amiga/amidisplaycc.4	man-sys-man		.man
@@ -6244,6 +6249,7 @@
 ./usr/share/man/man4/amiga/bah.4		man-sys-man		.man
 ./usr/share/man/man4/amiga/bppcsc.4		man-sys-man		.man
 ./usr/share/man/man4/amiga/console.4		man-sys-man		.man
+./usr/share/man/man4/amiga/clockport.4		man-sys-man		.man
 ./usr/share/man/man4/amiga/cv3dpb.4		man-sys-man		.man
 ./usr/share/man/man4/amiga/ed.4			man-sys-man		.man
 ./usr/share/man/man4/amiga/efa.4		man-sys-man		.man



CVS commit: src/share/man/man4/man4.amiga

2012-04-17 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Apr 17 10:16:37 UTC 2012

Modified Files:
src/share/man/man4/man4.amiga: a1k2cp.4

Log Message:
Remove trailing whitespace. New sentence, new line.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/share/man/man4/man4.amiga/a1k2cp.4

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

Modified files:

Index: src/share/man/man4/man4.amiga/a1k2cp.4
diff -u src/share/man/man4/man4.amiga/a1k2cp.4:1.1 src/share/man/man4/man4.amiga/a1k2cp.4:1.2
--- src/share/man/man4/man4.amiga/a1k2cp.4:1.1	Tue Apr 17 10:12:35 2012
+++ src/share/man/man4/man4.amiga/a1k2cp.4	Tue Apr 17 10:16:37 2012
@@ -1,4 +1,4 @@
-.\ $NetBSD: a1k2cp.4,v 1.1 2012/04/17 10:12:35 rkujawa Exp $
+.\ $NetBSD: a1k2cp.4,v 1.2 2012/04/17 10:16:37 wiz Exp $
 .\
 .\ Copyright (c) 2012 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -31,7 +31,7 @@
 .Dt A1K2CP 4 amiga
 .Os
 .Sh NAME
-.Nm a1k2cp 
+.Nm a1k2cp
 .Nd Amiga 1200 on-board clockport driver
 .Sh SYNOPSIS
 .Cd a1k2cp0 at mainbus0
@@ -66,8 +66,8 @@ Even if connected to clockport header, R
 supported by the
 .Xr a2kbbc
 and
-.Xr a34kbbc 
+.Xr a34kbbc
 drivers.
 .Pp
-Only one clockport is supported, even if clockport expander is present. This is
-a driver limitation.
+Only one clockport is supported, even if clockport expander is present.
+This is a driver limitation.



CVS commit: src/share/man/man4/man4.amiga

2012-04-17 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Apr 17 10:16:57 UTC 2012

Modified Files:
src/share/man/man4/man4.amiga: clockport.4

Log Message:
Remove trailing whitespace and empty line. Fix table.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/share/man/man4/man4.amiga/clockport.4

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

Modified files:

Index: src/share/man/man4/man4.amiga/clockport.4
diff -u src/share/man/man4/man4.amiga/clockport.4:1.1 src/share/man/man4/man4.amiga/clockport.4:1.2
--- src/share/man/man4/man4.amiga/clockport.4:1.1	Tue Apr 17 10:12:35 2012
+++ src/share/man/man4/man4.amiga/clockport.4	Tue Apr 17 10:16:57 2012
@@ -1,4 +1,4 @@
-.\ $NetBSD: clockport.4,v 1.1 2012/04/17 10:12:35 rkujawa Exp $
+.\ $NetBSD: clockport.4,v 1.2 2012/04/17 10:16:57 wiz Exp $
 .\
 .\ Copyright (c) 2012 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -31,21 +31,19 @@
 .Dt CLOCKPORT 4 amiga
 .Os
 .Sh NAME
-.Nm clockport 
-.Nd introduction to clockport bus support and drivers 
+.Nm clockport
+.Nd introduction to clockport bus support and drivers
 .Sh SYNOPSIS
 .Cd clockport* at a1k2cp0
 .Sh DESCRIPTION
-Clockport is a general purpose non-autoconfiguring expansion bus, originally 
-present on the Amiga 1200, as a part of P9 memory connector. 
-.Sh SUPPORTED DEVICES 
+Clockport is a general purpose non-autoconfiguring expansion bus, originally
+present on the Amiga 1200, as a part of P9 memory connector.
+.Sh SUPPORTED DEVICES
 The
 .Nx
-includes following clockport drivers:
-
+includes the following clockport drivers:
 .Bl -tag -offset indent
-.It 
-.Xr com 4
+.It Xr com 4
 Individual Computers SilverSurfer 16C550-based serial port.
 .El
 .Sh SEE ALSO



CVS commit: src/share/man/man4

2012-04-17 Thread Radoslaw Kujawa
Module Name:src
Committed By:   rkujawa
Date:   Tue Apr 17 10:55:41 UTC 2012

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

Log Message:
Note that com(4) is now also supported on top of clockport(4).


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/share/man/man4/com.4

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

Modified files:

Index: src/share/man/man4/com.4
diff -u src/share/man/man4/com.4:1.18 src/share/man/man4/com.4:1.19
--- src/share/man/man4/com.4:1.18	Tue Jun  7 20:22:56 2011
+++ src/share/man/man4/com.4	Tue Apr 17 10:55:41 2012
@@ -1,4 +1,4 @@
-.\	$NetBSD: com.4,v 1.18 2011/06/07 20:22:56 wiz Exp $
+.\	$NetBSD: com.4,v 1.19 2012/04/17 10:55:41 rkujawa Exp $
 .\
 .\ Copyright (c) 1990, 1991 The Regents of the University of California.
 .\ All rights reserved.
@@ -57,6 +57,8 @@
 .Cd options PPS_SYNC
 .Cd options PPS_TRAILING_EDGE
 .Cd options RND_COM
+.Ss Amiga
+.Cd com* at clockport?
 .Ss Arm32
 .Cd com0 at mainbus? base 0x00210fe0
 .Cd com1 at mainbus? base 0x00210be0



CVS commit: src/share/man/man4

2012-04-17 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Apr 17 11:00:43 UTC 2012

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

Log Message:
Bump date for previous.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/share/man/man4/com.4

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

Modified files:

Index: src/share/man/man4/com.4
diff -u src/share/man/man4/com.4:1.19 src/share/man/man4/com.4:1.20
--- src/share/man/man4/com.4:1.19	Tue Apr 17 10:55:41 2012
+++ src/share/man/man4/com.4	Tue Apr 17 11:00:43 2012
@@ -1,4 +1,4 @@
-.\	$NetBSD: com.4,v 1.19 2012/04/17 10:55:41 rkujawa Exp $
+.\	$NetBSD: com.4,v 1.20 2012/04/17 11:00:43 wiz Exp $
 .\
 .\ Copyright (c) 1990, 1991 The Regents of the University of California.
 .\ All rights reserved.
@@ -32,7 +32,7 @@
 .\
 .\ from: @(#)dca.4	5.2 (Berkeley) 3/27/91
 .\
-.Dd June 7, 2011
+.Dd April 17, 2012
 .Dt COM 4
 .Os
 .Sh NAME



CVS commit: src/sys/dev/rasops

2012-04-17 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Tue Apr 17 12:06:25 UTC 2012

Modified Files:
src/sys/dev/rasops: rasops15.c

Log Message:
fix what has to be a thinko - I doubt there's much hardware out there that
uses BGR in 15/16 bit colour


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/dev/rasops/rasops15.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/rasops/rasops15.c
diff -u src/sys/dev/rasops/rasops15.c:1.19 src/sys/dev/rasops/rasops15.c:1.20
--- src/sys/dev/rasops/rasops15.c:1.19	Tue May  4 04:57:34 2010
+++ src/sys/dev/rasops/rasops15.c	Tue Apr 17 12:06:25 2012
@@ -1,4 +1,4 @@
-/* 	$NetBSD: rasops15.c,v 1.19 2010/05/04 04:57:34 macallan Exp $	*/
+/* 	$NetBSD: rasops15.c,v 1.20 2012/04/17 12:06:25 macallan Exp $	*/
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rasops15.c,v 1.19 2010/05/04 04:57:34 macallan Exp $);
+__KERNEL_RCSID(0, $NetBSD: rasops15.c,v 1.20 2012/04/17 12:06:25 macallan Exp $);
 
 #include opt_rasops.h
 
@@ -99,11 +99,11 @@ rasops15_init(struct rasops_info *ri)
 
 	if (ri-ri_rnum == 0) {
 		ri-ri_rnum = 5;
-		ri-ri_rpos = 0;
+		ri-ri_rpos = 10 + (ri-ri_depth == 16);
 		ri-ri_gnum = 5 + (ri-ri_depth == 16);
 		ri-ri_gpos = 5;
 		ri-ri_bnum = 5;
-		ri-ri_bpos = 10 + (ri-ri_depth == 16);
+		ri-ri_bpos = 0;
 	}
 }
 



CVS commit: src/usr.sbin/cpuctl/arch

2012-04-17 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Tue Apr 17 13:00:10 UTC 2012

Modified Files:
src/usr.sbin/cpuctl/arch: i386.c

Log Message:
print cpu family for AMD CPU families 0x12 - 0x15


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/usr.sbin/cpuctl/arch/i386.c

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

Modified files:

Index: src/usr.sbin/cpuctl/arch/i386.c
diff -u src/usr.sbin/cpuctl/arch/i386.c:1.30 src/usr.sbin/cpuctl/arch/i386.c:1.31
--- src/usr.sbin/cpuctl/arch/i386.c:1.30	Thu Apr  5 11:05:53 2012
+++ src/usr.sbin/cpuctl/arch/i386.c	Tue Apr 17 13:00:09 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: i386.c,v 1.30 2012/04/05 11:05:53 cegger Exp $	*/
+/*	$NetBSD: i386.c,v 1.31 2012/04/17 13:00:09 cegger Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -57,7 +57,7 @@
 
 #include sys/cdefs.h
 #ifndef lint
-__RCSID($NetBSD: i386.c,v 1.30 2012/04/05 11:05:53 cegger Exp $);
+__RCSID($NetBSD: i386.c,v 1.31 2012/04/17 13:00:09 cegger Exp $);
 #endif /* not lint */
 
 #include sys/types.h
@@ -959,24 +959,22 @@ amd_amd64_name(struct cpu_info *ci)
 		}
 		break;
 	case 0x01:
-		switch (model) {
-			case 0x02:
-ret = Family 10h;
-break;
-			default:
-ret = Unknown AMD64 CPU;
-break;
-		}
+		ret = Family 10h;
 		break;
 	case 0x02:
-		switch (model) {
-			case 0x03:
-ret = Family 11h;
-break;
-			default:
-ret = Unknown AMD64 CPU;
-break;
-		}
+		ret = Family 11h;
+		break;
+	case 0x03:
+		ret = Family 12h;
+		break;
+	case 0x05:
+		ret = Family 14h;
+		break;
+	case 0x06:
+		ret = Family 15h;
+		break;
+	default:
+		ret = Unknown AMD64 CPU;
 		break;
 	}
 



CVS commit: src/distrib/notes/common

2012-04-17 Thread Pierre Pronchery
Module Name:src
Committed By:   khorben
Date:   Tue Apr 17 14:11:59 UTC 2012

Modified Files:
src/distrib/notes/common: main

Log Message:
Added myself to the list of NetBSD Developers


To generate a diff of this commit:
cvs rdiff -u -r1.486 -r1.487 src/distrib/notes/common/main

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

Modified files:

Index: src/distrib/notes/common/main
diff -u src/distrib/notes/common/main:1.486 src/distrib/notes/common/main:1.487
--- src/distrib/notes/common/main:1.486	Thu Apr 12 15:39:09 2012
+++ src/distrib/notes/common/main	Tue Apr 17 14:11:59 2012
@@ -1,4 +1,4 @@
-.\	$NetBSD: main,v 1.486 2012/04/12 15:39:09 ttoth Exp $
+.\	$NetBSD: main,v 1.487 2012/04/17 14:11:59 khorben Exp $
 .\
 .\ Copyright (c) 1999-2008 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -1290,6 +1290,7 @@ If you're one of them, and would like to
 .It Ta Matthias Pfaller Ta Mt matth...@netbsd.org
 .It Ta Chris Pinnock Ta Mt c...@netbsd.org
 .It Ta Adrian Portelli Ta Mt adri...@netbsd.org
+.It Ta Pierre Pronchery Ta Mt khor...@netbsd.org
 .It Ta Chris Provenzano Ta Mt pro...@netbsd.org
 .It Ta Mindaugas Rasiukevicius Ta Mt rm...@netbsd.org
 .It Ta Michael Rauch Ta Mt mra...@netbsd.org



CVS commit: src/doc

2012-04-17 Thread Radoslaw Kujawa
Module Name:src
Committed By:   rkujawa
Date:   Tue Apr 17 15:30:36 UTC 2012

Modified Files:
src/doc: CHANGES

Log Message:
Note clockport(4) and a1k2cp(4).


To generate a diff of this commit:
cvs rdiff -u -r1.1695 -r1.1696 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.1695 src/doc/CHANGES:1.1696
--- src/doc/CHANGES:1.1695	Sat Apr  7 05:43:33 2012
+++ src/doc/CHANGES	Tue Apr 17 15:30:35 2012
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1695 $
+# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1696 $
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -49,3 +49,5 @@ Changes from NetBSD 6.0 to NetBSD 7.0:
 		[christos 20120306]
 	pdisk(8): Make it work for 64 bit hosts, and make it MI.
 		[christos 20120306]
+	amiga: Add clockport(4) layer and a driver for A1200 on-board clockport
+		a1k2cp(4). [rkujawa 20120417]



CVS commit: src/distrib/notes/amiga

2012-04-17 Thread Radoslaw Kujawa
Module Name:src
Committed By:   rkujawa
Date:   Tue Apr 17 15:34:51 UTC 2012

Modified Files:
src/distrib/notes/amiga: hardware

Log Message:
Note clockport support and SilverSurfer driver.


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/distrib/notes/amiga/hardware

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

Modified files:

Index: src/distrib/notes/amiga/hardware
diff -u src/distrib/notes/amiga/hardware:1.49 src/distrib/notes/amiga/hardware:1.50
--- src/distrib/notes/amiga/hardware:1.49	Thu Oct 27 22:30:11 2011
+++ src/distrib/notes/amiga/hardware	Tue Apr 17 15:34:51 2012
@@ -1,4 +1,4 @@
-.\	$NetBSD: hardware,v 1.49 2011/10/27 22:30:11 rkujawa Exp $
+.\	$NetBSD: hardware,v 1.50 2012/04/17 15:34:51 rkujawa Exp $
 .
 .Nx \*V
 runs on any Amiga that has a 68020 or better CPU with
@@ -69,6 +69,10 @@ Prometheus PCI bridge
 Phase5 PCI bridge: CyberVision PPC, BlizzardVision PPC
 .bullet)
 .It
+Clockports
+.(bullet -compact
+Amiga 1200 on-board clockport
+.It
 Video controllers
 .(bullet -compact
 ECS, AGA and A2024 built in on various Amigas
@@ -157,6 +161,8 @@ Amiga parallel port
 .It
 Amiga serial port
 .It
+SilverSurfer clockport-based serial port
+.It
 Amiga mouse
 .It
 DraCo serial port, including serial mouse



CVS commit: src/sys

2012-04-17 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Apr 17 19:15:16 UTC 2012

Modified Files:
src/sys/kern: vfs_syscalls.c
src/sys/ufs/chfs: chfs_vnops.c
src/sys/ufs/ext2fs: ext2fs_readwrite.c
src/sys/ufs/ufs: ufs_readwrite.c

Log Message:
don't error out when chowning/chgrping or writing to a setuid/setgid file
without being the setuid user or group. Just turn off the bit like we did
before.


To generate a diff of this commit:
cvs rdiff -u -r1.450 -r1.451 src/sys/kern/vfs_syscalls.c
cvs rdiff -u -r1.4 -r1.5 src/sys/ufs/chfs/chfs_vnops.c
cvs rdiff -u -r1.59 -r1.60 src/sys/ufs/ext2fs/ext2fs_readwrite.c
cvs rdiff -u -r1.102 -r1.103 src/sys/ufs/ufs/ufs_readwrite.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/vfs_syscalls.c
diff -u src/sys/kern/vfs_syscalls.c:1.450 src/sys/kern/vfs_syscalls.c:1.451
--- src/sys/kern/vfs_syscalls.c:1.450	Tue Mar 13 14:40:56 2012
+++ src/sys/kern/vfs_syscalls.c	Tue Apr 17 15:15:15 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_syscalls.c,v 1.450 2012/03/13 18:40:56 elad Exp $	*/
+/*	$NetBSD: vfs_syscalls.c,v 1.451 2012/04/17 19:15:15 christos Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: vfs_syscalls.c,v 1.450 2012/03/13 18:40:56 elad Exp $);
+__KERNEL_RCSID(0, $NetBSD: vfs_syscalls.c,v 1.451 2012/04/17 19:15:15 christos Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_fileassoc.h
@@ -3360,15 +3360,13 @@ change_owner(struct vnode *vp, uid_t uid
 		 * group-id settings intact in that case.
 		 */
 		if (vattr.va_mode  S_ISUID) {
-			error = kauth_authorize_vnode(l-l_cred,
-			KAUTH_VNODE_RETAIN_SUID, vp, NULL, EPERM);
-			if (error)
+			if (kauth_authorize_vnode(l-l_cred,
+			KAUTH_VNODE_RETAIN_SUID, vp, NULL, EPERM) != 0)
 newmode = ~S_ISUID;
 		}
 		if (vattr.va_mode  S_ISGID) {
-			error = kauth_authorize_vnode(l-l_cred,
-			KAUTH_VNODE_RETAIN_SGID, vp, NULL, EPERM);
-			if (error)
+			if (kauth_authorize_vnode(l-l_cred,
+			KAUTH_VNODE_RETAIN_SGID, vp, NULL, EPERM) != 0)
 newmode = ~S_ISGID;
 		}
 	} else {

Index: src/sys/ufs/chfs/chfs_vnops.c
diff -u src/sys/ufs/chfs/chfs_vnops.c:1.4 src/sys/ufs/chfs/chfs_vnops.c:1.5
--- src/sys/ufs/chfs/chfs_vnops.c:1.4	Thu Apr 12 11:31:01 2012
+++ src/sys/ufs/chfs/chfs_vnops.c	Tue Apr 17 15:15:16 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: chfs_vnops.c,v 1.4 2012/04/12 15:31:01 ttoth Exp $	*/
+/*	$NetBSD: chfs_vnops.c,v 1.5 2012/04/17 19:15:16 christos Exp $	*/
 
 /*-
  * Copyright (c) 2010 Department of Software Engineering,
@@ -969,16 +969,14 @@ out:
 	ip-iflag |= IN_CHANGE | IN_UPDATE;
 	if (resid  uio-uio_resid  ap-a_cred) {
 		if (ip-mode  ISUID) {
-			error = kauth_authorize_vnode(ap-a_cred, KAUTH_VNODE_RETAIN_SUID, vp,
-			NULL, EPERM);
-			if (error)
+			if (kauth_authorize_vnode(ap-a_cred,
+			KAUTH_VNODE_RETAIN_SUID, vp, NULL, EPERM) != 0)
 ip-mode = ~ISUID;
 		}
 
 		if (ip-mode  ISGID) {
-			error = kauth_authorize_vnode(ap-a_cred, KAUTH_VNODE_RETAIN_SGID, vp,
-			NULL, EPERM);
-			if (error)
+			if (kauth_authorize_vnode(ap-a_cred,
+			KAUTH_VNODE_RETAIN_SGID, vp, NULL, EPERM) != 0)
 ip-mode = ~ISGID;
 		}
 	}

Index: src/sys/ufs/ext2fs/ext2fs_readwrite.c
diff -u src/sys/ufs/ext2fs/ext2fs_readwrite.c:1.59 src/sys/ufs/ext2fs/ext2fs_readwrite.c:1.60
--- src/sys/ufs/ext2fs/ext2fs_readwrite.c:1.59	Tue Mar 13 14:41:03 2012
+++ src/sys/ufs/ext2fs/ext2fs_readwrite.c	Tue Apr 17 15:15:16 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: ext2fs_readwrite.c,v 1.59 2012/03/13 18:41:03 elad Exp $	*/
+/*	$NetBSD: ext2fs_readwrite.c,v 1.60 2012/04/17 19:15:16 christos Exp $	*/
 
 /*-
  * Copyright (c) 1993
@@ -60,7 +60,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ext2fs_readwrite.c,v 1.59 2012/03/13 18:41:03 elad Exp $);
+__KERNEL_RCSID(0, $NetBSD: ext2fs_readwrite.c,v 1.60 2012/04/17 19:15:16 christos Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -378,16 +378,14 @@ out:
 		ip-i_flag |= IN_ACCESS;
 	if (resid  uio-uio_resid  ap-a_cred) {
 		if (ip-i_e2fs_mode  ISUID) {
-			error = kauth_authorize_vnode(ap-a_cred, KAUTH_VNODE_RETAIN_SUID, vp,
-			NULL, EPERM);
-			if (error)
+			if (kauth_authorize_vnode(ap-a_cred,
+			KAUTH_VNODE_RETAIN_SUID, vp, NULL, EPERM) != 0)
 ip-i_e2fs_mode = ISUID;
 		}
 
 		if (ip-i_e2fs_mode  ISGID) {
-			error = kauth_authorize_vnode(ap-a_cred, KAUTH_VNODE_RETAIN_SGID, vp,
-			NULL, EPERM);
-			if (error)
+			if (kauth_authorize_vnode(ap-a_cred,
+			KAUTH_VNODE_RETAIN_SGID, vp, NULL, EPERM) != 0)
 ip-i_e2fs_mode = ~ISGID;
 		}
 	}

Index: src/sys/ufs/ufs/ufs_readwrite.c
diff -u src/sys/ufs/ufs/ufs_readwrite.c:1.102 src/sys/ufs/ufs/ufs_readwrite.c:1.103
--- src/sys/ufs/ufs/ufs_readwrite.c:1.102	Tue Mar 13 14:41:14 2012
+++ src/sys/ufs/ufs/ufs_readwrite.c	Tue Apr 17 15:15:16 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: 

CVS commit: [jmcneill-usbmp] src/sys/external/bsd/ipf/netinet

2012-04-17 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Tue Apr 17 19:25:23 UTC 2012

Added Files:
src/sys/external/bsd/ipf/netinet [jmcneill-usbmp]: fil.c ip_auth.c
ip_auth.h ip_compat.h ip_dns_pxy.c ip_dstlist.c ip_dstlist.h
ip_fil.h ip_fil_compat.c ip_fil_netbsd.c ip_frag.c ip_frag.h
ip_ftp_pxy.c ip_h323_pxy.c ip_htable.c ip_htable.h ip_ipsec_pxy.c
ip_irc_pxy.c ip_log.c ip_lookup.c ip_lookup.h ip_nat.c ip_nat.h
ip_nat6.c ip_netbios_pxy.c ip_pool.c ip_pool.h ip_pptp_pxy.c
ip_proxy.c ip_proxy.h ip_raudio_pxy.c ip_rcmd_pxy.c ip_rpcb_pxy.c
ip_scan.c ip_scan.h ip_state.c ip_state.h ip_sync.c ip_sync.h
ip_tftp_pxy.c ipf_rb.h ipl.h radix_ipf.c radix_ipf.h

Log Message:
Re-add new ipf on the jmcneill-usbmp branch.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.2.2.2 src/sys/external/bsd/ipf/netinet/fil.c \
src/sys/external/bsd/ipf/netinet/ip_auth.c \
src/sys/external/bsd/ipf/netinet/ip_auth.h \
src/sys/external/bsd/ipf/netinet/ip_compat.h \
src/sys/external/bsd/ipf/netinet/ip_dns_pxy.c \
src/sys/external/bsd/ipf/netinet/ip_dstlist.c \
src/sys/external/bsd/ipf/netinet/ip_dstlist.h \
src/sys/external/bsd/ipf/netinet/ip_fil.h \
src/sys/external/bsd/ipf/netinet/ip_fil_compat.c \
src/sys/external/bsd/ipf/netinet/ip_fil_netbsd.c \
src/sys/external/bsd/ipf/netinet/ip_frag.c \
src/sys/external/bsd/ipf/netinet/ip_frag.h \
src/sys/external/bsd/ipf/netinet/ip_ftp_pxy.c \
src/sys/external/bsd/ipf/netinet/ip_htable.c \
src/sys/external/bsd/ipf/netinet/ip_htable.h \
src/sys/external/bsd/ipf/netinet/ip_ipsec_pxy.c \
src/sys/external/bsd/ipf/netinet/ip_irc_pxy.c \
src/sys/external/bsd/ipf/netinet/ip_log.c \
src/sys/external/bsd/ipf/netinet/ip_lookup.c \
src/sys/external/bsd/ipf/netinet/ip_lookup.h \
src/sys/external/bsd/ipf/netinet/ip_nat.c \
src/sys/external/bsd/ipf/netinet/ip_nat.h \
src/sys/external/bsd/ipf/netinet/ip_nat6.c \
src/sys/external/bsd/ipf/netinet/ip_netbios_pxy.c \
src/sys/external/bsd/ipf/netinet/ip_pool.c \
src/sys/external/bsd/ipf/netinet/ip_pool.h \
src/sys/external/bsd/ipf/netinet/ip_pptp_pxy.c \
src/sys/external/bsd/ipf/netinet/ip_proxy.c \
src/sys/external/bsd/ipf/netinet/ip_proxy.h \
src/sys/external/bsd/ipf/netinet/ip_raudio_pxy.c \
src/sys/external/bsd/ipf/netinet/ip_rcmd_pxy.c \
src/sys/external/bsd/ipf/netinet/ip_rpcb_pxy.c \
src/sys/external/bsd/ipf/netinet/ip_scan.c \
src/sys/external/bsd/ipf/netinet/ip_scan.h \
src/sys/external/bsd/ipf/netinet/ip_state.c \
src/sys/external/bsd/ipf/netinet/ip_state.h \
src/sys/external/bsd/ipf/netinet/ip_sync.c \
src/sys/external/bsd/ipf/netinet/ip_sync.h \
src/sys/external/bsd/ipf/netinet/ip_tftp_pxy.c \
src/sys/external/bsd/ipf/netinet/ipf_rb.h \
src/sys/external/bsd/ipf/netinet/ipl.h \
src/sys/external/bsd/ipf/netinet/radix_ipf.c \
src/sys/external/bsd/ipf/netinet/radix_ipf.h
cvs rdiff -u -r0 -r1.1.2.2 src/sys/external/bsd/ipf/netinet/ip_h323_pxy.c

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

diffs are larger than 1MB and have been omitted


CVS commit: src/tests/modules/k_helper3

2012-04-17 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Apr 17 21:39:19 UTC 2012

Modified Files:
src/tests/modules/k_helper3: k_helper3.c

Log Message:
While we need an absolute path when loading a module (including the .kmod
extension), we want the shortname w/o extension for the unload.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/modules/k_helper3/k_helper3.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/modules/k_helper3/k_helper3.c
diff -u src/tests/modules/k_helper3/k_helper3.c:1.2 src/tests/modules/k_helper3/k_helper3.c:1.3
--- src/tests/modules/k_helper3/k_helper3.c:1.2	Tue Apr 17 05:18:54 2012
+++ src/tests/modules/k_helper3/k_helper3.c	Tue Apr 17 21:39:19 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: k_helper3.c,v 1.2 2012/04/17 05:18:54 jruoho Exp $ */
+/*	$NetBSD: k_helper3.c,v 1.3 2012/04/17 21:39:19 martin Exp $ */
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include sys/cdefs.h
-__RCSID($NetBSD: k_helper3.c,v 1.2 2012/04/17 05:18:54 jruoho Exp $);
+__RCSID($NetBSD: k_helper3.c,v 1.3 2012/04/17 21:39:19 martin Exp $);
 
 #include sys/module.h
 
@@ -58,7 +58,7 @@ main(int argc, char *argv[])
 static __printflike(1, 2) int
 load(const char *fmt, ...)
 {
-	char filename[MAXPATHLEN], *propsstr;
+	char filename[MAXPATHLEN], *propsstr, *shortname, *dot;
 	prop_dictionary_t props;
 	modctl_load_t ml;
 	int serrno, rv;
@@ -86,7 +86,15 @@ load(const char *fmt, ...)
 	if (rv != 0)
 		serrno = errno;
 
-	(void)modctl(MODCTL_UNLOAD, filename);
+	shortname = strrchr(filename, '/');
+	if (shortname != NULL)
+		shortname++;
+	else
+		shortname = filename;
+	dot = strrchr(shortname, '.');
+	if (dot)
+		*dot = 0;
+	(void)modctl(MODCTL_UNLOAD, shortname);
 
 	free(propsstr);
 



CVS commit: src/sys/fs/puffs

2012-04-17 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Wed Apr 18 00:42:50 UTC 2012

Modified Files:
src/sys/fs/puffs: puffs_vnops.c

Log Message:
- Makesure update_va does not change vnode size when it should not. For
instance when doing a fault-issued VOP_GETPAGES within VOP_WRITE, changing
size leads to panic: genfs_getpages: past eof.
-Handle ticks wrap around for vnode name andattribute timeout


To generate a diff of this commit:
cvs rdiff -u -r1.165 -r1.166 src/sys/fs/puffs/puffs_vnops.c

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

Modified files:

Index: src/sys/fs/puffs/puffs_vnops.c
diff -u src/sys/fs/puffs/puffs_vnops.c:1.165 src/sys/fs/puffs/puffs_vnops.c:1.166
--- src/sys/fs/puffs/puffs_vnops.c:1.165	Sun Apr  8 15:04:41 2012
+++ src/sys/fs/puffs/puffs_vnops.c	Wed Apr 18 00:42:50 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: puffs_vnops.c,v 1.165 2012/04/08 15:04:41 manu Exp $	*/
+/*	$NetBSD: puffs_vnops.c,v 1.166 2012/04/18 00:42:50 manu Exp $	*/
 
 /*
  * Copyright (c) 2005, 2006, 2007  Antti Kantee.  All Rights Reserved.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: puffs_vnops.c,v 1.165 2012/04/08 15:04:41 manu Exp $);
+__KERNEL_RCSID(0, $NetBSD: puffs_vnops.c,v 1.166 2012/04/18 00:42:50 manu Exp $);
 
 #include sys/param.h
 #include sys/buf.h
@@ -299,6 +299,11 @@ const struct vnodeopv_entry_desc puffs_m
 const struct vnodeopv_desc puffs_msgop_opv_desc =
 	{ puffs_msgop_p, puffs_msgop_entries };
 
+/*
+ * for dosetattr / update_va 
+ */
+#define SETATTR_CHSIZE	0x01
+#define SETATTR_ASYNC	0x02
 
 #define ERROUT(err)			\
 do {	\
@@ -412,7 +417,7 @@ static void callinactive(struct puffs_mo
 static void callreclaim(struct puffs_mount *, puffs_cookie_t);
 static int  flushvncache(struct vnode *, off_t, off_t, bool);
 static void update_va(struct vnode *, struct vattr *, struct vattr *,
-		  struct timespec *, struct timespec *);
+		  struct timespec *, struct timespec *, int);
 
 
 #define PUFFS_ABORT_LOOKUP	1
@@ -460,6 +465,10 @@ puffs_abortbutton(struct puffs_mount *pm
 
 #define TTL_TO_TIMEOUT(ts) \
 (hardclock_ticks + (ts-tv_sec * hz) + (ts-tv_nsec * hz / 10))
+#define TTL_VALID(ts) \
+((ts != NULL)  !((ts-tv_sec == 0)  (ts-tv_nsec == 0)))
+#define TIMED_OUT(expire) \
+((int)((unsigned int)hardclock_ticks - (unsigned int)expire)  0)
 int
 puffs_vnop_lookup(void *v)
 {
@@ -505,7 +514,7 @@ puffs_vnop_lookup(void *v)
 
 			cvp = *ap-a_vpp;
 			cpn = VPTOPP(cvp);
-			if (hardclock_ticks  cpn-pn_cn_timeout) {
+			if (TIMED_OUT(cpn-pn_cn_timeout)) {
 cache_purge1(cvp, NULL, PURGE_CHILDREN);
 
 /*
@@ -636,7 +645,8 @@ puffs_vnop_lookup(void *v)
 	if (PUFFS_USE_FS_TTL(pmp)) {
 		struct timespec *va_ttl = lookup_msg-pvnr_va_ttl;
 		struct timespec *cn_ttl = lookup_msg-pvnr_cn_ttl;
-		update_va(vp, NULL, lookup_msg-pvnr_va, va_ttl, cn_ttl);
+		update_va(vp, NULL, lookup_msg-pvnr_va, 
+			  va_ttl, cn_ttl, SETATTR_CHSIZE);
 	}
 
 	*ap-a_vpp = vp;
@@ -737,7 +747,8 @@ puffs_vnop_create(void *v)
 		struct timespec *cn_ttl = create_msg-pvnr_cn_ttl;
 		struct vattr *rvap = create_msg-pvnr_va;
 
-		update_va(*ap-a_vpp, NULL, rvap, va_ttl, cn_ttl);
+		update_va(*ap-a_vpp, NULL, rvap, 
+			  va_ttl, cn_ttl, SETATTR_CHSIZE);
 	}
 
  out:
@@ -793,7 +804,8 @@ puffs_vnop_mknod(void *v)
 		struct timespec *cn_ttl = mknod_msg-pvnr_cn_ttl;
 		struct vattr *rvap = mknod_msg-pvnr_va;
 
-		update_va(*ap-a_vpp, NULL, rvap, va_ttl, cn_ttl);
+		update_va(*ap-a_vpp, NULL, rvap, 
+			   va_ttl, cn_ttl, SETATTR_CHSIZE);
 	}
 
  out:
@@ -912,11 +924,11 @@ puffs_vnop_access(void *v)
 
 static void
 update_va(struct vnode *vp, struct vattr *vap, struct vattr *rvap,
-	  struct timespec *va_ttl, struct timespec *cn_ttl)
+	  struct timespec *va_ttl, struct timespec *cn_ttl, int flags)
 {
 	struct puffs_node *pn = VPTOPP(vp);
 
-	if (cn_ttl != NULL)
+	if (TTL_VALID(cn_ttl))
 		pn-pn_cn_timeout = TTL_TO_TIMEOUT(cn_ttl);
 
 	/*
@@ -946,7 +958,7 @@ update_va(struct vnode *vp, struct vattr
 			vap-va_size = pn-pn_mc_size;
 	}
 
-	if (!(pn-pn_stat  PNODE_METACACHE_SIZE)) {
+	if (!(pn-pn_stat  PNODE_METACACHE_SIZE)  (flags  SETATTR_CHSIZE)) {
 		if (rvap-va_size != VNOVAL
 		 vp-v_type != VBLK  vp-v_type != VCHR) {
 			uvm_vnp_setsize(vp, rvap-va_size);
@@ -954,7 +966,7 @@ update_va(struct vnode *vp, struct vattr
 		}
 	}
 
-	if (va_ttl != NULL) {
+	if ((va_ttl != NULL)  TTL_VALID(va_ttl)) {
 		if (pn-pn_va_cache == NULL)
 			pn-pn_va_cache = pool_get(puffs_vapool, PR_WAITOK);
 
@@ -1001,8 +1013,9 @@ puffs_vnop_getattr(void *v)
 	vap = ap-a_vap;
 
 	if (PUFFS_USE_FS_TTL(pmp)) {
-		if (hardclock_ticks  pn-pn_va_timeout) {
-			update_va(vp, vap, pn-pn_va_cache, NULL, NULL);
+		if (!TIMED_OUT(pn-pn_va_timeout)) {
+			update_va(vp, vap, pn-pn_va_cache, 
+  NULL, NULL, SETATTR_CHSIZE);
 			goto out2;
 		}
 	}
@@ -1023,7 +1036,7 @@ puffs_vnop_getattr(void *v)
 	if (PUFFS_USE_FS_TTL(pmp))
 		

CVS commit: src/lib

2012-04-17 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Wed Apr 18 00:57:22 UTC 2012

Modified Files:
src/lib/libperfuse: ops.c perfuse.c perfuse_priv.h subr.c
src/lib/libpuffs: dispatcher.c pnode.c puffs.3 puffs.h puffs_ops.3
puffs_priv.h

Log Message:
- When using PUFFS_KFLAG_CACHE_FS_TTL, do not use puffs_node to carry
  attribute and TTL fora newly created node. Instead extend puffs_newinfo
  and add puffs_newinfo_setva() and puffs_newinfo_setttl()
- Remove node_mk_common_final in libperfuse. It used to set uid/gid for
  a newly created vnode but has been made redundant along time ago since
  uid and gid are properly set in FUSE header.
- In libperfuse, check for corner case where opc = 0 on INACTIVE and   RECLAIM 
(how is it possible? Check for it to avoid a crash anyway)
- In libperfuse, make sure we unlimit RLIMIT_AS and RLIMIT_DATA so that
  we do notrun out of memory because the kernel is lazy at reclaiming vnodes.
- In libperfuse, cleanup style of perfuse_destroy_pn()


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/lib/libperfuse/ops.c
cvs rdiff -u -r1.27 -r1.28 src/lib/libperfuse/perfuse.c
cvs rdiff -u -r1.28 -r1.29 src/lib/libperfuse/perfuse_priv.h
cvs rdiff -u -r1.17 -r1.18 src/lib/libperfuse/subr.c
cvs rdiff -u -r1.39 -r1.40 src/lib/libpuffs/dispatcher.c
cvs rdiff -u -r1.11 -r1.12 src/lib/libpuffs/pnode.c
cvs rdiff -u -r1.51 -r1.52 src/lib/libpuffs/puffs.3
cvs rdiff -u -r1.120 -r1.121 src/lib/libpuffs/puffs.h
cvs rdiff -u -r1.29 -r1.30 src/lib/libpuffs/puffs_ops.3
cvs rdiff -u -r1.44 -r1.45 src/lib/libpuffs/puffs_priv.h

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

Modified files:

Index: src/lib/libperfuse/ops.c
diff -u src/lib/libperfuse/ops.c:1.53 src/lib/libperfuse/ops.c:1.54
--- src/lib/libperfuse/ops.c:1.53	Sun Apr  8 15:13:06 2012
+++ src/lib/libperfuse/ops.c	Wed Apr 18 00:57:21 2012
@@ -1,4 +1,4 @@
-/*  $NetBSD: ops.c,v 1.53 2012/04/08 15:13:06 manu Exp $ */
+/*  $NetBSD: ops.c,v 1.54 2012/04/18 00:57:21 manu Exp $ */
 
 /*-
  *  Copyright (c) 2010-2011 Emmanuel Dreyfus. All rights reserved.
@@ -34,7 +34,7 @@
 #include sysexits.h
 #include syslog.h
 #include puffs.h
-#include sys/socket.h
+#include sys/cdefs.h
 #include sys/socket.h
 #include sys/extattr.h
 #include sys/time.h
@@ -48,9 +48,12 @@ extern int perfuse_diagflags;
 #if 0
 static void print_node(const char *, puffs_cookie_t);
 #endif
+#ifdef PUFFS_KFLAG_CACHE_FS_TTL
+static void perfuse_newinfo_setttl(struct puffs_newinfo *, 
+struct fuse_entry_out *, struct fuse_attr_out *);
+#else /* PUFFS_KFLAG_CACHE_FS_TTL */
 static void set_expire(puffs_cookie_t, struct fuse_entry_out *, 
 struct fuse_attr_out *);
-#ifndef PUFFS_KFLAG_CACHE_FS_TTL
 static int attr_expired(puffs_cookie_t);
 static int entry_expired(puffs_cookie_t);
 #endif /* PUFFS_KFLAG_CACHE_FS_TTL */
@@ -63,11 +66,10 @@ static void fuse_attr_to_vap(struct perf
 static int node_lookup_dir_nodot(struct puffs_usermount *,
 puffs_cookie_t, char *, size_t, struct puffs_node **);
 static int node_lookup_common(struct puffs_usermount *, puffs_cookie_t, 
-const char *, const struct puffs_cred *, struct puffs_node **);
+struct puffs_newinfo *, const char *, const struct puffs_cred *, 
+struct puffs_node **);
 static int node_mk_common(struct puffs_usermount *, puffs_cookie_t,
 struct puffs_newinfo *, const struct puffs_cn *pcn, perfuse_msg_t *);
-static int node_mk_common_final(struct puffs_usermount *, puffs_cookie_t,
-struct puffs_node *, const struct puffs_cn *pcn);
 static uint64_t readdir_last_cookie(struct fuse_dirent *, size_t); 
 static ssize_t fuse_to_dirent(struct puffs_usermount *, puffs_cookie_t,
 struct fuse_dirent *, size_t);
@@ -336,12 +338,48 @@ fuse_attr_to_vap(struct perfuse_state *p
 	return;
 }
 
+#ifdef PUFFS_KFLAG_CACHE_FS_TTL
+static void perfuse_newinfo_setttl(struct puffs_newinfo *pni, 
+	struct fuse_entry_out *feo, struct fuse_attr_out *fao)
+{
+#ifdef PERFUSE_DEBUG
+	if ((feo == NULL)  (fao == NULL))
+		DERRX(EX_SOFTWARE, %s: feo and fao NULL, __func__);
+
+	if ((feo != NULL)  (fao != NULL))
+		DERRX(EX_SOFTWARE, %s: feo and fao != NULL, __func__);
+#endif /* PERFUSE_DEBUG */
+
+	if (fao != NULL) {
+		struct timespec va_ttl;
+
+		va_ttl.tv_sec = fao-attr_valid;
+		va_ttl.tv_nsec = fao-attr_valid_nsec;
+
+		puffs_newinfo_setvattl(pni, va_ttl);
+	}
+
+	if (feo != NULL) {
+		struct timespec va_ttl;
+		struct timespec cn_ttl;
+
+		va_ttl.tv_sec = feo-attr_valid;
+		va_ttl.tv_nsec = feo-attr_valid_nsec;
+		cn_ttl.tv_sec = feo-entry_valid;
+		cn_ttl.tv_nsec = feo-entry_valid_nsec;
+
+		puffs_newinfo_setvattl(pni, va_ttl);
+		puffs_newinfo_setcnttl(pni, cn_ttl);
+	}
+
+	return;	
+}
+#else /* PUFFS_KFLAG_CACHE_FS_TTL */
 static void 
 set_expire(puffs_cookie_t opc, struct fuse_entry_out *feo,
 	   struct fuse_attr_out *fao)
 {
  	struct puffs_node *pn = (struct puffs_node *)opc;
-#ifndef 

CVS commit: src/external/gpl3/gcc/lib

2012-04-17 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Apr 18 02:52:07 UTC 2012

Added Files:
src/external/gpl3/gcc/lib/libmudflap: Makefile config.h shlib_version
src/external/gpl3/gcc/lib/libmudflapth: Makefile shlib_version

Log Message:
add preliminary build glue for mudflap; only the shared libraries work,
the static ones will need us to add __real_foo aliases for a bunch of
functions in libc.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/external/gpl3/gcc/lib/libmudflap/Makefile \
src/external/gpl3/gcc/lib/libmudflap/config.h \
src/external/gpl3/gcc/lib/libmudflap/shlib_version
cvs rdiff -u -r0 -r1.1 src/external/gpl3/gcc/lib/libmudflapth/Makefile \
src/external/gpl3/gcc/lib/libmudflapth/shlib_version

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

Added files:

Index: src/external/gpl3/gcc/lib/libmudflap/Makefile
diff -u /dev/null src/external/gpl3/gcc/lib/libmudflap/Makefile:1.1
--- /dev/null	Tue Apr 17 22:52:07 2012
+++ src/external/gpl3/gcc/lib/libmudflap/Makefile	Tue Apr 17 22:52:07 2012
@@ -0,0 +1,19 @@
+#	$NetBSD: Makefile,v 1.1 2012/04/18 02:52:07 christos Exp $
+
+NOLINT=yes			# core dumps
+UNSUPPORTED_COMPILER.clang= # defined
+
+.include bsd.own.mk
+
+DIST=   ${NETBSDSRCDIR}/external/gpl3/gcc/dist/libmudflap
+CPPFLAGS+=	-I${.CURDIR}
+LINTFLAGS+=-g
+
+.PATH: ${DIST}
+
+LIB=mudflap
+SRCS=mf-runtime.c mf-heuristics.c mf-hooks1.c mf-hooks2.c
+INCS=mf-runtime.h
+INCSDIR=/usr/include
+
+.include bsd.lib.mk
Index: src/external/gpl3/gcc/lib/libmudflap/config.h
diff -u /dev/null src/external/gpl3/gcc/lib/libmudflap/config.h:1.1
--- /dev/null	Tue Apr 17 22:52:07 2012
+++ src/external/gpl3/gcc/lib/libmudflap/config.h	Tue Apr 17 22:52:07 2012
@@ -0,0 +1,288 @@
+/* config.h.  Generated from config.h.in by configure.  */
+/* config.h.in.  Generated from configure.ac by autoheader.  */
+
+/* Define to the name of the symbol used for the entry point. */
+#define ENTRY_POINT _start
+
+/* Define to 1 if you have the `addmntent' function. */
+/* #undef HAVE_ADDMNTENT */
+
+/* Define to 1 if you have the arpa/inet.h header file. */
+#define HAVE_ARPA_INET_H 1
+
+/* Define to 1 if you have the `backtrace' function. */
+/* #undef HAVE_BACKTRACE */
+
+/* Define to 1 if you have the `backtrace_symbols' function. */
+/* #undef HAVE_BACKTRACE_SYMBOLS */
+
+/* Define to 1 if the target assembler supports thread-local storage. */
+#define HAVE_CC_TLS 1
+
+/* Define to 1 if you have the ctype.h header file. */
+#define HAVE_CTYPE_H 1
+
+/* Define to 1 if you have the `cuserid' function. */
+/* #undef HAVE_CUSERID */
+
+/* Define to 1 if you have the dirent.h header file. */
+#define HAVE_DIRENT_H 1
+
+/* Define to 1 if you have the dlfcn.h header file. */
+#define HAVE_DLFCN_H 1
+
+/* Define to 1 if you have the `dlvsym' function. */
+#define HAVE_DLVSYM 1
+
+/* Define to 1 if you have the execinfo.h header file. */
+/* #undef HAVE_EXECINFO_H */
+
+/* Define to 1 if you have the `fopen64' function. */
+/* #undef HAVE_FOPEN64 */
+
+/* Define to 1 if you have the `freopen64' function. */
+/* #undef HAVE_FREOPEN64 */
+
+/* Define to 1 if you have the `fseeko64' function. */
+/* #undef HAVE_FSEEKO64 */
+
+/* Define to 1 if you have the `ftello64' function. */
+/* #undef HAVE_FTELLO64 */
+
+/* Define to 1 if you have the `gai_strerror' function. */
+#define HAVE_GAI_STRERROR 1
+
+/* Define to 1 if you have the `getaddrinfo' function. */
+#define HAVE_GETADDRINFO 1
+
+/* Define to 1 if you have the `getgrent' function. */
+#define HAVE_GETGRENT 1
+
+/* Define to 1 if you have the `getgrgid' function. */
+#define HAVE_GETGRGID 1
+
+/* Define to 1 if you have the `getgrgid_r' function. */
+#define HAVE_GETGRGID_R 1
+
+/* Define to 1 if you have the `getgrnam' function. */
+#define HAVE_GETGRNAM 1
+
+/* Define to 1 if you have the `getgrnam_r' function. */
+#define HAVE_GETGRNAM_R 1
+
+/* Define to 1 if you have the `getlogin' function. */
+#define HAVE_GETLOGIN 1
+
+/* Define to 1 if you have the `getlogin_r' function. */
+#define HAVE_GETLOGIN_R 1
+
+/* Define to 1 if you have the `getmntent' function. */
+/* #undef HAVE_GETMNTENT */
+
+/* Define to 1 if you have the `getprotobyname' function. */
+#define HAVE_GETPROTOBYNAME 1
+
+/* Define to 1 if you have the `getprotobynumber' function. */
+#define HAVE_GETPROTOBYNUMBER 1
+
+/* Define to 1 if you have the `getprotoent' function. */
+#define HAVE_GETPROTOENT 1
+
+/* Define to 1 if you have the `getpwent' function. */
+#define HAVE_GETPWENT 1
+
+/* Define to 1 if you have the `getpwnam' function. */
+#define HAVE_GETPWNAM 1
+
+/* Define to 1 if you have the `getpwnam_r' function. */
+#define HAVE_GETPWNAM_R 1
+
+/* Define to 1 if you have the `getpwuid' function. */
+#define HAVE_GETPWUID 1
+
+/* Define to 1 if you have the `getpwuid_r' function. */
+#define HAVE_GETPWUID_R 1
+
+/* Define to 1 if you have the `getservbyname' function. */

CVS commit: src/external/gpl3/gcc/dist/libmudflap

2012-04-17 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Apr 18 02:55:06 UTC 2012

Modified Files:
src/external/gpl3/gcc/dist/libmudflap: mf-hooks1.c mf-hooks2.c
mf-impl.h mf-runtime.c mf-runtime.h

Log Message:
NetBSD fixes:
1. thread_self() returns a pointer, not an unsigned integer
2. Add NetBSD to Apple and FreeBSD defines
3. Add _NETBSD_SOURCE where needed
4. Add an extra define BEGIN_PROTECTV for void functions to avoid return
   free(); where free is void.
5. Avoid weak symbol hacks to determine if we are threaded or not. We
   have a threaded copy of the library, why bother?
6. change __attribute - __attribute__ since the former is not covered by
   our cdefs.h


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/gpl3/gcc/dist/libmudflap/mf-hooks1.c \
src/external/gpl3/gcc/dist/libmudflap/mf-hooks2.c \
src/external/gpl3/gcc/dist/libmudflap/mf-impl.h \
src/external/gpl3/gcc/dist/libmudflap/mf-runtime.c \
src/external/gpl3/gcc/dist/libmudflap/mf-runtime.h

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

Modified files:

Index: src/external/gpl3/gcc/dist/libmudflap/mf-hooks1.c
diff -u src/external/gpl3/gcc/dist/libmudflap/mf-hooks1.c:1.1.1.1 src/external/gpl3/gcc/dist/libmudflap/mf-hooks1.c:1.2
--- src/external/gpl3/gcc/dist/libmudflap/mf-hooks1.c:1.1.1.1	Mon Jun 20 21:23:33 2011
+++ src/external/gpl3/gcc/dist/libmudflap/mf-hooks1.c	Tue Apr 17 22:55:05 2012
@@ -33,7 +33,7 @@ see the files COPYING3 and COPYING.RUNTI
 
 /* These attempt to coax various unix flavours to declare all our
needed tidbits in the system headers.  */
-#if !defined(__FreeBSD__)   !defined(__APPLE__)
+#if !defined(__FreeBSD__)   !defined(__APPLE__)  !defined(__NetBSD__)
 #define _POSIX_SOURCE
 #endif /* Some BSDs break sys/socket.h if this is defined. */
 #define _GNU_SOURCE
@@ -238,7 +238,7 @@ WRAPPER(void, free, void *buf)
   static int freeq_initialized = 0;
   DECLARE(void, free, void *);
 
-  BEGIN_PROTECT (free, buf);
+  BEGIN_PROTECTV (free, buf);
 
   if (UNLIKELY(buf == NULL))
 return;
Index: src/external/gpl3/gcc/dist/libmudflap/mf-hooks2.c
diff -u src/external/gpl3/gcc/dist/libmudflap/mf-hooks2.c:1.1.1.1 src/external/gpl3/gcc/dist/libmudflap/mf-hooks2.c:1.2
--- src/external/gpl3/gcc/dist/libmudflap/mf-hooks2.c:1.1.1.1	Mon Jun 20 21:23:31 2011
+++ src/external/gpl3/gcc/dist/libmudflap/mf-hooks2.c	Tue Apr 17 22:55:05 2012
@@ -32,9 +32,10 @@ see the files COPYING3 and COPYING.RUNTI
 
 /* These attempt to coax various unix flavours to declare all our
needed tidbits in the system headers.  */
-#if !defined(__FreeBSD__)  !defined(__APPLE__)
+#if !defined(__FreeBSD__)  !defined(__APPLE__)  !defined(__NetBSD__)
 #define _POSIX_SOURCE
 #endif /* Some BSDs break sys/socket.h if this is defined. */
+#define _NETBSD_SOURCE
 #define _GNU_SOURCE
 #define _XOPEN_SOURCE
 #define _BSD_TYPES
Index: src/external/gpl3/gcc/dist/libmudflap/mf-impl.h
diff -u src/external/gpl3/gcc/dist/libmudflap/mf-impl.h:1.1.1.1 src/external/gpl3/gcc/dist/libmudflap/mf-impl.h:1.2
--- src/external/gpl3/gcc/dist/libmudflap/mf-impl.h:1.1.1.1	Mon Jun 20 21:23:33 2011
+++ src/external/gpl3/gcc/dist/libmudflap/mf-impl.h	Tue Apr 17 22:55:05 2012
@@ -273,12 +273,12 @@ extern struct __mf_options __mf_opts;
 #ifdef LIBMUDFLAPTH
 #define VERBOSE_TRACE(...) \
   do { if (UNLIKELY (__mf_opts.verbose_trace)) {  \
-  fprintf (stderr, mf(%u): , (unsigned) pthread_self ()); \
+  fprintf (stderr, mf(%ju): , (intmax_t)(intptr_t) pthread_self ()); \
   fprintf (stderr, __VA_ARGS__); \
 } } while (0)
 #define TRACE(...) \
   do { if (UNLIKELY (__mf_opts.trace_mf_calls)) { \
-  fprintf (stderr, mf(%u): , (unsigned) pthread_self ()); \
+  fprintf (stderr, mf(%ju): , (intmax_t)(intptr_t) pthread_self ()); \
   fprintf (stderr, __VA_ARGS__); \
 } } while (0)
 #else
@@ -396,6 +396,29 @@ ret __mfwrap_ ## fname (__VA_ARGS__)
 TRACE (%s\n, __PRETTY_FUNCTION__); \
   }
 
+#define BEGIN_PROTECTV(fname, ...)   \
+  if (UNLIKELY (__mf_starting_p)) \
+  { \
+CALL_BACKUP(fname, __VA_ARGS__); \
+return;\
+  } \
+  else if (UNLIKELY (__mf_get_state () == reentrant))   \
+  { \
+extern unsigned long __mf_reentrancy;   \
+__mf_reentrancy ++; \
+CALL_REAL(fname, __VA_ARGS__);   \
+return;\
+  } \
+  else if (UNLIKELY (__mf_get_state () == in_malloc))   \
+  { \
+CALL_REAL(fname, __VA_ARGS__);   \
+return;\
+  } \
+  else  \
+  { \
+TRACE (%s\n, __PRETTY_FUNCTION__); \
+  }
+
 /* There is an assumption here that these will only be called in routines
  

CVS commit: src/sys/arch/arm/imx

2012-04-17 Thread Hiroyuki Bessho
Module Name:src
Committed By:   bsh
Date:   Wed Apr 18 05:54:08 UTC 2012

Modified Files:
src/sys/arch/arm/imx: imx31_clock.c

Log Message:
adapt to imxclock.c rev 1.5.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/imx/imx31_clock.c

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

Modified files:

Index: src/sys/arch/arm/imx/imx31_clock.c
diff -u src/sys/arch/arm/imx/imx31_clock.c:1.3 src/sys/arch/arm/imx/imx31_clock.c:1.4
--- src/sys/arch/arm/imx/imx31_clock.c:1.3	Fri Jul  1 20:27:50 2011
+++ src/sys/arch/arm/imx/imx31_clock.c	Wed Apr 18 05:54:07 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: imx31_clock.c,v 1.3 2011/07/01 20:27:50 dyoung Exp $ */
+/*	$NetBSD: imx31_clock.c,v 1.4 2012/04/18 05:54:07 bsh Exp $ */
 /*
  * Copyright (c) 2009,2010  Genetec corp.  All rights reserved.
  * Written by Hashimoto Kenichi for Genetec corp.
@@ -106,6 +106,8 @@ imxclock_attach(device_t parent, device_
 		aipsa-aipsa_size, 0, sc-sc_ioh)) {
 		panic(%s: Cannot map registers, device_xname(self));
 	}
+
+	sc-sc_clksrc = EPITCR_CLKSRC_HIGH;
 }
 
 int