CVS commit: src/sys/dev/ic

2016-06-30 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Jul  1 05:39:24 UTC 2016

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

Log Message:
Reformat a conditional


To generate a diff of this commit:
cvs rdiff -u -r1.87 -r1.88 src/sys/dev/ic/sl811hs.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/sl811hs.c
diff -u src/sys/dev/ic/sl811hs.c:1.87 src/sys/dev/ic/sl811hs.c:1.88
--- src/sys/dev/ic/sl811hs.c:1.87	Thu Jun 30 16:34:56 2016
+++ src/sys/dev/ic/sl811hs.c	Fri Jul  1 05:39:24 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: sl811hs.c,v 1.87 2016/06/30 16:34:56 skrll Exp $	*/
+/*	$NetBSD: sl811hs.c,v 1.88 2016/07/01 05:39:24 skrll Exp $	*/
 
 /*
  * Not (c) 2007 Matthew Orgass
@@ -68,7 +68,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sl811hs.c,v 1.87 2016/06/30 16:34:56 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sl811hs.c,v 1.88 2016/07/01 05:39:24 skrll Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_slhci.h"
@@ -1778,8 +1778,7 @@ slhci_dointr(struct slhci_softc *sc)
 
 #ifdef SLHCI_DEBUG
 	if (slhcidebug & SLHCI_D_INTR && r & sc->sc_ier &&
-	((r & ~(SL11_ISR_SOF|SL11_ISR_DATA)) || slhcidebug &
-	SLHCI_D_SOF)) {
+	((r & ~(SL11_ISR_SOF|SL11_ISR_DATA)) || slhcidebug & SLHCI_D_SOF)) {
 		uint8_t e, f;
 
 		e = slhci_read(sc, SL11_IER);



CVS commit: src/sys

2016-06-30 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Fri Jul  1 05:22:33 UTC 2016

Modified Files:
src/sys/net: if.c route.c
src/sys/netinet: if_arp.c
src/sys/netinet6: nd6_nbr.c

Log Message:
Make sure to free all interface addresses in if_detach

Addresses of an interface (struct ifaddr) have a (reverse) pointer of an
interface object (ifa->ifa_ifp). If the addresses are surely freed when
their interface is destroyed, the pointer is always valid and we don't
need a tweak of replacing the pointer to if_index like mbuf.

In order to make sure the assumption, the following changes are required:
- Deactivate the interface at the firstish of if_detach. This prevents
  in6_unlink_ifa from saving multicast addresses (wrongly)
- Invalidate rtcache(s) and clear a rtentry referencing an address on
  RTM_DELETE. rtcache(s) may delay freeing an address
- Replace callout_stop with callout_halt of DAD timers to ensure stopping
  such timers in if_detach


To generate a diff of this commit:
cvs rdiff -u -r1.349 -r1.350 src/sys/net/if.c
cvs rdiff -u -r1.167 -r1.168 src/sys/net/route.c
cvs rdiff -u -r1.214 -r1.215 src/sys/netinet/if_arp.c
cvs rdiff -u -r1.121 -r1.122 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.349 src/sys/net/if.c:1.350
--- src/sys/net/if.c:1.349	Fri Jul  1 05:15:40 2016
+++ src/sys/net/if.c	Fri Jul  1 05:22:33 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: if.c,v 1.349 2016/07/01 05:15:40 ozaki-r Exp $	*/
+/*	$NetBSD: if.c,v 1.350 2016/07/01 05:22:33 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.349 2016/07/01 05:15:40 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.350 2016/07/01 05:22:33 ozaki-r Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_inet.h"
@@ -1117,7 +1117,7 @@ if_detach(struct ifnet *ifp)
 
 	sysctl_teardown(&ifp->if_sysctl_log);
 	mutex_enter(ifp->if_ioctl_lock);
-	ifp->if_ioctl = if_nullioctl;
+	if_deactivate(ifp);
 	mutex_exit(ifp->if_ioctl_lock);
 
 	IFNET_LOCK();
@@ -1130,7 +1130,7 @@ if_detach(struct ifnet *ifp)
 	mutex_obj_free(ifp->if_ioctl_lock);
 	ifp->if_ioctl_lock = NULL;
 
-	if (ifp->if_slowtimo != NULL) {
+	if (ifp->if_slowtimo != NULL && ifp->if_slowtimo_ch != NULL) {
 		ifp->if_slowtimo = NULL;
 		callout_halt(ifp->if_slowtimo_ch, NULL);
 		callout_destroy(ifp->if_slowtimo_ch);

Index: src/sys/net/route.c
diff -u src/sys/net/route.c:1.167 src/sys/net/route.c:1.168
--- src/sys/net/route.c:1.167	Thu Apr 28 00:16:56 2016
+++ src/sys/net/route.c	Fri Jul  1 05:22:33 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: route.c,v 1.167 2016/04/28 00:16:56 ozaki-r Exp $	*/
+/*	$NetBSD: route.c,v 1.168 2016/07/01 05:22:33 ozaki-r Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2008 The NetBSD Foundation, Inc.
@@ -96,7 +96,7 @@
 #endif
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: route.c,v 1.167 2016/04/28 00:16:56 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: route.c,v 1.168 2016/07/01 05:22:33 ozaki-r Exp $");
 
 #include 
 #ifdef RTFLUSH_DEBUG
@@ -150,6 +150,7 @@ static void rt_maskedcopy(const struct s
 struct sockaddr *, const struct sockaddr *);
 
 static void rtcache_clear(struct route *);
+static void rtcache_clear_rtentry(int, struct rtentry *);
 static void rtcache_invalidate(struct dom_rtlist *);
 
 #ifdef DDB
@@ -794,6 +795,7 @@ rtrequest1(int req, struct rt_addrinfo *
 			rt->rt_refcnt++;
 			rtfree(rt);
 		}
+		rtcache_clear_rtentry(dst->sa_family, rt);
 		break;
 
 	case RTM_ADD:
@@ -1388,6 +1390,21 @@ rtcache_invalidate(struct dom_rtlist *rt
 }
 
 static void
+rtcache_clear_rtentry(int family, struct rtentry *rt)
+{
+	struct domain *dom;
+	struct route *ro;
+
+	if ((dom = pffinddomain(family)) == NULL)
+		return;
+
+	LIST_FOREACH(ro, &dom->dom_rtcache, ro_rtcache_next) {
+		if (ro->_ro_rt == rt)
+			rtcache_clear(ro);
+	}
+}
+
+static void
 rtcache_clear(struct route *ro)
 {
 	rtcache_invariants(ro);

Index: src/sys/netinet/if_arp.c
diff -u src/sys/netinet/if_arp.c:1.214 src/sys/netinet/if_arp.c:1.215
--- src/sys/netinet/if_arp.c:1.214	Thu Jun 30 01:34:53 2016
+++ src/sys/netinet/if_arp.c	Fri Jul  1 05:22:33 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_arp.c,v 1.214 2016/06/30 01:34:53 ozaki-r Exp $	*/
+/*	$NetBSD: if_arp.c,v 1.215 2016/07/01 05:22:33 ozaki-r Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2000, 2008 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_arp.c,v 1.214 2016/06/30 01:34:53 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_arp.c,v 1.215 2016/07/01 05:22:33 ozaki-r Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ddb.h"
@@ -1511,7 +1511,7 @@ static void
 arp_dad_stoptimer(struct dadq *dp)
 {
 
-	callout_stop(&dp->dad_timer_ch);
+	callout_halt(&dp->dad_timer_ch, NULL);
 }
 
 static void

Index: src/sys/netinet6/nd6_nbr.c
diff -u src/sys

CVS commit: src/sys/net

2016-06-30 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Fri Jul  1 05:15:40 UTC 2016

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

Log Message:
Add debug helper function for interface addresses

It checks whether all addresses of an interface being destroyed
are freed (no reference remains) at the end of if_detach.


To generate a diff of this commit:
cvs rdiff -u -r1.348 -r1.349 src/sys/net/if.c

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

Modified files:

Index: src/sys/net/if.c
diff -u src/sys/net/if.c:1.348 src/sys/net/if.c:1.349
--- src/sys/net/if.c:1.348	Tue Jun 28 02:36:54 2016
+++ src/sys/net/if.c	Fri Jul  1 05:15:40 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: if.c,v 1.348 2016/06/28 02:36:54 ozaki-r Exp $	*/
+/*	$NetBSD: if.c,v 1.349 2016/07/01 05:15:40 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.348 2016/06/28 02:36:54 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.349 2016/07/01 05:15:40 ozaki-r Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_inet.h"
@@ -1025,6 +1025,65 @@ if_purgeaddrs(struct ifnet *ifp, int fam
 	}
 }
 
+#ifdef IFAREF_DEBUG
+static struct ifaddr **ifa_list;
+static int ifa_list_size;
+
+/* Depends on only one if_attach runs at once */
+static void
+if_build_ifa_list(struct ifnet *ifp)
+{
+	struct ifaddr *ifa;
+	int i;
+
+	KASSERT(ifa_list == NULL);
+	KASSERT(ifa_list_size == 0);
+
+	IFADDR_FOREACH(ifa, ifp)
+		ifa_list_size++;
+
+	ifa_list = kmem_alloc(sizeof(*ifa) * ifa_list_size, KM_SLEEP);
+	if (ifa_list == NULL)
+		return;
+
+	i = 0;
+	IFADDR_FOREACH(ifa, ifp) {
+		ifa_list[i++] = ifa;
+		ifaref(ifa);
+	}
+}
+
+static void
+if_check_and_free_ifa_list(struct ifnet *ifp)
+{
+	int i;
+	struct ifaddr *ifa;
+
+	if (ifa_list == NULL)
+		return;
+
+	for (i = 0; i < ifa_list_size; i++) {
+		char buf[64];
+
+		ifa = ifa_list[i];
+		sockaddr_format(ifa->ifa_addr, buf, sizeof(buf));
+		if (ifa->ifa_refcnt > 1) {
+			log(LOG_WARNING,
+			"ifa(%s) still referenced (refcnt=%d)\n",
+			buf, ifa->ifa_refcnt - 1);
+		} else
+			log(LOG_DEBUG,
+			"ifa(%s) not referenced (refcnt=%d)\n",
+			buf, ifa->ifa_refcnt - 1);
+		ifafree(ifa);
+	}
+
+	kmem_free(ifa_list, sizeof(*ifa) * ifa_list_size);
+	ifa_list = NULL;
+	ifa_list_size = 0;
+}
+#endif
+
 /*
  * Detach an interface from the list of "active" interfaces,
  * freeing any resources as we go along.
@@ -1045,6 +1104,9 @@ if_detach(struct ifnet *ifp)
 	int s, i, family, purged;
 	uint64_t xc;
 
+#ifdef IFAREF_DEBUG
+	if_build_ifa_list(ifp);
+#endif
 	/*
 	 * XXX It's kind of lame that we have to have the
 	 * XXX socket structure...
@@ -1245,6 +1307,10 @@ again:
 	}
 
 	splx(s);
+
+#ifdef IFAREF_DEBUG
+	if_check_and_free_ifa_list(ifp);
+#endif
 }
 
 static void



CVS commit: src/sys/dev/isa

2016-06-30 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Jun 30 20:39:54 UTC 2016

Modified Files:
src/sys/dev/isa: slhci_isa.c

Log Message:
Provide some defaults.  From Felix Deichmann.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/dev/isa/slhci_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/isa/slhci_isa.c
diff -u src/sys/dev/isa/slhci_isa.c:1.13 src/sys/dev/isa/slhci_isa.c:1.14
--- src/sys/dev/isa/slhci_isa.c:1.13	Sat Apr 23 10:15:31 2016
+++ src/sys/dev/isa/slhci_isa.c	Thu Jun 30 20:39:54 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: slhci_isa.c,v 1.13 2016/04/23 10:15:31 skrll Exp $	*/
+/*	$NetBSD: slhci_isa.c,v 1.14 2016/06/30 20:39:54 skrll Exp $	*/
 
 /*
  * Copyright (c) 2001 Kiyoshi Ikehara. All rights reserved.
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: slhci_isa.c,v 1.13 2016/04/23 10:15:31 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: slhci_isa.c,v 1.14 2016/06/30 20:39:54 skrll Exp $");
 
 #include 
 #include 
@@ -74,6 +74,22 @@ slhci_isa_match(device_t parent, cfdata_
 	int result = 0;
 	uint8_t sltype;
 
+	if (ia->ia_nio < 1)
+		goto out;
+	if (ia->ia_nirq < 1)
+		goto out;
+
+	if (ISA_DIRECT_CONFIG(ia))
+		goto out;
+
+	/* Disallow wildcarded i/o address. */
+	if (ia->ia_io[0].ir_addr == ISA_UNKNOWN_PORT)
+		goto out;
+
+	/* Don't allow wildcarded IRQ. */
+	if (ia->ia_irq[0].ir_irq == ISA_UNKNOWN_IRQ)
+		goto out;
+
 	if (bus_space_map(iot, ia->ia_io[0].ir_addr, SL11_PORTSIZE, 0, &ioh))
 		goto out;
 
@@ -85,6 +101,15 @@ slhci_isa_match(device_t parent, cfdata_
 	bus_space_unmap(iot, ioh, SL11_PORTSIZE);
 
  out:
+	if (result) {
+		ia->ia_nio = 1;
+		ia->ia_io[0].ir_size = SL11_PORTSIZE;
+
+		ia->ia_nirq = 1;
+
+		ia->ia_niomem = 0;
+		ia->ia_ndrq = 0;
+	}
 	return (result);
 }
 
@@ -109,11 +134,11 @@ slhci_isa_attach(device_t parent, device
 	}
 
 	/* Initialize sc XXX power value unconfirmed */
-	slhci_preinit(sc, NULL, iot, ioh, 30, SL11_IDX_DATA);
+	slhci_preinit(sc, NULL, iot, ioh, 500, SL11_IDX_DATA);
 
 	/* Establish the interrupt handler */
 	isc->sc_ih = isa_intr_establish(ia->ia_ic, ia->ia_irq[0].ir_irq,
-	IST_EDGE, IPL_USB, slhci_intr, sc);
+	IST_EDGE, IPL_USB, slhci_intr, sc);
 	if (isc->sc_ih == NULL) {
 		printf("%s: can't establish interrupt\n", SC_NAME(sc));
 		return;



CVS commit: src/lib/libc/sys

2016-06-30 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Thu Jun 30 18:43:43 UTC 2016

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

Log Message:
Bump date for header file change.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/lib/libc/sys/fdiscard.2

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

Modified files:

Index: src/lib/libc/sys/fdiscard.2
diff -u src/lib/libc/sys/fdiscard.2:1.4 src/lib/libc/sys/fdiscard.2:1.5
--- src/lib/libc/sys/fdiscard.2:1.4	Thu Jun 30 15:29:20 2016
+++ src/lib/libc/sys/fdiscard.2	Thu Jun 30 18:43:43 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: fdiscard.2,v 1.4 2016/06/30 15:29:20 dholland Exp $
+.\"	$NetBSD: fdiscard.2,v 1.5 2016/06/30 18:43:43 wiz Exp $
 .\"
 .\" Copyright (c) 2014 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd February 1, 2015
+.Dd June 30, 2016
 .Dt FDISCARD 2
 .Os
 .Sh NAME



CVS commit: src/sys/dev/usb

2016-06-30 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Jun 30 17:38:47 UTC 2016

Modified Files:
src/sys/dev/usb: files.usb

Log Message:
remove XXX


To generate a diff of this commit:
cvs rdiff -u -r1.140 -r1.141 src/sys/dev/usb/files.usb

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/files.usb
diff -u src/sys/dev/usb/files.usb:1.140 src/sys/dev/usb/files.usb:1.141
--- src/sys/dev/usb/files.usb:1.140	Thu Jun 23 03:32:12 2016
+++ src/sys/dev/usb/files.usb	Thu Jun 30 13:38:47 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: files.usb,v 1.140 2016/06/23 07:32:12 skrll Exp $
+#	$NetBSD: files.usb,v 1.141 2016/06/30 17:38:47 christos Exp $
 #
 # Config file and device description for machine-independent USB code.
 # Included by ports that need it.  Ports that use it must provide
@@ -536,7 +536,6 @@ file	dev/usb/if_run.c		run
 attach	athn at usbdevif with athn_usb: firmload
 file	dev/usb/if_athn_usb.c		athn_usb		needs-flag
 
-# XXX: ljt
 # Realtek RTL8188SU/RTL8191SU/RTL8192SU
 device	rsu: arp, ether, firmload, ifnet, wlan
 attach	rsu at usbdevif



CVS commit: src/lib/libc/sys

2016-06-30 Thread Abhinav Upadhyay
Module Name:src
Committed By:   abhinav
Date:   Thu Jun 30 17:00:55 UTC 2016

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

Log Message:
Document WAIT_ANY and WAIT_MYPGRP constants
(text referenced from OpenBSD wait(2) man page)

While there, remove duplicated information and add more refernces in SEE ALSO
Also, the NOTES section refers to intro(2), while siginterrupt(3) is a better
suited reference, so fix that too.

Ok by wiz


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/lib/libc/sys/wait.2

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

Modified files:

Index: src/lib/libc/sys/wait.2
diff -u src/lib/libc/sys/wait.2:1.35 src/lib/libc/sys/wait.2:1.36
--- src/lib/libc/sys/wait.2:1.35	Fri Apr 29 13:17:09 2016
+++ src/lib/libc/sys/wait.2	Thu Jun 30 17:00:55 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: wait.2,v 1.35 2016/04/29 13:17:09 christos Exp $
+.\"	$NetBSD: wait.2,v 1.36 2016/06/30 17:00:55 abhinav Exp $
 .\"
 .\" Copyright (c) 1980, 1991, 1993, 1994
 .\"	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\"
 .\" @(#)wait.2	8.2 (Berkeley) 4/19/94
 .\"
-.Dd April 28, 2016
+.Dd June 27, 2016
 .Dt WAIT 2
 .Os
 .Sh NAME
@@ -86,37 +86,6 @@ or
 .Fn wait6 .
 .Pp
 The
-.Fa wpid
-parameter specifies the set of child processes for which to wait.
-If
-.Fa wpid
-is \-1, the call waits for any child process.
-If
-.Fa wpid
-is 0,
-the call waits for any child process in the process group of the caller.
-If
-.Fa wpid
-is greater than zero, the call waits for the process with process id
-.Fa wpid .
-If
-.Fa wpid
-is less than \-1, the call waits for any process whose process group id
-equals the absolute value of
-.Fa wpid .
-.Pp
-The
-.Fa status
-parameter is defined below.
-.Pp
-If
-.Fa rusage
-is non-zero, a summary of the resources used by the terminated
-process and all its
-children is returned (this information is currently not available
-for stopped processes).
-.Pp
-The
 .Fn wait6
 function is the most general function in this family and its distinct
 features are:
@@ -264,15 +233,24 @@ and
 functions, the single
 .Fa wpid
 argument specifies the set of child processes for which to wait.
+The following symbolic constants are defined in
+.In sys/wait.h
+.Bd -literal -offset indent
+#define WAIT_ANY(-1)/* any process */
+#define WAIT_MYPGRP 0   /* any process in my process group */
+.Ed
 .Bl -bullet -offset indent
 .It
 If
 .Fa wpid
-is \-1, the call waits for any child process.
+is
+.Dv WAIT_ANY ,
+the call waits for any child process.
 .It
 If
 .Fa wpid
-is 0,
+is
+.Dv WAIT_MYPGRP ,
 the call waits for any child process in the process group of the caller.
 .It
 If
@@ -306,7 +284,7 @@ when they exit.
 If
 .Dv WALTSIG
 is not specified, the call will wait only for processes that
-are configured to post 
+are configured to post
 .Dv SIGCHLD .
 .It Dv WCONTINUED
 Report the status of selected processes that
@@ -549,8 +527,7 @@ the call may be interrupted or restarted
 returns,
 depending on the options in effect for the signal;
 see
-.Xr intro 2 ,
-System call restart.
+.Xr siginterrupt 3 .
 .Sh RETURN VALUES
 If
 .Fn wait
@@ -649,7 +626,9 @@ An invalid value was specified for
 .Xr _exit 2 ,
 .Xr ptrace 2 ,
 .Xr sigaction 2 ,
-.Xr siginfo 2
+.Xr siginfo 2 ,
+.Xr exit 3 ,
+.Xr siginterrupt 3
 .Sh STANDARDS
 The
 .Fn wait



CVS commit: src/sys/dev/ic

2016-06-30 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Jun 30 16:34:56 UTC 2016

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

Log Message:
Remove dead code


To generate a diff of this commit:
cvs rdiff -u -r1.86 -r1.87 src/sys/dev/ic/sl811hs.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/sl811hs.c
diff -u src/sys/dev/ic/sl811hs.c:1.86 src/sys/dev/ic/sl811hs.c:1.87
--- src/sys/dev/ic/sl811hs.c:1.86	Tue Jun 28 16:00:32 2016
+++ src/sys/dev/ic/sl811hs.c	Thu Jun 30 16:34:56 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: sl811hs.c,v 1.86 2016/06/28 16:00:32 skrll Exp $	*/
+/*	$NetBSD: sl811hs.c,v 1.87 2016/06/30 16:34:56 skrll Exp $	*/
 
 /*
  * Not (c) 2007 Matthew Orgass
@@ -68,7 +68,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sl811hs.c,v 1.86 2016/06/28 16:00:32 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sl811hs.c,v 1.87 2016/06/30 16:34:56 skrll Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_slhci.h"
@@ -2210,13 +2210,6 @@ status_setup:
 			LK_SLASSERT(xfer->ux_actlen <= xfer->ux_length, sc,
 			spipe, xfer, return);
 			xfer->ux_status = USBD_NORMAL_COMPLETION;
-#if 0 /* usb_transfer_complete will do this */
-			if (xfer->ux_length == xfer->ux_actlen || xfer->ux_flags &
-			USBD_SHORT_XFER_OK)
-xfer->ux_status = USBD_NORMAL_COMPLETION;
-			else
-xfer->ux_status = USBD_SHORT_XFER;
-#endif
 		}
 	}
 



CVS commit: src

2016-06-30 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Thu Jun 30 15:29:20 UTC 2016

Modified Files:
src/include: unistd.h
src/lib/libc/sys: fdiscard.2 posix_fallocate.c
src/sys/sys: fcntl.h

Log Message:
PR 51287 Ralf Nolden: posix_fallocate belongs in 


To generate a diff of this commit:
cvs rdiff -u -r1.146 -r1.147 src/include/unistd.h
cvs rdiff -u -r1.3 -r1.4 src/lib/libc/sys/fdiscard.2
cvs rdiff -u -r1.1 -r1.2 src/lib/libc/sys/posix_fallocate.c
cvs rdiff -u -r1.46 -r1.47 src/sys/sys/fcntl.h

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

Modified files:

Index: src/include/unistd.h
diff -u src/include/unistd.h:1.146 src/include/unistd.h:1.147
--- src/include/unistd.h:1.146	Sat Jun 18 14:39:15 2016
+++ src/include/unistd.h	Thu Jun 30 15:29:20 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: unistd.h,v 1.146 2016/06/18 14:39:15 kamil Exp $	*/
+/*	$NetBSD: unistd.h,v 1.147 2016/06/30 15:29:20 dholland Exp $	*/
 
 /*-
  * Copyright (c) 1998, 1999, 2008 The NetBSD Foundation, Inc.
@@ -173,7 +173,6 @@ ssize_t	 readlink(const char * __restric
  */
 #if (_POSIX_C_SOURCE - 0) >= 200112L || (_XOPEN_SOURCE - 0) >= 600 || \
 defined(_NETBSD_SOURCE)
-int	 posix_fallocate(int, off_t, off_t);
 int	 setegid(gid_t);
 int	 seteuid(uid_t);
 #endif

Index: src/lib/libc/sys/fdiscard.2
diff -u src/lib/libc/sys/fdiscard.2:1.3 src/lib/libc/sys/fdiscard.2:1.4
--- src/lib/libc/sys/fdiscard.2:1.3	Sun Feb  1 15:24:15 2015
+++ src/lib/libc/sys/fdiscard.2	Thu Jun 30 15:29:20 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: fdiscard.2,v 1.3 2015/02/01 15:24:15 christos Exp $
+.\"	$NetBSD: fdiscard.2,v 1.4 2016/06/30 15:29:20 dholland Exp $
 .\"
 .\" Copyright (c) 2014 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -37,9 +37,10 @@
 .Sh LIBRARY
 .Lb libc
 .Sh SYNOPSIS
-.In unistd.h
+.In fcntl.h
 .Ft int
 .Fn posix_fallocate "int fd" "off_t pos" "off_t length"
+.In unistd.h
 .Ft int
 .Fn fdiscard "int fd" "off_t pos" "off_t length"
 .Sh DESCRIPTION

Index: src/lib/libc/sys/posix_fallocate.c
diff -u src/lib/libc/sys/posix_fallocate.c:1.1 src/lib/libc/sys/posix_fallocate.c:1.2
--- src/lib/libc/sys/posix_fallocate.c:1.1	Thu Sep 25 15:08:29 2014
+++ src/lib/libc/sys/posix_fallocate.c	Thu Jun 30 15:29:20 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: posix_fallocate.c,v 1.1 2014/09/25 15:08:29 manu Exp $ */
+/*	$NetBSD: posix_fallocate.c,v 1.2 2016/06/30 15:29:20 dholland Exp $ */
 
 /*
  * Copyright (c) 2014 The NetBSD Foundation, Inc.  
@@ -33,12 +33,12 @@
 
 #include 
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: posix_fallocate.c,v 1.1 2014/09/25 15:08:29 manu Exp $");
+__RCSID("$NetBSD: posix_fallocate.c,v 1.2 2016/06/30 15:29:20 dholland Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include 
 #include 
-#include 
+#include 
 
 int __posix_fallocate(int, int, off_t, off_t);
 

Index: src/sys/sys/fcntl.h
diff -u src/sys/sys/fcntl.h:1.46 src/sys/sys/fcntl.h:1.47
--- src/sys/sys/fcntl.h:1.46	Sun Sep 15 10:41:20 2013
+++ src/sys/sys/fcntl.h	Thu Jun 30 15:29:20 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: fcntl.h,v 1.46 2013/09/15 10:41:20 njoly Exp $	*/
+/*	$NetBSD: fcntl.h,v 1.47 2016/06/30 15:29:20 dholland Exp $	*/
 
 /*-
  * Copyright (c) 1983, 1990, 1993
@@ -313,12 +313,21 @@ int	flock(int, int);
 int	posix_fadvise(int, off_t, off_t, int);
 
 /*
+ * The Open Group Base Specifications, Issue 6; IEEE Std 1003.1-2001 (POSIX)
+ */
+#if (_POSIX_C_SOURCE - 0) >= 200112L || (_XOPEN_SOURCE - 0) >= 600 || \
+defined(_NETBSD_SOURCE)
+int	 posix_fallocate(int, off_t, off_t);
+#endif
+
+/*
  * X/Open Extended API set 2 (a.k.a. C063)
  */
 #if (_POSIX_C_SOURCE - 0) >= 200809L || (_XOPEN_SOURCE - 0 >= 700) || \
 defined(_INCOMPLETE_XOPEN_C063) || defined(_NETBSD_SOURCE)
 int	openat(int, const char *, int, ...);
 #endif
+
 __END_DECLS
 #endif /* !_KERNEL */
 



CVS commit: src/usr.bin/error

2016-06-30 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Thu Jun 30 15:34:30 UTC 2016

Modified Files:
src/usr.bin/error: pi.c

Log Message:
PR 51298 David Binderman: simplify redundant conditionals


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/usr.bin/error/pi.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.bin/error/pi.c
diff -u src/usr.bin/error/pi.c:1.18 src/usr.bin/error/pi.c:1.19
--- src/usr.bin/error/pi.c:1.18	Wed Aug 17 13:11:22 2011
+++ src/usr.bin/error/pi.c	Thu Jun 30 15:34:30 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: pi.c,v 1.18 2011/08/17 13:11:22 christos Exp $	*/
+/*	$NetBSD: pi.c,v 1.19 2016/06/30 15:34:30 dholland Exp $	*/
 
 /*
  * Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)pi.c	8.1 (Berkeley) 6/6/93";
 #endif
-__RCSID("$NetBSD: pi.c,v 1.18 2011/08/17 13:11:22 christos Exp $");
+__RCSID("$NetBSD: pi.c,v 1.19 2016/06/30 15:34:30 dholland Exp $");
 #endif /* not lint */
 
 #include 
@@ -218,12 +218,12 @@ piptr(const char *string)
 {
 	if (*string != '-')
 		return false;
-	while (*string && *string == '-')
+	while (*string == '-')
 		string++;
 	if (*string != '^')
 		return false;
 	string++;
-	while (*string && *string == '-')
+	while (*string == '-')
 		string++;
 	return (*string == '\0');
 }



CVS commit: src/libexec/httpd

2016-06-30 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Thu Jun 30 13:17:48 UTC 2016

Modified Files:
src/libexec/httpd: bozohttpd.c

Log Message:
avoid an impossible case the compiler can't quite tell.


To generate a diff of this commit:
cvs rdiff -u -r1.81 -r1.82 src/libexec/httpd/bozohttpd.c

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

Modified files:

Index: src/libexec/httpd/bozohttpd.c
diff -u src/libexec/httpd/bozohttpd.c:1.81 src/libexec/httpd/bozohttpd.c:1.82
--- src/libexec/httpd/bozohttpd.c:1.81	Tue May 24 21:18:29 2016
+++ src/libexec/httpd/bozohttpd.c	Thu Jun 30 13:17:48 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: bozohttpd.c,v 1.81 2016/05/24 21:18:29 agc Exp $	*/
+/*	$NetBSD: bozohttpd.c,v 1.82 2016/06/30 13:17:48 mrg Exp $	*/
 
 /*	$eterna: bozohttpd.c,v 1.178 2011/11/18 09:21:15 mrg Exp $	*/
 
@@ -2244,6 +2244,7 @@ bozo_setup(bozohttpd_t *httpd, bozoprefs
 	extern char	**environ;
 	static char	 *cleanenv[1] = { NULL };
 	uid_t		  uid;
+	int		  uidset = 0;
 	char		 *chrootdir;
 	char		 *username;
 	char		 *portnum;
@@ -2339,6 +2340,7 @@ bozo_setup(bozohttpd_t *httpd, bozoprefs
 			bozoerr(httpd, 1, "setgid(%u): %s", pw->pw_gid,
 strerror(errno));
 		uid = pw->pw_uid;
+		uidset = 1;
 	}
 	/*
 	 * handle chroot.
@@ -2353,7 +2355,7 @@ bozo_setup(bozohttpd_t *httpd, bozoprefs
 strerror(errno));
 	}
 
-	if (username != NULL && setuid(uid) == -1)
+	if (uidset && setuid(uid) == -1)
 		bozoerr(httpd, 1, "setuid(%d): %s", uid, strerror(errno));
 
 	/*



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

2016-06-30 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Jun 30 12:57:35 UTC 2016

Modified Files:
src/sys/arch/mips/mips: pmap.c

Log Message:
Fix MIPS3_NO_PV_UNCACHED alias handling by looping through the pv_list
looking for bad aliases and removing the bad entries.  That is, revert
to the code before the matt-mips64 merge.

Additionally, fix the pmap_update call to not use the (recently
 removed/freed) pv for the pmap_t.

Fixes the following two PRs

PR/49903: Panic during installation on WorkPad Z50 (hpcmips) whilst 
uncompressing base.tgz
PR/51226: Install bug for hpcmips NetBSD V7 using FTP Full installation


To generate a diff of this commit:
cvs rdiff -u -r1.222 -r1.223 src/sys/arch/mips/mips/pmap.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/mips/mips/pmap.c
diff -u src/sys/arch/mips/mips/pmap.c:1.222 src/sys/arch/mips/mips/pmap.c:1.223
--- src/sys/arch/mips/mips/pmap.c:1.222	Tue Jun 28 09:31:15 2016
+++ src/sys/arch/mips/mips/pmap.c	Thu Jun 30 12:57:35 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.222 2016/06/28 09:31:15 skrll Exp $	*/
+/*	$NetBSD: pmap.c,v 1.223 2016/06/30 12:57:35 skrll Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2001 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
 
 #include 
 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.222 2016/06/28 09:31:15 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.223 2016/06/30 12:57:35 skrll Exp $");
 
 /*
  *	Manages physical address maps.
@@ -2168,12 +2168,12 @@ again:
 			 * be mapped with one index at any given time.
 			 */
 
-			if (mips_cache_badalias(pv->pv_va, va)) {
-for (npv = pv; npv; npv = npv->pv_next) {
-	vaddr_t nva = trunc_page(npv->pv_va);
-	pmap_remove(npv->pv_pmap, nva,
-	nva + PAGE_SIZE);
-	pmap_update(npv->pv_pmap);
+			for (npv = pv; npv; npv = npv->pv_next) {
+vaddr_t nva = trunc_page(npv->pv_va);
+pmap_t npm = npv->pv_pmap;
+if (mips_cache_badalias(nva, va)) {
+	pmap_remove(npm, nva, nva + PAGE_SIZE);
+	pmap_update(npm);
 	goto again;
 }
 			}



CVS commit: src/distrib

2016-06-30 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Jun 30 12:56:27 UTC 2016

Modified Files:
src/distrib/amd64: Makefile
src/distrib/amd64/ramdisks: Makefile
src/distrib/i386: Makefile
src/distrib/i386/ramdisks: Makefile

Log Message:
Omit cgd based ramdisks and miniroot modules if MKCRYPTO=no

Final part of PR kern/51282


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/distrib/amd64/Makefile
cvs rdiff -u -r1.2 -r1.3 src/distrib/amd64/ramdisks/Makefile
cvs rdiff -u -r1.11 -r1.12 src/distrib/i386/Makefile
cvs rdiff -u -r1.4 -r1.5 src/distrib/i386/ramdisks/Makefile

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

Modified files:

Index: src/distrib/amd64/Makefile
diff -u src/distrib/amd64/Makefile:1.10 src/distrib/amd64/Makefile:1.11
--- src/distrib/amd64/Makefile:1.10	Sun Jul 19 10:16:55 2015
+++ src/distrib/amd64/Makefile	Thu Jun 30 12:56:27 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.10 2015/07/19 10:16:55 martin Exp $
+#	$NetBSD: Makefile,v 1.11 2016/06/30 12:56:27 pgoyette Exp $
 
 .include 
 
@@ -8,8 +8,10 @@ SUBDIR+=	.WAIT
 SUBDIR+=	instkernel
 .if ${MKKMOD} != "no"
 SUBDIR+=	kmod
+.if ${MKCRYPTO} != "no"
 SUBDIR+=	kmod-cgdroot
 .endif
+.endif
 SUBDIR+=	.WAIT
 SUBDIR+=	cdroms
 SUBDIR+=	liveimage

Index: src/distrib/amd64/ramdisks/Makefile
diff -u src/distrib/amd64/ramdisks/Makefile:1.2 src/distrib/amd64/ramdisks/Makefile:1.3
--- src/distrib/amd64/ramdisks/Makefile:1.2	Mon Jul 15 00:22:10 2013
+++ src/distrib/amd64/ramdisks/Makefile	Thu Jun 30 12:56:27 2016
@@ -1,8 +1,11 @@
-#	$NetBSD: Makefile,v 1.2 2013/07/15 00:22:10 khorben Exp $
+#	$NetBSD: Makefile,v 1.3 2016/06/30 12:56:27 pgoyette Exp $
 
 SUBDIR=
 SUBDIR+=	ramdisk
+
+.if ${MKCRYPTO:Uyes} != "no"
 SUBDIR+=	ramdisk-cgdroot
+.endif
 
 TARGETS+=	release
 

Index: src/distrib/i386/Makefile
diff -u src/distrib/i386/Makefile:1.11 src/distrib/i386/Makefile:1.12
--- src/distrib/i386/Makefile:1.11	Sun Jul 19 10:16:55 2015
+++ src/distrib/i386/Makefile	Thu Jun 30 12:56:27 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.11 2015/07/19 10:16:55 martin Exp $
+#	$NetBSD: Makefile,v 1.12 2016/06/30 12:56:27 pgoyette Exp $
 
 .include 
 
@@ -8,8 +8,10 @@ SUBDIR+=	.WAIT
 SUBDIR+=	instkernel
 .if ${MKKMOD} != "no"
 SUBDIR+=	kmod
+.if ${MKCRYPTO} != "no"
 SUBDIR+=	kmod-cgdroot
 .endif
+.endif
 SUBDIR+=	.WAIT
 SUBDIR+=	cdroms
 SUBDIR+=	floppies

Index: src/distrib/i386/ramdisks/Makefile
diff -u src/distrib/i386/ramdisks/Makefile:1.4 src/distrib/i386/ramdisks/Makefile:1.5
--- src/distrib/i386/ramdisks/Makefile:1.4	Tue Jul 16 02:10:43 2013
+++ src/distrib/i386/ramdisks/Makefile	Thu Jun 30 12:56:27 2016
@@ -1,8 +1,11 @@
-#	$NetBSD: Makefile,v 1.4 2013/07/16 02:10:43 khorben Exp $
+#	$NetBSD: Makefile,v 1.5 2016/06/30 12:56:27 pgoyette Exp $
 
 SUBDIR=
 SUBDIR+=	ramdisk-big
+
+.if ${MKCRYPTO:Uyes} != "no"
 SUBDIR+=	ramdisk-cgdroot
+.endif
 
 TARGETS+=	release
 



CVS commit: src/sys/net

2016-06-30 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Thu Jun 30 09:44:58 UTC 2016

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

Log Message:
Get rid of duplicate prototype of ifafree


To generate a diff of this commit:
cvs rdiff -u -r1.218 -r1.219 src/sys/net/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/sys/net/if.h
diff -u src/sys/net/if.h:1.218 src/sys/net/if.h:1.219
--- src/sys/net/if.h:1.218	Tue Jun 28 02:36:54 2016
+++ src/sys/net/if.h	Thu Jun 30 09:44:58 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: if.h,v 1.218 2016/06/28 02:36:54 ozaki-r Exp $	*/
+/*	$NetBSD: if.h,v 1.219 2016/06/30 09:44:58 ozaki-r Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -994,7 +994,6 @@ struct	ifaddr *ifa_ifwithladdr(const str
 struct	ifaddr *ifa_ifwithroute(int, const struct sockaddr *,
 	const struct sockaddr *);
 struct	ifaddr *ifaof_ifpforaddr(const struct sockaddr *, struct ifnet *);
-void	ifafree(struct ifaddr *);
 void	link_rtrequest(int, struct rtentry *, const struct rt_addrinfo *);
 void	p2p_rtrequest(int, struct rtentry *, const struct rt_addrinfo *);
 



CVS commit: src/sys/fs/msdosfs

2016-06-30 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Thu Jun 30 09:34:01 UTC 2016

Modified Files:
src/sys/fs/msdosfs: msdosfs_conv.c

Log Message:
Fix false positives when comparing long file names that have the
same first 13 (or some multiple thereof) characters.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/fs/msdosfs/msdosfs_conv.c

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

Modified files:

Index: src/sys/fs/msdosfs/msdosfs_conv.c
diff -u src/sys/fs/msdosfs/msdosfs_conv.c:1.16 src/sys/fs/msdosfs/msdosfs_conv.c:1.17
--- src/sys/fs/msdosfs/msdosfs_conv.c:1.16	Sun Mar  6 07:33:25 2016
+++ src/sys/fs/msdosfs/msdosfs_conv.c	Thu Jun 30 09:34:01 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: msdosfs_conv.c,v 1.16 2016/03/06 07:33:25 mlelstv Exp $	*/
+/*	$NetBSD: msdosfs_conv.c,v 1.17 2016/06/30 09:34:01 nonaka Exp $	*/
 
 /*-
  * Copyright (C) 1995, 1997 Wolfgang Solfrank.
@@ -58,7 +58,7 @@
 #endif
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: msdosfs_conv.c,v 1.16 2016/03/06 07:33:25 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: msdosfs_conv.c,v 1.17 2016/06/30 09:34:01 nonaka Exp $");
 
 /*
  * System include files.
@@ -621,6 +621,8 @@ winChkName(const u_char *un, int unlen, 
 
 	if (i >= len + 1)
 		return -1;
+	if ((wep->weCnt & WIN_LAST) && (len - i > WIN_CHARS))
+		return -1;
 
 	/*
 	 * Fetch name segment from directory entry



CVS commit: src/lib

2016-06-30 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Thu Jun 30 09:14:30 UTC 2016

Modified Files:
src/lib/libc/arch/ia64/gen: Makefile.inc
src/lib/libc/arch/ia64/sys: sbrk.S shmat.S
src/lib/libc/compat/arch/ia64/sys: Makefile.inc
src/lib/libkvm: kvm_ia64.c
Added Files:
src/lib/libc/compat/arch/ia64/sys: compat_Ovfork.S

Log Message:
various ia64 updates:
- add a compat vfork because of stupid
- add a weak sbrk
- add a shmat syscall
- add an empty kvm implementation that links
- add missing fp stuff


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/lib/libc/arch/ia64/gen/Makefile.inc
cvs rdiff -u -r1.2 -r1.3 src/lib/libc/arch/ia64/sys/sbrk.S
cvs rdiff -u -r1.1 -r1.2 src/lib/libc/arch/ia64/sys/shmat.S
cvs rdiff -u -r1.2 -r1.3 src/lib/libc/compat/arch/ia64/sys/Makefile.inc
cvs rdiff -u -r0 -r1.1 src/lib/libc/compat/arch/ia64/sys/compat_Ovfork.S
cvs rdiff -u -r1.1 -r1.2 src/lib/libkvm/kvm_ia64.c

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

Modified files:

Index: src/lib/libc/arch/ia64/gen/Makefile.inc
diff -u src/lib/libc/arch/ia64/gen/Makefile.inc:1.6 src/lib/libc/arch/ia64/gen/Makefile.inc:1.7
--- src/lib/libc/arch/ia64/gen/Makefile.inc:1.6	Fri Apr 17 12:51:05 2015
+++ src/lib/libc/arch/ia64/gen/Makefile.inc	Thu Jun 30 09:14:30 2016
@@ -1,10 +1,15 @@
-#	$NetBSD: Makefile.inc,v 1.6 2015/04/17 12:51:05 martin Exp $
+#	$NetBSD: Makefile.inc,v 1.7 2016/06/30 09:14:30 mrg Exp $
 
 SRCS+=	_lwp.c
 SRCS+=	bswap16.c bswap32.c bswap64.c
 SRCS+=	setjmp.S _setjmp.S sigsetjmp.S
 SRCS+=	flt_rounds.c fpgetround.c fpsetround.c fpgetmask.c fpsetmask.c
+
+# Common ieee754 constants and functions
+SRCS+=	infinityf_ieee754.c infinity_ieee754.c infinityl_dbl_ieee754.c
+SRCS+=	fpclassifyf_ieee754.c fpclassifyd_ieee754.c
+SRCS+=	isfinitef_ieee754.c isfinited_ieee754.c
 SRCS+=	isinff_ieee754.c isinfd_ieee754.c
 SRCS+=	isnanf_ieee754.c isnand_ieee754.c
-SRCS+=	fpclassifyf_ieee754.c fpclassifyd_ieee754.c
+SRCS+=	signbitf_ieee754.c signbitd_ieee754.c
 

Index: src/lib/libc/arch/ia64/sys/sbrk.S
diff -u src/lib/libc/arch/ia64/sys/sbrk.S:1.2 src/lib/libc/arch/ia64/sys/sbrk.S:1.3
--- src/lib/libc/arch/ia64/sys/sbrk.S:1.2	Sat Sep 23 17:39:34 2006
+++ src/lib/libc/arch/ia64/sys/sbrk.S	Thu Jun 30 09:14:30 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: sbrk.S,v 1.2 2006/09/23 17:39:34 cherry Exp $	*/
+/*	$NetBSD: sbrk.S,v 1.3 2016/06/30 09:14:30 mrg Exp $	*/
 
 /*
  * Copyright (c) 1994, 1995 Carnegie-Mellon University.
@@ -34,6 +34,10 @@
 
 	.globl	_end
 
+#ifdef WEAK_ALIAS
+WEAK_ALIAS(sbrk, _sbrk)
+#endif
+
 	.data
 EXPORT(__curbrk)
 	.quad	_end

Index: src/lib/libc/arch/ia64/sys/shmat.S
diff -u src/lib/libc/arch/ia64/sys/shmat.S:1.1 src/lib/libc/arch/ia64/sys/shmat.S:1.2
--- src/lib/libc/arch/ia64/sys/shmat.S:1.1	Sun Sep 10 21:22:34 2006
+++ src/lib/libc/arch/ia64/sys/shmat.S	Thu Jun 30 09:14:30 2016
@@ -1,3 +1,5 @@
-/* $NetBSD: shmat.S,v 1.1 2006/09/10 21:22:34 cherry Exp $ */
-	
-/* XXX:	 Stub */
\ No newline at end of file
+/*	$NetBSD: shmat.S,v 1.2 2016/06/30 09:14:30 mrg Exp $	*/
+
+#include "SYS.h"
+
+RSYSCALL(shmat)

Index: src/lib/libc/compat/arch/ia64/sys/Makefile.inc
diff -u src/lib/libc/compat/arch/ia64/sys/Makefile.inc:1.2 src/lib/libc/compat/arch/ia64/sys/Makefile.inc:1.3
--- src/lib/libc/compat/arch/ia64/sys/Makefile.inc:1.2	Sun Mar  6 17:08:13 2011
+++ src/lib/libc/compat/arch/ia64/sys/Makefile.inc	Thu Jun 30 09:14:30 2016
@@ -1,3 +1,3 @@
-# $NetBSD: Makefile.inc,v 1.2 2011/03/06 17:08:13 bouyer Exp $
+# $NetBSD: Makefile.inc,v 1.3 2016/06/30 09:14:30 mrg Exp $
 
-SRCS+=	compat___semctl.S compat_quotactl.S
+SRCS+=	compat_Ovfork.S compat___semctl.S compat_quotactl.S

Index: src/lib/libkvm/kvm_ia64.c
diff -u src/lib/libkvm/kvm_ia64.c:1.1 src/lib/libkvm/kvm_ia64.c:1.2
--- src/lib/libkvm/kvm_ia64.c:1.1	Fri Apr 17 13:16:01 2015
+++ src/lib/libkvm/kvm_ia64.c	Thu Jun 30 09:14:30 2016
@@ -0,0 +1,79 @@
+/*	$NetBSD: kvm_ia64.c,v 1.2 2016/06/30 09:14:30 mrg Exp $	*/
+
+/*
+ * Copyright (c) 2016 Matthew R. Green
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ *derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIM

CVS commit: src/external/gpl3/gcc

2016-06-30 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Thu Jun 30 09:06:35 UTC 2016

Modified Files:
src/external/gpl3/gcc/dist/libgcc: config.host
src/external/gpl3/gcc/lib/libgcc/arch/ia64: defs.mk
src/external/gpl3/gcc/lib/libiberty/arch/ia64: config.h
Added Files:
src/external/gpl3/gcc/usr.bin/gcc/arch/ia64: insn-modes.h

Log Message:
enable some soft-fp for ia64, needed for libgcc.  re-mknative-gcc.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/external/gpl3/gcc/dist/libgcc/config.host
cvs rdiff -u -r1.3 -r1.4 src/external/gpl3/gcc/lib/libgcc/arch/ia64/defs.mk
cvs rdiff -u -r1.4 -r1.5 \
src/external/gpl3/gcc/lib/libiberty/arch/ia64/config.h
cvs rdiff -u -r0 -r1.1 \
src/external/gpl3/gcc/usr.bin/gcc/arch/ia64/insn-modes.h

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

Modified files:

Index: src/external/gpl3/gcc/dist/libgcc/config.host
diff -u src/external/gpl3/gcc/dist/libgcc/config.host:1.12 src/external/gpl3/gcc/dist/libgcc/config.host:1.13
--- src/external/gpl3/gcc/dist/libgcc/config.host:1.12	Tue Jun  7 06:14:18 2016
+++ src/external/gpl3/gcc/dist/libgcc/config.host	Thu Jun 30 09:06:35 2016
@@ -765,7 +765,7 @@ ia64*-*-linux*)
 	;;
 ia64*-*-netbsd*)
 	extra_parts="${extra_parts} crtfastmath.o"
-	tmake_file="${tmake_file} ia64/t-ia64 ia64/t-ia64-elf ia64/t-eh-ia64 t-crtfm"
+	tmake_file="${tmake_file} ia64/t-ia64 ia64/t-ia64-elf t-crtfm ia64/t-softfp t-softfp ia64/t-eh-ia64"
 	;;
 ia64*-*-hpux*)
 	tmake_file="ia64/t-ia64 ia64/t-ia64-elf ia64/t-hpux t-slibgcc ia64/t-slibgcc-hpux t-slibgcc-hpux"

Index: src/external/gpl3/gcc/lib/libgcc/arch/ia64/defs.mk
diff -u src/external/gpl3/gcc/lib/libgcc/arch/ia64/defs.mk:1.3 src/external/gpl3/gcc/lib/libgcc/arch/ia64/defs.mk:1.4
--- src/external/gpl3/gcc/lib/libgcc/arch/ia64/defs.mk:1.3	Thu Jun 30 01:44:48 2016
+++ src/external/gpl3/gcc/lib/libgcc/arch/ia64/defs.mk	Thu Jun 30 09:06:35 2016
@@ -3,7 +3,7 @@
 # Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp 
 #
 G_INCLUDES=-I. -I. -I../.././gcc -I${GNUHOSTDIST}/libgcc -I${GNUHOSTDIST}/libgcc/. -I${GNUHOSTDIST}/libgcc/../gcc -I${GNUHOSTDIST}/libgcc/../include 
-G_LIB2ADD= enable-execute-stack.c
+G_LIB2ADD= ${GNUHOSTDIST}/libgcc/config/ia64/tf-signs.c ${GNUHOSTDIST}/libgcc/config/ia64/sfp-exceptions.c  enable-execute-stack.c
 G_LIB2ADDEH=${GNUHOSTDIST}/libgcc/config/ia64/unwind-ia64.c ${GNUHOSTDIST}/libgcc/unwind-sjlj.c ${GNUHOSTDIST}/libgcc/unwind-c.c ${GNUHOSTDIST}/libgcc/emutls.c
 G_LIB2ADD_ST=
 G_LIB1ASMFUNCS=__divxf3 __divdf3 __divsf3 __divdi3 __moddi3 __udivdi3 __umoddi3 __divsi3 __modsi3 __udivsi3 __umodsi3 __save_stack_nonlocal __nonlocal_goto __restore_stack_nonlocal __trampoline _fixtfdi _fixunstfdi _floatditf

Index: src/external/gpl3/gcc/lib/libiberty/arch/ia64/config.h
diff -u src/external/gpl3/gcc/lib/libiberty/arch/ia64/config.h:1.4 src/external/gpl3/gcc/lib/libiberty/arch/ia64/config.h:1.5
--- src/external/gpl3/gcc/lib/libiberty/arch/ia64/config.h:1.4	Thu Jun 30 01:44:49 2016
+++ src/external/gpl3/gcc/lib/libiberty/arch/ia64/config.h	Thu Jun 30 09:06:35 2016
@@ -224,7 +224,7 @@
 #define HAVE_RINDEX 1
 
 /* Define to 1 if you have the `sbrk' function. */
-/* #undef HAVE_SBRK */
+#define HAVE_SBRK 1
 
 /* Define to 1 if you have the `setenv' function. */
 #define HAVE_SETENV 1

Added files:

Index: src/external/gpl3/gcc/usr.bin/gcc/arch/ia64/insn-modes.h
diff -u /dev/null src/external/gpl3/gcc/usr.bin/gcc/arch/ia64/insn-modes.h:1.1
--- /dev/null	Thu Jun 30 09:06:35 2016
+++ src/external/gpl3/gcc/usr.bin/gcc/arch/ia64/insn-modes.h	Thu Jun 30 09:06:35 2016
@@ -0,0 +1,420 @@
+/* This file is automatically generated.  DO NOT EDIT! */
+/* Generated from: NetBSD: mknative-gcc,v 1.87 2016/03/17 23:41:21 mrg Exp  */
+/* Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp  */
+
+/* Generated automatically from machmode.def and config/ia64/ia64-modes.def
+   by genmodes.  */
+
+#ifndef GCC_INSN_MODES_H
+#define GCC_INSN_MODES_H
+
+enum machine_mode
+{
+  VOIDmode,/* machmode.def:172 */
+#define HAVE_VOIDmode
+  BLKmode, /* machmode.def:176 */
+#define HAVE_BLKmode
+  CCmode,  /* machmode.def:214 */
+#define HAVE_CCmode
+  CCImode, /* config/ia64/ia64-modes.def:76 */
+#define HAVE_CCImode
+  BImode,  /* machmode.def:179 */
+#define HAVE_BImode
+  QImode,  /* machmode.def:187 */
+#define HAVE_QImode
+  HImode,  /* machmode.def:188 */
+#define HAVE_HImode
+  SImode,  /* machmode.def:189 */
+#define HAVE_SImode
+  DImode,  /* machmode.def:190 */
+#define HAVE_DImode
+  TImode,  /* machmode.def:191 */
+#define HAVE_TImode
+  OImode,  /* config/ia64/ia64-modes.def:68 */
+#define HAVE_OImode
+  QQmode,  /* machmode.def:217 */
+#define HAVE_QQmo

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

2016-06-30 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Jun 30 08:51:06 UTC 2016

Modified Files:
src/sys/arch/hpcmips/dev: plumpcmcia.c

Log Message:
Fix the unused fix


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/hpcmips/dev/plumpcmcia.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/hpcmips/dev/plumpcmcia.c
diff -u src/sys/arch/hpcmips/dev/plumpcmcia.c:1.27 src/sys/arch/hpcmips/dev/plumpcmcia.c:1.28
--- src/sys/arch/hpcmips/dev/plumpcmcia.c:1.27	Wed Mar 26 17:53:36 2014
+++ src/sys/arch/hpcmips/dev/plumpcmcia.c	Thu Jun 30 08:51:06 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: plumpcmcia.c,v 1.27 2014/03/26 17:53:36 christos Exp $ */
+/*	$NetBSD: plumpcmcia.c,v 1.28 2016/06/30 08:51:06 skrll Exp $ */
 
 /*
  * Copyright (c) 1999, 2000 UCHIYAMA Yasushi. All rights reserved.
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: plumpcmcia.c,v 1.27 2014/03/26 17:53:36 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: plumpcmcia.c,v 1.28 2016/06/30 08:51:06 skrll Exp $");
 
 #include 
 #include 
@@ -844,6 +844,7 @@ plum_csc_intr_setup(struct plumpcmcia_so
 	bus_space_tag_t regt = ph->ph_regt;
 	bus_space_handle_t regh = ph->ph_regh;
 	plumreg_t reg;
+	void *ih __diagused;
 	
 	/* enable CARD DETECT ENABLE only */
 	plum_conf_write(regt, regh, PLUM_PCMCIA_CSCINT,
@@ -855,7 +856,7 @@ plum_csc_intr_setup(struct plumpcmcia_so
 	plum_conf_write(regt, regh, PLUM_PCMCIA_GLOBALCTRL, reg);
 	
 	/* install interrupt handler (don't fail) */
-	plum_intr_establish(sc->sc_pc, irq, IST_EDGE, IPL_TTY,
+	ih = plum_intr_establish(sc->sc_pc, irq, IST_EDGE, IPL_TTY,
 	plum_csc_intr, ph);
 	KASSERT(ih != 0);
 }