CVS commit: src/sys/kern

2015-04-22 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Apr 22 16:43:11 UTC 2015

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

Log Message:
_KERNEL_OPT wrap


To generate a diff of this commit:
cvs rdiff -u -r1.132 -r1.133 src/sys/kern/kern_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/kern/kern_clock.c
diff -u src/sys/kern/kern_clock.c:1.132 src/sys/kern/kern_clock.c:1.133
--- src/sys/kern/kern_clock.c:1.132	Wed Apr 22 16:42:24 2015
+++ src/sys/kern/kern_clock.c	Wed Apr 22 16:43:11 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_clock.c,v 1.132 2015/04/22 16:42:24 pooka Exp $	*/
+/*	$NetBSD: kern_clock.c,v 1.133 2015/04/22 16:43:11 pooka Exp $	*/
 
 /*-
  * Copyright (c) 2000, 2004, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -69,11 +69,13 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: kern_clock.c,v 1.132 2015/04/22 16:42:24 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: kern_clock.c,v 1.133 2015/04/22 16:43:11 pooka Exp $);
 
+#ifdef _KERNEL_OPT
 #include opt_dtrace.h
 #include opt_ntp.h
 #include opt_perfctrs.h
+#endif
 
 #include sys/param.h
 #include sys/systm.h



CVS commit: src/sys/rump/include/machine

2015-04-22 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Apr 22 16:48:08 UTC 2015

Modified Files:
src/sys/rump/include/machine: cpu.h

Log Message:
emulgate clockframe


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/rump/include/machine/cpu.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/rump/include/machine/cpu.h
diff -u src/sys/rump/include/machine/cpu.h:1.20 src/sys/rump/include/machine/cpu.h:1.21
--- src/sys/rump/include/machine/cpu.h:1.20	Sat Mar 15 15:15:26 2014
+++ src/sys/rump/include/machine/cpu.h	Wed Apr 22 16:48:08 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.h,v 1.20 2014/03/15 15:15:26 pooka Exp $	*/
+/*	$NetBSD: cpu.h,v 1.21 2015/04/22 16:48:08 pooka Exp $	*/
 
 /*
  * Copyright (c) 2008-2011 Antti Kantee.  All Rights Reserved.
@@ -87,6 +87,13 @@ extern struct cpu_info *rumpcpu_info_lis
 #define CPU_IS_PRIMARY(_ci_)		(_ci_-ci_index == 0)
 
 
+struct clockframe {
+	int who_framed_clock;
+};
+#define CLKF_USERMODE(framep)	0
+#define CLKF_PC(framep)		0
+#define CLKF_INTR(framep)	0
+
 #endif /* !_LOCORE */
 
 #endif /* _SYS_RUMP_CPU_H_ */



CVS commit: src/sys/kern

2015-04-22 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Apr 22 16:42:24 UTC 2015

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

Log Message:
move clock sysctls from init_sysctl.c to kern_clock.c


To generate a diff of this commit:
cvs rdiff -u -r1.204 -r1.205 src/sys/kern/init_sysctl.c
cvs rdiff -u -r1.131 -r1.132 src/sys/kern/kern_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/kern/init_sysctl.c
diff -u src/sys/kern/init_sysctl.c:1.204 src/sys/kern/init_sysctl.c:1.205
--- src/sys/kern/init_sysctl.c:1.204	Sun Aug  3 09:15:21 2014
+++ src/sys/kern/init_sysctl.c	Wed Apr 22 16:42:24 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: init_sysctl.c,v 1.204 2014/08/03 09:15:21 apb Exp $ */
+/*	$NetBSD: init_sysctl.c,v 1.205 2015/04/22 16:42:24 pooka Exp $ */
 
 /*-
  * Copyright (c) 2003, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: init_sysctl.c,v 1.204 2014/08/03 09:15:21 apb Exp $);
+__KERNEL_RCSID(0, $NetBSD: init_sysctl.c,v 1.205 2015/04/22 16:42:24 pooka Exp $);
 
 #include opt_sysv.h
 #include opt_compat_netbsd.h
@@ -105,7 +105,6 @@ static int sysctl_kern_maxvnodes(SYSCTLF
 static int sysctl_kern_rtc_offset(SYSCTLFN_PROTO);
 static int sysctl_kern_maxproc(SYSCTLFN_PROTO);
 static int sysctl_kern_hostid(SYSCTLFN_PROTO);
-static int sysctl_kern_clockrate(SYSCTLFN_PROTO);
 static int sysctl_msgbuf(SYSCTLFN_PROTO);
 static int sysctl_kern_defcorename(SYSCTLFN_PROTO);
 static int sysctl_kern_cptime(SYSCTLFN_PROTO);
@@ -176,19 +175,6 @@ SYSCTL_SETUP(sysctl_kern_setup, sysctl 
 		   CTL_KERN, KERN_HOSTID, CTL_EOL);
 	sysctl_createv(clog, 0, NULL, NULL,
 		   CTLFLAG_PERMANENT,
-		   CTLTYPE_STRUCT, clockrate,
-		   SYSCTL_DESCR(Kernel clock rates),
-		   sysctl_kern_clockrate, 0, NULL,
-		   sizeof(struct clockinfo),
-		   CTL_KERN, KERN_CLOCKRATE, CTL_EOL);
-	sysctl_createv(clog, 0, NULL, NULL,
-		   CTLFLAG_PERMANENT,
-		   CTLTYPE_INT, hardclock_ticks,
-		   SYSCTL_DESCR(Number of hardclock ticks),
-		   NULL, 0, hardclock_ticks, sizeof(hardclock_ticks),
-		   CTL_KERN, KERN_HARDCLOCK_TICKS, CTL_EOL);
-	sysctl_createv(clog, 0, NULL, NULL,
-		   CTLFLAG_PERMANENT,
 		   CTLTYPE_STRUCT, vnode,
 		   SYSCTL_DESCR(System vnode table),
 		   sysctl_kern_vnode, 0, NULL, 0,
@@ -956,27 +942,6 @@ sysctl_kern_hostid(SYSCTLFN_ARGS)
 }
 
 /*
- * sysctl helper routine for kern.clockrate. Assembles a struct on
- * the fly to be returned to the caller.
- */
-static int
-sysctl_kern_clockrate(SYSCTLFN_ARGS)
-{
-	struct clockinfo clkinfo;
-	struct sysctlnode node;
-
-	clkinfo.tick = tick;
-	clkinfo.tickadj = tickadj;
-	clkinfo.hz = hz;
-	clkinfo.profhz = profhz;
-	clkinfo.stathz = stathz ? stathz : hz;
-
-	node = *rnode;
-	node.sysctl_data = clkinfo;
-	return (sysctl_lookup(SYSCTLFN_CALL(node)));
-}
-
-/*
  * sysctl helper routine for kern.msgbufsize and kern.msgbuf. For the
  * former it merely checks the message buffer is set up. For the latter,
  * it also copies out the data if necessary.

Index: src/sys/kern/kern_clock.c
diff -u src/sys/kern/kern_clock.c:1.131 src/sys/kern/kern_clock.c:1.132
--- src/sys/kern/kern_clock.c:1.131	Sun Dec  2 01:05:16 2012
+++ src/sys/kern/kern_clock.c	Wed Apr 22 16:42:24 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_clock.c,v 1.131 2012/12/02 01:05:16 chs Exp $	*/
+/*	$NetBSD: kern_clock.c,v 1.132 2015/04/22 16:42:24 pooka Exp $	*/
 
 /*-
  * Copyright (c) 2000, 2004, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -69,7 +69,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: kern_clock.c,v 1.131 2012/12/02 01:05:16 chs Exp $);
+__KERNEL_RCSID(0, $NetBSD: kern_clock.c,v 1.132 2015/04/22 16:42:24 pooka Exp $);
 
 #include opt_dtrace.h
 #include opt_ntp.h
@@ -101,6 +101,8 @@ __KERNEL_RCSID(0, $NetBSD: kern_clock.c
 cyclic_clock_func_t	cyclic_clock_func[MAXCPUS];
 #endif
 
+static int sysctl_kern_clockrate(SYSCTLFN_PROTO);
+
 /*
  * Clock handling routines.
  *
@@ -161,6 +163,7 @@ get_intr_timecount(struct timecounter *t
 void
 initclocks(void)
 {
+	static struct sysctllog *clog;
 	int i;
 
 	/*
@@ -190,6 +193,19 @@ initclocks(void)
 			panic(hardscheddiv);
 	}
 
+	sysctl_createv(clog, 0, NULL, NULL,
+		   CTLFLAG_PERMANENT,
+		   CTLTYPE_STRUCT, clockrate,
+		   SYSCTL_DESCR(Kernel clock rates),
+		   sysctl_kern_clockrate, 0, NULL,
+		   sizeof(struct clockinfo),
+		   CTL_KERN, KERN_CLOCKRATE, CTL_EOL);
+	sysctl_createv(clog, 0, NULL, NULL,
+		   CTLFLAG_PERMANENT,
+		   CTLTYPE_INT, hardclock_ticks,
+		   SYSCTL_DESCR(Number of hardclock ticks),
+		   NULL, 0, hardclock_ticks, sizeof(hardclock_ticks),
+		   CTL_KERN, KERN_HARDCLOCK_TICKS, CTL_EOL);
 }
 
 /*
@@ -449,3 +465,24 @@ statclock(struct clockframe *frame)
 		mutex_spin_exit(p-p_stmutex);
 	}
 }
+
+/*
+ * sysctl helper routine for 

CVS commit: src/sys/kern

2015-04-22 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Apr 22 16:46:58 UTC 2015

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

Log Message:
opt_ntp.h is no longer used in kern_clock.c


To generate a diff of this commit:
cvs rdiff -u -r1.133 -r1.134 src/sys/kern/kern_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/kern/kern_clock.c
diff -u src/sys/kern/kern_clock.c:1.133 src/sys/kern/kern_clock.c:1.134
--- src/sys/kern/kern_clock.c:1.133	Wed Apr 22 16:43:11 2015
+++ src/sys/kern/kern_clock.c	Wed Apr 22 16:46:58 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_clock.c,v 1.133 2015/04/22 16:43:11 pooka Exp $	*/
+/*	$NetBSD: kern_clock.c,v 1.134 2015/04/22 16:46:58 pooka Exp $	*/
 
 /*-
  * Copyright (c) 2000, 2004, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -69,11 +69,10 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: kern_clock.c,v 1.133 2015/04/22 16:43:11 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: kern_clock.c,v 1.134 2015/04/22 16:46:58 pooka Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_dtrace.h
-#include opt_ntp.h
 #include opt_perfctrs.h
 #endif
 



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

2015-04-22 Thread Brian Ginsbach
Module Name:src
Committed By:   ginsbach
Date:   Wed Apr 22 13:15:30 UTC 2015

Modified Files:
src/tests/lib/libc/time: t_strptime.c

Log Message:
Make century and year conversion tests a standalone test case rather than
part of the common test case.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/lib/libc/time/t_strptime.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/time/t_strptime.c
diff -u src/tests/lib/libc/time/t_strptime.c:1.3 src/tests/lib/libc/time/t_strptime.c:1.4
--- src/tests/lib/libc/time/t_strptime.c:1.3	Tue Apr 21 17:39:50 2015
+++ src/tests/lib/libc/time/t_strptime.c	Wed Apr 22 13:15:30 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: t_strptime.c,v 1.3 2015/04/21 17:39:50 ginsbach Exp $ */
+/* $NetBSD: t_strptime.c,v 1.4 2015/04/22 13:15:30 ginsbach Exp $ */
 
 /*-
  * Copyright (c) 1998, 2008 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
 #include sys/cdefs.h
 __COPYRIGHT(@(#) Copyright (c) 2008\
  The NetBSD Foundation, inc. All rights reserved.);
-__RCSID($NetBSD: t_strptime.c,v 1.3 2015/04/21 17:39:50 ginsbach Exp $);
+__RCSID($NetBSD: t_strptime.c,v 1.4 2015/04/22 13:15:30 ginsbach Exp $);
 
 #include time.h
 
@@ -103,16 +103,6 @@ ATF_TC_BODY(common, tc)
 		21, 34, 5, 20, 4, 2, 105, 5, -1);
 	h_pass(Fri Mar  4 20:05:34 2005, %c,
 		24, 34, 5, 20, 4, 2, 105, 5, -1);
-
-	h_pass(x20y, x%Cy, 4, -1, -1, -1, -1, -1, 100, -1, -1);
-	h_pass(x84y, x%yy, 4, -1, -1, -1, -1, -1, 84, -1, -1);
-	h_pass(x2084y, x%C%yy, 6, -1, -1, -1, -1, -1, 184, -1, -1);
-	h_pass(x8420y, x%y%Cy, 6, -1, -1, -1, -1, -1, 184, -1, -1);
-	h_pass(%20845, %%%C%y5, 6, -1, -1, -1, -1, -1, 184, -1, -1);
-	h_fail(%, %E%);
-
-	h_pass(1980, %Y, 4, -1, -1, -1, -1, -1, 80, -1, -1);
-	h_pass(1980, %EY, 4, -1, -1, -1, -1, -1, 80, -1, -1);
 }
 
 ATF_TC(day);
@@ -256,6 +246,29 @@ ATF_TC_BODY(seconds, tc)
 	h_fail(62, %S);
 }
 
+ATF_TC(year);
+
+ATF_TC_HEAD(year, tc)
+{
+
+	atf_tc_set_md_var(tc, descr,
+			  Checks strptime(3) century/year conversions [CyY]);
+}
+
+ATF_TC_BODY(year, tc)
+{
+
+	h_pass(x20y, x%Cy, 4, -1, -1, -1, -1, -1, 100, -1, -1);
+	h_pass(x84y, x%yy, 4, -1, -1, -1, -1, -1, 84, -1, -1);
+	h_pass(x2084y, x%C%yy, 6, -1, -1, -1, -1, -1, 184, -1, -1);
+	h_pass(x8420y, x%y%Cy, 6, -1, -1, -1, -1, -1, 184, -1, -1);
+	h_pass(%20845, %%%C%y5, 6, -1, -1, -1, -1, -1, 184, -1, -1);
+	h_fail(%, %E%);
+
+	h_pass(1980, %Y, 4, -1, -1, -1, -1, -1, 80, -1, -1);
+	h_pass(1980, %EY, 4, -1, -1, -1, -1, -1, 80, -1, -1);
+}
+
 ATF_TP_ADD_TCS(tp)
 {
 
@@ -263,6 +276,7 @@ ATF_TP_ADD_TCS(tp)
 	ATF_TP_ADD_TC(tp, day);
 	ATF_TP_ADD_TC(tp, month);
 	ATF_TP_ADD_TC(tp, seconds);
+	ATF_TP_ADD_TC(tp, year);
 
 	return atf_no_error();
 }



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

2015-04-22 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Apr 22 16:49:42 UTC 2015

Modified Files:
src/sys/rump/librump/rumpkern: Makefile.rumpkern emul.c intr.c

Log Message:
Include kern_clock.c in rump kernels.


To generate a diff of this commit:
cvs rdiff -u -r1.155 -r1.156 src/sys/rump/librump/rumpkern/Makefile.rumpkern
cvs rdiff -u -r1.170 -r1.171 src/sys/rump/librump/rumpkern/emul.c
cvs rdiff -u -r1.50 -r1.51 src/sys/rump/librump/rumpkern/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/rump/librump/rumpkern/Makefile.rumpkern
diff -u src/sys/rump/librump/rumpkern/Makefile.rumpkern:1.155 src/sys/rump/librump/rumpkern/Makefile.rumpkern:1.156
--- src/sys/rump/librump/rumpkern/Makefile.rumpkern:1.155	Tue Apr 14 13:32:34 2015
+++ src/sys/rump/librump/rumpkern/Makefile.rumpkern	Wed Apr 22 16:49:42 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.rumpkern,v 1.155 2015/04/14 13:32:34 riastradh Exp $
+#	$NetBSD: Makefile.rumpkern,v 1.156 2015/04/22 16:49:42 pooka Exp $
 #
 
 .include ${RUMPTOP}/Makefile.rump
@@ -71,6 +71,7 @@ SRCS+=	devsw.c
 SRCS+=	init_sysctl_base.c	\
 	kern_auth.c		\
 	kern_cfglock.c		\
+	kern_clock.c		\
 	kern_descrip.c		\
 	kern_event.c		\
 	kern_hook.c		\

Index: src/sys/rump/librump/rumpkern/emul.c
diff -u src/sys/rump/librump/rumpkern/emul.c:1.170 src/sys/rump/librump/rumpkern/emul.c:1.171
--- src/sys/rump/librump/rumpkern/emul.c:1.170	Sat Apr 18 15:49:18 2015
+++ src/sys/rump/librump/rumpkern/emul.c	Wed Apr 22 16:49:42 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: emul.c,v 1.170 2015/04/18 15:49:18 pooka Exp $	*/
+/*	$NetBSD: emul.c,v 1.171 2015/04/22 16:49:42 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007-2011 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: emul.c,v 1.170 2015/04/18 15:49:18 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: emul.c,v 1.171 2015/04/22 16:49:42 pooka Exp $);
 
 #include sys/param.h
 #include sys/null.h
@@ -85,7 +85,6 @@ struct vnode *rootvp;
 dev_t rootdev = NODEV;
 
 const int schedppq = 1;
-int hardclock_ticks;
 bool mp_online = false;
 struct timeval boottime;
 int cold = 1;

Index: src/sys/rump/librump/rumpkern/intr.c
diff -u src/sys/rump/librump/rumpkern/intr.c:1.50 src/sys/rump/librump/rumpkern/intr.c:1.51
--- src/sys/rump/librump/rumpkern/intr.c:1.50	Tue Apr 21 16:18:50 2015
+++ src/sys/rump/librump/rumpkern/intr.c	Wed Apr 22 16:49:42 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: intr.c,v 1.50 2015/04/21 16:18:50 pooka Exp $	*/
+/*	$NetBSD: intr.c,v 1.51 2015/04/22 16:49:42 pooka Exp $	*/
 
 /*
  * Copyright (c) 2008-2010, 2015 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.50 2015/04/21 16:18:50 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.51 2015/04/22 16:49:42 pooka Exp $);
 
 #include sys/param.h
 #include sys/atomic.h
@@ -82,22 +82,12 @@ kcondvar_t lbolt; /* Oh Kath Ra */
 
 static int ncpu_final;
 
-static u_int
-rumptc_get(struct timecounter *tc)
-{
-
-	KASSERT(rump_threads);
-	return (u_int)hardclock_ticks;
-}
-
-static struct timecounter rumptc = {
-	.tc_get_timecount	= rumptc_get,
-	.tc_poll_pps 		= NULL,
-	.tc_counter_mask	= ~0,
-	.tc_frequency		= 0,
-	.tc_name		= rumpclk,
-	.tc_quality		= 0,
-};
+void noclock(void); void noclock(void) {return;}
+__strong_alias(sched_schedclock,noclock);
+__strong_alias(cpu_initclocks,noclock);
+__strong_alias(addupc_intr,noclock);
+__strong_alias(sched_tick,noclock);
+__strong_alias(setstatclockrate,noclock);
 
 /*
  * clock interrupt
@@ -106,10 +96,11 @@ static void
 doclock(void *noarg)
 {
 	struct timespec thetick, curclock;
+	struct clockframe frame;
 	int64_t sec;
 	long nsec;
 	int error;
-	int cpuindx = curcpu()-ci_index;
+	struct cpu_info *ci = curcpu();
 
 	error = rumpuser_clock_gettime(RUMPUSER_CLOCK_ABSMONO, sec, nsec);
 	if (error)
@@ -120,21 +111,24 @@ doclock(void *noarg)
 	thetick.tv_sec = 0;
 	thetick.tv_nsec = 10/hz;
 
+	/* not used, so doesn't matter what we pass in */
+	memset(frame, 0, sizeof(frame));
+
 	for (;;) {
-		callout_hardclock();
+		int lbolt_ticks = 0;
+
+		hardclock(frame);
+		if (CPU_IS_PRIMARY(ci)) {
+			if (++lbolt_ticks = hz) {
+lbolt_ticks = 0;
+cv_broadcast(lbolt);
+			}
+		}
 
 		error = rumpuser_clock_sleep(RUMPUSER_CLOCK_ABSMONO,
 		curclock.tv_sec, curclock.tv_nsec);
 		KASSERT(!error);
 		timespecadd(curclock, thetick, curclock);
-
-		if (cpuindx != 0)
-			continue;
-
-		if ((++hardclock_ticks % hz) == 0) {
-			cv_broadcast(lbolt);
-		}
-		tc_ticktock();
 	}
 }
 
@@ -304,8 +298,12 @@ softint_init(struct cpu_info *ci)
 	if (ci-ci_index == 0) {
 		int sithr_swap;
 
-		rumptc.tc_frequency = hz;
-		tc_init(rumptc);
+		/* pretend that we have our own for these */
+		stathz = 1;
+		schedhz = 1;
+		profhz = 1;
+
+		initclocks();
 
 		/* create deferred softint threads */
 		mutex_enter(sithr_emtx);



CVS commit: src/lib/libc/sys

2015-04-22 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Apr 22 13:59:54 UTC 2015

Modified Files:
src/lib/libc/sys: intro.2

Log Message:
Remove trailing whitespace.


To generate a diff of this commit:
cvs rdiff -u -r1.56 -r1.57 src/lib/libc/sys/intro.2

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/sys/intro.2
diff -u src/lib/libc/sys/intro.2:1.56 src/lib/libc/sys/intro.2:1.57
--- src/lib/libc/sys/intro.2:1.56	Tue Apr 21 21:22:07 2015
+++ src/lib/libc/sys/intro.2	Wed Apr 22 13:59:54 2015
@@ -1,4 +1,4 @@
-.\	$NetBSD: intro.2,v 1.56 2015/04/21 21:22:07 christos Exp $
+.\	$NetBSD: intro.2,v 1.57 2015/04/22 13:59:54 wiz Exp $
 .\
 .\ Copyright (c) 1980, 1983, 1986, 1991, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -273,7 +273,7 @@ same routine may complete normally.
 In this implementation this is the same as
 .Er EWOULDBLOCK ,
 but
-.Er EAGAIN 
+.Er EAGAIN
 is the preferred name.
 .It Er 36 EINPROGRESS Em Operation now in progress .
 An operation that takes a long time to complete (such as



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

2015-04-22 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Apr 22 16:01:07 UTC 2015

Modified Files:
src/sys/rump/librump/rumpkern: scheduler.c

Log Message:
track cpu_onproc


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/sys/rump/librump/rumpkern/scheduler.c

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

Modified files:

Index: src/sys/rump/librump/rumpkern/scheduler.c
diff -u src/sys/rump/librump/rumpkern/scheduler.c:1.39 src/sys/rump/librump/rumpkern/scheduler.c:1.40
--- src/sys/rump/librump/rumpkern/scheduler.c:1.39	Sat Jun  7 11:08:09 2014
+++ src/sys/rump/librump/rumpkern/scheduler.c	Wed Apr 22 16:01:07 2015
@@ -1,4 +1,4 @@
-/*  $NetBSD: scheduler.c,v 1.39 2014/06/07 11:08:09 rmind Exp $	*/
+/*  $NetBSD: scheduler.c,v 1.40 2015/04/22 16:01:07 pooka Exp $	*/
 
 /*
  * Copyright (c) 2010, 2011 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: scheduler.c,v 1.39 2014/06/07 11:08:09 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: scheduler.c,v 1.40 2015/04/22 16:01:07 pooka Exp $);
 
 #include sys/param.h
 #include sys/atomic.h
@@ -280,6 +280,7 @@ void
 rump_schedule_cpu_interlock(struct lwp *l, void *interlock)
 {
 	struct rumpcpu *rcpu;
+	struct cpu_info *ci;
 	void *old;
 	bool domigrate;
 	bool bound = l-l_pflag  LP_BOUND;
@@ -354,12 +355,19 @@ rump_schedule_cpu_interlock(struct lwp *
 	rumpuser_mutex_exit(rcpu-rcpu_mtx);
 
  fastlane:
-	l-l_cpu = l-l_target_cpu = rcpu-rcpu_ci;
+	ci = rcpu-rcpu_ci;
+	l-l_cpu = l-l_target_cpu = ci;
 	l-l_mutex = rcpu-rcpu_ci-ci_schedstate.spc_mutex;
 	l-l_ncsw++;
 	l-l_stat = LSONPROC;
 
-	rcpu-rcpu_ci-ci_curlwp = l;
+	/*
+	 * No interrupts, so ci_curlwp === cpu_onproc.
+	 * Okay, we could make an attempt to not set cpu_onproc
+	 * in the case that an interrupt is scheduled immediately
+	 * after a user proc, but leave that for later.
+	 */
+	ci-ci_curlwp = ci-ci_data.cpu_onproc = l;
 }
 
 void
@@ -431,7 +439,7 @@ rump_unschedule_cpu1(struct lwp *l, void
 	void *old;
 
 	ci = l-l_cpu;
-	ci-ci_curlwp = NULL;
+	ci-ci_curlwp = ci-ci_data.cpu_onproc = NULL;
 	rcpu = rcpu_storage[ci-rump_cpus[0]];
 
 	KASSERT(rcpu-rcpu_ci == ci);



CVS commit: src/sys/fs/puffs

2015-04-22 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Apr 22 17:07:24 UTC 2015

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

Log Message:
sprinkle COMPAT_50


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/fs/puffs/puffs_compat.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_compat.c
diff -u src/sys/fs/puffs/puffs_compat.c:1.3 src/sys/fs/puffs/puffs_compat.c:1.4
--- src/sys/fs/puffs/puffs_compat.c:1.3	Mon Nov 10 18:46:33 2014
+++ src/sys/fs/puffs/puffs_compat.c	Wed Apr 22 17:07:24 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: puffs_compat.c,v 1.3 2014/11/10 18:46:33 maxv Exp $	*/
+/*	$NetBSD: puffs_compat.c,v 1.4 2015/04/22 17:07:24 pooka Exp $	*/
 
 /*
  * Copyright (c) 2010 Antti Kantee.  All Rights Reserved.
@@ -32,7 +32,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: puffs_compat.c,v 1.3 2014/11/10 18:46:33 maxv Exp $);
+__KERNEL_RCSID(0, $NetBSD: puffs_compat.c,v 1.4 2015/04/22 17:07:24 pooka Exp $);
 
 #include sys/param.h
 #include sys/atomic.h
@@ -157,6 +157,7 @@ struct puffs50_vnmsg_symlink {
  * vattr translation routines
  */
 
+#ifdef COMPAT_50
 static void
 vattr_to_50(const struct vattr *va, struct vattr50 *va50)
 {
@@ -206,6 +207,7 @@ vattr_from_50(const struct vattr50 *va50
 	va-va_filerev = va50-va_filerev;
 	va-va_vaflags = va50-va_flags;
 }
+#endif /* COMPAT_50 */
 
 /*
  * XXX: cannot assert that sleeping is possible
@@ -225,9 +227,10 @@ bool
 puffs_compat_outgoing(struct puffs_req *oreq,
 	struct puffs_req **creqp, ssize_t *deltap)
 {
+	bool rv = false;
+#ifdef COMPAT_50
 	struct puffs_req *creq = NULL;
 	ssize_t delta = 0;
-	bool rv = false;
 
 	if (PUFFSOP_OPCLASS(oreq-preq_opclass) == PUFFSOP_VFS
 	 oreq-preq_optype == PUFFS_VFS_FHTOVP) {
@@ -330,6 +333,7 @@ puffs_compat_outgoing(struct puffs_req *
 		*deltap = delta;
 		rv = true;
 	}
+#endif
 
 	return rv;
 }
@@ -346,6 +350,7 @@ void
 puffs_compat_incoming(struct puffs_req *preq, struct puffs_req *creq)
 {
 
+#ifdef COMPAT_50
 	if (PUFFSOP_OPCLASS(preq-preq_opclass) == PUFFSOP_VFS
 	 preq-preq_optype == PUFFS_VFS_FHTOVP) {
 		INIT(vfsmsg_fhtonode);
@@ -433,4 +438,5 @@ puffs_compat_incoming(struct puffs_req *
 			panic(puffs compat ops come in pairs);
 		}
 	}
+#endif /* COMPAT_50 */
 }



CVS commit: src/sbin/ifconfig

2015-04-22 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Wed Apr 22 17:42:22 UTC 2015

Modified Files:
src/sbin/ifconfig: af_inet6.c ifconfig.c util.h

Log Message:
Move the INET6 specific code for wait_dad_exec() into af_inet6
by using a new afswtch hook af_addr_tentative.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sbin/ifconfig/af_inet6.c
cvs rdiff -u -r1.233 -r1.234 src/sbin/ifconfig/ifconfig.c
cvs rdiff -u -r1.10 -r1.11 src/sbin/ifconfig/util.h

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

Modified files:

Index: src/sbin/ifconfig/af_inet6.c
diff -u src/sbin/ifconfig/af_inet6.c:1.31 src/sbin/ifconfig/af_inet6.c:1.32
--- src/sbin/ifconfig/af_inet6.c:1.31	Tue Jan 20 22:13:19 2015
+++ src/sbin/ifconfig/af_inet6.c	Wed Apr 22 17:42:22 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: af_inet6.c,v 1.31 2015/01/20 22:13:19 roy Exp $	*/
+/*	$NetBSD: af_inet6.c,v 1.32 2015/04/22 17:42:22 roy Exp $	*/
 
 /*
  * Copyright (c) 1983, 1993
@@ -31,7 +31,7 @@
 
 #include sys/cdefs.h
 #ifndef lint
-__RCSID($NetBSD: af_inet6.c,v 1.31 2015/01/20 22:13:19 roy Exp $);
+__RCSID($NetBSD: af_inet6.c,v 1.32 2015/04/22 17:42:22 roy Exp $);
 #endif /* not lint */
 
 #include sys/param.h 
@@ -72,6 +72,7 @@ static int setia6vltime_impl(prop_dictio
 static int setia6lifetime(prop_dictionary_t, int64_t, time_t *, uint32_t *);
 
 static void in6_status(prop_dictionary_t, prop_dictionary_t, bool);
+static bool in6_addr_tentative(struct ifaddrs *ifa);
 
 static struct usage_func usage;
 static cmdloop_branch_t branch[2];
@@ -101,7 +102,8 @@ struct pkw inet6 = PKW_INITIALIZER(inet
 
 static struct afswtch in6af = {
 	.af_name = inet6, .af_af = AF_INET6, .af_status = in6_status,
-	.af_addr_commit = in6_commit_address
+	.af_addr_commit = in6_commit_address,
+	.af_addr_tentative = in6_addr_tentative
 };
 
 static int
@@ -474,6 +476,22 @@ in6_commit_address(prop_dictionary_t env
 	commit_address(env, oenv, in6param);
 }
 
+static bool
+in6_addr_tentative(struct ifaddrs *ifa)
+{
+	int s;
+	struct in6_ifreq ifr;
+
+	if ((s = getsock(AF_INET6)) == -1)
+		err(EXIT_FAILURE, %s: getsock, __func__);
+	memset(ifr, 0, sizeof(ifr));
+	strncpy(ifr.ifr_name, ifa-ifa_name, sizeof(ifr.ifr_name));
+	ifr.ifr_addr = *(struct sockaddr_in6 *)ifa-ifa_addr;
+	if (ioctl(s, SIOCGIFAFLAG_IN6, ifr) == -1)
+		err(EXIT_FAILURE, SIOCGIFAFLAG_IN6);
+	return ifr.ifr_ifru.ifru_flags6  IN6_IFF_TENTATIVE ? true : false;
+}
+
 static void
 in6_usage(prop_dictionary_t env)
 {

Index: src/sbin/ifconfig/ifconfig.c
diff -u src/sbin/ifconfig/ifconfig.c:1.233 src/sbin/ifconfig/ifconfig.c:1.234
--- src/sbin/ifconfig/ifconfig.c:1.233	Fri Sep 12 08:54:26 2014
+++ src/sbin/ifconfig/ifconfig.c	Wed Apr 22 17:42:22 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: ifconfig.c,v 1.233 2014/09/12 08:54:26 martin Exp $	*/
+/*	$NetBSD: ifconfig.c,v 1.234 2015/04/22 17:42:22 roy Exp $	*/
 
 /*-
  * Copyright (c) 1997, 1998, 2000 The NetBSD Foundation, Inc.
@@ -63,7 +63,7 @@
 #ifndef lint
 __COPYRIGHT(@(#) Copyright (c) 1983, 1993\
  The Regents of the University of California.  All rights reserved.);
-__RCSID($NetBSD: ifconfig.c,v 1.233 2014/09/12 08:54:26 martin Exp $);
+__RCSID($NetBSD: ifconfig.c,v 1.234 2015/04/22 17:42:22 roy Exp $);
 #endif /* not lint */
 
 #include sys/param.h
@@ -515,14 +515,12 @@ no_cmds_exec(prop_dictionary_t env, prop
 static int
 wait_dad_exec(prop_dictionary_t env, prop_dictionary_t oenv)
 {
-#ifdef INET6
 	bool waiting;
 	struct ifaddrs *ifaddrs, *ifa;
-	struct in6_ifreq ifr6;
-	int s;
 	const struct timespec ts = { .tv_sec = 0, .tv_nsec = WAIT_DAD };
 	const struct timespec add = { .tv_sec = wflag_secs, .tv_nsec = 0};
 	struct timespec now, end = { .tv_sec = wflag_secs, .tv_nsec = 0};
+	const struct afswtch *afp;
 
 	if (wflag_secs) {
 		if (clock_gettime(CLOCK_MONOTONIC, now) == -1)
@@ -538,27 +536,13 @@ wait_dad_exec(prop_dictionary_t env, pro
 		for (ifa = ifaddrs; ifa; ifa = ifa-ifa_next) {
 			if (ifa-ifa_addr == NULL)
 continue;
-			switch (ifa-ifa_addr-sa_family) {
-			case AF_INET6:
-memset(ifr6, 0, sizeof(ifr6));
-strncpy(ifr6.ifr_name,
-ifa-ifa_name, sizeof(ifr6.ifr_name));
-ifr6.ifr_addr =
-*(struct sockaddr_in6 *)ifa-ifa_addr;
-if ((s = getsock(AF_INET6)) == -1)
-	err(EXIT_FAILURE,
-	%s: getsock, __func__);
-if (ioctl(s, SIOCGIFAFLAG_IN6, ifr6) == -1)
-	err(EXIT_FAILURE, SIOCGIFAFLAG_IN6);
-if (ifr6.ifr_ifru.ifru_flags6 
-IN6_IFF_TENTATIVE)
-{
-	waiting = true;
-	break;
-}
-			}
-			if (waiting)
+			afp = lookup_af_bynum(ifa-ifa_addr-sa_family);
+			if (afp  afp-af_addr_tentative 
+			afp-af_addr_tentative(ifa))
+			{
+waiting = true;
 break;
+			}
 		}
 		if (!waiting)
 			break;
@@ -572,7 +556,6 @@ wait_dad_exec(prop_dictionary_t env, pro
 	}
 
 	freeifaddrs(ifaddrs);
-#endif
 	exit(EXIT_SUCCESS);
 }
 

Index: src/sbin/ifconfig/util.h
diff -u src/sbin/ifconfig/util.h:1.10 

CVS commit: src/sys/rump

2015-04-22 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Apr 22 16:59:45 UTC 2015

Modified Files:
src/sys/rump: Makefile.rump

Log Message:
Generate -DCOMPAT_nn from a list of nn provided in RUMP_COMPAT


To generate a diff of this commit:
cvs rdiff -u -r1.103 -r1.104 src/sys/rump/Makefile.rump

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

Modified files:

Index: src/sys/rump/Makefile.rump
diff -u src/sys/rump/Makefile.rump:1.103 src/sys/rump/Makefile.rump:1.104
--- src/sys/rump/Makefile.rump:1.103	Tue Dec  2 01:59:10 2014
+++ src/sys/rump/Makefile.rump	Wed Apr 22 16:59:45 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.rump,v 1.103 2014/12/02 01:59:10 pooka Exp $
+#	$NetBSD: Makefile.rump,v 1.104 2015/04/22 16:59:45 pooka Exp $
 #
 
 .if !defined(_RUMP_MK)
@@ -30,8 +30,10 @@ CPPFLAGS+=	-DMIPS1=1
 .endif
 .endif
 
+RUMP_COMPAT?=	50 60
+CPPFLAGS+=	${RUMP_COMPAT:C/[1-9]0/-DCOMPAT_/g}
+
 CPPFLAGS+=	-DMAXUSERS=32
-CPPFLAGS+=	-DCOMPAT_50=1 -DCOMPAT_60=1
 
 CPPFLAGS+=	-nostdinc
 CFLAGS+=	-ffreestanding -fno-strict-aliasing



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

2015-04-22 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Apr 22 17:01:00 UTC 2015

Modified Files:
src/sys/rump/librump/rumpvfs: Makefile.rumpvfs
Added Files:
src/sys/rump/librump/rumpvfs: rumpvfs_compat50.c
Removed Files:
src/sys/rump/librump/rumpvfs: compat.c

Log Message:
rename rumpvfs/compat.c to rumpvfs/rumpvfs_compat50.c


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/sys/rump/librump/rumpvfs/Makefile.rumpvfs
cvs rdiff -u -r1.10 -r0 src/sys/rump/librump/rumpvfs/compat.c
cvs rdiff -u -r0 -r1.1 src/sys/rump/librump/rumpvfs/rumpvfs_compat50.c

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

Modified files:

Index: src/sys/rump/librump/rumpvfs/Makefile.rumpvfs
diff -u src/sys/rump/librump/rumpvfs/Makefile.rumpvfs:1.43 src/sys/rump/librump/rumpvfs/Makefile.rumpvfs:1.44
--- src/sys/rump/librump/rumpvfs/Makefile.rumpvfs:1.43	Tue Dec  2 01:59:16 2014
+++ src/sys/rump/librump/rumpvfs/Makefile.rumpvfs	Wed Apr 22 17:00:59 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.rumpvfs,v 1.43 2014/12/02 01:59:16 pooka Exp $
+#	$NetBSD: Makefile.rumpvfs,v 1.44 2015/04/22 17:00:59 pooka Exp $
 #
 
 .include ${RUMPTOP}/Makefile.rump
@@ -70,7 +70,7 @@ SRCS+= quota1_subr.c vfs_quotactl.c
 SRCS+=	firmload.c
 
 # compat syscalls
-SRCS+=	vfs_syscalls_50.c compat.c
+SRCS+=	vfs_syscalls_50.c rumpvfs_compat50.c
 
 SRCS+=	rumpvnode_if.c
 

Added files:

Index: src/sys/rump/librump/rumpvfs/rumpvfs_compat50.c
diff -u /dev/null src/sys/rump/librump/rumpvfs/rumpvfs_compat50.c:1.1
--- /dev/null	Wed Apr 22 17:01:00 2015
+++ src/sys/rump/librump/rumpvfs/rumpvfs_compat50.c	Wed Apr 22 17:00:59 2015
@@ -0,0 +1,135 @@
+/*	$NetBSD: rumpvfs_compat50.c,v 1.1 2015/04/22 17:00:59 pooka Exp $	*/
+
+/*
+ * Copyright (c) 2009 Antti Kantee.  All Rights Reserved.
+ *
+ * Development of this software was supported by the Nokia Foundation
+ *
+ * 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 AUTHOR ``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 AUTHOR 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
+__KERNEL_RCSID(0, $NetBSD: rumpvfs_compat50.c,v 1.1 2015/04/22 17:00:59 pooka Exp $);
+
+#include sys/param.h
+#include sys/kmem.h
+#include sys/sched.h
+#include sys/syscallargs.h
+#include sys/vnode.h
+
+#include compat/sys/time.h
+
+#include rump/rump.h
+
+#include rump_vfs_private.h
+
+/*
+ * XXX: these are handwritten for now.  They provide compat for
+ * calling post-time_t file systems from a pre-time_t userland.
+ * (mknod is missing.  I don't care very much)
+ *
+ * Doing remote system calls with these does not (obviously) work.
+ */
+#if BYTE_ORDER == BIG_ENDIAN
+#define SPARG(p,k)  ((p)-k.be.datum)
+#else /* LITTLE_ENDIAN, I hope dearly */
+#define SPARG(p,k)  ((p)-k.le.datum)
+#endif
+
+struct vattr50 {
+	enum vtype	va_type;	/* vnode type (for create) */
+	mode_t		va_mode;	/* files access mode and type */
+	nlink_t		va_nlink;	/* number of references to file */
+	uid_t		va_uid;		/* owner user id */
+	gid_t		va_gid;		/* owner group id */
+	u_long		va_fsid;	/* file system id (dev for now) */
+	ino_t		va_fileid;	/* file id */
+	u_quad_t	va_size;	/* file size in bytes */
+	long		va_blocksize;	/* blocksize preferred for i/o */
+	struct timespec50 va_atime;	/* time of last access */
+	struct timespec50 va_mtime;	/* time of last modification */
+	struct timespec50 va_ctime;	/* time file changed */
+	struct timespec50 va_birthtime;	/* time file created */
+	u_long		va_gen;		/* generation number of file */
+	u_long		va_flags;	/* flags defined for file */
+	uint32_t	va_rdev;	/* device the special file represents */
+	u_quad_t	va_bytes;	/* bytes of disk space held by file */
+	u_quad_t	va_filerev;	/* file modification number */
+	u_int		va_vaflags;	/* operations flags, see below */
+	long		va_spare;	/* 

CVS commit: src/sys/rump

2015-04-22 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Apr 22 17:57:49 UTC 2015

Modified Files:
src/sys/rump/dev/lib/libraidframe: Makefile
src/sys/rump/kern/lib/libtty: Makefile
src/sys/rump/librump/rumpkern: Makefile.rumpkern
src/sys/rump/librump/rumpvfs: Makefile.rumpvfs
src/sys/rump/net/lib/libnet: Makefile

Log Message:
Build compat code only when specified by RUMP_COMPAT


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/rump/dev/lib/libraidframe/Makefile
cvs rdiff -u -r1.3 -r1.4 src/sys/rump/kern/lib/libtty/Makefile
cvs rdiff -u -r1.156 -r1.157 src/sys/rump/librump/rumpkern/Makefile.rumpkern
cvs rdiff -u -r1.44 -r1.45 src/sys/rump/librump/rumpvfs/Makefile.rumpvfs
cvs rdiff -u -r1.20 -r1.21 src/sys/rump/net/lib/libnet/Makefile

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

Modified files:

Index: src/sys/rump/dev/lib/libraidframe/Makefile
diff -u src/sys/rump/dev/lib/libraidframe/Makefile:1.4 src/sys/rump/dev/lib/libraidframe/Makefile:1.5
--- src/sys/rump/dev/lib/libraidframe/Makefile:1.4	Thu Mar 13 01:49:59 2014
+++ src/sys/rump/dev/lib/libraidframe/Makefile	Wed Apr 22 17:57:49 2015
@@ -1,6 +1,8 @@
-#	$NetBSD: Makefile,v 1.4 2014/03/13 01:49:59 pooka Exp $
+#	$NetBSD: Makefile,v 1.5 2015/04/22 17:57:49 pooka Exp $
 #
 
+.include bsd.init.mk
+
 .PATH:	${.CURDIR}/../../../../dev/raidframe
 
 LIB=	rumpdev_raidframe
@@ -19,10 +21,14 @@ SRCS=   rf_acctrace.c rf_alloclist.c rf_
 	rf_raid5.c rf_raid5_rotatedspare.c rf_reconbuffer.c		\
 	rf_reconmap.c rf_reconstruct.c rf_reconutil.c rf_revent.c	\
 	rf_shutdown.c rf_sstf.c rf_states.c rf_stripelocks.c		\
-	rf_strutils.c rf_utils.c rf_compat50.c rf_paritymap.c
+	rf_strutils.c rf_utils.c rf_paritymap.c
 
 SRCS+=	raidframe_component.c
 
+.if !empty(RUMP_COMPAT:M50)
+SRCS+=	rf_compat50.c
+.endif
+
 CPPFLAGS+=	-I${RUMPTOP}/librump/rumpvfs
 
 .include bsd.lib.mk

Index: src/sys/rump/kern/lib/libtty/Makefile
diff -u src/sys/rump/kern/lib/libtty/Makefile:1.3 src/sys/rump/kern/lib/libtty/Makefile:1.4
--- src/sys/rump/kern/lib/libtty/Makefile:1.3	Thu Mar 13 02:02:30 2014
+++ src/sys/rump/kern/lib/libtty/Makefile	Wed Apr 22 17:57:49 2015
@@ -1,13 +1,18 @@
-#	$NetBSD: Makefile,v 1.3 2014/03/13 02:02:30 pooka Exp $
+#	$NetBSD: Makefile,v 1.4 2015/04/22 17:57:49 pooka Exp $
 #
 
+.include bsd.init.mk
+
 .PATH:  ${.CURDIR}/../../../../kern	\
 	${.CURDIR}/../../../../compat/common
 
 LIB=	rumpkern_tty
 
 SRCS=	tty.c tty_bsdpty.c tty_conf.c tty_ptm.c tty_pty.c tty_tty.c tty_subr.c
+
+.if !empty(RUMP_COMPAT:M60)
 SRCS+=	tty_60.c
+.endif
 
 SRCS+=	tty_component.c
 

Index: src/sys/rump/librump/rumpkern/Makefile.rumpkern
diff -u src/sys/rump/librump/rumpkern/Makefile.rumpkern:1.156 src/sys/rump/librump/rumpkern/Makefile.rumpkern:1.157
--- src/sys/rump/librump/rumpkern/Makefile.rumpkern:1.156	Wed Apr 22 16:49:42 2015
+++ src/sys/rump/librump/rumpkern/Makefile.rumpkern	Wed Apr 22 17:57:49 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.rumpkern,v 1.156 2015/04/22 16:49:42 pooka Exp $
+#	$NetBSD: Makefile.rumpkern,v 1.157 2015/04/22 17:57:49 pooka Exp $
 #
 
 .include ${RUMPTOP}/Makefile.rump
@@ -153,9 +153,11 @@ SRCS+=	rijndael.c
 SRCS+=	cprng_fast.c
 
 # compat
+.if !empty(RUMP_COMPAT:M50)
 SRCS+=	kern_select_50.c
 SRCS+=	kern_time_50.c
 SRCS+=	rndpseudo_50.c
+.endif
 
 # Set RUMP_UNREAL_ALLOCATORS to yes to use memory allocation hypercalls
 # directly instead of the kmem/pool allocators backed by hypercalls.

Index: src/sys/rump/librump/rumpvfs/Makefile.rumpvfs
diff -u src/sys/rump/librump/rumpvfs/Makefile.rumpvfs:1.44 src/sys/rump/librump/rumpvfs/Makefile.rumpvfs:1.45
--- src/sys/rump/librump/rumpvfs/Makefile.rumpvfs:1.44	Wed Apr 22 17:00:59 2015
+++ src/sys/rump/librump/rumpvfs/Makefile.rumpvfs	Wed Apr 22 17:57:49 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.rumpvfs,v 1.44 2015/04/22 17:00:59 pooka Exp $
+#	$NetBSD: Makefile.rumpvfs,v 1.45 2015/04/22 17:57:49 pooka Exp $
 #
 
 .include ${RUMPTOP}/Makefile.rump
@@ -70,7 +70,9 @@ SRCS+= quota1_subr.c vfs_quotactl.c
 SRCS+=	firmload.c
 
 # compat syscalls
+.if !empty(RUMP_COMPAT:M50)
 SRCS+=	vfs_syscalls_50.c rumpvfs_compat50.c
+.endif
 
 SRCS+=	rumpvnode_if.c
 

Index: src/sys/rump/net/lib/libnet/Makefile
diff -u src/sys/rump/net/lib/libnet/Makefile:1.20 src/sys/rump/net/lib/libnet/Makefile:1.21
--- src/sys/rump/net/lib/libnet/Makefile:1.20	Thu Mar 13 02:06:32 2014
+++ src/sys/rump/net/lib/libnet/Makefile	Wed Apr 22 17:57:49 2015
@@ -1,16 +1,22 @@
-#	$NetBSD: Makefile,v 1.20 2014/03/13 02:06:32 pooka Exp $
+#	$NetBSD: Makefile,v 1.21 2015/04/22 17:57:49 pooka Exp $
 #
 
+.include bsd.init.mk
+
 .PATH:	${.CURDIR}/../../../../net ${.CURDIR}/../../../../compat/common
 
 LIB=	rumpnet_net
 
 # iffy stuff
-SRCS=	if.c if_loop.c route.c rtsock.c rtsock_50.c raw_usrreq.c	\
+SRCS=	if.c if_loop.c route.c rtsock.c raw_usrreq.c			\
 	raw_cb.c if_media.c link_proto.c net_stats.c if_ethersubr.c
-SRCS+=	if_43.c 

CVS commit: src/sys/rump

2015-04-22 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Apr 22 17:58:19 UTC 2015

Modified Files:
src/sys/rump: Makefile.rump

Log Message:
default compat to 60  70


To generate a diff of this commit:
cvs rdiff -u -r1.104 -r1.105 src/sys/rump/Makefile.rump

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

Modified files:

Index: src/sys/rump/Makefile.rump
diff -u src/sys/rump/Makefile.rump:1.104 src/sys/rump/Makefile.rump:1.105
--- src/sys/rump/Makefile.rump:1.104	Wed Apr 22 16:59:45 2015
+++ src/sys/rump/Makefile.rump	Wed Apr 22 17:58:19 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.rump,v 1.104 2015/04/22 16:59:45 pooka Exp $
+#	$NetBSD: Makefile.rump,v 1.105 2015/04/22 17:58:19 pooka Exp $
 #
 
 .if !defined(_RUMP_MK)
@@ -30,7 +30,7 @@ CPPFLAGS+=	-DMIPS1=1
 .endif
 .endif
 
-RUMP_COMPAT?=	50 60
+RUMP_COMPAT?=	60 70
 CPPFLAGS+=	${RUMP_COMPAT:C/[1-9]0/-DCOMPAT_/g}
 
 CPPFLAGS+=	-DMAXUSERS=32



CVS commit: src/sys/rump

2015-04-22 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Apr 22 17:38:33 UTC 2015

Modified Files:
src/sys/rump/include/machine: cpu.h
src/sys/rump/librump/rumpkern: intr.c rump_private.h
src/sys/rump/librump/rumpkern/arch/generic: rump_generic_cpu.c
src/sys/rump/librump/rumpkern/arch/x86: rump_x86_cpu.c

Log Message:
Apparently not all ports define struct clockframe in cpu.h, so we cannot
provide our definition that way.  Instead, generate the struct clockframe
passed to hardclock() in MD code.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/rump/include/machine/cpu.h
cvs rdiff -u -r1.51 -r1.52 src/sys/rump/librump/rumpkern/intr.c
cvs rdiff -u -r1.91 -r1.92 src/sys/rump/librump/rumpkern/rump_private.h
cvs rdiff -u -r1.1 -r1.2 \
src/sys/rump/librump/rumpkern/arch/generic/rump_generic_cpu.c
cvs rdiff -u -r1.2 -r1.3 \
src/sys/rump/librump/rumpkern/arch/x86/rump_x86_cpu.c

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

Modified files:

Index: src/sys/rump/include/machine/cpu.h
diff -u src/sys/rump/include/machine/cpu.h:1.21 src/sys/rump/include/machine/cpu.h:1.22
--- src/sys/rump/include/machine/cpu.h:1.21	Wed Apr 22 16:48:08 2015
+++ src/sys/rump/include/machine/cpu.h	Wed Apr 22 17:38:33 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.h,v 1.21 2015/04/22 16:48:08 pooka Exp $	*/
+/*	$NetBSD: cpu.h,v 1.22 2015/04/22 17:38:33 pooka Exp $	*/
 
 /*
  * Copyright (c) 2008-2011 Antti Kantee.  All Rights Reserved.
@@ -86,10 +86,6 @@ extern struct cpu_info *rumpcpu_info_lis
 	_ci_ != NULL; _ci_ = _ci_-ci_next
 #define CPU_IS_PRIMARY(_ci_)		(_ci_-ci_index == 0)
 
-
-struct clockframe {
-	int who_framed_clock;
-};
 #define CLKF_USERMODE(framep)	0
 #define CLKF_PC(framep)		0
 #define CLKF_INTR(framep)	0

Index: src/sys/rump/librump/rumpkern/intr.c
diff -u src/sys/rump/librump/rumpkern/intr.c:1.51 src/sys/rump/librump/rumpkern/intr.c:1.52
--- src/sys/rump/librump/rumpkern/intr.c:1.51	Wed Apr 22 16:49:42 2015
+++ src/sys/rump/librump/rumpkern/intr.c	Wed Apr 22 17:38:33 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: intr.c,v 1.51 2015/04/22 16:49:42 pooka Exp $	*/
+/*	$NetBSD: intr.c,v 1.52 2015/04/22 17:38:33 pooka Exp $	*/
 
 /*
  * Copyright (c) 2008-2010, 2015 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.51 2015/04/22 16:49:42 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.52 2015/04/22 17:38:33 pooka Exp $);
 
 #include sys/param.h
 #include sys/atomic.h
@@ -96,7 +96,7 @@ static void
 doclock(void *noarg)
 {
 	struct timespec thetick, curclock;
-	struct clockframe frame;
+	struct clockframe *clkframe;
 	int64_t sec;
 	long nsec;
 	int error;
@@ -111,13 +111,13 @@ doclock(void *noarg)
 	thetick.tv_sec = 0;
 	thetick.tv_nsec = 10/hz;
 
-	/* not used, so doesn't matter what we pass in */
-	memset(frame, 0, sizeof(frame));
+	/* generate dummy clockframe for hardclock to consume */
+	clkframe = rump_cpu_makeclockframe();
 
 	for (;;) {
 		int lbolt_ticks = 0;
 
-		hardclock(frame);
+		hardclock(clkframe);
 		if (CPU_IS_PRIMARY(ci)) {
 			if (++lbolt_ticks = hz) {
 lbolt_ticks = 0;

Index: src/sys/rump/librump/rumpkern/rump_private.h
diff -u src/sys/rump/librump/rumpkern/rump_private.h:1.91 src/sys/rump/librump/rumpkern/rump_private.h:1.92
--- src/sys/rump/librump/rumpkern/rump_private.h:1.91	Sat Apr 18 15:49:18 2015
+++ src/sys/rump/librump/rumpkern/rump_private.h	Wed Apr 22 17:38:33 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: rump_private.h,v 1.91 2015/04/18 15:49:18 pooka Exp $	*/
+/*	$NetBSD: rump_private.h,v 1.92 2015/04/22 17:38:33 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007-2011 Antti Kantee.  All Rights Reserved.
@@ -173,6 +173,8 @@ void	rump_user_unschedule(int, int *, vo
 
 void	rump_cpu_attach(struct cpu_info *);
 
+struct clockframe *rump_cpu_makeclockframe(void);
+
 void	rump_kernel_bigwrap(int *);
 void	rump_kernel_bigunwrap(int);
 

Index: src/sys/rump/librump/rumpkern/arch/generic/rump_generic_cpu.c
diff -u src/sys/rump/librump/rumpkern/arch/generic/rump_generic_cpu.c:1.1 src/sys/rump/librump/rumpkern/arch/generic/rump_generic_cpu.c:1.2
--- src/sys/rump/librump/rumpkern/arch/generic/rump_generic_cpu.c:1.1	Wed Feb 12 22:28:43 2014
+++ src/sys/rump/librump/rumpkern/arch/generic/rump_generic_cpu.c	Wed Apr 22 17:38:33 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: rump_generic_cpu.c,v 1.1 2014/02/12 22:28:43 pooka Exp $	*/
+/*	$NetBSD: rump_generic_cpu.c,v 1.2 2015/04/22 17:38:33 pooka Exp $	*/
 
 /*
  * Copyright (c) 2009 Antti Kantee.  All Rights Reserved.
@@ -29,7 +29,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rump_generic_cpu.c,v 1.1 2014/02/12 22:28:43 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: rump_generic_cpu.c,v 1.2 2015/04/22 17:38:33 pooka Exp $);
 
 #include sys/param.h
 
@@ -51,3 +51,10 @@ rump_cpu_attach(struct cpu_info *ci)
 	kcpuset_set(kcpuset_attached, cpu_index(ci));
 	

CVS commit: src/sys/rump

2015-04-22 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Apr 22 18:14:55 UTC 2015

Modified Files:
src/sys/rump: Makefile.rump

Log Message:
Put 50 back to compat list for a while (some fallout)


To generate a diff of this commit:
cvs rdiff -u -r1.106 -r1.107 src/sys/rump/Makefile.rump

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

Modified files:

Index: src/sys/rump/Makefile.rump
diff -u src/sys/rump/Makefile.rump:1.106 src/sys/rump/Makefile.rump:1.107
--- src/sys/rump/Makefile.rump:1.106	Wed Apr 22 18:12:39 2015
+++ src/sys/rump/Makefile.rump	Wed Apr 22 18:14:55 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.rump,v 1.106 2015/04/22 18:12:39 pooka Exp $
+#	$NetBSD: Makefile.rump,v 1.107 2015/04/22 18:14:55 pooka Exp $
 #
 
 .if !defined(_RUMP_MK)
@@ -29,7 +29,7 @@ CPPFLAGS+=	-DMIPS1=1
 .endif
 .endif
 
-RUMP_COMPAT?=	60 70
+RUMP_COMPAT?=	50 60 70
 CPPFLAGS+=	${RUMP_COMPAT:C/[1-9]0/-DCOMPAT_/g}
 
 CPPFLAGS+=	-DMAXUSERS=32



CVS commit: src/sys/rump

2015-04-22 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Apr 22 18:12:40 UTC 2015

Modified Files:
src/sys/rump: Makefile.rump
src/sys/rump/librump/rumpkern: rump.c
src/sys/rump/librump/rumpkern/arch/generic: Makefile.inc
src/sys/rump/librump/rumpkern/arch/x86: Makefile.inc
Added Files:
src/sys/rump/librump/rumpkern/arch/generic: rump_generic_abi.c
src/sys/rump/librump/rumpkern/arch/x86: rump_x86_abi.c

Log Message:
Define rump_nativeabi_p() under arch, where one would logically expect
it to be defined.


To generate a diff of this commit:
cvs rdiff -u -r1.105 -r1.106 src/sys/rump/Makefile.rump
cvs rdiff -u -r1.318 -r1.319 src/sys/rump/librump/rumpkern/rump.c
cvs rdiff -u -r1.1 -r1.2 \
src/sys/rump/librump/rumpkern/arch/generic/Makefile.inc
cvs rdiff -u -r0 -r1.1 \
src/sys/rump/librump/rumpkern/arch/generic/rump_generic_abi.c
cvs rdiff -u -r1.1 -r1.2 src/sys/rump/librump/rumpkern/arch/x86/Makefile.inc
cvs rdiff -u -r0 -r1.1 src/sys/rump/librump/rumpkern/arch/x86/rump_x86_abi.c

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

Modified files:

Index: src/sys/rump/Makefile.rump
diff -u src/sys/rump/Makefile.rump:1.105 src/sys/rump/Makefile.rump:1.106
--- src/sys/rump/Makefile.rump:1.105	Wed Apr 22 17:58:19 2015
+++ src/sys/rump/Makefile.rump	Wed Apr 22 18:12:39 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.rump,v 1.105 2015/04/22 17:58:19 pooka Exp $
+#	$NetBSD: Makefile.rump,v 1.106 2015/04/22 18:12:39 pooka Exp $
 #
 
 .if !defined(_RUMP_MK)
@@ -13,7 +13,6 @@ NOLINT=		# kernel code
 # compile-time options may override this at a later date.
 .if (${MACHINE_ARCH} == i386 || ${MACHINE_ARCH} == x86_64)
 _RUMP_NATIVEABI= yes
-CPPFLAGS+=	-D_RUMP_NATIVE_ABI
 .else
 _RUMP_NATIVEABI= no
 CPPFLAGS:=	-I${RUMPTOP}/include ${CPPFLAGS}

Index: src/sys/rump/librump/rumpkern/rump.c
diff -u src/sys/rump/librump/rumpkern/rump.c:1.318 src/sys/rump/librump/rumpkern/rump.c:1.319
--- src/sys/rump/librump/rumpkern/rump.c:1.318	Fri Apr 17 13:02:54 2015
+++ src/sys/rump/librump/rumpkern/rump.c	Wed Apr 22 18:12:39 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: rump.c,v 1.318 2015/04/17 13:02:54 pooka Exp $	*/
+/*	$NetBSD: rump.c,v 1.319 2015/04/22 18:12:39 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007-2011 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rump.c,v 1.318 2015/04/17 13:02:54 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: rump.c,v 1.319 2015/04/22 18:12:39 pooka Exp $);
 
 #include sys/systm.h
 #define ELFSIZE ARCH_ELFSIZE
@@ -686,17 +686,6 @@ rump_getversion(void)
 /* compat */
 __strong_alias(rump_pub_getversion,rump_getversion);
 
-int
-rump_nativeabi_p(void)
-{
-
-#ifdef _RUMP_NATIVE_ABI
-	return 1;
-#else
-	return 0;
-#endif
-}
-
 /*
  * Note: may be called unscheduled.  Not fully safe since no locking
  * of allevents (currently that's not even available).

Index: src/sys/rump/librump/rumpkern/arch/generic/Makefile.inc
diff -u src/sys/rump/librump/rumpkern/arch/generic/Makefile.inc:1.1 src/sys/rump/librump/rumpkern/arch/generic/Makefile.inc:1.2
--- src/sys/rump/librump/rumpkern/arch/generic/Makefile.inc:1.1	Wed Feb 12 22:28:43 2014
+++ src/sys/rump/librump/rumpkern/arch/generic/Makefile.inc	Wed Apr 22 18:12:39 2015
@@ -1,4 +1,5 @@
-#	$NetBSD: Makefile.inc,v 1.1 2014/02/12 22:28:43 pooka Exp $
+#	$NetBSD: Makefile.inc,v 1.2 2015/04/22 18:12:39 pooka Exp $
 #
 
 SRCS+=	rump_generic_cpu.c rump_generic_kobj.c rump_generic_pmap.c
+SRCS+=	rump_generic_abi.c

Index: src/sys/rump/librump/rumpkern/arch/x86/Makefile.inc
diff -u src/sys/rump/librump/rumpkern/arch/x86/Makefile.inc:1.1 src/sys/rump/librump/rumpkern/arch/x86/Makefile.inc:1.2
--- src/sys/rump/librump/rumpkern/arch/x86/Makefile.inc:1.1	Wed Feb 12 22:28:43 2014
+++ src/sys/rump/librump/rumpkern/arch/x86/Makefile.inc	Wed Apr 22 18:12:39 2015
@@ -1,7 +1,8 @@
-#	$NetBSD: Makefile.inc,v 1.1 2014/02/12 22:28:43 pooka Exp $
+#	$NetBSD: Makefile.inc,v 1.2 2015/04/22 18:12:39 pooka Exp $
 #
 
 .PATH:	${RUMPTOP}/librump/rumpkern/arch/x86
 
 SRCS+=	rump_x86_cpu.c rump_x86_spl.c rump_x86_cpu_counter.c
 SRCS+=	rump_x86_spinlock.c rump_x86_pmap.c
+SRCS+=	rump_x86_abi.c

Added files:

Index: src/sys/rump/librump/rumpkern/arch/generic/rump_generic_abi.c
diff -u /dev/null src/sys/rump/librump/rumpkern/arch/generic/rump_generic_abi.c:1.1
--- /dev/null	Wed Apr 22 18:12:40 2015
+++ src/sys/rump/librump/rumpkern/arch/generic/rump_generic_abi.c	Wed Apr 22 18:12:39 2015
@@ -0,0 +1,38 @@
+/*	$NetBSD: rump_generic_abi.c,v 1.1 2015/04/22 18:12:39 pooka Exp $	*/
+
+/*-
+ * Copyright (c) 2015 Antti Kantee.  All Rights Reserved.
+ *
+ * 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. 

CVS commit: src/distrib/hp300/miniroot

2015-04-22 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Apr 22 18:42:04 UTC 2015

Modified Files:
src/distrib/hp300/miniroot: list

Log Message:
find awk where it is now


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/distrib/hp300/miniroot/list

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

Modified files:

Index: src/distrib/hp300/miniroot/list
diff -u src/distrib/hp300/miniroot/list:1.21 src/distrib/hp300/miniroot/list:1.22
--- src/distrib/hp300/miniroot/list:1.21	Sat Nov 30 03:27:17 2013
+++ src/distrib/hp300/miniroot/list	Wed Apr 22 14:42:04 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: list,v 1.21 2013/11/30 08:27:17 nakayama Exp $
+#	$NetBSD: list,v 1.22 2015/04/22 18:42:04 christos Exp $
 
 # hp300 extra's
 PROG	sbin/disklabel
@@ -19,6 +19,7 @@ PROG	usr/sbin/installboot
 # crunchgen source directory specials
 SPECIAL	vi	srcdir external/bsd/nvi/usr.bin/nvi
 SPECIAL	less	srcdir external/bsd/less/bin/less
+SPECIAL	awk	srcdir external/historical/nawk/bin
 
 # Minimize use of MFS
 SYMLINK	/tmp	var/tmp



CVS commit: src/distrib

2015-04-22 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Apr 22 19:25:18 UTC 2015

Modified Files:
src/distrib/mac68k/miniroot: list
src/distrib/mvme68k/miniroot: list

Log Message:
fix awk


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/distrib/mac68k/miniroot/list
cvs rdiff -u -r1.23 -r1.24 src/distrib/mvme68k/miniroot/list

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

Modified files:

Index: src/distrib/mac68k/miniroot/list
diff -u src/distrib/mac68k/miniroot/list:1.14 src/distrib/mac68k/miniroot/list:1.15
--- src/distrib/mac68k/miniroot/list:1.14	Sat Nov 30 03:27:18 2013
+++ src/distrib/mac68k/miniroot/list	Wed Apr 22 15:25:18 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: list,v 1.14 2013/11/30 08:27:18 nakayama Exp $
+#	$NetBSD: list,v 1.15 2015/04/22 19:25:18 christos Exp $
 
 # mac68k extra's
 PROG	sbin/dmesg
@@ -16,7 +16,8 @@ SYMLINK	/bin/cat	usr/bin/strings
 
 # crunchgen source directory specials
 #SPECIAL	vi srcdir external/bsd/nvi/usr.bin/nvi
-SPECIAL	less srcdir external/bsd/less/bin/less
+SPECIAL	less 	srcdir external/bsd/less/bin/less
+SPECIAL	awk	srcdir external/historical/nawk/bin
 
 # Minimize use of MFS
 SYMLINK	/tmp	var/tmp

Index: src/distrib/mvme68k/miniroot/list
diff -u src/distrib/mvme68k/miniroot/list:1.23 src/distrib/mvme68k/miniroot/list:1.24
--- src/distrib/mvme68k/miniroot/list:1.23	Sat Nov 30 03:27:18 2013
+++ src/distrib/mvme68k/miniroot/list	Wed Apr 22 15:25:18 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: list,v 1.23 2013/11/30 08:27:18 nakayama Exp $
+#	$NetBSD: list,v 1.24 2015/04/22 19:25:18 christos Exp $
 
 # mvme68k's extras
 PROG	sbin/disklabel
@@ -17,6 +17,7 @@ PROG	usr/bin/less usr/bin/more
 # crunchgen source directory specials
 SPECIAL	less	srcdir external/bsd/less/bin/less
 SPECIAL	vi	srcdir external/bsd/nvi/usr.bin/nvi
+SPECIAL	awk	srcdir external/historical/nawk/bin
 
 # Minimize use of MFS
 SYMLINK	/tmp	var/tmp



CVS commit: src/share/mk

2015-04-22 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Apr 22 19:43:45 UTC 2015

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

Log Message:
Build ZFS by default only for amd64, not i386.

If we build i386 for 486 (i.e. no 64bit atomic ops) and as a substitute
for the modern hardware that the code was designed to run on use solid
workarounds like external/cddl/osnet/lib/libzpool/atomic.c, there's not
much point in anything.


To generate a diff of this commit:
cvs rdiff -u -r1.339 -r1.340 src/share/mk/bsd.README
cvs rdiff -u -r1.845 -r1.846 src/share/mk/bsd.own.mk

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

Modified files:

Index: src/share/mk/bsd.README
diff -u src/share/mk/bsd.README:1.339 src/share/mk/bsd.README:1.340
--- src/share/mk/bsd.README:1.339	Tue Mar 17 01:58:29 2015
+++ src/share/mk/bsd.README	Wed Apr 22 19:43:45 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.README,v 1.339 2015/03/17 01:58:29 mrg Exp $
+#	$NetBSD: bsd.README,v 1.340 2015/04/22 19:43:45 pooka Exp $
 #	@(#)bsd.README	8.2 (Berkeley) 4/2/94
 
 This is the README file for the make include files for the NetBSD
@@ -423,8 +423,9 @@ MKYP		If no, disables building of YP (
 
 MKZFS		If no, do not build and install utilities and libraries
 		used to manage ZFS file system. Do not build zfs and solaris
-		compatibility kernel modules.
-		Default: yes on i386/amd64, no elsewhere.
+		compatibility kernel modules.  Note: ZFS requires 64bit
+		atomic operations.
+		Default: yes on amd64, no elsewhere.
 
 MKRUMP		If no, do not build and install rump related headers,
 		libraries, and programs.

Index: src/share/mk/bsd.own.mk
diff -u src/share/mk/bsd.own.mk:1.845 src/share/mk/bsd.own.mk:1.846
--- src/share/mk/bsd.own.mk:1.845	Wed Apr  8 06:03:09 2015
+++ src/share/mk/bsd.own.mk	Wed Apr 22 19:43:45 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.own.mk,v 1.845 2015/04/08 06:03:09 mrg Exp $
+#	$NetBSD: bsd.own.mk,v 1.846 2015/04/22 19:43:45 pooka Exp $
 
 # This needs to be before bsd.init.mk
 .if defined(BSD_MK_COMPAT_FILE)
@@ -945,9 +945,9 @@ MKBINUTILS?=	${MKBFD}
 .endif
 
 #
-# We want to build zfs only for i386 and amd64 by default for now.
+# We want to build zfs only for amd64 by default for now.
 #
-.if ${MACHINE} == amd64 || ${MACHINE} == i386
+.if ${MACHINE} == amd64
 MKZFS?=		yes
 .endif
 



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

2015-04-22 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Apr 22 19:48:01 UTC 2015

Modified Files:
src/sys/arch/i386/include: types.h

Log Message:
Revise rhetoric for why __HAVE_ATOMIC64_OPS is defined with _KERNEL even
though we don't know for sure that the target i386 CPU will support them.


To generate a diff of this commit:
cvs rdiff -u -r1.79 -r1.80 src/sys/arch/i386/include/types.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/i386/include/types.h
diff -u src/sys/arch/i386/include/types.h:1.79 src/sys/arch/i386/include/types.h:1.80
--- src/sys/arch/i386/include/types.h:1.79	Thu Apr 24 19:23:00 2014
+++ src/sys/arch/i386/include/types.h	Wed Apr 22 19:48:01 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: types.h,v 1.79 2014/04/24 19:23:00 christos Exp $	*/
+/*	$NetBSD: types.h,v 1.80 2015/04/22 19:48:01 pooka Exp $	*/
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -109,12 +109,13 @@ typedef	volatile unsigned char		__cpu_si
 #define	__HAVE_SYSCALL_INTERN
 #define	__HAVE_MINIMAL_EMUL
 #define	__HAVE_OLD_DISKLABEL
-#if defined(_KERNEL)  !defined(_RUMPKERNEL)  !defined(_RUMP_NATIVE_ABI)
+#if defined(_KERNEL)
 /*
  * Processors  i586 do not have cmpxchg8b, and we compile for i486
- * by default in userland. The kernel tsc driver uses them though,
- * and handles  i586 * by patching. We don't want to expose them in
- * userland, that is why we exclude rump.
+ * by default. The kernel tsc driver uses them though, and handles  i586
+ * by patching.  E.g. rump kernels and crash(8) and a selection of
+ * other run-in-userspace code defines _KERNEL, but is careful not to
+ * build anything using 64bit atomic ops by default.
  */
 #define __HAVE_ATOMIC64_OPS
 #endif



CVS commit: src/sys

2015-04-22 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Wed Apr 22 19:46:09 UTC 2015

Modified Files:
src/sys/net: if.c
src/sys/netinet6: in6.c in6.h in6_proto.c
src/sys/sys: domain.h

Log Message:
Move INET6 specific in6_if_{up,down}() and in6_if_link_{up,down}()
into agnostic domain functions.


To generate a diff of this commit:
cvs rdiff -u -r1.311 -r1.312 src/sys/net/if.c
cvs rdiff -u -r1.187 -r1.188 src/sys/netinet6/in6.c
cvs rdiff -u -r1.83 -r1.84 src/sys/netinet6/in6.h
cvs rdiff -u -r1.104 -r1.105 src/sys/netinet6/in6_proto.c
cvs rdiff -u -r1.31 -r1.32 src/sys/sys/domain.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/net/if.c
diff -u src/sys/net/if.c:1.311 src/sys/net/if.c:1.312
--- src/sys/net/if.c:1.311	Tue Apr 21 10:39:41 2015
+++ src/sys/net/if.c	Wed Apr 22 19:46:08 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: if.c,v 1.311 2015/04/21 10:39:41 pooka Exp $	*/
+/*	$NetBSD: if.c,v 1.312 2015/04/22 19:46:08 roy Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2008 The NetBSD Foundation, Inc.
@@ -90,7 +90,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if.c,v 1.311 2015/04/21 10:39:41 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: if.c,v 1.312 2015/04/22 19:46:08 roy Exp $);
 
 #if defined(_KERNEL_OPT)
 #include opt_inet.h
@@ -1423,9 +1423,8 @@ void
 if_link_state_change(struct ifnet *ifp, int link_state)
 {
 	int s;
-#if defined(DEBUG) || defined(INET6)
 	int old_link_state;
-#endif
+	struct domain *dp;
 
 	s = splnet();
 	if (ifp-if_link_state == link_state) {
@@ -1433,9 +1432,7 @@ if_link_state_change(struct ifnet *ifp, 
 		return;
 	}
 
-#if defined(DEBUG) || defined(INET6)
 	old_link_state = ifp-if_link_state;
-#endif
 	ifp-if_link_state = link_state;
 #ifdef DEBUG
 	log(LOG_DEBUG, %s: link state %s (was %s)\n, ifp-if_xname,
@@ -1447,7 +1444,6 @@ if_link_state_change(struct ifnet *ifp, 
 		UNKNOWN);
 #endif
 
-#ifdef INET6
 	/*
 	 * When going from UNKNOWN to UP, we need to mark existing
 	 * IPv6 addresses as tentative and restart DAD as we may have
@@ -1457,10 +1453,15 @@ if_link_state_change(struct ifnet *ifp, 
 	 * listeners would have an address and expect it to work right
 	 * away.
 	 */
-	if (in6_present  link_state == LINK_STATE_UP 
+	if (link_state == LINK_STATE_UP 
 	old_link_state == LINK_STATE_UNKNOWN)
-		in6_if_link_down(ifp);
-#endif
+	{
+		DOMAIN_FOREACH(dp) {
+			if (dp-dom_if_link_state_change != NULL)
+dp-dom_if_link_state_change(ifp,
+LINK_STATE_DOWN);
+		}
+	}
 
 	/* Notify that the link state has changed. */
 	rt_ifmsg(ifp);
@@ -1470,14 +1471,10 @@ if_link_state_change(struct ifnet *ifp, 
 		carp_carpdev_state(ifp);
 #endif
 
-#ifdef INET6
-	if (in6_present) {
-		if (link_state == LINK_STATE_DOWN)
-			in6_if_link_down(ifp);
-		else if (link_state == LINK_STATE_UP)
-			in6_if_link_up(ifp);
+	DOMAIN_FOREACH(dp) {
+		if (dp-dom_if_link_state_change != NULL)
+			dp-dom_if_link_state_change(ifp, link_state);
 	}
-#endif
 
 	splx(s);
 }
@@ -1543,6 +1540,7 @@ void
 if_down(struct ifnet *ifp)
 {
 	struct ifaddr *ifa;
+	struct domain *dp;
 
 	ifp-if_flags = ~IFF_UP;
 	nanotime(ifp-if_lastchange);
@@ -1554,10 +1552,10 @@ if_down(struct ifnet *ifp)
 		carp_carpdev_state(ifp);
 #endif
 	rt_ifmsg(ifp);
-#ifdef INET6
-	if (in6_present)
-		in6_if_down(ifp);
-#endif
+	DOMAIN_FOREACH(dp) {
+		if (dp-dom_if_down)
+			dp-dom_if_down(ifp);
+	}
 }
 
 /*
@@ -1571,6 +1569,7 @@ if_up(struct ifnet *ifp)
 #ifdef notyet
 	struct ifaddr *ifa;
 #endif
+	struct domain *dp;
 
 	ifp-if_flags |= IFF_UP;
 	nanotime(ifp-if_lastchange);
@@ -1584,10 +1583,10 @@ if_up(struct ifnet *ifp)
 		carp_carpdev_state(ifp);
 #endif
 	rt_ifmsg(ifp);
-#ifdef INET6
-	if (in6_present)
-		in6_if_up(ifp);
-#endif
+	DOMAIN_FOREACH(dp) {
+		if (dp-dom_if_down)
+			dp-dom_if_down(ifp);
+	}
 }
 
 /*
@@ -2067,13 +2066,11 @@ doifioctl(struct socket *so, u_long cmd,
 	}
 
 	if (((oif_flags ^ ifp-if_flags)  IFF_UP) != 0) {
-#ifdef INET6
-		if (in6_present  (ifp-if_flags  IFF_UP) != 0) {
+		if ((ifp-if_flags  IFF_UP) != 0) {
 			int s = splnet();
-			in6_if_up(ifp);
+			if_up(ifp);
 			splx(s);
 		}
-#endif
 	}
 #ifdef COMPAT_OIFREQ
 	if (cmd != ocmd)

Index: src/sys/netinet6/in6.c
diff -u src/sys/netinet6/in6.c:1.187 src/sys/netinet6/in6.c:1.188
--- src/sys/netinet6/in6.c:1.187	Mon Apr 20 10:19:54 2015
+++ src/sys/netinet6/in6.c	Wed Apr 22 19:46:08 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: in6.c,v 1.187 2015/04/20 10:19:54 roy Exp $	*/
+/*	$NetBSD: in6.c,v 1.188 2015/04/22 19:46:08 roy Exp $	*/
 /*	$KAME: in6.c,v 1.198 2001/07/18 09:12:38 itojun Exp $	*/
 
 /*
@@ -62,7 +62,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: in6.c,v 1.187 2015/04/20 10:19:54 roy Exp $);
+__KERNEL_RCSID(0, $NetBSD: in6.c,v 1.188 2015/04/22 19:46:08 roy Exp $);
 
 #include opt_inet.h
 #include opt_compat_netbsd.h
@@ -2099,6 +2099,20 @@ in6_if_down(struct ifnet *ifp)
 	in6_if_link_down(ifp);
 }
 
+void

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

2015-04-22 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Thu Apr 23 01:20:20 UTC 2015

Modified Files:
src/sys/arch/mips/ingenic: ingenic_regs.h

Log Message:
more bits  registers


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/mips/ingenic/ingenic_regs.h

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

Modified files:

Index: src/sys/arch/mips/ingenic/ingenic_regs.h
diff -u src/sys/arch/mips/ingenic/ingenic_regs.h:1.14 src/sys/arch/mips/ingenic/ingenic_regs.h:1.15
--- src/sys/arch/mips/ingenic/ingenic_regs.h:1.14	Tue Apr 21 19:56:01 2015
+++ src/sys/arch/mips/ingenic/ingenic_regs.h	Thu Apr 23 01:20:20 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: ingenic_regs.h,v 1.14 2015/04/21 19:56:01 macallan Exp $ */
+/*	$NetBSD: ingenic_regs.h,v 1.15 2015/04/23 01:20:20 macallan Exp $ */
 
 /*-
  * Copyright (c) 2014 Michael Lorenz
@@ -181,12 +181,39 @@ MFC0(uint32_t r, uint32_t s)
 	#define JZ_PLLBP	0x0002	/* PLL bypass */
 	#define JZ_PLLEN	0x0001	/* PLL enable */
 #define JZ_CLKGR0	0x1020	/* CLocK Gating Registers */
+	#define CLK_NEMC	(1  0)
+	#define CLK_BCH		(1  1)
 	#define CLK_OTG0	(1  2)
+	#define CLK_MSC0	(1  3)
+	#define CLK_SSI0	(1  4)
 	#define CLK_SMB0	(1  5)
 	#define CLK_SMB1	(1  6)
+	#define CLK_SCC		(1  7)
+	#define CLK_AIC		(1  8)
+	#define CLK_TSSI0	(1  9)
+	#define CLK_OWI		(1  10)
+	#define CLK_MSC1	(1  11)
+	#define CLK_MSC2	(1  12)
+	#define CLK_KBC		(1  13)
+	#define CLK_SADC	(1  14)
+	#define CLK_UART0	(1  15)
+	#define CLK_UART1	(1  16)
+	#define CLK_UART2	(1  17)
+	#define CLK_UART3	(1  18)
+	#define CLK_SSI1	(1  19)
+	#define CLK_SSI2	(1  20)
+	#define CLK_PDMA	(1  21)
+	#define CLK_GPS		(1  22)
+	#define CLK_MAC		(1  23)
 	#define CLK_UHC		(1  24)
 	#define CLK_SMB2	(1  25)
+	#define CLK_CIM		(1  26)
+	#define CLK_TVE		(1  27)
 	#define CLK_LCD		(1  28)
+	#define CLK_IPU		(1  29)
+	#define CLK_DDR0	(1  30)
+	#define CLK_DDR1	(1  31)
+
 #define JZ_OPCR		0x1024	/* Oscillator Power Control Reg. */
 	#define OPCR_IDLE_DIS	0x8000	/* don't stop CPU clk on idle */
 	#define OPCR_GPU_CLK_ST	0x4000	/* stop GPU clock */
@@ -204,10 +231,21 @@ MFC0(uint32_t r, uint32_t s)
 	#define OPCR_OSE	0x0001	/* disable EXTCLK */
 #define JZ_CLKGR1	0x1028	/* CLocK Gating Registers */
 	#define CLK_SMB3	(1  0)
+	#define CLK_TSSI1	(1  1)
+	#define CLK_VPU		(1  2)
+	#define CLK_PCM		(1  3)
+	#define CLK_GPU		(1  4)
+	#define CLK_COMPRESS	(1  5)
+	#define CLK_AIC1	(1  6)
+	#define CLK_GPVLC	(1  7)
 	#define CLK_OTG1	(1  8)
 	#define CLK_HDMI	(1  9)
+	#define CLK_UART4	(1  10)
 	#define CLK_AHB_MON	(1  11)
 	#define CLK_SMB4	(1  12)
+	#define CLK_DES		(1  13)
+	#define CLK_X2D		(1  14)
+	#define CLK_P1		(1  15)
 
 #define JZ_USBPCR	0x103c
 	#define PCR_USB_MODE		0x8000	/* 1 - otg */
@@ -514,4 +552,9 @@ gpio_as_intr_level(uint32_t g, int pin)
 #define JZ_SMBSDAHD	0xD0 /* SMB SDA HolD time Register */
 	#define JZ_HDENB	0x100	/* enable hold time */
 
+/* SD/MMC hosts */
+#define JZ_MSC0_BASE	0x1345
+#define JZ_MSC1_BASE	0x1346
+#define JZ_MSC2_BASE	0x1347
+
 #endif /* INGENIC_REGS_H */



CVS commit: src/share/misc

2015-04-22 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Thu Apr 23 02:01:12 UTC 2015

Modified Files:
src/share/misc: Makefile

Log Message:
set FILESBUILD_acronyms-o=yes so that non BUILD= builds work.
from christos.


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/share/misc/Makefile

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

Modified files:

Index: src/share/misc/Makefile
diff -u src/share/misc/Makefile:1.37 src/share/misc/Makefile:1.38
--- src/share/misc/Makefile:1.37	Tue Apr 21 22:40:37 2015
+++ src/share/misc/Makefile	Thu Apr 23 02:01:12 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.37 2015/04/21 22:40:37 christos Exp $
+#	$NetBSD: Makefile,v 1.38 2015/04/23 02:01:12 mrg Exp $
 #	@(#)Makefile	8.1 (Berkeley) 6/8/93
 
 FILES=	NetBSD.el acronyms acronyms-o acronyms.comp airport ascii \
@@ -19,6 +19,7 @@ TYPE=	real
 TYPE=	fake
 .endif
 CLEANFILES+=acronyms-o
+FILESBUILD_acronyms-o=yes
 
 # According to i...@isi.edu, the URL below is the authoritative list
 # distributed by the ISO 3166 Maintenance Agency.



CVS commit: src/share/misc

2015-04-22 Thread Blue Rats
Module Name:src
Committed By:   rodent
Date:   Wed Apr 22 22:58:41 UTC 2015

Modified Files:
src/share/misc: acronyms

Log Message:
+SJW :)


To generate a diff of this commit:
cvs rdiff -u -r1.230 -r1.231 src/share/misc/acronyms

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

Modified files:

Index: src/share/misc/acronyms
diff -u src/share/misc/acronyms:1.230 src/share/misc/acronyms:1.231
--- src/share/misc/acronyms:1.230	Tue Apr 21 22:40:37 2015
+++ src/share/misc/acronyms	Wed Apr 22 22:58:41 2015
@@ -1,4 +1,4 @@
-$NetBSD: acronyms,v 1.230 2015/04/21 22:40:37 christos Exp $
+$NetBSD: acronyms,v 1.231 2015/04/22 22:58:41 rodent Exp $
 10Q	thank you
 10X	thanks
 1337	elite (leet)
@@ -435,6 +435,7 @@ SFAICT	so far as I can tell
 SHID	slaps head in disgust
 SIMCA	sitting in my chair amused
 SITD	still in the dark
+SJW	social justice {warrior,warriors}
 SMH	shaking my head
 SMLSFB	so many losers, so few bullets
 SMOP	simple matter of programming



CVS commit: src/sys/net

2015-04-22 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Wed Apr 22 20:49:45 UTC 2015

Modified Files:
src/sys/net: if.c

Log Message:
This comment is no longer IPv6 specific.


To generate a diff of this commit:
cvs rdiff -u -r1.313 -r1.314 src/sys/net/if.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/net/if.c
diff -u src/sys/net/if.c:1.313 src/sys/net/if.c:1.314
--- src/sys/net/if.c:1.313	Wed Apr 22 20:42:32 2015
+++ src/sys/net/if.c	Wed Apr 22 20:49:44 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: if.c,v 1.313 2015/04/22 20:42:32 roy Exp $	*/
+/*	$NetBSD: if.c,v 1.314 2015/04/22 20:49:44 roy Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2008 The NetBSD Foundation, Inc.
@@ -90,7 +90,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if.c,v 1.313 2015/04/22 20:42:32 roy Exp $);
+__KERNEL_RCSID(0, $NetBSD: if.c,v 1.314 2015/04/22 20:49:44 roy Exp $);
 
 #if defined(_KERNEL_OPT)
 #include opt_inet.h
@@ -1446,7 +1446,7 @@ if_link_state_change(struct ifnet *ifp, 
 
 	/*
 	 * When going from UNKNOWN to UP, we need to mark existing
-	 * IPv6 addresses as tentative and restart DAD as we may have
+	 * addresses as tentative and restart DAD as we may have
 	 * erroneously not found a duplicate.
 	 *
 	 * This needs to happen before rt_ifmsg to avoid a race where



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

2015-04-22 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Apr 22 23:04:16 UTC 2015

Modified Files:
src/sys/arch/evbarm/conf: std.awin

Log Message:
Revert back to IS_CURCPU until panics with CURLWP are solved.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/evbarm/conf/std.awin

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/std.awin
diff -u src/sys/arch/evbarm/conf/std.awin:1.6 src/sys/arch/evbarm/conf/std.awin:1.7
--- src/sys/arch/evbarm/conf/std.awin:1.6	Mon Apr 20 00:11:27 2015
+++ src/sys/arch/evbarm/conf/std.awin	Wed Apr 22 23:04:16 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: std.awin,v 1.6 2015/04/20 00:11:27 matt Exp $
+#	$NetBSD: std.awin,v 1.7 2015/04/22 23:04:16 matt Exp $
 #
 # standard NetBSD/evbarm for Allwinner based options
 
@@ -16,7 +16,7 @@ options 	CORTEX_PMC
 options 	__HAVE_FAST_SOFTINTS		# should be in types.h
 options 	ARM_HAS_VBAR
 options 	__HAVE_MM_MD_DIRECT_MAPPED_PHYS
-options 	TPIDRPRW_IS_CURLWP
+options 	TPIDRPRW_IS_CURCPU
 options 	KERNEL_BASE_EXT=0x8000
 options 	FPU_VFP
 options 	GTTWSI_ALLWINNER



CVS commit: src/sys/net

2015-04-22 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Wed Apr 22 20:42:32 UTC 2015

Modified Files:
src/sys/net: if.c

Log Message:
Fix a copy n pasta error with prior.


To generate a diff of this commit:
cvs rdiff -u -r1.312 -r1.313 src/sys/net/if.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/net/if.c
diff -u src/sys/net/if.c:1.312 src/sys/net/if.c:1.313
--- src/sys/net/if.c:1.312	Wed Apr 22 19:46:08 2015
+++ src/sys/net/if.c	Wed Apr 22 20:42:32 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: if.c,v 1.312 2015/04/22 19:46:08 roy Exp $	*/
+/*	$NetBSD: if.c,v 1.313 2015/04/22 20:42:32 roy Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2008 The NetBSD Foundation, Inc.
@@ -90,7 +90,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if.c,v 1.312 2015/04/22 19:46:08 roy Exp $);
+__KERNEL_RCSID(0, $NetBSD: if.c,v 1.313 2015/04/22 20:42:32 roy Exp $);
 
 #if defined(_KERNEL_OPT)
 #include opt_inet.h
@@ -1584,8 +1584,8 @@ if_up(struct ifnet *ifp)
 #endif
 	rt_ifmsg(ifp);
 	DOMAIN_FOREACH(dp) {
-		if (dp-dom_if_down)
-			dp-dom_if_down(ifp);
+		if (dp-dom_if_up)
+			dp-dom_if_up(ifp);
 	}
 }
 



CVS commit: src/tests/dev/sysmon

2015-04-22 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Apr 23 04:49:37 UTC 2015

Modified Files:
src/tests/dev/sysmon: t_swwdog.c

Log Message:
When exiting, provide a reason.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tests/dev/sysmon/t_swwdog.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/dev/sysmon/t_swwdog.c
diff -u src/tests/dev/sysmon/t_swwdog.c:1.5 src/tests/dev/sysmon/t_swwdog.c:1.6
--- src/tests/dev/sysmon/t_swwdog.c:1.5	Sun Jun 26 12:14:59 2011
+++ src/tests/dev/sysmon/t_swwdog.c	Thu Apr 23 04:49:37 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_swwdog.c,v 1.5 2011/06/26 12:14:59 christos Exp $	*/
+/*	$NetBSD: t_swwdog.c,v 1.6 2015/04/23 04:49:37 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 2010 Antti Kantee.  All Rights Reserved.
@@ -121,6 +121,7 @@ testbody(int max)
 		_exit(2);
 	}
 	/* fail */
+	printf(no watchdog registered!\n);
 	_exit(1);
 }
 



CVS commit: src/sys/rump/librump/rumpkern/arch

2015-04-22 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Apr 22 20:10:56 UTC 2015

Modified Files:
src/sys/rump/librump/rumpkern/arch/alpha: Makefile.inc
src/sys/rump/librump/rumpkern/arch/arm: Makefile.inc
src/sys/rump/librump/rumpkern/arch/mips: Makefile.inc
src/sys/rump/librump/rumpkern/arch/powerpc: Makefile.inc

Log Message:
Apparently new source files need to be added to each Makefile.inc
individually.  Who comes up with this kind of crappy build infra?


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
src/sys/rump/librump/rumpkern/arch/alpha/Makefile.inc
cvs rdiff -u -r1.4 -r1.5 src/sys/rump/librump/rumpkern/arch/arm/Makefile.inc
cvs rdiff -u -r1.2 -r1.3 src/sys/rump/librump/rumpkern/arch/mips/Makefile.inc
cvs rdiff -u -r1.5 -r1.6 \
src/sys/rump/librump/rumpkern/arch/powerpc/Makefile.inc

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

Modified files:

Index: src/sys/rump/librump/rumpkern/arch/alpha/Makefile.inc
diff -u src/sys/rump/librump/rumpkern/arch/alpha/Makefile.inc:1.3 src/sys/rump/librump/rumpkern/arch/alpha/Makefile.inc:1.4
--- src/sys/rump/librump/rumpkern/arch/alpha/Makefile.inc:1.3	Wed Feb 12 22:28:43 2014
+++ src/sys/rump/librump/rumpkern/arch/alpha/Makefile.inc	Wed Apr 22 20:10:56 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.3 2014/02/12 22:28:43 pooka Exp $
+#	$NetBSD: Makefile.inc,v 1.4 2015/04/22 20:10:56 pooka Exp $
 #
 
 # some stubs
@@ -8,4 +8,4 @@ SRCS+=	rumpcrud.c
 SRCS+=  kobj_machdep.c
 
 .PATH:	${RUMPTOP}/librump/rumpkern/arch/generic
-SRCS+=	rump_generic_cpu.c rump_generic_pmap.c
+SRCS+=	rump_generic_abi.c rump_generic_cpu.c rump_generic_pmap.c

Index: src/sys/rump/librump/rumpkern/arch/arm/Makefile.inc
diff -u src/sys/rump/librump/rumpkern/arch/arm/Makefile.inc:1.4 src/sys/rump/librump/rumpkern/arch/arm/Makefile.inc:1.5
--- src/sys/rump/librump/rumpkern/arch/arm/Makefile.inc:1.4	Tue Jun 17 08:50:48 2014
+++ src/sys/rump/librump/rumpkern/arch/arm/Makefile.inc	Wed Apr 22 20:10:56 2015
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.4 2014/06/17 08:50:48 alnsn Exp $
+# $NetBSD: Makefile.inc,v 1.5 2015/04/22 20:10:56 pooka Exp $
 
 CPPFLAGS+=	-DARCH_ELFSIZE=32
 
@@ -6,4 +6,4 @@ CPPFLAGS+=	-DARCH_ELFSIZE=32
 SRCS+=  	kobj_machdep.c
 
 .PATH:	${RUMPTOP}/librump/rumpkern/arch/generic
-SRCS+=  	rump_generic_cpu.c rump_generic_pmap.c
+SRCS+=  	rump_generic_abi.c rump_generic_cpu.c rump_generic_pmap.c

Index: src/sys/rump/librump/rumpkern/arch/mips/Makefile.inc
diff -u src/sys/rump/librump/rumpkern/arch/mips/Makefile.inc:1.2 src/sys/rump/librump/rumpkern/arch/mips/Makefile.inc:1.3
--- src/sys/rump/librump/rumpkern/arch/mips/Makefile.inc:1.2	Wed Feb 12 22:28:43 2014
+++ src/sys/rump/librump/rumpkern/arch/mips/Makefile.inc	Wed Apr 22 20:10:56 2015
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile.inc,v 1.2 2014/02/12 22:28:43 pooka Exp $
+# $NetBSD: Makefile.inc,v 1.3 2015/04/22 20:10:56 pooka Exp $
 
 CPPFLAGS+=	-DARCH_ELFSIZE=32
 
 .PATH:	${RUMPTOP}/librump/rumpkern/arch/generic
+SRCS+=	rump_generic_abi.c
 SRCS+= 	rump_generic_cpu.c rump_generic_kobj.c rump_generic_pmap.c

Index: src/sys/rump/librump/rumpkern/arch/powerpc/Makefile.inc
diff -u src/sys/rump/librump/rumpkern/arch/powerpc/Makefile.inc:1.5 src/sys/rump/librump/rumpkern/arch/powerpc/Makefile.inc:1.6
--- src/sys/rump/librump/rumpkern/arch/powerpc/Makefile.inc:1.5	Fri Mar  7 05:49:05 2014
+++ src/sys/rump/librump/rumpkern/arch/powerpc/Makefile.inc	Wed Apr 22 20:10:56 2015
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.5 2014/03/07 05:49:05 matt Exp $
+# $NetBSD: Makefile.inc,v 1.6 2015/04/22 20:10:56 pooka Exp $
 
 .if ${MACHINE_ARCH} == powerpc \
 || (defined(MLIBDIR)  ${MLIBDIR} == powerpc)
@@ -8,4 +8,5 @@ CPPFLAGS+=	-DARCH_ELFSIZE=64
 .endif
 
 .PATH:	${RUMPTOP}/librump/rumpkern/arch/generic
+SRCS+=	rump_generic_abi.c
 SRCS+=	rump_generic_cpu.c rump_generic_kobj.c rump_generic_pmap.c



CVS commit: src/distrib/atari/floppies/install

2015-04-22 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Apr 22 20:21:11 UTC 2015

Modified Files:
src/distrib/atari/floppies/install: Makefile

Log Message:
double the size of the image to fix the build


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/distrib/atari/floppies/install/Makefile

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

Modified files:

Index: src/distrib/atari/floppies/install/Makefile
diff -u src/distrib/atari/floppies/install/Makefile:1.2 src/distrib/atari/floppies/install/Makefile:1.3
--- src/distrib/atari/floppies/install/Makefile:1.2	Thu May  2 14:02:28 2002
+++ src/distrib/atari/floppies/install/Makefile	Wed Apr 22 16:21:11 2015
@@ -1,7 +1,7 @@
-#	$NetBSD: Makefile,v 1.2 2002/05/02 18:02:28 lukem Exp $
+#	$NetBSD: Makefile,v 1.3 2015/04/22 20:21:11 christos Exp $
 
 IMAGE=		sysinst.fs
-IMAGESIZE?=	1440k
+IMAGESIZE?=	2880k
 MAKEDEVTARGETS=	floppy
 USE_SYSINST=	yes
 MAKEFS_FLAGS=	-f 10



CVS commit: src/external/bsd/wpa/dist/src/p2p

2015-04-22 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Apr 22 20:24:20 UTC 2015

Modified Files:
src/external/bsd/wpa/dist/src/p2p: p2p.c

Log Message:
Fix potential buffer overflow:
http://w1.fi/security/2015-1/0001-P2P-Validate-SSID-element-length-before-copying-it-C.patch

XXX: pullup-[67]


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.5 -r1.2 src/external/bsd/wpa/dist/src/p2p/p2p.c

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

Modified files:

Index: src/external/bsd/wpa/dist/src/p2p/p2p.c
diff -u src/external/bsd/wpa/dist/src/p2p/p2p.c:1.1.1.5 src/external/bsd/wpa/dist/src/p2p/p2p.c:1.2
--- src/external/bsd/wpa/dist/src/p2p/p2p.c:1.1.1.5	Wed Apr  1 15:24:46 2015
+++ src/external/bsd/wpa/dist/src/p2p/p2p.c	Wed Apr 22 16:24:20 2015
@@ -778,6 +778,7 @@ int p2p_add_device(struct p2p_data *p2p,
 	if (os_memcmp(addr, p2p_dev_addr, ETH_ALEN) != 0)
 		os_memcpy(dev-interface_addr, addr, ETH_ALEN);
 	if (msg.ssid 
+	msg.ssid[1] = sizeof(dev-oper_ssid) 
 	(msg.ssid[1] != P2P_WILDCARD_SSID_LEN ||
 	 os_memcmp(msg.ssid + 2, P2P_WILDCARD_SSID, P2P_WILDCARD_SSID_LEN)
 	 != 0)) {



CVS commit: [netbsd-7] src

2015-04-22 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Wed Apr 22 07:18:58 UTC 2015

Modified Files:
src/distrib/sets/lists/base [netbsd-7]: ad.aarch64 ad.arm ad.mips
ad.powerpc md.amd64 md.sparc64 shl.mi
src/distrib/sets/lists/comp [netbsd-7]: mi
src/distrib/sets/lists/debug [netbsd-7]: ad.aarch64 ad.arm ad.mips
ad.powerpc md.amd64 md.sparc64 shl.mi
src/include [netbsd-7]: inttypes.h
src/lib/libc [netbsd-7]: shlib_version
src/lib/libc/stdlib [netbsd-7]: Makefile.inc strtol.3 strtoul.3
src/sys/lib/libkern [netbsd-7]: Makefile.libkern libkern.h
src/tools/compat [netbsd-7]: Makefile compat_defs.h configure
configure.ac nbtool_config.h.in
Added Files:
src/common/lib/libc/stdlib [netbsd-7]: _strtoi.h strtoi.c strtou.c

Log Message:
Pull up following revision(s) (requested by roy in ticket #648):
common/lib/libc/stdlib/_strtoi.h: revisions 1.1, 1.2
common/lib/libc/stdlib/strtoi.c: revision 1.1
common/lib/libc/stdlib/strtou.c: revision 1.1
distrib/sets/lists/base/ad.aarch64: patch
distrib/sets/lists/base/ad.arm: patch
distrib/sets/lists/base/ad.mips: patch
distrib/sets/lists/base/ad.powerpc: patch
distrib/sets/lists/base/md.amd64: patch
distrib/sets/lists/base/md.sparc64: patch
distrib/sets/lists/base/shl.mi: patch
distrib/sets/lists/comp/mi: revision 1.1939
distrib/sets/lists/debug/ad.aarch64: patch
distrib/sets/lists/debug/ad.arm: patch
distrib/sets/lists/debug/ad.mips: patch
distrib/sets/lists/debug/ad.powerpc: patch
distrib/sets/lists/debug/md.amd64: patch
distrib/sets/lists/debug/md.sparc64: patch
distrib/sets/lists/debug/shl.mi: patch
include/inttypes.h: revision 1.11
lib/libc/shlib_version: patch
lib/libc/stdlib/Makefile.inc: revision 1.84
lib/libc/stdlib/strtol.3: revisions 1.27-1.31
lib/libc/stdlib/strtoul.3: revisions 1.26-1.29
sys/lib/libkern/Makefile.libkern: revision 1.37
sys/lib/libkern/libkern.h: revision 1.117
tools/compat/Makefile: revision 1.73
tools/compat/compat_defs.h: revision 1.101
tools/compat/configure.ac: revision 1.83
tools/compat/configure: revision 1.82
tools/compat/nbtool_config.h.in: revision 1.36
add strto{i,u} from Kamil Rytarowski as discussed in tech-userlevel.
--
strtoi and strtou additions
--
strtoi and strtou for the kernel
--
strtoi and strtou additions
--
strtoi and strtou man pages
--
strto{i,u}
--
regen
--
Remove trailing whitespace.
--
match variable names with man page (Kamil Rytarowski)
--
cleanups from (Kamil Rytarowski)
--
add strtoi strtou (Kamil Rytarowski)
--
PR/49640: Kamil Rytarowski: Improve error printing
--
Use existing month for Dd.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.2.2.2 src/common/lib/libc/stdlib/_strtoi.h
cvs rdiff -u -r0 -r1.1.2.2 src/common/lib/libc/stdlib/strtoi.c \
src/common/lib/libc/stdlib/strtou.c
cvs rdiff -u -r1.2.2.3 -r1.2.2.4 src/distrib/sets/lists/base/ad.aarch64
cvs rdiff -u -r1.54.2.5 -r1.54.2.6 src/distrib/sets/lists/base/ad.arm
cvs rdiff -u -r1.48.2.5 -r1.48.2.6 src/distrib/sets/lists/base/ad.mips
cvs rdiff -u -r1.17.2.4 -r1.17.2.5 src/distrib/sets/lists/base/ad.powerpc
cvs rdiff -u -r1.244.2.5 -r1.244.2.6 src/distrib/sets/lists/base/md.amd64
cvs rdiff -u -r1.232.2.5 -r1.232.2.6 src/distrib/sets/lists/base/md.sparc64
cvs rdiff -u -r1.712.2.5 -r1.712.2.6 src/distrib/sets/lists/base/shl.mi
cvs rdiff -u -r1.1906.2.4 -r1.1906.2.5 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.2.2.4 -r1.2.2.5 src/distrib/sets/lists/debug/ad.aarch64
cvs rdiff -u -r1.42.2.5 -r1.42.2.6 src/distrib/sets/lists/debug/ad.arm
cvs rdiff -u -r1.38.2.5 -r1.38.2.6 src/distrib/sets/lists/debug/ad.mips
cvs rdiff -u -r1.18.2.5 -r1.18.2.6 src/distrib/sets/lists/debug/ad.powerpc
cvs rdiff -u -r1.63.2.5 -r1.63.2.6 src/distrib/sets/lists/debug/md.amd64
cvs rdiff -u -r1.61.2.5 -r1.61.2.6 src/distrib/sets/lists/debug/md.sparc64
cvs rdiff -u -r1.71.2.9 -r1.71.2.10 src/distrib/sets/lists/debug/shl.mi
cvs rdiff -u -r1.10 -r1.10.6.1 src/include/inttypes.h
cvs rdiff -u -r1.254 -r1.254.2.1 src/lib/libc/shlib_version
cvs rdiff -u -r1.82 -r1.82.2.1 src/lib/libc/stdlib/Makefile.inc
cvs rdiff -u -r1.26 -r1.26.24.1 src/lib/libc/stdlib/strtol.3
cvs rdiff -u -r1.25 -r1.25.24.1 src/lib/libc/stdlib/strtoul.3
cvs rdiff -u -r1.35 -r1.35.2.1 src/sys/lib/libkern/Makefile.libkern
cvs rdiff -u -r1.115 -r1.115.2.1 src/sys/lib/libkern/libkern.h
cvs rdiff -u -r1.72 -r1.72.4.1 src/tools/compat/Makefile
cvs rdiff -u -r1.97.2.1 -r1.97.2.2 src/tools/compat/compat_defs.h
cvs rdiff -u -r1.81 -r1.81.2.1 src/tools/compat/configure
cvs rdiff -u -r1.82 -r1.82.2.1 src/tools/compat/configure.ac
cvs rdiff -u -r1.35 -r1.35.2.1 src/tools/compat/nbtool_config.h.in

Please note that diffs are not public domain; they are subject to the
copyright 

CVS commit: [netbsd-7] src/doc

2015-04-22 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Wed Apr 22 07:32:08 UTC 2015

Modified Files:
src/doc [netbsd-7]: CHANGES-7.0

Log Message:
648


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.265 -r1.1.2.266 src/doc/CHANGES-7.0

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-7.0
diff -u src/doc/CHANGES-7.0:1.1.2.265 src/doc/CHANGES-7.0:1.1.2.266
--- src/doc/CHANGES-7.0:1.1.2.265	Tue Apr 21 05:29:50 2015
+++ src/doc/CHANGES-7.0	Wed Apr 22 07:32:08 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.0,v 1.1.2.265 2015/04/21 05:29:50 snj Exp $
+# $NetBSD: CHANGES-7.0,v 1.1.2.266 2015/04/22 07:32:08 snj Exp $
 
 A complete list of changes from the initial NetBSD 7.0 branch on 11 Aug 2014
 until the 7.0 release:
@@ -19880,3 +19880,37 @@ usr.sbin/service/service.8			1.1-1.4
 	to manage rc.d scripts.
 	[ast, ticket #636]
 
+common/lib/libc/stdlib/_strtoi.h		1.1, 1.2
+common/lib/libc/stdlib/strtoi.c			1.1
+common/lib/libc/stdlib/strtou.c			1.1
+distrib/sets/lists/base/ad.aarch64		patch
+distrib/sets/lists/base/ad.arm			patch
+distrib/sets/lists/base/ad.mips			patch
+distrib/sets/lists/base/ad.powerpc		patch
+distrib/sets/lists/base/md.amd64		patch
+distrib/sets/lists/base/md.sparc64		patch
+distrib/sets/lists/base/shl.mi			patch
+distrib/sets/lists/comp/mi			1.1939
+distrib/sets/lists/debug/ad.aarch64		patch
+distrib/sets/lists/debug/ad.arm			patch
+distrib/sets/lists/debug/ad.mips		patch
+distrib/sets/lists/debug/ad.powerpc		patch
+distrib/sets/lists/debug/md.amd64		patch
+distrib/sets/lists/debug/md.sparc64		patch
+distrib/sets/lists/debug/shl.mi			patch
+include/inttypes.h1.11
+lib/libc/shlib_versionpatch
+lib/libc/stdlib/Makefile.inc			1.84
+lib/libc/stdlib/strtol.3			1.27-1.31
+lib/libc/stdlib/strtoul.3			1.26-1.29
+sys/lib/libkern/Makefile.libkern		1.37
+sys/lib/libkern/libkern.h			1.117
+tools/compat/Makefile1.73
+tools/compat/compat_defs.h			1.101
+tools/compat/configure.ac			1.83
+tools/compat/configure1.82
+tools/compat/nbtool_config.h.in			1.36
+
+	Add strtoi(3) and strtou(3).
+	[roy, ticket #648]
+



CVS commit: src/sys/ufs/ffs

2015-04-22 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Wed Apr 22 07:27:09 UTC 2015

Modified Files:
src/sys/ufs/ffs: ffs_vfsops.c

Log Message:
Instead of duplicating code, create ffs_is_appleufs(): returns 1 if the
device is an AppleUFS FS, 0 otherwise.

This changes the behavior a bit: if the kernel cannot determine whether the
disk is an AppleUFS one or not, it now considers it as a normal UFS rather
than returning an error and not mounting/reloading it.

No particular comment on tech-kern@


To generate a diff of this commit:
cvs rdiff -u -r1.328 -r1.329 src/sys/ufs/ffs/ffs_vfsops.c

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

Modified files:

Index: src/sys/ufs/ffs/ffs_vfsops.c
diff -u src/sys/ufs/ffs/ffs_vfsops.c:1.328 src/sys/ufs/ffs/ffs_vfsops.c:1.329
--- src/sys/ufs/ffs/ffs_vfsops.c:1.328	Sat Apr  4 06:00:12 2015
+++ src/sys/ufs/ffs/ffs_vfsops.c	Wed Apr 22 07:27:09 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: ffs_vfsops.c,v 1.328 2015/04/04 06:00:12 maxv Exp $	*/
+/*	$NetBSD: ffs_vfsops.c,v 1.329 2015/04/22 07:27:09 maxv Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ffs_vfsops.c,v 1.328 2015/04/04 06:00:12 maxv Exp $);
+__KERNEL_RCSID(0, $NetBSD: ffs_vfsops.c,v 1.329 2015/04/22 07:27:09 maxv Exp $);
 
 #if defined(_KERNEL_OPT)
 #include opt_ffs.h
@@ -113,6 +113,7 @@ MODULE(MODULE_CLASS_VFS, ffs, NULL);
 
 static int ffs_vfs_fsync(vnode_t *, int);
 static int ffs_superblock_validate(struct fs *);
+static int ffs_is_appleufs(struct vnode *, struct fs *);
 
 static int ffs_init_vnode(struct ufsmount *, struct vnode *, ino_t);
 static void ffs_deinit_vnode(struct ufsmount *, struct vnode *);
@@ -693,7 +694,6 @@ ffs_reload(struct mount *mp, kauth_cred_
 	void *space;
 	struct buf *bp;
 	struct fs *fs, *newfs;
-	struct dkwedge_info dkw;
 	int i, bsize, blks, error;
 	int32_t *lp, fs_sbsize;
 	struct ufsmount *ump;
@@ -776,41 +776,18 @@ ffs_reload(struct mount *mp, kauth_cred_
 	memcpy(fs, newfs, (u_int)fs_sbsize);
 	kmem_free(newfs, fs_sbsize);
 
-	/* Recheck for apple UFS filesystem */
-	ump-um_flags = ~UFS_ISAPPLEUFS;
-	/* First check to see if this is tagged as an Apple UFS filesystem
-	 * in the disklabel
+	/*
+	 * Recheck for Apple UFS filesystem.
 	 */
-	if (getdiskinfo(devvp, dkw) == 0 
-	strcmp(dkw.dkw_ptype, DKW_PTYPE_APPLEUFS) == 0)
-		ump-um_flags |= UFS_ISAPPLEUFS;
+	ump-um_flags = ~UFS_ISAPPLEUFS;
+	if (ffs_is_appleufs(devvp, fs)) {
 #ifdef APPLE_UFS
-	else {
-		/* Manually look for an apple ufs label, and if a valid one
-		 * is found, then treat it like an Apple UFS filesystem anyway
-		 *
-		 * EINVAL is most probably a blocksize or alignment problem,
-		 * it is unlikely that this is an Apple UFS filesystem then.
-		 */
-		error = bread(devvp,
-		(daddr_t)(APPLEUFS_LABEL_OFFSET / DEV_BSIZE),
-		APPLEUFS_LABEL_SIZE, 0, bp);
-		if (error  error != EINVAL) {
-			return error;
-		}
-		if (error == 0) {
-			error = ffs_appleufs_validate(fs-fs_fsmnt,
-(struct appleufslabel *)bp-b_data, NULL);
-			if (error == 0)
-ump-um_flags |= UFS_ISAPPLEUFS;
-			brelse(bp, 0);
-		}
-		bp = NULL;
-	}
+		ump-um_flags |= UFS_ISAPPLEUFS;
 #else
-	if (ump-um_flags  UFS_ISAPPLEUFS)
-		return (EIO);
+		DPRINTF(AppleUFS not supported);
+		return (EIO); /* XXX: really? */
 #endif
+	}
 
 	if (UFS_MPISAPPLEUFS(ump)) {
 		/* see comment about NeXT below */
@@ -1006,6 +983,46 @@ ffs_superblock_validate(struct fs *fs)
 	return 1;
 }
 
+static int
+ffs_is_appleufs(struct vnode *devvp, struct fs *fs)
+{
+	struct dkwedge_info dkw;
+	int ret = 0;
+
+	/*
+	 * First check to see if this is tagged as an Apple UFS filesystem
+	 * in the disklabel.
+	 */
+	if (getdiskinfo(devvp, dkw) == 0 
+	strcmp(dkw.dkw_ptype, DKW_PTYPE_APPLEUFS) == 0)
+		ret = 1;
+#ifdef APPLE_UFS
+	else {
+		struct appleufslabel *applefs;
+		struct buf *bp;
+		daddr_t blkno = APPLEUFS_LABEL_OFFSET / DEV_BSIZE;
+		int error;
+
+		/*
+		 * Manually look for an Apple UFS label, and if a valid one
+		 * is found, then treat it like an Apple UFS filesystem anyway.
+		 */
+		error = bread(devvp, blkno, APPLEUFS_LABEL_SIZE, 0, bp);
+		if (error) {
+			DPRINTF(bread@0x%jx returned %d, (intmax_t)blkno, error);
+			return 0;
+		}
+		applefs = (struct appleufslabel *)bp-b_data;
+		error = ffs_appleufs_validate(fs-fs_fsmnt, applefs, NULL);
+		if (error == 0)
+			ret = 1;
+		brelse(bp, 0);
+	}
+#endif
+
+	return ret;
+}
+
 /*
  * Common code for mount and mountroot
  */
@@ -1016,7 +1033,6 @@ ffs_mountfs(struct vnode *devvp, struct 
 	struct buf *bp = NULL;
 	struct fs *fs = NULL;
 	dev_t dev;
-	struct dkwedge_info dkw;
 	void *space;
 	daddr_t sblockloc = 0;
 	int blks, fstype = 0;
@@ -1239,42 +1255,15 @@ ffs_mountfs(struct vnode *devvp, struct 
 		brelse(bp, 0);
 	bp = NULL;
 
-	/*
-	 * First check to see if this is tagged as an Apple UFS filesystem
-	 * in the disklabel
-	 */