CVS commit: src/sys/dev/pci

2014-07-28 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Mon Jul 28 06:36:09 UTC 2014

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

Log Message:
Use two different mutexes for tx and rx

This change splits the mutex of wm into two: one for tx and the other
for rx. By doing so, lock contentions can be reduced. We lock both for
other operations that need locking, e.g., init, stop and ioctl.

The modification doesn't change the behavior of the driver.


To generate a diff of this commit:
cvs rdiff -u -r1.282 -r1.283 src/sys/dev/pci/if_wm.c

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

Modified files:

Index: src/sys/dev/pci/if_wm.c
diff -u src/sys/dev/pci/if_wm.c:1.282 src/sys/dev/pci/if_wm.c:1.283
--- src/sys/dev/pci/if_wm.c:1.282	Fri Jul 25 18:28:03 2014
+++ src/sys/dev/pci/if_wm.c	Mon Jul 28 06:36:09 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_wm.c,v 1.282 2014/07/25 18:28:03 msaitoh Exp $	*/
+/*	$NetBSD: if_wm.c,v 1.283 2014/07/28 06:36:09 ozaki-r Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -76,7 +76,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_wm.c,v 1.282 2014/07/25 18:28:03 msaitoh Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_wm.c,v 1.283 2014/07/28 06:36:09 ozaki-r Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -382,13 +382,19 @@ struct wm_softc {
 
 	krndsource_t rnd_source;	/* random source */
 
-	kmutex_t *sc_txrx_lock;		/* lock for tx/rx operations */
-	/* XXX need separation? */
+	kmutex_t *sc_tx_lock;		/* lock for tx operations */
+	kmutex_t *sc_rx_lock;		/* lock for rx operations */
 };
 
-#define WM_LOCK(_sc)	if ((_sc)-sc_txrx_lock) mutex_enter((_sc)-sc_txrx_lock)
-#define WM_UNLOCK(_sc)	if ((_sc)-sc_txrx_lock) mutex_exit((_sc)-sc_txrx_lock)
-#define WM_LOCKED(_sc)	(!(_sc)-sc_txrx_lock || mutex_owned((_sc)-sc_txrx_lock))
+#define WM_TX_LOCK(_sc)		if ((_sc)-sc_tx_lock) mutex_enter((_sc)-sc_tx_lock)
+#define WM_TX_UNLOCK(_sc)	if ((_sc)-sc_tx_lock) mutex_exit((_sc)-sc_tx_lock)
+#define WM_TX_LOCKED(_sc)	(!(_sc)-sc_tx_lock || mutex_owned((_sc)-sc_tx_lock))
+#define WM_RX_LOCK(_sc)		if ((_sc)-sc_rx_lock) mutex_enter((_sc)-sc_rx_lock)
+#define WM_RX_UNLOCK(_sc)	if ((_sc)-sc_rx_lock) mutex_exit((_sc)-sc_rx_lock)
+#define WM_RX_LOCKED(_sc)	(!(_sc)-sc_rx_lock || mutex_owned((_sc)-sc_rx_lock))
+#define WM_BOTH_LOCK(_sc)	do {WM_TX_LOCK(_sc); WM_RX_LOCK(_sc);} while (0)
+#define WM_BOTH_UNLOCK(_sc)	do {WM_RX_UNLOCK(_sc); WM_TX_UNLOCK(_sc);} while (0)
+#define WM_BOTH_LOCKED(_sc)	(WM_TX_LOCKED(_sc)  WM_RX_LOCKED(_sc))
 
 #ifdef WM_MPSAFE
 #define CALLOUT_FLAGS	CALLOUT_MPSAFE
@@ -2159,9 +2165,11 @@ wm_attach(device_t parent, device_t self
 	}
 
 #ifdef WM_MPSAFE
-	sc-sc_txrx_lock = mutex_obj_alloc(MUTEX_DEFAULT, IPL_NET);
+	sc-sc_tx_lock = mutex_obj_alloc(MUTEX_DEFAULT, IPL_NET);
+	sc-sc_rx_lock = mutex_obj_alloc(MUTEX_DEFAULT, IPL_NET);
 #else
-	sc-sc_txrx_lock = NULL;
+	sc-sc_tx_lock = NULL;
+	sc-sc_rx_lock = NULL;
 #endif
 
 	/* Attach the interface. */
@@ -2287,10 +2295,10 @@ wm_detach(device_t self, int flags __unu
 	pmf_device_deregister(self);
 
 	/* Tell the firmware about the release */
-	WM_LOCK(sc);
+	WM_BOTH_LOCK(sc);
 	wm_release_manageability(sc);
 	wm_release_hw_control(sc);
-	WM_UNLOCK(sc);
+	WM_BOTH_UNLOCK(sc);
 
 	mii_detach(sc-sc_mii, MII_PHY_ANY, MII_OFFSET_ANY);
 
@@ -2302,9 +2310,9 @@ wm_detach(device_t self, int flags __unu
 
 
 	/* Unload RX dmamaps and free mbufs */
-	WM_LOCK(sc);
+	WM_RX_LOCK(sc);
 	wm_rxdrain(sc);
-	WM_UNLOCK(sc);
+	WM_RX_UNLOCK(sc);
 	/* Must unlock here */
 
 	/* Free dmamap. It's the same as the end of the wm_attach() function */
@@ -2341,8 +2349,10 @@ wm_detach(device_t self, int flags __unu
 		sc-sc_ios = 0;
 	}
 
-	if (sc-sc_txrx_lock)
-		mutex_obj_free(sc-sc_txrx_lock);
+	if (sc-sc_tx_lock)
+		mutex_obj_free(sc-sc_tx_lock);
+	if (sc-sc_rx_lock)
+		mutex_obj_free(sc-sc_rx_lock);
 
 	return 0;
 }
@@ -2385,9 +2395,9 @@ wm_watchdog(struct ifnet *ifp)
 	 * Since we're using delayed interrupts, sweep up
 	 * before we report an error.
 	 */
-	WM_LOCK(sc);
+	WM_TX_LOCK(sc);
 	wm_txintr(sc);
-	WM_UNLOCK(sc);
+	WM_TX_UNLOCK(sc);
 
 	if (sc-sc_txfree != WM_NTXDESC(sc)) {
 #ifdef WM_DEBUG
@@ -2442,7 +2452,7 @@ wm_tick(void *arg)
 	s = splnet();
 #endif
 
-	WM_LOCK(sc);
+	WM_TX_LOCK(sc);
 
 	if (sc-sc_stopping)
 		goto out;
@@ -2472,7 +2482,7 @@ wm_tick(void *arg)
 		wm_tbi_check_link(sc);
 
 out:
-	WM_UNLOCK(sc);
+	WM_TX_UNLOCK(sc);
 #ifndef WM_MPSAFE
 	splx(s);
 #endif
@@ -2489,7 +2499,7 @@ wm_ifflags_cb(struct ethercom *ec)
 	int change = ifp-if_flags ^ sc-sc_if_flags;
 	int rc = 0;
 
-	WM_LOCK(sc);
+	WM_BOTH_LOCK(sc);
 
 	if (change != 0)
 		sc-sc_if_flags = ifp-if_flags;
@@ -2505,7 +2515,7 @@ wm_ifflags_cb(struct ethercom *ec)
 	wm_set_vlan(sc);
 
 out:
-	WM_UNLOCK(sc);
+	WM_BOTH_UNLOCK(sc);
 
 	return rc;
 }
@@ -2527,7 +2537,7 @@ wm_ioctl(struct ifnet *ifp, u_long cmd, 
 #ifndef WM_MPSAFE
 	s = splnet();
 #endif
-	WM_LOCK(sc);
+	

CVS commit: src/sys/net

2014-07-28 Thread Alexander Nasonov
Module Name:src
Committed By:   alnsn
Date:   Mon Jul 28 07:32:46 UTC 2014

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

Log Message:
Enable net.bpf.jit only if MODULAR and BPFJIT. Tweak a warning about postponed
jit activation.


To generate a diff of this commit:
cvs rdiff -u -r1.185 -r1.186 src/sys/net/bpf.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/bpf.c
diff -u src/sys/net/bpf.c:1.185 src/sys/net/bpf.c:1.186
--- src/sys/net/bpf.c:1.185	Fri Jul 25 08:10:40 2014
+++ src/sys/net/bpf.c	Mon Jul 28 07:32:46 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: bpf.c,v 1.185 2014/07/25 08:10:40 dholland Exp $	*/
+/*	$NetBSD: bpf.c,v 1.186 2014/07/28 07:32:46 alnsn Exp $	*/
 
 /*
  * Copyright (c) 1990, 1991, 1993
@@ -39,7 +39,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: bpf.c,v 1.185 2014/07/25 08:10:40 dholland Exp $);
+__KERNEL_RCSID(0, $NetBSD: bpf.c,v 1.186 2014/07/28 07:32:46 alnsn Exp $);
 
 #if defined(_KERNEL_OPT)
 #include opt_bpf.h
@@ -1928,6 +1928,7 @@ sysctl_net_bpf_maxbufsize(SYSCTLFN_ARGS)
 	return (0);
 }
 
+#if defined(MODULAR) || defined(BPFJIT)
 static int
 sysctl_net_bpf_jit(SYSCTLFN_ARGS)
 {
@@ -1951,12 +1952,13 @@ sysctl_net_bpf_jit(SYSCTLFN_ARGS)
 	membar_sync();
 
 	if (newval  bpfjit_module_ops.bj_generate_code == NULL) {
-		printf(WARNING jit activation is postponed 
+		printf(JIT compilation is postponed 
 		until after bpfjit module is loaded\n);
 	}
 
 	return 0;
 }
+#endif
 
 static int
 sysctl_net_bpf_peers(SYSCTLFN_ARGS)
@@ -2042,12 +2044,14 @@ sysctl_net_bpf_setup(void)
 		   NULL, 0, NULL, 0,
 		   CTL_NET, CTL_CREATE, CTL_EOL);
 	if (node != NULL) {
+#if defined(MODULAR) || defined(BPFJIT)
 		sysctl_createv(bpf_sysctllog, 0, NULL, NULL,
 			CTLFLAG_PERMANENT|CTLFLAG_READWRITE,
 			CTLTYPE_BOOL, jit,
 			SYSCTL_DESCR(Toggle Just-In-Time compilation),
 			sysctl_net_bpf_jit, 0, bpf_jit, 0,
 			CTL_NET, node-sysctl_num, CTL_CREATE, CTL_EOL);
+#endif
 		sysctl_createv(bpf_sysctllog, 0, NULL, NULL,
 			CTLFLAG_PERMANENT|CTLFLAG_READWRITE,
 			CTLTYPE_INT, maxbufsize,



CVS commit: src/lib/libc/sys

2014-07-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jul 28 08:10:23 UTC 2014

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

Log Message:
PR/49045: Tetsuya Isaki: remove remaining caddr_t in ptrace(2)


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/lib/libc/sys/ptrace.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/ptrace.2
diff -u src/lib/libc/sys/ptrace.2:1.35 src/lib/libc/sys/ptrace.2:1.36
--- src/lib/libc/sys/ptrace.2:1.35	Wed Aug 31 19:04:33 2011
+++ src/lib/libc/sys/ptrace.2	Mon Jul 28 04:10:23 2014
@@ -1,7 +1,7 @@
-.\	$NetBSD: ptrace.2,v 1.35 2011/08/31 23:04:33 jmcneill Exp $
+.\	$NetBSD: ptrace.2,v 1.36 2014/07/28 08:10:23 christos Exp $
 .\
 .\ This file is in the public domain.
-.Dd August 31, 2011
+.Dd July 28, 2014
 .Dt PTRACE 2
 .Os
 .Sh NAME
@@ -110,7 +110,7 @@ argument supplies the value to be writte
 .\ .Fa addr
 .\ argument specifies the location of the int relative to the base of the
 .\ user structure; it will usually be an integer value cast to
-.\ .Li caddr_t
+.\ .Li void *
 .\ either explicitly or via the presence of a prototype for
 .\ .Eo \
 .\ .Fn ptrace
@@ -145,7 +145,7 @@ The traced process continues execution.
 .Fa addr
 is an address specifying the place where execution is to be resumed (a
 new value for the program counter), or
-.Li (caddr_t)1
+.Li (void *)1
 to indicate that execution is to pick up where it left off.
 .Fa data
 provides a signal number to be delivered to the traced process as it
@@ -588,7 +588,7 @@ Using
 and
 .Dv PT_SETREGS
 to modify the PC, passing
-.Li (caddr_t)1
+.Li (void *)1
 to
 .Eo \
 .Fn ptrace



CVS commit: src/external/cddl/osnet/dist/uts/common/fs/zfs

2014-07-28 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Mon Jul 28 10:01:23 UTC 2014

Modified Files:
src/external/cddl/osnet/dist/uts/common/fs/zfs: zvol.c

Log Message:
SPEC_MAXOFFSET_T doesn't exist anywhere else, so don't use it here
either.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 \
src/external/cddl/osnet/dist/uts/common/fs/zfs/zvol.c

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

Modified files:

Index: src/external/cddl/osnet/dist/uts/common/fs/zfs/zvol.c
diff -u src/external/cddl/osnet/dist/uts/common/fs/zfs/zvol.c:1.5 src/external/cddl/osnet/dist/uts/common/fs/zfs/zvol.c:1.6
--- src/external/cddl/osnet/dist/uts/common/fs/zfs/zvol.c:1.5	Thu Mar 27 15:50:48 2014
+++ src/external/cddl/osnet/dist/uts/common/fs/zfs/zvol.c	Mon Jul 28 10:01:23 2014
@@ -189,10 +189,12 @@ zvol_check_volsize(uint64_t volsize, uin
 	if (volsize % blocksize != 0)
 		return (EINVAL);
 
+#if 0
 #ifdef _ILP32
 	if (volsize - 1  SPEC_MAXOFFSET_T)
 		return (EOVERFLOW);
 #endif
+#endif
 	return (0);
 }
 



CVS commit: src/sys/rump/net/lib/libsockin

2014-07-28 Thread Tyler R. Retzlaff
Module Name:src
Committed By:   rtr
Date:   Mon Jul 28 10:09:51 UTC 2014

Modified Files:
src/sys/rump/net/lib/libsockin: sockin.c

Log Message:
add missing KASSERT()s at the top of sockin_usrreq(), req shall not be
either of these operations.

   KASSERT(req != PRU_BIND);
   KASSERT(req != PRU_LISTEN);


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/sys/rump/net/lib/libsockin/sockin.c

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

Modified files:

Index: src/sys/rump/net/lib/libsockin/sockin.c
diff -u src/sys/rump/net/lib/libsockin/sockin.c:1.51 src/sys/rump/net/lib/libsockin/sockin.c:1.52
--- src/sys/rump/net/lib/libsockin/sockin.c:1.51	Thu Jul 24 15:12:03 2014
+++ src/sys/rump/net/lib/libsockin/sockin.c	Mon Jul 28 10:09:51 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: sockin.c,v 1.51 2014/07/24 15:12:03 rtr Exp $	*/
+/*	$NetBSD: sockin.c,v 1.52 2014/07/28 10:09:51 rtr Exp $	*/
 
 /*
  * Copyright (c) 2008, 2009 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: sockin.c,v 1.51 2014/07/24 15:12:03 rtr Exp $);
+__KERNEL_RCSID(0, $NetBSD: sockin.c,v 1.52 2014/07/28 10:09:51 rtr Exp $);
 
 #include sys/param.h
 #include sys/condvar.h
@@ -558,6 +558,8 @@ sockin_usrreq(struct socket *so, int req
 	int error = 0;
 
 	KASSERT(req != PRU_ACCEPT);
+	KASSERT(req != PRU_BIND);
+	KASSERT(req != PRU_LISTEN);
 	KASSERT(req != PRU_CONTROL);
 	KASSERT(req != PRU_SENSE);
 	KASSERT(req != PRU_PEERADDR);



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

2014-07-28 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Mon Jul 28 11:22:46 UTC 2014

Modified Files:
src/sys/arch/i386/include: int_fmtio.h int_mwgwtypes.h

Log Message:
GCC sets up u?int_fast8_t to be int, so be consistent with it.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/i386/include/int_fmtio.h
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/i386/include/int_mwgwtypes.h

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

Modified files:

Index: src/sys/arch/i386/include/int_fmtio.h
diff -u src/sys/arch/i386/include/int_fmtio.h:1.8 src/sys/arch/i386/include/int_fmtio.h:1.9
--- src/sys/arch/i386/include/int_fmtio.h:1.8	Fri Jul 25 21:43:13 2014
+++ src/sys/arch/i386/include/int_fmtio.h	Mon Jul 28 11:22:46 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: int_fmtio.h,v 1.8 2014/07/25 21:43:13 joerg Exp $	*/
+/*	$NetBSD: int_fmtio.h,v 1.9 2014/07/28 11:22:46 joerg Exp $	*/
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -144,7 +144,7 @@
 #define	SCNdLEAST16	hd	/* int_least16_t	*/
 #define	SCNdLEAST32	d	/* int_least32_t	*/
 #define	SCNdLEAST64	lld	/* int_least64_t	*/
-#define	SCNdFAST8	hhd	/* int_fast8_t		*/
+#define	SCNdFAST8	d	/* int_fast8_t		*/
 #define	SCNdFAST16	d	/* int_fast16_t		*/
 #define	SCNdFAST32	d	/* int_fast32_t		*/
 #define	SCNdFAST64	lld	/* int_fast64_t		*/
@@ -159,7 +159,7 @@
 #define	SCNiLEAST16	hi	/* int_least16_t	*/
 #define	SCNiLEAST32	i	/* int_least32_t	*/
 #define	SCNiLEAST64	lli	/* int_least64_t	*/
-#define	SCNiFAST8	hhi	/* int_fast8_t		*/
+#define	SCNiFAST8	i	/* int_fast8_t		*/
 #define	SCNiFAST16	i	/* int_fast16_t		*/
 #define	SCNiFAST32	i	/* int_fast32_t		*/
 #define	SCNiFAST64	lli	/* int_fast64_t		*/
@@ -176,7 +176,7 @@
 #define	SCNoLEAST16	ho	/* uint_least16_t	*/
 #define	SCNoLEAST32	o	/* uint_least32_t	*/
 #define	SCNoLEAST64	llo	/* uint_least64_t	*/
-#define	SCNoFAST8	hho	/* uint_fast8_t		*/
+#define	SCNoFAST8	o	/* uint_fast8_t		*/
 #define	SCNoFAST16	o	/* uint_fast16_t	*/
 #define	SCNoFAST32	o	/* uint_fast32_t	*/
 #define	SCNoFAST64	llo	/* uint_fast64_t	*/
@@ -191,7 +191,7 @@
 #define	SCNuLEAST16	hu	/* uint_least16_t	*/
 #define	SCNuLEAST32	u	/* uint_least32_t	*/
 #define	SCNuLEAST64	llu	/* uint_least64_t	*/
-#define	SCNuFAST8	hhu	/* uint_fast8_t		*/
+#define	SCNuFAST8	u	/* uint_fast8_t		*/
 #define	SCNuFAST16	u	/* uint_fast16_t	*/
 #define	SCNuFAST32	u	/* uint_fast32_t	*/
 #define	SCNuFAST64	llu	/* uint_fast64_t	*/
@@ -206,7 +206,7 @@
 #define	SCNxLEAST16	hx	/* uint_least16_t	*/
 #define	SCNxLEAST32	x	/* uint_least32_t	*/
 #define	SCNxLEAST64	llx	/* uint_least64_t	*/
-#define	SCNxFAST8	hhx	/* uint_fast8_t		*/
+#define	SCNxFAST8	x	/* uint_fast8_t		*/
 #define	SCNxFAST16	x	/* uint_fast16_t	*/
 #define	SCNxFAST32	x	/* uint_fast32_t	*/
 #define	SCNxFAST64	llx	/* uint_fast64_t	*/

Index: src/sys/arch/i386/include/int_mwgwtypes.h
diff -u src/sys/arch/i386/include/int_mwgwtypes.h:1.7 src/sys/arch/i386/include/int_mwgwtypes.h:1.8
--- src/sys/arch/i386/include/int_mwgwtypes.h:1.7	Fri Jul 25 21:43:13 2014
+++ src/sys/arch/i386/include/int_mwgwtypes.h	Mon Jul 28 11:22:46 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: int_mwgwtypes.h,v 1.7 2014/07/25 21:43:13 joerg Exp $	*/
+/*	$NetBSD: int_mwgwtypes.h,v 1.8 2014/07/28 11:22:46 joerg Exp $	*/
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -60,8 +60,8 @@ typedef	unsigned long long int	uint_leas
 
 /* 7.18.1.3 Fastest minimum-width integer types */
 
-typedef	signed char		   int_fast8_t;
-typedef	unsigned char		  uint_fast8_t;
+typedef	int			   int_fast8_t;
+typedef	unsigned int		  uint_fast8_t;
 typedef	int			  int_fast16_t;
 typedef	unsigned int		 uint_fast16_t;
 typedef	int			  int_fast32_t;



CVS commit: src/sys/external/bsd/drm2/dist/drm/radeon

2014-07-28 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon Jul 28 12:59:39 UTC 2014

Modified Files:
src/sys/external/bsd/drm2/dist/drm/radeon: radeon_fence.c

Log Message:
Take rdev-fence_lock around the wakeup.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/sys/external/bsd/drm2/dist/drm/radeon/radeon_fence.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/external/bsd/drm2/dist/drm/radeon/radeon_fence.c
diff -u src/sys/external/bsd/drm2/dist/drm/radeon/radeon_fence.c:1.2 src/sys/external/bsd/drm2/dist/drm/radeon/radeon_fence.c:1.3
--- src/sys/external/bsd/drm2/dist/drm/radeon/radeon_fence.c:1.2	Wed Jul 16 20:59:57 2014
+++ src/sys/external/bsd/drm2/dist/drm/radeon/radeon_fence.c	Mon Jul 28 12:59:39 2014
@@ -192,7 +192,11 @@ void radeon_fence_process(struct radeon_
 
 	if (wake)
 #ifdef __NetBSD__
+	{
+		spin_lock(rdev-fence_lock);
 		DRM_SPIN_WAKEUP_ALL(rdev-fence_queue, rdev-fence_lock);
+		spin_unlock(rdev-fence_lock);
+	}
 #else
 		wake_up_all(rdev-fence_queue);
 #endif



CVS commit: src/sys/net

2014-07-28 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Mon Jul 28 14:24:48 UTC 2014

Modified Files:
src/sys/net: if.c if_ether.h if_ethersubr.c

Log Message:
Add a mutex for global variables of if_ethersubr.c

To initialize the mutex, we introduce etherinit that is called from ifinit1.


To generate a diff of this commit:
cvs rdiff -u -r1.285 -r1.286 src/sys/net/if.c
cvs rdiff -u -r1.63 -r1.64 src/sys/net/if_ether.h
cvs rdiff -u -r1.202 -r1.203 src/sys/net/if_ethersubr.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.285 src/sys/net/if.c:1.286
--- src/sys/net/if.c:1.285	Tue Jul  1 10:16:02 2014
+++ src/sys/net/if.c	Mon Jul 28 14:24:48 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: if.c,v 1.285 2014/07/01 10:16:02 ozaki-r Exp $	*/
+/*	$NetBSD: if.c,v 1.286 2014/07/28 14:24:48 ozaki-r Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2008 The NetBSD Foundation, Inc.
@@ -90,7 +90,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if.c,v 1.285 2014/07/01 10:16:02 ozaki-r Exp $);
+__KERNEL_RCSID(0, $NetBSD: if.c,v 1.286 2014/07/28 14:24:48 ozaki-r Exp $);
 
 #include opt_inet.h
 
@@ -252,6 +252,8 @@ ifinit1(void)
 
 	if_pfil = pfil_head_create(PFIL_TYPE_IFNET, NULL);
 	KASSERT(if_pfil != NULL);
+
+	etherinit();
 }
 
 ifnet_t *

Index: src/sys/net/if_ether.h
diff -u src/sys/net/if_ether.h:1.63 src/sys/net/if_ether.h:1.64
--- src/sys/net/if_ether.h:1.63	Tue Jun 10 09:38:30 2014
+++ src/sys/net/if_ether.h	Mon Jul 28 14:24:48 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_ether.h,v 1.63 2014/06/10 09:38:30 joerg Exp $	*/
+/*	$NetBSD: if_ether.h,v 1.64 2014/07/28 14:24:48 ozaki-r Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1993
@@ -324,6 +324,7 @@ vlan_input_tag(struct ifnet *ifp, struct
 /* test if any VLAN is configured for this interface */
 #define VLAN_ATTACHED(ec)	((ec)-ec_nvlans  0)
 
+void	etherinit(void);
 void	ether_ifattach(struct ifnet *, const uint8_t *);
 void	ether_ifdetach(struct ifnet *);
 int	ether_mediachange(struct ifnet *);

Index: src/sys/net/if_ethersubr.c
diff -u src/sys/net/if_ethersubr.c:1.202 src/sys/net/if_ethersubr.c:1.203
--- src/sys/net/if_ethersubr.c:1.202	Mon Jun 30 10:03:41 2014
+++ src/sys/net/if_ethersubr.c	Mon Jul 28 14:24:48 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_ethersubr.c,v 1.202 2014/06/30 10:03:41 ozaki-r Exp $	*/
+/*	$NetBSD: if_ethersubr.c,v 1.203 2014/07/28 14:24:48 ozaki-r Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -61,7 +61,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_ethersubr.c,v 1.202 2014/06/30 10:03:41 ozaki-r Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_ethersubr.c,v 1.203 2014/07/28 14:24:48 ozaki-r Exp $);
 
 #include opt_inet.h
 #include opt_atalk.h
@@ -175,6 +175,7 @@ extern u_char	aarp_org_code[3];
 static struct timeval bigpktppslim_last;
 static int bigpktppslim = 2;	/* XXX */
 static int bigpktpps_count;
+static kmutex_t bigpktpps_lock __cacheline_aligned;
 
 
 const uint8_t etherbroadcastaddr[ETHER_ADDR_LEN] =
@@ -603,11 +604,13 @@ ether_input(struct ifnet *ifp, struct mb
 	 */
 	if (etype != ETHERTYPE_MPLS  m-m_pkthdr.len 
 	ETHER_MAX_FRAME(ifp, etype, m-m_flags  M_HASFCS)) {
+		mutex_enter(bigpktpps_lock);
 		if (ppsratecheck(bigpktppslim_last, bigpktpps_count,
 			bigpktppslim)) {
 			printf(%s: discarding oversize frame (len=%d)\n,
 			ifp-if_xname, m-m_pkthdr.len);
 		}
+		mutex_exit(bigpktpps_lock);
 		m_freem(m);
 		return;
 	}
@@ -1532,3 +1535,9 @@ SYSCTL_SETUP(sysctl_net_ether_setup, sy
 		   ether_multicast_sysctl, 0, NULL, 0,
 		   CTL_CREATE, CTL_EOL);
 }
+
+void
+etherinit(void)
+{
+	mutex_init(bigpktpps_lock, MUTEX_DEFAULT, IPL_NET);
+}



CVS commit: src/libexec/ld.elf_so/arch/powerpc

2014-07-28 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Jul 28 17:28:13 UTC 2014

Modified Files:
src/libexec/ld.elf_so/arch/powerpc: ppc_reloc.c

Log Message:
Fix parenthesis on __ha macro


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/libexec/ld.elf_so/arch/powerpc/ppc_reloc.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/ld.elf_so/arch/powerpc/ppc_reloc.c
diff -u src/libexec/ld.elf_so/arch/powerpc/ppc_reloc.c:1.51 src/libexec/ld.elf_so/arch/powerpc/ppc_reloc.c:1.52
--- src/libexec/ld.elf_so/arch/powerpc/ppc_reloc.c:1.51	Thu Mar  6 19:19:40 2014
+++ src/libexec/ld.elf_so/arch/powerpc/ppc_reloc.c	Mon Jul 28 17:28:13 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: ppc_reloc.c,v 1.51 2014/03/06 19:19:40 matt Exp $	*/
+/*	$NetBSD: ppc_reloc.c,v 1.52 2014/07/28 17:28:13 matt Exp $	*/
 
 /*-
  * Copyright (C) 1998	Tsubai Masanari
@@ -30,7 +30,7 @@
 
 #include sys/cdefs.h
 #ifndef lint
-__RCSID($NetBSD: ppc_reloc.c,v 1.51 2014/03/06 19:19:40 matt Exp $);
+__RCSID($NetBSD: ppc_reloc.c,v 1.52 2014/07/28 17:28:13 matt Exp $);
 #endif /* not lint */
 
 #include stdarg.h
@@ -51,7 +51,7 @@ void _rtld_powerpc_pltresolve(Elf_Word, 
 #define __ha48		__u64(0x8000)
 #define __ha32		__u64(0x8000)
 #define __ha16		__u32(0x8000)
-#define __ha(x,n) x)  (n)) + ((x)  __ha##n) == __ha##n)  0x)
+#define __ha(x,n) x)  (n)) + (((x)  __ha##n) == __ha##n))  0x)
 #define __hi(x,n) (((x)  (n))  0x)
 #ifdef __LP64
 #define highesta(x)	__ha(__u64(x), 48)



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

2014-07-28 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Jul 28 20:18:54 UTC 2014

Modified Files:
src/external/gpl3/gcc/dist/gcc: config.gcc

Log Message:
rs6000/sysv.h must be after netbsd.h so we use the ppc CC1_SPEC


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/external/gpl3/gcc/dist/gcc/config.gcc

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/gcc/config.gcc
diff -u src/external/gpl3/gcc/dist/gcc/config.gcc:1.24 src/external/gpl3/gcc/dist/gcc/config.gcc:1.25
--- src/external/gpl3/gcc/dist/gcc/config.gcc:1.24	Tue May 27 09:18:54 2014
+++ src/external/gpl3/gcc/dist/gcc/config.gcc	Mon Jul 28 20:18:54 2014
@@ -2115,7 +2115,7 @@ powerpc*-*-freebsd*)
 	esac
 	;;
 powerpc*-*-netbsd*)
-	tm_file=${tm_file} dbxelf.h elfos.h freebsd-spec.h rs6000/sysv4.h
+	tm_file=${tm_file} dbxelf.h elfos.h freebsd-spec.h
 	tm_file=${tm_file} netbsd.h netbsd-elf.h
 	case ${target} in
 	  powerpc64*)
@@ -2127,6 +2127,7 @@ powerpc*-*-netbsd*)
 	tmake_file=${tmake_file} rs6000/t-netbsd
 	;;
 	esac
+	tm_file=${tm_file} rs6000/sysv4.h
 	extra_options=${extra_options} netbsd.opt netbsd-elf.opt
 	if test x${enable_secureplt} != xno; then
 	  tm_file=rs6000/secureplt.h ${tm_file}



CVS commit: src/external/gpl3/gcc

2014-07-28 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Jul 28 22:12:16 UTC 2014

Modified Files:
src/external/gpl3/gcc: README.gcc48

Log Message:
update for reality.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/gpl3/gcc/README.gcc48

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/README.gcc48
diff -u src/external/gpl3/gcc/README.gcc48:1.4 src/external/gpl3/gcc/README.gcc48:1.5
--- src/external/gpl3/gcc/README.gcc48:1.4	Mon Mar 10 19:55:51 2014
+++ src/external/gpl3/gcc/README.gcc48	Mon Jul 28 22:12:16 2014
@@ -1,4 +1,4 @@
-$Id: README.gcc48,v 1.4 2014/03/10 19:55:51 mrg Exp $
+$Id: README.gcc48,v 1.5 2014/07/28 22:12:16 mrg Exp $
 
 usr.bin:
 	note:
@@ -27,31 +27,17 @@ arch/feature list.  anything not here ha
 architecture	tools	kernels	libgcc	native-gcc	make release	runs	atf
 	-	---	--	--			---
 coldfire	yes	N/A[9]	yes	yes		yes[7]		?	?
-i386		yes	yes	yes	yes		yes		yes
-ia64		yes	?	yes[6]	yes		no[6]
 m68000		yes	?	yes	no[3]		
 m68k		yes	yes	yes	yes		no[7]
-mips64eb	yes	yes[5]	yes	yes		
-mips64el	yes	yes	yes	yes		yes[8]		no
-mipseb		yes	yes[5]	yes	yes		yes
-mipsel		yes	yes	yes	yes		yes		yes	no[2]
 powerpc		yes	yes[1]	yes	yes		yes		yes	yes
 powerpc64	yes[4]
-sh3eb		yes	?	yes	yes		no[7]
-sh3el		yes	?	yes	yes		no[7]
-vax		yes	yes	yes	yes		no[7]
-x86_64		yes	yes	yes	yes		yes		?
 
 [1] ofppc/pegasos has issues with symtab loading.
 sandpoint works fine in multi-user, found an annoyance by com(4) change.
-[2] weird failures.
 [3] relocations fail in libgcc
 [4] cc1 gets segv compiling libgcc.
-[5] mips*eb kernels seem to work as well as gcc 4.5 ones.
-[6] ia64 port is missing libc, libkvm and more support.  libgcc has some uncommited hacks.
 [7] m68k/vax/sh3 gcc seem to randomly get -fstack-protector/-Wstack-protector
 wrong, for example m68k flags alarm() as unprotected in
 libc/gen/alarm.c:53, vax ifinit() in sbin/routed/if.c:680.
-   -- hacked around
-[8] LOONGSON kernel has general problems
+   -- hacked around, now fixed?
 [9] no kernels in evbcf port yet



CVS commit: src

2014-07-28 Thread Robert Swindells
Module Name:src
Committed By:   rjs
Date:   Mon Jul 28 23:09:06 UTC 2014

Modified Files:
src/distrib/sets/lists/base: mi
src/sys/dev/microcode/radeon: CEDAR_rlc.bin CYPRESS_rlc.bin
JUNIPER_rlc.bin LICENSE.radeon Makefile R700_rlc.bin
REDWOOD_rlc.bin
Added Files:
src/sys/dev/microcode/radeon: ARUBA_me.bin ARUBA_pfp.bin ARUBA_rlc.bin
BARTS_mc.bin BARTS_me.bin BARTS_pfp.bin BARTS_smc.bin
BONAIRE_ce.bin BONAIRE_mc.bin BONAIRE_mc2.bin BONAIRE_me.bin
BONAIRE_mec.bin BONAIRE_pfp.bin BONAIRE_rlc.bin BONAIRE_sdma.bin
BONAIRE_smc.bin BONAIRE_uvd.bin BONAIRE_vce.bin BTC_rlc.bin
CAICOS_mc.bin CAICOS_me.bin CAICOS_pfp.bin CAICOS_smc.bin
CAYMAN_mc.bin CAYMAN_me.bin CAYMAN_pfp.bin CAYMAN_rlc.bin
CAYMAN_smc.bin CEDAR_smc.bin CYPRESS_smc.bin HAINAN_ce.bin
HAINAN_mc.bin HAINAN_mc2.bin HAINAN_me.bin HAINAN_pfp.bin
HAINAN_rlc.bin HAINAN_smc.bin HAWAII_ce.bin HAWAII_mc.bin
HAWAII_mc2.bin HAWAII_me.bin HAWAII_mec.bin HAWAII_pfp.bin
HAWAII_rlc.bin HAWAII_sdma.bin HAWAII_smc.bin JUNIPER_smc.bin
KABINI_ce.bin KABINI_me.bin KABINI_mec.bin KABINI_pfp.bin
KABINI_rlc.bin KABINI_sdma.bin KAVERI_ce.bin KAVERI_me.bin
KAVERI_mec.bin KAVERI_pfp.bin KAVERI_rlc.bin KAVERI_sdma.bin
MULLINS_ce.bin MULLINS_me.bin MULLINS_mec.bin MULLINS_pfp.bin
MULLINS_rlc.bin MULLINS_sdma.bin OLAND_ce.bin OLAND_mc.bin
OLAND_mc2.bin OLAND_me.bin OLAND_pfp.bin OLAND_rlc.bin
OLAND_smc.bin PALM_me.bin PALM_pfp.bin PITCAIRN_ce.bin
PITCAIRN_mc.bin PITCAIRN_mc2.bin PITCAIRN_me.bin PITCAIRN_pfp.bin
PITCAIRN_rlc.bin PITCAIRN_smc.bin REDWOOD_smc.bin RV710_smc.bin
RV710_uvd.bin RV730_smc.bin RV740_smc.bin RV770_smc.bin
SUMO2_me.bin SUMO2_pfp.bin SUMO_me.bin SUMO_pfp.bin SUMO_rlc.bin
SUMO_uvd.bin TAHITI_ce.bin TAHITI_mc.bin TAHITI_mc2.bin
TAHITI_me.bin TAHITI_pfp.bin TAHITI_rlc.bin TAHITI_smc.bin
TAHITI_uvd.bin TURKS_mc.bin TURKS_me.bin TURKS_pfp.bin
TURKS_smc.bin VERDE_ce.bin VERDE_mc.bin VERDE_mc2.bin VERDE_me.bin
VERDE_pfp.bin VERDE_rlc.bin VERDE_smc.bin

Log Message:
Update radeon microcode.


To generate a diff of this commit:
cvs rdiff -u -r1.1077 -r1.1078 src/distrib/sets/lists/base/mi
cvs rdiff -u -r0 -r1.1 src/sys/dev/microcode/radeon/ARUBA_me.bin \
src/sys/dev/microcode/radeon/ARUBA_pfp.bin \
src/sys/dev/microcode/radeon/ARUBA_rlc.bin \
src/sys/dev/microcode/radeon/BARTS_mc.bin \
src/sys/dev/microcode/radeon/BARTS_me.bin \
src/sys/dev/microcode/radeon/BARTS_pfp.bin \
src/sys/dev/microcode/radeon/BARTS_smc.bin \
src/sys/dev/microcode/radeon/BONAIRE_ce.bin \
src/sys/dev/microcode/radeon/BONAIRE_mc.bin \
src/sys/dev/microcode/radeon/BONAIRE_mc2.bin \
src/sys/dev/microcode/radeon/BONAIRE_me.bin \
src/sys/dev/microcode/radeon/BONAIRE_mec.bin \
src/sys/dev/microcode/radeon/BONAIRE_pfp.bin \
src/sys/dev/microcode/radeon/BONAIRE_rlc.bin \
src/sys/dev/microcode/radeon/BONAIRE_sdma.bin \
src/sys/dev/microcode/radeon/BONAIRE_smc.bin \
src/sys/dev/microcode/radeon/BONAIRE_uvd.bin \
src/sys/dev/microcode/radeon/BONAIRE_vce.bin \
src/sys/dev/microcode/radeon/BTC_rlc.bin \
src/sys/dev/microcode/radeon/CAICOS_mc.bin \
src/sys/dev/microcode/radeon/CAICOS_me.bin \
src/sys/dev/microcode/radeon/CAICOS_pfp.bin \
src/sys/dev/microcode/radeon/CAICOS_smc.bin \
src/sys/dev/microcode/radeon/CAYMAN_mc.bin \
src/sys/dev/microcode/radeon/CAYMAN_me.bin \
src/sys/dev/microcode/radeon/CAYMAN_pfp.bin \
src/sys/dev/microcode/radeon/CAYMAN_rlc.bin \
src/sys/dev/microcode/radeon/CAYMAN_smc.bin \
src/sys/dev/microcode/radeon/CEDAR_smc.bin \
src/sys/dev/microcode/radeon/CYPRESS_smc.bin \
src/sys/dev/microcode/radeon/HAINAN_ce.bin \
src/sys/dev/microcode/radeon/HAINAN_mc.bin \
src/sys/dev/microcode/radeon/HAINAN_mc2.bin \
src/sys/dev/microcode/radeon/HAINAN_me.bin \
src/sys/dev/microcode/radeon/HAINAN_pfp.bin \
src/sys/dev/microcode/radeon/HAINAN_rlc.bin \
src/sys/dev/microcode/radeon/HAINAN_smc.bin \
src/sys/dev/microcode/radeon/HAWAII_ce.bin \
src/sys/dev/microcode/radeon/HAWAII_mc.bin \
src/sys/dev/microcode/radeon/HAWAII_mc2.bin \
src/sys/dev/microcode/radeon/HAWAII_me.bin \
src/sys/dev/microcode/radeon/HAWAII_mec.bin \
src/sys/dev/microcode/radeon/HAWAII_pfp.bin \
src/sys/dev/microcode/radeon/HAWAII_rlc.bin \
src/sys/dev/microcode/radeon/HAWAII_sdma.bin \
src/sys/dev/microcode/radeon/HAWAII_smc.bin \
src/sys/dev/microcode/radeon/JUNIPER_smc.bin \
src/sys/dev/microcode/radeon/KABINI_ce.bin \
src/sys/dev/microcode/radeon/KABINI_me.bin \
src/sys/dev/microcode/radeon/KABINI_mec.bin \

CVS commit: src/sys/net

2014-07-28 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Tue Jul 29 01:35:44 UTC 2014

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

Log Message:
Use if_free instead of free


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/sys/net/if_faith.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_faith.c
diff -u src/sys/net/if_faith.c:1.49 src/sys/net/if_faith.c:1.50
--- src/sys/net/if_faith.c:1.49	Fri Jun  6 01:02:47 2014
+++ src/sys/net/if_faith.c	Tue Jul 29 01:35:44 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_faith.c,v 1.49 2014/06/06 01:02:47 rmind Exp $	*/
+/*	$NetBSD: if_faith.c,v 1.50 2014/07/29 01:35:44 ozaki-r Exp $	*/
 /*	$KAME: if_faith.c,v 1.21 2001/02/20 07:59:26 itojun Exp $	*/
 
 /*
@@ -40,7 +40,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_faith.c,v 1.49 2014/06/06 01:02:47 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_faith.c,v 1.50 2014/07/29 01:35:44 ozaki-r Exp $);
 
 #include opt_inet.h
 
@@ -136,7 +136,7 @@ faith_clone_destroy(struct ifnet *ifp)
 
 	bpf_detach(ifp);
 	if_detach(ifp);
-	free(ifp, M_DEVBUF);
+	if_free(ifp);
 
 	return (0);
 }



CVS commit: src/sys/net

2014-07-28 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Tue Jul 29 05:56:59 UTC 2014

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

Log Message:
Use IFADDR_FOREACH


To generate a diff of this commit:
cvs rdiff -u -r1.286 -r1.287 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.286 src/sys/net/if.c:1.287
--- src/sys/net/if.c:1.286	Mon Jul 28 14:24:48 2014
+++ src/sys/net/if.c	Tue Jul 29 05:56:58 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: if.c,v 1.286 2014/07/28 14:24:48 ozaki-r Exp $	*/
+/*	$NetBSD: if.c,v 1.287 2014/07/29 05:56:58 ozaki-r Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2008 The NetBSD Foundation, Inc.
@@ -90,7 +90,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if.c,v 1.286 2014/07/28 14:24:48 ozaki-r Exp $);
+__KERNEL_RCSID(0, $NetBSD: if.c,v 1.287 2014/07/29 05:56:58 ozaki-r Exp $);
 
 #include opt_inet.h
 
@@ -690,10 +690,9 @@ if_deactivate(struct ifnet *ifp)
 void
 if_purgeaddrs(struct ifnet *ifp, int family, void (*purgeaddr)(struct ifaddr *))
 {
-	struct ifaddr *ifa, *nifa;
+	struct ifaddr *ifa;
 
-	for (ifa = IFADDR_FIRST(ifp); ifa != NULL; ifa = nifa) {
-		nifa = IFADDR_NEXT(ifa);
+	IFADDR_FOREACH(ifa, ifp) {
 		if (ifa-ifa_addr-sa_family != family)
 			continue;
 		(*purgeaddr)(ifa);