CVS commit: src/sys/netinet6

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

Modified Files:
src/sys/netinet6: in6.c nd6_nbr.c

Log Message:
Stop using callout randomly

nd6_dad_start uses callout when xtick  0 while doesn't when
xtick == 0. So if we pass a random value ranging from 0 to N,
nd6_dad_start uses callout randomly. This behavior makes
debugging difficult.

Discussed in http://mail-index.netbsd.org/tech-kern/2014/06/25/msg017278.html


To generate a diff of this commit:
cvs rdiff -u -r1.172 -r1.173 src/sys/netinet6/in6.c
cvs rdiff -u -r1.99 -r1.100 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/netinet6/in6.c
diff -u src/sys/netinet6/in6.c:1.172 src/sys/netinet6/in6.c:1.173
--- src/sys/netinet6/in6.c:1.172	Tue Jul  1 05:49:19 2014
+++ src/sys/netinet6/in6.c	Tue Jul  1 07:51:29 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: in6.c,v 1.172 2014/07/01 05:49:19 rtr Exp $	*/
+/*	$NetBSD: in6.c,v 1.173 2014/07/01 07:51:29 ozaki-r Exp $	*/
 /*	$KAME: in6.c,v 1.198 2001/07/18 09:12:38 itojun Exp $	*/
 
 /*
@@ -62,7 +62,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: in6.c,v 1.172 2014/07/01 05:49:19 rtr Exp $);
+__KERNEL_RCSID(0, $NetBSD: in6.c,v 1.173 2014/07/01 07:51:29 ozaki-r Exp $);
 
 #include opt_inet.h
 #include opt_compat_netbsd.h
@@ -1331,7 +1331,8 @@ in6_update_ifa1(struct ifnet *ifp, struc
 mindelay;
 			}
 		}
-		nd6_dad_start(ia-ia_ifa, dad_delay);
+		/* +1 ensures callout is always used */
+		nd6_dad_start(ia-ia_ifa, dad_delay + 1);
 	}
 
 	return error;
@@ -2155,15 +2156,17 @@ in6_if_link_up(struct ifnet *ifp)
 		}
 
 		if (ia-ia6_flags  IN6_IFF_TENTATIVE) {
+			int delay;
 			/*
 			 * The TENTATIVE flag was likely set by hand
 			 * beforehand, implicitly indicating the need for DAD.
 			 * We may be able to skip the random delay in this
 			 * case, but we impose delays just in case.
 			 */
-			nd6_dad_start(ifa,
-			cprng_fast32() %
-(MAX_RTR_SOLICITATION_DELAY * hz));
+			delay = cprng_fast32() %
+			(MAX_RTR_SOLICITATION_DELAY * hz);
+			/* +1 ensures callout is always used */
+			nd6_dad_start(ifa, delay + 1);
 		}
 	}
 

Index: src/sys/netinet6/nd6_nbr.c
diff -u src/sys/netinet6/nd6_nbr.c:1.99 src/sys/netinet6/nd6_nbr.c:1.100
--- src/sys/netinet6/nd6_nbr.c:1.99	Mon Jan 13 18:23:36 2014
+++ src/sys/netinet6/nd6_nbr.c	Tue Jul  1 07:51:29 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: nd6_nbr.c,v 1.99 2014/01/13 18:23:36 roy Exp $	*/
+/*	$NetBSD: nd6_nbr.c,v 1.100 2014/07/01 07:51:29 ozaki-r Exp $	*/
 /*	$KAME: nd6_nbr.c,v 1.61 2001/02/10 16:06:14 jinmei Exp $	*/
 
 /*
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: nd6_nbr.c,v 1.99 2014/01/13 18:23:36 roy Exp $);
+__KERNEL_RCSID(0, $NetBSD: nd6_nbr.c,v 1.100 2014/07/01 07:51:29 ozaki-r Exp $);
 
 #include opt_inet.h
 #include opt_ipsec.h
@@ -1097,6 +1097,8 @@ nd6_newaddrmsg(struct ifaddr *ifa)
 /*
  * Start Duplicate Address Detection (DAD) for specified interface address.
  *
+ * Note that callout is used when xtick  0 and not when xtick == 0.
+ *
  * xtick: minimum delay ticks for IFF_UP event
  */
 void



CVS commit: src/sys

2014-07-01 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Tue Jul  1 10:16:02 UTC 2014

Modified Files:
src/sys/altq: if_altq.h
src/sys/net: if.c if.h

Log Message:
Lock IFQ operations when NET_MPSAFE

- Introduce NET_MPSAFE
  - not defined by default
- Add ifq_lock to protect ifnet#if_snd
- Initialize ifq_lock and lock IFQ operations
  when NET_MPSAFE

When NET_MPSAFE isn't defined, this modification
doesn't change its behavior and adds trivial
performance overheads.

Discussed with matt@ on tech-net


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/altq/if_altq.h
cvs rdiff -u -r1.284 -r1.285 src/sys/net/if.c
cvs rdiff -u -r1.168 -r1.169 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/altq/if_altq.h
diff -u src/sys/altq/if_altq.h:1.13 src/sys/altq/if_altq.h:1.14
--- src/sys/altq/if_altq.h:1.13	Tue Aug 18 17:20:20 2009
+++ src/sys/altq/if_altq.h	Tue Jul  1 10:16:02 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_altq.h,v 1.13 2009/08/18 17:20:20 dyoung Exp $	*/
+/*	$NetBSD: if_altq.h,v 1.14 2014/07/01 10:16:02 ozaki-r Exp $	*/
 /*	$KAME: if_altq.h,v 1.12 2005/04/13 03:44:25 suz Exp $	*/
 
 /*
@@ -45,6 +45,7 @@ struct	ifaltq {
 	int	ifq_len;
 	int	ifq_maxlen;
 	int	ifq_drops;
+	kmutex_t	*ifq_lock;
 
 	/* alternate queueing related fields */
 	int	altq_type;		/* discipline type */

Index: src/sys/net/if.c
diff -u src/sys/net/if.c:1.284 src/sys/net/if.c:1.285
--- src/sys/net/if.c:1.284	Tue Jul  1 05:49:18 2014
+++ src/sys/net/if.c	Tue Jul  1 10:16:02 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: if.c,v 1.284 2014/07/01 05:49:18 rtr Exp $	*/
+/*	$NetBSD: if.c,v 1.285 2014/07/01 10:16:02 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.284 2014/07/01 05:49:18 rtr Exp $);
+__KERNEL_RCSID(0, $NetBSD: if.c,v 1.285 2014/07/01 10:16:02 ozaki-r Exp $);
 
 #include opt_inet.h
 
@@ -611,6 +611,12 @@ if_attach(ifnet_t *ifp)
 	ifp-if_snd.altq_ifp  = ifp;
 #endif
 
+#ifdef NET_MPSAFE
+	ifp-if_snd.ifq_lock = mutex_obj_alloc(MUTEX_DEFAULT, IPL_NET);
+#else
+	ifp-if_snd.ifq_lock = NULL;
+#endif
+
 	ifp-if_pfil = pfil_head_create(PFIL_TYPE_IFNET, ifp);
 	(void)pfil_run_hooks(if_pfil,
 	(struct mbuf **)PFIL_IFNET_ATTACH, ifp, PFIL_IFNET);
@@ -732,6 +738,9 @@ if_detach(struct ifnet *ifp)
 		altq_detach(ifp-if_snd);
 #endif
 
+	if (ifp-if_snd.ifq_lock)
+		mutex_obj_free(ifp-if_snd.ifq_lock);
+
 	sysctl_teardown(ifp-if_sysctl_log);
 
 #if NCARP  0

Index: src/sys/net/if.h
diff -u src/sys/net/if.h:1.168 src/sys/net/if.h:1.169
--- src/sys/net/if.h:1.168	Tue Jul  1 05:49:18 2014
+++ src/sys/net/if.h	Tue Jul  1 10:16:02 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: if.h,v 1.168 2014/07/01 05:49:18 rtr Exp $	*/
+/*	$NetBSD: if.h,v 1.169 2014/07/01 10:16:02 ozaki-r Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -86,6 +86,8 @@
 #include net/pktqueue.h
 #endif
 
+//#define NET_MPSAFE 1
+
 /*
  * Always include ALTQ glue here -- we use the ALTQ interface queue
  * structure even when ALTQ is not configured into the kernel so that
@@ -198,11 +200,12 @@ struct if_data {
  * Structure defining a queue for a network interface.
  */
 struct ifqueue {
-	struct	mbuf *ifq_head;
-	struct	mbuf *ifq_tail;
-	int	ifq_len;
-	int	ifq_maxlen;
-	int	ifq_drops;
+	struct		mbuf *ifq_head;
+	struct		mbuf *ifq_tail;
+	int		ifq_len;
+	int		ifq_maxlen;
+	int		ifq_drops;
+	kmutex_t	*ifq_lock;
 };
 
 struct ifnet_lock;
@@ -424,6 +427,9 @@ typedef struct ifnet {
 	\23TSO6		\
 	\24LRO		\
 
+#define IFQ_LOCK(_ifq)		if ((_ifq)-ifq_lock) mutex_enter((_ifq)-ifq_lock)
+#define IFQ_UNLOCK(_ifq)	if ((_ifq)-ifq_lock) mutex_exit((_ifq)-ifq_lock)
+
 /*
  * Output queues (ifp-if_snd) and internetwork datagram level (pup level 1)
  * input routines have queues of messages stored on ifqueue structures
@@ -752,6 +758,7 @@ do {	\
 
 #define IFQ_ENQUEUE(ifq, m, pattr, err)	\
 do {	\
+	IFQ_LOCK((ifq));		\
 	if (ALTQ_IS_ENABLED((ifq)))	\
 		ALTQ_ENQUEUE((ifq), (m), (pattr), (err));		\
 	else {\
@@ -765,34 +772,41 @@ do {	\
 	}\
 	if ((err))			\
 		(ifq)-ifq_drops++;	\
+	IFQ_UNLOCK((ifq));		\
 } while (/*CONSTCOND*/ 0)
 
 #define IFQ_DEQUEUE(ifq, m)		\
 do {	\
+	IFQ_LOCK((ifq));		\
 	if (TBR_IS_ENABLED((ifq)))	\
 		(m) = tbr_dequeue((ifq), ALTDQ_REMOVE);			\
 	else if (ALTQ_IS_ENABLED((ifq)))\
 		ALTQ_DEQUEUE((ifq), (m));\
 	else\
 		IF_DEQUEUE((ifq), (m));	\
+	IFQ_UNLOCK((ifq));		\
 } while (/*CONSTCOND*/ 0)
 
 #define	IFQ_POLL(ifq, m)		\
 do {	\
+	IFQ_LOCK((ifq));		\
 	if (TBR_IS_ENABLED((ifq)))	\
 		(m) = tbr_dequeue((ifq), ALTDQ_POLL);			\
 	else if (ALTQ_IS_ENABLED((ifq)))\
 		ALTQ_POLL((ifq), (m));	\
 	else\
 		IF_POLL((ifq), (m));	\
+	

CVS commit: src/sys/dev/pci

2014-07-01 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Tue Jul  1 10:35:18 UTC 2014

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

Log Message:
Make if_wm MPSAFE

- Make it MPSAFE only when NET_MPSAFE
  - otherwise, its instructions are almost same as before
  - the only change is IFQ_POLL/IFQ_DEQUEUE which
is now single IFQ_DEQUEUE
- Protect driver operations with a lock
  - further work would make it separate
- Apply MPSAFE flag to
  - callout_init
  - pci_intr_establish
- Stop proceeding packets when the driver is likely
  to stop for graceful ifconfig down

Tested on Rangeley (I354) and KVM (e1000)
Reviewed by msaitoh@


To generate a diff of this commit:
cvs rdiff -u -r1.271 -r1.272 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.271 src/sys/dev/pci/if_wm.c:1.272
--- src/sys/dev/pci/if_wm.c:1.271	Mon Jun 30 06:09:44 2014
+++ src/sys/dev/pci/if_wm.c	Tue Jul  1 10:35:18 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_wm.c,v 1.271 2014/06/30 06:09:44 ozaki-r Exp $	*/
+/*	$NetBSD: if_wm.c,v 1.272 2014/07/01 10:35:18 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.271 2014/06/30 06:09:44 ozaki-r Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_wm.c,v 1.272 2014/07/01 10:35:18 ozaki-r Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -141,6 +141,10 @@ int	wm_debug = WM_DEBUG_TX | WM_DEBUG_RX
 #define	DPRINTF(x, y)	/* nothing */
 #endif /* WM_DEBUG */
 
+#ifdef NET_MPSAFE
+#define WM_MPSAFE	1
+#endif
+
 /*
  * Transmit descriptor list size.  Due to errata, we can only have
  * 256 hardware descriptors in the ring on  82544, but we use 4096
@@ -275,6 +279,7 @@ struct wm_softc {
 
 	void *sc_ih;			/* interrupt cookie */
 	callout_t sc_tick_ch;		/* tick callout */
+	bool sc_stopping;
 
 	int sc_ee_addrbits;		/* EEPROM address bits */
 	int sc_ich8_flash_base;
@@ -380,8 +385,21 @@ struct wm_softc {
 	int sc_mchash_type;		/* multicast filter offset */
 
 	krndsource_t rnd_source;	/* random source */
+
+	kmutex_t *sc_txrx_lock;		/* lock for tx/rx operations */
+	/* XXX need separation? */
 };
 
+#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))
+
+#ifdef WM_MPSAFE
+#define CALLOUT_FLAGS	CALLOUT_MPSAFE
+#else
+#define CALLOUT_FLAGS	0
+#endif
+
 #define	WM_RXCHAIN_RESET(sc)		\
 do {	\
 	(sc)-sc_rxtailp = (sc)-sc_rxhead;\
@@ -495,12 +513,16 @@ do {	\
 } while (/*CONSTCOND*/0)
 
 static void	wm_start(struct ifnet *);
+static void	wm_start_locked(struct ifnet *);
 static void	wm_nq_start(struct ifnet *);
+static void	wm_nq_start_locked(struct ifnet *);
 static void	wm_watchdog(struct ifnet *);
 static int	wm_ifflags_cb(struct ethercom *);
 static int	wm_ioctl(struct ifnet *, u_long, void *);
 static int	wm_init(struct ifnet *);
+static int	wm_init_locked(struct ifnet *);
 static void	wm_stop(struct ifnet *, int);
+static void	wm_stop_locked(struct ifnet *, int);
 static bool	wm_suspend(device_t, const pmf_qual_t *);
 static bool	wm_resume(device_t, const pmf_qual_t *);
 
@@ -1184,7 +1206,8 @@ wm_attach(device_t parent, device_t self
 	char intrbuf[PCI_INTRSTR_LEN];
 
 	sc-sc_dev = self;
-	callout_init(sc-sc_tick_ch, 0);
+	callout_init(sc-sc_tick_ch, CALLOUT_FLAGS);
+	sc-sc_stopping = false;
 
 	sc-sc_wmp = wmp = wm_lookup(pa);
 	if (wmp == NULL) {
@@ -1315,6 +1338,9 @@ wm_attach(device_t parent, device_t self
 		return;
 	}
 	intrstr = pci_intr_string(pc, ih, intrbuf, sizeof(intrbuf));
+#ifdef WM_MPSAFE
+	pci_intr_setattr(pc, ih, PCI_INTR_MPSAFE, true);
+#endif
 	sc-sc_ih = pci_intr_establish(pc, ih, IPL_NET, wm_intr, sc);
 	if (sc-sc_ih == NULL) {
 		aprint_error_dev(sc-sc_dev, unable to establish interrupt);
@@ -1354,7 +1380,7 @@ wm_attach(device_t parent, device_t self
 		aprint_verbose_dev(sc-sc_dev,
 		Communication Streaming Architecture\n);
 		if (sc-sc_type == WM_T_82547) {
-			callout_init(sc-sc_txfifo_ch, 0);
+			callout_init(sc-sc_txfifo_ch, CALLOUT_FLAGS);
 			callout_setfunc(sc-sc_txfifo_ch,
 	wm_82547_txfifo_stall, sc);
 			aprint_verbose_dev(sc-sc_dev,
@@ -2051,6 +2077,12 @@ wm_attach(device_t parent, device_t self
 		ifp-if_capabilities |= IFCAP_TSOv6;
 	}
 
+#ifdef WM_MPSAFE
+	sc-sc_txrx_lock = mutex_obj_alloc(MUTEX_DEFAULT, IPL_NET);
+#else
+	sc-sc_txrx_lock = NULL;
+#endif
+
 	/*
 	 * Attach the interface.
 	 */
@@ -2159,18 +2191,26 @@ wm_detach(device_t self, int flags __unu
 {
 	struct wm_softc *sc = device_private(self);
 	struct ifnet *ifp = sc-sc_ethercom.ec_if;
-	int i, s;
+	int i;
+#ifndef WM_MPSAFE
+	int s;
 
 	s = splnet();
+#endif
 	/* Stop the interface. Callouts are stopped in it. 

CVS commit: src/sys/kern

2014-07-01 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Tue Jul  1 12:08:33 UTC 2014

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

Log Message:
1) Define a malloc(9)-like kmem_header structure for KMEM_SIZE. It is in
   fact more consistent, and more flexible (eg if we want to add new fields).
2) When I say page I actually mean kmem page. It may not be clear, so
   replace it by memory chunk (suggested by lars@).
3) Minor changes for KMEM_REDZONE.


To generate a diff of this commit:
cvs rdiff -u -r1.56 -r1.57 src/sys/kern/subr_kmem.c

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

Modified files:

Index: src/sys/kern/subr_kmem.c
diff -u src/sys/kern/subr_kmem.c:1.56 src/sys/kern/subr_kmem.c:1.57
--- src/sys/kern/subr_kmem.c:1.56	Wed Jun 25 16:35:12 2014
+++ src/sys/kern/subr_kmem.c	Tue Jul  1 12:08:33 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr_kmem.c,v 1.56 2014/06/25 16:35:12 maxv Exp $	*/
+/*	$NetBSD: subr_kmem.c,v 1.57 2014/07/01 12:08:33 maxv Exp $	*/
 
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -62,15 +62,15 @@
 
 /*
  * KMEM_SIZE: detect alloc/free size mismatch bugs.
- *	Prefix each allocations with a fixed-sized header and record the exact
- *	user-requested allocation size in it. When freeing, compare it with
- *	kmem_free's size argument.
+ *	Prefix each allocations with a fixed-sized, aligned header and record
+ *	the exact user-requested allocation size in it. When freeing, compare
+ *	it with kmem_free's size argument.
  */
 
 /*
  * KMEM_REDZONE: detect overrun bugs.
- *	Add a 2-byte pattern (allocate one more page if needed) at the end
- *	of each allocated buffer. Check this pattern on kmem_free.
+ *	Add a 2-byte pattern (allocate one more memory chunk if needed) at the
+ *	end of each allocated buffer. Check this pattern on kmem_free.
  *
  * KMEM_POISON: detect modify-after-free bugs.
  *	Fill freed (in the sense of kmem_free) memory with a garbage pattern.
@@ -90,7 +90,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: subr_kmem.c,v 1.56 2014/06/25 16:35:12 maxv Exp $);
+__KERNEL_RCSID(0, $NetBSD: subr_kmem.c,v 1.57 2014/07/01 12:08:33 maxv Exp $);
 
 #include sys/param.h
 #include sys/callback.h
@@ -167,7 +167,7 @@ static pool_cache_t kmem_cache_big[KMEM_
 static size_t kmem_cache_big_maxidx __read_mostly;
 
 #if defined(DIAGNOSTIC)  defined(_HARDKERNEL)
-#define KMEM_SIZE
+#define	KMEM_SIZE
 #endif /* defined(DIAGNOSTIC) */
 
 #if defined(DEBUG)  defined(_HARDKERNEL)
@@ -187,8 +187,8 @@ static void kmem_poison_check(void *, si
 
 #if defined(KMEM_REDZONE)
 #define	REDZONE_SIZE	2
-static void kmem_redzone_fill(void *p, size_t sz);
-static void kmem_redzone_check(void *p, size_t sz);
+static void kmem_redzone_fill(void *, size_t);
+static void kmem_redzone_check(void *, size_t);
 #else /* defined(KMEM_REDZONE) */
 #define	REDZONE_SIZE	0
 #define	kmem_redzone_fill(p, sz)		/* nothing */
@@ -196,7 +196,10 @@ static void kmem_redzone_check(void *p, 
 #endif /* defined(KMEM_REDZONE) */
 
 #if defined(KMEM_SIZE)
-#define	SIZE_SIZE	kmem_roundup_size(sizeof(size_t))
+struct kmem_header {
+	size_t		size;
+} __aligned(KMEM_ALIGN);
+#define	SIZE_SIZE	sizeof(struct kmem_header)
 static void kmem_size_set(void *, size_t);
 static void kmem_size_check(void *, size_t);
 #else
@@ -243,8 +246,8 @@ kmem_intr_alloc(size_t requested_size, k
 
 #ifdef KMEM_REDZONE
 	if (size - requested_size  REDZONE_SIZE) {
-		/* If there isn't enough space in the page padding,
-		 * allocate one more page for the red zone. */
+		/* If there isn't enough space in the padding, allocate
+		 * one more memory chunk for the red zone. */
 		allocsz += kmem_roundup_size(REDZONE_SIZE);
 	}
 #endif
@@ -537,18 +540,23 @@ kmem_poison_check(void *p, size_t sz)
 static void
 kmem_size_set(void *p, size_t sz)
 {
-	memcpy(p, sz, sizeof(sz));
+	struct kmem_header *hd;
+	hd = (struct kmem_header *)p;
+	hd-size = sz;
 }
 
 static void
 kmem_size_check(void *p, size_t sz)
 {
-	size_t psz;
+	struct kmem_header *hd;
+	size_t hsz;
 
-	memcpy(psz, p, sizeof(psz));
-	if (psz != sz) {
+	hd = (struct kmem_header *)p;
+	hsz = hd-size;
+
+	if (hsz != sz) {
 		panic(kmem_free(%p, %zu) != allocated size %zu,
-		(const uint8_t *)p + SIZE_SIZE, sz, psz);
+		(const uint8_t *)p + SIZE_SIZE, sz, hsz);
 	}
 }
 #endif /* defined(KMEM_SIZE) */
@@ -582,7 +590,7 @@ kmem_redzone_check(void *p, size_t sz)
 	const uint8_t *ep;
 
 	cp = (uint8_t *)p + sz;
-	ep = (uint8_t *)p + sz + REDZONE_SIZE;
+	ep = cp + REDZONE_SIZE;
 	while (cp  ep) {
 		const uint8_t expected = kmem_redzone_pattern(cp);
 



CVS commit: src/sys/sys

2014-07-01 Thread Tyler R. Retzlaff
Module Name:src
Committed By:   rtr
Date:   Tue Jul  1 13:25:21 UTC 2014

Modified Files:
src/sys/sys: param.h

Log Message:
Bump to version 6.99.45 for removal of struct lwp * parameter from pr_ioctl


To generate a diff of this commit:
cvs rdiff -u -r1.454 -r1.455 src/sys/sys/param.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/sys/param.h
diff -u src/sys/sys/param.h:1.454 src/sys/sys/param.h:1.455
--- src/sys/sys/param.h:1.454	Sat Jun 14 07:39:00 2014
+++ src/sys/sys/param.h	Tue Jul  1 13:25:21 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: param.h,v 1.454 2014/06/14 07:39:00 hannken Exp $	*/
+/*	$NetBSD: param.h,v 1.455 2014/07/01 13:25:21 rtr Exp $	*/
 
 /*-
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -63,7 +63,7 @@
  *	2.99.9		(299000900)
  */
 
-#define	__NetBSD_Version__	699004400	/* NetBSD 6.99.44 */
+#define	__NetBSD_Version__	699004500	/* NetBSD 6.99.45 */
 
 #define __NetBSD_Prereq__(M,m,p) (M) * 1) + \
 (m) * 100) + (p) * 100) = __NetBSD_Version__)



CVS commit: src/libexec/httpd

2014-07-01 Thread Mateusz Kocielski
Module Name:src
Committed By:   shm
Date:   Tue Jul  1 13:41:21 UTC 2014

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

Log Message:
* bozo_clean_request free(3) clean up (removed needless checks)
* HEAD method no longer returns response body on error
* fixed bug with multiple bozo_http_error calls caused by fix_url_percent

OK @mrg


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 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.50 src/libexec/httpd/bozohttpd.c:1.51
--- src/libexec/httpd/bozohttpd.c:1.50	Sat May 17 05:50:46 2014
+++ src/libexec/httpd/bozohttpd.c	Tue Jul  1 13:41:21 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: bozohttpd.c,v 1.50 2014/05/17 05:50:46 mrg Exp $	*/
+/*	$NetBSD: bozohttpd.c,v 1.51 2014/07/01 13:41:21 shm Exp $	*/
 
 /*	$eterna: bozohttpd.c,v 1.178 2011/11/18 09:21:15 mrg Exp $	*/
 
@@ -333,16 +333,14 @@ bozo_clean_request(bozo_httpreq_t *reque
 	bozo_ssl_destroy(request-hr_httpd);
 
 	/* clean up request */
-#define MF(x)	if (request-x) free(request-x)
-	MF(hr_remotehost);
-	MF(hr_remoteaddr);
-	MF(hr_serverport);
-	MF(hr_virthostname);
-	MF(hr_file);
-	MF(hr_oldfile);
-	MF(hr_query);
-	MF(hr_host);
-#undef MF
+	free(request-hr_remotehost);
+	free(request-hr_remoteaddr);
+	free(request-hr_serverport);
+	free(request-hr_virthostname);
+	free(request-hr_file);
+	free(request-hr_oldfile);
+	free(request-hr_query);
+	free(request-hr_host);
 	bozo_auth_cleanup(request);
 	for (hdr = SIMPLEQ_FIRST(request-hr_headers); hdr;
 	hdr = SIMPLEQ_NEXT(hdr, h_next)) {
@@ -1199,7 +1197,7 @@ check_bzredirect(bozo_httpreq_t *request
 }
 
 /* this fixes the %HH hack that RFC2396 requires.  */
-static void
+static int
 fix_url_percent(bozo_httpreq_t *request)
 {
 	bozohttpd_t *httpd = request-hr_httpd;
@@ -1212,7 +1210,7 @@ fix_url_percent(bozo_httpreq_t *request)
 
 	/* fast forward to the first % */
 	if ((s = strchr(url, '%')) == NULL)
-		return;
+		return 0;
 
 	t = s;
 	do {
@@ -1229,17 +1227,17 @@ fix_url_percent(bozo_httpreq_t *request)
 		if (s[1] == '\0' || s[2] == '\0') {
 			(void)bozo_http_error(httpd, 400, request,
 			percent hack missing two chars afterwards);
-			goto copy_rest;
+			return 1;
 		}
 		if (s[1] == '0'  s[2] == '0') {
 			(void)bozo_http_error(httpd, 404, request,
 	percent hack was %00);
-			goto copy_rest;
+			return 1;
 		}
 		if (s[1] == '2'  s[2] == 'f') {
 			(void)bozo_http_error(httpd, 404, request,
 	percent hack was %2f (/));
-			goto copy_rest;
+			return 1;
 		}
 
 		buf[0] = *++s;
@@ -1252,7 +1250,7 @@ fix_url_percent(bozo_httpreq_t *request)
 		if (*t++ == '\0') {
 			(void)bozo_http_error(httpd, 400, request,
 	percent hack got a 0 back);
-			goto copy_rest;
+			return 1;
 		}
 
 		while (*s  *s != '%') {
@@ -1261,15 +1259,12 @@ fix_url_percent(bozo_httpreq_t *request)
 			*t++ = *s++;
 		}
 	} while (*s);
-copy_rest:
-	while (*s) {
-		if (s = end)
-			break;
-		*t++ = *s++;
-	}
 	*t = '\0';
+
 	debug((httpd, DEBUG_FAT, fix_url_percent returns %s in url,
 			request-hr_file));
+
+	return 0;
 }
 
 /*
@@ -1299,7 +1294,9 @@ transform_request(bozo_httpreq_t *reques
 	file = NULL;
 	*isindex = 0;
 	debug((httpd, DEBUG_FAT, tf_req: file %s, request-hr_file));
-	fix_url_percent(request);
+	if (fix_url_percent(request)) {
+		goto bad_done;
+	}
 	if (check_virtual(request)) {
 		goto bad_done;
 	}
@@ -1918,7 +1915,9 @@ bozo_http_error(bozohttpd_t *httpd, int 
 	if (request  request-hr_allow)
 		bozo_printf(httpd, Allow: %s\r\n, request-hr_allow);
 	bozo_printf(httpd, \r\n);
-	if (size)
+	/* According to the RFC 2616 sec. 9.4 HEAD method MUST NOT return a
+	 * message-body in the response */
+	if (size  request  request-hr_method != HTTP_HEAD)
 		bozo_printf(httpd, %s, httpd-errorbuf);
 	bozo_flush(httpd, stdout);
 



CVS commit: src/sys/net

2014-07-01 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Tue Jul  1 14:04:40 UTC 2014

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

Log Message:
Unbreak lib/libc/net/getifaddrs.c

  --- getifaddrs.o ---
  In file included from 
/tmp/bracket/build/2014.07.01.10.35.18-i386/src/lib/libc/net/getifaddrs.c:39:0:
  /tmp/bracket/build/2014.07.01.10.35.18-i386/src/sys/net/if.h:208:2: error: 
unknown type name 'kmutex_t'
kmutex_t *ifq_lock;
  ^


To generate a diff of this commit:
cvs rdiff -u -r1.169 -r1.170 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.169 src/sys/net/if.h:1.170
--- src/sys/net/if.h:1.169	Tue Jul  1 10:16:02 2014
+++ src/sys/net/if.h	Tue Jul  1 14:04:40 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: if.h,v 1.169 2014/07/01 10:16:02 ozaki-r Exp $	*/
+/*	$NetBSD: if.h,v 1.170 2014/07/01 14:04:40 ozaki-r Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -79,6 +79,7 @@
 
 #include sys/socket.h
 #include sys/queue.h
+#include sys/mutex.h
 
 #include net/dlt.h
 #include net/pfil.h
@@ -211,7 +212,6 @@ struct ifqueue {
 struct ifnet_lock;
 
 #ifdef _KERNEL
-#include sys/mutex.h
 #include sys/condvar.h
 #include sys/percpu.h
 



CVS commit: xsrc/external/mit/xf86-video-intel/dist/src/sna

2014-07-01 Thread Taylor R Campbell
Module Name:xsrc
Committed By:   riastradh
Date:   Tue Jul  1 15:16:07 UTC 2014

Modified Files:
xsrc/external/mit/xf86-video-intel/dist/src/sna: sna_dri.c

Log Message:
Disable DRI for Ivy Bridge (and later) until we update Mesa.

This is a stop-gap for PR 48916.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
xsrc/external/mit/xf86-video-intel/dist/src/sna/sna_dri.c

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

Modified files:

Index: xsrc/external/mit/xf86-video-intel/dist/src/sna/sna_dri.c
diff -u xsrc/external/mit/xf86-video-intel/dist/src/sna/sna_dri.c:1.1.1.1 xsrc/external/mit/xf86-video-intel/dist/src/sna/sna_dri.c:1.2
--- xsrc/external/mit/xf86-video-intel/dist/src/sna/sna_dri.c:1.1.1.1	Fri Mar 21 22:42:41 2014
+++ xsrc/external/mit/xf86-video-intel/dist/src/sna/sna_dri.c	Tue Jul  1 15:16:07 2014
@@ -2287,8 +2287,11 @@ static const char *dri_driver_name(struc
 			return has_i830_dri() ? i830 : i915;
 		else if (sna-kgem.gen  040)
 			return i915;
-		else
+		/* XXX No Ivy Bridge yet in our version of Mesa.  */
+		else if (sna-kgem.gen  070)
 			return i965;
+		else
+			return NULL;
 	}
 
 	return s;
@@ -2321,6 +2324,11 @@ bool sna_dri_open(struct sna *sna, Scree
 	memset(info, '\0', sizeof(info));
 	info.fd = sna-kgem.fd;
 	info.driverName = dri_driver_name(sna);
+	if (info.driverName == NULL) {
+		xf86DrvMsg(sna-scrn-scrnIndex, X_WARNING,
+			   no DRI2 on NetBSD for this device yet);
+		return false;
+	}
 	info.deviceName = intel_get_device_name(sna-scrn);
 
 	DBG((%s: loading dri driver '%s' [gen=%d] for device '%s'\n,



CVS commit: src/sys/net

2014-07-01 Thread Alexander Nasonov
Module Name:src
Committed By:   alnsn
Date:   Tue Jul  1 16:18:55 UTC 2014

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

Log Message:
Move the main loop in bpfjit_generate_code() to a new function and make few
small changes.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/net/bpfjit.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/bpfjit.c
diff -u src/sys/net/bpfjit.c:1.18 src/sys/net/bpfjit.c:1.19
--- src/sys/net/bpfjit.c:1.18	Wed Jun 25 13:53:40 2014
+++ src/sys/net/bpfjit.c	Tue Jul  1 16:18:55 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: bpfjit.c,v 1.18 2014/06/25 13:53:40 alnsn Exp $	*/
+/*	$NetBSD: bpfjit.c,v 1.19 2014/07/01 16:18:55 alnsn Exp $	*/
 
 /*-
  * Copyright (c) 2011-2014 Alexander Nasonov.
@@ -31,9 +31,9 @@
 
 #include sys/cdefs.h
 #ifdef _KERNEL
-__KERNEL_RCSID(0, $NetBSD: bpfjit.c,v 1.18 2014/06/25 13:53:40 alnsn Exp $);
+__KERNEL_RCSID(0, $NetBSD: bpfjit.c,v 1.19 2014/07/01 16:18:55 alnsn Exp $);
 #else
-__RCSID($NetBSD: bpfjit.c,v 1.18 2014/06/25 13:53:40 alnsn Exp $);
+__RCSID($NetBSD: bpfjit.c,v 1.19 2014/07/01 16:18:55 alnsn Exp $);
 #endif
 
 #include sys/types.h
@@ -114,6 +114,12 @@ __RCSID($NetBSD: bpfjit.c,v 1.18 2014/0
 #define BJ_INIT_XBITBJ_INIT_MBIT(MAX_MEMWORDS + 1)
 
 /*
+ * Get a number of memwords and external memwords from a bpf_ctx object.
+ */
+#define GET_EXTWORDS(bc) ((bc) ? (bc)-extwords : 0)
+#define GET_MEMWORDS(bc) (GET_EXTWORDS(bc) ? GET_EXTWORDS(bc) : BPF_MEMWORDS)
+
+/*
  * Datatype for Array Bounds Check Elimination (ABC) pass.
  */
 typedef uint64_t bpfjit_abc_length_t;
@@ -307,7 +313,7 @@ append_jump(struct sljit_jump *jump, str
  * Generate code for BPF_LD+BPF_B+BPF_ABSA - P[k:1].
  */
 static int
-emit_read8(struct sljit_compiler* compiler, uint32_t k)
+emit_read8(struct sljit_compiler *compiler, uint32_t k)
 {
 
 	return sljit_emit_op1(compiler,
@@ -320,7 +326,7 @@ emit_read8(struct sljit_compiler* compil
  * Generate code for BPF_LD+BPF_H+BPF_ABSA - P[k:2].
  */
 static int
-emit_read16(struct sljit_compiler* compiler, uint32_t k)
+emit_read16(struct sljit_compiler *compiler, uint32_t k)
 {
 	int status;
 
@@ -362,7 +368,7 @@ emit_read16(struct sljit_compiler* compi
  * Generate code for BPF_LD+BPF_W+BPF_ABSA - P[k:4].
  */
 static int
-emit_read32(struct sljit_compiler* compiler, uint32_t k)
+emit_read32(struct sljit_compiler *compiler, uint32_t k)
 {
 	int status;
 
@@ -471,7 +477,7 @@ emit_read32(struct sljit_compiler* compi
  *code for BPF_MSH instruction.
  */
 static int
-emit_xcall(struct sljit_compiler* compiler, const struct bpf_insn *pc,
+emit_xcall(struct sljit_compiler *compiler, const struct bpf_insn *pc,
 int dst, sljit_sw dstw, struct sljit_jump **ret0_jump,
 uint32_t (*fn)(const struct mbuf *, uint32_t, int *))
 {
@@ -578,7 +584,7 @@ emit_xcall(struct sljit_compiler* compil
  * Emit code for BPF_COP and BPF_COPX instructions.
  */
 static int
-emit_cop(struct sljit_compiler* compiler, const bpf_ctx_t *bc,
+emit_cop(struct sljit_compiler *compiler, const bpf_ctx_t *bc,
 const struct bpf_insn *pc, struct sljit_jump **ret0_jump)
 {
 #if BJ_XREG == SLJIT_RETURN_REG   || \
@@ -698,7 +704,7 @@ emit_cop(struct sljit_compiler* compiler
  * BPF_LD+BPF_B+BPF_INDA - P[X+k:1]
  */
 static int
-emit_pkt_read(struct sljit_compiler* compiler,
+emit_pkt_read(struct sljit_compiler *compiler,
 const struct bpf_insn *pc, struct sljit_jump *to_mchain_jump,
 struct sljit_jump ***ret0, size_t *ret0_size, size_t *ret0_maxsize)
 {
@@ -832,7 +838,7 @@ emit_pkt_read(struct sljit_compiler* com
 }
 
 static int
-emit_memload(struct sljit_compiler* compiler,
+emit_memload(struct sljit_compiler *compiler,
 sljit_si dst, uint32_t k, size_t extwords)
 {
 	int status;
@@ -860,7 +866,7 @@ emit_memload(struct sljit_compiler* comp
 }
 
 static int
-emit_memstore(struct sljit_compiler* compiler,
+emit_memstore(struct sljit_compiler *compiler,
 sljit_si src, uint32_t k, size_t extwords)
 {
 	int status;
@@ -891,7 +897,7 @@ emit_memstore(struct sljit_compiler* com
  * Generate code for BPF_LDX+BPF_B+BPF_MSHX - 4*(P[k:1]0xf).
  */
 static int
-emit_msh(struct sljit_compiler* compiler,
+emit_msh(struct sljit_compiler *compiler,
 const struct bpf_insn *pc, struct sljit_jump *to_mchain_jump,
 struct sljit_jump ***ret0, size_t *ret0_size, size_t *ret0_maxsize)
 {
@@ -999,7 +1005,7 @@ emit_msh(struct sljit_compiler* compiler
 }
 
 static int
-emit_pow2_division(struct sljit_compiler* compiler, uint32_t k)
+emit_pow2_division(struct sljit_compiler *compiler, uint32_t k)
 {
 	int shift = 0;
 	int status = SLJIT_SUCCESS;
@@ -1036,7 +1042,7 @@ divide(sljit_uw x, sljit_uw y)
  * divt,divw are either SLJIT_IMM,pc-k or BJ_XREG,0.
  */
 static int
-emit_division(struct sljit_compiler* compiler, int divt, sljit_sw divw)
+emit_division(struct sljit_compiler *compiler, int divt, sljit_sw divw)
 {
 	

CVS commit: src/sys/dev/pci

2014-07-01 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Tue Jul  1 16:27:25 UTC 2014

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

Log Message:
Tweak debug printf directives.


To generate a diff of this commit:
cvs rdiff -u -r1.106 -r1.107 src/sys/dev/pci/agp_i810.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/agp_i810.c
diff -u src/sys/dev/pci/agp_i810.c:1.106 src/sys/dev/pci/agp_i810.c:1.107
--- src/sys/dev/pci/agp_i810.c:1.106	Fri Jun 27 22:27:16 2014
+++ src/sys/dev/pci/agp_i810.c	Tue Jul  1 16:27:25 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: agp_i810.c,v 1.106 2014/06/27 22:27:16 riastradh Exp $	*/
+/*	$NetBSD: agp_i810.c,v 1.107 2014/07/01 16:27:25 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2000 Doug Rabson
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: agp_i810.c,v 1.106 2014/06/27 22:27:16 riastradh Exp $);
+__KERNEL_RCSID(0, $NetBSD: agp_i810.c,v 1.107 2014/07/01 16:27:25 riastradh Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -1100,8 +1100,9 @@ agp_i810_bind_page(struct agp_softc *sc,
 
 	if (offset  0 || offset = ((isc-gtt_size/4)  AGP_PAGE_SHIFT)) {
 		DPRINTF(sc, failed
-		: offset 0x%08x, shift %d, entries %PRIuMAX\n,
-		(int)offset, AGP_PAGE_SHIFT,
+		: offset 0x%PRIxMAX, shift %u, entries %PRIuMAX\n,
+		(uintmax_t)offset,
+		(unsigned)AGP_PAGE_SHIFT,
 		(uintmax_t)isc-gtt_size/4);
 		return EINVAL;
 	}
@@ -1160,7 +1161,7 @@ agp_i810_alloc_memory(struct agp_softc *
 	struct agp_memory *mem;
 	int error;
 
-	DPRINTF(sc, AGP: alloc(%d, 0x%x)\n, type, (int)size);
+	DPRINTF(sc, AGP: alloc(%d, 0x%PRIxMAX)\n, type, (uintmax_t)size);
 
 	if (size = 0)
 		return NULL;



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

2014-07-01 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Tue Jul  1 16:29:57 UTC 2014

Modified Files:
src/sys/external/bsd/drm2/drm: drm_memory.c

Log Message:
Honour write-combining flag in drm_ioremap.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/external/bsd/drm2/drm/drm_memory.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/drm/drm_memory.c
diff -u src/sys/external/bsd/drm2/drm/drm_memory.c:1.4 src/sys/external/bsd/drm2/drm/drm_memory.c:1.5
--- src/sys/external/bsd/drm2/drm/drm_memory.c:1.4	Thu Jun 12 15:05:29 2014
+++ src/sys/external/bsd/drm2/drm/drm_memory.c	Tue Jul  1 16:29:57 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: drm_memory.c,v 1.4 2014/06/12 15:05:29 riastradh Exp $	*/
+/*	$NetBSD: drm_memory.c,v 1.5 2014/07/01 16:29:57 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: drm_memory.c,v 1.4 2014/06/12 15:05:29 riastradh Exp $);
+__KERNEL_RCSID(0, $NetBSD: drm_memory.c,v 1.5 2014/07/01 16:29:57 riastradh Exp $);
 
 #ifdef _KERNEL_OPT
 #include agp_i810.h
@@ -85,6 +85,7 @@ drm_ioremap(struct drm_device *dev, stru
 	 */
 	for (unit = 0; unit  dev-bus_nmaps; unit++) {
 		struct drm_bus_map *const bm = dev-bus_maps[unit];
+		int flags = bm-bm_flags;
 
 		/* Reject maps starting after the request.  */
 		if (map-offset  bm-bm_base)
@@ -100,12 +101,16 @@ drm_ioremap(struct drm_device *dev, stru
 			continue;
 
 		/* Ensure we can map the space into virtual memory.  */
-		if (!ISSET(bm-bm_flags, BUS_SPACE_MAP_LINEAR))
+		if (!ISSET(flags, BUS_SPACE_MAP_LINEAR))
 			continue;
 
+		/* Reflect requested flags in the bus_space map.  */
+		if (ISSET(map-flags, _DRM_WRITE_COMBINING))
+			flags |= BUS_SPACE_MAP_PREFETCHABLE;
+
 		/* Map it.  */
-		if (bus_space_map(bst, map-offset, map-size,
-			bm-bm_flags, map-lm_data.bus_space.bsh))
+		if (bus_space_map(bst, map-offset, map-size, flags,
+			map-lm_data.bus_space.bsh))
 			break;
 
 		map-lm_data.bus_space.bus_map = bm;



CVS commit: src/sys/dev/pci

2014-07-01 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Jul  1 17:11:35 UTC 2014

Modified Files:
src/sys/dev/pci: if_bnx.c if_bnxreg.h if_bnxvar.h

Log Message:
Print some information (ASCI revision, PCI status, etc). Ffrom FreeBSD.


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 src/sys/dev/pci/if_bnx.c
cvs rdiff -u -r1.17 -r1.18 src/sys/dev/pci/if_bnxreg.h
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/pci/if_bnxvar.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/if_bnx.c
diff -u src/sys/dev/pci/if_bnx.c:1.55 src/sys/dev/pci/if_bnx.c:1.56
--- src/sys/dev/pci/if_bnx.c:1.55	Tue Jul  1 15:23:35 2014
+++ src/sys/dev/pci/if_bnx.c	Tue Jul  1 17:11:35 2014
@@ -1,8 +1,8 @@
-/*	$NetBSD: if_bnx.c,v 1.55 2014/07/01 15:23:35 msaitoh Exp $	*/
+/*	$NetBSD: if_bnx.c,v 1.56 2014/07/01 17:11:35 msaitoh Exp $	*/
 /*	$OpenBSD: if_bnx.c,v 1.85 2009/11/09 14:32:41 dlg Exp $ */
 
 /*-
- * Copyright (c) 2006 Broadcom Corporation
+ * Copyright (c) 2006-2010 Broadcom Corporation
  *	David Christensen davi...@broadcom.com.  All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -35,7 +35,7 @@
 #if 0
 __FBSDID($FreeBSD: src/sys/dev/bce/if_bce.c,v 1.3 2006/04/13 14:12:26 ru Exp $);
 #endif
-__KERNEL_RCSID(0, $NetBSD: if_bnx.c,v 1.55 2014/07/01 15:23:35 msaitoh Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_bnx.c,v 1.56 2014/07/01 17:11:35 msaitoh Exp $);
 
 /*
  * The following controllers are supported by this driver:
@@ -360,6 +360,8 @@ void	bnx_load_cpu_fw(struct bnx_softc *,
 	struct fw_info *);
 void	bnx_init_cpus(struct bnx_softc *);
 
+static void bnx_print_adapter_info(struct bnx_softc *);
+static void bnx_probe_pci_caps(struct bnx_softc *);
 void	bnx_stop(struct ifnet *, int);
 int	bnx_reset(struct bnx_softc *, uint32_t);
 int	bnx_chipinit(struct bnx_softc *);
@@ -445,6 +447,99 @@ bnx_probe(device_t parent, cfdata_t matc
 }
 
 //
+/* PCI Capabilities Probe Function. */
+/*  */
+/* Walks the PCI capabiites list for the device to find what features are   */
+/* supported.   */
+/*  */
+/* Returns: */
+/*   None.  */
+//
+static void
+bnx_print_adapter_info(struct bnx_softc *sc)
+{
+
+	aprint_normal_dev(sc-bnx_dev, ASIC BCM%x %c%d %s(0x%08x)\n,
+	BNXNUM(sc), 'A' + BNXREV(sc), BNXMETAL(sc),
+	(BNX_CHIP_BOND_ID(sc) == BNX_CHIP_BOND_ID_SERDES_BIT)
+	? Serdes  : , sc-bnx_chipid);
+	
+	/* Bus info. */
+	if (sc-bnx_flags  BNX_PCIE_FLAG) {
+		aprint_normal_dev(sc-bnx_dev, PCIe x%d ,
+		sc-link_width);
+		switch (sc-link_speed) {
+		case 1: aprint_normal(2.5Gbps\n); break;
+		case 2:	aprint_normal(5Gbps\n); break;
+		default: aprint_normal(Unknown link speed\n);
+		}
+	} else {
+		aprint_normal_dev(sc-bnx_dev, PCI%s %dbit %dMHz\n,
+		((sc-bnx_flags  BNX_PCIX_FLAG) ? -X : ),
+		(sc-bnx_flags  BNX_PCI_32BIT_FLAG) ? 32 : 64,
+		sc-bus_speed_mhz);
+	}
+
+	aprint_normal_dev(sc-bnx_dev,
+	Coal (RX:%d,%d,%d,%d; TX:%d,%d,%d,%d)\n,
+	sc-bnx_rx_quick_cons_trip_int,
+	sc-bnx_rx_quick_cons_trip,
+	sc-bnx_rx_ticks_int,
+	sc-bnx_rx_ticks,
+	sc-bnx_tx_quick_cons_trip_int,
+	sc-bnx_tx_quick_cons_trip,
+	sc-bnx_tx_ticks_int,
+	sc-bnx_tx_ticks);
+}
+
+
+//
+/* PCI Capabilities Probe Function. */
+/*  */
+/* Walks the PCI capabiites list for the device to find what features are   */
+/* supported.   */
+/*  */
+/* Returns: */
+/*   None.  */
+//
+static void
+bnx_probe_pci_caps(struct bnx_softc *sc)
+{
+	struct pci_attach_args *pa = (sc-bnx_pa);
+	pcireg_t reg;
+
+	/* Check if PCI-X capability is enabled. */
+	if (pci_get_capability(pa-pa_pc, pa-pa_tag, PCI_CAP_PCIX, reg,
+		NULL) != 0) {
+		sc-bnx_cap_flags |= BNX_PCIX_CAPABLE_FLAG;
+	}
+
+	/* Check if PCIe capability is enabled. */
+	if (pci_get_capability(pa-pa_pc, pa-pa_tag, PCI_CAP_PCIEXPRESS, reg,
+		NULL) != 0) {
+		pcireg_t 

CVS commit: src/sys/external/bsd/drm2/i915drm

2014-07-01 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Tue Jul  1 20:03:21 UTC 2014

Modified Files:
src/sys/external/bsd/drm2/i915drm: i915_pci.c

Log Message:
Implement i915drmkms wsdisplay blank/backlight/brightness controls.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/external/bsd/drm2/i915drm/i915_pci.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/i915drm/i915_pci.c
diff -u src/sys/external/bsd/drm2/i915drm/i915_pci.c:1.8 src/sys/external/bsd/drm2/i915drm/i915_pci.c:1.9
--- src/sys/external/bsd/drm2/i915drm/i915_pci.c:1.8	Fri Apr 25 19:02:51 2014
+++ src/sys/external/bsd/drm2/i915drm/i915_pci.c	Tue Jul  1 20:03:21 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: i915_pci.c,v 1.8 2014/04/25 19:02:51 riastradh Exp $	*/
+/*	$NetBSD: i915_pci.c,v 1.9 2014/07/01 20:03:21 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: i915_pci.c,v 1.8 2014/04/25 19:02:51 riastradh Exp $);
+__KERNEL_RCSID(0, $NetBSD: i915_pci.c,v 1.9 2014/07/01 20:03:21 riastradh Exp $);
 
 #ifdef _KERNEL_OPT
 #include vga.h
@@ -73,6 +73,8 @@ struct i915drm_softc {
 	struct drm_i915_gem_object	*sc_fb_obj;
 	bus_space_handle_t		sc_fb_bsh;
 	struct genfb_softc		sc_genfb;
+	struct genfb_parameter_callback	sc_genfb_backlight_callback;
+	struct genfb_parameter_callback	sc_genfb_brightness_callback;
 	struct list_head		sc_fb_list; /* XXX Kludge!  */
 	boolsc_console;
 };
@@ -97,10 +99,19 @@ static int	i915drm_fb_create_handle(stru
 		struct drm_file *, unsigned int *);
 static void	i915drm_fb_destroy(struct drm_framebuffer *);
 
+static int	i915drm_fb_dpms(struct i915drm_softc *, int);
+
 static int	i915drm_genfb_ioctl(void *, void *, unsigned long, void *,
 		int, struct lwp *);
 static paddr_t	i915drm_genfb_mmap(void *, void *, off_t, int);
 
+static int	i915drm_genfb_get_backlight(void *, int *);
+static int	i915drm_genfb_set_backlight(void *, int);
+static int	i915drm_genfb_upd_backlight(void *, int);
+static int	i915drm_genfb_get_brightness(void *, int *);
+static int	i915drm_genfb_set_brightness(void *, int);
+static int	i915drm_genfb_upd_brightness(void *, int);
+
 CFATTACH_DECL_NEW(i915drmkms, sizeof(struct i915drm_softc),
 i915drm_match, i915drm_attach, i915drm_detach, NULL);
 
@@ -467,6 +478,25 @@ i915drm_fb_probe(struct drm_fb_helper *f
 	CTASSERT(sizeof(uintptr_t) = sizeof(uint64_t));
 	prop_dictionary_set_uint64(dict, virtual_address,
 	(uint64_t)(uintptr_t)bus_space_vaddr(dev-bst, sc-sc_fb_bsh));
+
+	sc-sc_genfb_backlight_callback = (struct genfb_parameter_callback) {
+		.gpc_cookie = sc,
+		.gpc_get_parameter = i915drm_genfb_get_backlight,
+		.gpc_set_parameter = i915drm_genfb_set_backlight,
+		.gpc_upd_parameter = i915drm_genfb_upd_backlight,
+	};
+	prop_dictionary_set_uint64(dict, backlight_callback,
+	(uint64_t)(uintptr_t)sc-sc_genfb_backlight_callback);
+
+	sc-sc_genfb_brightness_callback = (struct genfb_parameter_callback) {
+		.gpc_cookie = sc,
+		.gpc_get_parameter = i915drm_genfb_get_brightness,
+		.gpc_set_parameter = i915drm_genfb_set_brightness,
+		.gpc_upd_parameter = i915drm_genfb_upd_brightness,
+	};
+	prop_dictionary_set_uint64(dict, brightness_callback,
+	(uint64_t)(uintptr_t)sc-sc_genfb_brightness_callback);
+
 	sc-sc_genfb.sc_dev = sc-sc_dev;
 	genfb_init(sc-sc_genfb);
 
@@ -494,6 +524,28 @@ fail0:	KASSERT(ret  0);
 	return ret;
 }
 
+static int
+i915drm_fb_dpms(struct i915drm_softc *sc, int dpms_mode)
+{
+	struct drm_device *const dev = sc-sc_drm_dev;
+	struct drm_i915_private *const dev_priv = dev-dev_private;
+	/* XXX What guarantees dev_priv-fbdev stays around?  */
+	struct drm_fb_helper *const fb_helper = dev_priv-fbdev-helper;
+	unsigned i;
+
+	mutex_lock(dev-mode_config.mutex);
+	for (i = 0; i  fb_helper-connector_count; i++) {
+		struct drm_connector *const connector =
+		fb_helper-connector_info[i]-connector;
+		(*connector-funcs-dpms)(connector, dpms_mode);
+		drm_object_property_set_value(connector-base,
+		dev-mode_config.dpms_property, dpms_mode);
+	}
+	mutex_unlock(dev-mode_config.mutex);
+
+	return 0;
+}
+
 static void
 i915drm_fb_detach(struct drm_fb_helper *fb_helper)
 {
@@ -549,6 +601,29 @@ i915drm_genfb_ioctl(void *v, void *vs, u
 		return wsdisplayio_busid_pci(genfb-sc_dev,
 		pa-pa_pc, pa-pa_tag, data);
 
+	/*
+	 * Screen blanking ioctls.  Not to be confused with backlight
+	 * (can be disabled while stuff is still drawn on the screen),
+	 * brightness, or contrast (which we don't support).  Backlight
+	 * and brightness are done through WSDISPLAYIO_{GET,SET}PARAM.
+	 * This toggles between DPMS ON and DPMS OFF; backlight toggles
+	 * between DPMS ON and DPMS SUSPEND.
+	 */
+	case WSDISPLAYIO_GVIDEO: {
+		int *onp = (int *)data;
+
+		/* XXX Can't really determine a single answer here.  */
+		*onp = 1;
+		

CVS commit: src/sys/netinet6

2014-07-01 Thread Justin Cormack
Module Name:src
Committed By:   justin
Date:   Tue Jul  1 23:01:54 UTC 2014

Modified Files:
src/sys/netinet6: in6.c

Log Message:
On ARM the variable name 'delay' shadows a function here, rename to avoid
-Wshadow objecting.


To generate a diff of this commit:
cvs rdiff -u -r1.173 -r1.174 src/sys/netinet6/in6.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/netinet6/in6.c
diff -u src/sys/netinet6/in6.c:1.173 src/sys/netinet6/in6.c:1.174
--- src/sys/netinet6/in6.c:1.173	Tue Jul  1 07:51:29 2014
+++ src/sys/netinet6/in6.c	Tue Jul  1 23:01:54 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: in6.c,v 1.173 2014/07/01 07:51:29 ozaki-r Exp $	*/
+/*	$NetBSD: in6.c,v 1.174 2014/07/01 23:01:54 justin Exp $	*/
 /*	$KAME: in6.c,v 1.198 2001/07/18 09:12:38 itojun Exp $	*/
 
 /*
@@ -62,7 +62,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: in6.c,v 1.173 2014/07/01 07:51:29 ozaki-r Exp $);
+__KERNEL_RCSID(0, $NetBSD: in6.c,v 1.174 2014/07/01 23:01:54 justin Exp $);
 
 #include opt_inet.h
 #include opt_compat_netbsd.h
@@ -2156,17 +2156,17 @@ in6_if_link_up(struct ifnet *ifp)
 		}
 
 		if (ia-ia6_flags  IN6_IFF_TENTATIVE) {
-			int delay;
+			int rand_delay;
 			/*
 			 * The TENTATIVE flag was likely set by hand
 			 * beforehand, implicitly indicating the need for DAD.
 			 * We may be able to skip the random delay in this
 			 * case, but we impose delays just in case.
 			 */
-			delay = cprng_fast32() %
+			rand_delay = cprng_fast32() %
 			(MAX_RTR_SOLICITATION_DELAY * hz);
 			/* +1 ensures callout is always used */
-			nd6_dad_start(ifa, delay + 1);
+			nd6_dad_start(ifa, rand_delay + 1);
 		}
 	}
 



CVS commit: src/sys/dev/pci

2014-07-01 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Wed Jul  2 00:04:18 UTC 2014

Modified Files:
src/sys/dev/pci: if_wpi.c if_wpireg.h

Log Message:
No need to duplicate the members of the wpi_cmd_data structure within
the wpi_scan_hdr structure when we can just put the wpi_cmd_data
structure within the wpi_scan_hdr structure.

This also brings our if_wpireg.h mostly in line with OpenBSD's 1.18.


To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.60 src/sys/dev/pci/if_wpi.c
cvs rdiff -u -r1.11 -r1.12 src/sys/dev/pci/if_wpireg.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/if_wpi.c
diff -u src/sys/dev/pci/if_wpi.c:1.59 src/sys/dev/pci/if_wpi.c:1.60
--- src/sys/dev/pci/if_wpi.c:1.59	Mon Jun 16 22:38:27 2014
+++ src/sys/dev/pci/if_wpi.c	Wed Jul  2 00:04:18 2014
@@ -1,4 +1,4 @@
-/*  $NetBSD: if_wpi.c,v 1.59 2014/06/16 22:38:27 jakllsch Exp $*/
+/*  $NetBSD: if_wpi.c,v 1.60 2014/07/02 00:04:18 jakllsch Exp $*/
 
 /*-
  * Copyright (c) 2006, 2007
@@ -18,7 +18,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_wpi.c,v 1.59 2014/06/16 22:38:27 jakllsch Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_wpi.c,v 1.60 2014/07/02 00:04:18 jakllsch Exp $);
 
 /*
  * Driver for Intel PRO/Wireless 3945ABG 802.11 network adapters.
@@ -2728,9 +2728,9 @@ wpi_scan(struct wpi_softc *sc, uint16_t 
 
 	hdr = (struct wpi_scan_hdr *)cmd-data;
 	memset(hdr, 0, sizeof (struct wpi_scan_hdr));
-	hdr-txflags = htole32(WPI_TX_AUTO_SEQ);
-	hdr-id = WPI_ID_BROADCAST;
-	hdr-lifetime = htole32(WPI_LIFETIME_INFINITE);
+	hdr-cmd.flags = htole32(WPI_TX_AUTO_SEQ);
+	hdr-cmd.id = WPI_ID_BROADCAST;
+	hdr-cmd.lifetime = htole32(WPI_LIFETIME_INFINITE);
 
 	/*
 	 * Move to the next channel if no packets are received within 5 msecs
@@ -2743,11 +2743,11 @@ wpi_scan(struct wpi_softc *sc, uint16_t 
 	if (flags  IEEE80211_CHAN_A) {
 		hdr-crc_threshold = htole16(1);
 		/* send probe requests at 6Mbps */
-		hdr-rate = wpi_plcp_signal(12);
+		hdr-cmd.rate = wpi_plcp_signal(12);
 	} else {
 		hdr-flags = htole32(WPI_CONFIG_24GHZ | WPI_CONFIG_AUTO);
 		/* send probe requests at 1Mbps */
-		hdr-rate = wpi_plcp_signal(2);
+		hdr-cmd.rate = wpi_plcp_signal(2);
 	}
 
 	/* for directed scans, firmware inserts the essid IE itself */
@@ -2797,7 +2797,7 @@ wpi_scan(struct wpi_softc *sc, uint16_t 
 	}
 
 	/* setup length of probe request */
-	hdr-paylen = htole16(frm - (uint8_t *)wh);
+	hdr-cmd.len = htole16(frm - (uint8_t *)wh);
 
 	chan = (struct wpi_scan_chan *)frm;
 	for (c  = ic-ic_channels[1];

Index: src/sys/dev/pci/if_wpireg.h
diff -u src/sys/dev/pci/if_wpireg.h:1.11 src/sys/dev/pci/if_wpireg.h:1.12
--- src/sys/dev/pci/if_wpireg.h:1.11	Mon Jun 30 21:33:40 2014
+++ src/sys/dev/pci/if_wpireg.h	Wed Jul  2 00:04:18 2014
@@ -1,5 +1,5 @@
-/*	$NetBSD: if_wpireg.h,v 1.11 2014/06/30 21:33:40 jakllsch Exp $	*/
-/*	$OpenBSD: if_wpireg.h,v 1.17 2007/07/24 16:07:47 damien Exp $	*/
+/*	$NetBSD: if_wpireg.h,v 1.12 2014/07/02 00:04:18 jakllsch Exp $	*/
+/*	$OpenBSD: if_wpireg.h,v 1.18 2007/09/10 20:34:43 damien Exp $	*/
 
 /*-
  * Copyright (c) 2006, 2007
@@ -493,25 +493,10 @@ struct wpi_scan_hdr {
 	uint32_t	flags;
 	uint32_t	filter;
 
-	/* wpi_cmd_data structure */
-	uint16_t	paylen;
-	uint16_t	lnext;
-	uint32_t	txflags;
-	uint8_t		rate;
-	uint8_t		id;
-	uint8_t		tid;
-	uint8_t		security;
-	uint8_t		key[IEEE80211_KEYBUF_SIZE];
-	uint8_t		tkip[IEEE80211_WEP_MICLEN];
-	uint32_t	fnext;
-	uint32_t	lifetime;
-	uint8_t		ofdm_mask;
-	uint8_t		cck_mask;
-	uint8_t		rts_ntries;
-	uint8_t		data_ntries;
-	uint16_t	timeout;
-	uint16_t	txop;
+	/* followed by a struct wpi_cmd_data */
+	struct		wpi_cmd_data cmd;
 
+	/* followed by an array of 4x struct wpi_scan_essid */
 	struct		wpi_scan_essid essid[4];
 
 	/* followed by probe request body */



CVS commit: src/sys/dev/pci

2014-07-01 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Wed Jul  2 00:15:41 UTC 2014

Modified Files:
src/sys/dev/pci: if_wpireg.h

Log Message:
fix boot code maximum size.

From OpenBSD if_wpireg.h 1.19.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/dev/pci/if_wpireg.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/if_wpireg.h
diff -u src/sys/dev/pci/if_wpireg.h:1.12 src/sys/dev/pci/if_wpireg.h:1.13
--- src/sys/dev/pci/if_wpireg.h:1.12	Wed Jul  2 00:04:18 2014
+++ src/sys/dev/pci/if_wpireg.h	Wed Jul  2 00:15:41 2014
@@ -1,5 +1,5 @@
-/*	$NetBSD: if_wpireg.h,v 1.12 2014/07/02 00:04:18 jakllsch Exp $	*/
-/*	$OpenBSD: if_wpireg.h,v 1.18 2007/09/10 20:34:43 damien Exp $	*/
+/*	$NetBSD: if_wpireg.h,v 1.13 2014/07/02 00:15:41 jakllsch Exp $	*/
+/*	$OpenBSD: if_wpireg.h,v 1.19 2007/09/10 20:53:22 damien Exp $	*/
 
 /*-
  * Copyright (c) 2006, 2007
@@ -589,7 +589,7 @@ struct wpi_firmware_hdr {
 #define WPI_FW_MAIN_DATA_MAXSZ	(32 * 1024)
 #define WPI_FW_INIT_TEXT_MAXSZ	(80 * 1024)
 #define WPI_FW_INIT_DATA_MAXSZ	(32 * 1024)
-#define WPI_FW_BOOT_TEXT_MAXSZ	(80 * 1024)
+#define WPI_FW_BOOT_TEXT_MAXSZ	1024
 
 #define WPI_FW_UPDATED	(1  31)
 



CVS commit: src/doc

2014-07-01 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jul  2 00:32:05 UTC 2014

Modified Files:
src/doc: 3RDPARTY

Log Message:
new acpica is out


To generate a diff of this commit:
cvs rdiff -u -r1.1126 -r1.1127 src/doc/3RDPARTY

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

Modified files:

Index: src/doc/3RDPARTY
diff -u src/doc/3RDPARTY:1.1126 src/doc/3RDPARTY:1.1127
--- src/doc/3RDPARTY:1.1126	Mon Jun 30 23:34:05 2014
+++ src/doc/3RDPARTY	Tue Jul  1 20:32:05 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1126 2014/07/01 03:34:05 taca Exp $
+#	$NetBSD: 3RDPARTY,v 1.1127 2014/07/02 00:32:05 christos Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -41,7 +41,7 @@
 
 Package:	acpica
 Version:	20131218
-Current Vers:	20140424
+Current Vers:	20140627
 Maintainer:	Intel
 Archive Site:	http://www.acpica.org/downloads/
 Home Page:	http://www.acpica.org/



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

2014-07-01 Thread Hisashi T Fujinaka
Module Name:src
Committed By:   htodd
Date:   Wed Jul  2 05:23:20 UTC 2014

Modified Files:
src/distrib/sets/lists/debug: md.amd64 md.i386 mi

Log Message:
Move t_bpfjit.debug to md lists.


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 src/distrib/sets/lists/debug/md.amd64
cvs rdiff -u -r1.5 -r1.6 src/distrib/sets/lists/debug/md.i386
cvs rdiff -u -r1.64 -r1.65 src/distrib/sets/lists/debug/mi

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/debug/md.amd64
diff -u src/distrib/sets/lists/debug/md.amd64:1.55 src/distrib/sets/lists/debug/md.amd64:1.56
--- src/distrib/sets/lists/debug/md.amd64:1.55	Wed Jun 18 17:50:15 2014
+++ src/distrib/sets/lists/debug/md.amd64	Wed Jul  2 05:23:20 2014
@@ -1,4 +1,4 @@
-# $NetBSD: md.amd64,v 1.55 2014/06/18 17:50:15 christos Exp $
+# $NetBSD: md.amd64,v 1.56 2014/07/02 05:23:20 htodd Exp $
 ./usr/lib/i386/i18n/libBIG5_g.a			comp-c-debuglib		compat,debuglib
 ./usr/lib/i386/i18n/libDECHanyu_g.a		comp-c-debuglib		compat,debuglib
 ./usr/lib/i386/i18n/libEUCTW_g.a		comp-c-debuglib		compat,debuglib
@@ -338,3 +338,5 @@
 ./usr/libdata/debug/usr/libexec/ld.elf_so-i386.debug	comp-sys-debug		debug,compat
 ./usr/libdata/debug/usr/sbin/acpidump.debug	comp-sysutil-debug	debug
 ./usr/libdata/debug/usr/sbin/amldb.debug	comp-sysutil-debug	debug
+./usr/libdata/debug/usr/tests/lib/libbpfjit/t_bpfjit.debug		tests-lib-debug		debug,atf,sljit
+./usr/libdata/debug/usr/tests/net/bpfjit/t_bpfjit.debug		tests-net-debug		debug,atf,rump

Index: src/distrib/sets/lists/debug/md.i386
diff -u src/distrib/sets/lists/debug/md.i386:1.5 src/distrib/sets/lists/debug/md.i386:1.6
--- src/distrib/sets/lists/debug/md.i386:1.5	Sat Nov  2 23:23:51 2013
+++ src/distrib/sets/lists/debug/md.i386	Wed Jul  2 05:23:20 2014
@@ -1,4 +1,4 @@
-# $NetBSD: md.i386,v 1.5 2013/11/02 23:23:51 christos Exp $
+# $NetBSD: md.i386,v 1.6 2014/07/02 05:23:20 htodd Exp $
 ./usr/lib/libi386_g.acomp-c-debuglib		debuglib
 ./usr/lib/libm387_g.acomp-c-debuglib		debuglib
 ./usr/lib/libpmc_g.acomp-c-debuglib		debuglib
@@ -17,3 +17,5 @@
 ./usr/libdata/debug/usr/sbin/bad144.debug	comp-sysutil-debug	debug
 ./usr/libdata/debug/usr/sbin/ipwctl.debug	comp-sysutil-debug	debug
 ./usr/libdata/debug/usr/sbin/ndiscvt.debug	comp-sysutil-debug	debug
+./usr/libdata/debug/usr/tests/lib/libbpfjit/t_bpfjit.debug		tests-lib-debug		debug,atf,sljit
+./usr/libdata/debug/usr/tests/net/bpfjit/t_bpfjit.debug

Index: src/distrib/sets/lists/debug/mi
diff -u src/distrib/sets/lists/debug/mi:1.64 src/distrib/sets/lists/debug/mi:1.65
--- src/distrib/sets/lists/debug/mi:1.64	Tue Jul  1 03:42:41 2014
+++ src/distrib/sets/lists/debug/mi	Wed Jul  2 05:23:20 2014
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.64 2014/07/01 03:42:41 htodd Exp $
+# $NetBSD: mi,v 1.65 2014/07/02 05:23:20 htodd Exp $
 
 ./etc/mtree/set.debug   comp-sys-root
 ./usr/lib/i18n/libBIG5_g.a			comp-c-debuglib		debuglib
@@ -1774,7 +1774,6 @@
 ./usr/libdata/debug/usr/tests/lib/libbluetooth/t_sdp_match.debug	tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libbluetooth/t_sdp_put.debug		tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libbluetooth/t_sdp_set.debug		tests-lib-debug		debug,atf
-./usr/libdata/debug/usr/tests/lib/libbpfjit/t_bpfjit.debug		tests-lib-debug		debug,atf,sljit
 ./usr/libdata/debug/usr/tests/lib/libbpfjit/t_extmem.debug		tests-lib-debug		debug,atf,sljit
 ./usr/libdata/debug/usr/tests/lib/libbpfjit/t_cop.debug			tests-lib-debug		debug,atf,sljit
 ./usr/libdata/debug/usr/tests/lib/libc/c063/t_faccessat.debug		tests-lib-debug		debug,atf
@@ -2125,7 +2124,6 @@
 ./usr/libdata/debug/usr/tests/net/bpf/t_bpf.debug		tests-net-debug		debug,atf,rump
 ./usr/libdata/debug/usr/tests/net/bpf/t_div-by-zero.debug		tests-net-debug		debug,atf,rump
 ./usr/libdata/debug/usr/tests/net/bpfilter/t_bpfilter.debug		tests-net-debug		debug,atf,rump
-./usr/libdata/debug/usr/tests/net/bpfjit/t_bpfjit.debug		tests-net-debug		debug,atf,rump
 ./usr/libdata/debug/usr/tests/net/carp/t_basic.debug		tests-net-debug		debug,atf,rump
 ./usr/libdata/debug/usr/tests/net/fdpass/fdpass32.debug		tests-net-debug		debug,atf
 ./usr/libdata/debug/usr/tests/net/fdpass/fdpass64.debug		tests-net-debug		debug,atf