CVS commit: src/sys/dev/pci

2017-01-07 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Sun Jan  8 07:42:00 UTC 2017

Modified Files:
src/sys/dev/pci: if_iwm.c if_iwmvar.h

Log Message:
iwm(4): make interrupt routine running on softint context.

see http://mail-index.netbsd.org/tech-kern/2016/12/06/msg021281.html


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/sys/dev/pci/if_iwm.c
cvs rdiff -u -r1.10 -r1.11 src/sys/dev/pci/if_iwmvar.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_iwm.c
diff -u src/sys/dev/pci/if_iwm.c:1.49 src/sys/dev/pci/if_iwm.c:1.50
--- src/sys/dev/pci/if_iwm.c:1.49	Sun Jan  8 06:49:10 2017
+++ src/sys/dev/pci/if_iwm.c	Sun Jan  8 07:42:00 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_iwm.c,v 1.49 2017/01/08 06:49:10 nonaka Exp $	*/
+/*	$NetBSD: if_iwm.c,v 1.50 2017/01/08 07:42:00 nonaka Exp $	*/
 /*	OpenBSD: if_iwm.c,v 1.147 2016/11/17 14:12:33 stsp Exp	*/
 #define IEEE80211_NO_HT
 /*
@@ -107,7 +107,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_iwm.c,v 1.49 2017/01/08 06:49:10 nonaka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_iwm.c,v 1.50 2017/01/08 07:42:00 nonaka Exp $");
 
 #include 
 #include 
@@ -455,7 +455,7 @@ static int	iwm_setrates(struct iwm_node 
 static int	iwm_media_change(struct ifnet *);
 static void	iwm_newstate_cb(struct work *, void *);
 static int	iwm_newstate(struct ieee80211com *, enum ieee80211_state, int);
-static void	iwm_endscan_cb(struct work *, void *);
+static void	iwm_endscan(struct iwm_softc *);
 static void	iwm_fill_sf_command(struct iwm_softc *, struct iwm_sf_cfg_cmd *,
 		struct ieee80211_node *);
 static int	iwm_sf_config(struct iwm_softc *, int);
@@ -474,6 +474,7 @@ static void	iwm_nic_error(struct iwm_sof
 static void	iwm_nic_umac_error(struct iwm_softc *);
 #endif
 static void	iwm_notif_intr(struct iwm_softc *);
+static void	iwm_softintr(void *);
 static int	iwm_intr(void *);
 static int	iwm_preinit(struct iwm_softc *);
 static void	iwm_attach_hook(device_t);
@@ -3472,6 +3473,7 @@ iwm_rx_rx_mpdu(struct iwm_softc *sc, str
 	uint32_t len;
 	uint32_t rx_pkt_status;
 	int rssi;
+	int s;
 
 	bus_dmamap_sync(sc->sc_dmat, data->map, 0, IWM_RBUF_SIZE,
 	BUS_DMASYNC_POSTREAD);
@@ -3519,6 +3521,8 @@ iwm_rx_rx_mpdu(struct iwm_softc *sc, str
 	if (le32toh(phy_info->channel) < __arraycount(ic->ic_channels))
 		c = >ic_channels[le32toh(phy_info->channel)];
 
+	s = splnet();
+
 	ni = ieee80211_find_rxnode(ic, (struct ieee80211_frame_min *)wh);
 	if (c)
 		ni->ni_chan = c;
@@ -3568,6 +3572,8 @@ iwm_rx_rx_mpdu(struct iwm_softc *sc, str
 	}
 	ieee80211_input(ic, m, ni, rssi, device_timestamp);
 	ieee80211_free_node(ni);
+
+	splx(s);
 }
 
 static void
@@ -3639,12 +3645,7 @@ iwm_rx_tx_cmd(struct iwm_softc *sc, stru
 		sc->qfullmsk &= ~(1 << ring->qid);
 		if (sc->qfullmsk == 0 && (ifp->if_flags & IFF_OACTIVE)) {
 			ifp->if_flags &= ~IFF_OACTIVE;
-			/*
-			 * Well, we're in interrupt context, but then again
-			 * I guess net80211 does all sorts of stunts in
-			 * interrupt context, so maybe this is no biggie.
-			 */
-			if_schedule_deferred_start(ifp);
+			if_start_lock(ifp);
 		}
 	}
 }
@@ -5892,9 +5893,8 @@ iwm_newstate(struct ieee80211com *ic, en
 }
 
 static void
-iwm_endscan_cb(struct work *work __unused, void *arg)
+iwm_endscan(struct iwm_softc *sc)
 {
-	struct iwm_softc *sc = arg;
 	struct ieee80211com *ic = >sc_ic;
 
 	DPRINTF(("scan ended\n"));
@@ -6311,6 +6311,7 @@ iwm_start(struct ifnet *ifp)
 		IF_DEQUEUE(>ic_mgtq, m);
 		if (m) {
 			ni = M_GETCTX(m, struct ieee80211_node *);
+			M_CLEARCTX(m);
 			ac = WME_AC_BE;
 			goto sendit;
 		}
@@ -6319,8 +6320,9 @@ iwm_start(struct ifnet *ifp)
 		}
 
 		IFQ_DEQUEUE(>if_snd, m);
-		if (!m)
+		if (m == NULL)
 			break;
+
 		if (m->m_len < sizeof (*eh) &&
 		   (m = m_pullup(m, sizeof (*eh))) == NULL) {
 			ifp->if_oerrors++;
@@ -6334,6 +6336,7 @@ iwm_start(struct ifnet *ifp)
 			ifp->if_oerrors++;
 			continue;
 		}
+
 		/* classify mbuf so we can find which tx ring to use */
 		if (ieee80211_classify(ic, m, ni) != 0) {
 			m_freem(m);
@@ -6943,21 +6946,21 @@ iwm_notif_intr(struct iwm_softc *sc)
 		case IWM_SCAN_ITERATION_COMPLETE: {
 			struct iwm_lmac_scan_complete_notif *notif;
 			SYNC_RESP_STRUCT(notif, pkt);
-			workqueue_enqueue(sc->sc_eswq, >sc_eswk, NULL);
+			iwm_endscan(sc);
 			break;
 		}
 
 		case IWM_SCAN_COMPLETE_UMAC: {
 			struct iwm_umac_scan_complete *notif;
 			SYNC_RESP_STRUCT(notif, pkt);
-			workqueue_enqueue(sc->sc_eswq, >sc_eswk, NULL);
+			iwm_endscan(sc);
 			break;
 		}
 
 		case IWM_SCAN_ITERATION_COMPLETE_UMAC: {
 			struct iwm_umac_scan_iter_complete_notif *notif;
 			SYNC_RESP_STRUCT(notif, pkt);
-			workqueue_enqueue(sc->sc_eswq, >sc_eswk, NULL);
+			iwm_endscan(sc);
 			break;
 		}
 
@@ -7017,64 +7020,17 @@ iwm_notif_intr(struct iwm_softc *sc)
 	IWM_WRITE(sc, IWM_FH_RSCSR_CHNL0_WPTR, hw & ~7);
 }
 
-static int
-iwm_intr(void *arg)
+static void
+iwm_softintr(void 

CVS commit: src/sys/dev/pci

2017-01-07 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Sun Jan  8 06:49:10 UTC 2017

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

Log Message:
use pci_intr_establish_xname(9).


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/sys/dev/pci/if_iwm.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_iwm.c
diff -u src/sys/dev/pci/if_iwm.c:1.48 src/sys/dev/pci/if_iwm.c:1.49
--- src/sys/dev/pci/if_iwm.c:1.48	Sun Jan  8 06:48:06 2017
+++ src/sys/dev/pci/if_iwm.c	Sun Jan  8 06:49:10 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_iwm.c,v 1.48 2017/01/08 06:48:06 nonaka Exp $	*/
+/*	$NetBSD: if_iwm.c,v 1.49 2017/01/08 06:49:10 nonaka Exp $	*/
 /*	OpenBSD: if_iwm.c,v 1.147 2016/11/17 14:12:33 stsp Exp	*/
 #define IEEE80211_NO_HT
 /*
@@ -107,7 +107,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_iwm.c,v 1.48 2017/01/08 06:48:06 nonaka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_iwm.c,v 1.49 2017/01/08 06:49:10 nonaka Exp $");
 
 #include 
 #include 
@@ -7328,8 +7328,8 @@ iwm_attach(device_t parent, device_t sel
 	}
 	intrstr = pci_intr_string(sc->sc_pct, sc->sc_pihp[0], intrbuf,
 	sizeof(intrbuf));
-	sc->sc_ih = pci_intr_establish(sc->sc_pct, sc->sc_pihp[0], IPL_NET,
-	iwm_intr, sc);
+	sc->sc_ih = pci_intr_establish_xname(sc->sc_pct, sc->sc_pihp[0],
+	IPL_NET, iwm_intr, sc, device_xname(self));
 	if (sc->sc_ih == NULL) {
 		aprint_error_dev(self, "can't establish interrupt");
 		if (intrstr != NULL)



CVS commit: src/sys/dev/pci

2017-01-07 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Sun Jan  8 06:48:06 UTC 2017

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

Log Message:
twiddle bpf related.


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/sys/dev/pci/if_iwm.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_iwm.c
diff -u src/sys/dev/pci/if_iwm.c:1.47 src/sys/dev/pci/if_iwm.c:1.48
--- src/sys/dev/pci/if_iwm.c:1.47	Sun Jan  8 06:23:29 2017
+++ src/sys/dev/pci/if_iwm.c	Sun Jan  8 06:48:06 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_iwm.c,v 1.47 2017/01/08 06:23:29 nonaka Exp $	*/
+/*	$NetBSD: if_iwm.c,v 1.48 2017/01/08 06:48:06 nonaka Exp $	*/
 /*	OpenBSD: if_iwm.c,v 1.147 2016/11/17 14:12:33 stsp Exp	*/
 #define IEEE80211_NO_HT
 /*
@@ -107,7 +107,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_iwm.c,v 1.47 2017/01/08 06:23:29 nonaka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_iwm.c,v 1.48 2017/01/08 06:48:06 nonaka Exp $");
 
 #include 
 #include 
@@ -3523,7 +3523,7 @@ iwm_rx_rx_mpdu(struct iwm_softc *sc, str
 	if (c)
 		ni->ni_chan = c;
 
-	if (sc->sc_drvbpf != NULL) {
+	if (__predict_false(sc->sc_drvbpf != NULL)) {
 		struct iwm_rx_radiotap_header *tap = >sc_rxtap;
 
 		tap->wr_flags = 0;
@@ -4161,7 +4161,7 @@ iwm_tx(struct iwm_softc *sc, struct mbuf
 
 	rinfo = iwm_tx_fill_cmd(sc, in, wh, tx);
 
-	if (sc->sc_drvbpf != NULL) {
+	if (__predict_false(sc->sc_drvbpf != NULL)) {
 		struct iwm_tx_radiotap_header *tap = >sc_txtap;
 
 		tap->wt_flags = 0;
@@ -6326,8 +6326,6 @@ iwm_start(struct ifnet *ifp)
 			ifp->if_oerrors++;
 			continue;
 		}
-		if (ifp->if_bpf != NULL)
-			bpf_mtap(ifp, m);
 
 		eh = mtod(m, struct ether_header *);
 		ni = ieee80211_find_txnode(ic, eh->ether_dhost);
@@ -6348,6 +6346,8 @@ iwm_start(struct ifnet *ifp)
 		ac = (eh->ether_type != htons(ETHERTYPE_PAE)) ?
 		M_WME_GETAC(m) : WME_AC_BE;
 
+		bpf_mtap(ifp, m);
+
 		if ((m = ieee80211_encap(ic, m, ni)) == NULL) {
 			ieee80211_free_node(ni);
 			ifp->if_oerrors++;
@@ -6355,8 +6355,8 @@ iwm_start(struct ifnet *ifp)
 		}
 
  sendit:
-		if (ic->ic_rawbpf != NULL)
-			bpf_mtap3(ic->ic_rawbpf, m);
+		bpf_mtap3(ic->ic_rawbpf, m);
+
 		if (iwm_tx(sc, m, ni, ac) != 0) {
 			ieee80211_free_node(ni);
 			ifp->if_oerrors++;



CVS commit: src/sys/dev/pci

2017-01-07 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Sun Jan  8 06:23:29 UTC 2017

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

Log Message:
cosmetic


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/sys/dev/pci/if_iwm.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_iwm.c
diff -u src/sys/dev/pci/if_iwm.c:1.46 src/sys/dev/pci/if_iwm.c:1.47
--- src/sys/dev/pci/if_iwm.c:1.46	Wed Jan  4 03:05:24 2017
+++ src/sys/dev/pci/if_iwm.c	Sun Jan  8 06:23:29 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_iwm.c,v 1.46 2017/01/04 03:05:24 nonaka Exp $	*/
+/*	$NetBSD: if_iwm.c,v 1.47 2017/01/08 06:23:29 nonaka Exp $	*/
 /*	OpenBSD: if_iwm.c,v 1.147 2016/11/17 14:12:33 stsp Exp	*/
 #define IEEE80211_NO_HT
 /*
@@ -107,7 +107,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_iwm.c,v 1.46 2017/01/04 03:05:24 nonaka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_iwm.c,v 1.47 2017/01/08 06:23:29 nonaka Exp $");
 
 #include 
 #include 
@@ -4315,7 +4315,7 @@ iwm_tx(struct iwm_softc *sc, struct mbuf
 	seg = data->map->dm_segs;
 	for (i = 0; i < data->map->dm_nsegs; i++, seg++) {
 		desc->tbs[i+2].lo = htole32(seg->ds_addr);
-		desc->tbs[i+2].hi_n_len = \
+		desc->tbs[i+2].hi_n_len =
 		htole16(iwm_get_dma_hi_addr(seg->ds_addr))
 		| ((seg->ds_len) << 4);
 	}
@@ -6368,8 +6368,6 @@ iwm_start(struct ifnet *ifp)
 			ifp->if_timer = 1;
 		}
 	}
-
-	return;
 }
 
 static void
@@ -7637,7 +7635,7 @@ fail1:	iwm_dma_contig_free(>fw_dma);
 void
 iwm_radiotap_attach(struct iwm_softc *sc)
 {
-	struct ifnet *ifp = sc->sc_ic.ic_ifp;
+	struct ifnet *ifp = IC2IFP(>sc_ic);
 
 	bpf_attach2(ifp, DLT_IEEE802_11_RADIO,
 	sizeof (struct ieee80211_frame) + IEEE80211_RADIOTAP_HDRLEN,
@@ -7654,10 +7652,10 @@ iwm_radiotap_attach(struct iwm_softc *sc
 
 #if 0
 static void
-iwm_init_task(void *arg1)
+iwm_init_task(void *arg)
 {
-	struct iwm_softc *sc = arg1;
-	struct ifnet *ifp = >sc_ic.ic_if;
+	struct iwm_softc *sc = arg;
+	struct ifnet *ifp = IC2IFP(>sc_ic);
 	int s;
 
 	rw_enter_write(>ioctl_rwl);



CVS commit: src/sys/external/bsd/vchiq/dist/interface/vchiq_arm

2017-01-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jan  8 05:20:51 UTC 2017

Modified Files:
src/sys/external/bsd/vchiq/dist/interface/vchiq_arm: vchiq_arm.c

Log Message:
xxx: gcc avoid bogus ssp warning


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 \
src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_arm.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/vchiq/dist/interface/vchiq_arm/vchiq_arm.c
diff -u src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_arm.c:1.16 src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_arm.c:1.17
--- src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_arm.c:1.16	Wed Jan 28 04:41:04 2015
+++ src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_arm.c	Sun Jan  8 00:20:51 2017
@@ -2513,7 +2513,7 @@ vchiq_dump_service_use_state(VCHIQ_STATE
 	VCHIQ_ARM_STATE_T *arm_state = vchiq_platform_get_arm_state(state);
 	int i, j = 0;
 	/* Only dump 64 services */
-	static const int local_max_services = 64;
+#define local_max_services 64
 	/* If there's more than 64 services, only dump ones with
 	 * non-zero counts */
 	int only_nonzero = 0;



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

2017-01-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jan  8 05:11:13 UTC 2017

Added Files:
src/sys/arch/evbarm/conf: CUBOX_INSTALL

Log Message:
need this for the build


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

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

Added files:

Index: src/sys/arch/evbarm/conf/CUBOX_INSTALL
diff -u /dev/null src/sys/arch/evbarm/conf/CUBOX_INSTALL:1.1
--- /dev/null	Sun Jan  8 00:11:13 2017
+++ src/sys/arch/evbarm/conf/CUBOX_INSTALL	Sun Jan  8 00:11:13 2017
@@ -0,0 +1,10 @@
+#	$NetBSD: CUBOX_INSTALL,v 1.1 2017/01/08 05:11:13 christos Exp $
+#
+#	CUBOX_INSTALL -- CUBOX kernel with installation-sized
+#	ramdisk
+#
+
+include "arch/evbarm/conf/CUBOX"
+include "arch/evbarm/conf/INSTALL"
+
+options BOOTHOWTO=RB_SINGLE



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

2017-01-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jan  8 05:11:24 UTC 2017

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

Log Message:
remove dup DIAGNOSTIC


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/evbarm/conf/ALLWINNER_A80

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

Modified files:

Index: src/sys/arch/evbarm/conf/ALLWINNER_A80
diff -u src/sys/arch/evbarm/conf/ALLWINNER_A80:1.19 src/sys/arch/evbarm/conf/ALLWINNER_A80:1.20
--- src/sys/arch/evbarm/conf/ALLWINNER_A80:1.19	Tue Dec 13 15:42:17 2016
+++ src/sys/arch/evbarm/conf/ALLWINNER_A80	Sun Jan  8 00:11:24 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: ALLWINNER_A80,v 1.19 2016/12/13 20:42:17 christos Exp $
+#	$NetBSD: ALLWINNER_A80,v 1.20 2017/01/08 05:11:24 christos Exp $
 #
 #	ALLWINNER_A80 - Allwinner A80 boards (Cubieboard4, OptimusBoard, etc)
 #
@@ -22,7 +22,6 @@ options 	MEMSIZE=2048
 options 	AWIN_CONSOLE_EARLY
 options 	AWIN_GPIO_IGNORE_FW
 
-options 	DIAGNOSTIC	# internal consistency checks
 #options 	DEBUG
 #options 	VERBOSE_INIT_ARM # verbose bootstraping messages
 makeoptions	DEBUG="-g"	# compile full symbol table



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

2017-01-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jan  8 05:05:27 UTC 2017

Modified Files:
src/sys/arch/arm/broadcom: bcm53xx_rng.c

Log Message:
fix typo


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arm/broadcom/bcm53xx_rng.c

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

Modified files:

Index: src/sys/arch/arm/broadcom/bcm53xx_rng.c
diff -u src/sys/arch/arm/broadcom/bcm53xx_rng.c:1.9 src/sys/arch/arm/broadcom/bcm53xx_rng.c:1.10
--- src/sys/arch/arm/broadcom/bcm53xx_rng.c:1.9	Sun Jan  8 00:04:45 2017
+++ src/sys/arch/arm/broadcom/bcm53xx_rng.c	Sun Jan  8 00:05:27 2017
@@ -33,7 +33,7 @@
 
 #include 
 
-__KERNEL_RCSID(1, "$NetBSD: bcm53xx_rng.c,v 1.9 2017/01/08 05:04:45 christos Exp $");
+__KERNEL_RCSID(1, "$NetBSD: bcm53xx_rng.c,v 1.10 2017/01/08 05:05:27 christos Exp $");
 
 #include 
 #include 
@@ -170,7 +170,7 @@ bcmrng_empty(struct bcmrng_softc *sc)
 		return 0;
 	}
 	if (nwords > __arraycount(data))
-		nords = __arraycount(data);
+		nwords = __arraycount(data);
 
 	bcmrng_read_multi_4(sc, RNG_DATA, data, nwords);
 



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

2017-01-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jan  8 05:04:45 UTC 2017

Modified Files:
src/sys/arch/arm/broadcom: bcm53xx_rng.c

Log Message:
Limit number of words we read..


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arm/broadcom/bcm53xx_rng.c

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

Modified files:

Index: src/sys/arch/arm/broadcom/bcm53xx_rng.c
diff -u src/sys/arch/arm/broadcom/bcm53xx_rng.c:1.8 src/sys/arch/arm/broadcom/bcm53xx_rng.c:1.9
--- src/sys/arch/arm/broadcom/bcm53xx_rng.c:1.8	Mon Apr 13 17:18:40 2015
+++ src/sys/arch/arm/broadcom/bcm53xx_rng.c	Sun Jan  8 00:04:45 2017
@@ -33,7 +33,7 @@
 
 #include 
 
-__KERNEL_RCSID(1, "$NetBSD: bcm53xx_rng.c,v 1.8 2015/04/13 21:18:40 riastradh Exp $");
+__KERNEL_RCSID(1, "$NetBSD: bcm53xx_rng.c,v 1.9 2017/01/08 05:04:45 christos Exp $");
 
 #include 
 #include 
@@ -163,13 +163,14 @@ size_t
 bcmrng_empty(struct bcmrng_softc *sc)
 {
 	mutex_enter(sc->sc_lock);
+	uint32_t data[128];
 	size_t nwords = __SHIFTOUT(bcmrng_read_4(sc, RNG_STATUS), RNG_VAL);
 	if (nwords == 0) {
 		mutex_exit(sc->sc_lock);
 		return 0;
 	}
-
-	uint32_t data[nwords];
+	if (nwords > __arraycount(data))
+		nords = __arraycount(data);
 
 	bcmrng_read_multi_4(sc, RNG_DATA, data, nwords);
 



CVS commit: src/sys/conf

2017-01-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jan  8 05:02:08 UTC 2017

Modified Files:
src/sys/conf: Makefile.kern.inc

Log Message:
Add COPTS for xhci.c, since the do_command_locked causes a spurious stack
proector warning.


To generate a diff of this commit:
cvs rdiff -u -r1.253 -r1.254 src/sys/conf/Makefile.kern.inc

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

Modified files:

Index: src/sys/conf/Makefile.kern.inc
diff -u src/sys/conf/Makefile.kern.inc:1.253 src/sys/conf/Makefile.kern.inc:1.254
--- src/sys/conf/Makefile.kern.inc:1.253	Wed Jan  4 16:37:46 2017
+++ src/sys/conf/Makefile.kern.inc	Sun Jan  8 00:02:08 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.kern.inc,v 1.253 2017/01/04 21:37:46 christos Exp $
+#	$NetBSD: Makefile.kern.inc,v 1.254 2017/01/08 05:02:08 christos Exp $
 #
 # This file contains common `MI' targets and definitions and it is included
 # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}.
@@ -118,6 +118,9 @@ COPTS.${j}+=-g
 #
 COPTS.debugsyms.c+=	-g
 
+# XXX: Gcc bug?
+COPTS.xhci.c+=	-Wno-stack-protector
+
 # Add CTF sections for DTrace
 .if defined(CTFCONVERT)
 COMPILE_CTFCONVERT=	${_MKSHECHO}\



CVS commit: src/doc

2017-01-07 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Sun Jan  8 04:27:36 UTC 2017

Modified Files:
src/doc: TODO.ptrace

Log Message:
Update TODO.ptrace

1. siginfo_t accessors done
2. PTRACE_O_TRACEEXIT not applicable for NetBSD as we are tracing the whole
process at once, not per thread
3. PTRACE_O_TRACEEXEC implemented as SIGTRAP & TRAP_EXEC

Sponsored by 


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/doc/TODO.ptrace

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

Modified files:

Index: src/doc/TODO.ptrace
diff -u src/doc/TODO.ptrace:1.9 src/doc/TODO.ptrace:1.10
--- src/doc/TODO.ptrace:1.9	Sat Dec 31 20:57:15 2016
+++ src/doc/TODO.ptrace	Sun Jan  8 04:27:36 2017
@@ -1,4 +1,4 @@
-$NetBSD: TODO.ptrace,v 1.9 2016/12/31 20:57:15 kamil Exp $
+$NetBSD: TODO.ptrace,v 1.10 2017/01/08 04:27:36 kamil Exp $
 
 Items we (currently) plan to finish in the ptrace(2) field:
 
@@ -16,14 +16,12 @@ Items we (currently) plan to finish in t
in all ports
  - integrate all ptrace(2) features in gdb
  - add ptrace(2) NetBSD support in LLDB
- - add support for detecting equivalent events to PTRACE_O_TRACEEXEC,
-   PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXIT from Linux
+ - evaluate equivalent for PTRACE_O_TRACECLONE from Linux
  - remove exect(3) - there is no usecase for it
  - refactor pthread_dbg(3) to only query private pthread_t data, otherwise it
duplicates ptrace(2) interface and cannot cover all types of threads
  - add ATF tests for SIGCHLD
  - add ATF tests for PT_SYSCALL and PT_SYSCALLEMU
- - add support to read and write siginfo_t from and to tracee
 
 and of course: fix as many bugs as possible.
 



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

2017-01-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jan  8 01:56:31 UTC 2017

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

Log Message:
remove some local hacks.


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

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

Modified files:

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/Makefile
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/Makefile:1.10 src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/Makefile:1.11
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/Makefile:1.10	Fri Oct 14 12:09:44 2016
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/Makefile	Sat Jan  7 20:56:31 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.10 2016/10/14 16:09:44 spz Exp $
+#	$NetBSD: Makefile,v 1.11 2017/01/08 01:56:31 christos Exp $
 
 .include "bsd.own.mk"
 
@@ -12,10 +12,10 @@ CC+= -fno-integrated-as
 regen:
 	for i in $$(find ${OPENSSLSRC} -name \*${MACHINE_ARCH}.pl) \
 		$$(find ${OPENSSLSRC}/crypto/bn/asm -name ${MACHINE_ARCH}-\*.pl) \
+		$$(find ${OPENSSLSRC}/crypto/bn/asm -name ${MACHINE_ARCH}-\*.pl) \
 		${OPENSSLSRC}/crypto/bn/asm/rsaz-avx2.pl \
 		${OPENSSLSRC}/crypto/${MACHINE_ARCH}cpuid.pl ; do \
-(echo "#include "; CC=${CC:Q} perl $$i elf | sed \
-		-e 's/\(OPENSSL[A-Za-z0-9_]*\)(%rip)/\1@GOTPCREL(%rip)/' \
+(set +x; echo "#include "; CC=${CC:Q} perl $$i elf | sed \
 		-e 's/.hidden	OPENSSL_cpuid_setup/.globl	OPENSSL_cpuid_setup/' \
 		-e 's/call	OPENSSL_cpuid_setup/call	PIC_PLT(OPENSSL_cpuid_setup)/' \
 		-e 's/rdseedq/rdseed/') \



CVS commit: src/crypto/external/bsd/openssl/dist/crypto/bn/asm

2017-01-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jan  8 01:55:49 UTC 2017

Modified Files:
src/crypto/external/bsd/openssl/dist/crypto/bn/asm: x86_64-gf2m.pl

Log Message:
PR/51569: Andreas Gustafsson: Check the right bit for pclmulqdq:
Perform a Carry-Less Multiplication of Quadword instruction
(accelerator for GCM)


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
src/crypto/external/bsd/openssl/dist/crypto/bn/asm/x86_64-gf2m.pl

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

Modified files:

Index: src/crypto/external/bsd/openssl/dist/crypto/bn/asm/x86_64-gf2m.pl
diff -u src/crypto/external/bsd/openssl/dist/crypto/bn/asm/x86_64-gf2m.pl:1.4 src/crypto/external/bsd/openssl/dist/crypto/bn/asm/x86_64-gf2m.pl:1.5
--- src/crypto/external/bsd/openssl/dist/crypto/bn/asm/x86_64-gf2m.pl:1.4	Fri Oct 14 12:23:18 2016
+++ src/crypto/external/bsd/openssl/dist/crypto/bn/asm/x86_64-gf2m.pl	Sat Jan  7 20:55:49 2017
@@ -167,8 +167,9 @@ $code.=<<___;
 .type	bn_GF2m_mul_2x2,\@abi-omnipotent
 .align	16
 bn_GF2m_mul_2x2:
-	mov	OPENSSL_ia32cap_P(%rip),%rax
-	bt	\$33,%rax
+	mov	OPENSSL_ia32cap_P+4(%rip),%rax
+	bt	\$1,%rax	 # check PCLMULQDQ bit
+
 	jnc	.Lvanilla_mul_2x2
 
 	movq		$a1,%xmm0



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

2017-01-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan  7 23:05:35 UTC 2017

Modified Files:
src/distrib/sets/lists/etc: mi

Log Message:
fix nsd rc.


To generate a diff of this commit:
cvs rdiff -u -r1.244 -r1.245 src/distrib/sets/lists/etc/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/etc/mi
diff -u src/distrib/sets/lists/etc/mi:1.244 src/distrib/sets/lists/etc/mi:1.245
--- src/distrib/sets/lists/etc/mi:1.244	Sat Jan  7 15:46:29 2017
+++ src/distrib/sets/lists/etc/mi	Sat Jan  7 18:05:35 2017
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.244 2017/01/07 20:46:29 christos Exp $
+# $NetBSD: mi,v 1.245 2017/01/07 23:05:35 christos Exp $
 #
 # Note: end-user configuration files that are moved to another location
 #	should not be marked "obsolete"; they should just be removed from
@@ -251,7 +251,7 @@
 ./etc/rc.d/nfslockingetc-nfsserver-rc
 ./etc/rc.d/npf	etc-npf-rc
 ./etc/rc.d/npfd	etc-npf-rc
-./etc/rc.d/nsd	etc-nsd-rc
+./etc/rc.d/nsd	etc-nsd-rc		nsd
 ./etc/rc.d/ntpd	etc-ntp-rc
 ./etc/rc.d/ntpdateetc-ntp-rc
 ./etc/rc.d/perusertmpetc-sys-rc



CVS commit: src/etc/mtree

2017-01-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan  7 22:37:22 UTC 2017

Modified Files:
src/etc/mtree: special

Log Message:
add nsd npfd


To generate a diff of this commit:
cvs rdiff -u -r1.155 -r1.156 src/etc/mtree/special

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

Modified files:

Index: src/etc/mtree/special
diff -u src/etc/mtree/special:1.155 src/etc/mtree/special:1.156
--- src/etc/mtree/special:1.155	Tue Dec 27 12:13:45 2016
+++ src/etc/mtree/special	Sat Jan  7 17:37:22 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: special,v 1.155 2016/12/27 17:13:45 maya Exp $
+#	$NetBSD: special,v 1.156 2017/01/07 22:37:22 christos Exp $
 #	@(#)special	8.2 (Berkeley) 1/23/94
 #
 # This file may be overwritten on upgrades.
@@ -251,6 +251,8 @@
 ./etc/rc.d/nfsd			type=file mode=0555
 ./etc/rc.d/nfslocking		type=file mode=0555
 ./etc/rc.d/npf			type=file mode=0555
+./etc/rc.d/npfd			type=file mode=0555
+./etc/rc.d/nsd			type=file mode=0555
 ./etc/rc.d/ntpd			type=file mode=0555
 ./etc/rc.d/ntpdate		type=file mode=0555
 ./etc/rc.d/perusertmp		type=file mode=0555



CVS commit: src/share/mk

2017-01-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan  7 22:27:36 UTC 2017

Modified Files:
src/share/mk: bsd.README bsd.own.mk

Log Message:
add nsd


To generate a diff of this commit:
cvs rdiff -u -r1.356 -r1.357 src/share/mk/bsd.README
cvs rdiff -u -r1.999 -r1.1000 src/share/mk/bsd.own.mk

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

Modified files:

Index: src/share/mk/bsd.README
diff -u src/share/mk/bsd.README:1.356 src/share/mk/bsd.README:1.357
--- src/share/mk/bsd.README:1.356	Sat Aug 20 12:11:07 2016
+++ src/share/mk/bsd.README	Sat Jan  7 17:27:36 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.README,v 1.356 2016/08/20 16:11:07 christos Exp $
+#	$NetBSD: bsd.README,v 1.357 2017/01/07 22:27:36 christos Exp $
 #	@(#)bsd.README	8.2 (Berkeley) 4/2/94
 
 This is the README file for the make "include" files for the NetBSD
@@ -322,6 +322,10 @@ MKNLS		If "no", don't build or install t
 MKNPF		If "no", don't build or install the NPF and its modules.
 		Default: yes
 
+MKNSD		If "no", don't build or install the "nsd" DNS authoritative
+		server.
+		Default: no
+
 MKOBJ		If "no", don't enable the rule which creates objdirs,
 		and also acts as "MKOBJDIRS=no".
 		Default: yes

Index: src/share/mk/bsd.own.mk
diff -u src/share/mk/bsd.own.mk:1.999 src/share/mk/bsd.own.mk:1.1000
--- src/share/mk/bsd.own.mk:1.999	Sun Dec 11 01:37:49 2016
+++ src/share/mk/bsd.own.mk	Sat Jan  7 17:27:36 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.own.mk,v 1.999 2016/12/11 06:37:49 christos Exp $
+#	$NetBSD: bsd.own.mk,v 1.1000 2017/01/07 22:27:36 christos Exp $
 
 # This needs to be before bsd.init.mk
 .if defined(BSD_MK_COMPAT_FILE)
@@ -1115,7 +1115,7 @@ _MKVARS.no= \
 	MKDEBUGLIB MKDTRACE MKEXTSRC MKGROFFHTMLDOC \
 	MKKYUA MKLLD MKLLDB MKLINT \
 	MKMANZ MKMCLINKER MKOBJDIRS \
-	MKLIBCXX MKLLVM MKPCC \
+	MKLIBCXX MKLLVM MKNSD MKPCC \
 	MKPIGZGZIP \
 	MKREPRO \
 	MKSOFTFLOAT MKSTRIPIDENT MKTPM \



CVS commit: src/doc

2017-01-07 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sat Jan  7 21:41:20 UTC 2017

Modified Files:
src/doc: 3RDPARTY

Log Message:
sqlite-3.16.2 out.


To generate a diff of this commit:
cvs rdiff -u -r1.1391 -r1.1392 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.1391 src/doc/3RDPARTY:1.1392
--- src/doc/3RDPARTY:1.1391	Sat Jan  7 20:21:57 2017
+++ src/doc/3RDPARTY	Sat Jan  7 21:41:20 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1391 2017/01/07 20:21:57 christos Exp $
+#	$NetBSD: 3RDPARTY,v 1.1392 2017/01/07 21:41:20 wiz Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -1286,7 +1286,7 @@ original.
 
 Package:	sqlite
 Version:	3.13.0
-Current Vers:	3.16.0
+Current Vers:	3.16.2
 Maintainer:	Richard Hipp 
 Home Page:	http://www.sqlite.org
 Responsible:	joerg



CVS commit: src/external/cddl/osnet

2017-01-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan  7 21:39:53 UTC 2017

Modified Files:
src/external/cddl/osnet/dev/fbt: fbt.c
src/external/cddl/osnet/dev/profile: profile.c
src/external/cddl/osnet/dev/sdt: sdt.c
src/external/cddl/osnet/dev/systrace: systrace.c
src/external/cddl/osnet/dist/uts/common/dtrace: dtrace.c
src/external/cddl/osnet/sys/kern: taskq.c
src/external/cddl/osnet/sys/sys: zfs_context.h
Removed Files:
src/external/cddl/osnet/sys: assert.h
src/external/cddl/osnet/sys/sys: limits.h

Log Message:
PR/51118: Jared McNeill: Fix build on FreeBSD by removing osnet assert.h
and sys/limits.h and use sys/syslimits.h directly.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/external/cddl/osnet/dev/fbt/fbt.c
cvs rdiff -u -r1.6 -r1.7 src/external/cddl/osnet/dev/profile/profile.c
cvs rdiff -u -r1.17 -r1.18 src/external/cddl/osnet/dev/sdt/sdt.c
cvs rdiff -u -r1.8 -r1.9 src/external/cddl/osnet/dev/systrace/systrace.c
cvs rdiff -u -r1.34 -r1.35 \
src/external/cddl/osnet/dist/uts/common/dtrace/dtrace.c
cvs rdiff -u -r1.2 -r0 src/external/cddl/osnet/sys/assert.h
cvs rdiff -u -r1.5 -r1.6 src/external/cddl/osnet/sys/kern/taskq.c
cvs rdiff -u -r1.1 -r0 src/external/cddl/osnet/sys/sys/limits.h
cvs rdiff -u -r1.16 -r1.17 src/external/cddl/osnet/sys/sys/zfs_context.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/cddl/osnet/dev/fbt/fbt.c
diff -u src/external/cddl/osnet/dev/fbt/fbt.c:1.20 src/external/cddl/osnet/dev/fbt/fbt.c:1.21
--- src/external/cddl/osnet/dev/fbt/fbt.c:1.20	Thu Sep 15 23:10:45 2016
+++ src/external/cddl/osnet/dev/fbt/fbt.c	Sat Jan  7 16:39:52 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: fbt.c,v 1.20 2016/09/16 03:10:45 pgoyette Exp $	*/
+/*	$NetBSD: fbt.c,v 1.21 2017/01/07 21:39:52 christos Exp $	*/
 
 /*
  * CDDL HEADER START
@@ -44,7 +44,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
 #include 
 #include 

Index: src/external/cddl/osnet/dev/profile/profile.c
diff -u src/external/cddl/osnet/dev/profile/profile.c:1.6 src/external/cddl/osnet/dev/profile/profile.c:1.7
--- src/external/cddl/osnet/dev/profile/profile.c:1.6	Sat Apr  9 11:17:58 2016
+++ src/external/cddl/osnet/dev/profile/profile.c	Sat Jan  7 16:39:52 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: profile.c,v 1.6 2016/04/09 15:17:58 riastradh Exp $	*/
+/*	$NetBSD: profile.c,v 1.7 2017/01/07 21:39:52 christos Exp $	*/
 
 /*
  * CDDL HEADER START
@@ -44,7 +44,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
 #include 
 #include 

Index: src/external/cddl/osnet/dev/sdt/sdt.c
diff -u src/external/cddl/osnet/dev/sdt/sdt.c:1.17 src/external/cddl/osnet/dev/sdt/sdt.c:1.18
--- src/external/cddl/osnet/dev/sdt/sdt.c:1.17	Sat Jul 16 22:09:10 2016
+++ src/external/cddl/osnet/dev/sdt/sdt.c	Sat Jan  7 16:39:52 2017
@@ -39,7 +39,7 @@
  * unloaded; in particular, probes may not span multiple kernel modules.
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sdt.c,v 1.17 2016/07/17 02:09:10 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sdt.c,v 1.18 2017/01/07 21:39:52 christos Exp $");
 
 #include 
 #include 
@@ -50,7 +50,7 @@ __KERNEL_RCSID(0, "$NetBSD: sdt.c,v 1.17
 #include 
 #endif
 #include 
-#include 
+#include 
 #ifdef __FreeBSD__
 #include 
 #include 

Index: src/external/cddl/osnet/dev/systrace/systrace.c
diff -u src/external/cddl/osnet/dev/systrace/systrace.c:1.8 src/external/cddl/osnet/dev/systrace/systrace.c:1.9
--- src/external/cddl/osnet/dev/systrace/systrace.c:1.8	Thu Sep 24 10:26:44 2015
+++ src/external/cddl/osnet/dev/systrace/systrace.c	Sat Jan  7 16:39:52 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: systrace.c,v 1.8 2015/09/24 14:26:44 christos Exp $	*/
+/*	$NetBSD: systrace.c,v 1.9 2017/01/07 21:39:52 christos Exp $	*/
 
 /*
  * CDDL HEADER START
@@ -41,7 +41,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
 #include 
 #include 

Index: src/external/cddl/osnet/dist/uts/common/dtrace/dtrace.c
diff -u src/external/cddl/osnet/dist/uts/common/dtrace/dtrace.c:1.34 src/external/cddl/osnet/dist/uts/common/dtrace/dtrace.c:1.35
--- src/external/cddl/osnet/dist/uts/common/dtrace/dtrace.c:1.34	Sun Oct  9 10:05:12 2016
+++ src/external/cddl/osnet/dist/uts/common/dtrace/dtrace.c	Sat Jan  7 16:39:53 2017
@@ -119,7 +119,7 @@
 #if !defined(sun)
 
 #include 
-#include 
+#include 
 //#include 
 #include 
 #include 

Index: src/external/cddl/osnet/sys/kern/taskq.c
diff -u src/external/cddl/osnet/sys/kern/taskq.c:1.5 src/external/cddl/osnet/sys/kern/taskq.c:1.6
--- src/external/cddl/osnet/sys/kern/taskq.c:1.5	Sat Apr 11 12:32:07 2015
+++ src/external/cddl/osnet/sys/kern/taskq.c	Sat Jan  7 16:39:53 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: taskq.c,v 1.5 2015/04/11 16:32:07 riastradh Exp $	*/
+/*	$NetBSD: taskq.c,v 1.6 2017/01/07 21:39:53 christos Exp $	*/
 
 /*
  * CDDL HEADER START
@@ -385,7 +385,7 @@
 #include 
 

CVS commit: src/tools/compat

2017-01-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan  7 21:31:07 UTC 2017

Modified Files:
src/tools/compat: configure nbtool_config.h.in

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.85 -r1.86 src/tools/compat/configure
cvs rdiff -u -r1.39 -r1.40 src/tools/compat/nbtool_config.h.in

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

Modified files:

Index: src/tools/compat/configure
diff -u src/tools/compat/configure:1.85 src/tools/compat/configure:1.86
--- src/tools/compat/configure:1.85	Wed Oct 19 17:55:26 2016
+++ src/tools/compat/configure	Sat Jan  7 16:31:07 2017
@@ -4113,7 +4113,7 @@ done
 
 for ac_header in sys/bswap.h machine/bswap.h sys/cdefs.h machine/endian.h \
 	sys/endian.h sys/featuretest.h err.h inttypes.h libgen.h paths.h \
-	stdint.h util.h resolv.h arpa/nameser.h
+	libgen.h stdint.h util.h resolv.h arpa/nameser.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -4507,6 +4507,374 @@ fi
 
 
 # Global variable decls.
+ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "
+#include 
+
+"
+if test "x$ac_cv_have_decl_asprintf" = xyes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_ASPRINTF $ac_have_decl
+_ACEOF
+ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "
+#include 
+
+"
+if test "x$ac_cv_have_decl_vasprintf" = xyes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_VASPRINTF $ac_have_decl
+_ACEOF
+ac_fn_c_check_decl "$LINENO" "vasnprintf" "ac_cv_have_decl_vasnprintf" "
+#include 
+
+"
+if test "x$ac_cv_have_decl_vasnprintf" = xyes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_VASNPRINTF $ac_have_decl
+_ACEOF
+ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "
+#include 
+
+"
+if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_VSNPRINTF $ac_have_decl
+_ACEOF
+ac_fn_c_check_decl "$LINENO" "fgetln" "ac_cv_have_decl_fgetln" "
+#include 
+
+"
+if test "x$ac_cv_have_decl_fgetln" = xyes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FGETLN $ac_have_decl
+_ACEOF
+ac_fn_c_check_decl "$LINENO" "fparseln
+	getdelim" "ac_cv_have_decl_fparseln__getdelim" "
+#include 
+
+"
+if test "x$ac_cv_have_decl_fparseln__getdelim" = xyes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FPARSELN__GETDELIM $ac_have_decl
+_ACEOF
+ac_fn_c_check_decl "$LINENO" "getline" "ac_cv_have_decl_getline" "
+#include 
+
+"
+if test "x$ac_cv_have_decl_getline" = xyes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETLINE $ac_have_decl
+_ACEOF
+ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "
+#include 
+
+"
+if test "x$ac_cv_have_decl_snprintf" = xyes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_SNPRINTF $ac_have_decl
+_ACEOF
+
+
+ac_fn_c_check_decl "$LINENO" "atoll" "ac_cv_have_decl_atoll" "
+#include 
+
+"
+if test "x$ac_cv_have_decl_atoll" = xyes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_ATOLL $ac_have_decl
+_ACEOF
+ac_fn_c_check_decl "$LINENO" "heapsort" "ac_cv_have_decl_heapsort" "
+#include 
+
+"
+if test "x$ac_cv_have_decl_heapsort" = xyes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_HEAPSORT $ac_have_decl
+_ACEOF
+ac_fn_c_check_decl "$LINENO" "mkdtemp" "ac_cv_have_decl_mkdtemp" "
+#include 
+
+"
+if test "x$ac_cv_have_decl_mkdtemp" = xyes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_MKDTEMP $ac_have_decl
+_ACEOF
+ac_fn_c_check_decl "$LINENO" "mkstemp" "ac_cv_have_decl_mkstemp" "
+#include 
+
+"
+if test "x$ac_cv_have_decl_mkstemp" = xyes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_MKSTEMP $ac_have_decl
+_ACEOF
+ac_fn_c_check_decl "$LINENO" "reallocarr" "ac_cv_have_decl_reallocarr" "
+#include 
+
+"
+if test "x$ac_cv_have_decl_reallocarr" = xyes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_REALLOCARR $ac_have_decl
+_ACEOF
+ac_fn_c_check_decl "$LINENO" "setenv" "ac_cv_have_decl_setenv" "
+#include 
+
+"
+if test "x$ac_cv_have_decl_setenv" = xyes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_SETENV $ac_have_decl
+_ACEOF
+ac_fn_c_check_decl "$LINENO" "strtoi" "ac_cv_have_decl_strtoi" "
+#include 
+
+"
+if test 

CVS commit: src/tools/compat

2017-01-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan  7 21:30:42 UTC 2017

Modified Files:
src/tools/compat: configure.ac

Log Message:
strmode on MacOS/X is in string.h


To generate a diff of this commit:
cvs rdiff -u -r1.86 -r1.87 src/tools/compat/configure.ac

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

Modified files:

Index: src/tools/compat/configure.ac
diff -u src/tools/compat/configure.ac:1.86 src/tools/compat/configure.ac:1.87
--- src/tools/compat/configure.ac:1.86	Fri Jan  6 21:52:04 2017
+++ src/tools/compat/configure.ac	Sat Jan  7 16:30:42 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: configure.ac,v 1.86 2017/01/07 02:52:04 christos Exp $
+#	$NetBSD: configure.ac,v 1.87 2017/01/07 21:30:42 christos Exp $
 #
 # Autoconf definition file for libnbcompat.
 #
@@ -158,10 +158,15 @@ AC_CHECK_DECLS([raise_default_signal],,,
 #include 
 ])
 
-AC_CHECK_DECLS([issetugid, pread, pwrite, strmode],,, [
+AC_CHECK_DECLS([issetugid, pread, pwrite],,, [
 #include 
 ])
 
+AC_CHECK_DECLS([strmode],,, [
+#include 
+#include 
+])
+
 AC_CHECK_DECLS([isblank],,, [
 #include 
 ])



CVS commit: src/tools/compat

2017-01-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan  7 21:29:30 UTC 2017

Modified Files:
src/tools/compat: compat_defs.h

Log Message:
adjust for SSP (MacOS/X)


To generate a diff of this commit:
cvs rdiff -u -r1.106 -r1.107 src/tools/compat/compat_defs.h

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

Modified files:

Index: src/tools/compat/compat_defs.h
diff -u src/tools/compat/compat_defs.h:1.106 src/tools/compat/compat_defs.h:1.107
--- src/tools/compat/compat_defs.h:1.106	Fri Jan  6 21:55:19 2017
+++ src/tools/compat/compat_defs.h	Sat Jan  7 16:29:30 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_defs.h,v 1.106 2017/01/07 02:55:19 christos Exp $	*/
+/*	$NetBSD: compat_defs.h,v 1.107 2017/01/07 21:29:30 christos Exp $	*/
 
 #ifndef	__NETBSD_COMPAT_DEFS_H__
 #define	__NETBSD_COMPAT_DEFS_H__
@@ -529,7 +529,7 @@ int snprintb(char *, size_t, const char 
 int snprintb_m(char *, size_t, const char *, uint64_t, size_t);
 #endif
 
-#if !HAVE_DECL_SNPRINTF
+#if !HAVE_DECL_SNPRINTF && !defined(snprintf)
 int snprintf(char *, size_t, const char *, ...);
 #endif
 
@@ -581,7 +581,7 @@ int vasprintf(char **, const char *, va_
 int vasnprintf(char **, size_t, const char *, va_list);
 #endif
 
-#if !HAVE_DECL_VSNPRINTF
+#if !HAVE_DECL_VSNPRINTF && !defined(vsnprintf)
 int vsnprintf(char *, size_t, const char *, va_list);
 #endif
 



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

2017-01-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan  7 21:12:42 UTC 2017

Modified Files:
src/sys/arch/arm/marvell: mvsoc.c

Log Message:
make this compile (but not work) XXX


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/arm/marvell/mvsoc.c

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

Modified files:

Index: src/sys/arch/arm/marvell/mvsoc.c
diff -u src/sys/arch/arm/marvell/mvsoc.c:1.25 src/sys/arch/arm/marvell/mvsoc.c:1.26
--- src/sys/arch/arm/marvell/mvsoc.c:1.25	Sat Jan  7 11:19:28 2017
+++ src/sys/arch/arm/marvell/mvsoc.c	Sat Jan  7 16:12:42 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: mvsoc.c,v 1.25 2017/01/07 16:19:28 kiyohara Exp $	*/
+/*	$NetBSD: mvsoc.c,v 1.26 2017/01/07 21:12:42 christos Exp $	*/
 /*
  * Copyright (c) 2007, 2008, 2013, 2014, 2016 KIYOHARA Takashi
  * All rights reserved.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: mvsoc.c,v 1.25 2017/01/07 16:19:28 kiyohara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mvsoc.c,v 1.26 2017/01/07 21:12:42 christos Exp $");
 
 #include "opt_cputypes.h"
 #include "opt_mvsoc.h"
@@ -148,10 +148,12 @@ static struct {
 	{ MARVELL_TAG_SDRAM_CS3,
 	  MARVELL_ATTR_SDRAM_CS3,	MVSOC_UNITID_DDR },
 
+#ifdef MARVELL_ATTR_AXI_DDR /* XXX */
 	{ MARVELL_TAG_AXI_CS0,
 	  MARVELL_ATTR_AXI_DDR,		MVSOC_UNITID_DDR },
 	{ MARVELL_TAG_AXI_CS1,
 	  MARVELL_ATTR_AXI_DDR,		MVSOC_UNITID_DDR },
+#endif
 
 	{ MARVELL_TAG_DDR3_CS0,
 	  MARVELL_ATTR_SDRAM_CS0,	MVSOC_UNITID_DDR },



CVS commit: src/sys/dev/dmover

2017-01-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan  7 21:11:14 UTC 2017

Modified Files:
src/sys/dev/dmover: swdmover.c

Log Message:
kill alloca in favor of ssp


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/dev/dmover/swdmover.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/dmover/swdmover.c
diff -u src/sys/dev/dmover/swdmover.c:1.13 src/sys/dev/dmover/swdmover.c:1.14
--- src/sys/dev/dmover/swdmover.c:1.13	Thu Aug 20 10:40:17 2015
+++ src/sys/dev/dmover/swdmover.c	Sat Jan  7 16:11:14 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: swdmover.c,v 1.13 2015/08/20 14:40:17 christos Exp $	*/
+/*	$NetBSD: swdmover.c,v 1.14 2017/01/07 21:11:14 christos Exp $	*/
 
 /*
  * Copyright (c) 2002, 2003 Wasabi Systems, Inc.
@@ -49,7 +49,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: swdmover.c,v 1.13 2015/08/20 14:40:17 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: swdmover.c,v 1.14 2017/01/07 21:11:14 christos Exp $");
 
 #include 
 #include 
@@ -147,7 +147,7 @@ swdmover_func_zero_process(struct dmover
 	case DMOVER_BUF_UIO:
 	{
 		struct uio *uio = dreq->dreq_outbuf.dmbuf_uio;
-		char *cp;
+		char cp[1024];
 		size_t count, buflen;
 		int error;
 
@@ -160,9 +160,8 @@ swdmover_func_zero_process(struct dmover
 		}
 
 		buflen = uio->uio_resid;
-		if (buflen > 1024)
-			buflen = 1024;
-		cp = alloca(buflen);
+		if (buflen > sizeof(cp))
+			buflen = sizeof(cp);
 		memset(cp, 0, buflen);
 
 		while ((count = uio->uio_resid) != 0) {
@@ -209,7 +208,7 @@ swdmover_func_fill8_process(struct dmove
 	case DMOVER_BUF_UIO:
 	{
 		struct uio *uio = dreq->dreq_outbuf.dmbuf_uio;
-		char *cp;
+		char cp[1024];
 		size_t count, buflen;
 		int error;
 
@@ -222,9 +221,8 @@ swdmover_func_fill8_process(struct dmove
 		}
 
 		buflen = uio->uio_resid;
-		if (buflen > 1024)
-			buflen = 1024;
-		cp = alloca(buflen);
+		if (buflen > sizeof(cp))
+			buflen = sizeof(cp);
 		memset(cp, dreq->dreq_immediate[0], buflen);
 
 		while ((count = uio->uio_resid) != 0) {
@@ -334,7 +332,7 @@ swdmover_func_xor_process(struct dmover_
 		struct uio *uio_out = dreq->dreq_outbuf.dmbuf_uio;
 		struct uio *uio_in = dreq->dreq_inbuf[0].dmbuf_uio;
 		struct uio *uio;
-		char *cp, *dst;
+		char cp[1024], dst[1024];
 		size_t count, buflen;
 		int error;
 
@@ -349,10 +347,8 @@ swdmover_func_xor_process(struct dmover_
 		}
 
 		buflen = uio_in->uio_resid;
-		if (buflen > 1024)
-			buflen = 1024;
-		cp = alloca(buflen);
-		dst = alloca(buflen);
+		if (buflen > sizeof(cp))
+			buflen = sizeof(cp);
 
 		/*
 		 * For each block, copy first input buffer into the destination
@@ -440,7 +436,7 @@ swdmover_func_copy_process(struct dmover
 	{
 		struct uio *uio_out = dreq->dreq_outbuf.dmbuf_uio;
 		struct uio *uio_in = dreq->dreq_inbuf[0].dmbuf_uio;
-		char *cp;
+		char cp[1024];
 		size_t count, buflen;
 		int error;
 
@@ -455,9 +451,8 @@ swdmover_func_copy_process(struct dmover
 		}
 
 		buflen = uio_in->uio_resid;
-		if (buflen > 1024)
-			buflen = 1024;
-		cp = alloca(buflen);
+		if (buflen > sizeof(cp))
+			buflen = sizeof(cp);
 
 		while ((count = uio_in->uio_resid) != 0) {
 			if (count > buflen)
@@ -595,7 +590,7 @@ swdmover_func_iscsi_crc32c_process(struc
 	case DMOVER_BUF_UIO:
 	{
 		struct uio *uio_in = dreq->dreq_inbuf[0].dmbuf_uio;
-		uint8_t *cp;
+		uint8_t cp[1024];
 		size_t count, buflen;
 		int error;
 
@@ -608,9 +603,8 @@ swdmover_func_iscsi_crc32c_process(struc
 		}
 
 		buflen = uio_in->uio_resid;
-		if (buflen > 1024)
-			buflen = 1024;
-		cp = alloca(buflen);
+		if (buflen > sizeof(cp))
+			buflen = sizeof(cp);
 
 		while ((count = uio_in->uio_resid) != 0) {
 			if (count > buflen)



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

2017-01-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan  7 20:49:23 UTC 2017

Modified Files:
src/distrib/sets/lists/man: mi

Log Message:
more nsd


To generate a diff of this commit:
cvs rdiff -u -r1.1544 -r1.1545 src/distrib/sets/lists/man/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/man/mi
diff -u src/distrib/sets/lists/man/mi:1.1544 src/distrib/sets/lists/man/mi:1.1545
--- src/distrib/sets/lists/man/mi:1.1544	Sat Jan  7 15:20:58 2017
+++ src/distrib/sets/lists/man/mi	Sat Jan  7 15:49:23 2017
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1544 2017/01/07 20:20:58 christos Exp $
+# $NetBSD: mi,v 1.1545 2017/01/07 20:49:23 christos Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -2158,6 +2158,7 @@
 ./usr/share/man/cat5/nisplus_table.0		man-postfix-catman	postfix,.cat
 ./usr/share/man/cat5/nologin.0			man-sysutil-catman	.cat
 ./usr/share/man/cat5/npf.conf.0			man-npf-catman		.cat,npf
+./usr/share/man/cat5/nsd.conf.0			man-nsd-catman		.cat,nsd
 ./usr/share/man/cat5/nsswitch.conf.0		man-net-catman		.cat
 ./usr/share/man/cat5/ntp.conf.0			man-ntp-catman		.cat
 ./usr/share/man/cat5/ntp.keys.0			man-ntp-catman		.cat
@@ -5173,6 +5174,7 @@
 ./usr/share/man/html5/nisplus_table.html	man-postfix-htmlman	postfix,html
 ./usr/share/man/html5/nologin.html		man-sysutil-htmlman	html
 ./usr/share/man/html5/npf.conf.html		man-npf-htmlman		html,npf
+./usr/share/man/html5/nsd.conf.html		man-nsd-htmlman		html,nsd
 ./usr/share/man/html5/nsswitch.conf.html	man-net-htmlman		html
 ./usr/share/man/html5/ntp.conf.html		man-ntp-htmlman		html
 ./usr/share/man/html5/ntp.keys.html		man-ntp-htmlman		html
@@ -8136,6 +8138,7 @@
 ./usr/share/man/man5/nisplus_table.5		man-postfix-man		postfix,.man
 ./usr/share/man/man5/nologin.5			man-sysutil-man		.man
 ./usr/share/man/man5/npf.conf.5			man-npf-man		.man,npf
+./usr/share/man/man5/nsd.conf.5			man-nsd-man		.man,nsd
 ./usr/share/man/man5/nsswitch.conf.5		man-net-man		.man
 ./usr/share/man/man5/ntp.conf.5			man-ntp-man		.man
 ./usr/share/man/man5/ntp.keys.5			man-ntp-man		.man



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

2017-01-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan  7 20:46:29 UTC 2017

Modified Files:
src/distrib/sets/lists/etc: mi

Log Message:
add more nsd


To generate a diff of this commit:
cvs rdiff -u -r1.243 -r1.244 src/distrib/sets/lists/etc/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/etc/mi
diff -u src/distrib/sets/lists/etc/mi:1.243 src/distrib/sets/lists/etc/mi:1.244
--- src/distrib/sets/lists/etc/mi:1.243	Thu Jan  5 09:39:59 2017
+++ src/distrib/sets/lists/etc/mi	Sat Jan  7 15:46:29 2017
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.243 2017/01/05 14:39:59 christos Exp $
+# $NetBSD: mi,v 1.244 2017/01/07 20:46:29 christos Exp $
 #
 # Note: end-user configuration files that are moved to another location
 #	should not be marked "obsolete"; they should just be removed from
@@ -102,6 +102,7 @@
 ./etc/networks	etc-net-etc
 ./etc/newsyslog.confetc-sysutil-etc
 ./etc/nsswitch.confetc-net-etc
+./etc/nsd/nsd.confetc-nsd-etc		nsd
 ./etc/ntp.conf	etc-ntp-etc
 ./etc/obsolete/baseetc-obsolete		obsolete
 ./etc/obsolete/competc-obsolete		obsolete
@@ -250,6 +251,7 @@
 ./etc/rc.d/nfslockingetc-nfsserver-rc
 ./etc/rc.d/npf	etc-npf-rc
 ./etc/rc.d/npfd	etc-npf-rc
+./etc/rc.d/nsd	etc-nsd-rc
 ./etc/rc.d/ntpd	etc-ntp-rc
 ./etc/rc.d/ntpdateetc-ntp-rc
 ./etc/rc.d/perusertmpetc-sys-rc



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

2017-01-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan  7 20:43:16 UTC 2017

Modified Files:
src/distrib/sets/lists/base: mi

Log Message:
add path


To generate a diff of this commit:
cvs rdiff -u -r1.1147 -r1.1148 src/distrib/sets/lists/base/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/base/mi
diff -u src/distrib/sets/lists/base/mi:1.1147 src/distrib/sets/lists/base/mi:1.1148
--- src/distrib/sets/lists/base/mi:1.1147	Sat Jan  7 15:17:21 2017
+++ src/distrib/sets/lists/base/mi	Sat Jan  7 15:43:16 2017
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1147 2017/01/07 20:17:21 christos Exp $
+# $NetBSD: mi,v 1.1148 2017/01/07 20:43:16 christos Exp $
 #
 # Note:	Don't delete entries from here - mark them as "obsolete" instead,
 #	unless otherwise stated below.
@@ -1766,11 +1766,11 @@
 ./usr/sbin/npfd	base-npf-bin		npf
 ./usr/sbin/npfctlbase-obsolete		obsolete
 ./usr/sbin/npftestbase-npf-bin		npf,rump,pic
-nsd		base-nsd-bin		nsd
-nsd-checkconf	base-nsd-bin		nsd
-nsd-checkzone	base-nsd-bin		nsd
-nsd-control-setupbase-nsd-bin		nsd
-nsd-control	base-nsd-bin		nsd
+./usr/sbin/nsd	base-nsd-bin		nsd
+./usr/sbin/nsd-checkconf			base-nsd-bin		nsd
+./usr/sbin/nsd-checkzone			base-nsd-bin		nsd
+./usr/sbin/nsd-control-setup			base-nsd-bin		nsd
+./usr/sbin/nsd-controlbase-nsd-bin		nsd
 ./usr/sbin/nsec3hashbase-bind-bin
 ./usr/sbin/nslookupbase-obsolete		obsolete
 ./usr/sbin/nsquerybase-obsolete		obsolete



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

2017-01-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan  7 20:40:08 UTC 2017

Modified Files:
src/distrib/sets/lists/debug: mi

Log Message:
debug for nsd


To generate a diff of this commit:
cvs rdiff -u -r1.190 -r1.191 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/mi
diff -u src/distrib/sets/lists/debug/mi:1.190 src/distrib/sets/lists/debug/mi:1.191
--- src/distrib/sets/lists/debug/mi:1.190	Sat Jan  7 12:29:24 2017
+++ src/distrib/sets/lists/debug/mi	Sat Jan  7 15:40:08 2017
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.190 2017/01/07 17:29:24 christos Exp $
+# $NetBSD: mi,v 1.191 2017/01/07 20:40:08 christos Exp $
 ./etc/mtree/set.debug   comp-sys-root
 ./usr/lib	comp-sys-usr		compatdir
 ./usr/lib/i18n/libBIG5_g.a			comp-c-debuglib		debuglib,compatfile
@@ -1151,6 +1151,10 @@
 ./usr/libdata/debug/usr/sbin/npfctl.debug	comp-obsolete		obsolete
 ./usr/libdata/debug/usr/sbin/npfd.debug		comp-npf-debug		npf,debug
 ./usr/libdata/debug/usr/sbin/npftest.debug	comp-npf-debug		npf,rump,debug,pic
+./usr/libdata/debug/usr/sbin/nsd.debug		comp-nsd-debug		nsd
+./usr/libdata/debug/usr/sbin/nsd-checkconf.debug	comp-nsd-debug	nsd
+./usr/libdata/debug/usr/sbin/nsd-checkzone.debug	comp-nsd-debug	nsd
+./usr/libdata/debug/usr/sbin/nsd-control.debug		comp-nsd-debug	nsd
 ./usr/libdata/debug/usr/sbin/nsec3hash.debug	comp-bind-debug		debug
 ./usr/libdata/debug/usr/sbin/ntp-keygen.debug	comp-ntp-debug		debug
 ./usr/libdata/debug/usr/sbin/ntpd.debug		comp-ntp-debug		debug



CVS commit: src/doc

2017-01-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan  7 20:21:57 UTC 2017

Modified Files:
src/doc: 3RDPARTY CHANGES

Log Message:
Add nsd


To generate a diff of this commit:
cvs rdiff -u -r1.1390 -r1.1391 src/doc/3RDPARTY
cvs rdiff -u -r1.2232 -r1.2233 src/doc/CHANGES

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

Modified files:

Index: src/doc/3RDPARTY
diff -u src/doc/3RDPARTY:1.1390 src/doc/3RDPARTY:1.1391
--- src/doc/3RDPARTY:1.1390	Tue Jan  3 10:12:25 2017
+++ src/doc/3RDPARTY	Sat Jan  7 15:21:57 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1390 2017/01/03 15:12:25 abhinav Exp $
+#	$NetBSD: 3RDPARTY,v 1.1391 2017/01/07 20:21:57 christos Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -145,6 +145,20 @@ Notes:
 Use cleantags to import
 run configure and update config files in include
 
+Package:	nsd 
+Version:	4.1.14
+Current Vers:	4.1.14
+Maintainer:	Christos Zoulas
+Archive Site:	https://www.nlnetlabs.nl/svn/nsd/
+Home Page:	https://www.nlnetlabs.nl/projects/nsd/
+Mailing List:	https://open.nlnetlabs.nl/mailman/listinfo/nsd-users/	
+Responsible:	christos
+License:	BSD-like
+Location:	external/bsd/nsd/dist
+Notes:
+Use cleantags to import
+run configure and update config files in include
+
 Package:	libbind [libc resolver and includes]
 Version:	libbind-6.0-rc1
 Current Vers:	libbind-6.0

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.2232 src/doc/CHANGES:1.2233
--- src/doc/CHANGES:1.2232	Sat Jan  7 00:57:27 2017
+++ src/doc/CHANGES	Sat Jan  7 15:21:57 2017
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2232 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2233 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -444,3 +444,4 @@ Changes from NetBSD 7.0 to NetBSD 8.0:
 	ptrace(2): Add new si_code value of SIGTRAP: TRAP_EXEC [kamil 20170107]
 	ptrace(2): Add signal information accessors API:
 		PT_GET_SIGINFO and PT_SET_SIGINFO [kamil 20170107]
+	nsd(8): Add the NSD Authoritative DNS server [christos 20170107]



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

2017-01-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan  7 20:20:58 UTC 2017

Modified Files:
src/distrib/sets/lists/man: mi

Log Message:
more nsd


To generate a diff of this commit:
cvs rdiff -u -r1.1543 -r1.1544 src/distrib/sets/lists/man/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/man/mi
diff -u src/distrib/sets/lists/man/mi:1.1543 src/distrib/sets/lists/man/mi:1.1544
--- src/distrib/sets/lists/man/mi:1.1543	Sat Jan  7 12:29:24 2017
+++ src/distrib/sets/lists/man/mi	Sat Jan  7 15:20:58 2017
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1543 2017/01/07 17:29:24 christos Exp $
+# $NetBSD: mi,v 1.1544 2017/01/07 20:20:58 christos Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -2785,6 +2785,10 @@
 ./usr/share/man/cat8/npfctl.0			man-npf-catman		.cat,npf
 ./usr/share/man/cat8/npfd.0			man-npf-catman		.cat,npf
 ./usr/share/man/cat8/nqmgr.0			man-obsolete		obsolete
+./usr/share/man/cat8/nsd.0 			man-nsd-catman		.cat,nsd
+./usr/share/man/cat8/nsd-checkconf.0		man-nsd-catman		.cat,nsd
+./usr/share/man/cat8/nsd-checkzone.0		man-nsd-catman		.cat,nsd
+./usr/share/man/cat8/nsd-control.0		man-nsd-catman		.cat,nsd
 ./usr/share/man/cat8/nsec3hash.0		man-bind-catman		.cat
 ./usr/share/man/cat8/nslookup.0			man-netutil-catman	.cat
 ./usr/share/man/cat8/nsupdate.0			man-obsolete		obsolete
@@ -5658,6 +5662,10 @@
 ./usr/share/man/html8/npf.conf.html		man-obsolete		obsolete
 ./usr/share/man/html8/npfctl.html		man-npf-htmlman		html,npf
 ./usr/share/man/html8/npfd.html			man-npf-htmlman		html,npf
+./usr/share/man/html8/nsd.html			man-nsd-htmlman		html,nsd
+./usr/share/man/html8/nsd-checkconf.html	man-nsd-htmlman		html,nsd
+./usr/share/man/html8/nsd-checkzone.html	man-nsd-htmlman		html,nsd
+./usr/share/man/html8/nsd-control.html		man-nsd-htmlman		html,nsd
 ./usr/share/man/html8/nsec3hash.html		man-bind-htmlman	html
 ./usr/share/man/html8/nslookup.html		man-netutil-htmlman	html
 ./usr/share/man/html8/nsupdate.html		man-obsolete		obsolete
@@ -8755,6 +8763,10 @@
 ./usr/share/man/man8/npfctl.8			man-npf-man		.man,npf
 ./usr/share/man/man8/npfd.8			man-npf-man		.man,npf
 ./usr/share/man/man8/nqmgr.8			man-obsolete		obsolete
+./usr/share/man/man8/nsd.8 			man-nsd-man		.man,nsd
+./usr/share/man/man8/nsd-checkconf.8		man-nsd-man		.man,nsd
+./usr/share/man/man8/nsd-checkzone.8		man-nsd-man		.man,nsd
+./usr/share/man/man8/nsd-control.8		man-nsd-man		.man,nsd
 ./usr/share/man/man8/nsec3hash.8		man-bind-man		.man
 ./usr/share/man/man8/nslookup.8			man-netutil-man		.man
 ./usr/share/man/man8/nsupdate.8			man-obsolete		obsolete



CVS commit: src/sys/arch/sparc64/sparc64

2017-01-07 Thread Palle Lyckegaard
Module Name:src
Committed By:   palle
Date:   Sat Jan  7 20:19:09 UTC 2017

Modified Files:
src/sys/arch/sparc64/sparc64: locore.s

Log Message:
sun4v: slowtrap() now selects normal globals properly on both sun4u and sun4v 
platforms. Verified using qemu for both sun4u and sun4v systems


To generate a diff of this commit:
cvs rdiff -u -r1.404 -r1.405 src/sys/arch/sparc64/sparc64/locore.s

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/sparc64/sparc64/locore.s
diff -u src/sys/arch/sparc64/sparc64/locore.s:1.404 src/sys/arch/sparc64/sparc64/locore.s:1.405
--- src/sys/arch/sparc64/sparc64/locore.s:1.404	Thu Jan  5 20:37:06 2017
+++ src/sys/arch/sparc64/sparc64/locore.s	Sat Jan  7 20:19:09 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.s,v 1.404 2017/01/05 20:37:06 palle Exp $	*/
+/*	$NetBSD: locore.s,v 1.405 2017/01/07 20:19:09 palle Exp $	*/
 
 /*
  * Copyright (c) 2006-2010 Matthew R. Green
@@ -3151,7 +3151,20 @@ Lslowtrap_reenter:
 	mov	%g2, %o2		! (pc)
 	sth	%o1, [%sp + CC64FSZ + STKB + TF_TT]! debug
 
-	wrpr	%g0, PSTATE_KERN, %pstate		! Get back to normal globals
+	! Get back to normal globals
+#ifdef SUN4V
+	sethi	%hi(cputyp), %g5
+	ld	[%g5 + %lo(cputyp)], %g5
+	cmp	%g5, CPU_SUN4V
+	bne,pt	%icc, 1f
+	 nop
+	NORMAL_GLOBALS_SUN4V
+	ba	2f
+	 nop
+1:	
+#endif	
+	NORMAL_GLOBALS_SUN4U
+2:
 	stx	%g1, [%sp + CC64FSZ + STKB + TF_G + (1*8)]
 	stx	%g2, [%sp + CC64FSZ + STKB + TF_G + (2*8)]
 	add	%sp, CC64FSZ + STKB, %o0		! ()



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

2017-01-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan  7 20:17:21 UTC 2017

Modified Files:
src/distrib/sets/lists/base: mi

Log Message:
more nsd


To generate a diff of this commit:
cvs rdiff -u -r1.1146 -r1.1147 src/distrib/sets/lists/base/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/base/mi
diff -u src/distrib/sets/lists/base/mi:1.1146 src/distrib/sets/lists/base/mi:1.1147
--- src/distrib/sets/lists/base/mi:1.1146	Sat Jan  7 15:10:09 2017
+++ src/distrib/sets/lists/base/mi	Sat Jan  7 15:17:21 2017
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1146 2017/01/07 20:10:09 christos Exp $
+# $NetBSD: mi,v 1.1147 2017/01/07 20:17:21 christos Exp $
 #
 # Note:	Don't delete entries from here - mark them as "obsolete" instead,
 #	unless otherwise stated below.
@@ -1766,6 +1766,11 @@
 ./usr/sbin/npfd	base-npf-bin		npf
 ./usr/sbin/npfctlbase-obsolete		obsolete
 ./usr/sbin/npftestbase-npf-bin		npf,rump,pic
+nsd		base-nsd-bin		nsd
+nsd-checkconf	base-nsd-bin		nsd
+nsd-checkzone	base-nsd-bin		nsd
+nsd-control-setupbase-nsd-bin		nsd
+nsd-control	base-nsd-bin		nsd
 ./usr/sbin/nsec3hashbase-bind-bin
 ./usr/sbin/nslookupbase-obsolete		obsolete
 ./usr/sbin/nsquerybase-obsolete		obsolete



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

2017-01-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan  7 20:10:09 UTC 2017

Modified Files:
src/distrib/sets/lists/base: mi

Log Message:
add nsd


To generate a diff of this commit:
cvs rdiff -u -r1.1145 -r1.1146 src/distrib/sets/lists/base/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/base/mi
diff -u src/distrib/sets/lists/base/mi:1.1145 src/distrib/sets/lists/base/mi:1.1146
--- src/distrib/sets/lists/base/mi:1.1145	Sat Jan  7 12:29:24 2017
+++ src/distrib/sets/lists/base/mi	Sat Jan  7 15:10:09 2017
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1145 2017/01/07 17:29:24 christos Exp $
+# $NetBSD: mi,v 1.1146 2017/01/07 20:10:09 christos Exp $
 #
 # Note:	Don't delete entries from here - mark them as "obsolete" instead,
 #	unless otherwise stated below.
@@ -105,6 +105,7 @@
 ./etc/mtree	base-sys-root
 ./etc/mtree/set.basebase-sys-root
 ./etc/namedb	base-bind-root
+./etc/nsd	base-sys-root
 ./etc/obsolete	base-obsolete		obsolete
 ./etc/openldap	base-ldap-root
 ./etc/openssl	base-crypto-root
@@ -5910,6 +5911,12 @@
 ./var/chroot/named/var/run/lwresd		base-bind-root
 ./var/chroot/named/var/run/named		base-bind-root
 ./var/chroot/named/var/tmp			base-bind-root
+./var/chroot/nsdbase-sys-root
+./var/chroot/nsd/etcbase-sys-root
+./var/chroot/nsd/etc/nsd			base-sys-root
+./var/chroot/nsd/varbase-sys-root
+./var/chroot/nsd/var/dbbase-sys-root
+./var/chroot/nsd/var/db/nsd			base-sys-root
 ./var/chroot/ntpdbase-ntp-root
 ./var/chroot/ntpd/devbase-ntp-root
 ./var/chroot/ntpd/etcbase-ntp-root



CVS commit: src/etc/mtree

2017-01-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan  7 20:00:08 UTC 2017

Modified Files:
src/etc/mtree: NetBSD.dist.base

Log Message:
add nsd


To generate a diff of this commit:
cvs rdiff -u -r1.154 -r1.155 src/etc/mtree/NetBSD.dist.base

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

Modified files:

Index: src/etc/mtree/NetBSD.dist.base
diff -u src/etc/mtree/NetBSD.dist.base:1.154 src/etc/mtree/NetBSD.dist.base:1.155
--- src/etc/mtree/NetBSD.dist.base:1.154	Sat Aug 20 07:21:50 2016
+++ src/etc/mtree/NetBSD.dist.base	Sat Jan  7 15:00:07 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: NetBSD.dist.base,v 1.154 2016/08/20 11:21:50 christos Exp $
+#	$NetBSD: NetBSD.dist.base,v 1.155 2017/01/07 20:00:07 christos Exp $
 #	@(#)4.4BSD.dist	8.1 (Berkeley) 6/13/93
 
 # Do not customize this file as it may be overwritten on upgrades.
@@ -41,6 +41,7 @@
 ./etc/mail
 ./etc/mtree
 ./etc/namedb
+./etc/nsd
 ./etc/openldap
 ./etc/openssl
 ./etc/openssl/certs
@@ -1270,6 +1271,12 @@
 ./var/chroot/named/var/run/lwresd	mode=0775 gname=named
 ./var/chroot/named/var/run/named	mode=0775 gname=named
 ./var/chroot/named/var/tmp	mode=01775 gname=named
+./var/chroot/nsd		mode=0755 uname=_nsd gname=_nsd
+./var/chroot/nsd/etc		mode=0755 uname=_nsd gname=_nsd
+./var/chroot/nsd/etc/nsd	mode=0755 uname=_nsd gname=_nsd
+./var/chroot/nsd/var		mode=0755 uname=_nsd gname=_nsd
+./var/chroot/nsd/var/db		mode=0755 uname=_nsd gname=_nsd
+./var/chroot/nsd/var/db/nsd	mode=0755 uname=_nsd gname=_nsd
 ./var/chroot/ntpd
 ./var/chroot/ntpd/dev
 ./var/chroot/ntpd/etc



CVS commit: src/etc

2017-01-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan  7 20:00:33 UTC 2017

Modified Files:
src/etc: group master.passwd
src/etc/defaults: rc.conf

Log Message:
add nsd


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/etc/group
cvs rdiff -u -r1.48 -r1.49 src/etc/master.passwd
cvs rdiff -u -r1.138 -r1.139 src/etc/defaults/rc.conf

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

Modified files:

Index: src/etc/group
diff -u src/etc/group:1.33 src/etc/group:1.34
--- src/etc/group:1.33	Sat Aug 20 07:21:50 2016
+++ src/etc/group	Sat Jan  7 15:00:33 2017
@@ -28,6 +28,7 @@ _gpio:*:29:
 _rtadvd:*:30:
 guest:*:31:root
 _unbound:*:32:
+_nsd:*:33:
 nobody:*:39:
 utmp:*:45:
 authpf:*:72:

Index: src/etc/master.passwd
diff -u src/etc/master.passwd:1.48 src/etc/master.passwd:1.49
--- src/etc/master.passwd:1.48	Sat Aug 20 07:21:50 2016
+++ src/etc/master.passwd	Sat Jan  7 15:00:33 2017
@@ -20,5 +20,6 @@ _tcpdump:*:27:27::0:0:& pseudo-user:/var
 _tss:*:28:28::0:0:& pseudo-user:/var/tpm:/sbin/nologin
 _rtadvd:*:30:30::0:0:& pseudo-user:/var/chroot/rtadvd:/sbin/nologin
 _unbound:*:32:32::0:0:& pseudo-user:/var/chroot/unbound:/sbin/nologin
+_nsd:*:33:33::0:0:& pseudo-user:/var/chroot/unbound:/sbin/nologin
 uucp:*:66:1::0:0:UNIX-to-UNIX Copy:/nonexistent:/sbin/nologin
 nobody:*:32767:39::0:0:Unprivileged user:/nonexistent:/sbin/nologin

Index: src/etc/defaults/rc.conf
diff -u src/etc/defaults/rc.conf:1.138 src/etc/defaults/rc.conf:1.139
--- src/etc/defaults/rc.conf:1.138	Thu Jan  5 09:39:09 2017
+++ src/etc/defaults/rc.conf	Sat Jan  7 15:00:33 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: rc.conf,v 1.138 2017/01/05 14:39:09 christos Exp $
+#	$NetBSD: rc.conf,v 1.139 2017/01/07 20:00:33 christos Exp $
 #
 # /etc/defaults/rc.conf --
 #	default configuration of /etc/rc.conf
@@ -392,3 +392,8 @@ ip6addrctl_verbose=NO
 # Unbound
 unbound=NO
 unbound_chrootdir=/var/chroot/unbound
+
+# Nsd
+nsd=NO
+nsd_chrootdir=/var/chroot/nsd
+nsd_flags="-t ${nsd_chrootdir}"



CVS commit: src/usr.sbin/postinstall

2017-01-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan  7 19:55:35 UTC 2017

Modified Files:
src/usr.sbin/postinstall: postinstall

Log Message:
add nsd


To generate a diff of this commit:
cvs rdiff -u -r1.207 -r1.208 src/usr.sbin/postinstall/postinstall

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

Modified files:

Index: src/usr.sbin/postinstall/postinstall
diff -u src/usr.sbin/postinstall/postinstall:1.207 src/usr.sbin/postinstall/postinstall:1.208
--- src/usr.sbin/postinstall/postinstall:1.207	Mon Jan  2 19:35:07 2017
+++ src/usr.sbin/postinstall/postinstall	Sat Jan  7 14:55:35 2017
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: postinstall,v 1.207 2017/01/03 00:35:07 jnemeth Exp $
+# $NetBSD: postinstall,v 1.208 2017/01/07 19:55:35 christos Exp $
 #
 # Copyright (c) 2002-2015 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -1046,7 +1046,7 @@ do_gid()
 	"${SRC_DIR}/etc/group" 14 \
 	named ntpd sshd SKIP _pflogd _rwhod staff _proxy _timedc \
 	_sdpd _httpd _mdnsd _tests _tcpdump _tss _gpio _rtadvd SKIP \
-	_unbound
+	_unbound _nsd
 }
 
 #
@@ -1531,6 +1531,10 @@ do_rc()
 	"${SRC_DIR}/external/bsd/unbound/etc/rc.d"
 	failed=$(( ${failed} + $? ))
 
+	update_rc "${op}" "${dir}" nsd \
+	"${SRC_DIR}/external/bsd/nsd/etc/rc.d"
+	failed=$(( ${failed} + $? ))
+
 	if $SOURCEMODE && [ -n "${generated_scripts}" ]; then
 		# generate scripts
 		mkdir "${SCRATCHDIR}/rc"
@@ -1879,7 +1883,7 @@ do_uid()
 	"${SRC_DIR}/etc/master.passwd" 12 \
 	postfix SKIP named ntpd sshd SKIP _pflogd _rwhod SKIP _proxy \
 	_timedc _sdpd _httpd _mdnsd _tests _tcpdump _tss SKIP _rtadvd \
-	SKIP _unbound
+	SKIP _unbound _nsd
 }
 
 



CVS commit: src/external/bsd/nsd/dist

2017-01-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan  7 19:53:21 UTC 2017

Modified Files:
src/external/bsd/nsd/dist: util.h

Log Message:
undef debug


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/nsd/dist/util.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/bsd/nsd/dist/util.h
diff -u src/external/bsd/nsd/dist/util.h:1.1.1.1 src/external/bsd/nsd/dist/util.h:1.2
--- src/external/bsd/nsd/dist/util.h:1.1.1.1	Sat Jan  7 14:42:00 2017
+++ src/external/bsd/nsd/dist/util.h	Sat Jan  7 14:53:21 2017
@@ -268,6 +268,7 @@ read_uint64(const void *src)
 
 extern unsigned nsd_debug_facilities;
 extern int nsd_debug_level;
+#undef DEBUG	/* XXX */
 #ifdef NDEBUG
 #define DEBUG(facility, level, args)  /* empty */
 #else



CVS commit: src/external/bsd

2017-01-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan  7 19:53:50 UTC 2017

Modified Files:
src/external/bsd: Makefile

Log Message:
Add nsd


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 src/external/bsd/Makefile

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

Modified files:

Index: src/external/bsd/Makefile
diff -u src/external/bsd/Makefile:1.55 src/external/bsd/Makefile:1.56
--- src/external/bsd/Makefile:1.55	Sat Aug 20 07:24:48 2016
+++ src/external/bsd/Makefile	Sat Jan  7 14:53:49 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.55 2016/08/20 11:24:48 christos Exp $
+#	$NetBSD: Makefile,v 1.56 2017/01/07 19:53:49 christos Exp $
 
 .include 
 
@@ -32,6 +32,9 @@ SUBDIR+= libc++
 .if (${MKLLVM} != "no")
 SUBDIR+= llvm
 .endif
+.if (${MKNSD} != "no")
+SUBDIR+= nsd
+.endif
 .if (${MKPCC} != "no")
 SUBDIR+= pcc
 .endif



CVS commit: src/external/bsd/nsd

2017-01-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan  7 19:51:22 UTC 2017

Added Files:
src/external/bsd/nsd: Makefile Makefile.inc
src/external/bsd/nsd/etc: Makefile
src/external/bsd/nsd/etc/rc.d: Makefile nsd
src/external/bsd/nsd/include: config.h
src/external/bsd/nsd/lib: Makefile Makefile.inc
src/external/bsd/nsd/lib/libnsd: Makefile
src/external/bsd/nsd/lib/libxfrd: Makefile
src/external/bsd/nsd/sbin: Makefile Makefile.inc
src/external/bsd/nsd/sbin/nsd: Makefile
src/external/bsd/nsd/sbin/nsd-checkconf: Makefile
src/external/bsd/nsd/sbin/nsd-checkzone: Makefile
src/external/bsd/nsd/sbin/nsd-control: Makefile
src/external/bsd/nsd/sbin/nsd-control-setup: Makefile

Log Message:
Add nsd build glue


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/external/bsd/nsd/Makefile \
src/external/bsd/nsd/Makefile.inc
cvs rdiff -u -r0 -r1.1 src/external/bsd/nsd/etc/Makefile
cvs rdiff -u -r0 -r1.1 src/external/bsd/nsd/etc/rc.d/Makefile \
src/external/bsd/nsd/etc/rc.d/nsd
cvs rdiff -u -r0 -r1.1 src/external/bsd/nsd/include/config.h
cvs rdiff -u -r0 -r1.1 src/external/bsd/nsd/lib/Makefile \
src/external/bsd/nsd/lib/Makefile.inc
cvs rdiff -u -r0 -r1.1 src/external/bsd/nsd/lib/libnsd/Makefile
cvs rdiff -u -r0 -r1.1 src/external/bsd/nsd/lib/libxfrd/Makefile
cvs rdiff -u -r0 -r1.1 src/external/bsd/nsd/sbin/Makefile \
src/external/bsd/nsd/sbin/Makefile.inc
cvs rdiff -u -r0 -r1.1 src/external/bsd/nsd/sbin/nsd/Makefile
cvs rdiff -u -r0 -r1.1 src/external/bsd/nsd/sbin/nsd-checkconf/Makefile
cvs rdiff -u -r0 -r1.1 src/external/bsd/nsd/sbin/nsd-checkzone/Makefile
cvs rdiff -u -r0 -r1.1 src/external/bsd/nsd/sbin/nsd-control/Makefile
cvs rdiff -u -r0 -r1.1 src/external/bsd/nsd/sbin/nsd-control-setup/Makefile

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

Added files:

Index: src/external/bsd/nsd/Makefile
diff -u /dev/null src/external/bsd/nsd/Makefile:1.1
--- /dev/null	Sat Jan  7 14:51:22 2017
+++ src/external/bsd/nsd/Makefile	Sat Jan  7 14:51:21 2017
@@ -0,0 +1,5 @@
+#	$NetBSD: Makefile,v 1.1 2017/01/07 19:51:21 christos Exp $
+
+SUBDIR+= lib .WAIT sbin etc
+
+.include 
Index: src/external/bsd/nsd/Makefile.inc
diff -u /dev/null src/external/bsd/nsd/Makefile.inc:1.1
--- /dev/null	Sat Jan  7 14:51:22 2017
+++ src/external/bsd/nsd/Makefile.inc	Sat Jan  7 14:51:21 2017
@@ -0,0 +1,31 @@
+# $NetBSD: Makefile.inc,v 1.1 2017/01/07 19:51:21 christos Exp $
+
+USE_FORT?= yes  # network client/server
+
+NSD:=${.PARSEDIR}/dist
+
+CPPFLAGS+=-D_OPENBSD_SOURCE
+CPPFLAGS+=-I${NSD} -I${NSD}/../include
+.PATH: ${NSD}
+
+DPLIBS+= event ${NETBSDSRCDIR}/external/bsd/libevent/lib/libevent
+DPLIBS+= ssl ${NETBSDSRCDIR}/crypto/external/bsd/openssl/lib/libssl
+DPLIBS+= crypto ${NETBSDSRCDIR}/crypto/external/bsd/openssl/lib/libcrypto
+DPLIBS+= crypt ${NETBSDSRCDIR}/lib/libcrypt
+DPLIBS+= util ${NETBSDSRCDIR}/lib/libutil
+DPLIBS+= pthread ${NETBSDSRCDIR}/lib/libpthread
+
+__subst: .USE
+	${TOOL_SED} \
+	-e s,@nsdconfigfile@,/etc/nsd/nsd.conf, \
+	-e s,@configdir@,/etc/nsd, \
+	-e s,@dbfile@,/var/db/nsd/nsd.db, \
+	-e s,@pidfile@,/var/run/nsd.pid, \
+	-e s,@zonelistfile@,/var/db/nsd/zone.list, \
+	-e s,@zonesdir@,/etc/namedb, \
+	-e s,@user@,_nsd, \
+	-e s,@logfile@,/var/log/nsd.log, \
+	-e s,@xfrdfile@,/var/db/nsd/xfdr.state, \
+	-e s,@xfrddir@,/var/tmp, \
+	-e s,@chrootdir@,/var/chroot/nsd, \
+	-e s,@ratelimit_default@,0, < ${.ALLSRC} > ${.TARGET}

Index: src/external/bsd/nsd/etc/Makefile
diff -u /dev/null src/external/bsd/nsd/etc/Makefile:1.1
--- /dev/null	Sat Jan  7 14:51:22 2017
+++ src/external/bsd/nsd/etc/Makefile	Sat Jan  7 14:51:21 2017
@@ -0,0 +1,13 @@
+#	$NetBSD: Makefile,v 1.1 2017/01/07 19:51:21 christos Exp $
+
+SUBDIR=rc.d
+
+FILESDIR=   /etc/nsd
+FILESMODE=644
+FILES=	nsd.conf
+
+nsd.conf: nsd.conf.sample.in __subst
+CLEANFILES+= nsd.conf
+
+.include 
+.include 

Index: src/external/bsd/nsd/etc/rc.d/Makefile
diff -u /dev/null src/external/bsd/nsd/etc/rc.d/Makefile:1.1
--- /dev/null	Sat Jan  7 14:51:22 2017
+++ src/external/bsd/nsd/etc/rc.d/Makefile	Sat Jan  7 14:51:21 2017
@@ -0,0 +1,6 @@
+#	$NetBSD: Makefile,v 1.1 2017/01/07 19:51:21 christos Exp $
+
+SCRIPTS=nsd
+SCRIPTSDIR=/etc/rc.d
+
+.include 
Index: src/external/bsd/nsd/etc/rc.d/nsd
diff -u /dev/null src/external/bsd/nsd/etc/rc.d/nsd:1.1
--- /dev/null	Sat Jan  7 14:51:22 2017
+++ src/external/bsd/nsd/etc/rc.d/nsd	Sat Jan  7 14:51:21 2017
@@ -0,0 +1,75 @@
+#!/bin/sh
+#
+# $NetBSD: nsd,v 1.1 2017/01/07 19:51:21 christos Exp $
+#
+
+# PROVIDE: named
+# REQUIRE: NETWORKING mountcritremote syslogd
+# BEFORE:  DAEMON
+# KEYWORD: chrootdir
+
+$_rc_subr_loaded . /etc/rc.subr
+
+name="nsd"
+rcvar=$name
+command="/usr/sbin/${name}"
+pidfile="/var/run/${name}.pid"
+required_files="/etc/${name}/${name}.conf"

CVS import: src/external/bsd/nsd/dist

2017-01-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan  7 19:42:02 UTC 2017

Update of /cvsroot/src/external/bsd/nsd/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv29546

Log Message:
Import nsd

Status:

Vendor Tag: NLNETLABS
Release Tags:   nsd-4-1-14

N src/external/bsd/nsd/dist/configlexer.c
N src/external/bsd/nsd/dist/axfr.c
N src/external/bsd/nsd/dist/tsig-openssl.h
N src/external/bsd/nsd/dist/rrl.c
N src/external/bsd/nsd/dist/udbzone.h
N src/external/bsd/nsd/dist/LICENSE
N src/external/bsd/nsd/dist/region-allocator.h
N src/external/bsd/nsd/dist/iterated_hash.h
N src/external/bsd/nsd/dist/nsec3.h
N src/external/bsd/nsd/dist/nsd.8.in
N src/external/bsd/nsd/dist/remote.h
N src/external/bsd/nsd/dist/server.c
N src/external/bsd/nsd/dist/packet.h
N src/external/bsd/nsd/dist/query.c
N src/external/bsd/nsd/dist/answer.h
N src/external/bsd/nsd/dist/buffer.h
N src/external/bsd/nsd/dist/nsd.h
N src/external/bsd/nsd/dist/nsec3.c
N src/external/bsd/nsd/dist/configure.ac
N src/external/bsd/nsd/dist/xfrd-tcp.c
N src/external/bsd/nsd/dist/zonec.h
N src/external/bsd/nsd/dist/xfrd-disk.c
N src/external/bsd/nsd/dist/remote.c
N src/external/bsd/nsd/dist/udb.h
N src/external/bsd/nsd/dist/configparser.h
N src/external/bsd/nsd/dist/xfrd-tcp.h
N src/external/bsd/nsd/dist/tsig-openssl.c
N src/external/bsd/nsd/dist/netio.c
N src/external/bsd/nsd/dist/nsd.c
N src/external/bsd/nsd/dist/axfr.h
N src/external/bsd/nsd/dist/tsig.c
N src/external/bsd/nsd/dist/rrl.h
N src/external/bsd/nsd/dist/configyyrename.h
N src/external/bsd/nsd/dist/nsd.conf.sample.in
N src/external/bsd/nsd/dist/tsig.h
N src/external/bsd/nsd/dist/nsd.conf.5.in
N src/external/bsd/nsd/dist/nsd-control.c
N src/external/bsd/nsd/dist/rdata.h
N src/external/bsd/nsd/dist/configparser.c
N src/external/bsd/nsd/dist/answer.c
N src/external/bsd/nsd/dist/xfrd.h
N src/external/bsd/nsd/dist/xfrd.c
N src/external/bsd/nsd/dist/xfrd-notify.c
N src/external/bsd/nsd/dist/nsd-checkconf.c
N src/external/bsd/nsd/dist/Makefile.in
N src/external/bsd/nsd/dist/configure
N src/external/bsd/nsd/dist/packet.c
N src/external/bsd/nsd/dist/radtree.h
N src/external/bsd/nsd/dist/mini_event.h
N src/external/bsd/nsd/dist/netio.h
N src/external/bsd/nsd/dist/configparser.y
N src/external/bsd/nsd/dist/options.h
N src/external/bsd/nsd/dist/difffile.c
N src/external/bsd/nsd/dist/dns.c
N src/external/bsd/nsd/dist/xfrd-notify.h
N src/external/bsd/nsd/dist/xfrd-disk.h
N src/external/bsd/nsd/dist/namedb.h
N src/external/bsd/nsd/dist/radtree.c
N src/external/bsd/nsd/dist/zlexer.c
N src/external/bsd/nsd/dist/zlexer.lex
N src/external/bsd/nsd/dist/buffer.c
N src/external/bsd/nsd/dist/difffile.h
N src/external/bsd/nsd/dist/dbaccess.c
N src/external/bsd/nsd/dist/dname.c
N src/external/bsd/nsd/dist/install-sh
N src/external/bsd/nsd/dist/dname.h
N src/external/bsd/nsd/dist/namedb.c
N src/external/bsd/nsd/dist/edns.h
N src/external/bsd/nsd/dist/dns.h
N src/external/bsd/nsd/dist/nsd-mem.c
N src/external/bsd/nsd/dist/ipc.h
N src/external/bsd/nsd/dist/rbtree.h
N src/external/bsd/nsd/dist/mini_event.c
N src/external/bsd/nsd/dist/edns.c
N src/external/bsd/nsd/dist/mkinstalldirs
N src/external/bsd/nsd/dist/nsd-control.8.in
N src/external/bsd/nsd/dist/region-allocator.c
N src/external/bsd/nsd/dist/nsd-checkzone.c
N src/external/bsd/nsd/dist/dbcreate.c
N src/external/bsd/nsd/dist/util.h
N src/external/bsd/nsd/dist/zparser.h
N src/external/bsd/nsd/dist/config.h.in
N src/external/bsd/nsd/dist/acx_nlnetlabs.m4
N src/external/bsd/nsd/dist/zparser.c
N src/external/bsd/nsd/dist/lookup3.c
N src/external/bsd/nsd/dist/udbradtree.c
N src/external/bsd/nsd/dist/ipc.c
N src/external/bsd/nsd/dist/rdata.c
N src/external/bsd/nsd/dist/lookup3.h
N src/external/bsd/nsd/dist/zparser.y
N src/external/bsd/nsd/dist/udbzone.c
N src/external/bsd/nsd/dist/udbradtree.h
N src/external/bsd/nsd/dist/zonec.c
N src/external/bsd/nsd/dist/nsd-control-setup.sh.in
N src/external/bsd/nsd/dist/query.h
N src/external/bsd/nsd/dist/udb.c
N src/external/bsd/nsd/dist/configlexer.lex
N src/external/bsd/nsd/dist/options.c
N src/external/bsd/nsd/dist/iterated_hash.c
N src/external/bsd/nsd/dist/nsd-checkconf.8.in
N src/external/bsd/nsd/dist/util.c
N src/external/bsd/nsd/dist/rbtree.c
N src/external/bsd/nsd/dist/nsd-checkzone.8.in
N src/external/bsd/nsd/dist/doc/LICENSE
N src/external/bsd/nsd/dist/doc/TODO
N src/external/bsd/nsd/dist/doc/NSD-FOR-BIND-USERS
N src/external/bsd/nsd/dist/doc/NSD-4-features
N src/external/bsd/nsd/dist/doc/NEW-CFG-OPTION
N src/external/bsd/nsd/dist/doc/NSD-DATABASE
N src/external/bsd/nsd/dist/doc/TESTPLAN
N src/external/bsd/nsd/dist/doc/ChangeLog
N src/external/bsd/nsd/dist/doc/coding-style
N src/external/bsd/nsd/dist/doc/differences.tex
N src/external/bsd/nsd/dist/doc/NSD-DIFFFILE
N src/external/bsd/nsd/dist/doc/UPGRADING
N src/external/bsd/nsd/dist/doc/README.svn
N src/external/bsd/nsd/dist/doc/differences.pdf
N src/external/bsd/nsd/dist/doc/REQUIREMENTS
N src/external/bsd/nsd/dist/doc/README
N 

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

2017-01-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan  7 19:04:24 UTC 2017

Modified Files:
src/sys/arch/arm/include: signal.h

Log Message:
include  for sigset_t


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/arm/include/signal.h

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

Modified files:

Index: src/sys/arch/arm/include/signal.h
diff -u src/sys/arch/arm/include/signal.h:1.13 src/sys/arch/arm/include/signal.h:1.14
--- src/sys/arch/arm/include/signal.h:1.13	Tue Jan 28 19:42:15 2014
+++ src/sys/arch/arm/include/signal.h	Sat Jan  7 14:04:24 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: signal.h,v 1.13 2014/01/29 00:42:15 matt Exp $	*/
+/*	$NetBSD: signal.h,v 1.14 2017/01/07 19:04:24 christos Exp $	*/
 
 /*
  * Copyright (c) 1994-1996 Mark Brinicombe.
@@ -47,6 +47,7 @@
 #define _ARM_SIGNAL_H_
 
 #include 
+#include 
 
 #ifndef _LOCORE
 typedef int sig_atomic_t;



CVS commit: src/etc

2017-01-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan  7 18:50:50 UTC 2017

Modified Files:
src/etc: newsyslog.conf

Log Message:
npflog0.pcap is binary


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/etc/newsyslog.conf

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

Modified files:

Index: src/etc/newsyslog.conf
diff -u src/etc/newsyslog.conf:1.22 src/etc/newsyslog.conf:1.23
--- src/etc/newsyslog.conf:1.22	Sat Jan  7 11:34:50 2017
+++ src/etc/newsyslog.conf	Sat Jan  7 13:50:50 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: newsyslog.conf,v 1.22 2017/01/07 16:34:50 christos Exp $
+#	$NetBSD: newsyslog.conf,v 1.23 2017/01/07 18:50:50 christos Exp $
 #
 # Configuration file for newsyslog(8).
 #
@@ -8,7 +8,7 @@
 /var/log/cron		root:wheel	600  3100  *Z
 /var/log/kerberos.log			640  7*24   ZN
 /var/log/lpd-errs			640  7100  *Z
-/var/log/npflog0.pcap			600  7100  *Z
+/var/log/npflog0.pcap			600  7100  *ZB
 /var/log/maillog			600  7*24   Z
 /var/log/messages			644  10   250  *Z
 /var/log/wtmp		root:utmp	664  7*168  ZBN



CVS commit: src/usr.sbin/npf/npfd

2017-01-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan  7 18:48:47 UTC 2017

Modified Files:
src/usr.sbin/npf/npfd: npfd.8

Log Message:
add example.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/npf/npfd/npfd.8

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

Modified files:

Index: src/usr.sbin/npf/npfd/npfd.8
diff -u src/usr.sbin/npf/npfd/npfd.8:1.1 src/usr.sbin/npf/npfd/npfd.8:1.2
--- src/usr.sbin/npf/npfd/npfd.8:1.1	Sat Jan  7 11:48:03 2017
+++ src/usr.sbin/npf/npfd/npfd.8	Sat Jan  7 13:48:47 2017
@@ -1,4 +1,4 @@
-.\"	$NetBSD: npfd.8,v 1.1 2017/01/07 16:48:03 christos Exp $
+.\"	$NetBSD: npfd.8,v 1.2 2017/01/07 18:48:47 christos Exp $
 .\"	$OpenBSD: pflogd.8,v 1.35 2007/05/31 19:19:47 jmc Exp $
 .\"
 .\" Copyright (c) 2001 Can Erkin Acar.  All rights reserved.
@@ -225,7 +225,27 @@ The direction was outbound.
 Display the logs in real time of inbound packets that were blocked on
 the wi0 interface:
 .Bd -literal -offset indent
-# tcpdump -n -e -ttt -i pflog0 inbound and action block and on wi0
+# tcpdump -n -e -ttt -i npflog0 inbound and action block and on wi0
+.Ed
+.Pp
+Each
+.Xr npf 4
+rule is marked with an id number, shown using:
+.Bd -literal -offset indent
+# npfctl show
+...
+block final all apply "log" # id="45" 
+...
+.Ed
+.Pp
+This id is the rule id shown by tcpdump:
+.Bd -literal -offset indent
+# tcpdump -enr /var/log/npflog0.pcap
+...
+11:26:02.288199 rule 45.rules.0/0(match): block in on sk0: \e
+1.2.3.4.46063 > 5.6.7.8.23231: Flags [S], seq 1, win 8192, \e
+options [mss 1440], length 0
+...
 .Ed
 .Sh SEE ALSO
 .Xr pcap 3 ,
@@ -233,6 +253,7 @@ the wi0 interface:
 .Xr npf.conf 5 ,
 .Xr newsyslog 8 ,
 .Xr npf 7 ,
+.Xr npfctl 8 ,
 .Xr tcpdump 8
 .Sh HISTORY
 The



CVS commit: src/usr.bin/xlint/lint1

2017-01-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan  7 18:28:49 UTC 2017

Modified Files:
src/usr.bin/xlint/lint1: cgram.y scan.l

Log Message:
add pcs


To generate a diff of this commit:
cvs rdiff -u -r1.91 -r1.92 src/usr.bin/xlint/lint1/cgram.y
cvs rdiff -u -r1.76 -r1.77 src/usr.bin/xlint/lint1/scan.l

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/xlint/lint1/cgram.y
diff -u src/usr.bin/xlint/lint1/cgram.y:1.91 src/usr.bin/xlint/lint1/cgram.y:1.92
--- src/usr.bin/xlint/lint1/cgram.y:1.91	Fri Dec 30 14:53:08 2016
+++ src/usr.bin/xlint/lint1/cgram.y	Sat Jan  7 13:28:49 2017
@@ -1,5 +1,5 @@
 %{
-/* $NetBSD: cgram.y,v 1.91 2016/12/30 19:53:08 christos Exp $ */
+/* $NetBSD: cgram.y,v 1.92 2017/01/07 18:28:49 christos Exp $ */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All Rights Reserved.
@@ -35,7 +35,7 @@
 
 #include 
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: cgram.y,v 1.91 2016/12/30 19:53:08 christos Exp $");
+__RCSID("$NetBSD: cgram.y,v 1.92 2017/01/07 18:28:49 christos Exp $");
 #endif
 
 #include 
@@ -220,6 +220,7 @@ anonymize(sym_t *s)
 %token 		T_AT_NORETURN
 %token 		T_AT_NO_INSTRUMENT_FUNCTION
 %token 		T_AT_PACKED
+%token 		T_AT_PCS
 %token 		T_AT_PURE
 %token 		T_AT_RETURNS_TWICE
 %token 		T_AT_SECTION
@@ -528,6 +529,7 @@ type_attribute_spec:
 	| T_AT_NONNULL T_LPARN constant T_RPARN
 	| T_AT_MODE T_LPARN T_NAME T_RPARN
 	| T_AT_ALIAS T_LPARN string T_RPARN
+	| T_AT_PCS T_LPARN string T_RPARN
 	| T_AT_SECTION T_LPARN string T_RPARN
 	| T_AT_ALIGNED 
 	| T_AT_CONSTRUCTOR 

Index: src/usr.bin/xlint/lint1/scan.l
diff -u src/usr.bin/xlint/lint1/scan.l:1.76 src/usr.bin/xlint/lint1/scan.l:1.77
--- src/usr.bin/xlint/lint1/scan.l:1.76	Fri Dec 30 14:53:08 2016
+++ src/usr.bin/xlint/lint1/scan.l	Sat Jan  7 13:28:49 2017
@@ -1,5 +1,5 @@
 %{
-/* $NetBSD: scan.l,v 1.76 2016/12/30 19:53:08 christos Exp $ */
+/* $NetBSD: scan.l,v 1.77 2017/01/07 18:28:49 christos Exp $ */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All Rights Reserved.
@@ -35,7 +35,7 @@
 
 #include 
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: scan.l,v 1.76 2016/12/30 19:53:08 christos Exp $");
+__RCSID("$NetBSD: scan.l,v 1.77 2017/01/07 18:28:49 christos Exp $");
 #endif
 
 #include 
@@ -252,6 +252,7 @@ static	struct	kwtab {
 	{ "noreturn",	T_AT_NORETURN,	0,	0,	0,	  0,0,1,1,5 },
 	{ "packed",	T_AT_PACKED,	0,	0,	0,	  0,0,1,1,5 },
 	{ "packed",	T_PACKED,	0,	0,	0,	  0,0,0,0,2 },
+	{ "pcs",	T_AT_PCS,	0,	0,	0,	  0,0,0,0,5 },
 	{ "printf",	T_AT_FORMAT_PRINTF,0,	0,	0,	  0,0,1,1,5 },
 	{ "pure",	T_AT_PURE,	0,	0,	0,	  0,0,1,1,5 },
 	{ "real",	T_REAL,		0,	0,	0,	  0,1,0,0,4 },



CVS commit: src/distrib/sets/lists

2017-01-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan  7 17:29:24 UTC 2017

Modified Files:
src/distrib/sets/lists/base: mi
src/distrib/sets/lists/debug: mi
src/distrib/sets/lists/man: mi

Log Message:
add npfd


To generate a diff of this commit:
cvs rdiff -u -r1.1144 -r1.1145 src/distrib/sets/lists/base/mi
cvs rdiff -u -r1.189 -r1.190 src/distrib/sets/lists/debug/mi
cvs rdiff -u -r1.1542 -r1.1543 src/distrib/sets/lists/man/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/base/mi
diff -u src/distrib/sets/lists/base/mi:1.1144 src/distrib/sets/lists/base/mi:1.1145
--- src/distrib/sets/lists/base/mi:1.1144	Thu Jan  5 08:45:50 2017
+++ src/distrib/sets/lists/base/mi	Sat Jan  7 12:29:24 2017
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1144 2017/01/05 13:45:50 wiz Exp $
+# $NetBSD: mi,v 1.1145 2017/01/07 17:29:24 christos Exp $
 #
 # Note:	Don't delete entries from here - mark them as "obsolete" instead,
 #	unless otherwise stated below.
@@ -1762,6 +1762,7 @@
 ./usr/sbin/netgroup_mkdb			base-nis-bin
 ./usr/sbin/nfsd	base-nfsserver-bin
 ./usr/sbin/nfsiodbase-obsolete		obsolete
+./usr/sbin/npfd	base-npf-bin		npf
 ./usr/sbin/npfctlbase-obsolete		obsolete
 ./usr/sbin/npftestbase-npf-bin		npf,rump,pic
 ./usr/sbin/nsec3hashbase-bind-bin

Index: src/distrib/sets/lists/debug/mi
diff -u src/distrib/sets/lists/debug/mi:1.189 src/distrib/sets/lists/debug/mi:1.190
--- src/distrib/sets/lists/debug/mi:1.189	Thu Jan  5 08:45:51 2017
+++ src/distrib/sets/lists/debug/mi	Sat Jan  7 12:29:24 2017
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.189 2017/01/05 13:45:51 wiz Exp $
+# $NetBSD: mi,v 1.190 2017/01/07 17:29:24 christos Exp $
 ./etc/mtree/set.debug   comp-sys-root
 ./usr/lib	comp-sys-usr		compatdir
 ./usr/lib/i18n/libBIG5_g.a			comp-c-debuglib		debuglib,compatfile
@@ -1149,6 +1149,7 @@
 ./usr/libdata/debug/usr/sbin/netgroup_mkdb.debug	comp-nis-debug		debug
 ./usr/libdata/debug/usr/sbin/nfsd.debug		comp-nfsserver-debug	debug
 ./usr/libdata/debug/usr/sbin/npfctl.debug	comp-obsolete		obsolete
+./usr/libdata/debug/usr/sbin/npfd.debug		comp-npf-debug		npf,debug
 ./usr/libdata/debug/usr/sbin/npftest.debug	comp-npf-debug		npf,rump,debug,pic
 ./usr/libdata/debug/usr/sbin/nsec3hash.debug	comp-bind-debug		debug
 ./usr/libdata/debug/usr/sbin/ntp-keygen.debug	comp-ntp-debug		debug

Index: src/distrib/sets/lists/man/mi
diff -u src/distrib/sets/lists/man/mi:1.1542 src/distrib/sets/lists/man/mi:1.1543
--- src/distrib/sets/lists/man/mi:1.1542	Thu Jan  5 08:45:51 2017
+++ src/distrib/sets/lists/man/mi	Sat Jan  7 12:29:24 2017
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1542 2017/01/05 13:45:51 wiz Exp $
+# $NetBSD: mi,v 1.1543 2017/01/07 17:29:24 christos Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -2783,6 +2783,7 @@
 ./usr/share/man/cat8/nologin.0			man-sysutil-catman	.cat
 ./usr/share/man/cat8/npf.conf.0			man-obsolete		obsolete
 ./usr/share/man/cat8/npfctl.0			man-npf-catman		.cat,npf
+./usr/share/man/cat8/npfd.0			man-npf-catman		.cat,npf
 ./usr/share/man/cat8/nqmgr.0			man-obsolete		obsolete
 ./usr/share/man/cat8/nsec3hash.0		man-bind-catman		.cat
 ./usr/share/man/cat8/nslookup.0			man-netutil-catman	.cat
@@ -5656,6 +5657,7 @@
 ./usr/share/man/html8/nologin.html		man-sysutil-htmlman	html
 ./usr/share/man/html8/npf.conf.html		man-obsolete		obsolete
 ./usr/share/man/html8/npfctl.html		man-npf-htmlman		html,npf
+./usr/share/man/html8/npfd.html			man-npf-htmlman		html,npf
 ./usr/share/man/html8/nsec3hash.html		man-bind-htmlman	html
 ./usr/share/man/html8/nslookup.html		man-netutil-htmlman	html
 ./usr/share/man/html8/nsupdate.html		man-obsolete		obsolete
@@ -8751,6 +8753,7 @@
 ./usr/share/man/man8/nologin.8			man-sysutil-man		.man
 ./usr/share/man/man8/npf.conf.8			man-obsolete		obsolete
 ./usr/share/man/man8/npfctl.8			man-npf-man		.man,npf
+./usr/share/man/man8/npfd.8			man-npf-man		.man,npf
 ./usr/share/man/man8/nqmgr.8			man-obsolete		obsolete
 ./usr/share/man/man8/nsec3hash.8		man-bind-man		.man
 ./usr/share/man/man8/nslookup.8			man-netutil-man		.man



CVS commit: src/usr.sbin/npf

2017-01-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan  7 17:27:03 UTC 2017

Modified Files:
src/usr.sbin/npf: Makefile

Log Message:
descend to npfd


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/usr.sbin/npf/Makefile

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

Modified files:

Index: src/usr.sbin/npf/Makefile
diff -u src/usr.sbin/npf/Makefile:1.5 src/usr.sbin/npf/Makefile:1.6
--- src/usr.sbin/npf/Makefile:1.5	Sat Aug  2 19:57:40 2014
+++ src/usr.sbin/npf/Makefile	Sat Jan  7 12:27:02 2017
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.5 2014/08/02 23:57:40 rmind Exp $
+# $NetBSD: Makefile,v 1.6 2017/01/07 17:27:02 christos Exp $
 
 .include 
 
-SUBDIR=		npfctl
+SUBDIR=		npfctl npfd
 
 .if ${MKRUMP} != "no" && ${MKPIC} != "no"
 SUBDIR+=	npftest



CVS commit: src/usr.sbin/npf/npfd

2017-01-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan  7 16:48:03 UTC 2017

Modified Files:
src/usr.sbin/npf/npfd: Makefile npfd.c npfd_log.c
Added Files:
src/usr.sbin/npf/npfd: npfd.8

Log Message:
add man page, lint cleanups.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/npf/npfd/Makefile
cvs rdiff -u -r0 -r1.1 src/usr.sbin/npf/npfd/npfd.8
cvs rdiff -u -r1.5 -r1.6 src/usr.sbin/npf/npfd/npfd.c
cvs rdiff -u -r1.7 -r1.8 src/usr.sbin/npf/npfd/npfd_log.c

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

Modified files:

Index: src/usr.sbin/npf/npfd/Makefile
diff -u src/usr.sbin/npf/npfd/Makefile:1.4 src/usr.sbin/npf/npfd/Makefile:1.5
--- src/usr.sbin/npf/npfd/Makefile:1.4	Fri Jan  6 14:20:24 2017
+++ src/usr.sbin/npf/npfd/Makefile	Sat Jan  7 11:48:03 2017
@@ -1,12 +1,11 @@
-# $NetBSD: Makefile,v 1.4 2017/01/06 19:20:24 christos Exp $
+# $NetBSD: Makefile,v 1.5 2017/01/07 16:48:03 christos Exp $
 #
 # Public Domain
 #
 
-NOMAN=
 PROG=		npfd
+MAN=		npfd.8
 
-DBG=-g
 SRCS=		npfd.c npfd_log.c
 CPPFLAGS+=	-I${.CURDIR}
 
@@ -14,6 +13,5 @@ LDADD+=		-lnpf -lpcap -lutil
 DPADD+=		${LIBNPF} ${LIBPCAP} ${LIBUTIL}
 
 WARNS=		5
-NOLINT=		# disabled deliberately
 
 .include 

Index: src/usr.sbin/npf/npfd/npfd.c
diff -u src/usr.sbin/npf/npfd/npfd.c:1.5 src/usr.sbin/npf/npfd/npfd.c:1.6
--- src/usr.sbin/npf/npfd/npfd.c:1.5	Fri Jan  6 14:20:24 2017
+++ src/usr.sbin/npf/npfd/npfd.c	Sat Jan  7 11:48:03 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: npfd.c,v 1.5 2017/01/06 19:20:24 christos Exp $	*/
+/*	$NetBSD: npfd.c,v 1.6 2017/01/07 16:48:03 christos Exp $	*/
 
 /*-
  * Copyright (c) 2015 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: npfd.c,v 1.5 2017/01/06 19:20:24 christos Exp $");
+__RCSID("$NetBSD: npfd.c,v 1.6 2017/01/07 16:48:03 christos Exp $");
 
 #include 
 #include 
@@ -98,6 +98,7 @@ npfd_event_loop(npfd_log_t *log, int del
 continue;
 			syslog(LOG_ERR, "poll failed: %m");
 			exit(EXIT_FAILURE);
+			/*NOTREACHED*/
 		case 0:
 			npfd_log_flush(log);
 			continue;

Index: src/usr.sbin/npf/npfd/npfd_log.c
diff -u src/usr.sbin/npf/npfd/npfd_log.c:1.7 src/usr.sbin/npf/npfd/npfd_log.c:1.8
--- src/usr.sbin/npf/npfd/npfd_log.c:1.7	Sat Jan  7 11:36:54 2017
+++ src/usr.sbin/npf/npfd/npfd_log.c	Sat Jan  7 11:48:03 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: npfd_log.c,v 1.7 2017/01/07 16:36:54 christos Exp $	*/
+/*	$NetBSD: npfd_log.c,v 1.8 2017/01/07 16:48:03 christos Exp $	*/
 
 /*-
  * Copyright (c) 2015 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: npfd_log.c,v 1.7 2017/01/07 16:36:54 christos Exp $");
+__RCSID("$NetBSD: npfd_log.c,v 1.8 2017/01/07 16:48:03 christos Exp $");
 
 #include 
 #include 
@@ -100,7 +100,7 @@ npfd_log_gethdr(npfd_log_t *ctx, struct 
 	return fp;
 out:
 	fclose(fp);
-	hdr->magic = -1;
+	hdr->magic = (uint32_t)-1;
 	return NULL;
 }
 
@@ -170,7 +170,7 @@ fix:
 		syslog(LOG_WARNING,
 		"Incomplete last packet in `%s', truncating",
 		ctx->path);
-		if (truncate(ctx->path, o) == -1) {
+		if (truncate(ctx->path, (off_t)o) == -1) {
 			syslog(LOG_ERR, "Cannot truncate `%s': %m", ctx->path);
 			goto rename;
 		}
@@ -324,7 +324,7 @@ npfd_log(npfd_log_t *ctx)
 {
 	pcap_dumper_t *dumper = ctx->dumper;
 
-	pcap_dispatch(ctx->pcap, PCAP_NPACKETS, pcap_dump, (uint8_t *)dumper);
+	pcap_dispatch(ctx->pcap, PCAP_NPACKETS, pcap_dump, (void *)dumper);
 }
 
 void

Added files:

Index: src/usr.sbin/npf/npfd/npfd.8
diff -u /dev/null src/usr.sbin/npf/npfd/npfd.8:1.1
--- /dev/null	Sat Jan  7 11:48:03 2017
+++ src/usr.sbin/npf/npfd/npfd.8	Sat Jan  7 11:48:03 2017
@@ -0,0 +1,244 @@
+.\"	$NetBSD: npfd.8,v 1.1 2017/01/07 16:48:03 christos Exp $
+.\"	$OpenBSD: pflogd.8,v 1.35 2007/05/31 19:19:47 jmc Exp $
+.\"
+.\" Copyright (c) 2001 Can Erkin Acar.  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 DISCLAIMED.
+.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED 

CVS commit: src/usr.sbin/npf/npfd

2017-01-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan  7 16:36:54 UTC 2017

Modified Files:
src/usr.sbin/npf/npfd: npfd_log.c

Log Message:
restrict permissions on log file


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/usr.sbin/npf/npfd/npfd_log.c

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

Modified files:

Index: src/usr.sbin/npf/npfd/npfd_log.c
diff -u src/usr.sbin/npf/npfd/npfd_log.c:1.6 src/usr.sbin/npf/npfd/npfd_log.c:1.7
--- src/usr.sbin/npf/npfd/npfd_log.c:1.6	Fri Jan  6 14:20:24 2017
+++ src/usr.sbin/npf/npfd/npfd_log.c	Sat Jan  7 11:36:54 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: npfd_log.c,v 1.6 2017/01/06 19:20:24 christos Exp $	*/
+/*	$NetBSD: npfd_log.c,v 1.7 2017/01/07 16:36:54 christos Exp $	*/
 
 /*-
  * Copyright (c) 2015 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: npfd_log.c,v 1.6 2017/01/06 19:20:24 christos Exp $");
+__RCSID("$NetBSD: npfd_log.c,v 1.7 2017/01/07 16:36:54 christos Exp $");
 
 #include 
 #include 
@@ -260,6 +260,8 @@ npfd_log_create(const char *filename, co
 bool
 npfd_log_reopen(npfd_log_t *ctx, bool die)
 {
+	mode_t omask = umask(077);
+
 	if (ctx->dumper)
 		pcap_dump_close(ctx->dumper);
 	/*
@@ -277,6 +279,7 @@ npfd_log_reopen(npfd_log_t *ctx, bool di
 		ctx->dumper = pcap_dump_open_append(ctx->pcap, ctx->path);
 		break;
 	}
+	(void)umask(omask);
 
 	if (ctx->dumper == NULL) {
 		if (die)



CVS commit: src/etc

2017-01-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan  7 16:34:50 UTC 2017

Modified Files:
src/etc: newsyslog.conf

Log Message:
rotate npflog0.pcap


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/etc/newsyslog.conf

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

Modified files:

Index: src/etc/newsyslog.conf
diff -u src/etc/newsyslog.conf:1.21 src/etc/newsyslog.conf:1.22
--- src/etc/newsyslog.conf:1.21	Mon Sep 18 18:39:37 2006
+++ src/etc/newsyslog.conf	Sat Jan  7 11:34:50 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: newsyslog.conf,v 1.21 2006/09/18 22:39:37 hubertf Exp $
+#	$NetBSD: newsyslog.conf,v 1.22 2017/01/07 16:34:50 christos Exp $
 #
 # Configuration file for newsyslog(8).
 #
@@ -8,6 +8,7 @@
 /var/log/cron		root:wheel	600  3100  *Z
 /var/log/kerberos.log			640  7*24   ZN
 /var/log/lpd-errs			640  7100  *Z
+/var/log/npflog0.pcap			600  7100  *Z
 /var/log/maillog			600  7*24   Z
 /var/log/messages			644  10   250  *Z
 /var/log/wtmp		root:utmp	664  7*168  ZBN



CVS commit: src/etc/etc.evbarm

2017-01-07 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Sat Jan  7 16:29:04 UTC 2017

Modified Files:
src/etc/etc.evbarm: Makefile.inc

Log Message:
Add CUBOX to v7 and v7hf.


To generate a diff of this commit:
cvs rdiff -u -r1.80 -r1.81 src/etc/etc.evbarm/Makefile.inc

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

Modified files:

Index: src/etc/etc.evbarm/Makefile.inc
diff -u src/etc/etc.evbarm/Makefile.inc:1.80 src/etc/etc.evbarm/Makefile.inc:1.81
--- src/etc/etc.evbarm/Makefile.inc:1.80	Tue May 17 06:44:45 2016
+++ src/etc/etc.evbarm/Makefile.inc	Sat Jan  7 16:29:04 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.80 2016/05/17 06:44:45 ryo Exp $
+#	$NetBSD: Makefile.inc,v 1.81 2017/01/07 16:29:04 kiyohara Exp $
 #
 #	etc.evbarm/Makefile.inc -- evbarm-specific etc Makefile targets
 #
@@ -98,6 +98,8 @@ EVBARM_BOARDS.armv7+=		CUBIEBOARD
 EVBARM_BOARDS.armv7hf+= 	CUBIEBOARD
 EVBARM_BOARDS.armv7+=		CUBIETRUCK
 EVBARM_BOARDS.armv7hf+= 	CUBIETRUCK
+EVBARM_BOARDS.armv7+=		CUBOX
+EVBARM_BOARDS.armv7hf+= 	CUBOX
 EVBARM_BOARDS.armv7+=		CUBOX-I
 EVBARM_BOARDS.armv7hf+= 	CUBOX-I
 EVBARM_BOARDS.armv7+=		HUMMINGBIRD_A31



CVS commit: src/sys/dev/sdmmc

2017-01-07 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Jan  7 16:24:40 UTC 2017

Modified Files:
src/sys/dev/sdmmc: ld_sdmmc.c

Log Message:
Add missing includes


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/dev/sdmmc/ld_sdmmc.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/sdmmc/ld_sdmmc.c
diff -u src/sys/dev/sdmmc/ld_sdmmc.c:1.24 src/sys/dev/sdmmc/ld_sdmmc.c:1.25
--- src/sys/dev/sdmmc/ld_sdmmc.c:1.24	Sat Jan  7 14:49:53 2017
+++ src/sys/dev/sdmmc/ld_sdmmc.c	Sat Jan  7 16:24:40 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: ld_sdmmc.c,v 1.24 2017/01/07 14:49:53 kiyohara Exp $	*/
+/*	$NetBSD: ld_sdmmc.c,v 1.25 2017/01/07 16:24:40 martin Exp $	*/
 
 /*
  * Copyright (c) 2008 KIYOHARA Takashi
@@ -28,7 +28,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ld_sdmmc.c,v 1.24 2017/01/07 14:49:53 kiyohara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ld_sdmmc.c,v 1.25 2017/01/07 16:24:40 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_sdmmc.h"
@@ -44,7 +44,9 @@ __KERNEL_RCSID(0, "$NetBSD: ld_sdmmc.c,v
 #include 
 #include 
 #include 
+#include 
 #include 
+#include 
 #include 
 
 #include 



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

2017-01-07 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Sat Jan  7 16:24:07 UTC 2017

Modified Files:
src/sys/arch/evbarm/conf: README.evbarm
Added Files:
src/sys/arch/evbarm/conf: CUBOX

Log Message:
Support SolidRun Cubox.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/sys/arch/evbarm/conf/CUBOX
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/evbarm/conf/README.evbarm

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

Modified files:

Index: src/sys/arch/evbarm/conf/README.evbarm
diff -u src/sys/arch/evbarm/conf/README.evbarm:1.13 src/sys/arch/evbarm/conf/README.evbarm:1.14
--- src/sys/arch/evbarm/conf/README.evbarm:1.13	Sat Oct 15 15:33:02 2016
+++ src/sys/arch/evbarm/conf/README.evbarm	Sat Jan  7 16:24:07 2017
@@ -1,4 +1,4 @@
-$NetBSD: README.evbarm,v 1.13 2016/10/15 15:33:02 kiyohara Exp $
+$NetBSD: README.evbarm,v 1.14 2017/01/07 16:24:07 kiyohara Exp $
 
 config		date		boards
 ---
@@ -13,6 +13,7 @@ BEAGLEBONE	2012/08/20	TI AM335x BeagleBo
 BPI		2014/09/07	Banana Pi
 CUBIEBOARD	2013/09/03	Cubietech Cubieboard 1 & 2
 CUBIETRUCK	2014/04/11	Cubietech Cubietruck
+CUBOX		2017/01/07	SolidRun Cubox
 CP3100		2006/11/08	Certance IOP321 CP-3100
 DEVKIT8000	2010/09/08	Embest OMAP3530 DevKit8000 eval Kit 
 DNS323		2010/10/02	D-Link DNS-323 Marvell SoC based NAS

Added files:

Index: src/sys/arch/evbarm/conf/CUBOX
diff -u /dev/null src/sys/arch/evbarm/conf/CUBOX:1.1
--- /dev/null	Sat Jan  7 16:24:07 2017
+++ src/sys/arch/evbarm/conf/CUBOX	Sat Jan  7 16:24:07 2017
@@ -0,0 +1,417 @@
+# $NetBSD: CUBOX,v 1.1 2017/01/07 16:24:07 kiyohara Exp $
+#
+#	CUBOX -- SolidRun Ltd. Cubox kernel
+#
+
+include	"arch/evbarm/conf/std.marvell"
+
+#options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
+
+# estimated number of users
+
+maxusers	32
+
+# Board Type
+makeoptions	BOARDTYPE="cubox"
+options 	EVBARM_BOARDTYPE=cubox
+
+# CPU options
+options 	CPU_PJ4B	# : CPU is PJ4
+options 	ARM_HAS_VBAR
+options 	FPU_VFP
+makeoptions	CPUFLAGS="-march=armv7-a -mfpu=vfpv3"
+
+# Marvell SoC options
+options 	DOVE
+
+# Standard system options
+
+options 	INSECURE	# disable kernel security levels - X needs this
+
+options 	RTC_OFFSET=0	# hardware clock is this many mins. west of GMT
+#options 	NTP		# NTP phase/frequency locked loop
+options 	KTRACE		# system call tracing via ktrace(1)
+
+# Note: SysV IPC parameters can be changed dynamically; see sysctl(8).
+options 	SYSVMSG		# System V-like message queues
+options 	SYSVSEM		# System V-like semaphores
+options 	SYSVSHM		# System V-like memory sharing
+
+#options 	USERCONF	# userconf(4) support
+#options 	PIPE_SOCKETPAIR	# smaller, but slower pipe(2)
+options 	SYSCTL_INCLUDE_DESCR	# Include sysctl descriptions in kernel
+
+# Alternate buffer queue strategies for better responsiveness under high
+# disk I/O load.
+#options 	BUFQ_READPRIO
+options 	BUFQ_PRIOCSCAN
+
+# Diagnostic/debugging support options
+#options 	VERBOSE_INIT_ARM # verbose bootstraping messages
+#options 	PERFCTRS	# performance counters
+options 	DIAGNOSTIC	# internally consistency checks
+
+#options 	DEBUG
+#options 	PMAP_DEBUG	# Enable pmap_debug_level code
+options 	LOCKDEBUG	# expensive locking checks/support
+options 	IRQSTATS	# manage IRQ statistics
+#options 	NO_POWERSAVE	# uncomment this to run under ICE
+
+#makeoptions	COPTS="-O2"
+options 	DDB			# in-kernel debugger
+#options 	DDB_KEYCODE=0x1d	# ^]
+#options 	DDB_COMMANDONENTER="bt"	# execute command when ddb is entered
+options 	DDB_ONPANIC=1		# see also sysctl(7): `ddb.onpanic'
+options 	DDB_HISTORY_SIZE=100	# Enable history editing in DDB
+options 	DDB_VERBOSE_HELP
+#options 	IPKDB			# remote kernel debugging
+#options	KGDB
+#options 	KGDB_DEVRATE=115200
+makeoptions	DEBUG="-g"		# compile full symbol table
+makeoptions	COPY_SYMTAB=1
+#options 	SYSCALL_STATS			# per syscall counts
+#options 	SYSCALL_TIMES			# per syscall times
+#options 	SYSCALL_TIMES_HASCOUNTER	# use 'broken' rdtsc (soekris)
+
+
+# Compatibility options
+options 	COMPAT_NETBSD32 # allow running arm (e.g. non-earm) binaries
+#options 	COMPAT_43	# 4.3BSD compatibility.
+#options 	COMPAT_09	# NetBSD 0.9,
+#options 	COMPAT_10	# NetBSD 1.0,
+#options 	COMPAT_11	# NetBSD 1.1,
+#options 	COMPAT_12	# NetBSD 1.2,
+#options 	COMPAT_13	# NetBSD 1.3,
+#options 	COMPAT_14	# NetBSD 1.4,
+#options 	COMPAT_15	# NetBSD 1.5,
+#options 	COMPAT_16	# NetBSD 1.6,
+#options 	COMPAT_20	# NetBSD 2.0,
+#options 	COMPAT_30	# NetBSD 3.0,
+#options 	COMPAT_40	# NetBSD 4.0,
+#options 	COMPAT_50	# NetBSD 5.0,
+options 	COMPAT_60	# NetBSD 6.0, and
+options 	COMPAT_70	# NetBSD 7.0 binary compatibility.
+#options 	TCP_COMPAT_42	# 4.2BSD TCP/IP bug compat. Not recommended.
+
+options 	COMPAT_OSSAUDIO	# OSS (Voxware) audio driver compatibility
+#options 	COMPAT_NDIS	# NDIS network driver
+options 	COMPAT_BSDPTY	# /dev/[pt]ty?? ptys.
+
+# Wedge support

CVS commit: src/sys/arch

2017-01-07 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Sat Jan  7 16:19:29 UTC 2017

Modified Files:
src/sys/arch/arm/arm: cpufunc_asm_pj4b.S
src/sys/arch/arm/marvell: armadaxp.c armadaxpvar.h files.marvell
kirkwood.c mv78xx0.c mvsoc.c mvsoc_space.c mvsocreg.h mvsocvar.h
orion.c
src/sys/arch/evbarm/armadaxp: armadaxp_machdep.c
src/sys/arch/evbarm/marvell: marvell_machdep.c marvellreg.h
Added Files:
src/sys/arch/arm/marvell: dove.c dovereg.h mvsoc_sdhc.c mvsocpmu.c
mvsocpmuvar.h

Log Message:
Add support Marvell Dove.
Also _intr_bootstrap() rename to _bootstrap(). And SoC init func, 
getclk into that.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/arm/arm/cpufunc_asm_pj4b.S
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/arm/marvell/armadaxp.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/marvell/armadaxpvar.h
cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/marvell/dove.c \
src/sys/arch/arm/marvell/dovereg.h src/sys/arch/arm/marvell/mvsoc_sdhc.c \
src/sys/arch/arm/marvell/mvsocpmu.c \
src/sys/arch/arm/marvell/mvsocpmuvar.h
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/arm/marvell/files.marvell
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arm/marvell/kirkwood.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/marvell/mv78xx0.c
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/arm/marvell/mvsoc.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arm/marvell/mvsoc_space.c
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/arm/marvell/mvsocreg.h
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/arm/marvell/mvsocvar.h
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/marvell/orion.c
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/evbarm/armadaxp/armadaxp_machdep.c
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/evbarm/marvell/marvell_machdep.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/evbarm/marvell/marvellreg.h

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

Modified files:

Index: src/sys/arch/arm/arm/cpufunc_asm_pj4b.S
diff -u src/sys/arch/arm/arm/cpufunc_asm_pj4b.S:1.12 src/sys/arch/arm/arm/cpufunc_asm_pj4b.S:1.13
--- src/sys/arch/arm/arm/cpufunc_asm_pj4b.S:1.12	Sat Jan  7 15:22:11 2017
+++ src/sys/arch/arm/arm/cpufunc_asm_pj4b.S	Sat Jan  7 16:19:28 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpufunc_asm_pj4b.S,v 1.12 2017/01/07 15:22:11 kiyohara Exp $ */
+/*	$NetBSD: cpufunc_asm_pj4b.S,v 1.13 2017/01/07 16:19:28 kiyohara Exp $ */
 
 /***
 Copyright (C) Marvell International Ltd. and its affiliates
@@ -102,6 +102,7 @@ ENTRY(pj4b_config)
 	RET
 END(pj4b_config)
 
+#ifdef AURORA_IO_CACHE_COHERENCY
 /* LINTSTUB: void pj4b_io_coherency_barrier(vaddr_t, paddr_t, vsize_t); */
 ENTRY_NP(pj4b_io_coherency_barrier)
 	movw	r0, #:lower16:_C_LABEL(armadaxp_l2_barrier_reg)
@@ -120,3 +121,4 @@ END(pj4b_io_coherency_barrier)
 STRONG_ALIAS(pj4b_dcache_cfu_wbinv_range, pj4b_io_coherency_barrier)
 STRONG_ALIAS(pj4b_dcache_cfu_inv_range, pj4b_io_coherency_barrier)
 STRONG_ALIAS(pj4b_dcache_cfu_wb_range, pj4b_io_coherency_barrier)
+#endif

Index: src/sys/arch/arm/marvell/armadaxp.c
diff -u src/sys/arch/arm/marvell/armadaxp.c:1.15 src/sys/arch/arm/marvell/armadaxp.c:1.16
--- src/sys/arch/arm/marvell/armadaxp.c:1.15	Wed Jun  3 02:53:19 2015
+++ src/sys/arch/arm/marvell/armadaxp.c	Sat Jan  7 16:19:28 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: armadaxp.c,v 1.15 2015/06/03 02:53:19 hsuenaga Exp $	*/
+/*	$NetBSD: armadaxp.c,v 1.16 2017/01/07 16:19:28 kiyohara Exp $	*/
 /***
 Copyright (C) Marvell International Ltd. and its affiliates
 
@@ -37,7 +37,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBI
 ***/
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: armadaxp.c,v 1.15 2015/06/03 02:53:19 hsuenaga Exp $");
+__KERNEL_RCSID(0, "$NetBSD: armadaxp.c,v 1.16 2017/01/07 16:19:28 kiyohara Exp $");
 
 #define _INTR_PRIVATE
 
@@ -90,7 +90,6 @@ int iocc_state = 0;
 vaddr_t misc_base;
 vaddr_t armadaxp_l2_barrier_reg;
 
-extern void (*mvsoc_intr_init)(void);
 static void armadaxp_intr_init(void);
 
 static void armadaxp_pic_unblock_irqs(struct pic_softc *, size_t, uint32_t);
@@ -111,6 +110,17 @@ static void armadaxp_err_pic_source_name
 int, char*, size_t);
 static int armadaxp_err_pic_pending_irqs(struct pic_softc *);
 
+static void armadaxp_getclks(void);
+static void armada370_getclks(void);
+static int armadaxp_clkgating(struct marvell_attach_args *);
+
+static int armadaxp_l2_init(bus_addr_t);
+static paddr_t armadaxp_sdcache_wbalign_base(vaddr_t, paddr_t, psize_t);
+static paddr_t armadaxp_sdcache_wbalign_end(vaddr_t, paddr_t, psize_t);
+#ifdef AURORA_IO_CACHE_COHERENCY
+static void armadaxp_io_coherency_init(void);
+#endif
+
 struct vco_freq_ratio {
 	uint8_t	vco_cpu;	/* VCO to CLK0(CPU) clock ratio */
 	uint8_t	vco_l2c;	/* VCO to NB(L2 cache) clock ratio */
@@ 

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

2017-01-07 Thread Michael Lorenz
Module Name:xsrc
Committed By:   macallan
Date:   Sat Jan  7 16:07:07 UTC 2017

Added Files:
xsrc/external/mit/xf86-video-chips/dist/src: ct_exa.c

Log Message:
first shot at EXA support. Mostly works but needs cleanup and the chip
doesn't really support 32bit pixels either.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 xsrc/external/mit/xf86-video-chips/dist/src/ct_exa.c

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

Added files:

Index: xsrc/external/mit/xf86-video-chips/dist/src/ct_exa.c
diff -u /dev/null xsrc/external/mit/xf86-video-chips/dist/src/ct_exa.c:1.1
--- /dev/null	Sat Jan  7 16:07:07 2017
+++ xsrc/external/mit/xf86-video-chips/dist/src/ct_exa.c	Sat Jan  7 16:07:07 2017
@@ -0,0 +1,300 @@
+/*
+ * EXA acceleration for now ct65550 only, for lack of other hardware 
+ *
+ * Copyright (C) 2016 Michael Lorenz
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * MICHAEL LORENZ BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/* $NetBSD: ct_exa.c,v 1.1 2017/01/07 16:07:07 macallan Exp $ */
+
+#include 
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+/* All drivers should typically include these */
+#include "xf86.h"
+#include "xf86_OSproc.h"
+
+/* Everything using inb/outb, etc needs "compiler.h" */
+#include "compiler.h"
+
+#include "ct_driver.h"
+#include "ct_BltHiQV.h"
+
+
+#ifdef DEBUG
+#define ENTER xf86Msg(X_ERROR, "%s\n", __func__)
+#define LEAVE xf86Msg(X_ERROR, "%s done\n", __func__)
+#else
+#define ENTER
+#define LEAVE
+#endif
+
+static void
+ctWaitMarker(ScreenPtr pScreen, int Marker)
+{
+ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
+CHIPSPtr cPtr = CHIPSPTR(pScrn);
+ENTER;
+ctBLTWAIT;
+}
+
+static int
+ctMarkSync(ScreenPtr pScreenInfo)
+{
+ENTER;
+return 0;
+}
+
+static Bool
+ctPrepareCopy
+(
+PixmapPtr pSrcPixmap,
+PixmapPtr pDstPixmap,
+int   xdir,
+int   ydir,
+int   alu,
+Pixel planemask
+)
+{
+ScrnInfoPtr pScrn = xf86Screens[pDstPixmap->drawable.pScreen->myNum];
+CHIPSPtr cPtr = CHIPSPTR(pScrn);
+CHIPSACLPtr cAcl = CHIPSACLPTR(pScrn);
+
+ENTER;
+ctBLTWAIT;
+cAcl->srcpitch = exaGetPixmapPitch(pSrcPixmap);
+cAcl->srcoffset = exaGetPixmapOffset(pSrcPixmap);
+cAcl->xdir = xdir;
+cAcl->ydir = ydir;
+ctSETROP(ChipsAluConv[alu & 0xF] | ((xdir < 0) ? ctRIGHT2LEFT : 0) |
+   ((ydir < 0) ? ctBOTTOM2TOP : 0) |
+   ctPATSOLID/* | ctPATMONO*/);
+ctSETMONOCTL(ctDWORDALIGN);
+ctSETPITCH(cAcl->srcpitch, exaGetPixmapPitch(pDstPixmap));
+LEAVE;
+return TRUE;
+}
+
+static void
+ctCopy
+(
+PixmapPtr pDstPixmap,
+int   srcX,
+int   srcY,
+int   dstX,
+int   dstY,
+int   w,
+int   h
+)
+{
+ScrnInfoPtr pScrn = xf86Screens[pDstPixmap->drawable.pScreen->myNum];
+CHIPSPtr cPtr = CHIPSPTR(pScrn);
+CHIPSACLPtr cAcl = CHIPSACLPTR(pScrn);
+int src = cAcl->srcoffset;
+int dst = exaGetPixmapOffset(pDstPixmap);
+int dstpitch = exaGetPixmapPitch(pDstPixmap);
+
+if (cAcl->ydir < 0) {
+	srcY += (h - 1);
+	dstY += (h - 1);
+}
+
+if (cAcl->xdir < 0) {
+	srcX += (w - 1);
+	dstX += (w - 1);
+}
+
+src += srcX * cAcl->BytesPerPixel + srcY * cAcl->srcpitch;
+dst += dstX * cAcl->BytesPerPixel + dstY * dstpitch;
+ctBLTWAIT;
+ctSETSRCADDR(src);
+ctSETDSTADDR(dst);
+ctSETHEIGHTWIDTHGO(h, w * cAcl->BytesPerPixel);
+LEAVE;
+}
+
+static void
+ctDoneCopy(PixmapPtr pDstPixmap)
+{
+ENTER;
+LEAVE;
+}
+
+static Bool
+ctPrepareSolid(
+PixmapPtr pPixmap,
+int alu,
+Pixel planemask,
+Pixel fg)
+{
+ScrnInfoPtr pScrn = xf86Screens[pPixmap->drawable.pScreen->myNum];
+CHIPSPtr cPtr = CHIPSPTR(pScrn);
+CHIPSACLPtr cAcl = CHIPSACLPTR(pScrn);
+int pitch = exaGetPixmapPitch(pPixmap);
+
+ENTER;
+ctBLTWAIT;
+ctSETPITCH(pitch, pitch);
+ctSETROP(ChipsAluConv2[alu & 0xF] | ctPATSOLID | 

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

2017-01-07 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Sat Jan  7 15:47:33 UTC 2017

Modified Files:
src/sys/arch/arm/marvell: armadaxpreg.h

Log Message:
Add register macros.
And reorder registers.
Also remove white-spaces.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arm/marvell/armadaxpreg.h

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

Modified files:

Index: src/sys/arch/arm/marvell/armadaxpreg.h
diff -u src/sys/arch/arm/marvell/armadaxpreg.h:1.6 src/sys/arch/arm/marvell/armadaxpreg.h:1.7
--- src/sys/arch/arm/marvell/armadaxpreg.h:1.6	Fri Nov  6 12:54:52 2015
+++ src/sys/arch/arm/marvell/armadaxpreg.h	Sat Jan  7 15:47:33 2017
@@ -204,6 +204,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBI
 #define ARMADAXP_IRQ_PEX11		63	/* PCIe Port1.1 INTA/B/C/D */
 #define ARMADAXP_IRQ_PEX12		64	/* PCIe Port1.2 INTA/B/C/D */
 #define ARMADAXP_IRQ_PEX13		65	/* PCIe Port1.3 INTA/B/C/D */
+#define ARMADAXP_IRQ_GBE0_SUM		66
 #define ARMADAXP_IRQ_XOR1CH2		94	/* XOR1 Ch2 */
 #define ARMADAXP_IRQ_XOR1CH3		95	/* XOR1 Ch3 */
 #define ARMADAXP_IRQ_PEX2		99	/* PCIe Port2 INTA/B/C/D */
@@ -279,18 +280,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBI
 #define ARMADAXP_GPIO2_BASE	(MVSOC_DEVBUS_BASE + 0x8140)
 
 /*
- * Thermal Sensor and Thermal Managemer
- */
-#define ARMADAXP_TS_BASE	(MVSOC_DEVBUS_BASE + 0x82b0)
-#define ARMADAXP_TM_BASE	(MVSOC_DEVBUS_BASE + 0x84c0)
-#define ARMADA370_TM_BASE	(MVSOC_DEVBUS_BASE + 0x8300)
-
-/*
- * Power Management Unit Registers
- *//* NS16550 compatible */
-#define ARMADAXP_PMU_BASE	(MVSOC_DEVBUS_BASE + 0xc000)
-
-/*
  * Miscellanseous Register
  */
 #define	ARMADAXP_MISC_BASE	(MVSOC_DEVBUS_BASE + 0x8200)
@@ -303,7 +292,18 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBI
 #define	ARMADAXP_MISC_SSRR		0x64	/* System Soft Reset Register */
 #define	ARMADAXP_MISC_SSRR_GLOBALSOFTRST	(1 << 0)
 
+/*
+ * Thermal Sensor and Thermal Managemer
+ */
+#define ARMADAXP_TS_BASE	(MVSOC_DEVBUS_BASE + 0x82b0)
+#define ARMADAXP_TM_BASE	(MVSOC_DEVBUS_BASE + 0x84c0)
+#define ARMADA370_TM_BASE	(MVSOC_DEVBUS_BASE + 0x8300)
+
 /* Multiprocessor Interrupt Controller Registers */
+#define ARMADAXP_MLMB_CFUCONFIG		  0x228
+#define ARMADAXP_MLMB_CFUCONFIG_POUTOSL2	(1 << 18)
+#define ARMADAXP_MLMB_CFUCONFIG_POCTOSL2	(1 << 18)
+
 #define	ARMADAXP_MLMB_MPIC_BASE			0x20a00
 #define	ARMADAXP_MLMB_MPIC_CPU_BASE		0x21800
 #define	ARMADAXP_MLMB_MPIC_CTRL			0x0
@@ -416,7 +416,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBI
 #define ARMADAXP_USB1_BASE	(ARMADAXP_USB_BASE + 0x1000)
 #define ARMADAXP_USB2_BASE	(ARMADAXP_USB_BASE + 0x2000)
 
-/* 
+/*
  * XOR Engine Registers
  */
 #define ARMADAXP_XORE0_BASE	(UNITID2PHYS(XORE0))	/* 0x6 */
@@ -435,7 +435,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBI
  */
 #define ARMADAXP_PTP_BASE	(UNITID2PHYS(GBE0))	/* 0x7c000 */
 
-/* 
+/*
  * Cryptographic Engine and Security Accelerator Registers
  */
 #define ARMADAXP_CESA0_BASE	(UNITID2PHYS(CRYPT) + 0xd000)	/* 0x9d000 */



CVS commit: src/external/bsd/flex

2017-01-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan  7 15:45:14 UTC 2017

Modified Files:
src/external/bsd/flex: flex2netbsd

Log Message:
Add instruction how to generate the init files so that we don't forget.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/flex/flex2netbsd

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

Modified files:

Index: src/external/bsd/flex/flex2netbsd
diff -u src/external/bsd/flex/flex2netbsd:1.4 src/external/bsd/flex/flex2netbsd:1.5
--- src/external/bsd/flex/flex2netbsd:1.4	Sat Jan  9 12:38:56 2016
+++ src/external/bsd/flex/flex2netbsd	Sat Jan  7 10:45:14 2017
@@ -1,6 +1,6 @@
 #! /bin/sh
 #
-#	$NetBSD: flex2netbsd,v 1.4 2016/01/09 17:38:56 christos Exp $
+#	$NetBSD: flex2netbsd,v 1.5 2017/01/07 15:45:14 christos Exp $
 #
 # Copyright (c) 2000 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -42,6 +42,11 @@
 #	check the config file and copy it to /usr/src/external/bsd/flex/include
 #	check the manual page against our copy if there are new options and
 #	update
+#	build the initparse.c and initscan.c without line numbers in src/dist
+#	and commit them:
+#   - nbyacc -l -d -o initparse.c parse.y
+#	- nblex -L -t -p scan.l > initscan.c
+
 
 if [ $# -ne 1 ]; then echo "flex2netbsd src"; exit 1; fi
 



CVS commit: src/external/bsd/flex/dist/src

2017-01-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan  7 15:43:27 UTC 2017

Modified Files:
src/external/bsd/flex/dist/src: initparse.c initscan.c

Log Message:
Regen without #line directives
- nbyacc -l -d -o initparse.c parse.y
- nblex -L -t -p scan.l > initscan.c


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/flex/dist/src/initparse.c
cvs rdiff -u -r1.7 -r1.8 src/external/bsd/flex/dist/src/initscan.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/bsd/flex/dist/src/initparse.c
diff -u src/external/bsd/flex/dist/src/initparse.c:1.3 src/external/bsd/flex/dist/src/initparse.c:1.4
--- src/external/bsd/flex/dist/src/initparse.c:1.3	Mon Jan  2 12:45:27 2017
+++ src/external/bsd/flex/dist/src/initparse.c	Sat Jan  7 10:43:27 2017
@@ -19,7 +19,6 @@
 
 #define YYPURE 0
 
-#line 37 "/usr/src/external/bsd/flex/dist/src/parse.y"
 /*  Copyright (c) 1990 The Regents of the University of California. */
 /*  All rights reserved. */
 
@@ -51,7 +50,7 @@
 /*  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR */
 /*  PURPOSE. */
 #include "flexdef.h"
-__RCSID("$NetBSD: initparse.c,v 1.3 2017/01/02 17:45:27 christos Exp $");
+__RCSID("$NetBSD: initparse.c,v 1.4 2017/01/07 15:43:27 christos Exp $");
 
 #include "tables.h"
 
@@ -101,7 +100,6 @@ int previous_continued_action;	/* whethe
  */
 #define YYSTYPE int
 
-#line 105 "parse.c"
 
 #if ! defined(YYSTYPE) && ! defined(YYSTYPE_IS_DECLARED)
 /* Default: YYSTYPE is the semantic value type. */
@@ -606,7 +604,6 @@ typedef struct {
 } YYSTACKDATA;
 /* variables for the parser stack */
 static YYSTACKDATA yystack;
-#line 953 "/usr/src/external/bsd/flex/dist/src/parse.y"
 
 
 /* build_eof_action - build the "<>" action for the active start
@@ -740,7 +737,6 @@ void yyerror( const char *msg )
 	{
 		(void)msg;
 	}
-#line 744 "parse.c"
 
 #if YYDEBUG
 #include 		/* needed for printf */
@@ -943,7 +939,6 @@ yyreduce:
 switch (yyn)
 {
 case 1:
-#line 122 "/usr/src/external/bsd/flex/dist/src/parse.y"
 	{ /* add default rule */
 			int def_rule;
 
@@ -972,7 +967,6 @@ case 1:
 			}
 break;
 case 2:
-#line 151 "/usr/src/external/bsd/flex/dist/src/parse.y"
 	{ /* initialize for processing rules */
 
 			/* Create default DFA start condition. */
@@ -980,11 +974,9 @@ case 2:
 			}
 break;
 case 6:
-#line 162 "/usr/src/external/bsd/flex/dist/src/parse.y"
 	{ synerr( _("unknown error processing section 1") ); }
 break;
 case 7:
-#line 166 "/usr/src/external/bsd/flex/dist/src/parse.y"
 	{
 			check_options();
 			scon_stk = allocate_integer_array( lastsc + 1 );
@@ -992,64 +984,50 @@ case 7:
 			}
 break;
 case 8:
-#line 174 "/usr/src/external/bsd/flex/dist/src/parse.y"
 	{ xcluflg = false; }
 break;
 case 9:
-#line 177 "/usr/src/external/bsd/flex/dist/src/parse.y"
 	{ xcluflg = true; }
 break;
 case 10:
-#line 181 "/usr/src/external/bsd/flex/dist/src/parse.y"
 	{ scinstal( nmstr, xcluflg ); }
 break;
 case 11:
-#line 184 "/usr/src/external/bsd/flex/dist/src/parse.y"
 	{ scinstal( nmstr, xcluflg ); }
 break;
 case 12:
-#line 187 "/usr/src/external/bsd/flex/dist/src/parse.y"
 	{ synerr( _("bad start condition list") ); }
 break;
 case 16:
-#line 198 "/usr/src/external/bsd/flex/dist/src/parse.y"
 	{
 			outfilename = xstrdup(nmstr);
 			did_outfilename = 1;
 			}
 break;
 case 17:
-#line 203 "/usr/src/external/bsd/flex/dist/src/parse.y"
 	{ extra_type = xstrdup(nmstr); }
 break;
 case 18:
-#line 205 "/usr/src/external/bsd/flex/dist/src/parse.y"
 	{ prefix = xstrdup(nmstr);
   if (strchr(prefix, '[') || strchr(prefix, ']'))
   flexerror(_("Prefix must not contain [ or ]")); }
 break;
 case 19:
-#line 209 "/usr/src/external/bsd/flex/dist/src/parse.y"
 	{ yyclass = xstrdup(nmstr); }
 break;
 case 20:
-#line 211 "/usr/src/external/bsd/flex/dist/src/parse.y"
 	{ headerfilename = xstrdup(nmstr); }
 break;
 case 21:
-#line 213 "/usr/src/external/bsd/flex/dist/src/parse.y"
 	{ tablesext = true; tablesfilename = xstrdup(nmstr); }
 break;
 case 22:
-#line 217 "/usr/src/external/bsd/flex/dist/src/parse.y"
 	{ scon_stk_ptr = yystack.l_mark[-3]; }
 break;
 case 23:
-#line 219 "/usr/src/external/bsd/flex/dist/src/parse.y"
 	{ scon_stk_ptr = yystack.l_mark[-3]; }
 break;
 case 25:
-#line 224 "/usr/src/external/bsd/flex/dist/src/parse.y"
 	{
 			/* Initialize for a parse of one rule. */
 			trlcontxt = variable_trail_rule = varlength = false;
@@ -1062,7 +1040,6 @@ case 25:
 			}
 break;
 case 26:
-#line 237 "/usr/src/external/bsd/flex/dist/src/parse.y"
 	{
 			pat = yystack.l_mark[0];
 			finish_rule( pat, variable_trail_rule,
@@ -1099,7 +1076,6 @@ case 26:
 			}
 break;
 case 27:
-#line 273 "/usr/src/external/bsd/flex/dist/src/parse.y"
 	{
 			pat = yystack.l_mark[0];
 			finish_rule( pat, variable_trail_rule,
@@ -1124,7 +1100,6 @@ case 27:
 			}
 break;
 case 28:
-#line 297 

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

2017-01-07 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Sat Jan  7 15:22:11 UTC 2017

Modified Files:
src/sys/arch/arm/arm: cpufunc_asm_pj4b.S

Log Message:
Add a white-space into comment and `*/'.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/arm/arm/cpufunc_asm_pj4b.S

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

Modified files:

Index: src/sys/arch/arm/arm/cpufunc_asm_pj4b.S
diff -u src/sys/arch/arm/arm/cpufunc_asm_pj4b.S:1.11 src/sys/arch/arm/arm/cpufunc_asm_pj4b.S:1.12
--- src/sys/arch/arm/arm/cpufunc_asm_pj4b.S:1.11	Wed May 20 02:59:57 2015
+++ src/sys/arch/arm/arm/cpufunc_asm_pj4b.S	Sat Jan  7 15:22:11 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpufunc_asm_pj4b.S,v 1.11 2015/05/20 02:59:57 hsuenaga Exp $ */
+/*	$NetBSD: cpufunc_asm_pj4b.S,v 1.12 2017/01/07 15:22:11 kiyohara Exp $ */
 
 /***
 Copyright (C) Marvell International Ltd. and its affiliates
@@ -43,7 +43,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBI
 
 #define MV_FMC0_SMP		(1 << 1) /* SMP/nAMP enable */
 #define MV_FMC0_PARITY		(1 << 2) /* Enable L1 Cache Parity */
-#define MV_FMC0_LFDIS		(1 << 7) /* Disable DC Speculative linefill*/
+#define MV_FMC0_LFDIS		(1 << 7) /* Disable DC Speculative linefill */
 #define MV_FMC0_FW		(1 << 8) /* Cache & TLB maintenance broadcast */
 
 #define MPIDR_CPUID_MASK	(0x3 << 0) /* CPUID */



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

2017-01-07 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Sat Jan  7 15:14:20 UTC 2017

Modified Files:
src/sys/arch/arm/marvell: mvsoctmr.c

Log Message:
Change to a tab from white-spaces.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/arm/marvell/mvsoctmr.c

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

Modified files:

Index: src/sys/arch/arm/marvell/mvsoctmr.c
diff -u src/sys/arch/arm/marvell/mvsoctmr.c:1.13 src/sys/arch/arm/marvell/mvsoctmr.c:1.14
--- src/sys/arch/arm/marvell/mvsoctmr.c:1.13	Sat Mar 15 10:44:10 2014
+++ src/sys/arch/arm/marvell/mvsoctmr.c	Sat Jan  7 15:14:20 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: mvsoctmr.c,v 1.13 2014/03/15 10:44:10 kiyohara Exp $	*/
+/*	$NetBSD: mvsoctmr.c,v 1.14 2017/01/07 15:14:20 kiyohara Exp $	*/
 /*
  * Copyright (c) 2007, 2008, 2010 KIYOHARA Takashi
  * All rights reserved.
@@ -25,7 +25,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: mvsoctmr.c,v 1.13 2014/03/15 10:44:10 kiyohara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mvsoctmr.c,v 1.14 2017/01/07 15:14:20 kiyohara Exp $");
 
 #include "opt_ddb.h"
 #include "opt_mvsoc.h"
@@ -134,7 +134,7 @@ mvsoctmr_match(device_t parent, struct c
 static void
 mvsoctmr_attach(device_t parent, device_t self, void *aux)
 {
-struct mvsoctmr_softc *sc = device_private(self);
+	struct mvsoctmr_softc *sc = device_private(self);
 	struct marvell_attach_args *mva = aux;
 	uint32_t rstoutn;
 



CVS commit: src/sys/dev/sdmmc

2017-01-07 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Sat Jan  7 15:05:08 UTC 2017

Modified Files:
src/sys/dev/sdmmc: sdhc.c sdhcvar.h

Log Message:
Add flags SDHC_FLAG_NO_AUTO_STOP and SDHC_FLAG_NO_BUSY_INTR.


To generate a diff of this commit:
cvs rdiff -u -r1.96 -r1.97 src/sys/dev/sdmmc/sdhc.c
cvs rdiff -u -r1.26 -r1.27 src/sys/dev/sdmmc/sdhcvar.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/sdmmc/sdhc.c
diff -u src/sys/dev/sdmmc/sdhc.c:1.96 src/sys/dev/sdmmc/sdhc.c:1.97
--- src/sys/dev/sdmmc/sdhc.c:1.96	Sat Jan  7 15:00:38 2017
+++ src/sys/dev/sdmmc/sdhc.c	Sat Jan  7 15:05:08 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: sdhc.c,v 1.96 2017/01/07 15:00:38 kiyohara Exp $	*/
+/*	$NetBSD: sdhc.c,v 1.97 2017/01/07 15:05:08 kiyohara Exp $	*/
 /*	$OpenBSD: sdhc.c,v 1.25 2009/01/13 19:44:20 grange Exp $	*/
 
 /*
@@ -23,7 +23,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sdhc.c,v 1.96 2017/01/07 15:00:38 kiyohara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sdhc.c,v 1.97 2017/01/07 15:05:08 kiyohara Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_sdmmc.h"
@@ -595,7 +595,9 @@ adma_done:
 		saa.saa_clkmin = hp->clkbase / 0x3ff;
 	else
 		saa.saa_clkmin = hp->clkbase / 256;
-	saa.saa_caps = SMC_CAPS_4BIT_MODE|SMC_CAPS_AUTO_STOP;
+	if (!ISSET(sc->sc_flags, SDHC_FLAG_NO_AUTO_STOP))
+		saa.saa_caps |= SMC_CAPS_AUTO_STOP;
+	saa.saa_caps |= SMC_CAPS_4BIT_MODE;
 	if (ISSET(sc->sc_flags, SDHC_FLAG_8BIT_MODE))
 		saa.saa_caps |= SMC_CAPS_8BIT_MODE;
 	if (ISSET(caps, SDHC_HIGH_SPEED_SUPP))
@@ -1572,7 +1574,8 @@ sdhc_exec_command(sdmmc_chipset_handle_t
 	if (cmd->c_error == 0 && cmd->c_data != NULL)
 		sdhc_transfer_data(hp, cmd);
 	else if (ISSET(cmd->c_flags, SCF_RSP_BSY)) {
-		if (!sdhc_wait_intr(hp, SDHC_TRANSFER_COMPLETE, hz * 10, false)) {
+		if (!ISSET(hp->sc->sc_flags, SDHC_FLAG_NO_BUSY_INTR) &&
+		!sdhc_wait_intr(hp, SDHC_TRANSFER_COMPLETE, hz * 10, false)) {
 			DPRINTF(1,("%s: sdhc_exec_command: RSP_BSY\n",
 			HDEVNAME(hp)));
 			cmd->c_error = ETIMEDOUT;
@@ -1588,6 +1591,10 @@ out:
 	}
 	SET(cmd->c_flags, SCF_ITSDONE);
 
+	if (ISSET(hp->sc->sc_flags, SDHC_FLAG_NO_AUTO_STOP) &&
+	cmd->c_opcode == MMC_STOP_TRANSMISSION)
+		(void)sdhc_soft_reset(hp, SDHC_RESET_CMD|SDHC_RESET_DAT);
+
 	mutex_exit(>intr_lock);
 
 	DPRINTF(1,("%s: cmd %d %s (flags=%08x error=%d)\n", HDEVNAME(hp),
@@ -1642,7 +1649,8 @@ sdhc_start_command(struct sdhc_host *hp,
 	if (blkcount > 1) {
 		mode |= SDHC_MULTI_BLOCK_MODE;
 		/* XXX only for memory commands? */
-		mode |= SDHC_AUTO_CMD12_ENABLE;
+		if (!ISSET(sc->sc_flags, SDHC_FLAG_NO_AUTO_STOP))
+			mode |= SDHC_AUTO_CMD12_ENABLE;
 	}
 	if (cmd->c_dmamap != NULL && cmd->c_datalen > 0 &&
 	ISSET(hp->flags,  SHF_MODE_DMAEN)) {

Index: src/sys/dev/sdmmc/sdhcvar.h
diff -u src/sys/dev/sdmmc/sdhcvar.h:1.26 src/sys/dev/sdmmc/sdhcvar.h:1.27
--- src/sys/dev/sdmmc/sdhcvar.h:1.26	Thu Dec 31 11:53:19 2015
+++ src/sys/dev/sdmmc/sdhcvar.h	Sat Jan  7 15:05:08 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: sdhcvar.h,v 1.26 2015/12/31 11:53:19 ryo Exp $	*/
+/*	$NetBSD: sdhcvar.h,v 1.27 2017/01/07 15:05:08 kiyohara Exp $	*/
 /*	$OpenBSD: sdhcvar.h,v 1.3 2007/09/06 08:01:01 jsg Exp $	*/
 
 /*
@@ -59,6 +59,8 @@ struct sdhc_softc {
 #define	SDHC_FLAG_POLL_CARD_DET	0x0020 /* polling card detect */
 #define	SDHC_FLAG_SLOW_SDR50  	0x0040 /* reduce SDR50 speed */
 #define	SDHC_FLAG_USDHC		0x0080 /* Freescale uSDHC */
+#define	SDHC_FLAG_NO_AUTO_STOP	0x0100 /* No auto CMD12 */
+#define	SDHC_FLAG_NO_BUSY_INTR	0x0200 /* No intr when RESP_BUSY */
 
 	uint32_t		sc_clkbase;
 	int			sc_clkmsk;	/* Mask for SDCLK */



CVS commit: src/sys/dev/sdmmc

2017-01-07 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Sat Jan  7 15:00:38 UTC 2017

Modified Files:
src/sys/dev/sdmmc: sdhc.c

Log Message:
Don't access SDHC_HOST_CTL_VERSION, if iosize less than this.


To generate a diff of this commit:
cvs rdiff -u -r1.95 -r1.96 src/sys/dev/sdmmc/sdhc.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/sdmmc/sdhc.c
diff -u src/sys/dev/sdmmc/sdhc.c:1.95 src/sys/dev/sdmmc/sdhc.c:1.96
--- src/sys/dev/sdmmc/sdhc.c:1.95	Wed Aug 10 04:24:17 2016
+++ src/sys/dev/sdmmc/sdhc.c	Sat Jan  7 15:00:38 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: sdhc.c,v 1.95 2016/08/10 04:24:17 nonaka Exp $	*/
+/*	$NetBSD: sdhc.c,v 1.96 2017/01/07 15:00:38 kiyohara Exp $	*/
 /*	$OpenBSD: sdhc.c,v 1.25 2009/01/13 19:44:20 grange Exp $	*/
 
 /*
@@ -23,7 +23,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sdhc.c,v 1.95 2016/08/10 04:24:17 nonaka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sdhc.c,v 1.96 2017/01/07 15:00:38 kiyohara Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_sdmmc.h"
@@ -290,38 +290,42 @@ sdhc_host_found(struct sdhc_softc *sc, b
 	callout_init(>tuning_timer, CALLOUT_MPSAFE);
 	callout_setfunc(>tuning_timer, sdhc_tuning_timer, hp);
 
-	if (ISSET(hp->sc->sc_flags, SDHC_FLAG_USDHC)) {
-		sdhcver = SDHC_SPEC_VERS_300 << SDHC_SPEC_VERS_SHIFT;
-	} else if (ISSET(hp->sc->sc_flags, SDHC_FLAG_ENHANCED)) {
-		sdhcver = HREAD4(hp, SDHC_ESDHC_HOST_CTL_VERSION);
+	if (iosize <= SDHC_HOST_CTL_VERSION) {
+		aprint_normal_dev(sc->sc_dev, "SDHC NO-VERS");
+		hp->specver = -1;
 	} else {
-		sdhcver = HREAD2(hp, SDHC_HOST_CTL_VERSION);
-	}
-	aprint_normal_dev(sc->sc_dev, "SDHC ");
-	hp->specver = SDHC_SPEC_VERSION(sdhcver);
-	switch (SDHC_SPEC_VERSION(sdhcver)) {
-	case SDHC_SPEC_VERS_100:
-		aprint_normal("1.0");
-		break;
+		if (ISSET(hp->sc->sc_flags, SDHC_FLAG_USDHC)) {
+			sdhcver = SDHC_SPEC_VERS_300 << SDHC_SPEC_VERS_SHIFT;
+		} else if (ISSET(hp->sc->sc_flags, SDHC_FLAG_ENHANCED)) {
+			sdhcver = HREAD4(hp, SDHC_ESDHC_HOST_CTL_VERSION);
+		} else
+			sdhcver = HREAD2(hp, SDHC_HOST_CTL_VERSION);
+		aprint_normal_dev(sc->sc_dev, "SDHC ");
+		hp->specver = SDHC_SPEC_VERSION(sdhcver);
+		switch (SDHC_SPEC_VERSION(sdhcver)) {
+		case SDHC_SPEC_VERS_100:
+			aprint_normal("1.0");
+			break;
 
-	case SDHC_SPEC_VERS_200:
-		aprint_normal("2.0");
-		break;
+		case SDHC_SPEC_VERS_200:
+			aprint_normal("2.0");
+			break;
 
-	case SDHC_SPEC_VERS_300:
-		aprint_normal("3.0");
-		break;
+		case SDHC_SPEC_VERS_300:
+			aprint_normal("3.0");
+			break;
 
-	case SDHC_SPEC_VERS_400:
-		aprint_normal("4.0");
-		break;
+		case SDHC_SPEC_VERS_400:
+			aprint_normal("4.0");
+			break;
 
-	default:
-		aprint_normal("unknown version(0x%x)",
-		SDHC_SPEC_VERSION(sdhcver));
-		break;
+		default:
+			aprint_normal("unknown version(0x%x)",
+			SDHC_SPEC_VERSION(sdhcver));
+			break;
+		}
+		aprint_normal(", rev %u", SDHC_VENDOR_VERSION(sdhcver));
 	}
-	aprint_normal(", rev %u", SDHC_VENDOR_VERSION(sdhcver));
 
 	/*
 	 * Reset the host controller and enable interrupts.



CVS commit: src/sys/dev/sdmmc

2017-01-07 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Sat Jan  7 14:49:53 UTC 2017

Modified Files:
src/sys/dev/sdmmc: ld_sdmmc.c

Log Message:
Support retry when error.  like wd(4).


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/dev/sdmmc/ld_sdmmc.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/sdmmc/ld_sdmmc.c
diff -u src/sys/dev/sdmmc/ld_sdmmc.c:1.23 src/sys/dev/sdmmc/ld_sdmmc.c:1.24
--- src/sys/dev/sdmmc/ld_sdmmc.c:1.23	Tue Sep 27 03:33:33 2016
+++ src/sys/dev/sdmmc/ld_sdmmc.c	Sat Jan  7 14:49:53 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: ld_sdmmc.c,v 1.23 2016/09/27 03:33:33 pgoyette Exp $	*/
+/*	$NetBSD: ld_sdmmc.c,v 1.24 2017/01/07 14:49:53 kiyohara Exp $	*/
 
 /*
  * Copyright (c) 2008 KIYOHARA Takashi
@@ -28,7 +28,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ld_sdmmc.c,v 1.23 2016/09/27 03:33:33 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ld_sdmmc.c,v 1.24 2017/01/07 14:49:53 kiyohara Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_sdmmc.h"
@@ -59,6 +59,9 @@ __KERNEL_RCSID(0, "$NetBSD: ld_sdmmc.c,v
 #define DPRINTF(s)	/**/
 #endif
 
+#define	LD_SDMMC_IORETRIES	5	/* number of retries before giving up */
+#define	RECOVERYTIME		hz/2	/* time to wait before retrying a cmd */
+
 struct ld_sdmmc_softc;
 
 struct ld_sdmmc_task {
@@ -66,6 +69,8 @@ struct ld_sdmmc_task {
 
 	struct ld_sdmmc_softc *task_sc;
 	struct buf *task_bp;
+	int task_retries; /* number of xfer retry */
+	struct callout task_restart_ch;
 };
 
 struct ld_sdmmc_softc {
@@ -75,7 +80,7 @@ struct ld_sdmmc_softc {
 	struct sdmmc_function *sc_sf;
 #define LD_SDMMC_MAXQUEUECNT 4
 	struct ld_sdmmc_task sc_task[LD_SDMMC_MAXQUEUECNT];
-	int sc_nexttask;
+	TAILQ_HEAD(, sdmmc_task) sc_freeq;
 };
 
 static int ld_sdmmc_match(device_t, cfdata_t, void *);
@@ -84,6 +89,7 @@ static int ld_sdmmc_detach(device_t, int
 
 static int ld_sdmmc_dump(struct ld_softc *, void *, int, int);
 static int ld_sdmmc_start(struct ld_softc *, struct buf *);
+static void ld_sdmmc_restart(void *);
 
 static void ld_sdmmc_doattach(void *);
 static void ld_sdmmc_dobio(void *);
@@ -110,7 +116,9 @@ ld_sdmmc_attach(device_t parent, device_
 	struct ld_sdmmc_softc *sc = device_private(self);
 	struct sdmmc_attach_args *sa = aux;
 	struct ld_softc *ld = >sc_ld;
+	struct ld_sdmmc_task *task;
 	struct lwp *lwp;
+	int i;
 
 	ld->sc_dv = self;
 
@@ -119,7 +127,13 @@ ld_sdmmc_attach(device_t parent, device_
 	sa->sf->cid.rev, sa->sf->cid.psn, sa->sf->cid.mdt);
 	aprint_naive("\n");
 
-	sc->sc_nexttask = 0;
+	TAILQ_INIT(>sc_freeq);
+	for (i = 0; i < __arraycount(sc->sc_task); i++) {
+		task = >sc_task[i];
+		task->task_sc = sc;
+		callout_init(>task_restart_ch, 0);
+		TAILQ_INSERT_TAIL(>sc_freeq, >task, next);
+	}
 
 	sc->sc_hwunit = 0;	/* always 0? */
 	sc->sc_sf = sa->sf;
@@ -168,12 +182,15 @@ ld_sdmmc_detach(device_t dev, int flags)
 {
 	struct ld_sdmmc_softc *sc = device_private(dev);
 	struct ld_softc *ld = >sc_ld;
-	int rv;
+	int rv, i;
 
 	if ((rv = ldbegindetach(ld, flags)) != 0)
 		return rv;
 	ldenddetach(ld);
 
+	for (i = 0; i < __arraycount(sc->sc_task); i++)
+		callout_destroy(>sc_task[i].task_restart_ch);
+
 	return 0;
 }
 
@@ -181,12 +198,12 @@ static int
 ld_sdmmc_start(struct ld_softc *ld, struct buf *bp)
 {
 	struct ld_sdmmc_softc *sc = device_private(ld->sc_dv);
-	struct ld_sdmmc_task *task = >sc_task[sc->sc_nexttask];
+	struct ld_sdmmc_task *task = (void *)TAILQ_FIRST(>sc_freeq);
 
-	sc->sc_nexttask = (sc->sc_nexttask + 1) % LD_SDMMC_MAXQUEUECNT;
+	TAILQ_REMOVE(>sc_freeq, >task, next);
 
-	task->task_sc = sc;
 	task->task_bp = bp;
+	task->task_retries = 0;
 	sdmmc_init_task(>task, ld_sdmmc_dobio, task);
 
 	sdmmc_add_task(sc->sc_sf->sc, >task);
@@ -195,6 +212,18 @@ ld_sdmmc_start(struct ld_softc *ld, stru
 }
 
 static void
+ld_sdmmc_restart(void *arg)
+{
+	struct ld_sdmmc_task *task = (struct ld_sdmmc_task *)arg;
+	struct ld_sdmmc_softc *sc = task->task_sc;
+	struct buf *bp = task->task_bp;
+
+	bp->b_resid = bp->b_bcount;
+
+	sdmmc_add_task(sc->sc_sf->sc, >task);
+}
+
+static void
 ld_sdmmc_dobio(void *arg)
 {
 	struct ld_sdmmc_task *task = (struct ld_sdmmc_task *)arg;
@@ -228,14 +257,26 @@ ld_sdmmc_dobio(void *arg)
 		error = sdmmc_mem_write_block(sc->sc_sf, bp->b_rawblkno,
 		bp->b_data, bp->b_bcount);
 	if (error) {
-		DPRINTF(("%s: error %d\n", device_xname(sc->sc_ld.sc_dv),
-		error));
+		if (task->task_retries < LD_SDMMC_IORETRIES) {
+			struct dk_softc *dksc = >sc_ld.sc_dksc;
+			struct cfdriver *cd = device_cfdriver(dksc->sc_dev);
+
+			diskerr(bp, cd->cd_name, "error", LOG_PRINTF, 0,
+dksc->sc_dkdev.dk_label);
+			printf(", retrying\n");
+			task->task_retries++;
+			callout_reset(>task_restart_ch, RECOVERYTIME,
+			ld_sdmmc_restart, task);
+			return;
+		}
 		bp->b_error = error;
 		bp->b_resid = bp->b_bcount;
 	} else {
 		bp->b_resid = 0;
 	}
 
+	TAILQ_INSERT_TAIL(>sc_freeq, >task, next);
+
 	

CVS commit: src/sys/dev/marvell

2017-01-07 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Sat Jan  7 14:44:26 UTC 2017

Modified Files:
src/sys/dev/marvell: gtidmac.c

Log Message:
Support Marvell Dove.  Use irq array.  Dove's irqs not sequencial.
And remove debug printf().


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/dev/marvell/gtidmac.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/marvell/gtidmac.c
diff -u src/sys/dev/marvell/gtidmac.c:1.12 src/sys/dev/marvell/gtidmac.c:1.13
--- src/sys/dev/marvell/gtidmac.c:1.12	Sat Jan  7 14:36:51 2017
+++ src/sys/dev/marvell/gtidmac.c	Sat Jan  7 14:44:26 2017
@@ -1,6 +1,6 @@
-/*	$NetBSD: gtidmac.c,v 1.12 2017/01/07 14:36:51 kiyohara Exp $	*/
+/*	$NetBSD: gtidmac.c,v 1.13 2017/01/07 14:44:26 kiyohara Exp $	*/
 /*
- * Copyright (c) 2008, 2012 KIYOHARA Takashi
+ * Copyright (c) 2008, 2012, 2016 KIYOHARA Takashi
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: gtidmac.c,v 1.12 2017/01/07 14:36:51 kiyohara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gtidmac.c,v 1.13 2017/01/07 14:44:26 kiyohara Exp $");
 
 #include 
 #include 
@@ -276,24 +276,30 @@ static const struct dmover_algdesc mvxor
 	},
 };
 
+static int orion_88f5182_xore_irqs[] = { 30, 31 };
+static int kirkwood_xore_irqs[] = { 5, 6, 7, 8 };
+static int dove_xore_irqs[] = { 39, 40, 42, 43 };
+static int armadaxp_xore_irqs0[] = { 51, 52 };
+static int armadaxp_xore_irqs1[] = { 94, 95 };
+
 static struct {
 	int model;
 	int idmac_nchan;
 	int idmac_irq;
 	int xore_nchan;
-	int xore_irq;
+	int *xore_irqs;
 } channels[] = {
 	/*
 	 * Marvell System Controllers:
 	 * need irqs in attach_args.
 	 */
-	{ MARVELL_DISCOVERY,		8, -1, 0, -1 },
-	{ MARVELL_DISCOVERY_II,		8, -1, 0, -1 },
-	{ MARVELL_DISCOVERY_III,	8, -1, 0, -1 },
+	{ MARVELL_DISCOVERY,		8, -1, 0, NULL },
+	{ MARVELL_DISCOVERY_II,		8, -1, 0, NULL },
+	{ MARVELL_DISCOVERY_III,	8, -1, 0, NULL },
 #if 0
-	{ MARVELL_DISCOVERY_LT,		4, -1, 2, -1 },
-	{ MARVELL_DISCOVERY_V,		4, -1, 2, -1 },
-	{ MARVELL_DISCOVERY_VI,		4, -1, 2, -1 },		
+	{ MARVELL_DISCOVERY_LT,		4, -1, 2, NULL },
+	{ MARVELL_DISCOVERY_V,		4, -1, 2, NULL },
+	{ MARVELL_DISCOVERY_VI,		4, -1, 2, NULL },		
 #endif
 
 	/*
@@ -301,28 +307,29 @@ static struct {
 	 * No need irqs in attach_args.  We always connecting to interrupt-pin
 	 * statically.
 	 */
-	{ MARVELL_ORION_1_88F1181,	4, 24, 0, -1 },
-	{ MARVELL_ORION_2_88F1281,	4, 24, 0, -1 },
-	{ MARVELL_ORION_1_88F5082,	4, 24, 0, -1 },
-	{ MARVELL_ORION_1_88F5180N,	4, 24, 0, -1 },
-	{ MARVELL_ORION_1_88F5181,	4, 24, 0, -1 },
-	{ MARVELL_ORION_1_88F5182,	4, 24, 2, 30 },
-	{ MARVELL_ORION_2_88F5281,	4, 24, 0, -1 },
-	{ MARVELL_ORION_1_88W8660,	4, 24, 0, -1 },
-	{ MARVELL_KIRKWOOD_88F6180,	0, -1, 4, 5 },
-	{ MARVELL_KIRKWOOD_88F6192,	0, -1, 4, 5 },
-	{ MARVELL_KIRKWOOD_88F6281,	0, -1, 4, 5 },
-	{ MARVELL_KIRKWOOD_88F6282,	0, -1, 4, 5 },
-	{ MARVELL_ARMADAXP_MV78130,	4, 33, 2, 51 },
-	{ MARVELL_ARMADAXP_MV78130,	0, -1, 2, 94 },
-	{ MARVELL_ARMADAXP_MV78160,	4, 33, 2, 51 },
-	{ MARVELL_ARMADAXP_MV78160,	0, -1, 2, 94 },
-	{ MARVELL_ARMADAXP_MV78230,	4, 33, 2, 51 },
-	{ MARVELL_ARMADAXP_MV78230,	0, -1, 2, 94 },
-	{ MARVELL_ARMADAXP_MV78260,	4, 33, 2, 51 },
-	{ MARVELL_ARMADAXP_MV78260,	0, -1, 2, 94 },
-	{ MARVELL_ARMADAXP_MV78460,	4, 33, 2, 51 },
-	{ MARVELL_ARMADAXP_MV78460,	0, -1, 2, 94 },
+	{ MARVELL_ORION_1_88F1181,	4, 24, 0, NULL },
+	{ MARVELL_ORION_2_88F1281,	4, 24, 0, NULL },
+	{ MARVELL_ORION_1_88F5082,	4, 24, 0, NULL },
+	{ MARVELL_ORION_1_88F5180N,	4, 24, 0, NULL },
+	{ MARVELL_ORION_1_88F5181,	4, 24, 0, NULL },
+	{ MARVELL_ORION_1_88F5182,	4, 24, 2, orion_88f5182_xore_irqs },
+	{ MARVELL_ORION_2_88F5281,	4, 24, 0, NULL },
+	{ MARVELL_ORION_1_88W8660,	4, 24, 0, NULL },
+	{ MARVELL_KIRKWOOD_88F6180,	0, -1, 4, kirkwood_xore_irqs },
+	{ MARVELL_KIRKWOOD_88F6192,	0, -1, 4, kirkwood_xore_irqs },
+	{ MARVELL_KIRKWOOD_88F6281,	0, -1, 4, kirkwood_xore_irqs },
+	{ MARVELL_KIRKWOOD_88F6282,	0, -1, 4, kirkwood_xore_irqs },
+	{ MARVELL_DOVE_88AP510,		0, -1, 4, dove_xore_irqs },
+	{ MARVELL_ARMADAXP_MV78130,	4, 33, 2, armadaxp_xore_irqs0 },
+	{ MARVELL_ARMADAXP_MV78130,	0, -1, 2, armadaxp_xore_irqs1 },
+	{ MARVELL_ARMADAXP_MV78160,	4, 33, 2, armadaxp_xore_irqs0 },
+	{ MARVELL_ARMADAXP_MV78160,	0, -1, 2, armadaxp_xore_irqs1 },
+	{ MARVELL_ARMADAXP_MV78230,	4, 33, 2, armadaxp_xore_irqs0 },
+	{ MARVELL_ARMADAXP_MV78230,	0, -1, 2, armadaxp_xore_irqs1 },
+	{ MARVELL_ARMADAXP_MV78260,	4, 33, 2, armadaxp_xore_irqs0 },
+	{ MARVELL_ARMADAXP_MV78260,	0, -1, 2, armadaxp_xore_irqs1 },
+	{ MARVELL_ARMADAXP_MV78460,	4, 33, 2, armadaxp_xore_irqs0 },
+	{ MARVELL_ARMADAXP_MV78460,	0, -1, 2, armadaxp_xore_irqs1 },
 };
 
 struct gtidmac_winacctbl *gtidmac_winacctbl;
@@ -364,7 +371,7 @@ gtidmac_attach(device_t parent, device_t
 	struct gtidmac_softc *sc = 

CVS commit: src/sys/dev/marvell

2017-01-07 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Sat Jan  7 14:36:51 UTC 2017

Modified Files:
src/sys/dev/marvell: gtidmac.c gtidmacvar.h

Log Message:
Remove unused function.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/dev/marvell/gtidmac.c
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/marvell/gtidmacvar.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/marvell/gtidmac.c
diff -u src/sys/dev/marvell/gtidmac.c:1.11 src/sys/dev/marvell/gtidmac.c:1.12
--- src/sys/dev/marvell/gtidmac.c:1.11	Sat Mar 15 13:33:48 2014
+++ src/sys/dev/marvell/gtidmac.c	Sat Jan  7 14:36:51 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: gtidmac.c,v 1.11 2014/03/15 13:33:48 kiyohara Exp $	*/
+/*	$NetBSD: gtidmac.c,v 1.12 2017/01/07 14:36:51 kiyohara Exp $	*/
 /*
  * Copyright (c) 2008, 2012 KIYOHARA Takashi
  * All rights reserved.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: gtidmac.c,v 1.11 2014/03/15 13:33:48 kiyohara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gtidmac.c,v 1.12 2017/01/07 14:36:51 kiyohara Exp $");
 
 #include 
 #include 
@@ -926,13 +926,6 @@ gtidmac_dmmap_unload(struct gtidmac_soft
 }
 
 
-void *
-gtidmac_tag_get(void)
-{
-
-	return gtidmac_softc;
-}
-
 /*
  * IDMAC functions
  */

Index: src/sys/dev/marvell/gtidmacvar.h
diff -u src/sys/dev/marvell/gtidmacvar.h:1.2 src/sys/dev/marvell/gtidmacvar.h:1.3
--- src/sys/dev/marvell/gtidmacvar.h:1.2	Sat Mar 15 13:33:48 2014
+++ src/sys/dev/marvell/gtidmacvar.h	Sat Jan  7 14:36:51 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: gtidmacvar.h,v 1.2 2014/03/15 13:33:48 kiyohara Exp $	*/
+/*	$NetBSD: gtidmacvar.h,v 1.3 2017/01/07 14:36:51 kiyohara Exp $	*/
 /*
  * Copyright (c) 2008, 2009 KIYOHARA Takashi
  * All rights reserved.
@@ -48,8 +48,6 @@ struct gtidmac_winacctbl {
 extern struct gtidmac_winacctbl *gtidmac_winacctbl;
 extern struct gtidmac_winacctbl *mvxore_winacctbl;
 
-void *gtidmac_tag_get(void);
-
 int gtidmac_chan_alloc(void *, bus_dmamap_t **, bus_dmamap_t **, void *);
 void gtidmac_chan_free(void *, int);
 int gtidmac_setup(void *, int, int, bus_dmamap_t *, bus_dmamap_t *, bus_size_t);



CVS commit: src/sys/dev/marvell

2017-01-07 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Sat Jan  7 14:32:33 UTC 2017

Modified Files:
src/sys/dev/marvell: gtidmacreg.h

Log Message:
Fix macro MVXORE_CHAN2BASE().  The XORE has 2 channels per port.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/marvell/gtidmacreg.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/marvell/gtidmacreg.h
diff -u src/sys/dev/marvell/gtidmacreg.h:1.3 src/sys/dev/marvell/gtidmacreg.h:1.4
--- src/sys/dev/marvell/gtidmacreg.h:1.3	Mon Jul 23 06:09:47 2012
+++ src/sys/dev/marvell/gtidmacreg.h	Sat Jan  7 14:32:32 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: gtidmacreg.h,v 1.3 2012/07/23 06:09:47 kiyohara Exp $	*/
+/*	$NetBSD: gtidmacreg.h,v 1.4 2017/01/07 14:32:32 kiyohara Exp $	*/
 /*
  * Copyright (c) 2008, 2009 KIYOHARA Takashi
  * All rights reserved.
@@ -51,7 +51,7 @@
 #define MVXORE_PORT2BASE(sc, p)	\
 (((sc)->sc_gtidmac_nchan == 0 && (p) == 0) ? -0x100 : 0x000)
 #define MVXORE_CHAN2BASE(sc, c)	\
-(MVXORE_PORT2BASE(sc, (c) & 0x4) + (((c) & 0x3) << 2))
+(MVXORE_PORT2BASE(sc, (c) & 0xe) + (((c) & 0x1) << 2))
 
 
 /* IDMA Descriptor Register Map */



CVS commit: src/sys/dev/marvell

2017-01-07 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Sat Jan  7 14:26:37 UTC 2017

Modified Files:
src/sys/dev/marvell: marvellvar.h

Log Message:
Add tags for AXI_CS[01].


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/marvell/marvellvar.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/marvell/marvellvar.h
diff -u src/sys/dev/marvell/marvellvar.h:1.5 src/sys/dev/marvell/marvellvar.h:1.6
--- src/sys/dev/marvell/marvellvar.h:1.5	Sat Mar 15 11:47:43 2014
+++ src/sys/dev/marvell/marvellvar.h	Sat Jan  7 14:26:37 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: marvellvar.h,v 1.5 2014/03/15 11:47:43 kiyohara Exp $	*/
+/*	$NetBSD: marvellvar.h,v 1.6 2017/01/07 14:26:37 kiyohara Exp $	*/
 /*
  * Copyright (c) 2009 KIYOHARA Takashi
  * All rights reserved.
@@ -34,6 +34,9 @@ enum marvell_tags {
 	MARVELL_TAG_SDRAM_CS2,
 	MARVELL_TAG_SDRAM_CS3,
 
+	MARVELL_TAG_AXI_CS0,	/* Advanced eXtensible Interface */
+	MARVELL_TAG_AXI_CS1,	/* Advanced eXtensible Interface */
+
 	MARVELL_TAG_DDR3_CS0,
 	MARVELL_TAG_DDR3_CS1,
 	MARVELL_TAG_DDR3_CS2,



CVS commit: src/sys/dev/marvell

2017-01-07 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Sat Jan  7 14:24:27 UTC 2017

Modified Files:
src/sys/dev/marvell: if_mvgbe.c mvsata_mv.c

Log Message:
Support Marvell Dove.


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/sys/dev/marvell/if_mvgbe.c
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/marvell/mvsata_mv.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/marvell/if_mvgbe.c
diff -u src/sys/dev/marvell/if_mvgbe.c:1.47 src/sys/dev/marvell/if_mvgbe.c:1.48
--- src/sys/dev/marvell/if_mvgbe.c:1.47	Thu Dec 15 09:28:05 2016
+++ src/sys/dev/marvell/if_mvgbe.c	Sat Jan  7 14:24:27 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_mvgbe.c,v 1.47 2016/12/15 09:28:05 ozaki-r Exp $	*/
+/*	$NetBSD: if_mvgbe.c,v 1.48 2017/01/07 14:24:27 kiyohara Exp $	*/
 /*
  * Copyright (c) 2007, 2008, 2013 KIYOHARA Takashi
  * All rights reserved.
@@ -25,7 +25,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_mvgbe.c,v 1.47 2016/12/15 09:28:05 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_mvgbe.c,v 1.48 2017/01/07 14:24:27 kiyohara Exp $");
 
 #include "opt_multiprocessor.h"
 
@@ -367,6 +367,8 @@ struct mvgbe_port {
 	{ MARVELL_MV78XX0_MV78200,	2, 1, { 48 }, FLAGS_FIX_TQTB | FLAGS_IPG2 },
 	{ MARVELL_MV78XX0_MV78200,	3, 1, { 52 }, FLAGS_FIX_TQTB | FLAGS_IPG2 },
 
+	{ MARVELL_DOVE_88AP510,		0, 1, { 29 }, FLAGS_FIX_TQTB | FLAGS_IPG2 },
+
 	{ MARVELL_ARMADAXP_MV78130,	0, 1, { 66 }, FLAGS_HAS_PV },
 	{ MARVELL_ARMADAXP_MV78130,	1, 1, { 70 }, FLAGS_HAS_PV },
 	{ MARVELL_ARMADAXP_MV78130,	2, 1, { 74 }, FLAGS_HAS_PV },

Index: src/sys/dev/marvell/mvsata_mv.c
diff -u src/sys/dev/marvell/mvsata_mv.c:1.7 src/sys/dev/marvell/mvsata_mv.c:1.8
--- src/sys/dev/marvell/mvsata_mv.c:1.7	Sat Mar 15 13:33:48 2014
+++ src/sys/dev/marvell/mvsata_mv.c	Sat Jan  7 14:24:27 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: mvsata_mv.c,v 1.7 2014/03/15 13:33:48 kiyohara Exp $	*/
+/*	$NetBSD: mvsata_mv.c,v 1.8 2017/01/07 14:24:27 kiyohara Exp $	*/
 /*
  * Copyright (c) 2008 KIYOHARA Takashi
  * All rights reserved.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: mvsata_mv.c,v 1.7 2014/03/15 13:33:48 kiyohara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mvsata_mv.c,v 1.8 2017/01/07 14:24:27 kiyohara Exp $");
 
 #include 
 #include 
@@ -99,6 +99,9 @@ struct mvsata_product mvsata_products[] 
 	{ PCI_VENDOR_MARVELL, PCI_PRODUCT_MARVELL_MV78100, 1, 2, gen2e, 0 },
 	{ PCI_VENDOR_MARVELL, PCI_PRODUCT_MARVELL_MV78200, 1, 2, gen2e, 0 },
 
+	/* Dove */
+	{ PCI_VENDOR_MARVELL, PCI_PRODUCT_MARVELL_88AP510, 1, 1, gen2e, 0 },
+
 	/* Armada XP */
 	{ PCI_VENDOR_MARVELL, PCI_PRODUCT_MARVELL_MV78130, 1, 2, gen2e, 0 },
 	{ PCI_VENDOR_MARVELL, PCI_PRODUCT_MARVELL_MV78160, 1, 2, gen2e, 0 },



CVS commit: src/sys/dev/marvell

2017-01-07 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Sat Jan  7 14:19:45 UTC 2017

Modified Files:
src/sys/dev/marvell: mvspireg.h

Log Message:
Change MVSPI_SIZE to 0x80 instead of 0x50.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/marvell/mvspireg.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/marvell/mvspireg.h
diff -u src/sys/dev/marvell/mvspireg.h:1.2 src/sys/dev/marvell/mvspireg.h:1.3
--- src/sys/dev/marvell/mvspireg.h:1.2	Mon May 13 15:47:18 2013
+++ src/sys/dev/marvell/mvspireg.h	Sat Jan  7 14:19:45 2017
@@ -38,7 +38,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBI
 #ifndef _MVSPIREG_H_
 #define _MVSPIREG_H_
 
-#define		MVSPI_SIZE			0x50		/* Size of MVSPI */
+#define		MVSPI_SIZE			0x80		/* Size of MVSPI */
 
 /* Definition of registers */
 #define		MVSPI_CTRL_REG			0x00		/* MVSPI Control Register */



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

2017-01-07 Thread Felix Deichmann
Module Name:src
Committed By:   flxd
Date:   Sat Jan  7 11:21:05 UTC 2017

Modified Files:
src/sys/arch/i386/conf: GENERIC_TINY

Log Message:
Add wsmux so wsconsctl will not fail when -f is not specified (and default
control devices are used), as in /etc/rc.d/wscons.
Kernel size increase is < 4 kB.


To generate a diff of this commit:
cvs rdiff -u -r1.146 -r1.147 src/sys/arch/i386/conf/GENERIC_TINY

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/conf/GENERIC_TINY
diff -u src/sys/arch/i386/conf/GENERIC_TINY:1.146 src/sys/arch/i386/conf/GENERIC_TINY:1.147
--- src/sys/arch/i386/conf/GENERIC_TINY:1.146	Tue Dec 13 20:42:18 2016
+++ src/sys/arch/i386/conf/GENERIC_TINY	Sat Jan  7 11:21:05 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: GENERIC_TINY,v 1.146 2016/12/13 20:42:18 christos Exp $
+#	$NetBSD: GENERIC_TINY,v 1.147 2017/01/07 11:21:05 flxd Exp $
 #
 #	GENERIC_TINY -- suitable default for 4M machines
 #			No EISA, PCI, or SCSI.
@@ -555,3 +555,6 @@ pseudo-device	tun			# network tunneling 
 pseudo-device	pty			# pseudo-terminals
 #options 	RND_COM			# use "com" randomness as well (BROKEN)
 pseudo-device	clockctl		# user control of clock subsystem
+
+# wscons pseudo-devices
+pseudo-device	wsmux			# mouse & keyboard multiplexor