CVS commit: src/sys/dev/pci

2016-10-18 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Oct 19 04:23:37 UTC 2016

Modified Files:
src/sys/dev/pci: pci_subr.c pcireg.h

Log Message:
Add VF Resizable BARs ECN.


To generate a diff of this commit:
cvs rdiff -u -r1.150 -r1.151 src/sys/dev/pci/pci_subr.c
cvs rdiff -u -r1.114 -r1.115 src/sys/dev/pci/pcireg.h

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

Modified files:

Index: src/sys/dev/pci/pci_subr.c
diff -u src/sys/dev/pci/pci_subr.c:1.150 src/sys/dev/pci/pci_subr.c:1.151
--- src/sys/dev/pci/pci_subr.c:1.150	Mon Aug 22 08:35:42 2016
+++ src/sys/dev/pci/pci_subr.c	Wed Oct 19 04:23:37 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: pci_subr.c,v 1.150 2016/08/22 08:35:42 msaitoh Exp $	*/
+/*	$NetBSD: pci_subr.c,v 1.151 2016/10/19 04:23:37 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 1997 Zubin D. Dittia.  All rights reserved.
@@ -40,7 +40,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pci_subr.c,v 1.150 2016/08/22 08:35:42 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_subr.c,v 1.151 2016/10/19 04:23:37 msaitoh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_pci.h"
@@ -3346,6 +3346,7 @@ pci_conf_print_ptm_cap(const pcireg_t *r
 /* XXX pci_conf_print_frsq_cap */
 /* XXX pci_conf_print_rtr_cap */
 /* XXX pci_conf_print_desigvndsp_cap */
+/* XXX pci_conf_print_vf_resiz_bar_cap */
 
 #undef	MS
 #undef	SM
@@ -3428,6 +3429,8 @@ static struct {
 	  NULL },
 	{ PCI_EXTCAP_DESIGVNDSP, "Designated Vendor-Specific",
 	  NULL },
+	{ PCI_EXTCAP_VF_RESIZ_BAR, "VF Resizable BARs",
+	  NULL },
 };
 
 static int

Index: src/sys/dev/pci/pcireg.h
diff -u src/sys/dev/pci/pcireg.h:1.114 src/sys/dev/pci/pcireg.h:1.115
--- src/sys/dev/pci/pcireg.h:1.114	Wed Aug 17 06:32:01 2016
+++ src/sys/dev/pci/pcireg.h	Wed Oct 19 04:23:37 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: pcireg.h,v 1.114 2016/08/17 06:32:01 msaitoh Exp $	*/
+/*	$NetBSD: pcireg.h,v 1.115 2016/10/19 04:23:37 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 1995, 1996, 1999, 2000
@@ -1405,6 +1405,7 @@ struct pci_rom {
 #define	PCI_EXTCAP_FRSQ		0x0021	/* Function Reading Status Queueing */
 #define	PCI_EXTCAP_RTR		0x0022	/* Readiness Time Reporting */
 #define	PCI_EXTCAP_DESIGVNDSP	0x0023	/* Designated Vendor-Specific */
+#define	PCI_EXTCAP_VF_RESIZ_BAR	0x0024	/* VF Resizable BAR */
 
 /*
  * Extended capability ID: 0x0001
@@ -1937,4 +1938,9 @@ struct pci_rom {
  * Designated Vendor-Specific
  */
 
+/*
+ * Extended capability ID: 0x0024
+ * VF Resizable BAR
+ */
+
 #endif /* _DEV_PCI_PCIREG_H_ */



CVS commit: src/sys/dev/pci

2016-10-18 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Oct 19 03:59:17 UTC 2016

Modified Files:
src/sys/dev/pci: pcidevs

Log Message:
 Add Xeon 5[56]00 devices from
"Intel Xeon Processor 5500 Series Datasheet, Volume 2" and
"Intel Xeon Processor 5600 Series Datasheet, Volume 2"


To generate a diff of this commit:
cvs rdiff -u -r1.1266 -r1.1267 src/sys/dev/pci/pcidevs

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/pcidevs
diff -u src/sys/dev/pci/pcidevs:1.1266 src/sys/dev/pci/pcidevs:1.1267
--- src/sys/dev/pci/pcidevs:1.1266	Tue Oct  4 14:55:32 2016
+++ src/sys/dev/pci/pcidevs	Wed Oct 19 03:59:17 2016
@@ -1,4 +1,4 @@
-$NetBSD: pcidevs,v 1.1266 2016/10/04 14:55:32 kiyohara Exp $
+$NetBSD: pcidevs,v 1.1267 2016/10/19 03:59:17 msaitoh Exp $
 
 /*
  * Copyright (c) 1995, 1996 Christopher G. Demetriou
@@ -3670,12 +3670,60 @@ product INTEL 82GM45_HB		0x2a40	82GM45 H
 product INTEL 82GM45_IGD	0x2a42	82GM45 Integrated Graphics Device
 product INTEL 82GM45_IGD_1	0x2a43	82GM45 Integrated Graphics Device
 product INTEL 82GM45_KT		0x2a47	82GM45 KT
+product INTEL XE55_QP_SAD	0x2c01	QuickPath System Address Decoder
+product INTEL XE55_QPI_LINK0	0x2c10	Xeon 5500 QPI Link 0
+product INTEL XE55_QPI_PHYS0	0x2c11	Xeon 5500 QPI Physical 0
+product INTEL XE55_MIRR_LINK0	0x2c12	Xeon 5500 Mirror Port Link 0
+product INTEL XE55_MIRR_LINK1	0x2c13	Xeon 5500 Mirror Port Link 1
+product INTEL XE55_QPI_LINK1	0x2c14	Xeon 5500 QPI Link 1
+product INTEL XE55_QPI_PHYS1	0x2c15	Xeon 5500 QPI Physical 1
+product INTEL XE55_IMC_REG	0x2c18	Xeon 5500 IMC
+product INTEL XE55_IMC_TAD	0x2c19	Xeon 5500 IMC Target Address Decoder
+product INTEL XE55_IMC_RAS	0x2c1a	Xeon 5500 IMC RAS
+product INTEL XE55_IMC_TEST	0x2c1c	Xeon 5500 IMC Test
+product INTEL XE55_IMC_CH0_CTRL 0x2c20	Xeon 5500 IMC Channel 0 Control
+product INTEL XE55_IMC_CH0_ADDR 0x2c21	Xeon 5500 IMC Channel 0 Address
+product INTEL XE55_IMC_CH0_RANK 0x2c22	Xeon 5500 IMC Channel 0 Rank
+product INTEL XE55_IMC_CH0_THERM 0x2c23	Xeon 5500 IMC Channel 0 Thermal Control
+product INTEL XE55_IMC_CH1_CTRL 0x2c28	Xeon 5500 IMC Channel 1 Control
+product INTEL XE55_IMC_CH1_ADDR 0x2c29	Xeon 5500 IMC Channel 1 Address
+product INTEL XE55_IMC_CH1_RANK 0x2c2a	Xeon 5500 IMC Channel 1 Rank
+product INTEL XE55_IMC_CH1_THERM 0x2c2b	Xeon 5500 IMC Channel 1 Thermal Control
+product INTEL XE55_IMC_CH2_CTRL 0x2c30	Xeon 5500 IMC Channel 2 Control
+product INTEL XE55_IMC_CH2_ADDR 0x2c31	Xeon 5500 IMC Channel 2 Address
+product INTEL XE55_IMC_CH2_RANK 0x2c32	Xeon 5500 IMC Channel 2 Rank
+product INTEL XE55_IMC_CH2_THERM 0x2c33	Xeon 5500 IMC Channel 2 Thermal Control
+product INTEL XE55_QP_REG	0x2c40	Xeon 5500 QuickPath Generic Non-Core Register
 product INTEL CORE_QP_REG_1	0x2c61	QuickPath Generic Non-Core Register
+product INTEL XE56_QP_REG	0x2c70	Xeon 5600 QuickPath Generic Non-Core Register
 product INTEL CORE_QP_SAD	0x2d01	QuickPath Generic System Address Decoder
 product INTEL CORE_QPI_LINK	0x2d10	QPI Link
 product INTEL CORE_QPI_PHYS	0x2d11	QPI Physical
 product INTEL CORE_RSVD_1	0x2d12	Reserved
 product INTEL CORE_RSVD_2	0x2d13	Reserved
+product INTEL XE56_QP_SAD	0x2d81	QuickPath System Address Decoder
+product INTEL XE56_QPI_LINK0	0x2d90	Xeon 5600 QPI Link 0
+product INTEL XE56_QPI_PHYS0	0x2d91	Xeon 5600 QPI Physical 0
+product INTEL XE56_MIRR_LINK0	0x2d92	Xeon 5600 Mirror Port Link 0
+product INTEL XE56_MIRR_LINK1	0x2d93	Xeon 5600 Mirror Port Link 1
+product INTEL XE56_QPI_LINK1	0x2d94	Xeon 5600 QPI Link 1
+product INTEL XE56_QPI_PHYS1	0x2d95	Xeon 5600 QPI Physical 1
+product INTEL XE56_IMC_REG	0x2d98	Xeon 5600 IMC
+product INTEL XE56_IMC_TAD	0x2d99	Xeon 5600 IMC Target Address Decoder
+product INTEL XE56_IMC_RAS	0x2d9a	Xeon 5600 IMC RAS
+product INTEL XE56_IMC_TEST	0x2d9c	Xeon 5600 IMC Test
+product INTEL XE56_IMC_CH0_CTRL 0x2da0	Xeon 5600 IMC Channel 0 Control
+product INTEL XE56_IMC_CH0_ADDR 0x2da1	Xeon 5600 IMC Channel 0 Address
+product INTEL XE56_IMC_CH0_RANK 0x2da2	Xeon 5600 IMC Channel 0 Rank
+product INTEL XE56_IMC_CH0_THERM 0x2da3	Xeon 5600 IMC Channel 0 Thermal Control
+product INTEL XE56_IMC_CH1_CTRL 0x2da8	Xeon 5600 IMC Channel 1 Control
+product INTEL XE56_IMC_CH1_ADDR 0x2da9	Xeon 5600 IMC Channel 1 Address
+product INTEL XE56_IMC_CH1_RANK 0x2daa	Xeon 5600 IMC Channel 1 Rank
+product INTEL XE56_IMC_CH1_THERM 0x2dab	Xeon 5600 IMC Channel 1 Thermal Control
+product INTEL XE56_IMC_CH2_CTRL 0x2db0	Xeon 5600 IMC Channel 2 Control
+product INTEL XE56_IMC_CH2_ADDR 0x2db1	Xeon 5600 IMC Channel 2 Address
+product INTEL XE56_IMC_CH2_RANK 0x2db2	Xeon 5600 IMC Channel 2 Rank
+product INTEL XE56_IMC_CH2_THERM 0x2db3	Xeon 5600 IMC Channel 2 Thermal Control
 product INTEL 82IGD_E_HB	0x2e00	82IGD_E Host Bridge
 product INTEL 82IGD_E_IGD	0x2e02	82IGD_E Integrated Graphics
 product INTEL 82Q45_KT		0x2e07	82Q45 KT



CVS commit: src/usr.sbin/perfused

2016-10-18 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Oct 19 01:31:05 UTC 2016

Modified Files:
src/usr.sbin/perfused: msg.c

Log Message:
remove dup function


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/usr.sbin/perfused/msg.c

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

Modified files:

Index: src/usr.sbin/perfused/msg.c
diff -u src/usr.sbin/perfused/msg.c:1.23 src/usr.sbin/perfused/msg.c:1.24
--- src/usr.sbin/perfused/msg.c:1.23	Tue Oct 18 11:06:17 2016
+++ src/usr.sbin/perfused/msg.c	Tue Oct 18 21:31:05 2016
@@ -1,4 +1,4 @@
-/*  $NetBSD: msg.c,v 1.23 2016/10/18 15:06:17 manu Exp $ */
+/*  $NetBSD: msg.c,v 1.24 2016/10/19 01:31:05 christos Exp $ */
 
 /*-
  *  Copyright (c) 2010 Emmanuel Dreyfus. All rights reserved.
@@ -43,41 +43,11 @@
 
 #include "perfused.h"
 
-static uint32_t bufvar_from_env(const char const *, const uint32_t);
 static int xchg_pb_inloop(struct puffs_usermount *a, struct puffs_framebuf *,
 	int, enum perfuse_xchg_pb_reply);
 static int xchg_pb_early(struct puffs_usermount *a, struct puffs_framebuf *,
 	int, enum perfuse_xchg_pb_reply);
 
-static uint32_t 
-bufvar_from_env(name, defval)
-	const char *name;
-	const uint32_t defval;
-{
-	char valstr[1024];
-	uint32_t retval = defval;
-
-	if (getenv_r(name, valstr, sizeof(valstr)) != -1) {
-		long int val;
-		char *ep;
-
-		errno = 0;
-		val = (int)strtol(valstr, , 10);
-		if (*valstr == '\0' || *ep != '\0')
-			DWARNX("bad %s value \"%s\"", name, valstr);
-		else if (errno != 0)
-			DWARN("bad %s value \"%s\"", name, valstr);
-		else if (val <= 0L ||
-			 (unsigned long int)val > (unsigned long int)UINT32_MAX)
-			DWARNX("%s value %ld out of "
-			   "uint32_t bounds", name, val);
-		else
-			retval = val;
-	}
-
-	return retval;
-}
-
 int
 perfused_open_sock(void)
 {
@@ -111,7 +81,7 @@ perfused_open_sock(void)
 	 * Set a buffer lentgh large enough so that a few FUSE packets
 	 * will fit. 
 	 */
-	opt = bufvar_from_env("PERFUSE_BUFSIZE", 16 * FUSE_BUFSIZE);
+	opt = perfuse_bufvar_from_env("PERFUSE_BUFSIZE", 16 * FUSE_BUFSIZE);
 	if (setsockopt(s, SOL_SOCKET, SO_SNDBUF, , sizeof(opt)) != 0)
 		DWARN("%s: setsockopt SO_SNDBUF = %d failed", __func__, opt);
 



CVS commit: src/lib/libperfuse

2016-10-18 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Oct 19 01:30:35 UTC 2016

Modified Files:
src/lib/libperfuse: perfuse.c perfuse_if.h

Log Message:
make the env stuff visible.


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/lib/libperfuse/perfuse.c
cvs rdiff -u -r1.21 -r1.22 src/lib/libperfuse/perfuse_if.h

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

Modified files:

Index: src/lib/libperfuse/perfuse.c
diff -u src/lib/libperfuse/perfuse.c:1.39 src/lib/libperfuse/perfuse.c:1.40
--- src/lib/libperfuse/perfuse.c:1.39	Tue Oct 18 13:56:31 2016
+++ src/lib/libperfuse/perfuse.c	Tue Oct 18 21:30:35 2016
@@ -1,4 +1,4 @@
-/*  $NetBSD: perfuse.c,v 1.39 2016/10/18 17:56:31 christos Exp $ */
+/*  $NetBSD: perfuse.c,v 1.40 2016/10/19 01:30:35 christos Exp $ */
 
 /*-
  *  Copyright (c) 2010-2011 Emmanuel Dreyfus. All rights reserved.
@@ -52,8 +52,6 @@ extern char **environ;
 
 static struct perfuse_state *init_state(void);
 static int get_fd(const char *);
-static uint32_t bufvar_from_env(const char *, uint32_t);
-
 
 static struct perfuse_state *
 init_state(void)
@@ -148,8 +146,8 @@ get_fd(const char *data)
 
 }
 
-static uint32_t 
-bufvar_from_env(const char *name, uint32_t defval)
+uint32_t 
+perfuse_bufvar_from_env(const char *name, uint32_t defval)
 {
 	char valstr[1024];
 	int e;
@@ -204,7 +202,8 @@ perfuse_open(const char *path, int flags
 	 * Set a buffer lentgh large enough so that enough FUSE packets
 	 * will fit.
 	 */
-	opt = bufvar_from_env("PERFUSE_BUFSIZE", (uint32_t)(16 * FUSE_BUFSIZE));
+	opt = perfuse_bufvar_from_env("PERFUSE_BUFSIZE",
+	(uint32_t)(16 * FUSE_BUFSIZE));
 	optlen = sizeof(opt);
 	if (setsockopt(sv[0], SOL_SOCKET, SO_SNDBUF, , optlen) != 0)
 		DWARN("%s: setsockopt SO_SNDBUF to %d failed", __func__, opt);
@@ -235,7 +234,8 @@ perfuse_open(const char *path, int flags
 	 * Set a buffer lentgh large enough so that enough FUSE packets
 	 * will fit.
 	 */
-	opt = bufvar_from_env("PERFUSE_BUFSIZE", (uint32_t)(16 * FUSE_BUFSIZE));
+	opt = perfuse_bufvar_from_env("PERFUSE_BUFSIZE",
+	(uint32_t)(16 * FUSE_BUFSIZE));
 	optlen = sizeof(opt);
 	if (setsockopt(sv[0], SOL_SOCKET, SO_SNDBUF, , optlen) != 0)
 		DWARN("%s: setsockopt SO_SNDBUF to %d failed", __func__, opt);

Index: src/lib/libperfuse/perfuse_if.h
diff -u src/lib/libperfuse/perfuse_if.h:1.21 src/lib/libperfuse/perfuse_if.h:1.22
--- src/lib/libperfuse/perfuse_if.h:1.21	Tue Oct 18 13:56:31 2016
+++ src/lib/libperfuse/perfuse_if.h	Tue Oct 18 21:30:35 2016
@@ -1,4 +1,4 @@
-/*  $NetBSD: perfuse_if.h,v 1.21 2016/10/18 17:56:31 christos Exp $ */
+/*  $NetBSD: perfuse_if.h,v 1.22 2016/10/19 01:30:35 christos Exp $ */
 
 /*-
  *  Copyright (c) 2010-2011 Emmanuel Dreyfus. All rights reserved.
@@ -219,5 +219,6 @@ int perfuse_mainloop(struct puffs_usermo
 int perfuse_unmount(struct puffs_usermount *);
 void perfuse_trace_dump(struct puffs_usermount *, FILE *);
 void perfuse_fsreq(struct puffs_usermount *, perfuse_msg_t *);
+uint32_t perfuse_bufvar_from_env(const char *, uint32_t);
 
 #endif /* _PERFUSE_IF_H */



CVS commit: src/sys/netinet

2016-10-18 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Wed Oct 19 01:13:01 UTC 2016

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

Log Message:
Remove unnecessary #ifdef IPSEC

The entire function is already in #ifdef IPSEC.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.226 -r1.227 src/sys/netinet/udp_usrreq.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/udp_usrreq.c
diff -u src/sys/netinet/udp_usrreq.c:1.226 src/sys/netinet/udp_usrreq.c:1.227
--- src/sys/netinet/udp_usrreq.c:1.226	Fri Jun 10 13:31:44 2016
+++ src/sys/netinet/udp_usrreq.c	Wed Oct 19 01:13:01 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: udp_usrreq.c,v 1.226 2016/06/10 13:31:44 ozaki-r Exp $	*/
+/*	$NetBSD: udp_usrreq.c,v 1.227 2016/10/19 01:13:01 ozaki-r Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -66,7 +66,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: udp_usrreq.c,v 1.226 2016/06/10 13:31:44 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: udp_usrreq.c,v 1.227 2016/10/19 01:13:01 ozaki-r Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -1339,13 +1339,9 @@ udp4_espinudp(struct mbuf **mp, int off,
 	((u_int16_t *)(tag + 1))[1] = dport;
 	m_tag_prepend(m, tag);
 
-#ifdef IPSEC
 	if (ipsec_used)
 		ipsec4_common_input(m, iphdrlen, IPPROTO_ESP);
 	/* XXX: else */
-#else
-	esp4_input(m, iphdrlen);
-#endif
 
 	/* We handled it, it shouldn't be handled by UDP */
 	*mp = NULL; /* avoid free by caller ... */



CVS commit: src/sys/netinet

2016-10-18 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Wed Oct 19 01:10:15 UTC 2016

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

Log Message:
Set ia to ensure to call ia4_release


To generate a diff of this commit:
cvs rdiff -u -r1.151 -r1.152 src/sys/netinet/ip_icmp.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_icmp.c
diff -u src/sys/netinet/ip_icmp.c:1.151 src/sys/netinet/ip_icmp.c:1.152
--- src/sys/netinet/ip_icmp.c:1.151	Mon Aug  1 03:15:30 2016
+++ src/sys/netinet/ip_icmp.c	Wed Oct 19 01:10:15 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: ip_icmp.c,v 1.151 2016/08/01 03:15:30 ozaki-r Exp $	*/
+/*	$NetBSD: ip_icmp.c,v 1.152 2016/10/19 01:10:15 ozaki-r Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -94,7 +94,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ip_icmp.c,v 1.151 2016/08/01 03:15:30 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip_icmp.c,v 1.152 2016/10/19 01:10:15 ozaki-r Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ipsec.h"
@@ -795,7 +795,8 @@ icmp_reflect(struct mbuf *m)
 			if (ifa->ifa_addr->sa_family != AF_INET)
 continue;
 			sin = &(ifatoia(ifa)->ia_addr);
-			ia4_acquire(ifatoia(ifa), _ia);
+			ia = ifatoia(ifa);
+			ia4_acquire(ia, _ia);
 			break;
 		}
 		pserialize_read_exit(s);



CVS commit: src/tests/net/if_pppoe

2016-10-18 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Wed Oct 19 00:19:13 UTC 2016

Modified Files:
src/tests/net/if_pppoe: t_pppoe.sh

Log Message:
Make sure to run cleanup

Should fix "tests: did not complete" failures.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tests/net/if_pppoe/t_pppoe.sh

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

Modified files:

Index: src/tests/net/if_pppoe/t_pppoe.sh
diff -u src/tests/net/if_pppoe/t_pppoe.sh:1.5 src/tests/net/if_pppoe/t_pppoe.sh:1.6
--- src/tests/net/if_pppoe/t_pppoe.sh:1.5	Tue Oct 18 04:10:24 2016
+++ src/tests/net/if_pppoe/t_pppoe.sh	Wed Oct 19 00:19:13 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: t_pppoe.sh,v 1.5 2016/10/18 04:10:24 ozaki-r Exp $
+#	$NetBSD: t_pppoe.sh,v 1.6 2016/10/19 00:19:13 ozaki-r Exp $
 #
 # Copyright (c) 2016 Internet Initiative Japan Inc.
 # All rights reserved.
@@ -184,7 +184,7 @@ run_test()
 	unset RUMP_SERVER
 }
 
-atf_test_case pap cleanup
+atf_test_case pppoe_pap cleanup
 
 pppoe_pap_head()
 {
@@ -202,7 +202,7 @@ pppoe_pap_cleanup()
 	cleanup
 }
 
-atf_test_case chap cleanup
+atf_test_case pppoe_chap cleanup
 
 pppoe_chap_head()
 {



CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc

2016-10-18 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Oct 19 00:11:03 UTC 2016

Modified Files:
src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc: Makefile

Log Message:
conditionalize bits


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/Makefile

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

Modified files:

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/Makefile
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/Makefile:1.4 src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/Makefile:1.5
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/Makefile:1.4	Fri Oct 14 12:09:44 2016
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/Makefile	Tue Oct 18 20:11:03 2016
@@ -1,7 +1,8 @@
-#	$NetBSD: Makefile,v 1.4 2016/10/14 16:09:44 spz Exp $
+#	$NetBSD: Makefile,v 1.5 2016/10/19 00:11:03 christos Exp $
 
-.include "bsd.own.mk"
+.include 
 
+BITS?=32
 CRYPTODIST=${NETBSDSRCDIR}/crypto
 .include "${NETBSDSRCDIR}/crypto/Makefile.openssl"
 XLATE=${OPENSSLSRC}/crypto/perlasm/ppc-xlate.pl
@@ -10,14 +11,14 @@ regen:
 	for i in $$(find ${OPENSSLSRC} -name \*ppc\*.pl); do \
 	case $$i in \
 	*xlate.pl) ;; \
-	*sha512*) perl $$i 32 sha512; \
+	*sha512*) perl $$i ${BITS} sha512; \
   sed -e 's/bc	25,0,/bdnz+	/' \
   -e 's/bclr	14,2/beqlr/' \
   -e 's/bclr	6,2/bnelr/' \
   -e 's/bclr	14,0/bltlr/' \
   -e 's/bclr	12,0/bltlr/' \
   < sha512 > $$(basename $$i .pl).S; \
-  perl $$i 32 sha256; \
+  perl $$i ${BITS} sha256; \
   sed -e 's/bc	25,0,/bdnz+	/' \
   -e 's/bclr	14,2/beqlr/' \
   -e 's/bclr	6,2/bnelr/' \
@@ -25,7 +26,7 @@ regen:
   -e 's/bclr	12,0/bltlr/' \
   < sha256 > $$(basename $$i .pl | sed s/512/256/).S; \
   rm -f sha512 sha256;; \
-*) perl $$i 32 | perl ${XLATE} linux32 | \
+*) perl $$i ${BITS} | perl ${XLATE} linux${BITS} | \
sed -e 's/bc	25,0,/bdnz+	/' \
-e 's/bclr	14,2/beqlr/' \
-e 's/bclr	6,2/bnelr/' \



CVS commit: src/sys/arch

2016-10-18 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Wed Oct 19 00:08:42 UTC 2016

Modified Files:
src/sys/arch/bebox/pci: pci_machdep.c
src/sys/arch/evbppc/pmppc/pci: pci_machdep.c
src/sys/arch/ibmnws/pci: pci_machdep.c
src/sys/arch/macppc/pci: pci_machdep.c
src/sys/arch/mvmeppc/pci: pci_machdep.c
src/sys/arch/ofppc/pci: ofwpci.c
src/sys/arch/powerpc/booke: e500_intr.c
src/sys/arch/powerpc/booke/pci: pq3pci.c
src/sys/arch/powerpc/ibm4xx/dev: ibm405gp.c
src/sys/arch/powerpc/include: cpu.h intr.h pci_machdep.h
src/sys/arch/powerpc/include/booke: intr.h
src/sys/arch/powerpc/marvell: pci_machdep.c
src/sys/arch/powerpc/pci: pci_machdep_common.c
src/sys/arch/powerpc/pic: intr.c
src/sys/arch/powerpc/powerpc: intr_stubs.c
src/sys/arch/prep/pci: pci_machdep.c prep_pciconf_direct.c
src/sys/arch/sandpoint/include: pci_machdep.h
src/sys/arch/sandpoint/pci: pci_machdep.c

Log Message:
Added MSI/MSI-X and interrupt_distribute(9) support for powerpc.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/bebox/pci/pci_machdep.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/evbppc/pmppc/pci/pci_machdep.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/ibmnws/pci/pci_machdep.c
cvs rdiff -u -r1.40 -r1.41 src/sys/arch/macppc/pci/pci_machdep.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/mvmeppc/pci/pci_machdep.c
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/ofppc/pci/ofwpci.c
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/powerpc/booke/e500_intr.c
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/powerpc/booke/pci/pq3pci.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/powerpc/ibm4xx/dev/ibm405gp.c
cvs rdiff -u -r1.101 -r1.102 src/sys/arch/powerpc/include/cpu.h
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/powerpc/include/intr.h
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/powerpc/include/pci_machdep.h
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/powerpc/include/booke/intr.h
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/powerpc/marvell/pci_machdep.c
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/powerpc/pci/pci_machdep_common.c
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/powerpc/pic/intr.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/powerpc/powerpc/intr_stubs.c
cvs rdiff -u -r1.41 -r1.42 src/sys/arch/prep/pci/pci_machdep.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/prep/pci/prep_pciconf_direct.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/sandpoint/include/pci_machdep.h
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/sandpoint/pci/pci_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/bebox/pci/pci_machdep.c
diff -u src/sys/arch/bebox/pci/pci_machdep.c:1.21 src/sys/arch/bebox/pci/pci_machdep.c:1.22
--- src/sys/arch/bebox/pci/pci_machdep.c:1.21	Fri Jul  1 20:34:53 2011
+++ src/sys/arch/bebox/pci/pci_machdep.c	Wed Oct 19 00:08:41 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: pci_machdep.c,v 1.21 2011/07/01 20:34:53 dyoung Exp $	*/
+/*	$NetBSD: pci_machdep.c,v 1.22 2016/10/19 00:08:41 nonaka Exp $	*/
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All rights reserved.
@@ -39,7 +39,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.21 2011/07/01 20:34:53 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.22 2016/10/19 00:08:41 nonaka Exp $");
 
 #include 
 #include 
@@ -87,6 +87,16 @@ bebox_pci_get_chipset_tag(pci_chipset_ta
 	pc->pc_intr_establish = genppc_pci_intr_establish;
 	pc->pc_intr_disestablish = genppc_pci_intr_disestablish;
 	pc->pc_intr_setattr = genppc_pci_intr_setattr;
+	pc->pc_intr_type = genppc_pci_intr_type;
+	pc->pc_intr_alloc = genppc_pci_intr_alloc;
+	pc->pc_intr_release = genppc_pci_intr_release;
+	pc->pc_intx_alloc = genppc_pci_intx_alloc;
+
+	pc->pc_msi_v = (void *)pc;
+	genppc_pci_chipset_msi_init(pc);
+
+	pc->pc_msix_v = (void *)pc;
+	genppc_pci_chipset_msix_init(pc);
 
 	pc->pc_conf_interrupt = bebox_pci_conf_interrupt;
 	pc->pc_decompose_tag = genppc_pci_indirect_decompose_tag;

Index: src/sys/arch/evbppc/pmppc/pci/pci_machdep.c
diff -u src/sys/arch/evbppc/pmppc/pci/pci_machdep.c:1.5 src/sys/arch/evbppc/pmppc/pci/pci_machdep.c:1.6
--- src/sys/arch/evbppc/pmppc/pci/pci_machdep.c:1.5	Thu Jun 30 00:52:56 2011
+++ src/sys/arch/evbppc/pmppc/pci/pci_machdep.c	Wed Oct 19 00:08:41 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: pci_machdep.c,v 1.5 2011/06/30 00:52:56 matt Exp $	*/
+/*	$NetBSD: pci_machdep.c,v 1.6 2016/10/19 00:08:41 nonaka Exp $	*/
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All rights reserved.
@@ -43,7 +43,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.5 2011/06/30 00:52:56 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.6 2016/10/19 00:08:41 nonaka Exp $");
 
 #include 
 #include 
@@ -104,6 +104,16 @@ pmppc_pci_get_chipset_tag(pci_chipset_ta
 	pc->pc_intr_establish = genppc_pci_intr_establish;
 	pc->pc_intr_disestablish = genppc_pci_intr_disestablish;
 	

CVS commit: src/share/man/man5

2016-10-18 Thread Valeriy E. Ushakov
Module Name:src
Committed By:   uwe
Date:   Tue Oct 18 23:24:48 UTC 2016

Modified Files:
src/share/man/man5: passwd.5

Log Message:
Xref to useradd(8) by its official name.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/share/man/man5/passwd.5

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

Modified files:

Index: src/share/man/man5/passwd.5
diff -u src/share/man/man5/passwd.5:1.31 src/share/man/man5/passwd.5:1.32
--- src/share/man/man5/passwd.5:1.31	Tue Jul  9 09:41:30 2013
+++ src/share/man/man5/passwd.5	Tue Oct 18 23:24:48 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: passwd.5,v 1.31 2013/07/09 09:41:30 njoly Exp $
+.\"	$NetBSD: passwd.5,v 1.32 2016/10/18 23:24:48 uwe Exp $
 .\"
 .\" Copyright (c) 1988, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -390,8 +390,8 @@ BEGIN { FS = ":"}
 .Xr login.conf 5 ,
 .Xr netgroup 5 ,
 .Xr passwd.conf 5 ,
-.Xr adduser 8 ,
 .Xr pwd_mkdb 8 ,
+.Xr useradd 8 ,
 .Xr vipw 8 ,
 .Xr yp 8
 .Pp



CVS commit: src/lib/libperfuse

2016-10-18 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Oct 18 22:26:13 UTC 2016

Modified Files:
src/lib/libperfuse: libperfuse.3

Log Message:
Sort sections. new sentence, new line. Whitespace.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/lib/libperfuse/libperfuse.3

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

Modified files:

Index: src/lib/libperfuse/libperfuse.3
diff -u src/lib/libperfuse/libperfuse.3:1.4 src/lib/libperfuse/libperfuse.3:1.5
--- src/lib/libperfuse/libperfuse.3:1.4	Tue Oct 18 15:06:17 2016
+++ src/lib/libperfuse/libperfuse.3	Tue Oct 18 22:26:13 2016
@@ -1,4 +1,4 @@
-.\" $NetBSD: libperfuse.3,v 1.4 2016/10/18 15:06:17 manu Exp $
+.\" $NetBSD: libperfuse.3,v 1.5 2016/10/18 22:26:13 wiz Exp $
 .\"
 .\" Copyright (c) 2010 Emmanuel Dreyfus. All rights reserved.
 .\"
@@ -100,26 +100,27 @@ is different than
 .Fn perfuse_open
 handles control to the regular
 .Xr open 2 .
+.Sh RETURN VALUES
+.Fn perfuse_mount
+returns a file descriptor to the
+.Pa /dev/fuse
+socket on success, and causes exit on failure.
 .Sh ENVIRONMENT
 .Bl -tag -width Er
 .It Ev PERFUSE_OPTIONS
-Comma-separated values controlling the usage of some FUSE methods. Allowed
-values are
+Comma-separated values controlling the usage of some FUSE methods.
+Allowed values are
 .Li enable_access ,
 .Li disable_access ,
 .Li enable_creat ,
 .Li disable_creat .
 .It Ev PERFUSE_BUFSIZE
 Set the socket buffer sizes used for communication with the filesystem.
-This should be raised as operation throughput requires it. Default is 
+This should be raised as operation throughput requires it.
+Default is
 .Li 2162688
 bytes, which is enough to queue 16 FUSE packets of maximum 132 kB length.
 .El
-.Sh RETURN VALUES
-.Fn perfuse_mount
-returns a file descriptor to the
-.Pa /dev/fuse
-socket on success, and causes exit on failure.
 .\".Sh ERRORS
 .\".Fn perfuse_mount
 .\"will fail when one of the following occurs:



CVS commit: src/sys/dev

2016-10-18 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Tue Oct 18 22:08:31 UTC 2016

Modified Files:
src/sys/dev/acpi: pckbc_acpi.c
src/sys/dev/isa: com_isa.c

Log Message:
provide intr xname


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sys/dev/acpi/pckbc_acpi.c
cvs rdiff -u -r1.39 -r1.40 src/sys/dev/isa/com_isa.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/acpi/pckbc_acpi.c
diff -u src/sys/dev/acpi/pckbc_acpi.c:1.34 src/sys/dev/acpi/pckbc_acpi.c:1.35
--- src/sys/dev/acpi/pckbc_acpi.c:1.34	Thu Oct 17 21:19:03 2013
+++ src/sys/dev/acpi/pckbc_acpi.c	Tue Oct 18 22:08:30 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: pckbc_acpi.c,v 1.34 2013/10/17 21:19:03 christos Exp $	*/
+/*	$NetBSD: pckbc_acpi.c,v 1.35 2016/10/18 22:08:30 jdolecek Exp $	*/
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -42,7 +42,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pckbc_acpi.c,v 1.34 2013/10/17 21:19:03 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pckbc_acpi.c,v 1.35 2016/10/18 22:08:30 jdolecek Exp $");
 
 #include 
 #include 
@@ -252,8 +252,14 @@ pckbc_acpi_intr_establish(struct pckbc_s
 			break;
 		}
 	}
-	if (i < pckbc_cd.cd_ndevs)
-		rv = isa_intr_establish(ic, irq, ist, IPL_TTY, pckbcintr, sc);
+	if (i < pckbc_cd.cd_ndevs) {
+		char intr_xname[64];
+		snprintf(intr_xname, sizeof(intr_xname), "%s %s",
+		device_xname(psc->sc_pckbc.sc_dv), pckbc_slot_names[slot]);
+
+		rv = isa_intr_establish_xname(ic, irq, ist, IPL_TTY, pckbcintr,
+		sc, intr_xname);
+	}
 	if (rv == NULL) {
 		aprint_error_dev(sc->sc_dv,
 		"unable to establish interrupt for %s slot\n",

Index: src/sys/dev/isa/com_isa.c
diff -u src/sys/dev/isa/com_isa.c:1.39 src/sys/dev/isa/com_isa.c:1.40
--- src/sys/dev/isa/com_isa.c:1.39	Wed Feb 24 22:37:58 2010
+++ src/sys/dev/isa/com_isa.c	Tue Oct 18 22:08:30 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: com_isa.c,v 1.39 2010/02/24 22:37:58 dyoung Exp $	*/
+/*	$NetBSD: com_isa.c,v 1.40 2016/10/18 22:08:30 jdolecek Exp $	*/
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: com_isa.c,v 1.39 2010/02/24 22:37:58 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: com_isa.c,v 1.40 2016/10/18 22:08:30 jdolecek Exp $");
 
 #include 
 #include 
@@ -213,8 +213,8 @@ com_isa_attach(device_t parent, device_t
 
 	isc->sc_ic = ia->ia_ic;
 	isc->sc_irq = irq;
-	isc->sc_ih = isa_intr_establish(ia->ia_ic, irq, IST_EDGE, IPL_SERIAL,
-	comintr, sc);
+	isc->sc_ih = isa_intr_establish_xname(ia->ia_ic, irq, IST_EDGE,
+	IPL_SERIAL, comintr, sc, device_xname(sc->sc_dev));
 }
 
 static bool



CVS commit: src/sys

2016-10-18 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Tue Oct 18 22:04:34 UTC 2016

Modified Files:
src/sys/arch/alpha/include: isa_machdep.h
src/sys/arch/arc/include: isa_machdep.h
src/sys/arch/arm/include: isa_machdep.h
src/sys/arch/atari/include: isa_machdep.h
src/sys/arch/bebox/include: isa_machdep.h
src/sys/arch/hpcmips/include: isa_machdep.h
src/sys/arch/hppa/include: isa_machdep.h
src/sys/arch/ia64/include: isa_machdep.h
src/sys/arch/ibmnws/include: isa_machdep.h
src/sys/arch/mips/include: isa_machdep.h
src/sys/arch/mipsco/include: isa_machdep.h
src/sys/arch/mvmeppc/include: isa_machdep.h
src/sys/arch/ofppc/include: isa_machdep.h
src/sys/arch/prep/include: isa_machdep.h
src/sys/arch/sandpoint/include: isa_machdep.h
src/sys/dev/isa: isa_stub.c

Log Message:
add isa_intr_establish_xname() to MD isa headers so that it can be used
by MI drivers


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/alpha/include/isa_machdep.h
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/arc/include/isa_machdep.h
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/arm/include/isa_machdep.h
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/atari/include/isa_machdep.h
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/bebox/include/isa_machdep.h
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/hpcmips/include/isa_machdep.h
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/hppa/include/isa_machdep.h
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/ia64/include/isa_machdep.h
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/ibmnws/include/isa_machdep.h
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/mips/include/isa_machdep.h
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/mipsco/include/isa_machdep.h
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/mvmeppc/include/isa_machdep.h
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/ofppc/include/isa_machdep.h
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/prep/include/isa_machdep.h
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/sandpoint/include/isa_machdep.h
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/isa/isa_stub.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/alpha/include/isa_machdep.h
diff -u src/sys/arch/alpha/include/isa_machdep.h:1.14 src/sys/arch/alpha/include/isa_machdep.h:1.15
--- src/sys/arch/alpha/include/isa_machdep.h:1.14	Mon Feb  6 02:14:13 2012
+++ src/sys/arch/alpha/include/isa_machdep.h	Tue Oct 18 22:04:33 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: isa_machdep.h,v 1.14 2012/02/06 02:14:13 matt Exp $ */
+/* $NetBSD: isa_machdep.h,v 1.15 2016/10/18 22:04:33 jdolecek Exp $ */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -90,6 +90,8 @@ struct alpha_isa_chipset {
 (*(c)->ic_intr_evcnt)((c)->ic_v, (i))
 #define	isa_intr_establish(c, i, t, l, f, a)\
 (*(c)->ic_intr_establish)((c)->ic_v, (i), (t), (l), (f), (a))
+#define	isa_intr_establish_xname(c, i, t, l, f, a, x)			\
+(*(c)->ic_intr_establish)((c)->ic_v, (i), (t), (l), (f), (a))
 #define	isa_intr_disestablish(c, h)	\
 (*(c)->ic_intr_disestablish)((c)->ic_v, (h))
 #define	isa_intr_alloc(c, m, t, i)	\

Index: src/sys/arch/arc/include/isa_machdep.h
diff -u src/sys/arch/arc/include/isa_machdep.h:1.16 src/sys/arch/arc/include/isa_machdep.h:1.17
--- src/sys/arch/arc/include/isa_machdep.h:1.16	Sat Oct 27 17:17:35 2012
+++ src/sys/arch/arc/include/isa_machdep.h	Tue Oct 18 22:04:33 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: isa_machdep.h,v 1.16 2012/10/27 17:17:35 chs Exp $	*/
+/*	$NetBSD: isa_machdep.h,v 1.17 2016/10/18 22:04:33 jdolecek Exp $	*/
 /*  $OpenBSD: isa_machdep.h,v 1.5 1997/04/19 17:20:00 pefo Exp $  */
 
 /*
@@ -72,6 +72,8 @@ struct arc_isa_bus {
 (*(c)->ic_intr_evcnt)((c)->ic_data, (i))
 #define isa_intr_establish(c, i, t, l, f, a) \
 (*(c)->ic_intr_establish)((c)->ic_data, (i), (t), (l), (f), (a))
+#define isa_intr_establish_xname(c, i, t, l, f, a, x)			\
+(*(c)->ic_intr_establish)((c)->ic_data, (i), (t), (l), (f), (a))
 #define isa_intr_disestablish(c, h) \
 (*(c)->ic_intr_disestablish)((c)->ic_data, (h))
 

Index: src/sys/arch/arm/include/isa_machdep.h
diff -u src/sys/arch/arm/include/isa_machdep.h:1.11 src/sys/arch/arm/include/isa_machdep.h:1.12
--- src/sys/arch/arm/include/isa_machdep.h:1.11	Wed Jan 29 00:42:15 2014
+++ src/sys/arch/arm/include/isa_machdep.h	Tue Oct 18 22:04:33 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: isa_machdep.h,v 1.11 2014/01/29 00:42:15 matt Exp $	*/
+/*	$NetBSD: isa_machdep.h,v 1.12 2016/10/18 22:04:33 jdolecek Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -56,6 +56,8 @@ void	isa_detach_hook(isa_chipset_tag_t, 
 const struct evcnt *isa_intr_evcnt(isa_chipset_tag_t ic, int irq);
 void	*isa_intr_establish(isa_chipset_tag_t ic, int irq, int type,
 	int level, int (*ih_fun)(void *), void *ih_arg);
+void	

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

2016-10-18 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Oct 18 20:44:59 UTC 2016

Modified Files:
src/distrib/sets/lists/comp: md.emips

Log Message:
revert the previous - those are only relevant for 64 bit builds and
are listed in ad.mips with arch64 tag.  fixes emips builds.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/distrib/sets/lists/comp/md.emips

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

Modified files:

Index: src/distrib/sets/lists/comp/md.emips
diff -u src/distrib/sets/lists/comp/md.emips:1.7 src/distrib/sets/lists/comp/md.emips:1.8
--- src/distrib/sets/lists/comp/md.emips:1.7	Tue Oct 18 12:51:05 2016
+++ src/distrib/sets/lists/comp/md.emips	Tue Oct 18 20:44:59 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: md.emips,v 1.7 2016/10/18 12:51:05 christos Exp $
+#	$NetBSD: md.emips,v 1.8 2016/10/18 20:44:59 mrg Exp $
 ./usr/include/emipscomp-c-include
 ./usr/include/emips/ansi.h			comp-c-include
 ./usr/include/emips/asm.h			comp-c-include
@@ -56,6 +56,3 @@
 ./usr/include/emips/vmparam.h			comp-c-include
 ./usr/include/emips/wchar_limits.h		comp-c-include
 ./usr/include/ieeefp.hcomp-c-include
-./usr/lib/libc_fp.acomp-c-lib		softfloat
-./usr/lib/libc_fp_p.acomp-c-lib		profile,softfloat
-./usr/lib/libc_fp_pic.acomp-c-piclib		softfloat,picinstall



CVS commit: src/sys/dev/usb

2016-10-18 Thread Nathanial Sloss
Module Name:src
Committed By:   nat
Date:   Tue Oct 18 20:17:37 UTC 2016

Modified Files:
src/sys/dev/usb: udl.c udl.h

Log Message:
Stop crash when switching vt or leaving X windows.

Improved upon and OK from christos@


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/dev/usb/udl.c
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/usb/udl.h

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

Modified files:

Index: src/sys/dev/usb/udl.c
diff -u src/sys/dev/usb/udl.c:1.16 src/sys/dev/usb/udl.c:1.17
--- src/sys/dev/usb/udl.c:1.16	Mon Oct 17 20:04:48 2016
+++ src/sys/dev/usb/udl.c	Tue Oct 18 20:17:37 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: udl.c,v 1.16 2016/10/17 20:04:48 nat Exp $	*/
+/*	$NetBSD: udl.c,v 1.17 2016/10/18 20:17:37 nat Exp $	*/
 
 /*-
  * Copyright (c) 2009 FUKAUMI Naoki.
@@ -53,7 +53,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: udl.c,v 1.16 2016/10/17 20:04:48 nat Exp $");
+__KERNEL_RCSID(0, "$NetBSD: udl.c,v 1.17 2016/10/18 20:17:37 nat Exp $");
 
 #include 
 #include 
@@ -175,6 +175,7 @@ static int		udl_set_resolution(struct ud
 			const struct videomode *);
 static const struct videomode *udl_videomode_lookup(const char *);
 static void		udl_update_thread(void *);
+static inline void udl_startstop(struct udl_softc *, bool);
 
 static inline void
 udl_cmd_add_1(struct udl_softc *sc, uint8_t val)
@@ -475,6 +476,7 @@ udl_attach(device_t parent, device_t sel
 	mutex_init(>sc_thread_mtx, MUTEX_DEFAULT, IPL_NONE);
 	cv_init(>sc_thread_cv, "udlcv");
 	sc->sc_dying = false;
+	sc->sc_thread_stop = true;
 	kthread_create(PRI_BIO, KTHREAD_MPSAFE | KTHREAD_MUSTJOIN, NULL,
 	udl_update_thread, sc, >sc_thread, "udlupd");
 }
@@ -511,8 +513,10 @@ udl_detach(device_t self, int flags)
 	 */
 	udl_fbmem_free(sc);
 	
+	mutex_enter(>sc_thread_mtx);
 	sc->sc_dying = true;
 	cv_broadcast(>sc_thread_cv);
+	mutex_exit(>sc_thread_mtx);
 	kthread_join(sc->sc_thread);
 
 	cv_destroy(>sc_cv);
@@ -571,6 +575,7 @@ udl_ioctl(void *v, void *vs, u_long cmd,
 			return 0;
 		switch (mode) {
 		case WSDISPLAYIO_VIDEO_OFF:
+			udl_startstop(sc, true);
 			udl_blank(sc, 1);
 			break;
 		case WSDISPLAYIO_VIDEO_ON:
@@ -579,7 +584,8 @@ udl_ioctl(void *v, void *vs, u_long cmd,
 		default:
 			return EINVAL;
 		}
-		udl_cmd_send_async(sc);
+		if (UDL_CMD_BUFSIZE(sc) > 0)
+			udl_cmd_send_async(sc);
 		udl_cmdq_flush(sc);
 		sc->sc_blank = mode;
 		return 0;
@@ -590,10 +596,12 @@ udl_ioctl(void *v, void *vs, u_long cmd,
 			return 0;
 		switch (mode) {
 		case WSDISPLAYIO_MODE_EMUL:
+			udl_startstop(sc, true);
 			/* clear screen */
 			udl_fill_rect(sc, 0, 0, 0, sc->sc_width,
 			sc->sc_height);
-			udl_cmd_send_async(sc);
+			if (UDL_CMD_BUFSIZE(sc) > 0)
+udl_cmd_send_async(sc);
 			udl_cmdq_flush(sc);
 			udl_comp_unload(sc);
 			break;
@@ -602,6 +610,7 @@ udl_ioctl(void *v, void *vs, u_long cmd,
 udl_cmd_send_async(sc);
 			udl_cmdq_flush(sc);
 			udl_comp_load(sc);
+			udl_startstop(sc, false);
 			break;
 		default:
 			return EINVAL;
@@ -652,7 +661,8 @@ udl_mmap(void *v, void *vs, off_t off, i
 	if (udl_fbmem_alloc(sc) != 0)
 		return -1;
 
-	cv_broadcast(>sc_thread_cv);
+	udl_startstop(sc, false);
+
 	vaddr = (vaddr_t)sc->sc_fbmem + off;
 	rv = pmap_extract(pmap_kernel(), vaddr, );
 	KASSERT(rv);
@@ -1823,7 +1833,7 @@ udl_update_thread(void *v)
 			kthread_exit(0);
 		}
 
-		if (sc->sc_fbmem == NULL)
+		if (sc->sc_thread_stop == true || sc->sc_fbmem == NULL)
 			goto thread_wait;
 
 #ifdef notyet
@@ -1877,3 +1887,13 @@ thread_wait:
 		cv_wait(>sc_thread_cv, >sc_thread_mtx);
 	}
 }
+
+static inline void
+udl_startstop(struct udl_softc *sc, bool stop)
+{
+	mutex_enter(>sc_thread_mtx);
+	sc->sc_thread_stop = stop;
+	if (!stop)
+		cv_broadcast(>sc_thread_cv);
+	mutex_exit(>sc_thread_mtx);
+}

Index: src/sys/dev/usb/udl.h
diff -u src/sys/dev/usb/udl.h:1.3 src/sys/dev/usb/udl.h:1.4
--- src/sys/dev/usb/udl.h:1.3	Mon Oct 17 20:04:48 2016
+++ src/sys/dev/usb/udl.h	Tue Oct 18 20:17:37 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: udl.h,v 1.3 2016/10/17 20:04:48 nat Exp $	*/
+/*	$NetBSD: udl.h,v 1.4 2016/10/18 20:17:37 nat Exp $	*/
 
 /*-
  * Copyright (c) 2009 FUKAUMI Naoki.
@@ -119,6 +119,7 @@ struct udl_softc {
 	kcondvar_t		 sc_thread_cv;
 	kmutex_t		 sc_thread_mtx;
 	bool			 sc_dying;
+	bool			 sc_thread_stop;
 	lwp_t			*sc_thread;
 
 	kcondvar_t		 sc_cv;



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

2016-10-18 Thread Aymeric Vincent
Module Name:src
Committed By:   aymeric
Date:   Tue Oct 18 18:56:32 UTC 2016

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

Log Message:
add commented out entry to attach Pi Face Real Time Clock


To generate a diff of this commit:
cvs rdiff -u -r1.67 -r1.68 src/sys/arch/evbarm/conf/RPI

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/RPI
diff -u src/sys/arch/evbarm/conf/RPI:1.67 src/sys/arch/evbarm/conf/RPI:1.68
--- src/sys/arch/evbarm/conf/RPI:1.67	Fri Apr 22 18:13:42 2016
+++ src/sys/arch/evbarm/conf/RPI	Tue Oct 18 18:56:32 2016
@@ -1,5 +1,5 @@
 #
-#	$NetBSD: RPI,v 1.67 2016/04/22 18:13:42 christos Exp $
+#	$NetBSD: RPI,v 1.68 2016/10/18 18:56:32 aymeric Exp $
 #
 #	RPi -- Raspberry Pi
 #
@@ -139,6 +139,9 @@ iic* at i2cbus?
 # sold by linksprite.com
 #dsrtc* at iic1 addr 0x68 flags 3231
 
+# MCP7940 based PiFace Real Time Clock
+#dsrtc* at iic1 addr 0x6f flags 7940
+
 # SPI controller
 bcmspi* at obio?
 spi* at spibus?



CVS commit: src/share/man/man4

2016-10-18 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Tue Oct 18 18:56:39 UTC 2016

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

Log Message:
Bump date for previous ciss(4) change


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/share/man/man4/ciss.4

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

Modified files:

Index: src/share/man/man4/ciss.4
diff -u src/share/man/man4/ciss.4:1.9 src/share/man/man4/ciss.4:1.10
--- src/share/man/man4/ciss.4:1.9	Tue Oct 18 18:44:20 2016
+++ src/share/man/man4/ciss.4	Tue Oct 18 18:56:39 2016
@@ -1,11 +1,11 @@
-.\"	$NetBSD: ciss.4,v 1.9 2016/10/18 18:44:20 gson Exp $
+.\"	$NetBSD: ciss.4,v 1.10 2016/10/18 18:56:39 maya Exp $
 .\"	Jonathan Stone, 2006.
 .\"
 .\"	derived from:
 .\"	$OpenBSD: ciss.4,v 1.4 2006/01/07 21:55:02 brad Exp $
 .\"	Michael Shalayeff, 2005. Public Domain.
 .\"
-.Dd May 28, 2008
+.Dd October 18, 2016
 .Dt CISS 4
 .Os
 .Sh NAME



CVS commit: src/sys/dev/i2c

2016-10-18 Thread Aymeric Vincent
Module Name:src
Committed By:   aymeric
Date:   Tue Oct 18 18:54:54 UTC 2016

Modified Files:
src/sys/dev/i2c: ds1307.c ds1307reg.h

Log Message:
add support for the MCP7940 based Pi Face Real Time Clock


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/dev/i2c/ds1307.c
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/i2c/ds1307reg.h

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

Modified files:

Index: src/sys/dev/i2c/ds1307.c
diff -u src/sys/dev/i2c/ds1307.c:1.23 src/sys/dev/i2c/ds1307.c:1.24
--- src/sys/dev/i2c/ds1307.c:1.23	Tue Oct  4 15:06:59 2016
+++ src/sys/dev/i2c/ds1307.c	Tue Oct 18 18:54:54 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: ds1307.c,v 1.23 2016/10/04 15:06:59 kiyohara Exp $	*/
+/*	$NetBSD: ds1307.c,v 1.24 2016/10/18 18:54:54 aymeric Exp $	*/
 
 /*
  * Copyright (c) 2003 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ds1307.c,v 1.23 2016/10/04 15:06:59 kiyohara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ds1307.c,v 1.24 2016/10/18 18:54:54 aymeric Exp $");
 
 #include 
 #include 
@@ -57,14 +57,19 @@ struct dsrtc_model {
 	uint16_t dm_model;
 	uint8_t dm_ch_reg;
 	uint8_t dm_ch_value;
+	uint8_t dm_vbaten_reg;
+	uint8_t dm_vbaten_value;
 	uint8_t dm_rtc_start;
 	uint8_t dm_rtc_size;
 	uint8_t dm_nvram_start;
 	uint8_t dm_nvram_size;
 	uint8_t dm_flags;
-#define	DSRTC_FLAG_CLOCK_HOLD	1
-#define	DSRTC_FLAG_BCD		2	
-#define	DSRTC_FLAG_TEMP		4	
+#define	DSRTC_FLAG_CLOCK_HOLD		0x01
+#define	DSRTC_FLAG_BCD			0x02
+#define	DSRTC_FLAG_TEMP			0x04
+#define DSRTC_FLAG_VBATEN		0x08
+#define	DSRTC_FLAG_YEAR_START_2K	0x10
+#define	DSRTC_FLAG_CLOCK_HOLD_REVERSED	0x20
 };
 
 static const struct dsrtc_model dsrtc_models[] = {
@@ -113,6 +118,19 @@ static const struct dsrtc_model dsrtc_mo
 		.dm_nvram_start = DS3232_NVRAM_START,
 		.dm_nvram_size = DS3232_NVRAM_SIZE,
 		.dm_flags = DSRTC_FLAG_BCD,
+	}, {
+		/* MCP7940 */
+		.dm_model = 7940,
+		.dm_rtc_start = DS1307_RTC_START,
+		.dm_rtc_size = DS1307_RTC_SIZE,
+		.dm_ch_reg = DS_SECONDS,
+		.dm_ch_value = DS1307_SECONDS_CH,
+		.dm_vbaten_reg = DS_DAY,
+		.dm_vbaten_value = MCP7940_TOD_DAY_VBATEN,
+		.dm_nvram_start = MCP7940_NVRAM_START,
+		.dm_nvram_size = MCP7940_NVRAM_SIZE,
+		.dm_flags = DSRTC_FLAG_BCD | DSRTC_FLAG_CLOCK_HOLD |
+			DSRTC_FLAG_VBATEN | DSRTC_FLAG_CLOCK_HOLD_REVERSED,
 	},
 };
 
@@ -193,7 +211,7 @@ dsrtc_match(device_t parent, cfdata_t cf
 			return 1;
 	} else {
 		/* indirect config - check typical address */
-		if (ia->ia_addr == DS1307_ADDR)
+		if (ia->ia_addr == DS1307_ADDR || ia->ia_addr == MCP7940_ADDR)
 			return dsrtc_model(cf->cf_flags & 0x) != NULL;
 	}
 	return 0;
@@ -457,9 +475,13 @@ dsrtc_clock_read_ymdhms(struct dsrtc_sof
 	dt->dt_mon = bcdtobin(bcd[DS_MONTH] & DS_MONTH_MASK);
 
 	/* XXX: Should be an MD way to specify EPOCH used by BIOS/Firmware */
-	dt->dt_year = bcdtobin(bcd[DS_YEAR]) + POSIX_BASE_YEAR;
-	if (bcd[DS_MONTH] & DS_MONTH_CENTURY)
-		dt->dt_year += 100;
+	if (sc->sc_model.dm_flags & DSRTC_FLAG_YEAR_START_2K)
+		dt->dt_year = bcdtobin(bcd[DS_YEAR]) + 2000;
+	else {
+		dt->dt_year = bcdtobin(bcd[DS_YEAR]) + POSIX_BASE_YEAR;
+		if (bcd[DS_MONTH] & DS_MONTH_CENTURY)
+			dt->dt_year += 100;
+	}
 
 	return 1;
 }
@@ -506,7 +528,10 @@ dsrtc_clock_write_ymdhms(struct dsrtc_so
 		return 0;
 	}
 
-	cmdbuf[1] |= dm->dm_ch_value;
+	if (sc->sc_model.dm_flags & DSRTC_FLAG_CLOCK_HOLD_REVERSED)
+		cmdbuf[1] &= ~dm->dm_ch_value;
+	else
+		cmdbuf[1] |= dm->dm_ch_value;
 
 	if ((error = iic_exec(sc->sc_tag, I2C_OP_WRITE, sc->sc_address,
 	cmdbuf, 1, [1], 1, I2C_F_POLL)) != 0) {
@@ -524,8 +549,13 @@ dsrtc_clock_write_ymdhms(struct dsrtc_so
 	uint8_t op = I2C_OP_WRITE;
 	for (signed int i = dm->dm_rtc_size - 1; i >= 0; i--) {
 		cmdbuf[0] = dm->dm_rtc_start + i;
+		if ((dm->dm_flags & DSRTC_FLAG_VBATEN) &&
+dm->dm_rtc_start + i == dm->dm_vbaten_reg)
+			bcd[i] |= dm->dm_vbaten_value;
 		if (dm->dm_rtc_start + i == dm->dm_ch_reg) {
 			op = I2C_OP_WRITE_WITH_STOP;
+			if (dm->dm_flags & DSRTC_FLAG_CLOCK_HOLD_REVERSED)
+bcd[i] |= dm->dm_ch_value;
 		}
 		if ((error = iic_exec(sc->sc_tag, op, sc->sc_address,
 		cmdbuf, 1, [i], 1, I2C_F_POLL)) != 0) {
@@ -543,7 +573,10 @@ dsrtc_clock_write_ymdhms(struct dsrtc_so
 	 */
 	if (op != I2C_OP_WRITE_WITH_STOP) {
 		cmdbuf[0] = dm->dm_ch_reg;
-		cmdbuf[1] &= ~dm->dm_ch_value;
+		if (dm->dm_flags & DSRTC_FLAG_CLOCK_HOLD_REVERSED)
+			cmdbuf[1] |= dm->dm_ch_value;
+		else
+			cmdbuf[1] &= ~dm->dm_ch_value;
 
 		if ((error = iic_exec(sc->sc_tag, I2C_OP_WRITE_WITH_STOP,
 		sc->sc_address, cmdbuf, 1, [1], 1,

Index: src/sys/dev/i2c/ds1307reg.h
diff -u src/sys/dev/i2c/ds1307reg.h:1.7 src/sys/dev/i2c/ds1307reg.h:1.8
--- src/sys/dev/i2c/ds1307reg.h:1.7	Tue Oct  4 15:06:59 2016
+++ src/sys/dev/i2c/ds1307reg.h	Tue Oct 18 18:54:54 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: ds1307reg.h,v 1.7 2016/10/04 15:06:59 kiyohara Exp $	

CVS commit: src/share/man/man4

2016-10-18 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Tue Oct 18 18:44:20 UTC 2016

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

Log Message:
HP Smart Array P410i works for me


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/share/man/man4/ciss.4

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

Modified files:

Index: src/share/man/man4/ciss.4
diff -u src/share/man/man4/ciss.4:1.8 src/share/man/man4/ciss.4:1.9
--- src/share/man/man4/ciss.4:1.8	Tue Mar 18 18:20:39 2014
+++ src/share/man/man4/ciss.4	Tue Oct 18 18:44:20 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: ciss.4,v 1.8 2014/03/18 18:20:39 riastradh Exp $
+.\"	$NetBSD: ciss.4,v 1.9 2016/10/18 18:44:20 gson Exp $
 .\"	Jonathan Stone, 2006.
 .\"
 .\"	derived from:
@@ -62,6 +62,8 @@ HP Smart Array P400
 .It
 HP Smart Array P400i
 .It
+HP Smart Array P410i
+.It
 HP Smart Array P600
 .It
 HP Smart Array P800



CVS commit: src/lib/libperfuse

2016-10-18 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Oct 18 17:56:31 UTC 2016

Modified Files:
src/lib/libperfuse: fuse.h perfuse.c perfuse_if.h

Log Message:
make this compile again, and simplify.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/lib/libperfuse/fuse.h
cvs rdiff -u -r1.38 -r1.39 src/lib/libperfuse/perfuse.c
cvs rdiff -u -r1.20 -r1.21 src/lib/libperfuse/perfuse_if.h

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

Modified files:

Index: src/lib/libperfuse/fuse.h
diff -u src/lib/libperfuse/fuse.h:1.6 src/lib/libperfuse/fuse.h:1.7
--- src/lib/libperfuse/fuse.h:1.6	Fri Oct 31 11:12:15 2014
+++ src/lib/libperfuse/fuse.h	Tue Oct 18 13:56:31 2016
@@ -1,4 +1,4 @@
-/*  $NetBSD: fuse.h,v 1.6 2014/10/31 15:12:15 manu Exp $ */
+/*  $NetBSD: fuse.h,v 1.7 2016/10/18 17:56:31 christos Exp $ */
 
 /*-
  *  Copyright (c) 2010 Emmanuel Dreyfus. All rights reserved.
@@ -34,8 +34,8 @@
 #define FUSE_UNKNOWN_FH (uint64_t)0
 
 #ifndef FUSE_BUFSIZE
-#define FUSE_MIN_BUFSIZE 0x21000
-#define FUSE_PREF_BUFSIZE (sysconf(_SC_PAGESIZE) + 0x1000)
+#define FUSE_MIN_BUFSIZE ((size_t)0x21000)
+#define FUSE_PREF_BUFSIZE ((size_t)(sysconf(_SC_PAGESIZE) + 0x1000))
 #define FUSE_BUFSIZE MAX(FUSE_PREF_BUFSIZE /* CONSTCOND */, FUSE_MIN_BUFSIZE)
 #endif /* FUSE_BUFSIZE */
 

Index: src/lib/libperfuse/perfuse.c
diff -u src/lib/libperfuse/perfuse.c:1.38 src/lib/libperfuse/perfuse.c:1.39
--- src/lib/libperfuse/perfuse.c:1.38	Tue Oct 18 11:06:17 2016
+++ src/lib/libperfuse/perfuse.c	Tue Oct 18 13:56:31 2016
@@ -1,4 +1,4 @@
-/*  $NetBSD: perfuse.c,v 1.38 2016/10/18 15:06:17 manu Exp $ */
+/*  $NetBSD: perfuse.c,v 1.39 2016/10/18 17:56:31 christos Exp $ */
 
 /*-
  *  Copyright (c) 2010-2011 Emmanuel Dreyfus. All rights reserved.
@@ -32,6 +32,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -51,7 +52,7 @@ extern char **environ;
 
 static struct perfuse_state *init_state(void);
 static int get_fd(const char *);
-static uint32_t bufvar_from_env(const char *, const uint32_t);
+static uint32_t bufvar_from_env(const char *, uint32_t);
 
 
 static struct perfuse_state *
@@ -148,32 +149,22 @@ get_fd(const char *data)
 }
 
 static uint32_t 
-bufvar_from_env(name, defval)
-	const char *name;
-	const uint32_t defval;
+bufvar_from_env(const char *name, uint32_t defval)
 {
 	char valstr[1024];
-	uint32_t retval = defval;
+	int e;
+	uint32_t retval;
 
-	if (getenv_r(name, valstr, sizeof(valstr)) != -1) {
-		long int val;
-		char *ep;
-
-		errno = 0;
-		val = (int)strtol(valstr, , 10);
-		if (*valstr == '\0' || *ep != '\0')
-			DWARNX("bad %s value \"%s\"", name, valstr);
-		else if (errno != 0)
-			DWARN("bad %s value \"%s\"", name, valstr);
-		else if (val <= 0L ||
-			 (unsigned long int)val > (unsigned long int)UINT32_MAX)
-			DWARNX("%s value %ld out of "
-			   "uint32_t bounds", name, val);
-		else
-			retval = val;
-	}
+	if (getenv_r(name, valstr, sizeof(valstr)) == -1)
+		return defval;
 
-	return retval;
+	retval = (uint32_t)strtoi(valstr, NULL, 0, 0, UINT32_MAX, );
+	if (!e)
+		return retval;
+
+	DWARNC(e, "conversion from `%s' to uint32_t failed, using %u",
+	valstr, defval);
+	return defval;
 }
 
 int
@@ -213,7 +204,7 @@ perfuse_open(const char *path, int flags
 	 * Set a buffer lentgh large enough so that enough FUSE packets
 	 * will fit.
 	 */
-	opt = bufvar_from_env("PERFUSE_BUFSIZE", 16 * FUSE_BUFSIZE);
+	opt = bufvar_from_env("PERFUSE_BUFSIZE", (uint32_t)(16 * FUSE_BUFSIZE));
 	optlen = sizeof(opt);
 	if (setsockopt(sv[0], SOL_SOCKET, SO_SNDBUF, , optlen) != 0)
 		DWARN("%s: setsockopt SO_SNDBUF to %d failed", __func__, opt);
@@ -244,7 +235,7 @@ perfuse_open(const char *path, int flags
 	 * Set a buffer lentgh large enough so that enough FUSE packets
 	 * will fit.
 	 */
-	opt = bufvar_from_env("PERFUSE_BUFSIZE", 16 * FUSE_BUFSIZE);
+	opt = bufvar_from_env("PERFUSE_BUFSIZE", (uint32_t)(16 * FUSE_BUFSIZE));
 	optlen = sizeof(opt);
 	if (setsockopt(sv[0], SOL_SOCKET, SO_SNDBUF, , optlen) != 0)
 		DWARN("%s: setsockopt SO_SNDBUF to %d failed", __func__, opt);

Index: src/lib/libperfuse/perfuse_if.h
diff -u src/lib/libperfuse/perfuse_if.h:1.20 src/lib/libperfuse/perfuse_if.h:1.21
--- src/lib/libperfuse/perfuse_if.h:1.20	Sat Jul 21 01:49:42 2012
+++ src/lib/libperfuse/perfuse_if.h	Tue Oct 18 13:56:31 2016
@@ -1,4 +1,4 @@
-/*  $NetBSD: perfuse_if.h,v 1.20 2012/07/21 05:49:42 manu Exp $ */
+/*  $NetBSD: perfuse_if.h,v 1.21 2016/10/18 17:56:31 christos Exp $ */
 
 /*-
  *  Copyright (c) 2010-2011 Emmanuel Dreyfus. All rights reserved.
@@ -103,13 +103,20 @@ extern int perfuse_diagflags;
 } while (0 /* CONSTCOND */)
 
 #define DWARN(fmt, ...) do {		\
-	\
 	if (perfuse_diagflags & PDF_SYSLOG) \
 		syslog(LOG_WARNING, fmt ": %m", ## __VA_ARGS__);	\
 	\
 	warn(fmt, ## __VA_ARGS__);	\
 } while (0 /* CONSTCOND */)
 
+#define DWARNC(e, fmt, ...) do {	\
+	if 

CVS commit: src/sys/arch

2016-10-18 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Tue Oct 18 15:10:35 UTC 2016

Modified Files:
src/sys/arch/arm/omap: am335x_prcm.c am335x_prcm.h
src/sys/arch/evbarm/beagle: beagle_machdep.c

Log Message:
Move set_mpu_volt() from */*_machdep.c to am335x_prcm.c.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arm/omap/am335x_prcm.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arm/omap/am335x_prcm.h
cvs rdiff -u -r1.65 -r1.66 src/sys/arch/evbarm/beagle/beagle_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/omap/am335x_prcm.c
diff -u src/sys/arch/arm/omap/am335x_prcm.c:1.8 src/sys/arch/arm/omap/am335x_prcm.c:1.9
--- src/sys/arch/arm/omap/am335x_prcm.c:1.8	Tue Sep 30 11:34:07 2014
+++ src/sys/arch/arm/omap/am335x_prcm.c	Tue Oct 18 15:10:35 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: am335x_prcm.c,v 1.8 2014/09/30 11:34:07 jmcneill Exp $	*/
+/*	$NetBSD: am335x_prcm.c,v 1.9 2016/10/18 15:10:35 kiyohara Exp $	*/
 
 /*
  * TI OMAP Power, Reset, and Clock Management on the AM335x
@@ -34,10 +34,13 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: am335x_prcm.c,v 1.8 2014/09/30 11:34:07 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: am335x_prcm.c,v 1.9 2016/10/18 15:10:35 kiyohara Exp $");
+
+#include "tps65217pmic.h"
 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -46,6 +49,8 @@ __KERNEL_RCSID(0, "$NetBSD: am335x_prcm.
 #include 
 #include 
 
+#include 
+
 #define AM335X_CLKCTRL_MODULEMODE_MASK		__BITS(0, 1)
 #define   AM335X_CLKCTRL_MODULEMODE_DISABLED	0
 #define   AM335X_CLKCTRL_MODULEMODE_ENABLE	2
@@ -161,6 +166,25 @@ prcm_mpu_pll_config(u_int mpupll_m)
 	}
 }
 
+const char *mpu_supply = NULL;
+static int
+set_mpu_volt(int mvolt)
+{
+	device_t dev;
+
+	__USE(dev);	// Simpler than complex ifdef.
+
+	if (mpu_supply == NULL)
+		return ENODEV;
+
+#if NTPS65217PMIC > 0
+	dev = device_find_by_xname("tps65217pmic0");
+	if (dev != NULL)
+		return tps65217pmic_set_volt(dev, mpu_supply, mvolt);
+#endif
+	return ENODEV;
+}
+
 static int
 mpu_current_frequency_sysctl_helper(SYSCTLFN_ARGS)
 {

Index: src/sys/arch/arm/omap/am335x_prcm.h
diff -u src/sys/arch/arm/omap/am335x_prcm.h:1.9 src/sys/arch/arm/omap/am335x_prcm.h:1.10
--- src/sys/arch/arm/omap/am335x_prcm.h:1.9	Sat Jun  6 14:00:32 2015
+++ src/sys/arch/arm/omap/am335x_prcm.h	Tue Oct 18 15:10:35 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: am335x_prcm.h,v 1.9 2015/06/06 14:00:32 jmcneill Exp $	*/
+/*	$NetBSD: am335x_prcm.h,v 1.10 2016/10/18 15:10:35 kiyohara Exp $	*/
 
 /*
  * TI OMAP Power, Reset, and Clock Management on the AM335x
@@ -150,7 +150,6 @@ struct omap_module {
 #define RST_GLOBAL_COLD_SW	__BIT(1)
 
 #ifdef _KERNEL
-int  set_mpu_volt(int);
 void am335x_sys_clk(bus_space_handle_t);
 void am335x_cpu_clk(void);
 #endif

Index: src/sys/arch/evbarm/beagle/beagle_machdep.c
diff -u src/sys/arch/evbarm/beagle/beagle_machdep.c:1.65 src/sys/arch/evbarm/beagle/beagle_machdep.c:1.66
--- src/sys/arch/evbarm/beagle/beagle_machdep.c:1.65	Tue Oct 18 14:39:52 2016
+++ src/sys/arch/evbarm/beagle/beagle_machdep.c	Tue Oct 18 15:10:35 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: beagle_machdep.c,v 1.65 2016/10/18 14:39:52 kiyohara Exp $ */
+/*	$NetBSD: beagle_machdep.c,v 1.66 2016/10/18 15:10:35 kiyohara Exp $ */
 
 /*
  * Machine dependent functions for kernel setup for TI OSK5912 board.
@@ -125,7 +125,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: beagle_machdep.c,v 1.65 2016/10/18 14:39:52 kiyohara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: beagle_machdep.c,v 1.66 2016/10/18 15:10:35 kiyohara Exp $");
 
 #include "opt_machdep.h"
 #include "opt_ddb.h"
@@ -141,7 +141,6 @@ __KERNEL_RCSID(0, "$NetBSD: beagle_machd
 #include "sdhc.h"
 #include "ukbd.h"
 #include "arml2cc.h"
-#include "tps65217pmic.h"
 
 #include 
 #include 
@@ -191,7 +190,6 @@ __KERNEL_RCSID(0, "$NetBSD: beagle_machd
 # endif
 # include 
 # include 
-# include 
 # if NSDHC > 0
 #  include 
 #  include 
@@ -241,9 +239,6 @@ int use_fb_console = true;
 #ifdef CPU_CORTEXA15
 uint32_t omap5_cnt_frq;
 #endif
-#if defined(TI_AM335X)
-device_t pmic_dev = NULL;
-#endif
 
 /*
  * Macros to translate between physical and virtual for a subset of the
@@ -1153,24 +1148,9 @@ beagle_device_register(device_t self, vo
 	}
 #if defined(TI_AM335X)
 	if (device_is_a(self, "tps65217pmic")) {
-		pmic_dev = self;
-	}
-#endif
-}
-
-#if defined(TI_AM335X)
-int
-set_mpu_volt(int mvolt)
-{
-
-#if NTPS65217PMIC > 0
-	if (pmic_dev == NULL)
-		return ENODEV;
+		extern const char *mpu_supply;
 
-	/* MPU voltage is on vdcd2 */
-	return tps65217pmic_set_volt(pmic_dev, "DCDC2", mvolt);
-#else
-	return -1;
+		mpu_supply = "DCDC2";
+	}
 #endif
 }
-#endif



CVS commit: src

2016-10-18 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Tue Oct 18 15:06:17 UTC 2016

Modified Files:
src/lib/libperfuse: libperfuse.3 perfuse.c
src/usr.sbin/perfused: msg.c perfused.8

Log Message:
Make FUSE socket buffer tunable

When dealing with high I/O throughput, we could run out of buffer
space if the filesystem was not consuming requests fast enough.
Here we slightly raise the buffer size, and we make it tunable
through the PERFUSE_BUFSIZE environment variable so that we can
cope with higher requirement later.

While there, document PERFUSE_OPTIONS environment variable.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/lib/libperfuse/libperfuse.3
cvs rdiff -u -r1.37 -r1.38 src/lib/libperfuse/perfuse.c
cvs rdiff -u -r1.22 -r1.23 src/usr.sbin/perfused/msg.c
cvs rdiff -u -r1.11 -r1.12 src/usr.sbin/perfused/perfused.8

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

Modified files:

Index: src/lib/libperfuse/libperfuse.3
diff -u src/lib/libperfuse/libperfuse.3:1.3 src/lib/libperfuse/libperfuse.3:1.4
--- src/lib/libperfuse/libperfuse.3:1.3	Tue May 10 12:14:37 2011
+++ src/lib/libperfuse/libperfuse.3	Tue Oct 18 15:06:17 2016
@@ -1,4 +1,4 @@
-.\" $NetBSD: libperfuse.3,v 1.3 2011/05/10 12:14:37 njoly Exp $
+.\" $NetBSD: libperfuse.3,v 1.4 2016/10/18 15:06:17 manu Exp $
 .\"
 .\" Copyright (c) 2010 Emmanuel Dreyfus. All rights reserved.
 .\"
@@ -100,6 +100,21 @@ is different than
 .Fn perfuse_open
 handles control to the regular
 .Xr open 2 .
+.Sh ENVIRONMENT
+.Bl -tag -width Er
+.It Ev PERFUSE_OPTIONS
+Comma-separated values controlling the usage of some FUSE methods. Allowed
+values are
+.Li enable_access ,
+.Li disable_access ,
+.Li enable_creat ,
+.Li disable_creat .
+.It Ev PERFUSE_BUFSIZE
+Set the socket buffer sizes used for communication with the filesystem.
+This should be raised as operation throughput requires it. Default is 
+.Li 2162688
+bytes, which is enough to queue 16 FUSE packets of maximum 132 kB length.
+.El
 .Sh RETURN VALUES
 .Fn perfuse_mount
 returns a file descriptor to the

Index: src/lib/libperfuse/perfuse.c
diff -u src/lib/libperfuse/perfuse.c:1.37 src/lib/libperfuse/perfuse.c:1.38
--- src/lib/libperfuse/perfuse.c:1.37	Fri Jun 19 17:33:20 2015
+++ src/lib/libperfuse/perfuse.c	Tue Oct 18 15:06:17 2016
@@ -1,4 +1,4 @@
-/*  $NetBSD: perfuse.c,v 1.37 2015/06/19 17:33:20 christos Exp $ */
+/*  $NetBSD: perfuse.c,v 1.38 2016/10/18 15:06:17 manu Exp $ */
 
 /*-
  *  Copyright (c) 2010-2011 Emmanuel Dreyfus. All rights reserved.
@@ -51,6 +51,7 @@ extern char **environ;
 
 static struct perfuse_state *init_state(void);
 static int get_fd(const char *);
+static uint32_t bufvar_from_env(const char *, const uint32_t);
 
 
 static struct perfuse_state *
@@ -146,6 +147,35 @@ get_fd(const char *data)
 
 }
 
+static uint32_t 
+bufvar_from_env(name, defval)
+	const char *name;
+	const uint32_t defval;
+{
+	char valstr[1024];
+	uint32_t retval = defval;
+
+	if (getenv_r(name, valstr, sizeof(valstr)) != -1) {
+		long int val;
+		char *ep;
+
+		errno = 0;
+		val = (int)strtol(valstr, , 10);
+		if (*valstr == '\0' || *ep != '\0')
+			DWARNX("bad %s value \"%s\"", name, valstr);
+		else if (errno != 0)
+			DWARN("bad %s value \"%s\"", name, valstr);
+		else if (val <= 0L ||
+			 (unsigned long int)val > (unsigned long int)UINT32_MAX)
+			DWARNX("%s value %ld out of "
+			   "uint32_t bounds", name, val);
+		else
+			retval = val;
+	}
+
+	return retval;
+}
+
 int
 perfuse_open(const char *path, int flags, mode_t mode)
 {
@@ -180,10 +210,10 @@ perfuse_open(const char *path, int flags
 	}
 
 	/*
-	 * Set a buffer lentgh large enough so that any FUSE packet
+	 * Set a buffer lentgh large enough so that enough FUSE packets
 	 * will fit.
 	 */
-	opt = (uint32_t)FUSE_BUFSIZE;
+	opt = bufvar_from_env("PERFUSE_BUFSIZE", 16 * FUSE_BUFSIZE);
 	optlen = sizeof(opt);
 	if (setsockopt(sv[0], SOL_SOCKET, SO_SNDBUF, , optlen) != 0)
 		DWARN("%s: setsockopt SO_SNDBUF to %d failed", __func__, opt);
@@ -211,10 +241,10 @@ perfuse_open(const char *path, int flags
 	}
 
 	/*
-	 * Set a buffer lentgh large enough so that any FUSE packet
+	 * Set a buffer lentgh large enough so that enough FUSE packets
 	 * will fit.
 	 */
-	opt = (uint32_t)(4 * FUSE_BUFSIZE);
+	opt = bufvar_from_env("PERFUSE_BUFSIZE", 16 * FUSE_BUFSIZE);
 	optlen = sizeof(opt);
 	if (setsockopt(sv[0], SOL_SOCKET, SO_SNDBUF, , optlen) != 0)
 		DWARN("%s: setsockopt SO_SNDBUF to %d failed", __func__, opt);

Index: src/usr.sbin/perfused/msg.c
diff -u src/usr.sbin/perfused/msg.c:1.22 src/usr.sbin/perfused/msg.c:1.23
--- src/usr.sbin/perfused/msg.c:1.22	Sat Aug 16 16:32:04 2014
+++ src/usr.sbin/perfused/msg.c	Tue Oct 18 15:06:17 2016
@@ -1,4 +1,4 @@
-/*  $NetBSD: msg.c,v 1.22 2014/08/16 16:32:04 manu Exp $ */
+/*  $NetBSD: msg.c,v 1.23 2016/10/18 15:06:17 manu Exp $ */
 
 /*-
  *  Copyright (c) 2010 Emmanuel Dreyfus. All rights reserved.
@@ -43,11 +43,41 @@
 
 

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

2016-10-18 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Tue Oct 18 14:48:11 UTC 2016

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

Log Message:
Remove intrbase and intr from omapgpio.


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

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/VTC100
diff -u src/sys/arch/evbarm/conf/VTC100:1.9 src/sys/arch/evbarm/conf/VTC100:1.10
--- src/sys/arch/evbarm/conf/VTC100:1.9	Tue Oct 18 14:45:05 2016
+++ src/sys/arch/evbarm/conf/VTC100	Tue Oct 18 14:48:11 2016
@@ -1,5 +1,5 @@
 #
-#	$NetBSD: VTC100,v 1.9 2016/10/18 14:45:05 kiyohara Exp $
+#	$NetBSD: VTC100,v 1.10 2016/10/18 14:48:11 kiyohara Exp $
 #
 #	VTC100 -- NEXCOM VTC100 Kernel
 #
@@ -198,13 +198,13 @@ ld*		at sdmmc?
 #options SDHC_DEBUG
 
 # General-purpose I/O pins
-omapgpio0	at obio0 addr 0x44e07000 size 0x1000 # intrbase 128 intr 29
+omapgpio0	at obio0 addr 0x44e07000 size 0x1000
 gpio0		at omapgpio0
-omapgpio1	at obio1 addr 0x4804c000 size 0x1000 # intrbase 160 intr 30
+omapgpio1	at obio1 addr 0x4804c000 size 0x1000
 gpio1		at omapgpio1
-omapgpio2	at obio1 addr 0x481ac000 size 0x1000 # intrbase 192 intr 32
+omapgpio2	at obio1 addr 0x481ac000 size 0x1000
 gpio2		at omapgpio2
-omapgpio3	at obio1 addr 0x481ae000 size 0x1000 # intrbase 224 intr 32
+omapgpio3	at obio1 addr 0x481ae000 size 0x1000
 gpio3		at omapgpio3
 
 # I2C Controller



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

2016-10-18 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Tue Oct 18 14:47:14 UTC 2016

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

Log Message:
Enable tifb and wsdisplay.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/evbarm/conf/PEPPER

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/PEPPER
diff -u src/sys/arch/evbarm/conf/PEPPER:1.1 src/sys/arch/evbarm/conf/PEPPER:1.2
--- src/sys/arch/evbarm/conf/PEPPER:1.1	Sat Oct 15 15:29:51 2016
+++ src/sys/arch/evbarm/conf/PEPPER	Tue Oct 18 14:47:14 2016
@@ -1,5 +1,5 @@
 #
-#	$NetBSD: PEPPER,v 1.1 2016/10/15 15:29:51 kiyohara Exp $
+#	$NetBSD: PEPPER,v 1.2 2016/10/18 14:47:14 kiyohara Exp $
 #
 #	PEPPER -- Gumstix. Inc. Pepper Single Board Computer platforms kernel
 #
@@ -261,24 +261,24 @@ omapwdt32k*	at obio0 addr 0x44e35000 siz
 trng*		at obio1 addr 0x4831 size 0x2000 intr 111	# TRNG
 
 # onboard video, experimental. Video mode is hardcoded in the driver
-#tifb* 	at obio1 addr 0x4830e000 size 0x1000 intr 36
+tifb* 	at obio1 addr 0x4830e000 size 0x1000 intr 36
 
 # make sure the console display is always wsdisplay0
-#wsdisplay*	at wsemuldisplaydev?
+wsdisplay*	at wsemuldisplaydev?
 
 # various options for wscons - we try to look as much like a standard
 # sun console as possible
-#options 	WSEMUL_VT100
-#options 	WSDISPLAY_COMPAT_PCVT
-#options 	WSDISPLAY_COMPAT_SYSCONS
-#options 	WSDISPLAY_COMPAT_USL
-#options 	WSDISPLAY_SCROLLSUPPORT
-#options 	WS_KERNEL_FG=WSCOL_GREEN
-#options 	WSDISPLAY_DEFAULTSCREENS=4
-#options 	FONT_GALLANT12x22
-#options 	FONT_BOLD8x16
+options 	WSEMUL_VT100
+options 	WSDISPLAY_COMPAT_PCVT
+options 	WSDISPLAY_COMPAT_SYSCONS
+options 	WSDISPLAY_COMPAT_USL
+options 	WSDISPLAY_SCROLLSUPPORT
+options 	WS_KERNEL_FG=WSCOL_GREEN
+options 	WSDISPLAY_DEFAULTSCREENS=4
+options 	FONT_GALLANT12x22
+options 	FONT_BOLD8x16
 # compatibility to other console drivers
-#options 	WSDISPLAY_COMPAT_RAWKBD 	# can get raw scancodes
+options 	WSDISPLAY_COMPAT_RAWKBD 	# can get raw scancodes
 
 # Ethernet
 cpsw*		at obio2 addr 0x4a10 size 0x8000 intrbase 40



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

2016-10-18 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Tue Oct 18 14:45:05 UTC 2016

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

Log Message:
Enable tifb and wsdisplay.


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

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/VTC100
diff -u src/sys/arch/evbarm/conf/VTC100:1.8 src/sys/arch/evbarm/conf/VTC100:1.9
--- src/sys/arch/evbarm/conf/VTC100:1.8	Sat Oct 15 15:24:00 2016
+++ src/sys/arch/evbarm/conf/VTC100	Tue Oct 18 14:45:05 2016
@@ -1,5 +1,5 @@
 #
-#	$NetBSD: VTC100,v 1.8 2016/10/15 15:24:00 kiyohara Exp $
+#	$NetBSD: VTC100,v 1.9 2016/10/18 14:45:05 kiyohara Exp $
 #
 #	VTC100 -- NEXCOM VTC100 Kernel
 #
@@ -241,24 +241,24 @@ omapdmtimer2	at obio1 addr 0x48044000 si
 omapwdt32k*	at obio0 addr 0x44e35000 size 0x1000	# WDT1
 
 # onboard video, experimental. Video mode is hardcoded in the driver
-#tifb* 		at obio1 addr 0x4830E000 size 0x1000 intr 36
+tifb* 		at obio1 addr 0x4830E000 size 0x1000 intr 36
 
 # make sure the console display is always wsdisplay0
-#wsdisplay*	at wsemuldisplaydev?
+wsdisplay*	at wsemuldisplaydev?
 
 # various options for wscons - we try to look as much like a standard
 # sun console as possible
-#options 	WSEMUL_VT100
-#options 	WSDISPLAY_COMPAT_PCVT
-#options 	WSDISPLAY_COMPAT_SYSCONS
-#options 	WSDISPLAY_COMPAT_USL
-#options 	WSDISPLAY_SCROLLSUPPORT
-#options 	WS_KERNEL_FG=WSCOL_GREEN
-#options 	WSDISPLAY_DEFAULTSCREENS=4
-#options 	FONT_GALLANT12x22
-#options 	FONT_BOLD8x16
+options 	WSEMUL_VT100
+options 	WSDISPLAY_COMPAT_PCVT
+options 	WSDISPLAY_COMPAT_SYSCONS
+options 	WSDISPLAY_COMPAT_USL
+options 	WSDISPLAY_SCROLLSUPPORT
+options 	WS_KERNEL_FG=WSCOL_GREEN
+options 	WSDISPLAY_DEFAULTSCREENS=4
+options 	FONT_GALLANT12x22
+options 	FONT_BOLD8x16
 # compatibility to other console drivers
-#options 	WSDISPLAY_COMPAT_RAWKBD 	# can get raw scancodes
+options 	WSDISPLAY_COMPAT_RAWKBD 	# can get raw scancodes
 
 pseudo-device	wsmux			# mouse & keyboard multiplexor
 pseudo-device	wsfont



CVS commit: src/sys/arch/evbarm

2016-10-18 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Tue Oct 18 14:39:52 UTC 2016

Modified Files:
src/sys/arch/evbarm/beagle: beagle_machdep.c
src/sys/arch/evbarm/gumstix: gumstix_machdep.c gxio.c

Log Message:
Support tifb.


To generate a diff of this commit:
cvs rdiff -u -r1.64 -r1.65 src/sys/arch/evbarm/beagle/beagle_machdep.c
cvs rdiff -u -r1.54 -r1.55 src/sys/arch/evbarm/gumstix/gumstix_machdep.c
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/evbarm/gumstix/gxio.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/evbarm/beagle/beagle_machdep.c
diff -u src/sys/arch/evbarm/beagle/beagle_machdep.c:1.64 src/sys/arch/evbarm/beagle/beagle_machdep.c:1.65
--- src/sys/arch/evbarm/beagle/beagle_machdep.c:1.64	Sun Jul  3 11:40:58 2016
+++ src/sys/arch/evbarm/beagle/beagle_machdep.c	Tue Oct 18 14:39:52 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: beagle_machdep.c,v 1.64 2016/07/03 11:40:58 kiyohara Exp $ */
+/*	$NetBSD: beagle_machdep.c,v 1.65 2016/10/18 14:39:52 kiyohara Exp $ */
 
 /*
  * Machine dependent functions for kernel setup for TI OSK5912 board.
@@ -125,7 +125,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: beagle_machdep.c,v 1.64 2016/07/03 11:40:58 kiyohara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: beagle_machdep.c,v 1.65 2016/10/18 14:39:52 kiyohara Exp $");
 
 #include "opt_machdep.h"
 #include "opt_ddb.h"
@@ -190,6 +190,7 @@ __KERNEL_RCSID(0, "$NetBSD: beagle_machd
 #  error no prcm device configured.
 # endif
 # include 
+# include 
 # include 
 # if NSDHC > 0
 #  include 
@@ -497,7 +498,13 @@ initarm(void *arg)
 
 	/* The console is going to try to map things.  Give pmap a devmap. */
 	pmap_devmap_register(devmap);
+
+	if (get_bootconf_option(bootargs, "console",
+		BOOTOPT_TYPE_STRING, ) && strncmp(ptr, "fb", 2) == 0) {
+		use_fb_console = true;
+	}
 	consinit();
+
 #ifdef CPU_CORTEXA15
 #ifdef MULTIPROCESSOR
 	arm_cpu_max = 1 + __SHIFTOUT(armreg_l2ctrl_read(), L2CTRL_NUMCPU);
@@ -618,11 +625,6 @@ initarm(void *arg)
 
 	db_trap_callback = beagle_db_trap;
 
-	if (get_bootconf_option(boot_args, "console",
-		BOOTOPT_TYPE_STRING, ) && strncmp(ptr, "fb", 2) == 0) {
-		use_fb_console = true;
-	}
-	
 	return initarm_common(KERNEL_VM_BASE, KERNEL_VM_SIZE, NULL, 0);
 
 }
@@ -688,7 +690,8 @@ consinit(void)
 #endif
 
 #if NUKBD > 0
-	ukbd_cnattach();	/* allow USB keyboard to become console */
+	if (use_fb_console)
+		ukbd_cnattach(); /* allow USB keyboard to become console */
 #endif
 
 	beagle_putchar('f');
@@ -1107,6 +1110,39 @@ beagle_device_register(device_t self, vo
 		return;
 	}
 	if (device_is_a(self, "tifb")) {
+		static const struct tifb_panel_info default_panel_info = {
+			.panel_tft = 1,
+			.panel_mono = false,
+			.panel_bpp = 24,
+
+			.panel_pxl_clk = 3000,
+			.panel_width = 800,
+			.panel_height = 600,
+			.panel_hfp = 0,
+			.panel_hbp = 47,
+			.panel_hsw = 47,
+			.panel_vfp = 0,
+			.panel_vbp = 10,
+			.panel_vsw = 2,
+			.panel_invert_hsync = 1,
+			.panel_invert_vsync = 1,
+
+			.panel_ac_bias = 255,
+			.panel_ac_bias_intrpt = 0,
+			.panel_dma_burst_sz = 16,
+			.panel_fdd = 0x80,
+			.panel_sync_edge = 0,
+			.panel_sync_ctrl = 1,
+			.panel_invert_pxl_clk = 0,
+		};
+		prop_data_t panel_info;
+
+		panel_info = prop_data_create_data_nocopy(_panel_info,
+		sizeof(struct tifb_panel_info));
+		KASSERT(panel_info != NULL);
+		prop_dictionary_set(dict, "panel-info", panel_info);
+		prop_object_release(panel_info);
+
 		if (use_fb_console)
 			prop_dictionary_set_bool(dict, "is_console", true);
 		return;

Index: src/sys/arch/evbarm/gumstix/gumstix_machdep.c
diff -u src/sys/arch/evbarm/gumstix/gumstix_machdep.c:1.54 src/sys/arch/evbarm/gumstix/gumstix_machdep.c:1.55
--- src/sys/arch/evbarm/gumstix/gumstix_machdep.c:1.54	Sun Oct 16 23:07:31 2016
+++ src/sys/arch/evbarm/gumstix/gumstix_machdep.c	Tue Oct 18 14:39:52 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: gumstix_machdep.c,v 1.54 2016/10/16 23:07:31 kiyohara Exp $ */
+/*	$NetBSD: gumstix_machdep.c,v 1.55 2016/10/18 14:39:52 kiyohara Exp $ */
 /*
  * Copyright (C) 2005, 2006, 2007  WIDE Project and SOUM Corporation.
  * All rights reserved.
@@ -192,6 +192,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -262,6 +263,7 @@ int comcnmode = CONMODE;
 static char console[16];
 #endif
 
+const struct tifb_panel_info *tifb_panel_info = NULL;
 /* Use TPS65217 White LED Driver */
 bool use_tps65217_wled = false;
 
@@ -1164,6 +1166,14 @@ gumstix_device_register(device_t dev, vo
 		prop_dictionary_set_bool(dict, "dual-volt", dualvolt);
 	}
 	if (device_is_a(dev, "tifb")) {
+		prop_data_t panel_info;
+
+		panel_info = prop_data_create_data_nocopy(tifb_panel_info,
+		sizeof(struct tifb_panel_info));
+		KASSERT(panel_info != NULL);
+		prop_dictionary_set(dict, "panel-info", panel_info);
+		prop_object_release(panel_info);
+
 #if defined(OMAP2)
 		/* enable LCD */
 		omap2_gpio_ctl(59, 

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

2016-10-18 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Tue Oct 18 14:08:53 UTC 2016

Modified Files:
src/sys/arch/arm/omap: omap2_gpio.c

Log Message:
The variable gpio_module[] into #ifdef TI_AM335X - #endif.
Thanks for joerg@.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/arm/omap/omap2_gpio.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/omap/omap2_gpio.c
diff -u src/sys/arch/arm/omap/omap2_gpio.c:1.20 src/sys/arch/arm/omap/omap2_gpio.c:1.21
--- src/sys/arch/arm/omap/omap2_gpio.c:1.20	Tue Oct 18 14:02:48 2016
+++ src/sys/arch/arm/omap/omap2_gpio.c	Tue Oct 18 14:08:53 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: omap2_gpio.c,v 1.20 2016/10/18 14:02:48 kiyohara Exp $	*/
+/*	$NetBSD: omap2_gpio.c,v 1.21 2016/10/18 14:08:53 kiyohara Exp $	*/
 /*-
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -28,7 +28,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: omap2_gpio.c,v 1.20 2016/10/18 14:02:48 kiyohara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: omap2_gpio.c,v 1.21 2016/10/18 14:08:53 kiyohara Exp $");
 
 #define _INTR_PRIVATE
 
@@ -64,12 +64,14 @@ __KERNEL_RCSID(0, "$NetBSD: omap2_gpio.c
 #include 
 #endif
 
+#ifdef TI_AM335X
 static const struct omap_module gpio_module[] = {
 	{ 0, 0 },
 	{ AM335X_PRCM_CM_PER, CM_PER_GPIO1_CLKCTRL },
 	{ AM335X_PRCM_CM_PER, CM_PER_GPIO2_CLKCTRL },
 	{ AM335X_PRCM_CM_PER, CM_PER_GPIO3_CLKCTRL },
 };
+#endif
 
 static void gpio_pic_block_irqs(struct pic_softc *, size_t, uint32_t);
 static void gpio_pic_block_irqs2(struct pic_softc *, size_t, uint32_t);



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

2016-10-18 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Tue Oct 18 14:14:51 UTC 2016

Modified Files:
src/sys/arch/arm/omap: tifb.c tifbreg.h
Added Files:
src/sys/arch/arm/omap: tifbvar.h

Log Message:
Update unused tifb.  wscons is working.
Tested on PEPPER and VTC100.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/omap/tifb.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/omap/tifbreg.h
cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/omap/tifbvar.h

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

Modified files:

Index: src/sys/arch/arm/omap/tifb.c
diff -u src/sys/arch/arm/omap/tifb.c:1.5 src/sys/arch/arm/omap/tifb.c:1.6
--- src/sys/arch/arm/omap/tifb.c:1.5	Sun Apr 12 20:00:42 2015
+++ src/sys/arch/arm/omap/tifb.c	Tue Oct 18 14:14:51 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: tifb.c,v 1.5 2015/04/12 20:00:42 bouyer Exp $	*/
+/*	$NetBSD: tifb.c,v 1.6 2016/10/18 14:14:51 kiyohara Exp $	*/
 
 /*
  * Copyright (c) 2010 Michael Lorenz
@@ -57,7 +57,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tifb.c,v 1.5 2015/04/12 20:00:42 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tifb.c,v 1.6 2016/10/18 14:14:51 kiyohara Exp $");
 
 #include "opt_omap.h"
 
@@ -76,6 +76,7 @@ __KERNEL_RCSID(0, "$NetBSD: tifb.c,v 1.5
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -92,55 +93,8 @@ __KERNEL_RCSID(0, "$NetBSD: tifb.c,v 1.5
 #include 
 #include 
 
-#include 
-
 #include "locators.h"
 
-struct panel_info {
-	uint32_t panel_width;
-	uint32_t panel_height;
-	uint32_t panel_hfp;
-	uint32_t panel_hbp;
-	uint32_t panel_hsw;
-	uint32_t panel_vfp;
-	uint32_t panel_vbp;
-	uint32_t panel_vsw;
-	uint32_t ac_bias;
-	uint32_t ac_bias_intrpt;
-	uint32_t dma_burst_sz;
-	uint32_t bpp;
-	uint32_t fdd;
-	uint32_t invert_line_clock;
-	uint32_t invert_frm_clock;
-	uint32_t sync_edge;
-	uint32_t sync_ctrl;
-	uint32_t panel_pxl_clk;
-	uint32_t panel_invert_pxl_clk;
-};
-
-/* for chalk elec cape with 12" panel */
-struct panel_info default_panel_info = {
-	.panel_width = 1280,
-	.panel_height = 800,
-	.panel_hfp = 48,
-	.panel_hbp = 80,
-	.panel_hsw = 32,
-	.panel_vfp = 2,
-	.panel_vbp = 15,
-	.panel_vsw = 6,
-	.ac_bias = 255,
-	.ac_bias_intrpt = 0,
-	.dma_burst_sz = 16,
-	.bpp = 16,
-	.fdd = 16,
-	.invert_line_clock = 0,
-	.invert_frm_clock = 0,
-	.sync_edge = 0,
-	.sync_ctrl = 1,
-	.panel_pxl_clk = 6930,
-	.panel_invert_pxl_clk = 0,
-};
-
 struct tifb_softc {
 	device_t sc_dev;
 
@@ -154,9 +108,7 @@ struct tifb_softc {
 	size_t sc_palettesize;
 
 	int sc_stride;
-	int sc_locked;
 	void *sc_fbaddr, *sc_vramaddr;
-	void *sc_shadowfb;
 
 	bus_addr_t sc_fbhwaddr;
 	uint16_t *sc_palette;
@@ -170,14 +122,12 @@ struct tifb_softc {
 	uint8_t sc_cmap_red[256], sc_cmap_green[256], sc_cmap_blue[256];
 	void (*sc_putchar)(void *, int, int, u_int, long);
 
-	uint8_t sc_edid_data[1024];
-	size_t sc_edid_size;
-
-	struct panel_info *sc_panel;
+	struct tifb_panel_info *sc_pi;
 };
 
-#define TIFB_READ(sc, reg) bus_space_read_4(sc->sc_iot, sc->sc_regh, reg)
-#define TIFB_WRITE(sc, reg, val) bus_space_write_4(sc->sc_iot, sc->sc_regh, reg, val)
+#define TIFB_READ(sc, reg)	bus_space_read_4(sc->sc_iot, sc->sc_regh, reg)
+#define TIFB_WRITE(sc, reg, val) \
+	bus_space_write_4(sc->sc_iot, sc->sc_regh, reg, val)
 
 static int	tifb_match(device_t, cfdata_t, void *);
 static void	tifb_attach(device_t, device_t, void *);
@@ -193,18 +143,15 @@ static int  am335x_clk_get_arm_disp_freq
 CFATTACH_DECL_NEW(tifb, sizeof(struct tifb_softc),
 tifb_match, tifb_attach, NULL, NULL);
 
-static int	tifb_ioctl(void *, void *, u_long, void *, int,
-			 struct lwp *);
+static int	tifb_ioctl(void *, void *, u_long, void *, int, struct lwp *);
 static paddr_t	tifb_mmap(void *, void *, off_t, int);
 static void	tifb_init_screen(void *, struct vcons_screen *, int, long *);
 
 static int	tifb_putcmap(struct tifb_softc *, struct wsdisplay_cmap *);
 static int 	tifb_getcmap(struct tifb_softc *, struct wsdisplay_cmap *);
-#if 0
-static void	tifb_restore_palette(struct tifb_softc *);
-static void 	tifb_putpalreg(struct tifb_softc *, int, uint8_t,
-			uint8_t, uint8_t);
+static void	tifb_restore_palette(struct tifb_softc *, int, int);
 
+#if 0
 static int	tifb_set_depth(struct tifb_softc *, int);
 #endif
 static void	tifb_set_video(struct tifb_softc *, int);
@@ -239,9 +186,9 @@ am335x_lcd_calc_divisor(uint32_t referen
 	/* Raster mode case: divisors are in range from 2 to 255 */
 	for (div = 2; div < 255; div++)
 		if (reference/div <= freq)
-			return (div);
+			return div;
 
-	return (255);
+	return 255;
 }
 
 static int
@@ -249,7 +196,8 @@ tifb_match(device_t parent, cfdata_t mat
 {
 	struct obio_attach_args *obio = aux;
 
-	if ((obio->obio_addr == -1) || (obio->obio_size == 0))
+	if ((obio->obio_addr == OBIOCF_ADDR_DEFAULT) ||
+	(obio->obio_size == OBIOCF_SIZE_DEFAULT))
 		return 0;
 	return 1;
 }
@@ -261,12 +209,12 @@ tifb_attach(device_t parent, 

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

2016-10-18 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Tue Oct 18 14:02:48 UTC 2016

Modified Files:
src/sys/arch/arm/omap: omap2_gpio.c

Log Message:
Allow obio_intr == OBIOCF_INTR_DEFAULT.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/arm/omap/omap2_gpio.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/omap/omap2_gpio.c
diff -u src/sys/arch/arm/omap/omap2_gpio.c:1.19 src/sys/arch/arm/omap/omap2_gpio.c:1.20
--- src/sys/arch/arm/omap/omap2_gpio.c:1.19	Sat Oct 15 15:11:56 2016
+++ src/sys/arch/arm/omap/omap2_gpio.c	Tue Oct 18 14:02:48 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: omap2_gpio.c,v 1.19 2016/10/15 15:11:56 kiyohara Exp $	*/
+/*	$NetBSD: omap2_gpio.c,v 1.20 2016/10/18 14:02:48 kiyohara Exp $	*/
 /*-
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -28,7 +28,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: omap2_gpio.c,v 1.19 2016/10/15 15:11:56 kiyohara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: omap2_gpio.c,v 1.20 2016/10/18 14:02:48 kiyohara Exp $");
 
 #define _INTR_PRIVATE
 
@@ -489,9 +489,6 @@ gpio_attach(device_t parent, device_t se
 
 	gpio->gpio_dev = self;
 
-	if (oa->obio_intr == OBIOCF_INTR_DEFAULT)
-		panic("\n%s: no intr assigned", device_xname(self));
-
 	if (oa->obio_size == OBIOCF_SIZE_DEFAULT)
 		panic("\n%s: no size assigned", device_xname(self));
 



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

2016-10-18 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Tue Oct 18 13:58:53 UTC 2016

Modified Files:
src/sys/arch/arm/arm: cpufunc.c

Log Message:
Indent.


To generate a diff of this commit:
cvs rdiff -u -r1.161 -r1.162 src/sys/arch/arm/arm/cpufunc.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/arm/cpufunc.c
diff -u src/sys/arch/arm/arm/cpufunc.c:1.161 src/sys/arch/arm/arm/cpufunc.c:1.162
--- src/sys/arch/arm/arm/cpufunc.c:1.161	Mon May 30 17:18:38 2016
+++ src/sys/arch/arm/arm/cpufunc.c	Tue Oct 18 13:58:52 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpufunc.c,v 1.161 2016/05/30 17:18:38 dholland Exp $	*/
+/*	$NetBSD: cpufunc.c,v 1.162 2016/10/18 13:58:52 kiyohara Exp $	*/
 
 /*
  * arm7tdmi support code Copyright (c) 2001 John Fremlin
@@ -49,7 +49,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cpufunc.c,v 1.161 2016/05/30 17:18:38 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpufunc.c,v 1.162 2016/10/18 13:58:52 kiyohara Exp $");
 
 #include "opt_compat_netbsd.h"
 #include "opt_cpuoptions.h"
@@ -2158,13 +2158,13 @@ set_cpufuncs(void)
 	cputype == CPU_ID_ARM_88SV581X_V6 ||
 	cputype == CPU_ID_ARM_88SV581X_V7) &&
 	(armreg_pfr0_read() & ARM_PFR0_THUMBEE_MASK)) {
-			cpufuncs = pj4bv7_cpufuncs;
+		cpufuncs = pj4bv7_cpufuncs;
 #if defined(CPU_ARMV6) || defined(CPU_PRE_ARMV6)
-			cpu_armv7_p = true;
+		cpu_armv7_p = true;
 #endif
-			get_cachetype_cp15();
-			pmap_pte_init_armv7();
-			return 0;
+		get_cachetype_cp15();
+		pmap_pte_init_armv7();
+		return 0;
 	}
 #endif /* CPU_PJ4B */
 



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

2016-10-18 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Oct 18 12:56:11 UTC 2016

Modified Files:
src/distrib/sets/lists/xserver: md.sgimips

Log Message:
try to fix copy-pasto


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/distrib/sets/lists/xserver/md.sgimips

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

Modified files:

Index: src/distrib/sets/lists/xserver/md.sgimips
diff -u src/distrib/sets/lists/xserver/md.sgimips:1.53 src/distrib/sets/lists/xserver/md.sgimips:1.54
--- src/distrib/sets/lists/xserver/md.sgimips:1.53	Sun Oct 16 04:20:58 2016
+++ src/distrib/sets/lists/xserver/md.sgimips	Tue Oct 18 08:56:11 2016
@@ -1,4 +1,4 @@
-# $NetBSD: md.sgimips,v 1.53 2016/10/16 08:20:58 mrg Exp $	x11
+# $NetBSD: md.sgimips,v 1.54 2016/10/18 12:56:11 christos Exp $	x11
 ./usr/X11R7/bin/X	-unknown-	xorg
 ./usr/X11R7/bin/Xorg	-unknown-	xorg
 ./usr/X11R7/bin/cvt	-unknown-	xorg
@@ -10,9 +10,9 @@
 ./usr/X11R7/lib/X11/doc/README.modes			-unknown-	xorg
 ./usr/X11R7/lib/X11/doc/README.rapidaccess		-unknown-	obsolete
 ./usr/X11R7/lib/modules/drivers/crime_drv.so		-unknown-	xorg,xorg_server_ver=110
-./usr/X11R7/lib/modules/drivers/crime_drv.so		-unknown-	xorg,xorg_server_ver=110
-./usr/X11R7/lib/modules/drivers/crime_drv.so.0		-unknown-	xorg,xorg_server_ver=118,obsolete
-./usr/X11R7/lib/modules/drivers/crime_drv.so.0		-unknown-	xorg,xorg_server_ver=118,obsolete
+./usr/X11R7/lib/modules/drivers/crime_drv.so		-unknown-	xorg,xorg_server_ver=118
+./usr/X11R7/lib/modules/drivers/crime_drv.so.0		-unknown-	xorg,xorg_server_ver=110
+./usr/X11R7/lib/modules/drivers/crime_drv.so.0		-unknown-	xorg,xorg_server_ver=118
 ./usr/X11R7/lib/modules/drivers/cirrus_drv.so		-unknown-	xorg
 ./usr/X11R7/lib/modules/drivers/cirrus_drv.so.1		-unknown-	xorg
 ./usr/X11R7/lib/modules/drivers/glint_drv.so		-unknown-	xorg,xorg_server_ver=110



CVS commit: src/external/gpl3/binutils/dist/ld

2016-10-18 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Oct 18 12:52:32 UTC 2016

Modified Files:
src/external/gpl3/binutils/dist/ld: configure.tgt

Log Message:
fix typo.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/external/gpl3/binutils/dist/ld/configure.tgt

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

Modified files:

Index: src/external/gpl3/binutils/dist/ld/configure.tgt
diff -u src/external/gpl3/binutils/dist/ld/configure.tgt:1.23 src/external/gpl3/binutils/dist/ld/configure.tgt:1.24
--- src/external/gpl3/binutils/dist/ld/configure.tgt:1.23	Sat Mar 26 04:41:16 2016
+++ src/external/gpl3/binutils/dist/ld/configure.tgt	Tue Oct 18 08:52:32 2016
@@ -111,7 +111,7 @@ arm*-*-netbsdelf*-*eabi*)
 			targ_emul=armelf_nbsd_eabi;
 			targ_extra_emuls="armelfb_nbsd_eabi armelf_nbsd_eabihf armelfb_nbsd_eabihf armelf_nbsd armelfb_nbsd armelf armnbsd" ;;
 arm*eb-*-netbsdelf*)	targ_emul=armelfb_nbsd;
-			targ_extra_emuls="armelfb_fbsd armelf" ;;
+			targ_extra_emuls="armelfb_nbsd armelf" ;;
 armeb-*-netbsdelf*)	targ_emul=armelfb_nbsd;
 			targ_extra_emuls="armelf_nbsd armelf armnbsd" ;;
 arm-*-netbsdelf*)	targ_emul=armelf_nbsd;



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

2016-10-18 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Oct 18 12:51:05 UTC 2016

Modified Files:
src/distrib/sets/lists/comp: md.emips

Log Message:
add libc_fp


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/distrib/sets/lists/comp/md.emips

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

Modified files:

Index: src/distrib/sets/lists/comp/md.emips
diff -u src/distrib/sets/lists/comp/md.emips:1.6 src/distrib/sets/lists/comp/md.emips:1.7
--- src/distrib/sets/lists/comp/md.emips:1.6	Mon Dec 21 11:49:37 2015
+++ src/distrib/sets/lists/comp/md.emips	Tue Oct 18 08:51:05 2016
@@ -1,5 +1,4 @@
-#	$NetBSD: md.emips,v 1.6 2015/12/21 16:49:37 christos Exp $
-#
+#	$NetBSD: md.emips,v 1.7 2016/10/18 12:51:05 christos Exp $
 ./usr/include/emipscomp-c-include
 ./usr/include/emips/ansi.h			comp-c-include
 ./usr/include/emips/asm.h			comp-c-include
@@ -57,3 +56,6 @@
 ./usr/include/emips/vmparam.h			comp-c-include
 ./usr/include/emips/wchar_limits.h		comp-c-include
 ./usr/include/ieeefp.hcomp-c-include
+./usr/lib/libc_fp.acomp-c-lib		softfloat
+./usr/lib/libc_fp_p.acomp-c-lib		profile,softfloat
+./usr/lib/libc_fp_pic.acomp-c-piclib		softfloat,picinstall



CVS commit: src/sys/net

2016-10-18 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Tue Oct 18 09:43:20 UTC 2016

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

Log Message:
Remove unused rtcache_lookup_noclone


To generate a diff of this commit:
cvs rdiff -u -r1.103 -r1.104 src/sys/net/route.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/route.h
diff -u src/sys/net/route.h:1.103 src/sys/net/route.h:1.104
--- src/sys/net/route.h:1.103	Wed Sep 21 10:50:22 2016
+++ src/sys/net/route.h	Tue Oct 18 09:43:20 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: route.h,v 1.103 2016/09/21 10:50:22 roy Exp $	*/
+/*	$NetBSD: route.h,v 1.104 2016/10/18 09:43:20 ozaki-r Exp $	*/
 
 /*
  * Copyright (c) 1980, 1986, 1993
@@ -450,12 +450,6 @@ rtcache_lookup1(struct route *ro, const 
 }
 
 static inline struct rtentry *
-rtcache_lookup_noclone(struct route *ro, const struct sockaddr *dst)
-{
-	return rtcache_lookup1(ro, dst, 0);
-}
-
-static inline struct rtentry *
 rtcache_lookup(struct route *ro, const struct sockaddr *dst)
 {
 	return rtcache_lookup1(ro, dst, 1);



CVS commit: src/sys/dev/ic

2016-10-18 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Tue Oct 18 07:48:05 UTC 2016

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

Log Message:
fix a sync range size when number of bus_dma segment is greater than 2.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/dev/ic/nvme.c

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

Modified files:

Index: src/sys/dev/ic/nvme.c
diff -u src/sys/dev/ic/nvme.c:1.15 src/sys/dev/ic/nvme.c:1.16
--- src/sys/dev/ic/nvme.c:1.15	Wed Oct  5 03:46:38 2016
+++ src/sys/dev/ic/nvme.c	Tue Oct 18 07:48:05 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: nvme.c,v 1.15 2016/10/05 03:46:38 nonaka Exp $	*/
+/*	$NetBSD: nvme.c,v 1.16 2016/10/18 07:48:05 nonaka Exp $	*/
 /*	$OpenBSD: nvme.c,v 1.49 2016/04/18 05:59:50 dlg Exp $ */
 
 /*
@@ -18,7 +18,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: nvme.c,v 1.15 2016/10/05 03:46:38 nonaka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nvme.c,v 1.16 2016/10/18 07:48:05 nonaka Exp $");
 
 #include 
 #include 
@@ -668,7 +668,7 @@ nvme_ns_dobio(struct nvme_softc *sc, uin
 		bus_dmamap_sync(sc->sc_dmat,
 		NVME_DMA_MAP(q->q_ccb_prpls),
 		ccb->ccb_prpl_off,
-		sizeof(*ccb->ccb_prpl) * dmap->dm_nsegs - 1,
+		sizeof(*ccb->ccb_prpl) * (dmap->dm_nsegs - 1),
 		BUS_DMASYNC_PREWRITE);
 	}
 
@@ -726,7 +726,7 @@ nvme_ns_io_done(struct nvme_queue *q, st
 		bus_dmamap_sync(sc->sc_dmat,
 		NVME_DMA_MAP(q->q_ccb_prpls),
 		ccb->ccb_prpl_off,
-		sizeof(*ccb->ccb_prpl) * dmap->dm_nsegs - 1,
+		sizeof(*ccb->ccb_prpl) * (dmap->dm_nsegs - 1),
 		BUS_DMASYNC_POSTWRITE);
 	}
 
@@ -833,7 +833,7 @@ nvme_pt_fill(struct nvme_queue *q, struc
 			bus_dmamap_sync(sc->sc_dmat,
 			NVME_DMA_MAP(q->q_ccb_prpls),
 			ccb->ccb_prpl_off,
-			sizeof(*ccb->ccb_prpl) * dmap->dm_nsegs - 1,
+			sizeof(*ccb->ccb_prpl) * (dmap->dm_nsegs - 1),
 			BUS_DMASYNC_PREWRITE);
 			htolem64(>entry.prp[1], ccb->ccb_prpl_dva);
 			break;
@@ -860,7 +860,7 @@ nvme_pt_done(struct nvme_queue *q, struc
 			bus_dmamap_sync(sc->sc_dmat,
 			NVME_DMA_MAP(q->q_ccb_prpls),
 			ccb->ccb_prpl_off,
-			sizeof(*ccb->ccb_prpl) * dmap->dm_nsegs - 1,
+			sizeof(*ccb->ccb_prpl) * (dmap->dm_nsegs - 1),
 			BUS_DMASYNC_POSTWRITE);
 		}
 



CVS commit: src/sys

2016-10-18 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Tue Oct 18 07:30:31 UTC 2016

Modified Files:
src/sys/net: if.c if_ethersubr.c route.c
src/sys/netinet: if_arp.c in.c ip_flow.c ip_input.c
src/sys/netinet6: in6.c ip6_flow.c ip6_input.c nd6.c nd6_nbr.c

Log Message:
Don't hold global locks if NET_MPSAFE is enabled

If NET_MPSAFE is enabled, don't hold KERNEL_LOCK and softnet_lock in
part of the network stack such as IP forwarding paths. The aim of the
change is to make it easy to test the network stack without the locks
and reduce our local diffs.

By default (i.e., if NET_MPSAFE isn't enabled), the locks are held
as they used to be.

Reviewed by knakahara@


To generate a diff of this commit:
cvs rdiff -u -r1.358 -r1.359 src/sys/net/if.c
cvs rdiff -u -r1.228 -r1.229 src/sys/net/if_ethersubr.c
cvs rdiff -u -r1.174 -r1.175 src/sys/net/route.c
cvs rdiff -u -r1.230 -r1.231 src/sys/netinet/if_arp.c
cvs rdiff -u -r1.186 -r1.187 src/sys/netinet/in.c
cvs rdiff -u -r1.76 -r1.77 src/sys/netinet/ip_flow.c
cvs rdiff -u -r1.343 -r1.344 src/sys/netinet/ip_input.c
cvs rdiff -u -r1.220 -r1.221 src/sys/netinet6/in6.c
cvs rdiff -u -r1.31 -r1.32 src/sys/netinet6/ip6_flow.c
cvs rdiff -u -r1.168 -r1.169 src/sys/netinet6/ip6_input.c
cvs rdiff -u -r1.208 -r1.209 src/sys/netinet6/nd6.c
cvs rdiff -u -r1.127 -r1.128 src/sys/netinet6/nd6_nbr.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.358 src/sys/net/if.c:1.359
--- src/sys/net/if.c:1.358	Mon Oct  3 11:06:06 2016
+++ src/sys/net/if.c	Tue Oct 18 07:30:30 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: if.c,v 1.358 2016/10/03 11:06:06 ozaki-r Exp $	*/
+/*	$NetBSD: if.c,v 1.359 2016/10/18 07:30:30 ozaki-r Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2008 The NetBSD Foundation, Inc.
@@ -90,7 +90,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.358 2016/10/03 11:06:06 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.359 2016/10/18 07:30:30 ozaki-r Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_inet.h"
@@ -1622,12 +1622,12 @@ ifa_remove(struct ifnet *ifp, struct ifa
 	TAILQ_REMOVE(>if_addrlist, ifa, ifa_list);
 	IFADDR_WRITER_REMOVE(ifa);
 	IFADDR_ENTRY_DESTROY(ifa);
-#if notyet
+#ifdef NET_MPSAFE
 	pserialize_perform(ifnet_psz);
 #endif
 	IFNET_UNLOCK();
 
-#if notyet
+#ifdef NET_MPSAFE
 	psref_target_destroy(>ifa_psref, ifa_psref_class);
 #endif
 	ifafree(ifa);

Index: src/sys/net/if_ethersubr.c
diff -u src/sys/net/if_ethersubr.c:1.228 src/sys/net/if_ethersubr.c:1.229
--- src/sys/net/if_ethersubr.c:1.228	Mon Oct  3 11:06:06 2016
+++ src/sys/net/if_ethersubr.c	Tue Oct 18 07:30:30 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_ethersubr.c,v 1.228 2016/10/03 11:06:06 ozaki-r Exp $	*/
+/*	$NetBSD: if_ethersubr.c,v 1.229 2016/10/18 07:30:30 ozaki-r Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -61,7 +61,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_ethersubr.c,v 1.228 2016/10/03 11:06:06 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ethersubr.c,v 1.229 2016/10/18 07:30:30 ozaki-r Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -246,17 +246,23 @@ ether_output(struct ifnet * const ifp0, 
 
 #ifdef INET
 	case AF_INET:
+#ifndef NET_MPSAFE
 		KERNEL_LOCK(1, NULL);
+#endif
 		if (m->m_flags & M_BCAST)
 			(void)memcpy(edst, etherbroadcastaddr, sizeof(edst));
 		else if (m->m_flags & M_MCAST)
 			ETHER_MAP_IP_MULTICAST((dst)->sin_addr, edst);
 		else if ((error = arpresolve(ifp, rt, m, dst, edst,
 		sizeof(edst))) != 0) {
+#ifndef NET_MPSAFE
 			KERNEL_UNLOCK_ONE(NULL);
+#endif
 			return error == EWOULDBLOCK ? 0 : error;
 		}
+#ifndef NET_MPSAFE
 		KERNEL_UNLOCK_ONE(NULL);
+#endif
 		/* If broadcasting on a simplex interface, loopback a copy */
 		if ((m->m_flags & M_BCAST) && (ifp->if_flags & IFF_SIMPLEX))
 			mcopy = m_copy(m, 0, (int)M_COPYALL);
@@ -884,7 +890,11 @@ ether_input(struct ifnet *ifp, struct mb
 	}
 
 	if (__predict_true(pktq)) {
+#ifdef NET_MPSAFE
+		const u_int h = curcpu()->ci_index;
+#else
 		const uint32_t h = pktq_rps_hash(m);
+#endif
 		if (__predict_false(!pktq_enqueue(pktq, m, h))) {
 			m_freem(m);
 		}

Index: src/sys/net/route.c
diff -u src/sys/net/route.c:1.174 src/sys/net/route.c:1.175
--- src/sys/net/route.c:1.174	Fri Aug  5 00:52:02 2016
+++ src/sys/net/route.c	Tue Oct 18 07:30:30 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: route.c,v 1.174 2016/08/05 00:52:02 ozaki-r Exp $	*/
+/*	$NetBSD: route.c,v 1.175 2016/10/18 07:30:30 ozaki-r Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2008 The NetBSD Foundation, Inc.
@@ -93,10 +93,11 @@
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
 #include "opt_route.h"
+#include "opt_net_mpsafe.h"
 #endif
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: route.c,v 1.174 2016/08/05 00:52:02 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: route.c,v 1.175 2016/10/18 07:30:30 ozaki-r Exp $");
 
 #include 
 #ifdef RTFLUSH_DEBUG
@@ -431,7 

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

2016-10-18 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Oct 18 06:40:06 UTC 2016

Modified Files:
src/distrib/sets/lists/comp: ad.mips

Log Message:
libc_fp is arch64 only.


To generate a diff of this commit:
cvs rdiff -u -r1.62 -r1.63 src/distrib/sets/lists/comp/ad.mips

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

Modified files:

Index: src/distrib/sets/lists/comp/ad.mips
diff -u src/distrib/sets/lists/comp/ad.mips:1.62 src/distrib/sets/lists/comp/ad.mips:1.63
--- src/distrib/sets/lists/comp/ad.mips:1.62	Tue Oct 11 17:02:28 2016
+++ src/distrib/sets/lists/comp/ad.mips	Tue Oct 18 06:40:06 2016
@@ -1,4 +1,4 @@
-# $NetBSD: ad.mips,v 1.62 2016/10/11 17:02:28 macallan Exp $
+# $NetBSD: ad.mips,v 1.63 2016/10/18 06:40:06 mrg Exp $
 ./usr/bin/elf2aoutcomp-obsolete		obsolete
 ./usr/bin/elf2ecoffcomp-sysutil-bin
 ./usr/include/g++/bits/mips32			comp-c-include		arch64
@@ -78,9 +78,9 @@
 -./usr/lib/64/libgomp.so.1.1
 -./usr/lib/64/libgomp_p.a
 -./usr/lib/64/libgomp_pic.a
-./usr/lib/libc_fp.acomp-c-lib		softfloat
-./usr/lib/libc_fp_p.acomp-c-lib		profile,softfloat
-./usr/lib/libc_fp_pic.acomp-c-piclib		softfloat,picinstall
+./usr/lib/libc_fp.acomp-c-lib		softfloat,arch64
+./usr/lib/libc_fp_p.acomp-c-lib		profile,softfloat,arch64
+./usr/lib/libc_fp_pic.acomp-c-piclib		softfloat,picinstall,arch64
 ./usr/lib/64/libc_fp.acomp-c-lib		softfloat,arch64
 ./usr/lib/64/libc_fp_p.a			comp-c-lib		profile,softfloat,arch64
 ./usr/lib/64/libc_fp_pic.a			comp-c-piclib		picinstall,compat,arch64