CVS commit: src/sys/net

2015-03-25 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Thu Mar 26 04:38:17 UTC 2015

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

Log Message:
Remove redundant rtcache_invariants

It's done in rtcache_getdst.


To generate a diff of this commit:
cvs rdiff -u -r1.136 -r1.137 src/sys/net/route.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/route.c
diff -u src/sys/net/route.c:1.136 src/sys/net/route.c:1.137
--- src/sys/net/route.c:1.136	Thu Feb 26 09:54:46 2015
+++ src/sys/net/route.c	Thu Mar 26 04:38:17 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: route.c,v 1.136 2015/02/26 09:54:46 roy Exp $	*/
+/*	$NetBSD: route.c,v 1.137 2015/03/26 04:38:17 ozaki-r Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2008 The NetBSD Foundation, Inc.
@@ -94,7 +94,7 @@
 #include "opt_route.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: route.c,v 1.136 2015/02/26 09:54:46 roy Exp $");
+__KERNEL_RCSID(0, "$NetBSD: route.c,v 1.137 2015/03/26 04:38:17 ozaki-r Exp $");
 
 #include 
 #include 
@@ -1419,8 +1419,6 @@ rtcache_lookup2(struct route *ro, const 
 	const struct sockaddr *odst;
 	struct rtentry *rt = NULL;
 
-	rtcache_invariants(ro);
-
 	odst = rtcache_getdst(ro);
 
 	if (odst == NULL)



CVS commit: src/sys/netinet

2015-03-25 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Thu Mar 26 04:05:58 UTC 2015

Modified Files:
src/sys/netinet: ip_input.c

Log Message:
Tidy up the regular path of ip_forward

No functional change is intended.


To generate a diff of this commit:
cvs rdiff -u -r1.319 -r1.320 src/sys/netinet/ip_input.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/netinet/ip_input.c
diff -u src/sys/netinet/ip_input.c:1.319 src/sys/netinet/ip_input.c:1.320
--- src/sys/netinet/ip_input.c:1.319	Mon Jun 16 00:33:39 2014
+++ src/sys/netinet/ip_input.c	Thu Mar 26 04:05:58 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: ip_input.c,v 1.319 2014/06/16 00:33:39 ozaki-r Exp $	*/
+/*	$NetBSD: ip_input.c,v 1.320 2015/03/26 04:05:58 ozaki-r Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -91,7 +91,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ip_input.c,v 1.319 2014/06/16 00:33:39 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip_input.c,v 1.320 2015/03/26 04:05:58 ozaki-r Exp $");
 
 #include "opt_inet.h"
 #include "opt_compat_netbsd.h"
@@ -1189,6 +1189,7 @@ ip_forward(struct mbuf *m, int srcrt)
 		struct sockaddr		dst;
 		struct sockaddr_in	dst4;
 	} u;
+	uint64_t *ips;
 
 	KASSERTMSG(cpu_softintr_p(), "ip_forward: not in the software "
 	"interrupt handler; synchronization assumptions violated");
@@ -1269,27 +1270,34 @@ ip_forward(struct mbuf *m, int srcrt)
 	(IP_FORWARDING | (ip_directedbcast ? IP_ALLOWBROADCAST : 0)),
 	NULL, NULL);
 
-	if (error)
+	if (error) {
 		IP_STATINC(IP_STAT_CANTFORWARD);
-	else {
-		uint64_t *ips = IP_STAT_GETREF();
-		ips[IP_STAT_FORWARD]++;
-		if (type) {
-			ips[IP_STAT_REDIRECTSENT]++;
-			IP_STAT_PUTREF();
-		} else {
-			IP_STAT_PUTREF();
-			if (mcopy) {
+		goto error;
+	}
+
+	ips = IP_STAT_GETREF();
+	ips[IP_STAT_FORWARD]++;
+
+	if (type) {
+		ips[IP_STAT_REDIRECTSENT]++;
+		IP_STAT_PUTREF();
+		goto redirect;
+	}
+
+	IP_STAT_PUTREF();
+	if (mcopy) {
 #ifdef GATEWAY
-if (mcopy->m_flags & M_CANFASTFWD)
-	ipflow_create(&ipforward_rt, mcopy);
+		if (mcopy->m_flags & M_CANFASTFWD)
+			ipflow_create(&ipforward_rt, mcopy);
 #endif
-m_freem(mcopy);
-			}
-			SOFTNET_UNLOCK();
-			return;
-		}
+		m_freem(mcopy);
 	}
+
+	SOFTNET_UNLOCK();
+	return;
+
+redirect:
+error:
 	if (mcopy == NULL) {
 		SOFTNET_UNLOCK();
 		return;



CVS commit: [netbsd-7] src/external/public-domain/tz/dist

2015-03-25 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Wed Mar 25 17:25:13 UTC 2015

Added Files:
src/external/public-domain/tz/dist [netbsd-7]: checklinks.awk

Log Message:
Pull up following revision(s) (requested by apb in ticket #638):
doc/3RDPARTY: patch
external/public-domain/tz/dist/Makefile: up to revision 1.1.1.7
external/public-domain/tz/dist/NEWS: up to revision 1.1.1.7
external/public-domain/tz/dist/Theory: up to revision 1.1.1.3
external/public-domain/tz/dist/antarctica: up to revision 1.1.1.3
external/public-domain/tz/dist/asia: up to revision 1.1.1.7
external/public-domain/tz/dist/australasia: up to revision 1.1.1.5
external/public-domain/tz/dist/backward: up to revision 1.1.1.3
external/public-domain/tz/dist/backzone: up to revision 1.1.1.6
external/public-domain/tz/dist/checklinks.awk: up to revision 1.1.1.1
external/public-domain/tz/dist/checktab.awk: up to revision 1.1.1.6
external/public-domain/tz/dist/europe: up to revision 1.1.1.7
external/public-domain/tz/dist/leap-seconds.list: up to revision 1.1.1.3
external/public-domain/tz/dist/leapseconds: up to revision 1.1.1.4
external/public-domain/tz/dist/leapseconds.awk: up to revision 1.1.1.4
external/public-domain/tz/dist/northamerica: up to revision 1.1.1.7
external/public-domain/tz/dist/southamerica: up to revision 1.1.1.5
external/public-domain/tz/dist/zone.tab: up to revision 1.1.1.4
external/public-domain/tz/dist/zone1970.tab: up to revision 1.1.1.5
Update tzdata from 2014j to 2015b.  Some of the changes are:
* Mongolia will start observing DST in 2015.
* Changes to Palestine DST dates in 2014 and 2015.
* The Mexican state of Quintana Roo, represented by
America/Cancun, changed time zone in Feb 2015.
* Chile's new standard time from 2015 will be its old DST.
* New leap second 2015-06-30 23:59:60 UTC as per IERS Bulletin C 49.
* Corrections to historic times in Iceland and Easter Island.
* Some more zones have been turned into links, when they
differed from existing zones only for times before 1970.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1.1.1.2.2 \
src/external/public-domain/tz/dist/checklinks.awk

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

Added files:

Index: src/external/public-domain/tz/dist/checklinks.awk
diff -u /dev/null src/external/public-domain/tz/dist/checklinks.awk:1.1.1.1.2.2
--- /dev/null	Wed Mar 25 17:25:13 2015
+++ src/external/public-domain/tz/dist/checklinks.awk	Wed Mar 25 17:25:13 2015
@@ -0,0 +1,19 @@
+# Check links in tz tables.
+
+# Contributed by Paul Eggert.
+
+/^Link/ { used[$2] = 1 }
+/^Zone/ { defined[$2] = 1 }
+
+END {
+status = 0
+
+for (tz in used) {
+	if (!defined[tz]) {
+	printf "%s: Link to non-zone\n", tz
+	status = 1
+	}
+}
+
+exit status
+}



CVS commit: [netbsd-7] src/doc

2015-03-25 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Wed Mar 25 17:18:11 UTC 2015

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

Log Message:
tickets 617, 637-639, and 642


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.237 -r1.1.2.238 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.237 src/doc/CHANGES-7.0:1.1.2.238
--- src/doc/CHANGES-7.0:1.1.2.237	Wed Mar 25 16:45:01 2015
+++ src/doc/CHANGES-7.0	Wed Mar 25 17:18:11 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.0,v 1.1.2.237 2015/03/25 16:45:01 snj Exp $
+# $NetBSD: CHANGES-7.0,v 1.1.2.238 2015/03/25 17:18:11 snj Exp $
 
 A complete list of changes from the initial NetBSD 7.0 branch on 11 Aug 2014
 until the 7.0 release:
@@ -18937,3 +18937,74 @@ sys/arch/arm/include/mcontext.h			1.17
 	Ensure _lwp_setcontext gets consistent language binding.
 	[joerg, ticket #633]
 
+sys/kern/kern_malloc.c1.144, 1.145
+sys/kern/kern_pmf.c1.37
+sys/rump/librump/rumpkern/rump.c		1.316
+sys/uvm/uvm_extern.h1.193
+sys/uvm/uvm_km.c1.139
+
+	Kill kmeminit() and remove reference to malloc().
+	[maxv, ticket #617]
+
+sys/arch/arm/amlogic/amlogic_genfb.c		1.2, 1.3
+sys/arch/arm/amlogic/amlogic_vpureg.h		1.2
+sys/arch/evbarm/amlogic/amlogic_machdep.c	1.18
+
+	Use the hardware scaler to do overscan compensation. You can
+	set the scaling value as a percentage in two ways -- either as
+	a kernel cmdline parameter (fb.scale=) or at runtime with
+	sysctl (hw.genfb0.scale=).
+
+	Setting scale=100 disables the scaler, any other value enables it.
+	[jmcneill, ticket #637]
+
+doc/3RDPARTY	patch
+external/public-domain/tz/dist/Makefile		up to 1.1.1.7
+external/public-domain/tz/dist/NEWS		up to 1.1.1.7
+external/public-domain/tz/dist/Theory		up to 1.1.1.3
+external/public-domain/tz/dist/antarctica	up to 1.1.1.3
+external/public-domain/tz/dist/asia		up to 1.1.1.7
+external/public-domain/tz/dist/australasia	up to 1.1.1.5
+external/public-domain/tz/dist/backward		up to 1.1.1.3
+external/public-domain/tz/dist/backzone		up to 1.1.1.6
+external/public-domain/tz/dist/checklinks.awk	up to 1.1.1.1
+external/public-domain/tz/dist/checktab.awk	up to 1.1.1.6
+external/public-domain/tz/dist/europe		up to 1.1.1.7
+external/public-domain/tz/dist/leap-seconds.list up to 1.1.1.3
+external/public-domain/tz/dist/leapseconds	up to 1.1.1.4
+external/public-domain/tz/dist/leapseconds.awk	up to 1.1.1.4
+external/public-domain/tz/dist/northamerica	up to 1.1.1.7
+external/public-domain/tz/dist/southamerica	up to 1.1.1.5
+external/public-domain/tz/dist/zone.tab		up to 1.1.1.4
+external/public-domain/tz/dist/zone1970.tab	up to 1.1.1.5
+
+	Update tzdata from 2014j to 2015b.  Some of the changes are:
+	* Mongolia will start observing DST in 2015.
+	* Changes to Palestine DST dates in 2014 and 2015.
+	* The Mexican state of Quintana Roo, represented by
+	America/Cancun, changed time zone in Feb 2015.
+	* Chile's new standard time from 2015 will be its old DST.
+	* New leap second 2015-06-30 23:59:60 UTC as per IERS Bulletin C 49.
+	* Corrections to historic times in Iceland and Easter Island.
+	* Some more zones have been turned into links, when they
+	differed from existing zones only for times before 1970.
+	[apb, ticket #638]
+
+sys/arch/arm/amlogic/amlogic_intr.h		1.6
+sys/arch/arm/amlogic/amlogic_io.c		1.8
+sys/arch/arm/amlogic/amlogic_reg.h		1.10
+sys/arch/arm/amlogic/amlogic_rtc.c		1.1
+sys/arch/arm/amlogic/amlogic_rtcreg.h		1.1
+sys/arch/arm/amlogic/files.amlogic		1.9
+sys/arch/evbarm/conf/ODROID-C1			1.13
+
+	Add Amlogic RTC driver.
+	[jmcneill, ticket #639]
+
+include/stdio.h	1.96
+include/unistd.h1.145
+
+	Put fseeko, ftello, pread, and pwrite in the POSIX 2001
+	namespace.
+	[wiz, ticket #642]
+



CVS commit: [netbsd-7] src/include

2015-03-25 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Wed Mar 25 17:15:54 UTC 2015

Modified Files:
src/include [netbsd-7]: stdio.h unistd.h

Log Message:
Pull up following revision(s) (requested by wiz in ticket #642):
include/stdio.h: revision 1.96
include/unistd.h: revision 1.145
Put fseeko, ftello, pread, and pwrite in the POSIX 2001 namespace.
Ok christos, apb, martin


To generate a diff of this commit:
cvs rdiff -u -r1.91 -r1.91.2.1 src/include/stdio.h
cvs rdiff -u -r1.142.2.1 -r1.142.2.2 src/include/unistd.h

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

Modified files:

Index: src/include/stdio.h
diff -u src/include/stdio.h:1.91 src/include/stdio.h:1.91.2.1
--- src/include/stdio.h:1.91	Thu Aug  7 17:24:03 2014
+++ src/include/stdio.h	Wed Mar 25 17:15:54 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: stdio.h,v 1.91 2014/08/07 17:24:03 christos Exp $	*/
+/*	$NetBSD: stdio.h,v 1.91.2.1 2015/03/25 17:15:54 snj Exp $	*/
 
 /*-
  * Copyright (c) 1990, 1993
@@ -365,7 +365,7 @@ __END_DECLS
 /*
  * X/Open CAE Specification Issue 5 Version 2
  */
-#if (_XOPEN_SOURCE - 0) >= 500 || defined(_LARGEFILE_SOURCE) || \
+#if (_POSIX_C_SOURCE - 0) >= 200112L || (_XOPEN_SOURCE - 0) >= 500 || \
 defined(_NETBSD_SOURCE)
 #ifndef	off_t
 typedef	__off_t		off_t;
@@ -376,7 +376,7 @@ __BEGIN_DECLS
 int	 fseeko(FILE *, off_t, int);
 off_t	 ftello(FILE *);
 __END_DECLS
-#endif /* _XOPEN_SOURCE >= 500 || _LARGEFILE_SOURCE || _NETBSD_SOURCE */
+#endif /* (_POSIX_C_SOURCE - 0) >= 200112L || _XOPEN_SOURCE >= 500 || ... */
 
 /*
  * Functions defined in ISO C99.  Still put under _NETBSD_SOURCE due to

Index: src/include/unistd.h
diff -u src/include/unistd.h:1.142.2.1 src/include/unistd.h:1.142.2.2
--- src/include/unistd.h:1.142.2.1	Tue Feb 24 10:47:17 2015
+++ src/include/unistd.h	Wed Mar 25 17:15:54 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: unistd.h,v 1.142.2.1 2015/02/24 10:47:17 martin Exp $	*/
+/*	$NetBSD: unistd.h,v 1.142.2.2 2015/03/25 17:15:54 snj Exp $	*/
 
 /*-
  * Copyright (c) 1998, 1999, 2008 The NetBSD Foundation, Inc.
@@ -294,10 +294,11 @@ char	*getwd(char *);/* obsoleted by 
 /*
  * X/Open CAE Specification Issue 5 Version 2
  */
-#if (_XOPEN_SOURCE - 0) >= 500 || defined(_NETBSD_SOURCE)
+#if (_POSIX_C_SOURCE - 0) >= 200112L || (_XOPEN_SOURCE - 0) >= 500 || \
+defined(_NETBSD_SOURCE)
 ssize_t	 pread(int, void *, size_t, off_t);
 ssize_t	 pwrite(int, const void *, size_t, off_t);
-#endif
+#endif /* (_POSIX_C_SOURCE - 0) >= 200112L || ... */
 
 /*
  * X/Open Extended API set 2 (a.k.a. C063)



CVS commit: [netbsd-7] src/sys/arch

2015-03-25 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Wed Mar 25 17:13:26 UTC 2015

Modified Files:
src/sys/arch/arm/amlogic [netbsd-7]: amlogic_intr.h amlogic_io.c
amlogic_reg.h files.amlogic
src/sys/arch/evbarm/conf [netbsd-7]: ODROID-C1
Added Files:
src/sys/arch/arm/amlogic [netbsd-7]: amlogic_rtc.c amlogic_rtcreg.h

Log Message:
Pull up following revision(s) (requested by jmcneill in ticket #639):
sys/arch/arm/amlogic/amlogic_intr.h: revision 1.6
sys/arch/arm/amlogic/amlogic_io.c: revision 1.8
sys/arch/arm/amlogic/amlogic_reg.h: revision 1.10
sys/arch/arm/amlogic/amlogic_rtc.c: revision 1.1
sys/arch/arm/amlogic/amlogic_rtcreg.h: revision 1.1
sys/arch/arm/amlogic/files.amlogic: revision 1.9
sys/arch/evbarm/conf/ODROID-C1: revision 1.13
Add Amlogic RTC driver, from Anon Ymous


To generate a diff of this commit:
cvs rdiff -u -r1.5.2.2 -r1.5.2.3 src/sys/arch/arm/amlogic/amlogic_intr.h
cvs rdiff -u -r1.7.2.2 -r1.7.2.3 src/sys/arch/arm/amlogic/amlogic_io.c
cvs rdiff -u -r1.9.2.2 -r1.9.2.3 src/sys/arch/arm/amlogic/amlogic_reg.h
cvs rdiff -u -r0 -r1.1.2.2 src/sys/arch/arm/amlogic/amlogic_rtc.c \
src/sys/arch/arm/amlogic/amlogic_rtcreg.h
cvs rdiff -u -r1.8.2.2 -r1.8.2.3 src/sys/arch/arm/amlogic/files.amlogic
cvs rdiff -u -r1.12.2.2 -r1.12.2.3 src/sys/arch/evbarm/conf/ODROID-C1

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/amlogic/amlogic_intr.h
diff -u src/sys/arch/arm/amlogic/amlogic_intr.h:1.5.2.2 src/sys/arch/arm/amlogic/amlogic_intr.h:1.5.2.3
--- src/sys/arch/arm/amlogic/amlogic_intr.h:1.5.2.2	Sat Mar 21 08:51:17 2015
+++ src/sys/arch/arm/amlogic/amlogic_intr.h	Wed Mar 25 17:13:25 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: amlogic_intr.h,v 1.5.2.2 2015/03/21 08:51:17 snj Exp $ */
+/* $NetBSD: amlogic_intr.h,v 1.5.2.3 2015/03/25 17:13:25 snj Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill 
@@ -40,6 +40,7 @@
 #define AMLOGIC_INTR_USB0	62
 #define AMLOGIC_INTR_USB1	63
 #define AMLOGIC_INTR_UART2AO	70
+#define AMLOGIC_INTR_RTC	104
 #define AMLOGIC_INTR_SDHC	110
 #define AMLOGIC_INTR_UART0AO	122
 

Index: src/sys/arch/arm/amlogic/amlogic_io.c
diff -u src/sys/arch/arm/amlogic/amlogic_io.c:1.7.2.2 src/sys/arch/arm/amlogic/amlogic_io.c:1.7.2.3
--- src/sys/arch/arm/amlogic/amlogic_io.c:1.7.2.2	Sat Mar 21 08:51:17 2015
+++ src/sys/arch/arm/amlogic/amlogic_io.c	Wed Mar 25 17:13:25 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: amlogic_io.c,v 1.7.2.2 2015/03/21 08:51:17 snj Exp $ */
+/* $NetBSD: amlogic_io.c,v 1.7.2.3 2015/03/25 17:13:25 snj Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill 
@@ -29,7 +29,7 @@
 #include "opt_amlogic.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: amlogic_io.c,v 1.7.2.2 2015/03/21 08:51:17 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: amlogic_io.c,v 1.7.2.3 2015/03/25 17:13:25 snj Exp $");
 
 #include 
 #include 
@@ -77,6 +77,8 @@ static const struct amlogic_locators aml
 AMLOGIC_SDHC_OFFSET, AMLOGIC_SDHC_SIZE, 1, AMLOGIC_INTR_SDHC },
   { "amlogicsdhc",
 AMLOGIC_SDHC_OFFSET, AMLOGIC_SDHC_SIZE, 2, AMLOGIC_INTR_SDHC },
+  { "amlogicrtc",
+AMLOGIC_RTC_OFFSET, AMLOGIC_RTC_SIZE, NOPORT, AMLOGIC_INTR_RTC },
 };
 
 int

Index: src/sys/arch/arm/amlogic/amlogic_reg.h
diff -u src/sys/arch/arm/amlogic/amlogic_reg.h:1.9.2.2 src/sys/arch/arm/amlogic/amlogic_reg.h:1.9.2.3
--- src/sys/arch/arm/amlogic/amlogic_reg.h:1.9.2.2	Sat Mar 21 08:51:17 2015
+++ src/sys/arch/arm/amlogic/amlogic_reg.h	Wed Mar 25 17:13:25 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: amlogic_reg.h,v 1.9.2.2 2015/03/21 08:51:17 snj Exp $ */
+/* $NetBSD: amlogic_reg.h,v 1.9.2.3 2015/03/25 17:13:25 snj Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill 
@@ -63,6 +63,9 @@
 #define AMLOGIC_UART_SIZE	0x20
 #define AMLOGIC_UART_FREQ	AMLOGIC_REF_FREQ
 
+#define AMLOGIC_RTC_OFFSET	0x08100740
+#define AMLOGIC_RTC_SIZE	0x14
+
 #define AMLOGIC_USB0_OFFSET	0x0904
 #define AMLOGIC_USB1_OFFSET	0x090c
 #define AMLOGIC_USB_SIZE	0x4

Index: src/sys/arch/arm/amlogic/files.amlogic
diff -u src/sys/arch/arm/amlogic/files.amlogic:1.8.2.2 src/sys/arch/arm/amlogic/files.amlogic:1.8.2.3
--- src/sys/arch/arm/amlogic/files.amlogic:1.8.2.2	Sat Mar 21 08:51:17 2015
+++ src/sys/arch/arm/amlogic/files.amlogic	Wed Mar 25 17:13:25 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: files.amlogic,v 1.8.2.2 2015/03/21 08:51:17 snj Exp $
+#	$NetBSD: files.amlogic,v 1.8.2.3 2015/03/25 17:13:25 snj Exp $
 #
 # Configuration info for Amlogic ARM Peripherals
 #
@@ -48,6 +48,11 @@ device	amlogicrng
 attach	amlogicrng at amlogicio with amlogic_rng
 file	arch/arm/amlogic/amlogic_rng.c		amlogic_rng
 
+# RTC
+device	amlogicrtc
+attach	amlogicrtc at amlogicio with amlogic_rtc
+file	arch/arm/amlogic/amlogic_rtc.c		amlogic_rtc
+
 # Console parameters
 defparam opt_amlogic.h			CONADDR
 defparam opt_amlogic.h			CONSPEED

Index: src/sys/arch/evbarm/conf/ODROID-C1
diff -u src/sys/arch/evbarm/conf

CVS commit: [netbsd-7] src

2015-03-25 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Wed Mar 25 17:09:59 UTC 2015

Modified Files:
src/doc [netbsd-7]: 3RDPARTY
src/external/public-domain/tz/dist [netbsd-7]: Makefile NEWS Theory
antarctica asia australasia backward backzone checktab.awk europe
leap-seconds.list leapseconds leapseconds.awk northamerica
southamerica zone.tab zone1970.tab

Log Message:
Pull up following revision(s) (requested by apb in ticket #638):
doc/3RDPARTY: patch
external/public-domain/tz/dist/Makefile: up to revision 1.1.1.7
external/public-domain/tz/dist/NEWS: up to revision 1.1.1.7
external/public-domain/tz/dist/Theory: up to revision 1.1.1.3
external/public-domain/tz/dist/antarctica: up to revision 1.1.1.3
external/public-domain/tz/dist/asia: up to revision 1.1.1.7
external/public-domain/tz/dist/australasia: up to revision 1.1.1.5
external/public-domain/tz/dist/backward: up to revision 1.1.1.3
external/public-domain/tz/dist/backzone: up to revision 1.1.1.6
external/public-domain/tz/dist/checklinks.awk: up to revision 1.1.1.1
external/public-domain/tz/dist/checktab.awk: up to revision 1.1.1.6
external/public-domain/tz/dist/europe: up to revision 1.1.1.7
external/public-domain/tz/dist/leap-seconds.list: up to revision 1.1.1.3
external/public-domain/tz/dist/leapseconds: up to revision 1.1.1.4
external/public-domain/tz/dist/leapseconds.awk: up to revision 1.1.1.4
external/public-domain/tz/dist/northamerica: up to revision 1.1.1.7
external/public-domain/tz/dist/southamerica: up to revision 1.1.1.5
external/public-domain/tz/dist/zone.tab: up to revision 1.1.1.4
external/public-domain/tz/dist/zone1970.tab: up to revision 1.1.1.5
Update tzdata from 2014j to 2015b.  Some of the changes are:
* Mongolia will start observing DST in 2015.
* Changes to Palestine DST dates in 2014 and 2015.
* The Mexican state of Quintana Roo, represented by
America/Cancun, changed time zone in Feb 2015.
* Chile's new standard time from 2015 will be its old DST.
* New leap second 2015-06-30 23:59:60 UTC as per IERS Bulletin C 49.
* Corrections to historic times in Iceland and Easter Island.
* Some more zones have been turned into links, when they
differed from existing zones only for times before 1970.


To generate a diff of this commit:
cvs rdiff -u -r1.1145.2.10 -r1.1145.2.11 src/doc/3RDPARTY
cvs rdiff -u -r1.1.1.1.4.2 -r1.1.1.1.4.3 \
src/external/public-domain/tz/dist/Makefile \
src/external/public-domain/tz/dist/NEWS \
src/external/public-domain/tz/dist/asia \
src/external/public-domain/tz/dist/australasia \
src/external/public-domain/tz/dist/europe \
src/external/public-domain/tz/dist/leapseconds \
src/external/public-domain/tz/dist/leapseconds.awk \
src/external/public-domain/tz/dist/northamerica \
src/external/public-domain/tz/dist/southamerica \
src/external/public-domain/tz/dist/zone.tab \
src/external/public-domain/tz/dist/zone1970.tab
cvs rdiff -u -r1.1.1.1.2.3 -r1.1.1.1.2.4 \
src/external/public-domain/tz/dist/Theory \
src/external/public-domain/tz/dist/backzone \
src/external/public-domain/tz/dist/checktab.awk
cvs rdiff -u -r1.1.1.1.4.1 -r1.1.1.1.4.2 \
src/external/public-domain/tz/dist/antarctica \
src/external/public-domain/tz/dist/backward
cvs rdiff -u -r1.1.1.1 -r1.1.1.1.4.1 \
src/external/public-domain/tz/dist/leap-seconds.list

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

Modified files:

Index: src/doc/3RDPARTY
diff -u src/doc/3RDPARTY:1.1145.2.10 src/doc/3RDPARTY:1.1145.2.11
--- src/doc/3RDPARTY:1.1145.2.10	Fri Mar  6 20:49:11 2015
+++ src/doc/3RDPARTY	Wed Mar 25 17:09:59 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1145.2.10 2015/03/06 20:49:11 snj Exp $
+#	$NetBSD: 3RDPARTY,v 1.1145.2.11 2015/03/25 17:09:59 snj Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -1300,8 +1300,8 @@ Notes:
 Added changes from a5 -> a12 manually.
 
 Package:	tz
-Version:	tzcode2014j / tzdata2014j
-Current Vers:	tzcode2014j / tzdata2014j
+Version:	tzcode2014j / tzdata2015b
+Current Vers:	tzcode2015b / tzdata2015b
 Maintainer:	Paul Eggert 
 Archive Site:	ftp://ftp.iana.org/tz/releases/
 Archive Site:	ftp://munnari.oz.au/pub/oldtz/

Index: src/external/public-domain/tz/dist/Makefile
diff -u src/external/public-domain/tz/dist/Makefile:1.1.1.1.4.2 src/external/public-domain/tz/dist/Makefile:1.1.1.1.4.3
--- src/external/public-domain/tz/dist/Makefile:1.1.1.1.4.2	Tue Nov 18 18:32:29 2014
+++ src/external/public-domain/tz/dist/Makefile	Wed Mar 25 17:09:59 2015
@@ -5,7 +5,7 @@
 PACKAGE=	tzcode
 
 # Version numbers of the code and data distributions.
-VERSION=	2014j
+VERSION=	2015b
 
 # Email address for bug reports.
 BUGEMAIL=	t..

CVS commit: [netbsd-7] src/sys/arch

2015-03-25 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Wed Mar 25 17:01:32 UTC 2015

Modified Files:
src/sys/arch/arm/amlogic [netbsd-7]: amlogic_genfb.c amlogic_vpureg.h
src/sys/arch/evbarm/amlogic [netbsd-7]: amlogic_machdep.c

Log Message:
Pull up following revision(s) (requested by jmcneill in ticket #637):
sys/arch/arm/amlogic/amlogic_genfb.c: revisions 1.2, 1.3
sys/arch/evbarm/amlogic/amlogic_machdep.c: revision 1.18
sys/arch/arm/amlogic/amlogic_vpureg.h: revision 1.2
Use the hardware scaler to do overscan compensation. You can set the
scaling value as a percentage in two ways -- either as a kernel cmdline
parameter (fb.scale=) or at runtime with sysctl (hw.genfb0.scale=).
Setting scale=100 disables the scaler, any other value enables it. For
the cheap TV on my desk, scale=95 gives me a fully visible framebuffer.
--
Support interlaced modes.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.2 -r1.1.2.3 src/sys/arch/arm/amlogic/amlogic_genfb.c \
src/sys/arch/arm/amlogic/amlogic_vpureg.h
cvs rdiff -u -r1.17.2.2 -r1.17.2.3 \
src/sys/arch/evbarm/amlogic/amlogic_machdep.c

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

Modified files:

Index: src/sys/arch/arm/amlogic/amlogic_genfb.c
diff -u src/sys/arch/arm/amlogic/amlogic_genfb.c:1.1.2.2 src/sys/arch/arm/amlogic/amlogic_genfb.c:1.1.2.3
--- src/sys/arch/arm/amlogic/amlogic_genfb.c:1.1.2.2	Sat Mar 21 08:51:17 2015
+++ src/sys/arch/arm/amlogic/amlogic_genfb.c	Wed Mar 25 17:01:32 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: amlogic_genfb.c,v 1.1.2.2 2015/03/21 08:51:17 snj Exp $ */
+/* $NetBSD: amlogic_genfb.c,v 1.1.2.3 2015/03/25 17:01:32 snj Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill 
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: amlogic_genfb.c,v 1.1.2.2 2015/03/21 08:51:17 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: amlogic_genfb.c,v 1.1.2.3 2015/03/25 17:01:32 snj Exp $");
 
 #include 
 #include 
@@ -40,6 +40,7 @@ __KERNEL_RCSID(0, "$NetBSD: amlogic_genf
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -54,38 +55,52 @@ static const struct amlogic_genfb_vic2mo
 	u_int vic;
 	u_int width;
 	u_int height;
+	u_int flags;
+#define INTERLACE __BIT(0)
+#define DBLSCAN __BIT(1)
 } amlogic_genfb_modes[] = {
 	{ 1, 640, 480 },
 	{ 2, 720, 480 },
 	{ 3, 720, 480 },
 	{ 4, 1280, 720 },
-	{ 5, 1920, 1080 },
+	{ 5, 1920, 1080, INTERLACE },
+	{ 6, 720, 480, DBLSCAN | INTERLACE },
+	{ 7, 720, 480, DBLSCAN | INTERLACE },
+	{ 8, 720, 240, DBLSCAN },
+	{ 9, 720, 240, DBLSCAN },
 	{ 16, 1920, 1080 },
 	{ 17, 720, 576 },
 	{ 18, 720, 576 },
 	{ 19, 1280, 720 },
-	{ 20, 1920, 1080 },
+	{ 20, 1920, 1080, INTERLACE },
 	{ 31, 1920, 1080 },
 	{ 32, 1920, 1080 },
 	{ 33, 1920, 1080 },
 	{ 34, 1920, 1080 },
-	{ 39, 1920, 1080 },
+	{ 39, 1920, 1080, INTERLACE },
 };
 
 struct amlogic_genfb_softc {
 	struct genfb_softc	sc_gen;
 	bus_space_tag_t		sc_bst;
-	bus_space_handle_t	sc_bsh;
+	bus_space_handle_t	sc_cav_bsh;
 	bus_space_handle_t	sc_hdmi_bsh;
 	bus_space_handle_t	sc_vpu_bsh;
 	bus_dma_tag_t		sc_dmat;
 
+	kmutex_t		sc_lock;
+
+	u_int			sc_scale;
+
 	bus_dma_segment_t	sc_dmasegs[1];
 	bus_size_t		sc_dmasize;
 	bus_dmamap_t		sc_dmamap;
 	void			*sc_dmap;
 
 	uint32_t		sc_wstype;
+
+	struct sysctllog	*sc_sysctllog;
+	int			sc_node_scale;
 };
 
 static int	amlogic_genfb_match(device_t, cfdata_t, void *);
@@ -95,9 +110,15 @@ static int	amlogic_genfb_ioctl(void *, v
 static paddr_t	amlogic_genfb_mmap(void *, void *, off_t, int);
 static bool	amlogic_genfb_shutdown(device_t, int);
 
-static void	amlogic_genfb_probe(struct amlogic_genfb_softc *);
+static void	amlogic_genfb_canvas_config(struct amlogic_genfb_softc *);
+static void	amlogic_genfb_osd_config(struct amlogic_genfb_softc *);
+static void	amlogic_genfb_scaler_config(struct amlogic_genfb_softc *);
+
+static void	amlogic_genfb_init(struct amlogic_genfb_softc *);
 static int	amlogic_genfb_alloc_videomem(struct amlogic_genfb_softc *);
 
+static int	amlogic_genfb_scale_helper(SYSCTLFN_PROTO);
+
 void		amlogic_genfb_set_console_dev(device_t);
 void		amlogic_genfb_ddb_trap_callback(int);
 
@@ -131,6 +152,11 @@ amlogic_genfb_hdmi_write_4(struct amlogi
 #define VPU_WRITE(sc, reg, val) \
 bus_space_write_4((sc)->sc_bst, (sc)->sc_vpu_bsh, (reg), (val))
 
+#define CAV_READ(sc, reg) \
+bus_space_read_4((sc)->sc_bst, (sc)->sc_cav_bsh, (reg))
+#define CAV_WRITE(sc, reg, val) \
+bus_space_write_4((sc)->sc_bst, (sc)->sc_cav_bsh, (reg), (val))
+
 static int
 amlogic_genfb_match(device_t parent, cfdata_t match, void *aux)
 {
@@ -152,13 +178,14 @@ amlogic_genfb_attach(device_t parent, de
 	sc->sc_bst = aio->aio_core_bst;
 	sc->sc_dmat = aio->aio_dmat;
 	bus_space_subregion(aio->aio_core_bst, aio->aio_bsh,
-	loc->loc_offset, loc->loc_size, &sc->sc_bsh);
+	loc->loc_offset, loc->loc_size, &sc->sc_cav_bsh);
 	bus_space_subregion(aio->aio_core_bst, aio->aio_bsh,
 	AML

CVS commit: [netbsd-7] src/sys

2015-03-25 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Wed Mar 25 16:54:37 UTC 2015

Modified Files:
src/sys/kern [netbsd-7]: kern_malloc.c kern_pmf.c
src/sys/rump/librump/rumpkern [netbsd-7]: rump.c
src/sys/uvm [netbsd-7]: uvm_extern.h uvm_km.c

Log Message:
Pull up following revision(s) (requested by maxv in ticket #617):
sys/kern/kern_malloc.c: revision 1.144, 1.145
sys/kern/kern_pmf.c: revision 1.37
sys/rump/librump/rumpkern/rump.c: revision 1.316
sys/uvm/uvm_extern.h: revision 1.193
sys/uvm/uvm_km.c: revision 1.139
Don't include 
--
Kill kmeminit().
--
Remove this MALLOC_DEFINE (M_PMF unused).


To generate a diff of this commit:
cvs rdiff -u -r1.143 -r1.143.2.1 src/sys/kern/kern_malloc.c
cvs rdiff -u -r1.36 -r1.36.12.1 src/sys/kern/kern_pmf.c
cvs rdiff -u -r1.308.2.2 -r1.308.2.3 src/sys/rump/librump/rumpkern/rump.c
cvs rdiff -u -r1.191.2.1 -r1.191.2.2 src/sys/uvm/uvm_extern.h
cvs rdiff -u -r1.138 -r1.138.12.1 src/sys/uvm/uvm_km.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_malloc.c
diff -u src/sys/kern/kern_malloc.c:1.143 src/sys/kern/kern_malloc.c:1.143.2.1
--- src/sys/kern/kern_malloc.c:1.143	Mon May 19 02:51:24 2014
+++ src/sys/kern/kern_malloc.c	Wed Mar 25 16:54:37 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_malloc.c,v 1.143 2014/05/19 02:51:24 rmind Exp $	*/
+/*	$NetBSD: kern_malloc.c,v 1.143.2.1 2015/03/25 16:54:37 snj Exp $	*/
 
 /*
  * Copyright (c) 1987, 1991, 1993
@@ -70,14 +70,12 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_malloc.c,v 1.143 2014/05/19 02:51:24 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_malloc.c,v 1.143.2.1 2015/03/25 16:54:37 snj Exp $");
 
 #include 
 #include 
 #include 
 
-#include 
-
 /*
  * Built-in malloc types.  Note: ought to be removed.
  */
@@ -200,11 +198,3 @@ kern_realloc(void *curaddr, unsigned lon
 	free(curaddr, ksp);
 	return newaddr;
 }
-
-/*
- * Initialize the kernel memory allocator
- */
-void
-kmeminit(void)
-{
-}

Index: src/sys/kern/kern_pmf.c
diff -u src/sys/kern/kern_pmf.c:1.36 src/sys/kern/kern_pmf.c:1.36.12.1
--- src/sys/kern/kern_pmf.c:1.36	Tue Nov 13 14:08:07 2012
+++ src/sys/kern/kern_pmf.c	Wed Mar 25 16:54:37 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_pmf.c,v 1.36 2012/11/13 14:08:07 chs Exp $ */
+/* $NetBSD: kern_pmf.c,v 1.36.12.1 2015/03/25 16:54:37 snj Exp $ */
 
 /*-
  * Copyright (c) 2007 Jared D. McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_pmf.c,v 1.36 2012/11/13 14:08:07 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_pmf.c,v 1.36.12.1 2015/03/25 16:54:37 snj Exp $");
 
 #include 
 #include 
@@ -82,9 +82,6 @@ int pmf_debug_transition;
 
 /* #define PMF_DEBUG */
 
-#include 
-MALLOC_DEFINE(M_PMF, "pmf", "device pmf messaging memory");
-
 static prop_dictionary_t pmf_platform = NULL;
 static struct workqueue *pmf_event_workqueue;
 static struct workqueue *pmf_suspend_workqueue;

Index: src/sys/rump/librump/rumpkern/rump.c
diff -u src/sys/rump/librump/rumpkern/rump.c:1.308.2.2 src/sys/rump/librump/rumpkern/rump.c:1.308.2.3
--- src/sys/rump/librump/rumpkern/rump.c:1.308.2.2	Tue Dec  9 19:14:27 2014
+++ src/sys/rump/librump/rumpkern/rump.c	Wed Mar 25 16:54:37 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: rump.c,v 1.308.2.2 2014/12/09 19:14:27 martin Exp $	*/
+/*	$NetBSD: rump.c,v 1.308.2.3 2015/03/25 16:54:37 snj Exp $	*/
 
 /*
  * Copyright (c) 2007-2011 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.308.2.2 2014/12/09 19:14:27 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.308.2.3 2015/03/25 16:54:37 snj Exp $");
 
 #include 
 #define ELFSIZE ARCH_ELFSIZE
@@ -281,7 +281,6 @@ rump_init(void)
 	prop_kern_init();
 
 	kmem_init();
-	kmeminit();
 
 	uvm_ra_init();
 	uao_init();

Index: src/sys/uvm/uvm_extern.h
diff -u src/sys/uvm/uvm_extern.h:1.191.2.1 src/sys/uvm/uvm_extern.h:1.191.2.2
--- src/sys/uvm/uvm_extern.h:1.191.2.1	Wed Dec 31 06:44:01 2014
+++ src/sys/uvm/uvm_extern.h	Wed Mar 25 16:54:37 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_extern.h,v 1.191.2.1 2014/12/31 06:44:01 snj Exp $	*/
+/*	$NetBSD: uvm_extern.h,v 1.191.2.2 2015/03/25 16:54:37 snj Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -741,7 +741,6 @@ bool			uvn_needs_writefault_p(struct uvm
 
 /* kern_malloc.c */
 void			kmeminit_nkmempages(void);
-void			kmeminit(void);
 extern int		nkmempages;
 
 #endif /* _KERNEL */

Index: src/sys/uvm/uvm_km.c
diff -u src/sys/uvm/uvm_km.c:1.138 src/sys/uvm/uvm_km.c:1.138.12.1
--- src/sys/uvm/uvm_km.c:1.138	Tue Jan 29 21:29:40 2013
+++ src/sys/uvm/uvm_km.c	Wed Mar 25 16:54:37 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_km.c,v 1.138 2013/01/29 21:29:40 para Exp $	*/
+/*	$NetBSD: uvm_km.c,v 1.138.12.1 2015/03/25 16:54:37 snj Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -152,7 +152,7 @@
  */
 
 #include 

CVS commit: [netbsd-7] src/doc

2015-03-25 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Wed Mar 25 16:45:01 UTC 2015

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

Log Message:
amend 128


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.236 -r1.1.2.237 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.236 src/doc/CHANGES-7.0:1.1.2.237
--- src/doc/CHANGES-7.0:1.1.2.236	Wed Mar 25 13:25:05 2015
+++ src/doc/CHANGES-7.0	Wed Mar 25 16:45:01 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.0,v 1.1.2.236 2015/03/25 13:25:05 msaitoh Exp $
+# $NetBSD: CHANGES-7.0,v 1.1.2.237 2015/03/25 16:45:01 snj Exp $
 
 A complete list of changes from the initial NetBSD 7.0 branch on 11 Aug 2014
 until the 7.0 release:
@@ -1038,6 +1038,7 @@ sys/dev/sdmmc/sdhc.c1.50
 	Fix divisor calculation for SDHC 3.0.
 	[skrll, ticket #127]
 
+doc/CHANGES	patch
 games/factor/factor.61.13
 games/factor/factor.c1.27
 games/primes/Makefile1.8



CVS commit: [netbsd-7] src/doc

2015-03-25 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Wed Mar 25 16:44:34 UTC 2015

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

Log Message:
Apply patch (requested by ast in ticket #128):
Mention primes(6) change.


To generate a diff of this commit:
cvs rdiff -u -r1.1967.2.10 -r1.1967.2.11 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.1967.2.10 src/doc/CHANGES:1.1967.2.11
--- src/doc/CHANGES:1.1967.2.10	Fri Jan 16 14:06:14 2015
+++ src/doc/CHANGES	Wed Mar 25 16:44:34 2015
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.1967.2.10 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.1967.2.11 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -21,7 +21,7 @@
 #
 # See htutils/changes/changes2html script for more details.
 #
-LIST OF CHANGES FROM PREVIOUS RELEASES:			<$Revision: 1.1967.2.10 $>
+LIST OF CHANGES FROM PREVIOUS RELEASES:			<$Revision: 1.1967.2.11 $>
 
 
 Changes from NetBSD 6.0 to NetBSD 7.0:
@@ -513,6 +513,8 @@ Changes from NetBSD 6.0 to NetBSD 7.0:
 	kernel: Add MODULAR infrastructure for Xen kernels. [jnemeth 20140810]
 	hp300: Add arcofi(4) audio driver for the HP "Audio1" device found on
 		HP9000/425e.  Ported from OpenBSD.  [tsutsui 20140824]
+	primes(6): Do not flag false positives for some integers >2^16.
+		From FreeBSD. [ast 20141002]
 	rnd(9): Add explicit enable/disable hooks for callout-driven
 		sources (be more power friendly). [tls 20141026]
 	rnd(9): Make "skew" source polled so it runs only when there



CVS commit: src/games/fortune/datfiles

2015-03-25 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Wed Mar 25 16:23:02 UTC 2015

Modified Files:
src/games/fortune/datfiles: fortunes2

Log Message:
Avoid runon sentences.


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 src/games/fortune/datfiles/fortunes2

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

Modified files:

Index: src/games/fortune/datfiles/fortunes2
diff -u src/games/fortune/datfiles/fortunes2:1.54 src/games/fortune/datfiles/fortunes2:1.55
--- src/games/fortune/datfiles/fortunes2:1.54	Sat Oct 18 06:40:18 2014
+++ src/games/fortune/datfiles/fortunes2	Wed Mar 25 16:23:02 2015
@@ -346,23 +346,23 @@ Beware the infiniteloop
 %
 		Safety Tips for the Post-Nuclear Existence
 1.	Never use an elevator in a building that has been hit by a
-		nuclear bomb, use the stairs.
+		nuclear bomb; use the stairs.
 2.	When you're flying through the air, remember to roll
 		when you hit the ground.
 3.	If you're on fire, avoid gasoline and other flammable materials.
 4.	Don't attempt communication with dead people; it will only lead
 		to psychological problems.
-5.	Food will be scarce, you will have to scavenge.   Learn to recognize
+5.	Food will be scarce, you will have to scavenge.  Learn to recognize
 		foods that will be available after the bomb: mashed potatoes,
 		shredded wheat, tossed salad, ground beef, etc.
-6.	Put your hand over your mouth when you sneeze, internal organs
+6.	Put your hand over your mouth when you sneeze:  internal organs
 		will be scarce in the post-nuclear age.
-7.	Try to be neat, fall only in designated piles.
-8.	Drive carefully in "Heavy Fallout" areas, people could be
+7.	Try to be neat.  Fall only in designated piles.
+8.	Drive carefully in "Heavy Fallout" areas -- people could be
 		staggering illegally.
-9.	Nutritionally, hundred dollar bills are equal to one's, but more
-		sanitary due to limited circulation.
-10.	Accumulate mannequins now, spare parts will be in short
+9.	Nutritionally, hundred dollar bills are equal to ones, but are
+		more sanitary due to limited circulation.
+10.	Accumulate mannequins now.  Spare parts will be in short
 		supply on D-Day.
 %
 		The Guy on the Right Doesn't Stand a Chance



CVS commit: [netbsd-7] src/doc

2015-03-25 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Mar 25 13:25:05 UTC 2015

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

Log Message:
Cleanup ticket 545.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.235 -r1.1.2.236 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.235 src/doc/CHANGES-7.0:1.1.2.236
--- src/doc/CHANGES-7.0:1.1.2.235	Sat Mar 21 17:56:02 2015
+++ src/doc/CHANGES-7.0	Wed Mar 25 13:25:05 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.0,v 1.1.2.235 2015/03/21 17:56:02 snj Exp $
+# $NetBSD: CHANGES-7.0,v 1.1.2.236 2015/03/25 13:25:05 msaitoh Exp $
 
 A complete list of changes from the initial NetBSD 7.0 branch on 11 Aug 2014
 until the 7.0 release:
@@ -16075,7 +16075,6 @@ external/bsd/bind/dist/version			1.12
 
 sys/dev/pci/ixgbe/ixgbe.c			1.16-1.19
 sys/dev/pci/ixgbe/ixgbe.h			1.2
-sys/dev/pci/ixgbe/ixgbe_netbsd.c		1.2-1.3
 
 	Fix mutex(9) related problem reported by Uwe Toenjes in PR#49328.
 	[msaitoh, ticket #545]



CVS commit: src/sys/dev/pci/ixgbe

2015-03-25 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Mar 25 12:53:55 UTC 2015

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

Log Message:
 Fix a bug that vlan setting may not apply to the parent interface correctly.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/dev/pci/ixgbe/ixgbe.c

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

Modified files:

Index: src/sys/dev/pci/ixgbe/ixgbe.c
diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.22 src/sys/dev/pci/ixgbe/ixgbe.c:1.23
--- src/sys/dev/pci/ixgbe/ixgbe.c:1.22	Thu Mar 19 14:22:23 2015
+++ src/sys/dev/pci/ixgbe/ixgbe.c	Wed Mar 25 12:53:55 2015
@@ -59,7 +59,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 /*$FreeBSD: src/sys/dev/ixgbe/ixgbe.c,v 1.51 2011/04/25 23:34:21 jfv Exp $*/
-/*$NetBSD: ixgbe.c,v 1.22 2015/03/19 14:22:23 msaitoh Exp $*/
+/*$NetBSD: ixgbe.c,v 1.23 2015/03/25 12:53:55 msaitoh Exp $*/
 
 #include "opt_inet.h"
 #include "opt_inet6.h"
@@ -1085,6 +1085,9 @@ ixgbe_ifflags_cb(struct ethercom *ec)
 	else if ((change & (IFF_PROMISC | IFF_ALLMULTI)) != 0)
 		ixgbe_set_promisc(adapter);
 
+	/* Set up VLAN support and filter */
+	ixgbe_setup_vlan_hw_support(adapter);
+
 	IXGBE_CORE_UNLOCK(adapter);
 
 	return rc;



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

2015-03-25 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Wed Mar 25 11:25:10 UTC 2015

Modified Files:
src/sys/arch/mips/ingenic: apbus.c ingenic_var.h

Log Message:
- determine bus clock, pass it to devices
- more clock enabling / gpio setup


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/mips/ingenic/apbus.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/mips/ingenic/ingenic_var.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/apbus.c
diff -u src/sys/arch/mips/ingenic/apbus.c:1.10 src/sys/arch/mips/ingenic/apbus.c:1.11
--- src/sys/arch/mips/ingenic/apbus.c:1.10	Thu Mar 19 12:22:00 2015
+++ src/sys/arch/mips/ingenic/apbus.c	Wed Mar 25 11:25:10 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: apbus.c,v 1.10 2015/03/19 12:22:00 macallan Exp $ */
+/*	$NetBSD: apbus.c,v 1.11 2015/03/25 11:25:10 macallan Exp $ */
 
 /*-
  * Copyright (c) 2014 Michael Lorenz
@@ -29,7 +29,7 @@
 /* catch-all for on-chip peripherals */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: apbus.c,v 1.10 2015/03/19 12:22:00 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: apbus.c,v 1.11 2015/03/25 11:25:10 macallan Exp $");
 
 #include "locators.h"
 #define	_MIPS_BUS_DMA_PRIVATE
@@ -113,7 +113,7 @@ apbus_match(device_t parent, cfdata_t ma
 void
 apbus_attach(device_t parent, device_t self, void *aux)
 {
-	uint32_t reg;
+	uint32_t reg, mpll, m, n, p, mclk, pclk, pdiv;
 	aprint_normal("\n");
 
 	/* should have been called early on */
@@ -125,8 +125,24 @@ apbus_attach(device_t parent, device_t s
 	printf("REIM: %08x\n", MFC0(12, 4));
 	printf("ID: %08x\n", MFC0(15, 1));
 #endif
+	/* assuming we're using MPLL */
+	mpll = readreg(JZ_CPMPCR);
+	m = (mpll & JZ_PLLM_M) >> JZ_PLLM_S;
+	n = (mpll & JZ_PLLN_M) >> JZ_PLLN_S;
+	p = (mpll & JZ_PLLP_M) >> JZ_PLLP_S;
+
+	/* assuming 48MHz EXTCLK */
+	mclk = (48000 * (m + 1) / (n + 1)) / (p + 1);
+
+	reg = readreg(JZ_CPCCR);
+	pdiv = (reg & JZ_PDIV_M) >> JZ_PDIV_S;
+	pclk = mclk / pdiv;
+#ifdef INGENIC_DEBUG
+	printf("mclk %d kHz\n", mclk);
+	printf("pclk %d kHz\n", pclk);
+#endif
 
-	/* enable USB clocks */
+	/* enable clocks */
 	reg = readreg(JZ_CLKGR1);
 	reg &= ~(1 << 0);	/* SMB3 clock */
 	reg &= ~(1 << 8);	/* OTG1 clock */
@@ -135,6 +151,7 @@ apbus_attach(device_t parent, device_t s
 	writereg(JZ_CLKGR1, reg);
 
 	reg = readreg(JZ_CLKGR0);
+	reg &= ~(1 << 2);	/* OTG0 clock */
 	reg &= ~(1 << 5);	/* SMB0 clock */
 	reg &= ~(1 << 6);	/* SMB1 clock */
 	reg &= ~(1 << 24);	/* UHC clock */
@@ -146,6 +163,30 @@ apbus_attach(device_t parent, device_t s
 	reg |= OPCR_SPENDN0 | OPCR_SPENDN1;
 	writereg(JZ_OPCR, reg);
 
+	/* setup GPIOs for I2C buses */
+	/* iic0 */
+	gpio_as_dev0(3, 30);
+	gpio_as_dev0(3, 31);
+	/* iic1 */
+	gpio_as_dev0(4, 30);
+	gpio_as_dev0(4, 31);
+	/* iic2 */
+	gpio_as_dev2(5, 16);
+	gpio_as_dev2(5, 17);
+	/* iic3 */
+	gpio_as_dev1(3, 10);
+	gpio_as_dev1(3, 11);
+	/* iic4 */
+	/* make sure these aren't SMB4 */
+	gpio_as_dev3(4, 3);
+	gpio_as_dev3(4, 4);
+	/* these are supposed to be connected to the RTC */
+	gpio_as_dev1(4, 12);
+	gpio_as_dev1(4, 13);
+	/* these can be DDC2 or SMB4, set them to DDC2 */
+	gpio_as_dev0(5, 24);
+	gpio_as_dev0(5, 25);
+
 #ifdef INGENIC_DEBUG
 	printf("JZ_CLKGR0 %08x\n", readreg(JZ_CLKGR0));
 	printf("JZ_CLKGR1 %08x\n", readreg(JZ_CLKGR1));
@@ -163,6 +204,7 @@ apbus_attach(device_t parent, device_t s
 		aa.aa_irq  = adv->irq;
 		aa.aa_dmat = &apbus_dmat;
 		aa.aa_bst = apbus_memt;
+		aa.aa_pclk = pclk;
 
 		(void) config_found_ia(self, "apbus", &aa, apbus_print);
 	}

Index: src/sys/arch/mips/ingenic/ingenic_var.h
diff -u src/sys/arch/mips/ingenic/ingenic_var.h:1.2 src/sys/arch/mips/ingenic/ingenic_var.h:1.3
--- src/sys/arch/mips/ingenic/ingenic_var.h:1.2	Tue Mar 17 07:25:07 2015
+++ src/sys/arch/mips/ingenic/ingenic_var.h	Wed Mar 25 11:25:10 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: ingenic_var.h,v 1.2 2015/03/17 07:25:07 macallan Exp $ */
+/*	$NetBSD: ingenic_var.h,v 1.3 2015/03/25 11:25:10 macallan Exp $ */
 
 /*-
  * Copyright (c) 2014 Michael Lorenz
@@ -37,6 +37,7 @@ struct apbus_attach_args {
 	bus_dma_tag_t	aa_dmat;
 	bus_addr_t	aa_addr;
 	uint32_t	aa_irq;
+	uint32_t	aa_pclk;	/* PCLK in kHz */
 };
 
 extern bus_space_tag_t ingenic_memt;



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

2015-03-25 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Wed Mar 25 11:23:26 UTC 2015

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

Log Message:
more clock and gpio stuff


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 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.11 src/sys/arch/mips/ingenic/ingenic_regs.h:1.12
--- src/sys/arch/mips/ingenic/ingenic_regs.h:1.11	Thu Mar 19 12:22:36 2015
+++ src/sys/arch/mips/ingenic/ingenic_regs.h	Wed Mar 25 11:23:26 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: ingenic_regs.h,v 1.11 2015/03/19 12:22:36 macallan Exp $ */
+/*	$NetBSD: ingenic_regs.h,v 1.12 2015/03/25 11:23:26 macallan Exp $ */
 
 /*-
  * Copyright (c) 2014 Michael Lorenz
@@ -162,6 +162,19 @@ MFC0(uint32_t r, uint32_t s)
 #define CP0_CORE_MBOX	20	/* select 0 for core 0, 1 for 1 */
 
 /* power management */
+#define JZ_CPCCR	0x1000	/* Clock Control Register */
+	#define JZ_PDIV_M	0x000f	/* PCLK divider mask */
+	#define JZ_PDIV_S	16		/* PCLK divider shift */
+#define JZ_CPMPCR	0x0014	/* MPLL */
+	#define JZ_PLLM_S	19		/* PLL multiplier shift */
+	#define JZ_PLLM_M	0xfff8	/* PLL multiplier mask */
+	#define JZ_PLLN_S	13		/* PLL divider shift */
+	#define JZ_PLLN_M	0x0007e000	/* PLL divider mask */
+	#define JZ_PLLP_S	9		/* PLL postdivider shift */
+	#define JZ_PLLP_M	0x1700	/* PLL postdivider mask */
+	#define JZ_PLLON	0x0010	/* PLL is on and stable */
+	#define JZ_PLLBP	0x0002	/* PLL bypass */
+	#define JZ_PLLEN	0x0001	/* PLL enable */
 #define JZ_CLKGR0	0x1020	/* CLocK Gating Registers */
 #define JZ_OPCR		0x1024	/* Oscillator Power Control Reg. */
 	#define OPCR_IDLE_DIS	0x8000	/* don't stop CPU clk on idle */
@@ -360,6 +373,42 @@ gpio_as_dev0(uint32_t g, int pin)
 }
 	
 static inline void
+gpio_as_dev1(uint32_t g, int pin)
+{
+	uint32_t mask = 1 << pin;
+	uint32_t reg = JZ_GPIO_A_BASE + (g << 8);
+
+	writereg(reg + JZ_GPIO_INTC, mask);	/* use as gpio */
+	writereg(reg + JZ_GPIO_MASKC, mask);	/* device mode */
+	writereg(reg + JZ_GPIO_PAT1C, mask);	/* select 1 */
+	writereg(reg + JZ_GPIO_PAT0S, mask);
+}
+	
+static inline void
+gpio_as_dev2(uint32_t g, int pin)
+{
+	uint32_t mask = 1 << pin;
+	uint32_t reg = JZ_GPIO_A_BASE + (g << 8);
+
+	writereg(reg + JZ_GPIO_INTC, mask);	/* use as gpio */
+	writereg(reg + JZ_GPIO_MASKC, mask);	/* device mode */
+	writereg(reg + JZ_GPIO_PAT1S, mask);	/* select 2 */
+	writereg(reg + JZ_GPIO_PAT0C, mask);
+}
+	
+static inline void
+gpio_as_dev3(uint32_t g, int pin)
+{
+	uint32_t mask = 1 << pin;
+	uint32_t reg = JZ_GPIO_A_BASE + (g << 8);
+
+	writereg(reg + JZ_GPIO_INTC, mask);	/* use as gpio */
+	writereg(reg + JZ_GPIO_MASKC, mask);	/* device mode */
+	writereg(reg + JZ_GPIO_PAT1S, mask);	/* select 3 */
+	writereg(reg + JZ_GPIO_PAT0S, mask);
+}
+	
+static inline void
 gpio_as_intr_level(uint32_t g, int pin)
 {
 	uint32_t mask = 1 << pin;
@@ -446,5 +495,6 @@ gpio_as_intr_level(uint32_t g, int pin)
 #define JZ_SMBACKGC	0x98 /* SMB ACK General Call Register */
 #define JZ_SMBENBST	0x9C /* SMB Enable Status Register */
 #define JZ_SMBSDAHD	0xD0 /* SMB SDA HolD time Register */
+	#define JZ_HDENB	0x100	/* enable hold time */
 
 #endif /* INGENIC_REGS_H */