svn commit: r308358 - head/sys/netinet
Author: ae Date: Sun Nov 6 02:33:04 2016 New Revision: 308358 URL: https://svnweb.freebsd.org/changeset/base/308358 Log: Initialize ip6 pointer before use. PR: 214169 MFC after:1 week Modified: head/sys/netinet/tcp_subr.c Modified: head/sys/netinet/tcp_subr.c == --- head/sys/netinet/tcp_subr.c Sun Nov 6 00:35:43 2016(r308357) +++ head/sys/netinet/tcp_subr.c Sun Nov 6 02:33:04 2016(r308358) @@ -2731,6 +2731,7 @@ tcp_signature_do_compute(struct mbuf *m, * Note: Upper-Layer Packet Length comes before Next Header. */ case (IPV6_VERSION >> 4): + ip6 = mtod(m, struct ip6_hdr *); in6 = ip6->ip6_src; in6_clearscope(); MD5Update(, (char *), sizeof(struct in6_addr)); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r308357 - stable/11/usr.bin/mkcsmapper
Author: bapt Date: Sun Nov 6 00:35:43 2016 New Revision: 308357 URL: https://svnweb.freebsd.org/changeset/base/308357 Log: MFC: r302481 Revert the change from errx/strerror to errc to appease gcc 4.2 I have forgotten this part in r307794 Reported by: lidl Modified: stable/11/usr.bin/mkcsmapper/yacc.y Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/mkcsmapper/yacc.y == --- stable/11/usr.bin/mkcsmapper/yacc.y Sat Nov 5 23:21:30 2016 (r308356) +++ stable/11/usr.bin/mkcsmapper/yacc.y Sun Nov 6 00:35:43 2016 (r308357) @@ -664,7 +664,7 @@ do_mkpv(FILE *in) if (ret && output) unlink(output); /* dump failure */ if (ret) - errc(EXIT_FAILURE, ret, ""); + errx(EXIT_FAILURE, "%s\n", strerror(ret)); } static void ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r308356 - in head/sys/dev/rtwn: . rtl8812a
Author: avos Date: Sat Nov 5 23:21:30 2016 New Revision: 308356 URL: https://svnweb.freebsd.org/changeset/base/308356 Log: rtwn: fix Rx filter setup for some multi-vap configuratons. - Correctly refresh Rx filter when AP (IBSS) vap is created after STA vap. - Block any RCR updates during TSF correction (IBSS mode). - Set CBSSID* bits during vap creation, not when it was started / stopped. - Cache current state to prevent unnecessary register reads. Tested with RTL8188CE, STA + AP mode. Modified: head/sys/dev/rtwn/if_rtwn.c head/sys/dev/rtwn/if_rtwn_rx.c head/sys/dev/rtwn/if_rtwn_rx.h head/sys/dev/rtwn/if_rtwnvar.h head/sys/dev/rtwn/rtl8812a/r12a_caps.c Modified: head/sys/dev/rtwn/if_rtwn.c == --- head/sys/dev/rtwn/if_rtwn.c Sat Nov 5 22:47:09 2016(r308355) +++ head/sys/dev/rtwn/if_rtwn.c Sat Nov 5 23:21:30 2016(r308356) @@ -917,6 +917,9 @@ rtwn_tsf_sync_adhoc_task(void *arg, int /* Accept beacons with the same BSSID. */ rtwn_set_rx_bssid_all(sc, 0); + /* Deny RCR updates. */ + sc->sc_flags |= RTWN_RCR_LOCKED; + /* Enable synchronization. */ rtwn_setbits_1(sc, R92C_BCN_CTRL(uvp->id), R92C_BCN_CTRL_DIS_TSF_UDT0, 0); @@ -929,6 +932,7 @@ rtwn_tsf_sync_adhoc_task(void *arg, int 0, R92C_BCN_CTRL_DIS_TSF_UDT0); /* Accept all beacons. */ + sc->sc_flags &= ~RTWN_RCR_LOCKED; rtwn_set_rx_bssid_all(sc, 1); /* Schedule next TSF synchronization. */ @@ -1193,7 +1197,6 @@ rtwn_run(struct rtwn_softc *sc, struct i struct ieee80211com *ic = vap->iv_ic; struct rtwn_vap *uvp = RTWN_VAP(vap); struct ieee80211_node *ni; - uint32_t reg; uint8_t mode; int error; @@ -1246,18 +1249,6 @@ rtwn_run(struct rtwn_softc *sc, struct i rtwn_write_1(sc, R92C_TXPAUSE, 0); } - /* Allow Rx from our BSSID only. */ - if (ic->ic_promisc == 0) { - reg = rtwn_read_4(sc, R92C_RCR); - - if (sc->bcn_vaps == 0) - reg |= R92C_RCR_CBSSID_BCN; - if (sc->ap_vaps == 0) - reg |= R92C_RCR_CBSSID_DATA; - - rtwn_write_4(sc, R92C_RCR, reg); - } - #ifndef RTWN_WITHOUT_UCODE /* Upload (QoS) Null Data frame to firmware. */ /* Note: do this for port 0 only. */ Modified: head/sys/dev/rtwn/if_rtwn_rx.c == --- head/sys/dev/rtwn/if_rtwn_rx.c Sat Nov 5 22:47:09 2016 (r308355) +++ head/sys/dev/rtwn/if_rtwn_rx.c Sat Nov 5 23:21:30 2016 (r308356) @@ -362,7 +362,7 @@ rtwn_rxfilter_update_mgt(struct rtwn_sof { uint16_t filter; - filter = 0x7f3f; + filter = 0x7f7f; if (sc->bcn_vaps == 0) {/* STA and/or MONITOR mode vaps */ filter &= ~( R92C_RXFLTMAP_SUBTYPE(IEEE80211_FC0_SUBTYPE_ASSOC_REQ) | @@ -393,7 +393,6 @@ rtwn_rxfilter_update(struct rtwn_softc * void rtwn_rxfilter_init(struct rtwn_softc *sc) { - uint32_t rcr; RTWN_ASSERT_LOCKED(sc); @@ -406,47 +405,60 @@ rtwn_rxfilter_init(struct rtwn_softc *sc /* Reject all data frames. */ rtwn_write_2(sc, R92C_RXFLTMAP2, 0x); - rcr = sc->rcr; - rcr |= R92C_RCR_AM | R92C_RCR_AB | R92C_RCR_APM | - R92C_RCR_HTC_LOC_CTRL | R92C_RCR_APP_PHYSTS | - R92C_RCR_APP_ICV | R92C_RCR_APP_MIC; - - /* Set Rx filter. */ - rtwn_write_4(sc, R92C_RCR, rcr); + /* Append generic Rx filter bits. */ + sc->rcr |= R92C_RCR_AM | R92C_RCR_AB | R92C_RCR_APM | + R92C_RCR_HTC_LOC_CTRL | R92C_RCR_APP_PHYSTS | + R92C_RCR_APP_ICV | R92C_RCR_APP_MIC; /* Update dynamic Rx filter parts. */ rtwn_rxfilter_update(sc); } void +rtwn_rxfilter_set(struct rtwn_softc *sc) +{ + if (!(sc->sc_flags & RTWN_RCR_LOCKED)) + rtwn_write_4(sc, R92C_RCR, sc->rcr); +} + +void rtwn_set_rx_bssid_all(struct rtwn_softc *sc, int enable) { + if (enable) - rtwn_setbits_4(sc, R92C_RCR, R92C_RCR_CBSSID_BCN, 0); + sc->rcr &= ~R92C_RCR_CBSSID_BCN; else - rtwn_setbits_4(sc, R92C_RCR, 0, R92C_RCR_CBSSID_BCN); + sc->rcr |= R92C_RCR_CBSSID_BCN; + rtwn_rxfilter_set(sc); } void rtwn_set_promisc(struct rtwn_softc *sc) { struct ieee80211com *ic = >sc_ic; - uint32_t mask1, mask2; + uint32_t mask_all, mask_min; RTWN_ASSERT_LOCKED(sc); - mask1 = R92C_RCR_ACF | R92C_RCR_ADF | R92C_RCR_AMF | R92C_RCR_AAP; - mask2 = R92C_RCR_APM; + mask_all = R92C_RCR_ACF | R92C_RCR_ADF | R92C_RCR_AMF | R92C_RCR_AAP; + mask_min = R92C_RCR_APM; - if (sc->vaps_running != 0) { - if (sc->bcn_vaps == 0) -
svn commit: r308355 - head/sys/dev/rtwn
Author: avos Date: Sat Nov 5 22:47:09 2016 New Revision: 308355 URL: https://svnweb.freebsd.org/changeset/base/308355 Log: rtwn: pause beacon queue during scanning. Tested with RTL8821AU, AP + AP mode. Modified: head/sys/dev/rtwn/if_rtwn.c Modified: head/sys/dev/rtwn/if_rtwn.c == --- head/sys/dev/rtwn/if_rtwn.c Sat Nov 5 22:41:22 2016(r308354) +++ head/sys/dev/rtwn/if_rtwn.c Sat Nov 5 22:47:09 2016(r308355) @@ -1513,6 +1513,8 @@ rtwn_scan_start(struct ieee80211com *ic) struct rtwn_softc *sc = ic->ic_softc; RTWN_LOCK(sc); + /* Pause beaconing. */ + rtwn_setbits_1(sc, R92C_TXPAUSE, 0, R92C_TX_QUEUE_BCN); /* Receive beacons / probe responses from any BSSID. */ if (sc->bcn_vaps == 0) rtwn_set_rx_bssid_all(sc, 1); @@ -1547,6 +1549,9 @@ rtwn_scan_end(struct ieee80211com *ic) /* Restore basic rates mask. */ rtwn_calc_basicrates(sc); + + /* Resume beaconing. */ + rtwn_setbits_1(sc, R92C_TXPAUSE, R92C_TX_QUEUE_BCN, 0); RTWN_UNLOCK(sc); } ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r308354 - head/sys/net80211
Author: adrian Date: Sat Nov 5 22:41:22 2016 New Revision: 308354 URL: https://svnweb.freebsd.org/changeset/base/308354 Log: [net80211] begin fleshing out new hardware crypto offload features. * extend the keycache flag word to be 32 bits, not 16 bits * add new key flags for transmit: + IEEE80211_KEY_NOIV: Don't insert IV in the payload when transmitting data frames; + IEEE80211_KEY_NOIVMGT: Don't insert IV in the payload when transmitting MIC frames; + IEEE80211_KEY_NOMIC: Don't insert MIC in the payload when transmitting data frames; + IEEE80211_KEY_NOMICMGT: don't insert MIC in the payload when transmitting management frames. * teach ieee80211_crypto_demic() about hardware decrypted frames: + if frames are hardware decrypted and the frame has failed MIC, treat it as a michael failure. + if frames are hardware decrypted and the frame has stripped MIC, we can't check the MIC in the payload - we don't have anything to compare it against. This is only part of the work required to successfully transmit/receive hardware crypto frames such as the qualcomm atheros 11ac offload chips. There will be further work in the transmit and receive path before this can be done by default. Reviewed by: avos Differential Revision:https://reviews.freebsd.org/D8364 Modified: head/sys/net80211/ieee80211_crypto.c head/sys/net80211/ieee80211_crypto.h Modified: head/sys/net80211/ieee80211_crypto.c == --- head/sys/net80211/ieee80211_crypto.cSat Nov 5 22:09:21 2016 (r308353) +++ head/sys/net80211/ieee80211_crypto.cSat Nov 5 22:41:22 2016 (r308354) @@ -633,6 +633,61 @@ ieee80211_crypto_decap(struct ieee80211_ #undef IEEE80211_WEP_HDRLEN } + +/* + * Check and remove any MIC. + */ +int +ieee80211_crypto_demic(struct ieee80211vap *vap, struct ieee80211_key *k, +struct mbuf *m, int force) +{ + const struct ieee80211_cipher *cip; + const struct ieee80211_rx_stats *rxs; + struct ieee80211_frame *wh; + + rxs = ieee80211_get_rx_params_ptr(m); + wh = mtod(m, struct ieee80211_frame *); + + /* +* Handle demic / mic errors from hardware-decrypted offload devices. +*/ + if ((rxs != NULL) && (rxs->c_pktflags & IEEE80211_RX_F_DECRYPTED)) { + if (rxs->c_pktflags & IEEE80211_RX_F_FAIL_MIC) { + /* +* Hardware has said MIC failed. We don't care about +* whether it was stripped or not. +* +* Eventually - teach the demic methods in crypto +* modules to handle a NULL key and not to dereference +* it. +*/ + ieee80211_notify_michael_failure(vap, wh, -1); + return (0); + } + + if (rxs->c_pktflags & IEEE80211_RX_F_MMIC_STRIP) { + /* +* Hardware has decrypted and not indicated a +* MIC failure and has stripped the MIC. +* We may not have a key, so for now just +* return OK. +*/ + return (1); + } + } + + /* +* If we don't have a key at this point then we don't +* have to demic anything. +*/ + if (k == NULL) + return (1); + + cip = k->wk_cipher; + return (cip->ic_miclen > 0 ? cip->ic_demic(k, m, force) : 1); +} + + static void load_ucastkey(void *arg, struct ieee80211_node *ni) { Modified: head/sys/net80211/ieee80211_crypto.h == --- head/sys/net80211/ieee80211_crypto.hSat Nov 5 22:09:21 2016 (r308353) +++ head/sys/net80211/ieee80211_crypto.hSat Nov 5 22:41:22 2016 (r308354) @@ -73,19 +73,25 @@ typedef uint16_t ieee80211_keyix; /* h/w struct ieee80211_key { uint8_t wk_keylen; /* key length in bytes */ - uint8_t wk_pad; - uint16_twk_flags; -#defineIEEE80211_KEY_XMIT 0x0001 /* key used for xmit */ -#defineIEEE80211_KEY_RECV 0x0002 /* key used for recv */ -#defineIEEE80211_KEY_GROUP 0x0004 /* key used for WPA group operation */ -#defineIEEE80211_KEY_NOREPLAY 0x0008 /* ignore replay failures */ -#defineIEEE80211_KEY_SWENCRYPT 0x0010 /* host-based encrypt */ -#defineIEEE80211_KEY_SWDECRYPT 0x0020 /* host-based decrypt */ -#defineIEEE80211_KEY_SWENMIC 0x0040 /* host-based enmic */ -#defineIEEE80211_KEY_SWDEMIC 0x0080 /* host-based demic */ -#defineIEEE80211_KEY_DEVKEY0x0100 /* device key request completed */
svn commit: r308353 - stable/11/sys/modules/dtb/nvidia
Author: gonzo Date: Sat Nov 5 22:09:21 2016 New Revision: 308353 URL: https://svnweb.freebsd.org/changeset/base/308353 Log: MFC r306460: Add dtb module for Jetson-TK1 board Added: stable/11/sys/modules/dtb/nvidia/ - copied from r306460, head/sys/modules/dtb/nvidia/ Modified: Directory Properties: stable/11/ (props changed) ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r308352 - stable/11/sys/cam
Author: markj Date: Sat Nov 5 20:23:18 2016 New Revision: 308352 URL: https://svnweb.freebsd.org/changeset/base/308352 Log: MFC r306710: CAM ccbq sanity: checks on insert and remove Modified: stable/11/sys/cam/cam_queue.c stable/11/sys/cam/cam_queue.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cam/cam_queue.c == --- stable/11/sys/cam/cam_queue.c Sat Nov 5 20:22:12 2016 (r308351) +++ stable/11/sys/cam/cam_queue.c Sat Nov 5 20:23:18 2016 (r308352) @@ -176,8 +176,11 @@ camq_remove(struct camq *queue, int inde { cam_pinfo *removed_entry; - if (index == 0 || index > queue->entries) - return (NULL); + if (index <= 0 || index > queue->entries) + panic("%s: Attempt to remove out-of-bounds index %d " + "from queue %p of size %d", __func__, index, queue, + queue->entries); + removed_entry = queue->queue_array[index]; if (queue->entries != index) { queue->queue_array[index] = queue->queue_array[queue->entries]; Modified: stable/11/sys/cam/cam_queue.h == --- stable/11/sys/cam/cam_queue.h Sat Nov 5 20:22:12 2016 (r308351) +++ stable/11/sys/cam/cam_queue.h Sat Nov 5 20:23:18 2016 (r308352) @@ -197,6 +197,11 @@ cam_ccbq_insert_ccb(struct cam_ccbq *ccb struct ccb_hdr *old_ccb; struct camq *queue = >queue; + KASSERT((new_ccb->ccb_h.func_code & XPT_FC_QUEUED) != 0 && + (new_ccb->ccb_h.func_code & XPT_FC_USER_CCB) == 0, + ("%s: Cannot queue ccb %p func_code %#x", __func__, new_ccb, +new_ccb->ccb_h.func_code)); + /* * If queue is already full, try to resize. * If resize fail, push CCB with lowest priority out to the TAILQ. @@ -218,6 +223,7 @@ cam_ccbq_remove_ccb(struct cam_ccbq *ccb { struct ccb_hdr *cccb, *bccb; struct camq *queue = >queue; + cam_pinfo *removed_entry __unused; /* If the CCB is on the TAILQ, remove it from there. */ if (ccb->ccb_h.pinfo.index == CAM_EXTRAQ_INDEX) { @@ -228,7 +234,10 @@ cam_ccbq_remove_ccb(struct cam_ccbq *ccb return; } - camq_remove(queue, ccb->ccb_h.pinfo.index); + removed_entry = camq_remove(queue, ccb->ccb_h.pinfo.index); + KASSERT(removed_entry == >ccb_h.pinfo, + ("%s: Removed wrong entry from queue (%p != %p)", __func__, +removed_entry, >ccb_h.pinfo)); /* * If there are some CCBs on TAILQ, find the best one and move it ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r308351 - stable/11/sys/cam
Author: markj Date: Sat Nov 5 20:22:12 2016 New Revision: 308351 URL: https://svnweb.freebsd.org/changeset/base/308351 Log: MFC r306529: cam_periph_ccbwait could return while ccb in progress Modified: stable/11/sys/cam/cam_periph.c stable/11/sys/cam/cam_periph.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cam/cam_periph.c == --- stable/11/sys/cam/cam_periph.c Sat Nov 5 20:15:58 2016 (r308350) +++ stable/11/sys/cam/cam_periph.c Sat Nov 5 20:22:12 2016 (r308351) @@ -975,16 +975,6 @@ cam_periph_unmapmem(union ccb *ccb, stru PRELE(curproc); } -void -cam_periph_ccbwait(union ccb *ccb) -{ - - if ((ccb->ccb_h.pinfo.index != CAM_UNQUEUED_INDEX) -|| ((ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_INPROG)) - xpt_path_sleep(ccb->ccb_h.path, >ccb_h.cbfcnp, PRIBIO, - "cbwait", 0); -} - int cam_periph_ioctl(struct cam_periph *periph, u_long cmd, caddr_t addr, int (*error_routine)(union ccb *ccb, @@ -1048,13 +1038,38 @@ cam_periph_ioctl(struct cam_periph *peri } static void +cam_periph_done_panic(struct cam_periph *periph, union ccb *done_ccb) +{ + + panic("%s: already done with ccb %p", __func__, done_ccb); +} + +static void cam_periph_done(struct cam_periph *periph, union ccb *done_ccb) { /* Caller will release the CCB */ + xpt_path_assert(done_ccb->ccb_h.path, MA_OWNED); + done_ccb->ccb_h.cbfcnp = cam_periph_done_panic; wakeup(_ccb->ccb_h.cbfcnp); } +static void +cam_periph_ccbwait(union ccb *ccb) +{ + + if ((ccb->ccb_h.func_code & XPT_FC_QUEUED) != 0) { + while (ccb->ccb_h.cbfcnp != cam_periph_done_panic) + xpt_path_sleep(ccb->ccb_h.path, >ccb_h.cbfcnp, + PRIBIO, "cbwait", 0); + } + KASSERT(ccb->ccb_h.pinfo.index == CAM_UNQUEUED_INDEX && + (ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_INPROG, + ("%s: proceeding with incomplete ccb: ccb=%p, func_code=%#x, " +"status=%#x, index=%d", __func__, ccb, ccb->ccb_h.func_code, +ccb->ccb_h.status, ccb->ccb_h.pinfo.index)); +} + int cam_periph_runccb(union ccb *ccb, int (*error_routine)(union ccb *ccb, @@ -1069,6 +1084,9 @@ cam_periph_runccb(union ccb *ccb, starttime = NULL; xpt_path_assert(ccb->ccb_h.path, MA_OWNED); + KASSERT((ccb->ccb_h.flags & CAM_UNLOCKED) == 0, + ("%s: ccb=%p, func_code=%#x, flags=%#x", __func__, ccb, +ccb->ccb_h.func_code, ccb->ccb_h.flags)); /* * If the user has supplied a stats structure, and if we understand @@ -1088,9 +1106,10 @@ cam_periph_runccb(union ccb *ccb, cam_periph_ccbwait(ccb); if ((ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP) error = 0; - else if (error_routine != NULL) + else if (error_routine != NULL) { + ccb->ccb_h.cbfcnp = cam_periph_done; error = (*error_routine)(ccb, camflags, sense_flags); - else + } else error = 0; } while (error == ERESTART); Modified: stable/11/sys/cam/cam_periph.h == --- stable/11/sys/cam/cam_periph.h Sat Nov 5 20:15:58 2016 (r308350) +++ stable/11/sys/cam/cam_periph.h Sat Nov 5 20:22:12 2016 (r308351) @@ -166,7 +166,6 @@ voidcam_periph_unmapmem(union ccb *ccb struct cam_periph_map_info *mapinfo); union ccb *cam_periph_getccb(struct cam_periph *periph, u_int32_t priority); -void cam_periph_ccbwait(union ccb *ccb); intcam_periph_runccb(union ccb *ccb, int (*error_routine)(union ccb *ccb, cam_flags camflags, ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r308350 - stable/11/sys/kern
Author: markj Date: Sat Nov 5 20:15:58 2016 New Revision: 308350 URL: https://svnweb.freebsd.org/changeset/base/308350 Log: MFC r308097: Fix WITNESS hints for pagequeue locks. Modified: stable/11/sys/kern/subr_witness.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/subr_witness.c == --- stable/11/sys/kern/subr_witness.c Sat Nov 5 20:14:23 2016 (r308349) +++ stable/11/sys/kern/subr_witness.c Sat Nov 5 20:15:58 2016 (r308350) @@ -599,7 +599,7 @@ static struct witness_order_list_entry o * CDEV */ { "vm map (system)", _class_mtx_sleep }, - { "vm page queue", _class_mtx_sleep }, + { "vm pagequeue", _class_mtx_sleep }, { "vnode interlock", _class_mtx_sleep }, { "cdev", _class_mtx_sleep }, { NULL, NULL }, @@ -609,7 +609,7 @@ static struct witness_order_list_entry o { "vm map (user)", _class_sx }, { "vm object", _class_rw }, { "vm page", _class_mtx_sleep }, - { "vm page queue", _class_mtx_sleep }, + { "vm pagequeue", _class_mtx_sleep }, { "pmap pv global", _class_rw }, { "pmap", _class_mtx_sleep }, { "pmap pv list", _class_rw }, ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r308349 - stable/10/sys/vm
Author: markj Date: Sat Nov 5 20:14:23 2016 New Revision: 308349 URL: https://svnweb.freebsd.org/changeset/base/308349 Log: MFC r304053, r304054: Initialize busy lock state and strengthen busy lock assertions. Tested by:Oliver Pinter Modified: stable/10/sys/vm/vm_page.c stable/10/sys/vm/vm_phys.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/vm/vm_page.c == --- stable/10/sys/vm/vm_page.c Sat Nov 5 19:51:13 2016(r308348) +++ stable/10/sys/vm/vm_page.c Sat Nov 5 20:14:23 2016(r308349) @@ -1574,8 +1574,7 @@ vm_page_alloc(vm_object_t object, vm_pin ("vm_page_alloc: page %p has unexpected queue %d", m, m->queue)); KASSERT(m->wire_count == 0, ("vm_page_alloc: page %p is wired", m)); KASSERT(m->hold_count == 0, ("vm_page_alloc: page %p is held", m)); - KASSERT(!vm_page_sbusied(m), - ("vm_page_alloc: page %p is busy", m)); + KASSERT(!vm_page_busied(m), ("vm_page_alloc: page %p is busy", m)); KASSERT(m->dirty == 0, ("vm_page_alloc: page %p is dirty", m)); KASSERT(pmap_page_get_memattr(m) == VM_MEMATTR_DEFAULT, ("vm_page_alloc: page %p has unexpected memattr %d", m, @@ -1887,7 +1886,7 @@ vm_page_alloc_init(vm_page_t m) ("vm_page_alloc_init: page %p is wired", m)); KASSERT(m->hold_count == 0, ("vm_page_alloc_init: page %p is held", m)); - KASSERT(!vm_page_sbusied(m), + KASSERT(!vm_page_busied(m), ("vm_page_alloc_init: page %p is busy", m)); KASSERT(m->dirty == 0, ("vm_page_alloc_init: page %p is dirty", m)); Modified: stable/10/sys/vm/vm_phys.c == --- stable/10/sys/vm/vm_phys.c Sat Nov 5 19:51:13 2016(r308348) +++ stable/10/sys/vm/vm_phys.c Sat Nov 5 20:14:23 2016(r308349) @@ -504,6 +504,7 @@ vm_phys_add_page(vm_paddr_t pa) cnt.v_page_count++; m = vm_phys_paddr_to_vm_page(pa); + m->busy_lock = VPB_UNBUSIED; m->phys_addr = pa; m->queue = PQ_NONE; m->segind = vm_phys_paddr_to_segind(pa); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r308348 - head/usr.sbin/rtadvd
On 2016-11-05 19:51:14 (+), Hiroki Satowrote: > Log: > Add link-layer address option in RA even for IFT_L2VLAN and IFT_BRIDGE. > > Reported by:philip > MFC after: 3 days Thank you! Philip -- Philip Paeps Senior Reality Engineer Ministry of Information ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r308348 - head/usr.sbin/rtadvd
Author: hrs Date: Sat Nov 5 19:51:13 2016 New Revision: 308348 URL: https://svnweb.freebsd.org/changeset/base/308348 Log: Add link-layer address option in RA even for IFT_L2VLAN and IFT_BRIDGE. Reported by: philip MFC after:3 days Modified: head/usr.sbin/rtadvd/if.c Modified: head/usr.sbin/rtadvd/if.c == --- head/usr.sbin/rtadvd/if.c Sat Nov 5 18:00:36 2016(r308347) +++ head/usr.sbin/rtadvd/if.c Sat Nov 5 19:51:13 2016(r308348) @@ -114,6 +114,8 @@ lladdropt_length(struct sockaddr_dl *sdl { switch (sdl->sdl_type) { case IFT_ETHER: + case IFT_L2VLAN: + case IFT_BRIDGE: return (ROUNDUP8(ETHER_ADDR_LEN + 2)); default: return (0); @@ -129,6 +131,8 @@ lladdropt_fill(struct sockaddr_dl *sdl, switch (sdl->sdl_type) { case IFT_ETHER: + case IFT_L2VLAN: + case IFT_BRIDGE: ndopt->nd_opt_len = (ROUNDUP8(ETHER_ADDR_LEN + 2)) >> 3; addr = (char *)(ndopt + 1); memcpy(addr, LLADDR(sdl), ETHER_ADDR_LEN); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r308347 - head/usr.sbin/traceroute6
Author: hrs Date: Sat Nov 5 18:00:36 2016 New Revision: 308347 URL: https://svnweb.freebsd.org/changeset/base/308347 Log: Fix an infinite loop at an non-responding hop when other echo replies are kept arriving in the waittime time window. Submitted by: Denny Page PR: 210286 MFC after:3 days Modified: head/usr.sbin/traceroute6/traceroute6.c Modified: head/usr.sbin/traceroute6/traceroute6.c == --- head/usr.sbin/traceroute6/traceroute6.c Sat Nov 5 17:02:38 2016 (r308346) +++ head/usr.sbin/traceroute6/traceroute6.c Sat Nov 5 18:00:36 2016 (r308347) @@ -955,6 +955,9 @@ main(argc, argv) break; } break; + } else if (deltaT(, ) > waittime * 1000) { + cc = 0; + break; } } if (cc == 0) ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r308346 - in stable: 10/usr.sbin/amd 10/usr.sbin/amd/amd 10/usr.sbin/amd/libamu 11/usr.sbin/amd 11/usr.sbin/amd/amd 11/usr.sbin/amd/libamu 9/usr.sbin/amd 9/usr.sbin/amd/amd 9/usr.sbin/a...
Author: cy Date: Sat Nov 5 17:02:38 2016 New Revision: 308346 URL: https://svnweb.freebsd.org/changeset/base/308346 Log: MFC r307800, r307801 r307800: Sources from the "current" build tree and generated sources in the object tree should be used instead of sources and headers from the already installed source tree on the build host. This was noticed while addressing issues in the upcoming amd update. r307801: Align whitespace. r307801 is related to r307800 however it was a separate commit to HEAD in order to maintain a separation between the functional change and a correction of style. Modified: stable/9/usr.sbin/amd/Makefile.inc stable/9/usr.sbin/amd/amd/Makefile stable/9/usr.sbin/amd/libamu/Makefile Directory Properties: stable/9/usr.sbin/ (props changed) stable/9/usr.sbin/amd/ (props changed) Changes in other areas also in this revision: Modified: stable/10/usr.sbin/amd/Makefile.inc stable/10/usr.sbin/amd/amd/Makefile stable/10/usr.sbin/amd/libamu/Makefile stable/11/usr.sbin/amd/Makefile.inc stable/11/usr.sbin/amd/amd/Makefile stable/11/usr.sbin/amd/libamu/Makefile Directory Properties: stable/10/ (props changed) stable/11/ (props changed) Modified: stable/9/usr.sbin/amd/Makefile.inc == --- stable/9/usr.sbin/amd/Makefile.inc Sat Nov 5 16:30:42 2016 (r308345) +++ stable/9/usr.sbin/amd/Makefile.inc Sat Nov 5 17:02:38 2016 (r308346) @@ -37,8 +37,8 @@ LIBAMUDIR=${.CURDIR}/../libamu LIBAMU=${LIBAMUDIR}/libamu.a RPCCOM=RPCGEN_CPP=${CPP:Q} rpcgen -MOUNT_X= ${DESTDIR}/usr/include/rpcsvc/mount.x -NFS_PROT_X=${DESTDIR}/usr/include/rpcsvc/nfs_prot.x +MOUNT_X= ${.CURDIR}/../../../include/rpcsvc/mount.x +NFS_PROT_X=${.CURDIR}/../../../include/rpcsvc/nfs_prot.x WARNS?=1 Modified: stable/9/usr.sbin/amd/amd/Makefile == --- stable/9/usr.sbin/amd/amd/Makefile Sat Nov 5 16:30:42 2016 (r308345) +++ stable/9/usr.sbin/amd/amd/Makefile Sat Nov 5 17:02:38 2016 (r308346) @@ -25,14 +25,14 @@ SRCS+= ops_unionfs.c opts.c readdir.c re SRCS+= srvr_amfs_auto.c srvr_nfs.c CFLAGS+= -I${.CURDIR}/../../../contrib/amd/amd \ --I${DESTDIR}/usr/include/rpcsvc +-I${.OBJDIR}/../../../include/rpcsvc DPADD= ${LIBAMU} ${LIBWRAP} LDADD= ${LIBAMU} -lwrap CLEANFILES+= conf_parse.c conf_parse.h conf_tok.c -conf_tok.o: conf_parse.h +conf_tok.o:conf_parse.h # These are generated at compile time SRCS+= mount_xdr.c Modified: stable/9/usr.sbin/amd/libamu/Makefile == --- stable/9/usr.sbin/amd/libamu/Makefile Sat Nov 5 16:30:42 2016 (r308345) +++ stable/9/usr.sbin/amd/libamu/Makefile Sat Nov 5 17:02:38 2016 (r308346) @@ -23,7 +23,7 @@ SRCS+=nfs_prot_x.c xdr_func_%undef.c CLEANFILES+= nfs_prot_x.c xdr_func_%undef.c CFLAGS+= -I${.CURDIR}/../../../contrib/amd/libamu \ --I${DESTDIR}/usr/include/rpcsvc +-I${.OBJDIR}/../../../include/rpcsvc nfs_prot_x.c: ${NFS_PROT_X} ${RPCCOM} -c -C -DWANT_NFS3 ${NFS_PROT_X} -o ${.TARGET} ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r308346 - in stable: 10/usr.sbin/amd 10/usr.sbin/amd/amd 10/usr.sbin/amd/libamu 11/usr.sbin/amd 11/usr.sbin/amd/amd 11/usr.sbin/amd/libamu 9/usr.sbin/amd 9/usr.sbin/amd/amd 9/usr.sbin/a...
Author: cy Date: Sat Nov 5 17:02:38 2016 New Revision: 308346 URL: https://svnweb.freebsd.org/changeset/base/308346 Log: MFC r307800, r307801 r307800: Sources from the "current" build tree and generated sources in the object tree should be used instead of sources and headers from the already installed source tree on the build host. This was noticed while addressing issues in the upcoming amd update. r307801: Align whitespace. r307801 is related to r307800 however it was a separate commit to HEAD in order to maintain a separation between the functional change and a correction of style. Modified: stable/11/usr.sbin/amd/Makefile.inc stable/11/usr.sbin/amd/amd/Makefile stable/11/usr.sbin/amd/libamu/Makefile Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/usr.sbin/amd/Makefile.inc stable/10/usr.sbin/amd/amd/Makefile stable/10/usr.sbin/amd/libamu/Makefile stable/9/usr.sbin/amd/Makefile.inc stable/9/usr.sbin/amd/amd/Makefile stable/9/usr.sbin/amd/libamu/Makefile Directory Properties: stable/10/ (props changed) stable/9/usr.sbin/ (props changed) stable/9/usr.sbin/amd/ (props changed) Modified: stable/11/usr.sbin/amd/Makefile.inc == --- stable/11/usr.sbin/amd/Makefile.inc Sat Nov 5 16:30:42 2016 (r308345) +++ stable/11/usr.sbin/amd/Makefile.inc Sat Nov 5 17:02:38 2016 (r308346) @@ -32,8 +32,8 @@ CFLAGS+= -DYES_HESIOD CFLAGS+= -DHOST_CPU=\"${MACHINE_CPUARCH}\" -DHOST_ARCH=\"${MACHINE_ARCH}\" RPCCOM=RPCGEN_CPP=${CPP:Q} rpcgen -MOUNT_X= ${DESTDIR}/usr/include/rpcsvc/mount.x -NFS_PROT_X=${DESTDIR}/usr/include/rpcsvc/nfs_prot.x +MOUNT_X= ${SRCTOP}/include/rpcsvc/mount.x +NFS_PROT_X=${SRCTOP}/include/rpcsvc/nfs_prot.x WARNS?=1 Modified: stable/11/usr.sbin/amd/amd/Makefile == --- stable/11/usr.sbin/amd/amd/Makefile Sat Nov 5 16:30:42 2016 (r308345) +++ stable/11/usr.sbin/amd/amd/Makefile Sat Nov 5 17:02:38 2016 (r308346) @@ -25,13 +25,13 @@ SRCS+= ops_unionfs.c opts.c readdir.c re SRCS+= srvr_amfs_auto.c srvr_nfs.c CFLAGS+= -I${.CURDIR}/../../../contrib/amd/amd \ --I${DESTDIR}/usr/include/rpcsvc +-I${.OBJDIR}/../../../include/rpcsvc LIBADD=amu wrap CLEANFILES+= conf_parse.c conf_parse.h conf_tok.c -conf_tok.o: conf_parse.h +conf_tok.o:conf_parse.h # These are generated at compile time SRCS+= mount_xdr.c Modified: stable/11/usr.sbin/amd/libamu/Makefile == --- stable/11/usr.sbin/amd/libamu/Makefile Sat Nov 5 16:30:42 2016 (r308345) +++ stable/11/usr.sbin/amd/libamu/Makefile Sat Nov 5 17:02:38 2016 (r308346) @@ -23,7 +23,7 @@ SRCS+=nfs_prot_x.c xdr_func_%undef.c CLEANFILES+= nfs_prot_x.c xdr_func_%undef.c CFLAGS+= -I${.CURDIR}/../../../contrib/amd/libamu \ --I${DESTDIR}/usr/include/rpcsvc +-I${.OBJDIR}/../../../include/rpcsvc nfs_prot_x.c: ${NFS_PROT_X} ${RPCCOM} -c -C -DWANT_NFS3 ${NFS_PROT_X} -o ${.TARGET} ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r308346 - in stable: 10/usr.sbin/amd 10/usr.sbin/amd/amd 10/usr.sbin/amd/libamu 11/usr.sbin/amd 11/usr.sbin/amd/amd 11/usr.sbin/amd/libamu 9/usr.sbin/amd 9/usr.sbin/amd/amd 9/usr.sbin/a...
Author: cy Date: Sat Nov 5 17:02:38 2016 New Revision: 308346 URL: https://svnweb.freebsd.org/changeset/base/308346 Log: MFC r307800, r307801 r307800: Sources from the "current" build tree and generated sources in the object tree should be used instead of sources and headers from the already installed source tree on the build host. This was noticed while addressing issues in the upcoming amd update. r307801: Align whitespace. r307801 is related to r307800 however it was a separate commit to HEAD in order to maintain a separation between the functional change and a correction of style. Modified: stable/10/usr.sbin/amd/Makefile.inc stable/10/usr.sbin/amd/amd/Makefile stable/10/usr.sbin/amd/libamu/Makefile Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/usr.sbin/amd/Makefile.inc stable/11/usr.sbin/amd/amd/Makefile stable/11/usr.sbin/amd/libamu/Makefile stable/9/usr.sbin/amd/Makefile.inc stable/9/usr.sbin/amd/amd/Makefile stable/9/usr.sbin/amd/libamu/Makefile Directory Properties: stable/11/ (props changed) stable/9/usr.sbin/ (props changed) stable/9/usr.sbin/amd/ (props changed) Modified: stable/10/usr.sbin/amd/Makefile.inc == --- stable/10/usr.sbin/amd/Makefile.inc Sat Nov 5 16:30:42 2016 (r308345) +++ stable/10/usr.sbin/amd/Makefile.inc Sat Nov 5 17:02:38 2016 (r308346) @@ -37,8 +37,8 @@ LIBAMUDIR=${.CURDIR}/../libamu LIBAMU=${LIBAMUDIR}/libamu.a RPCCOM=RPCGEN_CPP=${CPP:Q} rpcgen -MOUNT_X= ${DESTDIR}/usr/include/rpcsvc/mount.x -NFS_PROT_X=${DESTDIR}/usr/include/rpcsvc/nfs_prot.x +MOUNT_X= ${SRCTOP}/include/rpcsvc/mount.x +NFS_PROT_X=${SRCTOP}/include/rpcsvc/nfs_prot.x WARNS?=1 Modified: stable/10/usr.sbin/amd/amd/Makefile == --- stable/10/usr.sbin/amd/amd/Makefile Sat Nov 5 16:30:42 2016 (r308345) +++ stable/10/usr.sbin/amd/amd/Makefile Sat Nov 5 17:02:38 2016 (r308346) @@ -25,14 +25,14 @@ SRCS+= ops_unionfs.c opts.c readdir.c re SRCS+= srvr_amfs_auto.c srvr_nfs.c CFLAGS+= -I${.CURDIR}/../../../contrib/amd/amd \ --I${DESTDIR}/usr/include/rpcsvc +-I${.OBJDIR}/../../../include/rpcsvc DPADD= ${LIBAMU} ${LIBWRAP} LDADD= ${LIBAMU} -lwrap CLEANFILES+= conf_parse.c conf_parse.h conf_tok.c -conf_tok.o: conf_parse.h +conf_tok.o:conf_parse.h # These are generated at compile time SRCS+= mount_xdr.c Modified: stable/10/usr.sbin/amd/libamu/Makefile == --- stable/10/usr.sbin/amd/libamu/Makefile Sat Nov 5 16:30:42 2016 (r308345) +++ stable/10/usr.sbin/amd/libamu/Makefile Sat Nov 5 17:02:38 2016 (r308346) @@ -23,7 +23,7 @@ SRCS+=nfs_prot_x.c xdr_func_%undef.c CLEANFILES+= nfs_prot_x.c xdr_func_%undef.c CFLAGS+= -I${.CURDIR}/../../../contrib/amd/libamu \ --I${DESTDIR}/usr/include/rpcsvc +-I${.OBJDIR}/../../../include/rpcsvc nfs_prot_x.c: ${NFS_PROT_X} ${RPCCOM} -c -C -DWANT_NFS3 ${NFS_PROT_X} -o ${.TARGET} ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r308345 - head/sys/dev/e1000
Author: sbruno Date: Sat Nov 5 16:30:42 2016 New Revision: 308345 URL: https://svnweb.freebsd.org/changeset/base/308345 Log: r295133 attempted to deactivate TSO in the 100Mbit link case with this adapter to work around bugs in TSO handling at this speed. em_init_locked is called during first boot of the adapter and will see that link_speed is unitialized, effectively turning off tso for all cards at all speeds, which I believe was *not* the intent. Move the handling of TSO deactivation to the link handler where we can more effectively make the decision about what to do. In addition, completely purge the TSO capabilities instead of disabling just CSUM_TSO. Thanks to jhb for explanation of the hw capabilites api. Thanks to royger and cognet for testing the 100Mbit failure case to ensure that their adapters do indeed still work. MFC after:1 week Sponsored by: Limelight Networks Modified: head/sys/dev/e1000/if_em.c Modified: head/sys/dev/e1000/if_em.c == --- head/sys/dev/e1000/if_em.c Sat Nov 5 16:23:33 2016(r308344) +++ head/sys/dev/e1000/if_em.c Sat Nov 5 16:30:42 2016(r308345) @@ -369,11 +369,6 @@ MODULE_DEPEND(em, netmap, 1, 1, 1); #define MAX_INTS_PER_SEC 8000 #define DEFAULT_ITR(10/(MAX_INTS_PER_SEC * 256)) -/* Allow common code without TSO */ -#ifndef CSUM_TSO -#define CSUM_TSO 0 -#endif - #define TSO_WORKAROUND 4 static SYSCTL_NODE(_hw, OID_AUTO, em, CTLFLAG_RD, 0, "EM driver parameters"); @@ -1396,15 +1391,9 @@ em_init_locked(struct adapter *adapter) if_clearhwassist(ifp); if (if_getcapenable(ifp) & IFCAP_TXCSUM) if_sethwassistbits(ifp, CSUM_TCP | CSUM_UDP, 0); - /* - ** There have proven to be problems with TSO when not - ** at full gigabit speed, so disable the assist automatically - ** when at lower speeds. -jfv - */ - if (if_getcapenable(ifp) & IFCAP_TSO4) { - if (adapter->link_speed == SPEED_1000) - if_sethwassistbits(ifp, CSUM_TSO, 0); - } + + if (if_getcapenable(ifp) & IFCAP_TSO4) + if_sethwassistbits(ifp, CSUM_TSO, 0); /* Configure for OS presence */ em_init_manageability(adapter); @@ -2412,6 +2401,18 @@ em_update_link_status(struct adapter *ad if (link_check && (adapter->link_active == 0)) { e1000_get_speed_and_duplex(hw, >link_speed, >link_duplex); + /* + ** There have proven to be problems with TSO when not + ** at full gigabit speed, so disable the assist automatically + ** when at lower speeds. -jfv + */ + if (adapter->link_speed != SPEED_1000) { + if_sethwassistbits(ifp, 0, CSUM_TSO); + if_setcapenablebit(ifp, 0, IFCAP_TSO4); + if_setcapabilitiesbit(ifp, 0, IFCAP_TSO4); + + } + /* Check if we must disable SPEED_MODE bit on PCI-E */ if ((adapter->link_speed != SPEED_1000) && ((hw->mac.type == e1000_82571) || ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r308344 - head/usr.sbin/makefs
Author: marcel Date: Sat Nov 5 16:23:33 2016 New Revision: 308344 URL: https://svnweb.freebsd.org/changeset/base/308344 Log: Assign a random number to di_gen (for FFS), instead of extracting it from struct stat. We don't necessarily have permissions to see the generation number and the host OS may not have st_gen in struct stat anyway. Since the kernel assigns random numbers, there's nothing meaningful about the generation that requires us to preserve it when the file system image is created. With this change, all generation numbers come from random() and that makes it easier to add support for reproducible builds at some time in the future (i.e. by adding an argument to makefs that changes the behaviour of random() so that it always returns 0 or some predictable sequence). Differential Revision:https://reviews.freebsd.org/D8418 Modified: head/usr.sbin/makefs/Makefile head/usr.sbin/makefs/ffs.c Modified: head/usr.sbin/makefs/Makefile == --- head/usr.sbin/makefs/Makefile Sat Nov 5 16:17:07 2016 (r308343) +++ head/usr.sbin/makefs/Makefile Sat Nov 5 16:23:33 2016 (r308344) @@ -20,7 +20,6 @@ WARNS?= 2 .include "${SRCDIR}/ffs/Makefile.inc" CFLAGS+=-DHAVE_STRUCT_STAT_ST_FLAGS=1 -CFLAGS+=-DHAVE_STRUCT_STAT_ST_GEN=1 .PATH: ${SRCTOP}/contrib/mtree CFLAGS+=-I${SRCTOP}/contrib/mtree Modified: head/usr.sbin/makefs/ffs.c == --- head/usr.sbin/makefs/ffs.c Sat Nov 5 16:17:07 2016(r308343) +++ head/usr.sbin/makefs/ffs.c Sat Nov 5 16:23:33 2016(r308344) @@ -666,9 +666,7 @@ ffs_build_dinode1(struct ufs1_dinode *di #if HAVE_STRUCT_STAT_ST_FLAGS dinp->di_flags = cur->inode->st.st_flags; #endif -#if HAVE_STRUCT_STAT_ST_GEN - dinp->di_gen = cur->inode->st.st_gen; -#endif + dinp->di_gen = random(); dinp->di_uid = cur->inode->st.st_uid; dinp->di_gid = cur->inode->st.st_gid; @@ -716,9 +714,7 @@ ffs_build_dinode2(struct ufs2_dinode *di #if HAVE_STRUCT_STAT_ST_FLAGS dinp->di_flags = cur->inode->st.st_flags; #endif -#if HAVE_STRUCT_STAT_ST_GEN - dinp->di_gen = cur->inode->st.st_gen; -#endif + dinp->di_gen = random(); dinp->di_uid = cur->inode->st.st_uid; dinp->di_gid = cur->inode->st.st_gid; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r308343 - head/sys/dev/bxe
Author: sbruno Date: Sat Nov 5 16:17:07 2016 New Revision: 308343 URL: https://svnweb.freebsd.org/changeset/base/308343 Log: r266979 missed a call to enable capabilities of the hw leading to an inability to enable features of the device. PR: 213845 Submitted by: pher...@frenchfries.net MFC after: 1 week Modified: head/sys/dev/bxe/bxe.c Modified: head/sys/dev/bxe/bxe.c == --- head/sys/dev/bxe/bxe.c Sat Nov 5 15:01:41 2016(r308342) +++ head/sys/dev/bxe/bxe.c Sat Nov 5 16:17:07 2016(r308343) @@ -12691,6 +12691,7 @@ bxe_init_ifnet(struct bxe_softc *sc) IFCAP_WOL_MAGIC); #endif if_setcapabilitiesbit(ifp, capabilities, 0); /* XXX */ +if_setcapenable(ifp, if_getcapabilities(ifp)); if_setbaudrate(ifp, IF_Gbps(10)); /* XXX */ if_setsendqlen(ifp, sc->tx_ring_size); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r308342 - head/usr.bin/fortune/datfiles
Author: vangyzen Date: Sat Nov 5 15:01:41 2016 New Revision: 308342 URL: https://svnweb.freebsd.org/changeset/base/308342 Log: Fix sorting after r308293, using the ../tools/do_sort script. Is this a pointy-hat offense? Reported by: jhb Modified: head/usr.bin/fortune/datfiles/fortunes Modified: head/usr.bin/fortune/datfiles/fortunes == --- head/usr.bin/fortune/datfiles/fortunes Sat Nov 5 14:16:32 2016 (r308341) +++ head/usr.bin/fortune/datfiles/fortunes Sat Nov 5 15:01:41 2016 (r308342) @@ -58856,6 +58856,9 @@ Your present plans will be successful. % Your program is sick! Shoot it and put it out of its memory. % +Your reasoning is excellent -- it's +only your basic assumptions that are wrong. +% Your reasoning powers are good, and you are a fairly good planner. % Your responsibility as a parent is not as great as you might imagine. You @@ -58947,9 +58950,6 @@ You're not drunk if you can lie on the f % You're not my type. For that matter, you're not even my species!!! % -Your reasoning is excellent -- it's -only your basic assumptions that are wrong. -% You're ugly and your mother dresses you funny. % You're using a keyboard! How quaint! ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r308314 - head/usr.bin/sed
On 11/5/16 2:07 AM, Konstantin Belousov wrote: On Fri, Nov 04, 2016 at 08:49:59PM +, Pedro F. Giffuni wrote: Author: pfg Date: Fri Nov 4 20:49:59 2016 New Revision: 308314 URL: https://svnweb.freebsd.org/changeset/base/308314 Log: sed(1): add LEGACY_BSDSED_COMPAT compile-time flag. In r297602, which included a __FreeBSD_version bump to 1100105, we changed sed 'i' and 'a' from discarding whitespaces to conform with what GNU and sysvish sed do. There are arguments in favor of keeping the old behavior but the new behavior is also useful for migration purposes. It seems important to at least consider the case of developers depending on the previous behavior, so add a CFLAG to enable the old behaviour. If such legacy behavior appears to be useful or even important for real-world scenarios, I think that an environment variable controlling it is more practical and traditional than the recompilation. +1 ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r308341 - stable/11/sys/arm/conf
Author: manu Date: Sat Nov 5 14:16:32 2016 New Revision: 308341 URL: https://svnweb.freebsd.org/changeset/base/308341 Log: Remove A10 kernel config file, this should have been done in rr308273 Deleted: stable/11/sys/arm/conf/A10 ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r308340 - head/usr.bin/ncal
Author: vangyzen Date: Sat Nov 5 14:08:14 2016 New Revision: 308340 URL: https://svnweb.freebsd.org/changeset/base/308340 Log: ncal: fix a reference to an out-of-scope stack buffer PR: 214237 Submitted by: Jonathan de Boyne Pollard MFC after:3 days Sponsored by: Dell EMC Modified: head/usr.bin/ncal/ncal.c Modified: head/usr.bin/ncal/ncal.c == --- head/usr.bin/ncal/ncal.cSat Nov 5 12:30:10 2016(r308339) +++ head/usr.bin/ncal/ncal.cSat Nov 5 14:08:14 2016(r308340) @@ -1110,7 +1110,8 @@ highlight(char *dst, char *src, int len, static const char *term_so, *term_se; if (first) { - char tbuf[1024], cbuf[512], *b; + static char cbuf[512]; + char tbuf[1024], *b; term_se = term_so = NULL; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r308339 - head/sys/fs/autofs
Author: trasz Date: Sat Nov 5 12:30:10 2016 New Revision: 308339 URL: https://svnweb.freebsd.org/changeset/base/308339 Log: Value returned by taskqueue_enqueue_timeout(9) is not an error; don't treat it as such. MFC after:1 month Modified: head/sys/fs/autofs/autofs.c Modified: head/sys/fs/autofs/autofs.c == --- head/sys/fs/autofs/autofs.c Sat Nov 5 11:19:55 2016(r308338) +++ head/sys/fs/autofs/autofs.c Sat Nov 5 12:30:10 2016(r308339) @@ -442,12 +442,8 @@ autofs_trigger_one(struct autofs_node *a TIMEOUT_TASK_INIT(taskqueue_thread, >ar_task, 0, autofs_task, ar); - error = taskqueue_enqueue_timeout(taskqueue_thread, - >ar_task, autofs_timeout * hz); - if (error != 0) { - AUTOFS_WARN("taskqueue_enqueue_timeout() failed " - "with error %d", error); - } + taskqueue_enqueue_timeout(taskqueue_thread, >ar_task, + autofs_timeout * hz); refcount_init(>ar_refcount, 1); TAILQ_INSERT_TAIL(_softc->sc_requests, ar, ar_next); } ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r308338 - head/usr.sbin/vidcontrol
Author: emaste Date: Sat Nov 5 11:19:55 2016 New Revision: 308338 URL: https://svnweb.freebsd.org/changeset/base/308338 Log: vidcontrol: use calloc where appropriate Reported by: kib Modified: head/usr.sbin/vidcontrol/vidcontrol.c Modified: head/usr.sbin/vidcontrol/vidcontrol.c == --- head/usr.sbin/vidcontrol/vidcontrol.c Sat Nov 5 11:01:56 2016 (r308337) +++ head/usr.sbin/vidcontrol/vidcontrol.c Sat Nov 5 11:19:55 2016 (r308338) @@ -393,8 +393,8 @@ load_vt4mappingtable(unsigned int nmappi if (nmappings == 0) return (NULL); - if ((t = malloc(sizeof *t * nmappings)) == NULL) { - warn("malloc"); + if ((t = calloc(nmappings, sizeof(*t))) == NULL) { + warn("calloc"); return (NULL); } ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r308337 - stable/11/sys/arm/nvidia
Author: mmel Date: Sat Nov 5 11:01:56 2016 New Revision: 308337 URL: https://svnweb.freebsd.org/changeset/base/308337 Log: MFC r306897,r306898: r306897: Fix MSI allocation for NVidia Tegra r306898: Fix release MSI method for NVidia Tegra PCI controller Modified: stable/11/sys/arm/nvidia/tegra_pcie.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/arm/nvidia/tegra_pcie.c == --- stable/11/sys/arm/nvidia/tegra_pcie.c Sat Nov 5 11:00:19 2016 (r308336) +++ stable/11/sys/arm/nvidia/tegra_pcie.c Sat Nov 5 11:01:56 2016 (r308337) @@ -710,7 +710,7 @@ tegra_pcib_msi_alloc_msi(device_t dev, d mtx_lock(>mtx); found = false; - for (irq = 0; irq < TEGRA_PCIB_MAX_MSI && !found; irq++) { + for (irq = 0; (irq + count - 1) < TEGRA_PCIB_MAX_MSI; irq++) { /* Start on an aligned interrupt */ if ((irq & (maxcount - 1)) != 0) continue; @@ -719,20 +719,17 @@ tegra_pcib_msi_alloc_msi(device_t dev, d found = true; /* Check this range is valid */ - for (end_irq = irq; end_irq != irq + count - 1; end_irq++) { - /* No free interrupts */ - if (end_irq == (TEGRA_PCIB_MAX_MSI - 1)) { - found = false; - break; - } - + for (end_irq = irq; end_irq < irq + count; end_irq++) { /* This is already used */ - if ((sc->isrcs[irq].flags & TEGRA_FLAG_MSI_USED) == + if ((sc->isrcs[end_irq].flags & TEGRA_FLAG_MSI_USED) == TEGRA_FLAG_MSI_USED) { found = false; break; } } + + if (found) + break; } /* Not enough interrupts were found */ @@ -765,15 +762,15 @@ tegra_pcib_msi_release_msi(device_t dev, sc = device_get_softc(dev); mtx_lock(>mtx); for (i = 0; i < count; i++) { - ti = (struct tegra_pcib_irqsrc *)isrc; + ti = (struct tegra_pcib_irqsrc *)isrc[i]; KASSERT((ti->flags & TEGRA_FLAG_MSI_USED) == TEGRA_FLAG_MSI_USED, ("%s: Trying to release an unused MSI-X interrupt", __func__)); ti->flags &= ~TEGRA_FLAG_MSI_USED; - mtx_unlock(>mtx); } + mtx_unlock(>mtx); return (0); } ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r308336 - stable/11/sys/arm/nvidia/tegra124
Author: mmel Date: Sat Nov 5 11:00:19 2016 New Revision: 308336 URL: https://svnweb.freebsd.org/changeset/base/308336 Log: MFC r307556,r307637: r307556: TEGRA: Really implement early printf. The original version was cut from another SoC. r307637: TEGRA: Raise minimum voltage for CPU, original 0.9 V was too optimistic. While I'm in, remove duplicated line from CPU frequency table. Modified: stable/11/sys/arm/nvidia/tegra124/tegra124_cpufreq.c stable/11/sys/arm/nvidia/tegra124/tegra124_machdep.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/arm/nvidia/tegra124/tegra124_cpufreq.c == --- stable/11/sys/arm/nvidia/tegra124/tegra124_cpufreq.cSat Nov 5 10:56:32 2016(r308335) +++ stable/11/sys/arm/nvidia/tegra124/tegra124_cpufreq.cSat Nov 5 11:00:19 2016(r308336) @@ -141,7 +141,7 @@ static struct speedo_entry tegra124_spee static struct cpu_volt_def tegra124_cpu_volt_pllx_def = { - .min_uvolt = 90, /* 0.9 V */ + .min_uvolt = 100, /* XXX 0.9 V doesn't work on all boards */ .max_uvolt = 126, /* 1.26 */ .step_uvolt = 1, /* 10 mV */ .speedo_scale = 100, @@ -172,7 +172,6 @@ static uint64_t cpu_freq_tbl[] = { 211600ULL, 221800ULL, 232000ULL, - 232000ULL, 242200ULL, 252400ULL, }; Modified: stable/11/sys/arm/nvidia/tegra124/tegra124_machdep.c == --- stable/11/sys/arm/nvidia/tegra124/tegra124_machdep.cSat Nov 5 10:56:32 2016(r308335) +++ stable/11/sys/arm/nvidia/tegra124/tegra124_machdep.cSat Nov 5 11:00:19 2016(r308336) @@ -139,18 +139,18 @@ cpu_reset(void) /* * Early putc routine for EARLY_PRINTF support. To use, add to kernel config: - * option SOCDEV_PA=0x0200 - * option SOCDEV_VA=0x0200 + * option SOCDEV_PA=0x7000 + * option SOCDEV_VA=0x7000 * option EARLY_PRINTF */ -#if 0 +#ifdef EARLY_PRINTF static void tegra124_early_putc(int c) { - volatile uint32_t * UART_STAT_REG = (uint32_t *)0x02020098; - volatile uint32_t * UART_TX_REG = (uint32_t *)0x02020040; - const uint32_t UART_TXRDY= (1 << 3); + volatile uint32_t * UART_STAT_REG = (uint32_t *)(0x70006314); + volatile uint32_t * UART_TX_REG = (uint32_t *)(0x70006300); + const uint32_t UART_TXRDY= (1 << 6); while ((*UART_STAT_REG & UART_TXRDY) == 0) continue; *UART_TX_REG = c; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r308335 - in stable/11/sys/arm/nvidia: . tegra124
Author: mmel Date: Sat Nov 5 10:56:32 2016 New Revision: 308335 URL: https://svnweb.freebsd.org/changeset/base/308335 Log: MFC r306447,r306477: r306447: TEGRA: Rename (cut & pasted) genahci to tegra_ahci. Make device class definition static. r306477: TEGRA: Prepare Tegra subtree for inclusion into ARM generic kernel. - use DEFINE_CLASS_0() for driver classes - unify driver names - cleanup driver definitions and bindings Modified: stable/11/sys/arm/nvidia/as3722.c stable/11/sys/arm/nvidia/tegra124/tegra124_car.c stable/11/sys/arm/nvidia/tegra124/tegra124_coretemp.c stable/11/sys/arm/nvidia/tegra124/tegra124_cpufreq.c stable/11/sys/arm/nvidia/tegra124/tegra124_pmc.c stable/11/sys/arm/nvidia/tegra124/tegra124_xusbpadctl.c stable/11/sys/arm/nvidia/tegra_abpmisc.c stable/11/sys/arm/nvidia/tegra_ahci.c stable/11/sys/arm/nvidia/tegra_efuse.c stable/11/sys/arm/nvidia/tegra_ehci.c stable/11/sys/arm/nvidia/tegra_gpio.c stable/11/sys/arm/nvidia/tegra_i2c.c stable/11/sys/arm/nvidia/tegra_lic.c stable/11/sys/arm/nvidia/tegra_pcie.c stable/11/sys/arm/nvidia/tegra_pinmux.c stable/11/sys/arm/nvidia/tegra_rtc.c stable/11/sys/arm/nvidia/tegra_sdhci.c stable/11/sys/arm/nvidia/tegra_soctherm.c stable/11/sys/arm/nvidia/tegra_usbphy.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/arm/nvidia/as3722.c == --- stable/11/sys/arm/nvidia/as3722.c Sat Nov 5 10:48:44 2016 (r308334) +++ stable/11/sys/arm/nvidia/as3722.c Sat Nov 5 10:56:32 2016 (r308335) @@ -405,7 +405,7 @@ static device_method_t as3722_methods[] }; static devclass_t as3722_devclass; -DEFINE_CLASS_0(gpio, as3722_driver, as3722_methods, +static DEFINE_CLASS_0(gpio, as3722_driver, as3722_methods, sizeof(struct as3722_softc)); EARLY_DRIVER_MODULE(as3722, iicbus, as3722_driver, as3722_devclass, -0, 0, 74); +NULL, NULL, 74); Modified: stable/11/sys/arm/nvidia/tegra124/tegra124_car.c == --- stable/11/sys/arm/nvidia/tegra124/tegra124_car.cSat Nov 5 10:48:44 2016(r308334) +++ stable/11/sys/arm/nvidia/tegra124/tegra124_car.cSat Nov 5 10:56:32 2016(r308335) @@ -602,12 +602,7 @@ static device_method_t tegra124_car_meth }; static devclass_t tegra124_car_devclass; - -static driver_t tegra124_car_driver = { - "tegra124_car", - tegra124_car_methods, - sizeof(struct tegra124_car_softc), -}; - +static DEFINE_CLASS_0(car, tegra124_car_driver, tegra124_car_methods, +sizeof(struct tegra124_car_softc)); EARLY_DRIVER_MODULE(tegra124_car, simplebus, tegra124_car_driver, -tegra124_car_devclass, 0, 0, BUS_PASS_TIMER); +tegra124_car_devclass, NULL, NULL, BUS_PASS_TIMER); Modified: stable/11/sys/arm/nvidia/tegra124/tegra124_coretemp.c == --- stable/11/sys/arm/nvidia/tegra124/tegra124_coretemp.c Sat Nov 5 10:48:44 2016(r308334) +++ stable/11/sys/arm/nvidia/tegra124/tegra124_coretemp.c Sat Nov 5 10:56:32 2016(r308335) @@ -250,7 +250,6 @@ tegra124_coretemp_detach(device_t dev) return (0); } - static device_method_t tegra124_coretemp_methods[] = { /* Device interface */ DEVMETHOD(device_identify, tegra124_coretemp_identify), @@ -263,11 +262,7 @@ static device_method_t tegra124_coretemp }; static devclass_t tegra124_coretemp_devclass; -static driver_t tegra124_coretemp_driver = { - "tegra124_coretemp", - tegra124_coretemp_methods, - sizeof(struct tegra124_coretemp_softc), -}; - +static DEFINE_CLASS_0(coretemp, tegra124_coretemp_driver, +tegra124_coretemp_methods, sizeof(struct tegra124_coretemp_softc)); DRIVER_MODULE(tegra124_coretemp, cpu, tegra124_coretemp_driver, -tegra124_coretemp_devclass, 0, 0); +tegra124_coretemp_devclass, NULL, NULL); Modified: stable/11/sys/arm/nvidia/tegra124/tegra124_cpufreq.c == --- stable/11/sys/arm/nvidia/tegra124/tegra124_cpufreq.cSat Nov 5 10:48:44 2016(r308334) +++ stable/11/sys/arm/nvidia/tegra124/tegra124_cpufreq.cSat Nov 5 10:56:32 2016(r308335) @@ -588,11 +588,7 @@ static device_method_t tegra124_cpufreq_ }; static devclass_t tegra124_cpufreq_devclass; -static driver_t tegra124_cpufreq_driver = { - "tegra124_cpufreq", - tegra124_cpufreq_methods, - sizeof(struct tegra124_cpufreq_softc), -}; - +static DEFINE_CLASS_0(cpufreq, tegra124_cpufreq_driver, +tegra124_cpufreq_methods, sizeof(struct tegra124_cpufreq_softc)); DRIVER_MODULE(tegra124_cpufreq, cpu, tegra124_cpufreq_driver, -tegra124_cpufreq_devclass, 0, 0); +tegra124_cpufreq_devclass, NULL, NULL); Modified:
svn commit: r308334 - stable/11/sys/arm/nvidia
Author: mmel Date: Sat Nov 5 10:48:44 2016 New Revision: 308334 URL: https://svnweb.freebsd.org/changeset/base/308334 Log: MFC r302961,r304460,r304461: r302961: TEGRA: Subclass Tegra PCIE driver from ofw_pci base driver. Remove now redundant code. r304460: TEGRA: Implement MSI/MSIX interrupts for pcie controller. r304461: TEGRA: Remove forgotten debug printf. Modified: stable/11/sys/arm/nvidia/tegra_pcie.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/arm/nvidia/tegra_pcie.c == --- stable/11/sys/arm/nvidia/tegra_pcie.c Sat Nov 5 10:23:02 2016 (r308333) +++ stable/11/sys/arm/nvidia/tegra_pcie.c Sat Nov 5 10:48:44 2016 (r308334) @@ -33,20 +33,20 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include +#include #include -#include #include #include #include -#include -#include #include -#include -#include #include #include +#include +#include #include #include @@ -57,6 +57,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -64,100 +65,14 @@ __FBSDID("$FreeBSD$"); #include #include -#include "ofw_bus_if.h" -#include "pcib_if.h" - #include -/* --- Move to ofw_pci.c/.h --- */ - -struct tegra_pci_range { - /* parsed phys.hi */ - int nonrelocatable; - int prefetchable; - int aliased; - int space_code; /* In native format (not shifted)*/ - int bus; - int device; - int function; - int reg; - pci_addr_t pci_addr; /* PCI Address */ - bus_addr_t host_addr; /* Host bus address*/ - bus_size_t size; /* Range size */ -}; - -static int -tegra_pci_get_ranges(phandle_t node, struct tegra_pci_range **ranges) -{ - int host_address_cells, pci_address_cells, size_cells; - cell_t *base_ranges; - ssize_t nbase_ranges; - int nranges; - int i, j, k; - uint32_t flags; - uint64_t tmp; - - host_address_cells = 1; - pci_address_cells = 3; - size_cells = 2; - OF_getencprop(OF_parent(node), "#address-cells", _address_cells, - sizeof(host_address_cells)); - OF_getencprop(node, "#address-cells", _address_cells, - sizeof(pci_address_cells)); - OF_getencprop(node, "#size-cells", _cells, sizeof(size_cells)); - - nbase_ranges = OF_getproplen(node, "ranges"); - if (nbase_ranges <= 0) - return (-1); - nranges = nbase_ranges / sizeof(cell_t) / - (pci_address_cells + host_address_cells + size_cells); - - *ranges = malloc(nranges * sizeof(struct tegra_pci_range), - M_DEVBUF, M_WAITOK); - base_ranges = malloc(nbase_ranges, M_DEVBUF, M_WAITOK); - OF_getencprop(node, "ranges", base_ranges, nbase_ranges); - - for (i = 0, j = 0; i < nranges; i++) { - flags = base_ranges[j++]; - (*ranges)[i].nonrelocatable = - flags & OFW_PCI_PHYS_HI_NONRELOCATABLE ? 1 : 0; - (*ranges)[i].prefetchable = - flags & OFW_PCI_PHYS_HI_PREFETCHABLE ? 1 : 0; - (*ranges)[i].aliased = - flags & OFW_PCI_PHYS_HI_ALIASED ? 1 : 0; - (*ranges)[i].space_code = flags & OFW_PCI_PHYS_HI_SPACEMASK; - (*ranges)[i].bus = OFW_PCI_PHYS_HI_BUS(flags); - (*ranges)[i].device = OFW_PCI_PHYS_HI_DEVICE(flags); - (*ranges)[i].function = OFW_PCI_PHYS_HI_FUNCTION(flags); - (*ranges)[i].reg = flags & OFW_PCI_PHYS_HI_REGISTERMASK; - - tmp = 0; - for (k = 0; k < pci_address_cells - 1; k++) { - tmp <<= 32; - tmp |= base_ranges[j++]; - } - (*ranges)[i].pci_addr = (pci_addr_t)tmp; - - tmp = 0; - for (k = 0; k < host_address_cells; k++) { - tmp <<= 32; - tmp |= base_ranges[j++]; - } - (*ranges)[i].host_addr = (bus_addr_t)tmp; - tmp = 0; - - for (k = 0; k < size_cells; k++) { - tmp <<= 32; - tmp |= base_ranges[j++]; - } - (*ranges)[i].size = (bus_size_t)tmp; - } +#include "ofw_bus_if.h" +#include "msi_if.h" +#include "pcib_if.h" +#include "pic_if.h" - free(base_ranges, M_DEVBUF); - return (nranges); -} -/* -- */ #defineAFI_AXI_BAR0_SZ 0x000 #defineAFI_AXI_BAR1_SZ 0x004 #define
svn commit: r308332 - stable/10/sys/vm
Author: kib Date: Sat Nov 5 10:22:51 2016 New Revision: 308332 URL: https://svnweb.freebsd.org/changeset/base/308332 Log: MFC r308094: Add unlock_vp() helper. MFC r308095 (by markj): Add one more use of unlock_vp(). Modified: stable/10/sys/vm/vm_fault.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/vm/vm_fault.c == --- stable/10/sys/vm/vm_fault.c Sat Nov 5 10:09:21 2016(r308331) +++ stable/10/sys/vm/vm_fault.c Sat Nov 5 10:22:51 2016(r308332) @@ -153,6 +153,16 @@ unlock_map(struct faultstate *fs) } static void +unlock_vp(struct faultstate *fs) +{ + + if (fs->vp != NULL) { + vput(fs->vp); + fs->vp = NULL; + } +} + +static void unlock_and_deallocate(struct faultstate *fs) { @@ -168,11 +178,8 @@ unlock_and_deallocate(struct faultstate fs->first_m = NULL; } vm_object_deallocate(fs->first_object); - unlock_map(fs); - if (fs->vp != NULL) { - vput(fs->vp); - fs->vp = NULL; - } + unlock_map(fs); + unlock_vp(fs); } static void @@ -320,8 +327,7 @@ RetryFault:; growstack = FALSE; goto RetryFault; } - if (fs.vp != NULL) - vput(fs.vp); + unlock_vp(); return (result); } @@ -338,10 +344,7 @@ RetryFault:; vm_map_lock(fs.map); if (vm_map_lookup_entry(fs.map, vaddr, ) && (fs.entry->eflags & MAP_ENTRY_IN_TRANSITION)) { - if (fs.vp != NULL) { - vput(fs.vp); - fs.vp = NULL; - } + unlock_vp(); fs.entry->eflags |= MAP_ENTRY_NEEDS_WAKEUP; vm_map_unlock_and_wait(fs.map, 0); } else @@ -628,10 +631,7 @@ readrest: vp = fs.object->handle; if (vp == fs.vp) goto vnode_locked; - else if (fs.vp != NULL) { - vput(fs.vp); - fs.vp = NULL; - } + unlock_vp(); locked = VOP_ISLOCKED(vp); if (locked != LK_EXCLUSIVE) ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r308333 - in stable/11/sys: arm/arm arm/nvidia arm/ti/omap4 arm64/arm64 dev/fdt dev/gpio dev/iicbus dev/ofw dev/pci dev/vnic kern mips/include mips/mips sys
Author: mmel Date: Sat Nov 5 10:23:02 2016 New Revision: 308333 URL: https://svnweb.freebsd.org/changeset/base/308333 Log: MFC r304459,r305527: r304459: INTRNG: Rework handling with resources. Partially revert r301453. - Read interrupt properties at bus enumeration time and store it into global mapping table. - At bus_activate_resource() time, given mapping entry is resolved and connected to real interrupt source. A copy of mapping entry is attached to given resource. - At bus_setup_intr() time, mapping entry stored in resource is used for delivery of requested interrupt configuration. - For MSI/MSIX interrupts, mapping entry is created within pci_alloc_msi()/pci_alloc_msix() call. - For legacy PCI interrupts, mapping entry must be created within pcib_route_interrupt() by pcib driver itself. r305527: Fix MIPS INTRNG (both FDT and non-FDT) behaviour broken by r304459 Modified: stable/11/sys/arm/arm/nexus.c stable/11/sys/arm/nvidia/tegra_lic.c stable/11/sys/arm/ti/omap4/omap4_wugen.c stable/11/sys/arm64/arm64/nexus.c stable/11/sys/dev/fdt/simplebus.c stable/11/sys/dev/gpio/gpiobus.c stable/11/sys/dev/gpio/gpiobusvar.h stable/11/sys/dev/gpio/ofw_gpiobus.c stable/11/sys/dev/iicbus/ofw_iicbus.c stable/11/sys/dev/ofw/ofw_bus_subr.c stable/11/sys/dev/ofw/ofw_bus_subr.h stable/11/sys/dev/ofw/ofwbus.c stable/11/sys/dev/pci/pci_host_generic.c stable/11/sys/dev/vnic/mrml_bridge.c stable/11/sys/dev/vnic/thunder_mdio_fdt.c stable/11/sys/kern/bus_if.m stable/11/sys/kern/pic_if.m stable/11/sys/kern/subr_bus.c stable/11/sys/kern/subr_intr.c stable/11/sys/mips/include/intr.h stable/11/sys/mips/mips/mips_pic.c stable/11/sys/mips/mips/nexus.c stable/11/sys/sys/bus.h stable/11/sys/sys/intr.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/arm/arm/nexus.c == --- stable/11/sys/arm/arm/nexus.c Sat Nov 5 10:22:51 2016 (r308332) +++ stable/11/sys/arm/arm/nexus.c Sat Nov 5 10:23:02 2016 (r308333) @@ -64,6 +64,7 @@ __FBSDID("$FreeBSD$"); #ifdef FDT #include +#include #include "ofw_bus_if.h" #endif @@ -379,6 +380,11 @@ nexus_activate_resource(device_t bus, de #endif rman_set_virtual(r, (void *)vaddr); rman_set_bushandle(r, vaddr); + return (0); + } else if (type == SYS_RES_IRQ) { +#ifdef INTRNG + intr_activate_irq(child, r); +#endif } return (0); } @@ -390,17 +396,23 @@ nexus_deactivate_resource(device_t bus, bus_size_t psize; bus_space_handle_t vaddr; - psize = (bus_size_t)rman_get_size(r); - vaddr = rman_get_bushandle(r); + if (type == SYS_RES_MEMORY || type == SYS_RES_IOPORT) { + psize = (bus_size_t)rman_get_size(r); + vaddr = rman_get_bushandle(r); - if (vaddr != 0) { + if (vaddr != 0) { #ifdef FDT - bus_space_unmap(fdtbus_bs_tag, vaddr, psize); + bus_space_unmap(fdtbus_bs_tag, vaddr, psize); #else - pmap_unmapdev((vm_offset_t)vaddr, (vm_size_t)psize); + pmap_unmapdev((vm_offset_t)vaddr, (vm_size_t)psize); +#endif + rman_set_virtual(r, NULL); + rman_set_bushandle(r, 0); + } + } else if (type == SYS_RES_IRQ) { +#ifdef INTRNG + intr_deactivate_irq(child, r); #endif - rman_set_virtual(r, NULL); - rman_set_bushandle(r, 0); } return (rman_deactivate_resource(r)); @@ -411,11 +423,22 @@ static int nexus_ofw_map_intr(device_t dev, device_t child, phandle_t iparent, int icells, pcell_t *intr) { - -#ifdef INTRNG - return (INTR_IRQ_INVALID); -#else +#ifndef INTRNG return (intr_fdt_map_irq(iparent, intr, icells)); -#endif +#else + u_int irq; + struct intr_map_data_fdt *fdt_data; + size_t len; + + len = sizeof(*fdt_data) + icells * sizeof(pcell_t); + fdt_data = (struct intr_map_data_fdt *)intr_alloc_map_data( + INTR_MAP_DATA_FDT, len, M_WAITOK | M_ZERO); + fdt_data->iparent = iparent; + fdt_data->ncells = icells; + memcpy(fdt_data->cells, intr, icells * sizeof(pcell_t)); + irq = intr_map_irq(NULL, iparent, (struct intr_map_data *)fdt_data); + return (irq); +#endif /* INTRNG */ } -#endif +#endif /* FDT */ + Modified: stable/11/sys/arm/nvidia/tegra_lic.c == --- stable/11/sys/arm/nvidia/tegra_lic.cSat Nov 5 10:22:51 2016 (r308332) +++ stable/11/sys/arm/nvidia/tegra_lic.cSat Nov 5 10:23:02 2016 (r308333) @@ -88,12 +88,12 @@ struct tegra_lic_sc { }; static int
svn commit: r308331 - stable/11/sys/vm
Author: kib Date: Sat Nov 5 10:09:21 2016 New Revision: 308331 URL: https://svnweb.freebsd.org/changeset/base/308331 Log: MFC r308094: Add unlock_vp() helper. MFC r308095 (by markj): Add one more use of unlock_vp(). Modified: stable/11/sys/vm/vm_fault.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/vm/vm_fault.c == --- stable/11/sys/vm/vm_fault.c Sat Nov 5 09:46:48 2016(r308330) +++ stable/11/sys/vm/vm_fault.c Sat Nov 5 10:09:21 2016(r308331) @@ -153,6 +153,16 @@ unlock_map(struct faultstate *fs) } static void +unlock_vp(struct faultstate *fs) +{ + + if (fs->vp != NULL) { + vput(fs->vp); + fs->vp = NULL; + } +} + +static void unlock_and_deallocate(struct faultstate *fs) { @@ -168,11 +178,8 @@ unlock_and_deallocate(struct faultstate fs->first_m = NULL; } vm_object_deallocate(fs->first_object); - unlock_map(fs); - if (fs->vp != NULL) { - vput(fs->vp); - fs->vp = NULL; - } + unlock_map(fs); + unlock_vp(fs); } static void @@ -321,8 +328,7 @@ RetryFault:; growstack = FALSE; goto RetryFault; } - if (fs.vp != NULL) - vput(fs.vp); + unlock_vp(); return (result); } @@ -339,10 +345,7 @@ RetryFault:; vm_map_lock(fs.map); if (vm_map_lookup_entry(fs.map, vaddr, ) && (fs.entry->eflags & MAP_ENTRY_IN_TRANSITION)) { - if (fs.vp != NULL) { - vput(fs.vp); - fs.vp = NULL; - } + unlock_vp(); fs.entry->eflags |= MAP_ENTRY_NEEDS_WAKEUP; vm_map_unlock_and_wait(fs.map, 0); } else @@ -642,10 +645,7 @@ readrest: vp = fs.object->handle; if (vp == fs.vp) goto vnode_locked; - else if (fs.vp != NULL) { - vput(fs.vp); - fs.vp = NULL; - } + unlock_vp(); locked = VOP_ISLOCKED(vp); if (locked != LK_EXCLUSIVE) ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r308330 - in stable/11: contrib/netbsd-tests/lib/libc/locale usr.bin/localedef
Author: bapt Date: Sat Nov 5 09:46:48 2016 New Revision: 308330 URL: https://svnweb.freebsd.org/changeset/base/308330 Log: MFC r306782-r306783 r306782: localedef: Fix ctype dump (fixed wide spread errors) This commit is from John Marino in dragonfly with the following commit log: This was a CTYPE encoding error involving consecutive points of the same ctype. It was reported by myself to Illumos over a year ago but I was unsure if it was only happening on BSD. Given the cause, the bug is also present on Illumos. Basically, if consecutive points were of the exact same ctype, they would be defined as a range regardless. For example, all of these would be considered equivalent: ... , (converts to .. ) , , (converts to .. ) , ... (converts to .. ) So all the points that shouldn't have been defined got "bridged" by the extreme points. The effects were recently reported to FreeBSD on PR 213013. There are countless places were the ctype flags are misdefined, so this is a major fix that has to be MFC'd. This reveals a bad change I did on the testsuite: while 0x07FF is a valid unicode it is not used yet (reserved for future use) PR: 213013 Submitted by: marino@ Reported by: Kurtis RaderObtained from:Dragonfly MFC after:1 month r306783: localedef: Improve cc_list parsing original commit log: = I had originally suspected the parsing of ctype definition files as being the source of the ctype flag mis-definitions, but it wasn't. In the process, I simplified the cc_list parsing so I'm committing the no-impact improvement separately. It removes some parsing redundancies and won't parse partial range definitions anymore. Submitted by: marino Obtained from:Dragonfly MFC after:1 month Modified: stable/11/contrib/netbsd-tests/lib/libc/locale/t_mbstowcs.c stable/11/usr.bin/localedef/ctype.c stable/11/usr.bin/localedef/parser.y (contents, props changed) Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/netbsd-tests/lib/libc/locale/t_mbstowcs.c == --- stable/11/contrib/netbsd-tests/lib/libc/locale/t_mbstowcs.c Sat Nov 5 06:33:39 2016(r308329) +++ stable/11/contrib/netbsd-tests/lib/libc/locale/t_mbstowcs.c Sat Nov 5 09:46:48 2016(r308330) @@ -88,7 +88,7 @@ static struct test { 0x, 0x5D, 0x5B, 0x1, 0x10, 0x5D, 0x0A }, #ifdef __FreeBSD__ - {1, -1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, -1, + {1, -1, -1, 1, 1, -1, -1, 1, 1, 1, -1, 1, 1, -1, -1, #else {1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, #endif Modified: stable/11/usr.bin/localedef/ctype.c == --- stable/11/usr.bin/localedef/ctype.c Sat Nov 5 06:33:39 2016 (r308329) +++ stable/11/usr.bin/localedef/ctype.c Sat Nov 5 09:46:48 2016 (r308330) @@ -407,9 +407,9 @@ dump_ctype(void) continue; } - if ((last_ct != NULL) && (last_ct->ctype == ctn->ctype)) { + if ((last_ct != NULL) && (last_ct->ctype == ctn->ctype) && + (last_ct->wc + 1 == wc)) { ct[rl.runetype_ext_nranges-1].max = wc; - last_ct = ctn; } else { rl.runetype_ext_nranges++; ct = realloc(ct, @@ -417,8 +417,8 @@ dump_ctype(void) ct[rl.runetype_ext_nranges - 1].min = wc; ct[rl.runetype_ext_nranges - 1].max = wc; ct[rl.runetype_ext_nranges - 1].map = ctn->ctype; - last_ct = ctn; } + last_ct = ctn; if (ctn->tolower == 0) { last_lo = NULL; } else if ((last_lo != NULL) && Modified: stable/11/usr.bin/localedef/parser.y == --- stable/11/usr.bin/localedef/parser.ySat Nov 5 06:33:39 2016 (r308329) +++ stable/11/usr.bin/localedef/parser.ySat Nov 5 09:46:48 2016 (r308330) @@ -27,6 +27,8 @@ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ */ /* @@ -321,21 +323,18 @@ ctype_kw : T_ISUPPER cc_list T_NL | T_TOLOWER conv_list T_NL ; +cc_list: cc_list T_SEMI cc_range_end + | cc_list T_SEMI cc_char + | cc_char + ; -cc_list: cc_list T_SEMI
Re: svn commit: r308314 - head/usr.bin/sed
On Fri, Nov 04, 2016 at 08:49:59PM +, Pedro F. Giffuni wrote: > Author: pfg > Date: Fri Nov 4 20:49:59 2016 > New Revision: 308314 > URL: https://svnweb.freebsd.org/changeset/base/308314 > > Log: > sed(1): add LEGACY_BSDSED_COMPAT compile-time flag. > > In r297602, which included a __FreeBSD_version bump to 1100105, we changed > sed 'i' and 'a' from discarding whitespaces to conform with what GNU and > sysvish sed do. > > There are arguments in favor of keeping the old behavior but the new > behavior is also useful for migration purposes. It seems important to at > least consider the case of developers depending on the previous behavior, > so add a CFLAG to enable the old behaviour. If such legacy behavior appears to be useful or even important for real-world scenarios, I think that an environment variable controlling it is more practical and traditional than the recompilation. ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r308329 - head/usr.bin/ministat
Author: cperciva Date: Sat Nov 5 06:33:39 2016 New Revision: 308329 URL: https://svnweb.freebsd.org/changeset/base/308329 Log: Reduce the bogosity of ministat's % difference calculations. The previous calculation used an approximation which was only valid in cases where the means being compared were similar; this resulted in very odd claims being made, e.g. that 0 +/- 0 is a difference of -100% +/- 1% from 100 +/- 1. The new calculation scales sample standard deviations by the means, and yields approximately correct percentage difference bounds providing that the reference population is bounded away from zero. (In the case where the values being compared are not sufficiently bounded away from zero, the distribution of ratios becomes much harder to calculate, and is not likely to be useful anyway.) Note that when ministat is used for its intended purpose of determining whether two samples are statistically different, this change is unlikely to have any noticeable effect; in such cases the means will be similar enough that the correction applied here will be minimal. Modified: head/usr.bin/ministat/ministat.c Modified: head/usr.bin/ministat/ministat.c == --- head/usr.bin/ministat/ministat.cSat Nov 5 04:40:58 2016 (r308328) +++ head/usr.bin/ministat/ministat.cSat Nov 5 06:33:39 2016 (r308329) @@ -232,6 +232,7 @@ static void Relative(struct dataset *ds, struct dataset *rs, int confidx) { double spool, s, d, e, t; + double re; int i; i = ds->n + rs->n - 2; @@ -246,11 +247,16 @@ Relative(struct dataset *ds, struct data d = Avg(ds) - Avg(rs); e = t * s; + re = (ds->n - 1) * Var(ds) + (rs->n - 1) * Var(rs) * + (Avg(ds) * Avg(ds)) / (Avg(rs) * Avg(rs)); + re *= (ds->n + rs->n) / (ds->n * rs->n * (ds->n + rs->n - 2.0)); + re = t * sqrt(re); + if (fabs(d) > e) { printf("Difference at %.1f%% confidence\n", studentpct[confidx]); printf("%g +/- %g\n", d, e); - printf("%g%% +/- %g%%\n", d * 100 / Avg(rs), e * 100 / Avg(rs)); + printf("%g%% +/- %g%%\n", d * 100 / Avg(rs), re * 100 / Avg(rs)); printf("(Student's t, pooled s = %g)\n", spool); } else { printf("No difference proven at %.1f%% confidence\n", ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"