From owner-svn-src-all@FreeBSD.ORG Sun Dec 21 01:15:56 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 933048C7; Sun, 21 Dec 2014 01:15:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7521C1084; Sun, 21 Dec 2014 01:15:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBL1FufW076498; Sun, 21 Dec 2014 01:15:56 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBL1Fuxk076497; Sun, 21 Dec 2014 01:15:56 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201412210115.sBL1Fuxk076497@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 21 Dec 2014 01:15:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275974 - head/sys/net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2014 01:15:56 -0000 Author: adrian Date: Sun Dec 21 01:15:55 2014 New Revision: 275974 URL: https://svnweb.freebsd.org/changeset/base/275974 Log: Add more debugging to try and track down this scan hang nonsense. Modified: head/sys/net80211/ieee80211_scan.c Modified: head/sys/net80211/ieee80211_scan.c ============================================================================== --- head/sys/net80211/ieee80211_scan.c Sat Dec 20 23:41:37 2014 (r275973) +++ head/sys/net80211/ieee80211_scan.c Sun Dec 21 01:15:55 2014 (r275974) @@ -752,6 +752,8 @@ ieee80211_scan_next(struct ieee80211vap struct ieee80211com *ic = vap->iv_ic; struct ieee80211_scan_state *ss = ic->ic_scan; + IEEE80211_DPRINTF(vap, IEEE80211_MSG_SCAN, "%s: called\n", __func__); + /* wake up the scan task */ IEEE80211_LOCK(ic); scan_signal(ss); @@ -768,6 +770,8 @@ ieee80211_scan_done(struct ieee80211vap struct ieee80211com *ic = vap->iv_ic; struct ieee80211_scan_state *ss; + IEEE80211_DPRINTF(vap, IEEE80211_MSG_SCAN, "%s: called\n", __func__); + IEEE80211_LOCK(ic); ss = ic->ic_scan; ss->ss_next = ss->ss_last; /* all channels are complete */ @@ -821,6 +825,10 @@ scan_curchan(struct ieee80211_scan_state { struct ieee80211vap *vap = ss->ss_vap; + IEEE80211_DPRINTF(vap, IEEE80211_MSG_SCAN, + "%s: calling; maxdwell=%lu\n", + __func__, + maxdwell); IEEE80211_LOCK(vap->iv_ic); if (ss->ss_flags & IEEE80211_SCAN_ACTIVE) ieee80211_probe_curchan(vap, 0); @@ -835,7 +843,6 @@ scan_signal(void *arg) struct ieee80211_scan_state *ss = (struct ieee80211_scan_state *) arg; IEEE80211_LOCK_ASSERT(ss->ss_ic); - cv_signal(&SCAN_PRIVATE(ss)->ss_scan_cv); } @@ -848,6 +855,8 @@ scan_mindwell(struct ieee80211_scan_stat { struct ieee80211com *ic = ss->ss_ic; + IEEE80211_DPRINTF(ss->ss_vap, IEEE80211_MSG_SCAN, "%s: called\n", __func__); + IEEE80211_LOCK(ic); scan_signal(ss); IEEE80211_UNLOCK(ic); @@ -904,8 +913,15 @@ scan_task(void *arg, int pending) IEEE80211_LOCK(ic); for (;;) { + scandone = (ss->ss_next >= ss->ss_last) || (SCAN_PRIVATE(ss)->ss_iflags & ISCAN_CANCEL) != 0; + + IEEE80211_DPRINTF(vap, IEEE80211_MSG_SCAN, + "%s: loop start; scandone=%d\n", + __func__, + scandone); + if (scandone || (ss->ss_flags & IEEE80211_SCAN_GOTPICK) || (SCAN_PRIVATE(ss)->ss_iflags & ISCAN_ABORT) || time_after(ticks + ss->ss_mindwell, scanend)) @@ -970,9 +986,13 @@ scan_task(void *arg, int pending) if ((SCAN_PRIVATE(ss)->ss_iflags & (ISCAN_CANCEL|ISCAN_ABORT))) continue; + IEEE80211_DPRINTF(vap, IEEE80211_MSG_SCAN, "%s: waiting\n", __func__); /* Wait to be signalled to scan the next channel */ cv_wait(&SCAN_PRIVATE(ss)->ss_scan_cv, IEEE80211_LOCK_OBJ(ic)); } + + IEEE80211_DPRINTF(vap, IEEE80211_MSG_SCAN, "%s: out\n", __func__); + if (SCAN_PRIVATE(ss)->ss_iflags & ISCAN_ABORT) goto done; From owner-svn-src-all@FreeBSD.ORG Sun Dec 21 01:39:23 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 89D90F32; Sun, 21 Dec 2014 01:39:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 741E4134C; Sun, 21 Dec 2014 01:39:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBL1dNqF086645; Sun, 21 Dec 2014 01:39:23 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBL1dMRi086640; Sun, 21 Dec 2014 01:39:22 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201412210139.sBL1dMRi086640@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Sun, 21 Dec 2014 01:39:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r275975 - stable/10/sys/dev/iir X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2014 01:39:23 -0000 Author: smh Date: Sun Dec 21 01:39:21 2014 New Revision: 275975 URL: https://svnweb.freebsd.org/changeset/base/275975 Log: MFC: r274487 Lock iir(4) and mark it MPSAFE. Sponsored by: Multiplay Modified: stable/10/sys/dev/iir/iir.c stable/10/sys/dev/iir/iir.h stable/10/sys/dev/iir/iir_ctrl.c stable/10/sys/dev/iir/iir_pci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/iir/iir.c ============================================================================== --- stable/10/sys/dev/iir/iir.c Sun Dec 21 01:15:55 2014 (r275974) +++ stable/10/sys/dev/iir/iir.c Sun Dec 21 01:39:21 2014 (r275975) @@ -71,9 +71,6 @@ __FBSDID("$FreeBSD$"); static MALLOC_DEFINE(M_GDTBUF, "iirbuf", "iir driver buffer"); -struct gdt_softc *gdt_wait_gdt; -int gdt_wait_index; - #ifdef GDT_DEBUG int gdt_debug = GDT_DEBUG; #ifdef __SERIAL__ @@ -135,13 +132,13 @@ int ser_printf(const char *fmt, ...) #endif #endif -/* The linked list of softc structures */ -struct gdt_softc_list gdt_softcs = TAILQ_HEAD_INITIALIZER(gdt_softcs); /* controller cnt. */ int gdt_cnt = 0; /* event buffer */ static gdt_evt_str ebuffer[GDT_MAX_EVENTS]; static int elastidx, eoldidx; +static struct mtx elock; +MTX_SYSINIT(iir_elock, &elock, "iir events", MTX_DEF); /* statistics */ gdt_statist_t gdt_stat; @@ -150,6 +147,7 @@ gdt_statist_t gdt_stat; #define ccb_priority spriv_field1 static void iir_action(struct cam_sim *sim, union ccb *ccb); +static int iir_intr_locked(struct gdt_softc *gdt); static void iir_poll(struct cam_sim *sim); static void iir_shutdown(void *arg, int howto); static void iir_timeout(void *arg); @@ -168,12 +166,12 @@ static int gdt_sync_event(struct gd u_int8_t index, struct gdt_ccb *gccb); static int gdt_async_event(struct gdt_softc *gdt, int service); static struct gdt_ccb *gdt_raw_cmd(struct gdt_softc *gdt, - union ccb *ccb, int *lock); + union ccb *ccb); static struct gdt_ccb *gdt_cache_cmd(struct gdt_softc *gdt, - union ccb *ccb, int *lock); + union ccb *ccb); static struct gdt_ccb *gdt_ioctl_cmd(struct gdt_softc *gdt, - gdt_ucmd_t *ucmd, int *lock); -static void gdt_internal_cache_cmd(struct gdt_softc *gdt,union ccb *ccb); + gdt_ucmd_t *ucmd); +static void gdt_internal_cache_cmd(struct gdt_softc *gdt, union ccb *ccb); static void gdtmapmem(void *arg, bus_dma_segment_t *dm_segs, int nseg, int error); @@ -197,7 +195,6 @@ iir_init(struct gdt_softc *gdt) SLIST_INIT(&gdt->sc_pending_gccb); TAILQ_INIT(&gdt->sc_ccb_queue); TAILQ_INIT(&gdt->sc_ucmd_queue); - TAILQ_INSERT_TAIL(&gdt_softcs, gdt, links); /* DMA tag for mapping buffers into device visible space. */ if (bus_dma_tag_create(gdt->sc_parent_dmat, /*alignment*/1, /*boundary*/0, @@ -207,10 +204,11 @@ iir_init(struct gdt_softc *gdt) /*maxsize*/MAXBSIZE, /*nsegments*/GDT_MAXSG, /*maxsegsz*/BUS_SPACE_MAXSIZE_32BIT, /*flags*/BUS_DMA_ALLOCNOW, - /*lockfunc*/busdma_lock_mutex, /*lockarg*/&Giant, + /*lockfunc*/busdma_lock_mutex, + /*lockarg*/&gdt->sc_lock, &gdt->sc_buffer_dmat) != 0) { - printf("iir%d: bus_dma_tag_create(...,gdt->sc_buffer_dmat) failed\n", - gdt->sc_hanum); + device_printf(gdt->sc_devnode, + "bus_dma_tag_create(..., gdt->sc_buffer_dmat) failed\n"); return (1); } gdt->sc_init_level++; @@ -227,9 +225,10 @@ iir_init(struct gdt_softc *gdt) /*nsegments*/1, /*maxsegsz*/BUS_SPACE_MAXSIZE_32BIT, /*flags*/0, /*lockfunc*/busdma_lock_mutex, - /*lockarg*/&Giant, &gdt->sc_gcscratch_dmat) != 0) { - printf("iir%d: bus_dma_tag_create(...,gdt->sc_gcscratch_dmat) failed\n", - gdt->sc_hanum); + /*lockarg*/&gdt->sc_lock, + &gdt->sc_gcscratch_dmat) != 0) { + device_printf(gdt->sc_devnode, + "bus_dma_tag_create(...,gdt->sc_gcscratch_dmat) failed\n"); return (1); } gdt->sc_init_level++; @@ -237,8 +236,8 @@ iir_init(struct gdt_softc *gdt) /* Allocation for our ccb scratch area */ if (bus_dmamem_alloc(gdt->sc_gcscratch_dmat, (void **)&gdt->sc_gcscratch, BUS_DMA_NOWAIT, &gdt->sc_gcscratch_dmamap) != 0) { - printf("iir%d: bus_dmamem_alloc(...,&gdt->sc_gccbs,...) failed\n", - gdt->sc_hanum); + device_printf(gdt->sc_devnode, + "bus_dmamem_alloc(...,&gdt->sc_gccbs,...) failed\n"); return (1); } gdt->sc_init_level++; @@ -256,7 +255,7 @@ iir_init(struct gdt_softc *gdt) gdt->sc_gccbs = malloc(sizeof(struct gdt_ccb) * GDT_MAXCMDS, M_GDTBUF, M_NOWAIT | M_ZERO); if (gdt->sc_gccbs == NULL) { - printf("iir%d: no memory for gccbs.\n", gdt->sc_hanum); + device_printf(gdt->sc_devnode, "no memory for gccbs.\n"); return (1); } for (i = GDT_MAXCMDS-1; i >= 0; i--) { @@ -270,28 +269,30 @@ iir_init(struct gdt_softc *gdt) gccb->gc_map_flag = TRUE; gccb->gc_scratch = &gdt->sc_gcscratch[GDT_SCRATCH_SZ * i]; gccb->gc_scratch_busbase = gdt->sc_gcscratch_busbase + GDT_SCRATCH_SZ * i; - callout_handle_init(&gccb->gc_timeout_ch); + callout_init_mtx(&gccb->gc_timeout, &gdt->sc_lock, 0); SLIST_INSERT_HEAD(&gdt->sc_free_gccb, gccb, sle); } gdt->sc_init_level++; /* create the control device */ - gdt->sc_dev = gdt_make_dev(gdt->sc_hanum); + gdt->sc_dev = gdt_make_dev(gdt); /* allocate ccb for gdt_internal_cmd() */ + mtx_lock(&gdt->sc_lock); gccb = gdt_get_ccb(gdt); if (gccb == NULL) { - printf("iir%d: No free command index found\n", - gdt->sc_hanum); + mtx_unlock(&gdt->sc_lock); + device_printf(gdt->sc_devnode, "No free command index found\n"); return (1); } bzero(gccb->gc_cmd, GDT_CMD_SZ); if (!gdt_internal_cmd(gdt, gccb, GDT_SCREENSERVICE, GDT_INIT, 0, 0, 0)) { - printf("iir%d: Screen service initialization error %d\n", - gdt->sc_hanum, gdt->sc_status); + device_printf(gdt->sc_devnode, + "Screen service initialization error %d\n", gdt->sc_status); gdt_free_ccb(gdt, gccb); + mtx_unlock(&gdt->sc_lock); return (1); } @@ -300,9 +301,10 @@ iir_init(struct gdt_softc *gdt) if (!gdt_internal_cmd(gdt, gccb, GDT_CACHESERVICE, GDT_INIT, GDT_LINUX_OS, 0, 0)) { - printf("iir%d: Cache service initialization error %d\n", - gdt->sc_hanum, gdt->sc_status); + device_printf(gdt->sc_devnode, "Cache service initialization error %d\n", + gdt->sc_status); gdt_free_ccb(gdt, gccb); + mtx_unlock(&gdt->sc_lock); return (1); } cdev_cnt = (u_int16_t)gdt->sc_info; @@ -332,9 +334,10 @@ iir_init(struct gdt_softc *gdt) GDT_IO_CHANNEL | GDT_INVALID_CHANNEL, GDT_GETCH_SZ)) { if (i == 0) { - printf("iir%d: Cannot get channel count, " - "error %d\n", gdt->sc_hanum, gdt->sc_status); + device_printf(gdt->sc_devnode, "Cannot get channel count, " + "error %d\n", gdt->sc_status); gdt_free_ccb(gdt, gccb); + mtx_unlock(&gdt->sc_lock); return (1); } break; @@ -351,9 +354,10 @@ iir_init(struct gdt_softc *gdt) if (!gdt_internal_cmd(gdt, gccb, GDT_SCSIRAWSERVICE, GDT_INIT, 0, 0, 0)) { - printf("iir%d: Raw service initialization error %d\n", - gdt->sc_hanum, gdt->sc_status); + device_printf(gdt->sc_devnode, + "Raw service initialization error %d\n", gdt->sc_status); gdt_free_ccb(gdt, gccb); + mtx_unlock(&gdt->sc_lock); return (1); } @@ -365,9 +369,11 @@ iir_init(struct gdt_softc *gdt) 0, 0, 0)) { gdt->sc_raw_feat = gdt->sc_info; if (!(gdt->sc_info & GDT_SCATTER_GATHER)) { - panic("iir%d: Scatter/Gather Raw Service " - "required but not supported!\n", gdt->sc_hanum); + panic("%s: Scatter/Gather Raw Service " + "required but not supported!\n", + device_get_nameunit(gdt->sc_devnode)); gdt_free_ccb(gdt, gccb); + mtx_unlock(&gdt->sc_lock); return (1); } } @@ -381,9 +387,11 @@ iir_init(struct gdt_softc *gdt) 0, 0, 0)) { gdt->sc_cache_feat = gdt->sc_info; if (!(gdt->sc_info & GDT_SCATTER_GATHER)) { - panic("iir%d: Scatter/Gather Cache Service " - "required but not supported!\n", gdt->sc_hanum); + panic("%s: Scatter/Gather Cache Service " + "required but not supported!\n", + device_get_nameunit(gdt->sc_devnode)); gdt_free_ccb(gdt, gccb); + mtx_unlock(&gdt->sc_lock); return (1); } } @@ -442,8 +450,9 @@ iir_init(struct gdt_softc *gdt) gdt->sc_bus_cnt, cdev_cnt, cdev_cnt == 1 ? "" : "s")); gdt_free_ccb(gdt, gccb); + mtx_unlock(&gdt->sc_lock); - gdt_cnt++; + atomic_add_int(&gdt_cnt, 1); return (0); } @@ -459,9 +468,11 @@ iir_free(struct gdt_softc *gdt) gdt_destroy_dev(gdt->sc_dev); case 5: for (i = GDT_MAXCMDS-1; i >= 0; i--) - if (gdt->sc_gccbs[i].gc_map_flag) + if (gdt->sc_gccbs[i].gc_map_flag) { + callout_drain(&gdt->sc_gccbs[i].gc_timeout); bus_dmamap_destroy(gdt->sc_buffer_dmat, gdt->sc_gccbs[i].gc_dmamap); + } bus_dmamap_unload(gdt->sc_gcscratch_dmat, gdt->sc_gcscratch_dmamap); free(gdt->sc_gccbs, M_GDTBUF); case 4: @@ -475,7 +486,6 @@ iir_free(struct gdt_softc *gdt) case 0: break; } - TAILQ_REMOVE(&gdt_softcs, gdt, links); } void @@ -499,11 +509,12 @@ iir_attach(struct gdt_softc *gdt) * Construct our SIM entry */ gdt->sims[i] = cam_sim_alloc(iir_action, iir_poll, "iir", - gdt, gdt->sc_hanum, &Giant, - /*untagged*/1, - /*tagged*/GDT_MAXCMDS, devq); + gdt, device_get_unit(gdt->sc_devnode), &gdt->sc_lock, + /*untagged*/1, /*tagged*/GDT_MAXCMDS, devq); + mtx_lock(&gdt->sc_lock); if (xpt_bus_register(gdt->sims[i], gdt->sc_devnode, i) != CAM_SUCCESS) { cam_sim_free(gdt->sims[i], /*free_devq*/i == 0); + mtx_unlock(&gdt->sc_lock); break; } @@ -513,8 +524,10 @@ iir_attach(struct gdt_softc *gdt) CAM_LUN_WILDCARD) != CAM_REQ_CMP) { xpt_bus_deregister(cam_sim_path(gdt->sims[i])); cam_sim_free(gdt->sims[i], /*free_devq*/i == 0); + mtx_unlock(&gdt->sc_lock); break; } + mtx_unlock(&gdt->sc_lock); } if (i > 0) EVENTHANDLER_REGISTER(shutdown_final, iir_shutdown, @@ -556,9 +569,7 @@ gdt_wait(struct gdt_softc *gdt, struct g gdt->sc_state |= GDT_POLL_WAIT; do { - iir_intr(gdt); - if (gdt == gdt_wait_gdt && - gccb->gc_cmd_index == gdt_wait_index) { + if (iir_intr_locked(gdt) == gccb->gc_cmd_index) { rv = 1; break; } @@ -642,11 +653,10 @@ static struct gdt_ccb * gdt_get_ccb(struct gdt_softc *gdt) { struct gdt_ccb *gccb; - int lock; GDT_DPRINTF(GDT_D_QUEUE, ("gdt_get_ccb(%p)\n", gdt)); - lock = splcam(); + mtx_assert(&gdt->sc_lock, MA_OWNED); gccb = SLIST_FIRST(&gdt->sc_free_gccb); if (gccb != NULL) { SLIST_REMOVE_HEAD(&gdt->sc_free_gccb, sle); @@ -655,23 +665,20 @@ gdt_get_ccb(struct gdt_softc *gdt) if (gdt_stat.cmd_index_act > gdt_stat.cmd_index_max) gdt_stat.cmd_index_max = gdt_stat.cmd_index_act; } - splx(lock); return (gccb); } void gdt_free_ccb(struct gdt_softc *gdt, struct gdt_ccb *gccb) { - int lock; GDT_DPRINTF(GDT_D_QUEUE, ("gdt_free_ccb(%p, %p)\n", gdt, gccb)); - - lock = splcam(); + + mtx_assert(&gdt->sc_lock, MA_OWNED); gccb->gc_flags = GDT_GCF_UNUSED; SLIST_REMOVE(&gdt->sc_pending_gccb, gccb, gdt_ccb, sle); SLIST_INSERT_HEAD(&gdt->sc_free_gccb, gccb, sle); --gdt_stat.cmd_index_act; - splx(lock); if (gdt->sc_state & GDT_SHUTDOWN) wakeup(gccb); } @@ -679,7 +686,6 @@ gdt_free_ccb(struct gdt_softc *gdt, stru void gdt_next(struct gdt_softc *gdt) { - int lock; union ccb *ccb; gdt_ucmd_t *ucmd; struct cam_sim *sim; @@ -693,10 +699,9 @@ gdt_next(struct gdt_softc *gdt) GDT_DPRINTF(GDT_D_QUEUE, ("gdt_next(%p)\n", gdt)); - lock = splcam(); + mtx_assert(&gdt->sc_lock, MA_OWNED); if (gdt->sc_test_busy(gdt)) { if (!(gdt->sc_state & GDT_POLLING)) { - splx(lock); return; } while (gdt->sc_test_busy(gdt)) @@ -715,7 +720,7 @@ gdt_next(struct gdt_softc *gdt) ucmd = TAILQ_FIRST(&gdt->sc_ucmd_queue); if (ucmd != NULL) { TAILQ_REMOVE(&gdt->sc_ucmd_queue, ucmd, links); - if ((gccb = gdt_ioctl_cmd(gdt, ucmd, &lock)) == NULL) { + if ((gccb = gdt_ioctl_cmd(gdt, ucmd)) == NULL) { TAILQ_INSERT_HEAD(&gdt->sc_ucmd_queue, ucmd, links); break; } @@ -746,7 +751,7 @@ gdt_next(struct gdt_softc *gdt) xpt_done(ccb); } else if (bus != gdt->sc_virt_bus) { /* raw service command */ - if ((gccb = gdt_raw_cmd(gdt, ccb, &lock)) == NULL) { + if ((gccb = gdt_raw_cmd(gdt, ccb)) == NULL) { TAILQ_INSERT_HEAD(&gdt->sc_ccb_queue, &ccb->ccb_h, sim_links.tqe); ++gdt_stat.req_queue_act; @@ -763,7 +768,7 @@ gdt_next(struct gdt_softc *gdt) /* cache service command */ if (cmd == READ_6 || cmd == WRITE_6 || cmd == READ_10 || cmd == WRITE_10) { - if ((gccb = gdt_cache_cmd(gdt, ccb, &lock)) == NULL) { + if ((gccb = gdt_cache_cmd(gdt, ccb)) == NULL) { TAILQ_INSERT_HEAD(&gdt->sc_ccb_queue, &ccb->ccb_h, sim_links.tqe); ++gdt_stat.req_queue_act; @@ -772,9 +777,7 @@ gdt_next(struct gdt_softc *gdt) next_cmd = FALSE; } } else { - splx(lock); gdt_internal_cache_cmd(gdt, ccb); - lock = splcam(); } } if ((gdt->sc_state & GDT_POLLING) || !next_cmd) @@ -783,15 +786,13 @@ gdt_next(struct gdt_softc *gdt) if (gdt->sc_cmd_cnt > 0) gdt->sc_release_event(gdt); - splx(lock); - if ((gdt->sc_state & GDT_POLLING) && gdt->sc_cmd_cnt > 0) { gdt_wait(gdt, gccb, GDT_POLL_TIMEOUT); } } static struct gdt_ccb * -gdt_raw_cmd(struct gdt_softc *gdt, union ccb *ccb, int *lock) +gdt_raw_cmd(struct gdt_softc *gdt, union ccb *ccb) { struct gdt_ccb *gccb; struct cam_sim *sim; @@ -802,15 +803,15 @@ gdt_raw_cmd(struct gdt_softc *gdt, union if (roundup(GDT_CMD_UNION + GDT_RAW_SZ, sizeof(u_int32_t)) + gdt->sc_cmd_off + GDT_DPMEM_COMMAND_OFFSET > gdt->sc_ic_all_size) { - GDT_DPRINTF(GDT_D_INVALID, ("iir%d: gdt_raw_cmd(): DPMEM overflow\n", - gdt->sc_hanum)); + GDT_DPRINTF(GDT_D_INVALID, ("%s: gdt_raw_cmd(): DPMEM overflow\n", + device_get_nameunit(gdt->sc_devnode))); return (NULL); } gccb = gdt_get_ccb(gdt); if (gccb == NULL) { - GDT_DPRINTF(GDT_D_INVALID, ("iir%d: No free command index found\n", - gdt->sc_hanum)); + GDT_DPRINTF(GDT_D_INVALID, ("%s: No free command index found\n", + device_get_nameunit(gdt->sc_devnode))); return (gccb); } bzero(gccb->gc_cmd, GDT_CMD_SZ); @@ -821,7 +822,6 @@ gdt_raw_cmd(struct gdt_softc *gdt, union if (gdt->sc_cmd_cnt == 0) gdt->sc_set_sema0(gdt); - splx(*lock); gdt_enc32(gccb->gc_cmd + GDT_CMD_COMMANDINDEX, gccb->gc_cmd_index); gdt_enc16(gccb->gc_cmd + GDT_CMD_OPCODE, GDT_WRITE); @@ -856,12 +856,11 @@ gdt_raw_cmd(struct gdt_softc *gdt, union gccb->gc_ccb->ccb_h.status |= CAM_RELEASE_SIMQ; } - *lock = splcam(); return (gccb); } static struct gdt_ccb * -gdt_cache_cmd(struct gdt_softc *gdt, union ccb *ccb, int *lock) +gdt_cache_cmd(struct gdt_softc *gdt, union ccb *ccb) { struct gdt_ccb *gccb; struct cam_sim *sim; @@ -875,15 +874,15 @@ gdt_cache_cmd(struct gdt_softc *gdt, uni if (roundup(GDT_CMD_UNION + GDT_CACHE_SZ, sizeof(u_int32_t)) + gdt->sc_cmd_off + GDT_DPMEM_COMMAND_OFFSET > gdt->sc_ic_all_size) { - GDT_DPRINTF(GDT_D_INVALID, ("iir%d: gdt_cache_cmd(): DPMEM overflow\n", - gdt->sc_hanum)); + GDT_DPRINTF(GDT_D_INVALID, ("%s: gdt_cache_cmd(): DPMEM overflow\n", + device_get_nameunit(gdt->sc_devnode))); return (NULL); } gccb = gdt_get_ccb(gdt); if (gccb == NULL) { - GDT_DPRINTF(GDT_D_DEBUG, ("iir%d: No free command index found\n", - gdt->sc_hanum)); + GDT_DPRINTF(GDT_D_DEBUG, ("%s: No free command index found\n", + device_get_nameunit(gdt->sc_devnode))); return (gccb); } bzero(gccb->gc_cmd, GDT_CMD_SZ); @@ -894,7 +893,6 @@ gdt_cache_cmd(struct gdt_softc *gdt, uni if (gdt->sc_cmd_cnt == 0) gdt->sc_set_sema0(gdt); - splx(*lock); gdt_enc32(gccb->gc_cmd + GDT_CMD_COMMANDINDEX, gccb->gc_cmd_index); cmdp = ccb->csio.cdb_io.cdb_bytes; @@ -928,12 +926,11 @@ gdt_cache_cmd(struct gdt_softc *gdt, uni xpt_freeze_simq(sim, 1); gccb->gc_ccb->ccb_h.status |= CAM_RELEASE_SIMQ; } - *lock = splcam(); return (gccb); } static struct gdt_ccb * -gdt_ioctl_cmd(struct gdt_softc *gdt, gdt_ucmd_t *ucmd, int *lock) +gdt_ioctl_cmd(struct gdt_softc *gdt, gdt_ucmd_t *ucmd) { struct gdt_ccb *gccb; u_int32_t cnt; @@ -942,8 +939,8 @@ gdt_ioctl_cmd(struct gdt_softc *gdt, gdt gccb = gdt_get_ccb(gdt); if (gccb == NULL) { - GDT_DPRINTF(GDT_D_DEBUG, ("iir%d: No free command index found\n", - gdt->sc_hanum)); + GDT_DPRINTF(GDT_D_DEBUG, ("%s: No free command index found\n", + device_get_nameunit(gdt->sc_devnode))); return (gccb); } bzero(gccb->gc_cmd, GDT_CMD_SZ); @@ -958,8 +955,8 @@ gdt_ioctl_cmd(struct gdt_softc *gdt, gdt sizeof(u_int32_t)); cnt = ucmd->u.ioctl.param_size; if (cnt > GDT_SCRATCH_SZ) { - printf("iir%d: Scratch buffer too small (%d/%d)\n", - gdt->sc_hanum, GDT_SCRATCH_SZ, cnt); + device_printf(gdt->sc_devnode, + "Scratch buffer too small (%d/%d)\n", GDT_SCRATCH_SZ, cnt); gdt_free_ccb(gdt, gccb); return (NULL); } @@ -968,8 +965,8 @@ gdt_ioctl_cmd(struct gdt_softc *gdt, gdt GDT_SG_SZ, sizeof(u_int32_t)); cnt = ucmd->u.cache.BlockCnt * GDT_SECTOR_SIZE; if (cnt > GDT_SCRATCH_SZ) { - printf("iir%d: Scratch buffer too small (%d/%d)\n", - gdt->sc_hanum, GDT_SCRATCH_SZ, cnt); + device_printf(gdt->sc_devnode, + "Scratch buffer too small (%d/%d)\n", GDT_SCRATCH_SZ, cnt); gdt_free_ccb(gdt, gccb); return (NULL); } @@ -979,8 +976,8 @@ gdt_ioctl_cmd(struct gdt_softc *gdt, gdt GDT_SG_SZ, sizeof(u_int32_t)); cnt = ucmd->u.raw.sdlen; if (cnt + ucmd->u.raw.sense_len > GDT_SCRATCH_SZ) { - printf("iir%d: Scratch buffer too small (%d/%d)\n", - gdt->sc_hanum, GDT_SCRATCH_SZ, cnt + ucmd->u.raw.sense_len); + device_printf(gdt->sc_devnode, "Scratch buffer too small (%d/%d)\n", + GDT_SCRATCH_SZ, cnt + ucmd->u.raw.sense_len); gdt_free_ccb(gdt, gccb); return (NULL); } @@ -990,15 +987,14 @@ gdt_ioctl_cmd(struct gdt_softc *gdt, gdt if (gdt->sc_cmd_off + gccb->gc_cmd_len + GDT_DPMEM_COMMAND_OFFSET > gdt->sc_ic_all_size) { - GDT_DPRINTF(GDT_D_INVALID, ("iir%d: gdt_ioctl_cmd(): DPMEM overflow\n", - gdt->sc_hanum)); + GDT_DPRINTF(GDT_D_INVALID, ("%s: gdt_ioctl_cmd(): DPMEM overflow\n", + device_get_nameunit(gdt->sc_devnode))); gdt_free_ccb(gdt, gccb); return (NULL); } if (gdt->sc_cmd_cnt == 0) gdt->sc_set_sema0(gdt); - splx(*lock); /* fill cmd structure */ gdt_enc32(gccb->gc_cmd + GDT_CMD_COMMANDINDEX, @@ -1064,7 +1060,6 @@ gdt_ioctl_cmd(struct gdt_softc *gdt, gdt GDT_SG_LEN, ucmd->u.raw.sdlen); } - *lock = splcam(); gdt_stat.sg_count_act = 1; gdt->sc_copy_cmd(gdt, gccb); return (gccb); @@ -1181,13 +1176,12 @@ gdtexecuteccb(void *arg, bus_dma_segment struct gdt_ccb *gccb; union ccb *ccb; struct gdt_softc *gdt; - int i, lock; - - lock = splcam(); + int i; gccb = (struct gdt_ccb *)arg; ccb = gccb->gc_ccb; gdt = cam_sim_softc((struct cam_sim *)ccb->ccb_h.ccb_sim_ptr); + mtx_assert(&gdt->sc_lock, MA_OWNED); GDT_DPRINTF(GDT_D_CMD, ("gdtexecuteccb(%p, %p, %p, %d, %d)\n", gdt, gccb, dm_segs, nseg, error)); @@ -1240,12 +1234,10 @@ gdtexecuteccb(void *arg, bus_dma_segment ccb->ccb_h.status |= CAM_SIM_QUEUED; /* timeout handling */ - gccb->gc_timeout_ch = - timeout(iir_timeout, (caddr_t)gccb, - (ccb->ccb_h.timeout * hz) / 1000); + callout_reset(&gccb->gc_timeout, (ccb->ccb_h.timeout * hz) / 1000, + iir_timeout, gccb); gdt->sc_copy_cmd(gdt, gccb); - splx(lock); } @@ -1253,9 +1245,10 @@ static void iir_action( struct cam_sim *sim, union ccb *ccb ) { struct gdt_softc *gdt; - int lock, bus, target, lun; + int bus, target, lun; gdt = (struct gdt_softc *)cam_sim_softc( sim ); + mtx_assert(&gdt->sc_lock, MA_OWNED); ccb->ccb_h.ccb_sim_ptr = sim; bus = cam_sim_bus(sim); target = ccb->ccb_h.target_id; @@ -1270,12 +1263,10 @@ iir_action( struct cam_sim *sim, union c switch (ccb->ccb_h.func_code) { case XPT_SCSI_IO: - lock = splcam(); TAILQ_INSERT_TAIL(&gdt->sc_ccb_queue, &ccb->ccb_h, sim_links.tqe); ++gdt_stat.req_queue_act; if (gdt_stat.req_queue_act > gdt_stat.req_queue_max) gdt_stat.req_queue_max = gdt_stat.req_queue_act; - splx(lock); gdt_next(gdt); break; case XPT_RESET_DEV: /* Bus Device Reset the specified SCSI device */ @@ -1406,7 +1397,7 @@ iir_poll( struct cam_sim *sim ) gdt = (struct gdt_softc *)cam_sim_softc( sim ); GDT_DPRINTF(GDT_D_CMD, ("iir_poll sim %p gdt %p\n", sim, gdt)); - iir_intr(gdt); + iir_intr_locked(gdt); } static void @@ -1421,29 +1412,29 @@ iir_shutdown( void *arg, int howto ) struct gdt_softc *gdt; struct gdt_ccb *gccb; gdt_ucmd_t *ucmd; - int lock, i; + int i; gdt = (struct gdt_softc *)arg; GDT_DPRINTF(GDT_D_CMD, ("iir_shutdown(%p, %d)\n", gdt, howto)); - printf("iir%d: Flushing all Host Drives. Please wait ... ", - gdt->sc_hanum); + device_printf(gdt->sc_devnode, + "Flushing all Host Drives. Please wait ... "); /* allocate ucmd buffer */ ucmd = malloc(sizeof(gdt_ucmd_t), M_GDTBUF, M_NOWAIT); if (ucmd == NULL) { - printf("iir%d: iir_shutdown(): Cannot allocate resource\n", - gdt->sc_hanum); + printf("\n"); + device_printf(gdt->sc_devnode, + "iir_shutdown(): Cannot allocate resource\n"); return; } bzero(ucmd, sizeof(gdt_ucmd_t)); /* wait for pending IOs */ - lock = splcam(); + mtx_lock(&gdt->sc_lock); gdt->sc_state = GDT_SHUTDOWN; - splx(lock); if ((gccb = SLIST_FIRST(&gdt->sc_pending_gccb)) != NULL) - (void) tsleep((void *)gccb, PCATCH | PRIBIO, "iirshw", 100 * hz); + mtx_sleep(gccb, &gdt->sc_lock, PCATCH | PRIBIO, "iirshw", 100 * hz); /* flush */ for (i = 0; i < GDT_MAX_HDRIVES; ++i) { @@ -1451,15 +1442,15 @@ iir_shutdown( void *arg, int howto ) ucmd->service = GDT_CACHESERVICE; ucmd->OpCode = GDT_FLUSH; ucmd->u.cache.DeviceNo = i; - lock = splcam(); TAILQ_INSERT_TAIL(&gdt->sc_ucmd_queue, ucmd, links); ucmd->complete_flag = FALSE; - splx(lock); gdt_next(gdt); if (!ucmd->complete_flag) - (void) tsleep((void *)ucmd, PCATCH|PRIBIO, "iirshw", 10*hz); + mtx_sleep(ucmd, &gdt->sc_lock, PCATCH | PRIBIO, "iirshw", + 10 * hz); } } + mtx_unlock(&gdt->sc_lock); free(ucmd, M_DEVBUF); printf("Done.\n"); @@ -1469,29 +1460,33 @@ void iir_intr(void *arg) { struct gdt_softc *gdt = arg; + + mtx_lock(&gdt->sc_lock); + iir_intr_locked(gdt); + mtx_unlock(&gdt->sc_lock); +} + +int +iir_intr_locked(struct gdt_softc *gdt) +{ struct gdt_intr_ctx ctx; - int lock = 0; struct gdt_ccb *gccb; gdt_ucmd_t *ucmd; u_int32_t cnt; GDT_DPRINTF(GDT_D_INTR, ("gdt_intr(%p)\n", gdt)); + mtx_assert(&gdt->sc_lock, MA_OWNED); + /* If polling and we were not called from gdt_wait, just return */ if ((gdt->sc_state & GDT_POLLING) && !(gdt->sc_state & GDT_POLL_WAIT)) - return; - - if (!(gdt->sc_state & GDT_POLLING)) - lock = splcam(); - gdt_wait_index = 0; + return (0); ctx.istatus = gdt->sc_get_status(gdt); if (ctx.istatus == 0x00) { - if (!(gdt->sc_state & GDT_POLLING)) - splx(lock); gdt->sc_status = GDT_S_NO_STATUS; - return; + return (ctx.istatus); } gdt->sc_intr(gdt, &ctx); @@ -1501,27 +1496,18 @@ iir_intr(void *arg) gdt->sc_info = ctx.info; gdt->sc_info2 = ctx.info2; - if (gdt->sc_state & GDT_POLL_WAIT) { - gdt_wait_gdt = gdt; - gdt_wait_index = ctx.istatus; - } - if (ctx.istatus == GDT_ASYNCINDEX) { gdt_async_event(gdt, ctx.service); - if (!(gdt->sc_state & GDT_POLLING)) - splx(lock); - return; + return (ctx.istatus); } if (ctx.istatus == GDT_SPEZINDEX) { GDT_DPRINTF(GDT_D_INVALID, - ("iir%d: Service unknown or not initialized!\n", - gdt->sc_hanum)); + ("%s: Service unknown or not initialized!\n", + device_get_nameunit(gdt->sc_devnode))); gdt->sc_dvr.size = sizeof(gdt->sc_dvr.eu.driver); gdt->sc_dvr.eu.driver.ionode = gdt->sc_hanum; gdt_store_event(GDT_ES_DRIVER, 4, &gdt->sc_dvr); - if (!(gdt->sc_state & GDT_POLLING)) - splx(lock); - return; + return (ctx.istatus); } gccb = &gdt->sc_gccbs[ctx.istatus - 2]; @@ -1529,18 +1515,16 @@ iir_intr(void *arg) switch (gccb->gc_flags) { case GDT_GCF_UNUSED: - GDT_DPRINTF(GDT_D_INVALID, ("iir%d: Index (%d) to unused command!\n", - gdt->sc_hanum, ctx.istatus)); + GDT_DPRINTF(GDT_D_INVALID, ("%s: Index (%d) to unused command!\n", + device_get_nameunit(gdt->sc_devnode), ctx.istatus)); gdt->sc_dvr.size = sizeof(gdt->sc_dvr.eu.driver); gdt->sc_dvr.eu.driver.ionode = gdt->sc_hanum; gdt->sc_dvr.eu.driver.index = ctx.istatus; gdt_store_event(GDT_ES_DRIVER, 1, &gdt->sc_dvr); gdt_free_ccb(gdt, gccb); - /* fallthrough */ + break; case GDT_GCF_INTERNAL: - if (!(gdt->sc_state & GDT_POLLING)) - splx(lock); break; case GDT_GCF_IOCTL: @@ -1549,8 +1533,6 @@ iir_intr(void *arg) GDT_DPRINTF(GDT_D_DEBUG, ("iir_intr(%p) ioctl: gccb %p busy\n", gdt, gccb)); TAILQ_INSERT_HEAD(&gdt->sc_ucmd_queue, ucmd, links); - if (!(gdt->sc_state & GDT_POLLING)) - splx(lock); } else { ucmd->status = gdt->sc_status; ucmd->info = gdt->sc_info; @@ -1573,8 +1555,6 @@ iir_intr(void *arg) bcopy(gccb->gc_scratch, ucmd->data, cnt); } gdt_free_ccb(gdt, gccb); - if (!(gdt->sc_state & GDT_POLLING)) - splx(lock); /* wakeup */ wakeup(ucmd); } @@ -1584,11 +1564,11 @@ iir_intr(void *arg) default: gdt_free_ccb(gdt, gccb); gdt_sync_event(gdt, ctx.service, ctx.istatus, gccb); - if (!(gdt->sc_state & GDT_POLLING)) - splx(lock); gdt_next(gdt); break; } + + return (ctx.istatus); } int @@ -1604,8 +1584,7 @@ gdt_async_event(struct gdt_softc *gdt, i DELAY(1); gccb = gdt_get_ccb(gdt); if (gccb == NULL) { - printf("iir%d: No free command index found\n", - gdt->sc_hanum); + device_printf(gdt->sc_devnode, "No free command index found\n"); return (1); } bzero(gccb->gc_cmd, GDT_CMD_SZ); @@ -1624,8 +1603,8 @@ gdt_async_event(struct gdt_softc *gdt, i sizeof(u_int32_t)); gdt->sc_cmd_cnt = 0; gdt->sc_copy_cmd(gdt, gccb); - printf("iir%d: [PCI %d/%d] ", - gdt->sc_hanum,gdt->sc_bus,gdt->sc_slot); + device_printf(gdt->sc_devnode, "[PCI %d/%d] ", gdt->sc_bus, + gdt->sc_slot); gdt->sc_release_event(gdt); } @@ -1644,7 +1623,7 @@ gdt_async_event(struct gdt_softc *gdt, i *(u_int32_t *)gdt->sc_dvr.eu.async.scsi_coord = gdt->sc_info2; } gdt_store_event(GDT_ES_ASYNC, service, &gdt->sc_dvr); - printf("iir%d: %s\n", gdt->sc_hanum, gdt->sc_dvr.event_string); + device_printf(gdt->sc_devnode, "%s\n", gdt->sc_dvr.event_string); } return (0); @@ -1679,8 +1658,7 @@ gdt_sync_event(struct gdt_softc *gdt, in bzero(gccb->gc_cmd, GDT_CMD_SZ); gccb = gdt_get_ccb(gdt); if (gccb == NULL) { - printf("iir%d: No free command index found\n", - gdt->sc_hanum); + device_printf(gdt->sc_devnode, "No free command index found\n"); return (1); } gccb->gc_service = service; @@ -1723,8 +1701,7 @@ gdt_sync_event(struct gdt_softc *gdt, in bzero(gccb->gc_cmd, GDT_CMD_SZ); gccb = gdt_get_ccb(gdt); if (gccb == NULL) { - printf("iir%d: No free command index found\n", - gdt->sc_hanum); + device_printf(gdt->sc_devnode, "No free command index found\n"); return (1); } gccb->gc_service = service; @@ -1748,7 +1725,7 @@ gdt_sync_event(struct gdt_softc *gdt, in printf("\n"); return (0); } else { - untimeout(iir_timeout, gccb, gccb->gc_timeout_ch); + callout_stop(&gccb->gc_timeout); if (gdt->sc_status == GDT_S_BSY) { GDT_DPRINTF(GDT_D_DEBUG, ("gdt_sync_event(%p) gccb %p busy\n", gdt, gccb)); @@ -1816,7 +1793,7 @@ gdt_sync_event(struct gdt_softc *gdt, in } /* Controller event handling functions */ -gdt_evt_str *gdt_store_event(u_int16_t source, u_int16_t idx, +void gdt_store_event(u_int16_t source, u_int16_t idx, gdt_evt_data *evt) { gdt_evt_str *e; @@ -1824,8 +1801,9 @@ gdt_evt_str *gdt_store_event(u_int16_t s GDT_DPRINTF(GDT_D_MISC, ("gdt_store_event(%d, %d)\n", source, idx)); if (source == 0) /* no source -> no event */ - return 0; + return; + mtx_lock(&elock); if (ebuffer[elastidx].event_source == source && ebuffer[elastidx].event_idx == idx && ((evt->size != 0 && ebuffer[elastidx].event_data.size != 0 && @@ -1858,16 +1836,16 @@ gdt_evt_str *gdt_store_event(u_int16_t s e->event_data = *evt; e->application = 0; } - return e; + mtx_unlock(&elock); } int gdt_read_event(int handle, gdt_evt_str *estr) { gdt_evt_str *e; - int eindex, lock; + int eindex; GDT_DPRINTF(GDT_D_MISC, ("gdt_read_event(%d)\n", handle)); - lock = splcam(); + mtx_lock(&elock); if (handle == -1) eindex = eoldidx; else @@ -1875,7 +1853,7 @@ int gdt_read_event(int handle, gdt_evt_s estr->event_source = 0; if (eindex >= GDT_MAX_EVENTS) { - splx(lock); + mtx_unlock(&elock); return eindex; } e = &ebuffer[eindex]; @@ -1888,7 +1866,7 @@ int gdt_read_event(int handle, gdt_evt_s } memcpy(estr, e, sizeof(gdt_evt_str)); } - splx(lock); + mtx_unlock(&elock); return eindex; } @@ -1896,10 +1874,10 @@ void gdt_readapp_event(u_int8_t applicat { gdt_evt_str *e; int found = FALSE; - int eindex, lock; + int eindex; GDT_DPRINTF(GDT_D_MISC, ("gdt_readapp_event(%d)\n", application)); - lock = splcam(); + mtx_lock(&elock); eindex = eoldidx; for (;;) { e = &ebuffer[eindex]; @@ -1919,13 +1897,15 @@ void gdt_readapp_event(u_int8_t applicat memcpy(estr, e, sizeof(gdt_evt_str)); else estr->event_source = 0; - splx(lock); + mtx_unlock(&elock); } void gdt_clear_events() { GDT_DPRINTF(GDT_D_MISC, ("gdt_clear_events\n")); + mtx_lock(&elock); eoldidx = elastidx = 0; ebuffer[0].event_source = 0; + mtx_unlock(&elock); } Modified: stable/10/sys/dev/iir/iir.h ============================================================================== --- stable/10/sys/dev/iir/iir.h Sun Dec 21 01:15:55 2014 (r275974) +++ stable/10/sys/dev/iir/iir.h Sun Dec 21 01:39:21 2014 (r275975) @@ -591,6 +591,7 @@ struct gdt_intr_ctx { /* softc structure */ struct gdt_softc { device_t sc_devnode; + struct mtx sc_lock; int sc_hanum; int sc_class; /* Controller class */ #define GDT_MPR 0x05 @@ -608,9 +609,7 @@ struct gdt_softc { #define GDT_SHUTDOWN 0x02 #define GDT_POLL_WAIT 0x80 struct cdev *sc_dev; - bus_space_tag_t sc_dpmemt; - bus_space_handle_t sc_dpmemh; - bus_addr_t sc_dpmembase; + struct resource *sc_dpmem; bus_dma_tag_t sc_parent_dmat; bus_dma_tag_t sc_buffer_dmat; bus_dma_tag_t sc_gcscratch_dmat; @@ -684,9 +683,8 @@ struct gdt_ccb { union ccb *gc_ccb; gdt_ucmd_t *gc_ucmd; bus_dmamap_t gc_dmamap; - struct callout_handle gc_timeout_ch; + struct callout gc_timeout; int gc_map_flag; - int gc_timeout; u_int8_t gc_service; u_int8_t gc_cmd_index; u_int8_t gc_flags; @@ -738,15 +736,14 @@ gdt_dec32(u_int8_t *addr) } #endif -extern TAILQ_HEAD(gdt_softc_list, gdt_softc) gdt_softcs; extern u_int8_t gdt_polling; -struct cdev *gdt_make_dev(int unit); +struct cdev *gdt_make_dev(struct gdt_softc *gdt); void gdt_destroy_dev(struct cdev *dev); void gdt_next(struct gdt_softc *gdt); void gdt_free_ccb(struct gdt_softc *gdt, struct gdt_ccb *gccb); -gdt_evt_str *gdt_store_event(u_int16_t source, u_int16_t idx, +void gdt_store_event(u_int16_t source, u_int16_t idx, gdt_evt_data *evt); int gdt_read_event(int handle, gdt_evt_str *estr); void gdt_readapp_event(u_int8_t app, gdt_evt_str *estr); Modified: stable/10/sys/dev/iir/iir_ctrl.c ============================================================================== --- stable/10/sys/dev/iir/iir_ctrl.c Sun Dec 21 01:15:55 2014 (r275974) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Dec 21 02:35:23 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9C2C9527; Sun, 21 Dec 2014 02:35:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 85C412013; Sun, 21 Dec 2014 02:35:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBL2ZN0G014342; Sun, 21 Dec 2014 02:35:23 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBL2ZNB6014340; Sun, 21 Dec 2014 02:35:23 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201412210235.sBL2ZNB6014340@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Sun, 21 Dec 2014 02:35:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r275976 - in stable/10/sys: dev/mrsas modules/mrsas modules/mrsas/mrsas_linux X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2014 02:35:23 -0000 Author: smh Date: Sun Dec 21 02:35:22 2014 New Revision: 275976 URL: https://svnweb.freebsd.org/changeset/base/275976 Log: MFC r272735: Support upto 256VD. MFC r272737: Support 32-bit linux binaries on FreeBSD 64bit. MFC r272738: Fix the minor svn add issue. MFC r272739: Extended MSI-x vectors support for Invader and Fury(12Gb/s HBA). MFC r272740: Add d_poll support. MFC r272741: Fix leak of mfi cmd in the passthru and correctly limit oustanding. MFC r272742: Import vendor Phase 6.5 driver MFC r272744: Style (9) fixes. MFC r273040: Fix for build issue on i386.xen and amd64.xen. Sponsored by: Multiplay Added: stable/10/sys/dev/mrsas/mrsas_linux.c - copied, changed from r272737, head/sys/dev/mrsas/mrsas_linux.c stable/10/sys/modules/mrsas/mrsas_linux/ - copied from r272737, head/sys/modules/mrsas/mrsas_linux/ Modified: stable/10/sys/dev/mrsas/mrsas.c stable/10/sys/dev/mrsas/mrsas.h stable/10/sys/dev/mrsas/mrsas_cam.c stable/10/sys/dev/mrsas/mrsas_fp.c stable/10/sys/dev/mrsas/mrsas_ioctl.c stable/10/sys/dev/mrsas/mrsas_ioctl.h stable/10/sys/modules/mrsas/Makefile stable/10/sys/modules/mrsas/mrsas_linux/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/mrsas/mrsas.c ============================================================================== --- stable/10/sys/dev/mrsas/mrsas.c Sun Dec 21 01:39:21 2014 (r275975) +++ stable/10/sys/dev/mrsas/mrsas.c Sun Dec 21 02:35:22 2014 (r275976) @@ -1,43 +1,38 @@ /* - * Copyright (c) 2014, LSI Corp. - * All rights reserved. - * Author: Marian Choy + * Copyright (c) 2014, LSI Corp. All rights reserved. Author: Marian Choy * Support: freebsdraid@lsi.com * * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: + * 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. Neither the name of the nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "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 - * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 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 + * 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. Neither the name of the + * nor the names of its contributors may be used to endorse or + * promote products derived from this software without specific prior written + * permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * 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. * - * The views and conclusions contained in the software and documentation - * are those of the authors and should not be interpreted as representing + * The views and conclusions contained in the software and documentation are + * those of the authors and should not be interpreted as representing * official policies,either expressed or implied, of the FreeBSD Project. * - * Send feedback to: - * Mail to: LSI Corporation, 1621 Barber Lane, Milpitas, CA 95035 - * ATTN: MegaRaid FreeBSD + * Send feedback to: Mail to: LSI Corporation, 1621 + * Barber Lane, Milpitas, CA 95035 ATTN: MegaRaid FreeBSD * */ @@ -54,18 +49,23 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include -/* - * Function prototypes +/* + * Function prototypes */ -static d_open_t mrsas_open; -static d_close_t mrsas_close; -static d_read_t mrsas_read; -static d_write_t mrsas_write; -static d_ioctl_t mrsas_ioctl; +static d_open_t mrsas_open; +static d_close_t mrsas_close; +static d_read_t mrsas_read; +static d_write_t mrsas_write; +static d_ioctl_t mrsas_ioctl; +static d_poll_t mrsas_poll; +static struct mrsas_mgmt_info mrsas_mgmt_info; static struct mrsas_ident *mrsas_find_ident(device_t); +static int mrsas_setup_msix(struct mrsas_softc *sc); +static int mrsas_allocate_msix(struct mrsas_softc *sc); static void mrsas_shutdown_ctlr(struct mrsas_softc *sc, u_int32_t opcode); static void mrsas_flush_cache(struct mrsas_softc *sc); static void mrsas_reset_reply_desc(struct mrsas_softc *sc); @@ -79,456 +79,476 @@ static int mrsas_setup_irq(struct mrsas_ static int mrsas_alloc_mem(struct mrsas_softc *sc); static int mrsas_init_fw(struct mrsas_softc *sc); static int mrsas_setup_raidmap(struct mrsas_softc *sc); -static int mrsas_complete_cmd(struct mrsas_softc *sc); +static int mrsas_complete_cmd(struct mrsas_softc *sc, u_int32_t MSIxIndex); static int mrsas_clear_intr(struct mrsas_softc *sc); -static int mrsas_get_ctrl_info(struct mrsas_softc *sc, - struct mrsas_ctrl_info *ctrl_info); -static int mrsas_issue_blocked_abort_cmd(struct mrsas_softc *sc, - struct mrsas_mfi_cmd *cmd_to_abort); +static int +mrsas_get_ctrl_info(struct mrsas_softc *sc, + struct mrsas_ctrl_info *ctrl_info); +static int +mrsas_issue_blocked_abort_cmd(struct mrsas_softc *sc, + struct mrsas_mfi_cmd *cmd_to_abort); u_int32_t mrsas_read_reg(struct mrsas_softc *sc, int offset); -u_int8_t mrsas_build_mptmfi_passthru(struct mrsas_softc *sc, - struct mrsas_mfi_cmd *mfi_cmd); -int mrsas_transition_to_ready(struct mrsas_softc *sc, int ocr); -int mrsas_init_adapter(struct mrsas_softc *sc); -int mrsas_alloc_mpt_cmds(struct mrsas_softc *sc); -int mrsas_alloc_ioc_cmd(struct mrsas_softc *sc); -int mrsas_alloc_ctlr_info_cmd(struct mrsas_softc *sc); -int mrsas_ioc_init(struct mrsas_softc *sc); -int mrsas_bus_scan(struct mrsas_softc *sc); -int mrsas_issue_dcmd(struct mrsas_softc *sc, struct mrsas_mfi_cmd *cmd); -int mrsas_issue_polled(struct mrsas_softc *sc, struct mrsas_mfi_cmd *cmd); -int mrsas_reset_ctrl(struct mrsas_softc *sc); -int mrsas_wait_for_outstanding(struct mrsas_softc *sc); -int mrsas_issue_blocked_cmd(struct mrsas_softc *sc, - struct mrsas_mfi_cmd *cmd); -int mrsas_alloc_tmp_dcmd(struct mrsas_softc *sc, struct mrsas_tmp_dcmd *tcmd, - int size); -void mrsas_release_mfi_cmd(struct mrsas_mfi_cmd *cmd); -void mrsas_wakeup(struct mrsas_softc *sc, struct mrsas_mfi_cmd *cmd); -void mrsas_complete_aen(struct mrsas_softc *sc, struct mrsas_mfi_cmd *cmd); -void mrsas_complete_abort(struct mrsas_softc *sc, struct mrsas_mfi_cmd *cmd); -void mrsas_disable_intr(struct mrsas_softc *sc); -void mrsas_enable_intr(struct mrsas_softc *sc); -void mrsas_free_ioc_cmd(struct mrsas_softc *sc); -void mrsas_free_mem(struct mrsas_softc *sc); -void mrsas_free_tmp_dcmd(struct mrsas_tmp_dcmd *tmp); -void mrsas_isr(void *arg); -void mrsas_teardown_intr(struct mrsas_softc *sc); -void mrsas_addr_cb(void *arg, bus_dma_segment_t *segs, int nsegs, int error); -void mrsas_kill_hba (struct mrsas_softc *sc); -void mrsas_aen_handler(struct mrsas_softc *sc); -void mrsas_write_reg(struct mrsas_softc *sc, int offset, - u_int32_t value); -void mrsas_fire_cmd(struct mrsas_softc *sc, u_int32_t req_desc_lo, - u_int32_t req_desc_hi); -void mrsas_free_ctlr_info_cmd(struct mrsas_softc *sc); -void mrsas_complete_mptmfi_passthru(struct mrsas_softc *sc, - struct mrsas_mfi_cmd *cmd, u_int8_t status); -void mrsas_map_mpt_cmd_status(struct mrsas_mpt_cmd *cmd, u_int8_t status, - u_int8_t extStatus); -struct mrsas_mfi_cmd* mrsas_get_mfi_cmd(struct mrsas_softc *sc); -MRSAS_REQUEST_DESCRIPTOR_UNION * mrsas_build_mpt_cmd(struct mrsas_softc *sc, - struct mrsas_mfi_cmd *cmd); +u_int8_t +mrsas_build_mptmfi_passthru(struct mrsas_softc *sc, + struct mrsas_mfi_cmd *mfi_cmd); +int mrsas_transition_to_ready(struct mrsas_softc *sc, int ocr); +int mrsas_init_adapter(struct mrsas_softc *sc); +int mrsas_alloc_mpt_cmds(struct mrsas_softc *sc); +int mrsas_alloc_ioc_cmd(struct mrsas_softc *sc); +int mrsas_alloc_ctlr_info_cmd(struct mrsas_softc *sc); +int mrsas_ioc_init(struct mrsas_softc *sc); +int mrsas_bus_scan(struct mrsas_softc *sc); +int mrsas_issue_dcmd(struct mrsas_softc *sc, struct mrsas_mfi_cmd *cmd); +int mrsas_issue_polled(struct mrsas_softc *sc, struct mrsas_mfi_cmd *cmd); +int mrsas_reset_ctrl(struct mrsas_softc *sc); +int mrsas_wait_for_outstanding(struct mrsas_softc *sc); +int +mrsas_issue_blocked_cmd(struct mrsas_softc *sc, + struct mrsas_mfi_cmd *cmd); +int +mrsas_alloc_tmp_dcmd(struct mrsas_softc *sc, struct mrsas_tmp_dcmd *tcmd, + int size); +void mrsas_release_mfi_cmd(struct mrsas_mfi_cmd *cmd); +void mrsas_wakeup(struct mrsas_softc *sc, struct mrsas_mfi_cmd *cmd); +void mrsas_complete_aen(struct mrsas_softc *sc, struct mrsas_mfi_cmd *cmd); +void mrsas_complete_abort(struct mrsas_softc *sc, struct mrsas_mfi_cmd *cmd); +void mrsas_disable_intr(struct mrsas_softc *sc); +void mrsas_enable_intr(struct mrsas_softc *sc); +void mrsas_free_ioc_cmd(struct mrsas_softc *sc); +void mrsas_free_mem(struct mrsas_softc *sc); +void mrsas_free_tmp_dcmd(struct mrsas_tmp_dcmd *tmp); +void mrsas_isr(void *arg); +void mrsas_teardown_intr(struct mrsas_softc *sc); +void mrsas_addr_cb(void *arg, bus_dma_segment_t *segs, int nsegs, int error); +void mrsas_kill_hba(struct mrsas_softc *sc); +void mrsas_aen_handler(struct mrsas_softc *sc); +void +mrsas_write_reg(struct mrsas_softc *sc, int offset, + u_int32_t value); +void +mrsas_fire_cmd(struct mrsas_softc *sc, u_int32_t req_desc_lo, + u_int32_t req_desc_hi); +void mrsas_free_ctlr_info_cmd(struct mrsas_softc *sc); +void +mrsas_complete_mptmfi_passthru(struct mrsas_softc *sc, + struct mrsas_mfi_cmd *cmd, u_int8_t status); +void +mrsas_map_mpt_cmd_status(struct mrsas_mpt_cmd *cmd, u_int8_t status, + u_int8_t extStatus); +struct mrsas_mfi_cmd *mrsas_get_mfi_cmd(struct mrsas_softc *sc); + +MRSAS_REQUEST_DESCRIPTOR_UNION *mrsas_build_mpt_cmd + (struct mrsas_softc *sc, struct mrsas_mfi_cmd *cmd); extern int mrsas_cam_attach(struct mrsas_softc *sc); extern void mrsas_cam_detach(struct mrsas_softc *sc); extern void mrsas_cmd_done(struct mrsas_softc *sc, struct mrsas_mpt_cmd *cmd); extern void mrsas_free_frame(struct mrsas_softc *sc, struct mrsas_mfi_cmd *cmd); extern int mrsas_alloc_mfi_cmds(struct mrsas_softc *sc); -extern void mrsas_release_mpt_cmd(struct mrsas_mpt_cmd *cmd); +extern void mrsas_release_mpt_cmd(struct mrsas_mpt_cmd *cmd); extern struct mrsas_mpt_cmd *mrsas_get_mpt_cmd(struct mrsas_softc *sc); -extern int mrsas_passthru(struct mrsas_softc *sc, void *arg); +extern int mrsas_passthru(struct mrsas_softc *sc, void *arg, u_long ioctlCmd); extern uint8_t MR_ValidateMapInfo(struct mrsas_softc *sc); -extern u_int16_t MR_GetLDTgtId(u_int32_t ld, MR_FW_RAID_MAP_ALL *map); -extern MR_LD_RAID *MR_LdRaidGet(u_int32_t ld, MR_FW_RAID_MAP_ALL *map); +extern u_int16_t MR_GetLDTgtId(u_int32_t ld, MR_DRV_RAID_MAP_ALL * map); +extern MR_LD_RAID *MR_LdRaidGet(u_int32_t ld, MR_DRV_RAID_MAP_ALL * map); extern void mrsas_xpt_freeze(struct mrsas_softc *sc); extern void mrsas_xpt_release(struct mrsas_softc *sc); -extern MRSAS_REQUEST_DESCRIPTOR_UNION *mrsas_get_request_desc(struct mrsas_softc *sc, - u_int16_t index); +extern MRSAS_REQUEST_DESCRIPTOR_UNION * +mrsas_get_request_desc(struct mrsas_softc *sc, + u_int16_t index); extern int mrsas_bus_scan_sim(struct mrsas_softc *sc, struct cam_sim *sim); static int mrsas_alloc_evt_log_info_cmd(struct mrsas_softc *sc); static void mrsas_free_evt_log_info_cmd(struct mrsas_softc *sc); -SYSCTL_NODE(_hw, OID_AUTO, mrsas, CTLFLAG_RD, 0, "MRSAS Driver Parameters"); +SYSCTL_NODE(_hw, OID_AUTO, mrsas, CTLFLAG_RD, 0, "MRSAS Driver Parameters"); -/** +/* * PCI device struct and table * */ typedef struct mrsas_ident { - uint16_t vendor; - uint16_t device; - uint16_t subvendor; - uint16_t subdevice; - const char *desc; -} MRSAS_CTLR_ID; + uint16_t vendor; + uint16_t device; + uint16_t subvendor; + uint16_t subdevice; + const char *desc; +} MRSAS_CTLR_ID; MRSAS_CTLR_ID device_table[] = { - {0x1000, MRSAS_TBOLT, 0xffff, 0xffff, "LSI Thunderbolt SAS Controller"}, - {0x1000, MRSAS_INVADER, 0xffff, 0xffff, "LSI Invader SAS Controller"}, - {0x1000, MRSAS_FURY, 0xffff, 0xffff, "LSI Fury SAS Controller"}, - {0, 0, 0, 0, NULL} + {0x1000, MRSAS_TBOLT, 0xffff, 0xffff, "LSI Thunderbolt SAS Controller"}, + {0x1000, MRSAS_INVADER, 0xffff, 0xffff, "LSI Invader SAS Controller"}, + {0x1000, MRSAS_FURY, 0xffff, 0xffff, "LSI Fury SAS Controller"}, + {0, 0, 0, 0, NULL} }; -/** - * Character device entry points +/* + * Character device entry points * */ static struct cdevsw mrsas_cdevsw = { - .d_version = D_VERSION, - .d_open = mrsas_open, - .d_close = mrsas_close, - .d_read = mrsas_read, - .d_write = mrsas_write, - .d_ioctl = mrsas_ioctl, - .d_name = "mrsas", + .d_version = D_VERSION, + .d_open = mrsas_open, + .d_close = mrsas_close, + .d_read = mrsas_read, + .d_write = mrsas_write, + .d_ioctl = mrsas_ioctl, + .d_poll = mrsas_poll, + .d_name = "mrsas", }; MALLOC_DEFINE(M_MRSAS, "mrsasbuf", "Buffers for the MRSAS driver"); -/** - * In the cdevsw routines, we find our softc by using the si_drv1 member - * of struct cdev. We set this variable to point to our softc in our - * attach routine when we create the /dev entry. +/* + * In the cdevsw routines, we find our softc by using the si_drv1 member of + * struct cdev. We set this variable to point to our softc in our attach + * routine when we create the /dev entry. */ int mrsas_open(struct cdev *dev, int oflags, int devtype, d_thread_t *td) { - struct mrsas_softc *sc; + struct mrsas_softc *sc; - sc = dev->si_drv1; - return (0); + sc = dev->si_drv1; + return (0); } int mrsas_close(struct cdev *dev, int fflag, int devtype, d_thread_t *td) { - struct mrsas_softc *sc; + struct mrsas_softc *sc; - sc = dev->si_drv1; - return (0); + sc = dev->si_drv1; + return (0); } int mrsas_read(struct cdev *dev, struct uio *uio, int ioflag) { - struct mrsas_softc *sc; + struct mrsas_softc *sc; - sc = dev->si_drv1; - return (0); + sc = dev->si_drv1; + return (0); } int mrsas_write(struct cdev *dev, struct uio *uio, int ioflag) { - struct mrsas_softc *sc; + struct mrsas_softc *sc; - sc = dev->si_drv1; - return (0); + sc = dev->si_drv1; + return (0); } -/** - * Register Read/Write Functions +/* + * Register Read/Write Functions * */ void mrsas_write_reg(struct mrsas_softc *sc, int offset, - u_int32_t value) + u_int32_t value) { - bus_space_tag_t bus_tag = sc->bus_tag; - bus_space_handle_t bus_handle = sc->bus_handle; + bus_space_tag_t bus_tag = sc->bus_tag; + bus_space_handle_t bus_handle = sc->bus_handle; - bus_space_write_4(bus_tag, bus_handle, offset, value); + bus_space_write_4(bus_tag, bus_handle, offset, value); } u_int32_t mrsas_read_reg(struct mrsas_softc *sc, int offset) { - bus_space_tag_t bus_tag = sc->bus_tag; - bus_space_handle_t bus_handle = sc->bus_handle; + bus_space_tag_t bus_tag = sc->bus_tag; + bus_space_handle_t bus_handle = sc->bus_handle; - return((u_int32_t)bus_space_read_4(bus_tag, bus_handle, offset)); + return ((u_int32_t)bus_space_read_4(bus_tag, bus_handle, offset)); } -/** - * Interrupt Disable/Enable/Clear Functions +/* + * Interrupt Disable/Enable/Clear Functions * */ -void mrsas_disable_intr(struct mrsas_softc *sc) +void +mrsas_disable_intr(struct mrsas_softc *sc) { - u_int32_t mask = 0xFFFFFFFF; - u_int32_t status; + u_int32_t mask = 0xFFFFFFFF; + u_int32_t status; - mrsas_write_reg(sc, offsetof(mrsas_reg_set, outbound_intr_mask), mask); - /* Dummy read to force pci flush */ - status = mrsas_read_reg(sc, offsetof(mrsas_reg_set, outbound_intr_mask)); + mrsas_write_reg(sc, offsetof(mrsas_reg_set, outbound_intr_mask), mask); + /* Dummy read to force pci flush */ + status = mrsas_read_reg(sc, offsetof(mrsas_reg_set, outbound_intr_mask)); } -void mrsas_enable_intr(struct mrsas_softc *sc) +void +mrsas_enable_intr(struct mrsas_softc *sc) { - u_int32_t mask = MFI_FUSION_ENABLE_INTERRUPT_MASK; - u_int32_t status; + u_int32_t mask = MFI_FUSION_ENABLE_INTERRUPT_MASK; + u_int32_t status; - mrsas_write_reg(sc, offsetof(mrsas_reg_set, outbound_intr_status), ~0); - status = mrsas_read_reg(sc, offsetof(mrsas_reg_set, outbound_intr_status)); + mrsas_write_reg(sc, offsetof(mrsas_reg_set, outbound_intr_status), ~0); + status = mrsas_read_reg(sc, offsetof(mrsas_reg_set, outbound_intr_status)); - mrsas_write_reg(sc, offsetof(mrsas_reg_set, outbound_intr_mask), ~mask); - status = mrsas_read_reg(sc, offsetof(mrsas_reg_set, outbound_intr_mask)); + mrsas_write_reg(sc, offsetof(mrsas_reg_set, outbound_intr_mask), ~mask); + status = mrsas_read_reg(sc, offsetof(mrsas_reg_set, outbound_intr_mask)); } -static int mrsas_clear_intr(struct mrsas_softc *sc) +static int +mrsas_clear_intr(struct mrsas_softc *sc) { - u_int32_t status, fw_status, fw_state; - - /* Read received interrupt */ - status = mrsas_read_reg(sc, offsetof(mrsas_reg_set, outbound_intr_status)); + u_int32_t status, fw_status, fw_state; - /* If FW state change interrupt is received, write to it again to clear */ - if (status & MRSAS_FW_STATE_CHNG_INTERRUPT) { - fw_status = mrsas_read_reg(sc, offsetof(mrsas_reg_set, - outbound_scratch_pad)); - fw_state = fw_status & MFI_STATE_MASK; - if (fw_state == MFI_STATE_FAULT) { - device_printf(sc->mrsas_dev, "FW is in FAULT state!\n"); - if(sc->ocr_thread_active) - wakeup(&sc->ocr_chan); - } - mrsas_write_reg(sc, offsetof(mrsas_reg_set, outbound_intr_status), status); - mrsas_read_reg(sc, offsetof(mrsas_reg_set, outbound_intr_status)); - return(1); - } + /* Read received interrupt */ + status = mrsas_read_reg(sc, offsetof(mrsas_reg_set, outbound_intr_status)); - /* Not our interrupt, so just return */ - if (!(status & MFI_FUSION_ENABLE_INTERRUPT_MASK)) - return(0); + /* + * If FW state change interrupt is received, write to it again to + * clear + */ + if (status & MRSAS_FW_STATE_CHNG_INTERRUPT) { + fw_status = mrsas_read_reg(sc, offsetof(mrsas_reg_set, + outbound_scratch_pad)); + fw_state = fw_status & MFI_STATE_MASK; + if (fw_state == MFI_STATE_FAULT) { + device_printf(sc->mrsas_dev, "FW is in FAULT state!\n"); + if (sc->ocr_thread_active) + wakeup(&sc->ocr_chan); + } + mrsas_write_reg(sc, offsetof(mrsas_reg_set, outbound_intr_status), status); + mrsas_read_reg(sc, offsetof(mrsas_reg_set, outbound_intr_status)); + return (1); + } + /* Not our interrupt, so just return */ + if (!(status & MFI_FUSION_ENABLE_INTERRUPT_MASK)) + return (0); - /* We got a reply interrupt */ - return(1); + /* We got a reply interrupt */ + return (1); } -/** - * PCI Support Functions +/* + * PCI Support Functions * */ -static struct mrsas_ident * mrsas_find_ident(device_t dev) +static struct mrsas_ident * +mrsas_find_ident(device_t dev) { - struct mrsas_ident *pci_device; + struct mrsas_ident *pci_device; - for (pci_device=device_table; pci_device->vendor != 0; pci_device++) - { - if ((pci_device->vendor == pci_get_vendor(dev)) && - (pci_device->device == pci_get_device(dev)) && - ((pci_device->subvendor == pci_get_subvendor(dev)) || - (pci_device->subvendor == 0xffff)) && - ((pci_device->subdevice == pci_get_subdevice(dev)) || - (pci_device->subdevice == 0xffff))) - return (pci_device); - } - return (NULL); + for (pci_device = device_table; pci_device->vendor != 0; pci_device++) { + if ((pci_device->vendor == pci_get_vendor(dev)) && + (pci_device->device == pci_get_device(dev)) && + ((pci_device->subvendor == pci_get_subvendor(dev)) || + (pci_device->subvendor == 0xffff)) && + ((pci_device->subdevice == pci_get_subdevice(dev)) || + (pci_device->subdevice == 0xffff))) + return (pci_device); + } + return (NULL); } -static int mrsas_probe(device_t dev) +static int +mrsas_probe(device_t dev) { - static u_int8_t first_ctrl = 1; - struct mrsas_ident *id; + static u_int8_t first_ctrl = 1; + struct mrsas_ident *id; - if ((id = mrsas_find_ident(dev)) != NULL) { - if (first_ctrl) { - printf("LSI MegaRAID SAS FreeBSD mrsas driver version: %s\n", MRSAS_VERSION); - first_ctrl = 0; - } - device_set_desc(dev, id->desc); - /* between BUS_PROBE_DEFAULT and BUS_PROBE_LOW_PRIORITY */ - return (-30); - } - return (ENXIO); + if ((id = mrsas_find_ident(dev)) != NULL) { + if (first_ctrl) { + printf("LSI MegaRAID SAS FreeBSD mrsas driver version: %s\n", + MRSAS_VERSION); + first_ctrl = 0; + } + device_set_desc(dev, id->desc); + /* between BUS_PROBE_DEFAULT and BUS_PROBE_LOW_PRIORITY */ + return (-30); + } + return (ENXIO); } -/** - * mrsas_setup_sysctl: setup sysctl values for mrsas - * input: Adapter instance soft state +/* + * mrsas_setup_sysctl: setup sysctl values for mrsas + * input: Adapter instance soft state * * Setup sysctl entries for mrsas driver. */ static void mrsas_setup_sysctl(struct mrsas_softc *sc) { - struct sysctl_ctx_list *sysctl_ctx = NULL; - struct sysctl_oid *sysctl_tree = NULL; - char tmpstr[80], tmpstr2[80]; - - /* - * Setup the sysctl variable so the user can change the debug level - * on the fly. - */ - snprintf(tmpstr, sizeof(tmpstr), "MRSAS controller %d", - device_get_unit(sc->mrsas_dev)); - snprintf(tmpstr2, sizeof(tmpstr2), "%d", device_get_unit(sc->mrsas_dev)); - - sysctl_ctx = device_get_sysctl_ctx(sc->mrsas_dev); - if (sysctl_ctx != NULL) - sysctl_tree = device_get_sysctl_tree(sc->mrsas_dev); - - if (sysctl_tree == NULL) { - sysctl_ctx_init(&sc->sysctl_ctx); - sc->sysctl_tree = SYSCTL_ADD_NODE(&sc->sysctl_ctx, - SYSCTL_STATIC_CHILDREN(_hw_mrsas), OID_AUTO, tmpstr2, - CTLFLAG_RD, 0, tmpstr); - if (sc->sysctl_tree == NULL) - return; - sysctl_ctx = &sc->sysctl_ctx; - sysctl_tree = sc->sysctl_tree; - } - SYSCTL_ADD_UINT(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), - OID_AUTO, "disable_ocr", CTLFLAG_RW, &sc->disableOnlineCtrlReset, 0, - "Disable the use of OCR"); - - SYSCTL_ADD_STRING(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), - OID_AUTO, "driver_version", CTLFLAG_RD, MRSAS_VERSION, - strlen(MRSAS_VERSION), "driver version"); - - SYSCTL_ADD_INT(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), - OID_AUTO, "reset_count", CTLFLAG_RD, - &sc->reset_count, 0, "number of ocr from start of the day"); - - SYSCTL_ADD_INT(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), - OID_AUTO, "fw_outstanding", CTLFLAG_RD, - &sc->fw_outstanding.val_rdonly, 0, "FW outstanding commands"); + struct sysctl_ctx_list *sysctl_ctx = NULL; + struct sysctl_oid *sysctl_tree = NULL; + char tmpstr[80], tmpstr2[80]; + + /* + * Setup the sysctl variable so the user can change the debug level + * on the fly. + */ + snprintf(tmpstr, sizeof(tmpstr), "MRSAS controller %d", + device_get_unit(sc->mrsas_dev)); + snprintf(tmpstr2, sizeof(tmpstr2), "%d", device_get_unit(sc->mrsas_dev)); + + sysctl_ctx = device_get_sysctl_ctx(sc->mrsas_dev); + if (sysctl_ctx != NULL) + sysctl_tree = device_get_sysctl_tree(sc->mrsas_dev); + + if (sysctl_tree == NULL) { + sysctl_ctx_init(&sc->sysctl_ctx); + sc->sysctl_tree = SYSCTL_ADD_NODE(&sc->sysctl_ctx, + SYSCTL_STATIC_CHILDREN(_hw_mrsas), OID_AUTO, tmpstr2, + CTLFLAG_RD, 0, tmpstr); + if (sc->sysctl_tree == NULL) + return; + sysctl_ctx = &sc->sysctl_ctx; + sysctl_tree = sc->sysctl_tree; + } + SYSCTL_ADD_UINT(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), + OID_AUTO, "disable_ocr", CTLFLAG_RW, &sc->disableOnlineCtrlReset, 0, + "Disable the use of OCR"); + + SYSCTL_ADD_STRING(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), + OID_AUTO, "driver_version", CTLFLAG_RD, MRSAS_VERSION, + strlen(MRSAS_VERSION), "driver version"); SYSCTL_ADD_INT(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), - OID_AUTO, "io_cmds_highwater", CTLFLAG_RD, - &sc->io_cmds_highwater, 0, "Max FW outstanding commands"); + OID_AUTO, "reset_count", CTLFLAG_RD, + &sc->reset_count, 0, "number of ocr from start of the day"); - SYSCTL_ADD_UINT(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), - OID_AUTO, "mrsas_debug", CTLFLAG_RW, &sc->mrsas_debug, 0, - "Driver debug level"); + SYSCTL_ADD_INT(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), + OID_AUTO, "fw_outstanding", CTLFLAG_RD, + &sc->fw_outstanding.val_rdonly, 0, "FW outstanding commands"); - SYSCTL_ADD_UINT(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), - OID_AUTO, "mrsas_io_timeout", CTLFLAG_RW, &sc->mrsas_io_timeout, - 0, "Driver IO timeout value in mili-second."); + SYSCTL_ADD_INT(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), + OID_AUTO, "io_cmds_highwater", CTLFLAG_RD, + &sc->io_cmds_highwater, 0, "Max FW outstanding commands"); - SYSCTL_ADD_UINT(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), - OID_AUTO, "mrsas_fw_fault_check_delay", CTLFLAG_RW, - &sc->mrsas_fw_fault_check_delay, - 0, "FW fault check thread delay in seconds. "); + SYSCTL_ADD_UINT(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), + OID_AUTO, "mrsas_debug", CTLFLAG_RW, &sc->mrsas_debug, 0, + "Driver debug level"); + + SYSCTL_ADD_UINT(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), + OID_AUTO, "mrsas_io_timeout", CTLFLAG_RW, &sc->mrsas_io_timeout, + 0, "Driver IO timeout value in mili-second."); + + SYSCTL_ADD_UINT(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), + OID_AUTO, "mrsas_fw_fault_check_delay", CTLFLAG_RW, + &sc->mrsas_fw_fault_check_delay, + 0, "FW fault check thread delay in seconds. "); - SYSCTL_ADD_INT(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), - OID_AUTO, "reset_in_progress", CTLFLAG_RD, - &sc->reset_in_progress, 0, "ocr in progress status"); + SYSCTL_ADD_INT(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), + OID_AUTO, "reset_in_progress", CTLFLAG_RD, + &sc->reset_in_progress, 0, "ocr in progress status"); } -/** - * mrsas_get_tunables: get tunable parameters. - * input: Adapter instance soft state +/* + * mrsas_get_tunables: get tunable parameters. + * input: Adapter instance soft state * * Get tunable parameters. This will help to debug driver at boot time. */ static void mrsas_get_tunables(struct mrsas_softc *sc) { - char tmpstr[80]; + char tmpstr[80]; - /* XXX default to some debugging for now */ - sc->mrsas_debug = MRSAS_FAULT; - sc->mrsas_io_timeout = MRSAS_IO_TIMEOUT; - sc->mrsas_fw_fault_check_delay = 1; - sc->reset_count = 0; - sc->reset_in_progress = 0; - - /* - * Grab the global variables. - */ - TUNABLE_INT_FETCH("hw.mrsas.debug_level", &sc->mrsas_debug); - - /* Grab the unit-instance variables */ - snprintf(tmpstr, sizeof(tmpstr), "dev.mrsas.%d.debug_level", - device_get_unit(sc->mrsas_dev)); - TUNABLE_INT_FETCH(tmpstr, &sc->mrsas_debug); -} - -/** - * mrsas_alloc_evt_log_info cmd: Allocates memory to get event log information. - * Used to get sequence number at driver load time. - * input: Adapter soft state + /* XXX default to some debugging for now */ + sc->mrsas_debug = MRSAS_FAULT; + sc->mrsas_io_timeout = MRSAS_IO_TIMEOUT; + sc->mrsas_fw_fault_check_delay = 1; + sc->reset_count = 0; + sc->reset_in_progress = 0; + + /* + * Grab the global variables. + */ + TUNABLE_INT_FETCH("hw.mrsas.debug_level", &sc->mrsas_debug); + + /* Grab the unit-instance variables */ + snprintf(tmpstr, sizeof(tmpstr), "dev.mrsas.%d.debug_level", + device_get_unit(sc->mrsas_dev)); + TUNABLE_INT_FETCH(tmpstr, &sc->mrsas_debug); +} + +/* + * mrsas_alloc_evt_log_info cmd: Allocates memory to get event log information. + * Used to get sequence number at driver load time. + * input: Adapter soft state * * Allocates DMAable memory for the event log info internal command. */ -int mrsas_alloc_evt_log_info_cmd(struct mrsas_softc *sc) +int +mrsas_alloc_evt_log_info_cmd(struct mrsas_softc *sc) { - int el_info_size; + int el_info_size; - /* Allocate get event log info command */ - el_info_size = sizeof(struct mrsas_evt_log_info); - if (bus_dma_tag_create( sc->mrsas_parent_tag, // parent - 1, 0, // algnmnt, boundary - BUS_SPACE_MAXADDR_32BIT,// lowaddr - BUS_SPACE_MAXADDR, // highaddr - NULL, NULL, // filter, filterarg - el_info_size, // maxsize - 1, // msegments - el_info_size, // maxsegsize - BUS_DMA_ALLOCNOW, // flags - NULL, NULL, // lockfunc, lockarg - &sc->el_info_tag)) { - device_printf(sc->mrsas_dev, "Cannot allocate event log info tag\n"); - return (ENOMEM); - } - if (bus_dmamem_alloc(sc->el_info_tag, (void **)&sc->el_info_mem, - BUS_DMA_NOWAIT, &sc->el_info_dmamap)) { - device_printf(sc->mrsas_dev, "Cannot allocate event log info cmd mem\n"); - return (ENOMEM); - } - if (bus_dmamap_load(sc->el_info_tag, sc->el_info_dmamap, - sc->el_info_mem, el_info_size, mrsas_addr_cb, - &sc->el_info_phys_addr, BUS_DMA_NOWAIT)) { - device_printf(sc->mrsas_dev, "Cannot load event log info cmd mem\n"); - return (ENOMEM); - } - - memset(sc->el_info_mem, 0, el_info_size); - return (0); -} - -/** - * mrsas_free_evt_info_cmd: Free memory for Event log info command - * input: Adapter soft state + /* Allocate get event log info command */ + el_info_size = sizeof(struct mrsas_evt_log_info); + if (bus_dma_tag_create(sc->mrsas_parent_tag, + 1, 0, + BUS_SPACE_MAXADDR_32BIT, + BUS_SPACE_MAXADDR, + NULL, NULL, + el_info_size, + 1, + el_info_size, + BUS_DMA_ALLOCNOW, + NULL, NULL, + &sc->el_info_tag)) { + device_printf(sc->mrsas_dev, "Cannot allocate event log info tag\n"); + return (ENOMEM); + } + if (bus_dmamem_alloc(sc->el_info_tag, (void **)&sc->el_info_mem, + BUS_DMA_NOWAIT, &sc->el_info_dmamap)) { + device_printf(sc->mrsas_dev, "Cannot allocate event log info cmd mem\n"); + return (ENOMEM); + } + if (bus_dmamap_load(sc->el_info_tag, sc->el_info_dmamap, + sc->el_info_mem, el_info_size, mrsas_addr_cb, + &sc->el_info_phys_addr, BUS_DMA_NOWAIT)) { + device_printf(sc->mrsas_dev, "Cannot load event log info cmd mem\n"); + return (ENOMEM); + } + memset(sc->el_info_mem, 0, el_info_size); + return (0); +} + +/* + * mrsas_free_evt_info_cmd: Free memory for Event log info command + * input: Adapter soft state * * Deallocates memory for the event log info internal command. */ -void mrsas_free_evt_log_info_cmd(struct mrsas_softc *sc) +void +mrsas_free_evt_log_info_cmd(struct mrsas_softc *sc) { - if (sc->el_info_phys_addr) - bus_dmamap_unload(sc->el_info_tag, sc->el_info_dmamap); - if (sc->el_info_mem != NULL) - bus_dmamem_free(sc->el_info_tag, sc->el_info_mem, sc->el_info_dmamap); - if (sc->el_info_tag != NULL) - bus_dma_tag_destroy(sc->el_info_tag); + if (sc->el_info_phys_addr) + bus_dmamap_unload(sc->el_info_tag, sc->el_info_dmamap); + if (sc->el_info_mem != NULL) + bus_dmamem_free(sc->el_info_tag, sc->el_info_mem, sc->el_info_dmamap); + if (sc->el_info_tag != NULL) + bus_dma_tag_destroy(sc->el_info_tag); } -/** +/* * mrsas_get_seq_num: Get latest event sequence number * @sc: Adapter soft state * @eli: Firmware event log sequence number information. - * Firmware maintains a log of all events in a non-volatile area. - * Driver get the sequence number using DCMD - * "MR_DCMD_CTRL_EVENT_GET_INFO" at driver load time. + * + * Firmware maintains a log of all events in a non-volatile area. + * Driver get the sequence number using DCMD + * "MR_DCMD_CTRL_EVENT_GET_INFO" at driver load time. */ static int mrsas_get_seq_num(struct mrsas_softc *sc, - struct mrsas_evt_log_info *eli) + struct mrsas_evt_log_info *eli) { struct mrsas_mfi_cmd *cmd; struct mrsas_dcmd_frame *dcmd; - cmd = mrsas_get_mfi_cmd(sc); + cmd = mrsas_get_mfi_cmd(sc); if (!cmd) { device_printf(sc->mrsas_dev, "Failed to get a free cmd\n"); return -ENOMEM; } - dcmd = &cmd->frame->dcmd; if (mrsas_alloc_evt_log_info_cmd(sc) != SUCCESS) { @@ -536,7 +556,6 @@ mrsas_get_seq_num(struct mrsas_softc *sc mrsas_release_mfi_cmd(cmd); return -ENOMEM; } - memset(dcmd->mbox.b, 0, MFI_MBOX_SIZE); dcmd->cmd = MFI_CMD_DCMD; @@ -553,8 +572,8 @@ mrsas_get_seq_num(struct mrsas_softc *sc mrsas_issue_blocked_cmd(sc, cmd); /* - * Copy the data back into callers buffer - */ + * Copy the data back into callers buffer + */ memcpy(eli, sc->el_info_mem, sizeof(struct mrsas_evt_log_info)); mrsas_free_evt_log_info_cmd(sc); mrsas_release_mfi_cmd(cmd); @@ -563,18 +582,19 @@ mrsas_get_seq_num(struct mrsas_softc *sc } -/** +/* * mrsas_register_aen: Register for asynchronous event notification - * @sc: Adapter soft state - * @seq_num: Starting sequence number - * @class_locale: Class of the event - * This function subscribes for events beyond the @seq_num - * and type @class_locale. - * - * */ + * @sc: Adapter soft state + * @seq_num: Starting sequence number + * @class_locale: Class of the event + * + * This function subscribes for events beyond the @seq_num + * and type @class_locale. + * + */ static int mrsas_register_aen(struct mrsas_softc *sc, u_int32_t seq_num, - u_int32_t class_locale_word) + u_int32_t class_locale_word) { int ret_val; struct mrsas_mfi_cmd *cmd; @@ -582,17 +602,16 @@ mrsas_register_aen(struct mrsas_softc *s union mrsas_evt_class_locale curr_aen; union mrsas_evt_class_locale prev_aen; -/* - * If there an AEN pending already (aen_cmd), check if the - * class_locale of that pending AEN is inclusive of the new - * AEN request we currently have. If it is, then we don't have - * to do anything. In other words, whichever events the current - * AEN request is subscribing to, have already been subscribed - * to. - * If the old_cmd is _not_ inclusive, then we have to abort - * that command, form a class_locale that is superset of both - * old and current and re-issue to the FW - * */ + /* + * If there an AEN pending already (aen_cmd), check if the + * class_locale of that pending AEN is inclusive of the new AEN + * request we currently have. If it is, then we don't have to do + * anything. In other words, whichever events the current AEN request + * is subscribing to, have already been subscribed to. If the old_cmd + * is _not_ inclusive, then we have to abort that command, form a + * class_locale that is superset of both old and current and re-issue + * to the FW + */ curr_aen.word = class_locale_word; @@ -600,21 +619,21 @@ mrsas_register_aen(struct mrsas_softc *s prev_aen.word = sc->aen_cmd->frame->dcmd.mbox.w[1]; -/* - * A class whose enum value is smaller is inclusive of all - * higher values. If a PROGRESS (= -1) was previously - * registered, then a new registration requests for higher - * classes need not be sent to FW. They are automatically - * included. - * Locale numbers don't have such hierarchy. They are bitmap values - */ + /* + * A class whose enum value is smaller is inclusive of all + * higher values. If a PROGRESS (= -1) was previously + * registered, then a new registration requests for higher + * classes need not be sent to FW. They are automatically + * included. Locale numbers don't have such hierarchy. They + * are bitmap values + */ if ((prev_aen.members.class <= curr_aen.members.class) && - !((prev_aen.members.locale & curr_aen.members.locale) ^ - curr_aen.members.locale)) { + !((prev_aen.members.locale & curr_aen.members.locale) ^ + curr_aen.members.locale)) { /* - * Previously issued event registration includes - * current request. Nothing to do. - */ + * Previously issued event registration includes + * current request. Nothing to do. + */ return 0; } else { curr_aen.members.locale |= prev_aen.members.locale; @@ -624,17 +643,16 @@ mrsas_register_aen(struct mrsas_softc *s sc->aen_cmd->abort_aen = 1; ret_val = mrsas_issue_blocked_abort_cmd(sc, - sc->aen_cmd); + sc->aen_cmd); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Dec 21 02:39:13 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4497B673; Sun, 21 Dec 2014 02:39:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2F0CB202D; Sun, 21 Dec 2014 02:39:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBL2dD8w014764; Sun, 21 Dec 2014 02:39:13 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBL2dB80014757; Sun, 21 Dec 2014 02:39:11 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201412210239.sBL2dB80014757@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Sun, 21 Dec 2014 02:39:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r275977 - stable/10/sys/dev/tws X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2014 02:39:13 -0000 Author: smh Date: Sun Dec 21 02:39:10 2014 New Revision: 275977 URL: https://svnweb.freebsd.org/changeset/base/275977 Log: MFC r272000: Switch from timeout(9) to callout(9) Sponsored by: Multiplay Modified: stable/10/sys/dev/tws/tws.c stable/10/sys/dev/tws/tws.h stable/10/sys/dev/tws/tws_cam.c stable/10/sys/dev/tws/tws_hdm.c stable/10/sys/dev/tws/tws_hdm.h stable/10/sys/dev/tws/tws_services.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/tws/tws.c ============================================================================== --- stable/10/sys/dev/tws/tws.c Sun Dec 21 02:35:22 2014 (r275976) +++ stable/10/sys/dev/tws/tws.c Sun Dec 21 02:39:10 2014 (r275977) @@ -198,6 +198,7 @@ tws_attach(device_t dev) mtx_init( &sc->sim_lock, "tws_sim_lock", NULL, MTX_DEF); mtx_init( &sc->gen_lock, "tws_gen_lock", NULL, MTX_DEF); mtx_init( &sc->io_lock, "tws_io_lock", NULL, MTX_DEF | MTX_RECURSE); + callout_init(&sc->stats_timer, CALLOUT_MPSAFE); if ( tws_init_trace_q(sc) == FAILURE ) printf("trace init failure\n"); @@ -395,11 +396,20 @@ tws_detach(device_t dev) TWS_TRACE(sc, "bus release mem resource", 0, sc->reg_res_id); } + for ( i=0; i< tws_queue_depth; i++) { + if (sc->reqs[i].dma_map) + bus_dmamap_destroy(sc->data_tag, sc->reqs[i].dma_map); + callout_drain(&sc->reqs[i].timeout); + } + + callout_drain(&sc->stats_timer); free(sc->reqs, M_TWS); free(sc->sense_bufs, M_TWS); free(sc->scan_ccb, M_TWS); if (sc->ioctl_data_mem) bus_dmamem_free(sc->data_tag, sc->ioctl_data_mem, sc->ioctl_data_map); + if (sc->data_tag) + bus_dma_tag_destroy(sc->data_tag); free(sc->aen_q.q, M_TWS); free(sc->trace_q.q, M_TWS); mtx_destroy(&sc->q_lock); @@ -696,7 +706,7 @@ tws_init_reqs(struct tws_softc *sc, u_in sc->reqs[i].cmd_pkt->hdr.header_desc.size_header = 128; - callout_handle_init(&sc->reqs[i].thandle); + callout_init(&sc->reqs[i].timeout, CALLOUT_MPSAFE); sc->reqs[i].state = TWS_REQ_STATE_FREE; if ( i >= TWS_RESERVED_REQS ) tws_q_insert_tail(sc, &sc->reqs[i], TWS_FREE_Q); @@ -846,7 +856,7 @@ tws_get_request(struct tws_softc *sc, u_ r->error_code = TWS_REQ_RET_INVALID; r->cb = NULL; r->ccb_ptr = NULL; - r->thandle.callout = NULL; + callout_stop(&r->timeout); r->next = r->prev = NULL; r->state = ((type == TWS_REQ_TYPE_SCSI_IO) ? TWS_REQ_STATE_TRAN : TWS_REQ_STATE_BUSY); Modified: stable/10/sys/dev/tws/tws.h ============================================================================== --- stable/10/sys/dev/tws/tws.h Sun Dec 21 02:35:22 2014 (r275976) +++ stable/10/sys/dev/tws/tws.h Sun Dec 21 02:39:10 2014 (r275977) @@ -268,4 +268,5 @@ struct tws_softc { union ccb *scan_ccb; /* pointer to a ccb */ struct tws_request *q_head[TWS_MAX_QS]; /* head pointers to q's */ struct tws_request *q_tail[TWS_MAX_QS]; /* tail pointers to q's */ + struct callout stats_timer; }; Modified: stable/10/sys/dev/tws/tws_cam.c ============================================================================== --- stable/10/sys/dev/tws/tws_cam.c Sun Dec 21 02:35:22 2014 (r275976) +++ stable/10/sys/dev/tws/tws_cam.c Sun Dec 21 02:39:10 2014 (r275977) @@ -341,7 +341,7 @@ tws_scsi_complete(struct tws_request *re tws_q_remove_request(sc, req, TWS_BUSY_Q); mtx_unlock(&sc->q_lock); - untimeout(tws_timeout, req, req->thandle); + callout_stop(&req->timeout); tws_unmap_request(req->sc, req); @@ -362,7 +362,7 @@ tws_getset_param_complete(struct tws_req TWS_TRACE_DEBUG(sc, "getset complete", req, req->request_id); - untimeout(tws_timeout, req, req->thandle); + callout_stop(&req->timeout); tws_unmap_request(sc, req); free(req->data, M_TWS); @@ -380,7 +380,7 @@ tws_aen_complete(struct tws_request *req TWS_TRACE_DEBUG(sc, "aen complete", 0, req->request_id); - untimeout(tws_timeout, req, req->thandle); + callout_stop(&req->timeout); tws_unmap_request(sc, req); sense = (struct tws_command_header *)req->data; @@ -454,7 +454,7 @@ tws_cmd_complete(struct tws_request *req { struct tws_softc *sc = req->sc; - untimeout(tws_timeout, req, req->thandle); + callout_stop(&req->timeout); tws_unmap_request(sc, req); } @@ -561,7 +561,7 @@ tws_scsi_err_complete(struct tws_request xpt_done(ccb); mtx_unlock(&sc->sim_lock); - untimeout(tws_timeout, req, req->thandle); + callout_stop(&req->timeout); tws_unmap_request(req->sc, req); mtx_lock(&sc->q_lock); tws_q_remove_request(sc, req, TWS_BUSY_Q); @@ -591,7 +591,7 @@ tws_drain_busy_queue(struct tws_softc *s mtx_unlock(&sc->q_lock); while ( req ) { TWS_TRACE_DEBUG(sc, "moved to TWS_COMPLETE_Q", 0, req->request_id); - untimeout(tws_timeout, req, req->thandle); + callout_stop(&req->timeout); req->error_code = TWS_REQ_RET_RESET; ccb = (union ccb *)(req->ccb_ptr); @@ -622,7 +622,7 @@ tws_drain_reserved_reqs(struct tws_softc r = &sc->reqs[TWS_REQ_TYPE_AEN_FETCH]; if ( r->state != TWS_REQ_STATE_FREE ) { TWS_TRACE_DEBUG(sc, "reset aen req", 0, 0); - untimeout(tws_timeout, r, r->thandle); + callout_stop(&r->timeout); tws_unmap_request(sc, r); free(r->data, M_TWS); r->state = TWS_REQ_STATE_FREE; @@ -638,7 +638,7 @@ tws_drain_reserved_reqs(struct tws_softc r = &sc->reqs[TWS_REQ_TYPE_GETSET_PARAM]; if ( r->state != TWS_REQ_STATE_FREE ) { TWS_TRACE_DEBUG(sc, "reset setparam req", 0, 0); - untimeout(tws_timeout, r, r->thandle); + callout_stop(&r->timeout); tws_unmap_request(sc, r); free(r->data, M_TWS); r->state = TWS_REQ_STATE_FREE; @@ -747,7 +747,7 @@ tws_execute_scsi(struct tws_softc *sc, u * and submit the I/O. */ sc->stats.scsi_ios++; - req->thandle = timeout(tws_timeout, req, (ccb_h->timeout * hz)/1000); + callout_reset(&req->timeout, (ccb_h->timeout * hz) / 1000, tws_timeout, req); error = tws_map_request(sc, req); return(error); } @@ -785,7 +785,7 @@ tws_send_scsi_cmd(struct tws_softc *sc, bzero(req->data, TWS_SECTOR_SIZE); req->flags = TWS_DIR_IN; - req->thandle = timeout(tws_timeout, req, (TWS_IO_TIMEOUT * hz)); + callout_reset(&req->timeout, (TWS_IO_TIMEOUT * hz), tws_timeout, req); error = tws_map_request(sc, req); return(error); @@ -832,7 +832,7 @@ tws_set_param(struct tws_softc *sc, u_in param->parameter_size_bytes = (u_int16_t)param_size; memcpy(param->data, data, param_size); - req->thandle = timeout(tws_timeout, req, (TWS_IOCTL_TIMEOUT * hz)); + callout_reset(&req->timeout, (TWS_IOCTL_TIMEOUT * hz), tws_timeout, req); error = tws_map_request(sc, req); return(error); @@ -1168,7 +1168,6 @@ tws_timeout(void *arg) return; } - tws_teardown_intr(sc); xpt_freeze_simq(sc->sim, 1); tws_send_event(sc, TWS_RESET_START); @@ -1191,7 +1190,6 @@ tws_timeout(void *arg) mtx_unlock(&sc->gen_lock); xpt_release_simq(sc->sim, 1); - tws_setup_intr(sc, sc->irqs); } void @@ -1205,7 +1203,6 @@ tws_reset(void *arg) return; } - tws_teardown_intr(sc); xpt_freeze_simq(sc->sim, 1); tws_send_event(sc, TWS_RESET_START); @@ -1222,7 +1219,6 @@ tws_reset(void *arg) mtx_unlock(&sc->gen_lock); xpt_release_simq(sc->sim, 1); - tws_setup_intr(sc, sc->irqs); } static void Modified: stable/10/sys/dev/tws/tws_hdm.c ============================================================================== --- stable/10/sys/dev/tws/tws_hdm.c Sun Dec 21 02:35:22 2014 (r275976) +++ stable/10/sys/dev/tws/tws_hdm.c Sun Dec 21 02:39:10 2014 (r275977) @@ -161,7 +161,7 @@ tws_init_connect(struct tws_softc *sc, u req->error_code = TWS_REQ_RET_INVALID; req->cb = NULL; req->ccb_ptr = NULL; - req->thandle.callout = NULL; + callout_stop(&req->timeout); req->next = req->prev = NULL; req->state = TWS_REQ_STATE_BUSY; #endif // 0 Modified: stable/10/sys/dev/tws/tws_hdm.h ============================================================================== --- stable/10/sys/dev/tws/tws_hdm.h Sun Dec 21 02:35:22 2014 (r275976) +++ stable/10/sys/dev/tws/tws_hdm.h Sun Dec 21 02:39:10 2014 (r275977) @@ -410,7 +410,7 @@ struct tws_request { void (*cb)(struct tws_request *); /* callback func */ bus_dmamap_t dma_map; /* dma map */ union ccb *ccb_ptr; /* pointer to ccb */ - struct callout_handle thandle; /* handle to req timeout */ + struct callout timeout; /* request timeout timer */ struct tws_softc *sc; /* pointer back to ctlr softc */ struct tws_request *next; /* pointer to next request */ Modified: stable/10/sys/dev/tws/tws_services.c ============================================================================== --- stable/10/sys/dev/tws/tws_services.c Sun Dec 21 02:35:22 2014 (r275976) +++ stable/10/sys/dev/tws/tws_services.c Sun Dec 21 02:39:10 2014 (r275977) @@ -395,7 +395,6 @@ tws_print_stats(void *arg) , sc->stats.num_intrs); TWS_TRACE(sc, "reqs(ioctls, scsi)", sc->stats.ioctls , sc->stats.scsi_ios); - timeout(tws_print_stats, sc, 300*hz); - + callout_reset(&sc->stats_timer, 300 * hz, tws_print_stats, sc); } /* --------------------- misc service end --------------------- */ From owner-svn-src-all@FreeBSD.ORG Sun Dec 21 02:47:40 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 029D7800; Sun, 21 Dec 2014 02:47:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D9C36215A; Sun, 21 Dec 2014 02:47:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBL2ldri019103; Sun, 21 Dec 2014 02:47:39 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBL2ldhE019102; Sun, 21 Dec 2014 02:47:39 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201412210247.sBL2ldhE019102@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Sun, 21 Dec 2014 02:47:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r275978 - stable/10/sys/dev/firewire X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2014 02:47:40 -0000 Author: smh Date: Sun Dec 21 02:47:38 2014 New Revision: 275978 URL: https://svnweb.freebsd.org/changeset/base/275978 Log: MFC r266772: Various cleanups and fixes including switching from timeout to callout Sponsored by: Multiplay Modified: stable/10/sys/dev/firewire/sbp.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/firewire/sbp.c ============================================================================== --- stable/10/sys/dev/firewire/sbp.c Sun Dec 21 02:39:10 2014 (r275977) +++ stable/10/sys/dev/firewire/sbp.c Sun Dec 21 02:47:38 2014 (r275978) @@ -177,7 +177,7 @@ struct sbp_ocb { struct sbp_dev *sdev; int flags; /* XXX should be removed */ bus_dmamap_t dmamap; - struct callout_handle timeout_ch; + struct callout timer; }; #define OCB_ACT_MGM 0 @@ -250,8 +250,9 @@ struct sbp_softc { int flags; struct mtx mtx; }; -#define SBP_LOCK(sbp) mtx_lock(&(sbp)->mtx) -#define SBP_UNLOCK(sbp) mtx_unlock(&(sbp)->mtx) +#define SBP_LOCK(sbp) mtx_lock(&(sbp)->mtx) +#define SBP_UNLOCK(sbp) mtx_unlock(&(sbp)->mtx) +#define SBP_LOCK_ASSERT(sbp) mtx_assert(&(sbp)->mtx, MA_OWNED) static void sbp_post_explore (void *); static void sbp_recv (struct fw_xfer *); @@ -265,7 +266,6 @@ static void sbp_execute_ocb (void *, bu static void sbp_free_ocb (struct sbp_dev *, struct sbp_ocb *); static void sbp_abort_ocb (struct sbp_ocb *, int); static void sbp_abort_all_ocbs (struct sbp_dev *, int); -static struct fw_xfer * sbp_write_cmd_locked (struct sbp_dev *, int, int); static struct fw_xfer * sbp_write_cmd (struct sbp_dev *, int, int); static struct sbp_ocb * sbp_get_ocb (struct sbp_dev *); static struct sbp_ocb * sbp_enqueue_ocb (struct sbp_dev *, struct sbp_ocb *); @@ -337,7 +337,8 @@ SBP_DEBUG(0) printf("sbp_identify\n"); END_DEBUG - BUS_ADD_CHILD(parent, 0, "sbp", device_get_unit(parent)); + if (device_find_child(parent, "sbp", -1) == NULL) + BUS_ADD_CHILD(parent, 0, "sbp", -1); } /* @@ -346,17 +347,11 @@ END_DEBUG static int sbp_probe(device_t dev) { - device_t pa; SBP_DEBUG(0) printf("sbp_probe\n"); END_DEBUG - pa = device_get_parent(dev); - if(device_get_unit(dev) != device_get_unit(pa)){ - return(ENXIO); - } - device_set_desc(dev, "SBP-2/SCSI over FireWire"); #if 0 @@ -460,6 +455,7 @@ sbp_alloc_lun(struct sbp_target *target) int maxlun, lun, i; sbp = target->sbp; + SBP_LOCK_ASSERT(sbp); crom_init_context(&cc, target->fwdev->csrrom); /* XXX shoud parse appropriate unit directories only */ maxlun = -1; @@ -476,8 +472,7 @@ END_DEBUG crom_next(&cc); } if (maxlun < 0) - printf("%s:%d no LUN found\n", - device_get_nameunit(target->sbp->fd.dev), + device_printf(target->sbp->fd.dev, "%d no LUN found\n", target->target_id); maxlun ++; @@ -548,7 +543,7 @@ END_DEBUG sdev->lun_id = lun; sdev->target = target; STAILQ_INIT(&sdev->ocbs); - CALLOUT_INIT(&sdev->login_callout); + callout_init_mtx(&sdev->login_callout, &sbp->mtx, 0); sdev->status = SBP_DEV_RESET; new = 1; snprintf(sdev->bustgtlun, 32, "%s:%d:%d", @@ -592,7 +587,7 @@ END_DEBUG /* XXX */ goto next; } - callout_handle_init(&ocb->timeout_ch); + callout_init_mtx(&ocb->timer, &sbp->mtx, 0); sbp_free_ocb(sdev, ocb); } next: @@ -648,8 +643,8 @@ END_DEBUG STAILQ_INIT(&target->xferlist); target->n_xfer = 0; STAILQ_INIT(&target->mgm_ocb_queue); - CALLOUT_INIT(&target->mgm_ocb_timeout); - CALLOUT_INIT(&target->scan_callout); + callout_init_mtx(&target->mgm_ocb_timeout, &sbp->mtx, 0); + callout_init_mtx(&target->scan_callout, &sbp->mtx, 0); target->luns = NULL; target->num_lun = 0; @@ -693,6 +688,7 @@ static void sbp_login_callout(void *arg) { struct sbp_dev *sdev = (struct sbp_dev *)arg; + SBP_LOCK_ASSERT(sdev->target->sbp); sbp_mgm_orb(sdev, ORB_FUN_LGI, NULL); } @@ -737,6 +733,7 @@ SBP_DEBUG(1) END_DEBUG sbp = target->sbp; + SBP_LOCK_ASSERT(sbp); sbp_alloc_lun(target); /* XXX untimeout mgm_ocb and dequeue */ @@ -746,10 +743,8 @@ END_DEBUG continue; if (alive && (sdev->status != SBP_DEV_DEAD)) { if (sdev->path != NULL) { - SBP_LOCK(sbp); xpt_freeze_devq(sdev->path, 1); sdev->freeze ++; - SBP_UNLOCK(sbp); } sbp_probe_lun(sdev); sbp_show_sdev_info(sdev); @@ -778,10 +773,8 @@ SBP_DEBUG(0) __func__); END_DEBUG if (sdev->path) { - SBP_LOCK(sbp); xpt_freeze_devq(sdev->path, 1); sdev->freeze ++; - SBP_UNLOCK(sbp); } sdev->status = SBP_DEV_RETRY; sbp_cam_detach_sdev(sdev); @@ -810,13 +803,13 @@ sbp_post_busreset(void *arg) SBP_DEBUG(0) printf("sbp_post_busreset\n"); END_DEBUG + SBP_LOCK(sbp); if ((sbp->sim->flags & SIMQ_FREEZED) == 0) { - SBP_LOCK(sbp); xpt_freeze_simq(sbp->sim, /*count*/1); sbp->sim->flags |= SIMQ_FREEZED; - SBP_UNLOCK(sbp); } microtime(&sbp->last_busreset); + SBP_UNLOCK(sbp); } static void @@ -837,6 +830,7 @@ END_DEBUG if (sbp_cold > 0) sbp_cold --; + SBP_LOCK(sbp); #if 0 /* * XXX don't let CAM the bus rest. @@ -887,7 +881,6 @@ END_DEBUG if (target->num_lun == 0) sbp_free_target(target); } - SBP_LOCK(sbp); xpt_release_simq(sbp->sim, /*run queue*/TRUE); sbp->sim->flags &= ~SIMQ_FREEZED; SBP_UNLOCK(sbp); @@ -896,16 +889,15 @@ END_DEBUG #if NEED_RESPONSE static void sbp_loginres_callback(struct fw_xfer *xfer){ - int s; struct sbp_dev *sdev; sdev = (struct sbp_dev *)xfer->sc; SBP_DEBUG(1) device_printf(sdev->target->sbp->fd.dev,"%s\n", __func__); END_DEBUG /* recycle */ - s = splfw(); + SBP_LOCK(sdev->target->sbp); STAILQ_INSERT_TAIL(&sdev->target->sbp->fwb.xferlist, xfer, link); - splx(s); + SBP_UNLOCK(sdev->target->sbp); return; } #endif @@ -914,15 +906,11 @@ static __inline void sbp_xfer_free(struct fw_xfer *xfer) { struct sbp_dev *sdev; - int s; sdev = (struct sbp_dev *)xfer->sc; fw_xfer_unload(xfer); - s = splfw(); - SBP_LOCK(sdev->target->sbp); + SBP_LOCK_ASSERT(sdev->target->sbp); STAILQ_INSERT_TAIL(&sdev->target->xferlist, xfer, link); - SBP_UNLOCK(sdev->target->sbp); - splx(s); } static void @@ -937,11 +925,13 @@ sbp_reset_start_callback(struct fw_xfer "%s: %s failed: resp=%d\n", __func__, sdev->bustgtlun, xfer->resp); } + SBP_LOCK(target->sbp); for (i = 0; i < target->num_lun; i++) { tsdev = target->luns[i]; if (tsdev != NULL && tsdev->status == SBP_DEV_LOGIN) sbp_login(tsdev); } + SBP_UNLOCK(target->sbp); } static void @@ -977,8 +967,9 @@ SBP_DEBUG(1) "%s:%s\n", __func__, sdev->bustgtlun); END_DEBUG resp = xfer->resp; + SBP_LOCK(sdev->target->sbp); sbp_xfer_free(xfer); - return; + SBP_UNLOCK(sdev->target->sbp); } static struct sbp_dev * @@ -1003,6 +994,7 @@ sbp_cam_scan_lun(struct cam_periph *peri sdev = (struct sbp_dev *) ccb->ccb_h.ccb_sdev_ptr; target = sdev->target; + SBP_LOCK_ASSERT(target->sbp); SBP_DEBUG(0) device_printf(sdev->target->sbp->fd.dev, "%s:%s\n", __func__, sdev->bustgtlun); @@ -1033,6 +1025,7 @@ sbp_cam_scan_target(void *arg) struct sbp_dev *sdev; union ccb *ccb; + SBP_LOCK_ASSERT(target->sbp); sdev = sbp_next_dev(target, 0); if (sdev == NULL) { printf("sbp_cam_scan_target: nothing to do for target%d\n", @@ -1056,11 +1049,9 @@ END_DEBUG ccb->ccb_h.ccb_sdev_ptr = sdev; /* The scan is in progress now. */ - SBP_LOCK(target->sbp); xpt_action(ccb); xpt_release_devq(sdev->path, sdev->freeze, TRUE); sdev->freeze = 1; - SBP_UNLOCK(target->sbp); } static __inline void @@ -1081,6 +1072,7 @@ sbp_do_attach(struct fw_xfer *xfer) sdev = (struct sbp_dev *)xfer->sc; target = sdev->target; sbp = target->sbp; + SBP_LOCK(sbp); SBP_DEBUG(0) device_printf(sdev->target->sbp->fd.dev, "%s:%s\n", __func__, sdev->bustgtlun); @@ -1095,15 +1087,16 @@ END_DEBUG /* * Let CAM scan the bus if we are in the boot process. * XXX xpt_scan_bus cannot detect LUN larger than 0 - * if LUN 0 doesn't exists. + * if LUN 0 doesn't exist. */ if (sbp_cold > 0) { sdev->status = SBP_DEV_ATTACHED; + SBP_UNLOCK(sbp); return; } sbp_scan_dev(sdev); - return; + SBP_UNLOCK(sbp); } static void @@ -1121,13 +1114,13 @@ END_DEBUG "%s:%s resp=%d\n", __func__, sdev->bustgtlun, xfer->resp); } + SBP_LOCK(sdev->target->sbp); sbp_xfer_free(xfer); if (sdev->path) { - SBP_LOCK(sdev->target->sbp); xpt_release_devq(sdev->path, sdev->freeze, TRUE); sdev->freeze = 0; - SBP_UNLOCK(sdev->target->sbp); } + SBP_UNLOCK(sdev->target->sbp); } static void @@ -1136,6 +1129,7 @@ sbp_agent_reset(struct sbp_dev *sdev) struct fw_xfer *xfer; struct fw_pkt *fp; + SBP_LOCK_ASSERT(sdev->target->sbp); SBP_DEBUG(0) device_printf(sdev->target->sbp->fd.dev, "%s:%s\n", __func__, sdev->bustgtlun); @@ -1163,8 +1157,10 @@ SBP_DEBUG(1) device_printf(sdev->target->sbp->fd.dev, "%s:%s\n", __func__, sdev->bustgtlun); END_DEBUG + SBP_LOCK(sdev->target->sbp); sbp_xfer_free(xfer); sbp_agent_reset(sdev); + SBP_UNLOCK(sdev->target->sbp); } static void @@ -1200,9 +1196,9 @@ END_DEBUG /* XXX */ printf("%s: xfer->resp = %d\n", __func__, xfer->resp); } + SBP_LOCK(sdev->target->sbp); sbp_xfer_free(xfer); - SBP_LOCK(sdev->target->sbp); sdev->flags &= ~ORB_POINTER_ACTIVE; if ((sdev->flags & ORB_POINTER_NEED) != 0) { @@ -1229,7 +1225,7 @@ SBP_DEBUG(1) (uint32_t)ocb->bus_addr); END_DEBUG - mtx_assert(&sdev->target->sbp->mtx, MA_OWNED); + SBP_LOCK_ASSERT(sdev->target->sbp); if ((sdev->flags & ORB_POINTER_ACTIVE) != 0) { SBP_DEBUG(0) @@ -1240,7 +1236,7 @@ END_DEBUG } sdev->flags |= ORB_POINTER_ACTIVE; - xfer = sbp_write_cmd_locked(sdev, FWTCODE_WREQB, 0x08); + xfer = sbp_write_cmd(sdev, FWTCODE_WREQB, 0x08); if (xfer == NULL) return; xfer->hand = sbp_orb_pointer_callback; @@ -1252,18 +1248,11 @@ END_DEBUG htonl(((sdev->target->sbp->fd.fc->nodeid | FWLOCALBUS )<< 16)); xfer->send.payload[1] = htonl((uint32_t)ocb->bus_addr); - /* - * sbp_xfer_free() will attempt to acquire - * the SBP lock on entrance. Also, this removes - * a LOR between the firewire layer and sbp - */ - SBP_UNLOCK(sdev->target->sbp); - if(fw_asyreq(xfer->fc, -1, xfer) != 0){ - sbp_xfer_free(xfer); - ocb->ccb->ccb_h.status = CAM_REQ_INVALID; - xpt_done(ocb->ccb); + if (fw_asyreq(xfer->fc, -1, xfer) != 0) { + sbp_xfer_free(xfer); + ocb->ccb->ccb_h.status = CAM_REQ_INVALID; + xpt_done(ocb->ccb); } - SBP_LOCK(sdev->target->sbp); } static void @@ -1281,15 +1270,14 @@ END_DEBUG device_printf(sdev->target->sbp->fd.dev, "%s: xfer->resp = %d\n", __func__, xfer->resp); } + SBP_LOCK(sdev->target->sbp); sbp_xfer_free(xfer); sdev->flags &= ~ORB_DOORBELL_ACTIVE; if ((sdev->flags & ORB_DOORBELL_NEED) != 0) { sdev->flags &= ~ORB_DOORBELL_NEED; - SBP_LOCK(sdev->target->sbp); sbp_doorbell(sdev); - SBP_UNLOCK(sdev->target->sbp); } - return; + SBP_UNLOCK(sdev->target->sbp); } static void @@ -1307,7 +1295,7 @@ END_DEBUG return; } sdev->flags |= ORB_DOORBELL_ACTIVE; - xfer = sbp_write_cmd_locked(sdev, FWTCODE_WREQQ, 0x10); + xfer = sbp_write_cmd(sdev, FWTCODE_WREQQ, 0x10); if (xfer == NULL) return; xfer->hand = sbp_doorbell_callback; @@ -1317,28 +1305,25 @@ END_DEBUG } static struct fw_xfer * -sbp_write_cmd_locked(struct sbp_dev *sdev, int tcode, int offset) +sbp_write_cmd(struct sbp_dev *sdev, int tcode, int offset) { struct fw_xfer *xfer; struct fw_pkt *fp; struct sbp_target *target; - int s, new = 0; + int new = 0; - mtx_assert(&sdev->target->sbp->mtx, MA_OWNED); + SBP_LOCK_ASSERT(sdev->target->sbp); target = sdev->target; - s = splfw(); xfer = STAILQ_FIRST(&target->xferlist); if (xfer == NULL) { if (target->n_xfer > 5 /* XXX */) { printf("sbp: no more xfer for this target\n"); - splx(s); return(NULL); } xfer = fw_xfer_alloc_buf(M_SBP, 8, 0); if(xfer == NULL){ printf("sbp: fw_xfer_alloc_buf failed\n"); - splx(s); return NULL; } target->n_xfer ++; @@ -1348,7 +1333,6 @@ sbp_write_cmd_locked(struct sbp_dev *sde } else { STAILQ_REMOVE_HEAD(&target->xferlist, link); } - splx(s); if (new) { xfer->recv.pay_len = 0; @@ -1371,20 +1355,6 @@ sbp_write_cmd_locked(struct sbp_dev *sde fp->mode.wreqq.dst = FWLOCALBUS | sdev->target->fwdev->dst; return xfer; - -} - -static struct fw_xfer * -sbp_write_cmd(struct sbp_dev *sdev, int tcode, int offset) -{ - struct sbp_softc *sbp = sdev->target->sbp; - struct fw_xfer *xfer; - - SBP_LOCK(sbp); - xfer = sbp_write_cmd_locked(sdev, tcode, offset); - SBP_UNLOCK(sbp); - - return (xfer); } static void @@ -1394,31 +1364,24 @@ sbp_mgm_orb(struct sbp_dev *sdev, int fu struct fw_pkt *fp; struct sbp_ocb *ocb; struct sbp_target *target; - int s, nid; + int nid; target = sdev->target; nid = target->sbp->fd.fc->nodeid | FWLOCALBUS; - s = splfw(); - SBP_LOCK(target->sbp); + SBP_LOCK_ASSERT(target->sbp); if (func == ORB_FUN_RUNQUEUE) { ocb = STAILQ_FIRST(&target->mgm_ocb_queue); if (target->mgm_ocb_cur != NULL || ocb == NULL) { - SBP_UNLOCK(target->sbp); - splx(s); return; } STAILQ_REMOVE_HEAD(&target->mgm_ocb_queue, ocb); - SBP_UNLOCK(target->sbp); goto start; } if ((ocb = sbp_get_ocb(sdev)) == NULL) { - SBP_UNLOCK(target->sbp); - splx(s); /* XXX */ return; } - SBP_UNLOCK(target->sbp); ocb->flags = OCB_ACT_MGM; ocb->sdev = sdev; @@ -1458,15 +1421,11 @@ END_DEBUG if (target->mgm_ocb_cur != NULL) { /* there is a standing ORB */ - SBP_LOCK(target->sbp); STAILQ_INSERT_TAIL(&sdev->target->mgm_ocb_queue, ocb, ocb); - SBP_UNLOCK(target->sbp); - splx(s); return; } start: target->mgm_ocb_cur = ocb; - splx(s); callout_reset(&target->mgm_ocb_timeout, 5*hz, sbp_mgm_timeout, (caddr_t)ocb); @@ -1676,6 +1635,7 @@ printf("sbp %08x %08x %08x %08x\n", ntoh printf("sbp %08x %08x %08x %08x\n", ntohl(ld[8]), ntohl(ld[9]), ntohl(ld[10]), ntohl(ld[11])); */ sbp = (struct sbp_softc *)xfer->sc; + SBP_LOCK_ASSERT(sbp); if (xfer->resp != 0){ printf("sbp_recv: xfer->resp = %d\n", xfer->resp); goto done0; @@ -1795,10 +1755,8 @@ END_DEBUG /* we have to reset the fetch agent if it's dead */ if (sbp_status->dead) { if (sdev->path) { - SBP_LOCK(sbp); xpt_freeze_devq(sdev->path, 1); sdev->freeze ++; - SBP_UNLOCK(sbp); } reset_agent = 1; } @@ -1903,9 +1861,7 @@ END_DEBUG /* fix up inq data */ if (ccb->csio.cdb_io.cdb_bytes[0] == INQUIRY) sbp_fix_inq_data(ocb); - SBP_LOCK(sbp); xpt_done(ccb); - SBP_UNLOCK(sbp); } break; default: @@ -1944,22 +1900,19 @@ done0: fw_asyreq(xfer->fc, -1, xfer); #else /* recycle */ - /* we don't need a lock here because bottom half is serialized */ STAILQ_INSERT_TAIL(&sbp->fwb.xferlist, xfer, link); #endif - - return; - } static void sbp_recv(struct fw_xfer *xfer) { - int s; + struct sbp_softc *sbp; - s = splcam(); + sbp = (struct sbp_softc *)xfer->sc; + SBP_LOCK(sbp); sbp_recv1(xfer); - splx(s); + SBP_UNLOCK(sbp); } /* * sbp_attach() @@ -1970,7 +1923,7 @@ sbp_attach(device_t dev) struct sbp_softc *sbp; struct cam_devq *devq; struct firewire_comm *fc; - int i, s, error; + int i, error; if (DFLTPHYS > SBP_MAXPHYS) device_printf(dev, "Warning, DFLTPHYS(%dKB) is larger than " @@ -1986,8 +1939,7 @@ END_DEBUG if (cold) sbp_cold ++; - sbp = ((struct sbp_softc *)device_get_softc(dev)); - bzero(sbp, sizeof(struct sbp_softc)); + sbp = device_get_softc(dev); sbp->fd.dev = dev; sbp->fd.fc = fc = device_get_ivars(dev); mtx_init(&sbp->mtx, "sbp", NULL, MTX_DEF); @@ -2063,10 +2015,8 @@ END_DEBUG sbp->fd.post_explore = sbp_post_explore; if (fc->status != -1) { - s = splfw(); sbp_post_busreset((void *)sbp); sbp_post_explore((void *)sbp); - splx(s); } SBP_LOCK(sbp); xpt_async(AC_BUS_RESET, sbp->path, /*arg*/ NULL); @@ -2089,6 +2039,7 @@ sbp_logout_all(struct sbp_softc *sbp) SBP_DEBUG(0) printf("sbp_logout_all\n"); END_DEBUG + SBP_LOCK_ASSERT(sbp); for (i = 0 ; i < SBP_NUM_TARGETS ; i ++) { target = &sbp->targets[i]; if (target->luns == NULL) @@ -2112,23 +2063,30 @@ sbp_shutdown(device_t dev) { struct sbp_softc *sbp = ((struct sbp_softc *)device_get_softc(dev)); + SBP_LOCK(sbp); sbp_logout_all(sbp); + SBP_UNLOCK(sbp); return (0); } static void sbp_free_sdev(struct sbp_dev *sdev) { + struct sbp_softc *sbp; int i; if (sdev == NULL) return; - for (i = 0; i < SBP_QUEUE_LEN; i++) - bus_dmamap_destroy(sdev->target->sbp->dmat, - sdev->ocb[i].dmamap); - fwdma_free(sdev->target->sbp->fd.fc, &sdev->dma); + sbp = sdev->target->sbp; + SBP_UNLOCK(sbp); + callout_drain(&sdev->login_callout); + for (i = 0; i < SBP_QUEUE_LEN; i++) { + callout_drain(&sdev->ocb[i].timer); + bus_dmamap_destroy(sbp->dmat, sdev->ocb[i].dmamap); + } + fwdma_free(sbp->fd.fc, &sdev->dma); free(sdev, M_SBP); - sdev = NULL; + SBP_LOCK(sbp); } static void @@ -2140,14 +2098,16 @@ sbp_free_target(struct sbp_target *targe if (target->luns == NULL) return; - callout_stop(&target->mgm_ocb_timeout); sbp = target->sbp; + SBP_LOCK_ASSERT(sbp); + SBP_UNLOCK(sbp); + callout_drain(&target->mgm_ocb_timeout); + callout_drain(&target->scan_callout); + SBP_LOCK(sbp); for (i = 0; i < target->num_lun; i++) sbp_free_sdev(target->luns[i]); - for (xfer = STAILQ_FIRST(&target->xferlist); - xfer != NULL; xfer = next) { - next = STAILQ_NEXT(xfer, link); + STAILQ_FOREACH_SAFE(xfer, &target->xferlist, link, next) { fw_xfer_free_buf(xfer); } STAILQ_INIT(&target->xferlist); @@ -2168,23 +2128,25 @@ SBP_DEBUG(0) printf("sbp_detach\n"); END_DEBUG + SBP_LOCK(sbp); for (i = 0; i < SBP_NUM_TARGETS; i ++) sbp_cam_detach_target(&sbp->targets[i]); - SBP_LOCK(sbp); xpt_async(AC_LOST_DEVICE, sbp->path, NULL); xpt_free_path(sbp->path); xpt_bus_deregister(cam_sim_path(sbp->sim)); cam_sim_free(sbp->sim, /*free_devq*/ TRUE); - SBP_UNLOCK(sbp); sbp_logout_all(sbp); + SBP_UNLOCK(sbp); /* XXX wait for logout completion */ pause("sbpdtc", hz/2); + SBP_LOCK(sbp); for (i = 0 ; i < SBP_NUM_TARGETS ; i ++) sbp_free_target(&sbp->targets[i]); + SBP_UNLOCK(sbp); fw_bindremove(fc, &sbp->fwb); fw_xferlist_remove(&sbp->fwb.xferlist); @@ -2204,16 +2166,15 @@ sbp_cam_detach_sdev(struct sbp_dev *sdev return; if (sdev->status == SBP_DEV_RESET) return; + SBP_LOCK_ASSERT(sdev->target->sbp); sbp_abort_all_ocbs(sdev, CAM_DEV_NOT_THERE); if (sdev->path) { - SBP_LOCK(sdev->target->sbp); xpt_release_devq(sdev->path, sdev->freeze, TRUE); sdev->freeze = 0; xpt_async(AC_LOST_DEVICE, sdev->path, NULL); xpt_free_path(sdev->path); sdev->path = NULL; - SBP_UNLOCK(sdev->target->sbp); } } @@ -2222,6 +2183,7 @@ sbp_cam_detach_target(struct sbp_target { int i; + SBP_LOCK_ASSERT(target->sbp); if (target->luns != NULL) { SBP_DEBUG(0) printf("sbp_detach_target %d\n", target->target_id); @@ -2239,6 +2201,7 @@ sbp_target_reset(struct sbp_dev *sdev, i struct sbp_target *target = sdev->target; struct sbp_dev *tsdev; + SBP_LOCK_ASSERT(target->sbp); for (i = 0; i < target->num_lun; i++) { tsdev = target->luns[i]; if (tsdev == NULL) @@ -2247,10 +2210,8 @@ sbp_target_reset(struct sbp_dev *sdev, i continue; if (tsdev->status == SBP_DEV_RESET) continue; - SBP_LOCK(target->sbp); xpt_freeze_devq(tsdev->path, 1); tsdev->freeze ++; - SBP_UNLOCK(target->sbp); sbp_abort_all_ocbs(tsdev, CAM_CMD_TIMEOUT); if (method == 2) tsdev->status = SBP_DEV_LOGIN; @@ -2275,6 +2236,7 @@ sbp_mgm_timeout(void *arg) struct sbp_dev *sdev = ocb->sdev; struct sbp_target *target = sdev->target; + SBP_LOCK_ASSERT(target->sbp); device_printf(sdev->target->sbp->fd.dev, "%s:%s request timeout(mgm orb:0x%08x)\n", __func__, sdev->bustgtlun, (uint32_t)ocb->bus_addr); @@ -2301,14 +2263,13 @@ sbp_timeout(void *arg) "%s:%s request timeout(cmd orb:0x%08x) ... ", __func__, sdev->bustgtlun, (uint32_t)ocb->bus_addr); + SBP_LOCK_ASSERT(sdev->target->sbp); sdev->timeout ++; switch(sdev->timeout) { case 1: printf("agent reset\n"); - SBP_LOCK(sdev->target->sbp); xpt_freeze_devq(sdev->path, 1); sdev->freeze ++; - SBP_UNLOCK(sdev->target->sbp); sbp_abort_all_ocbs(sdev, CAM_CMD_TIMEOUT); sbp_agent_reset(sdev); break; @@ -2330,13 +2291,15 @@ sbp_timeout(void *arg) } static void -sbp_action1(struct cam_sim *sim, union ccb *ccb) +sbp_action(struct cam_sim *sim, union ccb *ccb) { struct sbp_softc *sbp = (struct sbp_softc *)sim->softc; struct sbp_target *target = NULL; struct sbp_dev *sdev = NULL; + if (sbp != NULL) + SBP_LOCK_ASSERT(sbp); /* target:lun -> sdev mapping */ if (sbp != NULL && ccb->ccb_h.target_id != CAM_TARGET_WILDCARD @@ -2456,10 +2419,8 @@ END_DEBUG if ((ocb = sbp_get_ocb(sdev)) == NULL) { ccb->ccb_h.status = CAM_RESRC_UNAVAIL; if (sdev->freeze == 0) { - SBP_LOCK(sdev->target->sbp); xpt_freeze_devq(sdev->path, 1); sdev->freeze ++; - SBP_UNLOCK(sdev->target->sbp); } xpt_done(ccb); return; @@ -2515,7 +2476,7 @@ printf("ORB %08x %08x %08x %08x\n", ntoh ccg = &ccb->ccg; if (ccg->block_size == 0) { - printf("sbp_action1: block_size is 0.\n"); + printf("sbp_action: block_size is 0.\n"); ccb->ccb_h.status = CAM_REQ_INVALID; xpt_done(ccb); break; @@ -2640,16 +2601,6 @@ END_DEBUG } static void -sbp_action(struct cam_sim *sim, union ccb *ccb) -{ - int s; - - s = splfw(); - sbp_action1(sim, ccb); - splx(s); -} - -static void sbp_execute_ocb(void *arg, bus_dma_segment_t *segments, int seg, int error) { int i; @@ -2744,7 +2695,7 @@ sbp_dequeue_ocb(struct sbp_dev *sdev, st { struct sbp_ocb *ocb; struct sbp_ocb *next; - int s = splfw(), order = 0; + int order = 0; SBP_DEBUG(1) device_printf(sdev->target->sbp->fd.dev, @@ -2755,15 +2706,13 @@ SBP_DEBUG(1) #endif __func__, sdev->bustgtlun, ntohl(sbp_status->orb_lo), sbp_status->src); END_DEBUG - SBP_LOCK(sdev->target->sbp); - for (ocb = STAILQ_FIRST(&sdev->ocbs); ocb != NULL; ocb = next) { - next = STAILQ_NEXT(ocb, ocb); + SBP_LOCK_ASSERT(sdev->target->sbp); + STAILQ_FOREACH_SAFE(ocb, &sdev->ocbs, ocb, next) { if (OCB_MATCH(ocb, sbp_status)) { /* found */ STAILQ_REMOVE(&sdev->ocbs, ocb, sbp_ocb, ocb); if (ocb->ccb != NULL) - untimeout(sbp_timeout, (caddr_t)ocb, - ocb->timeout_ch); + callout_stop(&ocb->timer); if (ntohl(ocb->orb[4]) & 0xffff) { bus_dmamap_sync(sdev->target->sbp->dmat, ocb->dmamap, @@ -2792,9 +2741,7 @@ END_DEBUG * execution. */ if (sdev->last_ocb != NULL) { - SBP_UNLOCK(sdev->target->sbp); sbp_free_ocb(sdev, sdev->last_ocb); - SBP_LOCK(sdev->target->sbp); } sdev->last_ocb = ocb; if (next != NULL && @@ -2805,8 +2752,6 @@ END_DEBUG } else order ++; } - SBP_UNLOCK(sdev->target->sbp); - splx(s); SBP_DEBUG(0) if (ocb && order > 0) { device_printf(sdev->target->sbp->fd.dev, @@ -2820,10 +2765,9 @@ END_DEBUG static struct sbp_ocb * sbp_enqueue_ocb(struct sbp_dev *sdev, struct sbp_ocb *ocb) { - int s = splfw(); struct sbp_ocb *prev, *prev2; - mtx_assert(&sdev->target->sbp->mtx, MA_OWNED); + SBP_LOCK_ASSERT(sdev->target->sbp); SBP_DEBUG(1) device_printf(sdev->target->sbp->fd.dev, #if defined(__DragonFly__) || __FreeBSD_version < 500000 @@ -2836,8 +2780,8 @@ END_DEBUG STAILQ_INSERT_TAIL(&sdev->ocbs, ocb, ocb); if (ocb->ccb != NULL) - ocb->timeout_ch = timeout(sbp_timeout, (caddr_t)ocb, - (ocb->ccb->ccb_h.timeout * hz) / 1000); + callout_reset(&ocb->timer, (ocb->ccb->ccb_h.timeout * hz) / 1000, + sbp_timeout, ocb); if (use_doorbell && prev == NULL) prev2 = sdev->last_ocb; @@ -2860,7 +2804,6 @@ END_DEBUG *(volatile uint32_t *)&prev2->orb[1] = htonl(ocb->bus_addr); *(volatile uint32_t *)&prev2->orb[0] = 0; } - splx(s); return prev; } @@ -2869,18 +2812,15 @@ static struct sbp_ocb * sbp_get_ocb(struct sbp_dev *sdev) { struct sbp_ocb *ocb; - int s = splfw(); - mtx_assert(&sdev->target->sbp->mtx, MA_OWNED); + SBP_LOCK_ASSERT(sdev->target->sbp); ocb = STAILQ_FIRST(&sdev->free_ocbs); if (ocb == NULL) { sdev->flags |= ORB_SHORTAGE; printf("ocb shortage!!!\n"); - splx(s); return NULL; } STAILQ_REMOVE_HEAD(&sdev->free_ocbs, ocb); - splx(s); ocb->ccb = NULL; return (ocb); } @@ -2891,7 +2831,7 @@ sbp_free_ocb(struct sbp_dev *sdev, struc ocb->flags = 0; ocb->ccb = NULL; - SBP_LOCK(sdev->target->sbp); + SBP_LOCK_ASSERT(sdev->target->sbp); STAILQ_INSERT_TAIL(&sdev->free_ocbs, ocb, ocb); if ((sdev->flags & ORB_SHORTAGE) != 0) { int count; @@ -2901,7 +2841,6 @@ sbp_free_ocb(struct sbp_dev *sdev, struc sdev->freeze = 0; xpt_release_devq(sdev->path, count, TRUE); } - SBP_UNLOCK(sdev->target->sbp); } static void @@ -2910,6 +2849,7 @@ sbp_abort_ocb(struct sbp_ocb *ocb, int s struct sbp_dev *sdev; sdev = ocb->sdev; + SBP_LOCK_ASSERT(sdev->target->sbp); SBP_DEBUG(0) device_printf(sdev->target->sbp->fd.dev, #if defined(__DragonFly__) || __FreeBSD_version < 500000 @@ -2929,12 +2869,9 @@ END_DEBUG bus_dmamap_unload(sdev->target->sbp->dmat, ocb->dmamap); } if (ocb->ccb != NULL) { - untimeout(sbp_timeout, (caddr_t)ocb, - ocb->timeout_ch); + callout_stop(&ocb->timer); ocb->ccb->ccb_h.status = status; - SBP_LOCK(sdev->target->sbp); xpt_done(ocb->ccb); - SBP_UNLOCK(sdev->target->sbp); } sbp_free_ocb(sdev, ocb); } @@ -2942,28 +2879,21 @@ END_DEBUG static void sbp_abort_all_ocbs(struct sbp_dev *sdev, int status) { - int s; struct sbp_ocb *ocb, *next; STAILQ_HEAD(, sbp_ocb) temp; - s = splfw(); - STAILQ_INIT(&temp); - SBP_LOCK(sdev->target->sbp); + SBP_LOCK_ASSERT(sdev->target->sbp); STAILQ_CONCAT(&temp, &sdev->ocbs); STAILQ_INIT(&sdev->ocbs); - SBP_UNLOCK(sdev->target->sbp); - for (ocb = STAILQ_FIRST(&temp); ocb != NULL; ocb = next) { - next = STAILQ_NEXT(ocb, ocb); + STAILQ_FOREACH_SAFE(ocb, &temp, ocb, next) { sbp_abort_ocb(ocb, status); } if (sdev->last_ocb != NULL) { sbp_free_ocb(sdev, sdev->last_ocb); sdev->last_ocb = NULL; } - - splx(s); } static devclass_t sbp_devclass; From owner-svn-src-all@FreeBSD.ORG Sun Dec 21 02:52:42 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 42DE39EB; Sun, 21 Dec 2014 02:52:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 235362257; Sun, 21 Dec 2014 02:52:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBL2qgjd023116; Sun, 21 Dec 2014 02:52:42 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBL2qffR023113; Sun, 21 Dec 2014 02:52:41 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201412210252.sBL2qffR023113@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Sun, 21 Dec 2014 02:52:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r275979 - stable/10/sys/dev/hpt27xx X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2014 02:52:42 -0000 Author: smh Date: Sun Dec 21 02:52:40 2014 New Revision: 275979 URL: https://svnweb.freebsd.org/changeset/base/275979 Log: MFC r267290: Make the hpt27xx(4) driver MPSAFE Sponsored by: Multiplay Modified: stable/10/sys/dev/hpt27xx/hpt27xx_os_bsd.c stable/10/sys/dev/hpt27xx/hpt27xx_osm_bsd.c stable/10/sys/dev/hpt27xx/os_bsd.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/hpt27xx/hpt27xx_os_bsd.c ============================================================================== --- stable/10/sys/dev/hpt27xx/hpt27xx_os_bsd.c Sun Dec 21 02:47:38 2014 (r275978) +++ stable/10/sys/dev/hpt27xx/hpt27xx_os_bsd.c Sun Dec 21 02:52:40 2014 (r275979) @@ -288,9 +288,9 @@ void os_request_timer(void * osext, HPT PVBUS_EXT vbus_ext = osext; HPT_ASSERT(vbus_ext->ext_type==EXT_TYPE_VBUS); - - untimeout(os_timer_for_ldm, vbus_ext, vbus_ext->timer); - vbus_ext->timer = timeout(os_timer_for_ldm, vbus_ext, interval * hz / 1000000); + + callout_reset(&vbus_ext->timer, interval * hz / 1000000, + os_timer_for_ldm, vbus_ext); } HPT_TIME os_query_time(void) Modified: stable/10/sys/dev/hpt27xx/hpt27xx_osm_bsd.c ============================================================================== --- stable/10/sys/dev/hpt27xx/hpt27xx_osm_bsd.c Sun Dec 21 02:47:38 2014 (r275978) +++ stable/10/sys/dev/hpt27xx/hpt27xx_osm_bsd.c Sun Dec 21 02:52:40 2014 (r275979) @@ -31,12 +31,11 @@ #include #include -static int hpt_probe(device_t dev) +static HIM *hpt_match(device_t dev) { PCI_ID pci_id; HIM *him; int i; - PHBA hba; for (him = him_list; him; him = him->next) { for (i=0; him->get_supported_device_id(i, &pci_id); i++) { @@ -44,18 +43,25 @@ static int hpt_probe(device_t dev) him->get_controller_count(&pci_id,0,0); if ((pci_get_vendor(dev) == pci_id.vid) && (pci_get_device(dev) == pci_id.did)){ - KdPrint(("hpt_probe: adapter at PCI %d:%d:%d, IRQ %d", - pci_get_bus(dev), pci_get_slot(dev), pci_get_function(dev), pci_get_irq(dev) - )); - device_set_desc(dev, him->name); - hba = (PHBA)device_get_softc(dev); - memset(hba, 0, sizeof(HBA)); - hba->ext_type = EXT_TYPE_HBA; - hba->ldm_adapter.him = him; - return (BUS_PROBE_DEFAULT); + return (him); } } } + return (NULL); +} + +static int hpt_probe(device_t dev) +{ + HIM *him; + + him = hpt_match(dev); + if (him != NULL) { + KdPrint(("hpt_probe: adapter at PCI %d:%d:%d, IRQ %d", + pci_get_bus(dev), pci_get_slot(dev), pci_get_function(dev), pci_get_irq(dev) + )); + device_set_desc(dev, him->name); + return (BUS_PROBE_DEFAULT); + } return (ENXIO); } @@ -63,14 +69,17 @@ static int hpt_probe(device_t dev) static int hpt_attach(device_t dev) { PHBA hba = (PHBA)device_get_softc(dev); - HIM *him = hba->ldm_adapter.him; + HIM *him; PCI_ID pci_id; HPT_UINT size; PVBUS vbus; PVBUS_EXT vbus_ext; KdPrint(("hpt_attach(%d/%d/%d)", pci_get_bus(dev), pci_get_slot(dev), pci_get_function(dev))); - + + him = hpt_match(dev); + hba->ext_type = EXT_TYPE_HBA; + hba->ldm_adapter.him = him; #if __FreeBSD_version >=440000 pci_enable_busmaster(dev); #endif @@ -93,7 +102,7 @@ static int hpt_attach(device_t dev) if (!him->create_adapter(&pci_id, hba->pciaddr, hba->ldm_adapter.him_handle, hba)) { free(hba->ldm_adapter.him_handle, M_DEVBUF); - return -1; + return ENXIO; } os_printk("adapter at PCI %d:%d:%d, IRQ %d", @@ -104,7 +113,7 @@ static int hpt_attach(device_t dev) vbus_ext = malloc(sizeof(VBUS_EXT) + size, M_DEVBUF, M_WAITOK); if (!vbus_ext) { free(hba->ldm_adapter.him_handle, M_DEVBUF); - return -1; + return ENXIO; } memset(vbus_ext, 0, sizeof(VBUS_EXT)); vbus_ext->ext_type = EXT_TYPE_VBUS; @@ -119,7 +128,7 @@ static int hpt_attach(device_t dev) vbus_ext->hba_list = hba; break; } - } + } return 0; } @@ -431,8 +440,8 @@ static void os_cmddone(PCOMMAND pCmd) union ccb *ccb = ext->ccb; KdPrint(("os_cmddone(%p, %d)", pCmd, pCmd->Result)); - - untimeout(hpt_timeout, pCmd, ext->timeout_ch); + + callout_stop(&ext->timeout); switch(pCmd->Result) { case RETURN_SUCCESS: @@ -520,7 +529,7 @@ static void hpt_io_dmamap_callback(void BUS_DMASYNC_PREWRITE); } } - ext->timeout_ch = timeout(hpt_timeout, pCmd, HPT_OSM_TIMEOUT); + callout_reset(&ext->timeout, HPT_OSM_TIMEOUT, hpt_timeout, pCmd); ldm_queue_cmd(pCmd); } @@ -737,18 +746,15 @@ static void hpt_action(struct cam_sim *s KdPrint(("hpt_action(fn=%d, id=%d)", ccb->ccb_h.func_code, ccb->ccb_h.target_id)); + hpt_assert_vbus_locked(vbus_ext); switch (ccb->ccb_h.func_code) { case XPT_SCSI_IO: - hpt_lock_vbus(vbus_ext); hpt_scsi_io(vbus_ext, ccb); - hpt_unlock_vbus(vbus_ext); return; case XPT_RESET_BUS: - hpt_lock_vbus(vbus_ext); ldm_reset_vbus((PVBUS)vbus_ext->vbus); - hpt_unlock_vbus(vbus_ext); break; case XPT_GET_TRAN_SETTINGS: @@ -811,7 +817,10 @@ static void hpt_pci_intr(void *arg) static void hpt_poll(struct cam_sim *sim) { - hpt_pci_intr(cam_sim_softc(sim)); + PVBUS_EXT vbus_ext = (PVBUS_EXT)cam_sim_softc(sim); + + hpt_assert_vbus_locked(vbus_ext); + ldm_intr((PVBUS)vbus_ext->vbus); } static void hpt_async(void * callback_arg, u_int32_t code, struct cam_path * path, void * arg) @@ -862,7 +871,7 @@ static void hpt_do_ioctl(IOCTL_ARG *ioct { PVBUS vbus; PVBUS_EXT vbus_ext; - + ldm_for_each_vbus(vbus, vbus_ext) { __hpt_do_ioctl(vbus_ext, ioctl_args); if (ioctl_args->result!=HPT_IOCTL_RESULT_WRONG_VBUS) @@ -1009,7 +1018,10 @@ static void hpt_final_init(void *dummy) /* initializing hardware */ ldm_for_each_vbus(vbus, vbus_ext) { /* make timer available here */ - callout_handle_init(&vbus_ext->timer); +#if (__FreeBSD_version >= 500000) + mtx_init(&vbus_ext->lock, "hptsleeplock", NULL, MTX_DEF); +#endif + callout_init_mtx(&vbus_ext->timer, &vbus_ext->lock, 0); if (hpt_init_vbus(vbus_ext)) { os_printk("fail to initialize hardware"); break; /* FIXME */ @@ -1021,9 +1033,6 @@ static void hpt_final_init(void *dummy) struct cam_devq *devq; struct ccb_setasync ccb; -#if (__FreeBSD_version >= 500000) - mtx_init(&vbus_ext->lock, "hptsleeplock", NULL, MTX_DEF); -#endif if (bus_dma_tag_create(NULL,/* parent */ 4, /* alignment */ BUS_SPACE_MAXADDR_32BIT+1, /* boundary */ @@ -1057,7 +1066,7 @@ static void hpt_final_init(void *dummy) os_printk("Can't create dma map(%d)", i); return ; } - callout_handle_init(&ext->timeout_ch); + callout_init_mtx(&ext->timeout, &vbus_ext->lock, 0); } if ((devq = cam_simq_alloc(os_max_queue_comm)) == NULL) { @@ -1067,7 +1076,7 @@ static void hpt_final_init(void *dummy) #if __FreeBSD_version > 700025 vbus_ext->sim = cam_sim_alloc(hpt_action, hpt_poll, driver_name, - vbus_ext, unit_number, &Giant, os_max_queue_comm, /*tagged*/8, devq); + vbus_ext, unit_number, &vbus_ext->lock, os_max_queue_comm, /*tagged*/8, devq); #else vbus_ext->sim = cam_sim_alloc(hpt_action, hpt_poll, driver_name, vbus_ext, unit_number, os_max_queue_comm, /*tagged*/8, devq); @@ -1079,11 +1088,13 @@ static void hpt_final_init(void *dummy) return ; } + hpt_lock_vbus(vbus_ext); #if __FreeBSD_version > 700044 if (xpt_bus_register(vbus_ext->sim, NULL, 0) != CAM_SUCCESS) { #else if (xpt_bus_register(vbus_ext->sim, 0) != CAM_SUCCESS) { #endif + hpt_unlock_vbus(vbus_ext); os_printk("xpt_bus_register failed"); cam_sim_free(vbus_ext->sim, /*free devq*/ TRUE); vbus_ext->sim = NULL; @@ -1094,6 +1105,7 @@ static void hpt_final_init(void *dummy) cam_sim_path(vbus_ext->sim), CAM_TARGET_WILDCARD, CAM_LUN_WILDCARD) != CAM_REQ_CMP) { + hpt_unlock_vbus(vbus_ext); os_printk("xpt_create_path failed"); xpt_bus_deregister(cam_sim_path(vbus_ext->sim)); cam_sim_free(vbus_ext->sim, /*free_devq*/TRUE); @@ -1107,6 +1119,7 @@ static void hpt_final_init(void *dummy) ccb.callback = hpt_async; ccb.callback_arg = vbus_ext; xpt_action((union ccb *)&ccb); + hpt_unlock_vbus(vbus_ext); for (hba = vbus_ext->hba_list; hba; hba = hba->next) { int rid = 0; @@ -1117,7 +1130,7 @@ static void hpt_final_init(void *dummy) return ; } - if (bus_setup_intr(hba->pcidev, hba->irq_res, INTR_TYPE_CAM, + if (bus_setup_intr(hba->pcidev, hba->irq_res, INTR_TYPE_CAM | INTR_MPSAFE, #if __FreeBSD_version > 700025 NULL, hpt_pci_intr, vbus_ext, &hba->irq_handle)) #else @@ -1300,16 +1313,8 @@ static int hpt_ioctl(ioctl_dev_t dev, u_ goto invalid; } -#if (__FreeBSD_version >= 500000) - mtx_lock(&Giant); -#endif - hpt_do_ioctl(&ioctl_args); -#if (__FreeBSD_version >= 500000) - mtx_unlock(&Giant); -#endif - if (ioctl_args.result==HPT_IOCTL_RESULT_OK) { if (piop->nOutBufferSize) { if (copyout(ioctl_args.lpOutBuffer, @@ -1350,8 +1355,6 @@ static int hpt_rescan_bus(void) PVBUS vbus; PVBUS_EXT vbus_ext; - mtx_lock(&Giant); - ldm_for_each_vbus(vbus, vbus_ext) { if ((ccb = xpt_alloc_ccb()) == NULL) { Modified: stable/10/sys/dev/hpt27xx/os_bsd.h ============================================================================== --- stable/10/sys/dev/hpt27xx/os_bsd.h Sun Dec 21 02:47:38 2014 (r275978) +++ stable/10/sys/dev/hpt27xx/os_bsd.h Sun Dec 21 02:52:40 2014 (r275979) @@ -174,7 +174,7 @@ typedef struct _os_cmdext { struct _os_cmdext *next; union ccb *ccb; bus_dmamap_t dma_map; - struct callout_handle timeout_ch; + struct callout timeout; SG psg[os_max_sg_descriptors]; } OS_CMDEXT, *POS_CMDEXT; @@ -200,7 +200,7 @@ typedef struct _vbus_ext { OSM_TASK *tasks; struct task worker; - struct callout_handle timer; + struct callout timer; eventhandler_tag shutdown_eh; @@ -212,6 +212,7 @@ VBUS_EXT, *PVBUS_EXT; #if __FreeBSD_version >= 500000 #define hpt_lock_vbus(vbus_ext) mtx_lock(&(vbus_ext)->lock) #define hpt_unlock_vbus(vbus_ext) mtx_unlock(&(vbus_ext)->lock) +#define hpt_assert_vbus_locked(vbus_ext) mtx_assert(&(vbus_ext)->lock, MA_OWNED) #else static __inline void hpt_lock_vbus(PVBUS_EXT vbus_ext) { From owner-svn-src-all@FreeBSD.ORG Sun Dec 21 02:57:05 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1617AB9E; Sun, 21 Dec 2014 02:57:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0099A22B5; Sun, 21 Dec 2014 02:57:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBL2v4o4023707; Sun, 21 Dec 2014 02:57:04 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBL2v4si023704; Sun, 21 Dec 2014 02:57:04 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201412210257.sBL2v4si023704@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Sun, 21 Dec 2014 02:57:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r275980 - stable/10/sys/dev/hptnr X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2014 02:57:05 -0000 Author: smh Date: Sun Dec 21 02:57:03 2014 New Revision: 275980 URL: https://svnweb.freebsd.org/changeset/base/275980 Log: MFC r269613: Various fixes to hptnr(4) Sponsored by: Multiplay Modified: stable/10/sys/dev/hptnr/hptnr_os_bsd.c stable/10/sys/dev/hptnr/hptnr_osm_bsd.c stable/10/sys/dev/hptnr/os_bsd.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/hptnr/hptnr_os_bsd.c ============================================================================== --- stable/10/sys/dev/hptnr/hptnr_os_bsd.c Sun Dec 21 02:52:40 2014 (r275979) +++ stable/10/sys/dev/hptnr/hptnr_os_bsd.c Sun Dec 21 02:57:03 2014 (r275980) @@ -86,25 +86,10 @@ BUS_ADDRESS get_dmapool_phy_addr(void *o return (BUS_ADDRESS)vtophys(dmapool_virt_addr); } -#if __FreeBSD_version < 500043 -HPT_U32 pcicfg_read_dword(HPT_U8 bus, HPT_U8 dev, HPT_U8 func, HPT_U8 reg) -{ - HPT_U32 v; - pcicfgregs pciref; - - pciref.bus = bus; - pciref.slot = dev; - pciref.func = func; - - v = pci_cfgread(&pciref, reg, 4); - return v; -}/* PCI space access */ -#else HPT_U32 pcicfg_read_dword(HPT_U8 bus, HPT_U8 dev, HPT_U8 func, HPT_U8 reg) { return (HPT_U32)pci_cfgregread(bus, dev, func, reg, 4);; }/* PCI space access */ -#endif void *os_map_pci_bar( void *osext, @@ -249,9 +234,9 @@ void os_request_timer(void * osext, HPT PVBUS_EXT vbus_ext = osext; HPT_ASSERT(vbus_ext->ext_type==EXT_TYPE_VBUS); - - untimeout(os_timer_for_ldm, vbus_ext, vbus_ext->timer); - vbus_ext->timer = timeout(os_timer_for_ldm, vbus_ext, interval * hz / 1000000); + + callout_reset(&vbus_ext->timer, interval * hz / 1000000, + os_timer_for_ldm, vbus_ext); } HPT_TIME os_query_time(void) Modified: stable/10/sys/dev/hptnr/hptnr_osm_bsd.c ============================================================================== --- stable/10/sys/dev/hptnr/hptnr_osm_bsd.c Sun Dec 21 02:52:40 2014 (r275979) +++ stable/10/sys/dev/hptnr/hptnr_osm_bsd.c Sun Dec 21 02:57:03 2014 (r275980) @@ -31,12 +31,11 @@ #include #include -static int hpt_probe(device_t dev) +static HIM *hpt_match(device_t dev) { PCI_ID pci_id; HIM *him; int i; - PHBA hba; for (him = him_list; him; him = him->next) { for (i=0; him->get_supported_device_id(i, &pci_id); i++) { @@ -44,36 +43,46 @@ static int hpt_probe(device_t dev) him->get_controller_count(&pci_id,0,0); if ((pci_get_vendor(dev) == pci_id.vid) && (pci_get_device(dev) == pci_id.did)){ - KdPrint(("hpt_probe: adapter at PCI %d:%d:%d, IRQ %d", - pci_get_bus(dev), pci_get_slot(dev), pci_get_function(dev), pci_get_irq(dev) - )); - device_set_desc(dev, him->name); - hba = (PHBA)device_get_softc(dev); - memset(hba, 0, sizeof(HBA)); - hba->ext_type = EXT_TYPE_HBA; - hba->ldm_adapter.him = him; - return 0; + return (him); } } } + return (NULL); +} + +static int hpt_probe(device_t dev) +{ + HIM *him; + + him = hpt_match(dev); + if (him != NULL) { + KdPrint(("hpt_probe: adapter at PCI %d:%d:%d, IRQ %d", + pci_get_bus(dev), pci_get_slot(dev), pci_get_function(dev), pci_get_irq(dev) + )); + device_set_desc(dev, him->name); + return (BUS_PROBE_DEFAULT); + } + return (ENXIO); } static int hpt_attach(device_t dev) { PHBA hba = (PHBA)device_get_softc(dev); - HIM *him = hba->ldm_adapter.him; + HIM *him; PCI_ID pci_id; HPT_UINT size; PVBUS vbus; PVBUS_EXT vbus_ext; KdPrint(("hpt_attach(%d/%d/%d)", pci_get_bus(dev), pci_get_slot(dev), pci_get_function(dev))); - -#if __FreeBSD_version >=440000 + + him = hpt_match(dev); + hba->ext_type = EXT_TYPE_HBA; + hba->ldm_adapter.him = him; + pci_enable_busmaster(dev); -#endif pci_id.vid = pci_get_vendor(dev); pci_id.did = pci_get_device(dev); @@ -82,8 +91,6 @@ static int hpt_attach(device_t dev) size = him->get_adapter_size(&pci_id); hba->ldm_adapter.him_handle = malloc(size, M_DEVBUF, M_WAITOK); - if (!hba->ldm_adapter.him_handle) - return ENXIO; hba->pcidev = dev; hba->pciaddr.tree = 0; @@ -93,7 +100,7 @@ static int hpt_attach(device_t dev) if (!him->create_adapter(&pci_id, hba->pciaddr, hba->ldm_adapter.him_handle, hba)) { free(hba->ldm_adapter.him_handle, M_DEVBUF); - return -1; + return ENXIO; } os_printk("adapter at PCI %d:%d:%d, IRQ %d", @@ -101,12 +108,8 @@ static int hpt_attach(device_t dev) if (!ldm_register_adapter(&hba->ldm_adapter)) { size = ldm_get_vbus_size(); - vbus_ext = malloc(sizeof(VBUS_EXT) + size, M_DEVBUF, M_WAITOK); - if (!vbus_ext) { - free(hba->ldm_adapter.him_handle, M_DEVBUF); - return -1; - } - memset(vbus_ext, 0, sizeof(VBUS_EXT)); + vbus_ext = malloc(sizeof(VBUS_EXT) + size, M_DEVBUF, M_WAITOK | + M_ZERO); vbus_ext->ext_type = EXT_TYPE_VBUS; ldm_create_vbus((PVBUS)vbus_ext->vbus, vbus_ext); ldm_register_adapter(&hba->ldm_adapter); @@ -287,7 +290,7 @@ static int hpt_flush_vdev(PVBUS_EXT vbus KdPrint(("flusing dev %p", vd)); - hpt_lock_vbus(vbus_ext); + hpt_assert_vbus_locked(vbus_ext); if (mIsArray(vd->type) && vd->u.array.transform) count = MAX(vd->u.array.transform->source->cmds_per_request, @@ -298,7 +301,6 @@ static int hpt_flush_vdev(PVBUS_EXT vbus pCmd = ldm_alloc_cmds(vd->vbus, count); if (!pCmd) { - hpt_unlock_vbus(vbus_ext); return -1; } @@ -324,8 +326,6 @@ static int hpt_flush_vdev(PVBUS_EXT vbus ldm_free_cmds(pCmd); - hpt_unlock_vbus(vbus_ext); - return result; } @@ -340,6 +340,7 @@ static void hpt_shutdown_vbus(PVBUS_EXT /* stop all ctl tasks and disable the worker taskqueue */ hpt_stop_tasks(vbus_ext); + hpt_lock_vbus(vbus_ext); vbus_ext->worker.ta_context = 0; /* flush devices */ @@ -352,7 +353,6 @@ static void hpt_shutdown_vbus(PVBUS_EXT } } - hpt_lock_vbus(vbus_ext); ldm_shutdown(vbus); hpt_unlock_vbus(vbus_ext); @@ -368,6 +368,8 @@ static void hpt_shutdown_vbus(PVBUS_EXT free(hba->ldm_adapter.him_handle, M_DEVBUF); } + callout_drain(&vbus_ext->timer); + mtx_destroy(&vbus_ext->lock); free(vbus_ext, M_DEVBUF); KdPrint(("hpt_shutdown_vbus done")); } @@ -431,8 +433,8 @@ static void os_cmddone(PCOMMAND pCmd) union ccb *ccb = ext->ccb; KdPrint(("os_cmddone(%p, %d)", pCmd, pCmd->Result)); - - untimeout(hpt_timeout, pCmd, ext->timeout_ch); + + callout_stop(&ext->timeout); switch(pCmd->Result) { case RETURN_SUCCESS: @@ -511,7 +513,7 @@ static void hpt_io_dmamap_callback(void } } - ext->timeout_ch = timeout(hpt_timeout, pCmd, HPT_OSM_TIMEOUT); + callout_reset(&ext->timeout, HPT_OSM_TIMEOUT, hpt_timeout, pCmd); ldm_queue_cmd(pCmd); } @@ -728,18 +730,15 @@ static void hpt_action(struct cam_sim *s KdPrint(("hpt_action(fn=%d, id=%d)", ccb->ccb_h.func_code, ccb->ccb_h.target_id)); + hpt_assert_vbus_locked(vbus_ext); switch (ccb->ccb_h.func_code) { case XPT_SCSI_IO: - hpt_lock_vbus(vbus_ext); hpt_scsi_io(vbus_ext, ccb); - hpt_unlock_vbus(vbus_ext); return; case XPT_RESET_BUS: - hpt_lock_vbus(vbus_ext); ldm_reset_vbus((PVBUS)vbus_ext->vbus); - hpt_unlock_vbus(vbus_ext); break; case XPT_GET_TRAN_SETTINGS: @@ -773,12 +772,10 @@ static void hpt_action(struct cam_sim *s strncpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); strncpy(cpi->hba_vid, "HPT ", HBA_IDLEN); strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); -#if (__FreeBSD_version >= 800000) cpi->transport = XPORT_SPI; cpi->transport_version = 2; cpi->protocol = PROTO_SCSI; cpi->protocol_version = SCSI_REV_2; -#endif cpi->ccb_h.status = CAM_REQ_CMP; break; } @@ -802,7 +799,9 @@ static void hpt_pci_intr(void *arg) static void hpt_poll(struct cam_sim *sim) { - hpt_pci_intr(cam_sim_softc(sim)); + PVBUS_EXT vbus_ext = cam_sim_softc(sim); + hpt_assert_vbus_locked(vbus_ext); + ldm_intr((PVBUS)vbus_ext->vbus); } static void hpt_async(void * callback_arg, u_int32_t code, struct cam_path * path, void * arg) @@ -951,19 +950,7 @@ static struct cdevsw hpt_cdevsw = { .d_close = hpt_close, .d_ioctl = hpt_ioctl, .d_name = driver_name, -#if __FreeBSD_version>=503000 .d_version = D_VERSION, -#endif -#if (__FreeBSD_version>=503000 && __FreeBSD_version<600034) - .d_flags = D_NEEDGIANT, -#endif -#if __FreeBSD_version<600034 -#if __FreeBSD_version>501000 - .d_maj = MAJOR_AUTO, -#else - .d_maj = HPT_DEV_MAJOR, -#endif -#endif }; static struct intr_config_hook hpt_ich; @@ -1000,7 +987,8 @@ static void hpt_final_init(void *dummy) /* initializing hardware */ ldm_for_each_vbus(vbus, vbus_ext) { /* make timer available here */ - callout_handle_init(&vbus_ext->timer); + mtx_init(&vbus_ext->lock, "hptsleeplock", NULL, MTX_DEF); + callout_init_mtx(&vbus_ext->timer, &vbus_ext->lock, 0); if (hpt_init_vbus(vbus_ext)) { os_printk("fail to initialize hardware"); break; /* FIXME */ @@ -1012,9 +1000,6 @@ static void hpt_final_init(void *dummy) struct cam_devq *devq; struct ccb_setasync ccb; -#if (__FreeBSD_version >= 500000) - mtx_init(&vbus_ext->lock, "hptsleeplock", NULL, MTX_DEF); -#endif if (bus_dma_tag_create(NULL,/* parent */ 4, /* alignment */ BUS_SPACE_MAXADDR_32BIT+1, /* boundary */ @@ -1025,10 +1010,8 @@ static void hpt_final_init(void *dummy) os_max_sg_descriptors, /* nsegments */ 0x10000, /* maxsegsize */ BUS_DMA_WAITOK, /* flags */ -#if __FreeBSD_version>502000 busdma_lock_mutex, /* lockfunc */ &vbus_ext->lock, /* lockfuncarg */ -#endif &vbus_ext->io_dmat /* tag */)) { return ; @@ -1048,7 +1031,7 @@ static void hpt_final_init(void *dummy) os_printk("Can't create dma map(%d)", i); return ; } - callout_handle_init(&ext->timeout_ch); + callout_init_mtx(&ext->timeout, &vbus_ext->lock, 0); } if ((devq = cam_simq_alloc(os_max_queue_comm)) == NULL) { @@ -1056,25 +1039,19 @@ static void hpt_final_init(void *dummy) return ; } -#if __FreeBSD_version > 700025 - vbus_ext->sim = cam_sim_alloc(hpt_action, hpt_poll, driver_name, - vbus_ext, unit_number, &Giant, os_max_queue_comm, /*tagged*/8, devq); -#else + hpt_lock_vbus(vbus_ext); vbus_ext->sim = cam_sim_alloc(hpt_action, hpt_poll, driver_name, - vbus_ext, unit_number, os_max_queue_comm, /*tagged*/8, devq); -#endif + vbus_ext, unit_number, &vbus_ext->lock, + os_max_queue_comm, /*tagged*/8, devq); unit_number++; if (!vbus_ext->sim) { os_printk("cam_sim_alloc failed"); cam_simq_free(devq); + hpt_unlock_vbus(vbus_ext); return ; } -#if __FreeBSD_version > 700044 if (xpt_bus_register(vbus_ext->sim, NULL, 0) != CAM_SUCCESS) { -#else - if (xpt_bus_register(vbus_ext->sim, 0) != CAM_SUCCESS) { -#endif os_printk("xpt_bus_register failed"); cam_sim_free(vbus_ext->sim, /*free devq*/ TRUE); vbus_ext->sim = NULL; @@ -1088,9 +1065,11 @@ static void hpt_final_init(void *dummy) os_printk("xpt_create_path failed"); xpt_bus_deregister(cam_sim_path(vbus_ext->sim)); cam_sim_free(vbus_ext->sim, /*free_devq*/TRUE); + hpt_unlock_vbus(vbus_ext); vbus_ext->sim = NULL; return ; } + hpt_unlock_vbus(vbus_ext); xpt_setup_ccb(&ccb.ccb_h, vbus_ext->path, /*priority*/5); ccb.ccb_h.func_code = XPT_SASYNC_CB; @@ -1108,12 +1087,8 @@ static void hpt_final_init(void *dummy) return ; } - if (bus_setup_intr(hba->pcidev, hba->irq_res, INTR_TYPE_CAM, -#if __FreeBSD_version > 700025 + if (bus_setup_intr(hba->pcidev, hba->irq_res, INTR_TYPE_CAM | INTR_MPSAFE, NULL, hpt_pci_intr, vbus_ext, &hba->irq_handle)) -#else - hpt_pci_intr, vbus_ext, &hba->irq_handle)) -#endif { os_printk("can't set up interrupt"); return ; @@ -1138,7 +1113,7 @@ static void hpt_final_init(void *dummy) S_IRUSR | S_IWUSR, "%s", driver_name); } -#if defined(KLD_MODULE) && (__FreeBSD_version >= 503000) +#if defined(KLD_MODULE) typedef struct driverlink *driverlink_t; struct driverlink { @@ -1230,29 +1205,17 @@ __DRIVER_MODULE(TARGETNAME, pci, hpt_pci __MODULE_VERSION(TARGETNAME, 1); __MODULE_DEPEND(TARGETNAME, cam, 1, 1, 1); -#if __FreeBSD_version>503000 -typedef struct cdev * ioctl_dev_t; -#else -typedef dev_t ioctl_dev_t; -#endif - -#if __FreeBSD_version >= 500000 -typedef struct thread * ioctl_thread_t; -#else -typedef struct proc * ioctl_thread_t; -#endif - -static int hpt_open(ioctl_dev_t dev, int flags, int devtype, ioctl_thread_t td) +static int hpt_open(struct cdev *dev, int flags, int devtype, struct thread *td) { return 0; } -static int hpt_close(ioctl_dev_t dev, int flags, int devtype, ioctl_thread_t td) +static int hpt_close(struct cdev *dev, int flags, int devtype, struct thread *td) { return 0; } -static int hpt_ioctl(ioctl_dev_t dev, u_long cmd, caddr_t data, int fflag, ioctl_thread_t td) +static int hpt_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int fflag, struct thread *td) { PHPT_IOCTL_PARAM piop=(PHPT_IOCTL_PARAM)data; IOCTL_ARG ioctl_args; @@ -1291,16 +1254,8 @@ static int hpt_ioctl(ioctl_dev_t dev, u_ goto invalid; } -#if (__FreeBSD_version >= 500000) - mtx_lock(&Giant); -#endif - hpt_do_ioctl(&ioctl_args); -#if (__FreeBSD_version >= 500000) - mtx_unlock(&Giant); -#endif - if (ioctl_args.result==HPT_IOCTL_RESULT_OK) { if (piop->nOutBufferSize) { if (copyout(ioctl_args.lpOutBuffer, @@ -1341,8 +1296,6 @@ static int hpt_rescan_bus(void) PVBUS vbus; PVBUS_EXT vbus_ext; - mtx_lock(&Giant); - ldm_for_each_vbus(vbus, vbus_ext) { if ((ccb = xpt_alloc_ccb()) == NULL) { @@ -1356,6 +1309,5 @@ static int hpt_rescan_bus(void) } xpt_rescan(ccb); } - mtx_unlock(&Giant); return(0); } Modified: stable/10/sys/dev/hptnr/os_bsd.h ============================================================================== --- stable/10/sys/dev/hptnr/os_bsd.h Sun Dec 21 02:52:40 2014 (r275979) +++ stable/10/sys/dev/hptnr/os_bsd.h Sun Dec 21 02:57:03 2014 (r275980) @@ -40,12 +40,8 @@ #include #include #include -#if (__FreeBSD_version >= 500000) #include #include -#else -#include /*to support DELAY function under 4.x BSD versions*/ -#endif #include #include @@ -53,11 +49,9 @@ #include #include -#if (__FreeBSD_version >= 500000) #include #include #include -#endif #include #include @@ -65,9 +59,7 @@ #include #include -#if __FreeBSD_version >= 500043 #include -#endif #include #include #include @@ -75,17 +67,8 @@ #include #include -#if (__FreeBSD_version >= 500000) #include #include -#else -#include -#include -#endif - -#if (__FreeBSD_version <= 500043) -#include -#endif #include #include @@ -97,10 +80,6 @@ #include #include -#if (__FreeBSD_version < 500043) -#include -#endif - typedef struct _INQUIRYDATA { u_char DeviceType : 5; @@ -176,7 +155,7 @@ typedef struct _os_cmdext { struct _os_cmdext *next; union ccb *ccb; bus_dmamap_t dma_map; - struct callout_handle timeout_ch; + struct callout timeout; SG psg[os_max_sg_descriptors]; } OS_CMDEXT, *POS_CMDEXT; @@ -190,11 +169,7 @@ typedef struct _vbus_ext { struct cam_sim *sim; /* sim for this vbus */ struct cam_path *path; /* peripheral, path, tgt, lun with this vbus */ -#if (__FreeBSD_version >= 500000) struct mtx lock; /* general purpose lock */ -#else - int hpt_splx; -#endif bus_dma_tag_t io_dmat; /* I/O buffer DMA tag */ POS_CMDEXT cmdext_list; @@ -202,7 +177,7 @@ typedef struct _vbus_ext { OSM_TASK *tasks; struct task worker; - struct callout_handle timer; + struct callout timer; eventhandler_tag shutdown_eh; @@ -211,19 +186,9 @@ typedef struct _vbus_ext { } VBUS_EXT, *PVBUS_EXT; -#if __FreeBSD_version >= 500000 #define hpt_lock_vbus(vbus_ext) mtx_lock(&(vbus_ext)->lock) #define hpt_unlock_vbus(vbus_ext) mtx_unlock(&(vbus_ext)->lock) -#else -static __inline void hpt_lock_vbus(PVBUS_EXT vbus_ext) -{ - vbus_ext->hpt_splx = splcam(); -} -static __inline void hpt_unlock_vbus(PVBUS_EXT vbus_ext) -{ - splx(vbus_ext->hpt_splx); -} -#endif +#define hpt_assert_vbus_locked(vbus_ext) mtx_assert(&(vbus_ext)->lock, MA_OWNED) #define HPT_OSM_TIMEOUT (20*hz) /* timeout value for OS commands */ @@ -232,36 +197,9 @@ static __inline void hpt_unlock_vbus(PVB #define HPT_SCAN_BUS _IO('H', 1) -#if __FreeBSD_version >= 501000 -#define TASK_ENQUEUE(task) taskqueue_enqueue(taskqueue_swi_giant,(task)); -#else #define TASK_ENQUEUE(task) taskqueue_enqueue(taskqueue_swi,(task)); -#endif -#if __FreeBSD_version >= 500000 static __inline int hpt_sleep(PVBUS_EXT vbus_ext, void *ident, int priority, const char *wmesg, int timo) { return msleep(ident, &vbus_ext->lock, priority, wmesg, timo); } -#else -static __inline int hpt_sleep(PVBUS_EXT vbus_ext, void *ident, int priority, const char *wmesg, int timo) -{ - int retval = 0; - - asleep(ident, priority, wmesg, timo); - hpt_unlock_vbus(vbus_ext); - retval = await(priority, timo); - hpt_lock_vbus(vbus_ext); - - return retval; -} -#endif - -#if __FreeBSD_version < 501000 -#define READ_16 0x88 -#define WRITE_16 0x8a -#define SERVICE_ACTION_IN 0x9e -#endif - -#define HPT_DEV_MAJOR 200 - From owner-svn-src-all@FreeBSD.ORG Sun Dec 21 03:00:46 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1EA48CF3; Sun, 21 Dec 2014 03:00:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 073F123E6; Sun, 21 Dec 2014 03:00:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBL30jkc024977; Sun, 21 Dec 2014 03:00:45 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBL30jUs024974; Sun, 21 Dec 2014 03:00:45 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201412210300.sBL30jUs024974@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Sun, 21 Dec 2014 03:00:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r275981 - stable/10/sys/dev/hptrr X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2014 03:00:46 -0000 Author: smh Date: Sun Dec 21 03:00:44 2014 New Revision: 275981 URL: https://svnweb.freebsd.org/changeset/base/275981 Log: MFC r269615: Various fixes to hptrr(4) Sponsored by: Multiplay Modified: stable/10/sys/dev/hptrr/hptrr_os_bsd.c stable/10/sys/dev/hptrr/hptrr_osm_bsd.c stable/10/sys/dev/hptrr/os_bsd.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/hptrr/hptrr_os_bsd.c ============================================================================== --- stable/10/sys/dev/hptrr/hptrr_os_bsd.c Sun Dec 21 02:57:03 2014 (r275980) +++ stable/10/sys/dev/hptrr/hptrr_os_bsd.c Sun Dec 21 03:00:44 2014 (r275981) @@ -220,9 +220,9 @@ void os_request_timer(void * osext, HPT PVBUS_EXT vbus_ext = osext; HPT_ASSERT(vbus_ext->ext_type==EXT_TYPE_VBUS); - - untimeout(os_timer_for_ldm, vbus_ext, vbus_ext->timer); - vbus_ext->timer = timeout(os_timer_for_ldm, vbus_ext, interval * hz / 1000000); + + callout_reset(&vbus_ext->timer, interval * hz / 1000000, + os_timer_for_ldm, vbus_ext); } HPT_TIME os_query_time(void) Modified: stable/10/sys/dev/hptrr/hptrr_osm_bsd.c ============================================================================== --- stable/10/sys/dev/hptrr/hptrr_osm_bsd.c Sun Dec 21 02:57:03 2014 (r275980) +++ stable/10/sys/dev/hptrr/hptrr_osm_bsd.c Sun Dec 21 03:00:44 2014 (r275981) @@ -39,32 +39,38 @@ __FBSDID("$FreeBSD$"); static int attach_generic = 0; TUNABLE_INT("hw.hptrr.attach_generic", &attach_generic); -static int hpt_probe(device_t dev) +static HIM *hpt_match(device_t dev) { PCI_ID pci_id; - HIM *him; int i; - PHBA hba; + HIM *him; /* Some of supported chips are used not only by HPT. */ if (pci_get_vendor(dev) != 0x1103 && !attach_generic) - return (ENXIO); + return (NULL); for (him = him_list; him; him = him->next) { for (i=0; him->get_supported_device_id(i, &pci_id); i++) { if ((pci_get_vendor(dev) == pci_id.vid) && (pci_get_device(dev) == pci_id.did)){ - KdPrint(("hpt_probe: adapter at PCI %d:%d:%d, IRQ %d", - pci_get_bus(dev), pci_get_slot(dev), pci_get_function(dev), pci_get_irq(dev) - )); - device_set_desc(dev, him->name); - hba = (PHBA)device_get_softc(dev); - memset(hba, 0, sizeof(HBA)); - hba->ext_type = EXT_TYPE_HBA; - hba->ldm_adapter.him = him; - return (BUS_PROBE_DEFAULT); + return (him); } } } + return (NULL); +} + +static int hpt_probe(device_t dev) +{ + HIM *him; + + him = hpt_match(dev); + if (him != NULL) { + KdPrint(("hpt_probe: adapter at PCI %d:%d:%d, IRQ %d", + pci_get_bus(dev), pci_get_slot(dev), pci_get_function(dev), pci_get_irq(dev) + )); + device_set_desc(dev, him->name); + return (BUS_PROBE_DEFAULT); + } return (ENXIO); } @@ -72,17 +78,19 @@ static int hpt_probe(device_t dev) static int hpt_attach(device_t dev) { PHBA hba = (PHBA)device_get_softc(dev); - HIM *him = hba->ldm_adapter.him; + HIM *him; PCI_ID pci_id; HPT_UINT size; PVBUS vbus; PVBUS_EXT vbus_ext; KdPrint(("hpt_attach(%d/%d/%d)", pci_get_bus(dev), pci_get_slot(dev), pci_get_function(dev))); - -#if __FreeBSD_version >=440000 + + him = hpt_match(dev); + hba->ext_type = EXT_TYPE_HBA; + hba->ldm_adapter.him = him; + pci_enable_busmaster(dev); -#endif pci_id.vid = pci_get_vendor(dev); pci_id.did = pci_get_device(dev); @@ -90,8 +98,6 @@ static int hpt_attach(device_t dev) size = him->get_adapter_size(&pci_id); hba->ldm_adapter.him_handle = malloc(size, M_DEVBUF, M_WAITOK); - if (!hba->ldm_adapter.him_handle) - return ENXIO; hba->pcidev = dev; hba->pciaddr.tree = 0; @@ -101,7 +107,7 @@ static int hpt_attach(device_t dev) if (!him->create_adapter(&pci_id, hba->pciaddr, hba->ldm_adapter.him_handle, hba)) { free(hba->ldm_adapter.him_handle, M_DEVBUF); - return -1; + return ENXIO; } os_printk("adapter at PCI %d:%d:%d, IRQ %d", @@ -109,12 +115,8 @@ static int hpt_attach(device_t dev) if (!ldm_register_adapter(&hba->ldm_adapter)) { size = ldm_get_vbus_size(); - vbus_ext = malloc(sizeof(VBUS_EXT) + size, M_DEVBUF, M_WAITOK); - if (!vbus_ext) { - free(hba->ldm_adapter.him_handle, M_DEVBUF); - return -1; - } - memset(vbus_ext, 0, sizeof(VBUS_EXT)); + vbus_ext = malloc(sizeof(VBUS_EXT) + size, M_DEVBUF, M_WAITOK | + M_ZERO); vbus_ext->ext_type = EXT_TYPE_VBUS; ldm_create_vbus((PVBUS)vbus_ext->vbus, vbus_ext); ldm_register_adapter(&hba->ldm_adapter); @@ -295,7 +297,7 @@ static int hpt_flush_vdev(PVBUS_EXT vbus KdPrint(("flusing dev %p", vd)); - hpt_lock_vbus(vbus_ext); + hpt_assert_vbus_locked(vbus_ext); if (mIsArray(vd->type) && vd->u.array.transform) count = MAX(vd->u.array.transform->source->cmds_per_request, @@ -306,7 +308,6 @@ static int hpt_flush_vdev(PVBUS_EXT vbus pCmd = ldm_alloc_cmds(vd->vbus, count); if (!pCmd) { - hpt_unlock_vbus(vbus_ext); return -1; } @@ -332,8 +333,6 @@ static int hpt_flush_vdev(PVBUS_EXT vbus ldm_free_cmds(pCmd); - hpt_unlock_vbus(vbus_ext); - return result; } @@ -348,6 +347,7 @@ static void hpt_shutdown_vbus(PVBUS_EXT /* stop all ctl tasks and disable the worker taskqueue */ hpt_stop_tasks(vbus_ext); + hpt_lock_vbus(vbus_ext); vbus_ext->worker.ta_context = 0; /* flush devices */ @@ -360,7 +360,6 @@ static void hpt_shutdown_vbus(PVBUS_EXT } } - hpt_lock_vbus(vbus_ext); ldm_shutdown(vbus); hpt_unlock_vbus(vbus_ext); @@ -376,6 +375,8 @@ static void hpt_shutdown_vbus(PVBUS_EXT free(hba->ldm_adapter.him_handle, M_DEVBUF); } + callout_drain(&vbus_ext->timer); + mtx_destroy(&vbus_ext->lock); free(vbus_ext, M_DEVBUF); KdPrint(("hpt_shutdown_vbus done")); } @@ -439,8 +440,8 @@ static void os_cmddone(PCOMMAND pCmd) union ccb *ccb = ext->ccb; KdPrint(("os_cmddone(%p, %d)", pCmd, pCmd->Result)); - - untimeout(hpt_timeout, pCmd, ext->timeout_ch); + + callout_stop(&ext->timeout); switch(pCmd->Result) { case RETURN_SUCCESS: @@ -528,7 +529,7 @@ static void hpt_io_dmamap_callback(void BUS_DMASYNC_PREWRITE); } } - ext->timeout_ch = timeout(hpt_timeout, pCmd, HPT_OSM_TIMEOUT); + callout_reset(&ext->timeout, HPT_OSM_TIMEOUT, hpt_timeout, pCmd); ldm_queue_cmd(pCmd); } @@ -745,18 +746,15 @@ static void hpt_action(struct cam_sim *s KdPrint(("hpt_action(fn=%d, id=%d)", ccb->ccb_h.func_code, ccb->ccb_h.target_id)); + hpt_assert_vbus_locked(vbus_ext); switch (ccb->ccb_h.func_code) { case XPT_SCSI_IO: - hpt_lock_vbus(vbus_ext); hpt_scsi_io(vbus_ext, ccb); - hpt_unlock_vbus(vbus_ext); return; case XPT_RESET_BUS: - hpt_lock_vbus(vbus_ext); ldm_reset_vbus((PVBUS)vbus_ext->vbus); - hpt_unlock_vbus(vbus_ext); break; case XPT_GET_TRAN_SETTINGS: @@ -765,14 +763,7 @@ static void hpt_action(struct cam_sim *s break; case XPT_CALC_GEOMETRY: -#if __FreeBSD_version >= 500000 cam_calc_geometry(&ccb->ccg, 1); -#else - ccb->ccg.heads = 255; - ccb->ccg.secs_per_track = 63; - ccb->ccg.cylinders = ccb->ccg.volume_size / (ccb->ccg.heads * ccb->ccg.secs_per_track); - ccb->ccb_h.status = CAM_REQ_CMP; -#endif break; case XPT_PATH_INQ: @@ -821,7 +812,9 @@ static void hpt_pci_intr(void *arg) static void hpt_poll(struct cam_sim *sim) { - hpt_pci_intr(cam_sim_softc(sim)); + PVBUS_EXT vbus_ext = cam_sim_softc(sim); + hpt_assert_vbus_locked(vbus_ext); + ldm_intr((PVBUS)vbus_ext->vbus); } static void hpt_async(void * callback_arg, u_int32_t code, struct cam_path * path, void * arg) @@ -970,19 +963,7 @@ static struct cdevsw hpt_cdevsw = { .d_close = hpt_close, .d_ioctl = hpt_ioctl, .d_name = driver_name, -#if __FreeBSD_version>=503000 .d_version = D_VERSION, -#endif -#if (__FreeBSD_version>=503000 && __FreeBSD_version<600034) - .d_flags = D_NEEDGIANT, -#endif -#if __FreeBSD_version<600034 -#if __FreeBSD_version>501000 - .d_maj = MAJOR_AUTO, -#else - .d_maj = HPT_DEV_MAJOR, -#endif -#endif }; static struct intr_config_hook hpt_ich; @@ -1019,7 +1000,8 @@ static void hpt_final_init(void *dummy) /* initializing hardware */ ldm_for_each_vbus(vbus, vbus_ext) { /* make timer available here */ - callout_handle_init(&vbus_ext->timer); + mtx_init(&vbus_ext->lock, "hptsleeplock", NULL, MTX_DEF); + callout_init_mtx(&vbus_ext->timer, &vbus_ext->lock, 0); if (hpt_init_vbus(vbus_ext)) { os_printk("fail to initialize hardware"); break; /* FIXME */ @@ -1031,9 +1013,6 @@ static void hpt_final_init(void *dummy) struct cam_devq *devq; struct ccb_setasync ccb; -#if (__FreeBSD_version >= 500000) - mtx_init(&vbus_ext->lock, "hptsleeplock", NULL, MTX_DEF); -#endif if (bus_dma_tag_create(NULL,/* parent */ 4, /* alignment */ BUS_SPACE_MAXADDR_32BIT+1, /* boundary */ @@ -1044,10 +1023,8 @@ static void hpt_final_init(void *dummy) os_max_sg_descriptors, /* nsegments */ 0x10000, /* maxsegsize */ BUS_DMA_WAITOK, /* flags */ -#if __FreeBSD_version>502000 busdma_lock_mutex, /* lockfunc */ &vbus_ext->lock, /* lockfuncarg */ -#endif &vbus_ext->io_dmat /* tag */)) { return ; @@ -1067,7 +1044,7 @@ static void hpt_final_init(void *dummy) os_printk("Can't create dma map(%d)", i); return ; } - callout_handle_init(&ext->timeout_ch); + callout_init_mtx(&ext->timeout, &vbus_ext->lock, 0); } if ((devq = cam_simq_alloc(os_max_queue_comm)) == NULL) { @@ -1075,13 +1052,9 @@ static void hpt_final_init(void *dummy) return ; } -#if __FreeBSD_version > 700025 vbus_ext->sim = cam_sim_alloc(hpt_action, hpt_poll, driver_name, - vbus_ext, 0, &Giant, os_max_queue_comm, /*tagged*/8, devq); -#else - vbus_ext->sim = cam_sim_alloc(hpt_action, hpt_poll, driver_name, - vbus_ext, 0, os_max_queue_comm, /*tagged*/8, devq); -#endif + vbus_ext, 0, &vbus_ext->lock, os_max_queue_comm, + /*tagged*/8, devq); if (!vbus_ext->sim) { os_printk("cam_sim_alloc failed"); @@ -1089,13 +1062,11 @@ static void hpt_final_init(void *dummy) return ; } -#if __FreeBSD_version > 700044 + hpt_lock_vbus(vbus_ext); if (xpt_bus_register(vbus_ext->sim, NULL, 0) != CAM_SUCCESS) { -#else - if (xpt_bus_register(vbus_ext->sim, 0) != CAM_SUCCESS) { -#endif os_printk("xpt_bus_register failed"); cam_sim_free(vbus_ext->sim, /*free devq*/ TRUE); + hpt_unlock_vbus(vbus_ext); vbus_ext->sim = NULL; return ; } @@ -1107,9 +1078,11 @@ static void hpt_final_init(void *dummy) os_printk("xpt_create_path failed"); xpt_bus_deregister(cam_sim_path(vbus_ext->sim)); cam_sim_free(vbus_ext->sim, /*free_devq*/TRUE); + hpt_unlock_vbus(vbus_ext); vbus_ext->sim = NULL; return ; } + hpt_unlock_vbus(vbus_ext); xpt_setup_ccb(&ccb.ccb_h, vbus_ext->path, /*priority*/5); ccb.ccb_h.func_code = XPT_SASYNC_CB; @@ -1127,12 +1100,8 @@ static void hpt_final_init(void *dummy) return ; } - if (bus_setup_intr(hba->pcidev, hba->irq_res, INTR_TYPE_CAM, -#if __FreeBSD_version > 700025 + if (bus_setup_intr(hba->pcidev, hba->irq_res, INTR_TYPE_CAM | INTR_MPSAFE, NULL, hpt_pci_intr, vbus_ext, &hba->irq_handle)) -#else - hpt_pci_intr, vbus_ext, &hba->irq_handle)) -#endif { os_printk("can't set up interrupt"); return ; @@ -1156,7 +1125,7 @@ static void hpt_final_init(void *dummy) S_IRUSR | S_IWUSR, "%s", driver_name); } -#if defined(KLD_MODULE) && (__FreeBSD_version >= 503000) +#if defined(KLD_MODULE) typedef struct driverlink *driverlink_t; struct driverlink { @@ -1248,29 +1217,17 @@ __DRIVER_MODULE(TARGETNAME, pci, hpt_pci __MODULE_VERSION(TARGETNAME, 1); __MODULE_DEPEND(TARGETNAME, cam, 1, 1, 1); -#if __FreeBSD_version>503000 -typedef struct cdev * ioctl_dev_t; -#else -typedef dev_t ioctl_dev_t; -#endif - -#if __FreeBSD_version >= 500000 -typedef struct thread * ioctl_thread_t; -#else -typedef struct proc * ioctl_thread_t; -#endif - -static int hpt_open(ioctl_dev_t dev, int flags, int devtype, ioctl_thread_t td) +static int hpt_open(struct cdev *dev, int flags, int devtype, struct thread *td) { return 0; } -static int hpt_close(ioctl_dev_t dev, int flags, int devtype, ioctl_thread_t td) +static int hpt_close(struct cdev *dev, int flags, int devtype, struct thread *td) { return 0; } -static int hpt_ioctl(ioctl_dev_t dev, u_long cmd, caddr_t data, int fflag, ioctl_thread_t td) +static int hpt_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int fflag, struct thread *td) { PHPT_IOCTL_PARAM piop=(PHPT_IOCTL_PARAM)data; IOCTL_ARG ioctl_args; @@ -1309,16 +1266,8 @@ static int hpt_ioctl(ioctl_dev_t dev, u_ goto invalid; } -#if (__FreeBSD_version >= 500000) - mtx_lock(&Giant); -#endif - hpt_do_ioctl(&ioctl_args); -#if (__FreeBSD_version >= 500000) - mtx_unlock(&Giant); -#endif - if (ioctl_args.result==HPT_IOCTL_RESULT_OK) { if (piop->nOutBufferSize) { if (copyout(ioctl_args.lpOutBuffer, @@ -1359,10 +1308,6 @@ static int hpt_rescan_bus(void) PVBUS vbus; PVBUS_EXT vbus_ext; -#if (__FreeBSD_version >= 500000) - mtx_lock(&Giant); -#endif - ldm_for_each_vbus(vbus, vbus_ext) { if ((ccb = xpt_alloc_ccb()) == NULL) return(ENOMEM); @@ -1375,9 +1320,5 @@ static int hpt_rescan_bus(void) xpt_rescan(ccb); } -#if (__FreeBSD_version >= 500000) - mtx_unlock(&Giant); -#endif - return(0); } Modified: stable/10/sys/dev/hptrr/os_bsd.h ============================================================================== --- stable/10/sys/dev/hptrr/os_bsd.h Sun Dec 21 02:57:03 2014 (r275980) +++ stable/10/sys/dev/hptrr/os_bsd.h Sun Dec 21 03:00:44 2014 (r275981) @@ -42,12 +42,8 @@ #include #include #include -#if (__FreeBSD_version >= 500000) #include #include -#else -#include /*to support DELAY function under 4.x BSD versions*/ -#endif #include #include @@ -55,11 +51,9 @@ #include #include -#if (__FreeBSD_version >= 500000) #include #include #include -#endif #include #include @@ -74,17 +68,8 @@ #include #include -#if (__FreeBSD_version >= 500000) #include #include -#else -#include -#include -#endif - -#if (__FreeBSD_version <= 500043) -#include -#endif #include #include @@ -95,9 +80,6 @@ #include #include -#if (__FreeBSD_version < 500043) -#include -#endif typedef struct _INQUIRYDATA { @@ -174,7 +156,7 @@ typedef struct _os_cmdext { struct _os_cmdext *next; union ccb *ccb; bus_dmamap_t dma_map; - struct callout_handle timeout_ch; + struct callout timeout; SG psg[os_max_sg_descriptors]; } OS_CMDEXT, *POS_CMDEXT; @@ -188,11 +170,7 @@ typedef struct _vbus_ext { struct cam_sim *sim; /* sim for this vbus */ struct cam_path *path; /* peripheral, path, tgt, lun with this vbus */ -#if (__FreeBSD_version >= 500000) struct mtx lock; /* general purpose lock */ -#else - int hpt_splx; -#endif bus_dma_tag_t io_dmat; /* I/O buffer DMA tag */ POS_CMDEXT cmdext_list; @@ -200,7 +178,7 @@ typedef struct _vbus_ext { OSM_TASK *tasks; struct task worker; - struct callout_handle timer; + struct callout timer; eventhandler_tag shutdown_eh; @@ -209,19 +187,9 @@ typedef struct _vbus_ext { } VBUS_EXT, *PVBUS_EXT; -#if __FreeBSD_version >= 500000 #define hpt_lock_vbus(vbus_ext) mtx_lock(&(vbus_ext)->lock) #define hpt_unlock_vbus(vbus_ext) mtx_unlock(&(vbus_ext)->lock) -#else -static __inline void hpt_lock_vbus(PVBUS_EXT vbus_ext) -{ - vbus_ext->hpt_splx = splcam(); -} -static __inline void hpt_unlock_vbus(PVBUS_EXT vbus_ext) -{ - splx(vbus_ext->hpt_splx); -} -#endif +#define hpt_assert_vbus_locked(vbus_ext) mtx_assert(&(vbus_ext)->lock, MA_OWNED) #define HPT_OSM_TIMEOUT (20*hz) /* timeout value for OS commands */ @@ -230,35 +198,9 @@ static __inline void hpt_unlock_vbus(PVB #define HPT_SCAN_BUS _IO('H', 1) -#if __FreeBSD_version >= 501000 -#define TASK_ENQUEUE(task) taskqueue_enqueue(taskqueue_swi_giant,(task)); -#else #define TASK_ENQUEUE(task) taskqueue_enqueue(taskqueue_swi,(task)); -#endif -#if __FreeBSD_version >= 500000 static __inline int hpt_sleep(PVBUS_EXT vbus_ext, void *ident, int priority, const char *wmesg, int timo) { return msleep(ident, &vbus_ext->lock, priority, wmesg, timo); } -#else -static __inline int hpt_sleep(PVBUS_EXT vbus_ext, void *ident, int priority, const char *wmesg, int timo) -{ - int retval = 0; - - asleep(ident, priority, wmesg, timo); - hpt_unlock_vbus(vbus_ext); - retval = await(priority, timo); - hpt_lock_vbus(vbus_ext); - - return retval; -} -#endif - -#if __FreeBSD_version < 501000 -#define READ_16 0x88 -#define WRITE_16 0x8a -#define SERVICE_ACTION_IN 0x9e -#endif - -#define HPT_DEV_MAJOR 200 From owner-svn-src-all@FreeBSD.ORG Sun Dec 21 03:06:21 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 71AEA199; Sun, 21 Dec 2014 03:06:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 591982C38; Sun, 21 Dec 2014 03:06:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBL36LAi029481; Sun, 21 Dec 2014 03:06:21 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBL36CLe029434; Sun, 21 Dec 2014 03:06:12 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201412210306.sBL36CLe029434@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Sun, 21 Dec 2014 03:06:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r275982 - in stable/10/sys: cam dev/advansys dev/aha dev/ahb dev/ahci dev/aic dev/arcmsr dev/asr dev/buslogic dev/ciss dev/dpt dev/firewire dev/glxiic dev/hpt27xx dev/hptnr dev/hptrr de... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2014 03:06:21 -0000 Author: smh Date: Sun Dec 21 03:06:11 2014 New Revision: 275982 URL: https://svnweb.freebsd.org/changeset/base/275982 Log: MFC r274819: Prevent overflow issues in timeout processing MFC r274852: Fix build with asr driver Sponsored by: Multiplay Modified: stable/10/sys/cam/cam_xpt.c stable/10/sys/dev/advansys/advansys.c stable/10/sys/dev/advansys/adwcam.c stable/10/sys/dev/aha/aha.c stable/10/sys/dev/ahb/ahb.c stable/10/sys/dev/ahci/ahci.c stable/10/sys/dev/aic/aic.c stable/10/sys/dev/arcmsr/arcmsr.c stable/10/sys/dev/asr/asr.c stable/10/sys/dev/buslogic/bt.c stable/10/sys/dev/ciss/ciss.c stable/10/sys/dev/dpt/dpt_scsi.c stable/10/sys/dev/firewire/sbp.c stable/10/sys/dev/glxiic/glxiic.c stable/10/sys/dev/hpt27xx/hpt27xx_os_bsd.c stable/10/sys/dev/hptnr/hptnr_os_bsd.c stable/10/sys/dev/hptrr/hptrr_os_bsd.c stable/10/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c stable/10/sys/dev/iir/iir.c stable/10/sys/dev/isci/isci_io_request.c stable/10/sys/dev/isci/isci_timer.c stable/10/sys/dev/mpr/mpr_sas.c stable/10/sys/dev/mps/mps_sas.c stable/10/sys/dev/mpt/mpt.c stable/10/sys/dev/mpt/mpt.h stable/10/sys/dev/mpt/mpt_cam.c stable/10/sys/dev/mrsas/mrsas_cam.c stable/10/sys/dev/mvs/mvs.c stable/10/sys/dev/siis/siis.c stable/10/sys/dev/sym/sym_hipd.c stable/10/sys/dev/trm/trm.c stable/10/sys/dev/tws/tws_cam.c stable/10/sys/dev/virtio/scsi/virtio_scsi.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/cam_xpt.c ============================================================================== --- stable/10/sys/cam/cam_xpt.c Sun Dec 21 03:00:44 2014 (r275981) +++ stable/10/sys/cam/cam_xpt.c Sun Dec 21 03:06:11 2014 (r275982) @@ -2904,9 +2904,9 @@ call_sim: start_ccb->ccb_h.flags |= CAM_DEV_QFREEZE; } - callout_reset(&dev->callout, - (crs->release_timeout * hz) / 1000, - xpt_release_devq_timeout, dev); + callout_reset_sbt(&dev->callout, + SBT_1MS * crs->release_timeout, 0, + xpt_release_devq_timeout, dev, 0); dev->flags |= CAM_DEV_REL_TIMEOUT_PENDING; @@ -4955,8 +4955,8 @@ xpt_config(void *arg) periphdriver_init(1); xpt_hold_boot(); callout_init(&xsoftc.boot_callout, 1); - callout_reset(&xsoftc.boot_callout, hz * xsoftc.boot_delay / 1000, - xpt_boot_delay, NULL); + callout_reset_sbt(&xsoftc.boot_callout, SBT_1MS * xsoftc.boot_delay, 0, + xpt_boot_delay, NULL, 0); /* Fire up rescan thread. */ if (kproc_kthread_add(xpt_scanner_thread, NULL, &cam_proc, NULL, 0, 0, "cam", "scanner")) { Modified: stable/10/sys/dev/advansys/advansys.c ============================================================================== --- stable/10/sys/dev/advansys/advansys.c Sun Dec 21 03:00:44 2014 (r275981) +++ stable/10/sys/dev/advansys/advansys.c Sun Dec 21 03:06:11 2014 (r275982) @@ -168,9 +168,9 @@ adv_clear_state_really(struct adv_softc ccb_h = LIST_FIRST(&adv->pending_ccbs); while (ccb_h != NULL) { cinfo = ccb_h->ccb_cinfo_ptr; - callout_reset(&cinfo->timer, - ccb_h->timeout * hz / 1000, adv_timeout, - ccb_h); + callout_reset_sbt(&cinfo->timer, + SBT_1MS * ccb_h->timeout, 0, + adv_timeout, ccb_h, 0); ccb_h = LIST_NEXT(ccb_h, sim_links.le); } adv->state &= ~ADV_IN_TIMEOUT; @@ -569,8 +569,8 @@ adv_execute_ccb(void *arg, bus_dma_segme ccb_h->status |= CAM_SIM_QUEUED; LIST_INSERT_HEAD(&adv->pending_ccbs, ccb_h, sim_links.le); /* Schedule our timeout */ - callout_reset(&cinfo->timer, ccb_h->timeout * hz /1000, adv_timeout, - csio); + callout_reset_sbt(&cinfo->timer, SBT_1MS * ccb_h->timeout, 0, + adv_timeout, csio, 0); } static struct adv_ccb_info * Modified: stable/10/sys/dev/advansys/adwcam.c ============================================================================== --- stable/10/sys/dev/advansys/adwcam.c Sun Dec 21 03:00:44 2014 (r275981) +++ stable/10/sys/dev/advansys/adwcam.c Sun Dec 21 03:06:11 2014 (r275982) @@ -322,8 +322,8 @@ adwexecuteacb(void *arg, bus_dma_segment acb->state |= ACB_ACTIVE; ccb->ccb_h.status |= CAM_SIM_QUEUED; LIST_INSERT_HEAD(&adw->pending_ccbs, &ccb->ccb_h, sim_links.le); - callout_reset(&acb->timer, (ccb->ccb_h.timeout * hz) / 1000, - adwtimeout, acb); + callout_reset_sbt(&acb->timer, SBT_1MS * ccb->ccb_h.timeout, 0, + adwtimeout, acb, 0); adw_send_acb(adw, acb, acbvtob(adw, acb)); } Modified: stable/10/sys/dev/aha/aha.c ============================================================================== --- stable/10/sys/dev/aha/aha.c Sun Dec 21 03:00:44 2014 (r275981) +++ stable/10/sys/dev/aha/aha.c Sun Dec 21 03:06:11 2014 (r275982) @@ -1049,8 +1049,8 @@ ahaexecuteccb(void *arg, bus_dma_segment ccb->ccb_h.status |= CAM_SIM_QUEUED; LIST_INSERT_HEAD(&aha->pending_ccbs, &ccb->ccb_h, sim_links.le); - callout_reset(&accb->timer, (ccb->ccb_h.timeout * hz) / 1000, - ahatimeout, accb); + callout_reset_sbt(&accb->timer, SBT_1MS * ccb->ccb_h.timeout, 0, + ahatimeout, accb, 0); /* Tell the adapter about this command */ if (aha->cur_outbox->action_code != AMBO_FREE) { @@ -1183,9 +1183,9 @@ ahadone(struct aha_softc *aha, struct ah ccb_h = LIST_NEXT(ccb_h, sim_links.le); ahadone(aha, pending_accb, AMBI_ERROR); } else { - callout_reset(&pending_accb->timer, - (ccb_h->timeout * hz) / 1000, - ahatimeout, pending_accb); + callout_reset_sbt(&pending_accb->timer, + SBT_1MS * ccb_h->timeout, 0, ahatimeout, + pending_accb, 0); ccb_h = LIST_NEXT(ccb_h, sim_links.le); } } Modified: stable/10/sys/dev/ahb/ahb.c ============================================================================== --- stable/10/sys/dev/ahb/ahb.c Sun Dec 21 03:00:44 2014 (r275981) +++ stable/10/sys/dev/ahb/ahb.c Sun Dec 21 03:06:11 2014 (r275982) @@ -617,9 +617,9 @@ ahbhandleimmed(struct ahb_softc *ahb, u_ xpt_done(ccb); } else if (ahb->immed_ecb != NULL) { /* Re-instate timeout */ - callout_reset(&pending_ecb->timer, - (ccb->ccb_h.timeout * hz) / 1000, - ahbtimeout, pending_ecb); + callout_reset_sbt(&pending_ecb->timer, + SBT_1MS * ccb->ccb_h.timeout, 0, ahbtimeout, + pending_ecb, 0); } } @@ -986,8 +986,8 @@ ahbexecuteecb(void *arg, bus_dma_segment /* Tell the adapter about this command */ ahbqueuembox(ahb, ecb_paddr, ATTN_STARTECB|ccb->ccb_h.target_id); - callout_reset(&ecb->timer, (ccb->ccb_h.timeout * hz) / 1000, ahbtimeout, - ecb); + callout_reset_sbt(&ecb->timer, SBT_1MS * ccb->ccb_h.timeout, 0, + ahbtimeout, ecb, 0); } static void Modified: stable/10/sys/dev/ahci/ahci.c ============================================================================== --- stable/10/sys/dev/ahci/ahci.c Sun Dec 21 03:00:44 2014 (r275981) +++ stable/10/sys/dev/ahci/ahci.c Sun Dec 21 03:06:11 2014 (r275982) @@ -2033,8 +2033,8 @@ ahci_execute_transaction(struct ahci_slo return; } /* Start command execution timeout */ - callout_reset(&slot->timeout, (int)ccb->ccb_h.timeout * hz / 2000, - (timeout_t*)ahci_timeout, slot); + callout_reset_sbt(&slot->timeout, SBT_1MS * ccb->ccb_h.timeout / 2, + 0, (timeout_t*)ahci_timeout, slot, 0); return; } @@ -2071,9 +2071,9 @@ ahci_rearm_timeout(device_t dev) continue; if ((ch->toslots & (1 << i)) == 0) continue; - callout_reset(&slot->timeout, - (int)slot->ccb->ccb_h.timeout * hz / 2000, - (timeout_t*)ahci_timeout, slot); + callout_reset_sbt(&slot->timeout, + SBT_1MS * slot->ccb->ccb_h.timeout / 2, 0, + (timeout_t*)ahci_timeout, slot, 0); } } @@ -2105,9 +2105,9 @@ ahci_timeout(struct ahci_slot *slot) slot->state = AHCI_SLOT_EXECUTING; } - callout_reset(&slot->timeout, - (int)slot->ccb->ccb_h.timeout * hz / 2000, - (timeout_t*)ahci_timeout, slot); + callout_reset_sbt(&slot->timeout, + SBT_1MS * slot->ccb->ccb_h.timeout / 2, 0, + (timeout_t*)ahci_timeout, slot, 0); return; } Modified: stable/10/sys/dev/aic/aic.c ============================================================================== --- stable/10/sys/dev/aic/aic.c Sun Dec 21 03:00:44 2014 (r275981) +++ stable/10/sys/dev/aic/aic.c Sun Dec 21 03:06:11 2014 (r275982) @@ -319,8 +319,8 @@ aic_execute_scb(void *arg, bus_dma_segme ccb->ccb_h.status |= CAM_SIM_QUEUED; TAILQ_INSERT_TAIL(&aic->pending_ccbs, &ccb->ccb_h, sim_links.tqe); - callout_reset(&scb->timer, (ccb->ccb_h.timeout * hz) / 1000, - aic_timeout, scb); + callout_reset_sbt(&scb->timer, SBT_1MS * ccb->ccb_h.timeout, 0, + aic_timeout, scb, 0); aic_start(aic); } @@ -1075,9 +1075,9 @@ aic_done(struct aic_softc *aic, struct a &pending_scb->ccb->ccb_h, sim_links.tqe); aic_done(aic, pending_scb); } else { - callout_reset(&pending_scb->timer, - (ccb_h->timeout * hz) / 1000, aic_timeout, - pending_scb); + callout_reset_sbt(&pending_scb->timer, + SBT_1MS * ccb_h->timeout, 0, aic_timeout, + pending_scb, 0); ccb_h = TAILQ_NEXT(ccb_h, sim_links.tqe); } } @@ -1094,9 +1094,9 @@ aic_done(struct aic_softc *aic, struct a &nexus_scb->ccb->ccb_h, sim_links.tqe); aic_done(aic, nexus_scb); } else { - callout_reset(&nexus_scb->timer, - (ccb_h->timeout * hz) / 1000, aic_timeout, - nexus_scb); + callout_reset_sbt(&nexus_scb->timer, + SBT_1MS * ccb_h->timeout, 0, aic_timeout, + nexus_scb, 0); ccb_h = TAILQ_NEXT(ccb_h, sim_links.tqe); } } Modified: stable/10/sys/dev/arcmsr/arcmsr.c ============================================================================== --- stable/10/sys/dev/arcmsr/arcmsr.c Sun Dec 21 03:00:44 2014 (r275981) +++ stable/10/sys/dev/arcmsr/arcmsr.c Sun Dec 21 03:06:11 2014 (r275982) @@ -2703,7 +2703,9 @@ static void arcmsr_execute_srb(void *arg if (pccb->ccb_h.timeout != CAM_TIME_INFINITY) { arcmsr_callout_init(&srb->ccb_callout); - callout_reset(&srb->ccb_callout, ((pccb->ccb_h.timeout + (ARCMSR_TIMEOUT_DELAY * 1000)) * hz) / 1000, arcmsr_srb_timeout, srb); + callout_reset_sbt(&srb->ccb_callout, SBT_1MS * + (pccb->ccb_h.timeout + (ARCMSR_TIMEOUT_DELAY * 1000)), 0, + arcmsr_srb_timeout, srb, 0); srb->srb_flags |= SRB_FLAG_TIMER_START; } } Modified: stable/10/sys/dev/asr/asr.c ============================================================================== --- stable/10/sys/dev/asr/asr.c Sun Dec 21 03:00:44 2014 (r275981) +++ stable/10/sys/dev/asr/asr.c Sun Dec 21 03:06:11 2014 (r275982) @@ -384,22 +384,6 @@ typedef struct Asr_softc { static STAILQ_HEAD(, Asr_softc) Asr_softc_list = STAILQ_HEAD_INITIALIZER(Asr_softc_list); - -static __inline void -set_ccb_timeout_ch(union asr_ccb *ccb, struct callout_handle ch) -{ - ccb->ccb_h.sim_priv.entries[0].ptr = ch.callout; -} - -static __inline struct callout_handle -get_ccb_timeout_ch(union asr_ccb *ccb) -{ - struct callout_handle ch; - - ch.callout = ccb->ccb_h.sim_priv.entries[0].ptr; - return ch; -} - /* * Prototypes of the routines we have in this object. */ @@ -422,6 +406,25 @@ static void asr_action(struct cam_sim *s static void asr_poll(struct cam_sim *sim); static int ASR_queue(Asr_softc_t *sc, PI2O_MESSAGE_FRAME Message); +static __inline void +set_ccb_timeout_ch(union asr_ccb *ccb) +{ + struct callout_handle ch; + + ch = timeout(asr_timeout, (caddr_t)ccb, + (int)((u_int64_t)(ccb->ccb_h.timeout) * (u_int32_t)hz / 1000)); + ccb->ccb_h.sim_priv.entries[0].ptr = ch.callout; +} + +static __inline struct callout_handle +get_ccb_timeout_ch(union asr_ccb *ccb) +{ + struct callout_handle ch; + + ch.callout = ccb->ccb_h.sim_priv.entries[0].ptr; + return ch; +} + /* * Here is the auto-probe structure used to nest our tests appropriately * during the startup phase of the operating system. @@ -812,8 +815,7 @@ ASR_ccbAdd(Asr_softc_t *sc, union asr_cc */ ccb->ccb_h.timeout = 6 * 60 * 1000; } - set_ccb_timeout_ch(ccb, timeout(asr_timeout, (caddr_t)ccb, - (ccb->ccb_h.timeout * hz) / 1000)); + set_ccb_timeout_ch(ccb); } splx(s); } /* ASR_ccbAdd */ @@ -1337,9 +1339,7 @@ asr_timeout(void *arg) cam_sim_unit(xpt_path_sim(ccb->ccb_h.path)), s); if (ASR_reset (sc) == ENXIO) { /* Try again later */ - set_ccb_timeout_ch(ccb, timeout(asr_timeout, - (caddr_t)ccb, - (ccb->ccb_h.timeout * hz) / 1000)); + set_ccb_timeout_ch(ccb); } return; } @@ -1353,9 +1353,7 @@ asr_timeout(void *arg) if ((ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_CMD_TIMEOUT) { debug_asr_printf (" AGAIN\nreinitializing adapter\n"); if (ASR_reset (sc) == ENXIO) { - set_ccb_timeout_ch(ccb, timeout(asr_timeout, - (caddr_t)ccb, - (ccb->ccb_h.timeout * hz) / 1000)); + set_ccb_timeout_ch(ccb); } splx(s); return; @@ -1364,8 +1362,7 @@ asr_timeout(void *arg) /* If the BUS reset does not take, then an adapter reset is next! */ ccb->ccb_h.status &= ~CAM_STATUS_MASK; ccb->ccb_h.status |= CAM_CMD_TIMEOUT; - set_ccb_timeout_ch(ccb, timeout(asr_timeout, (caddr_t)ccb, - (ccb->ccb_h.timeout * hz) / 1000)); + set_ccb_timeout_ch(ccb); ASR_resetBus (sc, cam_sim_bus(xpt_path_sim(ccb->ccb_h.path))); xpt_async (AC_BUS_RESET, ccb->ccb_h.path, NULL); splx(s); Modified: stable/10/sys/dev/buslogic/bt.c ============================================================================== --- stable/10/sys/dev/buslogic/bt.c Sun Dec 21 03:00:44 2014 (r275981) +++ stable/10/sys/dev/buslogic/bt.c Sun Dec 21 03:06:11 2014 (r275982) @@ -1467,8 +1467,8 @@ btexecuteccb(void *arg, bus_dma_segment_ ccb->ccb_h.status |= CAM_SIM_QUEUED; LIST_INSERT_HEAD(&bt->pending_ccbs, &ccb->ccb_h, sim_links.le); - callout_reset(&bccb->timer, (ccb->ccb_h.timeout * hz) / 1000, - bttimeout, bccb); + callout_reset_sbt(&bccb->timer, SBT_1MS * ccb->ccb_h.timeout, 0, + bttimeout, bccb, 0); /* Tell the adapter about this command */ bt->cur_outbox->ccb_addr = btccbvtop(bt, bccb); @@ -1602,9 +1602,9 @@ btdone(struct bt_softc *bt, struct bt_cc ccb_h = LIST_NEXT(ccb_h, sim_links.le); btdone(bt, pending_bccb, BMBI_ERROR); } else { - callout_reset(&pending_bccb->timer, - (ccb_h->timeout * hz) / 1000, - bttimeout, pending_bccb); + callout_reset_sbt(&pending_bccb->timer, + SBT_1MS * ccb_h->timeout, 0, bttimeout, + pending_bccb, 0); ccb_h = LIST_NEXT(ccb_h, sim_links.le); } } Modified: stable/10/sys/dev/ciss/ciss.c ============================================================================== --- stable/10/sys/dev/ciss/ciss.c Sun Dec 21 03:00:44 2014 (r275981) +++ stable/10/sys/dev/ciss/ciss.c Sun Dec 21 03:06:11 2014 (r275982) @@ -2414,7 +2414,8 @@ ciss_wait_request(struct ciss_request *c return(error); while ((cr->cr_flags & CISS_REQ_SLEEP) && (error != EWOULDBLOCK)) { - error = msleep(cr, &cr->cr_sc->ciss_mtx, PRIBIO, "cissREQ", (timeout * hz) / 1000); + error = msleep_sbt(cr, &cr->cr_sc->ciss_mtx, PRIBIO, "cissREQ", + SBT_1MS * timeout, 0, 0); } return(error); } Modified: stable/10/sys/dev/dpt/dpt_scsi.c ============================================================================== --- stable/10/sys/dev/dpt/dpt_scsi.c Sun Dec 21 03:00:44 2014 (r275981) +++ stable/10/sys/dev/dpt/dpt_scsi.c Sun Dec 21 03:06:11 2014 (r275982) @@ -793,8 +793,8 @@ dptexecuteccb(void *arg, bus_dma_segment dccb->state |= DCCB_ACTIVE; ccb->ccb_h.status |= CAM_SIM_QUEUED; LIST_INSERT_HEAD(&dpt->pending_ccb_list, &ccb->ccb_h, sim_links.le); - callout_reset(&dccb->timer, (ccb->ccb_h.timeout * hz) / 1000, - dpttimeout, dccb); + callout_reset_sbt(&dccb->timer, SBT_1MS * ccb->ccb_h.timeout, 0, + dpttimeout, dccb, 0); if (dpt_send_eata_command(dpt, &dccb->eata_ccb, dccb->eata_ccb.cp_busaddr, EATA_CMD_DMA_SEND_CP, 0, 0, 0, 0) != 0) { Modified: stable/10/sys/dev/firewire/sbp.c ============================================================================== --- stable/10/sys/dev/firewire/sbp.c Sun Dec 21 03:00:44 2014 (r275981) +++ stable/10/sys/dev/firewire/sbp.c Sun Dec 21 03:06:11 2014 (r275982) @@ -1058,8 +1058,8 @@ static __inline void sbp_scan_dev(struct sbp_dev *sdev) { sdev->status = SBP_DEV_PROBE; - callout_reset(&sdev->target->scan_callout, scan_delay * hz / 1000, - sbp_cam_scan_target, (void *)sdev->target); + callout_reset_sbt(&sdev->target->scan_callout, SBT_1MS * scan_delay, 0, + sbp_cam_scan_target, (void *)sdev->target, 0); } static void @@ -1427,7 +1427,7 @@ END_DEBUG start: target->mgm_ocb_cur = ocb; - callout_reset(&target->mgm_ocb_timeout, 5*hz, + callout_reset(&target->mgm_ocb_timeout, 5 * hz, sbp_mgm_timeout, (caddr_t)ocb); xfer = sbp_write_cmd(sdev, FWTCODE_WREQB, 0); if(xfer == NULL){ @@ -2779,9 +2779,11 @@ END_DEBUG prev2 = prev = STAILQ_LAST(&sdev->ocbs, sbp_ocb, ocb); STAILQ_INSERT_TAIL(&sdev->ocbs, ocb, ocb); - if (ocb->ccb != NULL) - callout_reset(&ocb->timer, (ocb->ccb->ccb_h.timeout * hz) / 1000, - sbp_timeout, ocb); + if (ocb->ccb != NULL) { + callout_reset_sbt(&ocb->timer, + SBT_1MS * ocb->ccb->ccb_h.timeout, 0, sbp_timeout, + ocb, 0); + } if (use_doorbell && prev == NULL) prev2 = sdev->last_ocb; Modified: stable/10/sys/dev/glxiic/glxiic.c ============================================================================== --- stable/10/sys/dev/glxiic/glxiic.c Sun Dec 21 03:00:44 2014 (r275981) +++ stable/10/sys/dev/glxiic/glxiic.c Sun Dec 21 03:06:11 2014 (r275982) @@ -562,8 +562,8 @@ glxiic_start_timeout_locked(struct glxii GLXIIC_ASSERT_LOCKED(sc); - callout_reset(&sc->callout, sc->timeout * 1000 / hz, glxiic_timeout, - sc); + callout_reset_sbt(&sc->callout, SBT_1MS * sc->timeout, 0, + glxiic_timeout, sc, 0); } static void Modified: stable/10/sys/dev/hpt27xx/hpt27xx_os_bsd.c ============================================================================== --- stable/10/sys/dev/hpt27xx/hpt27xx_os_bsd.c Sun Dec 21 03:00:44 2014 (r275981) +++ stable/10/sys/dev/hpt27xx/hpt27xx_os_bsd.c Sun Dec 21 03:06:11 2014 (r275982) @@ -289,8 +289,8 @@ void os_request_timer(void * osext, HPT HPT_ASSERT(vbus_ext->ext_type==EXT_TYPE_VBUS); - callout_reset(&vbus_ext->timer, interval * hz / 1000000, - os_timer_for_ldm, vbus_ext); + callout_reset_sbt(&vbus_ext->timer, SBT_1US * interval, 0, + os_timer_for_ldm, vbus_ext, 0); } HPT_TIME os_query_time(void) Modified: stable/10/sys/dev/hptnr/hptnr_os_bsd.c ============================================================================== --- stable/10/sys/dev/hptnr/hptnr_os_bsd.c Sun Dec 21 03:00:44 2014 (r275981) +++ stable/10/sys/dev/hptnr/hptnr_os_bsd.c Sun Dec 21 03:06:11 2014 (r275982) @@ -235,8 +235,8 @@ void os_request_timer(void * osext, HPT HPT_ASSERT(vbus_ext->ext_type==EXT_TYPE_VBUS); - callout_reset(&vbus_ext->timer, interval * hz / 1000000, - os_timer_for_ldm, vbus_ext); + callout_reset_sbt(&vbus_ext->timer, SBT_1US * interval, 0, + os_timer_for_ldm, vbus_ext, 0); } HPT_TIME os_query_time(void) Modified: stable/10/sys/dev/hptrr/hptrr_os_bsd.c ============================================================================== --- stable/10/sys/dev/hptrr/hptrr_os_bsd.c Sun Dec 21 03:00:44 2014 (r275981) +++ stable/10/sys/dev/hptrr/hptrr_os_bsd.c Sun Dec 21 03:06:11 2014 (r275982) @@ -221,8 +221,8 @@ void os_request_timer(void * osext, HPT HPT_ASSERT(vbus_ext->ext_type==EXT_TYPE_VBUS); - callout_reset(&vbus_ext->timer, interval * hz / 1000000, - os_timer_for_ldm, vbus_ext); + callout_reset_sbt(&vbus_ext->timer, SBT_1US * interval, 0, + os_timer_for_ldm, vbus_ext, 0); } HPT_TIME os_query_time(void) Modified: stable/10/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c ============================================================================== --- stable/10/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c Sun Dec 21 03:00:44 2014 (r275981) +++ stable/10/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c Sun Dec 21 03:06:11 2014 (r275982) @@ -983,9 +983,8 @@ storvsc_timeout(void *arg) mtx_unlock(&sc->hs_lock); reqp->retries++; - callout_reset(&reqp->callout, - (ccb->ccb_h.timeout * hz) / 1000, - storvsc_timeout, reqp); + callout_reset_sbt(&reqp->callout, SBT_1MS * ccb->ccb_h.timeout, + 0, storvsc_timeout, reqp, 0); #if HVS_TIMEOUT_TEST storvsc_timeout_test(reqp, SEND_DIAGNOSTIC, 0); #endif @@ -1158,9 +1157,9 @@ storvsc_action(struct cam_sim *sim, unio if (ccb->ccb_h.timeout != CAM_TIME_INFINITY) { callout_init(&reqp->callout, CALLOUT_MPSAFE); - callout_reset(&reqp->callout, - (ccb->ccb_h.timeout * hz) / 1000, - storvsc_timeout, reqp); + callout_reset_sbt(&reqp->callout, + SBT_1MS * ccb->ccb_h.timeout, 0, + storvsc_timeout, reqp, 0); #if HVS_TIMEOUT_TEST cv_init(&reqp->event.cv, "storvsc timeout cv"); mtx_init(&reqp->event.mtx, "storvsc timeout mutex", Modified: stable/10/sys/dev/iir/iir.c ============================================================================== --- stable/10/sys/dev/iir/iir.c Sun Dec 21 03:00:44 2014 (r275981) +++ stable/10/sys/dev/iir/iir.c Sun Dec 21 03:06:11 2014 (r275982) @@ -267,7 +267,7 @@ iir_init(struct gdt_softc *gdt) &gccb->gc_dmamap) != 0) return(1); gccb->gc_map_flag = TRUE; - gccb->gc_scratch = &gdt->sc_gcscratch[GDT_SCRATCH_SZ * i]; + gccb->gc_scratch = &gdt->sc_gcscratch[GDT_SCRATCH_SZ * i]; gccb->gc_scratch_busbase = gdt->sc_gcscratch_busbase + GDT_SCRATCH_SZ * i; callout_init_mtx(&gccb->gc_timeout, &gdt->sc_lock, 0); SLIST_INSERT_HEAD(&gdt->sc_free_gccb, gccb, sle); @@ -1234,8 +1234,8 @@ gdtexecuteccb(void *arg, bus_dma_segment ccb->ccb_h.status |= CAM_SIM_QUEUED; /* timeout handling */ - callout_reset(&gccb->gc_timeout, (ccb->ccb_h.timeout * hz) / 1000, - iir_timeout, gccb); + callout_reset_sbt(&gccb->gc_timeout, SBT_1MS * ccb->ccb_h.timeout, 0, + iir_timeout, (caddr_t)gccb, 0); gdt->sc_copy_cmd(gdt, gccb); } Modified: stable/10/sys/dev/isci/isci_io_request.c ============================================================================== --- stable/10/sys/dev/isci/isci_io_request.c Sun Dec 21 03:00:44 2014 (r275981) +++ stable/10/sys/dev/isci/isci_io_request.c Sun Dec 21 03:06:11 2014 (r275982) @@ -731,8 +731,9 @@ isci_io_request_construct(void *arg, bus } if (ccb->ccb_h.timeout != CAM_TIME_INFINITY) - callout_reset(&io_request->parent.timer, ccb->ccb_h.timeout, - isci_io_request_timeout, io_request); + callout_reset_sbt(&io_request->parent.timer, + SBT_1MS * ccb->ccb_h.timeout, 0, isci_io_request_timeout, + io_request, 0); } void @@ -983,7 +984,8 @@ isci_io_request_execute_smp_io(union ccb } if (ccb->ccb_h.timeout != CAM_TIME_INFINITY) - callout_reset(&io_request->parent.timer, ccb->ccb_h.timeout, - isci_io_request_timeout, request); + callout_reset_sbt(&io_request->parent.timer, + SBT_1MS * ccb->ccb_h.timeout, 0, isci_io_request_timeout, + request, 0); } #endif Modified: stable/10/sys/dev/isci/isci_timer.c ============================================================================== --- stable/10/sys/dev/isci/isci_timer.c Sun Dec 21 03:00:44 2014 (r275981) +++ stable/10/sys/dev/isci/isci_timer.c Sun Dec 21 03:06:11 2014 (r275982) @@ -79,8 +79,8 @@ scif_cb_timer_start(SCI_CONTROLLER_HANDL isci_timer->is_started = TRUE; isci_log_message(3, "TIMER", "start %p %d\n", timer, milliseconds); - callout_reset(&isci_timer->callout, (milliseconds * hz)/1000, - isci_timer_timeout, timer); + callout_reset_sbt(&isci_timer->callout, SBT_1MS * milliseconds, 0, + isci_timer_timeout, timer, 0); } /** Modified: stable/10/sys/dev/mpr/mpr_sas.c ============================================================================== --- stable/10/sys/dev/mpr/mpr_sas.c Sun Dec 21 03:00:44 2014 (r275981) +++ stable/10/sys/dev/mpr/mpr_sas.c Sun Dec 21 03:06:11 2014 (r275982) @@ -1905,8 +1905,8 @@ mprsas_action_scsiio(struct mprsas_softc cm->cm_desc.SCSIIO.DevHandle = htole16(targ->handle); } - callout_reset(&cm->cm_callout, (ccb->ccb_h.timeout * hz) / 1000, - mprsas_scsiio_timeout, cm); + callout_reset_sbt(&cm->cm_callout, SBT_1MS * ccb->ccb_h.timeout, 0, + mprsas_scsiio_timeout, cm, 0); targ->issued++; targ->outstanding++; Modified: stable/10/sys/dev/mps/mps_sas.c ============================================================================== --- stable/10/sys/dev/mps/mps_sas.c Sun Dec 21 03:00:44 2014 (r275981) +++ stable/10/sys/dev/mps/mps_sas.c Sun Dec 21 03:06:11 2014 (r275982) @@ -1841,8 +1841,8 @@ mpssas_action_scsiio(struct mpssas_softc } } - callout_reset(&cm->cm_callout, (ccb->ccb_h.timeout * hz) / 1000, - mpssas_scsiio_timeout, cm); + callout_reset_sbt(&cm->cm_callout, SBT_1MS * ccb->ccb_h.timeout, 0, + mpssas_scsiio_timeout, cm, 0); targ->issued++; targ->outstanding++; Modified: stable/10/sys/dev/mpt/mpt.c ============================================================================== --- stable/10/sys/dev/mpt/mpt.c Sun Dec 21 03:00:44 2014 (r275981) +++ stable/10/sys/dev/mpt/mpt.c Sun Dec 21 03:06:11 2014 (r275982) @@ -1320,17 +1320,19 @@ mpt_wait_req(struct mpt_softc *mpt, requ mpt_req_state_t state, mpt_req_state_t mask, int sleep_ok, int time_ms) { - int error; int timeout; u_int saved_cnt; + sbintime_t sbt; /* - * timeout is in ms. 0 indicates infinite wait. - * Convert to ticks or 500us units depending on + * time_ms is in ms, 0 indicates infinite wait. + * Convert to sbintime_t or 500us units depending on * our sleep mode. */ if (sleep_ok != 0) { - timeout = (time_ms * hz) / 1000; + sbt = SBT_1MS * time_ms; + /* Set timeout as well so final timeout check works. */ + timeout = time_ms; } else { timeout = time_ms * 2; } @@ -1339,8 +1341,8 @@ mpt_wait_req(struct mpt_softc *mpt, requ saved_cnt = mpt->reset_cnt; while ((req->state & mask) != state && mpt->reset_cnt == saved_cnt) { if (sleep_ok != 0) { - error = mpt_sleep(mpt, req, PUSER, "mptreq", timeout); - if (error == EWOULDBLOCK) { + if (mpt_sleep(mpt, req, PUSER, "mptreq", sbt) == + EWOULDBLOCK) { timeout = 0; break; } Modified: stable/10/sys/dev/mpt/mpt.h ============================================================================== --- stable/10/sys/dev/mpt/mpt.h Sun Dec 21 03:00:44 2014 (r275981) +++ stable/10/sys/dev/mpt/mpt.h Sun Dec 21 03:06:11 2014 (r275982) @@ -771,10 +771,10 @@ mpt_assign_serno(struct mpt_softc *mpt, #define MPT_UNLOCK(mpt) mtx_unlock(&(mpt)->mpt_lock) #define MPT_OWNED(mpt) mtx_owned(&(mpt)->mpt_lock) #define MPT_LOCK_ASSERT(mpt) mtx_assert(&(mpt)->mpt_lock, MA_OWNED) -#define mpt_sleep(mpt, ident, priority, wmesg, timo) \ - msleep(ident, &(mpt)->mpt_lock, priority, wmesg, timo) -#define mpt_req_timeout(req, ticks, func, arg) \ - callout_reset(&(req)->callout, (ticks), (func), (arg)) +#define mpt_sleep(mpt, ident, priority, wmesg, sbt) \ + msleep_sbt(ident, &(mpt)->mpt_lock, priority, wmesg, sbt, 0, 0) +#define mpt_req_timeout(req, sbt, func, arg) \ + callout_reset_sbt(&(req)->callout, (sbt), 0, (func), (arg), 0) #define mpt_req_untimeout(req, func, arg) \ callout_stop(&(req)->callout) #define mpt_callout_init(mpt, c) \ Modified: stable/10/sys/dev/mpt/mpt_cam.c ============================================================================== --- stable/10/sys/dev/mpt/mpt_cam.c Sun Dec 21 03:00:44 2014 (r275981) +++ stable/10/sys/dev/mpt/mpt_cam.c Sun Dec 21 03:06:11 2014 (r275982) @@ -1630,7 +1630,7 @@ out: ccb->ccb_h.status |= CAM_SIM_QUEUED; if (ccb->ccb_h.timeout != CAM_TIME_INFINITY) { - mpt_req_timeout(req, (ccb->ccb_h.timeout * hz) / 1000, + mpt_req_timeout(req, SBT_1MS * ccb->ccb_h.timeout, mpt_timeout, ccb); } if (mpt->verbose > MPT_PRT_DEBUG) { @@ -2016,7 +2016,7 @@ out: ccb->ccb_h.status |= CAM_SIM_QUEUED; if (ccb->ccb_h.timeout != CAM_TIME_INFINITY) { - mpt_req_timeout(req, (ccb->ccb_h.timeout * hz) / 1000, + mpt_req_timeout(req, SBT_1MS * ccb->ccb_h.timeout, mpt_timeout, ccb); } if (mpt->verbose > MPT_PRT_DEBUG) { @@ -4752,7 +4752,7 @@ mpt_scsi_tgt_status(struct mpt_softc *mp req->serno, tgt->resid); if (ccb) { ccb->ccb_h.status = CAM_SIM_QUEUED | CAM_REQ_INPROG; - mpt_req_timeout(req, 60 * hz, mpt_timeout, ccb); + mpt_req_timeout(req, SBT_1S * 60, mpt_timeout, ccb); } mpt_send_cmd(mpt, req); } Modified: stable/10/sys/dev/mrsas/mrsas_cam.c ============================================================================== --- stable/10/sys/dev/mrsas/mrsas_cam.c Sun Dec 21 03:00:44 2014 (r275981) +++ stable/10/sys/dev/mrsas/mrsas_cam.c Sun Dec 21 03:06:11 2014 (r275982) @@ -378,8 +378,8 @@ mrsas_scsiio_timeout(void *data) * on OCR enable/disable property of Controller from ocr_thread * context. */ - callout_reset(&cmd->cm_callout, (600000 * hz) / 1000, - mrsas_scsiio_timeout, cmd); + callout_reset_sbt(&cmd->cm_callout, SBT_1S * 600, 0, + mrsas_scsiio_timeout, cmd, 0); sc->do_timedout_reset = 1; if (sc->ocr_thread_active) wakeup(&sc->ocr_chan); @@ -530,8 +530,8 @@ mrsas_startio(struct mrsas_softc *sc, st /* * Start timer for IO timeout. Default timeout value is 90 second. */ - callout_reset(&cmd->cm_callout, (sc->mrsas_io_timeout * hz) / 1000, - mrsas_scsiio_timeout, cmd); + callout_reset_sbt(&cmd->cm_callout, SBT_1MS * sc->mrsas_io_timeout, 0, + mrsas_scsiio_timeout, cmd, 0); mrsas_atomic_inc(&sc->fw_outstanding); if (mrsas_atomic_read(&sc->fw_outstanding) > sc->io_cmds_highwater) Modified: stable/10/sys/dev/mvs/mvs.c ============================================================================== --- stable/10/sys/dev/mvs/mvs.c Sun Dec 21 03:00:44 2014 (r275981) +++ stable/10/sys/dev/mvs/mvs.c Sun Dec 21 03:06:11 2014 (r275982) @@ -1416,8 +1416,8 @@ mvs_legacy_execute_transaction(struct mv } } /* Start command execution timeout */ - callout_reset(&slot->timeout, (int)ccb->ccb_h.timeout * hz / 1000, - (timeout_t*)mvs_timeout, slot); + callout_reset_sbt(&slot->timeout, SBT_1MS * ccb->ccb_h.timeout, 0, + (timeout_t*)mvs_timeout, slot, 0); } /* Must be called with channel locked. */ @@ -1530,8 +1530,8 @@ mvs_execute_transaction(struct mvs_slot ATA_OUTL(ch->r_mem, EDMA_REQQIP, ch->dma.workrq_bus + MVS_CRQB_OFFSET + (MVS_CRQB_SIZE * ch->out_idx)); /* Start command execution timeout */ - callout_reset(&slot->timeout, (int)ccb->ccb_h.timeout * hz / 1000, - (timeout_t*)mvs_timeout, slot); + callout_reset_sbt(&slot->timeout, SBT_1MS * ccb->ccb_h.timeout, 0, + (timeout_t*)mvs_timeout, slot, 0); return; } @@ -1568,9 +1568,9 @@ mvs_rearm_timeout(device_t dev) continue; if ((ch->toslots & (1 << i)) == 0) continue; - callout_reset(&slot->timeout, - (int)slot->ccb->ccb_h.timeout * hz / 2000, - (timeout_t*)mvs_timeout, slot); + callout_reset_sbt(&slot->timeout, + SBT_1MS * slot->ccb->ccb_h.timeout / 2, 0, + (timeout_t*)mvs_timeout, slot, 0); } } Modified: stable/10/sys/dev/siis/siis.c ============================================================================== --- stable/10/sys/dev/siis/siis.c Sun Dec 21 03:00:44 2014 (r275981) +++ stable/10/sys/dev/siis/siis.c Sun Dec 21 03:06:11 2014 (r275982) @@ -1119,8 +1119,8 @@ siis_execute_transaction(struct siis_slo ATA_OUTL(ch->r_mem, SIIS_P_CACTL(slot->slot), prb_bus); ATA_OUTL(ch->r_mem, SIIS_P_CACTH(slot->slot), prb_bus >> 32); /* Start command execution timeout */ - callout_reset(&slot->timeout, (int)ccb->ccb_h.timeout * hz / 1000, - (timeout_t*)siis_timeout, slot); + callout_reset_sbt(&slot->timeout, SBT_1MS * ccb->ccb_h.timeout, 0, + (timeout_t*)siis_timeout, slot, 0); return; } @@ -1161,9 +1161,9 @@ siis_rearm_timeout(device_t dev) continue; if ((ch->toslots & (1 << i)) == 0) continue; - callout_reset(&slot->timeout, - (int)slot->ccb->ccb_h.timeout * hz / 1000, - (timeout_t*)siis_timeout, slot); + callout_reset_sbt(&slot->timeout, + SBT_1MS * slot->ccb->ccb_h.timeout, 0, + (timeout_t*)siis_timeout, slot, 0); } } Modified: stable/10/sys/dev/sym/sym_hipd.c ============================================================================== --- stable/10/sys/dev/sym/sym_hipd.c Sun Dec 21 03:00:44 2014 (r275981) +++ stable/10/sys/dev/sym/sym_hipd.c Sun Dec 21 03:06:11 2014 (r275982) @@ -2335,8 +2335,8 @@ static void sym_enqueue_cam_ccb(ccb_p cp assert(!(ccb->ccb_h.status & CAM_SIM_QUEUED)); ccb->ccb_h.status = CAM_REQ_INPROG; - callout_reset(&cp->ch, ccb->ccb_h.timeout * hz / 1000, sym_callout, - (caddr_t) ccb); + callout_reset_sbt(&cp->ch, SBT_1MS * ccb->ccb_h.timeout, 0, sym_callout, + (caddr_t)ccb, 0); ccb->ccb_h.status |= CAM_SIM_QUEUED; ccb->ccb_h.sym_hcb_ptr = np; Modified: stable/10/sys/dev/trm/trm.c ============================================================================== --- stable/10/sys/dev/trm/trm.c Sun Dec 21 03:00:44 2014 (r275981) +++ stable/10/sys/dev/trm/trm.c Sun Dec 21 03:06:11 2014 (r275982) @@ -473,10 +473,6 @@ trm_ExecuteSRB(void *arg, bus_dma_segmen return; } ccb->ccb_h.status |= CAM_SIM_QUEUED; -#if 0 - /* XXX Need a timeout handler */ - ccb->ccb_h.timeout_ch = timeout(trmtimeout, (caddr_t)srb, (ccb->ccb_h.timeout * hz) / 1000); -#endif trm_SendSRB(pACB, pSRB); splx(flags); return; Modified: stable/10/sys/dev/tws/tws_cam.c ============================================================================== --- stable/10/sys/dev/tws/tws_cam.c Sun Dec 21 03:00:44 2014 (r275981) +++ stable/10/sys/dev/tws/tws_cam.c Sun Dec 21 03:06:11 2014 (r275982) @@ -747,7 +747,8 @@ tws_execute_scsi(struct tws_softc *sc, u * and submit the I/O. */ sc->stats.scsi_ios++; - callout_reset(&req->timeout, (ccb_h->timeout * hz) / 1000, tws_timeout, req); + callout_reset_sbt(&req->timeout, SBT_1MS * ccb->ccb_h.timeout, 0, + tws_timeout, req, 0); error = tws_map_request(sc, req); return(error); } Modified: stable/10/sys/dev/virtio/scsi/virtio_scsi.c ============================================================================== --- stable/10/sys/dev/virtio/scsi/virtio_scsi.c Sun Dec 21 03:00:44 2014 (r275981) +++ stable/10/sys/dev/virtio/scsi/virtio_scsi.c Sun Dec 21 03:06:11 2014 (r275982) @@ -1087,8 +1087,8 @@ vtscsi_execute_scsi_cmd(struct vtscsi_so if (ccbh->timeout != CAM_TIME_INFINITY) { req->vsr_flags |= VTSCSI_REQ_FLAG_TIMEOUT_SET; - callout_reset(&req->vsr_callout, ccbh->timeout * hz / 1000, - vtscsi_timedout_scsi_cmd, req); + callout_reset_sbt(&req->vsr_callout, SBT_1MS * ccbh->timeout, + 0, vtscsi_timedout_scsi_cmd, req, 0); } vtscsi_dprintf_req(req, VTSCSI_TRACE, "enqueued req=%p ccb=%p\n", From owner-svn-src-all@FreeBSD.ORG Sun Dec 21 04:48:55 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E5CBBAF8; Sun, 21 Dec 2014 04:48:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B84BC1D91; Sun, 21 Dec 2014 04:48:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBL4mtT5075953; Sun, 21 Dec 2014 04:48:55 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBL4mtbt075952; Sun, 21 Dec 2014 04:48:55 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201412210448.sBL4mtbt075952@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 21 Dec 2014 04:48:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275983 - head/sys/net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2014 04:48:56 -0000 Author: adrian Date: Sun Dec 21 04:48:54 2014 New Revision: 275983 URL: https://svnweb.freebsd.org/changeset/base/275983 Log: Break out the unicast/multicast TIM bit setting into "set something that indicates we have traffic" bit and a "do something if we have traffic bit." I'm going to be fleshing out this stuff more over time and it'll make more sense to have it broken out into two pieces here. Modified: head/sys/net80211/ieee80211_sta.c Modified: head/sys/net80211/ieee80211_sta.c ============================================================================== --- head/sys/net80211/ieee80211_sta.c Sun Dec 21 03:06:11 2014 (r275982) +++ head/sys/net80211/ieee80211_sta.c Sun Dec 21 04:48:54 2014 (r275983) @@ -1405,6 +1405,7 @@ sta_recv_mgmt(struct ieee80211_node *ni, int ix = aid / NBBY; int min = tim->tim_bitctl &~ 1; int max = tim->tim_len + min - 4; + int tim_ucast = 0, tim_mcast = 0; /* * Only do this for unicast traffic in the TIM @@ -1414,20 +1415,42 @@ sta_recv_mgmt(struct ieee80211_node *ni, */ if (min <= ix && ix <= max && isset(tim->tim_bitmap - min, aid)) { - ieee80211_sta_tim_notify(vap, 1); - ic->ic_lastdata = ticks; + tim_ucast = 1; } /* - * XXX TODO: do a separate notification + * Do a separate notification * for the multicast bit being set. */ -#if 0 if (tim->tim_bitctl & 1) { + tim_mcast = 1; + } + + /* + * If the TIM indicates there's traffic for + * us then get us out of STA mode powersave. + */ + if (tim_ucast == 1) { + + /* + * Wake us out of SLEEP state if we're + * in it; and if we're doing bgscan + * then wake us out of STA powersave. + */ ieee80211_sta_tim_notify(vap, 1); + + /* + * This is preventing us from + * continuing a bgscan; because it + * tricks the contbgscan() + * routine to think there's always + * traffic for us. + * + * I think we need both an RX and + * TX ic_lastdata field. + */ ic->ic_lastdata = ticks; } -#endif ni->ni_dtim_count = tim->tim_count; ni->ni_dtim_period = tim->tim_period; From owner-svn-src-all@FreeBSD.ORG Sun Dec 21 04:58:47 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 012E5C84; Sun, 21 Dec 2014 04:58:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D70F51E8E; Sun, 21 Dec 2014 04:58:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBL4wkOQ080568; Sun, 21 Dec 2014 04:58:46 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBL4wkfd080567; Sun, 21 Dec 2014 04:58:46 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201412210458.sBL4wkfd080567@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 21 Dec 2014 04:58:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275984 - head/sys/net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2014 04:58:47 -0000 Author: adrian Date: Sun Dec 21 04:58:45 2014 New Revision: 275984 URL: https://svnweb.freebsd.org/changeset/base/275984 Log: Update ieee80211_sta_tim_notify() to do double duty - handle STA sleep to awake transition as well as handle waking up a VAP in STA powersave mode if it's in bgscan. This was a reasonably hairy bug to try and figure out and it became more obvious because of stuff I've done. Specifically: * a NIC would go into bgscan mode - either because of a bgscan timer or wpa_supplicant asked it to; * the AP would indicate there's traffic for the STA by setting the TIM bitmap bit for it; * mindwell would be met during scan, so it'd wake up and break out of the scan loop in scan_task(), but * because the scan wasn't completed, it wouldn't bring the VAP out of STA mode powersave (so it wouldn't tell the AP about it and it would block VAP TX); * .. but because we kept seeing the TIM bit set, ic->ic_lastdata was being constantly updated, and .. * bgscancont() would thus never say "yes we can continue a bgscan" so the bgscan would hang and never make progress. Now, I do see this particular state occur on iwn(4) - /however/ - this NIC has the firmware call ieee80211_scan_next() once the firmware scan for that channel has completed. This has the effect of moving the scan along to the next channel. I do see the debug that I'm adding where we see a beacon with a TIM bit set whilst we're in bgscan, so the condition about waking up to receive traffic is triggering. It just won't cause a hang. For other NICs - all of the USB ones and at least ath(4) - ieee80211_scan_next() / ieee80211_scan_done() isn't called. So it relies upon the mindwell timer, the beacon receive and the beacon / probe response -> ieee80211_add_scan() to move along the scan state. In the above case, mindwell triggered, there's no beacons triggering the scan_add code to move things along, and we weren't waking things up when seeing the TIM set for us. So it just hung until the interface was dropped. So, the short-term fix here is to do what the comment in scan_task() says - if we are in bgscan mode and we see our TIM bit set, just wake up the VAP. If it's already awake then it's a nop. If we're awake then we transition to awake and handle the traffic. Once there's no TX or RX traffic going on, ic->ic_lastdata won't be updated anymore and bgscancont() will continue. This was triggered more often after my initial SLEEP state handling for software sleep states - because now I update ic->ic_lastdata upon seeing a TIM bit set, not just the RX of the subsequent traffic. That's needed so the thing doesn't ping-pong up and down between seeing the TIM bit set, sending the "I'm awake" NULL data frame, and starting to receive data from the AP. I'd like to subsequently split ic_lastdata into two - one for TX and one for RX - so it becomes easier to use the correct one (or both!) when making decisions like whether to scan, go to sleep, etc. I'd appreciate this getting some further testing. Tested: * rsu(4), STA mode, bgscan on * iwn(4), STA mode, bgscan on Modified: head/sys/net80211/ieee80211_power.c Modified: head/sys/net80211/ieee80211_power.c ============================================================================== --- head/sys/net80211/ieee80211_power.c Sun Dec 21 04:48:54 2014 (r275983) +++ head/sys/net80211/ieee80211_power.c Sun Dec 21 04:58:45 2014 (r275984) @@ -560,10 +560,15 @@ ieee80211_sta_pwrsave(struct ieee80211va * Handle being notified that we have data available for us in a TIM/ATIM. * * This may schedule a transition from _SLEEP -> _RUN if it's appropriate. + * + * In STA mode, we may have put to sleep during scan and need to be dragged + * back out of powersave mode. */ void ieee80211_sta_tim_notify(struct ieee80211vap *vap, int set) { + struct ieee80211com *ic = vap->iv_ic; + /* * Schedule the driver state change. It'll happen at some point soon. * Since the hardware shouldn't know that we're running just yet @@ -574,10 +579,24 @@ ieee80211_sta_tim_notify(struct ieee8021 * XXX TODO: verify that the transition to RUN will wake up the * BSS node! */ - IEEE80211_DPRINTF(vap, IEEE80211_MSG_POWER, "%s: TIM=%d\n", __func__, set); IEEE80211_LOCK(vap->iv_ic); if (set == 1 && vap->iv_state == IEEE80211_S_SLEEP) { ieee80211_new_state_locked(vap, IEEE80211_S_RUN, 0); + IEEE80211_DPRINTF(vap, IEEE80211_MSG_POWER, + "%s: TIM=%d; wakeup\n", __func__, set); + } else if ((set == 1) && (ic->ic_flags_ext & IEEE80211_FEXT_BGSCAN)) { + /* + * XXX only do this if we're in RUN state? + */ + IEEE80211_DPRINTF(vap, IEEE80211_MSG_POWER, + "%s: wake up from bgscan vap sleep\n", + __func__); + /* + * We may be in BGSCAN mode - this means the VAP is is in STA + * mode powersave. If it is, we need to wake it up so we + * can process outbound traffic. + */ + vap->iv_sta_ps(vap, 0); } IEEE80211_UNLOCK(vap->iv_ic); } From owner-svn-src-all@FreeBSD.ORG Sun Dec 21 05:07:14 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5D289E06; Sun, 21 Dec 2014 05:07:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3EC321F97; Sun, 21 Dec 2014 05:07:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBL57Eeq085429; Sun, 21 Dec 2014 05:07:14 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBL57CXS085418; Sun, 21 Dec 2014 05:07:12 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201412210507.sBL57CXS085418@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 21 Dec 2014 05:07:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275985 - in head/sys: i386/xen kern netinet sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2014 05:07:14 -0000 Author: imp Date: Sun Dec 21 05:07:11 2014 New Revision: 275985 URL: https://svnweb.freebsd.org/changeset/base/275985 Log: Where appropriate, use the modern terms for the one true time base (UTC) rather than the archaic (GMT) in comments. Except where the comments are making fun of people doing this (and pedants who insist on the new terms). Modified: head/sys/i386/xen/clock.c head/sys/kern/subr_fattime.c head/sys/netinet/in_systm.h head/sys/netinet/ip_icmp.c head/sys/netinet/ip_icmp.h head/sys/sys/sem.h head/sys/sys/time.h Modified: head/sys/i386/xen/clock.c ============================================================================== --- head/sys/i386/xen/clock.c Sun Dec 21 04:58:45 2014 (r275984) +++ head/sys/i386/xen/clock.c Sun Dec 21 05:07:11 2014 (r275985) @@ -118,7 +118,7 @@ struct mtx clock_lock; #define RTC_UNLOCK mtx_unlock_spin(&clock_lock) #define NS_PER_TICK (1000000000ULL/hz) -int adjkerntz; /* local offset from GMT in seconds */ +int adjkerntz; /* local offset from UTC in seconds */ int clkintr_pending; int pscnt = 1; int psdiv = 1; Modified: head/sys/kern/subr_fattime.c ============================================================================== --- head/sys/kern/subr_fattime.c Sun Dec 21 04:58:45 2014 (r275984) +++ head/sys/kern/subr_fattime.c Sun Dec 21 05:07:11 2014 (r275985) @@ -45,7 +45,7 @@ * Later on again, in Windows NT, timestamps were defined relative to GMT. * * Purists will point out that UTC replaced GMT for such uses around - * a century ago, already then. Ironically "NT" was an abbreviation of + * half a century ago, already then. Ironically "NT" was an abbreviation of * "New Technology". Anyway... * * The 'utc' argument determines if the resulting FATTIME timestamp Modified: head/sys/netinet/in_systm.h ============================================================================== --- head/sys/netinet/in_systm.h Sun Dec 21 04:58:45 2014 (r275984) +++ head/sys/netinet/in_systm.h Sun Dec 21 05:07:11 2014 (r275985) @@ -44,12 +44,15 @@ * Internally the system keeps counters in the headers with the bytes * swapped so that VAX instructions will work on them. It reverses * the bytes before transmission at each protocol level. The n_ types - * represent the types with the bytes in ``high-ender'' order. + * represent the types with the bytes in ``high-ender'' order. Network + * byte order is usually referered to as big-endian these days rather + * than high-ender, which sadly invokes an Orson Scott Card novel, or + * worse, the movie. */ typedef u_int16_t n_short; /* short as received from the net */ typedef u_int32_t n_long; /* long as received from the net */ -typedef u_int32_t n_time; /* ms since 00:00 GMT, byte rev */ +typedef u_int32_t n_time; /* ms since 00:00 UTC, byte rev */ #ifdef _KERNEL uint32_t iptime(void); Modified: head/sys/netinet/ip_icmp.c ============================================================================== --- head/sys/netinet/ip_icmp.c Sun Dec 21 04:58:45 2014 (r275984) +++ head/sys/netinet/ip_icmp.c Sun Dec 21 05:07:11 2014 (r275985) @@ -861,7 +861,7 @@ icmp_send(struct mbuf *m, struct mbuf *o } /* - * Return milliseconds since 00:00 GMT in network format. + * Return milliseconds since 00:00 UTC in network format. */ uint32_t iptime(void) Modified: head/sys/netinet/ip_icmp.h ============================================================================== --- head/sys/netinet/ip_icmp.h Sun Dec 21 04:58:45 2014 (r275984) +++ head/sys/netinet/ip_icmp.h Sun Dec 21 05:07:11 2014 (r275985) @@ -99,7 +99,7 @@ struct icmp { struct id_ts { /* ICMP Timestamp */ /* * The next 3 fields are in network format, - * milliseconds since 00:00 GMT + * milliseconds since 00:00 UTC */ uint32_t its_otime; /* Originate */ uint32_t its_rtime; /* Receive */ Modified: head/sys/sys/sem.h ============================================================================== --- head/sys/sys/sem.h Sun Dec 21 04:58:45 2014 (r275984) +++ head/sys/sys/sem.h Sun Dec 21 05:07:11 2014 (r275985) @@ -37,7 +37,7 @@ struct semid_ds_old { long sem_pad1; /* SVABI/386 says I need this here */ time_t sem_ctime; /* last change time */ /* Times measured in secs since */ - /* 00:00:00 GMT, Jan. 1, 1970 */ + /* 00:00:00 UTC, Jan. 1, 1970, without leap seconds */ long sem_pad2; /* SVABI/386 says I need this here */ long sem_pad3[4]; /* SVABI/386 says I need this here */ }; @@ -50,7 +50,7 @@ struct semid_ds { time_t sem_otime; /* last operation time */ time_t sem_ctime; /* last change time */ /* Times measured in secs since */ - /* 00:00:00 GMT, Jan. 1, 1970 */ + /* 00:00:00 UTC, Jan. 1, 1970, without leap seconds */ }; /* Modified: head/sys/sys/time.h ============================================================================== --- head/sys/sys/time.h Sun Dec 21 04:58:45 2014 (r275984) +++ head/sys/sys/time.h Sun Dec 21 05:07:11 2014 (r275985) @@ -398,7 +398,7 @@ extern sbintime_t sbt_tickthreshold; * Functions containing "up" returns time relative to boot and * should be used for calculating time intervals. * - * Functions without "up" returns GMT time. + * Functions without "up" returns UTC time. * * Functions with the "get" prefix returns a less precise result * much faster than the functions without "get" prefix and should From owner-svn-src-all@FreeBSD.ORG Sun Dec 21 07:58:32 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 752DE693; Sun, 21 Dec 2014 07:58:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5DE59228B; Sun, 21 Dec 2014 07:58:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBL7wW8a065368; Sun, 21 Dec 2014 07:58:32 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBL7wTFv065356; Sun, 21 Dec 2014 07:58:29 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201412210758.sBL7wTFv065356@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Sun, 21 Dec 2014 07:58:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r275986 - in stable/10: lib/libc/sys sys/compat/freebsd32 sys/kern sys/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2014 07:58:32 -0000 Author: dchagin Date: Sun Dec 21 07:58:28 2014 New Revision: 275986 URL: https://svnweb.freebsd.org/changeset/base/275986 Log: MFC r274462: Add the ppoll() system call. Modified: stable/10/lib/libc/sys/Makefile.inc stable/10/lib/libc/sys/Symbol.map stable/10/lib/libc/sys/poll.2 stable/10/sys/compat/freebsd32/freebsd32_misc.c stable/10/sys/compat/freebsd32/syscalls.master stable/10/sys/kern/sys_generic.c stable/10/sys/kern/syscalls.master stable/10/sys/sys/poll.h stable/10/sys/sys/syscallsubr.h Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/sys/Makefile.inc ============================================================================== --- stable/10/lib/libc/sys/Makefile.inc Sun Dec 21 05:07:11 2014 (r275985) +++ stable/10/lib/libc/sys/Makefile.inc Sun Dec 21 07:58:28 2014 (r275986) @@ -356,6 +356,7 @@ MLINKS+=pdfork.2 pdgetpid.2\ pdfork.2 pdkill.2 \ pdfork.2 pdwait4.2 MLINKS+=pipe.2 pipe2.2 +MLINKS+=poll.2 ppoll.2 MLINKS+=read.2 pread.2 \ read.2 preadv.2 \ read.2 readv.2 Modified: stable/10/lib/libc/sys/Symbol.map ============================================================================== --- stable/10/lib/libc/sys/Symbol.map Sun Dec 21 05:07:11 2014 (r275985) +++ stable/10/lib/libc/sys/Symbol.map Sun Dec 21 07:58:28 2014 (r275986) @@ -399,6 +399,10 @@ FBSD_1.3 { wait6; }; +FBSD_1.4 { + ppoll; +}; + FBSDprivate_1.0 { ___acl_aclcheck_fd; __sys___acl_aclcheck_fd; @@ -821,6 +825,8 @@ FBSDprivate_1.0 { __sys_pipe; _poll; __sys_poll; + _ppoll; + __sys_ppoll; _preadv; __sys_preadv; _procctl; Modified: stable/10/lib/libc/sys/poll.2 ============================================================================== --- stable/10/lib/libc/sys/poll.2 Sun Dec 21 05:07:11 2014 (r275985) +++ stable/10/lib/libc/sys/poll.2 Sun Dec 21 07:58:28 2014 (r275986) @@ -28,7 +28,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd July 8, 2002 +.Dd November 13, 2014 .Dt POLL 2 .Os .Sh NAME @@ -40,6 +40,13 @@ .In poll.h .Ft int .Fn poll "struct pollfd fds[]" "nfds_t nfds" "int timeout" +.Ft int +.Fo ppoll +.Fa "struct pollfd fds[]" +.Fa "nfds_t nfds" +.Fa "const struct timespec * restrict timeout" +.Fa "const sigset_t * restrict newsigmask" +.Fc .Sh DESCRIPTION The .Fn poll @@ -139,6 +146,47 @@ If is zero, then .Fn poll will return without blocking. +.Pp +The +.Fn ppoll +system call, unlike +.Fn poll , +is used to safely wait until either a set of file descriptors becomes +ready or until a signal is caught. +The +.Fa fds +and +.Fa nfds +arguments are identical to the analogous arguments of +.Fn poll . +The +.Fa timeout +argument in +.Fn ppoll +points to a +.Vt "const struct timespec" +which is defined in +.In sys/timespec.h +(shown below) rather than the +.Vt "int timeout" +used by +.Fn poll . +A null pointer may be passed to indicate that +.Fn ppoll +should wait indefinitely. +Finally, +.Fa newsigmask +specifies a signal mask which is set while waiting for input. +When +.Fn ppoll +returns, the original signal mask is restored. +.Pp +.Bd -literal +struct timespec { + time_t tv_sec; /* seconds */ + long tv_nsec; /* and nanoseconds */ +}; +.Ed .Sh RETURN VALUES The .Fn poll @@ -185,17 +233,26 @@ points outside the process's allocated a A signal was delivered before the time limit expired and before any of the selected events occurred. .It Bq Er EINVAL -The specified time limit is negative. +The specified time limit is invalid. One of its components is negative or too large. .El .Sh SEE ALSO .Xr accept 2 , .Xr connect 2 , .Xr kqueue 2 , +.Xr pselect 2 , .Xr read 2 , .Xr recv 2 , .Xr select 2 , .Xr send 2 , .Xr write 2 +.Sh STANDARDS +The +.Fn poll +function conforms to +.St -p1003.1-2001 . +The +.Fn ppoll +is not specified by POSIX. .Sh HISTORY The .Fn poll @@ -203,6 +260,10 @@ function appeared in .At V . This manual page and the core of the implementation was taken from .Nx . +The +.Fn ppoll +function first appeared in +.Fx 11.0 .Sh BUGS The distinction between some of the fields in the .Fa events Modified: stable/10/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- stable/10/sys/compat/freebsd32/freebsd32_misc.c Sun Dec 21 05:07:11 2014 (r275985) +++ stable/10/sys/compat/freebsd32/freebsd32_misc.c Sun Dec 21 07:58:28 2014 (r275986) @@ -3102,3 +3102,31 @@ freebsd32_fcntl(struct thread *td, struc } return (kern_fcntl_freebsd(td, uap->fd, uap->cmd, tmp)); } + +int +freebsd32_ppoll(struct thread *td, struct freebsd32_ppoll_args *uap) +{ + struct timespec32 ts32; + struct timespec ts, *tsp; + sigset_t set, *ssp; + int error; + + if (uap->ts != NULL) { + error = copyin(uap->ts, &ts32, sizeof(ts32)); + if (error != 0) + return (error); + CP(ts32, ts, tv_sec); + CP(ts32, ts, tv_nsec); + tsp = &ts; + } else + tsp = NULL; + if (uap->set != NULL) { + error = copyin(uap->set, &set, sizeof(set)); + if (error != 0) + return (error); + ssp = &set; + } else + ssp = NULL; + + return (kern_poll(td, uap->fds, uap->nfds, tsp, ssp)); +} Modified: stable/10/sys/compat/freebsd32/syscalls.master ============================================================================== --- stable/10/sys/compat/freebsd32/syscalls.master Sun Dec 21 05:07:11 2014 (r275985) +++ stable/10/sys/compat/freebsd32/syscalls.master Sun Dec 21 07:58:28 2014 (r275986) @@ -1066,3 +1066,6 @@ uint32_t id1, uint32_t id2, int com, \ void *data); } #endif +545 AUE_POLL STD { int freebsd32_ppoll(struct pollfd *fds, \ + u_int nfds, const struct timespec32 *ts, \ + const sigset_t *set); } Modified: stable/10/sys/kern/sys_generic.c ============================================================================== --- stable/10/sys/kern/sys_generic.c Sun Dec 21 05:07:11 2014 (r275985) +++ stable/10/sys/kern/sys_generic.c Sun Dec 21 07:58:28 2014 (r275986) @@ -1300,26 +1300,60 @@ selscan(td, ibits, obits, nfd) return (0); } -#ifndef _SYS_SYSPROTO_H_ -struct poll_args { - struct pollfd *fds; - u_int nfds; - int timeout; -}; -#endif int -sys_poll(td, uap) - struct thread *td; - struct poll_args *uap; +sys_poll(struct thread *td, struct poll_args *uap) +{ + struct timespec ts, *tsp; + + if (uap->timeout != INFTIM) { + if (uap->timeout < 0) + return (EINVAL); + ts.tv_sec = uap->timeout / 1000; + ts.tv_nsec = (uap->timeout % 1000) * 1000000; + tsp = &ts; + } else + tsp = NULL; + + return (kern_poll(td, uap->fds, uap->nfds, tsp, NULL)); +} + +int +kern_poll(struct thread *td, struct pollfd *fds, u_int nfds, + struct timespec *tsp, sigset_t *uset) { struct pollfd *bits; struct pollfd smallbits[32]; - sbintime_t asbt, precision, rsbt; - u_int nfds; + sbintime_t sbt, precision, tmp; + time_t over; + struct timespec ts; int error; size_t ni; - nfds = uap->nfds; + precision = 0; + if (tsp != NULL) { + if (tsp->tv_sec < 0) + return (EINVAL); + if (tsp->tv_nsec < 0 || tsp->tv_nsec >= 1000000000) + return (EINVAL); + if (tsp->tv_sec == 0 && tsp->tv_nsec == 0) + sbt = 0; + else { + ts = *tsp; + if (ts.tv_sec > INT32_MAX / 2) { + over = ts.tv_sec - INT32_MAX / 2; + ts.tv_sec -= over; + } else + over = 0; + tmp = tstosbt(ts); + precision = tmp; + precision >>= tc_precexp; + if (TIMESEL(&sbt, tmp)) + sbt += tc_tick_sbt; + sbt += tmp; + } + } else + sbt = -1; + if (nfds > maxfilesperproc && nfds > FD_SETSIZE) return (EINVAL); ni = nfds * sizeof(struct pollfd); @@ -1327,34 +1361,33 @@ sys_poll(td, uap) bits = malloc(ni, M_TEMP, M_WAITOK); else bits = smallbits; - error = copyin(uap->fds, bits, ni); + error = copyin(fds, bits, ni); if (error) goto done; - precision = 0; - if (uap->timeout != INFTIM) { - if (uap->timeout < 0) { - error = EINVAL; + + if (uset != NULL) { + error = kern_sigprocmask(td, SIG_SETMASK, uset, + &td->td_oldsigmask, 0); + if (error) goto done; - } - if (uap->timeout == 0) - asbt = 0; - else { - rsbt = SBT_1MS * uap->timeout; - precision = rsbt; - precision >>= tc_precexp; - if (TIMESEL(&asbt, rsbt)) - asbt += tc_tick_sbt; - asbt += rsbt; - } - } else - asbt = -1; + td->td_pflags |= TDP_OLDMASK; + /* + * Make sure that ast() is called on return to + * usermode and TDP_OLDMASK is cleared, restoring old + * sigmask. + */ + thread_lock(td); + td->td_flags |= TDF_ASTPENDING; + thread_unlock(td); + } + seltdinit(td); /* Iterate until the timeout expires or descriptors become ready. */ for (;;) { error = pollscan(td, bits, nfds); if (error || td->td_retval[0] != 0) break; - error = seltdwait(td, asbt, precision); + error = seltdwait(td, sbt, precision); if (error) break; error = pollrescan(td); @@ -1370,7 +1403,7 @@ done: if (error == EWOULDBLOCK) error = 0; if (error == 0) { - error = pollout(td, bits, uap->fds, nfds); + error = pollout(td, bits, fds, nfds); if (error) goto out; } @@ -1380,6 +1413,35 @@ out: return (error); } +int +sys_ppoll(struct thread *td, struct ppoll_args *uap) +{ + struct timespec ts, *tsp; + sigset_t set, *ssp; + int error; + + if (uap->ts != NULL) { + error = copyin(uap->ts, &ts, sizeof(ts)); + if (error) + return (error); + tsp = &ts; + } else + tsp = NULL; + if (uap->set != NULL) { + error = copyin(uap->set, &set, sizeof(set)); + if (error) + return (error); + ssp = &set; + } else + ssp = NULL; + /* + * fds is still a pointer to user space. kern_poll() will + * take care of copyin that array to the kernel space. + */ + + return (kern_poll(td, uap->fds, uap->nfds, tsp, ssp)); +} + static int pollrescan(struct thread *td) { Modified: stable/10/sys/kern/syscalls.master ============================================================================== --- stable/10/sys/kern/syscalls.master Sun Dec 21 05:07:11 2014 (r275985) +++ stable/10/sys/kern/syscalls.master Sun Dec 21 07:58:28 2014 (r275986) @@ -980,5 +980,8 @@ 543 AUE_NULL NOSTD { int aio_mlock(struct aiocb *aiocbp); } 544 AUE_NULL STD { int procctl(idtype_t idtype, id_t id, \ int com, void *data); } +545 AUE_POLL STD { int ppoll(struct pollfd *fds, u_int nfds, \ + const struct timespec *ts, \ + const sigset_t *set); } ; Please copy any additions and changes to the following compatability tables: ; sys/compat/freebsd32/syscalls.master Modified: stable/10/sys/sys/poll.h ============================================================================== --- stable/10/sys/sys/poll.h Sun Dec 21 05:07:11 2014 (r275985) +++ stable/10/sys/sys/poll.h Sun Dec 21 07:58:28 2014 (r275986) @@ -95,8 +95,26 @@ struct pollfd { #ifndef _KERNEL +#if __BSD_VISIBLE +#include + +#include +#include + +#ifndef _SIGSET_T_DECLARED +#define _SIGSET_T_DECLARED +typedef __sigset_t sigset_t; +#endif + +#endif + __BEGIN_DECLS int poll(struct pollfd _pfd[], nfds_t _nfds, int _timeout); +#if __BSD_VISIBLE +int ppoll(struct pollfd _pfd[], nfds_t _nfds, + const struct timespec *__restrict _timeout, + const sigset_t *__restrict _newsigmask); +#endif __END_DECLS #endif /* !_KERNEL */ Modified: stable/10/sys/sys/syscallsubr.h ============================================================================== --- stable/10/sys/sys/syscallsubr.h Sun Dec 21 05:07:11 2014 (r275985) +++ stable/10/sys/sys/syscallsubr.h Sun Dec 21 07:58:28 2014 (r275986) @@ -46,6 +46,7 @@ struct ksiginfo; struct mbuf; struct msghdr; struct msqid_ds; +struct pollfd; struct ogetdirentries_args; struct rlimit; struct rusage; @@ -164,6 +165,8 @@ int kern_pathconf(struct thread *td, cha int name, u_long flags); int kern_pipe(struct thread *td, int fildes[2]); int kern_pipe2(struct thread *td, int fildes[2], int flags); +int kern_poll(struct thread *td, struct pollfd *fds, u_int nfds, + struct timespec *tsp, sigset_t *uset); int kern_posix_fadvise(struct thread *td, int fd, off_t offset, off_t len, int advice); int kern_posix_fallocate(struct thread *td, int fd, off_t offset, From owner-svn-src-all@FreeBSD.ORG Sun Dec 21 08:00:42 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3824F7FB; Sun, 21 Dec 2014 08:00:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 190562440; Sun, 21 Dec 2014 08:00:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBL80fc4066311; Sun, 21 Dec 2014 08:00:41 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBL80dMI066300; Sun, 21 Dec 2014 08:00:39 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201412210800.sBL80dMI066300@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Sun, 21 Dec 2014 08:00:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r275987 - in stable/10/sys: compat/freebsd32 kern sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2014 08:00:42 -0000 Author: dchagin Date: Sun Dec 21 08:00:38 2014 New Revision: 275987 URL: https://svnweb.freebsd.org/changeset/base/275987 Log: Regen for r275986 (ppoll). Modified: stable/10/sys/compat/freebsd32/freebsd32_proto.h stable/10/sys/compat/freebsd32/freebsd32_syscall.h stable/10/sys/compat/freebsd32/freebsd32_syscalls.c stable/10/sys/compat/freebsd32/freebsd32_sysent.c stable/10/sys/compat/freebsd32/freebsd32_systrace_args.c stable/10/sys/kern/init_sysent.c stable/10/sys/kern/syscalls.c stable/10/sys/kern/systrace_args.c stable/10/sys/sys/syscall.h stable/10/sys/sys/syscall.mk stable/10/sys/sys/sysproto.h Modified: stable/10/sys/compat/freebsd32/freebsd32_proto.h ============================================================================== --- stable/10/sys/compat/freebsd32/freebsd32_proto.h Sun Dec 21 07:58:28 2014 (r275986) +++ stable/10/sys/compat/freebsd32/freebsd32_proto.h Sun Dec 21 08:00:38 2014 (r275987) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/10/sys/compat/freebsd32/syscalls.master 271010 2014-09-03 09:05:16Z kib + * created from FreeBSD: stable/10/sys/compat/freebsd32/syscalls.master 275986 2014-12-21 07:58:28Z dchagin */ #ifndef _FREEBSD32_SYSPROTO_H_ @@ -693,6 +693,12 @@ struct freebsd32_procctl_args { char data_l_[PADL_(void *)]; void * data; char data_r_[PADR_(void *)]; }; #endif +struct freebsd32_ppoll_args { + char fds_l_[PADL_(struct pollfd *)]; struct pollfd * fds; char fds_r_[PADR_(struct pollfd *)]; + char nfds_l_[PADL_(u_int)]; u_int nfds; char nfds_r_[PADR_(u_int)]; + char ts_l_[PADL_(const struct timespec32 *)]; const struct timespec32 * ts; char ts_r_[PADR_(const struct timespec32 *)]; + char set_l_[PADL_(const sigset_t *)]; const sigset_t * set; char set_r_[PADR_(const sigset_t *)]; +}; #if !defined(PAD64_REQUIRED) && (defined(__powerpc__) || defined(__mips__)) #define PAD64_REQUIRED #endif @@ -826,6 +832,7 @@ int freebsd32_procctl(struct thread *, s #else int freebsd32_procctl(struct thread *, struct freebsd32_procctl_args *); #endif +int freebsd32_ppoll(struct thread *, struct freebsd32_ppoll_args *); #ifdef COMPAT_43 @@ -1242,6 +1249,7 @@ int freebsd7_freebsd32_shmctl(struct thr #define FREEBSD32_SYS_AUE_freebsd32_aio_mlock AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_procctl AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_procctl AUE_NULL +#define FREEBSD32_SYS_AUE_freebsd32_ppoll AUE_POLL #undef PAD_ #undef PADL_ Modified: stable/10/sys/compat/freebsd32/freebsd32_syscall.h ============================================================================== --- stable/10/sys/compat/freebsd32/freebsd32_syscall.h Sun Dec 21 07:58:28 2014 (r275986) +++ stable/10/sys/compat/freebsd32/freebsd32_syscall.h Sun Dec 21 08:00:38 2014 (r275987) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/10/sys/compat/freebsd32/syscalls.master 271010 2014-09-03 09:05:16Z kib + * created from FreeBSD: stable/10/sys/compat/freebsd32/syscalls.master 275986 2014-12-21 07:58:28Z dchagin */ #define FREEBSD32_SYS_syscall 0 @@ -454,4 +454,5 @@ #define FREEBSD32_SYS_freebsd32_aio_mlock 543 #define FREEBSD32_SYS_freebsd32_procctl 544 #define FREEBSD32_SYS_freebsd32_procctl 544 -#define FREEBSD32_SYS_MAXSYSCALL 545 +#define FREEBSD32_SYS_freebsd32_ppoll 545 +#define FREEBSD32_SYS_MAXSYSCALL 546 Modified: stable/10/sys/compat/freebsd32/freebsd32_syscalls.c ============================================================================== --- stable/10/sys/compat/freebsd32/freebsd32_syscalls.c Sun Dec 21 07:58:28 2014 (r275986) +++ stable/10/sys/compat/freebsd32/freebsd32_syscalls.c Sun Dec 21 08:00:38 2014 (r275987) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/10/sys/compat/freebsd32/syscalls.master 271010 2014-09-03 09:05:16Z kib + * created from FreeBSD: stable/10/sys/compat/freebsd32/syscalls.master 275986 2014-12-21 07:58:28Z dchagin */ const char *freebsd32_syscallnames[] = { @@ -578,4 +578,5 @@ const char *freebsd32_syscallnames[] = { #else "freebsd32_procctl", /* 544 = freebsd32_procctl */ #endif + "freebsd32_ppoll", /* 545 = freebsd32_ppoll */ }; Modified: stable/10/sys/compat/freebsd32/freebsd32_sysent.c ============================================================================== --- stable/10/sys/compat/freebsd32/freebsd32_sysent.c Sun Dec 21 07:58:28 2014 (r275986) +++ stable/10/sys/compat/freebsd32/freebsd32_sysent.c Sun Dec 21 08:00:38 2014 (r275987) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/10/sys/compat/freebsd32/syscalls.master 271010 2014-09-03 09:05:16Z kib + * created from FreeBSD: stable/10/sys/compat/freebsd32/syscalls.master 275986 2014-12-21 07:58:28Z dchagin */ #include "opt_compat.h" @@ -615,4 +615,5 @@ struct sysent freebsd32_sysent[] = { #else { AS(freebsd32_procctl_args), (sy_call_t *)freebsd32_procctl, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 544 = freebsd32_procctl */ #endif + { AS(freebsd32_ppoll_args), (sy_call_t *)freebsd32_ppoll, AUE_POLL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 545 = freebsd32_ppoll */ }; Modified: stable/10/sys/compat/freebsd32/freebsd32_systrace_args.c ============================================================================== --- stable/10/sys/compat/freebsd32/freebsd32_systrace_args.c Sun Dec 21 07:58:28 2014 (r275986) +++ stable/10/sys/compat/freebsd32/freebsd32_systrace_args.c Sun Dec 21 08:00:38 2014 (r275987) @@ -3313,6 +3313,16 @@ systrace_args(int sysnum, void *params, break; } #endif + /* freebsd32_ppoll */ + case 545: { + struct freebsd32_ppoll_args *p = params; + uarg[0] = (intptr_t) p->fds; /* struct pollfd * */ + uarg[1] = p->nfds; /* u_int */ + uarg[2] = (intptr_t) p->ts; /* const struct timespec32 * */ + uarg[3] = (intptr_t) p->set; /* const sigset_t * */ + *n_args = 4; + break; + } default: *n_args = 0; break; @@ -8878,6 +8888,25 @@ systrace_entry_setargdesc(int sysnum, in }; break; #endif + /* freebsd32_ppoll */ + case 545: + switch(ndx) { + case 0: + p = "struct pollfd *"; + break; + case 1: + p = "u_int"; + break; + case 2: + p = "const struct timespec32 *"; + break; + case 3: + p = "const sigset_t *"; + break; + default: + break; + }; + break; default: break; }; @@ -10761,6 +10790,11 @@ systrace_return_setargdesc(int sysnum, i p = "int"; break; #endif + /* freebsd32_ppoll */ + case 545: + if (ndx == 0 || ndx == 1) + p = "int"; + break; default: break; }; Modified: stable/10/sys/kern/init_sysent.c ============================================================================== --- stable/10/sys/kern/init_sysent.c Sun Dec 21 07:58:28 2014 (r275986) +++ stable/10/sys/kern/init_sysent.c Sun Dec 21 08:00:38 2014 (r275987) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/kern/syscalls.master 255708 2013-09-19 18:53:42Z jhb + * created from FreeBSD: stable/10/sys/kern/syscalls.master 275986 2014-12-21 07:58:28Z dchagin */ #include "opt_compat.h" @@ -579,4 +579,5 @@ struct sysent sysent[] = { { AS(pipe2_args), (sy_call_t *)sys_pipe2, AUE_PIPE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 542 = pipe2 */ { AS(aio_mlock_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 543 = aio_mlock */ { AS(procctl_args), (sy_call_t *)sys_procctl, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 544 = procctl */ + { AS(ppoll_args), (sy_call_t *)sys_ppoll, AUE_POLL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 545 = ppoll */ }; Modified: stable/10/sys/kern/syscalls.c ============================================================================== --- stable/10/sys/kern/syscalls.c Sun Dec 21 07:58:28 2014 (r275986) +++ stable/10/sys/kern/syscalls.c Sun Dec 21 08:00:38 2014 (r275987) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/kern/syscalls.master 255708 2013-09-19 18:53:42Z jhb + * created from FreeBSD: stable/10/sys/kern/syscalls.master 275986 2014-12-21 07:58:28Z dchagin */ const char *syscallnames[] = { @@ -552,4 +552,5 @@ const char *syscallnames[] = { "pipe2", /* 542 = pipe2 */ "aio_mlock", /* 543 = aio_mlock */ "procctl", /* 544 = procctl */ + "ppoll", /* 545 = ppoll */ }; Modified: stable/10/sys/kern/systrace_args.c ============================================================================== --- stable/10/sys/kern/systrace_args.c Sun Dec 21 07:58:28 2014 (r275986) +++ stable/10/sys/kern/systrace_args.c Sun Dec 21 08:00:38 2014 (r275987) @@ -3386,6 +3386,16 @@ systrace_args(int sysnum, void *params, *n_args = 4; break; } + /* ppoll */ + case 545: { + struct ppoll_args *p = params; + uarg[0] = (intptr_t) p->fds; /* struct pollfd * */ + uarg[1] = p->nfds; /* u_int */ + uarg[2] = (intptr_t) p->ts; /* const struct timespec * */ + uarg[3] = (intptr_t) p->set; /* const sigset_t * */ + *n_args = 4; + break; + } default: *n_args = 0; break; @@ -9024,6 +9034,25 @@ systrace_entry_setargdesc(int sysnum, in break; }; break; + /* ppoll */ + case 545: + switch(ndx) { + case 0: + p = "struct pollfd *"; + break; + case 1: + p = "u_int"; + break; + case 2: + p = "const struct timespec *"; + break; + case 3: + p = "const sigset_t *"; + break; + default: + break; + }; + break; default: break; }; @@ -10972,6 +11001,11 @@ systrace_return_setargdesc(int sysnum, i if (ndx == 0 || ndx == 1) p = "int"; break; + /* ppoll */ + case 545: + if (ndx == 0 || ndx == 1) + p = "int"; + break; default: break; }; Modified: stable/10/sys/sys/syscall.h ============================================================================== --- stable/10/sys/sys/syscall.h Sun Dec 21 07:58:28 2014 (r275986) +++ stable/10/sys/sys/syscall.h Sun Dec 21 08:00:38 2014 (r275987) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/kern/syscalls.master 255708 2013-09-19 18:53:42Z jhb + * created from FreeBSD: stable/10/sys/kern/syscalls.master 275986 2014-12-21 07:58:28Z dchagin */ #define SYS_syscall 0 @@ -464,4 +464,5 @@ #define SYS_pipe2 542 #define SYS_aio_mlock 543 #define SYS_procctl 544 -#define SYS_MAXSYSCALL 545 +#define SYS_ppoll 545 +#define SYS_MAXSYSCALL 546 Modified: stable/10/sys/sys/syscall.mk ============================================================================== --- stable/10/sys/sys/syscall.mk Sun Dec 21 07:58:28 2014 (r275986) +++ stable/10/sys/sys/syscall.mk Sun Dec 21 08:00:38 2014 (r275987) @@ -1,7 +1,7 @@ # FreeBSD system call names. # DO NOT EDIT-- this file is automatically generated. # $FreeBSD$ -# created from FreeBSD: head/sys/kern/syscalls.master 255708 2013-09-19 18:53:42Z jhb +# created from FreeBSD: stable/10/sys/kern/syscalls.master 275986 2014-12-21 07:58:28Z dchagin MIASM = \ syscall.o \ exit.o \ @@ -411,4 +411,5 @@ MIASM = \ accept4.o \ pipe2.o \ aio_mlock.o \ - procctl.o + procctl.o \ + ppoll.o Modified: stable/10/sys/sys/sysproto.h ============================================================================== --- stable/10/sys/sys/sysproto.h Sun Dec 21 07:58:28 2014 (r275986) +++ stable/10/sys/sys/sysproto.h Sun Dec 21 08:00:38 2014 (r275987) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/kern/syscalls.master 255708 2013-09-19 18:53:42Z jhb + * created from FreeBSD: stable/10/sys/kern/syscalls.master 275986 2014-12-21 07:58:28Z dchagin */ #ifndef _SYS_SYSPROTO_H_ @@ -1819,6 +1819,12 @@ struct procctl_args { char com_l_[PADL_(int)]; int com; char com_r_[PADR_(int)]; char data_l_[PADL_(void *)]; void * data; char data_r_[PADR_(void *)]; }; +struct ppoll_args { + char fds_l_[PADL_(struct pollfd *)]; struct pollfd * fds; char fds_r_[PADR_(struct pollfd *)]; + char nfds_l_[PADL_(u_int)]; u_int nfds; char nfds_r_[PADR_(u_int)]; + char ts_l_[PADL_(const struct timespec *)]; const struct timespec * ts; char ts_r_[PADR_(const struct timespec *)]; + char set_l_[PADL_(const sigset_t *)]; const sigset_t * set; char set_r_[PADR_(const sigset_t *)]; +}; int nosys(struct thread *, struct nosys_args *); void sys_sys_exit(struct thread *, struct sys_exit_args *); int sys_fork(struct thread *, struct fork_args *); @@ -2212,6 +2218,7 @@ int sys_accept4(struct thread *, struct int sys_pipe2(struct thread *, struct pipe2_args *); int sys_aio_mlock(struct thread *, struct aio_mlock_args *); int sys_procctl(struct thread *, struct procctl_args *); +int sys_ppoll(struct thread *, struct ppoll_args *); #ifdef COMPAT_43 @@ -2919,6 +2926,7 @@ int freebsd7_shmctl(struct thread *, str #define SYS_AUE_pipe2 AUE_PIPE #define SYS_AUE_aio_mlock AUE_NULL #define SYS_AUE_procctl AUE_NULL +#define SYS_AUE_ppoll AUE_POLL #undef PAD_ #undef PADL_ From owner-svn-src-all@FreeBSD.ORG Sun Dec 21 08:07:39 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id 6C5E6A7E; Sun, 21 Dec 2014 08:07:39 +0000 (UTC) Date: Sun, 21 Dec 2014 08:07:39 +0000 From: Alexey Dokuchaev To: Andrew Turner Subject: Re: svn commit: r275961 - head/sys/arm/conf Message-ID: <20141221080739.GB27290@FreeBSD.org> References: <201412201815.sBKIFOSq060122@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201412201815.sBKIFOSq060122@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2014 08:07:39 -0000 On Sat, Dec 20, 2014 at 06:15:24PM +0000, Andrew Turner wrote: > Author: andrew > Date: Sat Dec 20 18:15:23 2014 > New Revision: 275961 > URL: https://svnweb.freebsd.org/changeset/base/275961 > > Log: > Clean up to use the standard style of "options \t" and "device\t\t" > > options HZ=500 # Scheduling quantum is 2 milliseconds. > [...] > -options KDB # Enable kernel debugger support. > +options KDB # Enable kernel debugger support. > # For minimum debugger support use KDB_TRACE, for interactive use DDB. > -#options KDB_TRACE # Print a stack trace for a panic. > -options DDB # Support DDB. > +#options KDB_TRACE # Print a stack trace for a panic. > +options DDB # Support DDB. > # For full debugger support use this instead: > -#options GDB # Support remote GDB. > +#options GDB # Support remote GDB. > [...] It also would be nice if we removed trailing dots in comments one day, preferreably across all config files we have in the tree. ./danfe From owner-svn-src-all@FreeBSD.ORG Sun Dec 21 08:30:22 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 64B3F23B; Sun, 21 Dec 2014 08:30:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4B4C32754; Sun, 21 Dec 2014 08:30:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBL8UMwi080202; Sun, 21 Dec 2014 08:30:22 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBL8UJmd080185; Sun, 21 Dec 2014 08:30:19 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201412210830.sBL8UJmd080185@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 21 Dec 2014 08:30:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r275988 - in stable/10: . contrib/atf contrib/atf/atf-c contrib/atf/atf-c++ contrib/atf/atf-c++/detail contrib/atf/atf-c/detail contrib/atf/atf-sh contrib/atf/doc contrib/atf/test-progr... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2014 08:30:22 -0000 Author: ngie Date: Sun Dec 21 08:30:18 2014 New Revision: 275988 URL: https://svnweb.freebsd.org/changeset/base/275988 Log: MFC r273929: r273929 (by jmmv): MFV: Import atf-0.21. Added: stable/10/contrib/atf/atf-c++/atf-c++.3 - copied unchanged from r273929, head/contrib/atf/atf-c++/atf-c++.3 stable/10/contrib/atf/atf-c/atf-c.3 - copied unchanged from r273929, head/contrib/atf/atf-c/atf-c.3 stable/10/contrib/atf/atf-sh/atf-sh.3 - copied unchanged from r273929, head/contrib/atf/atf-sh/atf-sh.3 stable/10/contrib/atf/config.h - copied unchanged from r273929, head/contrib/atf/config.h stable/10/contrib/atf/doc/atf.7.in - copied unchanged from r273929, head/contrib/atf/doc/atf.7.in Deleted: stable/10/contrib/atf/atf-c++/config.cpp stable/10/contrib/atf/atf-c++/config.hpp stable/10/contrib/atf/atf-c++/config_test.cpp stable/10/contrib/atf/atf-c++/detail/sanity_test.cpp stable/10/contrib/atf/atf-c/config.c stable/10/contrib/atf/atf-c/config.h stable/10/contrib/atf/atf-c/config_test.c stable/10/contrib/atf/bconfig.h Modified: stable/10/ObsoleteFiles.inc stable/10/contrib/atf/FREEBSD-Xlist stable/10/contrib/atf/NEWS stable/10/contrib/atf/atf-c++.hpp stable/10/contrib/atf/atf-c++/Kyuafile stable/10/contrib/atf/atf-c++/atf_c++_test.cpp stable/10/contrib/atf/atf-c++/build.cpp stable/10/contrib/atf/atf-c++/build.hpp stable/10/contrib/atf/atf-c++/build_test.cpp stable/10/contrib/atf/atf-c++/check.cpp stable/10/contrib/atf/atf-c++/check.hpp stable/10/contrib/atf/atf-c++/check_test.cpp stable/10/contrib/atf/atf-c++/detail/Kyuafile stable/10/contrib/atf/atf-c++/detail/application.cpp stable/10/contrib/atf/atf-c++/detail/application.hpp stable/10/contrib/atf/atf-c++/detail/application_test.cpp stable/10/contrib/atf/atf-c++/detail/auto_array.hpp stable/10/contrib/atf/atf-c++/detail/auto_array_test.cpp stable/10/contrib/atf/atf-c++/detail/env.cpp stable/10/contrib/atf/atf-c++/detail/env.hpp stable/10/contrib/atf/atf-c++/detail/env_test.cpp stable/10/contrib/atf/atf-c++/detail/exceptions.cpp stable/10/contrib/atf/atf-c++/detail/exceptions.hpp stable/10/contrib/atf/atf-c++/detail/exceptions_test.cpp stable/10/contrib/atf/atf-c++/detail/fs.cpp stable/10/contrib/atf/atf-c++/detail/fs.hpp stable/10/contrib/atf/atf-c++/detail/fs_test.cpp stable/10/contrib/atf/atf-c++/detail/process.cpp stable/10/contrib/atf/atf-c++/detail/process.hpp stable/10/contrib/atf/atf-c++/detail/process_test.cpp stable/10/contrib/atf/atf-c++/detail/sanity.hpp stable/10/contrib/atf/atf-c++/detail/test_helpers.cpp stable/10/contrib/atf/atf-c++/detail/test_helpers.hpp stable/10/contrib/atf/atf-c++/detail/text.cpp stable/10/contrib/atf/atf-c++/detail/text.hpp stable/10/contrib/atf/atf-c++/detail/text_test.cpp stable/10/contrib/atf/atf-c++/detail/version_helper.cpp stable/10/contrib/atf/atf-c++/macros.hpp stable/10/contrib/atf/atf-c++/macros_hpp_test.cpp stable/10/contrib/atf/atf-c++/macros_test.cpp stable/10/contrib/atf/atf-c++/pkg_config_test.sh stable/10/contrib/atf/atf-c++/tests.cpp stable/10/contrib/atf/atf-c++/tests.hpp stable/10/contrib/atf/atf-c++/tests_test.cpp stable/10/contrib/atf/atf-c++/unused_test.cpp stable/10/contrib/atf/atf-c++/utils.cpp stable/10/contrib/atf/atf-c++/utils.hpp stable/10/contrib/atf/atf-c++/utils_test.cpp stable/10/contrib/atf/atf-c.h stable/10/contrib/atf/atf-c/Kyuafile stable/10/contrib/atf/atf-c/atf_c_test.c stable/10/contrib/atf/atf-c/build.c stable/10/contrib/atf/atf-c/build.h stable/10/contrib/atf/atf-c/build_test.c stable/10/contrib/atf/atf-c/check.c stable/10/contrib/atf/atf-c/check.h stable/10/contrib/atf/atf-c/check_test.c stable/10/contrib/atf/atf-c/defs.h.in stable/10/contrib/atf/atf-c/detail/dynstr.c stable/10/contrib/atf/atf-c/detail/dynstr.h stable/10/contrib/atf/atf-c/detail/dynstr_test.c stable/10/contrib/atf/atf-c/detail/env.c stable/10/contrib/atf/atf-c/detail/env.h stable/10/contrib/atf/atf-c/detail/env_test.c stable/10/contrib/atf/atf-c/detail/fs.c stable/10/contrib/atf/atf-c/detail/fs.h stable/10/contrib/atf/atf-c/detail/fs_test.c stable/10/contrib/atf/atf-c/detail/list.c stable/10/contrib/atf/atf-c/detail/list.h stable/10/contrib/atf/atf-c/detail/list_test.c stable/10/contrib/atf/atf-c/detail/map.c stable/10/contrib/atf/atf-c/detail/map.h stable/10/contrib/atf/atf-c/detail/map_test.c stable/10/contrib/atf/atf-c/detail/process.c stable/10/contrib/atf/atf-c/detail/process.h stable/10/contrib/atf/atf-c/detail/process_helpers.c stable/10/contrib/atf/atf-c/detail/process_test.c stable/10/contrib/atf/atf-c/detail/sanity.c stable/10/contrib/atf/atf-c/detail/sanity.h stable/10/contrib/atf/atf-c/detail/sanity_test.c stable/10/contrib/atf/atf-c/detail/test_helpers.c stable/10/contrib/atf/atf-c/detail/test_helpers.h stable/10/contrib/atf/atf-c/detail/text.c stable/10/contrib/atf/atf-c/detail/text.h stable/10/contrib/atf/atf-c/detail/text_test.c stable/10/contrib/atf/atf-c/detail/tp_main.c stable/10/contrib/atf/atf-c/detail/user.c stable/10/contrib/atf/atf-c/detail/user.h stable/10/contrib/atf/atf-c/detail/user_test.c stable/10/contrib/atf/atf-c/detail/version_helper.c stable/10/contrib/atf/atf-c/error.c stable/10/contrib/atf/atf-c/error.h stable/10/contrib/atf/atf-c/error_fwd.h stable/10/contrib/atf/atf-c/error_test.c stable/10/contrib/atf/atf-c/h_build.h stable/10/contrib/atf/atf-c/macros.h stable/10/contrib/atf/atf-c/macros_h_test.c stable/10/contrib/atf/atf-c/macros_test.c stable/10/contrib/atf/atf-c/pkg_config_test.sh stable/10/contrib/atf/atf-c/tc.c stable/10/contrib/atf/atf-c/tc.h stable/10/contrib/atf/atf-c/tc_test.c stable/10/contrib/atf/atf-c/tp.c stable/10/contrib/atf/atf-c/tp.h stable/10/contrib/atf/atf-c/tp_test.c stable/10/contrib/atf/atf-c/unused_test.c stable/10/contrib/atf/atf-c/utils.c stable/10/contrib/atf/atf-c/utils.h stable/10/contrib/atf/atf-c/utils_test.c stable/10/contrib/atf/atf-sh/atf-check.1 stable/10/contrib/atf/atf-sh/atf-check.cpp stable/10/contrib/atf/atf-sh/atf-check_test.sh stable/10/contrib/atf/atf-sh/atf-sh.1 stable/10/contrib/atf/atf-sh/atf-sh.cpp stable/10/contrib/atf/atf-sh/atf_check_test.sh stable/10/contrib/atf/atf-sh/config_test.sh stable/10/contrib/atf/atf-sh/integration_test.sh stable/10/contrib/atf/atf-sh/libatf-sh.subr stable/10/contrib/atf/atf-sh/misc_helpers.sh stable/10/contrib/atf/atf-sh/normalize_test.sh stable/10/contrib/atf/atf-sh/tc_test.sh stable/10/contrib/atf/atf-sh/tp_test.sh stable/10/contrib/atf/doc/atf-test-case.4 stable/10/contrib/atf/doc/atf-test-program.1 stable/10/contrib/atf/test-programs/c_helpers.c stable/10/contrib/atf/test-programs/common.sh stable/10/contrib/atf/test-programs/config_test.sh stable/10/contrib/atf/test-programs/cpp_helpers.cpp stable/10/contrib/atf/test-programs/expect_test.sh stable/10/contrib/atf/test-programs/meta_data_test.sh stable/10/contrib/atf/test-programs/result_test.sh stable/10/contrib/atf/test-programs/sh_helpers.sh stable/10/contrib/atf/test-programs/srcdir_test.sh stable/10/lib/atf/Makefile.inc stable/10/lib/atf/common.mk stable/10/lib/atf/libatf-c++/Makefile stable/10/lib/atf/libatf-c++/tests/Makefile stable/10/lib/atf/libatf-c++/tests/detail/Makefile stable/10/lib/atf/libatf-c/Makefile stable/10/lib/atf/libatf-c/tests/Makefile stable/10/lib/atf/libatf-c/tests/detail/Makefile stable/10/libexec/atf/atf-check/Makefile stable/10/libexec/atf/atf-sh/Makefile stable/10/libexec/atf/atf-sh/tests/Makefile stable/10/share/man/man7/Makefile stable/10/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/10/ (props changed) Modified: stable/10/ObsoleteFiles.inc ============================================================================== --- stable/10/ObsoleteFiles.inc Sun Dec 21 08:00:38 2014 (r275987) +++ stable/10/ObsoleteFiles.inc Sun Dec 21 08:30:18 2014 (r275988) @@ -208,7 +208,6 @@ OLD_FILES+=usr/share/man/man1/atf-report OLD_FILES+=usr/share/man/man1/atf-run.1.gz OLD_FILES+=usr/share/man/man1/atf-version.1.gz OLD_FILES+=usr/share/man/man5/atf-formats.5.gz -OLD_FILES+=usr/share/man/man7/atf.7.gz OLD_FILES+=usr/share/xml/atf/tests-results.dtd OLD_FILES+=usr/share/xsl/atf/tests-results.xsl # 20131009: freebsd-version moved from /libexec to /bin Modified: stable/10/contrib/atf/FREEBSD-Xlist ============================================================================== --- stable/10/contrib/atf/FREEBSD-Xlist Sun Dec 21 08:00:38 2014 (r275987) +++ stable/10/contrib/atf/FREEBSD-Xlist Sun Dec 21 08:30:18 2014 (r275988) @@ -1,22 +1,12 @@ -*/*/Atffile */*/Makefile* -*/Atffile */Makefile* */*.m4 */*.pc.in -Atffile INSTALL Makefile* aclocal.m4 admin/ -atf-config/ -atf-report/ -atf-run/ -atf-version/ -bconfig.h.in +config.h.in bootstrap/ configure* -doc/atf-formats.5 -doc/atf.7.in m4/ -tools/ Modified: stable/10/contrib/atf/NEWS ============================================================================== --- stable/10/contrib/atf/NEWS Sun Dec 21 08:00:38 2014 (r275987) +++ stable/10/contrib/atf/NEWS Sun Dec 21 08:30:18 2014 (r275988) @@ -1,6 +1,62 @@ Major changes between releases Automated Testing Framework =========================================================================== +Changes in version 0.21 +*********************** + +Released on October 23rd, 2014. + +* Restored the atf(7) manual page to serve as a reference to all the other + manual pages shipped by ATF. + +* Added the -s flag to atf-sh to support specifying the shell interpreter + to be used. + +* Removed ATF_WORKDIR. The only remaining consumers have been converted to + use the standard TMPDIR environment variable. As a benefit, and because + Kyua forces the TMPDIR to live within the test case's work directory, + any stale files left behind by ATF will be automatically cleaned up. + +* Documented the environment variables recognized by each component in the + relevant manual pages. This information was lost with the atf-config(1) + removal. + +* Added a new "require.diskspace" metadata property to test cases so that + they can specify the minimum amount of disk space required for the test + to run. + +* Renamed the atf-{c,c++,sh}-api(3) manual pages to atf-{c,c++,sh}(3) for + discoverability purposes. Symbolic links are provided for the time + being to still make the old names visible. + +* Issue #5: Recommend the (expected, actual) idiom for calls to the test + macros in the manual pages. + +* Issue #7: Stopped catching unhandled exceptions in atf-c++ tests. This + propagates the crash to the caller, which in turn allows it to obtain + proper debugging information. In particular, Kyua should now be able to + extract a stacktrace pinpointing the problem. + +* Issue #8: Fixed atf-c/macros_test:use test failures spotted by the clang + that ships with FreeBSD 11.0-CURRENT. + +* Issue #12: Improved documentation of atf-sh(3) and atf-check(1) by better + explaining how they relate to each other. + +* Issue #14: Stopped setting 'set -e' in atf-sh. This setting was + initially added as a way to enable a "strict" mode in the library and to + make test cases fail fast when they run unprotected commands. However, + doing so in the library is surprising as the responsibility of enabling + 'set -e' should be on the user's code. Also, 'set -e' introduces + inconsistent behavior on subshells and users do not expect that. + +* Issue #15: Fixed atf_utils_{fork,wait} to support nested calls. + +* Issue #16: Fixed test failures (by removing a long-standing hack) on + systems that lack \e support in printf(1). + +* Issue #19: Removed stale references to atf-config and atf-run. + Changes in version 0.20 *********************** Modified: stable/10/contrib/atf/atf-c++.hpp ============================================================================== --- stable/10/contrib/atf/atf-c++.hpp Sun Dec 21 08:00:38 2014 (r275987) +++ stable/10/contrib/atf/atf-c++.hpp Sun Dec 21 08:30:18 2014 (r275988) @@ -1,6 +1,3 @@ -// -// Automated Testing Framework (atf) -// // Copyright (c) 2007 The NetBSD Foundation, Inc. // All rights reserved. // @@ -25,12 +22,11 @@ // IN 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. -// -#if !defined(_ATF_CXX_HPP_) -#define _ATF_CXX_HPP_ +#if !defined(ATF_CXX_HPP) +#define ATF_CXX_HPP #include #include -#endif // !defined(_ATF_CXX_HPP_) +#endif // !defined(ATF_CXX_HPP) Modified: stable/10/contrib/atf/atf-c++/Kyuafile ============================================================================== --- stable/10/contrib/atf/atf-c++/Kyuafile Sun Dec 21 08:00:38 2014 (r275987) +++ stable/10/contrib/atf/atf-c++/Kyuafile Sun Dec 21 08:30:18 2014 (r275988) @@ -5,7 +5,6 @@ test_suite("atf") atf_test_program{name="atf_c++_test"} atf_test_program{name="build_test"} atf_test_program{name="check_test"} -atf_test_program{name="config_test"} atf_test_program{name="macros_test"} atf_test_program{name="pkg_config_test"} atf_test_program{name="tests_test"} Copied: stable/10/contrib/atf/atf-c++/atf-c++.3 (from r273929, head/contrib/atf/atf-c++/atf-c++.3) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/contrib/atf/atf-c++/atf-c++.3 Sun Dec 21 08:30:18 2014 (r275988, copy of r273929, head/contrib/atf/atf-c++/atf-c++.3) @@ -0,0 +1,649 @@ +.\" Copyright (c) 2008 The NetBSD Foundation, Inc. +.\" 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. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND +.\" CONTRIBUTORS ``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 FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY +.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE +.\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER +.\" IN 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. +.Dd October 13, 2014 +.Dt ATF-C++ 3 +.Os +.Sh NAME +.Nm atf-c++ , +.Nm ATF_ADD_TEST_CASE , +.Nm ATF_CHECK_ERRNO , +.Nm ATF_FAIL , +.Nm ATF_INIT_TEST_CASES , +.Nm ATF_PASS , +.Nm ATF_REQUIRE , +.Nm ATF_REQUIRE_EQ , +.Nm ATF_REQUIRE_ERRNO , +.Nm ATF_REQUIRE_IN , +.Nm ATF_REQUIRE_MATCH , +.Nm ATF_REQUIRE_NOT_IN , +.Nm ATF_REQUIRE_THROW , +.Nm ATF_REQUIRE_THROW_RE , +.Nm ATF_SKIP , +.Nm ATF_TEST_CASE , +.Nm ATF_TEST_CASE_BODY , +.Nm ATF_TEST_CASE_CLEANUP , +.Nm ATF_TEST_CASE_HEAD , +.Nm ATF_TEST_CASE_NAME , +.Nm ATF_TEST_CASE_USE , +.Nm ATF_TEST_CASE_WITH_CLEANUP , +.Nm ATF_TEST_CASE_WITHOUT_HEAD , +.Nm atf::utils::cat_file , +.Nm atf::utils::compare_file , +.Nm atf::utils::copy_file , +.Nm atf::utils::create_file , +.Nm atf::utils::file_exists , +.Nm atf::utils::fork , +.Nm atf::utils::grep_collection , +.Nm atf::utils::grep_file , +.Nm atf::utils::grep_string , +.Nm atf::utils::redirect , +.Nm atf::utils::wait +.Nd C++ API to write ATF-based test programs +.Sh SYNOPSIS +.In atf-c++.hpp +.Fn ATF_ADD_TEST_CASE "tcs" "name" +.Fn ATF_CHECK_ERRNO "expected_errno" "bool_expression" +.Fn ATF_FAIL "reason" +.Fn ATF_INIT_TEST_CASES "tcs" +.Fn ATF_PASS +.Fn ATF_REQUIRE "expression" +.Fn ATF_REQUIRE_EQ "expected_expression" "actual_expression" +.Fn ATF_REQUIRE_ERRNO "expected_errno" "bool_expression" +.Fn ATF_REQUIRE_IN "element" "collection" +.Fn ATF_REQUIRE_MATCH "regexp" "string_expression" +.Fn ATF_REQUIRE_NOT_IN "element" "collection" +.Fn ATF_REQUIRE_THROW "expected_exception" "statement" +.Fn ATF_REQUIRE_THROW_RE "expected_exception" "regexp" "statement" +.Fn ATF_SKIP "reason" +.Fn ATF_TEST_CASE "name" +.Fn ATF_TEST_CASE_BODY "name" +.Fn ATF_TEST_CASE_CLEANUP "name" +.Fn ATF_TEST_CASE_HEAD "name" +.Fn ATF_TEST_CASE_NAME "name" +.Fn ATF_TEST_CASE_USE "name" +.Fn ATF_TEST_CASE_WITH_CLEANUP "name" +.Fn ATF_TEST_CASE_WITHOUT_HEAD "name" +.Ft void +.Fo atf::utils::cat_file +.Fa "const std::string& path" +.Fa "const std::string& prefix" +.Fc +.Ft bool +.Fo atf::utils::compare_file +.Fa "const std::string& path" +.Fa "const std::string& contents" +.Fc +.Ft void +.Fo atf::utils::copy_file +.Fa "const std::string& source" +.Fa "const std::string& destination" +.Fc +.Ft void +.Fo atf::utils::create_file +.Fa "const std::string& path" +.Fa "const std::string& contents" +.Fc +.Ft void +.Fo atf::utils::file_exists +.Fa "const std::string& path" +.Fc +.Ft pid_t +.Fo atf::utils::fork +.Fa "void" +.Fc +.Ft bool +.Fo atf::utils::grep_collection +.Fa "const std::string& regexp" +.Fa "const Collection& collection" +.Fc +.Ft bool +.Fo atf::utils::grep_file +.Fa "const std::string& regexp" +.Fa "const std::string& path" +.Fc +.Ft bool +.Fo atf::utils::grep_string +.Fa "const std::string& regexp" +.Fa "const std::string& path" +.Fc +.Ft void +.Fo atf::utils::redirect +.Fa "const int fd" +.Fa "const std::string& path" +.Fc +.Ft void +.Fo atf::utils::wait +.Fa "const pid_t pid" +.Fa "const int expected_exit_status" +.Fa "const std::string& expected_stdout" +.Fa "const std::string& expected_stderr" +.Fc +.Sh DESCRIPTION +ATF provides a C++ programming interface to implement test programs. +C++-based test programs follow this template: +.Bd -literal -offset indent +extern "C" { +.Ns ... C-specific includes go here ... +} + +.Ns ... C++-specific includes go here ... + +#include + +ATF_TEST_CASE(tc1); +ATF_TEST_CASE_HEAD(tc1) +{ + ... first test case's header ... +} +ATF_TEST_CASE_BODY(tc1) +{ + ... first test case's body ... +} + +ATF_TEST_CASE_WITH_CLEANUP(tc2); +ATF_TEST_CASE_HEAD(tc2) +{ + ... second test case's header ... +} +ATF_TEST_CASE_BODY(tc2) +{ + ... second test case's body ... +} +ATF_TEST_CASE_CLEANUP(tc2) +{ + ... second test case's cleanup ... +} + +ATF_TEST_CASE(tc3); +ATF_TEST_CASE_BODY(tc3) +{ + ... third test case's body ... +} + +.Ns ... additional test cases ... + +ATF_INIT_TEST_CASES(tcs) +{ + ATF_ADD_TEST_CASE(tcs, tc1); + ATF_ADD_TEST_CASE(tcs, tc2); + ATF_ADD_TEST_CASE(tcs, tc3); + ... add additional test cases ... +} +.Ed +.Ss Definition of test cases +Test cases have an identifier and are composed of three different parts: +the header, the body and an optional cleanup routine, all of which are +described in +.Xr atf-test-case 4 . +To define test cases, one can use the +.Fn ATF_TEST_CASE , +.Fn ATF_TEST_CASE_WITH_CLEANUP +or the +.Fn ATF_TEST_CASE_WITHOUT_HEAD +macros, which take a single parameter specifiying the test case's +name. +.Fn ATF_TEST_CASE , +requires to define a head and a body for the test case, +.Fn ATF_TEST_CASE_WITH_CLEANUP +requires to define a head, a body and a cleanup for the test case and +.Fn ATF_TEST_CASE_WITHOUT_HEAD +requires only a body for the test case. +It is important to note that these +.Em do not +set the test case up for execution when the program is run. +In order to do so, a later registration is needed through the +.Fn ATF_ADD_TEST_CASE +macro detailed in +.Sx Program initialization . +.Pp +Later on, one must define the three parts of the body by means of three +functions. +Their headers are given by the +.Fn ATF_TEST_CASE_HEAD , +.Fn ATF_TEST_CASE_BODY +and +.Fn ATF_TEST_CASE_CLEANUP +macros, all of which take the test case's name. +Following each of these, a block of code is expected, surrounded by the +opening and closing brackets. +.Pp +Additionally, the +.Fn ATF_TEST_CASE_NAME +macro can be used to obtain the name of the class corresponding to a +particular test case, as the name is internally manged by the library to +prevent clashes with other user identifiers. +Similarly, the +.Fn ATF_TEST_CASE_USE +macro can be executed on a particular test case to mark it as "used" and +thus prevent compiler warnings regarding unused symbols. +Note that +.Em you should never have to use these macros during regular operation. +.Ss Program initialization +The library provides a way to easily define the test program's +.Fn main +function. +You should never define one on your own, but rely on the +library to do it for you. +This is done by using the +.Fn ATF_INIT_TEST_CASES +macro, which is passed the name of the list that will hold the test cases. +This name can be whatever you want as long as it is a valid variable value. +.Pp +After the macro, you are supposed to provide the body of a function, which +should only use the +.Fn ATF_ADD_TEST_CASE +macro to register the test cases the test program will execute. +The first parameter of this macro matches the name you provided in the +former call. +.Ss Header definitions +The test case's header can define the meta-data by using the +.Fn set_md_var +method, which takes two parameters: the first one specifies the +meta-data variable to be set and the second one specifies its value. +Both of them are strings. +.Ss Configuration variables +The test case has read-only access to the current configuration variables +by means of the +.Ft bool +.Fn has_config_var +and the +.Ft std::string +.Fn get_config_var +methods, which can be called in any of the three parts of a test case. +.Ss Access to the source directory +It is possible to get the path to the test case's source directory from any +of its three components by querying the +.Sq srcdir +configuration variable. +.Ss Requiring programs +Aside from the +.Va require.progs +meta-data variable available in the header only, one can also check for +additional programs in the test case's body by using the +.Fn require_prog +function, which takes the base name or full path of a single binary. +Relative paths are forbidden. +If it is not found, the test case will be automatically skipped. +.Ss Test case finalization +The test case finalizes either when the body reaches its end, at which +point the test is assumed to have +.Em passed , +or at any explicit call to +.Fn ATF_PASS , +.Fn ATF_FAIL +or +.Fn ATF_SKIP . +These three macros terminate the execution of the test case immediately. +The cleanup routine will be processed afterwards in a completely automated +way, regardless of the test case's termination reason. +.Pp +.Fn ATF_PASS +does not take any parameters. +.Fn ATF_FAIL +and +.Fn ATF_SKIP +take a single string that describes why the test case failed or +was skipped, respectively. +It is very important to provide a clear error message in both cases so that +the user can quickly know why the test did not pass. +.Ss Expectations +Everything explained in the previous section changes when the test case +expectations are redefined by the programmer. +.Pp +Each test case has an internal state called +.Sq expect +that describes what the test case expectations are at any point in time. +The value of this property can change during execution by any of: +.Bl -tag -width indent +.It Fn expect_death "reason" +Expects the test case to exit prematurely regardless of the nature of the +exit. +.It Fn expect_exit "exitcode" "reason" +Expects the test case to exit cleanly. +If +.Va exitcode +is not +.Sq -1 , +the runtime engine will validate that the exit code of the test case +matches the one provided in this call. +Otherwise, the exact value will be ignored. +.It Fn expect_fail "reason" +Any failure (be it fatal or non-fatal) raised in this mode is recorded. +However, such failures do not report the test case as failed; instead, the +test case finalizes cleanly and is reported as +.Sq expected failure ; +this report includes the provided +.Fa reason +as part of it. +If no error is raised while running in this mode, then the test case is +reported as +.Sq failed . +.Pp +This mode is useful to reproduce actual known bugs in tests. +Whenever the developer fixes the bug later on, the test case will start +reporting a failure, signaling the developer that the test case must be +adjusted to the new conditions. +In this situation, it is useful, for example, to set +.Fa reason +as the bug number for tracking purposes. +.It Fn expect_pass +This is the normal mode of execution. +In this mode, any failure is reported as such to the user and the test case +is marked as +.Sq failed . +.It Fn expect_race "reason" +Any failure or timeout during the execution of the test case will be +considered as if a race condition has been triggered and reported as such. +If no problems arise, the test will continue execution as usual. +.It Fn expect_signal "signo" "reason" +Expects the test case to terminate due to the reception of a signal. +If +.Va signo +is not +.Sq -1 , +the runtime engine will validate that the signal that terminated the test +case matches the one provided in this call. +Otherwise, the exact value will be ignored. +.It Fn expect_timeout "reason" +Expects the test case to execute for longer than its timeout. +.El +.Ss Helper macros for common checks +The library provides several macros that are very handy in multiple +situations. +These basically check some condition after executing a given statement or +processing a given expression and, if the condition is not met, they +automatically call +.Fn ATF_FAIL +with an appropriate error message. +.Pp +.Fn ATF_REQUIRE +takes an expression and raises a failure if it evaluates to false. +.Pp +.Fn ATF_REQUIRE_EQ +takes two expressions and raises a failure if the two do not evaluate to +the same exact value. +The common style is to put the expected value in the first parameter and the +actual value in the second parameter. +.Pp +.Fn ATF_REQUIRE_IN +takes an element and a collection and validates that the element is present in +the collection. +.Pp +.Fn ATF_REQUIRE_MATCH +takes a regular expression and a string and raises a failure if the regular +expression does not match the string. +.Pp +.Fn ATF_REQUIRE_NOT_IN +takes an element and a collection and validates that the element is not present +in the collection. +.Pp +.Fn ATF_REQUIRE_THROW +takes the name of an exception and a statement and raises a failure if +the statement does not throw the specified exception. +.Fn ATF_REQUIRE_THROW_RE +takes the name of an exception, a regular expresion and a statement and raises a +failure if the statement does not throw the specified exception and if the +message of the exception does not match the regular expression. +.Pp +.Fn ATF_CHECK_ERRNO +and +.Fn ATF_REQUIRE_ERRNO +take, first, the error code that the check is expecting to find in the +.Va errno +variable and, second, a boolean expression that, if evaluates to true, +means that a call failed and +.Va errno +has to be checked against the first value. +.Ss Utility functions +The following functions are provided as part of the +.Nm +API to simplify the creation of a variety of tests. +In particular, these are useful to write tests for command-line interfaces. +.Pp +.Ft void +.Fo atf::utils::cat_file +.Fa "const std::string& path" +.Fa "const std::string& prefix" +.Fc +.Bd -ragged -offset indent +Prints the contents of +.Fa path +to the standard output, prefixing every line with the string in +.Fa prefix . +.Ed +.Pp +.Ft bool +.Fo atf::utils::compare_file +.Fa "const std::string& path" +.Fa "const std::string& contents" +.Fc +.Bd -ragged -offset indent +Returns true if the given +.Fa path +matches exactly the expected inlined +.Fa contents . +.Ed +.Pp +.Ft void +.Fo atf::utils::copy_file +.Fa "const std::string& source" +.Fa "const std::string& destination" +.Fc +.Bd -ragged -offset indent +Copies the file +.Fa source +to +.Fa destination . +The permissions of the file are preserved during the code. +.Ed +.Pp +.Ft void +.Fo atf::utils::create_file +.Fa "const std::string& path" +.Fa "const std::string& contents" +.Fc +.Bd -ragged -offset indent +Creates +.Fa file +with the text given in +.Fa contents . +.Ed +.Pp +.Ft void +.Fo atf::utils::file_exists +.Fa "const std::string& path" +.Fc +.Bd -ragged -offset indent +Checks if +.Fa path +exists. +.Ed +.Pp +.Ft pid_t +.Fo atf::utils::fork +.Fa "void" +.Fc +.Bd -ragged -offset indent +Forks a process and redirects the standard output and standard error of the +child to files for later validation with +.Fn atf::utils::wait . +Fails the test case if the fork fails, so this does not return an error. +.Ed +.Pp +.Ft bool +.Fo atf::utils::grep_collection +.Fa "const std::string& regexp" +.Fa "const Collection& collection" +.Fc +.Bd -ragged -offset indent +Searches for the regular expression +.Fa regexp +in any of the strings contained in the +.Fa collection . +This is a template that accepts any one-dimensional container of strings. +.Ed +.Pp +.Ft bool +.Fo atf::utils::grep_file +.Fa "const std::string& regexp" +.Fa "const std::string& path" +.Fc +.Bd -ragged -offset indent +Searches for the regular expression +.Fa regexp +in the file +.Fa path . +The variable arguments are used to construct the regular expression. +.Ed +.Pp +.Ft bool +.Fo atf::utils::grep_string +.Fa "const std::string& regexp" +.Fa "const std::string& str" +.Fc +.Bd -ragged -offset indent +Searches for the regular expression +.Fa regexp +in the string +.Fa str . +.Ed +.Ft void +.Fo atf::utils::redirect +.Fa "const int fd" +.Fa "const std::string& path" +.Fc +.Bd -ragged -offset indent +Redirects the given file descriptor +.Fa fd +to the file +.Fa path . +This function exits the process in case of an error and does not properly mark +the test case as failed. +As a result, it should only be used in subprocesses of the test case; specially +those spawned by +.Fn atf::utils::fork . +.Ed +.Pp +.Ft void +.Fo atf::utils::wait +.Fa "const pid_t pid" +.Fa "const int expected_exit_status" +.Fa "const std::string& expected_stdout" +.Fa "const std::string& expected_stderr" +.Fc +.Bd -ragged -offset indent +Waits and validates the result of a subprocess spawned with +.Fn atf::utils::wait . +The validation involves checking that the subprocess exited cleanly and returned +the code specified in +.Fa expected_exit_status +and that its standard output and standard error match the strings given in +.Fa expected_stdout +and +.Fa expected_stderr . +.Pp +If any of the +.Fa expected_stdout +or +.Fa expected_stderr +strings are prefixed with +.Sq save: , +then they specify the name of the file into which to store the stdout or stderr +of the subprocess, and no comparison is performed. +.Ed +.Sh ENVIRONMENT +The following variables are recognized by +.Nm +but should not be overridden other than for testing purposes: +.Pp +.Bl -tag -width ATFXBUILDXCXXFLAGSXX -compact +.It Va ATF_BUILD_CC +Path to the C compiler. +.It Va ATF_BUILD_CFLAGS +C compiler flags. +.It Va ATF_BUILD_CPP +Path to the C/C++ preprocessor. +.It Va ATF_BUILD_CPPFLAGS +C/C++ preprocessor flags. +.It Va ATF_BUILD_CXX +Path to the C++ compiler. +.It Va ATF_BUILD_CXXFLAGS +C++ compiler flags. +.El +.Sh EXAMPLES +The following shows a complete test program with a single test case that +validates the addition operator: +.Bd -literal -offset indent +#include + +ATF_TEST_CASE(addition); +ATF_TEST_CASE_HEAD(addition) +{ + set_md_var("descr", "Sample tests for the addition operator"); +} +ATF_TEST_CASE_BODY(addition) +{ + ATF_REQUIRE_EQ(0, 0 + 0); + ATF_REQUIRE_EQ(1, 0 + 1); + ATF_REQUIRE_EQ(1, 1 + 0); + + ATF_REQUIRE_EQ(2, 1 + 1); + + ATF_REQUIRE_EQ(300, 100 + 200); +} + +ATF_TEST_CASE(open_failure); +ATF_TEST_CASE_HEAD(open_failure) +{ + set_md_var("descr", "Sample tests for the open function"); +} +ATF_TEST_CASE_BODY(open_failure) +{ + ATF_REQUIRE_ERRNO(ENOENT, open("non-existent", O_RDONLY) == -1); +} + +ATF_TEST_CASE(known_bug); +ATF_TEST_CASE_HEAD(known_bug) +{ + set_md_var("descr", "Reproduces a known bug"); +} +ATF_TEST_CASE_BODY(known_bug) +{ + expect_fail("See bug number foo/bar"); + ATF_REQUIRE_EQ(3, 1 + 1); + expect_pass(); + ATF_REQUIRE_EQ(3, 1 + 2); +} + +ATF_INIT_TEST_CASES(tcs) +{ + ATF_ADD_TEST_CASE(tcs, addition); + ATF_ADD_TEST_CASE(tcs, open_failure); + ATF_ADD_TEST_CASE(tcs, known_bug); +} +.Ed +.Sh SEE ALSO +.Xr atf-test-program 1 , +.Xr atf-test-case 4 Modified: stable/10/contrib/atf/atf-c++/atf_c++_test.cpp ============================================================================== --- stable/10/contrib/atf/atf-c++/atf_c++_test.cpp Sun Dec 21 08:00:38 2014 (r275987) +++ stable/10/contrib/atf/atf-c++/atf_c++_test.cpp Sun Dec 21 08:30:18 2014 (r275988) @@ -1,6 +1,3 @@ -// -// Automated Testing Framework (atf) -// // Copyright (c) 2009 The NetBSD Foundation, Inc. // All rights reserved. // @@ -25,11 +22,10 @@ // IN 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. -// -#include "macros.hpp" +#include -#include "detail/test_helpers.hpp" +#include "atf-c++/detail/test_helpers.hpp" // ------------------------------------------------------------------------ // Tests cases for the header file. Modified: stable/10/contrib/atf/atf-c++/build.cpp ============================================================================== --- stable/10/contrib/atf/atf-c++/build.cpp Sun Dec 21 08:00:38 2014 (r275987) +++ stable/10/contrib/atf/atf-c++/build.cpp Sun Dec 21 08:30:18 2014 (r275988) @@ -1,6 +1,3 @@ -// -// Automated Testing Framework (atf) -// // Copyright (c) 2009 The NetBSD Foundation, Inc. // All rights reserved. // @@ -25,7 +22,8 @@ // IN 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. -// + +#include "atf-c++/build.hpp" extern "C" { #include "atf-c/build.h" @@ -33,10 +31,8 @@ extern "C" { #include "atf-c/utils.h" } -#include "build.hpp" - -#include "detail/exceptions.hpp" -#include "detail/process.hpp" +#include "atf-c++/detail/exceptions.hpp" +#include "atf-c++/detail/process.hpp" namespace impl = atf::build; #define IMPL_NAME "atf::build" Modified: stable/10/contrib/atf/atf-c++/build.hpp ============================================================================== --- stable/10/contrib/atf/atf-c++/build.hpp Sun Dec 21 08:00:38 2014 (r275987) +++ stable/10/contrib/atf/atf-c++/build.hpp Sun Dec 21 08:30:18 2014 (r275988) @@ -1,6 +1,3 @@ -// -// Automated Testing Framework (atf) -// // Copyright (c) 2009 The NetBSD Foundation, Inc. // All rights reserved. // @@ -25,10 +22,9 @@ // IN 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. -// -#if !defined(_ATF_CXX_BUILD_HPP_) -#define _ATF_CXX_BUILD_HPP_ +#if !defined(ATF_CXX_BUILD_HPP) +#define ATF_CXX_BUILD_HPP #include @@ -54,4 +50,4 @@ process::argv_array cxx_o(const std::str } // namespace build } // namespace atf -#endif // !defined(_ATF_CXX_BUILD_HPP_) +#endif // !defined(ATF_CXX_BUILD_HPP) Modified: stable/10/contrib/atf/atf-c++/build_test.cpp ============================================================================== --- stable/10/contrib/atf/atf-c++/build_test.cpp Sun Dec 21 08:00:38 2014 (r275987) +++ stable/10/contrib/atf/atf-c++/build_test.cpp Sun Dec 21 08:30:18 2014 (r275988) @@ -1,6 +1,3 @@ -// -// Automated Testing Framework (atf) -// // Copyright (c) 2009 The NetBSD Foundation, Inc. // All rights reserved. // @@ -25,31 +22,25 @@ // IN 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. -// + +#include "atf-c++/build.hpp" #include #include -#include "../atf-c/h_build.h" +#include -#include "build.hpp" -#include "config.hpp" -#include "macros.hpp" - -#include "detail/env.hpp" -#include "detail/process.hpp" -#include "detail/test_helpers.hpp" +extern "C" { +#include "atf-c/h_build.h" +} + +#include "atf-c++/detail/env.hpp" +#include "atf-c++/detail/process.hpp" // ------------------------------------------------------------------------ // Auxiliary functions. // ------------------------------------------------------------------------ -namespace atf { - namespace config { - void __reinit(void); - } -} - template< class C > void print_col(const char* prefix, const C& c) @@ -168,7 +159,6 @@ ATF_TEST_CASE_BODY(c_o) verbose_set_env("ATF_BUILD_CC", test->cc); verbose_set_env("ATF_BUILD_CFLAGS", test->cflags); verbose_set_env("ATF_BUILD_CPPFLAGS", test->cppflags); - atf::config::__reinit(); atf::process::argv_array argv = atf::build::c_o(test->sfile, test->ofile, @@ -190,7 +180,6 @@ ATF_TEST_CASE_BODY(cpp) verbose_set_env("ATF_BUILD_CPP", test->cpp); verbose_set_env("ATF_BUILD_CPPFLAGS", test->cppflags); - atf::config::__reinit(); atf::process::argv_array argv = atf::build::cpp(test->sfile, test->ofile, @@ -213,7 +202,6 @@ ATF_TEST_CASE_BODY(cxx_o) verbose_set_env("ATF_BUILD_CXX", test->cxx); verbose_set_env("ATF_BUILD_CXXFLAGS", test->cxxflags); verbose_set_env("ATF_BUILD_CPPFLAGS", test->cppflags); - atf::config::__reinit(); atf::process::argv_array argv = atf::build::cxx_o(test->sfile, test->ofile, @@ -223,12 +211,6 @@ ATF_TEST_CASE_BODY(cxx_o) } // ------------------------------------------------------------------------ -// Tests cases for the header file. -// ------------------------------------------------------------------------ - -HEADER_TC(include, "atf-c++/build.hpp"); - -// ------------------------------------------------------------------------ // Main. // ------------------------------------------------------------------------ @@ -241,7 +223,4 @@ ATF_INIT_TEST_CASES(tcs) ATF_ADD_TEST_CASE(tcs, c_o); ATF_ADD_TEST_CASE(tcs, cpp); ATF_ADD_TEST_CASE(tcs, cxx_o); - - // Add the test cases for the header file. - ATF_ADD_TEST_CASE(tcs, include); } Modified: stable/10/contrib/atf/atf-c++/check.cpp ============================================================================== --- stable/10/contrib/atf/atf-c++/check.cpp Sun Dec 21 08:00:38 2014 (r275987) +++ stable/10/contrib/atf/atf-c++/check.cpp Sun Dec 21 08:30:18 2014 (r275988) @@ -1,6 +1,3 @@ -// -// Automated Testing Framework (atf) -// // Copyright (c) 2007 The NetBSD Foundation, Inc. // All rights reserved. // @@ -25,7 +22,8 @@ // IN 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. -// + +#include "atf-c++/check.hpp" #include @@ -34,11 +32,9 @@ extern "C" { #include "atf-c/error.h" } -#include "check.hpp" - -#include "detail/exceptions.hpp" -#include "detail/process.hpp" -#include "detail/sanity.hpp" +#include "atf-c++/detail/exceptions.hpp" +#include "atf-c++/detail/process.hpp" +#include "atf-c++/detail/sanity.hpp" namespace impl = atf::check; #define IMPL_NAME "atf::check" *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Dec 21 08:45:47 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EF18E4A4; Sun, 21 Dec 2014 08:45:46 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 7B6FC2935; Sun, 21 Dec 2014 08:45:45 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id sBL8jcdc068470 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 21 Dec 2014 11:45:38 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id sBL8jcDH068469; Sun, 21 Dec 2014 11:45:38 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Sun, 21 Dec 2014 11:45:38 +0300 From: Gleb Smirnoff To: Adrian Chadd Subject: Re: svn commit: r275875 - head/sys/net80211 Message-ID: <20141221084538.GH47144@FreeBSD.org> References: <201412180517.sBI5HICb033295@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201412180517.sBI5HICb033295@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2014 08:45:47 -0000 Adrian, On Thu, Dec 18, 2014 at 05:17:18AM +0000, Adrian Chadd wrote: A> Log: A> Fix the scan handling for 11b->11g upgrades in a world where, well, A> it's not just 11b/11g. ... A> Thanks to: A> A> * Everyone who kept poking me about this and wondering why the hell A> their wifi would eventually stop seeing scan lists. Grr. A> I eventually snapped this evening and dug back into this code. And thanks to you from all of us :) -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Sun Dec 21 09:53:40 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1B490C5C; Sun, 21 Dec 2014 09:53:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 04E6735B5; Sun, 21 Dec 2014 09:53:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBL9rdfx023662; Sun, 21 Dec 2014 09:53:39 GMT (envelope-from brueffer@FreeBSD.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBL9rUlY023612; Sun, 21 Dec 2014 09:53:30 GMT (envelope-from brueffer@FreeBSD.org) Message-Id: <201412210953.sBL9rUlY023612@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: brueffer set sender to brueffer@FreeBSD.org using -f From: Christian Brueffer Date: Sun, 21 Dec 2014 09:53:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275990 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2014 09:53:40 -0000 Author: brueffer Date: Sun Dec 21 09:53:29 2014 New Revision: 275990 URL: https://svnweb.freebsd.org/changeset/base/275990 Log: Fix various mdoc issues. Found with: mandoc -Tlint Modified: head/share/man/man4/aout.4 head/share/man/man4/ath_ahb.4 head/share/man/man4/ath_pci.4 head/share/man/man4/carp.4 head/share/man/man4/crypto.4 head/share/man/man4/ip.4 head/share/man/man4/ipheth.4 head/share/man/man4/iscsi_initiator.4 head/share/man/man4/isp.4 head/share/man/man4/ispfw.4 head/share/man/man4/iwi.4 head/share/man/man4/multicast.4 head/share/man/man4/net80211.4 head/share/man/man4/netmap.4 head/share/man/man4/nfe.4 head/share/man/man4/ng_ether_echo.4 head/share/man/man4/ng_netflow.4 head/share/man/man4/nvram2env.4 head/share/man/man4/pass.4 head/share/man/man4/pccbb.4 head/share/man/man4/pflog.4 head/share/man/man4/pfsync.4 head/share/man/man4/pts.4 head/share/man/man4/sa.4 head/share/man/man4/send.4 head/share/man/man4/sfxge.4 head/share/man/man4/snd_hda.4 head/share/man/man4/snd_ich.4 head/share/man/man4/ural.4 head/share/man/man4/usfs.4 head/share/man/man4/virtio_console.4 head/share/man/man4/virtio_random.4 head/share/man/man4/vxlan.4 head/share/man/man4/wpi.4 Modified: head/share/man/man4/aout.4 ============================================================================== --- head/share/man/man4/aout.4 Sun Dec 21 09:43:03 2014 (r275989) +++ head/share/man/man4/aout.4 Sun Dec 21 09:53:29 2014 (r275990) @@ -123,7 +123,7 @@ non-executable mappings. .Xr execve 2 , .Xr a.out 5 , .Xr elf 5 , -.Xr sysctl 8 . +.Xr sysctl 8 .Sh HISTORY The .Xr a.out 5 Modified: head/share/man/man4/ath_ahb.4 ============================================================================== --- head/share/man/man4/ath_ahb.4 Sun Dec 21 09:43:03 2014 (r275989) +++ head/share/man/man4/ath_ahb.4 Sun Dec 21 09:53:29 2014 (r275990) @@ -47,7 +47,7 @@ drivers. This is only relevant for embedded System-on-Chip (SoC) devices such as the Atheros AR913x series, which include an Atheros wireless MAC on-die. .Sh SEE ALSO -.Xr ath 4 +.Xr ath 4 , .Xr ath_hal 4 .Sh HISTORY The Modified: head/share/man/man4/ath_pci.4 ============================================================================== --- head/share/man/man4/ath_pci.4 Sun Dec 21 09:43:03 2014 (r275989) +++ head/share/man/man4/ath_pci.4 Sun Dec 21 09:53:29 2014 (r275990) @@ -44,7 +44,7 @@ and .Xr ath_hal 4 drivers. .Sh SEE ALSO -.Xr ath 4 +.Xr ath 4 , .Xr ath_hal 4 .Sh HISTORY The Modified: head/share/man/man4/carp.4 ============================================================================== --- head/share/man/man4/carp.4 Sun Dec 21 09:43:03 2014 (r275989) +++ head/share/man/man4/carp.4 Sun Dec 21 09:53:29 2014 (r275990) @@ -306,7 +306,7 @@ tcpdump -npi vlan0 -T carp .Xr rc.conf 5 , .Xr devd.conf 5 , .Xr ifconfig 8 , -.Xr sysctl 8 +.Xr sysctl 8 , .Xr tcpdump 8 .Sh HISTORY The Modified: head/share/man/man4/crypto.4 ============================================================================== --- head/share/man/man4/crypto.4 Sun Dec 21 09:43:03 2014 (r275989) +++ head/share/man/man4/crypto.4 Sun Dec 21 09:53:29 2014 (r275990) @@ -114,7 +114,6 @@ The two modes are described separately b .Sh THEORY OF OPERATION Regardless of whether symmetric-key or asymmetric-key operations are to be performed, use of the device requires a basic series of steps: -.Pp .Bl -enum .It Open a file descriptor for the device. Modified: head/share/man/man4/ip.4 ============================================================================== --- head/share/man/man4/ip.4 Sun Dec 21 09:43:03 2014 (r275989) +++ head/share/man/man4/ip.4 Sun Dec 21 09:53:29 2014 (r275990) @@ -857,12 +857,12 @@ field was not equal to the length of the .Xr recv 2 , .Xr send 2 , .Xr byteorder 3 , +.Xr sourcefilter 3 , .Xr icmp 4 , .Xr igmp 4 , .Xr inet 4 , .Xr intro 4 , -.Xr multicast 4 , -.Xr sourcefilter 3 +.Xr multicast 4 .Rs .%A D. Thaler .%A B. Fenner Modified: head/share/man/man4/ipheth.4 ============================================================================== --- head/share/man/man4/ipheth.4 Sun Dec 21 09:43:03 2014 (r275989) +++ head/share/man/man4/ipheth.4 Sun Dec 21 09:53:29 2014 (r275990) @@ -80,7 +80,7 @@ Apple iPad tethering (all models) .Xr netintro 4 , .Xr urndis 4 , .Xr usb 4 , -.Xr ifconfig 8 +.Xr ifconfig 8 , .Xr usbconfig 8 .Sh HISTORY The Modified: head/share/man/man4/iscsi_initiator.4 ============================================================================== --- head/share/man/man4/iscsi_initiator.4 Sun Dec 21 09:43:03 2014 (r275989) +++ head/share/man/man4/iscsi_initiator.4 Sun Dec 21 09:53:29 2014 (r275990) @@ -112,6 +112,7 @@ for each new session. iSCSI RFC 3720 .\" .Sh HISTORY .Sh AUTHORS -This software was written by Daniel Braniss +This software was written by +.An Daniel Braniss Aq Mt danny@cs.huji.ac.il .Sh BUGS The lun discovery method is old-fashioned. Modified: head/share/man/man4/isp.4 ============================================================================== --- head/share/man/man4/isp.4 Sun Dec 21 09:43:03 2014 (r275989) +++ head/share/man/man4/isp.4 Sun Dec 21 09:53:29 2014 (r275990) @@ -230,7 +230,9 @@ This is the readonly World Wide Port Nam .Sh AUTHORS The .Nm -driver was written by Matthew Jacob originally for NetBSD at +driver was written by +.An Matthew Jacob +originally for NetBSD at NASA/Ames Research Center. .Sh BUGS The driver currently ignores some NVRAM settings. Modified: head/share/man/man4/ispfw.4 ============================================================================== --- head/share/man/man4/ispfw.4 Sun Dec 21 09:43:03 2014 (r275989) +++ head/share/man/man4/ispfw.4 Sun Dec 21 09:53:29 2014 (r275990) @@ -56,4 +56,5 @@ This will kick the f/w into getting unst .Sh SEE ALSO .Xr isp 4 .Sh AUTHORS -This driver was written by Matthew Jacob. +This driver was written by +.An Matthew Jacob . Modified: head/share/man/man4/iwi.4 ============================================================================== --- head/share/man/man4/iwi.4 Sun Dec 21 09:43:03 2014 (r275989) +++ head/share/man/man4/iwi.4 Sun Dec 21 09:53:29 2014 (r275990) @@ -152,7 +152,7 @@ This should not happen. .Xr wlan_tkip 4 , .Xr wlan_wep 4 , .Xr ifconfig 8 , -.Xr wpa_supplicant 8 . +.Xr wpa_supplicant 8 .Sh AUTHORS The original .Nm Modified: head/share/man/man4/multicast.4 ============================================================================== --- head/share/man/man4/multicast.4 Sun Dec 21 09:43:03 2014 (r275989) +++ head/share/man/man4/multicast.4 Sun Dec 21 09:53:29 2014 (r275990) @@ -945,16 +945,16 @@ signal, but the next upcall will be trig after the previous upcall. .\" .Sh SEE ALSO -.Xr altq 4 , -.Xr dummynet 4 , .Xr getsockopt 2 , -.Xr gif 4 , -.Xr gre 4 , .Xr recvfrom 2 , .Xr recvmsg 2 , .Xr setsockopt 2 , .Xr socket 2 , .Xr sourcefilter 3 , +.Xr altq 4 , +.Xr dummynet 4 , +.Xr gif 4 , +.Xr gre 4 , .Xr icmp6 4 , .Xr igmp 4 , .Xr inet 4 , Modified: head/share/man/man4/net80211.4 ============================================================================== --- head/share/man/man4/net80211.4 Sun Dec 21 09:43:03 2014 (r275989) +++ head/share/man/man4/net80211.4 Sun Dec 21 09:53:29 2014 (r275990) @@ -1313,6 +1313,6 @@ Set whether or not Wi-FI Protected Setup .Xr wlan 4 , .Xr wlan_acl 4 , .Xr wlan_xauth 4 , -.Xr ifconfig 8 , .Xr hostapd 8 , -.Xr wpa_supplicant 8 . +.Xr ifconfig 8 , +.Xr wpa_supplicant 8 Modified: head/share/man/man4/netmap.4 ============================================================================== --- head/share/man/man4/netmap.4 Sun Dec 21 09:43:03 2014 (r275989) +++ head/share/man/man4/netmap.4 Sun Dec 21 09:53:29 2014 (r275990) @@ -104,7 +104,6 @@ various aspects of the and .Nm VALE architecture, features and usage. -.Pp .Sh ARCHITECTURE .Nm supports raw packet I/O through a @@ -141,7 +140,6 @@ and ports by default use separate memory regions, but can be independently configured to share memory. -.Pp .Sh ENTERING AND EXITING NETMAP MODE The following section describes the system calls to create and control @@ -210,7 +208,6 @@ A on the file descriptor removes the binding, and returns the NIC to normal mode (reconnecting the data path to the host stack), or destroys the virtual port. -.Pp .Sh DATA STRUCTURES The data structures in the mmapped memory region are detailed in .Xr sys/net/netmap.h , @@ -403,7 +400,6 @@ A transmit ring with pending transmissio The function .Va int nm_tx_pending(ring) implements this test. -.Pp .Ss RECEIVE RINGS On receive rings, after a .Nm @@ -447,7 +443,6 @@ Below is an example of the evolution of v v v RX [.......hhhRRRRRRRRRRRR....] .Ed -.Pp .Sh SLOTS AND PACKET BUFFERS Normally, packets should be stored in the netmap-allocated buffers assigned to slots when ports are bound to a file descriptor. @@ -749,7 +744,6 @@ of the packet is successful, or 0 on err similar to pcap_dispatch(), applies a callback to incoming packets .It Va u_char * nm_nextpkt(struct nm_desc *d, struct nm_pkthdr *hdr) similar to pcap_next(), fetches the next packet -.Pp .El .Sh SUPPORTED DEVICES .Nm @@ -1037,10 +1031,8 @@ Other .Nm clients attached to the same switch can now communicate with the network card or the host. -.Pp .Sh SEE ALSO -.Pp -http://info.iet.unipi.it/~luigi/netmap/ +.Pa http://info.iet.unipi.it/~luigi/netmap/ .Pp Luigi Rizzo, Revisiting network I/O APIs: the netmap framework, Communications of the ACM, 55 (3), pp.45-51, March 2012 Modified: head/share/man/man4/nfe.4 ============================================================================== --- head/share/man/man4/nfe.4 Sun Dec 21 09:43:03 2014 (r275989) +++ head/share/man/man4/nfe.4 Sun Dec 21 09:53:29 2014 (r275990) @@ -175,8 +175,8 @@ before a change takes effect. .Xr pci 4 , .Xr polling 4 , .Xr rgephy 4 , -.Xr sysctl 8 , -.Xr ifconfig 8 +.Xr ifconfig 8 , +.Xr sysctl 8 .Sh HISTORY The .Nm Modified: head/share/man/man4/ng_ether_echo.4 ============================================================================== --- head/share/man/man4/ng_ether_echo.4 Sun Dec 21 09:43:03 2014 (r275989) +++ head/share/man/man4/ng_ether_echo.4 Sun Dec 21 09:53:29 2014 (r275990) @@ -64,9 +64,9 @@ This node shuts down upon receipt of a control message, or when all hooks have been disconnected. .Sh SEE ALSO .Xr netgraph 4 , -.Xr ng_hole 4 , .Xr ng_echo 4 , .Xr ng_ether 4 , +.Xr ng_hole 4 , .Xr ngctl 8 .Sh HISTORY The Modified: head/share/man/man4/ng_netflow.4 ============================================================================== --- head/share/man/man4/ng_netflow.4 Sun Dec 21 09:43:03 2014 (r275989) +++ head/share/man/man4/ng_netflow.4 Sun Dec 21 09:53:29 2014 (r275990) @@ -315,8 +315,8 @@ we do not use tee, but send packets back SEQ .Ed .Sh SEE ALSO -.Xr netgraph 4 , .Xr setfib 2 , +.Xr netgraph 4 , .Xr ng_ether 4 , .Xr ng_iface 4 , .Xr ng_ksocket 4 , Modified: head/share/man/man4/nvram2env.4 ============================================================================== --- head/share/man/man4/nvram2env.4 Sun Dec 21 09:43:03 2014 (r275989) +++ head/share/man/man4/nvram2env.4 Sun Dec 21 09:53:29 2014 (r275990) @@ -107,7 +107,7 @@ hint.nvram.1.base=0x1cff8000 .Ed .Sh SEE ALSO .Xr kenv 1 , -.Xr kenv 2 . +.Xr kenv 2 .Sh HISTORY .Nm first appeared in Modified: head/share/man/man4/pass.4 ============================================================================== --- head/share/man/man4/pass.4 Sun Dec 21 09:43:03 2014 (r275989) +++ head/share/man/man4/pass.4 Sun Dec 21 09:53:29 2014 (r275990) @@ -104,8 +104,8 @@ CAM subsystem. None. .Sh SEE ALSO .Xr cam 3 , -.Xr cam 4 , .Xr cam_cdbparse 3 , +.Xr cam 4 , .Xr xpt 4 , .Xr camcontrol 8 .Sh HISTORY Modified: head/share/man/man4/pccbb.4 ============================================================================== --- head/share/man/man4/pccbb.4 Sun Dec 21 09:43:03 2014 (r275989) +++ head/share/man/man4/pccbb.4 Sun Dec 21 09:53:29 2014 (r275990) @@ -179,5 +179,5 @@ debugging problems with the bridge chips .El .Sh SEE ALSO .Xr cardbus 4 , -.Xr pccard 4 , -.Xr exca 4 +.Xr exca 4 , +.Xr pccard 4 Modified: head/share/man/man4/pflog.4 ============================================================================== --- head/share/man/man4/pflog.4 Sun Dec 21 09:43:03 2014 (r275989) +++ head/share/man/man4/pflog.4 Sun Dec 21 09:53:29 2014 (r275990) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 31 2007 +.Dd May 31, 2007 .Dt PFLOG 4 .Os .Sh NAME Modified: head/share/man/man4/pfsync.4 ============================================================================== --- head/share/man/man4/pfsync.4 Sun Dec 21 09:43:03 2014 (r275989) +++ head/share/man/man4/pfsync.4 Sun Dec 21 09:53:29 2014 (r275990) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 20 2011 +.Dd December 20, 2011 .Dt PFSYNC 4 .Os .Sh NAME Modified: head/share/man/man4/pts.4 ============================================================================== --- head/share/man/man4/pts.4 Sun Dec 21 09:43:03 2014 (r275989) +++ head/share/man/man4/pts.4 Sun Dec 21 09:53:29 2014 (r275990) @@ -142,8 +142,8 @@ Pseudo-terminal slave devices. .Sh DIAGNOSTICS None. .Sh SEE ALSO -.Xr grantpt 3 , .Xr posix_openpt 2 , +.Xr grantpt 3 , .Xr ptsname 3 , .Xr pty 4 , .Xr tty 4 Modified: head/share/man/man4/sa.4 ============================================================================== --- head/share/man/man4/sa.4 Sun Dec 21 09:43:03 2014 (r275989) +++ head/share/man/man4/sa.4 Sun Dec 21 09:53:29 2014 (r275990) @@ -264,8 +264,8 @@ accessing the device, e.g.). .Sh DIAGNOSTICS None. .Sh SEE ALSO -.Xr cam 4 , -.Xr mt 1 +.Xr mt 1 , +.Xr cam 4 .Sh AUTHORS .An -nosplit The Modified: head/share/man/man4/send.4 ============================================================================== --- head/share/man/man4/send.4 Sun Dec 21 09:43:03 2014 (r275989) +++ head/share/man/man4/send.4 Sun Dec 21 09:53:29 2014 (r275990) @@ -196,9 +196,9 @@ Occurs if interface output routines fail interface. .El .Sh SEE ALSO -.Xr recvfrom 2 -.Xr sendto 2 -.Xr socket 2 +.Xr recvfrom 2 , +.Xr sendto 2 , +.Xr socket 2 , .Xr loader.conf 5 .Sh HISTORY The Modified: head/share/man/man4/sfxge.4 ============================================================================== --- head/share/man/man4/sfxge.4 Sun Dec 21 09:43:03 2014 (r275989) +++ head/share/man/man4/sfxge.4 Sun Dec 21 09:53:29 2014 (r275990) @@ -114,11 +114,11 @@ For general information and support, go to the Solarflare support website at: .Pa https://support.solarflare.com . .Sh SEE ALSO +.Xr cpuset 1 , .Xr arp 4 , .Xr netintro 4 , .Xr ng_ether 4 , .Xr vlan 4 , -.Xr cpuset 1 , .Xr ifconfig 8 .Sh AUTHORS The Modified: head/share/man/man4/snd_hda.4 ============================================================================== --- head/share/man/man4/snd_hda.4 Sun Dec 21 09:43:03 2014 (r275989) +++ head/share/man/man4/snd_hda.4 Sun Dec 21 09:53:29 2014 (r275990) @@ -590,8 +590,8 @@ driver supports more than two hundred di There is no sense to list all of them here, as in most cases specific CODEC configuration and wiring are more important then type of the CODEC itself. .Sh SEE ALSO -.Xr sound 4 , .Xr snd_ich 4 , +.Xr sound 4 , .Xr device.hints 5 , .Xr loader.conf 5 , .Xr sysctl 8 Modified: head/share/man/man4/snd_ich.4 ============================================================================== --- head/share/man/man4/snd_ich.4 Sun Dec 21 09:43:03 2014 (r275989) +++ head/share/man/man4/snd_ich.4 Sun Dec 21 09:53:29 2014 (r275990) @@ -99,8 +99,8 @@ NVIDIA nForce4 SiS 7012 .El .Sh SEE ALSO -.Xr sound 4 , -.Xr snd_hda 4 +.Xr snd_hda 4 , +.Xr sound 4 .Sh HISTORY The .Nm Modified: head/share/man/man4/ural.4 ============================================================================== --- head/share/man/man4/ural.4 Sun Dec 21 09:43:03 2014 (r275989) +++ head/share/man/man4/ural.4 Sun Dec 21 09:53:29 2014 (r275990) @@ -142,9 +142,9 @@ This should not happen. .Xr wlan_tkip 4 , .Xr wlan_wep 4 , .Xr wlan_xauth 4 , -.Xr ifconfig 8 , .Xr hostapd 8 , -.Xr wpa_supplicant 8 . +.Xr ifconfig 8 , +.Xr wpa_supplicant 8 .Rs .%T "Ralink Technology" .%U http://www.ralinktech.com/ Modified: head/share/man/man4/usfs.4 ============================================================================== --- head/share/man/man4/usfs.4 Sun Dec 21 09:43:03 2014 (r275989) +++ head/share/man/man4/usfs.4 Sun Dec 21 09:53:29 2014 (r275990) @@ -54,7 +54,7 @@ the USB stack is activated in USB device .Pp Upon attach the driver creates a RAM disk which can be read and written. .Sh SEE ALSO -.Xr umass 4 +.Xr umass 4 , .Xr usb 4 .Sh HISTORY The Modified: head/share/man/man4/virtio_console.4 ============================================================================== --- head/share/man/man4/virtio_console.4 Sun Dec 21 09:43:03 2014 (r275989) +++ head/share/man/man4/virtio_console.4 Sun Dec 21 09:53:29 2014 (r275990) @@ -58,7 +58,7 @@ each port is accessible through .It Pa /dev/ttyV?.?? .El .Sh SEE ALSO -.Xr tty 4 +.Xr tty 4 , .Xr virtio 4 .Sh HISTORY The Modified: head/share/man/man4/virtio_random.4 ============================================================================== --- head/share/man/man4/virtio_random.4 Sun Dec 21 09:43:03 2014 (r275989) +++ head/share/man/man4/virtio_random.4 Sun Dec 21 09:53:29 2014 (r275990) @@ -52,7 +52,7 @@ device driver provides support for VirtI The entropy device supplies high-quality randomness from the hypervisor to the guest. .Sh SEE ALSO -.Xr random 4 +.Xr random 4 , .Xr virtio 4 .Sh HISTORY The Modified: head/share/man/man4/vxlan.4 ============================================================================== --- head/share/man/man4/vxlan.4 Sun Dec 21 09:43:03 2014 (r275989) +++ head/share/man/man4/vxlan.4 Sun Dec 21 09:53:29 2014 (r275990) @@ -215,9 +215,9 @@ Once created, the interface can be configured with .Xr ifconfig 8 . .Sh SEE ALSO -.Xr ifconfig 8 , .Xr inet 4 , -.Xr inet 6 , +.Xr inet6 4 , +.Xr ifconfig 8 , .Xr sysctl 8 , .Xr vlan 8 .Rs Modified: head/share/man/man4/wpi.4 ============================================================================== --- head/share/man/man4/wpi.4 Sun Dec 21 09:43:03 2014 (r275989) +++ head/share/man/man4/wpi.4 Sun Dec 21 09:53:29 2014 (r275990) @@ -117,12 +117,12 @@ The hardware switch controlling the radi Data transmission is not possible in this state. .El .Sh SEE ALSO -.Xr wpifw 4 , .Xr pci 4 , .Xr wlan 4 , .Xr wlan_ccmp 4 , .Xr wlan_tkip 4 , .Xr wlan_wep 4 , +.Xr wpifw 4 , .Xr ifconfig 8 , .Xr wpa_supplicant 8 .Sh AUTHORS From owner-svn-src-all@FreeBSD.ORG Sun Dec 21 10:04:30 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2A01AE07; Sun, 21 Dec 2014 10:04:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 140EC3CB4; Sun, 21 Dec 2014 10:04:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBLA4T4e028765; Sun, 21 Dec 2014 10:04:29 GMT (envelope-from brueffer@FreeBSD.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBLA4RAc028745; Sun, 21 Dec 2014 10:04:27 GMT (envelope-from brueffer@FreeBSD.org) Message-Id: <201412211004.sBLA4RAc028745@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: brueffer set sender to brueffer@FreeBSD.org using -f From: Christian Brueffer Date: Sun, 21 Dec 2014 10:04:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275991 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2014 10:04:30 -0000 Author: brueffer Date: Sun Dec 21 10:04:26 2014 New Revision: 275991 URL: https://svnweb.freebsd.org/changeset/base/275991 Log: Remove EOL whitespace. Found with: mandoc -Tlint Modified: head/share/man/man4/altera_atse.4 head/share/man/man4/gpioled.4 head/share/man/man4/iicbus.4 head/share/man/man4/iscsi_initiator.4 head/share/man/man4/mpr.4 head/share/man/man4/mrsas.4 head/share/man/man4/netmap.4 head/share/man/man4/tap.4 head/share/man/man4/tun.4 head/share/man/man4/umass.4 head/share/man/man4/wsp.4 Modified: head/share/man/man4/altera_atse.4 ============================================================================== --- head/share/man/man4/altera_atse.4 Sun Dec 21 09:53:29 2014 (r275990) +++ head/share/man/man4/altera_atse.4 Sun Dec 21 10:04:26 2014 (r275991) @@ -80,7 +80,7 @@ Only a single MAC address may be stored If the address begins with the Altera prefix 00:07:ed and ends in 00 then up to 16 addresses will be derived from it by adding the unit number of the interface to the stored address. -For other prefixes, the address will be assigned to atse0 and random +For other prefixes, the address will be assigned to atse0 and random addresses will be used for other interfaces. If the stored address is invalid, for example all zero's, multicast, or the default address shipped on all DE4 boards (00:07:ed:ff:ed:15) then a random Modified: head/share/man/man4/gpioled.4 ============================================================================== --- head/share/man/man4/gpioled.4 Sun Dec 21 09:53:29 2014 (r275990) +++ head/share/man/man4/gpioled.4 Sun Dec 21 10:04:26 2014 (r275991) @@ -52,8 +52,8 @@ The GPIO pin can then be controlled by w in .Xr led 4 . .Pp -On a -.Xr device.hints 5 +On a +.Xr device.hints 5 based system, like .Li MIPS , these values are configurable for Modified: head/share/man/man4/iicbus.4 ============================================================================== --- head/share/man/man4/iicbus.4 Sun Dec 21 09:53:29 2014 (r275990) +++ head/share/man/man4/iicbus.4 Sun Dec 21 10:04:26 2014 (r275991) @@ -106,11 +106,11 @@ Some I2C interfaces are available: .Sh BUS FREQUENCY CONFIGURATION The operating frequency of an I2C bus may be fixed or configurable. The bus may be used as part of some larger standard interface, and that -interface specification may require a fixed frequency. -The driver for that hardware would not honor an attempt to configure a +interface specification may require a fixed frequency. +The driver for that hardware would not honor an attempt to configure a different speed. A general purpose I2C bus, such as those found in many embedded systems, -will often support multiple bus frequencies. +will often support multiple bus frequencies. .Pp When a system supports multiple I2C busses, a different frequency can be configured for each bus by number, represented by the @@ -145,7 +145,7 @@ The same variable can be changed at any Reset the bus using .Xr i2c 8 or the -.Xr iic 4 +.Xr iic 4 .Va I2CRSTCARD ioctl to make the change take effect. .Sh SEE ALSO Modified: head/share/man/man4/iscsi_initiator.4 ============================================================================== --- head/share/man/man4/iscsi_initiator.4 Sun Dec 21 09:53:29 2014 (r275990) +++ head/share/man/man4/iscsi_initiator.4 Sun Dec 21 10:04:26 2014 (r275991) @@ -47,7 +47,7 @@ iscsi_initiator_load="YES" .Sh DESCRIPTION .Bf -symbolic This driver, along with its userspace counterpart -.Xr iscontrol 8 , +.Xr iscontrol 8 , is obsolete. Users are advised to use .Xr iscsi 4 Modified: head/share/man/man4/mpr.4 ============================================================================== --- head/share/man/man4/mpr.4 Sun Dec 21 09:53:29 2014 (r275990) +++ head/share/man/man4/mpr.4 Sun Dec 21 10:04:26 2014 (r275991) @@ -59,7 +59,7 @@ mpr_load="YES" .Ed .Sh DESCRIPTION The -.Nm +.Nm driver provides support for LSI Fusion-MPT 3 IT/IR .Tn SAS controllers. Modified: head/share/man/man4/mrsas.4 ============================================================================== --- head/share/man/man4/mrsas.4 Sun Dec 21 09:53:29 2014 (r275990) +++ head/share/man/man4/mrsas.4 Sun Dec 21 10:04:26 2014 (r275991) @@ -27,7 +27,7 @@ .\" 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. -.\" +.\" .\" The views and conclusions contained in the software and documentation .\" are those of the authors and should not be interpreted as representing .\" official policies, either expressed or implied, of the FreeBSD Project. @@ -57,15 +57,15 @@ mrsas_load="YES" .Ed .Sh DESCRIPTION The -.Nm +.Nm driver will detect LSI's next generation (6Gb/s and 12Gb/s) PCI Express SAS/SATA RAID controllers. See the .Nm HARDWARE section for the supported devices list. -A disk (virtual disk/physical disk) attached to the +A disk (virtual disk/physical disk) attached to the .Nm -driver will be visible to the user through +driver will be visible to the user through .Xr camcontrol 8 as .Pa /dev/da? @@ -79,11 +79,11 @@ The name is derived from the phrase "MegaRAID SAS HBA", which is substantially different than the old "MegaRAID" Driver .Xr mfi 4 -which does not connect targets -to the +which does not connect targets +to the +.Xr cam 4 +layer and thus requires a new driver which attaches targets to the .Xr cam 4 -layer and thus requires a new driver which attaches targets to the -.Xr cam 4 layer. Older MegaRAID controllers are supported by .Xr mfi 4 @@ -91,7 +91,7 @@ and will not work with .Nm , but both the .Xr mfi 4 -and +and .Nm drivers can detect and manage the LSI MegaRAID SAS 2208/2308/3008/3108 series of controllers. @@ -104,8 +104,8 @@ driver's behavior for LSI MegaRAID SAS 2 By default, the .Xr mfi 4 driver will detect these controllers. -See the -.Nm PRIORITY +See the +.Nm PRIORITY section to know more about driver priority for MR-Fusion devices. .Pp .Nm @@ -164,16 +164,16 @@ DELL PERC H330 .Sh CONFIGURATION To disable Online Controller Reset(OCR) for a specific .Nm -driver instance, set the +driver instance, set the following tunable value in .Xr loader.conf 5 : .Bd -literal -offset indent -dev.mrsas.X.disable_ocr=1 +dev.mrsas.X.disable_ocr=1 .Ed .Pp where X is the adapter number. .Pp -To change the I/O timeout value for a specific +To change the I/O timeout value for a specific .Nm driver instance, set the following tunable value in .Xr loader.conf 5 : @@ -230,12 +230,12 @@ and .Dv BUS_PROBE_LOW_PRIORITY ) . MR-Fusion Controllers include all cards with the Device IDs - -0x005B, +0x005B, 0x005D, 0x005F. .Pp The -.Xr mfi 4 +.Xr mfi 4 driver will set a priority of either .Dv BUS_PROBE_DEFAULT or @@ -254,13 +254,13 @@ for the .Nm driver to detect a MR-Fusion card instead of the .Xr mfi 4 -driver. +driver. .Bd -ragged -offset indent .Cd hw.mfi.mrsas_enable="1" .Ed .Pp At boot time, the -.Xr mfi 4 +.Xr mfi 4 driver will get priority to detect MR-Fusion controllers by default. Before changing this default driver selection policy, LSI advises users to understand @@ -273,9 +273,9 @@ driver to detect MR-Fusion cards, but al driver to detect MR-Fusion cards. .Pp LSI recommends setting hw.mfi.mrsas_enable="0" for customers who are using the -older -.Xr mfi 4 -driver and do not want to switch to +older +.Xr mfi 4 +driver and do not want to switch to .Nm . For those customers who are using a MR-Fusion controller for the first time, LSI recommends using the @@ -286,8 +286,8 @@ Changing the default behavior is well te unexpected behavior may pop up if more complex and unrealistic operations are executed by switching between the .Xr mfi 4 -and -.Nm +and +.Nm drivers for MR-Fusion. Switching drivers is designed to happen only one time. Although multiple @@ -296,16 +296,16 @@ The user should decide from .Nm Start of Day which driver they want to use for the MR-Fusion card. .Pp -The user may see different device names when switching from -.Xr mfi 4 -to +The user may see different device names when switching from +.Xr mfi 4 +to .Nm . This behavior is .Nm Functions As Designed and the user needs to change the .Xr fstab 5 -entry manually if they are doing any experiments with -.Xr mfi 4 +entry manually if they are doing any experiments with +.Xr mfi 4 and .Nm interoperability. @@ -342,7 +342,7 @@ is the new driver reworked by LSI which products. The SAS+SATA RAID controller with device id 0x005b is referred to as the Thunderbolt controller throughout this man page. -.Ed +.Ed .Bd -ragged .Nm cam aware HBA drivers: .Fx @@ -351,12 +351,12 @@ has a layer which attaches storage devices and provides a common access mechanism to storage controllers and attached devices. The -.Nm +.Nm driver is .Xr cam 4 -aware and devices associated with -.Nm -can be seen using +aware and devices associated with +.Nm +can be seen using .Xr camcontrol 8 . The .Xr mfi 4 @@ -364,13 +364,13 @@ driver does not understand the .Xr cam 4 layer and it directly associates storage disks to the block layer. .Pp -.Nm Thunderbolt Controller: +.Nm Thunderbolt Controller: This is the 6Gb/s MegaRAID HBA card which has device id 0x005B. .Pp -.Nm Invader Controller: +.Nm Invader Controller: This is 12Gb/s MegaRAID HBA card which has device id 0x005D. .Pp -.Nm Fury Controller: +.Nm Fury Controller: This is the 12Gb/s MegaRAID HBA card which has device id 0x005F. .Ed .Sh AUTHORS @@ -387,11 +387,11 @@ switches between two drivers and does no manually). .Pp The -.Nm +.Nm driver exposes devices as .Pa /dev/da? , -whereas -.Xr mfi 4 +whereas +.Xr mfi 4 exposes devices as .Pa /dev/mfid? . .Pp Modified: head/share/man/man4/netmap.4 ============================================================================== --- head/share/man/man4/netmap.4 Sun Dec 21 09:53:29 2014 (r275990) +++ head/share/man/man4/netmap.4 Sun Dec 21 10:04:26 2014 (r275991) @@ -143,7 +143,7 @@ but can be independently configured to s .Sh ENTERING AND EXITING NETMAP MODE The following section describes the system calls to create and control -.Nm netmap +.Nm netmap ports (including .Nm VALE and Modified: head/share/man/man4/tap.4 ============================================================================== --- head/share/man/man4/tap.4 Sun Dec 21 09:53:29 2014 (r275990) +++ head/share/man/man4/tap.4 Sun Dec 21 10:04:26 2014 (r275991) @@ -34,7 +34,7 @@ or a terminal for and a character-special device .Dq control interface. -A client program transfers Ethernet frames to or from the +A client program transfers Ethernet frames to or from the .Nm .Dq control interface. Modified: head/share/man/man4/tun.4 ============================================================================== --- head/share/man/man4/tun.4 Sun Dec 21 09:53:29 2014 (r275990) +++ head/share/man/man4/tun.4 Sun Dec 21 10:04:26 2014 (r275991) @@ -35,7 +35,7 @@ or a terminal for and a character-special device .Dq control interface. -A client program transfers IP (by default) packets to or from the +A client program transfers IP (by default) packets to or from the .Nm .Dq control interface. Modified: head/share/man/man4/umass.4 ============================================================================== --- head/share/man/man4/umass.4 Sun Dec 21 09:53:29 2014 (r275990) +++ head/share/man/man4/umass.4 Sun Dec 21 10:04:26 2014 (r275991) @@ -62,7 +62,7 @@ or .Xr ohci 4 or .Xr ehci 4 -or +or .Xr xhci 4 must be configured in the kernel. Additionally, since Modified: head/share/man/man4/wsp.4 ============================================================================== --- head/share/man/man4/wsp.4 Sun Dec 21 09:53:29 2014 (r275990) +++ head/share/man/man4/wsp.4 Sun Dec 21 10:04:26 2014 (r275991) @@ -52,7 +52,7 @@ device found in many Apple laptops. .Pp The driver simulates a three-button mouse using multi-finger tap detection. -A single-finger press generates a left button click. +A single-finger press generates a left button click. A two-finger tap maps to the right button; whereas a three-finger tap gets treated as a middle button click. .Pp From owner-svn-src-all@FreeBSD.ORG Sun Dec 21 10:56:07 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 88F755C1; Sun, 21 Dec 2014 10:56:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7405A2426; Sun, 21 Dec 2014 10:56:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBLAu7W4053822; Sun, 21 Dec 2014 10:56:07 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBLAu7pB053821; Sun, 21 Dec 2014 10:56:07 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201412211056.sBLAu7pB053821@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 21 Dec 2014 10:56:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r275992 - stable/10/usr.bin/iscsictl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2014 10:56:07 -0000 Author: trasz Date: Sun Dec 21 10:56:06 2014 New Revision: 275992 URL: https://svnweb.freebsd.org/changeset/base/275992 Log: MFC r274549: Make it possible to do "iscsictl -Rt xxx -p yyy", to remove a session that matches both -t and -p. Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.bin/iscsictl/iscsictl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/iscsictl/iscsictl.c ============================================================================== --- stable/10/usr.bin/iscsictl/iscsictl.c Sun Dec 21 10:04:26 2014 (r275991) +++ stable/10/usr.bin/iscsictl/iscsictl.c Sun Dec 21 10:56:06 2014 (r275992) @@ -758,14 +758,9 @@ main(int argc, char **argv) errx(1, "-n and -p and mutually exclusive"); if (target != NULL) errx(1, "-n and -t and mutually exclusive"); - } else if (portal != NULL) { - if (target != NULL) - errx(1, "-p and -t and mutually exclusive"); - } else if (target != NULL) { - if (portal != NULL) - errx(1, "-t and -p and mutually exclusive"); - } else + } else if (target == NULL && portal == NULL) { errx(1, "must specify either -a, -n, -t, or -p"); + } if (session_id != -1) errx(1, "-i cannot be used with -R"); From owner-svn-src-all@FreeBSD.ORG Sun Dec 21 10:57:51 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6294A6F0; Sun, 21 Dec 2014 10:57:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4C706242E; Sun, 21 Dec 2014 10:57:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBLAvp4d054089; Sun, 21 Dec 2014 10:57:51 GMT (envelope-from brueffer@FreeBSD.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBLAvhdA054042; Sun, 21 Dec 2014 10:57:43 GMT (envelope-from brueffer@FreeBSD.org) Message-Id: <201412211057.sBLAvhdA054042@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: brueffer set sender to brueffer@FreeBSD.org using -f From: Christian Brueffer Date: Sun, 21 Dec 2014 10:57:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275993 - head/share/man/man9 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2014 10:57:51 -0000 Author: brueffer Date: Sun Dec 21 10:57:42 2014 New Revision: 275993 URL: https://svnweb.freebsd.org/changeset/base/275993 Log: Fix various mdoc issues and some EOL whitespace. Found with: mandoc -Tlint Modified: head/share/man/man9/BUF_ISLOCKED.9 head/share/man/man9/BUS_BIND_INTR.9 head/share/man/man9/BUS_DESCRIBE_INTR.9 head/share/man/man9/DB_COMMAND.9 head/share/man/man9/EVENTHANDLER.9 head/share/man/man9/VFS.9 head/share/man/man9/VFS_CHECKEXP.9 head/share/man/man9/VFS_FHTOVP.9 head/share/man/man9/VFS_SET.9 head/share/man/man9/VOP_LOCK.9 head/share/man/man9/VOP_VPTOCNP.9 head/share/man/man9/accf_data.9 head/share/man/man9/accf_dns.9 head/share/man/man9/acl.9 head/share/man/man9/alq.9 head/share/man/man9/devfs_set_cdevpriv.9 head/share/man/man9/eventtimers.9 head/share/man/man9/ieee80211_crypto.9 head/share/man/man9/ifnet.9 head/share/man/man9/kqueue.9 head/share/man/man9/lock.9 head/share/man/man9/locking.9 head/share/man/man9/mbuf.9 head/share/man/man9/refcount.9 head/share/man/man9/usbdi.9 head/share/man/man9/vm_page_busy.9 head/share/man/man9/vnet.9 head/share/man/man9/vnode.9 head/share/man/man9/zone.9 Modified: head/share/man/man9/BUF_ISLOCKED.9 ============================================================================== --- head/share/man/man9/BUF_ISLOCKED.9 Sun Dec 21 10:56:06 2014 (r275992) +++ head/share/man/man9/BUF_ISLOCKED.9 Sun Dec 21 10:57:42 2014 (r275993) @@ -59,11 +59,11 @@ A shared lock is held. The lock is not held by anyone. .El .Sh SEE ALSO -.Xr lockstatus 9 , .Xr buf 9 , .Xr BUF_LOCK 9 , .Xr BUF_UNLOCK 9 , -.Xr lockmgr 9 +.Xr lockmgr 9 , +.Xr lockstatus 9 .Sh AUTHORS This manual page was written by .An Attilio Rao Aq Mt attilio@FreeBSD.org . Modified: head/share/man/man9/BUS_BIND_INTR.9 ============================================================================== --- head/share/man/man9/BUS_BIND_INTR.9 Sun Dec 21 10:56:06 2014 (r275992) +++ head/share/man/man9/BUS_BIND_INTR.9 Sun Dec 21 10:57:42 2014 (r275993) @@ -86,8 +86,8 @@ The most recent binding request is the o .Sh RETURN VALUES Zero is returned on success, otherwise an appropriate error is returned. .Sh SEE ALSO -.Xr BUS_SETUP_INTR 9 , .Xr cpuset 2 , +.Xr BUS_SETUP_INTR 9 , .Xr device 9 .Sh HISTORY The Modified: head/share/man/man9/BUS_DESCRIBE_INTR.9 ============================================================================== --- head/share/man/man9/BUS_DESCRIBE_INTR.9 Sun Dec 21 10:56:06 2014 (r275992) +++ head/share/man/man9/BUS_DESCRIBE_INTR.9 Sun Dec 21 10:57:42 2014 (r275993) @@ -87,9 +87,9 @@ the interrupt handler name. .Sh RETURN VALUES Zero is returned on success, otherwise an appropriate error is returned. .Sh SEE ALSO -.Xr BUS_SETUP_INTR 9 , .Xr systat 1 , .Xr vmstat 8 , +.Xr BUS_SETUP_INTR 9 , .Xr device 9 , .Xr printf 9 .Sh HISTORY Modified: head/share/man/man9/DB_COMMAND.9 ============================================================================== --- head/share/man/man9/DB_COMMAND.9 Sun Dec 21 10:56:06 2014 (r275992) +++ head/share/man/man9/DB_COMMAND.9 Sun Dec 21 10:57:42 2014 (r275993) @@ -68,7 +68,7 @@ command, respectively. .Pp The general command syntax: .Cm command Ns Op Li \&/ Ns Ar modifier -.Ar address Ns Op Li , Ns Ar count , +.Ar address Ns Op , Ns Ar count , translates into the following parameters for .Fa command_function : .Bl -tag -width Fa -offset indent Modified: head/share/man/man9/EVENTHANDLER.9 ============================================================================== --- head/share/man/man9/EVENTHANDLER.9 Sun Dec 21 10:56:06 2014 (r275992) +++ head/share/man/man9/EVENTHANDLER.9 Sun Dec 21 10:57:42 2014 (r275993) @@ -261,7 +261,7 @@ operation. Callbacks invoked when a process exits. .It Vt process_fini Callback invoked when a process memory is destroyed. -This is never called. +This is never called. .It Vt process_fork Callbacks invoked when a process forks a child. .It Vt process_init Modified: head/share/man/man9/VFS.9 ============================================================================== --- head/share/man/man9/VFS.9 Sun Dec 21 10:56:06 2014 (r275992) +++ head/share/man/man9/VFS.9 Sun Dec 21 10:57:42 2014 (r275993) @@ -54,8 +54,8 @@ rather than implementing empty functions .Xr VFS_SYNC 9 , .Xr VFS_UNMOUNT 9 , .Xr VFS_VGET 9 , -.Xr VOP_VPTOFH 9 , -.Xr vnode 9 +.Xr vnode 9 , +.Xr VOP_VPTOFH 9 .Sh AUTHORS This manual page was written by .An Doug Rabson . Modified: head/share/man/man9/VFS_CHECKEXP.9 ============================================================================== --- head/share/man/man9/VFS_CHECKEXP.9 Sun Dec 21 10:56:06 2014 (r275992) +++ head/share/man/man9/VFS_CHECKEXP.9 Sun Dec 21 10:57:42 2014 (r275993) @@ -81,8 +81,8 @@ and .Sh SEE ALSO .Xr VFS 9 , .Xr VFS_FHTOVP 9 , -.Xr VOP_VPTOFH 9 , -.Xr vnode 9 +.Xr vnode 9 , +.Xr VOP_VPTOFH 9 .Sh AUTHORS This manual page was written by .An Alfred Perlstein . Modified: head/share/man/man9/VFS_FHTOVP.9 ============================================================================== --- head/share/man/man9/VFS_FHTOVP.9 Sun Dec 21 10:56:06 2014 (r275992) +++ head/share/man/man9/VFS_FHTOVP.9 Sun Dec 21 10:57:42 2014 (r275993) @@ -76,8 +76,8 @@ The locked vnode for the file will be re .Sh SEE ALSO .Xr VFS 9 , .Xr VFS_CHECKEXP 9 , -.Xr VOP_VPTOFH 9 , -.Xr vnode 9 +.Xr vnode 9 , +.Xr VOP_VPTOFH 9 .Sh AUTHORS This manual page was written by .An Doug Rabson . Modified: head/share/man/man9/VFS_SET.9 ============================================================================== --- head/share/man/man9/VFS_SET.9 Sun Dec 21 10:56:06 2014 (r275992) +++ head/share/man/man9/VFS_SET.9 Sun Dec 21 10:57:42 2014 (r275993) @@ -104,8 +104,8 @@ VFS_SET(myfs_vfsops, myfs, 0); .Xr jail 2 , .Xr jail 8 , .Xr DECLARE_MODULE 9 , -.Xr vfsconf 9 , -.Xr vfs_modevent 9 +.Xr vfs_modevent 9 , +.Xr vfsconf 9 .Sh AUTHORS This manual page was written by .An Chad David Aq Mt davidc@acns.ab.ca . Modified: head/share/man/man9/VOP_LOCK.9 ============================================================================== --- head/share/man/man9/VOP_LOCK.9 Sun Dec 21 10:56:06 2014 (r275992) +++ head/share/man/man9/VOP_LOCK.9 Sun Dec 21 10:57:42 2014 (r275993) @@ -100,8 +100,9 @@ with these control flags: .Bl -tag -width ".Dv LK_CANRECURSE" -offset indent -compact .It Dv LK_INTERLOCK Specify when the caller already has a simple lock -.Fn ( VOP_LOCK -will unlock the simple lock after getting the lock). +.Po Fn VOP_LOCK +will unlock the simple lock after getting the lock +.Pc . .It Dv LK_RETRY Retry until locked. .El Modified: head/share/man/man9/VOP_VPTOCNP.9 ============================================================================== --- head/share/man/man9/VOP_VPTOCNP.9 Sun Dec 21 10:56:06 2014 (r275992) +++ head/share/man/man9/VOP_VPTOCNP.9 Sun Dec 21 10:57:42 2014 (r275993) @@ -78,8 +78,8 @@ The buffer was not large enough to hold The vnode was not found on the file system. .El .Sh SEE ALSO -.Xr VOP_LOOKUP 9 , -.Xr vnode 9 +.Xr vnode 9 , +.Xr VOP_LOOKUP 9 .Sh NOTES This interface is a work in progress. .Sh HISTORY Modified: head/share/man/man9/accf_data.9 ============================================================================== --- head/share/man/man9/accf_data.9 Sun Dec 21 10:56:06 2014 (r275992) +++ head/share/man/man9/accf_data.9 Sun Dec 21 10:57:42 2014 (r275993) @@ -67,7 +67,7 @@ on the socket .Sh SEE ALSO .Xr setsockopt 2 , .Xr accept_filter 9 , -.Xr accf_dns 9 +.Xr accf_dns 9 , .Xr accf_http 9 .Sh HISTORY The accept filter mechanism and the Modified: head/share/man/man9/accf_dns.9 ============================================================================== --- head/share/man/man9/accf_dns.9 Sun Dec 21 10:56:06 2014 (r275992) +++ head/share/man/man9/accf_dns.9 Sun Dec 21 10:57:42 2014 (r275993) @@ -69,8 +69,8 @@ on a socket .Sh SEE ALSO .Xr setsockopt 2 , .Xr accept_filter 9 , +.Xr accf_data 9 , .Xr accf_http 9 -.Xr accf_data 9 .Sh HISTORY The accept filter mechanism was introduced in .Fx 4.0 . Modified: head/share/man/man9/acl.9 ============================================================================== --- head/share/man/man9/acl.9 Sun Dec 21 10:56:06 2014 (r275992) +++ head/share/man/man9/acl.9 Sun Dec 21 10:57:42 2014 (r275993) @@ -207,10 +207,10 @@ The following values are valid: .El .Sh SEE ALSO .Xr acl 3 , +.Xr vaccess 9 , .Xr vaccess_acl_nfs4 9 , .Xr vaccess_acl_posix1e 9 , .Xr VFS 9 , -.Xr vaccess 9 , .Xr VOP_ACLCHECK 9 , .Xr VOP_GETACL 9 , .Xr VOP_SETACL 9 Modified: head/share/man/man9/alq.9 ============================================================================== --- head/share/man/man9/alq.9 Sun Dec 21 10:56:06 2014 (r275992) +++ head/share/man/man9/alq.9 Sun Dec 21 10:57:42 2014 (r275993) @@ -417,10 +417,10 @@ and either the queue is full or the syst NOTE: invalid arguments to non-void functions will result in undefined behaviour. .Sh SEE ALSO +.Xr syslog 3 , .Xr kproc 9 , .Xr ktr 9 , .Xr msleep_spin 9 , -.Xr syslog 3 , .Xr vnode 9 .Sh HISTORY The Modified: head/share/man/man9/devfs_set_cdevpriv.9 ============================================================================== --- head/share/man/man9/devfs_set_cdevpriv.9 Sun Dec 21 10:56:06 2014 (r275992) +++ head/share/man/man9/devfs_set_cdevpriv.9 Sun Dec 21 10:57:42 2014 (r275993) @@ -114,8 +114,8 @@ filedescriptor, or was called. .El .Sh SEE ALSO -.Xr open 2 , .Xr close 2 , +.Xr open 2 , .Xr devfs 5 , .Xr kern_openat 9 .Sh HISTORY Modified: head/share/man/man9/eventtimers.9 ============================================================================== --- head/share/man/man9/eventtimers.9 Sun Dec 21 10:56:06 2014 (r275992) +++ head/share/man/man9/eventtimers.9 Sun Dec 21 10:57:42 2014 (r275993) @@ -179,13 +179,13 @@ methods control timers associated with t Driver may deregister its functionality by calling .Fn et_deregister . .Pp -If the frequency of the clock hardware can change while it is +If the frequency of the clock hardware can change while it is running (for example, during power-saving modes), the driver must call .Fn et_change_frequency on each change. If the given event timer is the active timer, .Fn et_change_frequency -stops the timer on all CPUs, updates +stops the timer on all CPUs, updates .Va et->frequency , then restarts the timer on all CPUs so that all current events are rescheduled using the new frequency. Modified: head/share/man/man9/ieee80211_crypto.9 ============================================================================== --- head/share/man/man9/ieee80211_crypto.9 Sun Dec 21 10:56:06 2014 (r275992) +++ head/share/man/man9/ieee80211_crypto.9 Sun Dec 21 10:57:42 2014 (r275993) @@ -253,8 +253,8 @@ and These calls also synchronize hardware key state update when receive traffic is active. .Sh SEE ALSO -.Xr ieee80211 9 , .Xr ioctl 2 , .Xr wlan_ccmp 4 , .Xr wlan_tkip 4 , -.Xr wlan_wep 4 +.Xr wlan_wep 4 , +.Xr ieee80211 9 Modified: head/share/man/man9/ifnet.9 ============================================================================== --- head/share/man/man9/ifnet.9 Sun Dec 21 10:56:06 2014 (r275992) +++ head/share/man/man9/ifnet.9 Sun Dec 21 10:57:42 2014 (r275993) @@ -418,7 +418,7 @@ lock used to protect interface-related a .Xr queue 3 macro glue for the list of clonable network interfaces. .It Va if_groups -.Pq Fn TAILQ_HEAD ", ifg_list" +.Pq Fn TAILQ_HEAD "" "ifg_list" The head of the .Xr queue 3 .Li TAILQ @@ -1410,7 +1410,8 @@ address whose remote address is if one is found. If .Fa ignore_ptp -is true, skip point-to-point interface addresses. The +is true, skip point-to-point interface addresses. +The .Fa fib parameter is handled the same way as by .Fn ifa_ifwithdstaddr . Modified: head/share/man/man9/kqueue.9 ============================================================================== --- head/share/man/man9/kqueue.9 Sun Dec 21 10:56:06 2014 (r275992) +++ head/share/man/man9/kqueue.9 Sun Dec 21 10:57:42 2014 (r275993) @@ -395,8 +395,9 @@ There must be no .Vt knotes associated with the .Vt knlist -.Fn ( knlist_empty -returns true) +.Po Fn knlist_empty +returns true +.Pc and no more .Vt knotes may be attached to the object. Modified: head/share/man/man9/lock.9 ============================================================================== --- head/share/man/man9/lock.9 Sun Dec 21 10:56:06 2014 (r275992) +++ head/share/man/man9/lock.9 Sun Dec 21 10:57:42 2014 (r275993) @@ -411,12 +411,12 @@ will be the result of trying. .Sh SEE ALSO .Xr condvar 9 , .Xr locking 9 , +.Xr mtx_assert 9 , .Xr mutex 9 , +.Xr panic 9 , .Xr rwlock 9 , .Xr sleep 9 , .Xr sx 9 , -.Xr mtx_assert 9 , -.Xr panic 9 , .Xr VOP_PRINT 9 .Sh AUTHORS This manual page was written by Modified: head/share/man/man9/locking.9 ============================================================================== --- head/share/man/man9/locking.9 Sun Dec 21 10:56:06 2014 (r275992) +++ head/share/man/man9/locking.9 Sun Dec 21 10:57:42 2014 (r275993) @@ -391,17 +391,17 @@ At this time this is a rather easy to re .El .Sh SEE ALSO .Xr witness 4 , +.Xr BUS_SETUP_INTR 9 , .Xr condvar 9 , .Xr lock 9 , +.Xr LOCK_PROFILING 9 , .Xr mtx_pool 9 , .Xr mutex 9 , .Xr rmlock 9 , .Xr rwlock 9 , .Xr sema 9 , .Xr sleep 9 , -.Xr sx 9 , -.Xr BUS_SETUP_INTR 9 , -.Xr LOCK_PROFILING 9 +.Xr sx 9 .Sh HISTORY These functions appeared in Modified: head/share/man/man9/mbuf.9 ============================================================================== --- head/share/man/man9/mbuf.9 Sun Dec 21 10:56:06 2014 (r275992) +++ head/share/man/man9/mbuf.9 Sun Dec 21 10:57:42 2014 (r275993) @@ -1183,8 +1183,10 @@ slab allocation. .Sh AUTHORS The original .Nm -manual page was written by Yar Tikhiy. +manual page was written by +.An Yar Tikhiy . The .Xr uma 9 .Vt mbuf -allocator was written by Bosko Milekic. +allocator was written by +.An Bosko Milekic . Modified: head/share/man/man9/refcount.9 ============================================================================== --- head/share/man/man9/refcount.9 Sun Dec 21 10:56:06 2014 (r275992) +++ head/share/man/man9/refcount.9 Sun Dec 21 10:57:42 2014 (r275993) @@ -39,7 +39,7 @@ .In sys/param.h .In sys/refcount.h .Ft void -.Fn refcount_init "volatile u_int *count, u_int value" +.Fn refcount_init "volatile u_int *count" "u_int value" .Ft void .Fn refcount_acquire "volatile u_int *count" .Ft int Modified: head/share/man/man9/usbdi.9 ============================================================================== --- head/share/man/man9/usbdi.9 Sun Dec 21 10:56:06 2014 (r275992) +++ head/share/man/man9/usbdi.9 Sun Dec 21 10:57:42 2014 (r275993) @@ -199,7 +199,7 @@ callback. . .Fn usbd_transfer_start This function will start the USB transfer pointed to by -.Fa xfer, +.Fa xfer , if not already started. . This function is always non-blocking and must be called with the @@ -212,7 +212,7 @@ pointer. . .Fn usbd_transfer_stop This function will stop the USB transfer pointed to by -.Fa xfer, +.Fa xfer , if not already stopped. . This function is always non-blocking and must be called with the Modified: head/share/man/man9/vm_page_busy.9 ============================================================================== --- head/share/man/man9/vm_page_busy.9 Sun Dec 21 10:56:06 2014 (r275992) +++ head/share/man/man9/vm_page_busy.9 Sun Dec 21 10:57:42 2014 (r275993) @@ -205,7 +205,6 @@ function panics if .Fa m is not exclusive busied. .Sh SEE ALSO -.Xr VOP_GETPAGES 9 , .Xr vm_page_aflag 9 , .Xr vm_page_alloc 9 , .Xr vm_page_deactivate 9 , @@ -213,4 +212,5 @@ is not exclusive busied. .Xr vm_page_grab 9 , .Xr vm_page_insert 9 , .Xr vm_page_lookup 9 , -.Xr vm_page_rename 9 +.Xr vm_page_rename 9 , +.Xr VOP_GETPAGES 9 Modified: head/share/man/man9/vnet.9 ============================================================================== --- head/share/man/man9/vnet.9 Sun Dec 21 10:56:06 2014 (r275992) +++ head/share/man/man9/vnet.9 Sun Dec 21 10:57:42 2014 (r275993) @@ -100,8 +100,7 @@ .Fa "struct vnet *" .Fc .\" -.Fo CURVNET_RESTORE -.Fc +.Fn CURVNET_RESTORE .\" .Fo VNET_ITERATOR_DECL .Fa "struct vnet *" @@ -113,14 +112,10 @@ .\" ------------------------------------------------------------ .Ss "Locking" .\" -.Fo VNET_LIST_RLOCK -.Fc -.Fo VNET_LIST_RUNLOCK -.Fc -.Fo VNET_LIST_RLOCK_NOSLEEP -.Fc -.Fo VNET_LIST_RUNLOCK_NOSLEEP -.Fc +.Fn VNET_LIST_RLOCK +.Fn VNET_LIST_RUNLOCK +.Fn VNET_LIST_RLOCK_NOSLEEP +.Fn VNET_LIST_RUNLOCK_NOSLEEP .\" ------------------------------------------------------------ .Ss "Startup and Teardown Functions" .\" Modified: head/share/man/man9/vnode.9 ============================================================================== --- head/share/man/man9/vnode.9 Sun Dec 21 10:56:06 2014 (r275992) +++ head/share/man/man9/vnode.9 Sun Dec 21 10:57:42 2014 (r275993) @@ -158,6 +158,7 @@ interlock, will cause a LOR (Lock Order intertwining of VM Objects and Vnodes. .Sh SEE ALSO .Xr malloc 9 , +.Xr VFS 9 , .Xr VOP_ACCESS 9 , .Xr VOP_ACLCHECK 9 , .Xr VOP_ADVISE 9 , @@ -190,8 +191,7 @@ intertwining of VM Objects and Vnodes. .Xr VOP_SETEXTATTR 9 , .Xr VOP_STRATEGY 9 , .Xr VOP_VPTOCNP 9 , -.Xr VOP_VPTOFH 9 , -.Xr VFS 9 +.Xr VOP_VPTOFH 9 .Sh AUTHORS This manual page was written by .An Doug Rabson . Modified: head/share/man/man9/zone.9 ============================================================================== --- head/share/man/man9/zone.9 Sun Dec 21 10:56:06 2014 (r275992) +++ head/share/man/man9/zone.9 Sun Dec 21 10:57:42 2014 (r275993) @@ -337,7 +337,7 @@ macro declares a static read only oid that exports the approximate current occupancy of the zone. The .Fa zone -argument should be a pointer to +argument should be a pointer to .Vt uma_zone_t . A read of the oid returns value obtained through .Fn uma_zone_get_cur . From owner-svn-src-all@FreeBSD.ORG Sun Dec 21 11:00:49 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6A255851; Sun, 21 Dec 2014 11:00:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 553B724F4; Sun, 21 Dec 2014 11:00:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBLB0nfb055109; Sun, 21 Dec 2014 11:00:49 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBLB0nif055108; Sun, 21 Dec 2014 11:00:49 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201412211100.sBLB0nif055108@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 21 Dec 2014 11:00:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r275994 - stable/10/usr.sbin/autofs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2014 11:00:49 -0000 Author: trasz Date: Sun Dec 21 11:00:48 2014 New Revision: 275994 URL: https://svnweb.freebsd.org/changeset/base/275994 Log: MFC r274621: The "intr" option is NFS-specific; fix examples in auto_master(5). Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.sbin/autofs/auto_master.5 Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/autofs/auto_master.5 ============================================================================== --- stable/10/usr.sbin/autofs/auto_master.5 Sun Dec 21 10:57:42 2014 (r275993) +++ stable/10/usr.sbin/autofs/auto_master.5 Sun Dec 21 11:00:48 2014 (r275994) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 23, 2014 +.Dd November 17, 2014 .Dt AUTO_MASTER 5 .Os .Sh NAME @@ -170,7 +170,7 @@ mount options: .Pp Automatically mount the CD drive on access: .Bd -literal -offset indent -.Li cd -intr,fstype=cd9660 :/dev/cd0 +.Li cd -fstype=cd9660 :/dev/cd0 .Ed .Sh SPECIAL MAPS Special maps have names beginning with @@ -224,7 +224,7 @@ and this in map file: .Bd -literal -offset indent .Li /example/x -intr,nfsv4 192.168.1.1:/share/example/x -.Li /example/cd -intr,fstype=cd9660 :/dev/cd0 +.Li /example/cd -fstype=cd9660 :/dev/cd0 .Ed .Sh DIRECTORY SERVICES Both From owner-svn-src-all@FreeBSD.ORG Sun Dec 21 11:04:01 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 09526999; Sun, 21 Dec 2014 11:04:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CF52E250B; Sun, 21 Dec 2014 11:04:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBLB40iD058478; Sun, 21 Dec 2014 11:04:00 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBLB40sL058477; Sun, 21 Dec 2014 11:04:00 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201412211104.sBLB40sL058477@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 21 Dec 2014 11:04:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r275995 - stable/10/usr.sbin/autofs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2014 11:04:01 -0000 Author: trasz Date: Sun Dec 21 11:03:59 2014 New Revision: 275995 URL: https://svnweb.freebsd.org/changeset/base/275995 Log: MFC r274723: Make the auto_master(5) man page clearer on how auto_master and map files work together, and add example for smbfs. Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.sbin/autofs/auto_master.5 Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/autofs/auto_master.5 ============================================================================== --- stable/10/usr.sbin/autofs/auto_master.5 Sun Dec 21 11:00:48 2014 (r275994) +++ stable/10/usr.sbin/autofs/auto_master.5 Sun Dec 21 11:03:59 2014 (r275995) @@ -27,13 +27,17 @@ .\" .\" $FreeBSD$ .\" -.Dd November 17, 2014 +.Dd November 19, 2014 .Dt AUTO_MASTER 5 .Os .Sh NAME .Nm auto_master .Nd auto_master and map file format .Sh DESCRIPTION +The automounter configuration consists of the +.Nm +configuration file, which assigns filesystem paths to map names, +and maps, which contain actual mount information. The .Nm configuration file is used by the @@ -132,8 +136,12 @@ The special option .Li fstype is used to specify filesystem type. It is not passed to the mount program as an option. -Instead, it is passed as argument to +Instead, it is passed as an argument to .Cm "mount -t". +The default +.Li fstype +is +.Ql nfs . The special option .Li nobrowse is used to disable creation of top-level directories for special @@ -153,9 +161,11 @@ prefix it with colon. For example, .Li :/dev/cd0 . .Pp -This example, when used with the +This example, when put into +.Pa /etc/auto_example , +and with .Nm -example above, specifies that the NFS share +referring to the map as described above, specifies that the NFS share .Li 192.168.1.1:/share/example/x will be mounted on .Pa /example/x/ @@ -163,11 +173,18 @@ when any process attempts to access that .Li intr and .Li nfsv4 -mount options: +mount options, described in +.Xr mount_nfs 8 : .Bd -literal -offset indent .Li x -intr,nfsv4 192.168.1.1:/share/example/x .Ed .Pp +Automatically mount an SMB share on access, as a guest user, +without prompting for a password: +.Bd -literal -offset indent +.Li share -fstype=smbfs,-N ://@server/share +.Ed +.Pp Automatically mount the CD drive on access: .Bd -literal -offset indent .Li cd -fstype=cd9660 :/dev/cd0 @@ -224,6 +241,7 @@ and this in map file: .Bd -literal -offset indent .Li /example/x -intr,nfsv4 192.168.1.1:/share/example/x +.Li /example/share -fstype=smbfs,-N ://@server/share .Li /example/cd -fstype=cd9660 :/dev/cd0 .Ed .Sh DIRECTORY SERVICES From owner-svn-src-all@FreeBSD.ORG Sun Dec 21 11:11:19 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 59007AFC; Sun, 21 Dec 2014 11:11:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 39C592C0B; Sun, 21 Dec 2014 11:11:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBLBBJQQ061960; Sun, 21 Dec 2014 11:11:19 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBLBBIQC061958; Sun, 21 Dec 2014 11:11:18 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201412211111.sBLBBIQC061958@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 21 Dec 2014 11:11:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r275996 - in stable/10/lib/libnetbsd: netinet sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2014 11:11:19 -0000 Author: ngie Date: Sun Dec 21 11:11:17 2014 New Revision: 275996 URL: https://svnweb.freebsd.org/changeset/base/275996 Log: MFC r273482,r274078: r273482: The NetBSD libc tests use several definitions/macros that aren't available in FreeBSD Add the missing compat definitions/macros to lib/libnetbsd so the testcases can be compiled with libnetbsd without having to invent ad hoc #define's, or having to convert things over to FreeBSD idioms Reviewed by: brooks Phabric: D993 Sponsored by: EMC / Isilon Storage Division r274078: Commit missing header for sys/time.h compat on NetBSD to unbreak the amd64/i386 build Pointyhat to: me (forgot to svn add it sooner) Added: stable/10/lib/libnetbsd/netinet/ - copied from r273482, head/lib/libnetbsd/netinet/ stable/10/lib/libnetbsd/sys/time.h - copied unchanged from r274078, head/lib/libnetbsd/sys/time.h Modified: stable/10/lib/libnetbsd/sys/cdefs.h Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libnetbsd/sys/cdefs.h ============================================================================== --- stable/10/lib/libnetbsd/sys/cdefs.h Sun Dec 21 11:03:59 2014 (r275995) +++ stable/10/lib/libnetbsd/sys/cdefs.h Sun Dec 21 11:11:17 2014 (r275996) @@ -42,6 +42,28 @@ #endif /* + * The __CONCAT macro is used to concatenate parts of symbol names, e.g. + * with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. + * The __CONCAT macro is a bit tricky -- make sure you don't put spaces + * in between its arguments. __CONCAT can also concatenate double-quoted + * strings produced by the __STRING macro, but this only works with ANSI C. + */ + +#define ___STRING(x) __STRING(x) +#define ___CONCAT(x,y) __CONCAT(x,y) + +/* + * The following macro is used to remove const cast-away warnings + * from gcc -Wcast-qual; it should be used with caution because it + * can hide valid errors; in particular most valid uses are in + * situations where the API requires it, not to cast away string + * constants. We don't use *intptr_t on purpose here and we are + * explicit about unsigned long so that we don't have additional + * dependencies. + */ +#define __UNCONST(a) ((void *)(unsigned long)(const void *)(a)) + +/* * Return the number of elements in a statically-allocated array, * __x. */ Copied: stable/10/lib/libnetbsd/sys/time.h (from r274078, head/lib/libnetbsd/sys/time.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libnetbsd/sys/time.h Sun Dec 21 11:11:17 2014 (r275996, copy of r274078, head/lib/libnetbsd/sys/time.h) @@ -0,0 +1,65 @@ +/* $FreeBSD$ */ + +/* + * Copyright (c) 1982, 1986, 1993 + * The Regents of the University of California. 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. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``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 REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 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. + * + * @(#)time.h 8.5 (Berkeley) 5/4/95 + */ + +#ifndef _LIBNETBSD_SYS_TIME_H_ +#define _LIBNETBSD_SYS_TIME_H_ + +#include_next + +/* Operations on timespecs. */ +#define timespecclear(tsp) (tsp)->tv_sec = (time_t)((tsp)->tv_nsec = 0L) +#define timespecisset(tsp) ((tsp)->tv_sec || (tsp)->tv_nsec) +#define timespeccmp(tsp, usp, cmp) \ + (((tsp)->tv_sec == (usp)->tv_sec) ? \ + ((tsp)->tv_nsec cmp (usp)->tv_nsec) : \ + ((tsp)->tv_sec cmp (usp)->tv_sec)) +#define timespecadd(tsp, usp, vsp) \ + do { \ + (vsp)->tv_sec = (tsp)->tv_sec + (usp)->tv_sec; \ + (vsp)->tv_nsec = (tsp)->tv_nsec + (usp)->tv_nsec; \ + if ((vsp)->tv_nsec >= 1000000000L) { \ + (vsp)->tv_sec++; \ + (vsp)->tv_nsec -= 1000000000L; \ + } \ + } while (/* CONSTCOND */ 0) +#define timespecsub(tsp, usp, vsp) \ + do { \ + (vsp)->tv_sec = (tsp)->tv_sec - (usp)->tv_sec; \ + (vsp)->tv_nsec = (tsp)->tv_nsec - (usp)->tv_nsec; \ + if ((vsp)->tv_nsec < 0) { \ + (vsp)->tv_sec--; \ + (vsp)->tv_nsec += 1000000000L; \ + } \ + } while (/* CONSTCOND */ 0) + +#endif From owner-svn-src-all@FreeBSD.ORG Sun Dec 21 11:15:36 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 20195D1A; Sun, 21 Dec 2014 11:15:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0B7BE2C3B; Sun, 21 Dec 2014 11:15:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBLBFZJj063779; Sun, 21 Dec 2014 11:15:35 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBLBFZYq063778; Sun, 21 Dec 2014 11:15:35 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201412211115.sBLBFZYq063778@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 21 Dec 2014 11:15:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r275997 - stable/10/usr.sbin/autofs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2014 11:15:36 -0000 Author: trasz Date: Sun Dec 21 11:15:35 2014 New Revision: 275997 URL: https://svnweb.freebsd.org/changeset/base/275997 Log: MFC r274796: Document use of wildcards (*) and ampersands (&) in autofs map files. Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.sbin/autofs/auto_master.5 Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/autofs/auto_master.5 ============================================================================== --- stable/10/usr.sbin/autofs/auto_master.5 Sun Dec 21 11:11:17 2014 (r275996) +++ stable/10/usr.sbin/autofs/auto_master.5 Sun Dec 21 11:15:35 2014 (r275997) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 19, 2014 +.Dd November 21, 2014 .Dt AUTO_MASTER 5 .Os .Sh NAME @@ -124,6 +124,12 @@ is the path component used by .Xr automountd 8 to find the right map entry to use. It is also used to form the final mountpoint. +A wildcard +.Pq Ql * +can be used for the key. +It matches every directory that does not match other keys. +Those directories will not be visible to the user +until accessed. .Pp The .Ar options @@ -155,9 +161,20 @@ for a single key. The .Ar location field specifies the filesystem to be mounted. -To pass location that begins with +Ampersands +.Pq Ql & +in the +.Ar location +field are replaced with the value of +.Ar key . +This is typically used with wildcards, like: +.Bd -literal -offset indent +.Li * 192.168.1.1:/share/& +.Ed +.Pp +To pass a location that begins with .Li / , -prefix it with colon. +prefix it with a colon. For example, .Li :/dev/cd0 . .Pp From owner-svn-src-all@FreeBSD.ORG Sun Dec 21 11:22:17 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 01260EA1; Sun, 21 Dec 2014 11:22:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E0A5B2D33; Sun, 21 Dec 2014 11:22:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBLBMGWV068721; Sun, 21 Dec 2014 11:22:16 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBLBMGpb068720; Sun, 21 Dec 2014 11:22:16 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201412211122.sBLBMGpb068720@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 21 Dec 2014 11:22:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r275998 - stable/10/sbin/growfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2014 11:22:17 -0000 Author: trasz Date: Sun Dec 21 11:22:15 2014 New Revision: 275998 URL: https://svnweb.freebsd.org/changeset/base/275998 Log: MFC r274737: Use proper ordering in EXAMPLES section in growfs(8). Sponsored by: The FreeBSD Foundation Modified: stable/10/sbin/growfs/growfs.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/growfs/growfs.8 ============================================================================== --- stable/10/sbin/growfs/growfs.8 Sun Dec 21 11:15:35 2014 (r275997) +++ stable/10/sbin/growfs/growfs.8 Sun Dec 21 11:22:15 2014 (r275998) @@ -37,7 +37,7 @@ .\" $TSHeader: src/sbin/growfs/growfs.8,v 1.3 2000/12/12 19:31:00 tomsoft Exp $ .\" $FreeBSD$ .\" -.Dd April 30, 2012 +.Dd November 20, 2014 .Dt GROWFS 8 .Os .Sh NAME @@ -96,12 +96,11 @@ This value defaults to the size of the r will enlarge the file system to the size of the entire partition). .El .Sh EXAMPLES -.Dl growfs -s 2G /dev/ada0p1 -.Pp -will enlarge +Enlarge .Pa /dev/ada0p1 up to 2GB if there is enough space in -.Pa /dev/ada0p1 . +.Pa /dev/ada0p1 : +.Dl growfs -s 2G /dev/ada0p1 .Sh SEE ALSO .Xr dumpfs 8 , .Xr ffsinfo 8 , From owner-svn-src-all@FreeBSD.ORG Sun Dec 21 11:24:00 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9B3C8FE3; Sun, 21 Dec 2014 11:24:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 867DC2D4C; Sun, 21 Dec 2014 11:24:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBLBO01e069304; Sun, 21 Dec 2014 11:24:00 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBLBO0nW069303; Sun, 21 Dec 2014 11:24:00 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201412211124.sBLBO0nW069303@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 21 Dec 2014 11:24:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r275999 - stable/10/sbin/growfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2014 11:24:00 -0000 Author: trasz Date: Sun Dec 21 11:23:59 2014 New Revision: 275999 URL: https://svnweb.freebsd.org/changeset/base/275999 Log: MFC r274738: Document growfs(8) feature apparently nobody knows about. Sponsored by: The FreeBSD Foundation Modified: stable/10/sbin/growfs/growfs.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/growfs/growfs.8 ============================================================================== --- stable/10/sbin/growfs/growfs.8 Sun Dec 21 11:22:15 2014 (r275998) +++ stable/10/sbin/growfs/growfs.8 Sun Dec 21 11:23:59 2014 (r275999) @@ -101,6 +101,9 @@ Enlarge up to 2GB if there is enough space in .Pa /dev/ada0p1 : .Dl growfs -s 2G /dev/ada0p1 +.Pp +Enlarge root filesystem to fill up available space: +.Dl growfs / .Sh SEE ALSO .Xr dumpfs 8 , .Xr ffsinfo 8 , From owner-svn-src-all@FreeBSD.ORG Sun Dec 21 11:25:27 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DE6CD1A2; Sun, 21 Dec 2014 11:25:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C998F2D6A; Sun, 21 Dec 2014 11:25:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBLBPR5r069570; Sun, 21 Dec 2014 11:25:27 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBLBPRwU069569; Sun, 21 Dec 2014 11:25:27 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201412211125.sBLBPRwU069569@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 21 Dec 2014 11:25:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276000 - stable/10/sbin/growfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2014 11:25:28 -0000 Author: trasz Date: Sun Dec 21 11:25:26 2014 New Revision: 276000 URL: https://svnweb.freebsd.org/changeset/base/276000 Log: MFC r274741: Add example on how to use gpart before growfs. While here, reorder examples so that the simplest one comes first. Sponsored by: The FreeBSD Foundation Modified: stable/10/sbin/growfs/growfs.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/growfs/growfs.8 ============================================================================== --- stable/10/sbin/growfs/growfs.8 Sun Dec 21 11:23:59 2014 (r275999) +++ stable/10/sbin/growfs/growfs.8 Sun Dec 21 11:25:26 2014 (r276000) @@ -96,14 +96,14 @@ This value defaults to the size of the r will enlarge the file system to the size of the entire partition). .El .Sh EXAMPLES -Enlarge +Expand root filesystem to fill up available space: +.Dl growfs / +.Pp +Resize .Pa /dev/ada0p1 -up to 2GB if there is enough space in -.Pa /dev/ada0p1 : +partition to 2GB and expand the filesystem: +.Dl gpart resize -i 1 -s 2G ada0 .Dl growfs -s 2G /dev/ada0p1 -.Pp -Enlarge root filesystem to fill up available space: -.Dl growfs / .Sh SEE ALSO .Xr dumpfs 8 , .Xr ffsinfo 8 , From owner-svn-src-all@FreeBSD.ORG Sun Dec 21 11:26:52 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4F72B2D0; Sun, 21 Dec 2014 11:26:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3AB042D74; Sun, 21 Dec 2014 11:26:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBLBQqfU069788; Sun, 21 Dec 2014 11:26:52 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBLBQqc9069787; Sun, 21 Dec 2014 11:26:52 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201412211126.sBLBQqc9069787@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 21 Dec 2014 11:26:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276001 - stable/10/sbin/growfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2014 11:26:52 -0000 Author: trasz Date: Sun Dec 21 11:26:51 2014 New Revision: 276001 URL: https://svnweb.freebsd.org/changeset/base/276001 Log: MFC r274742: Uniformly refer to a file system as "file system". Sponsored by: The FreeBSD Foundation Modified: stable/10/sbin/growfs/growfs.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/growfs/growfs.8 ============================================================================== --- stable/10/sbin/growfs/growfs.8 Sun Dec 21 11:25:26 2014 (r276000) +++ stable/10/sbin/growfs/growfs.8 Sun Dec 21 11:26:51 2014 (r276001) @@ -96,12 +96,12 @@ This value defaults to the size of the r will enlarge the file system to the size of the entire partition). .El .Sh EXAMPLES -Expand root filesystem to fill up available space: +Expand root file system to fill up available space: .Dl growfs / .Pp Resize .Pa /dev/ada0p1 -partition to 2GB and expand the filesystem: +partition to 2GB and expand the file system: .Dl gpart resize -i 1 -s 2G ada0 .Dl growfs -s 2G /dev/ada0p1 .Sh SEE ALSO @@ -117,7 +117,7 @@ The .Nm utility first appeared in .Fx 4.4 . -The ability to resize mounted filesystems was added in +The ability to resize mounted file systems was added in .Fx 10.0 . .Sh AUTHORS .An Christoph Herrmann Aq chm@FreeBSD.org From owner-svn-src-all@FreeBSD.ORG Sun Dec 21 11:33:19 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7A79D473; Sun, 21 Dec 2014 11:33:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 65E372E4E; Sun, 21 Dec 2014 11:33:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBLBXJfH074098; Sun, 21 Dec 2014 11:33:19 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBLBXJdB074097; Sun, 21 Dec 2014 11:33:19 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201412211133.sBLBXJdB074097@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 21 Dec 2014 11:33:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276002 - stable/10/sys/fs/smbfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2014 11:33:19 -0000 Author: trasz Date: Sun Dec 21 11:33:18 2014 New Revision: 276002 URL: https://svnweb.freebsd.org/changeset/base/276002 Log: MFC r274784: Fix smbfs to not zero out statfs f_flags field. Previously, this made getmntinfo() return empty flags for smbfs filesystems when called with MNT_WAIT. It's not visible with mount(8), since it uses MNT_NOWAIT, but broke autounmount(8) operation. PR: 195161 Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/fs/smbfs/smbfs_vfsops.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/smbfs/smbfs_vfsops.c ============================================================================== --- stable/10/sys/fs/smbfs/smbfs_vfsops.c Sun Dec 21 11:26:51 2014 (r276001) +++ stable/10/sys/fs/smbfs/smbfs_vfsops.c Sun Dec 21 11:33:18 2014 (r276002) @@ -401,8 +401,6 @@ smbfs_statfs(struct mount *mp, struct st scred = smbfs_malloc_scred(); smb_makescred(scred, td, td->td_ucred); error = smbfs_smb_statfs(ssp, sbp, scred); - if (error == 0) - sbp->f_flags = 0; /* copy of mount exported flags */ smbfs_free_scred(scred); return (error); } From owner-svn-src-all@FreeBSD.ORG Sun Dec 21 11:37:03 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B07FA6A0; Sun, 21 Dec 2014 11:37:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9BAFC2E91; Sun, 21 Dec 2014 11:37:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBLBb3HQ074663; Sun, 21 Dec 2014 11:37:03 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBLBb1Kj074637; Sun, 21 Dec 2014 11:37:01 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201412211137.sBLBb1Kj074637@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sun, 21 Dec 2014 11:37:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276003 - head/sys/arm/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2014 11:37:03 -0000 Author: andrew Date: Sun Dec 21 11:37:00 2014 New Revision: 276003 URL: https://svnweb.freebsd.org/changeset/base/276003 Log: tart to clean up the armv6 kernel configs by reducing the diff between them in the first sections and the later FDT support. Differential Revision: https://reviews.freebsd.org/D1346 Reviewed by: rpaulo (earlier version) Modified: head/sys/arm/conf/ARMADAXP head/sys/arm/conf/BEAGLEBONE head/sys/arm/conf/CUBIEBOARD head/sys/arm/conf/CUBIEBOARD2 head/sys/arm/conf/EFIKA_MX head/sys/arm/conf/EXYNOS5.common head/sys/arm/conf/IMX53 head/sys/arm/conf/IMX6 head/sys/arm/conf/PANDABOARD head/sys/arm/conf/RK3188 head/sys/arm/conf/RPI-B head/sys/arm/conf/SOCKIT head/sys/arm/conf/SOCKIT-BERI head/sys/arm/conf/VERSATILEPB head/sys/arm/conf/VYBRID head/sys/arm/conf/ZEDBOARD Modified: head/sys/arm/conf/ARMADAXP ============================================================================== --- head/sys/arm/conf/ARMADAXP Sun Dec 21 11:33:18 2014 (r276002) +++ head/sys/arm/conf/ARMADAXP Sun Dec 21 11:37:00 2014 (r276003) @@ -1,8 +1,22 @@ # # Custom kernel for Marvell Armada XP # -# $FreeBSD$ +# For more information on this file, please read the config(5) manual page, +# and/or the handbook section on Kernel Configuration Files: +# +# http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html +# +# The handbook is also available locally in /usr/share/doc/handbook +# if you've installed the doc distribution, otherwise always see the +# FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the +# latest information. # +# An exhaustive list of options and more detailed explanations of the +# device lines is also present in the ../../conf/NOTES and NOTES files. +# If you are in doubt as to the purpose or necessity of a line, check first +# in NOTES. +# +# $FreeBSD$ ident MV-88F78XX0 include "../mv/armadaxp/std.mv78x60" @@ -10,58 +24,75 @@ include "../mv/armadaxp/std.mv78x60" options SOC_MV_ARMADAXP makeoptions MODULES_OVERRIDE="" -makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols makeoptions WERROR="-Werror" +options HZ=1000 #options SCHED_ULE # ULE scheduler options SCHED_4BSD # 4BSD scheduler +options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols +options SCTP # Stream Control Transmission Protocol options FFS # Berkeley Fast Filesystem -options NFSCL # Network Filesystem Client +options SOFTUPDATES # Enable FFS soft updates support +options UFS_ACL # Support for access control lists +options UFS_DIRHASH # Improve performance on big directories +options UFS_GJOURNAL # Enable gjournal-based UFS journaling +options QUOTA # Enable disk quotas for UFS +options NFSCL # New Network Filesystem Client options NFSLOCKD # Network Lock Manager -options NFS_ROOT # NFS usable as /, requires NFSCLIENT -options BOOTP -options BOOTP_NFSROOT -options BOOTP_NFSV3 -options BOOTP_WIRED_TO=mge0 - +options NFS_ROOT # NFS usable as /, requires NFSCL +options MSDOSFS # MSDOS Filesystem +options CD9660 # ISO 9660 Filesystem +options PROCFS # Process filesystem (requires PSEUDOFS) +options PSEUDOFS # Pseudo-filesystem framework options TMPFS # Efficient memory filesystem +options GEOM_PART_GPT # GUID Partition Tables options GEOM_PART_BSD # BSD partition scheme options GEOM_PART_MBR # MBR partition scheme -options GEOM_PART_GPT -options ROOTDEVNAME=\"ufs:/dev/da0p1\" - +options KTRACE # ktrace(1) support options SYSVSHM # SYSV-style shared memory options SYSVMSG # SYSV-style message queues options SYSVSEM # SYSV-style semaphores -options _KPOSIX_PRIORITY_SCHEDULING # Posix P1003_1B real-time extensions -options MUTEX_NOINLINE -options RWLOCK_NOINLINE -options NO_FFS_SNAPSHOT -options NO_SWAPPING -options VFP - -options SMP +options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions +options KBD_INSTALL_CDEV # install a CDEV entry in /dev +options VFP # Enable floating point hardware support +options SMP # Enable multiple cores -# Debugging -#options VERBOSE_SYSINIT +# Debugging for use in -current +makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols +#options VERBOSE_SYSINIT # Enable verbose sysinit messages options ALT_BREAK_TO_DEBUGGER -options DDB +options KDB # Enable kernel debugger support +# For minimum debugger support (stable branch) use: +options KDB_TRACE # Print a stack trace for a panic +# For full debugger support use this instead: +options DDB # Enable the kernel debugger options GDB -#options DIAGNOSTIC #options INVARIANTS # Enable calls of extra sanity checking #options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS -options KDB -options KDB_TRACE +#options WITNESS # Enable checks to detect deadlocks and cycles +#options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed +#options WITNESS_KDB +#options DIAGNOSTIC #options KTR #options KTR_VERBOSE=0 #options KTR_ENTRIES=16384 #options KTR_MASK=(KTR_SPARE2) #options KTR_COMPILE=KTR_ALL -#options WITNESS # Enable checks to detect deadlocks and cycles -#options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed -#options WITNESS_KDB + +# NFS root from boopt/dhcp +options BOOTP +options BOOTP_NFSROOT +options BOOTP_NFSV3 +options BOOTP_WIRED_TO=mge0 + +options ROOTDEVNAME=\"ufs:/dev/da0p1\" + +options MUTEX_NOINLINE +options RWLOCK_NOINLINE +options NO_FFS_SNAPSHOT +options NO_SWAPPING # Pseudo devices device random @@ -94,14 +125,13 @@ device mge # Marvell Gigabit Ethernet device mii device e1000phy device bpf -options HZ=1000 options DEVICE_POLLING device vlan #PCI/PCIE device pci -#FDT -options FDT +# Flattened Device Tree +options FDT # Configure using FDT/DTB data options FDT_DTB_STATIC makeoptions FDT_DTS_FILE=db78460.dts Modified: head/sys/arm/conf/BEAGLEBONE ============================================================================== --- head/sys/arm/conf/BEAGLEBONE Sun Dec 21 11:33:18 2014 (r276002) +++ head/sys/arm/conf/BEAGLEBONE Sun Dec 21 11:37:00 2014 (r276003) @@ -1,10 +1,11 @@ +# # BEAGLEBONE -- Custom configuration for the BeagleBone ARM development # platforms, check out http://www.beagleboard.org/bone and # http://www.beagleboard.org/black. This kernel config file is used for the # original BeagleBone and the BeagleBone Black. # -# For more information on this file, please read the handbook section on -# Kernel Configuration Files: +# For more information on this file, please read the config(5) manual page, +# and/or the handbook section on Kernel Configuration Files: # # http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html # @@ -28,37 +29,47 @@ makeoptions WITHOUT_MODULES="ahc" options HZ=100 options SCHED_4BSD # 4BSD scheduler +options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols +options SCTP # Stream Control Transmission Protocol options FFS # Berkeley Fast Filesystem options SOFTUPDATES # Enable FFS soft updates support options UFS_ACL # Support for access control lists options UFS_DIRHASH # Improve performance on big directories -options GEOM_PART_BSD # BSD partition scheme -options GEOM_PART_MBR # MBR partition scheme -options TMPFS # Efficient memory filesystem +options UFS_GJOURNAL # Enable gjournal-based UFS journaling +options QUOTA # Enable disk quotas for UFS +options NFSCL # New Network Filesystem Client +options NFSLOCKD # Network Lock Manager +options NFS_ROOT # NFS usable as /, requires NFSCL options MSDOSFS # MSDOS Filesystem options CD9660 # ISO 9660 Filesystem options PROCFS # Process filesystem (requires PSEUDOFS) options PSEUDOFS # Pseudo-filesystem framework +options TMPFS # Efficient memory filesystem +options GEOM_PART_GPT # GUID Partition Tables +options GEOM_PART_BSD # BSD partition scheme +options GEOM_PART_MBR # MBR partition scheme options COMPAT_43 # Compatible with BSD 4.3 [KEEP THIS!] options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI options KTRACE # ktrace(1) support options SYSVSHM # SYSV-style shared memory options SYSVMSG # SYSV-style message queues options SYSVSEM # SYSV-style semaphores -options _KPOSIX_PRIORITY_SCHEDULING # Posix P1003_1B real-time extensions +options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions options KBD_INSTALL_CDEV # install a CDEV entry in /dev -options PREEMPTION options PLATFORM -options FREEBSD_BOOT_LOADER -options VFP # vfp/neon +options FREEBSD_BOOT_LOADER # Process metadata passed from loader(8) +options VFP # Enable floating point hardware support # Debugging for use in -current makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols options BREAK_TO_DEBUGGER #options VERBOSE_SYSINIT # Enable verbose sysinit messages -options KDB +options KDB # Enable kernel debugger support +# For minimum debugger support (stable branch) use: +#options KDB_TRACE # Print a stack trace for a panic +# For full debugger support use this instead: options DDB # Enable the kernel debugger options INVARIANTS # Enable calls of extra sanity checking options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS @@ -66,19 +77,19 @@ options WITNESS # Enable checks to de options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed #options DIAGNOSTIC -# NFS support -options NFSCL +# NFS server support #options NFSD -options NFSLOCKD -# Uncomment this for NFS root -#options NFS_ROOT # NFS usable as /, requires NFSCL +# NFS root from boopt/dhcp +#options BOOTP #options BOOTP_NFSROOT #options BOOTP_COMPAT -#options BOOTP #options BOOTP_NFSV3 #options BOOTP_WIRED_TO=cpsw0 +# Boot device is 2nd slice on MMC/SD card +options ROOTDEVNAME=\"ufs:mmcsd0s2\" + # MMC/SD/SDIO Card slot support device mmc # mmc/sd bus device mmcsd # mmc/sd flash cards @@ -90,9 +101,6 @@ device iic device ti_i2c device am335x_pmic # AM335x Power Management IC (TPC65217) -# Boot device is 2nd slice on MMC/SD card -options ROOTDEVNAME=\"ufs:mmcsd0s2\" - # Console and misc device uart device uart_ns8250 @@ -148,6 +156,6 @@ device usb_template # Control of th device usfs # Flattened Device Tree -options FDT -options FDT_DTB_STATIC -makeoptions FDT_DTS_FILE=beaglebone.dts +options FDT # Configure using FDT/DTB data +options FDT_DTB_STATIC +makeoptions FDT_DTS_FILE=beaglebone.dts Modified: head/sys/arm/conf/CUBIEBOARD ============================================================================== --- head/sys/arm/conf/CUBIEBOARD Sun Dec 21 11:33:18 2014 (r276002) +++ head/sys/arm/conf/CUBIEBOARD Sun Dec 21 11:37:00 2014 (r276003) @@ -1,8 +1,9 @@ +# # CUBIEBOARD -- Custom configuration for the CUBIEBOARD ARM development # platform, check out http://www.cubieboard.org # -# For more information on this file, please read the handbook section on -# Kernel Configuration Files: +# For more information on this file, please read the config(5) manual page, +# and/or the handbook section on Kernel Configuration Files: # # http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html # @@ -27,36 +28,46 @@ makeoptions WITHOUT_MODULES="ahc" options HZ=100 options SCHED_4BSD # 4BSD scheduler +options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols -options GEOM_PART_BSD # BSD partition scheme -options GEOM_PART_MBR # MBR partition scheme -options TMPFS # Efficient memory filesystem +options SCTP # Stream Control Transmission Protocol options FFS # Berkeley Fast Filesystem options SOFTUPDATES # Enable FFS soft updates support options UFS_ACL # Support for access control lists options UFS_DIRHASH # Improve performance on big directories +options UFS_GJOURNAL # Enable gjournal-based UFS journaling +options QUOTA # Enable disk quotas for UFS +options NFSCL # New Network Filesystem Client +options NFSLOCKD # Network Lock Manager +options NFS_ROOT # NFS usable as /, requires NFSCL options MSDOSFS # MSDOS Filesystem options CD9660 # ISO 9660 Filesystem options PROCFS # Process filesystem (requires PSEUDOFS) options PSEUDOFS # Pseudo-filesystem framework +options TMPFS # Efficient memory filesystem +options GEOM_PART_GPT # GUID Partition Tables +options GEOM_PART_BSD # BSD partition scheme +options GEOM_PART_MBR # MBR partition scheme options COMPAT_43 # Compatible with BSD 4.3 [KEEP THIS!] options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI options KTRACE # ktrace(1) support options SYSVSHM # SYSV-style shared memory options SYSVMSG # SYSV-style message queues options SYSVSEM # SYSV-style semaphores -options _KPOSIX_PRIORITY_SCHEDULING # Posix P1003_1B real-time extensions +options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions options KBD_INSTALL_CDEV # install a CDEV entry in /dev -options PREEMPTION -options FREEBSD_BOOT_LOADER -options VFP # vfp/neon +options FREEBSD_BOOT_LOADER # Process metadata passed from loader(8) +options VFP # Enable floating point hardware support -# Debugging +# Debugging for use in -current makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols options BREAK_TO_DEBUGGER #options VERBOSE_SYSINIT # Enable verbose sysinit messages -options KDB +options KDB # Enable kernel debugger support +# For minimum debugger support (stable branch) use: +#options KDB_TRACE # Print a stack trace for a panic +# For full debugger support use this instead: options DDB # Enable the kernel debugger options INVARIANTS # Enable calls of extra sanity checking options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS @@ -64,26 +75,20 @@ options WITNESS # Enable checks to de options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed #options DIAGNOSTIC -# NFS support -#options NFSCL -#options NFSSERVER # Network Filesystem Server -#options NFSCLIENT # Network Filesystem Client - -# Uncomment this for NFS root -#options NFS_ROOT # NFS usable as /, requires NFSCLIENT +# NFS root from boopt/dhcp +#options BOOTP #options BOOTP_NFSROOT #options BOOTP_COMPAT -#options BOOTP #options BOOTP_NFSV3 #options BOOTP_WIRED_TO=cpsw0 -# MMC/SD/SDIO card slot support -#device mmc # mmc/sd bus -#device mmcsd # mmc/sd flash cards - # Boot device is 2nd slice on MMC/SD card options ROOTDEVNAME=\"ufs:/dev/da0s2\" +# MMC/SD/SDIO Card slot support +#device mmc # mmc/sd bus +#device mmcsd # mmc/sd flash cards + # ATA controllers #device ahci # AHCI-compatible SATA controllers #device ata # Legacy ATA/SATA controllers @@ -134,7 +139,7 @@ device emac device miibus # Flattened Device Tree -options FDT +options FDT # Configure using FDT/DTB data options FDT_DTB_STATIC makeoptions FDT_DTS_FILE=cubieboard.dts Modified: head/sys/arm/conf/CUBIEBOARD2 ============================================================================== --- head/sys/arm/conf/CUBIEBOARD2 Sun Dec 21 11:33:18 2014 (r276002) +++ head/sys/arm/conf/CUBIEBOARD2 Sun Dec 21 11:37:00 2014 (r276003) @@ -1,8 +1,9 @@ +# # CUBIEBOARD2 -- Custom configuration for the CUBIEBOARD2 ARM development # platform, check out http://www.cubieboard.org # -# For more information on this file, please read the handbook section on -# Kernel Configuration Files: +# For more information on this file, please read the config(5) manual page, +# and/or the handbook section on Kernel Configuration Files: # # http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html # @@ -27,36 +28,47 @@ makeoptions WITHOUT_MODULES="ahc" options HZ=100 options SCHED_4BSD # 4BSD scheduler +options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols -options GEOM_PART_BSD # BSD partition scheme -options GEOM_PART_MBR # MBR partition scheme -options TMPFS # Efficient memory filesystem +options SCTP # Stream Control Transmission Protocol options FFS # Berkeley Fast Filesystem options SOFTUPDATES # Enable FFS soft updates support options UFS_ACL # Support for access control lists options UFS_DIRHASH # Improve performance on big directories +options UFS_GJOURNAL # Enable gjournal-based UFS journaling +options QUOTA # Enable disk quotas for UFS +options NFSCL # New Network Filesystem Client +options NFSLOCKD # Network Lock Manager +options NFS_ROOT # NFS usable as /, requires NFSCL options MSDOSFS # MSDOS Filesystem options CD9660 # ISO 9660 Filesystem options PROCFS # Process filesystem (requires PSEUDOFS) options PSEUDOFS # Pseudo-filesystem framework +options TMPFS # Efficient memory filesystem +options GEOM_PART_GPT # GUID Partition Tables +options GEOM_PART_BSD # BSD partition scheme +options GEOM_PART_MBR # MBR partition scheme options COMPAT_43 # Compatible with BSD 4.3 [KEEP THIS!] options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI options KTRACE # ktrace(1) support options SYSVSHM # SYSV-style shared memory options SYSVMSG # SYSV-style message queues options SYSVSEM # SYSV-style semaphores -options _KPOSIX_PRIORITY_SCHEDULING # Posix P1003_1B real-time extensions +options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions options KBD_INSTALL_CDEV # install a CDEV entry in /dev -options PREEMPTION -options FREEBSD_BOOT_LOADER -options VFP # vfp/neon +options FREEBSD_BOOT_LOADER # Process metadata passed from loader(8) +options VFP # Enable floating point hardware support +options SMP # Enable multiple cores -# Debugging +# Debugging for use in -current makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols options BREAK_TO_DEBUGGER #options VERBOSE_SYSINIT # Enable verbose sysinit messages -options KDB +options KDB # Enable kernel debugger support +# For minimum debugger support (stable branch) use: +#options KDB_TRACE # Print a stack trace for a panic +# For full debugger support use this instead: options DDB # Enable the kernel debugger options INVARIANTS # Enable calls of extra sanity checking options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS @@ -64,26 +76,20 @@ options WITNESS # Enable checks to de options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed #options DIAGNOSTIC -# NFS support -#options NFSCL -#options NFSSERVER # Network Filesystem Server -#options NFSCLIENT # Network Filesystem Client - -# Uncomment this for NFS root -#options NFS_ROOT # NFS usable as /, requires NFSCLIENT +# NFS root from boopt/dhcp +#options BOOTP #options BOOTP_NFSROOT #options BOOTP_COMPAT -#options BOOTP #options BOOTP_NFSV3 #options BOOTP_WIRED_TO=cpsw0 -# MMC/SD/SDIO card slot support -#device mmc # mmc/sd bus -#device mmcsd # mmc/sd flash cards - # Boot device is 2nd slice on MMC/SD card options ROOTDEVNAME=\"ufs:/dev/da0s2\" +# MMC/SD/SDIO Card slot support +#device mmc # mmc/sd bus +#device mmcsd # mmc/sd flash cards + # ATA controllers #device ahci # AHCI-compatible SATA controllers #device ata # Legacy ATA/SATA controllers @@ -134,8 +140,7 @@ device emac device miibus # Flattened Device Tree -options FDT +options FDT # Configure using FDT/DTB data options FDT_DTB_STATIC makeoptions FDT_DTS_FILE=cubieboard2.dts -options SMP # Enable multiple cores Modified: head/sys/arm/conf/EFIKA_MX ============================================================================== --- head/sys/arm/conf/EFIKA_MX Sun Dec 21 11:33:18 2014 (r276002) +++ head/sys/arm/conf/EFIKA_MX Sun Dec 21 11:37:00 2014 (r276003) @@ -1,3 +1,4 @@ +# # Kernel configuration for Efika MX Smarttop/Smartbook boards # # For more information on this file, please read the config(5) manual page, @@ -23,32 +24,30 @@ include "../freescale/imx/std.imx51" makeoptions WITHOUT_MODULES="ahc" -makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols -#options DEBUG - options SCHED_4BSD # 4BSD scheduler -#options PREEMPTION # Enable kernel thread preemption +options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking -#options INET6 # IPv6 communications protocols -#options SCTP # Stream Control Transmission Protocol +options INET6 # IPv6 communications protocols +options SCTP # Stream Control Transmission Protocol options FFS # Berkeley Fast Filesystem options SOFTUPDATES # Enable FFS soft updates support options UFS_ACL # Support for access control lists options UFS_DIRHASH # Improve performance on big directories options UFS_GJOURNAL # Enable gjournal-based UFS journaling +options QUOTA # Enable disk quotas for UFS #options MD_ROOT # MD is a potential root device options NFSCL # New Network Filesystem Client #options NFSD # New Network Filesystem Server options NFSLOCKD # Network Lock Manager options NFS_ROOT # NFS usable as /, requires NFSCL -options TMPFS # Efficient memory filesystem options MSDOSFS # MSDOS Filesystem options CD9660 # ISO 9660 Filesystem -#options PROCFS # Process filesystem (requires PSEUDOFS) +options PROCFS # Process filesystem (requires PSEUDOFS) options PSEUDOFS # Pseudo-filesystem framework +options TMPFS # Efficient memory filesystem +options GEOM_PART_GPT # GUID Partition Tables options GEOM_PART_BSD # BSD partition scheme options GEOM_PART_MBR # MBR partition scheme -options GEOM_PART_GPT # GUID Partition Tables. options GEOM_LABEL # Provides labelization #options COMPAT_FREEBSD5 # Compatible with FreeBSD5 #options COMPAT_FREEBSD6 # Compatible with FreeBSD6 @@ -59,16 +58,33 @@ options SYSVSHM # SYSV-style shared m options SYSVMSG # SYSV-style message queues options SYSVSEM # SYSV-style semaphores options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions +options KBD_INSTALL_CDEV # install a CDEV entry in /dev options INCLUDE_CONFIG_FILE # Include this file in kernel -options VFP # vfp/neon +options VFP # Enable floating point hardware support + +# Debugging for use in -current +makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols +options BREAK_TO_DEBUGGER +#options VERBOSE_SYSINIT # Enable verbose sysinit messages +options KDB # Enable kernel debugger support +# For minimum debugger support (stable branch) use: +#options KDB_TRACE # Print a stack trace for a panic +# For full debugger support use this instead: +options DDB # Enable the kernel debugger +#options GDB # Support remote GDB +options DEADLKRES # Enable the deadlock resolver +options INVARIANTS # Enable calls of extra sanity checking +options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS +options WITNESS # Enable checks to detect deadlocks and cycles +#options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed -# required for netbooting +# NFS root from boopt/dhcp #options BOOTP -#options BOOTP_COMPAT #options BOOTP_NFSROOT +#options BOOTP_COMPAT #options BOOTP_NFSV3 #options BOOTP_WIRED_TO=ue0 -# + options ROOTDEVNAME=\"ufs:ada0s2a\" @@ -79,18 +95,6 @@ options ROOTDEVNAME=\"ufs:ada0s2a\" #options NO_SYSCTL_DESCR #options RWLOCK_NOINLINE -# Debugging support. Always need this: -options KDB # Enable kernel debugger support. -# For minimum debugger support (stable branch) use: -#options KDB_TRACE # Print a stack trace for a panic. -# For full debugger support use this instead: -options DDB # Support DDB. -#options GDB # Support remote GDB. -options DEADLKRES # Enable the deadlock resolver -options INVARIANTS # Enable calls of extra sanity checking -options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS -options WITNESS # Enable checks to detect deadlocks and cycles - # The `bpf' device enables the Berkeley Packet Filter. # Be aware of the administrative consequences of enabling this! # Note that 'bpf' is required for DHCP. @@ -162,9 +166,9 @@ device wlan_tkip # 802.11 TKIP support device wlan_amrr # AMRR transmit rate control algorithm # Flattened Device Tree -options FDT -options FDT_DTB_STATIC -makeoptions FDT_DTS_FILE=efikamx.dts +options FDT # Configure using FDT/DTB data +options FDT_DTB_STATIC +makeoptions FDT_DTS_FILE=efikamx.dts # NOTE: serial console will be disabled if syscons enabled # Uncomment following lines for framebuffer/syscons support Modified: head/sys/arm/conf/EXYNOS5.common ============================================================================== --- head/sys/arm/conf/EXYNOS5.common Sun Dec 21 11:33:18 2014 (r276002) +++ head/sys/arm/conf/EXYNOS5.common Sun Dec 21 11:37:00 2014 (r276003) @@ -1,3 +1,4 @@ +# # Kernel configuration for Samsung Exynos 5 SoC. # # For more information on this file, please read the config(5) manual page, @@ -20,70 +21,72 @@ makeoptions MODULES_OVERRIDE="" makeoptions WITHOUT_MODULES="ahc" -makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols makeoptions WERROR="-Werror" options HZ=100 options SCHED_4BSD # 4BSD scheduler +options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols -options GEOM_PART_BSD # BSD partition scheme -options GEOM_PART_MBR # MBR partition scheme -options GEOM_PART_GPT # GUID partition tables -options TMPFS # Efficient memory filesystem +options SCTP # Stream Control Transmission Protocol options FFS # Berkeley Fast Filesystem -options SOFTUPDATES +options SOFTUPDATES # Enable FFS soft updates support options UFS_ACL # Support for access control lists options UFS_DIRHASH # Improve performance on big directories +options UFS_GJOURNAL # Enable gjournal-based UFS journaling +options QUOTA # Enable disk quotas for UFS +options NFSCL # New Network Filesystem Client +options NFSLOCKD # Network Lock Manager +options NFS_ROOT # NFS usable as /, requires NFSCL options MSDOSFS # MSDOS Filesystem options CD9660 # ISO 9660 Filesystem options PROCFS # Process filesystem (requires PSEUDOFS) options PSEUDOFS # Pseudo-filesystem framework +options TMPFS # Efficient memory filesystem +options GEOM_PART_GPT # GUID Partition Tables +options GEOM_PART_BSD # BSD partition scheme +options GEOM_PART_MBR # MBR partition scheme options COMPAT_43 # Compatible with BSD 4.3 [KEEP THIS!] options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI -options KTRACE +options KTRACE # ktrace(1) support options SYSVSHM # SYSV-style shared memory options SYSVMSG # SYSV-style message queues options SYSVSEM # SYSV-style semaphores -options _KPOSIX_PRIORITY_SCHEDULING # Posix P1003_1B real-time extensions -options KBD_INSTALL_CDEV -options PREEMPTION -options FREEBSD_BOOT_LOADER -options VFP # vfp/neon +options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions +options KBD_INSTALL_CDEV # install a CDEV entry in /dev +options FREEBSD_BOOT_LOADER # Process metadata passed from loader(8) +options VFP # Enable floating point hardware support +options SMP # Enable multiple cores -options SMP - -# Debugging +# Debugging for use in -current makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols options BREAK_TO_DEBUGGER -#options VERBOSE_SYSINIT # Enable verbose sysinit messages -options KDB +#options VERBOSE_SYSINIT # Enable verbose sysinit messages +options KDB # Enable kernel debugger support +# For minimum debugger support (stable branch) use: +#options KDB_TRACE # Print a stack trace for a panic +# For full debugger support use this instead: options DDB # Enable the kernel debugger #options INVARIANTS # Enable calls of extra sanity checking #options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS -#options WITNESS # Enable checks to detect deadlocks and cycles -#options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed +#options WITNESS # Enable checks to detect deadlocks and cycles +#options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed #options DIAGNOSTIC -# NFS support -options NFSCL # Network Filesystem Client -options NFSLOCKD # Network Lock Manager -options NFS_ROOT # NFS usable as /, requires NFSCLIENT +# NFS root from boopt/dhcp +#options BOOTP +#options BOOTP_NFSROOT +#options BOOTP_COMPAT +#options BOOTP_NFSV3 +#options BOOTP_WIRED_TO=ue0 -# Uncomment this for NFS root -#options NFS_ROOT # NFS usable as /, requires NFSCL -#options BOOTP_NFSROOT -#options BOOTP_COMPAT -#options BOOTP -#options BOOTP_NFSV3 -#options BOOTP_WIRED_TO=ue0 +options ROOTDEVNAME=\"ufs:/dev/da0\" +# MMC/SD/SDIO Card slot support device mmc # mmc/sd bus device mmcsd # mmc/sd flash cards device dwmmc -options ROOTDEVNAME=\"ufs:/dev/da0\" - # Pseudo devices device loop Modified: head/sys/arm/conf/IMX53 ============================================================================== --- head/sys/arm/conf/IMX53 Sun Dec 21 11:33:18 2014 (r276002) +++ head/sys/arm/conf/IMX53 Sun Dec 21 11:37:00 2014 (r276003) @@ -1,3 +1,4 @@ +# # Kernel configuration for i.MX53 boards # # For more information on this file, please read the config(5) manual page, @@ -21,32 +22,29 @@ ident IMX53 include "../freescale/imx/std.imx53" -makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols -#options DEBUG - options SCHED_4BSD # 4BSD scheduler -#options PREEMPTION # Enable kernel thread preemption +options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols -#options SCTP # Stream Control Transmission Protocol +options SCTP # Stream Control Transmission Protocol options FFS # Berkeley Fast Filesystem options SOFTUPDATES # Enable FFS soft updates support options UFS_ACL # Support for access control lists options UFS_DIRHASH # Improve performance on big directories options UFS_GJOURNAL # Enable gjournal-based UFS journaling -#options MD_ROOT # MD is a potential root device +options QUOTA # Enable disk quotas for UFS options NFSCL # New Network Filesystem Client #options NFSD # New Network Filesystem Server options NFSLOCKD # Network Lock Manager options NFS_ROOT # NFS usable as /, requires NFSCL -options TMPFS # Efficient memory filesystem options MSDOSFS # MSDOS Filesystem options CD9660 # ISO 9660 Filesystem -#options PROCFS # Process filesystem (requires PSEUDOFS) +options PROCFS # Process filesystem (requires PSEUDOFS) options PSEUDOFS # Pseudo-filesystem framework +options TMPFS # Efficient memory filesystem +options GEOM_PART_GPT # GUID Partition Tables options GEOM_PART_BSD # BSD partition scheme options GEOM_PART_MBR # MBR partition scheme -options GEOM_PART_GPT # GUID Partition Tables. options GEOM_LABEL # Provides labelization #options COMPAT_FREEBSD5 # Compatible with FreeBSD5 #options COMPAT_FREEBSD6 # Compatible with FreeBSD6 @@ -57,27 +55,30 @@ options SYSVSHM # SYSV-style shared m options SYSVMSG # SYSV-style message queues options SYSVSEM # SYSV-style semaphores options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions +options KBD_INSTALL_CDEV # install a CDEV entry in /dev options INCLUDE_CONFIG_FILE # Include this file in kernel -options VFP # vfp/neon - -# kernel/memory size reduction -#options MUTEX_NOINLINE -#options NO_FFS_SNAPSHOT -#options NO_SWAPPING -#options NO_SYSCTL_DESCR -#options RWLOCK_NOINLINE +options VFP # Enable floating point hardware support -# Debugging support. Always need this: -options KDB # Enable kernel debugger support. +# Debugging for use in -current +makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols +options KDB # Enable kernel debugger support # For minimum debugger support (stable branch) use: -#options KDB_TRACE # Print a stack trace for a panic. +#options KDB_TRACE # Print a stack trace for a panic # For full debugger support use this instead: -options DDB # Support DDB. -#options GDB # Support remote GDB. +options DDB # Enable the kernel debugger +#options GDB # Support remote GDB options DEADLKRES # Enable the deadlock resolver options INVARIANTS # Enable calls of extra sanity checking options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS options WITNESS # Enable checks to detect deadlocks and cycles +#options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed + +# kernel/memory size reduction +#options MUTEX_NOINLINE +#options NO_FFS_SNAPSHOT +#options NO_SWAPPING +#options NO_SYSCTL_DESCR +#options RWLOCK_NOINLINE # The `bpf' device enables the Berkeley Packet Filter. # Be aware of the administrative consequences of enabling this! @@ -161,7 +162,7 @@ device wlan_amrr # AMRR transmit rate # Flattened Device Tree -options FDT +options FDT # Configure using FDT/DTB data # NOTE: serial console will be disabled if syscons enabled # Uncomment following lines for framebuffer/syscons support Modified: head/sys/arm/conf/IMX6 ============================================================================== --- head/sys/arm/conf/IMX6 Sun Dec 21 11:33:18 2014 (r276002) +++ head/sys/arm/conf/IMX6 Sun Dec 21 11:37:00 2014 (r276003) @@ -1,3 +1,4 @@ +# # Kernel configuration for Freescale i.MX6 systems. # # For more information on this file, please read the config(5) manual page, @@ -20,7 +21,7 @@ ident IMX6 include "../freescale/imx/std.imx6" -options HZ=500 # Scheduling quantum is 2 milliseconds. +options HZ=500 # Scheduling quantum is 2 milliseconds. options SCHED_ULE # ULE scheduler options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking @@ -31,42 +32,57 @@ options SOFTUPDATES # Enable FFS soft options UFS_ACL # Support for access control lists options UFS_DIRHASH # Improve performance on big directories options UFS_GJOURNAL # Enable gjournal-based UFS journaling -#options MD_ROOT # MD is a potential root device +options QUOTA # Enable disk quotas for UFS options NFSCL # New Network Filesystem Client #options NFSD # New Network Filesystem Server options NFSLOCKD # Network Lock Manager options NFS_ROOT # NFS usable as /, requires NFSCL -options TMPFS # Efficient memory filesystem options MSDOSFS # MSDOS Filesystem options CD9660 # ISO 9660 Filesystem -#options PROCFS # Process filesystem (requires PSEUDOFS) +options PROCFS # Process filesystem (requires PSEUDOFS) options PSEUDOFS # Pseudo-filesystem framework +options TMPFS # Efficient memory filesystem +options GEOM_PART_GPT # GUID Partition Tables options GEOM_PART_BSD # BSD partition scheme options GEOM_PART_MBR # MBR partition scheme -options GEOM_PART_GPT # GUID Partition Tables. options GEOM_LABEL # Provides labelization options KTRACE # ktrace(1) support options SYSVSHM # SYSV-style shared memory options SYSVMSG # SYSV-style message queues options SYSVSEM # SYSV-style semaphores options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions +options KBD_INSTALL_CDEV # install a CDEV entry in /dev options INCLUDE_CONFIG_FILE # Include this file in kernel +options FREEBSD_BOOT_LOADER # Process metadata passed from loader(8) +options VFP # Enable floating point hardware support +options SMP # Enable multiple cores -# Debugging support. Always need this: -options KDB # Enable kernel debugger support. -# For minimum debugger support use KDB_TRACE, for interactive use DDB. -#options KDB_TRACE # Print a stack trace for a panic. -options DDB # Support DDB. +# Debugging for use in -current +makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols +options KDB # Enable kernel debugger support +# For minimum debugger support (stable branch) use: +#options KDB_TRACE # Print a stack trace for a panic # For full debugger support use this instead: +options DDB # Enable the kernel debugger #options GDB # Support remote GDB. # Other debugging options... -makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols options ALT_BREAK_TO_DEBUGGER # Use to enter debugger. -#options DEBUG #options DEADLKRES # Enable the deadlock resolver #options INVARIANTS # Enable calls of extra sanity checking #options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS #options WITNESS # Enable checks to detect deadlocks and cycles +#options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed +#options DIAGNOSTIC + +# NFS root from boopt/dhcp +#options BOOTP +#options BOOTP_NFSROOT +#options BOOTP_COMPAT +#options BOOTP_NFSV3 +#options BOOTP_WIRED_TO=ffec0 + +# U-Boot stuff lives on slice 1, FreeBSD on slice 2. +options ROOTDEVNAME=\"ufs:mmcsd0s2a\" # Pseudo devices. device loop # Network loopback @@ -134,21 +150,8 @@ device u3g # USB modems #options SC_DFLT_FONT # compile font in #makeoptions SC_DFLT_FONT=cp437 -# required for netbooting -#options BOOTP -#options BOOTP_COMPAT -#options BOOTP_NFSROOT -#options BOOTP_NFSV3 -#options BOOTP_WIRED_TO=ffec0 - -# U-Boot stuff lives on slice 1, FreeBSD on slice 2. -options ROOTDEVNAME=\"ufs:mmcsd0s2a\" - -# ARM and SoC-specific options -options FDT # Configure using FDT/DTB data. -options SMP # Enable multiple cores -options VFP # Enable floating point hardware support -options FREEBSD_BOOT_LOADER # Process metadata passed from loader(8) +# Flattened Device Tree +options FDT # Configure using FDT/DTB data # SoC-specific devices device ffec # Freescale Fast Ethernet Controller Modified: head/sys/arm/conf/PANDABOARD ============================================================================== --- head/sys/arm/conf/PANDABOARD Sun Dec 21 11:33:18 2014 (r276002) +++ head/sys/arm/conf/PANDABOARD Sun Dec 21 11:37:00 2014 (r276003) @@ -1,8 +1,9 @@ +# # PANDABOARD -- Custom configuration for the PandaBoard ARM development # platform, check out www.pandaboard.org # -# For more information on this file, please read the handbook section on -# Kernel Configuration Files: +# For more information on this file, please read the config(5) manual page, +# and/or the handbook section on Kernel Configuration Files: # # http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html # @@ -28,44 +29,53 @@ hints "PANDABOARD.hints" include "../ti/omap4/pandaboard/std.pandaboard" -#To statically compile in device wiring instead of /boot/device.hints makeoptions MODULES_OVERRIDE="" -makeoptions WITHOUT_MODULES="ahc" +makeoptions WITHOUT_MODULES="ahc" options HZ=100 options SCHED_4BSD # 4BSD scheduler +options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols +options SCTP # Stream Control Transmission Protocol options FFS # Berkeley Fast Filesystem options SOFTUPDATES # Enable FFS soft updates support options UFS_ACL # Support for access control lists options UFS_DIRHASH # Improve performance on big directories -options GEOM_PART_BSD # BSD partition scheme -options GEOM_PART_MBR # MBR partition scheme -options TMPFS # Efficient memory filesystem +options UFS_GJOURNAL # Enable gjournal-based UFS journaling +options QUOTA # Enable disk quotas for UFS +options NFSCL # New Network Filesystem Client +options NFSLOCKD # Network Lock Manager +options NFS_ROOT # NFS usable as /, requires NFSCL options MSDOSFS # MSDOS Filesystem options CD9660 # ISO 9660 Filesystem options PROCFS # Process filesystem (requires PSEUDOFS) options PSEUDOFS # Pseudo-filesystem framework +options TMPFS # Efficient memory filesystem +options GEOM_PART_GPT # GUID Partition Tables +options GEOM_PART_BSD # BSD partition scheme +options GEOM_PART_MBR # MBR partition scheme options COMPAT_43 # Compatible with BSD 4.3 [KEEP THIS!] options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI options KTRACE # ktrace(1) support options SYSVSHM # SYSV-style shared memory options SYSVMSG # SYSV-style message queues options SYSVSEM # SYSV-style semaphores -options _KPOSIX_PRIORITY_SCHEDULING # Posix P1003_1B real-time extensions +options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions options KBD_INSTALL_CDEV # install a CDEV entry in /dev -options PREEMPTION options PLATFORM -options FREEBSD_BOOT_LOADER -options VFP # vfp/neon -options SMP # Enable multiple cores +options FREEBSD_BOOT_LOADER # Process metadata passed from loader(8) +options VFP # Enable floating point hardware support +options SMP # Enable multiple cores # Debugging for use in -current makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols options BREAK_TO_DEBUGGER #options VERBOSE_SYSINIT # Enable verbose sysinit messages -options KDB *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Dec 21 11:55:47 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 524229F0; Sun, 21 Dec 2014 11:55:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3DDE23083; Sun, 21 Dec 2014 11:55:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBLBtlat083843; Sun, 21 Dec 2014 11:55:47 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBLBtfL4083815; Sun, 21 Dec 2014 11:55:41 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201412211155.sBLBtfL4083815@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sun, 21 Dec 2014 11:55:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276004 - head/sys/arm/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2014 11:55:47 -0000 Author: andrew Date: Sun Dec 21 11:55:40 2014 New Revision: 276004 URL: https://svnweb.freebsd.org/changeset/base/276004 Log: Fix the indentation to simplify comparing the ARM config files. Modified: head/sys/arm/conf/APALIS-IMX6 head/sys/arm/conf/BEAGLEBONE head/sys/arm/conf/CHROMEBOOK-PEACH-PIT head/sys/arm/conf/CNS11XXNAS head/sys/arm/conf/CUBIEBOARD head/sys/arm/conf/CUBIEBOARD2 head/sys/arm/conf/DIGI-CCWMX53 head/sys/arm/conf/DOCKSTAR head/sys/arm/conf/DREAMPLUG-1001 head/sys/arm/conf/EFIKA_MX head/sys/arm/conf/EXYNOS5.common head/sys/arm/conf/HL201 head/sys/arm/conf/IMX53 head/sys/arm/conf/IMX53-QSB head/sys/arm/conf/IMX6 head/sys/arm/conf/RK3188 head/sys/arm/conf/SAM9260EK head/sys/arm/conf/VERSATILEPB head/sys/arm/conf/VYBRID head/sys/arm/conf/WANDBOARD-DUAL head/sys/arm/conf/WANDBOARD-QUAD head/sys/arm/conf/WANDBOARD-SOLO Modified: head/sys/arm/conf/APALIS-IMX6 ============================================================================== --- head/sys/arm/conf/APALIS-IMX6 Sun Dec 21 11:37:00 2014 (r276003) +++ head/sys/arm/conf/APALIS-IMX6 Sun Dec 21 11:55:40 2014 (r276004) @@ -26,6 +26,6 @@ makeoptions MODULES_OVERRIDE="" makeoptions WITHOUT_MODULES="ahc" # Flattened Device Tree -options FDT -options FDT_DTB_STATIC -makeoptions FDT_DTS_FILE=apalis-imx6.dts +options FDT +options FDT_DTB_STATIC +makeoptions FDT_DTS_FILE=apalis-imx6.dts Modified: head/sys/arm/conf/BEAGLEBONE ============================================================================== --- head/sys/arm/conf/BEAGLEBONE Sun Dec 21 11:37:00 2014 (r276003) +++ head/sys/arm/conf/BEAGLEBONE Sun Dec 21 11:55:40 2014 (r276004) @@ -78,7 +78,7 @@ options WITNESS_SKIPSPIN # Don't run wi #options DIAGNOSTIC # NFS server support -#options NFSD +#options NFSD # NFS root from boopt/dhcp #options BOOTP Modified: head/sys/arm/conf/CHROMEBOOK-PEACH-PIT ============================================================================== --- head/sys/arm/conf/CHROMEBOOK-PEACH-PIT Sun Dec 21 11:37:00 2014 (r276003) +++ head/sys/arm/conf/CHROMEBOOK-PEACH-PIT Sun Dec 21 11:55:40 2014 (r276004) @@ -33,15 +33,15 @@ device kbdmux device ukbd # Uncomment this for NFS root -#options NFS_ROOT # NFS usable as /, requires NFSCL -#options BOOTP_NFSROOT -#options BOOTP_COMPAT -#options BOOTP -#options BOOTP_NFSV3 -#options BOOTP_WIRED_TO=ue0 -#options ROOTDEVNAME=\"nfs:10.5.0.1:/tftpboot/root\" +#options NFS_ROOT # NFS usable as /, requires NFSCL +#options BOOTP_NFSROOT +#options BOOTP_COMPAT +#options BOOTP +#options BOOTP_NFSV3 +#options BOOTP_WIRED_TO=ue0 +#options ROOTDEVNAME=\"nfs:10.5.0.1:/tftpboot/root\" #FDT -options FDT -options FDT_DTB_STATIC +options FDT +options FDT_DTB_STATIC makeoptions FDT_DTS_FILE=exynos5420-peach-pit.dts Modified: head/sys/arm/conf/CNS11XXNAS ============================================================================== --- head/sys/arm/conf/CNS11XXNAS Sun Dec 21 11:37:00 2014 (r276003) +++ head/sys/arm/conf/CNS11XXNAS Sun Dec 21 11:55:40 2014 (r276004) @@ -103,7 +103,7 @@ device bpf device loop device md -device random # Entropy device +device random # Entropy device device usb @@ -114,12 +114,12 @@ device umass device scbus # SCSI bus (required for ATA/SCSI) device da # Direct Access (disks) device pass -device cfi +device cfi #device udav # Davicom DM9601E USB device geom_label device geom_journal -device geom_part_bsd +device geom_part_bsd options ROOTDEVNAME=\"ufs:da0s1a\" Modified: head/sys/arm/conf/CUBIEBOARD ============================================================================== --- head/sys/arm/conf/CUBIEBOARD Sun Dec 21 11:37:00 2014 (r276003) +++ head/sys/arm/conf/CUBIEBOARD Sun Dec 21 11:55:40 2014 (r276004) @@ -92,7 +92,7 @@ options ROOTDEVNAME=\"ufs:/dev/da0s2\" # ATA controllers #device ahci # AHCI-compatible SATA controllers #device ata # Legacy ATA/SATA controllers -#options ATA_STATIC_ID # Static device numbering +#options ATA_STATIC_ID # Static device numbering # Console and misc device uart Modified: head/sys/arm/conf/CUBIEBOARD2 ============================================================================== --- head/sys/arm/conf/CUBIEBOARD2 Sun Dec 21 11:37:00 2014 (r276003) +++ head/sys/arm/conf/CUBIEBOARD2 Sun Dec 21 11:55:40 2014 (r276004) @@ -93,7 +93,7 @@ options ROOTDEVNAME=\"ufs:/dev/da0s2\" # ATA controllers #device ahci # AHCI-compatible SATA controllers #device ata # Legacy ATA/SATA controllers -#options ATA_STATIC_ID # Static device numbering +#options ATA_STATIC_ID # Static device numbering # Console and misc device uart Modified: head/sys/arm/conf/DIGI-CCWMX53 ============================================================================== --- head/sys/arm/conf/DIGI-CCWMX53 Sun Dec 21 11:37:00 2014 (r276003) +++ head/sys/arm/conf/DIGI-CCWMX53 Sun Dec 21 11:55:40 2014 (r276004) @@ -22,7 +22,7 @@ include "IMX53" ident DIGI-CCWMX53 -makeoptions WITHOUT_MODULES="ahc" +makeoptions WITHOUT_MODULES="ahc" # required for netbooting #options BOOTP @@ -34,5 +34,5 @@ makeoptions WITHOUT_MODULES="ahc" #options ROOTDEVNAME=\"ufs:ada0s2a\" # Flattened Device Tree -options FDT_DTB_STATIC -makeoptions FDT_DTS_FILE=digi-ccwmx53.dts +options FDT_DTB_STATIC +makeoptions FDT_DTS_FILE=digi-ccwmx53.dts Modified: head/sys/arm/conf/DOCKSTAR ============================================================================== --- head/sys/arm/conf/DOCKSTAR Sun Dec 21 11:37:00 2014 (r276003) +++ head/sys/arm/conf/DOCKSTAR Sun Dec 21 11:55:40 2014 (r276004) @@ -54,15 +54,15 @@ options FDT_DTB_STATIC # Misc pseudo devices device bpf # Required for DHCP -device firmware # firmware(9) required for USB wlan -device gif # IPv6 and IPv4 tunneling +device firmware # firmware(9) required for USB wlan +device gif # IPv6 and IPv4 tunneling device loop # Network loopback -device md # Memory/malloc disk +device md # Memory/malloc disk device pty # BSD-style compatibility pseudo ttys device random # Entropy device -device tun # Packet tunnel. +device tun # Packet tunnel. device ether # Required for all ethernet devices -device vlan # 802.1Q VLAN support +device vlan # 802.1Q VLAN support device wlan # 802.11 WLAN support # cam support for umass and ahci @@ -80,66 +80,66 @@ device e1000phy # USB options USB_HOST_ALIGN=32 # Align DMA to cacheline -#options USB_DEBUG # Compile in USB debug support -device usb # Basic usb support -device ehci # USB host controller -device umass # Mass storage -device uhid # Human-interface devices -device rum # Ralink Technology RT2501USB wireless NICs -device uath # Atheros AR5523 wireless NICs -device ural # Ralink Technology RT2500USB wireless NICs -device zyd # ZyDAS zb1211/zb1211b wireless NICs -device urtw # Realtek RTL8187B/L USB -device upgt # Conexant/Intersil PrismGT SoftMAC USB -device u3g # USB-based 3G modems (Option, Huawei, Sierra) +#options USB_DEBUG # Compile in USB debug support +device usb # Basic usb support +device ehci # USB host controller +device umass # Mass storage +device uhid # Human-interface devices +device rum # Ralink Technology RT2501USB wireless NICs +device uath # Atheros AR5523 wireless NICs +device ural # Ralink Technology RT2500USB wireless NICs +device zyd # ZyDAS zb1211/zb1211b wireless NICs +device urtw # Realtek RTL8187B/L USB +device upgt # Conexant/Intersil PrismGT SoftMAC USB +device u3g # USB-based 3G modems (Option, Huawei, Sierra) # I2C (TWSI) device iic device iicbus # Sound -device sound -device snd_uaudio +device sound +device snd_uaudio #crypto -device cesa # Marvell security engine -device crypto -device cryptodev +device cesa # Marvell security engine +device crypto +device cryptodev # IPSec -device enc -options IPSEC -options IPSEC_NAT_T -options TCP_SIGNATURE # include support for RFC 2385 +device enc +options IPSEC +options IPSEC_NAT_T +options TCP_SIGNATURE # include support for RFC 2385 # IPFW -options IPFIREWALL -options IPFIREWALL_DEFAULT_TO_ACCEPT -options IPFIREWALL_VERBOSE -options IPFIREWALL_VERBOSE_LIMIT=100 -options IPFIREWALL_NAT -options LIBALIAS -options DUMMYNET -options IPDIVERT +options IPFIREWALL +options IPFIREWALL_DEFAULT_TO_ACCEPT +options IPFIREWALL_VERBOSE +options IPFIREWALL_VERBOSE_LIMIT=100 +options IPFIREWALL_NAT +options LIBALIAS +options DUMMYNET +options IPDIVERT #PF -device pf -device pflog -device pfsync +device pf +device pflog +device pfsync # ALTQ, required for PF -options ALTQ # Basic ALTQ support -options ALTQ_CBQ # Class Based Queueing -options ALTQ_RED # Random Early Detection -options ALTQ_RIO # RED In/Out -options ALTQ_HFSC # Hierarchical Packet Scheduler -options ALTQ_CDNR # Traffic conditioner -options ALTQ_PRIQ # Priority Queueing -options ALTQ_NOPCC # Required if the TSC is unusable +options ALTQ # Basic ALTQ support +options ALTQ_CBQ # Class Based Queueing +options ALTQ_RED # Random Early Detection +options ALTQ_RIO # RED In/Out +options ALTQ_HFSC # Hierarchical Packet Scheduler +options ALTQ_CDNR # Traffic conditioner +options ALTQ_PRIQ # Priority Queueing +options ALTQ_NOPCC # Required if the TSC is unusable #options ALTQ_DEBUG # Debugging -makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols +makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols options BREAK_TO_DEBUGGER options ALT_BREAK_TO_DEBUGGER options DDB Modified: head/sys/arm/conf/DREAMPLUG-1001 ============================================================================== --- head/sys/arm/conf/DREAMPLUG-1001 Sun Dec 21 11:37:00 2014 (r276003) +++ head/sys/arm/conf/DREAMPLUG-1001 Sun Dec 21 11:55:40 2014 (r276004) @@ -57,22 +57,22 @@ options FDT_DTB_STATIC # Misc pseudo devices device bpf # Required for DHCP -device firmware # firmware(9) required for USB wlan -device gif # IPv6 and IPv4 tunneling +device firmware # firmware(9) required for USB wlan +device gif # IPv6 and IPv4 tunneling device loop # Network loopback -device md # Memory/malloc disk +device md # Memory/malloc disk device pty # BSD-style compatibility pseudo ttys device random # Entropy device -device tun # Packet tunnel. +device tun # Packet tunnel. device ether # Required for all ethernet devices -device vlan # 802.1Q VLAN support +device vlan # 802.1Q VLAN support device wlan # 802.11 WLAN support # cam support for umass and ahci device scbus device pass device da -device cd +device cd # Serial ports device uart @@ -84,18 +84,18 @@ device e1000phy # USB options USB_HOST_ALIGN=32 # Align DMA to cacheline -#options USB_DEBUG # Compile in USB debug support -device usb # Basic usb support -device ehci # USB host controller -device umass # Mass storage -device uhid # Human-interface devices -device rum # Ralink Technology RT2501USB wireless NICs -device uath # Atheros AR5523 wireless NICs -device ural # Ralink Technology RT2500USB wireless NICs -device zyd # ZyDAS zb1211/zb1211b wireless NICs -device urtw # Realtek RTL8187B/L USB -device upgt # Conexant/Intersil PrismGT SoftMAC USB -device u3g # USB-based 3G modems (Option, Huawei, Sierra) +#options USB_DEBUG # Compile in USB debug support +device usb # Basic usb support +device ehci # USB host controller +device umass # Mass storage +device uhid # Human-interface devices +device rum # Ralink Technology RT2501USB wireless NICs +device uath # Atheros AR5523 wireless NICs +device ural # Ralink Technology RT2500USB wireless NICs +device zyd # ZyDAS zb1211/zb1211b wireless NICs +device urtw # Realtek RTL8187B/L USB +device upgt # Conexant/Intersil PrismGT SoftMAC USB +device u3g # USB-based 3G modems (Option, Huawei, Sierra) # I2C (TWSI) device iic @@ -106,48 +106,48 @@ device mvs device ahci # Sound -device sound -device snd_uaudio +device sound +device snd_uaudio #crypto -device cesa # Marvell security engine -device crypto -device cryptodev +device cesa # Marvell security engine +device crypto +device cryptodev # IPSec -device enc -options IPSEC -options IPSEC_NAT_T -options TCP_SIGNATURE # include support for RFC 2385 +device enc +options IPSEC +options IPSEC_NAT_T +options TCP_SIGNATURE # include support for RFC 2385 # IPFW -options IPFIREWALL -options IPFIREWALL_DEFAULT_TO_ACCEPT -options IPFIREWALL_VERBOSE -options IPFIREWALL_VERBOSE_LIMIT=100 -options IPFIREWALL_NAT -options LIBALIAS -options DUMMYNET -options IPDIVERT +options IPFIREWALL +options IPFIREWALL_DEFAULT_TO_ACCEPT +options IPFIREWALL_VERBOSE +options IPFIREWALL_VERBOSE_LIMIT=100 +options IPFIREWALL_NAT +options LIBALIAS +options DUMMYNET +options IPDIVERT #PF -device pf -device pflog -device pfsync +device pf +device pflog +device pfsync # ALTQ, required for PF -options ALTQ # Basic ALTQ support -options ALTQ_CBQ # Class Based Queueing -options ALTQ_RED # Random Early Detection -options ALTQ_RIO # RED In/Out -options ALTQ_HFSC # Hierarchical Packet Scheduler -options ALTQ_CDNR # Traffic conditioner -options ALTQ_PRIQ # Priority Queueing -options ALTQ_NOPCC # Required if the TSC is unusable +options ALTQ # Basic ALTQ support +options ALTQ_CBQ # Class Based Queueing +options ALTQ_RED # Random Early Detection +options ALTQ_RIO # RED In/Out +options ALTQ_HFSC # Hierarchical Packet Scheduler +options ALTQ_CDNR # Traffic conditioner +options ALTQ_PRIQ # Priority Queueing +options ALTQ_NOPCC # Required if the TSC is unusable #options ALTQ_DEBUG # Debugging -makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols +makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols options BREAK_TO_DEBUGGER options ALT_BREAK_TO_DEBUGGER options DDB @@ -178,7 +178,7 @@ options ROOTDEVNAME=\"ufs:/dev/da1s1a\" # create a kernel config file that looks like this: # # include DREAMPLUG-1001 -# nomakeoptions FDT_DTS_FILE +# nomakeoptions FDT_DTS_FILE # makeoptions FDT_DTS_FILE=dreamplug-1001N.dts # device nand Modified: head/sys/arm/conf/EFIKA_MX ============================================================================== --- head/sys/arm/conf/EFIKA_MX Sun Dec 21 11:37:00 2014 (r276003) +++ head/sys/arm/conf/EFIKA_MX Sun Dec 21 11:55:40 2014 (r276004) @@ -22,7 +22,7 @@ ident EFIKA_MX include "../freescale/imx/std.imx51" -makeoptions WITHOUT_MODULES="ahc" +makeoptions WITHOUT_MODULES="ahc" options SCHED_4BSD # 4BSD scheduler options PREEMPTION # Enable kernel thread preemption @@ -174,7 +174,7 @@ makeoptions FDT_DTS_FILE=efikamx.dts # Uncomment following lines for framebuffer/syscons support device sc device kbdmux -options SC_DFLT_FONT # compile font in -makeoptions SC_DFLT_FONT=cp437 +options SC_DFLT_FONT # compile font in +makeoptions SC_DFLT_FONT=cp437 device ukbd # Allow keyboard like HIDs to control console device ums Modified: head/sys/arm/conf/EXYNOS5.common ============================================================================== --- head/sys/arm/conf/EXYNOS5.common Sun Dec 21 11:37:00 2014 (r276003) +++ head/sys/arm/conf/EXYNOS5.common Sun Dec 21 11:55:40 2014 (r276004) @@ -99,8 +99,8 @@ device gpio options USB_HOST_ALIGN=64 # Align usb buffers to cache line size. device usb options USB_DEBUG -#options USB_REQ_DEBUG -#options USB_VERBOSE +#options USB_REQ_DEBUG +#options USB_VERBOSE #device musb device ehci #device ohci Modified: head/sys/arm/conf/HL201 ============================================================================== --- head/sys/arm/conf/HL201 Sun Dec 21 11:37:00 2014 (r276003) +++ head/sys/arm/conf/HL201 Sun Dec 21 11:55:40 2014 (r276004) @@ -143,5 +143,5 @@ options FDT_DTB_STATIC makeoptions FDT_DTS_FILE=hl201.dts options EARLY_PRINTF -options SOCDEV_PA=0xfc000000 +options SOCDEV_PA=0xfc000000 options SOCDEV_VA=0xdc000000 Modified: head/sys/arm/conf/IMX53 ============================================================================== --- head/sys/arm/conf/IMX53 Sun Dec 21 11:37:00 2014 (r276003) +++ head/sys/arm/conf/IMX53 Sun Dec 21 11:55:40 2014 (r276004) @@ -169,5 +169,5 @@ options FDT # Configure using FDT/DTB #device sc #device vt #device kbdmux -#options SC_DFLT_FONT # compile font in -#makeoptions SC_DFLT_FONT=cp437 +#options SC_DFLT_FONT # compile font in +#makeoptions SC_DFLT_FONT=cp437 Modified: head/sys/arm/conf/IMX53-QSB ============================================================================== --- head/sys/arm/conf/IMX53-QSB Sun Dec 21 11:37:00 2014 (r276003) +++ head/sys/arm/conf/IMX53-QSB Sun Dec 21 11:55:40 2014 (r276004) @@ -34,5 +34,5 @@ options HZ=250 # 4ms scheduling quant #options ROOTDEVNAME=\"ufs:ada0s2a\" # Flattened Device Tree -options FDT_DTB_STATIC -makeoptions FDT_DTS_FILE=imx53-qsb.dts +options FDT_DTB_STATIC +makeoptions FDT_DTS_FILE=imx53-qsb.dts Modified: head/sys/arm/conf/IMX6 ============================================================================== --- head/sys/arm/conf/IMX6 Sun Dec 21 11:37:00 2014 (r276003) +++ head/sys/arm/conf/IMX6 Sun Dec 21 11:55:40 2014 (r276004) @@ -97,7 +97,7 @@ device miibus # Required for ethernet device bpf # Berkeley packet filter (required for DHCP) # General-purpose input/output -device gpio +device gpio # Serial (COM) ports device uart # Multi-uart driver Modified: head/sys/arm/conf/RK3188 ============================================================================== --- head/sys/arm/conf/RK3188 Sun Dec 21 11:37:00 2014 (r276003) +++ head/sys/arm/conf/RK3188 Sun Dec 21 11:55:40 2014 (r276004) @@ -115,10 +115,10 @@ device mii device bpf # Wireless NIC cards -options IEEE80211_DEBUG -options IEEE80211_AMPDU_AGE -options IEEE80211_SUPPORT_MESH -options IEEE80211_SUPPORT_TDMA +options IEEE80211_DEBUG +options IEEE80211_AMPDU_AGE +options IEEE80211_SUPPORT_MESH +options IEEE80211_SUPPORT_TDMA device wlan # 802.11 support device wlan_wep # 802.11 WEP support device wlan_ccmp # 802.11 CCMP support Modified: head/sys/arm/conf/SAM9260EK ============================================================================== --- head/sys/arm/conf/SAM9260EK Sun Dec 21 11:37:00 2014 (r276003) +++ head/sys/arm/conf/SAM9260EK Sun Dec 21 11:55:40 2014 (r276004) @@ -180,5 +180,5 @@ device nand # NAND interface on CS3 #makeoptions FDT_DTS_FILE=sam9260ek.dts options EARLY_PRINTF -options SOCDEV_PA=0xfc000000 +options SOCDEV_PA=0xfc000000 options SOCDEV_VA=0xdc000000 Modified: head/sys/arm/conf/VERSATILEPB ============================================================================== --- head/sys/arm/conf/VERSATILEPB Sun Dec 21 11:37:00 2014 (r276003) +++ head/sys/arm/conf/VERSATILEPB Sun Dec 21 11:55:40 2014 (r276004) @@ -106,8 +106,8 @@ device pass # Passthrough device (dir # Comment following lines for headless setup device sc device kbdmux -options SC_DFLT_FONT # compile font in -makeoptions SC_DFLT_FONT=cp437 +options SC_DFLT_FONT # compile font in +makeoptions SC_DFLT_FONT=cp437 device md device random # Entropy device Modified: head/sys/arm/conf/VYBRID ============================================================================== --- head/sys/arm/conf/VYBRID Sun Dec 21 11:37:00 2014 (r276003) +++ head/sys/arm/conf/VYBRID Sun Dec 21 11:55:40 2014 (r276004) @@ -110,8 +110,8 @@ device gpio options USB_HOST_ALIGN=32 # Align usb buffers to cache line size. device usb options USB_DEBUG -#options USB_REQ_DEBUG -#options USB_VERBOSE +#options USB_REQ_DEBUG +#options USB_VERBOSE #device musb device ehci #device ohci Modified: head/sys/arm/conf/WANDBOARD-DUAL ============================================================================== --- head/sys/arm/conf/WANDBOARD-DUAL Sun Dec 21 11:37:00 2014 (r276003) +++ head/sys/arm/conf/WANDBOARD-DUAL Sun Dec 21 11:55:40 2014 (r276004) @@ -23,6 +23,6 @@ include "IMX6" ident WANDBOARD-DUAL # Flattened Device Tree -options FDT_DTB_STATIC -makeoptions FDT_DTS_FILE=wandboard-dual.dts +options FDT_DTB_STATIC +makeoptions FDT_DTS_FILE=wandboard-dual.dts Modified: head/sys/arm/conf/WANDBOARD-QUAD ============================================================================== --- head/sys/arm/conf/WANDBOARD-QUAD Sun Dec 21 11:37:00 2014 (r276003) +++ head/sys/arm/conf/WANDBOARD-QUAD Sun Dec 21 11:55:40 2014 (r276004) @@ -23,6 +23,6 @@ include "IMX6" ident WANDBOARD-QUAD # Flattened Device Tree -options FDT_DTB_STATIC -makeoptions FDT_DTS_FILE=wandboard-quad.dts +options FDT_DTB_STATIC +makeoptions FDT_DTS_FILE=wandboard-quad.dts Modified: head/sys/arm/conf/WANDBOARD-SOLO ============================================================================== --- head/sys/arm/conf/WANDBOARD-SOLO Sun Dec 21 11:37:00 2014 (r276003) +++ head/sys/arm/conf/WANDBOARD-SOLO Sun Dec 21 11:55:40 2014 (r276004) @@ -23,6 +23,6 @@ include "IMX6" ident WANDBOARD-SOLO # Flattened Device Tree -options FDT_DTB_STATIC -makeoptions FDT_DTS_FILE=wandboard-solo.dts +options FDT_DTB_STATIC +makeoptions FDT_DTS_FILE=wandboard-solo.dts From owner-svn-src-all@FreeBSD.ORG Sun Dec 21 12:13:51 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4CABAE61; Sun, 21 Dec 2014 12:13:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1E9A03282; Sun, 21 Dec 2014 12:13:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBLCDoNc092964; Sun, 21 Dec 2014 12:13:50 GMT (envelope-from brueffer@FreeBSD.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBLCDnfR092957; Sun, 21 Dec 2014 12:13:49 GMT (envelope-from brueffer@FreeBSD.org) Message-Id: <201412211213.sBLCDnfR092957@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: brueffer set sender to brueffer@FreeBSD.org using -f From: Christian Brueffer Date: Sun, 21 Dec 2014 12:13:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276005 - head/share/man/man5 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2014 12:13:51 -0000 Author: brueffer Date: Sun Dec 21 12:13:49 2014 New Revision: 276005 URL: https://svnweb.freebsd.org/changeset/base/276005 Log: Various mdoc fixes. Found with: mandoc -Tlint Modified: head/share/man/man5/periodic.conf.5 head/share/man/man5/pf.conf.5 head/share/man/man5/pf.os.5 head/share/man/man5/rc.conf.5 head/share/man/man5/services.5 Modified: head/share/man/man5/periodic.conf.5 ============================================================================== --- head/share/man/man5/periodic.conf.5 Sun Dec 21 11:55:40 2014 (r276004) +++ head/share/man/man5/periodic.conf.5 Sun Dec 21 12:13:49 2014 (r276005) @@ -705,7 +705,7 @@ they will be always run unless their or .Va ..._period variable is set to -.Dq No . +.Dq NO . .Bl -tag -offset 4n -width 2n .It Va security_status_diff_flags .Pq Vt str Modified: head/share/man/man5/pf.conf.5 ============================================================================== --- head/share/man/man5/pf.conf.5 Sun Dec 21 11:55:40 2014 (r276004) +++ head/share/man/man5/pf.conf.5 Sun Dec 21 12:13:49 2014 (r276005) @@ -28,7 +28,7 @@ .\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd June 29 2012 +.Dd June 29, 2012 .Dt PF.CONF 5 .Os .Sh NAME Modified: head/share/man/man5/pf.os.5 ============================================================================== --- head/share/man/man5/pf.os.5 Sun Dec 21 11:55:40 2014 (r276004) +++ head/share/man/man5/pf.os.5 Sun Dec 21 12:13:49 2014 (r276005) @@ -16,7 +16,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 31 2007 +.Dd May 31, 2007 .Dt PF.OS 5 .Os .Sh NAME @@ -217,7 +217,7 @@ almost translates into the following fin 57344:64:1:44:M1460: exampleOS:1.0::exampleOS 1.0 .Ed .Sh SEE ALSO +.Xr tcpdump 1 , .Xr pf 4 , .Xr pf.conf 5 , -.Xr pfctl 8 , -.Xr tcpdump 1 +.Xr pfctl 8 Modified: head/share/man/man5/rc.conf.5 ============================================================================== --- head/share/man/man5/rc.conf.5 Sun Dec 21 11:55:40 2014 (r276004) +++ head/share/man/man5/rc.conf.5 Sun Dec 21 12:13:49 2014 (r276005) @@ -4547,9 +4547,9 @@ ruleset to load for .Xr rfcomm_pppd 8 , .Xr route 8 , .Xr routed 8 , -.Xr rpcbind 8 , .Xr rpc.lockd 8 , .Xr rpc.statd 8 , +.Xr rpcbind 8 , .Xr rwhod 8 , .Xr savecore 8 , .Xr sdpd 8 , Modified: head/share/man/man5/services.5 ============================================================================== --- head/share/man/man5/services.5 Sun Dec 21 11:55:40 2014 (r276004) +++ head/share/man/man5/services.5 Sun Dec 21 12:13:49 2014 (r276005) @@ -91,8 +91,8 @@ file resides in .Pa /etc . .El .Sh SEE ALSO -.Xr getservent 3 -.Xr nsswitch.conf 5 +.Xr getservent 3 , +.Xr nsswitch.conf 5 , .Xr services_mkdb 8 .Sh HISTORY The From owner-svn-src-all@FreeBSD.ORG Sun Dec 21 12:36:44 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E445C2F7; Sun, 21 Dec 2014 12:36:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CE50F39C5; Sun, 21 Dec 2014 12:36:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBLCahh7002959; Sun, 21 Dec 2014 12:36:43 GMT (envelope-from brueffer@FreeBSD.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBLCabNR002930; Sun, 21 Dec 2014 12:36:37 GMT (envelope-from brueffer@FreeBSD.org) Message-Id: <201412211236.sBLCabNR002930@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: brueffer set sender to brueffer@FreeBSD.org using -f From: Christian Brueffer Date: Sun, 21 Dec 2014 12:36:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276006 - in head/lib/libc: gen net posix1e stdlib string sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2014 12:36:44 -0000 Author: brueffer Date: Sun Dec 21 12:36:36 2014 New Revision: 276006 URL: https://svnweb.freebsd.org/changeset/base/276006 Log: Various mdoc fixes and a few EOL whitespace removals. Found with: mandoc -Tlint Modified: head/lib/libc/gen/cap_rights_get.3 head/lib/libc/gen/ftok.3 head/lib/libc/gen/ftw.3 head/lib/libc/gen/getcap.3 head/lib/libc/gen/posix_spawn.3 head/lib/libc/gen/scandir.3 head/lib/libc/net/getaddrinfo.3 head/lib/libc/net/sctp_recvmsg.3 head/lib/libc/net/sctp_send.3 head/lib/libc/posix1e/acl_set_flagset_np.3 head/lib/libc/stdlib/atexit.3 head/lib/libc/stdlib/exit.3 head/lib/libc/string/strspn.3 head/lib/libc/sys/access.2 head/lib/libc/sys/getdirentries.2 head/lib/libc/sys/getrlimit.2 head/lib/libc/sys/poll.2 head/lib/libc/sys/posix_openpt.2 head/lib/libc/sys/procctl.2 head/lib/libc/sys/revoke.2 head/lib/libc/sys/sched_setscheduler.2 head/lib/libc/sys/sigwaitinfo.2 head/lib/libc/sys/vfork.2 Modified: head/lib/libc/gen/cap_rights_get.3 ============================================================================== --- head/lib/libc/gen/cap_rights_get.3 Sun Dec 21 12:13:49 2014 (r276005) +++ head/lib/libc/gen/cap_rights_get.3 Sun Dec 21 12:36:36 2014 (r276006) @@ -100,10 +100,10 @@ argument points at an invalid address. .El .Sh SEE ALSO .Xr cap_rights_limit 2 , -.Xr cap_rights_init 3 , .Xr errno 2 , .Xr open 2 , .Xr assert 3 , +.Xr cap_rights_init 3 , .Xr err 3 , .Xr memcmp 3 , .Xr memset 3 , Modified: head/lib/libc/gen/ftok.3 ============================================================================== --- head/lib/libc/gen/ftok.3 Sun Dec 21 12:13:49 2014 (r276005) +++ head/lib/libc/gen/ftok.3 Sun Dec 21 12:36:36 2014 (r276006) @@ -64,9 +64,9 @@ function will return -1 if .Fa path does not exist or if it cannot be accessed by the calling process. .Sh SEE ALSO +.Xr msgget 2 , .Xr semget 2 , -.Xr shmget 2 , -.Xr msgget 2 +.Xr shmget 2 .Sh HISTORY The .Fn ftok Modified: head/lib/libc/gen/ftw.3 ============================================================================== --- head/lib/libc/gen/ftw.3 Sun Dec 21 12:13:49 2014 (r276005) +++ head/lib/libc/gen/ftw.3 Sun Dec 21 12:36:36 2014 (r276006) @@ -87,8 +87,9 @@ A directory which cannot be read. The directory will not be descended into. .It Dv FTW_DP A directory being visited in post-order -.Fn ( nftw -only). +.Po Fn nftw +only +.Pc . .It Dv FTW_NS A file for which no .Xr stat 2 @@ -100,8 +101,9 @@ structure are undefined. A symbolic link. .It Dv FTW_SLN A symbolic link with a non-existent target -.Fn ( nftw -only). +.Po Fn nftw +only +.Pc . .El .Pp The Modified: head/lib/libc/gen/getcap.3 ============================================================================== --- head/lib/libc/gen/getcap.3 Sun Dec 21 12:13:49 2014 (r276005) +++ head/lib/libc/gen/getcap.3 Sun Dec 21 12:36:36 2014 (r276006) @@ -137,9 +137,10 @@ It must be called before the call. If a sequential access is being performed (see below), it must be called before the first sequential access call -.Fn ( cgetfirst +.Po Fn cgetfirst or -.Fn cgetnext ) , +.Fn cgetnext +.Pc , or be directly preceded by a .Fn cgetclose call. Modified: head/lib/libc/gen/posix_spawn.3 ============================================================================== --- head/lib/libc/gen/posix_spawn.3 Sun Dec 21 12:13:49 2014 (r276005) +++ head/lib/libc/gen/posix_spawn.3 Sun Dec 21 12:36:36 2014 (r276006) @@ -413,6 +413,10 @@ including trying to close a descriptor t .Xr execve 2 , .Xr fcntl 2 , .Xr open 2 , +.Xr sched_setparam 2 , +.Xr sched_setscheduler 2 , +.Xr setpgid 2 , +.Xr vfork 2 , .Xr posix_spawn_file_actions_addclose 3 , .Xr posix_spawn_file_actions_adddup2 3 , .Xr posix_spawn_file_actions_addopen 3 , @@ -431,11 +435,7 @@ including trying to close a descriptor t .Xr posix_spawnattr_setschedparam 3 , .Xr posix_spawnattr_setschedpolicy 3 , .Xr posix_spawnattr_setsigdefault 3 , -.Xr posix_spawnattr_setsigmask 3 , -.Xr sched_setparam 2 , -.Xr sched_setscheduler 2 , -.Xr setpgid 2 , -.Xr vfork 2 +.Xr posix_spawnattr_setsigmask 3 .Sh STANDARDS The .Fn posix_spawn Modified: head/lib/libc/gen/scandir.3 ============================================================================== --- head/lib/libc/gen/scandir.3 Sun Dec 21 12:13:49 2014 (r276005) +++ head/lib/libc/gen/scandir.3 Sun Dec 21 12:36:36 2014 (r276006) @@ -92,7 +92,7 @@ by freeing each pointer in the array and .Pp The .Fn scandir_b -function behaves in the same way as +function behaves in the same way as .Fn scandir , but takes blocks as arguments instead of function pointers and calls .Fn qsort_b @@ -106,8 +106,8 @@ cannot allocate enough memory to hold al .Xr directory 3 , .Xr malloc 3 , .Xr qsort 3 , -.Xr dir 5 , -.Xr strcoll 3 +.Xr strcoll 3 , +.Xr dir 5 .Sh HISTORY The .Fn scandir Modified: head/lib/libc/net/getaddrinfo.3 ============================================================================== --- head/lib/libc/net/getaddrinfo.3 Sun Dec 21 12:13:49 2014 (r276005) +++ head/lib/libc/net/getaddrinfo.3 Sun Dec 21 12:36:36 2014 (r276006) @@ -237,8 +237,8 @@ pointer in each .Li addrinfo structure until a null pointer is encountered. The three members -.Fa ai_family, -.Fa ai_socktype, +.Fa ai_family , +.Fa ai_socktype , and .Fa ai_protocol in each returned Modified: head/lib/libc/net/sctp_recvmsg.3 ============================================================================== --- head/lib/libc/net/sctp_recvmsg.3 Sun Dec 21 12:13:49 2014 (r276005) +++ head/lib/libc/net/sctp_recvmsg.3 Sun Dec 21 12:36:36 2014 (r276006) @@ -282,12 +282,12 @@ This typically means that the socket is not connected and is a one-to-one style socket. .El .Sh SEE ALSO +.Xr getsockopt 2 , .Xr recv 2 , .Xr select 2 , +.Xr setsockopt 2 , .Xr socket 2 , .Xr write 2 , -.Xr getsockopt 2 , -.Xr setsockopt 2 , .Xr sctp_send 3 , .Xr sctp_sendmsg 3 , .Xr sendmsg 3 , Modified: head/lib/libc/net/sctp_send.3 ============================================================================== --- head/lib/libc/net/sctp_send.3 Sun Dec 21 12:13:49 2014 (r276005) +++ head/lib/libc/net/sctp_send.3 Sun Dec 21 12:36:36 2014 (r276006) @@ -337,7 +337,7 @@ is not connected and is a one-to-one sty .Xr select 2 , .Xr sendmsg 2 , .Xr socket 2 , -.Xr write 2 +.Xr write 2 , .Xr sctp_connectx 3 , .Xr sctp_recvmsg 3 , .Xr sctp_sendmsg 3 , Modified: head/lib/libc/posix1e/acl_set_flagset_np.3 ============================================================================== --- head/lib/libc/posix1e/acl_set_flagset_np.3 Sun Dec 21 12:13:49 2014 (r276005) +++ head/lib/libc/posix1e/acl_set_flagset_np.3 Sun Dec 21 12:36:36 2014 (r276006) @@ -64,9 +64,9 @@ ACL is already branded as POSIX.1e. .Sh SEE ALSO .Xr acl 3 , .Xr acl_add_flag_np 3 , -.Xr acl_get_brand_np 3 , .Xr acl_clear_flags_np 3 , .Xr acl_delete_flag_np 3 , +.Xr acl_get_brand_np 3 , .Xr acl_get_flagset_np 3 , .Xr posix1e 3 .Sh STANDARDS Modified: head/lib/libc/stdlib/atexit.3 ============================================================================== --- head/lib/libc/stdlib/atexit.3 Sun Dec 21 12:13:49 2014 (r276005) +++ head/lib/libc/stdlib/atexit.3 Sun Dec 21 12:36:36 2014 (r276006) @@ -88,12 +88,12 @@ The existing list of functions is unmodi .It Bq Er ENOSYS The .Fn atexit_b -function was called by a program that did not supply a +function was called by a program that did not supply a .Fn _Block_copy implementation. .El .Sh SEE ALSO -.Xr at_quick_exit 3 +.Xr at_quick_exit 3 , .Xr exit 3 .Sh STANDARDS The Modified: head/lib/libc/stdlib/exit.3 ============================================================================== --- head/lib/libc/stdlib/exit.3 Sun Dec 21 12:13:49 2014 (r276005) +++ head/lib/libc/stdlib/exit.3 Sun Dec 21 12:36:36 2014 (r276006) @@ -117,8 +117,8 @@ never return. .Sh SEE ALSO .Xr _exit 2 , .Xr wait 2 , -.Xr atexit 3 , .Xr at_quick_exit 3 , +.Xr atexit 3 , .Xr intro 3 , .Xr quick_exit 3 , .Xr sysexits 3 , Modified: head/lib/libc/string/strspn.3 ============================================================================== --- head/lib/libc/string/strspn.3 Sun Dec 21 12:13:49 2014 (r276005) +++ head/lib/libc/string/strspn.3 Sun Dec 21 12:36:36 2014 (r276006) @@ -71,7 +71,7 @@ spans the initial part of the null-termi .Fa s as long as the characters from .Fa s -.Sy do not +.Sy do not occur in the null-terminated string .Fa charset .Po it spans the Modified: head/lib/libc/sys/access.2 ============================================================================== --- head/lib/libc/sys/access.2 Sun Dec 21 12:13:49 2014 (r276005) +++ head/lib/libc/sys/access.2 Sun Dec 21 12:36:36 2014 (r276006) @@ -136,7 +136,7 @@ and .Fn access , .Fn eaccess , or -.Fn faccessat +.Fn faccessat will fail if: .Bl -tag -width Er .It Bq Er EINVAL Modified: head/lib/libc/sys/getdirentries.2 ============================================================================== --- head/lib/libc/sys/getdirentries.2 Sun Dec 21 12:13:49 2014 (r276005) +++ head/lib/libc/sys/getdirentries.2 Sun Dec 21 12:36:36 2014 (r276006) @@ -134,8 +134,9 @@ The current position pointer should only .Xr lseek 2 , a value returned in the location pointed to by .Fa basep -.Fn ( getdirentries -only) +.Po Fn getdirentries +only +.Pc or zero. .Sh RETURN VALUES If successful, the number of bytes actually transferred is returned. Modified: head/lib/libc/sys/getrlimit.2 ============================================================================== --- head/lib/libc/sys/getrlimit.2 Sun Dec 21 12:13:49 2014 (r276005) +++ head/lib/libc/sys/getrlimit.2 Sun Dec 21 12:36:36 2014 (r276006) @@ -194,8 +194,8 @@ raised the maximum limit value, and the .Xr csh 1 , .Xr quota 1 , .Xr quotactl 2 , -.Xr sigaltstack 2 , .Xr sigaction 2 , +.Xr sigaltstack 2 , .Xr sysctl 3 , .Xr ulimit 3 .Sh HISTORY Modified: head/lib/libc/sys/poll.2 ============================================================================== --- head/lib/libc/sys/poll.2 Sun Dec 21 12:13:49 2014 (r276005) +++ head/lib/libc/sys/poll.2 Sun Dec 21 12:36:36 2014 (r276006) @@ -148,8 +148,8 @@ is zero, then will return without blocking. .Pp The -.Fn ppoll -system call, unlike +.Fn ppoll +system call, unlike .Fn poll , is used to safely wait until either a set of file descriptors becomes ready or until a signal is caught. @@ -174,10 +174,10 @@ used by A null pointer may be passed to indicate that .Fn ppoll should wait indefinitely. -Finally, +Finally, .Fa newsigmask specifies a signal mask which is set while waiting for input. -When +When .Fn ppoll returns, the original signal mask is restored. .Bd -literal @@ -246,11 +246,11 @@ The specified time limit is invalid. One .Xr write 2 .Sh STANDARDS The -.Fn poll +.Fn poll function conforms to .St -p1003.1-2001 . The -.Fn ppoll +.Fn ppoll is not specified by POSIX. .Sh HISTORY The @@ -261,8 +261,8 @@ This manual page and the core of the imp .Nx . The .Fn ppoll -function first appeared in -.Fx 11.0 +function first appeared in +.Fx 11.0 .Sh BUGS The distinction between some of the fields in the .Fa events Modified: head/lib/libc/sys/posix_openpt.2 ============================================================================== --- head/lib/libc/sys/posix_openpt.2 Sun Dec 21 12:13:49 2014 (r276005) +++ head/lib/libc/sys/posix_openpt.2 Sun Dec 21 12:36:36 2014 (r276006) @@ -110,8 +110,8 @@ is not valid. Out of pseudo-terminal resources. .El .Sh SEE ALSO -.Xr pts 4 , .Xr ptsname 3 , +.Xr pts 4 , .Xr tty 4 .Sh STANDARDS The Modified: head/lib/libc/sys/procctl.2 ============================================================================== --- head/lib/libc/sys/procctl.2 Sun Dec 21 12:13:49 2014 (r276005) +++ head/lib/libc/sys/procctl.2 Sun Dec 21 12:36:36 2014 (r276006) @@ -107,7 +107,6 @@ reaper. After the system initialization, .Xr init 8 is the default reaper. -.Pp .It Dv PROC_REAP_RELEASE Releases the reaper state for the current process. The reaper of the current process becomes the new reaper of the @@ -146,6 +145,7 @@ for the specified process id. The specified process is the root of the reaper tree, i.e. .Xr init 8 . .El +.Pp The .Fa rs_children field returns the number of children of the reaper. Modified: head/lib/libc/sys/revoke.2 ============================================================================== --- head/lib/libc/sys/revoke.2 Sun Dec 21 12:13:49 2014 (r276005) +++ head/lib/libc/sys/revoke.2 Sun Dec 21 12:36:36 2014 (r276006) @@ -97,8 +97,8 @@ operation on the named file. The caller is neither the owner of the file nor the super user. .El .Sh SEE ALSO -.Xr close 2 , -.Xr revoke 1 +.Xr revoke 1 , +.Xr close 2 .Sh HISTORY The .Fn revoke Modified: head/lib/libc/sys/sched_setscheduler.2 ============================================================================== --- head/lib/libc/sys/sched_setscheduler.2 Sun Dec 21 12:13:49 2014 (r276005) +++ head/lib/libc/sys/sched_setscheduler.2 Sun Dec 21 12:36:36 2014 (r276006) @@ -151,9 +151,9 @@ argument is invalid, or one or more of t is outside the valid range for the specified scheduling policy. .El .Sh SEE ALSO -.Xr sched_getparam 2 , .Xr sched_get_priority_max 2 , .Xr sched_get_priority_min 2 , +.Xr sched_getparam 2 , .Xr sched_rr_get_interval 2 , .Xr sched_setparam 2 , .Xr sched_yield 2 Modified: head/lib/libc/sys/sigwaitinfo.2 ============================================================================== --- head/lib/libc/sys/sigwaitinfo.2 Sun Dec 21 12:13:49 2014 (r276005) +++ head/lib/libc/sys/sigwaitinfo.2 Sun Dec 21 12:36:36 2014 (r276006) @@ -172,8 +172,8 @@ system calls fail if: .Bl -tag -width Er .It Bq Er EINTR The wait was interrupted by an unblocked, caught signal. -.Pp .El +.Pp The .Fn sigtimedwait system call may also fail if: Modified: head/lib/libc/sys/vfork.2 ============================================================================== --- head/lib/libc/sys/vfork.2 Sun Dec 21 12:13:49 2014 (r276005) +++ head/lib/libc/sys/vfork.2 Sun Dec 21 12:36:36 2014 (r276006) @@ -100,8 +100,8 @@ since buffered data would then be flushe Same as for .Xr fork 2 . .Sh SEE ALSO -.Xr execve 2 , .Xr _exit 2 , +.Xr execve 2 , .Xr fork 2 , .Xr rfork 2 , .Xr sigaction 2 , From owner-svn-src-all@FreeBSD.ORG Sun Dec 21 13:29:36 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F185BB1D; Sun, 21 Dec 2014 13:29:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DB8DB213C; Sun, 21 Dec 2014 13:29:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBLDTZgW026710; Sun, 21 Dec 2014 13:29:35 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBLDTYal026700; Sun, 21 Dec 2014 13:29:34 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201412211329.sBLDTYal026700@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 21 Dec 2014 13:29:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276007 - in head/sys: cddl/contrib/opensolaris/uts/common/fs/zfs fs/ext2fs fs/msdosfs fs/nandfs fs/tmpfs ufs/ufs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2014 13:29:36 -0000 Author: kib Date: Sun Dec 21 13:29:33 2014 New Revision: 276007 URL: https://svnweb.freebsd.org/changeset/base/276007 Log: Handle MAKEENTRY cnp flag in the VOP_CREATE(). Curiously, some fs, e.g. smbfs, already did it. Tested by: pho (previous version) Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c head/sys/fs/ext2fs/ext2_vnops.c head/sys/fs/msdosfs/msdosfs_vnops.c head/sys/fs/nandfs/nandfs_vnops.c head/sys/fs/tmpfs/tmpfs_vnops.c head/sys/ufs/ufs/ufs_vnops.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Sun Dec 21 12:36:36 2014 (r276006) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Sun Dec 21 13:29:33 2014 (r276007) @@ -6180,15 +6180,20 @@ zfs_freebsd_create(ap) { struct componentname *cnp = ap->a_cnp; vattr_t *vap = ap->a_vap; - int mode; + int error, mode; ASSERT(cnp->cn_flags & SAVENAME); vattr_init_mask(vap); mode = vap->va_mode & ALLPERMS; - return (zfs_create(ap->a_dvp, cnp->cn_nameptr, vap, !EXCL, mode, - ap->a_vpp, cnp->cn_cred, cnp->cn_thread)); + error = zfs_create(ap->a_dvp, cnp->cn_nameptr, vap, !EXCL, mode, + ap->a_vpp, cnp->cn_cred, cnp->cn_thread); +#ifdef FREEBSD_NAMECACHE + if (error == 0 && (cnp->cn_flags & MAKEENTRY) != 0) + cache_enter(ap->a_dvp, *ap->a_vpp, cnp); +#endif + return (error); } static int Modified: head/sys/fs/ext2fs/ext2_vnops.c ============================================================================== --- head/sys/fs/ext2fs/ext2_vnops.c Sun Dec 21 12:36:36 2014 (r276006) +++ head/sys/fs/ext2fs/ext2_vnops.c Sun Dec 21 13:29:33 2014 (r276007) @@ -239,8 +239,10 @@ ext2_create(struct vop_create_args *ap) error = ext2_makeinode(MAKEIMODE(ap->a_vap->va_type, ap->a_vap->va_mode), ap->a_dvp, ap->a_vpp, ap->a_cnp); - if (error) + if (error != 0) return (error); + if ((ap->a_cnp->cn_flags & MAKEENTRY) != 0) + cache_enter(ap->a_dvp, *ap->a_vpp, ap->a_cnp); return (0); } Modified: head/sys/fs/msdosfs/msdosfs_vnops.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_vnops.c Sun Dec 21 12:36:36 2014 (r276006) +++ head/sys/fs/msdosfs/msdosfs_vnops.c Sun Dec 21 13:29:33 2014 (r276007) @@ -184,6 +184,8 @@ msdosfs_create(ap) if (error) goto bad; *ap->a_vpp = DETOV(dep); + if ((cnp->cn_flags & MAKEENTRY) != 0) + cache_enter(ap->a_dvp, *ap->a_vpp, cnp); return (0); bad: Modified: head/sys/fs/nandfs/nandfs_vnops.c ============================================================================== --- head/sys/fs/nandfs/nandfs_vnops.c Sun Dec 21 12:36:36 2014 (r276006) +++ head/sys/fs/nandfs/nandfs_vnops.c Sun Dec 21 13:29:33 2014 (r276007) @@ -1411,6 +1411,8 @@ nandfs_create(struct vop_create_args *ap return (error); } *vpp = NTOV(node); + if ((cnp->cn_flags & MAKEENTRY) != 0) + cache_enter(dvp, *vpp, cnp); DPRINTF(VNCALL, ("created file vp %p nandnode %p ino %jx\n", *vpp, node, (uintmax_t)node->nn_ino)); Modified: head/sys/fs/tmpfs/tmpfs_vnops.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_vnops.c Sun Dec 21 12:36:36 2014 (r276006) +++ head/sys/fs/tmpfs/tmpfs_vnops.c Sun Dec 21 13:29:33 2014 (r276007) @@ -213,10 +213,14 @@ tmpfs_create(struct vop_create_args *v) struct vnode **vpp = v->a_vpp; struct componentname *cnp = v->a_cnp; struct vattr *vap = v->a_vap; + int error; MPASS(vap->va_type == VREG || vap->va_type == VSOCK); - return tmpfs_alloc_file(dvp, vpp, vap, cnp, NULL); + error = tmpfs_alloc_file(dvp, vpp, vap, cnp, NULL); + if (error == 0 && (cnp->cn_flags & MAKEENTRY) != 0) + cache_enter(dvp, *vpp, cnp); + return (error); } static int Modified: head/sys/ufs/ufs/ufs_vnops.c ============================================================================== --- head/sys/ufs/ufs/ufs_vnops.c Sun Dec 21 12:36:36 2014 (r276006) +++ head/sys/ufs/ufs/ufs_vnops.c Sun Dec 21 13:29:33 2014 (r276007) @@ -205,8 +205,10 @@ ufs_create(ap) error = ufs_makeinode(MAKEIMODE(ap->a_vap->va_type, ap->a_vap->va_mode), ap->a_dvp, ap->a_vpp, ap->a_cnp); - if (error) + if (error != 0) return (error); + if ((ap->a_cnp->cn_flags & MAKEENTRY) != 0) + cache_enter(ap->a_dvp, *ap->a_vpp, ap->a_cnp); return (0); } From owner-svn-src-all@FreeBSD.ORG Sun Dec 21 13:32:09 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6FD07C69; Sun, 21 Dec 2014 13:32:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4257428A3; Sun, 21 Dec 2014 13:32:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBLDW9LO030551; Sun, 21 Dec 2014 13:32:09 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBLDW8VC030548; Sun, 21 Dec 2014 13:32:08 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201412211332.sBLDW8VC030548@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 21 Dec 2014 13:32:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276008 - in head/sys: kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2014 13:32:09 -0000 Author: kib Date: Sun Dec 21 13:32:07 2014 New Revision: 276008 URL: https://svnweb.freebsd.org/changeset/base/276008 Log: Add VN_OPEN_NAMECACHE flag for vn_open_cred(9), which requests that the created file name was cached. Use the flag for core dumps. Requested by: rpaulo Tested by: pho (previous version) Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Modified: head/sys/kern/kern_sig.c head/sys/kern/vfs_vnops.c head/sys/sys/vnode.h Modified: head/sys/kern/kern_sig.c ============================================================================== --- head/sys/kern/kern_sig.c Sun Dec 21 13:29:33 2014 (r276007) +++ head/sys/kern/kern_sig.c Sun Dec 21 13:32:07 2014 (r276008) @@ -3167,7 +3167,8 @@ corefile_open(const char *comm, uid_t ui sbuf_delete(&sb); cmode = S_IRUSR | S_IWUSR; - oflags = VN_OPEN_NOAUDIT | (capmode_coredump ? VN_OPEN_NOCAPCHECK : 0); + oflags = VN_OPEN_NOAUDIT | VN_OPEN_NAMECACHE | + (capmode_coredump ? VN_OPEN_NOCAPCHECK : 0); /* * If the core format has a %I in it, then we need to check Modified: head/sys/kern/vfs_vnops.c ============================================================================== --- head/sys/kern/vfs_vnops.c Sun Dec 21 13:29:33 2014 (r276007) +++ head/sys/kern/vfs_vnops.c Sun Dec 21 13:32:07 2014 (r276008) @@ -217,6 +217,8 @@ restart: return (error); goto restart; } + if ((vn_open_flags & VN_OPEN_NAMECACHE) != 0) + ndp->ni_cnd.cn_flags |= MAKEENTRY; #ifdef MAC error = mac_vnode_check_create(cred, ndp->ni_dvp, &ndp->ni_cnd, vap); Modified: head/sys/sys/vnode.h ============================================================================== --- head/sys/sys/vnode.h Sun Dec 21 13:29:33 2014 (r276007) +++ head/sys/sys/vnode.h Sun Dec 21 13:32:07 2014 (r276008) @@ -580,6 +580,7 @@ typedef void vop_getpages_iodone_t(void /* vn_open_flags */ #define VN_OPEN_NOAUDIT 0x00000001 #define VN_OPEN_NOCAPCHECK 0x00000002 +#define VN_OPEN_NAMECACHE 0x00000004 /* * Public vnode manipulation functions. From owner-svn-src-all@FreeBSD.ORG Sun Dec 21 13:58:54 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DA9705CC; Sun, 21 Dec 2014 13:58:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AD0BF2B92; Sun, 21 Dec 2014 13:58:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBLDwsnL040817; Sun, 21 Dec 2014 13:58:54 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBLDwskr040816; Sun, 21 Dec 2014 13:58:54 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201412211358.sBLDwskr040816@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 21 Dec 2014 13:58:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276009 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2014 13:58:55 -0000 Author: tuexen Date: Sun Dec 21 13:58:53 2014 New Revision: 276009 URL: https://svnweb.freebsd.org/changeset/base/276009 Log: Don't check twice that inp is not NULL. Reported by: Coverity CID: 748671 MFC after: 3 days Modified: head/sys/netinet/sctputil.c Modified: head/sys/netinet/sctputil.c ============================================================================== --- head/sys/netinet/sctputil.c Sun Dec 21 13:32:07 2014 (r276008) +++ head/sys/netinet/sctputil.c Sun Dec 21 13:58:53 2014 (r276009) @@ -1949,7 +1949,7 @@ sctp_timer_start(int t_type, struct sctp * though we use a different timer. We also add the HB timer * PLUS a random jitter. */ - if ((inp == NULL) || (stcb == NULL) || (net == NULL)) { + if ((stcb == NULL) || (net == NULL)) { return; } else { uint32_t rndval; @@ -2004,9 +2004,6 @@ sctp_timer_start(int t_type, struct sctp * nothing needed but the endpoint here ususually about 60 * minutes. */ - if (inp == NULL) { - return; - } tmr = &inp->sctp_ep.signature_change; to_ticks = inp->sctp_ep.sctp_timeoutticks[SCTP_TIMER_SIGNATURE]; break; @@ -2023,9 +2020,6 @@ sctp_timer_start(int t_type, struct sctp * timer since that has stopped and we are in the GONE * state. */ - if (inp == NULL) { - return; - } tmr = &inp->sctp_ep.signature_change; to_ticks = MSEC_TO_TICKS(SCTP_INP_KILL_TIMEOUT); break; @@ -2034,10 +2028,7 @@ sctp_timer_start(int t_type, struct sctp * Here we use the value found in the EP for PMTU ususually * about 10 minutes. */ - if ((stcb == NULL) || (inp == NULL)) { - return; - } - if (net == NULL) { + if ((stcb == NULL) || (net == NULL)) { return; } if (net->dest_state & SCTP_ADDR_NO_PMTUD) { @@ -2063,7 +2054,7 @@ sctp_timer_start(int t_type, struct sctp * Here we use the endpoints shutdown guard timer usually * about 3 minutes. */ - if ((inp == NULL) || (stcb == NULL)) { + if (stcb == NULL) { return; } to_ticks = inp->sctp_ep.sctp_timeoutticks[SCTP_TIMER_MAXSHUTDOWN]; From owner-svn-src-all@FreeBSD.ORG Sun Dec 21 14:26:57 2014 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EB2A9B72; Sun, 21 Dec 2014 14:26:57 +0000 (UTC) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 11250301C; Sun, 21 Dec 2014 14:26:55 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id QAA05108; Sun, 21 Dec 2014 16:28:41 +0200 (EET) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1Y2hT4-000PfC-Jz; Sun, 21 Dec 2014 16:26:46 +0200 Message-ID: <5496D86D.7070209@FreeBSD.org> Date: Sun, 21 Dec 2014 16:25:49 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Konstantin Belousov , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org Subject: Re: svn commit: r276008 - in head/sys: kern sys References: <201412211332.sBLDW8VC030548@svn.freebsd.org> In-Reply-To: <201412211332.sBLDW8VC030548@svn.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2014 14:26:58 -0000 On 21/12/2014 15:32, Konstantin Belousov wrote: > Author: kib > Date: Sun Dec 21 13:32:07 2014 > New Revision: 276008 > URL: https://svnweb.freebsd.org/changeset/base/276008 > > Log: > Add VN_OPEN_NAMECACHE flag for vn_open_cred(9), which requests that > the created file name was cached. Use the flag for core dumps. Just curious about a rationale for using the new flag for core dumps. Sorry if I missed any public discussion about this and that I wasn't able to figure out the rationale myself. > Requested by: rpaulo > Tested by: pho (previous version) -- Andriy Gapon From owner-svn-src-all@FreeBSD.ORG Sun Dec 21 14:41:59 2014 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E266C1E7; Sun, 21 Dec 2014 14:41:59 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 705003971; Sun, 21 Dec 2014 14:41:59 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id sBLEfsd5026115 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 21 Dec 2014 16:41:54 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua sBLEfsd5026115 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id sBLEfsao026114; Sun, 21 Dec 2014 16:41:54 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 21 Dec 2014 16:41:54 +0200 From: Konstantin Belousov To: Andriy Gapon Subject: Re: svn commit: r276008 - in head/sys: kern sys Message-ID: <20141221144154.GW2148@kib.kiev.ua> References: <201412211332.sBLDW8VC030548@svn.freebsd.org> <5496D86D.7070209@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5496D86D.7070209@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2014 14:42:00 -0000 On Sun, Dec 21, 2014 at 04:25:49PM +0200, Andriy Gapon wrote: > On 21/12/2014 15:32, Konstantin Belousov wrote: > > Author: kib > > Date: Sun Dec 21 13:32:07 2014 > > New Revision: 276008 > > URL: https://svnweb.freebsd.org/changeset/base/276008 > > > > Log: > > Add VN_OPEN_NAMECACHE flag for vn_open_cred(9), which requests that > > the created file name was cached. Use the flag for core dumps. > > Just curious about a rationale for using the new flag for core dumps. > Sorry if I missed any public discussion about this and that I wasn't able to > figure out the rationale myself. I am not sure I understand the question. Are you asking or objecting ? Is this a question about new flag being used vs. detecting the core dumps by some other means ? Or, are you asking why caching of the name could be needed for core dump files at all ? From owner-svn-src-all@FreeBSD.ORG Sun Dec 21 14:46:28 2014 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 36587554; Sun, 21 Dec 2014 14:46:28 +0000 (UTC) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 1CCC13A76; Sun, 21 Dec 2014 14:46:26 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id QAA05309; Sun, 21 Dec 2014 16:48:19 +0200 (EET) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1Y2hm5-000PgR-0D; Sun, 21 Dec 2014 16:46:25 +0200 Message-ID: <5496DD08.7060201@FreeBSD.org> Date: Sun, 21 Dec 2014 16:45:28 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Konstantin Belousov Subject: Re: svn commit: r276008 - in head/sys: kern sys References: <201412211332.sBLDW8VC030548@svn.freebsd.org> <5496D86D.7070209@FreeBSD.org> <20141221144154.GW2148@kib.kiev.ua> In-Reply-To: <20141221144154.GW2148@kib.kiev.ua> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2014 14:46:28 -0000 On 21/12/2014 16:41, Konstantin Belousov wrote: > On Sun, Dec 21, 2014 at 04:25:49PM +0200, Andriy Gapon wrote: >> On 21/12/2014 15:32, Konstantin Belousov wrote: >>> Author: kib >>> Date: Sun Dec 21 13:32:07 2014 >>> New Revision: 276008 >>> URL: https://svnweb.freebsd.org/changeset/base/276008 >>> >>> Log: >>> Add VN_OPEN_NAMECACHE flag for vn_open_cred(9), which requests that >>> the created file name was cached. Use the flag for core dumps. >> >> Just curious about a rationale for using the new flag for core dumps. >> Sorry if I missed any public discussion about this and that I wasn't able to >> figure out the rationale myself. > > I am not sure I understand the question. Are you asking or objecting ? Asking. > Is this a question about new flag being used vs. detecting the core > dumps by some other means ? > > Or, are you asking why caching of the name could be needed for > core dump files at all ? Sort of. Why VN_OPEN_NAMECACHE is useful in the case of core dumps? What does it make better? -- Andriy Gapon From owner-svn-src-all@FreeBSD.ORG Sun Dec 21 15:14:53 2014 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8D515AF8; Sun, 21 Dec 2014 15:14:53 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 188273FBA; Sun, 21 Dec 2014 15:14:52 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id sBLFEPEi032806 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 21 Dec 2014 17:14:25 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua sBLFEPEi032806 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id sBLFEPnA032805; Sun, 21 Dec 2014 17:14:25 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 21 Dec 2014 17:14:25 +0200 From: Konstantin Belousov To: Andriy Gapon Subject: Re: svn commit: r276008 - in head/sys: kern sys Message-ID: <20141221151425.GX2148@kib.kiev.ua> References: <201412211332.sBLDW8VC030548@svn.freebsd.org> <5496D86D.7070209@FreeBSD.org> <20141221144154.GW2148@kib.kiev.ua> <5496DD08.7060201@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5496DD08.7060201@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2014 15:14:53 -0000 On Sun, Dec 21, 2014 at 04:45:28PM +0200, Andriy Gapon wrote: > On 21/12/2014 16:41, Konstantin Belousov wrote: > > Or, are you asking why caching of the name could be needed for > > core dump files at all ? > > Sort of. Why VN_OPEN_NAMECACHE is useful in the case of core dumps? > What does it make better? The vn_fullpath() mostly works for the core files after the change, comparing with the non-working state at all before. From owner-svn-src-all@FreeBSD.ORG Sun Dec 21 15:39:20 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6A5AE94; Sun, 21 Dec 2014 15:39:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 55FAF2232; Sun, 21 Dec 2014 15:39:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBLFdKgR088084; Sun, 21 Dec 2014 15:39:20 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBLFdKXO088083; Sun, 21 Dec 2014 15:39:20 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201412211539.sBLFdKXO088083@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Sun, 21 Dec 2014 15:39:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276010 - stable/10/sys/dev/oce X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2014 15:39:20 -0000 Author: smh Date: Sun Dec 21 15:39:19 2014 New Revision: 276010 URL: https://svnweb.freebsd.org/changeset/base/276010 Log: MFC r268156: Various bugfixes from Stefano GarzarellaA This has been proved to fix reproducable panics on 10.x. Sponsored by: Multiplay Modified: stable/10/sys/dev/oce/oce_if.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/oce/oce_if.c ============================================================================== --- stable/10/sys/dev/oce/oce_if.c Sun Dec 21 13:58:53 2014 (r276009) +++ stable/10/sys/dev/oce/oce_if.c Sun Dec 21 15:39:19 2014 (r276010) @@ -563,9 +563,6 @@ oce_multiq_start(struct ifnet *ifp, stru int queue_index = 0; int status = 0; - if (!sc->link_status) - return ENXIO; - if ((m->m_flags & M_FLOWID) != 0) queue_index = m->m_pkthdr.flowid % sc->nwqs; @@ -1274,7 +1271,6 @@ oce_multiq_transmit(struct ifnet *ifp, s drbr_putback(ifp, br, next); wq->tx_stats.tx_stops ++; ifp->if_drv_flags |= IFF_DRV_OACTIVE; - status = drbr_enqueue(ifp, br, next); } break; } @@ -1285,7 +1281,7 @@ oce_multiq_transmit(struct ifnet *ifp, s ETHER_BPF_MTAP(ifp, next); } - return status; + return 0; } From owner-svn-src-all@FreeBSD.ORG Sun Dec 21 16:07:47 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C70F0506; Sun, 21 Dec 2014 16:07:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B34F22CE2; Sun, 21 Dec 2014 16:07:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBLG7lqv004317; Sun, 21 Dec 2014 16:07:47 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBLG7lIP004316; Sun, 21 Dec 2014 16:07:47 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201412211607.sBLG7lIP004316@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Sun, 21 Dec 2014 16:07:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276012 - head/sys/dev/ahci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2014 16:07:47 -0000 Author: smh Date: Sun Dec 21 16:07:46 2014 New Revision: 276012 URL: https://svnweb.freebsd.org/changeset/base/276012 Log: Add a constant AHCI_MAX_IRQS removing magic number Sponsored by: Multiplay Modified: head/sys/dev/ahci/ahci.h Modified: head/sys/dev/ahci/ahci.h ============================================================================== --- head/sys/dev/ahci/ahci.h Sun Dec 21 15:40:15 2014 (r276011) +++ head/sys/dev/ahci/ahci.h Sun Dec 21 16:07:46 2014 (r276012) @@ -143,6 +143,7 @@ #define AHCI_MAX_PORTS 32 #define AHCI_MAX_SLOTS 32 +#define AHCI_MAX_IRQS 16 /* SATA AHCI v1.0 register defines */ #define AHCI_CAP 0x00 @@ -494,7 +495,7 @@ struct ahci_controller { #define AHCI_IRQ_MODE_ALL 0 #define AHCI_IRQ_MODE_AFTER 1 #define AHCI_IRQ_MODE_ONE 2 - } irqs[16]; + } irqs[AHCI_MAX_IRQS]; uint32_t caps; /* Controller capabilities */ uint32_t caps2; /* Controller capabilities */ uint32_t capsem; /* Controller capabilities */ From owner-svn-src-all@FreeBSD.ORG Sun Dec 21 16:15:30 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ADF83933; Sun, 21 Dec 2014 16:15:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9A70B2E0E; Sun, 21 Dec 2014 16:15:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBLGFUUt010094; Sun, 21 Dec 2014 16:15:30 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBLGFU1E010093; Sun, 21 Dec 2014 16:15:30 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201412211615.sBLGFU1E010093@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Sun, 21 Dec 2014 16:15:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276013 - head/sys/dev/ahci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2014 16:15:30 -0000 Author: smh Date: Sun Dec 21 16:15:29 2014 New Revision: 276013 URL: https://svnweb.freebsd.org/changeset/base/276013 Log: Clamp ahci max irq's to AHCI_MAX_IRQS This prevents the possiblity of any overruns on the statically allocated struct irqs field. Differential Revision: D838 MFC after: 2 weeks X-MFC-With: r276012 Sponsored by: Multiplay Modified: head/sys/dev/ahci/ahci.c Modified: head/sys/dev/ahci/ahci.c ============================================================================== --- head/sys/dev/ahci/ahci.c Sun Dec 21 16:07:46 2014 (r276012) +++ head/sys/dev/ahci/ahci.c Sun Dec 21 16:15:29 2014 (r276013) @@ -356,6 +356,14 @@ ahci_setup_interrupt(device_t dev) device_printf(dev, "Falling back to one MSI\n"); ctlr->numirqs = 1; } + + /* Ensure we don't overrun irqs. */ + if (ctlr->numirqs > AHCI_MAX_IRQS) { + device_printf(dev, "Too many irqs %d > %d (clamping)\n", + ctlr->numirqs, AHCI_MAX_IRQS); + ctlr->numirqs = AHCI_MAX_IRQS; + } + /* Allocate all IRQs. */ for (i = 0; i < ctlr->numirqs; i++) { ctlr->irqs[i].ctlr = ctlr; From owner-svn-src-all@FreeBSD.ORG Sun Dec 21 16:21:57 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 49FCED82; Sun, 21 Dec 2014 16:21:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2B2EE2F08; Sun, 21 Dec 2014 16:21:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBLGLv4S012577; Sun, 21 Dec 2014 16:21:57 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBLGLvsW012576; Sun, 21 Dec 2014 16:21:57 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201412211621.sBLGLvsW012576@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sun, 21 Dec 2014 16:21:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276015 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2014 16:21:57 -0000 Author: andrew Date: Sun Dec 21 16:21:56 2014 New Revision: 276015 URL: https://svnweb.freebsd.org/changeset/base/276015 Log: Reduce the diff to the arm_intrng project branch by having the read/write macros take the softc they are accessing. Modified: head/sys/arm/arm/gic.c Modified: head/sys/arm/arm/gic.c ============================================================================== --- head/sys/arm/arm/gic.c Sun Dec 21 16:21:28 2014 (r276014) +++ head/sys/arm/arm/gic.c Sun Dec 21 16:21:56 2014 (r276015) @@ -118,14 +118,14 @@ static struct resource_spec arm_gic_spec static struct arm_gic_softc *arm_gic_sc = NULL; -#define gic_c_read_4(reg) \ - bus_space_read_4(arm_gic_sc->gic_c_bst, arm_gic_sc->gic_c_bsh, reg) -#define gic_c_write_4(reg, val) \ - bus_space_write_4(arm_gic_sc->gic_c_bst, arm_gic_sc->gic_c_bsh, reg, val) -#define gic_d_read_4(reg) \ - bus_space_read_4(arm_gic_sc->gic_d_bst, arm_gic_sc->gic_d_bsh, reg) -#define gic_d_write_4(reg, val) \ - bus_space_write_4(arm_gic_sc->gic_d_bst, arm_gic_sc->gic_d_bsh, reg, val) +#define gic_c_read_4(_sc, _reg) \ + bus_space_read_4((_sc)->gic_c_bst, (_sc)->gic_c_bsh, (_reg)) +#define gic_c_write_4(_sc, _reg, _val) \ + bus_space_write_4((_sc)->gic_c_bst, (_sc)->gic_c_bsh, (_reg), (_val)) +#define gic_d_read_4(_sc, _reg) \ + bus_space_read_4((_sc)->gic_d_bst, (_sc)->gic_d_bsh, (_reg)) +#define gic_d_write_4(_sc, _reg, _val) \ + bus_space_write_4((_sc)->gic_d_bst, (_sc)->gic_d_bsh, (_reg), (_val)) static int gic_config_irq(int irq, enum intr_trigger trig, enum intr_polarity pol); @@ -158,35 +158,36 @@ arm_gic_probe(device_t dev) void gic_init_secondary(void) { + struct arm_gic_softc *sc = arm_gic_sc; int i, nirqs; /* Get the number of interrupts */ - nirqs = gic_d_read_4(GICD_TYPER); + nirqs = gic_d_read_4(sc, GICD_TYPER); nirqs = 32 * ((nirqs & 0x1f) + 1); for (i = 0; i < nirqs; i += 4) - gic_d_write_4(GICD_IPRIORITYR(i >> 2), 0); + gic_d_write_4(sc, GICD_IPRIORITYR(i >> 2), 0); /* Set all the interrupts to be in Group 0 (secure) */ for (i = 0; i < nirqs; i += 32) { - gic_d_write_4(GICD_IGROUPR(i >> 5), 0); + gic_d_write_4(sc, GICD_IGROUPR(i >> 5), 0); } /* Enable CPU interface */ - gic_c_write_4(GICC_CTLR, 1); + gic_c_write_4(sc, GICC_CTLR, 1); /* Set priority mask register. */ - gic_c_write_4(GICC_PMR, 0xff); + gic_c_write_4(sc, GICC_PMR, 0xff); /* Enable interrupt distribution */ - gic_d_write_4(GICD_CTLR, 0x01); + gic_d_write_4(sc, GICD_CTLR, 0x01); /* * Activate the timer interrupts: virtual, secure, and non-secure. */ - gic_d_write_4(GICD_ISENABLER(27 >> 5), (1UL << (27 & 0x1F))); - gic_d_write_4(GICD_ISENABLER(29 >> 5), (1UL << (29 & 0x1F))); - gic_d_write_4(GICD_ISENABLER(30 >> 5), (1UL << (30 & 0x1F))); + gic_d_write_4(sc, GICD_ISENABLER(27 >> 5), (1UL << (27 & 0x1F))); + gic_d_write_4(sc, GICD_ISENABLER(29 >> 5), (1UL << (29 & 0x1F))); + gic_d_write_4(sc, GICD_ISENABLER(30 >> 5), (1UL << (30 & 0x1F))); } int @@ -266,49 +267,50 @@ arm_gic_attach(device_t dev) arm_gic_sc = sc; /* Disable interrupt forwarding to the CPU interface */ - gic_d_write_4(GICD_CTLR, 0x00); + gic_d_write_4(sc, GICD_CTLR, 0x00); /* Get the number of interrupts */ - sc->nirqs = gic_d_read_4(GICD_TYPER); + sc->nirqs = gic_d_read_4(sc, GICD_TYPER); sc->nirqs = 32 * ((sc->nirqs & 0x1f) + 1); /* Set up function pointers */ arm_post_filter = gic_post_filter; arm_config_irq = gic_config_irq; - icciidr = gic_c_read_4(GICC_IIDR); + icciidr = gic_c_read_4(sc, GICC_IIDR); device_printf(dev,"pn 0x%x, arch 0x%x, rev 0x%x, implementer 0x%x irqs %u\n", icciidr>>20, (icciidr>>16) & 0xF, (icciidr>>12) & 0xf, (icciidr & 0xfff), sc->nirqs); /* Set all global interrupts to be level triggered, active low. */ for (i = 32; i < sc->nirqs; i += 16) { - gic_d_write_4(GICD_ICFGR(i >> 4), 0x00000000); + gic_d_write_4(sc, GICD_ICFGR(i >> 4), 0x00000000); } /* Disable all interrupts. */ for (i = 32; i < sc->nirqs; i += 32) { - gic_d_write_4(GICD_ICENABLER(i >> 5), 0xFFFFFFFF); + gic_d_write_4(sc, GICD_ICENABLER(i >> 5), 0xFFFFFFFF); } for (i = 0; i < sc->nirqs; i += 4) { - gic_d_write_4(GICD_IPRIORITYR(i >> 2), 0); - gic_d_write_4(GICD_ITARGETSR(i >> 2), 1 << 0 | 1 << 8 | 1 << 16 | 1 << 24); + gic_d_write_4(sc, GICD_IPRIORITYR(i >> 2), 0); + gic_d_write_4(sc, GICD_ITARGETSR(i >> 2), + 1 << 0 | 1 << 8 | 1 << 16 | 1 << 24); } /* Set all the interrupts to be in Group 0 (secure) */ for (i = 0; i < sc->nirqs; i += 32) { - gic_d_write_4(GICD_IGROUPR(i >> 5), 0); + gic_d_write_4(sc, GICD_IGROUPR(i >> 5), 0); } /* Enable CPU interface */ - gic_c_write_4(GICC_CTLR, 1); + gic_c_write_4(sc, GICC_CTLR, 1); /* Set priority mask register. */ - gic_c_write_4(GICC_PMR, 0xff); + gic_c_write_4(sc, GICC_PMR, 0xff); /* Enable interrupt distribution */ - gic_d_write_4(GICD_CTLR, 0x01); + gic_d_write_4(sc, GICD_CTLR, 0x01); return (0); } @@ -335,28 +337,29 @@ EARLY_DRIVER_MODULE(gic, ofwbus, arm_gic static void gic_post_filter(void *arg) { + struct arm_gic_softc *sc = arm_gic_sc; uintptr_t irq = (uintptr_t) arg; if (irq > GIC_LAST_IPI) arm_irq_memory_barrier(irq); - gic_c_write_4(GICC_EOIR, irq); + gic_c_write_4(sc, GICC_EOIR, irq); } int arm_get_next_irq(int last_irq) { + struct arm_gic_softc *sc = arm_gic_sc; uint32_t active_irq; - active_irq = gic_c_read_4(GICC_IAR); + active_irq = gic_c_read_4(sc, GICC_IAR); /* * Immediatly EOIR the SGIs, because doing so requires the other * bits (ie CPU number), not just the IRQ number, and we do not * have this information later. */ - if ((active_irq & 0x3ff) <= GIC_LAST_IPI) - gic_c_write_4(GICC_EOIR, active_irq); + gic_c_write_4(sc, GICC_EOIR, active_irq); active_irq &= 0x3FF; if (active_irq == 0x3FF) { @@ -371,29 +374,32 @@ arm_get_next_irq(int last_irq) void arm_mask_irq(uintptr_t nb) { + struct arm_gic_softc *sc = arm_gic_sc; - gic_d_write_4(GICD_ICENABLER(nb >> 5), (1UL << (nb & 0x1F))); - gic_c_write_4(GICC_EOIR, nb); + gic_d_write_4(sc, GICD_ICENABLER(nb >> 5), (1UL << (nb & 0x1F))); + gic_c_write_4(sc, GICC_EOIR, nb); } void arm_unmask_irq(uintptr_t nb) { + struct arm_gic_softc *sc = arm_gic_sc; if (nb > GIC_LAST_IPI) arm_irq_memory_barrier(nb); - gic_d_write_4(GICD_ISENABLER(nb >> 5), (1UL << (nb & 0x1F))); + gic_d_write_4(sc, GICD_ISENABLER(nb >> 5), (1UL << (nb & 0x1F))); } static int gic_config_irq(int irq, enum intr_trigger trig, enum intr_polarity pol) { + struct arm_gic_softc *sc = arm_gic_sc; uint32_t reg; uint32_t mask; /* Function is public-accessible, so validate input arguments */ - if ((irq < 0) || (irq >= arm_gic_sc->nirqs)) + if ((irq < 0) || (irq >= sc->nirqs)) goto invalid_args; if ((trig != INTR_TRIGGER_EDGE) && (trig != INTR_TRIGGER_LEVEL) && (trig != INTR_TRIGGER_CONFORM)) @@ -402,9 +408,9 @@ gic_config_irq(int irq, enum intr_trigge (pol != INTR_POLARITY_CONFORM)) goto invalid_args; - mtx_lock_spin(&arm_gic_sc->mutex); + mtx_lock_spin(&sc->mutex); - reg = gic_d_read_4(GICD_ICFGR(irq >> 4)); + reg = gic_d_read_4(sc, GICD_ICFGR(irq >> 4)); mask = (reg >> 2*(irq % 16)) & 0x3; if (pol == INTR_POLARITY_LOW) { @@ -426,14 +432,14 @@ gic_config_irq(int irq, enum intr_trigge /* Set mask */ reg = reg & ~(0x3 << 2*(irq % 16)); reg = reg | (mask << 2*(irq % 16)); - gic_d_write_4(GICD_ICFGR(irq >> 4), reg); + gic_d_write_4(sc, GICD_ICFGR(irq >> 4), reg); - mtx_unlock_spin(&arm_gic_sc->mutex); + mtx_unlock_spin(&sc->mutex); return (0); invalid_args: - device_printf(arm_gic_sc->dev, "gic_config_irg, invalid parameters\n"); + device_printf(sc->dev, "gic_config_irg, invalid parameters\n"); return (EINVAL); } @@ -441,13 +447,14 @@ invalid_args: void pic_ipi_send(cpuset_t cpus, u_int ipi) { + struct arm_gic_softc *sc = arm_gic_sc; uint32_t val = 0, i; for (i = 0; i < MAXCPU; i++) if (CPU_ISSET(i, &cpus)) val |= 1 << (16 + i); - gic_d_write_4(GICD_SGIR(0), val | ipi); + gic_d_write_4(sc, GICD_SGIR(0), val | ipi); } int From owner-svn-src-all@FreeBSD.ORG Sun Dec 21 16:22:19 2014 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 30EA2EBA; Sun, 21 Dec 2014 16:22:19 +0000 (UTC) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 0DA3C2F10; Sun, 21 Dec 2014 16:22:17 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id SAA06250; Sun, 21 Dec 2014 18:24:09 +0200 (EET) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1Y2jGp-000Plz-90; Sun, 21 Dec 2014 18:22:15 +0200 Message-ID: <5496F37D.5030903@FreeBSD.org> Date: Sun, 21 Dec 2014 18:21:17 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Konstantin Belousov Subject: Re: svn commit: r276008 - in head/sys: kern sys References: <201412211332.sBLDW8VC030548@svn.freebsd.org> <5496D86D.7070209@FreeBSD.org> <20141221144154.GW2148@kib.kiev.ua> <5496DD08.7060201@FreeBSD.org> <20141221151425.GX2148@kib.kiev.ua> In-Reply-To: <20141221151425.GX2148@kib.kiev.ua> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2014 16:22:19 -0000 On 21/12/2014 17:14, Konstantin Belousov wrote: > On Sun, Dec 21, 2014 at 04:45:28PM +0200, Andriy Gapon wrote: >> On 21/12/2014 16:41, Konstantin Belousov wrote: >>> Or, are you asking why caching of the name could be needed for >>> core dump files at all ? >> >> Sort of. Why VN_OPEN_NAMECACHE is useful in the case of core dumps? >> What does it make better? > The vn_fullpath() mostly works for the core files after the change, > comparing with the non-working state at all before. > Ah, vn_fullpath(). Thank you. -- Andriy Gapon From owner-svn-src-all@FreeBSD.ORG Sun Dec 21 16:32:58 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DB3B3FE; Sun, 21 Dec 2014 16:32:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C79183030; Sun, 21 Dec 2014 16:32:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBLGWwwH019227; Sun, 21 Dec 2014 16:32:58 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBLGWwCO019226; Sun, 21 Dec 2014 16:32:58 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201412211632.sBLGWwCO019226@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Sun, 21 Dec 2014 16:32:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276016 - head/sys/dev/ahci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2014 16:32:59 -0000 Author: smh Date: Sun Dec 21 16:32:57 2014 New Revision: 276016 URL: https://svnweb.freebsd.org/changeset/base/276016 Log: Return the error from ahci_setup_interrupt in ahci_attach Previously ahci_attach returned a hard coded ENXIO instead of the value from ahci_setup_interrupt. This is effectively a NOOP change as currently ahci_setup_interrupt only ever returns 0 or ENXIO, so just there to protect against any future changes to that. Differential Revision: D838 MFC after: 2 weeks Sponsored by: Multiplay Modified: head/sys/dev/ahci/ahci.c Modified: head/sys/dev/ahci/ahci.c ============================================================================== --- head/sys/dev/ahci/ahci.c Sun Dec 21 16:21:56 2014 (r276015) +++ head/sys/dev/ahci/ahci.c Sun Dec 21 16:32:57 2014 (r276016) @@ -231,12 +231,12 @@ ahci_attach(device_t dev) ahci_ctlr_setup(dev); /* Setup interrupts. */ - if (ahci_setup_interrupt(dev)) { + if ((error = ahci_setup_interrupt(dev)) != 0) { bus_dma_tag_destroy(ctlr->dma_tag); bus_release_resource(dev, SYS_RES_MEMORY, ctlr->r_rid, ctlr->r_mem); rman_fini(&ctlr->sc_iomem); - return ENXIO; + return error; } i = 0; From owner-svn-src-all@FreeBSD.ORG Sun Dec 21 16:35:43 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6CB2025F; Sun, 21 Dec 2014 16:35:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 590C2305F; Sun, 21 Dec 2014 16:35:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBLGZhf4019647; Sun, 21 Dec 2014 16:35:43 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBLGZhYb019646; Sun, 21 Dec 2014 16:35:43 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201412211635.sBLGZhYb019646@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sun, 21 Dec 2014 16:35:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276017 - head/sys/arm/broadcom/bcm2835 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2014 16:35:43 -0000 Author: andrew Date: Sun Dec 21 16:35:42 2014 New Revision: 276017 URL: https://svnweb.freebsd.org/changeset/base/276017 Log: Reduce the diff between head and arm_intrng with the bcm2835 interrupt controller. Modified: head/sys/arm/broadcom/bcm2835/bcm2835_intr.c Modified: head/sys/arm/broadcom/bcm2835/bcm2835_intr.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_intr.c Sun Dec 21 16:32:57 2014 (r276016) +++ head/sys/arm/broadcom/bcm2835/bcm2835_intr.c Sun Dec 21 16:35:42 2014 (r276017) @@ -83,10 +83,10 @@ struct bcm_intc_softc { static struct bcm_intc_softc *bcm_intc_sc = NULL; -#define intc_read_4(reg) \ - bus_space_read_4(bcm_intc_sc->intc_bst, bcm_intc_sc->intc_bsh, reg) -#define intc_write_4(reg, val) \ - bus_space_write_4(bcm_intc_sc->intc_bst, bcm_intc_sc->intc_bsh, reg, val) +#define intc_read_4(_sc, reg) \ + bus_space_read_4((_sc)->intc_bst, (_sc)->intc_bsh, (reg)) +#define intc_write_4(_sc, reg, val) \ + bus_space_write_4((_sc)->intc_bst, (_sc)->intc_bsh, (reg), (val)) static int bcm_intc_probe(device_t dev) @@ -145,6 +145,7 @@ DRIVER_MODULE(intc, simplebus, bcm_intc_ int arm_get_next_irq(int last_irq) { + struct bcm_intc_softc *sc = bcm_intc_sc; uint32_t pending; int32_t irq = last_irq + 1; @@ -154,7 +155,7 @@ arm_get_next_irq(int last_irq) /* TODO: should we mask last_irq? */ if (irq < BANK1_START) { - pending = intc_read_4(INTC_PENDING_BASIC); + pending = intc_read_4(sc, INTC_PENDING_BASIC); if ((pending & 0xFF) == 0) { irq = BANK1_START; /* skip to next bank */ } else do { @@ -164,7 +165,7 @@ arm_get_next_irq(int last_irq) } while (irq < BANK1_START); } if (irq < BANK2_START) { - pending = intc_read_4(INTC_PENDING_BANK1); + pending = intc_read_4(sc, INTC_PENDING_BANK1); if (pending == 0) { irq = BANK2_START; /* skip to next bank */ } else do { @@ -174,7 +175,7 @@ arm_get_next_irq(int last_irq) } while (irq < BANK2_START); } if (irq < BANK3_START) { - pending = intc_read_4(INTC_PENDING_BANK2); + pending = intc_read_4(sc, INTC_PENDING_BANK2); if (pending != 0) do { if (pending & (1 << IRQ_BANK2(irq))) return irq; @@ -187,14 +188,15 @@ arm_get_next_irq(int last_irq) void arm_mask_irq(uintptr_t nb) { + struct bcm_intc_softc *sc = bcm_intc_sc; dprintf("%s: %d\n", __func__, nb); if (IS_IRQ_BASIC(nb)) - intc_write_4(INTC_DISABLE_BASIC, (1 << nb)); + intc_write_4(sc, INTC_DISABLE_BASIC, (1 << nb)); else if (IS_IRQ_BANK1(nb)) - intc_write_4(INTC_DISABLE_BANK1, (1 << IRQ_BANK1(nb))); + intc_write_4(sc, INTC_DISABLE_BANK1, (1 << IRQ_BANK1(nb))); else if (IS_IRQ_BANK2(nb)) - intc_write_4(INTC_DISABLE_BANK2, (1 << IRQ_BANK2(nb))); + intc_write_4(sc, INTC_DISABLE_BANK2, (1 << IRQ_BANK2(nb))); else printf("arm_mask_irq: Invalid IRQ number: %d\n", nb); } @@ -202,14 +204,15 @@ arm_mask_irq(uintptr_t nb) void arm_unmask_irq(uintptr_t nb) { + struct bcm_intc_softc *sc = bcm_intc_sc; dprintf("%s: %d\n", __func__, nb); if (IS_IRQ_BASIC(nb)) - intc_write_4(INTC_ENABLE_BASIC, (1 << nb)); + intc_write_4(sc, INTC_ENABLE_BASIC, (1 << nb)); else if (IS_IRQ_BANK1(nb)) - intc_write_4(INTC_ENABLE_BANK1, (1 << IRQ_BANK1(nb))); + intc_write_4(sc, INTC_ENABLE_BANK1, (1 << IRQ_BANK1(nb))); else if (IS_IRQ_BANK2(nb)) - intc_write_4(INTC_ENABLE_BANK2, (1 << IRQ_BANK2(nb))); + intc_write_4(sc, INTC_ENABLE_BANK2, (1 << IRQ_BANK2(nb))); else printf("arm_mask_irq: Invalid IRQ number: %d\n", nb); } From owner-svn-src-all@FreeBSD.ORG Sun Dec 21 16:38:30 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B130E4A9; Sun, 21 Dec 2014 16:38:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 840C03084; Sun, 21 Dec 2014 16:38:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBLGcUFh020073; Sun, 21 Dec 2014 16:38:30 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBLGcUeu020072; Sun, 21 Dec 2014 16:38:30 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201412211638.sBLGcUeu020072@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Sun, 21 Dec 2014 16:38:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276019 - head/sys/dev/ahci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2014 16:38:30 -0000 Author: smh Date: Sun Dec 21 16:38:29 2014 New Revision: 276019 URL: https://svnweb.freebsd.org/changeset/base/276019 Log: style (9) nits Use return (val); instead of return val; Differential Revision: D838 MFC after: 2 weeks Sponsored by: Multiplay Modified: head/sys/dev/ahci/ahci.c Modified: head/sys/dev/ahci/ahci.c ============================================================================== --- head/sys/dev/ahci/ahci.c Sun Dec 21 16:37:24 2014 (r276018) +++ head/sys/dev/ahci/ahci.c Sun Dec 21 16:38:29 2014 (r276019) @@ -142,7 +142,7 @@ ahci_ctlr_reset(device_t dev) } if (timeout == 0) { device_printf(dev, "AHCI controller reset failure\n"); - return ENXIO; + return (ENXIO); } /* Reenable AHCI mode */ ATA_OUTL(ctlr->r_mem, AHCI_GHC, AHCI_GHC_AE); @@ -225,7 +225,7 @@ ahci_attach(device_t dev) bus_release_resource(dev, SYS_RES_MEMORY, ctlr->r_rid, ctlr->r_mem); rman_fini(&ctlr->sc_iomem); - return ENXIO; + return (ENXIO); } ahci_ctlr_setup(dev); @@ -236,7 +236,7 @@ ahci_attach(device_t dev) bus_release_resource(dev, SYS_RES_MEMORY, ctlr->r_rid, ctlr->r_mem); rman_fini(&ctlr->sc_iomem); - return error; + return (error); } i = 0; @@ -315,7 +315,7 @@ ahci_attach(device_t dev) device_set_ivars(child, (void *)(intptr_t)-1); } bus_generic_attach(dev); - return 0; + return (0); } int @@ -380,7 +380,7 @@ ahci_setup_interrupt(device_t dev) if (!(ctlr->irqs[i].r_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &ctlr->irqs[i].r_irq_rid, RF_SHAREABLE | RF_ACTIVE))) { device_printf(dev, "unable to map interrupt\n"); - return ENXIO; + return (ENXIO); } if ((bus_setup_intr(dev, ctlr->irqs[i].r_irq, ATA_INTR_FLAGS, NULL, (ctlr->irqs[i].mode != AHCI_IRQ_MODE_ONE) ? ahci_intr : @@ -389,7 +389,7 @@ ahci_setup_interrupt(device_t dev) &ctlr->irqs[i], &ctlr->irqs[i].handle))) { /* SOS XXX release r_irq */ device_printf(dev, "unable to setup interrupt\n"); - return ENXIO; + return (ENXIO); } if (ctlr->numirqs > 1) { bus_describe_intr(dev, ctlr->irqs[i].r_irq, @@ -537,7 +537,7 @@ ahci_release_resource(device_t dev, devi return (0); case SYS_RES_IRQ: if (rid != ATA_IRQ_RID) - return ENOENT; + return (ENOENT); return (0); } return (EINVAL); From owner-svn-src-all@FreeBSD.ORG Sun Dec 21 16:43:57 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4437A64F; Sun, 21 Dec 2014 16:43:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2F9A33157; Sun, 21 Dec 2014 16:43:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBLGhvsp024172; Sun, 21 Dec 2014 16:43:57 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBLGhv2k024171; Sun, 21 Dec 2014 16:43:57 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201412211643.sBLGhv2k024171@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Sun, 21 Dec 2014 16:43:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276020 - stable/10/sys/dev/ahci X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2014 16:43:57 -0000 Author: smh Date: Sun Dec 21 16:43:56 2014 New Revision: 276020 URL: https://svnweb.freebsd.org/changeset/base/276020 Log: MFC r272223: Prevent possible use after free in ahci direct mode Sponsored by: Multiplay Modified: stable/10/sys/dev/ahci/ahci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/ahci/ahci.c ============================================================================== --- stable/10/sys/dev/ahci/ahci.c Sun Dec 21 16:38:29 2014 (r276019) +++ stable/10/sys/dev/ahci/ahci.c Sun Dec 21 16:43:56 2014 (r276020) @@ -1580,6 +1580,7 @@ ahci_ch_intr_direct(void *arg) struct ahci_channel *ch = device_get_softc(dev); struct ccb_hdr *ccb_h; uint32_t istatus; + STAILQ_HEAD(, ccb_hdr) tmp_doneq = STAILQ_HEAD_INITIALIZER(tmp_doneq); /* Read interrupt statuses. */ istatus = ATA_INL(ch->r_mem, AHCI_P_IS); @@ -1590,9 +1591,14 @@ ahci_ch_intr_direct(void *arg) ch->batch = 1; ahci_ch_intr_main(ch, istatus); ch->batch = 0; + /* + * Prevent the possibility of issues caused by processing the queue + * while unlocked below by moving the contents to a local queue. + */ + STAILQ_CONCAT(&tmp_doneq, &ch->doneq); mtx_unlock(&ch->mtx); - while ((ccb_h = STAILQ_FIRST(&ch->doneq)) != NULL) { - STAILQ_REMOVE_HEAD(&ch->doneq, sim_links.stqe); + while ((ccb_h = STAILQ_FIRST(&tmp_doneq)) != NULL) { + STAILQ_REMOVE_HEAD(&tmp_doneq, sim_links.stqe); xpt_done_direct((union ccb *)ccb_h); } } From owner-svn-src-all@FreeBSD.ORG Sun Dec 21 16:45:14 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 07093793; Sun, 21 Dec 2014 16:45:14 +0000 (UTC) Received: from mho-02-ewr.mailhop.org (mho-02-ewr.mailhop.org [204.13.248.72]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CEDB53188; Sun, 21 Dec 2014 16:45:13 +0000 (UTC) Received: from [73.34.117.227] (helo=ilsoft.org) by mho-02-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1Y2jd2-000PM7-57; Sun, 21 Dec 2014 16:45:12 +0000 Received: from revolution.hippie.lan (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id sBLGjBg6016275; Sun, 21 Dec 2014 09:45:11 -0700 (MST) (envelope-from ian@freebsd.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 73.34.117.227 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX1/kkgXnjPp9+ipkTBcl8+oF Message-ID: <1419180311.1018.66.camel@freebsd.org> Subject: Re: svn commit: r275961 - head/sys/arm/conf From: Ian Lepore To: Alexey Dokuchaev Date: Sun, 21 Dec 2014 09:45:11 -0700 In-Reply-To: <20141221080739.GB27290@FreeBSD.org> References: <201412201815.sBKIFOSq060122@svn.freebsd.org> <20141221080739.GB27290@FreeBSD.org> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.12.8 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Cc: Andrew Turner , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2014 16:45:14 -0000 On Sun, 2014-12-21 at 08:07 +0000, Alexey Dokuchaev wrote: > On Sat, Dec 20, 2014 at 06:15:24PM +0000, Andrew Turner wrote: > > Author: andrew > > Date: Sat Dec 20 18:15:23 2014 > > New Revision: 275961 > > URL: https://svnweb.freebsd.org/changeset/base/275961 > > > > Log: > > Clean up to use the standard style of "options \t" and "device\t\t" > > > > options HZ=500 # Scheduling quantum is 2 milliseconds. > > [...] > > -options KDB # Enable kernel debugger support. > > +options KDB # Enable kernel debugger support. > > # For minimum debugger support use KDB_TRACE, for interactive use DDB. > > -#options KDB_TRACE # Print a stack trace for a panic. > > -options DDB # Support DDB. > > +#options KDB_TRACE # Print a stack trace for a panic. > > +options DDB # Support DDB. > > # For full debugger support use this instead: > > -#options GDB # Support remote GDB. > > +#options GDB # Support remote GDB. > > [...] > > It also would be nice if we removed trailing dots in comments one day, > preferreably across all config files we have in the tree. > > ./danfe > Why? I thought our rule about comments is that they're complete sentences, punctuated as such. Of course, I also thought we had a rule that 'device' and 'options' in kernel config is always followed by two spaces then a tab, so that you can comment out lines without ruining the indent, and apparently that's not true either (and I have no idea where I got that notion). -- Ian From owner-svn-src-all@FreeBSD.ORG Sun Dec 21 16:48:58 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AF8CD951; Sun, 21 Dec 2014 16:48:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9051E31DC; Sun, 21 Dec 2014 16:48:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBLGmwIm024887; Sun, 21 Dec 2014 16:48:58 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBLGmwE4024886; Sun, 21 Dec 2014 16:48:58 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201412211648.sBLGmwE4024886@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sun, 21 Dec 2014 16:48:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276021 - head/sys/arm/ti X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2014 16:48:58 -0000 Author: andrew Date: Sun Dec 21 16:48:57 2014 New Revision: 276021 URL: https://svnweb.freebsd.org/changeset/base/276021 Log: Reduce the diff in the Ti aintc between head and arm_intrng Modified: head/sys/arm/ti/aintc.c Modified: head/sys/arm/ti/aintc.c ============================================================================== --- head/sys/arm/ti/aintc.c Sun Dec 21 16:43:56 2014 (r276020) +++ head/sys/arm/ti/aintc.c Sun Dec 21 16:48:57 2014 (r276021) @@ -72,10 +72,10 @@ static struct resource_spec ti_aintc_spe static struct ti_aintc_softc *ti_aintc_sc = NULL; -#define aintc_read_4(reg) \ - bus_space_read_4(ti_aintc_sc->aintc_bst, ti_aintc_sc->aintc_bsh, reg) -#define aintc_write_4(reg, val) \ - bus_space_write_4(ti_aintc_sc->aintc_bst, ti_aintc_sc->aintc_bsh, reg, val) +#define aintc_read_4(_sc, reg) \ + bus_space_read_4((_sc)->aintc_bst, (_sc)->aintc_bsh, (reg)) +#define aintc_write_4(_sc, reg, val) \ + bus_space_write_4((_sc)->aintc_bst, (_sc)->aintc_bsh, (reg), (val)) static int @@ -112,17 +112,17 @@ ti_aintc_attach(device_t dev) ti_aintc_sc = sc; - x = aintc_read_4(INTC_REVISION); + x = aintc_read_4(sc, INTC_REVISION); device_printf(dev, "Revision %u.%u\n",(x >> 4) & 0xF, x & 0xF); /* SoftReset */ - aintc_write_4(INTC_SYSCONFIG, 2); + aintc_write_4(sc, INTC_SYSCONFIG, 2); /* Wait for reset to complete */ - while(!(aintc_read_4(INTC_SYSSTATUS) & 1)); + while(!(aintc_read_4(sc, INTC_SYSSTATUS) & 1)); /*Set Priority Threshold */ - aintc_write_4(INTC_THRESHOLD, 0xFF); + aintc_write_4(sc, INTC_THRESHOLD, 0xFF); return (0); } @@ -146,22 +146,23 @@ DRIVER_MODULE(aintc, simplebus, ti_aintc int arm_get_next_irq(int last_irq) { + struct ti_aintc_softc *sc = ti_aintc_sc; uint32_t active_irq; if (last_irq != -1) { - aintc_write_4(INTC_ISR_CLEAR(last_irq >> 5), + aintc_write_4(sc, INTC_ISR_CLEAR(last_irq >> 5), 1UL << (last_irq & 0x1F)); - aintc_write_4(INTC_CONTROL,1); + aintc_write_4(sc, INTC_CONTROL, 1); } /* Get the next active interrupt */ - active_irq = aintc_read_4(INTC_SIR_IRQ); + active_irq = aintc_read_4(sc, INTC_SIR_IRQ); /* Check for spurious interrupt */ if ((active_irq & 0xffffff80)) { - device_printf(ti_aintc_sc->sc_dev, - "Spurious interrupt detected (0x%08x)\n", active_irq); - aintc_write_4(INTC_SIR_IRQ, 0); + device_printf(sc->sc_dev, + "Spurious interrupt detected (0x%08x)\n", active_irq); + aintc_write_4(sc, INTC_SIR_IRQ, 0); return -1; } @@ -174,13 +175,16 @@ arm_get_next_irq(int last_irq) void arm_mask_irq(uintptr_t nb) { - aintc_write_4(INTC_MIR_SET(nb >> 5), (1UL << (nb & 0x1F))); + struct ti_aintc_softc *sc = ti_aintc_sc; + + aintc_write_4(sc, INTC_MIR_SET(nb >> 5), (1UL << (nb & 0x1F))); } void arm_unmask_irq(uintptr_t nb) { + struct ti_aintc_softc *sc = ti_aintc_sc; arm_irq_memory_barrier(nb); - aintc_write_4(INTC_MIR_CLEAR(nb >> 5), (1UL << (nb & 0x1F))); + aintc_write_4(sc, INTC_MIR_CLEAR(nb >> 5), (1UL << (nb & 0x1F))); } From owner-svn-src-all@FreeBSD.ORG Sun Dec 21 16:56:30 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 14CAACDA; Sun, 21 Dec 2014 16:56:30 +0000 (UTC) Received: from mail-wg0-x233.google.com (mail-wg0-x233.google.com [IPv6:2a00:1450:400c:c00::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 98F7832FE; Sun, 21 Dec 2014 16:56:29 +0000 (UTC) Received: by mail-wg0-f51.google.com with SMTP id x12so4989297wgg.24; Sun, 21 Dec 2014 08:56:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=i5zfwrrjo6zNlGeX7K6k0FwqkwroSaw25sxjEzxSb64=; b=WVC6I7lKgScCGoiSQSj5/jogVxOfoUXrQQ4hcZpMgYP3eGyFmaXSDVA1Ai/OlxCOoE M4851xIlD+d8/qysjax+f6ueIeeuEg5HQW3B9D+rbrgJXMiB0YrpgTia+4OVxiuY8xPU TQbLCPhQ53VLtyV01qlAADOg//2vGoM/LrEP1vKII8wZNh84NdmT+nLauOlRUgmtH++y sqDlFw7W3EaKPEl+waHcGnG50+KVPp0f/T5fUGp9ZFnIx3jM/wS0KdeVxj10Hc/v1lEG xbpIncZ7u5dwPXACfjsX3FM28760MzqwoxNswClUeK9pZ6uqb5fFj84tp2m4t9lNUSxe SswQ== MIME-Version: 1.0 X-Received: by 10.180.20.6 with SMTP id j6mr23337275wie.59.1419180987995; Sun, 21 Dec 2014 08:56:27 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.216.106.195 with HTTP; Sun, 21 Dec 2014 08:56:27 -0800 (PST) In-Reply-To: <20141221084538.GH47144@FreeBSD.org> References: <201412180517.sBI5HICb033295@svn.freebsd.org> <20141221084538.GH47144@FreeBSD.org> Date: Sun, 21 Dec 2014 08:56:27 -0800 X-Google-Sender-Auth: 09q26Jj2lO9GMVJo6ZqwYOD50hA Message-ID: Subject: Re: svn commit: r275875 - head/sys/net80211 From: Adrian Chadd To: Gleb Smirnoff Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2014 16:56:30 -0000 On 21 December 2014 at 00:45, Gleb Smirnoff wrote: > Adrian, > > On Thu, Dec 18, 2014 at 05:17:18AM +0000, Adrian Chadd wrote: > A> Log: > A> Fix the scan handling for 11b->11g upgrades in a world where, well, > A> it's not just 11b/11g. > ... > A> Thanks to: > A> > A> * Everyone who kept poking me about this and wondering why the hell > A> their wifi would eventually stop seeing scan lists. Grr. > A> I eventually snapped this evening and dug back into this code. > > And thanks to you from all of us :) :) Thanks! -adrian > -- > Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Sun Dec 21 16:59:42 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 45CC7FFB; Sun, 21 Dec 2014 16:59:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 32203342D; Sun, 21 Dec 2014 16:59:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBLGxgZN029792; Sun, 21 Dec 2014 16:59:42 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBLGxgb0029791; Sun, 21 Dec 2014 16:59:42 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201412211659.sBLGxgb0029791@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sun, 21 Dec 2014 16:59:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276023 - head/sys/arm/lpc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2014 16:59:42 -0000 Author: andrew Date: Sun Dec 21 16:59:41 2014 New Revision: 276023 URL: https://svnweb.freebsd.org/changeset/base/276023 Log: Reduce the diff between the lpc interrupt controller in head and arm_intrng Modified: head/sys/arm/lpc/lpc_intc.c Modified: head/sys/arm/lpc/lpc_intc.c ============================================================================== --- head/sys/arm/lpc/lpc_intc.c Sun Dec 21 16:49:42 2014 (r276022) +++ head/sys/arm/lpc/lpc_intc.c Sun Dec 21 16:59:41 2014 (r276023) @@ -59,10 +59,10 @@ static void lpc_intc_eoi(void *); static struct lpc_intc_softc *intc_softc = NULL; -#define intc_read_4(reg) \ - bus_space_read_4(intc_softc->li_bst, intc_softc->li_bsh, reg) -#define intc_write_4(reg, val) \ - bus_space_write_4(intc_softc->li_bst, intc_softc->li_bsh, reg, val) +#define intc_read_4(_sc, _reg) \ + bus_space_read_4((_sc)->li_bst, (_sc)->li_bsh, (_reg)) +#define intc_write_4(_sc, _reg, _val) \ + bus_space_write_4((_sc)->li_bst, (_sc)->li_bsh, (_reg), (_val)) static int lpc_intc_probe(device_t dev) @@ -100,12 +100,12 @@ lpc_intc_attach(device_t dev) arm_post_filter = lpc_intc_eoi; /* Clear interrupt status registers and disable all interrupts */ - intc_write_4(LPC_INTC_MIC_ER, 0); - intc_write_4(LPC_INTC_SIC1_ER, 0); - intc_write_4(LPC_INTC_SIC2_ER, 0); - intc_write_4(LPC_INTC_MIC_RSR, ~0); - intc_write_4(LPC_INTC_SIC1_RSR, ~0); - intc_write_4(LPC_INTC_SIC2_RSR, ~0); + intc_write_4(sc, LPC_INTC_MIC_ER, 0); + intc_write_4(sc, LPC_INTC_SIC1_ER, 0); + intc_write_4(sc, LPC_INTC_SIC2_ER, 0); + intc_write_4(sc, LPC_INTC_MIC_RSR, ~0); + intc_write_4(sc, LPC_INTC_SIC1_RSR, ~0); + intc_write_4(sc, LPC_INTC_SIC2_RSR, ~0); return (0); } @@ -128,25 +128,26 @@ DRIVER_MODULE(pic, simplebus, lpc_intc_d int arm_get_next_irq(int last) { + struct lpc_intc_softc *sc = intc_softc; uint32_t value; int i; /* IRQs 0-31 are mapped to LPC_INTC_MIC_SR */ - value = intc_read_4(LPC_INTC_MIC_SR); + value = intc_read_4(sc, LPC_INTC_MIC_SR); for (i = 0; i < 32; i++) { if (value & (1 << i)) return (i); } /* IRQs 32-63 are mapped to LPC_INTC_SIC1_SR */ - value = intc_read_4(LPC_INTC_SIC1_SR); + value = intc_read_4(sc, LPC_INTC_SIC1_SR); for (i = 0; i < 32; i++) { if (value & (1 << i)) return (i + 32); } /* IRQs 64-95 are mapped to LPC_INTC_SIC2_SR */ - value = intc_read_4(LPC_INTC_SIC2_SR); + value = intc_read_4(sc, LPC_INTC_SIC2_SR); for (i = 0; i < 32; i++) { if (value & (1 << i)) return (i + 64); @@ -158,6 +159,7 @@ arm_get_next_irq(int last) void arm_mask_irq(uintptr_t nb) { + struct lpc_intc_softc *sc = intc_softc; int reg; uint32_t value; @@ -174,14 +176,15 @@ arm_mask_irq(uintptr_t nb) reg = LPC_INTC_MIC_ER; /* Clear bit in ER register */ - value = intc_read_4(reg); + value = intc_read_4(sc, reg); value &= ~(1 << nb); - intc_write_4(reg, value); + intc_write_4(sc, reg, value); } void arm_unmask_irq(uintptr_t nb) { + struct lpc_intc_softc *sc = intc_softc; int reg; uint32_t value; @@ -195,14 +198,15 @@ arm_unmask_irq(uintptr_t nb) reg = LPC_INTC_MIC_ER; /* Set bit in ER register */ - value = intc_read_4(reg); + value = intc_read_4(sc, reg); value |= (1 << nb); - intc_write_4(reg, value); + intc_write_4(sc, reg, value); } static void lpc_intc_eoi(void *data) { + struct lpc_intc_softc *sc = intc_softc; int reg; int nb = (int)data; uint32_t value; @@ -217,9 +221,9 @@ lpc_intc_eoi(void *data) reg = LPC_INTC_MIC_RSR; /* Set bit in RSR register */ - value = intc_read_4(reg); + value = intc_read_4(sc, reg); value |= (1 << nb); - intc_write_4(reg, value); + intc_write_4(sc, reg, value); } From owner-svn-src-all@FreeBSD.ORG Sun Dec 21 17:10:26 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0A7964A5; Sun, 21 Dec 2014 17:10:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EB2C73A34; Sun, 21 Dec 2014 17:10:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBLHAP4Z036719; Sun, 21 Dec 2014 17:10:25 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBLHAPWq036718; Sun, 21 Dec 2014 17:10:25 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201412211710.sBLHAPWq036718@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 21 Dec 2014 17:10:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276026 - head/sys/boot/uboot/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2014 17:10:26 -0000 Author: ian Date: Sun Dec 21 17:10:24 2014 New Revision: 276026 URL: https://svnweb.freebsd.org/changeset/base/276026 Log: Allow whitspace to appear between device name and unit number in loaderdev. This allows the same value to be used in u-boot commands and the loaderdev env var that gets passed to ubldr, for example 'fatload mmc 1 ${bootfile}". Modified: head/sys/boot/uboot/common/main.c Modified: head/sys/boot/uboot/common/main.c ============================================================================== --- head/sys/boot/uboot/common/main.c Sun Dec 21 17:09:01 2014 (r276025) +++ head/sys/boot/uboot/common/main.c Sun Dec 21 17:10:24 2014 (r276026) @@ -212,10 +212,11 @@ get_load_device(int *type, int *unit, in p = get_device_type(devstr, type); - /* - * Empty device string, or unknown device name, or a bare, known - * device name. - */ + /* Ignore optional spaces after the device name. */ + while (*p == ' ') + p++; + + /* Unknown device name, or a known name without unit number. */ if ((*type == -1) || (*p == '\0')) { return; } From owner-svn-src-all@FreeBSD.ORG Sun Dec 21 17:21:30 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C110D71E; Sun, 21 Dec 2014 17:21:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A211B3C2C; Sun, 21 Dec 2014 17:21:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBLHLUYw040880; Sun, 21 Dec 2014 17:21:30 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBLHLUZu040879; Sun, 21 Dec 2014 17:21:30 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201412211721.sBLHLUZu040879@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Sun, 21 Dec 2014 17:21:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276027 - head/usr.sbin/bsdinstall/scripts X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2014 17:21:31 -0000 Author: smh Date: Sun Dec 21 17:21:29 2014 New Revision: 276027 URL: https://svnweb.freebsd.org/changeset/base/276027 Log: Switch zfsboot installer force 4K option to use vfs.zfs.min_auto_ashift=12 Previously we used gnop(8) to fake 4K sector size disks but ZFS now has a sysctl to control this when creating new top level vdev's so use that instead. Differential Revision: D566 MFC after: 1 month Sponsored by: Multiplay Modified: head/usr.sbin/bsdinstall/scripts/zfsboot Modified: head/usr.sbin/bsdinstall/scripts/zfsboot ============================================================================== --- head/usr.sbin/bsdinstall/scripts/zfsboot Sun Dec 21 17:10:24 2014 (r276026) +++ head/usr.sbin/bsdinstall/scripts/zfsboot Sun Dec 21 17:21:29 2014 (r276027) @@ -65,9 +65,9 @@ f_include $BSDCFG_SHARE/variable.subr : ${ZFSBOOT_VDEV_TYPE:=stripe} # -# Should we use gnop(8) to configure a transparent mapping to 4K sectors? +# Should we use sysctl(8) vfs.zfs.min_auto_ashift=12 to force 4K sectors? # -: ${ZFSBOOT_GNOP_4K_FORCE_ALIGN:=1} +: ${ZFSBOOT_FORCE_4K_SECTORS:=1} # # Should we use geli(8) to encrypt the drives? @@ -185,8 +185,6 @@ ECHO_APPEND='echo "%s" >> "%s"' GELI_ATTACH='geli attach -j - -k "%s" "%s"' GELI_DETACH_F='geli detach -f "%s"' GELI_PASSWORD_INIT='geli init -b -B "%s" -e %s -J - -K "%s" -l 256 -s 4096 "%s"' -GNOP_CREATE='gnop create -S 4096 "%s"' -GNOP_DESTROY='gnop destroy "%s"' GPART_ADD='gpart add -t %s "%s"' GPART_ADD_INDEX='gpart add -i %s -t %s "%s"' GPART_ADD_INDEX_WITH_SIZE='gpart add -i %s -t %s -s %s "%s"' @@ -205,6 +203,7 @@ PRINTF_CONF="printf '%s=\"%%s\"\\\n' %s PRINTF_FSTAB='printf "$FSTAB_FMT" "%s" "%s" "%s" "%s" "%s" "%s" >> "%s"' SHELL_TRUNCATE=':> "%s"' SWAP_GMIRROR_LABEL='gmirror label swap %s' +SYSCTL_ZFS_MIN_ASHIFT_12='sysctl vfs.zfs.min_auto_ashift=12' UMOUNT='umount "%s"' ZFS_CREATE_WITH_OPTIONS='zfs create %s "%s"' ZFS_SET='zfs set "%s" "%s"' @@ -236,7 +235,7 @@ msg_encrypt_disks="Encrypt Disks?" msg_encrypt_disks_help="Use geli(8) to encrypt all data partitions" msg_error="Error" msg_force_4k_sectors="Force 4K Sectors?" -msg_force_4k_sectors_help="Use gnop(8) to configure forced 4K sector alignment" +msg_force_4k_sectors_help="Use sysctl(8) vfs.zfs.min_auto_ashift=12 to force 4K sectors" msg_freebsd_installer="FreeBSD Installer" msg_geli_password="Enter a strong passphrase, used to protect your encryption keys. You will be required to enter this passphrase each time the system is booted" msg_geli_setup="Initializing encryption on selected disks,\n this will take several seconds per disk" @@ -315,7 +314,7 @@ dialog_menu_main() local usegeli="$msg_no" local swapgeli="$msg_no" local swapmirror="$msg_no" - [ "$ZFSBOOT_GNOP_4K_FORCE_ALIGN" ] && force4k="$msg_yes" + [ "$ZFSBOOT_FORCE_4K_SECTORS" ] && force4k="$msg_yes" [ "$ZFSBOOT_GELI_ENCRYPTION" ] && usegeli="$msg_yes" [ "$ZFSBOOT_SWAP_ENCRYPTION" ] && swapgeli="$msg_yes" [ "$ZFSBOOT_SWAP_MIRROR" ] && swapmirror="$msg_yes" @@ -1062,36 +1061,22 @@ zfs_create_boot() # Prepare the disks and build pool device list(s) # f_dprintf "$funcname: Preparing disk partitions for ZFS pool..." - [ "$ZFSBOOT_GNOP_4K_FORCE_ALIGN" ] && - f_dprintf "$funcname: With 4k alignment using gnop(8)..." + + # Force 4K sectors using vfs.zfs.min_auto_ashift=12 + if [ "$ZFSBOOT_FORCE_4K_SECTORS" ]; then + f_dprintf "$funcname: With 4K sectors..." + f_eval_catch $funcname sysctl "$SYSCTL_ZFS_MIN_ASHIFT_12" \ + || return $FAILURE + fi local n=0 for disk in $disks; do zfs_create_diskpart $disk $n || return $FAILURE # Now $bootpart, $targetpart, and $swappart are set (suffix # for $disk) - - # Forced 4k alignment support using Geom NOP (see gnop(8)) - if [ "$ZFSBOOT_GNOP_4K_FORCE_ALIGN" ]; then - if [ "$ZFSBOOT_BOOT_POOL" ]; then - boot_vdevs="$boot_vdevs $disk$bootpart.nop" - f_eval_catch $funcname gnop "$GNOP_CREATE" \ - $disk$bootpart || return $FAILURE - fi - # Don't gnop encrypted partition - if [ "$ZFSBOOT_GELI_ENCRYPTION" ]; then - zroot_vdevs="$zroot_vdevs $disk$targetpart.eli" - else - zroot_vdevs="$zroot_vdevs $disk$targetpart.nop" - f_eval_catch $funcname gnop "$GNOP_CREATE" \ - $disk$targetpart || - return $FAILURE - fi - else - if [ "$ZFSBOOT_BOOT_POOL" ]; then - boot_vdevs="$boot_vdevs $disk$bootpart" - fi - zroot_vdevs="$zroot_vdevs $disk$targetpart" + if [ "$ZFSBOOT_BOOT_POOL" ]; then + boot_vdevs="$boot_vdevs $disk$bootpart" fi + zroot_vdevs="$zroot_vdevs $disk$targetpart" n=$(( $n + 1 )) done # disks @@ -1266,18 +1251,6 @@ zfs_create_boot() "$bootpool_name" || return $FAILURE fi - # Destroy the gnop devices (if enabled) - for disk in ${ZFSBOOT_GNOP_4K_FORCE_ALIGN:+$disks}; do - if [ "$ZFSBOOT_BOOT_POOL" ]; then - f_eval_catch -d $funcname gnop "$GNOP_DESTROY" \ - $disk$bootpart.nop - fi - if [ ! "$ZFSBOOT_GELI_ENCRYPTION" ]; then - f_eval_catch -d $funcname gnop "$GNOP_DESTROY" \ - $disk$targetpart.nop - fi - done - # MBR boot loader touch-up if [ "$ZFSBOOT_PARTITION_SCHEME" = "MBR" ]; then f_dprintf "$funcname: Updating MBR boot loader on disks..." @@ -1544,10 +1517,10 @@ while :; do ;; ?" $msg_force_4k_sectors") # Toggle the variable referenced both by the menu and later - if [ "$ZFSBOOT_GNOP_4K_FORCE_ALIGN" ]; then - ZFSBOOT_GNOP_4K_FORCE_ALIGN= + if [ "$ZFSBOOT_FORCE_4K_SECTORS" ]; then + ZFSBOOT_FORCE_4K_SECTORS= else - ZFSBOOT_GNOP_4K_FORCE_ALIGN=1 + ZFSBOOT_FORCE_4K_SECTORS=1 fi ;; ?" $msg_encrypt_disks") @@ -1555,7 +1528,7 @@ while :; do if [ "$ZFSBOOT_GELI_ENCRYPTION" ]; then ZFSBOOT_GELI_ENCRYPTION= else - ZFSBOOT_GNOP_4K_FORCE_ALIGN=1 + ZFSBOOT_FORCE_4K_SECTORS=1 ZFSBOOT_GELI_ENCRYPTION=1 fi ;; From owner-svn-src-all@FreeBSD.ORG Sun Dec 21 17:25:23 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EAB068B3; Sun, 21 Dec 2014 17:25:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D6E333C62; Sun, 21 Dec 2014 17:25:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBLHPMPx044525; Sun, 21 Dec 2014 17:25:22 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBLHPMai044524; Sun, 21 Dec 2014 17:25:22 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201412211725.sBLHPMai044524@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sun, 21 Dec 2014 17:25:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276028 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2014 17:25:23 -0000 Author: andrew Date: Sun Dec 21 17:25:21 2014 New Revision: 276028 URL: https://svnweb.freebsd.org/changeset/base/276028 Log: Further reduce the diff between the arm_intrng gic driver and the version in head. Modified: head/sys/arm/arm/gic.c Modified: head/sys/arm/arm/gic.c ============================================================================== --- head/sys/arm/arm/gic.c Sun Dec 21 17:21:29 2014 (r276027) +++ head/sys/arm/arm/gic.c Sun Dec 21 17:25:21 2014 (r276028) @@ -99,13 +99,13 @@ __FBSDID("$FreeBSD$"); #define GICD_ICFGR_TRIG_MASK 0x2 struct arm_gic_softc { + device_t gic_dev; struct resource * gic_res[3]; bus_space_tag_t gic_c_bst; bus_space_tag_t gic_d_bst; bus_space_handle_t gic_c_bsh; bus_space_handle_t gic_d_bsh; uint8_t ver; - device_t dev; struct mtx mutex; uint32_t nirqs; }; @@ -159,17 +159,13 @@ void gic_init_secondary(void) { struct arm_gic_softc *sc = arm_gic_sc; - int i, nirqs; + int i; - /* Get the number of interrupts */ - nirqs = gic_d_read_4(sc, GICD_TYPER); - nirqs = 32 * ((nirqs & 0x1f) + 1); - - for (i = 0; i < nirqs; i += 4) + for (i = 0; i < sc->nirqs; i += 4) gic_d_write_4(sc, GICD_IPRIORITYR(i >> 2), 0); /* Set all the interrupts to be in Group 0 (secure) */ - for (i = 0; i < nirqs; i += 32) { + for (i = 0; i < sc->nirqs; i += 32) { gic_d_write_4(sc, GICD_IGROUPR(i >> 5), 0); } @@ -246,13 +242,15 @@ arm_gic_attach(device_t dev) return (ENXIO); sc = device_get_softc(dev); - sc->dev = dev; if (bus_alloc_resources(dev, arm_gic_spec, sc->gic_res)) { device_printf(dev, "could not allocate resources\n"); return (ENXIO); } + sc->gic_dev = dev; + arm_gic_sc = sc; + /* Initialize mutex */ mtx_init(&sc->mutex, "GIC lock", "", MTX_SPIN); @@ -264,8 +262,6 @@ arm_gic_attach(device_t dev) sc->gic_c_bst = rman_get_bustag(sc->gic_res[1]); sc->gic_c_bsh = rman_get_bushandle(sc->gic_res[1]); - arm_gic_sc = sc; - /* Disable interrupt forwarding to the CPU interface */ gic_d_write_4(sc, GICD_CTLR, 0x00); @@ -315,25 +311,6 @@ arm_gic_attach(device_t dev) return (0); } -static device_method_t arm_gic_methods[] = { - DEVMETHOD(device_probe, arm_gic_probe), - DEVMETHOD(device_attach, arm_gic_attach), - { 0, 0 } -}; - -static driver_t arm_gic_driver = { - "gic", - arm_gic_methods, - sizeof(struct arm_gic_softc), -}; - -static devclass_t arm_gic_devclass; - -EARLY_DRIVER_MODULE(gic, simplebus, arm_gic_driver, arm_gic_devclass, 0, 0, - BUS_PASS_INTERRUPT + BUS_PASS_ORDER_MIDDLE); -EARLY_DRIVER_MODULE(gic, ofwbus, arm_gic_driver, arm_gic_devclass, 0, 0, - BUS_PASS_INTERRUPT + BUS_PASS_ORDER_MIDDLE); - static void gic_post_filter(void *arg) { @@ -395,6 +372,7 @@ gic_config_irq(int irq, enum intr_trigge enum intr_polarity pol) { struct arm_gic_softc *sc = arm_gic_sc; + device_t dev = sc->gic_dev; uint32_t reg; uint32_t mask; @@ -439,7 +417,7 @@ gic_config_irq(int irq, enum intr_trigge return (0); invalid_args: - device_printf(sc->dev, "gic_config_irg, invalid parameters\n"); + device_printf(dev, "gic_config_irg, invalid parameters\n"); return (EINVAL); } @@ -470,6 +448,7 @@ pic_ipi_get(int i) return (0); return (i); } + return (0x3ff); } @@ -479,3 +458,22 @@ pic_ipi_clear(int ipi) } #endif +static device_method_t arm_gic_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, arm_gic_probe), + DEVMETHOD(device_attach, arm_gic_attach), + { 0, 0 } +}; + +static driver_t arm_gic_driver = { + "gic", + arm_gic_methods, + sizeof(struct arm_gic_softc), +}; + +static devclass_t arm_gic_devclass; + +EARLY_DRIVER_MODULE(gic, simplebus, arm_gic_driver, arm_gic_devclass, 0, 0, + BUS_PASS_INTERRUPT + BUS_PASS_ORDER_MIDDLE); +EARLY_DRIVER_MODULE(gic, ofwbus, arm_gic_driver, arm_gic_devclass, 0, 0, + BUS_PASS_INTERRUPT + BUS_PASS_ORDER_MIDDLE); From owner-svn-src-all@FreeBSD.ORG Sun Dec 21 21:11:55 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D92A5B84; Sun, 21 Dec 2014 21:11:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C4DAA2FFE; Sun, 21 Dec 2014 21:11:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBLLBtrW066400; Sun, 21 Dec 2014 21:11:55 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBLLBtLP066399; Sun, 21 Dec 2014 21:11:55 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201412212111.sBLLBtLP066399@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 21 Dec 2014 21:11:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276029 - head/sys/arm/ti X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2014 21:11:56 -0000 Author: ian Date: Sun Dec 21 21:11:54 2014 New Revision: 276029 URL: https://svnweb.freebsd.org/changeset/base/276029 Log: Remove a volatile qualifier on return type that is ignored and results in a -Wreturn-type warning when compiled with gcc. Modified: head/sys/arm/ti/ti_wdt.c Modified: head/sys/arm/ti/ti_wdt.c ============================================================================== --- head/sys/arm/ti/ti_wdt.c Sun Dec 21 17:25:21 2014 (r276028) +++ head/sys/arm/ti/ti_wdt.c Sun Dec 21 21:11:54 2014 (r276029) @@ -95,7 +95,7 @@ static devclass_t ti_wdt_devclass; DRIVER_MODULE(ti_wdt, simplebus, ti_wdt_driver, ti_wdt_devclass, 0, 0); -static volatile __inline uint32_t +static __inline uint32_t ti_wdt_reg_read(struct ti_wdt_softc *sc, uint32_t reg) { From owner-svn-src-all@FreeBSD.ORG Sun Dec 21 21:23:54 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6032EC8; Sun, 21 Dec 2014 21:23:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4C00B3139; Sun, 21 Dec 2014 21:23:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBLLNsNn072211; Sun, 21 Dec 2014 21:23:54 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBLLNsQv072210; Sun, 21 Dec 2014 21:23:54 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201412212123.sBLLNsQv072210@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 21 Dec 2014 21:23:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276030 - head/sys/arm/at91 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2014 21:23:54 -0000 Author: ian Date: Sun Dec 21 21:23:53 2014 New Revision: 276030 URL: https://svnweb.freebsd.org/changeset/base/276030 Log: Eliminate a redundant declaration. Modified: head/sys/arm/at91/at91_machdep.c Modified: head/sys/arm/at91/at91_machdep.c ============================================================================== --- head/sys/arm/at91/at91_machdep.c Sun Dec 21 21:11:54 2014 (r276029) +++ head/sys/arm/at91/at91_machdep.c Sun Dec 21 21:23:53 2014 (r276030) @@ -117,8 +117,6 @@ extern struct bus_space at91_bs_tag; struct pv_addr kernel_pt_table[NUM_KERNEL_PTS]; -extern uint32_t at91_master_clock; - /* Static device mappings. */ const struct arm_devmap_entry at91_devmap[] = { /* From owner-svn-src-all@FreeBSD.ORG Sun Dec 21 21:24:20 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D1B0C207; Sun, 21 Dec 2014 21:24:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BDB2A3146; Sun, 21 Dec 2014 21:24:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBLLOKnH072359; Sun, 21 Dec 2014 21:24:20 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBLLOK0k072358; Sun, 21 Dec 2014 21:24:20 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201412212124.sBLLOK0k072358@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 21 Dec 2014 21:24:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276031 - head/sys/dev/beri/virtio X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2014 21:24:20 -0000 Author: ian Date: Sun Dec 21 21:24:19 2014 New Revision: 276031 URL: https://svnweb.freebsd.org/changeset/base/276031 Log: Eliminate a "cast discards qualifiers" warning when building with gcc. Modified: head/sys/dev/beri/virtio/virtio.c Modified: head/sys/dev/beri/virtio/virtio.c ============================================================================== --- head/sys/dev/beri/virtio/virtio.c Sun Dec 21 21:23:53 2014 (r276030) +++ head/sys/dev/beri/virtio/virtio.c Sun Dec 21 21:24:19 2014 (r276031) @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -156,7 +157,7 @@ vq_getchain(uint32_t offs, struct vqueue break; next = be16toh(vp->next); } - paddr_unmap((void *)vindir, be32toh(vdir->len)); + paddr_unmap(__DEVOLATILE(void *, vindir), be32toh(vdir->len)); } if ((be16toh(vdir->flags) & VRING_DESC_F_NEXT) == 0) From owner-svn-src-all@FreeBSD.ORG Sun Dec 21 21:27:14 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AFAD144A; Sun, 21 Dec 2014 21:27:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9AD46318E; Sun, 21 Dec 2014 21:27:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBLLREnm073009; Sun, 21 Dec 2014 21:27:14 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBLLRDoR073003; Sun, 21 Dec 2014 21:27:13 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201412212127.sBLLRDoR073003@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sun, 21 Dec 2014 21:27:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276032 - in head/sys/arm: arm include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2014 21:27:14 -0000 Author: andrew Date: Sun Dec 21 21:27:12 2014 New Revision: 276032 URL: https://svnweb.freebsd.org/changeset/base/276032 Log: Pull out the fdt mapping code into intr.c. The arm_intrng branch also defines this function allowing the mapping method to change when we move to it. Modified: head/sys/arm/arm/intr.c head/sys/arm/arm/nexus.c head/sys/arm/include/intr.h Modified: head/sys/arm/arm/intr.c ============================================================================== --- head/sys/arm/arm/intr.c Sun Dec 21 21:24:19 2014 (r276031) +++ head/sys/arm/arm/intr.c Sun Dec 21 21:27:12 2014 (r276032) @@ -36,8 +36,11 @@ * Soft interrupt and other generic interrupt functions. */ +#include "opt_platform.h" + #include __FBSDID("$FreeBSD$"); + #include #include #include @@ -47,10 +50,16 @@ __FBSDID("$FreeBSD$"); #include #include #include + #include #include #include +#ifdef FDT +#include +#include +#endif + #define INTRNAME_LEN (MAXCOMLEN + 1) typedef void (*mask_fn)(void *); @@ -89,6 +98,36 @@ intr_init(void *unused) SYSINIT(intr_init, SI_SUB_INTR, SI_ORDER_FIRST, intr_init, NULL); +#ifdef FDT +int +arm_fdt_map_irq(phandle_t iparent, pcell_t *intr, int icells) +{ + fdt_pic_decode_t intr_decode; + phandle_t intr_parent; + int i, rv, interrupt, trig, pol; + + intr_parent = OF_node_from_xref(iparent); + for (i = 0; i < icells; i++) + intr[i] = cpu_to_fdt32(intr[i]); + + for (i = 0; fdt_pic_table[i] != NULL; i++) { + intr_decode = fdt_pic_table[i]; + rv = intr_decode(intr_parent, intr, &interrupt, &trig, &pol); + + if (rv == 0) { + /* This was recognized as our PIC and decoded. */ + interrupt = FDT_MAP_IRQ(intr_parent, interrupt); + return (interrupt); + } + } + + /* Not in table, so guess */ + interrupt = FDT_MAP_IRQ(intr_parent, fdt32_to_cpu(intr[0])); + + return (interrupt); +} +#endif + void arm_setup_irqhandler(const char *name, driver_filter_t *filt, void (*hand)(void*), void *arg, int irq, int flags, void **cookiep) Modified: head/sys/arm/arm/nexus.c ============================================================================== --- head/sys/arm/arm/nexus.c Sun Dec 21 21:24:19 2014 (r276031) +++ head/sys/arm/arm/nexus.c Sun Dec 21 21:27:12 2014 (r276032) @@ -39,6 +39,8 @@ * and I/O memory address space. */ +#include "opt_platform.h" + #include __FBSDID("$FreeBSD$"); @@ -60,10 +62,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include "opt_platform.h" - #ifdef FDT -#include #include #include "ofw_bus_if.h" #endif @@ -351,28 +350,7 @@ static int nexus_ofw_map_intr(device_t dev, device_t child, phandle_t iparent, int icells, pcell_t *intr) { - fdt_pic_decode_t intr_decode; - phandle_t intr_parent; - int i, rv, interrupt, trig, pol; - - intr_parent = OF_node_from_xref(iparent); - for (i = 0; i < icells; i++) - intr[i] = cpu_to_fdt32(intr[i]); - - for (i = 0; fdt_pic_table[i] != NULL; i++) { - intr_decode = fdt_pic_table[i]; - rv = intr_decode(intr_parent, intr, &interrupt, &trig, &pol); - - if (rv == 0) { - /* This was recognized as our PIC and decoded. */ - interrupt = FDT_MAP_IRQ(intr_parent, interrupt); - return (interrupt); - } - } - - /* Not in table, so guess */ - interrupt = FDT_MAP_IRQ(intr_parent, fdt32_to_cpu(intr[0])); - return (interrupt); + return (arm_fdt_map_irq(iparent, intr, icells)); } #endif Modified: head/sys/arm/include/intr.h ============================================================================== --- head/sys/arm/include/intr.h Sun Dec 21 21:24:19 2014 (r276031) +++ head/sys/arm/include/intr.h Sun Dec 21 21:27:12 2014 (r276032) @@ -39,6 +39,10 @@ #ifndef _MACHINE_INTR_H_ #define _MACHINE_INTR_H_ +#ifdef FDT +#include +#endif + /* XXX move to std.* files? */ #ifdef CPU_XSCALE_81342 #define NIRQ 128 @@ -85,4 +89,8 @@ void gic_init_secondary(void); int gic_decode_fdt(uint32_t iparentnode, uint32_t *intrcells, int *interrupt, int *trig, int *pol); +#ifdef FDT +int arm_fdt_map_irq(phandle_t, pcell_t *, int); +#endif + #endif /* _MACHINE_INTR_H */ From owner-svn-src-all@FreeBSD.ORG Sun Dec 21 21:38:13 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B1FDE816; Sun, 21 Dec 2014 21:38:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9D07932FA; Sun, 21 Dec 2014 21:38:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBLLcDqL078600; Sun, 21 Dec 2014 21:38:13 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBLLcD9g078599; Sun, 21 Dec 2014 21:38:13 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201412212138.sBLLcD9g078599@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sun, 21 Dec 2014 21:38:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276033 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2014 21:38:13 -0000 Author: andrew Date: Sun Dec 21 21:38:12 2014 New Revision: 276033 URL: https://svnweb.freebsd.org/changeset/base/276033 Log: Fix the unwinder to get past functions with no stack but may cause an exception. In this case no registers will be updated but the link register will be copied to the program counter to be used to find the calling function. In this case the program counter may be updated and we should continue with the trace. Modified: head/sys/arm/arm/db_trace.c Modified: head/sys/arm/arm/db_trace.c ============================================================================== --- head/sys/arm/arm/db_trace.c Sun Dec 21 21:27:12 2014 (r276032) +++ head/sys/arm/arm/db_trace.c Sun Dec 21 21:38:12 2014 (r276033) @@ -345,9 +345,16 @@ db_unwind_tab(struct unwind_state *state /* * The program counter was not updated, load it from the link register. */ - if (state->registers[PC] == 0) + if (state->registers[PC] == 0) { state->registers[PC] = state->registers[LR]; + /* + * If the program counter changed, flag it in the update mask. + */ + if (state->start_pc != state->registers[PC]) + state->update_mask |= 1 << PC; + } + return 0; } From owner-svn-src-all@FreeBSD.ORG Sun Dec 21 21:52:11 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 71D2BBB6; Sun, 21 Dec 2014 21:52:11 +0000 (UTC) Received: from nibbler.fubar.geek.nz (nibbler.fubar.geek.nz [199.48.134.198]) by mx1.freebsd.org (Postfix) with ESMTP id 5475A3A12; Sun, 21 Dec 2014 21:52:10 +0000 (UTC) Received: from bender.lan (97e078e7.skybroadband.com [151.224.120.231]) by nibbler.fubar.geek.nz (Postfix) with ESMTPSA id D9C697328F; Sun, 21 Dec 2014 21:52:02 +0000 (UTC) Date: Sun, 21 Dec 2014 21:51:55 +0000 From: Andrew Turner To: Ian Lepore Subject: Re: svn commit: r276031 - head/sys/dev/beri/virtio Message-ID: <20141221215155.7228fef8@bender.lan> In-Reply-To: <201412212124.sBLLOK0k072358@svn.freebsd.org> References: <201412212124.sBLLOK0k072358@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2014 21:52:11 -0000 On Sun, 21 Dec 2014 21:24:20 +0000 (UTC) Ian Lepore wrote: > Author: ian > Date: Sun Dec 21 21:24:19 2014 > New Revision: 276031 > URL: https://svnweb.freebsd.org/changeset/base/276031 > > Log: > Eliminate a "cast discards qualifiers" warning when building with > gcc. > > Modified: > head/sys/dev/beri/virtio/virtio.c > > Modified: head/sys/dev/beri/virtio/virtio.c > ============================================================================== > --- head/sys/dev/beri/virtio/virtio.c Sun Dec 21 21:23:53 > 2014 (r276030) +++ head/sys/dev/beri/virtio/virtio.c > Sun Dec 21 21:24:19 2014 (r276031) @@ -38,6 +38,7 @@ > __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include Don't we already have this include just above the __FBSDID line? Andrew From owner-svn-src-all@FreeBSD.ORG Sun Dec 21 22:18:31 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DA1022D5; Sun, 21 Dec 2014 22:18:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BA6D03EDD; Sun, 21 Dec 2014 22:18:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBLMIVw3099947; Sun, 21 Dec 2014 22:18:31 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBLMIVom099943; Sun, 21 Dec 2014 22:18:31 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201412212218.sBLMIVom099943@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sun, 21 Dec 2014 22:18:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276037 - head/bin/sh X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2014 22:18:32 -0000 Author: jilles Date: Sun Dec 21 22:18:30 2014 New Revision: 276037 URL: https://svnweb.freebsd.org/changeset/base/276037 Log: sh: Remove EXP_REDIR. EXP_REDIR was supposed to generate pathnames in redirection if exactly one file matches, as permitted but not required by POSIX in interactive mode. It is unlikely this will be implemented. No functional change is intended. MFC after: 1 week Modified: head/bin/sh/eval.c head/bin/sh/expand.c head/bin/sh/expand.h Modified: head/bin/sh/eval.c ============================================================================== --- head/bin/sh/eval.c Sun Dec 21 22:08:17 2014 (r276036) +++ head/bin/sh/eval.c Sun Dec 21 22:18:30 2014 (r276037) @@ -539,13 +539,13 @@ expredir(union node *n) case NFROMTO: case NAPPEND: case NCLOBBER: - expandarg(redir->nfile.fname, &fn, EXP_TILDE | EXP_REDIR); + expandarg(redir->nfile.fname, &fn, EXP_TILDE); redir->nfile.expfname = fn.list->text; break; case NFROMFD: case NTOFD: if (redir->ndup.vname) { - expandarg(redir->ndup.vname, &fn, EXP_TILDE | EXP_REDIR); + expandarg(redir->ndup.vname, &fn, EXP_TILDE); fixredir(redir, fn.list->text, 1); } break; Modified: head/bin/sh/expand.c ============================================================================== --- head/bin/sh/expand.c Sun Dec 21 22:08:17 2014 (r276036) +++ head/bin/sh/expand.c Sun Dec 21 22:18:30 2014 (r276037) @@ -171,17 +171,12 @@ expandarg(union node *arg, struct arglis STPUTC('\0', expdest); p = grabstackstr(expdest); exparg.lastp = &exparg.list; - /* - * TODO - EXP_REDIR - */ if (flag & EXP_FULL) { ifsbreakup(p, &exparg); *exparg.lastp = NULL; exparg.lastp = &exparg.list; expandmeta(exparg.list, flag); } else { - if (flag & EXP_REDIR) /*XXX - for now, just remove escapes */ - rmescapes(p); sp = (struct strlist *)stalloc(sizeof (struct strlist)); sp->text = p; *exparg.lastp = sp; @@ -209,7 +204,7 @@ expandarg(union node *arg, struct arglis * expansion, and tilde expansion if requested via EXP_TILDE/EXP_VARTILDE. * Processing ends at a CTLENDVAR or CTLENDARI character as well as '\0'. * This is used to expand word in ${var+word} etc. - * If EXP_FULL, EXP_CASE or EXP_REDIR are set, keep and/or generate CTLESC + * If EXP_FULL or EXP_CASE are set, keep and/or generate CTLESC * characters to allow for further processing. * If EXP_FULL is set, also preserve CTLQUOTEMARK characters. */ @@ -217,7 +212,7 @@ static char * argstr(char *p, int flag) { char c; - int quotes = flag & (EXP_FULL | EXP_CASE | EXP_REDIR); /* do CTLESC */ + int quotes = flag & (EXP_FULL | EXP_CASE); /* do CTLESC */ int firsteq = 1; int split_lit; int lit_quoted; @@ -303,7 +298,7 @@ exptilde(char *p, int flag) char c, *startp = p; struct passwd *pw; char *home; - int quotes = flag & (EXP_FULL | EXP_CASE | EXP_REDIR); + int quotes = flag & (EXP_FULL | EXP_CASE); while ((c = *p) != '\0') { switch(c) { @@ -437,7 +432,7 @@ expbackq(union node *cmd, int quoted, in char lastc; int startloc = dest - stackblock(); char const *syntax = quoted? DQSYNTAX : BASESYNTAX; - int quotes = flag & (EXP_FULL | EXP_CASE | EXP_REDIR); + int quotes = flag & (EXP_FULL | EXP_CASE); size_t nnl; INTOFF; @@ -637,7 +632,7 @@ evalvar(char *p, int flag) int varlen; int varlenb; int easy; - int quotes = flag & (EXP_FULL | EXP_CASE | EXP_REDIR); + int quotes = flag & (EXP_FULL | EXP_CASE); varflags = (unsigned char)*p++; subtype = varflags & VSTYPE; @@ -862,7 +857,7 @@ varisset(const char *name, int nulok) static void strtodest(const char *p, int flag, int subtype, int quoted) { - if (flag & (EXP_FULL | EXP_CASE | EXP_REDIR) && subtype != VSLENGTH) + if (flag & (EXP_FULL | EXP_CASE) && subtype != VSLENGTH) STPUTS_QUOTES(p, quoted ? DQSYNTAX : BASESYNTAX, expdest); else STPUTS(p, expdest); @@ -1104,7 +1099,6 @@ expandmeta(struct strlist *str, int flag struct strlist **savelastp; struct strlist *sp; char c; - /* TODO - EXP_REDIR */ while (str) { savelastp = exparg.lastp; Modified: head/bin/sh/expand.h ============================================================================== --- head/bin/sh/expand.h Sun Dec 21 22:08:17 2014 (r276036) +++ head/bin/sh/expand.h Sun Dec 21 22:18:30 2014 (r276037) @@ -50,7 +50,6 @@ struct arglist { #define EXP_FULL 0x1 /* perform word splitting & file globbing */ #define EXP_TILDE 0x2 /* do normal tilde expansion */ #define EXP_VARTILDE 0x4 /* expand tildes in an assignment */ -#define EXP_REDIR 0x8 /* file glob for a redirection (1 match only) */ #define EXP_CASE 0x10 /* keeps quotes around for CASE pattern */ #define EXP_SPLIT_LIT 0x20 /* IFS split literal text ${v+-a b c} */ #define EXP_LIT_QUOTED 0x40 /* for EXP_SPLIT_LIT, start off quoted */ From owner-svn-src-all@FreeBSD.ORG Sun Dec 21 23:10:01 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C2D0C845; Sun, 21 Dec 2014 23:10:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AE9E72BFC; Sun, 21 Dec 2014 23:10:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBLNA1LH026271; Sun, 21 Dec 2014 23:10:01 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBLNA0jX026257; Sun, 21 Dec 2014 23:10:00 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201412212310.sBLNA0jX026257@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sun, 21 Dec 2014 23:10:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276038 - head/bin/sh X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2014 23:10:01 -0000 Author: jilles Date: Sun Dec 21 23:09:59 2014 New Revision: 276038 URL: https://svnweb.freebsd.org/changeset/base/276038 Log: sh: Move some code from onint() to onsig(), making onint() noreturn. As a result, the INTON macro which is used many times generates fewer bytes of code. Modified: head/bin/sh/error.c head/bin/sh/error.h head/bin/sh/trap.c head/bin/sh/trap.h Modified: head/bin/sh/error.c ============================================================================== --- head/bin/sh/error.c Sun Dec 21 22:18:30 2014 (r276037) +++ head/bin/sh/error.c Sun Dec 21 23:09:59 2014 (r276038) @@ -90,13 +90,14 @@ exraise(int e) /* - * Called from trap.c when a SIGINT is received. (If the user specifies - * that SIGINT is to be trapped or ignored using the trap builtin, then - * this routine is not called.) Suppressint is nonzero when interrupts - * are held using the INTOFF macro. If SIGINTs are not suppressed and - * the shell is not a root shell, then we want to be terminated if we - * get here, as if we were terminated directly by a SIGINT. Arrange for - * this here. + * Called from trap.c when a SIGINT is received and not suppressed, or when + * an interrupt is pending and interrupts are re-enabled using INTON. + * (If the user specifies that SIGINT is to be trapped or ignored using the + * trap builtin, then this routine is not called.) Suppressint is nonzero + * when interrupts are held using the INTOFF macro. If SIGINTs are not + * suppressed and the shell is not a root shell, then we want to be + * terminated if we get here, as if we were terminated directly by a SIGINT. + * Arrange for this here. */ void @@ -104,16 +105,6 @@ onint(void) { sigset_t sigs; - /* - * The !in_dotrap here is safe. The only way we can arrive here - * with in_dotrap set is that a trap handler set SIGINT to SIG_DFL - * and killed itself. - */ - - if (suppressint && !in_dotrap) { - intpending++; - return; - } intpending = 0; sigemptyset(&sigs); sigprocmask(SIG_SETMASK, &sigs, NULL); @@ -130,6 +121,7 @@ onint(void) else { signal(SIGINT, SIG_DFL); kill(getpid(), SIGINT); + _exit(128 + SIGINT); } } Modified: head/bin/sh/error.h ============================================================================== --- head/bin/sh/error.h Sun Dec 21 22:18:30 2014 (r276037) +++ head/bin/sh/error.h Sun Dec 21 23:09:59 2014 (r276038) @@ -75,11 +75,12 @@ extern volatile sig_atomic_t intpending; #define is_int_on() suppressint #define SETINTON(s) suppressint = (s) #define FORCEINTON {suppressint = 0; if (intpending) onint();} +#define SET_PENDING_INT intpending = 1 #define CLEAR_PENDING_INT intpending = 0 #define int_pending() intpending void exraise(int) __dead2; -void onint(void); +void onint(void) __dead2; void warning(const char *, ...) __printflike(1, 2); void error(const char *, ...) __printf0like(1, 2) __dead2; void exerror(int, const char *, ...) __printf0like(2, 3) __dead2; Modified: head/bin/sh/trap.c ============================================================================== --- head/bin/sh/trap.c Sun Dec 21 22:18:30 2014 (r276037) +++ head/bin/sh/trap.c Sun Dec 21 23:09:59 2014 (r276038) @@ -75,7 +75,7 @@ __FBSDID("$FreeBSD$"); static char sigmode[NSIG]; /* current value of signal */ volatile sig_atomic_t pendingsig; /* indicates some signal received */ volatile sig_atomic_t pendingsig_waitcmd; /* indicates SIGINT/SIGQUIT received */ -int in_dotrap; /* do we execute in a trap handler? */ +static int in_dotrap; /* do we execute in a trap handler? */ static char *volatile trap[NSIG]; /* trap handler commands */ static volatile sig_atomic_t gotsig[NSIG]; /* indicates specified signal received */ @@ -380,7 +380,15 @@ onsig(int signo) { if (signo == SIGINT && trap[SIGINT] == NULL) { - onint(); + /* + * The !in_dotrap here is safe. The only way we can arrive + * here with in_dotrap set is that a trap handler set SIGINT to + * SIG_DFL and killed itself. + */ + if (suppressint && !in_dotrap) + SET_PENDING_INT; + else + onint(); return; } Modified: head/bin/sh/trap.h ============================================================================== --- head/bin/sh/trap.h Sun Dec 21 22:18:30 2014 (r276037) +++ head/bin/sh/trap.h Sun Dec 21 23:09:59 2014 (r276038) @@ -35,7 +35,6 @@ extern volatile sig_atomic_t pendingsig; extern volatile sig_atomic_t pendingsig_waitcmd; -extern int in_dotrap; void clear_traps(void); int have_traps(void); From owner-svn-src-all@FreeBSD.ORG Sun Dec 21 23:22:14 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 362E9BC6; Sun, 21 Dec 2014 23:22:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 218DB2E0E; Sun, 21 Dec 2014 23:22:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBLNMEIY035468; Sun, 21 Dec 2014 23:22:14 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBLNMDDu035467; Sun, 21 Dec 2014 23:22:13 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201412212322.sBLNMDDu035467@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sun, 21 Dec 2014 23:22:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r276041 - stable/9/usr.bin/truncate X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2014 23:22:14 -0000 Author: jilles Date: Sun Dec 21 23:22:12 2014 New Revision: 276041 URL: https://svnweb.freebsd.org/changeset/base/276041 Log: MFC r267265: truncate: Detect integer overflow, fix relative sizes. The change to expand_number (r204654) broke detection of too large sizes and relative sizes ('+'/'-'). There are no tests in the MFC because stable/9 lacks the test framework. PR: 190735 Submitted by: Kirk Russell Modified: stable/9/usr.bin/truncate/truncate.c Directory Properties: stable/9/usr.bin/truncate/ (props changed) Modified: stable/9/usr.bin/truncate/truncate.c ============================================================================== --- stable/9/usr.bin/truncate/truncate.c Sun Dec 21 23:22:11 2014 (r276040) +++ stable/9/usr.bin/truncate/truncate.c Sun Dec 21 23:22:12 2014 (r276041) @@ -54,8 +54,8 @@ main(int argc, char **argv) { struct stat sb; mode_t omode; - off_t oflow, rsize, tsize; - int64_t sz; + off_t oflow, rsize, sz, tsize; + uint64_t usz; int ch, error, fd, oflags; char *fname, *rname; @@ -73,11 +73,13 @@ main(int argc, char **argv) rname = optarg; break; case 's': - if (expand_number(optarg, &sz) == -1) + do_relative = *optarg == '+' || *optarg == '-'; + if (expand_number(do_relative ? optarg + 1 : optarg, + &usz) == -1 || (off_t)usz < 0) errx(EXIT_FAILURE, "invalid size argument `%s'", optarg); - if (*optarg == '+' || *optarg == '-') - do_relative = 1; + + sz = (*optarg == '-') ? -(off_t)usz : (off_t)usz; got_size = 1; break; default: From owner-svn-src-all@FreeBSD.ORG Sun Dec 21 23:45:14 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 690EE3F6; Sun, 21 Dec 2014 23:45:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 54C0730BD; Sun, 21 Dec 2014 23:45:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBLNjElo046809; Sun, 21 Dec 2014 23:45:14 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBLNjEW8046807; Sun, 21 Dec 2014 23:45:14 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201412212345.sBLNjEW8046807@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 21 Dec 2014 23:45:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276045 - head/contrib/gcc/config/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2014 23:45:14 -0000 Author: ian Date: Sun Dec 21 23:45:13 2014 New Revision: 276045 URL: https://svnweb.freebsd.org/changeset/base/276045 Log: Allow -march=armv7a on the gcc command line, for compatibility with clang. This will result in __ARM_ARCH_7A__ being defined during the compile. When compiling with gcc, it will still only generate armv6 opcodes itself, but should pass the arch to gas so that inline asm can use v7 opcodes. Modified: head/contrib/gcc/config/arm/arm.c Modified: head/contrib/gcc/config/arm/arm.c ============================================================================== --- head/contrib/gcc/config/arm/arm.c Sun Dec 21 23:28:53 2014 (r276044) +++ head/contrib/gcc/config/arm/arm.c Sun Dec 21 23:45:13 2014 (r276045) @@ -604,6 +604,8 @@ static const struct processors all_archi {"armv6k", mpcore, "6K", FL_CO_PROC | FL_FOR_ARCH6K, NULL}, {"armv6z", arm1176jzs, "6Z", FL_CO_PROC | FL_FOR_ARCH6Z, NULL}, {"armv6zk", arm1176jzs, "6ZK", FL_CO_PROC | FL_FOR_ARCH6ZK, NULL}, + /* Clang compatibility... define __ARM_ARCH_7A__, but codegen is still 6ZK. */ + {"armv7a", arm1176jzs, "7A", FL_CO_PROC | FL_FOR_ARCH6ZK, NULL}, {"ep9312", ep9312, "4T", FL_LDSCHED | FL_CIRRUS | FL_FOR_ARCH4, NULL}, {"iwmmxt", iwmmxt, "5TE", FL_LDSCHED | FL_STRONG | FL_FOR_ARCH5TE | FL_XSCALE | FL_IWMMXT , NULL}, {NULL, arm_none, NULL, 0 , NULL} From owner-svn-src-all@FreeBSD.ORG Sun Dec 21 23:47:31 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9AE3E543; Sun, 21 Dec 2014 23:47:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 868BF30CC; Sun, 21 Dec 2014 23:47:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBLNlVf1047258; Sun, 21 Dec 2014 23:47:31 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBLNlVu0047257; Sun, 21 Dec 2014 23:47:31 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201412212347.sBLNlVu0047257@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 21 Dec 2014 23:47:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276046 - head/contrib/netbsd-tests/lib/libc/stdlib X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2014 23:47:31 -0000 Author: ngie Date: Sun Dec 21 23:47:30 2014 New Revision: 276046 URL: https://svnweb.freebsd.org/changeset/base/276046 Log: Add __FreeBSD_version guards around hsearch_r to ease MFCing the code to stable/10 It was added when __FreeBSD_version was ~1100027 Modified: head/contrib/netbsd-tests/lib/libc/stdlib/t_hsearch.c Modified: head/contrib/netbsd-tests/lib/libc/stdlib/t_hsearch.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/stdlib/t_hsearch.c Sun Dec 21 23:45:13 2014 (r276045) +++ head/contrib/netbsd-tests/lib/libc/stdlib/t_hsearch.c Sun Dec 21 23:47:30 2014 (r276046) @@ -231,6 +231,7 @@ ATF_TC_BODY(hsearch_two, tc) hdestroy(); } +#if defined(__FreeBSD__) && 1100027 <= __FreeBSD_version #ifdef __NetBSD__ ATF_TC(hsearch_r_basic); ATF_TC_HEAD(hsearch_r_basic, tc) @@ -385,6 +386,7 @@ ATF_TC_BODY(hsearch_r_two, tc) hdestroy_r(&t); } +#endif ATF_TP_ADD_TCS(tp) { @@ -395,13 +397,15 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, hsearch_duplicate); ATF_TP_ADD_TC(tp, hsearch_nonexistent); ATF_TP_ADD_TC(tp, hsearch_two); - + +#if defined(__FreeBSD__) && 1100027 <= __FreeBSD_version #ifdef __NetBSD__ ATF_TP_ADD_TC(tp, hsearch_r_basic); #endif ATF_TP_ADD_TC(tp, hsearch_r_duplicate); ATF_TP_ADD_TC(tp, hsearch_r_nonexistent); ATF_TP_ADD_TC(tp, hsearch_r_two); +#endif return atf_no_error(); } From owner-svn-src-all@FreeBSD.ORG Sun Dec 21 23:48:37 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1BF406CB; Sun, 21 Dec 2014 23:48:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0578830DD; Sun, 21 Dec 2014 23:48:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBLNmaEu047501; Sun, 21 Dec 2014 23:48:36 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBLNmXTB047480; Sun, 21 Dec 2014 23:48:33 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201412212348.sBLNmXTB047480@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 21 Dec 2014 23:48:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276047 - in head/sys/arm: allwinner allwinner/a20 altera/socfpga broadcom/bcm2835 freescale/imx freescale/vybrid mv rockchip samsung/exynos ti xilinx X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2014 23:48:37 -0000 Author: ian Date: Sun Dec 21 23:48:32 2014 New Revision: 276047 URL: https://svnweb.freebsd.org/changeset/base/276047 Log: Add -march=armv7a to the kernel compile for all ARM systems which are v7a. Submitted by: Michal Meloun Modified: head/sys/arm/allwinner/a20/std.a20 head/sys/arm/allwinner/std.a10 head/sys/arm/altera/socfpga/std.socfpga head/sys/arm/broadcom/bcm2835/std.bcm2835 head/sys/arm/freescale/imx/std.imx51 head/sys/arm/freescale/imx/std.imx53 head/sys/arm/freescale/imx/std.imx6 head/sys/arm/freescale/vybrid/std.vybrid head/sys/arm/mv/std-pj4b.mv head/sys/arm/rockchip/std.rk30xx head/sys/arm/samsung/exynos/std.exynos5250 head/sys/arm/samsung/exynos/std.exynos5420 head/sys/arm/ti/std.ti head/sys/arm/xilinx/std.zynq7 Modified: head/sys/arm/allwinner/a20/std.a20 ============================================================================== --- head/sys/arm/allwinner/a20/std.a20 Sun Dec 21 23:47:30 2014 (r276046) +++ head/sys/arm/allwinner/a20/std.a20 Sun Dec 21 23:48:32 2014 (r276047) @@ -3,6 +3,7 @@ cpu CPU_CORTEXA machine arm armv6 +makeoptions CONF_CFLAGS="-march=armv7a -Wa,-march=armv7a" makeoption ARM_LITTLE_ENDIAN # Physical memory starts at 0x40200000. We assume images are loaded at Modified: head/sys/arm/allwinner/std.a10 ============================================================================== --- head/sys/arm/allwinner/std.a10 Sun Dec 21 23:47:30 2014 (r276046) +++ head/sys/arm/allwinner/std.a10 Sun Dec 21 23:48:32 2014 (r276047) @@ -3,6 +3,7 @@ cpu CPU_CORTEXA machine arm armv6 +makeoptions CONF_CFLAGS="-march=armv7a -Wa,-march=armv7a" makeoption ARM_LITTLE_ENDIAN # Physical memory starts at 0x40200000. We assume images are loaded at Modified: head/sys/arm/altera/socfpga/std.socfpga ============================================================================== --- head/sys/arm/altera/socfpga/std.socfpga Sun Dec 21 23:47:30 2014 (r276046) +++ head/sys/arm/altera/socfpga/std.socfpga Sun Dec 21 23:48:32 2014 (r276047) @@ -4,6 +4,7 @@ makeoption ARM_LITTLE_ENDIAN cpu CPU_CORTEXA machine arm armv6 +makeoptions CONF_CFLAGS="-march=armv7a -Wa,-march=armv7a" options PHYSADDR=0x00000000 Modified: head/sys/arm/broadcom/bcm2835/std.bcm2835 ============================================================================== --- head/sys/arm/broadcom/bcm2835/std.bcm2835 Sun Dec 21 23:47:30 2014 (r276046) +++ head/sys/arm/broadcom/bcm2835/std.bcm2835 Sun Dec 21 23:48:32 2014 (r276047) @@ -2,6 +2,7 @@ machine arm armv6 cpu CPU_ARM1176 +makeoptions CONF_CFLAGS="-mcpu=arm1176jzf-s -Wa,-mcpu=arm1176jzf-s" files "../broadcom/bcm2835/files.bcm2835" Modified: head/sys/arm/freescale/imx/std.imx51 ============================================================================== --- head/sys/arm/freescale/imx/std.imx51 Sun Dec 21 23:47:30 2014 (r276046) +++ head/sys/arm/freescale/imx/std.imx51 Sun Dec 21 23:48:32 2014 (r276047) @@ -1,6 +1,7 @@ # $FreeBSD$ machine arm armv6 cpu CPU_CORTEXA +makeoptions CONF_CFLAGS="-march=armv7a -Wa,-march=armv7a" makeoptions ARM_LITTLE_ENDIAN options ARM_L2_PIPT Modified: head/sys/arm/freescale/imx/std.imx53 ============================================================================== --- head/sys/arm/freescale/imx/std.imx53 Sun Dec 21 23:47:30 2014 (r276046) +++ head/sys/arm/freescale/imx/std.imx53 Sun Dec 21 23:48:32 2014 (r276047) @@ -1,6 +1,7 @@ # $FreeBSD$ machine arm armv6 cpu CPU_CORTEXA +makeoptions CONF_CFLAGS="-march=armv7a -Wa,-march=armv7a" makeoptions ARM_LITTLE_ENDIAN options ARM_L2_PIPT Modified: head/sys/arm/freescale/imx/std.imx6 ============================================================================== --- head/sys/arm/freescale/imx/std.imx6 Sun Dec 21 23:47:30 2014 (r276046) +++ head/sys/arm/freescale/imx/std.imx6 Sun Dec 21 23:48:32 2014 (r276047) @@ -1,6 +1,7 @@ # $FreeBSD$ machine arm armv6 cpu CPU_CORTEXA +makeoptions CONF_CFLAGS="-march=armv7a -Wa,-march=armv7a" makeoptions ARM_LITTLE_ENDIAN options ARM_L2_PIPT Modified: head/sys/arm/freescale/vybrid/std.vybrid ============================================================================== --- head/sys/arm/freescale/vybrid/std.vybrid Sun Dec 21 23:47:30 2014 (r276046) +++ head/sys/arm/freescale/vybrid/std.vybrid Sun Dec 21 23:48:32 2014 (r276047) @@ -4,6 +4,7 @@ makeoption ARM_LITTLE_ENDIAN cpu CPU_CORTEXA machine arm armv6 +makeoptions CONF_CFLAGS="-march=armv7a -Wa,-march=armv7a" options PHYSADDR=0x80000000 Modified: head/sys/arm/mv/std-pj4b.mv ============================================================================== --- head/sys/arm/mv/std-pj4b.mv Sun Dec 21 23:47:30 2014 (r276046) +++ head/sys/arm/mv/std-pj4b.mv Sun Dec 21 23:48:32 2014 (r276047) @@ -3,5 +3,6 @@ files "../mv/files.mv" cpu CPU_MV_PJ4B machine arm armv6 +makeoptions CONF_CFLAGS="-march=armv7a -Wa,-march=armv7a" options VM_MAXUSER_ADDRESS="(KERNBASE-(1024*1024*1024))" Modified: head/sys/arm/rockchip/std.rk30xx ============================================================================== --- head/sys/arm/rockchip/std.rk30xx Sun Dec 21 23:47:30 2014 (r276046) +++ head/sys/arm/rockchip/std.rk30xx Sun Dec 21 23:48:32 2014 (r276047) @@ -3,6 +3,7 @@ cpu CPU_CORTEXA machine arm armv6 +makeoptions CONF_CFLAGS="-march=armv7a -Wa,-march=armv7a" makeoption ARM_LITTLE_ENDIAN # Physical memory starts at 0x60400000. We assume images are loaded at Modified: head/sys/arm/samsung/exynos/std.exynos5250 ============================================================================== --- head/sys/arm/samsung/exynos/std.exynos5250 Sun Dec 21 23:47:30 2014 (r276046) +++ head/sys/arm/samsung/exynos/std.exynos5250 Sun Dec 21 23:48:32 2014 (r276047) @@ -4,6 +4,7 @@ makeoption ARM_LITTLE_ENDIAN cpu CPU_CORTEXA machine arm armv6 +makeoptions CONF_CFLAGS="-march=armv7a -Wa,-march=armv7a" options PHYSADDR=0x40000000 Modified: head/sys/arm/samsung/exynos/std.exynos5420 ============================================================================== --- head/sys/arm/samsung/exynos/std.exynos5420 Sun Dec 21 23:47:30 2014 (r276046) +++ head/sys/arm/samsung/exynos/std.exynos5420 Sun Dec 21 23:48:32 2014 (r276047) @@ -4,6 +4,7 @@ makeoption ARM_LITTLE_ENDIAN cpu CPU_CORTEXA machine arm armv6 +makeoptions CONF_CFLAGS="-march=armv7a -Wa,-march=armv7a" options PHYSADDR=0x20000000 Modified: head/sys/arm/ti/std.ti ============================================================================== --- head/sys/arm/ti/std.ti Sun Dec 21 23:47:30 2014 (r276046) +++ head/sys/arm/ti/std.ti Sun Dec 21 23:48:32 2014 (r276047) @@ -2,5 +2,6 @@ cpu CPU_CORTEXA machine arm armv6 +makeoptions CONF_CFLAGS="-march=armv7a -Wa,-march=armv7a" files "../ti/files.ti" Modified: head/sys/arm/xilinx/std.zynq7 ============================================================================== --- head/sys/arm/xilinx/std.zynq7 Sun Dec 21 23:47:30 2014 (r276046) +++ head/sys/arm/xilinx/std.zynq7 Sun Dec 21 23:48:32 2014 (r276047) @@ -5,6 +5,7 @@ cpu CPU_CORTEXA machine arm armv6 +makeoptions CONF_CFLAGS="-march=armv7a -Wa,-march=armv7a" files "../xilinx/files.zynq7" From owner-svn-src-all@FreeBSD.ORG Mon Dec 22 00:21:26 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2605ACCB; Mon, 22 Dec 2014 00:21:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1104B3A9A; Mon, 22 Dec 2014 00:21:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBM0LPEP068034; Mon, 22 Dec 2014 00:21:25 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBM0LPtL068033; Mon, 22 Dec 2014 00:21:25 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201412220021.sBM0LPtL068033@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 22 Dec 2014 00:21:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276048 - stable/10/share/mk X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Dec 2014 00:21:26 -0000 Author: ngie Date: Mon Dec 22 00:21:24 2014 New Revision: 276048 URL: https://svnweb.freebsd.org/changeset/base/276048 Log: MFC r273186,r273873: r273186: Don't define rules based on PROGS if PROGS is empty. Reviewed by: sjg, ngie Sponsored by: EMC / Isilon Storage Division r273873: Use the right depend file for each program. bsd.progs.mk generates a separate depend file for every program being built, but then it does not properly tell each submake to use those individual files. Properly propagate the depend file to use. Discovered while preparing the update of atf to 0.21 and noticing that the test programs were not being relinked to the new library. This change is "make tinderbox" clean. Modified: stable/10/share/mk/bsd.progs.mk Directory Properties: stable/10/ (props changed) Modified: stable/10/share/mk/bsd.progs.mk ============================================================================== --- stable/10/share/mk/bsd.progs.mk Sun Dec 21 23:48:32 2014 (r276047) +++ stable/10/share/mk/bsd.progs.mk Mon Dec 22 00:21:24 2014 (r276048) @@ -90,18 +90,24 @@ x.$p= PROG_CXX=$p $p ${p}_p: .PHONY .MAKE (cd ${.CURDIR} && ${MAKE} -f ${MAKEFILE} _RECURSING_PROGS= \ - SUBDIR= PROG=$p ${x.$p}) + SUBDIR= PROG=$p \ + DEPENDFILE=.depend.$p .MAKE.DEPENDFILE=.depend.$p \ + ${x.$p}) .for t in ${PROGS_TARGETS:O:u} $p.$t: .PHONY .MAKE (cd ${.CURDIR} && ${MAKE} -f ${MAKEFILE} _RECURSING_PROGS= \ - SUBDIR= PROG=$p ${x.$p} ${@:E}) + SUBDIR= PROG=$p \ + DEPENDFILE=.depend.$p .MAKE.DEPENDFILE=.depend.$p \ + ${x.$p} ${@:E}) .endfor .endfor +.if !empty(PROGS) .for t in ${PROGS_TARGETS:O:u} $t: ${PROGS:%=%.$t} .endfor +.endif .if empty(PROGS) && !empty(SCRIPTS) From owner-svn-src-all@FreeBSD.ORG Mon Dec 22 00:30:16 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0B6E8E7A; Mon, 22 Dec 2014 00:30:16 +0000 (UTC) Received: from mail108.syd.optusnet.com.au (mail108.syd.optusnet.com.au [211.29.132.59]) by mx1.freebsd.org (Postfix) with ESMTP id 8F7833BFB; Mon, 22 Dec 2014 00:30:15 +0000 (UTC) Received: from c122-106-147-133.carlnfd1.nsw.optusnet.com.au (c122-106-147-133.carlnfd1.nsw.optusnet.com.au [122.106.147.133]) by mail108.syd.optusnet.com.au (Postfix) with ESMTPS id 488E21A529E; Mon, 22 Dec 2014 11:30:06 +1100 (AEDT) Date: Mon, 22 Dec 2014 11:30:05 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Ian Lepore Subject: Re: svn commit: r275961 - head/sys/arm/conf In-Reply-To: <1419180311.1018.66.camel@freebsd.org> Message-ID: <20141222105500.E911@besplex.bde.org> References: <201412201815.sBKIFOSq060122@svn.freebsd.org> <20141221080739.GB27290@FreeBSD.org> <1419180311.1018.66.camel@freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=R8o6R7hX c=1 sm=1 tr=0 a=7NqvjVvQucbO2RlWB8PEog==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=pS3UQe8eFl3rWVsDjHcA:9 a=G8QlLWlbfa_le2eK:21 a=0ysKVROebSIKcJAp:21 a=CjuIK1q_8ugA:10 Cc: Andrew Turner , svn-src-head@freebsd.org, Alexey Dokuchaev , src-committers@freebsd.org, svn-src-all@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Dec 2014 00:30:16 -0000 On Sun, 21 Dec 2014, Ian Lepore wrote: > On Sun, 2014-12-21 at 08:07 +0000, Alexey Dokuchaev wrote: >> On Sat, Dec 20, 2014 at 06:15:24PM +0000, Andrew Turner wrote: >>> Log: >>> Clean up to use the standard style of "options \t" and "device\t\t" >>> >>> options HZ=500 # Scheduling quantum is 2 milliseconds. >>> [...] >>> -options KDB # Enable kernel debugger support. >>> +options KDB # Enable kernel debugger support. >>> # For minimum debugger support use KDB_TRACE, for interactive use DDB. >>> -#options KDB_TRACE # Print a stack trace for a panic. >>> -options DDB # Support DDB. >>> +#options KDB_TRACE # Print a stack trace for a panic. >>> +options DDB # Support DDB. >>> # For full debugger support use this instead: >>> -#options GDB # Support remote GDB. >>> +#options GDB # Support remote GDB. >>> [...] >> >> It also would be nice if we removed trailing dots in comments one day, >> preferreably across all config files we have in the tree. > > Why? I thought our rule about comments is that they're complete > sentences, punctuated as such. That rule is for C source code and doesn't apply to comments to the right of code even there. The rule for options files is to never terminate options or device lines with periods. This rule was broken in only 1 places in the RELENG_4 i386 GENERIC (for the tun device). Also, it is not even broken for 2 options: X options AHC_REG_PRETTY_PRINT # Print register bitfields in debug X # output. Adds ~128k to driver. X options AHD_REG_PRETTY_PRINT # Print register bitfields in debug X # output. Adds ~215k to driver. These lines break many other rules: - that comments to the right of code actually be at the right of code and not spread across multiple lines - that man pages not be written in comments. Especially ones at the right of code where there is less space. - various anti-verbosity rules stricter than the previous one. The i386 GENERIC is still relatively clean, but the breakage of this rule has expanded to include 2 GEOM options, PRINTR_BUFR_SIZE (ick; its description also breaks the line length limit rule), most KDB/DDB options, aic, ie, an, bwi, bwn, ipw, ipi, iwi, iwn, malo, mwl, ral, wi, wl and wpi. aic, ie, an, bwi, iwi, ral and wi also break the line length limit rule. > Of course, I also thought we had a rule that 'device' and 'options' in > kernel config is always followed by two spaces then a tab, so that you > can comment out lines without ruining the indent, and apparently that's > not true either (and I have no idea where I got that notion). The rule for `options' is that it is always followed by _one_ space and a tab. This rule os currently followed by all options lines in i386 GENERIC. `device' lines used to follow Rafferty's rules. They used to be mostly formatted with `device' followed by a single tab, and comments to the right of them lined up in subsections but globally random. This has been cleaned up a bit, at the cost of breaking the line length limit rule in many places. `device' is now consistently followed by _two_ tabs in i386 GENERIC, and comments are consistently lined up starting in column 40 for both `options' and `device' lines. The fancy space+tab rule is less needed for `device' lines, since a single comment character can be prefixed without breaking the formatting. I use this to distinguish local modifications: - GENERIC shouldn't have any commented-out device lines, but i386 GENERIC actually has about 10 (formatted with a single comment character so as not to break the formatting) - local modifications comment out device lines using '# '. This breaks the formatting. NOTES files provide many more bad examples than i386 GENERIC. Bruce From owner-svn-src-all@FreeBSD.ORG Mon Dec 22 00:50:02 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5868D103; Mon, 22 Dec 2014 00:50:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 435983F54; Mon, 22 Dec 2014 00:50:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBM0o2N3080876; Mon, 22 Dec 2014 00:50:02 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBM0o22e080875; Mon, 22 Dec 2014 00:50:02 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201412220050.sBM0o22e080875@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Mon, 22 Dec 2014 00:50:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276049 - head/sys/arm/ti X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Dec 2014 00:50:02 -0000 Author: ian Date: Mon Dec 22 00:50:01 2014 New Revision: 276049 URL: https://svnweb.freebsd.org/changeset/base/276049 Log: Replace the clock divisor terms with values that also result in a 1 MHz clock, but actually work on real hardware, unlike the original set of values I chose. PR: 195009 Submitted by: Scott Ellis Modified: head/sys/arm/ti/ti_i2c.c Modified: head/sys/arm/ti/ti_i2c.c ============================================================================== --- head/sys/arm/ti/ti_i2c.c Mon Dec 22 00:21:24 2014 (r276048) +++ head/sys/arm/ti/ti_i2c.c Mon Dec 22 00:50:01 2014 (r276049) @@ -119,7 +119,7 @@ struct ti_i2c_clock_config static struct ti_i2c_clock_config ti_omap4_i2c_clock_configs[] = { { 100000, 23, 13, 15, 0, 0}, { 400000, 9, 5, 7, 0, 0}, - { 1000000, 5, 1, 3, 0, 0}, + { 1000000, 3, 5, 7, 0, 0}, /* { 3200000, 1, 113, 115, 7, 10}, - HS mode */ { 0 /* Table terminator */ } }; From owner-svn-src-all@FreeBSD.ORG Mon Dec 22 00:50:09 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 78DF923E; Mon, 22 Dec 2014 00:50:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 646DE3F5E; Mon, 22 Dec 2014 00:50:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBM0o96l080973; Mon, 22 Dec 2014 00:50:09 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBM0o9Mv080972; Mon, 22 Dec 2014 00:50:09 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201412220050.sBM0o9Mv080972@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 22 Dec 2014 00:50:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276050 - stable/10/share/mk X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Dec 2014 00:50:09 -0000 Author: ngie Date: Mon Dec 22 00:50:08 2014 New Revision: 276050 URL: https://svnweb.freebsd.org/changeset/base/276050 Log: MFC r273803,r273810: r273803: Filter out TESTS_SUBDIRS already added to SUBDIR instead of blindly appending the TESTS_SUBDIRS variable to SUBDIR Duplicate directory entries can cause unexpected side effects, like installing the same files multiple times. This can be easily reproduced via the following testcase prior to this commit: SUBDIR= dir TESTS_SUBDIRS+= dir .include Sponsored by: EMC / Isilon Storage Division r273810: Fix the logic inversion in the previous commit by ensuring that the matched expression (:M) is empty, not the not matched (:N) is empty. The former case means we have not found the TEST_SUBDIR value in SUBDIR Reported by: rodrigc Pointyhat to: me (did not use a clean install root) Sponsored by: EMC / Isilon Storage Division Modified: stable/10/share/mk/bsd.test.mk Directory Properties: stable/10/ (props changed) Modified: stable/10/share/mk/bsd.test.mk ============================================================================== --- stable/10/share/mk/bsd.test.mk Mon Dec 22 00:50:01 2014 (r276049) +++ stable/10/share/mk/bsd.test.mk Mon Dec 22 00:50:08 2014 (r276050) @@ -54,9 +54,11 @@ _TESTS= .include .include -.if !empty(TESTS_SUBDIRS) -SUBDIR+= ${TESTS_SUBDIRS} +.for ts in ${TESTS_SUBDIRS} +.if empty(SUBDIR:M${ts}) +SUBDIR+= ${ts} .endif +.endfor # it is rare for test cases to have man pages .if !defined(MAN) From owner-svn-src-all@FreeBSD.ORG Mon Dec 22 02:22:02 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 60C989DA; Mon, 22 Dec 2014 02:22:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4C76A379B; Mon, 22 Dec 2014 02:22:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBM2M2jb026562; Mon, 22 Dec 2014 02:22:02 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBM2M281026561; Mon, 22 Dec 2014 02:22:02 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201412220222.sBM2M281026561@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 22 Dec 2014 02:22:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276051 - stable/10 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Dec 2014 02:22:02 -0000 Author: ngie Date: Mon Dec 22 02:22:01 2014 New Revision: 276051 URL: https://svnweb.freebsd.org/changeset/base/276051 Log: MFC r275622: Add makewhatis to ITOOLS if MK_MAN != no This will fix installation with differing host targets in installworld, so one can build i386/i386 on an amd64 host, then install to an i386/i386 target Reported by: alfred Phabric: D1280 Modified: stable/10/Makefile.inc1 Directory Properties: stable/10/ (props changed) Modified: stable/10/Makefile.inc1 ============================================================================== --- stable/10/Makefile.inc1 Mon Dec 22 00:50:08 2014 (r276050) +++ stable/10/Makefile.inc1 Mon Dec 22 02:22:01 2014 (r276051) @@ -782,6 +782,11 @@ ITOOLS= [ awk cap_mkdb cat chflags chmod rm sed sh sysctl test true uname wc ${_zoneinfo} \ ${LOCAL_ITOOLS} +# Needed for share/man +.if ${MK_MAN} != "no" +ITOOLS+=makewhatis +.endif + # # distributeworld # From owner-svn-src-all@FreeBSD.ORG Mon Dec 22 04:52:25 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5427CAD0; Mon, 22 Dec 2014 04:52:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 406713ABE; Mon, 22 Dec 2014 04:52:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBM4qPXo096444; Mon, 22 Dec 2014 04:52:25 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBM4qPAx096443; Mon, 22 Dec 2014 04:52:25 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201412220452.sBM4qPAx096443@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 22 Dec 2014 04:52:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276052 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Dec 2014 04:52:25 -0000 Author: ngie Date: Mon Dec 22 04:52:24 2014 New Revision: 276052 URL: https://svnweb.freebsd.org/changeset/base/276052 Log: Build selective portions of gnu/usr.bin/texinfo as part of build-tools to ensure that building on a host without makeinfo (i.e. a host where make delete-old -DWITHOUT_INFO was run), then building with MK_INFO == yes doesn't manifest in build errors when building info pages This manifested itself like the following when I was build testing an MFC change on stable/10: makeinfo --no-split -I /usr/src/gnu/lib/libregex/doc -I /usr/src/gnu/lib/libregex/doc regex.texi -o regex.info makeinfo: not found *** [regex.info] Error code 127 make[6]: stopped in /usr/src/gnu/lib/libregex/doc 1 error Tested on a head VM without makeinfo installed and by building with MK_INFO=yes MFC after: 1 week Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Mon Dec 22 02:22:01 2014 (r276051) +++ head/Makefile.inc1 Mon Dec 22 04:52:24 2014 (r276052) @@ -1367,6 +1367,11 @@ _share= share/syscons/scrnmaps _gcc_tools= gnu/usr.bin/cc/cc_tools .endif +.if ${MK_INFO} != "no" +_texinfo= gnu/usr.bin/texinfo/libtxi \ + gnu/usr.bin/texinfo/makeinfo +.endif + .if ${MK_RESCUE} != "no" _rescue= rescue/rescue .endif @@ -1398,6 +1403,16 @@ build-tools: .MAKE ${MAKE} DIRPRFX=${_tool}/ depend && \ ${MAKE} DIRPRFX=${_tool}/ all .endfor +.for _tool in \ + ${_texinfo} + ${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all)"; \ + cd ${.CURDIR}/${_tool} && \ + ${MAKE} DIRPRFX=${_tool}/ obj && \ + ${MAKE} DIRPRFX=${_tool}/ depend && \ + ${MAKE} DIRPRFX=${_tool}/ all && \ + ${MAKE} DIRPRFX=${_tool}/ install DESTDIR=${WORLDTMP} +.endfor + # # kernel-tools: Build kernel-building tools From owner-svn-src-all@FreeBSD.ORG Mon Dec 22 04:54:58 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 50CF7C19; Mon, 22 Dec 2014 04:54:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3D4DE3AD7; Mon, 22 Dec 2014 04:54:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBM4swfX096769; Mon, 22 Dec 2014 04:54:58 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBM4swOh096768; Mon, 22 Dec 2014 04:54:58 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201412220454.sBM4swOh096768@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 22 Dec 2014 04:54:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276053 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Dec 2014 04:54:58 -0000 Author: ngie Date: Mon Dec 22 04:54:57 2014 New Revision: 276053 URL: https://svnweb.freebsd.org/changeset/base/276053 Log: Update the text for building texinfo with build-tools to reflect the fact that make install is being called as well MFC after: 1 week X-MFC with: r276052 Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Mon Dec 22 04:52:24 2014 (r276052) +++ head/Makefile.inc1 Mon Dec 22 04:54:57 2014 (r276053) @@ -1405,7 +1405,7 @@ build-tools: .MAKE .endfor .for _tool in \ ${_texinfo} - ${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all)"; \ + ${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all,install)"; \ cd ${.CURDIR}/${_tool} && \ ${MAKE} DIRPRFX=${_tool}/ obj && \ ${MAKE} DIRPRFX=${_tool}/ depend && \ From owner-svn-src-all@FreeBSD.ORG Mon Dec 22 08:59:45 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7B6BDB83; Mon, 22 Dec 2014 08:59:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4D80C390B; Mon, 22 Dec 2014 08:59:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBM8xjlb009114; Mon, 22 Dec 2014 08:59:45 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBM8xjXB009113; Mon, 22 Dec 2014 08:59:45 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201412220859.sBM8xjXB009113@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Mon, 22 Dec 2014 08:59:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276054 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Dec 2014 08:59:45 -0000 Author: glebius Date: Mon Dec 22 08:59:44 2014 New Revision: 276054 URL: https://svnweb.freebsd.org/changeset/base/276054 Log: Document flags of vm_page allocation functions. Reviewed by: alc Modified: head/sys/vm/vm_page.h Modified: head/sys/vm/vm_page.h ============================================================================== --- head/sys/vm/vm_page.h Mon Dec 22 04:54:57 2014 (r276053) +++ head/sys/vm/vm_page.h Mon Dec 22 08:59:44 2014 (r276054) @@ -376,22 +376,35 @@ extern long first_page; /* first physi vm_page_t PHYS_TO_VM_PAGE(vm_paddr_t pa); -/* page allocation classes: */ +/* + * Page allocation parameters for vm_page for the functions + * vm_page_alloc(), vm_page_grab(), vm_page_alloc_contig() and + * vm_page_alloc_freelist(). Some functions support only a subset + * of the flags, and ignore others, see the flags legend. + * + * Bits 0 - 1 define class. + * Bits 2 - 15 dedicated for flags. + * Legend: + * (a) - vm_page_alloc() supports the flag. + * (c) - vm_page_alloc_contig() supports the flag. + * (f) - vm_page_alloc_freelist() supports the flag. + * (g) - vm_page_grab() supports the flag. + * Bits above 15 define the count of additional pages that the caller + * intends to allocate. + */ #define VM_ALLOC_NORMAL 0 #define VM_ALLOC_INTERRUPT 1 #define VM_ALLOC_SYSTEM 2 #define VM_ALLOC_CLASS_MASK 3 -/* page allocation flags: */ -#define VM_ALLOC_WIRED 0x0020 /* non pageable */ -#define VM_ALLOC_ZERO 0x0040 /* Try to obtain a zeroed page */ -#define VM_ALLOC_NOOBJ 0x0100 /* No associated object */ -#define VM_ALLOC_NOBUSY 0x0200 /* Do not busy the page */ -#define VM_ALLOC_IFCACHED 0x0400 /* Fail if the page is not cached */ -#define VM_ALLOC_IFNOTCACHED 0x0800 /* Fail if the page is cached */ -#define VM_ALLOC_IGN_SBUSY 0x1000 /* vm_page_grab() only */ -#define VM_ALLOC_NODUMP 0x2000 /* don't include in dump */ -#define VM_ALLOC_SBUSY 0x4000 /* Shared busy the page */ - +#define VM_ALLOC_WIRED 0x0020 /* (acfg) Allocate non pageable page */ +#define VM_ALLOC_ZERO 0x0040 /* (acfg) Try to obtain a zeroed page */ +#define VM_ALLOC_NOOBJ 0x0100 /* (acg) No associated object */ +#define VM_ALLOC_NOBUSY 0x0200 /* (acg) Do not busy the page */ +#define VM_ALLOC_IFCACHED 0x0400 /* (ag) Fail if page is not cached */ +#define VM_ALLOC_IFNOTCACHED 0x0800 /* (ag) Fail if page is cached */ +#define VM_ALLOC_IGN_SBUSY 0x1000 /* (g) Ignore shared busy flag */ +#define VM_ALLOC_NODUMP 0x2000 /* (ag) don't include in dump */ +#define VM_ALLOC_SBUSY 0x4000 /* (acg) Shared busy the page */ #define VM_ALLOC_COUNT_SHIFT 16 #define VM_ALLOC_COUNT(count) ((count) << VM_ALLOC_COUNT_SHIFT) From owner-svn-src-all@FreeBSD.ORG Mon Dec 22 09:00:48 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 782DFD8F; Mon, 22 Dec 2014 09:00:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 649DC3921; Mon, 22 Dec 2014 09:00:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBM90mKZ010557; Mon, 22 Dec 2014 09:00:48 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBM90mBC010556; Mon, 22 Dec 2014 09:00:48 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201412220900.sBM90mBC010556@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Mon, 22 Dec 2014 09:00:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276055 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Dec 2014 09:00:48 -0000 Author: glebius Date: Mon Dec 22 09:00:47 2014 New Revision: 276055 URL: https://svnweb.freebsd.org/changeset/base/276055 Log: Do not clear flag that vm_page_alloc() doesn't support. Submitted by: kib Modified: head/sys/vm/vm_page.c Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Mon Dec 22 08:59:44 2014 (r276054) +++ head/sys/vm/vm_page.c Mon Dec 22 09:00:47 2014 (r276055) @@ -2736,7 +2736,7 @@ retrylookup: return (m); } } - m = vm_page_alloc(object, pindex, allocflags & ~VM_ALLOC_IGN_SBUSY); + m = vm_page_alloc(object, pindex, allocflags); if (m == NULL) { VM_OBJECT_WUNLOCK(object); VM_WAIT; From owner-svn-src-all@FreeBSD.ORG Mon Dec 22 09:02:22 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D17D6EEC; Mon, 22 Dec 2014 09:02:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BDD5F39C9; Mon, 22 Dec 2014 09:02:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBM92Mde013129; Mon, 22 Dec 2014 09:02:22 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBM92MXb013127; Mon, 22 Dec 2014 09:02:22 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201412220902.sBM92MXb013127@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Mon, 22 Dec 2014 09:02:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276056 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Dec 2014 09:02:22 -0000 Author: glebius Date: Mon Dec 22 09:02:21 2014 New Revision: 276056 URL: https://svnweb.freebsd.org/changeset/base/276056 Log: Add flag VM_ALLOC_NOWAIT for vm_page_grab() that prevents sleeping and allows the function to fail. Reviewed by: kib, alc Sponsored by: Nginx, Inc. Modified: head/sys/vm/vm_page.c head/sys/vm/vm_page.h Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Mon Dec 22 09:00:47 2014 (r276055) +++ head/sys/vm/vm_page.c Mon Dec 22 09:02:21 2014 (r276056) @@ -2711,6 +2711,8 @@ retrylookup: sleep = (allocflags & VM_ALLOC_IGN_SBUSY) != 0 ? vm_page_xbusied(m) : vm_page_busied(m); if (sleep) { + if ((allocflags & VM_ALLOC_NOWAIT) != 0) + return (NULL); /* * Reference the page before unlocking and * sleeping so that the page daemon is less @@ -2738,6 +2740,8 @@ retrylookup: } m = vm_page_alloc(object, pindex, allocflags); if (m == NULL) { + if ((allocflags & VM_ALLOC_NOWAIT) != 0) + return (NULL); VM_OBJECT_WUNLOCK(object); VM_WAIT; VM_OBJECT_WLOCK(object); Modified: head/sys/vm/vm_page.h ============================================================================== --- head/sys/vm/vm_page.h Mon Dec 22 09:00:47 2014 (r276055) +++ head/sys/vm/vm_page.h Mon Dec 22 09:02:21 2014 (r276056) @@ -405,6 +405,7 @@ vm_page_t PHYS_TO_VM_PAGE(vm_paddr_t pa) #define VM_ALLOC_IGN_SBUSY 0x1000 /* (g) Ignore shared busy flag */ #define VM_ALLOC_NODUMP 0x2000 /* (ag) don't include in dump */ #define VM_ALLOC_SBUSY 0x4000 /* (acg) Shared busy the page */ +#define VM_ALLOC_NOWAIT 0x8000 /* (g) Do not sleep, return NULL */ #define VM_ALLOC_COUNT_SHIFT 16 #define VM_ALLOC_COUNT(count) ((count) << VM_ALLOC_COUNT_SHIFT) From owner-svn-src-all@FreeBSD.ORG Mon Dec 22 10:49:55 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 79BCFD5C; Mon, 22 Dec 2014 10:49:55 +0000 (UTC) Received: from mailrelay007.isp.belgacom.be (mailrelay007.isp.belgacom.be [195.238.6.173]) by mx1.freebsd.org (Postfix) with ESMTP id 9BA1464F94; Mon, 22 Dec 2014 10:49:54 +0000 (UTC) X-Belgacom-Dynamic: yes X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ak8JADL2l1RbsIuB/2dsb2JhbABbgwZSTQvGRIVqBAICgRgXAQEBAQF9hA0BBTocIxALFAQJJQ8qHgYTiDABCM8bAQEBAQEBAQMBAQEBAQEBG49yB4QpBZFPhTORTCKDbz0xAYJCAQEB Received: from 129.139-176-91.adsl-dyn.isp.belgacom.be (HELO kalimero.tijl.coosemans.org) ([91.176.139.129]) by relay.skynet.be with ESMTP; 22 Dec 2014 11:48:44 +0100 Received: from kalimero.tijl.coosemans.org (kalimero.tijl.coosemans.org [127.0.0.1]) by kalimero.tijl.coosemans.org (8.14.9/8.14.9) with ESMTP id sBMAmgXB001746; Mon, 22 Dec 2014 11:48:43 +0100 (CET) (envelope-from tijl@FreeBSD.org) Date: Mon, 22 Dec 2014 11:48:42 +0100 From: Tijl Coosemans To: Cy Schubert Subject: Re: svn commit: r275971 - vendor/ntp/4.2.8 Message-ID: <20141222114842.0a73b187@kalimero.tijl.coosemans.org> In-Reply-To: <201412202256.sBKMu73a008605@svn.freebsd.org> References: <201412202256.sBKMu73a008605@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-vendor@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Dec 2014 10:49:55 -0000 On Sat, 20 Dec 2014 22:56:07 +0000 (UTC) Cy Schubert wrote: > Author: cy > Date: Sat Dec 20 22:56:06 2014 > New Revision: 275971 > URL: https://svnweb.freebsd.org/changeset/base/275971 > > Log: > Tag ntp-4.2.8. > > Reviewed by: roberto > Security: VUXML: 4033d826-87dd-11e4-9079-3c970e169bc2 > Security: http://www.kb.cert.org/vuls/id/852879 > Security: CVE-2014-9293 > Security CVE-2014-9294 > Security CVE-2014-9295 > Security CVE-2014-9296 > > Added: > vendor/ntp/4.2.8/ > - copied from r275970, vendor/ntp/dist/ > Why hasn't this been merged to head yet? From owner-svn-src-all@FreeBSD.ORG Mon Dec 22 15:06:39 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 656C81AC; Mon, 22 Dec 2014 15:06:39 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3E28B81F; Mon, 22 Dec 2014 15:06:39 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id D5C72B93E; Mon, 22 Dec 2014 10:06:37 -0500 (EST) From: John Baldwin To: Andriy Gapon Subject: Re: svn commit: r276008 - in head/sys: kern sys Date: Mon, 22 Dec 2014 09:40:02 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20140415; KDE/4.5.5; amd64; ; ) References: <201412211332.sBLDW8VC030548@svn.freebsd.org> <20141221151425.GX2148@kib.kiev.ua> <5496F37D.5030903@FreeBSD.org> In-Reply-To: <5496F37D.5030903@FreeBSD.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Message-Id: <201412220940.02509.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 22 Dec 2014 10:06:37 -0500 (EST) Cc: Konstantin Belousov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Dec 2014 15:06:39 -0000 On Sunday, December 21, 2014 11:21:17 am Andriy Gapon wrote: > On 21/12/2014 17:14, Konstantin Belousov wrote: > > On Sun, Dec 21, 2014 at 04:45:28PM +0200, Andriy Gapon wrote: > >> On 21/12/2014 16:41, Konstantin Belousov wrote: > >>> Or, are you asking why caching of the name could be needed for > >>> core dump files at all ? > >> > >> Sort of. Why VN_OPEN_NAMECACHE is useful in the case of core dumps? > >> What does it make better? > > The vn_fullpath() mostly works for the core files after the change, > > comparing with the non-working state at all before. > > > > Ah, vn_fullpath(). Thank you. Is there something specific to core dumps that makes vn_fullpath() more useful to have working before a process tries to open the core? (As compared to other newly-created files) -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Dec 22 15:37:03 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E5E2EC6; Mon, 22 Dec 2014 15:37:03 +0000 (UTC) Received: from mail-ig0-x231.google.com (mail-ig0-x231.google.com [IPv6:2607:f8b0:4001:c05::231]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A6F40CF7; Mon, 22 Dec 2014 15:37:03 +0000 (UTC) Received: by mail-ig0-f177.google.com with SMTP id z20so4120717igj.16; Mon, 22 Dec 2014 07:37:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=at38rAe5RAYudmFvVAqkCk0W0TgtbUbwQJJBNox0xzY=; b=Q6gtHKOIWzSyUWq4LLHna0HqoJY94BPcpFXxF+fllm7eT5DDfzOtJNHQMTMMVAT79Z 74Tt6JE1ZxsqIACo3HobfNwJFyH/l0bErfsPQWNv5kpRyj8T3X2YO3OLQM4akxSeq43C PbCJjoFORLGgjX0fU0FYlCS1OqnQVFPYe8lUQXUsfKH4e7gWR9QVIpIj5nyYD8+mEdH1 /rUfhzV0MOEzvCp5BL7f/FVxIr+Twedg1HBEk2ZV+3P+jaTUoCBpsuBEPmiofueP458z Q48iIqILG7ZjD5fG+UeP2+C+hTBhralmPUnN3bpIrmLC/f0vnnmvaWtKev1yOPsEKlby 18/Q== MIME-Version: 1.0 X-Received: by 10.43.129.196 with SMTP id hj4mr18405426icc.21.1419262623092; Mon, 22 Dec 2014 07:37:03 -0800 (PST) Sender: edschouten@gmail.com Received: by 10.107.176.145 with HTTP; Mon, 22 Dec 2014 07:37:03 -0800 (PST) In-Reply-To: <20141218235902.GA1590@troutmask.apl.washington.edu> References: <201412160921.sBG9LvFY064961@svn.freebsd.org> <20141216162055.GA64273@troutmask.apl.washington.edu> <20141217191235.GA89501@troutmask.apl.washington.edu> <87FF0FD4-EEF2-4264-9CBA-4B3A46E52FCB@gmail.com> <20141217211654.GA95193@troutmask.apl.washington.edu> <18504F2A-72C1-4962-86E6-CCAE4898B478@gmail.com> <20141218235902.GA1590@troutmask.apl.washington.edu> Date: Mon, 22 Dec 2014 16:37:03 +0100 X-Google-Sender-Auth: tyBsK46XYhEygpNTAN0NVSswmQc Message-ID: Subject: Re: svn commit: r275819 - in head/lib/msun: ld128 ld80 src From: Ed Schouten To: Steve Kargl Content-Type: text/plain; charset=UTF-8 Cc: src-committers@freebsd.org, Warner Losh , svn-src-all@freebsd.org, Dimitry Andric , svn-src-head@freebsd.org, Garrett Cooper X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Dec 2014 15:37:04 -0000 Hey Steve, 2014-12-19 0:59 GMT+01:00 Steve Kargl : > My only hope now is that Ed will fix the comment he inserted into > math_private.h to properly note that the functions formerly known > as cpack[fl] were written years before the C11 macros CMPLX[FL] > existed. Sure thing! Just to make sure the phrasing is done properly, would you be willing to come up with a diff? I'll push it in if you like. Thanks, -- Ed Schouten From owner-svn-src-all@FreeBSD.ORG Mon Dec 22 15:39:25 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5B07D307; Mon, 22 Dec 2014 15:39:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 471E4D18; Mon, 22 Dec 2014 15:39:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBMFdPa9097774; Mon, 22 Dec 2014 15:39:25 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBMFdPG2097773; Mon, 22 Dec 2014 15:39:25 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201412221539.sBMFdPG2097773@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Mon, 22 Dec 2014 15:39:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276058 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Dec 2014 15:39:25 -0000 Author: glebius Date: Mon Dec 22 15:39:24 2014 New Revision: 276058 URL: https://svnweb.freebsd.org/changeset/base/276058 Log: In sbappend*() family of functions clear M_PROTO flags of incoming mbufs. sbappendstream() already does this in m_demote(). PR: 196174 Sponsored by: Nginx, Inc. Modified: head/sys/kern/uipc_sockbuf.c Modified: head/sys/kern/uipc_sockbuf.c ============================================================================== --- head/sys/kern/uipc_sockbuf.c Mon Dec 22 09:21:41 2014 (r276057) +++ head/sys/kern/uipc_sockbuf.c Mon Dec 22 15:39:24 2014 (r276058) @@ -579,7 +579,7 @@ sbappend_locked(struct sockbuf *sb, stru if (m == 0) return; - + m_clrprotoflags(m); SBLASTRECORDCHK(sb); n = sb->sb_mb; if (n) { @@ -732,6 +732,7 @@ sbappendrecord_locked(struct sockbuf *sb if (m0 == 0) return; + m_clrprotoflags(m0); /* * Put the first mbuf on the queue. Note this permits zero length * records. @@ -777,6 +778,8 @@ sbappendaddr_locked_internal(struct sock return (0); m->m_len = asa->sa_len; bcopy(asa, mtod(m, caddr_t), asa->sa_len); + if (m0) + m_clrprotoflags(m0); if (ctrl_last) ctrl_last->m_next = m0; /* concatenate data to control */ else @@ -872,6 +875,7 @@ sbappendcontrol_locked(struct sockbuf *s if (space > sbspace(sb)) return (0); + m_clrprotoflags(m0); n->m_next = m0; /* concatenate data to control */ SBLASTRECORDCHK(sb); From owner-svn-src-all@FreeBSD.ORG Mon Dec 22 16:12:56 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3CE0A17F; Mon, 22 Dec 2014 16:12:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 289E33F59; Mon, 22 Dec 2014 16:12:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBMGCuR8015959; Mon, 22 Dec 2014 16:12:56 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBMGCuvf015958; Mon, 22 Dec 2014 16:12:56 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201412221612.sBMGCuvf015958@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Mon, 22 Dec 2014 16:12:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276059 - head/sys/arm/ti X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Dec 2014 16:12:56 -0000 Author: loos Date: Mon Dec 22 16:12:55 2014 New Revision: 276059 URL: https://svnweb.freebsd.org/changeset/base/276059 Log: Simplify the use of locks where possible, remove the locking when it is not required. Simplify the code a little bit. Reviewed by: andrew (previous version) Modified: head/sys/arm/ti/ti_gpio.c Modified: head/sys/arm/ti/ti_gpio.c ============================================================================== --- head/sys/arm/ti/ti_gpio.c Mon Dec 22 15:39:24 2014 (r276058) +++ head/sys/arm/ti/ti_gpio.c Mon Dec 22 16:12:55 2014 (r276059) @@ -290,7 +290,7 @@ ti_gpio_intr_clr(struct ti_gpio_softc *s * * * LOCKING: - * Internally locks the context + * No locking required, returns static data. * * RETURNS: * Returns 0 on success otherwise an error code @@ -302,8 +302,6 @@ ti_gpio_pin_max(device_t dev, int *maxpi unsigned int i; unsigned int banks = 0; - TI_GPIO_LOCK(sc); - /* Calculate how many valid banks we have and then multiply that by 32 to * give use the total number of pins. */ @@ -314,8 +312,6 @@ ti_gpio_pin_max(device_t dev, int *maxpi *maxpin = (banks * PINS_PER_BANK) - 1; - TI_GPIO_UNLOCK(sc); - return (0); } @@ -332,7 +328,7 @@ ti_gpio_pin_max(device_t dev, int *maxpi * - GPIO_PIN_PULLDOWN * * LOCKING: - * Internally locks the context + * No locking required, returns static data. * * RETURNS: * Returns 0 on success otherwise an error code @@ -343,19 +339,13 @@ ti_gpio_pin_getcaps(device_t dev, uint32 struct ti_gpio_softc *sc = device_get_softc(dev); uint32_t bank = (pin / PINS_PER_BANK); - TI_GPIO_LOCK(sc); - /* Sanity check the pin number is valid */ - if ((bank >= ti_max_gpio_banks()) || (sc->sc_mem_res[bank] == NULL)) { - TI_GPIO_UNLOCK(sc); + if ((bank >= ti_max_gpio_banks()) || (sc->sc_mem_res[bank] == NULL)) return (EINVAL); - } - *caps = (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT |GPIO_PIN_PULLUP | + *caps = (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT | GPIO_PIN_PULLUP | GPIO_PIN_PULLDOWN); - TI_GPIO_UNLOCK(sc); - return (0); } @@ -381,17 +371,13 @@ ti_gpio_pin_getflags(device_t dev, uint3 struct ti_gpio_softc *sc = device_get_softc(dev); uint32_t bank = (pin / PINS_PER_BANK); - TI_GPIO_LOCK(sc); - /* Sanity check the pin number is valid */ - if ((bank >= ti_max_gpio_banks()) || (sc->sc_mem_res[bank] == NULL)) { - TI_GPIO_UNLOCK(sc); + if ((bank >= ti_max_gpio_banks()) || (sc->sc_mem_res[bank] == NULL)) return (EINVAL); - } /* Get the current pin state */ + TI_GPIO_LOCK(sc); TI_GPIO_GET_FLAGS(dev, pin, flags); - TI_GPIO_UNLOCK(sc); return (0); @@ -407,7 +393,7 @@ ti_gpio_pin_getflags(device_t dev, uint3 * of the pin. * * LOCKING: - * Internally locks the context + * No locking required, returns static data. * * RETURNS: * Returns 0 on success otherwise an error code @@ -418,20 +404,14 @@ ti_gpio_pin_getname(device_t dev, uint32 struct ti_gpio_softc *sc = device_get_softc(dev); uint32_t bank = (pin / PINS_PER_BANK); - TI_GPIO_LOCK(sc); - /* Sanity check the pin number is valid */ - if ((bank >= ti_max_gpio_banks()) || (sc->sc_mem_res[bank] == NULL)) { - TI_GPIO_UNLOCK(sc); + if ((bank >= ti_max_gpio_banks()) || (sc->sc_mem_res[bank] == NULL)) return (EINVAL); - } /* Set a very simple name */ snprintf(name, GPIOMAXNAME, "gpio_%u", pin); name[GPIOMAXNAME - 1] = '\0'; - TI_GPIO_UNLOCK(sc); - return (0); } @@ -460,30 +440,26 @@ ti_gpio_pin_setflags(device_t dev, uint3 struct ti_gpio_softc *sc = device_get_softc(dev); uint32_t bank = (pin / PINS_PER_BANK); uint32_t mask = (1UL << (pin % PINS_PER_BANK)); - uint32_t reg_val; - - TI_GPIO_LOCK(sc); + uint32_t oe; /* Sanity check the pin number is valid */ - if ((bank >= ti_max_gpio_banks()) || (sc->sc_mem_res[bank] == NULL)) { - TI_GPIO_UNLOCK(sc); + if ((bank >= ti_max_gpio_banks()) || (sc->sc_mem_res[bank] == NULL)) return (EINVAL); - } /* Set the GPIO mode and state */ + TI_GPIO_LOCK(sc); if (TI_GPIO_SET_FLAGS(dev, pin, flags) != 0) { TI_GPIO_UNLOCK(sc); return (EINVAL); } /* If configuring as an output set the "output enable" bit */ - reg_val = ti_gpio_read_4(sc, bank, TI_GPIO_OE); + oe = ti_gpio_read_4(sc, bank, TI_GPIO_OE); if (flags & GPIO_PIN_INPUT) - reg_val |= mask; + oe |= mask; else - reg_val &= ~mask; - ti_gpio_write_4(sc, bank, TI_GPIO_OE, reg_val); - + oe &= ~mask; + ti_gpio_write_4(sc, bank, TI_GPIO_OE, oe); TI_GPIO_UNLOCK(sc); return (0); @@ -509,18 +485,18 @@ ti_gpio_pin_set(device_t dev, uint32_t p struct ti_gpio_softc *sc = device_get_softc(dev); uint32_t bank = (pin / PINS_PER_BANK); uint32_t mask = (1UL << (pin % PINS_PER_BANK)); - - TI_GPIO_LOCK(sc); + uint32_t reg; /* Sanity check the pin number is valid */ - if ((bank >= ti_max_gpio_banks()) || (sc->sc_mem_res[bank] == NULL)) { - TI_GPIO_UNLOCK(sc); + if ((bank >= ti_max_gpio_banks()) || (sc->sc_mem_res[bank] == NULL)) return (EINVAL); - } - - ti_gpio_write_4(sc, bank, (value == GPIO_PIN_LOW) ? TI_GPIO_CLEARDATAOUT - : TI_GPIO_SETDATAOUT, mask); + TI_GPIO_LOCK(sc); + if (value == GPIO_PIN_LOW) + reg = TI_GPIO_CLEARDATAOUT; + else + reg = TI_GPIO_SETDATAOUT; + ti_gpio_write_4(sc, bank, reg, mask); TI_GPIO_UNLOCK(sc); return (0); @@ -547,25 +523,23 @@ ti_gpio_pin_get(device_t dev, uint32_t p struct ti_gpio_softc *sc = device_get_softc(dev); uint32_t bank = (pin / PINS_PER_BANK); uint32_t mask = (1UL << (pin % PINS_PER_BANK)); - uint32_t val = 0; - - TI_GPIO_LOCK(sc); + uint32_t oe, reg; /* Sanity check the pin number is valid */ - if ((bank >= ti_max_gpio_banks()) || (sc->sc_mem_res[bank] == NULL)) { - TI_GPIO_UNLOCK(sc); + if ((bank >= ti_max_gpio_banks()) || (sc->sc_mem_res[bank] == NULL)) return (EINVAL); - } - - /* Sanity check the pin is not configured as an output */ - val = ti_gpio_read_4(sc, bank, TI_GPIO_OE); - /* Read the value on the pin */ - if (val & mask) - *value = (ti_gpio_read_4(sc, bank, TI_GPIO_DATAIN) & mask) ? 1 : 0; + /* + * Return data from output latch when set as output and from the + * input register otherwise. + */ + TI_GPIO_LOCK(sc); + oe = ti_gpio_read_4(sc, bank, TI_GPIO_OE); + if (oe & mask) + reg = TI_GPIO_DATAIN; else - *value = (ti_gpio_read_4(sc, bank, TI_GPIO_DATAOUT) & mask) ? 1 : 0; - + reg = TI_GPIO_DATAOUT; + *value = (ti_gpio_read_4(sc, bank, reg) & mask) ? 1 : 0; TI_GPIO_UNLOCK(sc); return (0); @@ -589,23 +563,20 @@ ti_gpio_pin_toggle(device_t dev, uint32_ struct ti_gpio_softc *sc = device_get_softc(dev); uint32_t bank = (pin / PINS_PER_BANK); uint32_t mask = (1UL << (pin % PINS_PER_BANK)); - uint32_t val; - - TI_GPIO_LOCK(sc); + uint32_t reg, val; /* Sanity check the pin number is valid */ - if ((bank >= ti_max_gpio_banks()) || (sc->sc_mem_res[bank] == NULL)) { - TI_GPIO_UNLOCK(sc); + if ((bank >= ti_max_gpio_banks()) || (sc->sc_mem_res[bank] == NULL)) return (EINVAL); - } /* Toggle the pin */ + TI_GPIO_LOCK(sc); val = ti_gpio_read_4(sc, bank, TI_GPIO_DATAOUT); if (val & mask) - ti_gpio_write_4(sc, bank, TI_GPIO_CLEARDATAOUT, mask); + reg = TI_GPIO_CLEARDATAOUT; else - ti_gpio_write_4(sc, bank, TI_GPIO_SETDATAOUT, mask); - + reg = TI_GPIO_SETDATAOUT; + ti_gpio_write_4(sc, bank, reg, mask); TI_GPIO_UNLOCK(sc); return (0); From owner-svn-src-all@FreeBSD.ORG Mon Dec 22 16:29:16 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 135648B2; Mon, 22 Dec 2014 16:29:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F385264192; Mon, 22 Dec 2014 16:29:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBMGTFHN021630; Mon, 22 Dec 2014 16:29:15 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBMGTFnS021629; Mon, 22 Dec 2014 16:29:15 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201412221629.sBMGTFnS021629@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Mon, 22 Dec 2014 16:29:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276060 - head/sys/arm/ti X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Dec 2014 16:29:16 -0000 Author: loos Date: Mon Dec 22 16:29:15 2014 New Revision: 276060 URL: https://svnweb.freebsd.org/changeset/base/276060 Log: Remove some leftovers from OMAP3 support. Modified: head/sys/arm/ti/ti_gpio.c Modified: head/sys/arm/ti/ti_gpio.c ============================================================================== --- head/sys/arm/ti/ti_gpio.c Mon Dec 22 16:12:55 2014 (r276059) +++ head/sys/arm/ti/ti_gpio.c Mon Dec 22 16:29:15 2014 (r276060) @@ -69,10 +69,13 @@ __FBSDID("$FreeBSD$"); #include "gpio_if.h" #include "ti_gpio_if.h" +#if !defined(SOC_OMAP4) && !defined(SOC_TI_AM335X) +#error "Unknown SoC" +#endif + /* Register definitions */ #define TI_GPIO_REVISION 0x0000 #define TI_GPIO_SYSCONFIG 0x0010 -#if defined(SOC_OMAP4) || defined(SOC_TI_AM335X) #define TI_GPIO_IRQSTATUS_RAW_0 0x0024 #define TI_GPIO_IRQSTATUS_RAW_1 0x0028 #define TI_GPIO_IRQSTATUS_0 0x002C @@ -103,9 +106,6 @@ __FBSDID("$FreeBSD$"); #define TI_GPIO_SETWKUENA 0x0184 #define TI_GPIO_CLEARDATAOUT 0x0190 #define TI_GPIO_SETDATAOUT 0x0194 -#else -#error "Unknown SoC" -#endif /* Other SoC Specific definitions */ #define OMAP4_MAX_GPIO_BANKS 6 @@ -273,13 +273,8 @@ ti_gpio_intr_clr(struct ti_gpio_softc *s { /* We clear both set of registers. */ -#if defined(SOC_OMAP4) || defined(SOC_TI_AM335X) ti_gpio_write_4(sc, bank, TI_GPIO_IRQSTATUS_CLR_0, mask); ti_gpio_write_4(sc, bank, TI_GPIO_IRQSTATUS_CLR_1, mask); -#else - ti_gpio_write_4(sc, bank, TI_GPIO_CLEARIRQENABLE1, mask); - ti_gpio_write_4(sc, bank, TI_GPIO_CLEARIRQENABLE2, mask); -#endif } /** From owner-svn-src-all@FreeBSD.ORG Mon Dec 22 16:31:10 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5D7E6A3F; Mon, 22 Dec 2014 16:31:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49E2264265; Mon, 22 Dec 2014 16:31:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBMGVAfr022773; Mon, 22 Dec 2014 16:31:10 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBMGVAJM022757; Mon, 22 Dec 2014 16:31:10 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201412221631.sBMGVAJM022757@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 22 Dec 2014 16:31:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276061 - head/contrib/elftoolchain/elfcopy X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Dec 2014 16:31:10 -0000 Author: emaste Date: Mon Dec 22 16:31:09 2014 New Revision: 276061 URL: https://svnweb.freebsd.org/changeset/base/276061 Log: Set up default shstrtab entries at shstrtab initialization Instead of waiting until the addition of the first non-default entry. This fixes a segfault when strip(1) is asked to remove every section from an object file. Upstream elftoolchain ticket 463 Reviewed by: imp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D1341 Modified: head/contrib/elftoolchain/elfcopy/sections.c Modified: head/contrib/elftoolchain/elfcopy/sections.c ============================================================================== --- head/contrib/elftoolchain/elfcopy/sections.c Mon Dec 22 16:29:15 2014 (r276060) +++ head/contrib/elftoolchain/elfcopy/sections.c Mon Dec 22 16:31:09 2014 (r276061) @@ -1139,12 +1139,6 @@ add_to_shstrtab(struct elfcopy *ecp, con struct section *s; s = ecp->shstrtab; - if (s->buf == NULL) { - insert_to_strtab(s, ""); - insert_to_strtab(s, ".symtab"); - insert_to_strtab(s, ".strtab"); - insert_to_strtab(s, ".shstrtab"); - } insert_to_strtab(s, name); } @@ -1206,6 +1200,11 @@ init_shstrtab(struct elfcopy *ecp) s->loadable = 0; s->type = SHT_STRTAB; s->vma = 0; + + insert_to_strtab(s, ""); + insert_to_strtab(s, ".symtab"); + insert_to_strtab(s, ".strtab"); + insert_to_strtab(s, ".shstrtab"); } void From owner-svn-src-all@FreeBSD.ORG Mon Dec 22 16:35:00 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C36CBC49; Mon, 22 Dec 2014 16:35:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AEA39642AF; Mon, 22 Dec 2014 16:35:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBMGZ0GX025936; Mon, 22 Dec 2014 16:35:00 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBMGZ0pL025929; Mon, 22 Dec 2014 16:35:00 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201412221635.sBMGZ0pL025929@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 22 Dec 2014 16:35:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276062 - in head/contrib/elftoolchain: common readelf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Dec 2014 16:35:00 -0000 Author: emaste Date: Mon Dec 22 16:34:59 2014 New Revision: 276062 URL: https://svnweb.freebsd.org/changeset/base/276062 Log: Add AArch64 machine time and relocations for readelf Reviewed by: andrew Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D1333 Modified: head/contrib/elftoolchain/common/elfdefinitions.h head/contrib/elftoolchain/readelf/readelf.c Modified: head/contrib/elftoolchain/common/elfdefinitions.h ============================================================================== --- head/contrib/elftoolchain/common/elfdefinitions.h Mon Dec 22 16:31:09 2014 (r276061) +++ head/contrib/elftoolchain/common/elfdefinitions.h Mon Dec 22 16:34:59 2014 (r276062) @@ -770,6 +770,8 @@ _ELF_DEFINE_EM(EM_ETPU, 178, "Freescale Extended Time Processing Unit") \ _ELF_DEFINE_EM(EM_SLE9X, 179, \ "Infineon Technologies SLE9X core") \ +_ELF_DEFINE_EM(EM_AARCH64, 183, \ + "AArch64 (64-bit ARM)") \ _ELF_DEFINE_EM(EM_AVR32, 185, \ "Atmel Corporation 32-bit microprocessor family") \ _ELF_DEFINE_EM(EM_STM8, 186, \ Modified: head/contrib/elftoolchain/readelf/readelf.c ============================================================================== --- head/contrib/elftoolchain/readelf/readelf.c Mon Dec 22 16:31:09 2014 (r276061) +++ head/contrib/elftoolchain/readelf/readelf.c Mon Dec 22 16:34:59 2014 (r276062) @@ -487,6 +487,7 @@ elf_machine(unsigned int mach) case EM_SEP: return "Sharp embedded microprocessor"; case EM_ARCA: return "Arca RISC Microprocessor"; case EM_UNICORE: return "Microprocessor series from PKU-Unity Ltd"; + case EM_AARCH64: return "AArch64"; default: snprintf(s_mach, sizeof(s_mach), "", mach); return (s_mach); @@ -1041,6 +1042,67 @@ r_type(unsigned int mach, unsigned int t case 37: return "R_386_TLS_TPOFF32"; default: return ""; } + case EM_AARCH64: + switch(type) { + case 0: return "R_AARCH64_NONE"; + case 257: return "R_AARCH64_ABS64"; + case 258: return "R_AARCH64_ABS32"; + case 259: return "R_AARCH64_ABS16"; + case 260: return "R_AARCH64_PREL64"; + case 261: return "R_AARCH64_PREL32"; + case 262: return "R_AARCH64_PREL16"; + case 263: return "R_AARCH64_MOVW_UABS_G0"; + case 264: return "R_AARCH64_MOVW_UABS_G0_NC"; + case 265: return "R_AARCH64_MOVW_UABS_G1"; + case 266: return "R_AARCH64_MOVW_UABS_G1_NC"; + case 267: return "R_AARCH64_MOVW_UABS_G2"; + case 268: return "R_AARCH64_MOVW_UABS_G2_NC"; + case 269: return "R_AARCH64_MOVW_UABS_G3"; + case 270: return "R_AARCH64_MOVW_SABS_G0"; + case 271: return "R_AARCH64_MOVW_SABS_G1"; + case 272: return "R_AARCH64_MOVW_SABS_G2"; + case 273: return "R_AARCH64_LD_PREL_LO19"; + case 274: return "R_AARCH64_ADR_PREL_LO21"; + case 275: return "R_AARCH64_ADR_PREL_PG_HI21"; + case 276: return "R_AARCH64_ADR_PREL_PG_HI21_NC"; + case 277: return "R_AARCH64_ADD_ABS_LO12_NC"; + case 278: return "R_AARCH64_LDST8_ABS_LO12_NC"; + case 279: return "R_AARCH64_TSTBR14"; + case 280: return "R_AARCH64_CONDBR19"; + case 282: return "R_AARCH64_JUMP26"; + case 283: return "R_AARCH64_CALL26"; + case 284: return "R_AARCH64_LDST16_ABS_LO12_NC"; + case 285: return "R_AARCH64_LDST32_ABS_LO12_NC"; + case 286: return "R_AARCH64_LDST64_ABS_LO12_NC"; + case 287: return "R_AARCH64_MOVW_PREL_G0"; + case 288: return "R_AARCH64_MOVW_PREL_G0_NC"; + case 289: return "R_AARCH64_MOVW_PREL_G1"; + case 290: return "R_AARCH64_MOVW_PREL_G1_NC"; + case 291: return "R_AARCH64_MOVW_PREL_G2"; + case 292: return "R_AARCH64_MOVW_PREL_G2_NC"; + case 293: return "R_AARCH64_MOVW_PREL_G3"; + case 299: return "R_AARCH64_LDST128_ABS_LO12_NC"; + case 300: return "R_AARCH64_MOVW_GOTOFF_G0"; + case 301: return "R_AARCH64_MOVW_GOTOFF_G0_NC"; + case 302: return "R_AARCH64_MOVW_GOTOFF_G1"; + case 303: return "R_AARCH64_MOVW_GOTOFF_G1_NC"; + case 304: return "R_AARCH64_MOVW_GOTOFF_G2"; + case 305: return "R_AARCH64_MOVW_GOTOFF_G2_NC"; + case 306: return "R_AARCH64_MOVW_GOTOFF_G3"; + case 307: return "R_AARCH64_GOTREL64"; + case 308: return "R_AARCH64_GOTREL32"; + case 309: return "R_AARCH64_GOT_LD_PREL19"; + case 310: return "R_AARCH64_LD64_GOTOFF_LO15"; + case 311: return "R_AARCH64_ADR_GOT_PAGE"; + case 312: return "R_AARCH64_LD64_GOT_LO12_NC"; + case 313: return "R_AARCH64_LD64_GOTPAGE_LO15"; + case 1024: return "R_AARCH64_COPY"; + case 1025: return "R_AARCH64_GLOB_DAT"; + case 1026: return "R_AARCH64_JUMP_SLOT"; + case 1027: return "R_AARCH64_RELATIVE"; + case 1031: return "R_AARCH64_TLSDESC"; + default: return ""; + } case EM_ARM: switch(type) { case 0: return "R_ARM_NONE"; From owner-svn-src-all@FreeBSD.ORG Mon Dec 22 16:38:30 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A8A4FDEB; Mon, 22 Dec 2014 16:38:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 93F72642E7; Mon, 22 Dec 2014 16:38:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBMGcUVf026430; Mon, 22 Dec 2014 16:38:30 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBMGcUvQ026429; Mon, 22 Dec 2014 16:38:30 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201412221638.sBMGcUvQ026429@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Mon, 22 Dec 2014 16:38:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276063 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Dec 2014 16:38:30 -0000 Author: smh Date: Mon Dec 22 16:38:29 2014 New Revision: 276063 URL: https://svnweb.freebsd.org/changeset/base/276063 Log: Standardise on illumos for #ifdef's in zvol.c Also correct as per style(9) on the use of #ifdef comments. This is a no-op change as pre-cursor to a full cleanup and merge with upstream zvol changes. Sponsored by: Multiplay Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Mon Dec 22 16:34:59 2014 (r276062) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Mon Dec 22 16:38:29 2014 (r276063) @@ -214,7 +214,7 @@ static void zvol_geom_worker(void *arg); static void zvol_size_changed(zvol_state_t *zv) { -#ifdef sun +#ifdef illumos dev_t dev = makedevice(maj, min); VERIFY(ddi_prop_update_int64(dev, zfs_dip, @@ -225,7 +225,7 @@ zvol_size_changed(zvol_state_t *zv) /* Notify specfs to invalidate the cached size */ spec_size_invalidate(dev, VBLK); spec_size_invalidate(dev, VCHR); -#else /* !sun */ +#else /* !illumos */ if (zv->zv_volmode == ZFS_VOLMODE_GEOM) { struct g_provider *pp; @@ -236,7 +236,7 @@ zvol_size_changed(zvol_state_t *zv) g_resize_provider(pp, zv->zv_volsize); g_topology_unlock(); } -#endif /* !sun */ +#endif /* illumos */ } int @@ -517,7 +517,7 @@ zil_replay_func_t *zvol_replay_vector[TX zvol_replay_err, /* TX_WRITE2 */ }; -#ifdef sun +#ifdef illumos int zvol_name2minor(const char *name, minor_t *minor) { @@ -530,7 +530,7 @@ zvol_name2minor(const char *name, minor_ mutex_exit(&spa_namespace_lock); return (zv ? 0 : -1); } -#endif /* sun */ +#endif /* illumos */ /* * Create a minor node (plus a whole lot more) for the specified volume. @@ -565,7 +565,7 @@ zvol_create_minor(const char *name) return (error); } -#ifdef sun +#ifdef illumos if ((minor = zfsdev_minor_alloc()) == 0) { dmu_objset_disown(os, FTAG); mutex_exit(&spa_namespace_lock); @@ -604,7 +604,7 @@ zvol_create_minor(const char *name) zs = ddi_get_soft_state(zfsdev_state, minor); zs->zss_type = ZSST_ZVOL; zv = zs->zss_data = kmem_zalloc(sizeof (zvol_state_t), KM_SLEEP); -#else /* !sun */ +#else /* !illumos */ zv = kmem_zalloc(sizeof(*zv), KM_SLEEP); zv->zv_state = 0; @@ -651,7 +651,7 @@ zvol_create_minor(const char *name) dev->si_drv2 = zv; } LIST_INSERT_HEAD(&all_zvols, zv, zv_links); -#endif /* !sun */ +#endif /* illumos */ (void) strlcpy(zv->zv_name, name, MAXPATHLEN); zv->zv_min_bs = DEV_BSHIFT; @@ -681,7 +681,7 @@ zvol_create_minor(const char *name) mutex_exit(&spa_namespace_lock); -#ifndef sun +#ifndef illumos if (zv->zv_volmode == ZFS_VOLMODE_GEOM) { zvol_geom_run(zv); g_topology_unlock(); @@ -700,7 +700,7 @@ zvol_create_minor(const char *name) static int zvol_remove_zv(zvol_state_t *zv) { -#ifdef sun +#ifdef illumos minor_t minor = zv->zv_minor; #endif @@ -710,7 +710,7 @@ zvol_remove_zv(zvol_state_t *zv) ZFS_LOG(1, "ZVOL %s destroyed.", zv->zv_name); -#ifdef sun +#ifdef illumos (void) snprintf(nmbuf, sizeof (nmbuf), "%u,raw", minor); ddi_remove_minor_node(zfs_dip, nmbuf); #else @@ -721,7 +721,7 @@ zvol_remove_zv(zvol_state_t *zv) g_topology_unlock(); } else if (zv->zv_volmode == ZFS_VOLMODE_DEV) destroy_dev(zv->zv_dev); -#endif /* sun */ +#endif avl_destroy(&zv->zv_znode.z_range_avl); mutex_destroy(&zv->zv_znode.z_range_lock); @@ -809,7 +809,7 @@ zvol_last_close(zvol_state_t *zv) zv->zv_objset = NULL; } -#ifdef sun +#ifdef illumos int zvol_prealloc(zvol_state_t *zv) { @@ -848,7 +848,7 @@ zvol_prealloc(zvol_state_t *zv) return (0); } -#endif /* sun */ +#endif /* illumos */ static int zvol_update_volsize(objset_t *os, uint64_t volsize) @@ -955,7 +955,7 @@ zvol_set_volsize(const char *name, major } } -#ifdef sun +#ifdef illumos /* * Generate a LUN expansion event. */ @@ -976,7 +976,7 @@ zvol_set_volsize(const char *name, major nvlist_free(attr); kmem_free(physpath, MAXPATHLEN); } -#endif /* sun */ +#endif /* illumos */ out: dmu_objset_rele(os, FTAG); @@ -1260,7 +1260,7 @@ zvol_log_write(zvol_state_t *zv, dmu_tx_ } } -#ifdef sun +#ifdef illumos static int zvol_dumpio_vdev(vdev_t *vd, void *addr, uint64_t offset, uint64_t origoffset, uint64_t size, boolean_t doread, boolean_t isdump) @@ -1353,7 +1353,7 @@ zvol_dumpio(zvol_state_t *zv, void *addr return (error); } -#endif /* sun */ +#endif /* illumos */ void zvol_strategy(struct bio *bp) @@ -1494,7 +1494,7 @@ out: biofinish(bp, NULL, error); } -#ifdef sun +#ifdef illumos /* * Set the buffer count to the zvol maximum transfer. * Using our own routine instead of the default minphys() @@ -1550,17 +1550,17 @@ int zvol_read(dev_t dev, uio_t *uio, cred_t *cr) { minor_t minor = getminor(dev); -#else +#else /* !illumos */ int zvol_read(struct cdev *dev, struct uio *uio, int ioflag) { -#endif +#endif /* illumos */ zvol_state_t *zv; uint64_t volsize; rl_t *rl; int error = 0; -#ifdef sun +#ifdef illumos zv = zfsdev_get_soft_state(minor, ZSST_ZVOL); if (zv == NULL) return (SET_ERROR(ENXIO)); @@ -1602,24 +1602,24 @@ zvol_read(struct cdev *dev, struct uio * return (error); } -#ifdef sun +#ifdef illumos /*ARGSUSED*/ int zvol_write(dev_t dev, uio_t *uio, cred_t *cr) { minor_t minor = getminor(dev); -#else +#else /* !illumos */ int zvol_write(struct cdev *dev, struct uio *uio, int ioflag) { -#endif +#endif /* illumos */ zvol_state_t *zv; uint64_t volsize; rl_t *rl; int error = 0; boolean_t sync; -#ifdef sun +#ifdef illumos zv = zfsdev_get_soft_state(minor, ZSST_ZVOL); if (zv == NULL) return (SET_ERROR(ENXIO)); @@ -1638,9 +1638,7 @@ zvol_write(struct cdev *dev, struct uio zvol_minphys, uio); return (error); } -#endif -#ifdef sun sync = !(zv->zv_flags & ZVOL_WCE) || #else sync = (ioflag & IO_SYNC) || @@ -1677,7 +1675,7 @@ zvol_write(struct cdev *dev, struct uio return (error); } -#ifdef sun +#ifdef illumos int zvol_getefi(void *arg, int flag, uint64_t vs, uint8_t bs) { @@ -1806,7 +1804,7 @@ zvol_log_write_minor(void *minor_hdl, dm /* * END entry points to allow external callers access to the volume. */ -#endif /* sun */ +#endif /* illumos */ /* * Log a DKIOCFREE/free-long-range to the ZIL with TX_TRUNCATE. @@ -1832,7 +1830,7 @@ zvol_log_truncate(zvol_state_t *zv, dmu_ zil_itx_assign(zilog, itx, tx); } -#ifdef sun +#ifdef illumos /* * Dirtbag ioctls to support mkfs(1M) for UFS filesystems. See dkio(7I). * Also a dirtbag dkio ioctl for unmap/free-block functionality. @@ -2047,7 +2045,7 @@ zvol_ioctl(dev_t dev, int cmd, intptr_t mutex_exit(&spa_namespace_lock); return (error); } -#endif /* sun */ +#endif /* illumos */ int zvol_busy(void) @@ -2070,7 +2068,7 @@ zvol_fini(void) ZFS_LOG(1, "ZVOL Deinitialized."); } -#ifdef sun +#ifdef illumos /*ARGSUSED*/ static int zfs_mvdev_dump_feature_check(void *arg, dmu_tx_t *tx) @@ -2355,7 +2353,7 @@ zvol_dump_fini(zvol_state_t *zv) return (0); } -#endif /* sun */ +#endif /* illumos */ static void zvol_geom_run(zvol_state_t *zv) From owner-svn-src-all@FreeBSD.ORG Mon Dec 22 16:46:08 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 96221424; Mon, 22 Dec 2014 16:46:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 76D426443E; Mon, 22 Dec 2014 16:46:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBMGk8MV031202; Mon, 22 Dec 2014 16:46:08 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBMGk8dT031200; Mon, 22 Dec 2014 16:46:08 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201412221646.sBMGk8dT031200@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: Roger Pau Monné Date: Mon, 22 Dec 2014 16:46:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276064 - in head/sys/dev/vt/hw: efifb vga X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Dec 2014 16:46:08 -0000 Author: royger Date: Mon Dec 22 16:46:07 2014 New Revision: 276064 URL: https://svnweb.freebsd.org/changeset/base/276064 Log: vt: register the memory regions used by the vt drivers Current VT drivers don't register the memory regions they use with the nexus. This patch makes vt_vga and vt_efifb register the memory regions they use. This is needed (at least) for Xen support, since the FreeBSD kernel will try to use the holes in the memory map to map memory from other domains and setup it's grant table. Sponsored by: Citrix Systems R&D Reported by: sbruno Tested by: emaste Reviewed by: ray PR: 195537 Differential Revision: https://reviews.freebsd.org/D1291 Modified: head/sys/dev/vt/hw/efifb/efifb.c head/sys/dev/vt/hw/vga/vt_vga.c Modified: head/sys/dev/vt/hw/efifb/efifb.c ============================================================================== --- head/sys/dev/vt/hw/efifb/efifb.c Mon Dec 22 16:38:29 2014 (r276063) +++ head/sys/dev/vt/hw/efifb/efifb.c Mon Dec 22 16:46:07 2014 (r276064) @@ -37,6 +37,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include +#include #include "opt_platform.h" @@ -179,3 +182,53 @@ vt_efifb_remap(void *xinfo) info->fb_size, VM_MEMATTR_WRITE_COMBINING); } +/* Dummy NewBus functions to reserve the resources used by the efifb driver */ +static void +vtefifb_identify(driver_t *driver, device_t parent) +{ + + if (local_info.fb_pbase == 0 || local_info.fb_size == 0) + return; + + if (BUS_ADD_CHILD(parent, 0, driver->name, 0) == NULL) + panic("Unable to attach vt_efifb console"); +} + +static int +vtefifb_probe(device_t dev) +{ + + device_set_desc(dev, "vt_efifb driver"); + return (BUS_PROBE_NOWILDCARD); +} + +static int +vtefifb_attach(device_t dev) +{ + struct resource *pseudo_phys_res; + int res_id; + + res_id = 0; + pseudo_phys_res = bus_alloc_resource(dev, SYS_RES_MEMORY, + &res_id, local_info.fb_pbase, + local_info.fb_pbase + local_info.fb_size, + local_info.fb_size, RF_ACTIVE); + if (pseudo_phys_res == NULL) + panic("Unable to reserve vt_efifb memory"); + return (0); +} + +/*-------------------- Private Device Attachment Data -----------------------*/ +static device_method_t vtefifb_methods[] = { + /* Device interface */ + DEVMETHOD(device_identify, vtefifb_identify), + DEVMETHOD(device_probe, vtefifb_probe), + DEVMETHOD(device_attach, vtefifb_attach), + + DEVMETHOD_END +}; + +DEFINE_CLASS_0(vtefifb, vtefifb_driver, vtefifb_methods, 0); +devclass_t vtefifb_devclass; + +DRIVER_MODULE(vtefifb, nexus, vtefifb_driver, vtefifb_devclass, NULL, NULL); Modified: head/sys/dev/vt/hw/vga/vt_vga.c ============================================================================== --- head/sys/dev/vt/hw/vga/vt_vga.c Mon Dec 22 16:38:29 2014 (r276063) +++ head/sys/dev/vt/hw/vga/vt_vga.c Mon Dec 22 16:46:07 2014 (r276064) @@ -36,6 +36,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include +#include #include #include @@ -56,6 +59,7 @@ struct vga_softc { bus_space_handle_t vga_reg_handle; int vga_wmode; term_color_t vga_curfg, vga_curbg; + boolean_t vga_enabled; }; /* Convenience macros. */ @@ -1228,6 +1232,7 @@ vga_init(struct vt_device *vd) vd->vd_height = VT_VGA_HEIGHT; } vga_initialize(vd, textmode); + sc->vga_enabled = true; return (CN_INTERNAL); } @@ -1241,3 +1246,53 @@ vga_postswitch(struct vt_device *vd) /* Ask vt(9) to update chars on visible area. */ vd->vd_flags |= VDF_INVALID; } + +/* Dummy NewBus functions to reserve the resources used by the vt_vga driver */ +static void +vtvga_identify(driver_t *driver, device_t parent) +{ + + if (!vga_conssoftc.vga_enabled) + return; + + if (BUS_ADD_CHILD(parent, 0, driver->name, 0) == NULL) + panic("Unable to attach vt_vga console"); +} + +static int +vtvga_probe(device_t dev) +{ + + device_set_desc(dev, "vt_vga driver"); + return (BUS_PROBE_NOWILDCARD); +} + +static int +vtvga_attach(device_t dev) +{ + struct resource *pseudo_phys_res; + int res_id; + + res_id = 0; + pseudo_phys_res = bus_alloc_resource(dev, SYS_RES_MEMORY, + &res_id, VGA_MEM_BASE, VGA_MEM_BASE + VGA_MEM_SIZE, + VGA_MEM_SIZE, RF_ACTIVE); + if (pseudo_phys_res == NULL) + panic("Unable to reserve vt_vga memory"); + return (0); +} + +/*-------------------- Private Device Attachment Data -----------------------*/ +static device_method_t vtvga_methods[] = { + /* Device interface */ + DEVMETHOD(device_identify, vtvga_identify), + DEVMETHOD(device_probe, vtvga_probe), + DEVMETHOD(device_attach, vtvga_attach), + + DEVMETHOD_END +}; + +DEFINE_CLASS_0(vtvga, vtvga_driver, vtvga_methods, 0); +devclass_t vtvga_devclass; + +DRIVER_MODULE(vtvga, nexus, vtvga_driver, vtvga_devclass, NULL, NULL); From owner-svn-src-all@FreeBSD.ORG Mon Dec 22 16:53:05 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8E8136FD; Mon, 22 Dec 2014 16:53:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 60C9E64548; Mon, 22 Dec 2014 16:53:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBMGr5JO035623; Mon, 22 Dec 2014 16:53:05 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBMGr5uU035622; Mon, 22 Dec 2014 16:53:05 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201412221653.sBMGr5uU035622@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 22 Dec 2014 16:53:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276065 - head/sys/dev/ipmi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Dec 2014 16:53:05 -0000 Author: jhb Date: Mon Dec 22 16:53:04 2014 New Revision: 276065 URL: https://svnweb.freebsd.org/changeset/base/276065 Log: Explicitly treat timeouts when waiting for IBF or OBF to change state as an error. This fixes occasional hangs in the IPMI kcs thread when using ipmitool locally. MFC after: 1 week Modified: head/sys/dev/ipmi/ipmi_kcs.c Modified: head/sys/dev/ipmi/ipmi_kcs.c ============================================================================== --- head/sys/dev/ipmi/ipmi_kcs.c Mon Dec 22 16:46:07 2014 (r276064) +++ head/sys/dev/ipmi/ipmi_kcs.c Mon Dec 22 16:53:04 2014 (r276065) @@ -184,6 +184,8 @@ kcs_start_write(struct ipmi_softc *sc) for (retry = 0; retry < 10; retry++) { /* Wait for IBF = 0 */ status = kcs_wait_for_ibf(sc, 0); + if (status & KCS_STATUS_IBF) + return (0); /* Clear OBF */ kcs_clear_obf(sc, status); @@ -193,6 +195,9 @@ kcs_start_write(struct ipmi_softc *sc) /* Wait for IBF = 0 */ status = kcs_wait_for_ibf(sc, 0); + if (status & KCS_STATUS_IBF) + return (0); + if (KCS_STATUS_STATE(status) == KCS_STATUS_STATE_WRITE) break; DELAY(1000000); @@ -222,6 +227,8 @@ kcs_write_byte(struct ipmi_softc *sc, u_ /* Wait for IBF = 0 */ status = kcs_wait_for_ibf(sc, 0); + if (status & KCS_STATUS_IBF) + return (0); if (KCS_STATUS_STATE(status) != KCS_STATUS_STATE_WRITE) return (0); @@ -244,6 +251,8 @@ kcs_write_last_byte(struct ipmi_softc *s /* Wait for IBF = 0 */ status = kcs_wait_for_ibf(sc, 0); + if (status & KCS_STATUS_IBF) + return (0); if (KCS_STATUS_STATE(status) != KCS_STATUS_STATE_WRITE) /* error state */ @@ -274,6 +283,8 @@ kcs_read_byte(struct ipmi_softc *sc, u_c /* Wait for OBF = 1 */ status = kcs_wait_for_obf(sc, 1); + if ((status & KCS_STATUS_OBF) == 0) + return (0); /* Read Data_out */ *data = INB(sc, KCS_DATA); @@ -288,6 +299,8 @@ kcs_read_byte(struct ipmi_softc *sc, u_c /* Wait for OBF = 1*/ status = kcs_wait_for_obf(sc, 1); + if ((status & KCS_STATUS_OBF) == 0) + return (0); /* Read Dummy */ dummy = INB(sc, KCS_DATA); From owner-svn-src-all@FreeBSD.ORG Mon Dec 22 17:04:52 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6A175BC9; Mon, 22 Dec 2014 17:04:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5566664D0C; Mon, 22 Dec 2014 17:04:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBMH4q4Q041046; Mon, 22 Dec 2014 17:04:52 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBMH4qEB041045; Mon, 22 Dec 2014 17:04:52 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201412221704.sBMH4qEB041045@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Mon, 22 Dec 2014 17:04:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276066 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Dec 2014 17:04:52 -0000 Author: smh Date: Mon Dec 22 17:04:51 2014 New Revision: 276066 URL: https://svnweb.freebsd.org/changeset/base/276066 Log: Refactor zvol locking to minimise diff with upstream Use #define zfsdev_state_lock spa_namespace_lock instead of replacing all zfsdev_state_lock with spa_namespace_lock to minimise changes from upstream. Differential Revision: D1302 MFC after: 1 month X-MFC-With r276063 Sponsored by: Multiplay Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Mon Dec 22 16:53:04 2014 (r276065) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Mon Dec 22 17:04:51 2014 (r276066) @@ -110,11 +110,20 @@ static char *zvol_tag = "zvol_tag"; #define ZVOL_DUMPSIZE "dumpsize" /* - * The spa_namespace_lock protects the zfsdev_state structure from being - * modified while it's being used, e.g. an open that comes in before a - * create finishes. It also protects temporary opens of the dataset so that, + * This lock protects the zfsdev_state structure from being modified + * while it's being used, e.g. an open that comes in before a create + * finishes. It also protects temporary opens of the dataset so that, * e.g., an open doesn't get a spurious EBUSY. */ +#ifdef illumos +kmutex_t zfsdev_state_lock; +#else +/* + * In FreeBSD we've replaced the upstream zfsdev_state_lock with the + * spa_namespace_lock in the ZVOL code. + */ +#define zfsdev_state_lock spa_namespace_lock +#endif static uint32_t zvol_minors; SYSCTL_DECL(_vfs_zfs); @@ -294,7 +303,7 @@ zvol_minor_lookup(const char *name) { zvol_state_t *zv; - ASSERT(MUTEX_HELD(&spa_namespace_lock)); + ASSERT(MUTEX_HELD(&zfsdev_state_lock)); LIST_FOREACH(zv, &all_zvols, zv_links) { if (strcmp(zv->zv_name, name) == 0) @@ -523,11 +532,11 @@ zvol_name2minor(const char *name, minor_ { zvol_state_t *zv; - mutex_enter(&spa_namespace_lock); + mutex_enter(&zfsdev_state_lock); zv = zvol_minor_lookup(name); if (minor && zv) *minor = zv->zv_minor; - mutex_exit(&spa_namespace_lock); + mutex_exit(&zfsdev_state_lock); return (zv ? 0 : -1); } #endif /* illumos */ @@ -550,10 +559,10 @@ zvol_create_minor(const char *name) ZFS_LOG(1, "Creating ZVOL %s...", name); - mutex_enter(&spa_namespace_lock); + mutex_enter(&zfsdev_state_lock); if (zvol_minor_lookup(name) != NULL) { - mutex_exit(&spa_namespace_lock); + mutex_exit(&zfsdev_state_lock); return (SET_ERROR(EEXIST)); } @@ -561,20 +570,20 @@ zvol_create_minor(const char *name) error = dmu_objset_own(name, DMU_OST_ZVOL, B_TRUE, FTAG, &os); if (error) { - mutex_exit(&spa_namespace_lock); + mutex_exit(&zfsdev_state_lock); return (error); } #ifdef illumos if ((minor = zfsdev_minor_alloc()) == 0) { dmu_objset_disown(os, FTAG); - mutex_exit(&spa_namespace_lock); + mutex_exit(&zfsdev_state_lock); return (SET_ERROR(ENXIO)); } if (ddi_soft_state_zalloc(zfsdev_state, minor) != DDI_SUCCESS) { dmu_objset_disown(os, FTAG); - mutex_exit(&spa_namespace_lock); + mutex_exit(&zfsdev_state_lock); return (SET_ERROR(EAGAIN)); } (void) ddi_prop_update_string(minor, zfs_dip, ZVOL_PROP_NAME, @@ -586,7 +595,7 @@ zvol_create_minor(const char *name) minor, DDI_PSEUDO, 0) == DDI_FAILURE) { ddi_soft_state_free(zfsdev_state, minor); dmu_objset_disown(os, FTAG); - mutex_exit(&spa_namespace_lock); + mutex_exit(&zfsdev_state_lock); return (SET_ERROR(EAGAIN)); } @@ -597,7 +606,7 @@ zvol_create_minor(const char *name) ddi_remove_minor_node(zfs_dip, chrbuf); ddi_soft_state_free(zfsdev_state, minor); dmu_objset_disown(os, FTAG); - mutex_exit(&spa_namespace_lock); + mutex_exit(&zfsdev_state_lock); return (SET_ERROR(EAGAIN)); } @@ -612,7 +621,7 @@ zvol_create_minor(const char *name) if (error) { kmem_free(zv, sizeof(*zv)); dmu_objset_disown(os, zvol_tag); - mutex_exit(&spa_namespace_lock); + mutex_exit(&zfsdev_state_lock); return (error); } error = dsl_prop_get_integer(name, @@ -643,7 +652,7 @@ zvol_create_minor(const char *name) 0640, "%s/%s", ZVOL_DRIVER, name) != 0) { kmem_free(zv, sizeof(*zv)); dmu_objset_disown(os, FTAG); - mutex_exit(&spa_namespace_lock); + mutex_exit(&zfsdev_state_lock); return (SET_ERROR(ENXIO)); } zv->zv_dev = dev; @@ -679,7 +688,7 @@ zvol_create_minor(const char *name) zvol_minors++; - mutex_exit(&spa_namespace_lock); + mutex_exit(&zfsdev_state_lock); #ifndef illumos if (zv->zv_volmode == ZFS_VOLMODE_GEOM) { @@ -704,7 +713,7 @@ zvol_remove_zv(zvol_state_t *zv) minor_t minor = zv->zv_minor; #endif - ASSERT(MUTEX_HELD(&spa_namespace_lock)); + ASSERT(MUTEX_HELD(&zfsdev_state_lock)); if (zv->zv_total_opens != 0) return (SET_ERROR(EBUSY)); @@ -738,13 +747,13 @@ zvol_remove_minor(const char *name) zvol_state_t *zv; int rc; - mutex_enter(&spa_namespace_lock); + mutex_enter(&zfsdev_state_lock); if ((zv = zvol_minor_lookup(name)) == NULL) { - mutex_exit(&spa_namespace_lock); + mutex_exit(&zfsdev_state_lock); return (SET_ERROR(ENXIO)); } rc = zvol_remove_zv(zv); - mutex_exit(&spa_namespace_lock); + mutex_exit(&zfsdev_state_lock); return (rc); } @@ -856,7 +865,7 @@ zvol_update_volsize(objset_t *os, uint64 dmu_tx_t *tx; int error; - ASSERT(MUTEX_HELD(&spa_namespace_lock)); + ASSERT(MUTEX_HELD(&zfsdev_state_lock)); tx = dmu_tx_create(os); dmu_tx_hold_zap(tx, ZVOL_ZAP_OBJ, TRUE, NULL); @@ -886,7 +895,7 @@ zvol_remove_minors(const char *name) namelen = strlen(name); DROP_GIANT(); - mutex_enter(&spa_namespace_lock); + mutex_enter(&zfsdev_state_lock); LIST_FOREACH_SAFE(zv, &all_zvols, zv_links, tzv) { if (strcmp(zv->zv_name, name) == 0 || @@ -897,7 +906,7 @@ zvol_remove_minors(const char *name) } } - mutex_exit(&spa_namespace_lock); + mutex_exit(&zfsdev_state_lock); PICKUP_GIANT(); } @@ -911,10 +920,10 @@ zvol_set_volsize(const char *name, major uint64_t old_volsize = 0ULL; uint64_t readonly; - mutex_enter(&spa_namespace_lock); + mutex_enter(&zfsdev_state_lock); zv = zvol_minor_lookup(name); if ((error = dmu_objset_hold(name, FTAG, &os)) != 0) { - mutex_exit(&spa_namespace_lock); + mutex_exit(&zfsdev_state_lock); return (error); } @@ -981,7 +990,7 @@ zvol_set_volsize(const char *name, major out: dmu_objset_rele(os, FTAG); - mutex_exit(&spa_namespace_lock); + mutex_exit(&zfsdev_state_lock); return (error); } @@ -1005,15 +1014,15 @@ zvol_open(struct g_provider *pp, int fla * recursively, but that function already has all the * necessary protection. */ - if (!MUTEX_HELD(&spa_namespace_lock)) { - mutex_enter(&spa_namespace_lock); + if (!MUTEX_HELD(&zfsdev_state_lock)) { + mutex_enter(&zfsdev_state_lock); locked = B_TRUE; } zv = pp->private; if (zv == NULL) { if (locked) - mutex_exit(&spa_namespace_lock); + mutex_exit(&zfsdev_state_lock); return (SET_ERROR(ENXIO)); } @@ -1021,7 +1030,7 @@ zvol_open(struct g_provider *pp, int fla err = zvol_first_open(zv); if (err) { if (locked) - mutex_exit(&spa_namespace_lock); + mutex_exit(&zfsdev_state_lock); return (err); } pp->mediasize = zv->zv_volsize; @@ -1048,14 +1057,14 @@ zvol_open(struct g_provider *pp, int fla zv->zv_total_opens += count; if (locked) - mutex_exit(&spa_namespace_lock); + mutex_exit(&zfsdev_state_lock); return (err); out: if (zv->zv_total_opens == 0) zvol_last_close(zv); if (locked) - mutex_exit(&spa_namespace_lock); + mutex_exit(&zfsdev_state_lock); return (err); } @@ -1068,15 +1077,15 @@ zvol_close(struct g_provider *pp, int fl boolean_t locked = B_FALSE; /* See comment in zvol_open(). */ - if (!MUTEX_HELD(&spa_namespace_lock)) { - mutex_enter(&spa_namespace_lock); + if (!MUTEX_HELD(&zfsdev_state_lock)) { + mutex_enter(&zfsdev_state_lock); locked = B_TRUE; } zv = pp->private; if (zv == NULL) { if (locked) - mutex_exit(&spa_namespace_lock); + mutex_exit(&zfsdev_state_lock); return (SET_ERROR(ENXIO)); } @@ -1100,7 +1109,7 @@ zvol_close(struct g_provider *pp, int fl zvol_last_close(zv); if (locked) - mutex_exit(&spa_namespace_lock); + mutex_exit(&zfsdev_state_lock); return (error); } @@ -1844,12 +1853,12 @@ zvol_ioctl(dev_t dev, int cmd, intptr_t int error = 0; rl_t *rl; - mutex_enter(&spa_namespace_lock); + mutex_enter(&zfsdev_state_lock); zv = zfsdev_get_soft_state(getminor(dev), ZSST_ZVOL); if (zv == NULL) { - mutex_exit(&spa_namespace_lock); + mutex_exit(&zfsdev_state_lock); return (SET_ERROR(ENXIO)); } ASSERT(zv->zv_total_opens > 0); @@ -1867,7 +1876,7 @@ zvol_ioctl(dev_t dev, int cmd, intptr_t dki.dki_unit = getminor(dev); dki.dki_maxtransfer = 1 << (SPA_OLD_MAXBLOCKSHIFT - zv->zv_min_bs); - mutex_exit(&spa_namespace_lock); + mutex_exit(&zfsdev_state_lock); if (ddi_copyout(&dki, (void *)arg, sizeof (dki), flag)) error = SET_ERROR(EFAULT); return (error); @@ -1881,7 +1890,7 @@ zvol_ioctl(dev_t dev, int cmd, intptr_t dkm.dki_lbsize = 1U << zv->zv_min_bs; dkm.dki_capacity = zv->zv_volsize >> zv->zv_min_bs; dkm.dki_media_type = DK_UNKNOWN; - mutex_exit(&spa_namespace_lock); + mutex_exit(&zfsdev_state_lock); if (ddi_copyout(&dkm, (void *)arg, sizeof (dkm), flag)) error = SET_ERROR(EFAULT); return (error); @@ -1896,7 +1905,7 @@ zvol_ioctl(dev_t dev, int cmd, intptr_t dkmext.dki_pbsize = zv->zv_volblocksize; dkmext.dki_capacity = zv->zv_volsize >> zv->zv_min_bs; dkmext.dki_media_type = DK_UNKNOWN; - mutex_exit(&spa_namespace_lock); + mutex_exit(&zfsdev_state_lock); if (ddi_copyout(&dkmext, (void *)arg, sizeof (dkmext), flag)) error = SET_ERROR(EFAULT); return (error); @@ -1907,14 +1916,14 @@ zvol_ioctl(dev_t dev, int cmd, intptr_t uint64_t vs = zv->zv_volsize; uint8_t bs = zv->zv_min_bs; - mutex_exit(&spa_namespace_lock); + mutex_exit(&zfsdev_state_lock); error = zvol_getefi((void *)arg, flag, vs, bs); return (error); } case DKIOCFLUSHWRITECACHE: dkc = (struct dk_callback *)arg; - mutex_exit(&spa_namespace_lock); + mutex_exit(&zfsdev_state_lock); zil_commit(zv->zv_zilog, ZVOL_OBJ); if ((flag & FKIOCTL) && dkc != NULL && dkc->dkc_callback) { (*dkc->dkc_callback)(dkc->dkc_cookie, error); @@ -1940,10 +1949,10 @@ zvol_ioctl(dev_t dev, int cmd, intptr_t } if (wce) { zv->zv_flags |= ZVOL_WCE; - mutex_exit(&spa_namespace_lock); + mutex_exit(&zfsdev_state_lock); } else { zv->zv_flags &= ~ZVOL_WCE; - mutex_exit(&spa_namespace_lock); + mutex_exit(&zfsdev_state_lock); zil_commit(zv->zv_zilog, ZVOL_OBJ); } return (0); @@ -1995,7 +2004,7 @@ zvol_ioctl(dev_t dev, int cmd, intptr_t if (df.df_start >= zv->zv_volsize) break; /* No need to do anything... */ - mutex_exit(&spa_namespace_lock); + mutex_exit(&zfsdev_state_lock); rl = zfs_range_lock(&zv->zv_znode, df.df_start, df.df_length, RL_WRITER); @@ -2042,7 +2051,7 @@ zvol_ioctl(dev_t dev, int cmd, intptr_t break; } - mutex_exit(&spa_namespace_lock); + mutex_exit(&zfsdev_state_lock); return (error); } #endif /* illumos */ @@ -2058,12 +2067,19 @@ zvol_init(void) { VERIFY(ddi_soft_state_init(&zfsdev_state, sizeof (zfs_soft_state_t), 1) == 0); +#ifdef illumos + mutex_init(&zfsdev_state_lock, NULL, MUTEX_DEFAULT, NULL); +#else ZFS_LOG(1, "ZVOL Initialized."); +#endif } void zvol_fini(void) { +#ifdef illumos + mutex_destroy(&zfsdev_state_lock); +#endif ddi_soft_state_fini(&zfsdev_state); ZFS_LOG(1, "ZVOL Deinitialized."); } @@ -2101,7 +2117,7 @@ zvol_dump_init(zvol_state_t *zv, boolean uint64_t version = spa_version(spa); enum zio_checksum checksum; - ASSERT(MUTEX_HELD(&spa_namespace_lock)); + ASSERT(MUTEX_HELD(&zfsdev_state_lock)); ASSERT(vd->vdev_ops == &vdev_root_ops); error = dmu_free_long_range(zv->zv_objset, ZVOL_OBJ, 0, @@ -2668,7 +2684,7 @@ zvol_rename_minor(zvol_state_t *zv, cons struct g_provider *pp; struct cdev *dev; - ASSERT(MUTEX_HELD(&spa_namespace_lock)); + ASSERT(MUTEX_HELD(&zfsdev_state_lock)); if (zv->zv_volmode == ZFS_VOLMODE_GEOM) { g_topology_lock(); @@ -2721,8 +2737,8 @@ zvol_rename_minors(const char *oldname, DROP_GIANT(); /* See comment in zvol_open(). */ - if (!MUTEX_HELD(&spa_namespace_lock)) { - mutex_enter(&spa_namespace_lock); + if (!MUTEX_HELD(&zfsdev_state_lock)) { + mutex_enter(&zfsdev_state_lock); locked = B_TRUE; } @@ -2740,7 +2756,7 @@ zvol_rename_minors(const char *oldname, } if (locked) - mutex_exit(&spa_namespace_lock); + mutex_exit(&zfsdev_state_lock); PICKUP_GIANT(); } @@ -2750,17 +2766,17 @@ zvol_d_open(struct cdev *dev, int flags, zvol_state_t *zv; int err = 0; - mutex_enter(&spa_namespace_lock); + mutex_enter(&zfsdev_state_lock); zv = dev->si_drv2; if (zv == NULL) { - mutex_exit(&spa_namespace_lock); + mutex_exit(&zfsdev_state_lock); return(ENXIO); /* zvol_create_minor() not done yet */ } if (zv->zv_total_opens == 0) err = zvol_first_open(zv); if (err) { - mutex_exit(&spa_namespace_lock); + mutex_exit(&zfsdev_state_lock); return (err); } if ((flags & FWRITE) && (zv->zv_flags & ZVOL_RDONLY)) { @@ -2782,12 +2798,12 @@ zvol_d_open(struct cdev *dev, int flags, #endif zv->zv_total_opens++; - mutex_exit(&spa_namespace_lock); + mutex_exit(&zfsdev_state_lock); return (err); out: if (zv->zv_total_opens == 0) zvol_last_close(zv); - mutex_exit(&spa_namespace_lock); + mutex_exit(&zfsdev_state_lock); return (err); } @@ -2797,10 +2813,10 @@ zvol_d_close(struct cdev *dev, int flags zvol_state_t *zv; int err = 0; - mutex_enter(&spa_namespace_lock); + mutex_enter(&zfsdev_state_lock); zv = dev->si_drv2; if (zv == NULL) { - mutex_exit(&spa_namespace_lock); + mutex_exit(&zfsdev_state_lock); return(ENXIO); } @@ -2823,7 +2839,7 @@ zvol_d_close(struct cdev *dev, int flags if (zv->zv_total_opens == 0) zvol_last_close(zv); - mutex_exit(&spa_namespace_lock); + mutex_exit(&zfsdev_state_lock); return (0); } From owner-svn-src-all@FreeBSD.ORG Mon Dec 22 17:28:18 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ACDE6521; Mon, 22 Dec 2014 17:28:18 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1D6DB102; Mon, 22 Dec 2014 17:28:17 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id sBMHSChH097539 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 22 Dec 2014 19:28:12 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua sBMHSChH097539 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id sBMHSBFK097538; Mon, 22 Dec 2014 19:28:11 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 22 Dec 2014 19:28:11 +0200 From: Konstantin Belousov To: John Baldwin Subject: Re: svn commit: r276008 - in head/sys: kern sys Message-ID: <20141222172810.GY2148@kib.kiev.ua> References: <201412211332.sBLDW8VC030548@svn.freebsd.org> <20141221151425.GX2148@kib.kiev.ua> <5496F37D.5030903@FreeBSD.org> <201412220940.02509.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201412220940.02509.jhb@freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Andriy Gapon X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Dec 2014 17:28:18 -0000 On Mon, Dec 22, 2014 at 09:40:02AM -0500, John Baldwin wrote: > On Sunday, December 21, 2014 11:21:17 am Andriy Gapon wrote: > > On 21/12/2014 17:14, Konstantin Belousov wrote: > > > On Sun, Dec 21, 2014 at 04:45:28PM +0200, Andriy Gapon wrote: > > >> On 21/12/2014 16:41, Konstantin Belousov wrote: > > >>> Or, are you asking why caching of the name could be needed for > > >>> core dump files at all ? > > >> > > >> Sort of. Why VN_OPEN_NAMECACHE is useful in the case of core dumps? > > >> What does it make better? > > > The vn_fullpath() mostly works for the core files after the change, > > > comparing with the non-working state at all before. > > > > > > > Ah, vn_fullpath(). Thank you. > > Is there something specific to core dumps that makes vn_fullpath() more > useful to have working before a process tries to open the core? (As > compared to other newly-created files) See other Rui' reply in the thread. It was done by his request. Basically, we cannot enable caching for CREATE, since operations like extracting large archive, would flush the cache. Doing it rarely and when needed is acceptable. The explained use case seems to be warranted. From owner-svn-src-all@FreeBSD.ORG Mon Dec 22 17:32:15 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0BCBC8B6; Mon, 22 Dec 2014 17:32:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D1EF31FE; Mon, 22 Dec 2014 17:32:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBMHWEZ0057223; Mon, 22 Dec 2014 17:32:14 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBMHWEQe057222; Mon, 22 Dec 2014 17:32:14 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201412221732.sBMHWEQe057222@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Mon, 22 Dec 2014 17:32:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276067 - stable/10/sys/net X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Dec 2014 17:32:15 -0000 Author: ae Date: Mon Dec 22 17:32:13 2014 New Revision: 276067 URL: https://svnweb.freebsd.org/changeset/base/276067 Log: MFC r258167: ANSIfy function defintions. Modified: stable/10/sys/net/if_gif.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/net/if_gif.c ============================================================================== --- stable/10/sys/net/if_gif.c Mon Dec 22 17:04:51 2014 (r276066) +++ stable/10/sys/net/if_gif.c Mon Dec 22 17:32:13 2014 (r276067) @@ -152,10 +152,7 @@ static const u_char etherbroadcastaddr[E #endif static int -gif_clone_create(ifc, unit, params) - struct if_clone *ifc; - int unit; - caddr_t params; +gif_clone_create(struct if_clone *ifc, int unit, caddr_t params) { struct gif_softc *sc; @@ -199,8 +196,7 @@ gif_clone_create(ifc, unit, params) } static void -gif_clone_destroy(ifp) - struct ifnet *ifp; +gif_clone_destroy(struct ifnet *ifp) { #if defined(INET) || defined(INET6) int err; @@ -246,10 +242,7 @@ VNET_SYSINIT(vnet_gif_init, SI_SUB_PSEUD NULL); static int -gifmodevent(mod, type, data) - module_t mod; - int type; - void *data; +gifmodevent(module_t mod, int type, void *data) { switch (type) { @@ -279,11 +272,7 @@ DECLARE_MODULE(if_gif, gif_mod, SI_SUB_P MODULE_VERSION(if_gif, 1); int -gif_encapcheck(m, off, proto, arg) - const struct mbuf *m; - int off; - int proto; - void *arg; +gif_encapcheck(const struct mbuf *m, int off, int proto, void *arg) { struct ip ip; struct gif_softc *sc; @@ -528,10 +517,7 @@ gif_output(struct ifnet *ifp, struct mbu } void -gif_input(m, af, ifp) - struct mbuf *m; - int af; - struct ifnet *ifp; +gif_input(struct mbuf *m, int af, struct ifnet *ifp) { int isr, n; struct gif_softc *sc; @@ -669,10 +655,7 @@ gif_input(m, af, ifp) /* XXX how should we handle IPv6 scope on SIOC[GS]IFPHYADDR? */ int -gif_ioctl(ifp, cmd, data) - struct ifnet *ifp; - u_long cmd; - caddr_t data; +gif_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) { struct gif_softc *sc = ifp->if_softc; struct ifreq *ifr = (struct ifreq*)data; @@ -949,10 +932,7 @@ gif_ioctl(ifp, cmd, data) * a mutex. */ int -gif_set_tunnel(ifp, src, dst) - struct ifnet *ifp; - struct sockaddr *src; - struct sockaddr *dst; +gif_set_tunnel(struct ifnet *ifp, struct sockaddr *src, struct sockaddr *dst) { struct gif_softc *sc = ifp->if_softc; struct gif_softc *sc2; @@ -1058,8 +1038,7 @@ gif_set_tunnel(ifp, src, dst) } void -gif_delete_tunnel(ifp) - struct ifnet *ifp; +gif_delete_tunnel(struct ifnet *ifp) { struct gif_softc *sc = ifp->if_softc; From owner-svn-src-all@FreeBSD.ORG Mon Dec 22 17:54:28 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 28E8210B; Mon, 22 Dec 2014 17:54:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 09B567B5; Mon, 22 Dec 2014 17:54:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBMHsRNq067309; Mon, 22 Dec 2014 17:54:27 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBMHsRWd067308; Mon, 22 Dec 2014 17:54:27 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201412221754.sBMHsRWd067308@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Mon, 22 Dec 2014 17:54:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276068 - stable/10/sys/net X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Dec 2014 17:54:28 -0000 Author: ae Date: Mon Dec 22 17:54:26 2014 New Revision: 276068 URL: https://svnweb.freebsd.org/changeset/base/276068 Log: MFC r271917 by hrs: Virtualize interface cloner for gif(4). This fixes a panic when destroying a vnet jail which has a gif(4) interface. Modified: stable/10/sys/net/if_gif.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/net/if_gif.c ============================================================================== --- stable/10/sys/net/if_gif.c Mon Dec 22 17:32:13 2014 (r276067) +++ stable/10/sys/net/if_gif.c Mon Dec 22 17:54:26 2014 (r276068) @@ -91,13 +91,20 @@ static const char gifname[] = "gif"; /* - * gif_mtx protects the global gif_softc_list. + * gif_mtx protects a per-vnet gif_softc_list. */ -static struct mtx gif_mtx; +static VNET_DEFINE(struct mtx, gif_mtx); +#define V_gif_mtx VNET(gif_mtx) static MALLOC_DEFINE(M_GIF, "gif", "Generic Tunnel Interface"); static VNET_DEFINE(LIST_HEAD(, gif_softc), gif_softc_list); #define V_gif_softc_list VNET(gif_softc_list) +#define GIF_LIST_LOCK_INIT(x) mtx_init(&V_gif_mtx, "gif_mtx", \ + NULL, MTX_DEF) +#define GIF_LIST_LOCK_DESTROY(x) mtx_destroy(&V_gif_mtx) +#define GIF_LIST_LOCK(x) mtx_lock(&V_gif_mtx) +#define GIF_LIST_UNLOCK(x) mtx_unlock(&V_gif_mtx) + void (*ng_gif_input_p)(struct ifnet *ifp, struct mbuf **mp, int af); void (*ng_gif_input_orphan_p)(struct ifnet *ifp, struct mbuf *m, int af); void (*ng_gif_attach_p)(struct ifnet *ifp); @@ -106,7 +113,8 @@ void (*ng_gif_detach_p)(struct ifnet *if static void gif_start(struct ifnet *); static int gif_clone_create(struct if_clone *, int, caddr_t); static void gif_clone_destroy(struct ifnet *); -static struct if_clone *gif_cloner; +static VNET_DEFINE(struct if_clone *, gif_cloner); +#define V_gif_cloner VNET(gif_cloner) static int gifmodevent(module_t, int, void *); @@ -188,9 +196,9 @@ gif_clone_create(struct if_clone *ifc, i if (ng_gif_attach_p != NULL) (*ng_gif_attach_p)(GIF2IFP(sc)); - mtx_lock(&gif_mtx); + GIF_LIST_LOCK(); LIST_INSERT_HEAD(&V_gif_softc_list, sc, gif_list); - mtx_unlock(&gif_mtx); + GIF_LIST_UNLOCK(); return (0); } @@ -203,9 +211,9 @@ gif_clone_destroy(struct ifnet *ifp) #endif struct gif_softc *sc = ifp->if_softc; - mtx_lock(&gif_mtx); + GIF_LIST_LOCK(); LIST_REMOVE(sc, gif_list); - mtx_unlock(&gif_mtx); + GIF_LIST_UNLOCK(); gif_delete_tunnel(ifp); #ifdef INET6 @@ -237,9 +245,22 @@ vnet_gif_init(const void *unused __unuse { LIST_INIT(&V_gif_softc_list); + GIF_LIST_LOCK_INIT(); + V_gif_cloner = if_clone_simple(gifname, gif_clone_create, + gif_clone_destroy, 0); +} +VNET_SYSINIT(vnet_gif_init, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_ANY, + vnet_gif_init, NULL); + +static void +vnet_gif_uninit(const void *unused __unused) +{ + + if_clone_detach(V_gif_cloner); + GIF_LIST_LOCK_DESTROY(); } -VNET_SYSINIT(vnet_gif_init, SI_SUB_PSEUDO, SI_ORDER_MIDDLE, vnet_gif_init, - NULL); +VNET_SYSUNINIT(vnet_gif_uninit, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_ANY, + vnet_gif_uninit, NULL); static int gifmodevent(module_t mod, int type, void *data) @@ -247,19 +268,12 @@ gifmodevent(module_t mod, int type, void switch (type) { case MOD_LOAD: - mtx_init(&gif_mtx, "gif_mtx", NULL, MTX_DEF); - gif_cloner = if_clone_simple(gifname, gif_clone_create, - gif_clone_destroy, 0); - break; - case MOD_UNLOAD: - if_clone_detach(gif_cloner); - mtx_destroy(&gif_mtx); break; default: - return EOPNOTSUPP; + return (EOPNOTSUPP); } - return 0; + return (0); } static moduledata_t gif_mod = { @@ -363,7 +377,7 @@ gif_start(struct ifnet *ifp) #endif #ifdef INET6 if (sc->gif_psrc->sa_family == AF_INET6) - m->m_pkthdr.len -= GIF_HDR_LEN6; + m->m_pkthdr.len -= GIF_HDR_LEN6; #endif #endif /* @@ -372,6 +386,7 @@ gif_start(struct ifnet *ifp) */ af = m->m_pkthdr.csum_data; + /* override to IPPROTO_ETHERIP for bridged traffic */ if (ifp->if_bridge) af = AF_LINK; @@ -380,7 +395,6 @@ gif_start(struct ifnet *ifp) /* Done by IFQ_HANDOFF */ /* ifp->if_obytes += m->m_pkthdr.len;*/ - /* override to IPPROTO_ETHERIP for bridged traffic */ M_SETFIB(m, sc->gif_fibnum); /* inner AF-specific encapsulation */ @@ -939,7 +953,7 @@ gif_set_tunnel(struct ifnet *ifp, struct struct sockaddr *osrc, *odst, *sa; int error = 0; - mtx_lock(&gif_mtx); + GIF_LIST_LOCK(); LIST_FOREACH(sc2, &V_gif_softc_list, gif_list) { if (sc2 == sc) continue; @@ -959,13 +973,13 @@ gif_set_tunnel(struct ifnet *ifp, struct bcmp(sc2->gif_pdst, dst, dst->sa_len) == 0 && bcmp(sc2->gif_psrc, src, src->sa_len) == 0) { error = EADDRNOTAVAIL; - mtx_unlock(&gif_mtx); + GIF_LIST_UNLOCK(); goto bad; } /* XXX both end must be valid? (I mean, not 0.0.0.0) */ } - mtx_unlock(&gif_mtx); + GIF_LIST_UNLOCK(); /* XXX we can detach from both, but be polite just in case */ if (sc->gif_psrc) From owner-svn-src-all@FreeBSD.ORG Mon Dec 22 18:30:00 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 81726A2F; Mon, 22 Dec 2014 18:30:00 +0000 (UTC) Received: from st11p02mm-asmtp001.mac.com (st11p02mm-asmtpout001.mac.com [17.172.220.236]) (using TLSv1.2 with cipher DHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 53A8914A1; Mon, 22 Dec 2014 18:29:59 +0000 (UTC) Received: from fukuyama.hsd1.ca.comcast.net (unknown [73.162.13.215]) by st11p02mm-asmtp001.mac.com (Oracle Communications Messaging Server 7.0.5.33.0 64bit (built Aug 27 2014)) with ESMTPSA id <0NGZ002W0Y1ECT20@st11p02mm-asmtp001.mac.com>; Mon, 22 Dec 2014 18:29:41 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.13.68,1.0.33,0.0.0000 definitions=2014-12-22_03:2014-12-22,2014-12-22,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1412080000 definitions=main-1412220187 Content-type: text/plain; charset=windows-1252 MIME-version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Subject: Re: svn commit: r276008 - in head/sys: kern sys From: Rui Paulo In-reply-to: <201412220940.02509.jhb@freebsd.org> Date: Mon, 22 Dec 2014 10:29:38 -0800 Content-transfer-encoding: quoted-printable Message-id: <08A2ABA0-C982-46BC-B309-3C23B8D277B9@me.com> References: <201412211332.sBLDW8VC030548@svn.freebsd.org> <20141221151425.GX2148@kib.kiev.ua> <5496F37D.5030903@FreeBSD.org> <201412220940.02509.jhb@freebsd.org> To: John Baldwin X-Mailer: Apple Mail (2.1993) Cc: Konstantin Belousov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Andriy Gapon X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Dec 2014 18:30:00 -0000 On Dec 22, 2014, at 06:40, John Baldwin wrote: > Is there something specific to core dumps that makes vn_fullpath() = more > useful to have working before a process tries to open the core? (As > compared to other newly-created files) Yes: the ability to provide the full path to userland when a core dump = file is generated. -- Rui Paulo From owner-svn-src-all@FreeBSD.ORG Mon Dec 22 18:39:39 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AD521DC5; Mon, 22 Dec 2014 18:39:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 97C98163D; Mon, 22 Dec 2014 18:39:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBMIddPj087670; Mon, 22 Dec 2014 18:39:39 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBMIdcxK087666; Mon, 22 Dec 2014 18:39:38 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201412221839.sBMIdcxK087666@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Mon, 22 Dec 2014 18:39:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276069 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Dec 2014 18:39:39 -0000 Author: smh Date: Mon Dec 22 18:39:38 2014 New Revision: 276069 URL: https://svnweb.freebsd.org/changeset/base/276069 Log: Fix panic when resizing ZFS zvol's Resizing a ZFS ZVOL with debug enabled would result in a panic due to recursion on dp_config_rwlock. The upstream change "3464 zfs synctask code needs restructuring" changed zvol_set_volsize to avoid the recursion on dp_config_rwlock, but this was missed when originally merged in by r248571 due to significant differences in our codebases in this area. These changes also relied on bring in changes from upstream: 3557 dumpvp_size is not updated correctly when a dump zvol's size is changed, which where also not present. In order to help prevent future issues in this area a direct comparison and diff minimisation from current upstream version (b515258) of zvol.c. Differential Revision: https://reviews.freebsd.org/D1302 MFC after: 1 month X-MFC-With: r276063 & r276066 Sponsored by: Multiplay Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zvol.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zvol.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zvol.h Mon Dec 22 17:54:26 2014 (r276068) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zvol.h Mon Dec 22 18:39:38 2014 (r276069) @@ -43,7 +43,7 @@ extern void zvol_create_cb(objset_t *os, extern int zvol_create_minor(const char *); extern int zvol_remove_minor(const char *); extern void zvol_remove_minors(const char *); -extern int zvol_set_volsize(const char *, major_t, uint64_t); +extern int zvol_set_volsize(const char *, uint64_t); #ifdef sun extern int zvol_open(dev_t *devp, int flag, int otyp, cred_t *cr); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Mon Dec 22 17:54:26 2014 (r276068) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Mon Dec 22 18:39:38 2014 (r276069) @@ -2482,8 +2482,7 @@ zfs_prop_set_special(const char *dsname, err = dsl_dataset_set_refreservation(dsname, source, intval); break; case ZFS_PROP_VOLSIZE: - err = zvol_set_volsize(dsname, ddi_driver_major(zfs_dip), - intval); + err = zvol_set_volsize(dsname, intval); break; case ZFS_PROP_VERSION: { Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Mon Dec 22 17:54:26 2014 (r276068) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Mon Dec 22 18:39:38 2014 (r276069) @@ -97,6 +97,7 @@ #include "zfs_namecheck.h" +#ifndef illumos struct g_class zfs_zvol_class = { .name = "ZFS::ZVOL", .version = G_VERSION, @@ -104,6 +105,7 @@ struct g_class zfs_zvol_class = { DECLARE_GEOM_CLASS(zfs_zvol_class, zfs_zvol); +#endif void *zfsdev_state; static char *zvol_tag = "zvol_tag"; @@ -126,12 +128,14 @@ kmutex_t zfsdev_state_lock; #endif static uint32_t zvol_minors; +#ifndef illumos SYSCTL_DECL(_vfs_zfs); SYSCTL_NODE(_vfs_zfs, OID_AUTO, vol, CTLFLAG_RW, 0, "ZFS VOLUME"); static int volmode = ZFS_VOLMODE_GEOM; SYSCTL_INT(_vfs_zfs_vol, OID_AUTO, mode, CTLFLAG_RWTUN, &volmode, 0, "Expose as GEOM providers (1), device files (2) or neither"); +#endif typedef struct zvol_extent { list_node_t ze_node; dva_t ze_dva; /* dva associated with this extent */ @@ -142,28 +146,40 @@ typedef struct zvol_extent { * The in-core state of each volume. */ typedef struct zvol_state { +#ifndef illumos LIST_ENTRY(zvol_state) zv_links; +#endif char zv_name[MAXPATHLEN]; /* pool/dd name */ uint64_t zv_volsize; /* amount of space we advertise */ uint64_t zv_volblocksize; /* volume block size */ +#ifdef illumos + minor_t zv_minor; /* minor number */ +#else struct cdev *zv_dev; /* non-GEOM device */ struct g_provider *zv_provider; /* GEOM provider */ +#endif uint8_t zv_min_bs; /* minimum addressable block shift */ uint8_t zv_flags; /* readonly, dumpified, etc. */ objset_t *zv_objset; /* objset handle */ +#ifdef illumos + uint32_t zv_open_count[OTYPCNT]; /* open counts */ +#endif uint32_t zv_total_opens; /* total open count */ zilog_t *zv_zilog; /* ZIL handle */ list_t zv_extents; /* List of extents for dump */ znode_t zv_znode; /* for range locking */ dmu_buf_t *zv_dbuf; /* bonus handle */ +#ifndef illumos int zv_state; int zv_volmode; /* Provide GEOM or cdev */ struct bio_queue_head zv_queue; struct mtx zv_queue_mtx; /* zv_queue mutex */ +#endif } zvol_state_t; +#ifndef illumos static LIST_HEAD(, zvol_state) all_zvols; - +#endif /* * zvol specific flags */ @@ -181,6 +197,7 @@ int zvol_maxphys = DMU_MAX_ACCESS/2; * Toggle unmap functionality. */ boolean_t zvol_unmap_enabled = B_TRUE; +#ifndef illumos SYSCTL_INT(_vfs_zfs_vol, OID_AUTO, unmap_enabled, CTLFLAG_RWTUN, &zvol_unmap_enabled, 0, "Enable UNMAP functionality"); @@ -204,28 +221,30 @@ static struct cdevsw zvol_cdevsw = { .d_flags = D_DISK | D_TRACKCLOSE, }; -extern int zfs_set_prop_nvlist(const char *, zprop_source_t, - nvlist_t *, nvlist_t *); +static void zvol_geom_run(zvol_state_t *zv); +static void zvol_geom_destroy(zvol_state_t *zv); +static int zvol_geom_access(struct g_provider *pp, int acr, int acw, int ace); +static void zvol_geom_start(struct bio *bp); +static void zvol_geom_worker(void *arg); static void zvol_log_truncate(zvol_state_t *zv, dmu_tx_t *tx, uint64_t off, uint64_t len, boolean_t sync); +#endif /* !illumos */ + +extern int zfs_set_prop_nvlist(const char *, zprop_source_t, + nvlist_t *, nvlist_t *); static int zvol_remove_zv(zvol_state_t *); static int zvol_get_data(void *arg, lr_write_t *lr, char *buf, zio_t *zio); static int zvol_dumpify(zvol_state_t *zv); static int zvol_dump_fini(zvol_state_t *zv); static int zvol_dump_init(zvol_state_t *zv, boolean_t resize); -static void zvol_geom_run(zvol_state_t *zv); -static void zvol_geom_destroy(zvol_state_t *zv); -static int zvol_geom_access(struct g_provider *pp, int acr, int acw, int ace); -static void zvol_geom_start(struct bio *bp); -static void zvol_geom_worker(void *arg); - static void -zvol_size_changed(zvol_state_t *zv) +zvol_size_changed(zvol_state_t *zv, uint64_t volsize) { #ifdef illumos - dev_t dev = makedevice(maj, min); + dev_t dev = makedevice(ddi_driver_major(zfs_dip), zv->zv_minor); + zv->zv_volsize = volsize; VERIFY(ddi_prop_update_int64(dev, zfs_dip, "Size", volsize) == DDI_SUCCESS); VERIFY(ddi_prop_update_int64(dev, zfs_dip, @@ -235,6 +254,7 @@ zvol_size_changed(zvol_state_t *zv) spec_size_invalidate(dev, VBLK); spec_size_invalidate(dev, VCHR); #else /* !illumos */ + zv->zv_volsize = volsize; if (zv->zv_volmode == ZFS_VOLMODE_GEOM) { struct g_provider *pp; @@ -301,16 +321,26 @@ zvol_get_stats(objset_t *os, nvlist_t *n static zvol_state_t * zvol_minor_lookup(const char *name) { +#ifdef illumos + minor_t minor; +#endif zvol_state_t *zv; ASSERT(MUTEX_HELD(&zfsdev_state_lock)); +#ifdef illumos + for (minor = 1; minor <= ZFSDEV_MAX_MINOR; minor++) { + zv = zfsdev_get_soft_state(minor, ZSST_ZVOL); + if (zv == NULL) + continue; +#else LIST_FOREACH(zv, &all_zvols, zv_links) { +#endif if (strcmp(zv->zv_name, name) == 0) - break; + return (zv); } - return (zv); + return (NULL); } /* extent mapping arg */ @@ -550,14 +580,21 @@ zvol_create_minor(const char *name) zfs_soft_state_t *zs; zvol_state_t *zv; objset_t *os; + dmu_object_info_t doi; +#ifdef illumos + minor_t minor = 0; + char chrbuf[30], blkbuf[30]; +#else struct cdev *dev; struct g_provider *pp; struct g_geom *gp; - dmu_object_info_t doi; uint64_t volsize, mode; +#endif int error; +#ifndef illumos ZFS_LOG(1, "Creating ZVOL %s...", name); +#endif mutex_enter(&zfsdev_state_lock); @@ -664,6 +701,9 @@ zvol_create_minor(const char *name) (void) strlcpy(zv->zv_name, name, MAXPATHLEN); zv->zv_min_bs = DEV_BSHIFT; +#ifdef illumos + zv->zv_minor = minor; +#endif zv->zv_objset = os; if (dmu_objset_is_snapshot(os) || !spa_writeable(dmu_objset_spa(os))) zv->zv_flags |= ZVOL_RDONLY; @@ -689,16 +729,15 @@ zvol_create_minor(const char *name) zvol_minors++; mutex_exit(&zfsdev_state_lock); - #ifndef illumos if (zv->zv_volmode == ZFS_VOLMODE_GEOM) { zvol_geom_run(zv); g_topology_unlock(); } PICKUP_GIANT(); -#endif ZFS_LOG(1, "ZVOL %s created.", name); +#endif return (0); } @@ -710,6 +749,7 @@ static int zvol_remove_zv(zvol_state_t *zv) { #ifdef illumos + char nmbuf[20]; minor_t minor = zv->zv_minor; #endif @@ -717,12 +757,15 @@ zvol_remove_zv(zvol_state_t *zv) if (zv->zv_total_opens != 0) return (SET_ERROR(EBUSY)); - ZFS_LOG(1, "ZVOL %s destroyed.", zv->zv_name); - #ifdef illumos (void) snprintf(nmbuf, sizeof (nmbuf), "%u,raw", minor); ddi_remove_minor_node(zfs_dip, nmbuf); + + (void) snprintf(nmbuf, sizeof (nmbuf), "%u", minor); + ddi_remove_minor_node(zfs_dip, nmbuf); #else + ZFS_LOG(1, "ZVOL %s destroyed.", zv->zv_name); + LIST_REMOVE(zv, zv_links); if (zv->zv_volmode == ZFS_VOLMODE_GEOM) { g_topology_lock(); @@ -735,8 +778,10 @@ zvol_remove_zv(zvol_state_t *zv) avl_destroy(&zv->zv_znode.z_range_avl); mutex_destroy(&zv->zv_znode.z_range_lock); - kmem_free(zv, sizeof(*zv)); - + kmem_free(zv, sizeof (zvol_state_t)); +#ifdef illumos + ddi_soft_state_free(zfsdev_state, minor); +#endif zvol_minors--; return (0); } @@ -771,21 +816,22 @@ zvol_first_open(zvol_state_t *zv) if (error) return (error); + zv->zv_objset = os; error = zap_lookup(os, ZVOL_ZAP_OBJ, "size", 8, 1, &volsize); if (error) { ASSERT(error == 0); dmu_objset_disown(os, zvol_tag); return (error); } - zv->zv_objset = os; + error = dmu_bonus_hold(os, ZVOL_OBJ, zvol_tag, &zv->zv_dbuf); if (error) { dmu_objset_disown(os, zvol_tag); return (error); } - zv->zv_volsize = volsize; + + zvol_size_changed(zv, volsize); zv->zv_zilog = zil_open(os, zvol_get_data); - zvol_size_changed(zv); VERIFY(dsl_prop_get_integer(zv->zv_name, "readonly", &readonly, NULL) == 0); @@ -889,6 +935,27 @@ zvol_update_volsize(objset_t *os, uint64 void zvol_remove_minors(const char *name) { +#ifdef illumos + zvol_state_t *zv; + char *namebuf; + minor_t minor; + + namebuf = kmem_zalloc(strlen(name) + 2, KM_SLEEP); + (void) strncpy(namebuf, name, strlen(name)); + (void) strcat(namebuf, "/"); + mutex_enter(&zfsdev_state_lock); + for (minor = 1; minor <= ZFSDEV_MAX_MINOR; minor++) { + + zv = zfsdev_get_soft_state(minor, ZSST_ZVOL); + if (zv == NULL) + continue; + if (strncmp(namebuf, zv->zv_name, strlen(namebuf)) == 0) + (void) zvol_remove_zv(zv); + } + kmem_free(namebuf, strlen(name) + 2); + + mutex_exit(&zfsdev_state_lock); +#else /* !illumos */ zvol_state_t *zv, *tzv; size_t namelen; @@ -908,67 +975,46 @@ zvol_remove_minors(const char *name) mutex_exit(&zfsdev_state_lock); PICKUP_GIANT(); +#endif /* illumos */ } -int -zvol_set_volsize(const char *name, major_t maj, uint64_t volsize) +static int +zvol_update_live_volsize(zvol_state_t *zv, uint64_t volsize) { - zvol_state_t *zv = NULL; - objset_t *os; - int error; - dmu_object_info_t doi; uint64_t old_volsize = 0ULL; - uint64_t readonly; - - mutex_enter(&zfsdev_state_lock); - zv = zvol_minor_lookup(name); - if ((error = dmu_objset_hold(name, FTAG, &os)) != 0) { - mutex_exit(&zfsdev_state_lock); - return (error); - } - - if ((error = dmu_object_info(os, ZVOL_OBJ, &doi)) != 0 || - (error = zvol_check_volsize(volsize, - doi.doi_data_block_size)) != 0) - goto out; + int error = 0; - VERIFY(dsl_prop_get_integer(name, "readonly", &readonly, - NULL) == 0); - if (readonly) { - error = EROFS; - goto out; - } + ASSERT(MUTEX_HELD(&zfsdev_state_lock)); - error = zvol_update_volsize(os, volsize); /* * Reinitialize the dump area to the new size. If we * failed to resize the dump area then restore it back to - * its original size. + * its original size. We must set the new volsize prior + * to calling dumpvp_resize() to ensure that the devices' + * size(9P) is not visible by the dump subsystem. */ - if (zv && error == 0) { + old_volsize = zv->zv_volsize; + zvol_size_changed(zv, volsize); + #ifdef ZVOL_DUMP - if (zv->zv_flags & ZVOL_DUMPIFIED) { - old_volsize = zv->zv_volsize; - zv->zv_volsize = volsize; - if ((error = zvol_dumpify(zv)) != 0 || - (error = dumpvp_resize()) != 0) { - (void) zvol_update_volsize(os, old_volsize); - zv->zv_volsize = old_volsize; - error = zvol_dumpify(zv); - } - } -#endif /* ZVOL_DUMP */ - if (error == 0) { - zv->zv_volsize = volsize; - zvol_size_changed(zv); + if (zv->zv_flags & ZVOL_DUMPIFIED) { + if ((error = zvol_dumpify(zv)) != 0 || + (error = dumpvp_resize()) != 0) { + int dumpify_error; + + (void) zvol_update_volsize(zv->zv_objset, old_volsize); + zvol_size_changed(zv, old_volsize); + dumpify_error = zvol_dumpify(zv); + error = dumpify_error ? dumpify_error : error; } } +#endif /* ZVOL_DUMP */ #ifdef illumos /* * Generate a LUN expansion event. */ - if (zv && error == 0) { + if (error == 0) { sysevent_id_t eid; nvlist_t *attr; char *physpath = kmem_zalloc(MAXPATHLEN, KM_SLEEP); @@ -986,21 +1032,88 @@ zvol_set_volsize(const char *name, major kmem_free(physpath, MAXPATHLEN); } #endif /* illumos */ + return (error); +} -out: - dmu_objset_rele(os, FTAG); +int +zvol_set_volsize(const char *name, uint64_t volsize) +{ + zvol_state_t *zv = NULL; + objset_t *os; + int error; + dmu_object_info_t doi; + uint64_t readonly; + boolean_t owned = B_FALSE; - mutex_exit(&zfsdev_state_lock); + error = dsl_prop_get_integer(name, + zfs_prop_to_name(ZFS_PROP_READONLY), &readonly, NULL); + if (error != 0) + return (error); + if (readonly) + return (SET_ERROR(EROFS)); + + mutex_enter(&zfsdev_state_lock); + zv = zvol_minor_lookup(name); + + if (zv == NULL || zv->zv_objset == NULL) { + if ((error = dmu_objset_own(name, DMU_OST_ZVOL, B_FALSE, + FTAG, &os)) != 0) { + mutex_exit(&zfsdev_state_lock); + return (error); + } + owned = B_TRUE; + if (zv != NULL) + zv->zv_objset = os; + } else { + os = zv->zv_objset; + } + + if ((error = dmu_object_info(os, ZVOL_OBJ, &doi)) != 0 || + (error = zvol_check_volsize(volsize, doi.doi_data_block_size)) != 0) + goto out; + + error = zvol_update_volsize(os, volsize); + if (error == 0 && zv != NULL) + error = zvol_update_live_volsize(zv, volsize); +out: + if (owned) { + dmu_objset_disown(os, FTAG); + if (zv != NULL) + zv->zv_objset = NULL; + } + mutex_exit(&zfsdev_state_lock); return (error); } /*ARGSUSED*/ +#ifdef illumos +int +zvol_open(dev_t *devp, int flag, int otyp, cred_t *cr) +#else static int zvol_open(struct g_provider *pp, int flag, int count) +#endif { zvol_state_t *zv; int err = 0; +#ifdef illumos + + mutex_enter(&zfsdev_state_lock); + + zv = zfsdev_get_soft_state(getminor(*devp), ZSST_ZVOL); + if (zv == NULL) { + mutex_exit(&zfsdev_state_lock); + return (SET_ERROR(ENXIO)); + } + + if (zv->zv_total_opens == 0) + err = zvol_first_open(zv); + if (err) { + mutex_exit(&zfsdev_state_lock); + return (err); + } +#else /* !illumos */ boolean_t locked = B_FALSE; /* @@ -1037,6 +1150,7 @@ zvol_open(struct g_provider *pp, int fla pp->stripeoffset = 0; pp->stripesize = zv->zv_volblocksize; } +#endif /* illumos */ if ((flag & FWRITE) && (zv->zv_flags & ZVOL_RDONLY)) { err = SET_ERROR(EROFS); goto out; @@ -1055,20 +1169,46 @@ zvol_open(struct g_provider *pp, int fla } #endif +#ifdef illumos + if (zv->zv_open_count[otyp] == 0 || otyp == OTYP_LYR) { + zv->zv_open_count[otyp]++; + zv->zv_total_opens++; + } + mutex_exit(&zfsdev_state_lock); +#else zv->zv_total_opens += count; if (locked) mutex_exit(&zfsdev_state_lock); +#endif return (err); out: if (zv->zv_total_opens == 0) zvol_last_close(zv); +#ifdef illumos + mutex_exit(&zfsdev_state_lock); +#else if (locked) mutex_exit(&zfsdev_state_lock); +#endif return (err); } /*ARGSUSED*/ +#ifdef illumos +int +zvol_close(dev_t dev, int flag, int otyp, cred_t *cr) +{ + minor_t minor = getminor(dev); + zvol_state_t *zv; + int error = 0; + + mutex_enter(&zfsdev_state_lock); + + zv = zfsdev_get_soft_state(minor, ZSST_ZVOL); + if (zv == NULL) { + mutex_exit(&zfsdev_state_lock); +#else /* !illumos */ static int zvol_close(struct g_provider *pp, int flag, int count) { @@ -1086,6 +1226,7 @@ zvol_close(struct g_provider *pp, int fl if (zv == NULL) { if (locked) mutex_exit(&zfsdev_state_lock); +#endif /* illumos */ return (SET_ERROR(ENXIO)); } @@ -1098,18 +1239,30 @@ zvol_close(struct g_provider *pp, int fl * If the open count is zero, this is a spurious close. * That indicates a bug in the kernel / DDI framework. */ +#ifdef illumos + ASSERT(zv->zv_open_count[otyp] != 0); +#endif ASSERT(zv->zv_total_opens != 0); /* * You may get multiple opens, but only one close. */ +#ifdef illumos + zv->zv_open_count[otyp]--; + zv->zv_total_opens--; +#else zv->zv_total_opens -= count; +#endif if (zv->zv_total_opens == 0) zvol_last_close(zv); +#ifdef illumos + mutex_exit(&zfsdev_state_lock); +#else if (locked) mutex_exit(&zfsdev_state_lock); +#endif return (error); } @@ -1362,11 +1515,16 @@ zvol_dumpio(zvol_state_t *zv, void *addr return (error); } -#endif /* illumos */ +int +zvol_strategy(buf_t *bp) +{ + zfs_soft_state_t *zs = NULL; +#else /* !illumos */ void zvol_strategy(struct bio *bp) { +#endif /* illumos */ zvol_state_t *zv; uint64_t off, volsize; size_t resid; @@ -1374,22 +1532,53 @@ zvol_strategy(struct bio *bp) objset_t *os; rl_t *rl; int error = 0; +#ifdef illumos + boolean_t doread = bp->b_flags & B_READ; +#else boolean_t doread = 0; +#endif boolean_t is_dumpified; boolean_t sync; +#ifdef illumos + if (getminor(bp->b_edev) == 0) { + error = SET_ERROR(EINVAL); + } else { + zs = ddi_get_soft_state(zfsdev_state, getminor(bp->b_edev)); + if (zs == NULL) + error = SET_ERROR(ENXIO); + else if (zs->zss_type != ZSST_ZVOL) + error = SET_ERROR(EINVAL); + } + + if (error) { + bioerror(bp, error); + biodone(bp); + return (0); + } + + zv = zs->zss_data; + + if (!(bp->b_flags & B_READ) && (zv->zv_flags & ZVOL_RDONLY)) { + bioerror(bp, EROFS); + biodone(bp); + return (0); + } + + off = ldbtob(bp->b_blkno); +#else /* !illumos */ if (bp->bio_to) zv = bp->bio_to->private; else zv = bp->bio_dev->si_drv2; if (zv == NULL) { - error = ENXIO; + error = SET_ERROR(ENXIO); goto out; } if (bp->bio_cmd != BIO_READ && (zv->zv_flags & ZVOL_RDONLY)) { - error = EROFS; + error = SET_ERROR(EROFS); goto out; } @@ -1407,26 +1596,41 @@ zvol_strategy(struct bio *bp) } off = bp->bio_offset; +#endif /* illumos */ volsize = zv->zv_volsize; os = zv->zv_objset; ASSERT(os != NULL); +#ifdef illumos + bp_mapin(bp); + addr = bp->b_un.b_addr; + resid = bp->b_bcount; + + if (resid > 0 && (off < 0 || off >= volsize)) { + bioerror(bp, EIO); + biodone(bp); + return (0); + } + + is_dumpified = zv->zv_flags & ZVOL_DUMPIFIED; + sync = ((!(bp->b_flags & B_ASYNC) && + !(zv->zv_flags & ZVOL_WCE)) || + (zv->zv_objset->os_sync == ZFS_SYNC_ALWAYS)) && + !doread && !is_dumpified; +#else /* !illumos */ addr = bp->bio_data; resid = bp->bio_length; if (resid > 0 && (off < 0 || off >= volsize)) { - error = EIO; + error = SET_ERROR(EIO); goto out; } -#ifdef illumos - is_dumpified = zv->zv_flags & ZVOL_DUMPIFIED; -#else is_dumpified = B_FALSE; -#endif - sync = !doread && !is_dumpified && + sync = !doread && !is_dumpified && zv->zv_objset->os_sync == ZFS_SYNC_ALWAYS; +#endif /* illumos */ /* * There must be no buffer changes when doing a dmu_sync() because @@ -1435,6 +1639,7 @@ zvol_strategy(struct bio *bp) rl = zfs_range_lock(&zv->zv_znode, off, resid, doread ? RL_READER : RL_WRITER); +#ifndef illumos if (bp->bio_cmd == BIO_DELETE) { dmu_tx_t *tx = dmu_tx_create(zv->zv_objset); error = dmu_tx_assign(tx, TXG_WAIT); @@ -1449,7 +1654,7 @@ zvol_strategy(struct bio *bp) } goto unlock; } - +#endif while (resid != 0 && off < volsize) { size_t size = MIN(resid, zvol_maxphys); #ifdef illumos @@ -1485,9 +1690,21 @@ zvol_strategy(struct bio *bp) addr += size; resid -= size; } +#ifndef illumos unlock: +#endif zfs_range_unlock(rl); +#ifdef illumos + if ((bp->b_resid = resid) == bp->b_bcount) + bioerror(bp, off > volsize ? EINVAL : error); + + if (sync) + zil_commit(zv->zv_zilog, ZVOL_OBJ); + biodone(bp); + + return (0); +#else /* !illumos */ bp->bio_completed = bp->bio_length - resid; if (bp->bio_completed < bp->bio_length && off > volsize) error = EINVAL; @@ -1501,6 +1718,7 @@ out: g_io_deliver(bp, error); else biofinish(bp, NULL, error); +#endif /* illumos */ } #ifdef illumos @@ -1578,6 +1796,7 @@ zvol_read(struct cdev *dev, struct uio * #endif volsize = zv->zv_volsize; + /* uio_loffset == volsize isn't an error as its required for EOF processing. */ if (uio->uio_resid > 0 && (uio->uio_loffset < 0 || uio->uio_loffset > volsize)) return (SET_ERROR(EIO)); @@ -1637,6 +1856,7 @@ zvol_write(struct cdev *dev, struct uio #endif volsize = zv->zv_volsize; + /* uio_loffset == volsize isn't an error as its required for EOF processing. */ if (uio->uio_resid > 0 && (uio->uio_loffset < 0 || uio->uio_loffset > volsize)) return (SET_ERROR(EIO)); @@ -2369,7 +2589,7 @@ zvol_dump_fini(zvol_state_t *zv) return (0); } -#endif /* illumos */ +#else /* !illumos */ static void zvol_geom_run(zvol_state_t *zv) @@ -2947,3 +3167,4 @@ zvol_d_ioctl(struct cdev *dev, u_long cm return (error); } +#endif /* illumos */ From owner-svn-src-all@FreeBSD.ORG Mon Dec 22 18:41:04 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F258DF3E; Mon, 22 Dec 2014 18:41:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DB98216F9; Mon, 22 Dec 2014 18:41:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBMIf3dE090309; Mon, 22 Dec 2014 18:41:03 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBMIf0mF090273; Mon, 22 Dec 2014 18:41:00 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201412221841.sBMIf0mF090273@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 22 Dec 2014 18:41:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276070 - in stable/10/sys: amd64/amd64 amd64/include conf i386/i386 i386/include pc98/pc98 x86/x86 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Dec 2014 18:41:04 -0000 Author: jhb Date: Mon Dec 22 18:40:59 2014 New Revision: 276070 URL: https://svnweb.freebsd.org/changeset/base/276070 Log: MFC 260557,271076,271077,271082,271083,271098: - Remove spaces from boot messages when we print the CPU ID/Family/Stepping - Move prototypes for various functions into out of C files and into . - Reduce diffs between i386 and amd64 initcpu.c and identcpu.c files. - Move blacklists of broken TSCs out of the printcpuinfo() function and into the TSC probe routine. - Merge the amd64 and i386 identcpu.c into a single x86 implementation. Added: stable/10/sys/x86/x86/identcpu.c - copied unchanged from r271098, head/sys/x86/x86/identcpu.c Deleted: stable/10/sys/amd64/amd64/identcpu.c stable/10/sys/i386/i386/identcpu.c Modified: stable/10/sys/amd64/amd64/machdep.c stable/10/sys/amd64/include/md_var.h stable/10/sys/conf/files.amd64 stable/10/sys/conf/files.i386 stable/10/sys/conf/files.pc98 stable/10/sys/i386/i386/initcpu.c stable/10/sys/i386/i386/machdep.c stable/10/sys/i386/i386/trap.c stable/10/sys/i386/include/md_var.h stable/10/sys/pc98/pc98/machdep.c stable/10/sys/x86/x86/tsc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/amd64/machdep.c ============================================================================== --- stable/10/sys/amd64/amd64/machdep.c Mon Dec 22 18:39:38 2014 (r276069) +++ stable/10/sys/amd64/amd64/machdep.c Mon Dec 22 18:40:59 2014 (r276070) @@ -153,10 +153,6 @@ CTASSERT(offsetof(struct pcpu, pc_curthr extern u_int64_t hammer_time(u_int64_t, u_int64_t); -extern void printcpuinfo(void); /* XXX header file */ -extern void identify_cpu(void); -extern void panicifcpuunsupported(void); - #define CS_SECURE(cs) (ISPL(cs) == SEL_UPL) #define EFL_SECURE(ef, oef) ((((ef) ^ (oef)) & ~PSL_USERCHANGE) == 0) Modified: stable/10/sys/amd64/include/md_var.h ============================================================================== --- stable/10/sys/amd64/include/md_var.h Mon Dec 22 18:39:38 2014 (r276069) +++ stable/10/sys/amd64/include/md_var.h Mon Dec 22 18:40:59 2014 (r276070) @@ -105,14 +105,17 @@ void fsbase_load_fault(void) __asm(__STR void gsbase_load_fault(void) __asm(__STRING(gsbase_load_fault)); void dump_add_page(vm_paddr_t); void dump_drop_page(vm_paddr_t); +void identify_cpu(void); void initializecpu(void); void initializecpucache(void); void fillw(int /*u_short*/ pat, void *base, size_t cnt); void fpstate_drop(struct thread *td); int is_physical_memory(vm_paddr_t addr); int isa_nmi(int cd); +void panicifcpuunsupported(void); void pagecopy(void *from, void *to); void pagezero(void *addr); +void printcpuinfo(void); void setidt(int idx, alias_for_inthand_t *func, int typ, int dpl, int ist); int user_dbreg_trap(void); void minidumpsys(struct dumperinfo *); Modified: stable/10/sys/conf/files.amd64 ============================================================================== --- stable/10/sys/conf/files.amd64 Mon Dec 22 18:39:38 2014 (r276069) +++ stable/10/sys/conf/files.amd64 Mon Dec 22 18:40:59 2014 (r276070) @@ -114,7 +114,6 @@ amd64/amd64/elf_machdep.c standard amd64/amd64/exception.S standard amd64/amd64/fpu.c standard amd64/amd64/gdb_machdep.c optional gdb -amd64/amd64/identcpu.c standard amd64/amd64/in_cksum.c optional inet | inet6 amd64/amd64/initcpu.c standard amd64/amd64/io.c optional io @@ -578,6 +577,7 @@ x86/x86/busdma_bounce.c standard x86/x86/busdma_machdep.c standard x86/x86/dump_machdep.c standard x86/x86/fdt_machdep.c optional fdt +x86/x86/identcpu.c standard x86/x86/intr_machdep.c standard x86/x86/io_apic.c standard x86/x86/legacy.c standard Modified: stable/10/sys/conf/files.i386 ============================================================================== --- stable/10/sys/conf/files.i386 Mon Dec 22 18:39:38 2014 (r276069) +++ stable/10/sys/conf/files.i386 Mon Dec 22 18:40:59 2014 (r276070) @@ -460,7 +460,6 @@ i386/xen/exception.s optional xen i386/i386/gdb_machdep.c optional gdb i386/i386/geode.c optional cpu_geode i386/i386/i686_mem.c optional mem -i386/i386/identcpu.c standard i386/i386/in_cksum.c optional inet | inet6 i386/i386/initcpu.c standard i386/i386/io.c optional io @@ -594,6 +593,7 @@ x86/x86/busdma_bounce.c standard x86/x86/busdma_machdep.c standard x86/x86/dump_machdep.c standard x86/x86/fdt_machdep.c optional fdt +x86/x86/identcpu.c standard x86/x86/intr_machdep.c standard x86/x86/io_apic.c optional apic x86/x86/legacy.c optional native Modified: stable/10/sys/conf/files.pc98 ============================================================================== --- stable/10/sys/conf/files.pc98 Mon Dec 22 18:39:38 2014 (r276069) +++ stable/10/sys/conf/files.pc98 Mon Dec 22 18:40:59 2014 (r276070) @@ -143,7 +143,6 @@ i386/i386/elf_machdep.c standard i386/i386/exception.s standard i386/i386/gdb_machdep.c optional gdb i386/i386/i686_mem.c optional mem -i386/i386/identcpu.c standard i386/i386/in_cksum.c optional inet | inet6 i386/i386/initcpu.c standard i386/i386/io.c optional io @@ -251,6 +250,7 @@ x86/pci/pci_bus.c optional pci x86/x86/busdma_bounce.c standard x86/x86/busdma_machdep.c standard x86/x86/dump_machdep.c standard +x86/x86/identcpu.c standard x86/x86/intr_machdep.c standard x86/x86/io_apic.c optional apic x86/x86/legacy.c standard Modified: stable/10/sys/i386/i386/initcpu.c ============================================================================== --- stable/10/sys/i386/i386/initcpu.c Mon Dec 22 18:39:38 2014 (r276069) +++ stable/10/sys/i386/i386/initcpu.c Mon Dec 22 18:40:59 2014 (r276070) @@ -48,12 +48,6 @@ __FBSDID("$FreeBSD$"); #define CPU_ENABLE_SSE #endif -#if defined(I586_CPU) && defined(CPU_WT_ALLOC) -void enable_K5_wt_alloc(void); -void enable_K6_wt_alloc(void); -void enable_K6_2_wt_alloc(void); -#endif - #ifdef I486_CPU static void init_5x86(void); static void init_bluelightning(void); @@ -81,36 +75,37 @@ SYSCTL_INT(_hw, OID_AUTO, instruction_ss */ static int hw_clflush_disable = -1; -/* Must *NOT* be BSS or locore will bzero these after setting them */ -int cpu = 0; /* Are we 386, 386sx, 486, etc? */ -u_int cpu_feature = 0; /* Feature flags */ -u_int cpu_feature2 = 0; /* Feature flags */ -u_int amd_feature = 0; /* AMD feature flags */ -u_int amd_feature2 = 0; /* AMD feature flags */ -u_int amd_pminfo = 0; /* AMD advanced power management info */ -u_int via_feature_rng = 0; /* VIA RNG features */ -u_int via_feature_xcrypt = 0; /* VIA ACE features */ -u_int cpu_high = 0; /* Highest arg to CPUID */ -u_int cpu_id = 0; /* Stepping ID */ -u_int cpu_procinfo = 0; /* HyperThreading Info / Brand Index / CLFUSH */ -u_int cpu_procinfo2 = 0; /* Multicore info */ -char cpu_vendor[20] = ""; /* CPU Origin code */ -u_int cpu_vendor_id = 0; /* CPU vendor ID */ +int cpu; /* Are we 386, 386sx, 486, etc? */ +u_int cpu_feature; /* Feature flags */ +u_int cpu_feature2; /* Feature flags */ +u_int amd_feature; /* AMD feature flags */ +u_int amd_feature2; /* AMD feature flags */ +u_int amd_pminfo; /* AMD advanced power management info */ +u_int via_feature_rng; /* VIA RNG features */ +u_int via_feature_xcrypt; /* VIA ACE features */ +u_int cpu_high; /* Highest arg to CPUID */ +u_int cpu_exthigh; /* Highest arg to extended CPUID */ +u_int cpu_id; /* Stepping ID */ +u_int cpu_procinfo; /* HyperThreading Info / Brand Index / CLFUSH */ +u_int cpu_procinfo2; /* Multicore info */ +char cpu_vendor[20]; /* CPU Origin code */ +u_int cpu_vendor_id; /* CPU vendor ID */ +#ifdef CPU_ENABLE_SSE +u_int cpu_fxsr; /* SSE enabled */ +u_int cpu_mxcsr_mask; /* Valid bits in mxcsr */ +#endif u_int cpu_clflush_line_size = 32; +u_int cpu_stdext_feature; u_int cpu_mon_mwait_flags; /* MONITOR/MWAIT flags (CPUID.05H.ECX) */ u_int cpu_mon_min_size; /* MONITOR minimum range size, bytes */ u_int cpu_mon_max_size; /* MONITOR minimum range size, bytes */ +u_int cyrix_did; /* Device ID of Cyrix CPU */ SYSCTL_UINT(_hw, OID_AUTO, via_feature_rng, CTLFLAG_RD, &via_feature_rng, 0, "VIA RNG feature available in CPU"); SYSCTL_UINT(_hw, OID_AUTO, via_feature_xcrypt, CTLFLAG_RD, &via_feature_xcrypt, 0, "VIA xcrypt feature available in CPU"); -#ifdef CPU_ENABLE_SSE -u_int cpu_fxsr; /* SSE enabled */ -u_int cpu_mxcsr_mask; /* valid bits in mxcsr */ -#endif - #ifdef I486_CPU /* * IBM Blue Lightning Modified: stable/10/sys/i386/i386/machdep.c ============================================================================== --- stable/10/sys/i386/i386/machdep.c Mon Dec 22 18:39:38 2014 (r276069) +++ stable/10/sys/i386/i386/machdep.c Mon Dec 22 18:40:59 2014 (r276070) @@ -182,10 +182,6 @@ CTASSERT(offsetof(struct pcpu, pc_curthr extern void init386(int first); extern void dblfault_handler(void); -extern void printcpuinfo(void); /* XXX header file */ -extern void finishidentcpu(void); -extern void panicifcpuunsupported(void); - #define CS_SECURE(cs) (ISPL(cs) == SEL_UPL) #define EFL_SECURE(ef, oef) ((((ef) ^ (oef)) & ~PSL_USERCHANGE) == 0) @@ -1664,10 +1660,6 @@ struct gate_descriptor *idt = &idt0[0]; struct region_descriptor r_gdt, r_idt; /* table descriptors */ struct mtx dt_lock; /* lock for GDT and LDT */ -#if defined(I586_CPU) && !defined(NO_F00F_HACK) -extern int has_f00f_bug; -#endif - static struct i386tss dblfault_tss; static char dblfault_stack[PAGE_SIZE]; Modified: stable/10/sys/i386/i386/trap.c ============================================================================== --- stable/10/sys/i386/i386/trap.c Mon Dec 22 18:39:38 2014 (r276069) +++ stable/10/sys/i386/i386/trap.c Mon Dec 22 18:40:59 2014 (r276070) @@ -154,7 +154,7 @@ static char *trap_msg[] = { }; #if defined(I586_CPU) && !defined(NO_F00F_HACK) -extern int has_f00f_bug; +int has_f00f_bug = 0; /* Initialized so that it can be patched. */ #endif #ifdef KDB Modified: stable/10/sys/i386/include/md_var.h ============================================================================== --- stable/10/sys/i386/include/md_var.h Mon Dec 22 18:39:38 2014 (r276069) +++ stable/10/sys/i386/include/md_var.h Mon Dec 22 18:40:59 2014 (r276070) @@ -48,6 +48,7 @@ extern u_int amd_pminfo; extern u_int via_feature_rng; extern u_int via_feature_xcrypt; extern u_int cpu_clflush_line_size; +extern u_int cpu_stdext_feature; extern u_int cpu_fxsr; extern u_int cpu_high; extern u_int cpu_id; @@ -56,10 +57,13 @@ extern u_int cpu_procinfo; extern u_int cpu_procinfo2; extern char cpu_vendor[]; extern u_int cpu_vendor_id; -extern u_int cyrix_did; extern u_int cpu_mon_mwait_flags; extern u_int cpu_mon_min_size; extern u_int cpu_mon_max_size; +extern u_int cyrix_did; +#if defined(I586_CPU) && !defined(NO_F00F_HACK) +extern int has_f00f_bug; +#endif extern char kstack[]; extern char sigcode[]; extern int szsigcode; @@ -94,15 +98,23 @@ void doreti_popl_fs(void) __asm(__STRING void doreti_popl_fs_fault(void) __asm(__STRING(doreti_popl_fs_fault)); void dump_add_page(vm_paddr_t); void dump_drop_page(vm_paddr_t); -void initializecpu(void); +void finishidentcpu(void); +#if defined(I586_CPU) && defined(CPU_WT_ALLOC) +void enable_K5_wt_alloc(void); +void enable_K6_wt_alloc(void); +void enable_K6_2_wt_alloc(void); +#endif void enable_sse(void); void fillw(int /*u_short*/ pat, void *base, size_t cnt); +void initializecpu(void); void i686_pagezero(void *addr); void sse2_pagezero(void *addr); void init_AMD_Elan_sc520(void); int is_physical_memory(vm_paddr_t addr); int isa_nmi(int cd); vm_paddr_t kvtop(void *addr); +void panicifcpuunsupported(void); +void printcpuinfo(void); void setidt(int idx, alias_for_inthand_t *func, int typ, int dpl, int selec); int user_dbreg_trap(void); void minidumpsys(struct dumperinfo *); Modified: stable/10/sys/pc98/pc98/machdep.c ============================================================================== --- stable/10/sys/pc98/pc98/machdep.c Mon Dec 22 18:39:38 2014 (r276069) +++ stable/10/sys/pc98/pc98/machdep.c Mon Dec 22 18:40:59 2014 (r276070) @@ -151,10 +151,6 @@ CTASSERT(offsetof(struct pcpu, pc_curthr extern void init386(int first); extern void dblfault_handler(void); -extern void printcpuinfo(void); /* XXX header file */ -extern void finishidentcpu(void); -extern void panicifcpuunsupported(void); - #define CS_SECURE(cs) (ISPL(cs) == SEL_UPL) #define EFL_SECURE(ef, oef) ((((ef) ^ (oef)) & ~PSL_USERCHANGE) == 0) Copied: stable/10/sys/x86/x86/identcpu.c (from r271098, head/sys/x86/x86/identcpu.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/x86/x86/identcpu.c Mon Dec 22 18:40:59 2014 (r276070, copy of r271098, head/sys/x86/x86/identcpu.c) @@ -0,0 +1,1989 @@ +/*- + * Copyright (c) 1992 Terrence R. Lambert. + * Copyright (c) 1982, 1987, 1990 The Regents of the University of California. + * Copyright (c) 1997 KATO Takenori. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * William Jolitz. + * + * 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. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``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 REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 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. + * + * from: Id: machdep.c,v 1.193 1996/06/18 01:22:04 bde Exp + */ + +#include +__FBSDID("$FreeBSD$"); + +#include "opt_cpu.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#ifdef __i386__ +#define IDENTBLUE_CYRIX486 0 +#define IDENTBLUE_IBMCPU 1 +#define IDENTBLUE_CYRIXM2 2 + +static void identifycyrix(void); +static void print_transmeta_info(void); +#endif +static u_int find_cpu_vendor_id(void); +static void print_AMD_info(void); +static void print_INTEL_info(void); +static void print_INTEL_TLB(u_int data); +static void print_via_padlock_info(void); +static void print_vmx_info(void); + +int cpu_class; +char machine[] = MACHINE; + +#ifdef __amd64__ +#ifdef SCTL_MASK32 +extern int adaptive_machine_arch; +#endif + +static int +sysctl_hw_machine(SYSCTL_HANDLER_ARGS) +{ +#ifdef SCTL_MASK32 + static const char machine32[] = "i386"; +#endif + int error; + +#ifdef SCTL_MASK32 + if ((req->flags & SCTL_MASK32) != 0 && adaptive_machine_arch) + error = SYSCTL_OUT(req, machine32, sizeof(machine32)); + else +#endif + error = SYSCTL_OUT(req, machine, sizeof(machine)); + return (error); + +} +SYSCTL_PROC(_hw, HW_MACHINE, machine, CTLTYPE_STRING | CTLFLAG_RD, + NULL, 0, sysctl_hw_machine, "A", "Machine class"); +#else +SYSCTL_STRING(_hw, HW_MACHINE, machine, CTLFLAG_RD, + machine, 0, "Machine class"); +#endif + +static char cpu_model[128]; +SYSCTL_STRING(_hw, HW_MODEL, model, CTLFLAG_RD, + cpu_model, 0, "Machine model"); + +static int hw_clockrate; +SYSCTL_INT(_hw, OID_AUTO, clockrate, CTLFLAG_RD, + &hw_clockrate, 0, "CPU instruction clock rate"); + +static eventhandler_tag tsc_post_tag; + +static char cpu_brand[48]; + +#ifdef __i386__ +#define MAX_BRAND_INDEX 8 + +static const char *cpu_brandtable[MAX_BRAND_INDEX + 1] = { + NULL, /* No brand */ + "Intel Celeron", + "Intel Pentium III", + "Intel Pentium III Xeon", + NULL, + NULL, + NULL, + NULL, + "Intel Pentium 4" +}; +#endif + +static struct { + char *cpu_name; + int cpu_class; +} cpus[] = { +#ifdef __i386__ + { "Intel 80286", CPUCLASS_286 }, /* CPU_286 */ + { "i386SX", CPUCLASS_386 }, /* CPU_386SX */ + { "i386DX", CPUCLASS_386 }, /* CPU_386 */ + { "i486SX", CPUCLASS_486 }, /* CPU_486SX */ + { "i486DX", CPUCLASS_486 }, /* CPU_486 */ + { "Pentium", CPUCLASS_586 }, /* CPU_586 */ + { "Cyrix 486", CPUCLASS_486 }, /* CPU_486DLC */ + { "Pentium Pro", CPUCLASS_686 }, /* CPU_686 */ + { "Cyrix 5x86", CPUCLASS_486 }, /* CPU_M1SC */ + { "Cyrix 6x86", CPUCLASS_486 }, /* CPU_M1 */ + { "Blue Lightning", CPUCLASS_486 }, /* CPU_BLUE */ + { "Cyrix 6x86MX", CPUCLASS_686 }, /* CPU_M2 */ + { "NexGen 586", CPUCLASS_386 }, /* CPU_NX586 (XXX) */ + { "Cyrix 486S/DX", CPUCLASS_486 }, /* CPU_CY486DX */ + { "Pentium II", CPUCLASS_686 }, /* CPU_PII */ + { "Pentium III", CPUCLASS_686 }, /* CPU_PIII */ + { "Pentium 4", CPUCLASS_686 }, /* CPU_P4 */ +#else + { "Clawhammer", CPUCLASS_K8 }, /* CPU_CLAWHAMMER */ + { "Sledgehammer", CPUCLASS_K8 }, /* CPU_SLEDGEHAMMER */ +#endif +}; + +static struct { + char *vendor; + u_int vendor_id; +} cpu_vendors[] = { + { INTEL_VENDOR_ID, CPU_VENDOR_INTEL }, /* GenuineIntel */ + { AMD_VENDOR_ID, CPU_VENDOR_AMD }, /* AuthenticAMD */ + { CENTAUR_VENDOR_ID, CPU_VENDOR_CENTAUR }, /* CentaurHauls */ +#ifdef __i386__ + { NSC_VENDOR_ID, CPU_VENDOR_NSC }, /* Geode by NSC */ + { CYRIX_VENDOR_ID, CPU_VENDOR_CYRIX }, /* CyrixInstead */ + { TRANSMETA_VENDOR_ID, CPU_VENDOR_TRANSMETA }, /* GenuineTMx86 */ + { SIS_VENDOR_ID, CPU_VENDOR_SIS }, /* SiS SiS SiS */ + { UMC_VENDOR_ID, CPU_VENDOR_UMC }, /* UMC UMC UMC */ + { NEXGEN_VENDOR_ID, CPU_VENDOR_NEXGEN }, /* NexGenDriven */ + { RISE_VENDOR_ID, CPU_VENDOR_RISE }, /* RiseRiseRise */ +#if 0 + /* XXX CPUID 8000_0000h and 8086_0000h, not 0000_0000h */ + { "TransmetaCPU", CPU_VENDOR_TRANSMETA }, +#endif +#endif +}; + +void +printcpuinfo(void) +{ + u_int regs[4], i; + char *brand; + + cpu_class = cpus[cpu].cpu_class; + printf("CPU: "); + strncpy(cpu_model, cpus[cpu].cpu_name, sizeof (cpu_model)); + + /* Check for extended CPUID information and a processor name. */ + if (cpu_exthigh >= 0x80000004) { + brand = cpu_brand; + for (i = 0x80000002; i < 0x80000005; i++) { + do_cpuid(i, regs); + memcpy(brand, regs, sizeof(regs)); + brand += sizeof(regs); + } + } + + switch (cpu_vendor_id) { + case CPU_VENDOR_INTEL: +#ifdef __i386__ + if ((cpu_id & 0xf00) > 0x300) { + u_int brand_index; + + cpu_model[0] = '\0'; + + switch (cpu_id & 0x3000) { + case 0x1000: + strcpy(cpu_model, "Overdrive "); + break; + case 0x2000: + strcpy(cpu_model, "Dual "); + break; + } + + switch (cpu_id & 0xf00) { + case 0x400: + strcat(cpu_model, "i486 "); + /* Check the particular flavor of 486 */ + switch (cpu_id & 0xf0) { + case 0x00: + case 0x10: + strcat(cpu_model, "DX"); + break; + case 0x20: + strcat(cpu_model, "SX"); + break; + case 0x30: + strcat(cpu_model, "DX2"); + break; + case 0x40: + strcat(cpu_model, "SL"); + break; + case 0x50: + strcat(cpu_model, "SX2"); + break; + case 0x70: + strcat(cpu_model, + "DX2 Write-Back Enhanced"); + break; + case 0x80: + strcat(cpu_model, "DX4"); + break; + } + break; + case 0x500: + /* Check the particular flavor of 586 */ + strcat(cpu_model, "Pentium"); + switch (cpu_id & 0xf0) { + case 0x00: + strcat(cpu_model, " A-step"); + break; + case 0x10: + strcat(cpu_model, "/P5"); + break; + case 0x20: + strcat(cpu_model, "/P54C"); + break; + case 0x30: + strcat(cpu_model, "/P24T"); + break; + case 0x40: + strcat(cpu_model, "/P55C"); + break; + case 0x70: + strcat(cpu_model, "/P54C"); + break; + case 0x80: + strcat(cpu_model, "/P55C (quarter-micron)"); + break; + default: + /* nothing */ + break; + } +#if defined(I586_CPU) && !defined(NO_F00F_HACK) + /* + * XXX - If/when Intel fixes the bug, this + * should also check the version of the + * CPU, not just that it's a Pentium. + */ + has_f00f_bug = 1; +#endif + break; + case 0x600: + /* Check the particular flavor of 686 */ + switch (cpu_id & 0xf0) { + case 0x00: + strcat(cpu_model, "Pentium Pro A-step"); + break; + case 0x10: + strcat(cpu_model, "Pentium Pro"); + break; + case 0x30: + case 0x50: + case 0x60: + strcat(cpu_model, + "Pentium II/Pentium II Xeon/Celeron"); + cpu = CPU_PII; + break; + case 0x70: + case 0x80: + case 0xa0: + case 0xb0: + strcat(cpu_model, + "Pentium III/Pentium III Xeon/Celeron"); + cpu = CPU_PIII; + break; + default: + strcat(cpu_model, "Unknown 80686"); + break; + } + break; + case 0xf00: + strcat(cpu_model, "Pentium 4"); + cpu = CPU_P4; + break; + default: + strcat(cpu_model, "unknown"); + break; + } + + /* + * If we didn't get a brand name from the extended + * CPUID, try to look it up in the brand table. + */ + if (cpu_high > 0 && *cpu_brand == '\0') { + brand_index = cpu_procinfo & CPUID_BRAND_INDEX; + if (brand_index <= MAX_BRAND_INDEX && + cpu_brandtable[brand_index] != NULL) + strcpy(cpu_brand, + cpu_brandtable[brand_index]); + } + } +#else + /* Please make up your mind folks! */ + strcat(cpu_model, "EM64T"); +#endif + break; + case CPU_VENDOR_AMD: + /* + * Values taken from AMD Processor Recognition + * http://www.amd.com/K6/k6docs/pdf/20734g.pdf + * (also describes ``Features'' encodings. + */ + strcpy(cpu_model, "AMD "); +#ifdef __i386__ + switch (cpu_id & 0xFF0) { + case 0x410: + strcat(cpu_model, "Standard Am486DX"); + break; + case 0x430: + strcat(cpu_model, "Enhanced Am486DX2 Write-Through"); + break; + case 0x470: + strcat(cpu_model, "Enhanced Am486DX2 Write-Back"); + break; + case 0x480: + strcat(cpu_model, "Enhanced Am486DX4/Am5x86 Write-Through"); + break; + case 0x490: + strcat(cpu_model, "Enhanced Am486DX4/Am5x86 Write-Back"); + break; + case 0x4E0: + strcat(cpu_model, "Am5x86 Write-Through"); + break; + case 0x4F0: + strcat(cpu_model, "Am5x86 Write-Back"); + break; + case 0x500: + strcat(cpu_model, "K5 model 0"); + break; + case 0x510: + strcat(cpu_model, "K5 model 1"); + break; + case 0x520: + strcat(cpu_model, "K5 PR166 (model 2)"); + break; + case 0x530: + strcat(cpu_model, "K5 PR200 (model 3)"); + break; + case 0x560: + strcat(cpu_model, "K6"); + break; + case 0x570: + strcat(cpu_model, "K6 266 (model 1)"); + break; + case 0x580: + strcat(cpu_model, "K6-2"); + break; + case 0x590: + strcat(cpu_model, "K6-III"); + break; + case 0x5a0: + strcat(cpu_model, "Geode LX"); + /* + * Make sure the TSC runs through suspension, + * otherwise we can't use it as timecounter + */ + wrmsr(0x1900, rdmsr(0x1900) | 0x20ULL); + break; + default: + strcat(cpu_model, "Unknown"); + break; + } +#if defined(I586_CPU) && defined(CPU_WT_ALLOC) + if ((cpu_id & 0xf00) == 0x500) { + if (((cpu_id & 0x0f0) > 0) + && ((cpu_id & 0x0f0) < 0x60) + && ((cpu_id & 0x00f) > 3)) + enable_K5_wt_alloc(); + else if (((cpu_id & 0x0f0) > 0x80) + || (((cpu_id & 0x0f0) == 0x80) + && (cpu_id & 0x00f) > 0x07)) + enable_K6_2_wt_alloc(); + else if ((cpu_id & 0x0f0) > 0x50) + enable_K6_wt_alloc(); + } +#endif +#else + if ((cpu_id & 0xf00) == 0xf00) + strcat(cpu_model, "AMD64 Processor"); + else + strcat(cpu_model, "Unknown"); +#endif + break; +#ifdef __i386__ + case CPU_VENDOR_CYRIX: + strcpy(cpu_model, "Cyrix "); + switch (cpu_id & 0xff0) { + case 0x440: + strcat(cpu_model, "MediaGX"); + break; + case 0x520: + strcat(cpu_model, "6x86"); + break; + case 0x540: + cpu_class = CPUCLASS_586; + strcat(cpu_model, "GXm"); + break; + case 0x600: + strcat(cpu_model, "6x86MX"); + break; + default: + /* + * Even though CPU supports the cpuid + * instruction, it can be disabled. + * Therefore, this routine supports all Cyrix + * CPUs. + */ + switch (cyrix_did & 0xf0) { + case 0x00: + switch (cyrix_did & 0x0f) { + case 0x00: + strcat(cpu_model, "486SLC"); + break; + case 0x01: + strcat(cpu_model, "486DLC"); + break; + case 0x02: + strcat(cpu_model, "486SLC2"); + break; + case 0x03: + strcat(cpu_model, "486DLC2"); + break; + case 0x04: + strcat(cpu_model, "486SRx"); + break; + case 0x05: + strcat(cpu_model, "486DRx"); + break; + case 0x06: + strcat(cpu_model, "486SRx2"); + break; + case 0x07: + strcat(cpu_model, "486DRx2"); + break; + case 0x08: + strcat(cpu_model, "486SRu"); + break; + case 0x09: + strcat(cpu_model, "486DRu"); + break; + case 0x0a: + strcat(cpu_model, "486SRu2"); + break; + case 0x0b: + strcat(cpu_model, "486DRu2"); + break; + default: + strcat(cpu_model, "Unknown"); + break; + } + break; + case 0x10: + switch (cyrix_did & 0x0f) { + case 0x00: + strcat(cpu_model, "486S"); + break; + case 0x01: + strcat(cpu_model, "486S2"); + break; + case 0x02: + strcat(cpu_model, "486Se"); + break; + case 0x03: + strcat(cpu_model, "486S2e"); + break; + case 0x0a: + strcat(cpu_model, "486DX"); + break; + case 0x0b: + strcat(cpu_model, "486DX2"); + break; + case 0x0f: + strcat(cpu_model, "486DX4"); + break; + default: + strcat(cpu_model, "Unknown"); + break; + } + break; + case 0x20: + if ((cyrix_did & 0x0f) < 8) + strcat(cpu_model, "6x86"); /* Where did you get it? */ + else + strcat(cpu_model, "5x86"); + break; + case 0x30: + strcat(cpu_model, "6x86"); + break; + case 0x40: + if ((cyrix_did & 0xf000) == 0x3000) { + cpu_class = CPUCLASS_586; + strcat(cpu_model, "GXm"); + } else + strcat(cpu_model, "MediaGX"); + break; + case 0x50: + strcat(cpu_model, "6x86MX"); + break; + case 0xf0: + switch (cyrix_did & 0x0f) { + case 0x0d: + strcat(cpu_model, "Overdrive CPU"); + break; + case 0x0e: + strcpy(cpu_model, "Texas Instruments 486SXL"); + break; + case 0x0f: + strcat(cpu_model, "486SLC/DLC"); + break; + default: + strcat(cpu_model, "Unknown"); + break; + } + break; + default: + strcat(cpu_model, "Unknown"); + break; + } + break; + } + break; + case CPU_VENDOR_RISE: + strcpy(cpu_model, "Rise "); + switch (cpu_id & 0xff0) { + case 0x500: /* 6401 and 6441 (Kirin) */ + case 0x520: /* 6510 (Lynx) */ + strcat(cpu_model, "mP6"); + break; + default: + strcat(cpu_model, "Unknown"); + } + break; +#endif + case CPU_VENDOR_CENTAUR: +#ifdef __i386__ + switch (cpu_id & 0xff0) { + case 0x540: + strcpy(cpu_model, "IDT WinChip C6"); + break; + case 0x580: + strcpy(cpu_model, "IDT WinChip 2"); + break; + case 0x590: + strcpy(cpu_model, "IDT WinChip 3"); + break; + case 0x660: + strcpy(cpu_model, "VIA C3 Samuel"); + break; + case 0x670: + if (cpu_id & 0x8) + strcpy(cpu_model, "VIA C3 Ezra"); + else + strcpy(cpu_model, "VIA C3 Samuel 2"); + break; + case 0x680: + strcpy(cpu_model, "VIA C3 Ezra-T"); + break; + case 0x690: + strcpy(cpu_model, "VIA C3 Nehemiah"); + break; + case 0x6a0: + case 0x6d0: + strcpy(cpu_model, "VIA C7 Esther"); + break; + case 0x6f0: + strcpy(cpu_model, "VIA Nano"); + break; + default: + strcpy(cpu_model, "VIA/IDT Unknown"); + } +#else + strcpy(cpu_model, "VIA "); + if ((cpu_id & 0xff0) == 0x6f0) + strcat(cpu_model, "Nano Processor"); + else + strcat(cpu_model, "Unknown"); +#endif + break; +#ifdef __i386__ + case CPU_VENDOR_IBM: + strcpy(cpu_model, "Blue Lightning CPU"); + break; + case CPU_VENDOR_NSC: + switch (cpu_id & 0xff0) { + case 0x540: + strcpy(cpu_model, "Geode SC1100"); + cpu = CPU_GEODE1100; + break; + default: + strcpy(cpu_model, "Geode/NSC unknown"); + break; + } + break; +#endif + default: + strcat(cpu_model, "Unknown"); + break; + } + + /* + * Replace cpu_model with cpu_brand minus leading spaces if + * we have one. + */ + brand = cpu_brand; + while (*brand == ' ') + ++brand; + if (*brand != '\0') + strcpy(cpu_model, brand); + + printf("%s (", cpu_model); + if (tsc_freq != 0) { + hw_clockrate = (tsc_freq + 5000) / 1000000; + printf("%jd.%02d-MHz ", + (intmax_t)(tsc_freq + 4999) / 1000000, + (u_int)((tsc_freq + 4999) / 10000) % 100); + } + switch(cpu_class) { +#ifdef __i386__ + case CPUCLASS_286: + printf("286"); + break; + case CPUCLASS_386: + printf("386"); + break; +#if defined(I486_CPU) + case CPUCLASS_486: + printf("486"); + break; +#endif +#if defined(I586_CPU) + case CPUCLASS_586: + printf("586"); + break; +#endif +#if defined(I686_CPU) + case CPUCLASS_686: + printf("686"); + break; +#endif +#else + case CPUCLASS_K8: + printf("K8"); + break; +#endif + default: + printf("Unknown"); /* will panic below... */ + } + printf("-class CPU)\n"); + if (*cpu_vendor) + printf(" Origin=\"%s\"", cpu_vendor); + if (cpu_id) + printf(" Id=0x%x", cpu_id); + + if (cpu_vendor_id == CPU_VENDOR_INTEL || + cpu_vendor_id == CPU_VENDOR_AMD || + cpu_vendor_id == CPU_VENDOR_CENTAUR || +#ifdef __i386__ + cpu_vendor_id == CPU_VENDOR_TRANSMETA || + cpu_vendor_id == CPU_VENDOR_RISE || + cpu_vendor_id == CPU_VENDOR_NSC || + (cpu_vendor_id == CPU_VENDOR_CYRIX && ((cpu_id & 0xf00) > 0x500)) || +#endif + 0) { + printf(" Family=0x%x", CPUID_TO_FAMILY(cpu_id)); + printf(" Model=0x%x", CPUID_TO_MODEL(cpu_id)); + printf(" Stepping=%u", cpu_id & CPUID_STEPPING); +#ifdef __i386__ + if (cpu_vendor_id == CPU_VENDOR_CYRIX) + printf("\n DIR=0x%04x", cyrix_did); +#endif + + /* + * AMD CPUID Specification + * http://support.amd.com/us/Embedded_TechDocs/25481.pdf + * + * Intel Processor Identification and CPUID Instruction + * http://www.intel.com/assets/pdf/appnote/241618.pdf + */ + if (cpu_high > 0) { + + /* + * Here we should probably set up flags indicating + * whether or not various features are available. + * The interesting ones are probably VME, PSE, PAE, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Dec 22 18:42:51 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6DB2E1E5; Mon, 22 Dec 2014 18:42:51 +0000 (UTC) Received: from mail-wi0-x235.google.com (mail-wi0-x235.google.com [IPv6:2a00:1450:400c:c05::235]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F0B59171A; Mon, 22 Dec 2014 18:42:50 +0000 (UTC) Received: by mail-wi0-f181.google.com with SMTP id r20so8808965wiv.8; Mon, 22 Dec 2014 10:42:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=9KZr+71qCbBSryuzfKjk17uDVLYGqLr5gGHnwetAI6Q=; b=Yfr2fYqpegmOOUFneAIj8SEYtgMktiID29HiBV/idXbwA+wP28nIjWE/v8M0KN2hQi 2/cJWim2Xi1q4HXFLxtr7AaFjoYuKWW1/9HqqGl+xUxjZTIH8xGChgcdhBeN+YNj8TN5 szQWk5V0YCfojyeRciv2gfQf5In91tOQN5P+29Ah7SjP6SDu7cKyYwJGeGn+6iLvb4Ku k367KolmmOKez/+1kkCeqcgPVJduB/nj5fa4PXN5TQddLGrQUFU7hHLkBqz2QkuIJ6tB XuKaWNihvG0z9DpG7gGjHsgtHJLC+S8FMsHexkw9NvFn5w5qlDAi8wPPqQwRrzEdU63r Qe7g== MIME-Version: 1.0 X-Received: by 10.180.91.193 with SMTP id cg1mr34081966wib.26.1419273769374; Mon, 22 Dec 2014 10:42:49 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.216.106.195 with HTTP; Mon, 22 Dec 2014 10:42:49 -0800 (PST) In-Reply-To: <20141222172810.GY2148@kib.kiev.ua> References: <201412211332.sBLDW8VC030548@svn.freebsd.org> <20141221151425.GX2148@kib.kiev.ua> <5496F37D.5030903@FreeBSD.org> <201412220940.02509.jhb@freebsd.org> <20141222172810.GY2148@kib.kiev.ua> Date: Mon, 22 Dec 2014 10:42:49 -0800 X-Google-Sender-Auth: wIfifv2PFOAbysI5BxuYNAGmcHE Message-ID: Subject: Re: svn commit: r276008 - in head/sys: kern sys From: Adrian Chadd To: Konstantin Belousov Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Andriy Gapon , John Baldwin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Dec 2014 18:42:51 -0000 On 22 December 2014 at 09:28, Konstantin Belousov wrote: > On Mon, Dec 22, 2014 at 09:40:02AM -0500, John Baldwin wrote: >> On Sunday, December 21, 2014 11:21:17 am Andriy Gapon wrote: >> > On 21/12/2014 17:14, Konstantin Belousov wrote: >> > > On Sun, Dec 21, 2014 at 04:45:28PM +0200, Andriy Gapon wrote: >> > >> On 21/12/2014 16:41, Konstantin Belousov wrote: >> > >>> Or, are you asking why caching of the name could be needed for >> > >>> core dump files at all ? >> > >> >> > >> Sort of. Why VN_OPEN_NAMECACHE is useful in the case of core dumps? >> > >> What does it make better? >> > > The vn_fullpath() mostly works for the core files after the change, >> > > comparing with the non-working state at all before. >> > > >> > >> > Ah, vn_fullpath(). Thank you. >> >> Is there something specific to core dumps that makes vn_fullpath() more >> useful to have working before a process tries to open the core? (As >> compared to other newly-created files) > > See other Rui' reply in the thread. It was done by his request. > > Basically, we cannot enable caching for CREATE, since operations like > extracting large archive, would flush the cache. Doing it rarely > and when needed is acceptable. The explained use case seems to > be warranted. .. 2c, sounds like having an ARC style replacement policy for namecache entries would be useful. (I mean the policy as described in the ARC paper, not the ZFS implementation as a block cache.) -adrian From owner-svn-src-all@FreeBSD.ORG Mon Dec 22 18:54:57 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C481D54F; Mon, 22 Dec 2014 18:54:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A528C1924; Mon, 22 Dec 2014 18:54:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBMIsv14096665; Mon, 22 Dec 2014 18:54:57 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBMIsuva096658; Mon, 22 Dec 2014 18:54:56 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201412221854.sBMIsuva096658@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 22 Dec 2014 18:54:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276071 - in head/contrib/ntp: ntpd util X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Dec 2014 18:54:57 -0000 Author: delphij Date: Mon Dec 22 18:54:55 2014 New Revision: 276071 URL: https://svnweb.freebsd.org/changeset/base/276071 Log: Fix multiple ntp vulnerabilities. Reviewed by: roberto (earlier revision), philip Security: CVE-2014-9293, CVE-2014-9294 Security: CVE-2014-9295, CVE-2014-9296 Security: FreeBSD-SA-14:31.ntp Differential Revision: https://reviews.freebsd.org/D1343 Modified: head/contrib/ntp/ntpd/ntp_config.c head/contrib/ntp/ntpd/ntp_control.c head/contrib/ntp/ntpd/ntp_crypto.c head/contrib/ntp/ntpd/ntp_proto.c head/contrib/ntp/util/ntp-keygen.c Modified: head/contrib/ntp/ntpd/ntp_config.c ============================================================================== --- head/contrib/ntp/ntpd/ntp_config.c Mon Dec 22 18:40:59 2014 (r276070) +++ head/contrib/ntp/ntpd/ntp_config.c Mon Dec 22 18:54:55 2014 (r276071) @@ -1887,7 +1887,7 @@ getconfig( for (i = 0; i < 8; i++) for (j = 1; j < 100; ++j) { - rankey[i] = (char) (ntp_random() & 0xff); + rankey[i] = (char) (arc4random() & 0xff); if (rankey[i] != 0) break; } rankey[8] = 0; Modified: head/contrib/ntp/ntpd/ntp_control.c ============================================================================== --- head/contrib/ntp/ntpd/ntp_control.c Mon Dec 22 18:40:59 2014 (r276070) +++ head/contrib/ntp/ntpd/ntp_control.c Mon Dec 22 18:54:55 2014 (r276071) @@ -24,6 +24,10 @@ #include #include +#ifndef MIN +#define MIN(a, b) (((a) <= (b)) ? (a) : (b)) +#endif + /* * Structure to hold request procedure information */ @@ -893,6 +897,7 @@ ctl_putdata( ) { int overhead; + unsigned int currentlen; overhead = 0; if (!bin) { @@ -916,12 +921,22 @@ ctl_putdata( /* * Save room for trailing junk */ - if (dlen + overhead + datapt > dataend) { + while (dlen + overhead + datapt > dataend) { /* * Not enough room in this one, flush it out. */ + currentlen = MIN(dlen, dataend - datapt); + + memcpy(datapt, dp, currentlen); + + datapt += currentlen; + dp += currentlen; + dlen -= currentlen; + datalinelen += currentlen; + ctl_flushpkt(CTL_MORE); } + memmove((char *)datapt, dp, (unsigned)dlen); datapt += dlen; datalinelen += dlen; Modified: head/contrib/ntp/ntpd/ntp_crypto.c ============================================================================== --- head/contrib/ntp/ntpd/ntp_crypto.c Mon Dec 22 18:40:59 2014 (r276070) +++ head/contrib/ntp/ntpd/ntp_crypto.c Mon Dec 22 18:54:55 2014 (r276071) @@ -864,12 +864,24 @@ crypto_recv( * errors. */ if (vallen == (u_int) EVP_PKEY_size(host_pkey)) { - RSA_private_decrypt(vallen, + u_int32 *cookiebuf = malloc( + RSA_size(host_pkey->pkey.rsa)); + if (cookiebuf == NULL) { + rval = XEVNT_CKY; + break; + } + if (RSA_private_decrypt(vallen, (u_char *)ep->pkt, - (u_char *)&temp32, + (u_char *)cookiebuf, host_pkey->pkey.rsa, - RSA_PKCS1_OAEP_PADDING); - cookie = ntohl(temp32); + RSA_PKCS1_OAEP_PADDING) != 4) { + rval = XEVNT_CKY; + free(cookiebuf); + break; + } else { + cookie = ntohl(*cookiebuf); + free(cookiebuf); + } } else { rval = XEVNT_CKY; break; @@ -3914,7 +3926,7 @@ crypto_setup(void) rand_file); exit (-1); } - get_systime(&seed); + arc4random_buf(&seed, sizeof(l_fp)); RAND_seed(&seed, sizeof(l_fp)); RAND_write_file(rand_file); OpenSSL_add_all_algorithms(); Modified: head/contrib/ntp/ntpd/ntp_proto.c ============================================================================== --- head/contrib/ntp/ntpd/ntp_proto.c Mon Dec 22 18:40:59 2014 (r276070) +++ head/contrib/ntp/ntpd/ntp_proto.c Mon Dec 22 18:54:55 2014 (r276071) @@ -649,6 +649,7 @@ receive( has_mac)) { is_authentic = AUTH_ERROR; sys_badauth++; + return; } else { is_authentic = AUTH_OK; } Modified: head/contrib/ntp/util/ntp-keygen.c ============================================================================== --- head/contrib/ntp/util/ntp-keygen.c Mon Dec 22 18:40:59 2014 (r276070) +++ head/contrib/ntp/util/ntp-keygen.c Mon Dec 22 18:54:55 2014 (r276071) @@ -642,7 +642,7 @@ gen_md5( for (i = 1; i <= MD5KEYS; i++) { for (j = 0; j < 16; j++) { while (1) { - temp = ntp_random() & 0xff; + temp = arc4random() & 0xff; if (temp == '#') continue; if (temp > 0x20 && temp < 0x7f) @@ -675,7 +675,7 @@ gen_rsa( FILE *str; fprintf(stderr, "Generating RSA keys (%d bits)...\n", modulus); - rsa = RSA_generate_key(modulus, 3, cb, "RSA"); + rsa = RSA_generate_key(modulus, 65537, cb, "RSA"); fprintf(stderr, "\n"); if (rsa == NULL) { fprintf(stderr, "RSA generate keys fails\n%s\n", @@ -954,7 +954,7 @@ gen_gqpar( */ fprintf(stderr, "Generating GQ parameters (%d bits)...\n", modulus); - rsa = RSA_generate_key(modulus, 3, cb, "GQ"); + rsa = RSA_generate_key(modulus, 65537, cb, "GQ"); fprintf(stderr, "\n"); if (rsa == NULL) { fprintf(stderr, "RSA generate keys fails\n%s\n", From owner-svn-src-all@FreeBSD.ORG Mon Dec 22 19:07:18 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 89BF5B13; Mon, 22 Dec 2014 19:07:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6B1161B7C; Mon, 22 Dec 2014 19:07:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBMJ7I8t002152; Mon, 22 Dec 2014 19:07:18 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBMJ7HO6002146; Mon, 22 Dec 2014 19:07:17 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201412221907.sBMJ7HO6002146@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 22 Dec 2014 19:07:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276072 - in stable/10/contrib/ntp: ntpd util X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Dec 2014 19:07:18 -0000 Author: delphij Date: Mon Dec 22 19:07:16 2014 New Revision: 276072 URL: https://svnweb.freebsd.org/changeset/base/276072 Log: MFC r276071: Fix multiple ntp vulnerabilities. Reviewed by: roberto (earlier revision), philip Security: CVE-2014-9293, CVE-2014-9294 Security: CVE-2014-9295, CVE-2014-9296 Security: FreeBSD-SA-14:31.ntp Modified: stable/10/contrib/ntp/ntpd/ntp_config.c stable/10/contrib/ntp/ntpd/ntp_control.c stable/10/contrib/ntp/ntpd/ntp_crypto.c stable/10/contrib/ntp/ntpd/ntp_proto.c stable/10/contrib/ntp/util/ntp-keygen.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/ntp/ntpd/ntp_config.c ============================================================================== --- stable/10/contrib/ntp/ntpd/ntp_config.c Mon Dec 22 18:54:55 2014 (r276071) +++ stable/10/contrib/ntp/ntpd/ntp_config.c Mon Dec 22 19:07:16 2014 (r276072) @@ -1887,7 +1887,7 @@ getconfig( for (i = 0; i < 8; i++) for (j = 1; j < 100; ++j) { - rankey[i] = (char) (ntp_random() & 0xff); + rankey[i] = (char) (arc4random() & 0xff); if (rankey[i] != 0) break; } rankey[8] = 0; Modified: stable/10/contrib/ntp/ntpd/ntp_control.c ============================================================================== --- stable/10/contrib/ntp/ntpd/ntp_control.c Mon Dec 22 18:54:55 2014 (r276071) +++ stable/10/contrib/ntp/ntpd/ntp_control.c Mon Dec 22 19:07:16 2014 (r276072) @@ -24,6 +24,10 @@ #include #include +#ifndef MIN +#define MIN(a, b) (((a) <= (b)) ? (a) : (b)) +#endif + /* * Structure to hold request procedure information */ @@ -893,6 +897,7 @@ ctl_putdata( ) { int overhead; + unsigned int currentlen; overhead = 0; if (!bin) { @@ -916,12 +921,22 @@ ctl_putdata( /* * Save room for trailing junk */ - if (dlen + overhead + datapt > dataend) { + while (dlen + overhead + datapt > dataend) { /* * Not enough room in this one, flush it out. */ + currentlen = MIN(dlen, dataend - datapt); + + memcpy(datapt, dp, currentlen); + + datapt += currentlen; + dp += currentlen; + dlen -= currentlen; + datalinelen += currentlen; + ctl_flushpkt(CTL_MORE); } + memmove((char *)datapt, dp, (unsigned)dlen); datapt += dlen; datalinelen += dlen; Modified: stable/10/contrib/ntp/ntpd/ntp_crypto.c ============================================================================== --- stable/10/contrib/ntp/ntpd/ntp_crypto.c Mon Dec 22 18:54:55 2014 (r276071) +++ stable/10/contrib/ntp/ntpd/ntp_crypto.c Mon Dec 22 19:07:16 2014 (r276072) @@ -864,12 +864,24 @@ crypto_recv( * errors. */ if (vallen == (u_int) EVP_PKEY_size(host_pkey)) { - RSA_private_decrypt(vallen, + u_int32 *cookiebuf = malloc( + RSA_size(host_pkey->pkey.rsa)); + if (cookiebuf == NULL) { + rval = XEVNT_CKY; + break; + } + if (RSA_private_decrypt(vallen, (u_char *)ep->pkt, - (u_char *)&temp32, + (u_char *)cookiebuf, host_pkey->pkey.rsa, - RSA_PKCS1_OAEP_PADDING); - cookie = ntohl(temp32); + RSA_PKCS1_OAEP_PADDING) != 4) { + rval = XEVNT_CKY; + free(cookiebuf); + break; + } else { + cookie = ntohl(*cookiebuf); + free(cookiebuf); + } } else { rval = XEVNT_CKY; break; @@ -3914,7 +3926,7 @@ crypto_setup(void) rand_file); exit (-1); } - get_systime(&seed); + arc4random_buf(&seed, sizeof(l_fp)); RAND_seed(&seed, sizeof(l_fp)); RAND_write_file(rand_file); OpenSSL_add_all_algorithms(); Modified: stable/10/contrib/ntp/ntpd/ntp_proto.c ============================================================================== --- stable/10/contrib/ntp/ntpd/ntp_proto.c Mon Dec 22 18:54:55 2014 (r276071) +++ stable/10/contrib/ntp/ntpd/ntp_proto.c Mon Dec 22 19:07:16 2014 (r276072) @@ -649,6 +649,7 @@ receive( has_mac)) { is_authentic = AUTH_ERROR; sys_badauth++; + return; } else { is_authentic = AUTH_OK; } Modified: stable/10/contrib/ntp/util/ntp-keygen.c ============================================================================== --- stable/10/contrib/ntp/util/ntp-keygen.c Mon Dec 22 18:54:55 2014 (r276071) +++ stable/10/contrib/ntp/util/ntp-keygen.c Mon Dec 22 19:07:16 2014 (r276072) @@ -642,7 +642,7 @@ gen_md5( for (i = 1; i <= MD5KEYS; i++) { for (j = 0; j < 16; j++) { while (1) { - temp = ntp_random() & 0xff; + temp = arc4random() & 0xff; if (temp == '#') continue; if (temp > 0x20 && temp < 0x7f) @@ -675,7 +675,7 @@ gen_rsa( FILE *str; fprintf(stderr, "Generating RSA keys (%d bits)...\n", modulus); - rsa = RSA_generate_key(modulus, 3, cb, "RSA"); + rsa = RSA_generate_key(modulus, 65537, cb, "RSA"); fprintf(stderr, "\n"); if (rsa == NULL) { fprintf(stderr, "RSA generate keys fails\n%s\n", @@ -954,7 +954,7 @@ gen_gqpar( */ fprintf(stderr, "Generating GQ parameters (%d bits)...\n", modulus); - rsa = RSA_generate_key(modulus, 3, cb, "GQ"); + rsa = RSA_generate_key(modulus, 65537, cb, "GQ"); fprintf(stderr, "\n"); if (rsa == NULL) { fprintf(stderr, "RSA generate keys fails\n%s\n", From owner-svn-src-all@FreeBSD.ORG Mon Dec 22 19:08:12 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 222D7C5C; Mon, 22 Dec 2014 19:08:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 037481B93; Mon, 22 Dec 2014 19:08:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBMJ8B9R002330; Mon, 22 Dec 2014 19:08:11 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBMJ8A9n002324; Mon, 22 Dec 2014 19:08:10 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201412221908.sBMJ8A9n002324@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 22 Dec 2014 19:08:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r276073 - in stable: 8/contrib/ntp/ntpd 8/contrib/ntp/util 9/contrib/ntp/ntpd 9/contrib/ntp/util X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Dec 2014 19:08:12 -0000 Author: delphij Date: Mon Dec 22 19:08:09 2014 New Revision: 276073 URL: https://svnweb.freebsd.org/changeset/base/276073 Log: MFC r276071: Fix multiple ntp vulnerabilities. Reviewed by: roberto (earlier revision), philip Security: CVE-2014-9293, CVE-2014-9294 Security: CVE-2014-9295, CVE-2014-9296 Security: FreeBSD-SA-14:31.ntp Modified: stable/9/contrib/ntp/ntpd/ntp_config.c stable/9/contrib/ntp/ntpd/ntp_control.c stable/9/contrib/ntp/ntpd/ntp_crypto.c stable/9/contrib/ntp/ntpd/ntp_proto.c stable/9/contrib/ntp/util/ntp-keygen.c Directory Properties: stable/9/contrib/ntp/ (props changed) Changes in other areas also in this revision: Modified: stable/8/contrib/ntp/ntpd/ntp_config.c stable/8/contrib/ntp/ntpd/ntp_control.c stable/8/contrib/ntp/ntpd/ntp_crypto.c stable/8/contrib/ntp/ntpd/ntp_proto.c stable/8/contrib/ntp/util/ntp-keygen.c Directory Properties: stable/8/contrib/ntp/ (props changed) Modified: stable/9/contrib/ntp/ntpd/ntp_config.c ============================================================================== --- stable/9/contrib/ntp/ntpd/ntp_config.c Mon Dec 22 19:07:16 2014 (r276072) +++ stable/9/contrib/ntp/ntpd/ntp_config.c Mon Dec 22 19:08:09 2014 (r276073) @@ -1887,7 +1887,7 @@ getconfig( for (i = 0; i < 8; i++) for (j = 1; j < 100; ++j) { - rankey[i] = (char) (ntp_random() & 0xff); + rankey[i] = (char) (arc4random() & 0xff); if (rankey[i] != 0) break; } rankey[8] = 0; Modified: stable/9/contrib/ntp/ntpd/ntp_control.c ============================================================================== --- stable/9/contrib/ntp/ntpd/ntp_control.c Mon Dec 22 19:07:16 2014 (r276072) +++ stable/9/contrib/ntp/ntpd/ntp_control.c Mon Dec 22 19:08:09 2014 (r276073) @@ -24,6 +24,10 @@ #include #include +#ifndef MIN +#define MIN(a, b) (((a) <= (b)) ? (a) : (b)) +#endif + /* * Structure to hold request procedure information */ @@ -893,6 +897,7 @@ ctl_putdata( ) { int overhead; + unsigned int currentlen; overhead = 0; if (!bin) { @@ -916,12 +921,22 @@ ctl_putdata( /* * Save room for trailing junk */ - if (dlen + overhead + datapt > dataend) { + while (dlen + overhead + datapt > dataend) { /* * Not enough room in this one, flush it out. */ + currentlen = MIN(dlen, dataend - datapt); + + memcpy(datapt, dp, currentlen); + + datapt += currentlen; + dp += currentlen; + dlen -= currentlen; + datalinelen += currentlen; + ctl_flushpkt(CTL_MORE); } + memmove((char *)datapt, dp, (unsigned)dlen); datapt += dlen; datalinelen += dlen; Modified: stable/9/contrib/ntp/ntpd/ntp_crypto.c ============================================================================== --- stable/9/contrib/ntp/ntpd/ntp_crypto.c Mon Dec 22 19:07:16 2014 (r276072) +++ stable/9/contrib/ntp/ntpd/ntp_crypto.c Mon Dec 22 19:08:09 2014 (r276073) @@ -864,12 +864,24 @@ crypto_recv( * errors. */ if (vallen == (u_int) EVP_PKEY_size(host_pkey)) { - RSA_private_decrypt(vallen, + u_int32 *cookiebuf = malloc( + RSA_size(host_pkey->pkey.rsa)); + if (cookiebuf == NULL) { + rval = XEVNT_CKY; + break; + } + if (RSA_private_decrypt(vallen, (u_char *)ep->pkt, - (u_char *)&temp32, + (u_char *)cookiebuf, host_pkey->pkey.rsa, - RSA_PKCS1_OAEP_PADDING); - cookie = ntohl(temp32); + RSA_PKCS1_OAEP_PADDING) != 4) { + rval = XEVNT_CKY; + free(cookiebuf); + break; + } else { + cookie = ntohl(*cookiebuf); + free(cookiebuf); + } } else { rval = XEVNT_CKY; break; @@ -3914,7 +3926,7 @@ crypto_setup(void) rand_file); exit (-1); } - get_systime(&seed); + arc4random_buf(&seed, sizeof(l_fp)); RAND_seed(&seed, sizeof(l_fp)); RAND_write_file(rand_file); OpenSSL_add_all_algorithms(); Modified: stable/9/contrib/ntp/ntpd/ntp_proto.c ============================================================================== --- stable/9/contrib/ntp/ntpd/ntp_proto.c Mon Dec 22 19:07:16 2014 (r276072) +++ stable/9/contrib/ntp/ntpd/ntp_proto.c Mon Dec 22 19:08:09 2014 (r276073) @@ -649,6 +649,7 @@ receive( has_mac)) { is_authentic = AUTH_ERROR; sys_badauth++; + return; } else { is_authentic = AUTH_OK; } Modified: stable/9/contrib/ntp/util/ntp-keygen.c ============================================================================== --- stable/9/contrib/ntp/util/ntp-keygen.c Mon Dec 22 19:07:16 2014 (r276072) +++ stable/9/contrib/ntp/util/ntp-keygen.c Mon Dec 22 19:08:09 2014 (r276073) @@ -642,7 +642,7 @@ gen_md5( for (i = 1; i <= MD5KEYS; i++) { for (j = 0; j < 16; j++) { while (1) { - temp = ntp_random() & 0xff; + temp = arc4random() & 0xff; if (temp == '#') continue; if (temp > 0x20 && temp < 0x7f) @@ -675,7 +675,7 @@ gen_rsa( FILE *str; fprintf(stderr, "Generating RSA keys (%d bits)...\n", modulus); - rsa = RSA_generate_key(modulus, 3, cb, "RSA"); + rsa = RSA_generate_key(modulus, 65537, cb, "RSA"); fprintf(stderr, "\n"); if (rsa == NULL) { fprintf(stderr, "RSA generate keys fails\n%s\n", @@ -954,7 +954,7 @@ gen_gqpar( */ fprintf(stderr, "Generating GQ parameters (%d bits)...\n", modulus); - rsa = RSA_generate_key(modulus, 3, cb, "GQ"); + rsa = RSA_generate_key(modulus, 65537, cb, "GQ"); fprintf(stderr, "\n"); if (rsa == NULL) { fprintf(stderr, "RSA generate keys fails\n%s\n", From owner-svn-src-all@FreeBSD.ORG Mon Dec 22 19:08:14 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 228A8CDE; Mon, 22 Dec 2014 19:08:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C8AE71B96; Mon, 22 Dec 2014 19:08:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBMJ8Di2002346; Mon, 22 Dec 2014 19:08:13 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBMJ8CPS002336; Mon, 22 Dec 2014 19:08:12 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201412221908.sBMJ8CPS002336@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 22 Dec 2014 19:08:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r276073 - in stable: 8/contrib/ntp/ntpd 8/contrib/ntp/util 9/contrib/ntp/ntpd 9/contrib/ntp/util X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Dec 2014 19:08:14 -0000 Author: delphij Date: Mon Dec 22 19:08:09 2014 New Revision: 276073 URL: https://svnweb.freebsd.org/changeset/base/276073 Log: MFC r276071: Fix multiple ntp vulnerabilities. Reviewed by: roberto (earlier revision), philip Security: CVE-2014-9293, CVE-2014-9294 Security: CVE-2014-9295, CVE-2014-9296 Security: FreeBSD-SA-14:31.ntp Modified: stable/8/contrib/ntp/ntpd/ntp_config.c stable/8/contrib/ntp/ntpd/ntp_control.c stable/8/contrib/ntp/ntpd/ntp_crypto.c stable/8/contrib/ntp/ntpd/ntp_proto.c stable/8/contrib/ntp/util/ntp-keygen.c Directory Properties: stable/8/contrib/ntp/ (props changed) Changes in other areas also in this revision: Modified: stable/9/contrib/ntp/ntpd/ntp_config.c stable/9/contrib/ntp/ntpd/ntp_control.c stable/9/contrib/ntp/ntpd/ntp_crypto.c stable/9/contrib/ntp/ntpd/ntp_proto.c stable/9/contrib/ntp/util/ntp-keygen.c Directory Properties: stable/9/contrib/ntp/ (props changed) Modified: stable/8/contrib/ntp/ntpd/ntp_config.c ============================================================================== --- stable/8/contrib/ntp/ntpd/ntp_config.c Mon Dec 22 19:07:16 2014 (r276072) +++ stable/8/contrib/ntp/ntpd/ntp_config.c Mon Dec 22 19:08:09 2014 (r276073) @@ -1887,7 +1887,7 @@ getconfig( for (i = 0; i < 8; i++) for (j = 1; j < 100; ++j) { - rankey[i] = (char) (ntp_random() & 0xff); + rankey[i] = (char) (arc4random() & 0xff); if (rankey[i] != 0) break; } rankey[8] = 0; Modified: stable/8/contrib/ntp/ntpd/ntp_control.c ============================================================================== --- stable/8/contrib/ntp/ntpd/ntp_control.c Mon Dec 22 19:07:16 2014 (r276072) +++ stable/8/contrib/ntp/ntpd/ntp_control.c Mon Dec 22 19:08:09 2014 (r276073) @@ -24,6 +24,10 @@ #include #include +#ifndef MIN +#define MIN(a, b) (((a) <= (b)) ? (a) : (b)) +#endif + /* * Structure to hold request procedure information */ @@ -893,6 +897,7 @@ ctl_putdata( ) { int overhead; + unsigned int currentlen; overhead = 0; if (!bin) { @@ -916,12 +921,22 @@ ctl_putdata( /* * Save room for trailing junk */ - if (dlen + overhead + datapt > dataend) { + while (dlen + overhead + datapt > dataend) { /* * Not enough room in this one, flush it out. */ + currentlen = MIN(dlen, dataend - datapt); + + memcpy(datapt, dp, currentlen); + + datapt += currentlen; + dp += currentlen; + dlen -= currentlen; + datalinelen += currentlen; + ctl_flushpkt(CTL_MORE); } + memmove((char *)datapt, dp, (unsigned)dlen); datapt += dlen; datalinelen += dlen; Modified: stable/8/contrib/ntp/ntpd/ntp_crypto.c ============================================================================== --- stable/8/contrib/ntp/ntpd/ntp_crypto.c Mon Dec 22 19:07:16 2014 (r276072) +++ stable/8/contrib/ntp/ntpd/ntp_crypto.c Mon Dec 22 19:08:09 2014 (r276073) @@ -864,12 +864,24 @@ crypto_recv( * errors. */ if (vallen == (u_int) EVP_PKEY_size(host_pkey)) { - RSA_private_decrypt(vallen, + u_int32 *cookiebuf = malloc( + RSA_size(host_pkey->pkey.rsa)); + if (cookiebuf == NULL) { + rval = XEVNT_CKY; + break; + } + if (RSA_private_decrypt(vallen, (u_char *)ep->pkt, - (u_char *)&temp32, + (u_char *)cookiebuf, host_pkey->pkey.rsa, - RSA_PKCS1_OAEP_PADDING); - cookie = ntohl(temp32); + RSA_PKCS1_OAEP_PADDING) != 4) { + rval = XEVNT_CKY; + free(cookiebuf); + break; + } else { + cookie = ntohl(*cookiebuf); + free(cookiebuf); + } } else { rval = XEVNT_CKY; break; @@ -3914,7 +3926,7 @@ crypto_setup(void) rand_file); exit (-1); } - get_systime(&seed); + arc4random_buf(&seed, sizeof(l_fp)); RAND_seed(&seed, sizeof(l_fp)); RAND_write_file(rand_file); OpenSSL_add_all_algorithms(); Modified: stable/8/contrib/ntp/ntpd/ntp_proto.c ============================================================================== --- stable/8/contrib/ntp/ntpd/ntp_proto.c Mon Dec 22 19:07:16 2014 (r276072) +++ stable/8/contrib/ntp/ntpd/ntp_proto.c Mon Dec 22 19:08:09 2014 (r276073) @@ -649,6 +649,7 @@ receive( has_mac)) { is_authentic = AUTH_ERROR; sys_badauth++; + return; } else { is_authentic = AUTH_OK; } Modified: stable/8/contrib/ntp/util/ntp-keygen.c ============================================================================== --- stable/8/contrib/ntp/util/ntp-keygen.c Mon Dec 22 19:07:16 2014 (r276072) +++ stable/8/contrib/ntp/util/ntp-keygen.c Mon Dec 22 19:08:09 2014 (r276073) @@ -642,7 +642,7 @@ gen_md5( for (i = 1; i <= MD5KEYS; i++) { for (j = 0; j < 16; j++) { while (1) { - temp = ntp_random() & 0xff; + temp = arc4random() & 0xff; if (temp == '#') continue; if (temp > 0x20 && temp < 0x7f) @@ -675,7 +675,7 @@ gen_rsa( FILE *str; fprintf(stderr, "Generating RSA keys (%d bits)...\n", modulus); - rsa = RSA_generate_key(modulus, 3, cb, "RSA"); + rsa = RSA_generate_key(modulus, 65537, cb, "RSA"); fprintf(stderr, "\n"); if (rsa == NULL) { fprintf(stderr, "RSA generate keys fails\n%s\n", @@ -954,7 +954,7 @@ gen_gqpar( */ fprintf(stderr, "Generating GQ parameters (%d bits)...\n", modulus); - rsa = RSA_generate_key(modulus, 3, cb, "GQ"); + rsa = RSA_generate_key(modulus, 65537, cb, "GQ"); fprintf(stderr, "\n"); if (rsa == NULL) { fprintf(stderr, "RSA generate keys fails\n%s\n", From owner-svn-src-all@FreeBSD.ORG Mon Dec 22 19:10:12 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 80E46EDD; Mon, 22 Dec 2014 19:10:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6D2BD1BD9; Mon, 22 Dec 2014 19:10:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBMJACkh002769; Mon, 22 Dec 2014 19:10:12 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBMJACYw002768; Mon, 22 Dec 2014 19:10:12 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201412221910.sBMJACYw002768@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 22 Dec 2014 19:10:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276074 - head/sys/boot/i386/libi386 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Dec 2014 19:10:12 -0000 Author: imp Date: Mon Dec 22 19:10:11 2014 New Revision: 276074 URL: https://svnweb.freebsd.org/changeset/base/276074 Log: Make this compile when TERM_EMU is not defined. Modified: head/sys/boot/i386/libi386/spinconsole.c Modified: head/sys/boot/i386/libi386/spinconsole.c ============================================================================== --- head/sys/boot/i386/libi386/spinconsole.c Mon Dec 22 19:08:09 2014 (r276073) +++ head/sys/boot/i386/libi386/spinconsole.c Mon Dec 22 19:10:11 2014 (r276074) @@ -86,9 +86,11 @@ spinc_putchar(int c) if (now < (lasttime + 1)) return; lasttime = now; +#ifdef TERM_EMU get_pos(&curx, &cury); if (curx > 0) curs_move(&curx, &cury, curx - 1, cury); +#endif vidc_biosputchar((char)tw_chars); tw_chars = (tw_chars >> 8) | ((tw_chars & (unsigned long)0xFF) << 24); } From owner-svn-src-all@FreeBSD.ORG Mon Dec 22 19:10:22 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 20F56A0; Mon, 22 Dec 2014 19:10:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0DB151BE0; Mon, 22 Dec 2014 19:10:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBMJALSp002826; Mon, 22 Dec 2014 19:10:21 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBMJALXP002825; Mon, 22 Dec 2014 19:10:21 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201412221910.sBMJALXP002825@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 22 Dec 2014 19:10:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276075 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Dec 2014 19:10:22 -0000 Author: imp Date: Mon Dec 22 19:10:21 2014 New Revision: 276075 URL: https://svnweb.freebsd.org/changeset/base/276075 Log: Don't require ${SYSDIR}/../COPYRIGHT to exist. Fall back to the current date if we can't find it. MFC After: 2 weeks Modified: head/sys/conf/newvers.sh Modified: head/sys/conf/newvers.sh ============================================================================== --- head/sys/conf/newvers.sh Mon Dec 22 19:10:11 2014 (r276074) +++ head/sys/conf/newvers.sh Mon Dec 22 19:10:21 2014 (r276075) @@ -52,7 +52,11 @@ else fi b=share/examples/etc/bsd-style-copyright -year=$(sed -Ee '/^Copyright .* The FreeBSD Project/!d;s/^.*1992-([0-9]*) .*$/\1/g' ${SYSDIR}/../COPYRIGHT) +if [ -r "${SYSDIR}/../COPYRIGHT" ]; then + year=$(sed -Ee '/^Copyright .* The FreeBSD Project/!d;s/^.*1992-([0-9]*) .*$/\1/g' ${SYSDIR}/../COPYRIGHT) +else + year=$(date +%Y) +fi # look for copyright template for bsd_copyright in ../$b ../../$b ../../../$b /usr/src/$b /usr/$b do From owner-svn-src-all@FreeBSD.ORG Mon Dec 22 19:53:59 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DD081C7A; Mon, 22 Dec 2014 19:53:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C6ABA3BE8; Mon, 22 Dec 2014 19:53:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBMJrwOg025479; Mon, 22 Dec 2014 19:53:58 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBMJruwk025467; Mon, 22 Dec 2014 19:53:56 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201412221953.sBMJruwk025467@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 22 Dec 2014 19:53:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276076 - in stable/10/sys: amd64/amd64 i386/i386 i386/include i386/xen pc98/pc98 x86/x86 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Dec 2014 19:53:59 -0000 Author: jhb Date: Mon Dec 22 19:53:55 2014 New Revision: 276076 URL: https://svnweb.freebsd.org/changeset/base/276076 Log: MFC 271405,271408,271409,272658: MFamd64: Use initializecpu() to set various model-specific registers on AP startup and AP resume (it was already used for BSP startup and BSP resume). Modified: stable/10/sys/amd64/amd64/mp_machdep.c stable/10/sys/i386/i386/initcpu.c stable/10/sys/i386/i386/machdep.c stable/10/sys/i386/i386/mp_machdep.c stable/10/sys/i386/include/md_var.h stable/10/sys/i386/xen/mp_machdep.c stable/10/sys/pc98/pc98/machdep.c stable/10/sys/x86/x86/identcpu.c stable/10/sys/x86/x86/local_apic.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/amd64/mp_machdep.c ============================================================================== --- stable/10/sys/amd64/amd64/mp_machdep.c Mon Dec 22 19:10:21 2014 (r276075) +++ stable/10/sys/amd64/amd64/mp_machdep.c Mon Dec 22 19:53:55 2014 (r276076) @@ -723,7 +723,7 @@ init_secondary(void) /* set up CPU registers and state */ cpu_setregs(); - /* set up SSE/NX registers */ + /* set up SSE/NX */ initializecpu(); /* set up FPU state on the AP */ Modified: stable/10/sys/i386/i386/initcpu.c ============================================================================== --- stable/10/sys/i386/i386/initcpu.c Mon Dec 22 19:10:21 2014 (r276075) +++ stable/10/sys/i386/i386/initcpu.c Mon Dec 22 19:53:55 2014 (r276076) @@ -59,6 +59,12 @@ static void init_i486_on_386(void); static void init_6x86(void); #endif /* I486_CPU */ +#if defined(I586_CPU) && defined(CPU_WT_ALLOC) +static void enable_K5_wt_alloc(void); +static void enable_K6_wt_alloc(void); +static void enable_K6_2_wt_alloc(void); +#endif + #ifdef I686_CPU static void init_6x86MX(void); static void init_ppro(void); @@ -451,7 +457,7 @@ init_winchip(void) fcr &= ~(1ULL << 11); /* - * Additioanlly, set EBRPRED, E2MMX and EAMD3D for WinChip 2 and 3. + * Additionally, set EBRPRED, E2MMX and EAMD3D for WinChip 2 and 3. */ if (CPUID_TO_MODEL(cpu_id) >= 8) fcr |= (1 << 12) | (1 << 19) | (1 << 20); @@ -527,6 +533,8 @@ init_6x86MX(void) intr_restore(saveintr); } +static int ppro_apic_used = -1; + static void init_ppro(void) { @@ -535,9 +543,29 @@ init_ppro(void) /* * Local APIC should be disabled if it is not going to be used. */ - apicbase = rdmsr(MSR_APICBASE); - apicbase &= ~APICBASE_ENABLED; - wrmsr(MSR_APICBASE, apicbase); + if (ppro_apic_used != 1) { + apicbase = rdmsr(MSR_APICBASE); + apicbase &= ~APICBASE_ENABLED; + wrmsr(MSR_APICBASE, apicbase); + ppro_apic_used = 0; + } +} + +/* + * If the local APIC is going to be used after being disabled above, + * re-enable it and don't disable it in the future. + */ +void +ppro_reenable_apic(void) +{ + u_int64_t apicbase; + + if (ppro_apic_used == 0) { + apicbase = rdmsr(MSR_APICBASE); + apicbase |= APICBASE_ENABLED; + wrmsr(MSR_APICBASE, apicbase); + ppro_apic_used = 1; + } } /* @@ -646,20 +674,6 @@ init_transmeta(void) } #endif -/* - * Initialize CR4 (Control register 4) to enable SSE instructions. - */ -void -enable_sse(void) -{ -#if defined(CPU_ENABLE_SSE) - if ((cpu_feature & CPUID_XMM) && (cpu_feature & CPUID_FXSR)) { - load_cr4(rcr4() | CR4_FXSR | CR4_XMM); - cpu_fxsr = hw_instruction_sse = 1; - } -#endif -} - extern int elf32_nxstack; void @@ -692,6 +706,27 @@ initializecpu(void) #ifdef I586_CPU case CPU_586: switch (cpu_vendor_id) { + case CPU_VENDOR_AMD: +#ifdef CPU_WT_ALLOC + if (((cpu_id & 0x0f0) > 0) && + ((cpu_id & 0x0f0) < 0x60) && + ((cpu_id & 0x00f) > 3)) + enable_K5_wt_alloc(); + else if (((cpu_id & 0x0f0) > 0x80) || + (((cpu_id & 0x0f0) == 0x80) && + (cpu_id & 0x00f) > 0x07)) + enable_K6_2_wt_alloc(); + else if ((cpu_id & 0x0f0) > 0x50) + enable_K6_wt_alloc(); +#endif + if ((cpu_id & 0xf0) == 0xa0) + /* + * Make sure the TSC runs through + * suspension, otherwise we can't use + * it as timecounter + */ + wrmsr(0x1900, rdmsr(0x1900) | 0x20ULL); + break; case CPU_VENDOR_CENTAUR: init_winchip(); break; @@ -762,7 +797,17 @@ initializecpu(void) default: break; } - enable_sse(); +#if defined(CPU_ENABLE_SSE) + if ((cpu_feature & CPUID_XMM) && (cpu_feature & CPUID_FXSR)) { + load_cr4(rcr4() | CR4_FXSR | CR4_XMM); + cpu_fxsr = hw_instruction_sse = 1; + } +#endif +} + +void +initializecpucache(void) +{ /* * CPUID with %eax = 1, %ebx returns @@ -839,7 +884,7 @@ initializecpu(void) * Enable write allocate feature of AMD processors. * Following two functions require the Maxmem variable being set. */ -void +static void enable_K5_wt_alloc(void) { u_int64_t msr; @@ -885,7 +930,7 @@ enable_K5_wt_alloc(void) } } -void +static void enable_K6_wt_alloc(void) { quad_t size; @@ -945,7 +990,7 @@ enable_K6_wt_alloc(void) intr_restore(saveintr); } -void +static void enable_K6_2_wt_alloc(void) { quad_t size; Modified: stable/10/sys/i386/i386/machdep.c ============================================================================== --- stable/10/sys/i386/i386/machdep.c Mon Dec 22 19:10:21 2014 (r276075) +++ stable/10/sys/i386/i386/machdep.c Mon Dec 22 19:53:55 2014 (r276076) @@ -2733,6 +2733,7 @@ init386(first) setidt(IDT_GP, &IDTVEC(prot), SDT_SYS386TGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL)); initializecpu(); /* Initialize CPU registers */ + initializecpucache(); /* make an initial tss so cpu can get interrupt stack on syscall! */ /* Note: -16 is so we can grow the trapframe if we came from vm86 */ @@ -3009,6 +3010,7 @@ init386(first) setidt(IDT_GP, &IDTVEC(prot), SDT_SYS386TGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL)); initializecpu(); /* Initialize CPU registers */ + initializecpucache(); /* make an initial tss so cpu can get interrupt stack on syscall! */ /* Note: -16 is so we can grow the trapframe if we came from vm86 */ Modified: stable/10/sys/i386/i386/mp_machdep.c ============================================================================== --- stable/10/sys/i386/i386/mp_machdep.c Mon Dec 22 19:10:21 2014 (r276075) +++ stable/10/sys/i386/i386/mp_machdep.c Mon Dec 22 19:53:55 2014 (r276076) @@ -747,25 +747,15 @@ init_secondary(void) /* set up CPU registers and state */ cpu_setregs(); + /* set up SSE/NX */ + initializecpu(); + /* set up FPU state on the AP */ npxinit(); - /* set up SSE registers */ - enable_sse(); - if (cpu_ops.cpu_init) cpu_ops.cpu_init(); -#ifdef PAE - /* Enable the PTE no-execute bit. */ - if ((amd_feature & AMDID_NX) != 0) { - uint64_t msr; - - msr = rdmsr(MSR_EFER) | EFER_NXE; - wrmsr(MSR_EFER, msr); - } -#endif - /* A quick check from sanity claus */ cpuid = PCPU_GET(cpuid); if (PCPU_GET(apic_id) != lapic_id()) { @@ -1530,6 +1520,7 @@ cpususpend_handler(void) } else { npxresume(&susppcbs[cpu]->sp_fpususpend); pmap_init_pat(); + initializecpu(); PCPU_SET(switchtime, 0); PCPU_SET(switchticks, ticks); Modified: stable/10/sys/i386/include/md_var.h ============================================================================== --- stable/10/sys/i386/include/md_var.h Mon Dec 22 19:10:21 2014 (r276075) +++ stable/10/sys/i386/include/md_var.h Mon Dec 22 19:53:55 2014 (r276076) @@ -99,14 +99,9 @@ void doreti_popl_fs_fault(void) __asm(__ void dump_add_page(vm_paddr_t); void dump_drop_page(vm_paddr_t); void finishidentcpu(void); -#if defined(I586_CPU) && defined(CPU_WT_ALLOC) -void enable_K5_wt_alloc(void); -void enable_K6_wt_alloc(void); -void enable_K6_2_wt_alloc(void); -#endif -void enable_sse(void); void fillw(int /*u_short*/ pat, void *base, size_t cnt); void initializecpu(void); +void initializecpucache(void); void i686_pagezero(void *addr); void sse2_pagezero(void *addr); void init_AMD_Elan_sc520(void); @@ -114,6 +109,7 @@ int is_physical_memory(vm_paddr_t addr); int isa_nmi(int cd); vm_paddr_t kvtop(void *addr); void panicifcpuunsupported(void); +void ppro_reenable_apic(void); void printcpuinfo(void); void setidt(int idx, alias_for_inthand_t *func, int typ, int dpl, int selec); int user_dbreg_trap(void); Modified: stable/10/sys/i386/xen/mp_machdep.c ============================================================================== --- stable/10/sys/i386/xen/mp_machdep.c Mon Dec 22 19:10:21 2014 (r276075) +++ stable/10/sys/i386/xen/mp_machdep.c Mon Dec 22 19:53:55 2014 (r276076) @@ -598,22 +598,13 @@ init_secondary(void) for (addr = 0; addr < NKPT * NBPDR - 1; addr += PAGE_SIZE) invlpg(addr); - /* set up FPU state on the AP */ - npxinit(); #if 0 - - /* set up SSE registers */ - enable_sse(); + /* set up SSE/NX */ + initializecpu(); #endif -#if 0 && defined(PAE) - /* Enable the PTE no-execute bit. */ - if ((amd_feature & AMDID_NX) != 0) { - uint64_t msr; - msr = rdmsr(MSR_EFER) | EFER_NXE; - wrmsr(MSR_EFER, msr); - } -#endif + /* set up FPU state on the AP */ + npxinit(); #if 0 /* A quick check from sanity claus */ if (PCPU_GET(apic_id) != lapic_id()) { Modified: stable/10/sys/pc98/pc98/machdep.c ============================================================================== --- stable/10/sys/pc98/pc98/machdep.c Mon Dec 22 19:10:21 2014 (r276075) +++ stable/10/sys/pc98/pc98/machdep.c Mon Dec 22 19:53:55 2014 (r276076) @@ -2310,6 +2310,7 @@ init386(first) setidt(IDT_GP, &IDTVEC(prot), SDT_SYS386TGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL)); initializecpu(); /* Initialize CPU registers */ + initializecpucache(); /* make an initial tss so cpu can get interrupt stack on syscall! */ /* Note: -16 is so we can grow the trapframe if we came from vm86 */ Modified: stable/10/sys/x86/x86/identcpu.c ============================================================================== --- stable/10/sys/x86/x86/identcpu.c Mon Dec 22 19:10:21 2014 (r276075) +++ stable/10/sys/x86/x86/identcpu.c Mon Dec 22 19:53:55 2014 (r276076) @@ -405,30 +405,11 @@ printcpuinfo(void) break; case 0x5a0: strcat(cpu_model, "Geode LX"); - /* - * Make sure the TSC runs through suspension, - * otherwise we can't use it as timecounter - */ - wrmsr(0x1900, rdmsr(0x1900) | 0x20ULL); break; default: strcat(cpu_model, "Unknown"); break; } -#if defined(I586_CPU) && defined(CPU_WT_ALLOC) - if ((cpu_id & 0xf00) == 0x500) { - if (((cpu_id & 0x0f0) > 0) - && ((cpu_id & 0x0f0) < 0x60) - && ((cpu_id & 0x00f) > 3)) - enable_K5_wt_alloc(); - else if (((cpu_id & 0x0f0) > 0x80) - || (((cpu_id & 0x0f0) == 0x80) - && (cpu_id & 0x00f) > 0x07)) - enable_K6_2_wt_alloc(); - else if ((cpu_id & 0x0f0) > 0x50) - enable_K6_wt_alloc(); - } -#endif #else if ((cpu_id & 0xf00) == 0xf00) strcat(cpu_model, "AMD64 Processor"); Modified: stable/10/sys/x86/x86/local_apic.c ============================================================================== --- stable/10/sys/x86/x86/local_apic.c Mon Dec 22 19:10:21 2014 (r276075) +++ stable/10/sys/x86/x86/local_apic.c Mon Dec 22 19:53:55 2014 (r276076) @@ -56,7 +56,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include @@ -1264,9 +1263,6 @@ static void apic_init(void *dummy __unused) { struct apic_enumerator *enumerator; -#ifndef __amd64__ - uint64_t apic_base; -#endif int retval, best; /* We only support built in local APICs. */ @@ -1308,12 +1304,7 @@ apic_init(void *dummy __unused) * CPUs during early startup. We need to turn the local APIC back * on on such CPUs now. */ - if (cpu == CPU_686 && cpu_vendor_id == CPU_VENDOR_INTEL && - (cpu_id & 0xff0) == 0x610) { - apic_base = rdmsr(MSR_APICBASE); - apic_base |= APICBASE_ENABLED; - wrmsr(MSR_APICBASE, apic_base); - } + ppro_reenable_apic(); #endif /* Probe the CPU's in the system. */ From owner-svn-src-all@FreeBSD.ORG Mon Dec 22 20:32:03 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3A8DA9A5; Mon, 22 Dec 2014 20:32:03 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 154FCD75; Mon, 22 Dec 2014 20:32:03 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 7CB9AB923; Mon, 22 Dec 2014 15:32:01 -0500 (EST) From: John Baldwin To: src-committers@freebsd.org Subject: Re: svn commit: r276065 - head/sys/dev/ipmi Date: Mon, 22 Dec 2014 12:19:32 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20140415; KDE/4.5.5; amd64; ; ) References: <201412221653.sBMGr5uU035622@svn.freebsd.org> In-Reply-To: <201412221653.sBMGr5uU035622@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201412221219.32916.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 22 Dec 2014 15:32:01 -0500 (EST) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Dec 2014 20:32:03 -0000 On Monday, December 22, 2014 11:53:05 am John Baldwin wrote: > Author: jhb > Date: Mon Dec 22 16:53:04 2014 > New Revision: 276065 > URL: https://svnweb.freebsd.org/changeset/base/276065 > > Log: > Explicitly treat timeouts when waiting for IBF or OBF to change state as an > error. This fixes occasional hangs in the IPMI kcs thread when using > ipmitool locally. In particular, the ipmi0: kcs thread would run at 100% CPU. With this fix in place I know see a KCS error reported in dmesg and the driver recovers allowing future requests to complete ok. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Dec 22 20:32:06 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B8D2EADB; Mon, 22 Dec 2014 20:32:06 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 918FED79; Mon, 22 Dec 2014 20:32:06 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 8D645B97B; Mon, 22 Dec 2014 15:32:05 -0500 (EST) From: John Baldwin To: Rui Paulo Subject: Re: svn commit: r276008 - in head/sys: kern sys Date: Mon, 22 Dec 2014 14:17:42 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20140415; KDE/4.5.5; amd64; ; ) References: <201412211332.sBLDW8VC030548@svn.freebsd.org> <201412220940.02509.jhb@freebsd.org> <08A2ABA0-C982-46BC-B309-3C23B8D277B9@me.com> In-Reply-To: <08A2ABA0-C982-46BC-B309-3C23B8D277B9@me.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Message-Id: <201412221417.42894.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 22 Dec 2014 15:32:05 -0500 (EST) Cc: Konstantin Belousov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Andriy Gapon X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Dec 2014 20:32:06 -0000 On Monday, December 22, 2014 1:29:38 pm Rui Paulo wrote: > On Dec 22, 2014, at 06:40, John Baldwin wrote: > > Is there something specific to core dumps that makes vn_fullpath() more > > useful to have working before a process tries to open the core? (As > > compared to other newly-created files) > > Yes: the ability to provide the full path to userland when a core dump file is generated. Can you be more specific? Are we printing the path on the console after destroying the generated path? Is it being written into a note in the core itself (but only having the vnode of the core file available and not the generated path)? -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Dec 22 20:32:30 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 57587C17; Mon, 22 Dec 2014 20:32:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3EEEDD83; Mon, 22 Dec 2014 20:32:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBMKWUMq044602; Mon, 22 Dec 2014 20:32:30 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBMKWOE0044576; Mon, 22 Dec 2014 20:32:24 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201412222032.sBMKWOE0044576@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 22 Dec 2014 20:32:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r276077 - in vendor/elftoolchain/dist: . ar brandelf common elfcopy libdwarf libelf libelftc mk nm readelf strings test/ar test/ar/plugin test/elfcopy test/elfcopy/plugin test/elfcopy/t... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Dec 2014 20:32:30 -0000 Author: emaste Date: Mon Dec 22 20:32:23 2014 New Revision: 276077 URL: https://svnweb.freebsd.org/changeset/base/276077 Log: Import elftoolchain rev 3130 From svn.code.sf.net/p/elftoolchain/code/trunk Added: vendor/elftoolchain/dist/ar/os.Linux.mk (contents, props changed) vendor/elftoolchain/dist/libdwarf/dwarf_attroffset.3 (contents, props changed) vendor/elftoolchain/dist/libdwarf/dwarf_get_die_infotypes_flag.3 (contents, props changed) vendor/elftoolchain/dist/libdwarf/dwarf_get_section_max_offsets.3 (contents, props changed) vendor/elftoolchain/dist/libdwarf/dwarf_next_types_section.3 (contents, props changed) vendor/elftoolchain/dist/libdwarf/dwarf_sections.c (contents, props changed) vendor/elftoolchain/dist/mk/elftoolchain.tetbase.mk (contents, props changed) vendor/elftoolchain/dist/test/elfcopy/tc/strip-empty-1/ vendor/elftoolchain/dist/test/elfcopy/tc/strip-empty-1/in/ vendor/elftoolchain/dist/test/elfcopy/tc/strip-empty-1/in/strip-empty-1.in.shar vendor/elftoolchain/dist/test/elfcopy/tc/strip-empty-1/out/ vendor/elftoolchain/dist/test/elfcopy/tc/strip-empty-1/out/strip-empty-1.out.shar vendor/elftoolchain/dist/test/elfcopy/tc/strip-empty-1/strip-empty-1.err vendor/elftoolchain/dist/test/elfcopy/tc/strip-empty-1/strip-empty-1.eval vendor/elftoolchain/dist/test/elfcopy/tc/strip-empty-1/strip-empty-1.out vendor/elftoolchain/dist/test/elfcopy/tc/strip-empty-1/strip-empty-1.sh (contents, props changed) vendor/elftoolchain/dist/test/libdwarf/ts/common/die_traverse2.c (contents, props changed) vendor/elftoolchain/dist/test/libdwarf/ts/common/object/ld_symver.o-64-g1.gz (contents, props changed) vendor/elftoolchain/dist/test/libdwarf/ts/dwarf_attrlist/ld_symver.o-64-g1.xml.gz (contents, props changed) vendor/elftoolchain/dist/test/libdwarf/ts/dwarf_die_query/ld_symver.o-64-g1.xml.gz (contents, props changed) vendor/elftoolchain/dist/test/libdwarf/ts/dwarf_form/ld_symver.o-64-g1.xml.gz (contents, props changed) vendor/elftoolchain/dist/test/libdwarf/ts/dwarf_next_cu_header/ld_symver.o-64-g1.xml.gz (contents, props changed) Modified: vendor/elftoolchain/dist/INSTALL vendor/elftoolchain/dist/Makefile vendor/elftoolchain/dist/ar/Makefile vendor/elftoolchain/dist/ar/acpyacc.y vendor/elftoolchain/dist/ar/read.c vendor/elftoolchain/dist/ar/write.c vendor/elftoolchain/dist/brandelf/brandelf.1 vendor/elftoolchain/dist/brandelf/brandelf.c vendor/elftoolchain/dist/common/Makefile vendor/elftoolchain/dist/common/elfdefinitions.h vendor/elftoolchain/dist/elfcopy/archive.c vendor/elftoolchain/dist/elfcopy/main.c vendor/elftoolchain/dist/elfcopy/sections.c vendor/elftoolchain/dist/elfcopy/segments.c vendor/elftoolchain/dist/elfcopy/symbols.c vendor/elftoolchain/dist/libdwarf/Makefile vendor/elftoolchain/dist/libdwarf/Version.map vendor/elftoolchain/dist/libdwarf/_libdwarf.h vendor/elftoolchain/dist/libdwarf/dwarf.3 vendor/elftoolchain/dist/libdwarf/dwarf.h vendor/elftoolchain/dist/libdwarf/dwarf_attr.3 vendor/elftoolchain/dist/libdwarf/dwarf_attr.c vendor/elftoolchain/dist/libdwarf/dwarf_attrval.c vendor/elftoolchain/dist/libdwarf/dwarf_attrval_signed.3 vendor/elftoolchain/dist/libdwarf/dwarf_child.3 vendor/elftoolchain/dist/libdwarf/dwarf_cu.c vendor/elftoolchain/dist/libdwarf/dwarf_die.c vendor/elftoolchain/dist/libdwarf/dwarf_dieoffset.3 vendor/elftoolchain/dist/libdwarf/dwarf_dump.c vendor/elftoolchain/dist/libdwarf/dwarf_errmsg.c vendor/elftoolchain/dist/libdwarf/dwarf_frame.c vendor/elftoolchain/dist/libdwarf/dwarf_highpc.3 vendor/elftoolchain/dist/libdwarf/dwarf_lineno.c vendor/elftoolchain/dist/libdwarf/dwarf_loclist.c vendor/elftoolchain/dist/libdwarf/dwarf_loclist_from_expr.3 vendor/elftoolchain/dist/libdwarf/dwarf_next_cu_header.3 vendor/elftoolchain/dist/libdwarf/dwarf_ranges.c vendor/elftoolchain/dist/libdwarf/libdwarf.h vendor/elftoolchain/dist/libdwarf/libdwarf_arange.c vendor/elftoolchain/dist/libdwarf/libdwarf_attr.c vendor/elftoolchain/dist/libdwarf/libdwarf_die.c vendor/elftoolchain/dist/libdwarf/libdwarf_frame.c vendor/elftoolchain/dist/libdwarf/libdwarf_info.c vendor/elftoolchain/dist/libdwarf/libdwarf_init.c vendor/elftoolchain/dist/libdwarf/libdwarf_lineno.c vendor/elftoolchain/dist/libdwarf/libdwarf_loc.c vendor/elftoolchain/dist/libdwarf/libdwarf_loclist.c vendor/elftoolchain/dist/libdwarf/libdwarf_nametbl.c vendor/elftoolchain/dist/libdwarf/libdwarf_sections.c vendor/elftoolchain/dist/libelf/_libelf.h vendor/elftoolchain/dist/libelf/_libelf_ar.h vendor/elftoolchain/dist/libelf/elf.3 vendor/elftoolchain/dist/libelf/elf_data.c vendor/elftoolchain/dist/libelf/elf_errmsg.c vendor/elftoolchain/dist/libelf/elf_flag.c vendor/elftoolchain/dist/libelf/elf_memory.c vendor/elftoolchain/dist/libelf/elf_next.c vendor/elftoolchain/dist/libelf/elf_open.c vendor/elftoolchain/dist/libelf/elf_rand.c vendor/elftoolchain/dist/libelf/elf_rawfile.c vendor/elftoolchain/dist/libelf/elf_scn.c vendor/elftoolchain/dist/libelf/elf_strptr.c vendor/elftoolchain/dist/libelf/elf_update.c vendor/elftoolchain/dist/libelf/gelf_cap.c vendor/elftoolchain/dist/libelf/gelf_dyn.c vendor/elftoolchain/dist/libelf/gelf_move.c vendor/elftoolchain/dist/libelf/gelf_rel.c vendor/elftoolchain/dist/libelf/gelf_rela.c vendor/elftoolchain/dist/libelf/gelf_sym.c vendor/elftoolchain/dist/libelf/gelf_syminfo.c vendor/elftoolchain/dist/libelf/gelf_symshndx.c vendor/elftoolchain/dist/libelf/libelf.h vendor/elftoolchain/dist/libelf/libelf_align.c vendor/elftoolchain/dist/libelf/libelf_ar.c vendor/elftoolchain/dist/libelf/libelf_ar_util.c vendor/elftoolchain/dist/libelf/libelf_checksum.c vendor/elftoolchain/dist/libelf/libelf_convert.m4 vendor/elftoolchain/dist/libelf/libelf_data.c vendor/elftoolchain/dist/libelf/libelf_ehdr.c vendor/elftoolchain/dist/libelf/libelf_extended.c vendor/elftoolchain/dist/libelf/libelf_memory.c vendor/elftoolchain/dist/libelf/libelf_open.c vendor/elftoolchain/dist/libelf/libelf_phdr.c vendor/elftoolchain/dist/libelf/libelf_xlate.c vendor/elftoolchain/dist/libelftc/elftc_copyfile.c vendor/elftoolchain/dist/libelftc/elftc_demangle.c vendor/elftoolchain/dist/libelftc/libelftc.h vendor/elftoolchain/dist/libelftc/libelftc_dem_gnu3.c vendor/elftoolchain/dist/mk/elftoolchain.lib.mk vendor/elftoolchain/dist/mk/elftoolchain.os.mk vendor/elftoolchain/dist/mk/elftoolchain.prog.mk vendor/elftoolchain/dist/mk/elftoolchain.subdir.mk vendor/elftoolchain/dist/mk/os.Linux.mk vendor/elftoolchain/dist/mk/os.NetBSD.mk vendor/elftoolchain/dist/nm/nm.c vendor/elftoolchain/dist/readelf/readelf.1 vendor/elftoolchain/dist/readelf/readelf.c vendor/elftoolchain/dist/strings/strings.c vendor/elftoolchain/dist/test/ar/Makefile vendor/elftoolchain/dist/test/ar/plugin/Makefile vendor/elftoolchain/dist/test/ar/plugin/Makefile.ardiff vendor/elftoolchain/dist/test/ar/plugin/ardiff.c vendor/elftoolchain/dist/test/ar/plugin/teraser.c vendor/elftoolchain/dist/test/elfcopy/Makefile vendor/elftoolchain/dist/test/elfcopy/plugin/Makefile vendor/elftoolchain/dist/test/elfcopy/plugin/Makefile.ardiff vendor/elftoolchain/dist/test/elfcopy/plugin/ardiff.c vendor/elftoolchain/dist/test/elfcopy/plugin/teraser.c vendor/elftoolchain/dist/test/elfdump/Makefile vendor/elftoolchain/dist/test/libdwarf/Makefile vendor/elftoolchain/dist/test/libdwarf/ts/Makefile vendor/elftoolchain/dist/test/libdwarf/ts/Makefile.tset vendor/elftoolchain/dist/test/libdwarf/ts/README vendor/elftoolchain/dist/test/libdwarf/ts/common/driver.h vendor/elftoolchain/dist/test/libdwarf/ts/dwarf_attrlist/Makefile vendor/elftoolchain/dist/test/libdwarf/ts/dwarf_attrlist/dt32-g1.xml.gz vendor/elftoolchain/dist/test/libdwarf/ts/dwarf_attrlist/dt64-g1.xml.gz vendor/elftoolchain/dist/test/libdwarf/ts/dwarf_attrlist/dwarf_attrlist.c vendor/elftoolchain/dist/test/libdwarf/ts/dwarf_attrlist/ec32-g1.xml.gz vendor/elftoolchain/dist/test/libdwarf/ts/dwarf_attrlist/ec64-g1.xml.gz vendor/elftoolchain/dist/test/libdwarf/ts/dwarf_die_query/Makefile vendor/elftoolchain/dist/test/libdwarf/ts/dwarf_die_query/dt32-g1.xml.gz vendor/elftoolchain/dist/test/libdwarf/ts/dwarf_die_query/dt64-g1.xml.gz vendor/elftoolchain/dist/test/libdwarf/ts/dwarf_die_query/dto64-g1.xml.gz vendor/elftoolchain/dist/test/libdwarf/ts/dwarf_die_query/dwarf_die_query.c vendor/elftoolchain/dist/test/libdwarf/ts/dwarf_die_query/ec32-g1.xml.gz vendor/elftoolchain/dist/test/libdwarf/ts/dwarf_die_query/ec64-g1.xml.gz vendor/elftoolchain/dist/test/libdwarf/ts/dwarf_form/Makefile vendor/elftoolchain/dist/test/libdwarf/ts/dwarf_form/dt32-g1.xml.gz vendor/elftoolchain/dist/test/libdwarf/ts/dwarf_form/dt64-g1.xml.gz vendor/elftoolchain/dist/test/libdwarf/ts/dwarf_form/dwarf_form.c vendor/elftoolchain/dist/test/libdwarf/ts/dwarf_form/ec32-g1.xml.gz vendor/elftoolchain/dist/test/libdwarf/ts/dwarf_form/ec64-g1.xml.gz vendor/elftoolchain/dist/test/libdwarf/ts/dwarf_next_cu_header/Makefile vendor/elftoolchain/dist/test/libdwarf/ts/dwarf_next_cu_header/dt32-g1.xml.gz vendor/elftoolchain/dist/test/libdwarf/ts/dwarf_next_cu_header/dt64-g1.xml.gz vendor/elftoolchain/dist/test/libdwarf/ts/dwarf_next_cu_header/dwarf_next_cu_header.c vendor/elftoolchain/dist/test/libdwarf/ts/dwarf_next_cu_header/ec32-g1.xml.gz vendor/elftoolchain/dist/test/libdwarf/ts/dwarf_next_cu_header/ec64-g1.xml.gz vendor/elftoolchain/dist/test/libelf/Makefile vendor/elftoolchain/dist/test/libelf/tset/Makefile vendor/elftoolchain/dist/test/libelf/tset/elf_update/update.m4 vendor/elftoolchain/dist/test/libelftc/Makefile vendor/elftoolchain/dist/test/libelftc/tset/Makefile vendor/elftoolchain/dist/test/libelftc/tset/Makefile.tset vendor/elftoolchain/dist/test/libelftc/tset/elftc_string_table/string_table.m4 vendor/elftoolchain/dist/test/nm/Makefile vendor/elftoolchain/dist/test/nm/ts/Makefile vendor/elftoolchain/dist/test/tet/Makefile Modified: vendor/elftoolchain/dist/INSTALL ============================================================================== --- vendor/elftoolchain/dist/INSTALL Mon Dec 22 19:53:55 2014 (r276076) +++ vendor/elftoolchain/dist/INSTALL Mon Dec 22 20:32:23 2014 (r276077) @@ -19,6 +19,7 @@ operating systems. NetBSD_ v5.0.2 i386 OpenBSD_ v5.0 i386 Ubuntu_ GNU/Linux 10.04LTS i386 & x86_64 + Ubuntu_ GNU/Linux 12.04LTS i386 & x86_64 ================= ======== ======================= .. _DragonFly BSD: http://www.dragonflybsd.org/ @@ -114,6 +115,26 @@ Prerequisites - Building additional documentation is not currently supported under OpenBSD. +:OpenBSD 5.4: + - The following packages are pre-requisites for building the + sources on OpenBSD 5.4: + + =================== ===================================== + **Package** **Description** + =================== ===================================== + ``libarchive`` An archive access library. + =================== ===================================== + + The following command line may be used to install the necessary + pre-requisites:: + + # pkg_add libarchive + + - The test suites cannot currently be built under OpenBSD. + + - Building additional documentation is not currently supported + under OpenBSD. + :NetBSD 5.0.2: - The core libraries and utilities should build out of the box on a stock install of NetBSD. @@ -174,16 +195,16 @@ Prerequisites % sudo apt-get install pgf -:Ubuntu GNU/Linux 11.10: +:Ubuntu GNU/Linux 12.04: - The following packages are pre-requisites for building the - sources on Ubuntu GNU/Linux 11.10: + sources on Ubuntu GNU/Linux 12.04: =================== ===================================== **Package** **Description** =================== ===================================== ``bison`` Parser generator. + ``build-essential`` Basic build tools. ``flex`` Lexical analyser. - ``gcc`` C compiler. ``libarchive-dev`` Archive access library. ``libexpat1-dev`` An XML processing library. ``m4`` Macro processor. @@ -195,7 +216,7 @@ Prerequisites The following command line may be used to install the necessary pre-requisites:: - % sudo apt-get install bison flex gcc libarchive-dev \ + % sudo apt-get install bison build-essential flex libarchive-dev \ m4 pmake - To build and run the test suite: @@ -210,7 +231,7 @@ Prerequisites % sudo apt-get install libexpat1-dev python-yaml sharutils - Builds of additional documentation are not currently supported - under Ubuntu GNU/Linux 11.10. + under Ubuntu GNU/Linux 12.04. .. _Test Execution Toolkit: http://tetworks.opengroup.org/ .. _OpenGroup: http://www.opengroup.org/ @@ -276,7 +297,7 @@ website`_. .. _project website: http://elftoolchain.sourceforge.net/ -.. $Id: INSTALL 2777 2012-12-12 17:21:36Z jkoshy $ +.. $Id: INSTALL 3020 2014-04-17 15:52:31Z jkoshy $ .. Local Variables: .. mode: rst Modified: vendor/elftoolchain/dist/Makefile ============================================================================== --- vendor/elftoolchain/dist/Makefile Mon Dec 22 19:53:55 2014 (r276076) +++ vendor/elftoolchain/dist/Makefile Mon Dec 22 20:32:23 2014 (r276077) @@ -1,4 +1,4 @@ -# $Id: Makefile 2872 2013-01-07 13:57:54Z jkoshy $ +# $Id: Makefile 3016 2014-04-10 16:01:42Z jkoshy $ TOP= . @@ -15,7 +15,8 @@ SUBDIR += libdwarf SUBDIR += libelftc # Build the tools needed for the rest of the build. -SUBDIR += isa + +# SUBDIR += isa # ('isa' does not build on all platforms yet). # Build tools after the libraries. SUBDIR += addr2line Modified: vendor/elftoolchain/dist/ar/Makefile ============================================================================== --- vendor/elftoolchain/dist/ar/Makefile Mon Dec 22 19:53:55 2014 (r276076) +++ vendor/elftoolchain/dist/ar/Makefile Mon Dec 22 20:32:23 2014 (r276077) @@ -1,4 +1,4 @@ -# $Id: Makefile 2741 2012-12-10 18:47:00Z jkoshy $ +# $Id: Makefile 3107 2014-12-20 08:31:58Z kaiwang27 $ TOP= .. @@ -9,8 +9,8 @@ YSRC= acpyacc.y WARNS?= 5 -DPADD= ${LIBARCHIVE} ${LIBELFTC} ${LIBELF} -LDADD= -larchive -lelftc -lelf +DPADD= ${LIBARCHIVE} ${LIBELFTC} ${LIBELF} ${LIBZ} +LDADD= -larchive -lelftc -lelf -lz CFLAGS+=-I. -I${.CURDIR} Modified: vendor/elftoolchain/dist/ar/acpyacc.y ============================================================================== --- vendor/elftoolchain/dist/ar/acpyacc.y Mon Dec 22 19:53:55 2014 (r276076) +++ vendor/elftoolchain/dist/ar/acpyacc.y Mon Dec 22 20:32:23 2014 (r276077) @@ -253,13 +253,12 @@ arscp_open(char *fname) if ((a = archive_read_new()) == NULL) bsdar_errc(bsdar, 0, "archive_read_new failed"); - archive_read_support_compression_none(a); archive_read_support_format_ar(a); - AC(archive_read_open_file(a, fname, DEF_BLKSZ)); + AC(archive_read_open_filename(a, fname, DEF_BLKSZ)); if ((r = archive_read_next_header(a, &entry))) bsdar_warnc(bsdar, 0, "%s", archive_error_string(a)); AC(archive_read_close(a)); - ACV(archive_read_finish(a)); + ACV(archive_read_free(a)); if (r != ARCHIVE_OK) return; arscp_create(fname, fname); @@ -317,7 +316,7 @@ arscp_create(char *in, char *out) archive_write_set_format_ar_svr4(a); AC(archive_write_open_fd(a, ofd)); AC(archive_write_close(a)); - ACV(archive_write_finish(a)); + ACV(archive_write_free(a)); } /* Override the previous target, if any. */ Added: vendor/elftoolchain/dist/ar/os.Linux.mk ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/elftoolchain/dist/ar/os.Linux.mk Mon Dec 22 20:32:23 2014 (r276077) @@ -0,0 +1,9 @@ +.if ${OS_DISTRIBUTION} == "Ubuntu" +.if ${OS_DISTRIBUTION_VERSION} >= 14 +# Ubuntu Trusty Tahr and later. + +# Use the --nounput option to flex(1), to prevent unused functions from +# being generated. +LFLAGS += --nounput +.endif +.endif Modified: vendor/elftoolchain/dist/ar/read.c ============================================================================== --- vendor/elftoolchain/dist/ar/read.c Mon Dec 22 19:53:55 2014 (r276076) +++ vendor/elftoolchain/dist/ar/read.c Mon Dec 22 20:32:23 2014 (r276077) @@ -39,7 +39,7 @@ #include "ar.h" -ELFTC_VCSID("$Id: read.c 2229 2011-11-27 13:25:37Z jkoshy $"); +ELFTC_VCSID("$Id: read.c 3102 2014-10-29 21:09:01Z jkoshy $"); /* * Handle read modes: 'x', 't' and 'p'. @@ -68,9 +68,8 @@ ar_read_archive(struct bsdar *bsdar, int if ((a = archive_read_new()) == NULL) bsdar_errc(bsdar, 0, "archive_read_new failed"); - archive_read_support_compression_none(a); archive_read_support_format_ar(a); - AC(archive_read_open_file(a, bsdar->filename, DEF_BLKSZ)); + AC(archive_read_open_filename(a, bsdar->filename, DEF_BLKSZ)); out = bsdar->output; @@ -188,5 +187,5 @@ ar_read_archive(struct bsdar *bsdar, int } } AC(archive_read_close(a)); - ACV(archive_read_finish(a)); + ACV(archive_read_free(a)); } Modified: vendor/elftoolchain/dist/ar/write.c ============================================================================== --- vendor/elftoolchain/dist/ar/write.c Mon Dec 22 19:53:55 2014 (r276076) +++ vendor/elftoolchain/dist/ar/write.c Mon Dec 22 20:32:23 2014 (r276077) @@ -41,7 +41,7 @@ #include "ar.h" -ELFTC_VCSID("$Id: write.c 2496 2012-04-24 02:33:40Z jkoshy $"); +ELFTC_VCSID("$Id: write.c 3102 2014-10-29 21:09:01Z jkoshy $"); #define _ARMAG_LEN 8 /* length of the magic string */ #define _ARHDR_LEN 60 /* length of the archive header */ @@ -259,7 +259,6 @@ read_objs(struct bsdar *bsdar, const cha if ((a = archive_read_new()) == NULL) bsdar_errc(bsdar, 0, "archive_read_new failed"); - archive_read_support_compression_none(a); archive_read_support_format_ar(a); AC(archive_read_open_filename(a, archive, DEF_BLKSZ)); for (;;) { @@ -349,7 +348,7 @@ read_objs(struct bsdar *bsdar, const cha TAILQ_INSERT_TAIL(&bsdar->v_obj, obj, objs); } AC(archive_read_close(a)); - ACV(archive_read_finish(a)); + ACV(archive_read_free(a)); } /* @@ -732,7 +731,6 @@ write_objs(struct bsdar *bsdar) archive_write_set_format_ar_bsd(a); else archive_write_set_format_ar_svr4(a); - archive_write_set_compression_none(a); AC(archive_write_open_filename(a, bsdar->filename)); @@ -795,7 +793,7 @@ write_objs(struct bsdar *bsdar) } AC(archive_write_close(a)); - ACV(archive_write_finish(a)); + ACV(archive_write_free(a)); } /* Modified: vendor/elftoolchain/dist/brandelf/brandelf.1 ============================================================================== --- vendor/elftoolchain/dist/brandelf/brandelf.1 Mon Dec 22 19:53:55 2014 (r276076) +++ vendor/elftoolchain/dist/brandelf/brandelf.1 Mon Dec 22 20:32:23 2014 (r276077) @@ -26,9 +26,9 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD: src/usr.bin/brandelf/brandelf.1,v 1.17 2007/03/09 14:36:18 ru Exp $ -.\" $Id: brandelf.1 2245 2011-11-29 08:11:00Z jkoshy $ +.\" $Id: brandelf.1 3101 2014-10-27 22:24:40Z jkoshy $ .\" -.Dd November 29, 2011 +.Dd October 27, 2014 .Dt BRANDELF 1 .Os .Sh NAME @@ -90,7 +90,9 @@ Supported ABIs include and .Dq Li Tru64 . .It Fl v -Turns on verbose output. +This option is accepted for compatibility with other versions of +.Nm , +but is otherwise ignored. .It Fl V | Fl -version Print a version identifier and exit. .El Modified: vendor/elftoolchain/dist/brandelf/brandelf.c ============================================================================== --- vendor/elftoolchain/dist/brandelf/brandelf.c Mon Dec 22 19:53:55 2014 (r276076) +++ vendor/elftoolchain/dist/brandelf/brandelf.c Mon Dec 22 20:32:23 2014 (r276077) @@ -46,7 +46,7 @@ #include "_elftc.h" -ELFTC_VCSID("$Id: brandelf.c 2324 2011-12-12 06:36:27Z jkoshy $"); +ELFTC_VCSID("$Id: brandelf.c 3101 2014-10-27 22:24:40Z jkoshy $"); static int elftype(const char *); static const char *iselftype(int); @@ -96,7 +96,7 @@ main(int argc, char **argv) Elf_Kind kind; int type = ELFOSABI_NONE; int retval = 0; - int ch, change = 0, verbose = 0, force = 0, listed = 0; + int ch, change = 0, force = 0, listed = 0; if (elf_version(EV_CURRENT) == EV_NONE) errx(EXIT_FAILURE, "elf_version error"); @@ -124,7 +124,7 @@ main(int argc, char **argv) listed = 1; break; case 'v': - verbose = 1; + /* This flag is ignored. */ break; case 't': if (force) @@ -256,7 +256,6 @@ Usage: %s [options] file...\n\ -h | --help Print a usage message and exit.\n\ -l List known ELF ABI names.\n\ -t ABI Set the ELF ABI to the value named by \"ABI\".\n\ - -v Be verbose.\n\ -V | --version Print a version identifier and exit.\n" static void Modified: vendor/elftoolchain/dist/common/Makefile ============================================================================== --- vendor/elftoolchain/dist/common/Makefile Mon Dec 22 19:53:55 2014 (r276076) +++ vendor/elftoolchain/dist/common/Makefile Mon Dec 22 20:32:23 2014 (r276077) @@ -1,4 +1,4 @@ -# $Id: Makefile 2606 2012-10-02 17:52:57Z jkoshy $ +# $Id: Makefile 3022 2014-04-17 18:05:58Z jkoshy $ TOP= .. @@ -12,4 +12,7 @@ all depend obj: clean clobber: rm -f ${CLEANFILES} +cleandepend: + rm -f .depend + .include "${TOP}/mk/elftoolchain.inc.mk" Modified: vendor/elftoolchain/dist/common/elfdefinitions.h ============================================================================== --- vendor/elftoolchain/dist/common/elfdefinitions.h Mon Dec 22 19:53:55 2014 (r276076) +++ vendor/elftoolchain/dist/common/elfdefinitions.h Mon Dec 22 20:32:23 2014 (r276077) @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: elfdefinitions.h 2950 2013-06-15 13:36:02Z jkoshy $ + * $Id: elfdefinitions.h 3110 2014-12-20 08:32:46Z kaiwang27 $ */ /* @@ -770,6 +770,8 @@ _ELF_DEFINE_EM(EM_ETPU, 178, "Freescale Extended Time Processing Unit") \ _ELF_DEFINE_EM(EM_SLE9X, 179, \ "Infineon Technologies SLE9X core") \ +_ELF_DEFINE_EM(EM_AARCH64, 183, \ + "AArch64 (64-bit ARM)") \ _ELF_DEFINE_EM(EM_AVR32, 185, \ "Atmel Corporation 32-bit microprocessor family") \ _ELF_DEFINE_EM(EM_STM8, 186, \ @@ -819,7 +821,8 @@ enum { EM__LAST__ }; -/* Older synonyms. */ +/* Other synonyms. */ +#define EM_AMD64 EM_X86_64 #define EM_ARC_A5 EM_ARC_COMPACT /* @@ -2112,11 +2115,11 @@ typedef struct { /* 64-bit entry. */ typedef struct { - Elf64_Word l_name; - Elf64_Word l_time_stamp; - Elf64_Word l_checksum; - Elf64_Word l_version; - Elf64_Word l_flags; + Elf64_Word l_name; /* The name of a shared object. */ + Elf64_Word l_time_stamp; /* 32-bit timestamp. */ + Elf64_Word l_checksum; /* Checksum of visible symbols, sizes. */ + Elf64_Word l_version; /* Interface version string index. */ + Elf64_Word l_flags; /* Flags (LL_*). */ } Elf64_Lib; #define _ELF_DEFINE_LL_FLAGS() \ @@ -2364,12 +2367,12 @@ typedef struct { /* 64 bit PHDR entry. */ typedef struct { Elf64_Word p_type; /* Type of segment. */ - Elf64_Word p_flags; /* File offset to segment. */ - Elf64_Off p_offset; /* Virtual address in memory. */ - Elf64_Addr p_vaddr; /* Physical address (if relevant). */ - Elf64_Addr p_paddr; /* Size of segment in file. */ - Elf64_Xword p_filesz; /* Size of segment in memory. */ - Elf64_Xword p_memsz; /* Segment flags. */ + Elf64_Word p_flags; /* Segment flags. */ + Elf64_Off p_offset; /* File offset to segment. */ + Elf64_Addr p_vaddr; /* Virtual address in memory. */ + Elf64_Addr p_paddr; /* Physical address (if relevant). */ + Elf64_Xword p_filesz; /* Size of segment in file. */ + Elf64_Xword p_memsz; /* Size of segment in memory. */ Elf64_Xword p_align; /* Alignment constraints. */ } Elf64_Phdr; @@ -2453,11 +2456,11 @@ typedef struct { typedef struct { Elf64_Word st_name; /* index of symbol's name */ - unsigned char st_info; /* value for the symbol */ - unsigned char st_other; /* size of associated data */ - Elf64_Half st_shndx; /* type and binding attributes */ - Elf64_Addr st_value; /* visibility */ - Elf64_Xword st_size; /* index of related section */ + unsigned char st_info; /* type and binding attributes */ + unsigned char st_other; /* visibility */ + Elf64_Half st_shndx; /* index of related section */ + Elf64_Addr st_value; /* value for the symbol */ + Elf64_Xword st_size; /* size of associated data */ } Elf64_Sym; #define ELF32_ST_BIND(I) ((I) >> 4) Modified: vendor/elftoolchain/dist/elfcopy/archive.c ============================================================================== --- vendor/elftoolchain/dist/elfcopy/archive.c Mon Dec 22 19:53:55 2014 (r276076) +++ vendor/elftoolchain/dist/elfcopy/archive.c Mon Dec 22 20:32:23 2014 (r276077) @@ -40,7 +40,7 @@ #include "elfcopy.h" -ELFTC_VCSID("$Id: archive.c 2370 2011-12-29 12:48:12Z jkoshy $"); +ELFTC_VCSID("$Id: archive.c 3102 2014-10-29 21:09:01Z jkoshy $"); #define _ARMAG_LEN 8 /* length of ar magic string */ #define _ARHDR_LEN 60 /* length of ar header */ @@ -350,12 +350,11 @@ ac_detect_ar(int ifd) r = -1; if ((a = archive_read_new()) == NULL) return (0); - archive_read_support_compression_none(a); archive_read_support_format_ar(a); if (archive_read_open_fd(a, ifd, 10240) == ARCHIVE_OK) r = archive_read_next_header(a, &entry); archive_read_close(a); - archive_read_finish(a); + archive_read_free(a); return (r == ARCHIVE_OK); } @@ -386,7 +385,6 @@ ac_read_objs(struct elfcopy *ecp, int if err(EXIT_FAILURE, "lseek failed"); if ((a = archive_read_new()) == NULL) errx(EXIT_FAILURE, "%s", archive_error_string(a)); - archive_read_support_compression_none(a); archive_read_support_format_ar(a); AC(archive_read_open_fd(a, ifd, 10240)); for(;;) { @@ -435,7 +433,7 @@ ac_read_objs(struct elfcopy *ecp, int if } } AC(archive_read_close(a)); - ACV(archive_read_finish(a)); + ACV(archive_read_free(a)); } static void @@ -449,7 +447,6 @@ ac_write_objs(struct elfcopy *ecp, int o if ((a = archive_write_new()) == NULL) errx(EXIT_FAILURE, "%s", archive_error_string(a)); archive_write_set_format_ar_svr4(a); - archive_write_set_compression_none(a); AC(archive_write_open_fd(a, ofd)); /* Write the archive symbol table, even if it's empty. */ @@ -491,7 +488,7 @@ ac_write_objs(struct elfcopy *ecp, int o } AC(archive_write_close(a)); - ACV(archive_write_finish(a)); + ACV(archive_write_free(a)); } static void Modified: vendor/elftoolchain/dist/elfcopy/main.c ============================================================================== --- vendor/elftoolchain/dist/elfcopy/main.c Mon Dec 22 19:53:55 2014 (r276076) +++ vendor/elftoolchain/dist/elfcopy/main.c Mon Dec 22 20:32:23 2014 (r276077) @@ -40,7 +40,7 @@ #include "elfcopy.h" -ELFTC_VCSID("$Id: main.c 2970 2013-12-01 15:22:12Z kaiwang27 $"); +ELFTC_VCSID("$Id: main.c 3111 2014-12-20 08:33:01Z kaiwang27 $"); enum options { @@ -1109,7 +1109,8 @@ strip_main(struct elfcopy *ecp, int argc if (ecp->strip == 0 && ((ecp->flags & DISCARD_LOCAL) == 0) && - ((ecp->flags & DISCARD_LLABEL) == 0)) + ((ecp->flags & DISCARD_LLABEL) == 0) && + lookup_symop_list(ecp, NULL, SYMOP_STRIP) == NULL) ecp->strip = STRIP_ALL; if (optind == argc) strip_usage(); Modified: vendor/elftoolchain/dist/elfcopy/sections.c ============================================================================== --- vendor/elftoolchain/dist/elfcopy/sections.c Mon Dec 22 19:53:55 2014 (r276076) +++ vendor/elftoolchain/dist/elfcopy/sections.c Mon Dec 22 20:32:23 2014 (r276077) @@ -35,7 +35,7 @@ #include "elfcopy.h" -ELFTC_VCSID("$Id: sections.c 2358 2011-12-19 18:22:32Z kaiwang27 $"); +ELFTC_VCSID("$Id: sections.c 3126 2014-12-21 08:03:31Z kaiwang27 $"); static void add_gnu_debuglink(struct elfcopy *ecp); static uint32_t calc_crc32(const char *p, size_t len, uint32_t crc); @@ -372,6 +372,14 @@ create_scn(struct elfcopy *ecp) is_remove_reloc_sec(ecp, ish.sh_info)) continue; + /* + * Section groups should be removed if symbol table will + * be removed. (section group's signature stored in symbol + * table) + */ + if (ish.sh_type == SHT_GROUP && ecp->strip == STRIP_ALL) + continue; + /* Get section flags set by user. */ sec_flags = get_section_flags(ecp, name); @@ -762,8 +770,8 @@ resync_sections(struct elfcopy *ecp) s->off = roundup(off, s->align); } else { if (s->loadable) - warnx("moving loadable section," - "is this intentional?"); + warnx("moving loadable section %s, " + "is this intentional?", s->name); s->off = roundup(off, s->align); } @@ -1139,12 +1147,6 @@ add_to_shstrtab(struct elfcopy *ecp, con struct section *s; s = ecp->shstrtab; - if (s->buf == NULL) { - insert_to_strtab(s, ""); - insert_to_strtab(s, ".symtab"); - insert_to_strtab(s, ".strtab"); - insert_to_strtab(s, ".shstrtab"); - } insert_to_strtab(s, name); } @@ -1206,6 +1208,11 @@ init_shstrtab(struct elfcopy *ecp) s->loadable = 0; s->type = SHT_STRTAB; s->vma = 0; + + insert_to_strtab(s, ""); + insert_to_strtab(s, ".symtab"); + insert_to_strtab(s, ".strtab"); + insert_to_strtab(s, ".shstrtab"); } void Modified: vendor/elftoolchain/dist/elfcopy/segments.c ============================================================================== --- vendor/elftoolchain/dist/elfcopy/segments.c Mon Dec 22 19:53:55 2014 (r276076) +++ vendor/elftoolchain/dist/elfcopy/segments.c Mon Dec 22 20:32:23 2014 (r276077) @@ -34,7 +34,7 @@ #include "elfcopy.h" -ELFTC_VCSID("$Id: segments.c 2542 2012-08-12 16:14:15Z kaiwang27 $"); +ELFTC_VCSID("$Id: segments.c 3113 2014-12-20 08:33:29Z kaiwang27 $"); static void insert_to_inseg_list(struct segment *seg, struct section *sec); @@ -72,13 +72,15 @@ add_to_inseg_list(struct elfcopy *ecp, s */ loadable = 0; STAILQ_FOREACH(seg, &ecp->v_seg, seg_list) { - if (s->off < seg->off) + if (s->off < seg->off || (s->vma < seg->addr && !s->pseudo)) continue; if (s->off + s->sz > seg->off + seg->fsz && s->type != SHT_NOBITS) continue; if (s->off + s->sz > seg->off + seg->msz) continue; + if (s->vma + s->sz > seg->addr + seg->msz) + continue; insert_to_inseg_list(seg, s); if (seg->type == PT_LOAD) @@ -96,7 +98,7 @@ adjust_addr(struct elfcopy *ecp) struct section *s, *s0; struct segment *seg; struct sec_action *sac; - uint64_t dl, lma, old_vma, start, end; + uint64_t dl, lma, start, end; int found, i; /* @@ -113,8 +115,6 @@ adjust_addr(struct elfcopy *ecp) s->lma += ecp->change_addr; if (!s->pseudo) { - old_vma = s->vma; - /* Apply global VMA adjustment. */ if (ecp->change_addr != 0) s->vma += ecp->change_addr; @@ -438,7 +438,7 @@ copy_phdr(struct elfcopy *ecp) seg->fsz = seg->msz = 0; for (i = 0; i < seg->nsec; i++) { s = seg->v_sec[i]; - seg->msz = s->off + s->sz - seg->off; + seg->msz = s->vma + s->sz - seg->addr; if (s->type != SHT_NOBITS) seg->fsz = seg->msz; } Modified: vendor/elftoolchain/dist/elfcopy/symbols.c ============================================================================== --- vendor/elftoolchain/dist/elfcopy/symbols.c Mon Dec 22 19:53:55 2014 (r276076) +++ vendor/elftoolchain/dist/elfcopy/symbols.c Mon Dec 22 20:32:23 2014 (r276077) @@ -34,7 +34,7 @@ #include "elfcopy.h" -ELFTC_VCSID("$Id: symbols.c 2971 2013-12-01 15:22:21Z kaiwang27 $"); +ELFTC_VCSID("$Id: symbols.c 3019 2014-04-17 14:53:40Z jkoshy $"); /* Symbol table buffer structure. */ struct symbuf { @@ -300,7 +300,7 @@ generate_symbols(struct elfcopy *ecp) GElf_Sym sym; Elf_Data* id; Elf_Scn *is; - size_t ishstrndx, namelen, ndx, nsyms, sc, symndx; + size_t ishstrndx, namelen, ndx, sc, symndx; int ec, elferr, i; if (elf_getshstrndx(ecp->ein, &ishstrndx) == 0) @@ -320,7 +320,6 @@ generate_symbols(struct elfcopy *ecp) st_buf->lcap = 64; st_buf->lsz = 1; /* '\0' at start. */ st_buf->gsz = 0; - nsyms = 0; ecp->symtab->sz = 0; ecp->strtab->sz = 0; Modified: vendor/elftoolchain/dist/libdwarf/Makefile ============================================================================== --- vendor/elftoolchain/dist/libdwarf/Makefile Mon Dec 22 19:53:55 2014 (r276076) +++ vendor/elftoolchain/dist/libdwarf/Makefile Mon Dec 22 20:32:23 2014 (r276077) @@ -1,4 +1,4 @@ -# $Id: Makefile 2937 2013-04-27 04:48:23Z jkoshy $ +# $Id: Makefile 3097 2014-09-02 22:10:18Z kaiwang27 $ TOP= ${.CURDIR}/.. @@ -42,6 +42,7 @@ SRCS= \ dwarf_pubtypes.c \ dwarf_ranges.c \ dwarf_reloc.c \ + dwarf_sections.c \ dwarf_seterror.c \ dwarf_str.c \ dwarf_types.c \ @@ -115,6 +116,7 @@ MAN= dwarf.3 dwarf_add_weakname.3 \ dwarf_attr.3 \ dwarf_attrlist.3 \ + dwarf_attroffset.3 \ dwarf_attrval_signed.3 \ dwarf_child.3 \ dwarf_dealloc.3 \ @@ -154,6 +156,7 @@ MAN= dwarf.3 dwarf_get_cie_info.3 \ dwarf_get_cie_of_fde.3 \ dwarf_get_cu_die_offset.3 \ + dwarf_get_die_infotypes_flag.3 \ dwarf_get_elf.3 \ dwarf_get_fde_at_pc.3 \ dwarf_get_fde_info_for_all_regs.3 \ @@ -175,6 +178,7 @@ MAN= dwarf.3 dwarf_get_relocation_info.3 \ dwarf_get_relocation_info_count.3 \ dwarf_get_section_bytes.3 \ + dwarf_get_section_max_offsets.3 \ dwarf_get_str.3 \ dwarf_get_types.3 \ dwarf_get_vars.3 \ @@ -192,6 +196,7 @@ MAN= dwarf.3 dwarf_new_expr.3 \ dwarf_new_fde.3 \ dwarf_next_cu_header.3 \ + dwarf_next_types_section.3 \ dwarf_object_init.3 \ dwarf_producer_init.3 \ dwarf_producer_set_isa.3 \ @@ -220,7 +225,9 @@ MLINKS+= \ dwarf_attrval_signed.3 dwarf_attrval_string.3 \ dwarf_attrval_signed.3 dwarf_attrval_unsigned.3 \ dwarf_child.3 dwarf_offdie.3 \ + dwarf_child.3 dwarf_offdie_b.3 \ dwarf_child.3 dwarf_siblingof.3 \ + dwarf_child.3 dwarf_siblingof_b.3 \ dwarf_dealloc.3 dwarf_fde_cie_list_dealloc.3 \ dwarf_dealloc.3 dwarf_funcs_dealloc.3 \ dwarf_dealloc.3 dwarf_globals_dealloc.3 \ @@ -234,6 +241,7 @@ MLINKS+= \ dwarf_dieoffset.3 dwarf_die_CU_offset.3 \ dwarf_dieoffset.3 dwarf_die_CU_offset_range.3 \ dwarf_dieoffset.3 dwarf_get_cu_die_offset_given_cu_header_offset.3 \ + dwarf_dieoffset.3 dwarf_get_cu_die_offset_given_cu_header_offset_b.3 \ dwarf_finish.3 dwarf_object_finish.3 \ dwarf_formref.3 dwarf_global_formref.3 \ dwarf_formudata.3 dwarf_formsdata.3 \ @@ -273,6 +281,7 @@ MLINKS+= \ dwarf_get_pubtypes.3 dwarf_pubtype_name_offsets.3 \ dwarf_get_pubtypes.3 dwarf_pubtypename.3 \ dwarf_get_ranges.3 dwarf_get_ranges_a.3 \ + dwarf_get_section_max_offsets.3 dwarf_get_section_max_offsets_b.3 \ dwarf_get_types.3 dwarf_type_die_offset.3 \ dwarf_get_types.3 dwarf_type_cu_offset.3 \ dwarf_get_types.3 dwarf_type_name_offsets.3 \ @@ -291,6 +300,7 @@ MLINKS+= \ dwarf_highpc.3 dwarf_bitoffset.3 \ dwarf_highpc.3 dwarf_bitsize.3 \ dwarf_highpc.3 dwarf_bytesize.3 \ + dwarf_highpc.3 dwarf_highpc_b.3 \ dwarf_highpc.3 dwarf_lowpc.3 \ dwarf_highpc.3 dwarf_srclang.3 \ dwarf_lineno.3 dwarf_lineaddr.3 \ @@ -302,6 +312,9 @@ MLINKS+= \ dwarf_lineno.3 dwarf_line_srcfileno.3 \ dwarf_loclist.3 dwarf_loclist_n.3 \ dwarf_loclist_from_expr.3 dwarf_loclist_from_expr_a.3 \ + dwarf_loclist_from_expr.3 dwarf_loclist_from_expr_b.3 \ + dwarf_next_cu_header.3 dwarf_next_cu_header_b.3 \ + dwarf_next_cu_header.3 dwarf_next_cu_header_c.3 \ dwarf_producer_init.3 dwarf_producer_init_b.3 \ dwarf_seterrarg.3 dwarf_seterrhand.3 \ dwarf_set_frame_cfa_value.3 dwarf_set_frame_rule_initial_value.3 \ Modified: vendor/elftoolchain/dist/libdwarf/Version.map ============================================================================== --- vendor/elftoolchain/dist/libdwarf/Version.map Mon Dec 22 19:53:55 2014 (r276076) +++ vendor/elftoolchain/dist/libdwarf/Version.map Mon Dec 22 20:32:23 2014 (r276077) @@ -1,4 +1,4 @@ -/* $Id: Version.map 2576 2012-09-13 09:16:11Z jkoshy $ */ +/* $Id: Version.map 3085 2014-09-02 22:08:23Z kaiwang27 $ */ R1.0 { global: @@ -39,6 +39,7 @@ global: dwarf_arrayorder; dwarf_attr; dwarf_attrlist; + dwarf_attroffset; dwarf_attrval_flag; dwarf_attrval_signed; dwarf_attrval_string; @@ -116,6 +117,8 @@ global: dwarf_get_cie_of_fde; dwarf_get_cu_die_offset; dwarf_get_cu_die_offset_given_cu_header_offset; + dwarf_get_cu_die_offset_given_cu_header_offset_b; + dwarf_get_die_infotypes_flag; dwarf_get_elf; dwarf_get_fde_at_pc; dwarf_get_fde_info_for_all_regs3; @@ -139,6 +142,8 @@ global: dwarf_get_relocation_info; dwarf_get_relocation_info_count; dwarf_get_section_bytes; + dwarf_get_section_max_offsets; + dwarf_get_section_max_offsets_b; dwarf_get_str; dwarf_get_types; dwarf_get_vars; @@ -152,6 +157,7 @@ global: dwarf_hasattr; dwarf_hasform; dwarf_highpc; + dwarf_highpc_b; dwarf_init; dwarf_line_srcfileno; dwarf_lineaddr; @@ -166,6 +172,7 @@ global: dwarf_loclist; dwarf_loclist_from_expr; dwarf_loclist_from_expr_a; + dwarf_loclist_from_expr_b; dwarf_loclist_n; dwarf_lowpc; dwarf_new_die; @@ -173,9 +180,12 @@ global: dwarf_new_fde; dwarf_next_cu_header; dwarf_next_cu_header_b; + dwarf_next_cu_header_c; + dwarf_next_types_section; dwarf_object_finish; dwarf_object_init; dwarf_offdie; + dwarf_offdie_b; dwarf_producer_finish; dwarf_producer_init; dwarf_producer_init_b; @@ -196,6 +206,7 @@ global: dwarf_seterrarg; dwarf_seterrhand; dwarf_siblingof; + dwarf_siblingof_b; dwarf_srcfiles; dwarf_srclang; dwarf_srclines; Modified: vendor/elftoolchain/dist/libdwarf/_libdwarf.h ============================================================================== --- vendor/elftoolchain/dist/libdwarf/_libdwarf.h Mon Dec 22 19:53:55 2014 (r276076) +++ vendor/elftoolchain/dist/libdwarf/_libdwarf.h Mon Dec 22 20:32:23 2014 (r276077) @@ -1,6 +1,6 @@ /*- * Copyright (c) 2007 John Birrell (jb@freebsd.org) - * Copyright (c) 2009-2011 Kai Wang + * Copyright (c) 2009-2014 Kai Wang * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -24,7 +24,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: _libdwarf.h 2075 2011-10-27 03:47:28Z jkoshy $ + * $Id: _libdwarf.h 3106 2014-12-19 16:00:58Z kaiwang27 $ */ #ifndef __LIBDWARF_H_ @@ -89,6 +89,7 @@ extern struct _libdwarf_globals _libdwar goto gen_fail; \ } while(0) +typedef struct _Dwarf_CU *Dwarf_CU; struct _Dwarf_AttrDef { uint64_t ad_attrib; /* DW_AT_XXX */ @@ -147,14 +148,6 @@ struct _Dwarf_Die { STAILQ_ENTRY(_Dwarf_Die) die_pro_next; /* Next die in pro-die list. */ }; -struct _Dwarf_Loclist { - Dwarf_Locdesc **ll_ldlist; /* Array of Locdesc pointer. */ - int ll_ldlen; /* Number of Locdesc. */ - Dwarf_Unsigned ll_offset; /* Offset in .debug_loc section. */ - Dwarf_Unsigned ll_length; /* Length (in bytes) of the loclist. */ - TAILQ_ENTRY(_Dwarf_Loclist) ll_next; /* Next loclist in list. */ -}; - struct _Dwarf_P_Expr_Entry { Dwarf_Loc ee_loc; /* Location expression. */ Dwarf_Unsigned ee_sym; /* Optional related reloc sym index. */ @@ -265,6 +258,8 @@ struct _Dwarf_Cie { Dwarf_Half cie_version; /* CIE version. */ uint8_t *cie_augment; /* CIE augmentation (UTF-8). */ Dwarf_Unsigned cie_ehdata; /* Optional EH Data. */ + uint8_t cie_addrsize; /* Address size. (DWARF4) */ + uint8_t cie_segmentsize; /* Segment size. (DWARF4) */ Dwarf_Unsigned cie_caf; /* Code alignment factor. */ Dwarf_Signed cie_daf; /* Data alignment factor. */ Dwarf_Unsigned cie_ra; /* Return address register. */ @@ -333,11 +328,14 @@ struct _Dwarf_CU { uint64_t cu_lineno_offset; /* Offset into .debug_lineno. */ uint8_t cu_pointer_size;/* Number of bytes in pointer. */ uint8_t cu_dwarf_size; /* CU section dwarf size. */ + Dwarf_Sig8 cu_type_sig; /* Type unit's signature. */ + uint64_t cu_type_offset; /* Type unit's type offset. */ Dwarf_Off cu_next_offset; /* Offset to the next CU. */ uint64_t cu_1st_offset; /* First DIE offset. */ int cu_pass2; /* Two pass DIE traverse. */ Dwarf_LineInfo cu_lineinfo; /* Ptr to Dwarf_LineInfo. */ Dwarf_Abbrev cu_abbrev_hash; /* Abbrev hash table. */ + Dwarf_Bool cu_is_info; /* Compilation/type unit flag. */ STAILQ_ENTRY(_Dwarf_CU) cu_next; /* Next compilation unit. */ }; @@ -399,17 +397,21 @@ struct _Dwarf_Debug { Dwarf_Section *dbg_section; /* Dwarf section list. */ Dwarf_Section *dbg_info_sec; /* Pointer to info section. */ Dwarf_Off dbg_info_off; /* Current info section offset. */ + Dwarf_Section *dbg_types_sec; /* Pointer to type section. */ + Dwarf_Off dbg_types_off; /* Current types section offset. */ Dwarf_Unsigned dbg_seccnt; /* Total number of dwarf sections. */ int dbg_mode; /* Access mode. */ int dbg_pointer_size; /* Object address size. */ int dbg_offset_size; /* DWARF offset size. */ int dbg_info_loaded; /* Flag indicating all CU loaded. */ + int dbg_types_loaded; /* Flag indicating all TU loaded. */ Dwarf_Half dbg_machine; /* ELF machine architecture. */ Dwarf_Handler dbg_errhand; /* Error handler. */ Dwarf_Ptr dbg_errarg; /* Argument to the error handler. */ STAILQ_HEAD(, _Dwarf_CU) dbg_cu;/* List of compilation units. */ + STAILQ_HEAD(, _Dwarf_CU) dbg_tu;/* List of type units. */ Dwarf_CU dbg_cu_current; /* Ptr to the current CU. */ - TAILQ_HEAD(, _Dwarf_Loclist) dbg_loclist; /* List of location list. */ + Dwarf_CU dbg_tu_current; /* Ptr to the current TU. */ Dwarf_NameSec dbg_globals; /* Ptr to pubnames lookup section. */ Dwarf_NameSec dbg_pubtypes; /* Ptr to pubtypes lookup section. */ Dwarf_NameSec dbg_weaks; /* Ptr to weaknames lookup section. */ @@ -532,13 +534,15 @@ int _dwarf_elf_get_section_info(void *, Dwarf_Obj_Access_Section *, int *); void _dwarf_expr_cleanup(Dwarf_P_Debug); int _dwarf_expr_into_block(Dwarf_P_Expr, Dwarf_Error *); +Dwarf_Section *_dwarf_find_next_types_section(Dwarf_Debug, Dwarf_Section *); Dwarf_Section *_dwarf_find_section(Dwarf_Debug, const char *); void _dwarf_frame_cleanup(Dwarf_Debug); int _dwarf_frame_fde_add_inst(Dwarf_P_Fde, Dwarf_Small, Dwarf_Unsigned, Dwarf_Unsigned, Dwarf_Error *); int _dwarf_frame_gen(Dwarf_P_Debug, Dwarf_Error *); -int _dwarf_frame_get_fop(Dwarf_Debug, uint8_t *, Dwarf_Unsigned, - Dwarf_Frame_Op **, Dwarf_Signed *, Dwarf_Error *); +int _dwarf_frame_get_fop(Dwarf_Debug, uint8_t, uint8_t *, + Dwarf_Unsigned, Dwarf_Frame_Op **, Dwarf_Signed *, + Dwarf_Error *); int _dwarf_frame_get_internal_table(Dwarf_Fde, Dwarf_Addr, Dwarf_Regtable3 **, Dwarf_Addr *, Dwarf_Error *); int _dwarf_frame_interal_table_init(Dwarf_Debug, Dwarf_Error *); @@ -553,9 +557,12 @@ Dwarf_Unsigned _dwarf_get_reloc_type(Dwa int _dwarf_get_reloc_size(Dwarf_Debug, Dwarf_Unsigned); void _dwarf_info_cleanup(Dwarf_Debug); int _dwarf_info_first_cu(Dwarf_Debug, Dwarf_Error *); +int _dwarf_info_first_tu(Dwarf_Debug, Dwarf_Error *); int _dwarf_info_gen(Dwarf_P_Debug, Dwarf_Error *); -int _dwarf_info_load(Dwarf_Debug, int, Dwarf_Error *); +int _dwarf_info_load(Dwarf_Debug, Dwarf_Bool, Dwarf_Bool, + Dwarf_Error *); int _dwarf_info_next_cu(Dwarf_Debug, Dwarf_Error *); +int _dwarf_info_next_tu(Dwarf_Debug, Dwarf_Error *); void _dwarf_info_pro_cleanup(Dwarf_P_Debug); int _dwarf_init(Dwarf_Debug, Dwarf_Unsigned, Dwarf_Handler, Dwarf_Ptr, Dwarf_Error *); @@ -563,20 +570,19 @@ int _dwarf_lineno_gen(Dwarf_P_Debug, Dw int _dwarf_lineno_init(Dwarf_Die, uint64_t, Dwarf_Error *); void _dwarf_lineno_cleanup(Dwarf_LineInfo); void _dwarf_lineno_pro_cleanup(Dwarf_P_Debug); -int _dwarf_loc_fill_locdesc(Dwarf_Debug, Dwarf_Locdesc *, uint8_t *, - uint64_t, uint8_t, Dwarf_Error *); +int _dwarf_loc_fill_locdesc(Dwarf_Debug, Dwarf_Locdesc *, + uint8_t *, uint64_t, uint8_t, uint8_t, uint8_t, + Dwarf_Error *); int _dwarf_loc_fill_locexpr(Dwarf_Debug, Dwarf_Locdesc **, - uint8_t *, uint64_t, uint8_t, Dwarf_Error *); + uint8_t *, uint64_t, uint8_t, uint8_t, uint8_t, + Dwarf_Error *); int _dwarf_loc_add(Dwarf_Die, Dwarf_Attribute, Dwarf_Error *); int _dwarf_loc_expr_add_atom(Dwarf_Debug, uint8_t *, uint8_t *, Dwarf_Small, Dwarf_Unsigned, Dwarf_Unsigned, int *, Dwarf_Error *); int _dwarf_loclist_find(Dwarf_Debug, Dwarf_CU, uint64_t, - Dwarf_Loclist *, Dwarf_Error *); -void _dwarf_loclist_cleanup(Dwarf_Debug); -void _dwarf_loclist_free(Dwarf_Loclist); -int _dwarf_loclist_add(Dwarf_Debug, Dwarf_CU, uint64_t, - Dwarf_Loclist *, Dwarf_Error *); + Dwarf_Locdesc ***, Dwarf_Signed *, Dwarf_Unsigned *, + Dwarf_Error *); void _dwarf_macinfo_cleanup(Dwarf_Debug); int _dwarf_macinfo_gen(Dwarf_P_Debug, Dwarf_Error *); int _dwarf_macinfo_init(Dwarf_Debug, Dwarf_Error *); @@ -633,6 +639,7 @@ void _dwarf_strtab_cleanup(Dwarf_Debug) int _dwarf_strtab_gen(Dwarf_P_Debug, Dwarf_Error *); char *_dwarf_strtab_get_table(Dwarf_Debug); int _dwarf_strtab_init(Dwarf_Debug, Dwarf_Error *); +void _dwarf_type_unit_cleanup(Dwarf_Debug); void _dwarf_write_block(void *, uint64_t *, uint8_t *, uint64_t); int _dwarf_write_block_alloc(uint8_t **, uint64_t *, uint64_t *, uint8_t *, uint64_t, Dwarf_Error *); Modified: vendor/elftoolchain/dist/libdwarf/dwarf.3 ============================================================================== --- vendor/elftoolchain/dist/libdwarf/dwarf.3 Mon Dec 22 19:53:55 2014 (r276076) +++ vendor/elftoolchain/dist/libdwarf/dwarf.3 Mon Dec 22 20:32:23 2014 (r276077) @@ -21,9 +21,9 @@ .\" out of the use of this software, even if advised of the possibility of .\" such damage. .\" -.\" $Id: dwarf.3 2075 2011-10-27 03:47:28Z jkoshy $ +.\" $Id: dwarf.3 3130 2014-12-21 20:06:29Z jkoshy $ .\" -.Dd September 17, 2011 +.Dd December 21, 2014 .Os .Dt DWARF 3 .Sh NAME @@ -217,6 +217,8 @@ attribute. Retrieve an attribute descriptor. .It Fn dwarf_attrlist Retrieve attribute descriptors for a debugging information entry. +.It Fn dwarf_attroffset +Retrieve the section-relative offset of an attribute descriptor. .It Fn dwarf_attrval_flag Retrieve a .Dv DW_AT_FORM_flag @@ -309,10 +311,17 @@ Retrieve range information from an FDE d .El .It Compilation Units .Bl -tag -compact -.It Fn dwarf_get_cu_die_offset_given_cu_header_offset +.It Xo +.Fn dwarf_get_cu_die_offset_given_cu_header_offset , +.Fn dwarf_get_cu_die_offset_given_cu_header_offset_b +.Xc Retrieve the offset of the debugging information entry for a -compilation unit. -.It Fn dwarf_next_cu_header , Fn dwarf_next_cu_header_b +compilation or type unit. +.It Xo +.Fn dwarf_next_cu_header , +.Fn dwarf_next_cu_header_b , +.Fn dwarf_next_cu_header_c +.Xc Step through compilation units in a debug context. .El .It Debugging Information Entries @@ -329,13 +338,15 @@ Returns the attribute for a debugging information entry. .It Fn dwarf_dieoffset Retrieves the offset for a debugging information entry. -.It Fn dwarf_highpc +.It Fn dwarf_get_die_infotypes_flag +Indicate the originating section for a debugging information entry. +.It Fn dwarf_highpc , Fn dwarf_highpc_b Return the highest PC value for a debugging information entry. .It Fn dwarf_lowpc Return the lowest PC value for a debugging information entry. -.It Fn dwarf_offdie +.It Fn dwarf_offdie , Fn dwarf_offdie_b Retrieve a debugging information entry given an offset. -.It Fn dwarf_siblingof +.It Fn dwarf_siblingof , Fn dwarf_siblingof_b *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Dec 22 20:33:42 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 04EE8D65; Mon, 22 Dec 2014 20:33:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CB34ED9C; Mon, 22 Dec 2014 20:33:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBMKXfs8044846; Mon, 22 Dec 2014 20:33:41 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBMKXfJs044845; Mon, 22 Dec 2014 20:33:41 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201412222033.sBMKXfJs044845@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 22 Dec 2014 20:33:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r276078 - vendor/elftoolchain/elftoolchain-r3130 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Dec 2014 20:33:42 -0000 Author: emaste Date: Mon Dec 22 20:33:40 2014 New Revision: 276078 URL: https://svnweb.freebsd.org/changeset/base/276078 Log: Tag elftoolchain r3130 Added: vendor/elftoolchain/elftoolchain-r3130/ - copied from r276077, vendor/elftoolchain/dist/ From owner-svn-src-all@FreeBSD.ORG Mon Dec 22 20:42:40 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 52C3DF76; Mon, 22 Dec 2014 20:42:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 350CBF7B; Mon, 22 Dec 2014 20:42:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBMKgeUF049405; Mon, 22 Dec 2014 20:42:40 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBMKgbc5049395; Mon, 22 Dec 2014 20:42:37 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201412222042.sBMKgbc5049395@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Mon, 22 Dec 2014 20:42:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276079 - head/lib/libstand X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Dec 2014 20:42:40 -0000 Author: ian Date: Mon Dec 22 20:42:36 2014 New Revision: 276079 URL: https://svnweb.freebsd.org/changeset/base/276079 Log: Add a divisor parameter to twiddle() so that callers can request that output only happen on every Nth call. Update the existing twiddle() calls done in various IO loops to roughly reflect the relative IO sizes. That is, tftp and nfs call twiddle() on every 1K block, ufs on every filesystem block, so the network calls now use a much larger divisor than disk IO calls. Also add a new twiddle_divisor() function that allows an application to set a global divisor that is applied on top of the per-call divisors. Nothing calls this yet, but loader(8) will be using it to further throttle the cursor for slow serial consoles. Modified: head/lib/libstand/cd9660.c head/lib/libstand/ext2fs.c head/lib/libstand/nandfs.c head/lib/libstand/nfs.c head/lib/libstand/read.c head/lib/libstand/stand.h head/lib/libstand/tftp.c head/lib/libstand/twiddle.c head/lib/libstand/ufs.c head/lib/libstand/write.c Modified: head/lib/libstand/cd9660.c ============================================================================== --- head/lib/libstand/cd9660.c Mon Dec 22 20:33:40 2014 (r276078) +++ head/lib/libstand/cd9660.c Mon Dec 22 20:42:36 2014 (r276079) @@ -281,7 +281,7 @@ cd9660_open(const char *path, struct ope buf = malloc(buf_size = ISO_DEFAULT_BLOCK_SIZE); vd = buf; for (bno = 16;; bno++) { - twiddle(); + twiddle(1); rc = f->f_dev->dv_strategy(f->f_devdata, F_READ, cdb2devb(bno), ISO_DEFAULT_BLOCK_SIZE, buf, &read); if (rc) @@ -314,7 +314,7 @@ cd9660_open(const char *path, struct ope while (off < dsize) { if ((off % ISO_DEFAULT_BLOCK_SIZE) == 0) { - twiddle(); + twiddle(1); rc = f->f_dev->dv_strategy (f->f_devdata, F_READ, cdb2devb(bno + boff), @@ -374,7 +374,7 @@ cd9660_open(const char *path, struct ope /* Check for Rock Ridge since we didn't in the loop above. */ bno = isonum_733(rec.extent) + isonum_711(rec.ext_attr_length); - twiddle(); + twiddle(1); rc = f->f_dev->dv_strategy(f->f_devdata, F_READ, cdb2devb(bno), ISO_DEFAULT_BLOCK_SIZE, buf, &read); if (rc) @@ -431,7 +431,7 @@ buf_read_file(struct open_file *f, char if (fp->f_buf == (char *)0) fp->f_buf = malloc(ISO_DEFAULT_BLOCK_SIZE); - twiddle(); + twiddle(16); rc = f->f_dev->dv_strategy(f->f_devdata, F_READ, cdb2devb(blkno), ISO_DEFAULT_BLOCK_SIZE, fp->f_buf, &read); if (rc) Modified: head/lib/libstand/ext2fs.c ============================================================================== --- head/lib/libstand/ext2fs.c Mon Dec 22 20:33:40 2014 (r276078) +++ head/lib/libstand/ext2fs.c Mon Dec 22 20:42:36 2014 (r276079) @@ -353,7 +353,7 @@ ext2fs_open(const char *upath, struct op /* allocate space and read super block */ fs = (struct ext2fs *)malloc(sizeof(*fs)); fp->f_fs = fs; - twiddle(); + twiddle(1); error = (f->f_dev->dv_strategy)(f->f_devdata, F_READ, EXT2_SBLOCK, EXT2_SBSIZE, (char *)fs, &buf_size); if (error) @@ -395,7 +395,7 @@ ext2fs_open(const char *upath, struct op len = blkgrps * fs->fs_bsize; fp->f_bg = malloc(len); - twiddle(); + twiddle(1); error = (f->f_dev->dv_strategy)(f->f_devdata, F_READ, EXT2_SBLOCK + EXT2_SBSIZE / DEV_BSIZE, len, (char *)fp->f_bg, &buf_size); @@ -507,7 +507,7 @@ ext2fs_open(const char *upath, struct op if (error) goto out; - twiddle(); + twiddle(1); error = (f->f_dev->dv_strategy)(f->f_devdata, F_READ, fsb_to_db(fs, disk_block), fs->fs_bsize, buf, &buf_size); @@ -568,7 +568,7 @@ read_inode(ino_t inumber, struct open_fi * Read inode and save it. */ buf = malloc(fs->fs_bsize); - twiddle(); + twiddle(1); error = (f->f_dev->dv_strategy)(f->f_devdata, F_READ, ino_to_db(fs, fp->f_bg, inumber), fs->fs_bsize, buf, &rsize); if (error) @@ -665,7 +665,7 @@ block_map(struct open_file *f, daddr_t f if (fp->f_blk[level] == (char *)0) fp->f_blk[level] = malloc(fs->fs_bsize); - twiddle(); + twiddle(1); error = (f->f_dev->dv_strategy)(f->f_devdata, F_READ, fsb_to_db(fp->f_fs, ind_block_num), fs->fs_bsize, fp->f_blk[level], &fp->f_blksize[level]); @@ -723,7 +723,7 @@ buf_read_file(struct open_file *f, char bzero(fp->f_buf, block_size); fp->f_buf_size = block_size; } else { - twiddle(); + twiddle(4); error = (f->f_dev->dv_strategy)(f->f_devdata, F_READ, fsb_to_db(fs, disk_block), block_size, fp->f_buf, &fp->f_buf_size); Modified: head/lib/libstand/nandfs.c ============================================================================== --- head/lib/libstand/nandfs.c Mon Dec 22 20:33:40 2014 (r276078) +++ head/lib/libstand/nandfs.c Mon Dec 22 20:42:36 2014 (r276079) @@ -921,7 +921,7 @@ nandfs_bmap_lookup(struct nandfs *fs, st return (0); } - twiddle(); + twiddle(1); NANDFS_DEBUG("calling get_map with %jx\n", ind_block_num); map = nandfs_get_map(fs, node, ind_block_num, phys); if (map == NULL) Modified: head/lib/libstand/nfs.c ============================================================================== --- head/lib/libstand/nfs.c Mon Dec 22 20:33:40 2014 (r276078) +++ head/lib/libstand/nfs.c Mon Dec 22 20:42:36 2014 (r276079) @@ -662,7 +662,7 @@ nfs_read(struct open_file *f, void *buf, (int)fp->off); #endif while ((int)size > 0) { - twiddle(); + twiddle(16); cc = nfs_readdata(fp, fp->off, (void *)addr, size); /* XXX maybe should retry on certain errors */ if (cc == -1) { @@ -1311,7 +1311,7 @@ nfs_read(struct open_file *f, void *buf, (int)fp->off); #endif while ((int)size > 0) { - twiddle(); + twiddle(16); cc = nfs_readdata(fp, fp->off, (void *)addr, size); /* XXX maybe should retry on certain errors */ if (cc == -1) { Modified: head/lib/libstand/read.c ============================================================================== --- head/lib/libstand/read.c Mon Dec 22 20:33:40 2014 (r276078) +++ head/lib/libstand/read.c Mon Dec 22 20:42:36 2014 (r276079) @@ -77,7 +77,7 @@ read(int fd, void *dest, size_t bcount) return (-1); } if (f->f_flags & F_RAW) { - twiddle(); + twiddle(4); errno = (f->f_dev->dv_strategy)(f->f_devdata, F_READ, btodb(f->f_offset), bcount, dest, &resid); if (errno) Modified: head/lib/libstand/stand.h ============================================================================== --- head/lib/libstand/stand.h Mon Dec 22 20:33:40 2014 (r276078) +++ head/lib/libstand/stand.h Mon Dec 22 20:42:36 2014 (r276079) @@ -242,7 +242,8 @@ extern int sprintf(char *buf, const char extern int snprintf(char *buf, size_t size, const char *cfmt, ...) __printflike(3, 4); extern void vsprintf(char *buf, const char *cfmt, __va_list); -extern void twiddle(void); +extern void twiddle(u_int callerdiv); +extern void twiddle_divisor(u_int globaldiv); extern void ngets(char *, int); #define gets(x) ngets((x), 0) Modified: head/lib/libstand/tftp.c ============================================================================== --- head/lib/libstand/tftp.c Mon Dec 22 20:33:40 2014 (r276078) +++ head/lib/libstand/tftp.c Mon Dec 22 20:42:36 2014 (r276079) @@ -447,14 +447,12 @@ tftp_read(struct open_file *f, void *add size_t *resid /* out */) { struct tftp_handle *tftpfile; - static int tc = 0; tftpfile = (struct tftp_handle *) f->f_fsdata; while (size > 0) { int needblock, count; - if (!(tc++ % 16)) - twiddle(); + twiddle(32); needblock = tftpfile->off / tftpfile->tftp_blksize + 1; Modified: head/lib/libstand/twiddle.c ============================================================================== --- head/lib/libstand/twiddle.c Mon Dec 22 20:33:40 2014 (r276078) +++ head/lib/libstand/twiddle.c Mon Dec 22 20:42:36 2014 (r276079) @@ -42,11 +42,28 @@ __FBSDID("$FreeBSD$"); /* Extra functions from NetBSD standalone printf.c */ +static u_int globaldiv; + void -twiddle() +twiddle(u_int callerdiv) { - static int pos; + static u_int callercnt, globalcnt, pos; + + callercnt++; + if (callerdiv > 1 && (callercnt % callerdiv) != 0) + return; + + globalcnt++; + if (globaldiv > 1 && (globalcnt % globaldiv) != 0) + return; putchar("|/-\\"[pos++ & 3]); putchar('\b'); } + +void +twiddle_divisor(u_int gdiv) +{ + + globaldiv = gdiv; +} Modified: head/lib/libstand/ufs.c ============================================================================== --- head/lib/libstand/ufs.c Mon Dec 22 20:33:40 2014 (r276078) +++ head/lib/libstand/ufs.c Mon Dec 22 20:42:36 2014 (r276079) @@ -155,7 +155,7 @@ read_inode(inumber, f) * Read inode and save it. */ buf = malloc(fs->fs_bsize); - twiddle(); + twiddle(1); rc = (f->f_dev->dv_strategy)(f->f_devdata, F_READ, fsbtodb(fs, ino_to_fsba(fs, inumber)), fs->fs_bsize, buf, &rsize); @@ -265,7 +265,7 @@ block_map(f, file_block, disk_block_p) if (fp->f_blk[level] == (char *)0) fp->f_blk[level] = malloc(fs->fs_bsize); - twiddle(); + twiddle(1); rc = (f->f_dev->dv_strategy)(f->f_devdata, F_READ, fsbtodb(fp->f_fs, ind_block_num), fs->fs_bsize, @@ -346,7 +346,7 @@ buf_write_file(f, buf_p, size_p) if (fp->f_buf == (char *)0) fp->f_buf = malloc(fs->fs_bsize); - twiddle(); + twiddle(4); rc = (f->f_dev->dv_strategy)(f->f_devdata, F_READ, fsbtodb(fs, disk_block), block_size, fp->f_buf, &fp->f_buf_size); @@ -365,7 +365,7 @@ buf_write_file(f, buf_p, size_p) * Write the block out to storage. */ - twiddle(); + twiddle(4); rc = (f->f_dev->dv_strategy)(f->f_devdata, F_WRITE, fsbtodb(fs, disk_block), block_size, fp->f_buf, &fp->f_buf_size); @@ -406,7 +406,7 @@ buf_read_file(f, buf_p, size_p) bzero(fp->f_buf, block_size); fp->f_buf_size = block_size; } else { - twiddle(); + twiddle(4); rc = (f->f_dev->dv_strategy)(f->f_devdata, F_READ, fsbtodb(fs, disk_block), block_size, fp->f_buf, &fp->f_buf_size); @@ -515,7 +515,7 @@ ufs_open(upath, f) /* allocate space and read super block */ fs = malloc(SBLOCKSIZE); fp->f_fs = fs; - twiddle(); + twiddle(1); /* * Try reading the superblock in each of its possible locations. */ @@ -649,7 +649,7 @@ ufs_open(upath, f) if (rc) goto out; - twiddle(); + twiddle(1); rc = (f->f_dev->dv_strategy)(f->f_devdata, F_READ, fsbtodb(fs, disk_block), fs->fs_bsize, buf, &buf_size); Modified: head/lib/libstand/write.c ============================================================================== --- head/lib/libstand/write.c Mon Dec 22 20:33:40 2014 (r276078) +++ head/lib/libstand/write.c Mon Dec 22 20:42:36 2014 (r276079) @@ -80,7 +80,7 @@ write(fd, dest, bcount) return (-1); } if (f->f_flags & F_RAW) { - twiddle(); + twiddle(4); errno = (f->f_dev->dv_strategy)(f->f_devdata, F_WRITE, btodb(f->f_offset), bcount, dest, &resid); if (errno) From owner-svn-src-all@FreeBSD.ORG Mon Dec 22 20:53:47 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9EBA35E8; Mon, 22 Dec 2014 20:53:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 708DF11B7; Mon, 22 Dec 2014 20:53:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBMKrlQc054561; Mon, 22 Dec 2014 20:53:47 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBMKrkUX054557; Mon, 22 Dec 2014 20:53:46 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201412222053.sBMKrkUX054557@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 22 Dec 2014 20:53:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276080 - in stable/10/sys/i386: i386 include linux svr4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Dec 2014 20:53:47 -0000 Author: jhb Date: Mon Dec 22 20:53:45 2014 New Revision: 276080 URL: https://svnweb.freebsd.org/changeset/base/276080 Log: MFC 273991: MFamd64: Move extern declaration of _ucodesel and _udatasel to Modified: stable/10/sys/i386/i386/vm_machdep.c stable/10/sys/i386/include/md_var.h stable/10/sys/i386/linux/linux_sysvec.c stable/10/sys/i386/svr4/svr4_machdep.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/i386/i386/vm_machdep.c ============================================================================== --- stable/10/sys/i386/i386/vm_machdep.c Mon Dec 22 20:42:36 2014 (r276079) +++ stable/10/sys/i386/i386/vm_machdep.c Mon Dec 22 20:53:45 2014 (r276080) @@ -150,8 +150,6 @@ static u_int sf_buf_alloc_want; */ static struct mtx sf_buf_lock; -extern int _ucodesel, _udatasel; - /* * Finish a fork operation, with process p2 nearly set up. * Copy and update the pcb, set up the stack so that the child Modified: stable/10/sys/i386/include/md_var.h ============================================================================== --- stable/10/sys/i386/include/md_var.h Mon Dec 22 20:42:36 2014 (r276079) +++ stable/10/sys/i386/include/md_var.h Mon Dec 22 20:53:45 2014 (r276080) @@ -76,6 +76,8 @@ extern int szosigcode; extern uint32_t *vm_page_dump; extern int vm_page_dump_size; extern int workaround_erratum383; +extern int _udatasel; +extern int _ucodesel; typedef void alias_for_inthand_t(u_int cs, u_int ef, u_int esp, u_int ss); struct thread; Modified: stable/10/sys/i386/linux/linux_sysvec.c ============================================================================== --- stable/10/sys/i386/linux/linux_sysvec.c Mon Dec 22 20:42:36 2014 (r276079) +++ stable/10/sys/i386/linux/linux_sysvec.c Mon Dec 22 20:53:45 2014 (r276080) @@ -400,7 +400,6 @@ linux_copyout_strings(struct image_param -extern int _ucodesel, _udatasel; extern unsigned long linux_sznonrtsigcode; static void Modified: stable/10/sys/i386/svr4/svr4_machdep.c ============================================================================== --- stable/10/sys/i386/svr4/svr4_machdep.c Mon Dec 22 20:42:36 2014 (r276079) +++ stable/10/sys/i386/svr4/svr4_machdep.c Mon Dec 22 20:53:45 2014 (r276080) @@ -65,7 +65,6 @@ __FBSDID("$FreeBSD$"); extern int svr4_szsigcode; extern char svr4_sigcode[]; -extern int _udatasel, _ucodesel; static void svr4_getsiginfo(union svr4_siginfo *, int, u_long, caddr_t); From owner-svn-src-all@FreeBSD.ORG Mon Dec 22 20:58:59 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7F16E778; Mon, 22 Dec 2014 20:58:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 66B311215; Mon, 22 Dec 2014 20:58:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBMKwxc0055327; Mon, 22 Dec 2014 20:58:59 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBMKwqfr055298; Mon, 22 Dec 2014 20:58:52 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201412222058.sBMKwqfr055298@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 22 Dec 2014 20:58:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276081 - in stable/10: cddl/contrib/opensolaris/cmd/zdb cddl/contrib/opensolaris/cmd/zfs cddl/contrib/opensolaris/cmd/zpool cddl/contrib/opensolaris/cmd/zstreamdump cddl/contrib/openso... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Dec 2014 20:58:59 -0000 Author: delphij Date: Mon Dec 22 20:58:51 2014 New Revision: 276081 URL: https://svnweb.freebsd.org/changeset/base/276081 Log: MFC r274337,r274673,274681,r275515: ZFS large block support. The default recordsize remains at 128KB. A new tunable/sysctl variable, vfs.zfs.max_recordsize is added to allow adjusting the permitted maximum record size, or zfs_max_recordsize, with a default of 1MB. ZFS will not allow setting recordsize greater than zfs_max_recordsize as a safety belt, because larger recordsize means greater read and write latency and more memory usage. Please note that booting from datasets that have recordsize greater than 128KB is not supported (but it's Okay to enable the feature on the pool). Limited safety belt is provided for mounted root filesystem but use caution when using a larger value. Illumos issue: 5027 zfs large block support Modified: stable/10/cddl/contrib/opensolaris/cmd/zdb/zdb.c stable/10/cddl/contrib/opensolaris/cmd/zfs/zfs.8 stable/10/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 stable/10/cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.c stable/10/cddl/contrib/opensolaris/cmd/ztest/ztest.c stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c stable/10/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.c stable/10/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.h stable/10/sys/boot/zfs/zfsimpl.c stable/10/sys/cddl/boot/zfs/zfsimpl.h stable/10/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.c stable/10/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.h stable/10/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c stable/10/sys/cddl/contrib/opensolaris/common/zfs/zpool_prop.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/bpobj.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/bptree.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_deadlist.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_destroy.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_history.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_objset.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_send.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zap_impl.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ioctl.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_znode.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zil.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zil_impl.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_raidz.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_micro.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_log.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/cmd/zdb/zdb.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/zdb/zdb.c Mon Dec 22 20:53:45 2014 (r276080) +++ stable/10/cddl/contrib/opensolaris/cmd/zdb/zdb.c Mon Dec 22 20:58:51 2014 (r276081) @@ -2147,6 +2147,8 @@ dump_label(const char *dev) (void) close(fd); } +static uint64_t num_large_blocks; + /*ARGSUSED*/ static int dump_one_dir(const char *dsname, void *arg) @@ -2159,6 +2161,8 @@ dump_one_dir(const char *dsname, void *a (void) printf("Could not open %s, error %d\n", dsname, error); return (0); } + if (dmu_objset_ds(os)->ds_large_blocks) + num_large_blocks++; dump_dir(os); dmu_objset_disown(os, FTAG); fuid_table_destroy(); @@ -2169,7 +2173,7 @@ dump_one_dir(const char *dsname, void *a /* * Block statistics. */ -#define PSIZE_HISTO_SIZE (SPA_MAXBLOCKSIZE / SPA_MINBLOCKSIZE + 1) +#define PSIZE_HISTO_SIZE (SPA_OLD_MAXBLOCKSIZE / SPA_MINBLOCKSIZE + 2) typedef struct zdb_blkstats { uint64_t zb_asize; uint64_t zb_lsize; @@ -2234,7 +2238,15 @@ zdb_count_block(zdb_cb_t *zcb, zilog_t * zb->zb_lsize += BP_GET_LSIZE(bp); zb->zb_psize += BP_GET_PSIZE(bp); zb->zb_count++; - zb->zb_psize_histogram[BP_GET_PSIZE(bp) >> SPA_MINBLOCKSHIFT]++; + + /* + * The histogram is only big enough to record blocks up to + * SPA_OLD_MAXBLOCKSIZE; larger blocks go into the last, + * "other", bucket. + */ + int idx = BP_GET_PSIZE(bp) >> SPA_MINBLOCKSHIFT; + idx = MIN(idx, SPA_OLD_MAXBLOCKSIZE / SPA_MINBLOCKSIZE + 1); + zb->zb_psize_histogram[idx]++; zb->zb_gangs += BP_COUNT_GANG(bp); @@ -2946,6 +2958,7 @@ dump_zpool(spa_t *spa) dump_metaslab_groups(spa); if (dump_opt['d'] || dump_opt['i']) { + uint64_t refcount; dump_dir(dp->dp_meta_objset); if (dump_opt['d'] >= 3) { dump_bpobj(&spa->spa_deferred_bpobj, @@ -2965,8 +2978,21 @@ dump_zpool(spa_t *spa) } (void) dmu_objset_find(spa_name(spa), dump_one_dir, NULL, DS_FIND_SNAPSHOTS | DS_FIND_CHILDREN); + + (void) feature_get_refcount(spa, + &spa_feature_table[SPA_FEATURE_LARGE_BLOCKS], &refcount); + if (num_large_blocks != refcount) { + (void) printf("large_blocks feature refcount mismatch: " + "expected %lld != actual %lld\n", + (longlong_t)num_large_blocks, + (longlong_t)refcount); + rc = 2; + } else { + (void) printf("Verified large_blocks feature refcount " + "is correct (%llu)\n", (longlong_t)refcount); + } } - if (dump_opt['b'] || dump_opt['c']) + if (rc == 0 && (dump_opt['b'] || dump_opt['c'])) rc = dump_block_stats(spa); if (rc == 0) Modified: stable/10/cddl/contrib/opensolaris/cmd/zfs/zfs.8 ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Mon Dec 22 20:53:45 2014 (r276080) +++ stable/10/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Mon Dec 22 20:58:51 2014 (r276081) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 30, 2014 +.Dd November 10, 2014 .Dt ZFS 8 .Os .Sh NAME @@ -179,12 +179,12 @@ .Ar bookmark .Nm .Cm send -.Op Fl DnPpRve +.Op Fl DnPpRveL .Op Fl i Ar snapshot | Fl I Ar snapshot .Ar snapshot .Nm .Cm send -.Op Fl e +.Op Fl eL .Op Fl i Ar snapshot Ns | Ns bookmark .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot .Nm @@ -1187,6 +1187,12 @@ systems is strongly discouraged, and may .Pp The size specified must be a power of two greater than or equal to 512 and less than or equal to 128 Kbytes. +If the +.Sy large_blocks +feature is enabled on the pool, the size may be up to 1 Mbyte. +See +.Xr zpool-features 7 +for details on ZFS feature flags. .Pp Changing the file system's .Sy recordsize @@ -2477,7 +2483,7 @@ feature. .It Xo .Nm .Cm send -.Op Fl DnPpRve +.Op Fl DnPpRveL .Op Fl i Ar snapshot | Fl I Ar snapshot .Ar snapshot .Xc @@ -2549,6 +2555,22 @@ be used regardless of the dataset's property, but performance will be much better if the filesystem uses a dedup-capable checksum (eg. .Sy sha256 ) . +.It Fl L +Generate a stream which may contain blocks larger than 128KB. +This flag +has no effect if the +.Sy large_blocks +pool feature is disabled, or if the +.Sy recordsize +property of this filesystem has never been set above 128KB. +The receiving system must have the +.Sy large_blocks +pool feature enabled as well. +See +.Xr zpool-features 7 +for details on ZFS feature flags and the +.Sy large_blocks +feature. .It Fl e Generate a more compact stream by using WRITE_EMBEDDED records for blocks which are stored more compactly on disk by the @@ -2596,7 +2618,7 @@ on future versions of .It Xo .Nm .Cm send -.Op Fl e +.Op Fl eL .Op Fl i Ar snapshot Ns | Ns Ar bookmark .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot .Xc @@ -2622,6 +2644,22 @@ specified as the last component of the n If the incremental target is a clone, the incremental source can be the origin snapshot, or an earlier snapshot in the origin's filesystem, or the origin's origin, etc. +.It Fl L +Generate a stream which may contain blocks larger than 128KB. +This flag +has no effect if the +.Sy large_blocks +pool feature is disabled, or if the +.Sy recordsize +property of this filesystem has never been set above 128KB. +The receiving system must have the +.Sy large_blocks +pool feature enabled as well. +See +.Xr zpool-features 7 +for details on ZFS feature flags and the +.Sy large_blocks +feature. .It Fl e Generate a more compact stream by using WRITE_EMBEDDED records for blocks which are stored more compactly on disk by the Modified: stable/10/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Mon Dec 22 20:53:45 2014 (r276080) +++ stable/10/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Mon Dec 22 20:58:51 2014 (r276081) @@ -274,9 +274,9 @@ get_usage(zfs_help_t idx) case HELP_ROLLBACK: return (gettext("\trollback [-rRf] \n")); case HELP_SEND: - return (gettext("\tsend [-DnPpRve] [-[iI] snapshot] " + return (gettext("\tsend [-DnPpRvLe] [-[iI] snapshot] " "\n" - "\tsend [-e] [-i snapshot|bookmark] " + "\tsend [-Le] [-i snapshot|bookmark] " "\n")); case HELP_SET: return (gettext("\tset " @@ -3709,7 +3709,7 @@ zfs_do_send(int argc, char **argv) boolean_t extraverbose = B_FALSE; /* check options */ - while ((c = getopt(argc, argv, ":i:I:RDpvnPe")) != -1) { + while ((c = getopt(argc, argv, ":i:I:RDpvnPLe")) != -1) { switch (c) { case 'i': if (fromname) @@ -3744,6 +3744,9 @@ zfs_do_send(int argc, char **argv) case 'n': flags.dryrun = B_TRUE; break; + case 'L': + flags.largeblock = B_TRUE; + break; case 'e': flags.embed_data = B_TRUE; break; @@ -3800,6 +3803,8 @@ zfs_do_send(int argc, char **argv) if (zhp == NULL) return (1); + if (flags.largeblock) + lzc_flags |= LZC_SEND_FLAG_LARGE_BLOCK; if (flags.embed_data) lzc_flags |= LZC_SEND_FLAG_EMBED_DATA; Modified: stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 Mon Dec 22 20:53:45 2014 (r276080) +++ stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 Mon Dec 22 20:58:51 2014 (r276081) @@ -23,7 +23,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 1, 2014 +.Dd November 10, 2014 .Dt ZPOOL-FEATURES 7 .Os .Sh NAME @@ -427,6 +427,33 @@ This feature becomes as soon as it is enabled and will never return to being .Sy enabled . +.It Sy large_blocks +.Bl -column "READ\-ONLY COMPATIBLE" "org.open-zfs:large_block" +.It GUID Ta org.open-zfs:large_block +.It READ\-ONLY COMPATIBLE Ta no +.It DEPENDENCIES Ta extensible_dataset +.El +.Pp +The +.Sy large_block +feature allows the record size on a dataset to be +set larger than 128KB. +.Pp +This feature becomes +.Sy active +once a +.Sy recordsize +property has been set larger than 128KB, and will return to being +.Sy enabled +once all filesystems that have ever had their recordsize larger than 128KB +are destroyed. +.Pp +Please note that booting from datasets that have recordsize greater than +128KB is +.Em NOT +supported by the +.Fx +boot loader. .El .Sh SEE ALSO .Xr zpool 8 Modified: stable/10/cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.c Mon Dec 22 20:53:45 2014 (r276080) +++ stable/10/cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.c Mon Dec 22 20:58:51 2014 (r276081) @@ -54,7 +54,6 @@ uint64_t total_stream_len = 0; FILE *send_stream = 0; boolean_t do_byteswap = B_FALSE; boolean_t do_cksum = B_TRUE; -#define INITIAL_BUFLEN (1<<20) static void usage(void) @@ -67,6 +66,18 @@ usage(void) exit(1); } +static void * +safe_malloc(size_t size) +{ + void *rv = malloc(size); + if (rv == NULL) { + (void) fprintf(stderr, "ERROR; failed to allocate %zu bytes\n", + size); + abort(); + } + return (rv); +} + /* * ssread - send stream read. * @@ -158,7 +169,7 @@ print_block(char *buf, int length) int main(int argc, char *argv[]) { - char *buf = malloc(INITIAL_BUFLEN); + char *buf = safe_malloc(SPA_MAXBLOCKSIZE); uint64_t drr_record_count[DRR_NUMTYPES] = { 0 }; uint64_t total_records = 0; dmu_replay_record_t thedrr; @@ -307,9 +318,9 @@ main(int argc, char *argv[]) nvlist_t *nv; int sz = drr->drr_payloadlen; - if (sz > INITIAL_BUFLEN) { + if (sz > SPA_MAXBLOCKSIZE) { free(buf); - buf = malloc(sz); + buf = safe_malloc(sz); } (void) ssread(buf, sz, &zc); if (ferror(send_stream)) Modified: stable/10/cddl/contrib/opensolaris/cmd/ztest/ztest.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/ztest/ztest.c Mon Dec 22 20:53:45 2014 (r276080) +++ stable/10/cddl/contrib/opensolaris/cmd/ztest/ztest.c Mon Dec 22 20:58:51 2014 (r276081) @@ -987,9 +987,15 @@ ztest_spa_get_ashift() { static int ztest_random_blocksize(void) { - // Choose a block size >= the ashift. - uint64_t block_shift = - ztest_random(SPA_MAXBLOCKSHIFT - ztest_spa_get_ashift() + 1); + uint64_t block_shift; + /* + * Choose a block size >= the ashift. + * If the SPA supports new MAXBLOCKSIZE, test up to 1MB blocks. + */ + int maxbs = SPA_OLD_MAXBLOCKSHIFT; + if (spa_maxblocksize(ztest_spa) == SPA_MAXBLOCKSIZE) + maxbs = 20; + block_shift = ztest_random(maxbs - ztest_spa_get_ashift() + 1); return (1 << (SPA_MINBLOCKSHIFT + block_shift)); } @@ -4789,7 +4795,7 @@ ztest_fault_inject(ztest_ds_t *zd, uint6 char path0[MAXPATHLEN]; char pathrand[MAXPATHLEN]; size_t fsize; - int bshift = SPA_MAXBLOCKSHIFT + 2; /* don't scrog all labels */ + int bshift = SPA_OLD_MAXBLOCKSHIFT + 2; /* don't scrog all labels */ int iters = 1000; int maxfaults; int mirror_save; Modified: stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h ============================================================================== --- stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h Mon Dec 22 20:53:45 2014 (r276080) +++ stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h Mon Dec 22 20:58:51 2014 (r276081) @@ -609,6 +609,9 @@ typedef struct sendflags { /* show progress (ie. -v) */ boolean_t progress; + /* large blocks (>128K) are permitted */ + boolean_t largeblock; + /* WRITE_EMBEDDED records of type DATA are permitted */ boolean_t embed_data; } sendflags_t; Modified: stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Mon Dec 22 20:53:45 2014 (r276080) +++ stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Mon Dec 22 20:58:51 2014 (r276081) @@ -1080,21 +1080,36 @@ zfs_valid_proplist(libzfs_handle_t *hdl, break; } - case ZFS_PROP_RECORDSIZE: case ZFS_PROP_VOLBLOCKSIZE: - /* must be power of two within SPA_{MIN,MAX}BLOCKSIZE */ + case ZFS_PROP_RECORDSIZE: + { + int maxbs = SPA_MAXBLOCKSIZE; + if (zhp != NULL) { + maxbs = zpool_get_prop_int(zhp->zpool_hdl, + ZPOOL_PROP_MAXBLOCKSIZE, NULL); + } + /* + * Volumes are limited to a volblocksize of 128KB, + * because they typically service workloads with + * small random writes, which incur a large performance + * penalty with large blocks. + */ + if (prop == ZFS_PROP_VOLBLOCKSIZE) + maxbs = SPA_OLD_MAXBLOCKSIZE; + /* + * The value must be a power of two between + * SPA_MINBLOCKSIZE and maxbs. + */ if (intval < SPA_MINBLOCKSIZE || - intval > SPA_MAXBLOCKSIZE || !ISP2(intval)) { + intval > maxbs || !ISP2(intval)) { zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, - "'%s' must be power of 2 from %u " - "to %uk"), propname, - (uint_t)SPA_MINBLOCKSIZE, - (uint_t)SPA_MAXBLOCKSIZE >> 10); + "'%s' must be power of 2 from 512B " + "to %uKB"), propname, maxbs >> 10); (void) zfs_error(hdl, EZFS_BADPROP, errbuf); goto error; } break; - + } case ZFS_PROP_MLSLABEL: { #ifdef sun @@ -1465,7 +1480,9 @@ zfs_setprop_error(libzfs_handle_t *hdl, break; case ERANGE: - if (prop == ZFS_PROP_COMPRESSION) { + case EDOM: + if (prop == ZFS_PROP_COMPRESSION || + prop == ZFS_PROP_RECORDSIZE) { (void) zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, "property setting is not allowed on " "bootable datasets")); @@ -3191,9 +3208,7 @@ zfs_create(libzfs_handle_t *hdl, const c case EDOM: zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, "volume block size must be power of 2 from " - "%u to %uk"), - (uint_t)SPA_MINBLOCKSIZE, - (uint_t)SPA_MAXBLOCKSIZE >> 10); + "512B to 128KB")); return (zfs_error(hdl, EZFS_BADPROP, errbuf)); Modified: stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c Mon Dec 22 20:53:45 2014 (r276080) +++ stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c Mon Dec 22 20:58:51 2014 (r276081) @@ -215,7 +215,7 @@ static void * cksummer(void *arg) { dedup_arg_t *dda = arg; - char *buf = malloc(1<<20); + char *buf = zfs_alloc(dda->dedup_hdl, SPA_MAXBLOCKSIZE); dmu_replay_record_t thedrr; dmu_replay_record_t *drr = &thedrr; struct drr_begin *drrb = &thedrr.drr_u.drr_begin; @@ -280,9 +280,9 @@ cksummer(void *arg) DMU_COMPOUNDSTREAM && drr->drr_payloadlen != 0) { int sz = drr->drr_payloadlen; - if (sz > 1<<20) { - free(buf); - buf = malloc(sz); + if (sz > SPA_MAXBLOCKSIZE) { + buf = zfs_realloc(dda->dedup_hdl, buf, + SPA_MAXBLOCKSIZE, sz); } (void) ssread(buf, sz, ofp); if (ferror(stdin)) @@ -815,7 +815,7 @@ typedef struct send_dump_data { char prevsnap[ZFS_MAXNAMELEN]; uint64_t prevsnap_obj; boolean_t seenfrom, seento, replicate, doall, fromorigin; - boolean_t verbose, dryrun, parsable, progress, embed_data; + boolean_t verbose, dryrun, parsable, progress, embed_data, large_block; int outfd; boolean_t err; nvlist_t *fss; @@ -1163,6 +1163,8 @@ dump_snapshot(zfs_handle_t *zhp, void *a } enum lzc_send_flags flags = 0; + if (sdd->large_block) + flags |= LZC_SEND_FLAG_LARGE_BLOCK; if (sdd->embed_data) flags |= LZC_SEND_FLAG_EMBED_DATA; @@ -1511,6 +1513,7 @@ zfs_send(zfs_handle_t *zhp, const char * sdd.parsable = flags->parsable; sdd.progress = flags->progress; sdd.dryrun = flags->dryrun; + sdd.large_block = flags->largeblock; sdd.embed_data = flags->embed_data; sdd.filter_cb = filter_func; sdd.filter_cb_arg = cb_arg; @@ -2545,7 +2548,7 @@ static int recv_skip(libzfs_handle_t *hdl, int fd, boolean_t byteswap) { dmu_replay_record_t *drr; - void *buf = malloc(1<<20); + void *buf = zfs_alloc(hdl, SPA_MAXBLOCKSIZE); char errbuf[1024]; (void) snprintf(errbuf, sizeof (errbuf), dgettext(TEXT_DOMAIN, Modified: stable/10/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.c Mon Dec 22 20:53:45 2014 (r276080) +++ stable/10/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.c Mon Dec 22 20:58:51 2014 (r276081) @@ -502,6 +502,10 @@ lzc_get_holds(const char *snapname, nvli * * "fd" is the file descriptor to write the send stream to. * + * If "flags" contains LZC_SEND_FLAG_LARGE_BLOCK, the stream is permitted + * to contain DRR_WRITE records with drr_length > 128K, and DRR_OBJECT + * records with drr_blksz > 128K. + * * If "flags" contains LZC_SEND_FLAG_EMBED_DATA, the stream is permitted * to contain DRR_WRITE_EMBEDDED records with drr_etype==BP_EMBEDDED_TYPE_DATA, * which the receiving system must support (as indicated by support @@ -518,6 +522,8 @@ lzc_send(const char *snapname, const cha fnvlist_add_int32(args, "fd", fd); if (from != NULL) fnvlist_add_string(args, "fromsnap", from); + if (flags & LZC_SEND_FLAG_LARGE_BLOCK) + fnvlist_add_boolean(args, "largeblockok"); if (flags & LZC_SEND_FLAG_EMBED_DATA) fnvlist_add_boolean(args, "embedok"); err = lzc_ioctl(ZFS_IOC_SEND_NEW, snapname, args, NULL); Modified: stable/10/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.h ============================================================================== --- stable/10/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.h Mon Dec 22 20:53:45 2014 (r276080) +++ stable/10/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.h Mon Dec 22 20:58:51 2014 (r276081) @@ -54,7 +54,8 @@ int lzc_release(nvlist_t *, nvlist_t **) int lzc_get_holds(const char *, nvlist_t **); enum lzc_send_flags { - LZC_SEND_FLAG_EMBED_DATA = 1 << 0 + LZC_SEND_FLAG_EMBED_DATA = 1 << 0, + LZC_SEND_FLAG_LARGE_BLOCK = 1 << 1 }; int lzc_send(const char *, const char *, int, enum lzc_send_flags); Modified: stable/10/sys/boot/zfs/zfsimpl.c ============================================================================== --- stable/10/sys/boot/zfs/zfsimpl.c Mon Dec 22 20:53:45 2014 (r276080) +++ stable/10/sys/boot/zfs/zfsimpl.c Mon Dec 22 20:58:51 2014 (r276081) @@ -57,6 +57,7 @@ static const char *features_for_read[] = "com.delphix:hole_birth", "com.delphix:extensible_dataset", "com.delphix:embedded_data", + "org.open-zfs:large_blocks", NULL }; @@ -1222,6 +1223,11 @@ dnode_read(const spa_t *spa, const dnode int nlevels = dnode->dn_nlevels; int i, rc; + if (bsize > SPA_MAXBLOCKSIZE) { + printf("ZFS: I/O error - blocks larger than 128K are not supported\n"); + return (EIO); + } + /* * Note: bsize may not be a power of two here so we need to do an * actual divide rather than a bitshift. Modified: stable/10/sys/cddl/boot/zfs/zfsimpl.h ============================================================================== --- stable/10/sys/cddl/boot/zfs/zfsimpl.h Mon Dec 22 20:53:45 2014 (r276080) +++ stable/10/sys/cddl/boot/zfs/zfsimpl.h Mon Dec 22 20:58:51 2014 (r276081) @@ -113,17 +113,14 @@ #define BSWAP_64(x) ((BSWAP_32(x) << 32) | BSWAP_32((x) >> 32)) /* - * We currently support nine block sizes, from 512 bytes to 128K. - * We could go higher, but the benefits are near-zero and the cost - * of COWing a giant block to modify one byte would become excessive. + * Note: the boot loader can't actually read blocks larger than 128KB, + * due to lack of memory. Therefore its SPA_MAXBLOCKSIZE is still 128KB. */ #define SPA_MINBLOCKSHIFT 9 #define SPA_MAXBLOCKSHIFT 17 #define SPA_MINBLOCKSIZE (1ULL << SPA_MINBLOCKSHIFT) #define SPA_MAXBLOCKSIZE (1ULL << SPA_MAXBLOCKSHIFT) -#define SPA_BLOCKSIZES (SPA_MAXBLOCKSHIFT - SPA_MINBLOCKSHIFT + 1) - /* * The DVA size encodings for LSIZE and PSIZE support blocks up to 32MB. * The ASIZE encoding should be at least 64 times larger (6 more bits) Modified: stable/10/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.c Mon Dec 22 20:53:45 2014 (r276080) +++ stable/10/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.c Mon Dec 22 20:58:51 2014 (r276081) @@ -56,7 +56,8 @@ valid_char(char c, boolean_t after_colon { return ((c >= 'a' && c <= 'z') || (c >= '0' && c <= '9') || - c == (after_colon ? '_' : '.')); + (after_colon && c == '_') || + (!after_colon && (c == '.' || c == '-'))); } /* @@ -220,4 +221,13 @@ zpool_feature_init(void) "com.delphix:embedded_data", "embedded_data", "Blocks which compress very well use even less space.", B_FALSE, B_TRUE, B_TRUE, NULL); + + static const spa_feature_t large_blocks_deps[] = { + SPA_FEATURE_EXTENSIBLE_DATASET, + SPA_FEATURE_NONE + }; + zfeature_register(SPA_FEATURE_LARGE_BLOCKS, + "org.open-zfs:large_blocks", "large_blocks", + "Support for blocks larger than 128KB.", B_FALSE, B_FALSE, B_FALSE, + large_blocks_deps); } Modified: stable/10/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.h Mon Dec 22 20:53:45 2014 (r276080) +++ stable/10/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.h Mon Dec 22 20:58:51 2014 (r276081) @@ -50,6 +50,7 @@ typedef enum spa_feature { SPA_FEATURE_EMBEDDED_DATA, SPA_FEATURE_BOOKMARKS, SPA_FEATURE_FS_SS_LIMIT, + SPA_FEATURE_LARGE_BLOCKS, SPA_FEATURES } spa_feature_t; Modified: stable/10/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c Mon Dec 22 20:53:45 2014 (r276080) +++ stable/10/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c Mon Dec 22 20:58:51 2014 (r276081) @@ -409,8 +409,8 @@ zfs_prop_init(void) /* inherit number properties */ zprop_register_number(ZFS_PROP_RECORDSIZE, "recordsize", - SPA_MAXBLOCKSIZE, PROP_INHERIT, - ZFS_TYPE_FILESYSTEM, "512 to 128k, power of 2", "RECSIZE"); + SPA_OLD_MAXBLOCKSIZE, PROP_INHERIT, + ZFS_TYPE_FILESYSTEM, "512 to 1M, power of 2", "RECSIZE"); /* hidden properties */ zprop_register_hidden(ZFS_PROP_CREATETXG, "createtxg", PROP_TYPE_NUMBER, Modified: stable/10/sys/cddl/contrib/opensolaris/common/zfs/zpool_prop.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/common/zfs/zpool_prop.c Mon Dec 22 20:53:45 2014 (r276080) +++ stable/10/sys/cddl/contrib/opensolaris/common/zfs/zpool_prop.c Mon Dec 22 20:58:51 2014 (r276081) @@ -127,6 +127,8 @@ zpool_prop_init(void) /* hidden properties */ zprop_register_hidden(ZPOOL_PROP_NAME, "name", PROP_TYPE_STRING, PROP_READONLY, ZFS_TYPE_POOL, "NAME"); + zprop_register_hidden(ZPOOL_PROP_MAXBLOCKSIZE, "maxblocksize", + PROP_TYPE_NUMBER, PROP_READONLY, ZFS_TYPE_POOL, "MAXBLOCKSIZE"); } /* Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/bpobj.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/bpobj.c Mon Dec 22 20:53:45 2014 (r276080) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/bpobj.c Mon Dec 22 20:58:51 2014 (r276081) @@ -43,7 +43,7 @@ bpobj_alloc_empty(objset_t *os, int bloc if (!spa_feature_is_active(spa, SPA_FEATURE_EMPTY_BPOBJ)) { ASSERT0(dp->dp_empty_bpobj); dp->dp_empty_bpobj = - bpobj_alloc(os, SPA_MAXBLOCKSIZE, tx); + bpobj_alloc(os, SPA_OLD_MAXBLOCKSIZE, tx); VERIFY(zap_add(os, DMU_POOL_DIRECTORY_OBJECT, DMU_POOL_EMPTY_BPOBJ, sizeof (uint64_t), 1, @@ -396,7 +396,8 @@ bpobj_enqueue_subobj(bpobj_t *bpo, uint6 dmu_buf_will_dirty(bpo->bpo_dbuf, tx); if (bpo->bpo_phys->bpo_subobjs == 0) { bpo->bpo_phys->bpo_subobjs = dmu_object_alloc(bpo->bpo_os, - DMU_OT_BPOBJ_SUBOBJ, SPA_MAXBLOCKSIZE, DMU_OT_NONE, 0, tx); + DMU_OT_BPOBJ_SUBOBJ, SPA_OLD_MAXBLOCKSIZE, + DMU_OT_NONE, 0, tx); } dmu_object_info_t doi; Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/bptree.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/bptree.c Mon Dec 22 20:53:45 2014 (r276080) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/bptree.c Mon Dec 22 20:58:51 2014 (r276081) @@ -65,7 +65,7 @@ bptree_alloc(objset_t *os, dmu_tx_t *tx) bptree_phys_t *bt; obj = dmu_object_alloc(os, DMU_OTN_UINT64_METADATA, - SPA_MAXBLOCKSIZE, DMU_OTN_UINT64_METADATA, + SPA_OLD_MAXBLOCKSIZE, DMU_OTN_UINT64_METADATA, sizeof (bptree_phys_t), tx); /* Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Mon Dec 22 20:53:45 2014 (r276080) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Mon Dec 22 20:58:51 2014 (r276081) @@ -2022,10 +2022,8 @@ dbuf_spill_set_blksz(dmu_buf_t *db_fake, return (SET_ERROR(ENOTSUP)); if (blksz == 0) blksz = SPA_MINBLOCKSIZE; - if (blksz > SPA_MAXBLOCKSIZE) - blksz = SPA_MAXBLOCKSIZE; - else - blksz = P2ROUNDUP(blksz, SPA_MINBLOCKSIZE); + ASSERT3U(blksz, <=, spa_maxblocksize(dmu_objset_spa(db->db_objset))); + blksz = P2ROUNDUP(blksz, SPA_MINBLOCKSIZE); DB_DNODE_ENTER(db); dn = DB_DNODE(db); Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c Mon Dec 22 20:53:45 2014 (r276080) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c Mon Dec 22 20:58:51 2014 (r276081) @@ -255,6 +255,14 @@ logbias_changed_cb(void *arg, uint64_t n zil_set_logbias(os->os_zil, newval); } +static void +recordsize_changed_cb(void *arg, uint64_t newval) +{ + objset_t *os = arg; + + os->os_recordsize = newval; +} + void dmu_objset_byteswap(void *buf, size_t size) { @@ -384,6 +392,11 @@ dmu_objset_open_impl(spa_t *spa, dsl_dat ZFS_PROP_REDUNDANT_METADATA), redundant_metadata_changed_cb, os); } + if (err == 0) { + err = dsl_prop_register(ds, + zfs_prop_to_name(ZFS_PROP_RECORDSIZE), + recordsize_changed_cb, os); + } } if (err != 0) { VERIFY(arc_buf_remove_ref(os->os_phys_buf, @@ -642,6 +655,9 @@ dmu_objset_evict(objset_t *os) VERIFY0(dsl_prop_unregister(ds, zfs_prop_to_name(ZFS_PROP_REDUNDANT_METADATA), redundant_metadata_changed_cb, os)); + VERIFY0(dsl_prop_unregister(ds, + zfs_prop_to_name(ZFS_PROP_RECORDSIZE), + recordsize_changed_cb, os)); } VERIFY0(dsl_prop_unregister(ds, zfs_prop_to_name(ZFS_PROP_PRIMARYCACHE), Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Mon Dec 22 20:53:45 2014 (r276080) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Mon Dec 22 20:58:51 2014 (r276081) @@ -227,11 +227,12 @@ dump_write(dmu_sendarg_t *dsp, dmu_objec drrw->drr_offset = offset; drrw->drr_length = blksz; drrw->drr_toguid = dsp->dsa_toguid; - if (BP_IS_EMBEDDED(bp)) { + if (bp == NULL || BP_IS_EMBEDDED(bp)) { /* - * There's no pre-computed checksum of embedded BP's, so - * (like fletcher4-checkummed blocks) userland will have - * to compute a dedup-capable checksum itself. + * There's no pre-computed checksum for partial-block + * writes or embedded BP's, so (like + * fletcher4-checkummed blocks) userland will have to + * compute a dedup-capable checksum itself. */ drrw->drr_checksumtype = ZIO_CHECKSUM_OFF; } else { @@ -393,6 +394,10 @@ dump_dnode(dmu_sendarg_t *dsp, uint64_t drro->drr_compress = dnp->dn_compress; drro->drr_toguid = dsp->dsa_toguid; + if (!(dsp->dsa_featureflags & DMU_BACKUP_FEATURE_LARGE_BLOCKS) && + drro->drr_blksz > SPA_OLD_MAXBLOCKSIZE) + drro->drr_blksz = SPA_OLD_MAXBLOCKSIZE; + if (dump_bytes(dsp, dsp->dsa_drr, sizeof (dmu_replay_record_t)) != 0) return (SET_ERROR(EINTR)); @@ -512,6 +517,7 @@ backup_cb(spa_t *spa, zilog_t *zilog, co uint32_t aflags = ARC_WAIT; arc_buf_t *abuf; int blksz = BP_GET_LSIZE(bp); + uint64_t offset; ASSERT3U(blksz, ==, dnp->dn_datablkszsec << SPA_MINBLOCKSHIFT); ASSERT0(zb->zb_level); @@ -532,8 +538,24 @@ backup_cb(spa_t *spa, zilog_t *zilog, co } } - err = dump_write(dsp, type, zb->zb_object, zb->zb_blkid * blksz, - blksz, bp, abuf->b_data); + offset = zb->zb_blkid * blksz; + + if (!(dsp->dsa_featureflags & + DMU_BACKUP_FEATURE_LARGE_BLOCKS) && + blksz > SPA_OLD_MAXBLOCKSIZE) { + char *buf = abuf->b_data; + while (blksz > 0 && err == 0) { + int n = MIN(blksz, SPA_OLD_MAXBLOCKSIZE); + err = dump_write(dsp, type, zb->zb_object, + offset, n, NULL, buf); + offset += n; + buf += n; + blksz -= n; + } + } else { + err = dump_write(dsp, type, zb->zb_object, + offset, blksz, bp, abuf->b_data); + } (void) arc_buf_remove_ref(abuf, &abuf); } @@ -548,9 +570,9 @@ static int dmu_send_impl(void *tag, dsl_pool_t *dp, dsl_dataset_t *ds, zfs_bookmark_phys_t *fromzb, boolean_t is_clone, boolean_t embedok, #ifdef illumos - int outfd, vnode_t *vp, offset_t *off) + boolean_t large_block_ok, int outfd, vnode_t *vp, offset_t *off) #else - int outfd, struct file *fp, offset_t *off) + boolean_t large_block_ok, int outfd, struct file *fp, offset_t *off) #endif { objset_t *os; @@ -586,6 +608,8 @@ dmu_send_impl(void *tag, dsl_pool_t *dp, } #endif + if (large_block_ok && ds->ds_large_blocks) + featureflags |= DMU_BACKUP_FEATURE_LARGE_BLOCKS; if (embedok && spa_feature_is_active(dp->dp_spa, SPA_FEATURE_EMBEDDED_DATA)) { featureflags |= DMU_BACKUP_FEATURE_EMBED_DATA; @@ -682,10 +706,11 @@ out: int dmu_send_obj(const char *pool, uint64_t tosnap, uint64_t fromsnap, + boolean_t embedok, boolean_t large_block_ok, #ifdef illumos - boolean_t embedok, int outfd, vnode_t *vp, offset_t *off) + int outfd, vnode_t *vp, offset_t *off) #else - boolean_t embedok, int outfd, struct file *fp, offset_t *off) + int outfd, struct file *fp, offset_t *off) #endif { dsl_pool_t *dp; @@ -720,18 +745,19 @@ dmu_send_obj(const char *pool, uint64_t zb.zbm_guid = fromds->ds_phys->ds_guid; is_clone = (fromds->ds_dir != ds->ds_dir); dsl_dataset_rele(fromds, FTAG); - err = dmu_send_impl(FTAG, dp, ds, &zb, is_clone, embedok, - outfd, fp, off); + err = dmu_send_impl(FTAG, dp, ds, &zb, is_clone, + embedok, large_block_ok, outfd, fp, off); } else { - err = dmu_send_impl(FTAG, dp, ds, NULL, B_FALSE, embedok, - outfd, fp, off); + err = dmu_send_impl(FTAG, dp, ds, NULL, B_FALSE, + embedok, large_block_ok, outfd, fp, off); } dsl_dataset_rele(ds, FTAG); return (err); } int -dmu_send(const char *tosnap, const char *fromsnap, boolean_t embedok, +dmu_send(const char *tosnap, const char *fromsnap, + boolean_t embedok, boolean_t large_block_ok, #ifdef illumos int outfd, vnode_t *vp, offset_t *off) #else @@ -802,11 +828,11 @@ dmu_send(const char *tosnap, const char dsl_pool_rele(dp, FTAG); return (err); } - err = dmu_send_impl(FTAG, dp, ds, &zb, is_clone, embedok, - outfd, fp, off); + err = dmu_send_impl(FTAG, dp, ds, &zb, is_clone, + embedok, large_block_ok, outfd, fp, off); } else { - err = dmu_send_impl(FTAG, dp, ds, NULL, B_FALSE, embedok, - outfd, fp, off); + err = dmu_send_impl(FTAG, dp, ds, NULL, B_FALSE, + embedok, large_block_ok, outfd, fp, off); } if (owned) dsl_dataset_disown(ds, FTAG); @@ -1006,6 +1032,15 @@ dmu_recv_begin_check(void *arg, dmu_tx_t !spa_feature_is_enabled(dp->dp_spa, SPA_FEATURE_LZ4_COMPRESS)) return (SET_ERROR(ENOTSUP)); + /* + * The receiving code doesn't know how to translate large blocks + * to smaller ones, so the pool must have the LARGE_BLOCKS + * feature enabled if the stream has LARGE_BLOCKS. + */ + if ((featureflags & DMU_BACKUP_FEATURE_LARGE_BLOCKS) && + !spa_feature_is_enabled(dp->dp_spa, SPA_FEATURE_LARGE_BLOCKS)) + return (SET_ERROR(ENOTSUP)); + error = dsl_dataset_hold(dp, tofs, FTAG, &ds); if (error == 0) { /* target fs already exists; recv into temp clone */ @@ -1131,6 +1166,13 @@ dmu_recv_begin_sync(void *arg, dmu_tx_t } VERIFY0(dsl_dataset_own_obj(dp, dsobj, dmu_recv_tag, &newds)); + if ((DMU_GET_FEATUREFLAGS(drrb->drr_versioninfo) & + DMU_BACKUP_FEATURE_LARGE_BLOCKS) && + !newds->ds_large_blocks) { + dsl_dataset_activate_large_blocks_sync_impl(dsobj, tx); + newds->ds_large_blocks = B_TRUE; + } + dmu_buf_will_dirty(newds->ds_dbuf, tx); newds->ds_phys->ds_flags |= DS_FLAG_INCONSISTENT; @@ -1283,6 +1325,7 @@ restore_read(struct restorearg *ra, int /* some things will require 8-byte alignment, so everything must */ ASSERT0(len % 8); + ASSERT3U(len, <=, ra->bufsize); while (done < len) { ssize_t resid; @@ -1420,7 +1463,7 @@ restore_object(struct restorearg *ra, ob drro->drr_compress >= ZIO_COMPRESS_FUNCTIONS || P2PHASE(drro->drr_blksz, SPA_MINBLOCKSIZE) || drro->drr_blksz < SPA_MINBLOCKSIZE || - drro->drr_blksz > SPA_MAXBLOCKSIZE || + drro->drr_blksz > spa_maxblocksize(dmu_objset_spa(os)) || drro->drr_bonuslen > DN_MAX_BONUSLEN) { return (SET_ERROR(EINVAL)); } @@ -1693,7 +1736,7 @@ restore_spill(struct restorearg *ra, obj int err; if (drrs->drr_length < SPA_MINBLOCKSIZE || - drrs->drr_length > SPA_MAXBLOCKSIZE) + drrs->drr_length > spa_maxblocksize(dmu_objset_spa(os))) return (SET_ERROR(EINVAL)); data = restore_read(ra, drrs->drr_length, NULL); @@ -1781,7 +1824,7 @@ dmu_recv_stream(dmu_recv_cookie_t *drc, ra.td = curthread; ra.fp = fp; ra.voff = *voffp; - ra.bufsize = 1<<20; + ra.bufsize = SPA_MAXBLOCKSIZE; ra.buf = kmem_alloc(ra.bufsize, KM_SLEEP); /* these were verified in dmu_recv_begin */ Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c Mon Dec 22 20:53:45 2014 (r276080) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c Mon Dec 22 20:58:51 2014 (r276081) @@ -224,7 +224,7 @@ dmu_tx_count_write(dmu_tx_hold_t *txh, u return; min_bs = SPA_MINBLOCKSHIFT; - max_bs = SPA_MAXBLOCKSHIFT; + max_bs = highbit64(txh->txh_tx->tx_objset->os_recordsize) - 1; min_ibs = DN_MIN_INDBLKSHIFT; max_ibs = DN_MAX_INDBLKSHIFT; @@ -293,6 +293,14 @@ dmu_tx_count_write(dmu_tx_hold_t *txh, u */ ASSERT(dn->dn_datablkshift != 0); min_bs = max_bs = dn->dn_datablkshift; + } else { + /* + * The blocksize can increase up to the recordsize, + * or if it is already more than the recordsize, + * up to the next power of 2. + */ + min_bs = highbit64(dn->dn_datablksz - 1); + max_bs = MAX(max_bs, highbit64(dn->dn_datablksz - 1)); } /* @@ -751,11 +759,11 @@ dmu_tx_hold_zap(dmu_tx_t *tx, uint64_t o bp = &dn->dn_phys->dn_blkptr[0]; if (dsl_dataset_block_freeable(dn->dn_objset->os_dsl_dataset, bp, bp->blk_birth)) - txh->txh_space_tooverwrite += SPA_MAXBLOCKSIZE; + txh->txh_space_tooverwrite += MZAP_MAX_BLKSZ; else - txh->txh_space_towrite += SPA_MAXBLOCKSIZE; + txh->txh_space_towrite += MZAP_MAX_BLKSZ; if (!BP_IS_HOLE(bp)) - txh->txh_space_tounref += SPA_MAXBLOCKSIZE; + txh->txh_space_tounref += MZAP_MAX_BLKSZ; return; } @@ -1549,18 +1557,18 @@ dmu_tx_hold_spill(dmu_tx_t *tx, uint64_t /* If blkptr doesn't exist then add space to towrite */ if (!(dn->dn_phys->dn_flags & DNODE_FLAG_SPILL_BLKPTR)) { - txh->txh_space_towrite += SPA_MAXBLOCKSIZE; + txh->txh_space_towrite += SPA_OLD_MAXBLOCKSIZE; } else { blkptr_t *bp; bp = &dn->dn_phys->dn_spill; if (dsl_dataset_block_freeable(dn->dn_objset->os_dsl_dataset, bp, bp->blk_birth)) - txh->txh_space_tooverwrite += SPA_MAXBLOCKSIZE; + txh->txh_space_tooverwrite += SPA_OLD_MAXBLOCKSIZE; else - txh->txh_space_towrite += SPA_MAXBLOCKSIZE; + txh->txh_space_towrite += SPA_OLD_MAXBLOCKSIZE; if (!BP_IS_HOLE(bp)) - txh->txh_space_tounref += SPA_MAXBLOCKSIZE; + txh->txh_space_tounref += SPA_OLD_MAXBLOCKSIZE; } } Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c Mon Dec 22 20:53:45 2014 (r276080) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c Mon Dec 22 20:58:51 2014 (r276081) @@ -513,10 +513,10 @@ dnode_allocate(dnode_t *dn, dmu_object_t { int i; + ASSERT3U(blocksize, <=, + spa_maxblocksize(dmu_objset_spa(dn->dn_objset))); if (blocksize == 0) blocksize = 1 << zfs_default_bs; - else if (blocksize > SPA_MAXBLOCKSIZE) - blocksize = SPA_MAXBLOCKSIZE; else blocksize = P2ROUNDUP(blocksize, SPA_MINBLOCKSIZE); @@ -597,7 +597,8 @@ dnode_reallocate(dnode_t *dn, dmu_object int nblkptr; ASSERT3U(blocksize, >=, SPA_MINBLOCKSIZE); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Dec 22 21:06:28 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 30DD1A74; Mon, 22 Dec 2014 21:06:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1BF98138B; Mon, 22 Dec 2014 21:06:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBML6Rv3060042; Mon, 22 Dec 2014 21:06:27 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBML6Raj060041; Mon, 22 Dec 2014 21:06:27 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201412222106.sBML6Raj060041@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 22 Dec 2014 21:06:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276082 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Dec 2014 21:06:28 -0000 Author: delphij Date: Mon Dec 22 21:06:26 2014 New Revision: 276082 URL: https://svnweb.freebsd.org/changeset/base/276082 Log: MFC r275530: Use %d instead of %u for error number. This way we see ERESTART as -1 not 4294967295 when doing DTrace. Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Mon Dec 22 20:58:51 2014 (r276081) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Mon Dec 22 21:06:26 2014 (r276082) @@ -1492,7 +1492,7 @@ dsl_scan_sync(dsl_pool_t *dp, dmu_tx_t * } if (scn->scn_visited_this_txg) { zfs_dbgmsg("freed %llu blocks in %llums from " - "free_bpobj/bptree txg %llu; err=%u", + "free_bpobj/bptree txg %llu; err=%d", (longlong_t)scn->scn_visited_this_txg, (longlong_t) NSEC2MSEC(gethrtime() - scn->scn_sync_start_time), From owner-svn-src-all@FreeBSD.ORG Mon Dec 22 21:26:51 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 35BB823A; Mon, 22 Dec 2014 21:26:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 21BBA17E7; Mon, 22 Dec 2014 21:26:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBMLQpYF070014; Mon, 22 Dec 2014 21:26:51 GMT (envelope-from marck@FreeBSD.org) Received: (from marck@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBMLQo7w070013; Mon, 22 Dec 2014 21:26:50 GMT (envelope-from marck@FreeBSD.org) Message-Id: <201412222126.sBMLQo7w070013@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marck set sender to marck@FreeBSD.org using -f From: Dmitry Morozovsky Date: Mon, 22 Dec 2014 21:26:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276083 - head/etc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Dec 2014 21:26:51 -0000 Author: marck (doc committer) Date: Mon Dec 22 21:26:49 2014 New Revision: 276083 URL: https://svnweb.freebsd.org/changeset/base/276083 Log: Add VAMI (VMware Appliance Management Interface) port. Reviewed by: eadler MFC after: 2 weeks Modified: head/etc/services Modified: head/etc/services ============================================================================== --- head/etc/services Mon Dec 22 21:06:26 2014 (r276082) +++ head/etc/services Mon Dec 22 21:26:49 2014 (r276083) @@ -2345,6 +2345,8 @@ mdns 5353/tcp #Multicast DNS mdns 5353/udp #Multicast DNS postgresql 5432/tcp #PostgreSQL Database postgresql 5432/udp #PostgreSQL Database +vami 5480/tcp #VMware Appliance Management Interface, HTTPS-like +vami 5480/udp #VMware Appliance Management Interface, HTTPS-like rplay 5555/udp amqp 5672/sctp #AMQP amqp 5672/tcp #AMQP From owner-svn-src-all@FreeBSD.ORG Mon Dec 22 21:32:44 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AAA075C7; Mon, 22 Dec 2014 21:32:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 941C01925; Mon, 22 Dec 2014 21:32:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBMLWiDU074555; Mon, 22 Dec 2014 21:32:44 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBMLWecl074522; Mon, 22 Dec 2014 21:32:40 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201412222132.sBMLWecl074522@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 22 Dec 2014 21:32:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276084 - in stable/10/sys: amd64/amd64 i386/i386 i386/include i386/isa i386/linux x86/acpica X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Dec 2014 21:32:44 -0000 Author: jhb Date: Mon Dec 22 21:32:39 2014 New Revision: 276084 URL: https://svnweb.freebsd.org/changeset/base/276084 Log: MFC 273988,273989,273995,274057: MFamd64: Add support for extended FPU states on i386. This includes support for AVX on i386. Modified: stable/10/sys/amd64/amd64/genassym.c stable/10/sys/amd64/amd64/sys_machdep.c stable/10/sys/amd64/amd64/vm_machdep.c stable/10/sys/i386/i386/genassym.c stable/10/sys/i386/i386/initcpu.c stable/10/sys/i386/i386/locore.s stable/10/sys/i386/i386/machdep.c stable/10/sys/i386/i386/mp_machdep.c stable/10/sys/i386/i386/ptrace_machdep.c stable/10/sys/i386/i386/sys_machdep.c stable/10/sys/i386/i386/trap.c stable/10/sys/i386/i386/vm_machdep.c stable/10/sys/i386/include/cpufunc.h stable/10/sys/i386/include/md_var.h stable/10/sys/i386/include/npx.h stable/10/sys/i386/include/pcb.h stable/10/sys/i386/isa/npx.c stable/10/sys/i386/linux/linux_ptrace.c stable/10/sys/x86/acpica/acpi_wakeup.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/amd64/genassym.c ============================================================================== --- stable/10/sys/amd64/amd64/genassym.c Mon Dec 22 21:26:49 2014 (r276083) +++ stable/10/sys/amd64/amd64/genassym.c Mon Dec 22 21:32:39 2014 (r276084) @@ -156,8 +156,6 @@ ASSYM(PCB_ONFAULT, offsetof(struct pcb, ASSYM(PCB_GS32SD, offsetof(struct pcb, pcb_gs32sd)); ASSYM(PCB_TSSP, offsetof(struct pcb, pcb_tssp)); ASSYM(PCB_SAVEFPU, offsetof(struct pcb, pcb_save)); -ASSYM(PCB_SAVEFPU_SIZE, sizeof(struct savefpu)); -ASSYM(PCB_USERFPU, sizeof(struct pcb)); ASSYM(PCB_EFER, offsetof(struct pcb, pcb_efer)); ASSYM(PCB_STAR, offsetof(struct pcb, pcb_star)); ASSYM(PCB_LSTAR, offsetof(struct pcb, pcb_lstar)); Modified: stable/10/sys/amd64/amd64/sys_machdep.c ============================================================================== --- stable/10/sys/amd64/amd64/sys_machdep.c Mon Dec 22 21:26:49 2014 (r276083) +++ stable/10/sys/amd64/amd64/sys_machdep.c Mon Dec 22 21:32:39 2014 (r276084) @@ -320,7 +320,7 @@ sysarch(td, uap) fpugetregs(td); error = copyout((char *)(get_pcb_user_save_td(td) + 1), a64xfpu.addr, a64xfpu.len); - return (error); + break; default: error = EINVAL; Modified: stable/10/sys/amd64/amd64/vm_machdep.c ============================================================================== --- stable/10/sys/amd64/amd64/vm_machdep.c Mon Dec 22 21:26:49 2014 (r276083) +++ stable/10/sys/amd64/amd64/vm_machdep.c Mon Dec 22 21:32:39 2014 (r276084) @@ -127,7 +127,7 @@ get_pcb_td(struct thread *td) void * alloc_fpusave(int flags) { - struct pcb *res; + void *res; struct savefpu_ymm *sf; res = malloc(cpu_max_ext_state_size, M_DEVBUF, flags); Modified: stable/10/sys/i386/i386/genassym.c ============================================================================== --- stable/10/sys/i386/i386/genassym.c Mon Dec 22 21:26:49 2014 (r276083) +++ stable/10/sys/i386/i386/genassym.c Mon Dec 22 21:32:39 2014 (r276084) @@ -144,7 +144,6 @@ ASSYM(PCB_DR2, offsetof(struct pcb, pcb_ ASSYM(PCB_DR3, offsetof(struct pcb, pcb_dr3)); ASSYM(PCB_DR6, offsetof(struct pcb, pcb_dr6)); ASSYM(PCB_DR7, offsetof(struct pcb, pcb_dr7)); -ASSYM(PCB_USERFPU, offsetof(struct pcb, pcb_user_save)); ASSYM(PCB_PSL, offsetof(struct pcb, pcb_psl)); ASSYM(PCB_DBREGS, PCB_DBREGS); ASSYM(PCB_EXT, offsetof(struct pcb, pcb_ext)); @@ -154,7 +153,6 @@ ASSYM(PCB_GSD, offsetof(struct pcb, pcb_ ASSYM(PCB_VM86, offsetof(struct pcb, pcb_vm86)); ASSYM(PCB_FLAGS, offsetof(struct pcb, pcb_flags)); ASSYM(PCB_SAVEFPU, offsetof(struct pcb, pcb_save)); -ASSYM(PCB_SAVEFPU_SIZE, sizeof(union savefpu)); ASSYM(PCB_ONFAULT, offsetof(struct pcb, pcb_onfault)); ASSYM(PCB_SIZE, sizeof(struct pcb)); Modified: stable/10/sys/i386/i386/initcpu.c ============================================================================== --- stable/10/sys/i386/i386/initcpu.c Mon Dec 22 21:26:49 2014 (r276083) +++ stable/10/sys/i386/i386/initcpu.c Mon Dec 22 21:32:39 2014 (r276084) @@ -102,6 +102,7 @@ u_int cpu_mxcsr_mask; /* Valid bits in #endif u_int cpu_clflush_line_size = 32; u_int cpu_stdext_feature; +u_int cpu_max_ext_state_size; u_int cpu_mon_mwait_flags; /* MONITOR/MWAIT flags (CPUID.05H.ECX) */ u_int cpu_mon_min_size; /* MONITOR minimum range size, bytes */ u_int cpu_mon_max_size; /* MONITOR minimum range size, bytes */ Modified: stable/10/sys/i386/i386/locore.s ============================================================================== --- stable/10/sys/i386/i386/locore.s Mon Dec 22 21:26:49 2014 (r276083) +++ stable/10/sys/i386/i386/locore.s Mon Dec 22 21:32:39 2014 (r276084) @@ -302,17 +302,14 @@ NON_GPROF_ENTRY(btext) begin: /* set up bootstrap stack */ movl proc0kstack,%eax /* location of in-kernel stack */ - /* bootstrap stack end location */ - leal (KSTACK_PAGES*PAGE_SIZE-PCB_SIZE)(%eax),%esp - xorl %ebp,%ebp /* mark end of frames */ + /* + * Only use bottom page for init386(). init386() calculates the + * PCB + FPU save area size and returns the true top of stack. + */ + leal PAGE_SIZE(%eax),%esp -#ifdef PAE - movl IdlePDPT,%esi -#else - movl IdlePTD,%esi -#endif - movl %esi,(KSTACK_PAGES*PAGE_SIZE-PCB_SIZE+PCB_CR3)(%eax) + xorl %ebp,%ebp /* mark end of frames */ pushl physfree /* value of first for init386(first) */ call init386 /* wire 386 chip for unix operation */ @@ -324,6 +321,9 @@ begin: */ addl $4,%esp + /* Switch to true top of stack. */ + movl %eax,%esp + call mi_startup /* autoconfiguration, mountroot etc */ /* NOTREACHED */ addl $0,%esp /* for db_numargs() again */ Modified: stable/10/sys/i386/i386/machdep.c ============================================================================== --- stable/10/sys/i386/i386/machdep.c Mon Dec 22 21:26:49 2014 (r276083) +++ stable/10/sys/i386/i386/machdep.c Mon Dec 22 21:32:39 2014 (r276084) @@ -179,7 +179,7 @@ extern unsigned long physfree; /* Sanity check for __curthread() */ CTASSERT(offsetof(struct pcpu, pc_curthread) == 0); -extern void init386(int first); +extern register_t init386(int first); extern void dblfault_handler(void); #define CS_SECURE(cs) (ISPL(cs) == SEL_UPL) @@ -191,8 +191,10 @@ extern void dblfault_handler(void); static void cpu_startup(void *); static void fpstate_drop(struct thread *td); -static void get_fpcontext(struct thread *td, mcontext_t *mcp); -static int set_fpcontext(struct thread *td, const mcontext_t *mcp); +static void get_fpcontext(struct thread *td, mcontext_t *mcp, + char *xfpusave, size_t xfpusave_len); +static int set_fpcontext(struct thread *td, const mcontext_t *mcp, + char *xfpustate, size_t xfpustate_len); #ifdef CPU_ENABLE_SSE static void set_fpregs_xmm(struct save87 *, struct savexmm *); static void fill_fpregs_xmm(struct savexmm *, struct save87 *); @@ -346,7 +348,7 @@ cpu_startup(dummy) * Send an interrupt to process. * * Stack is set up to allow sigcode stored - * at top to call routine, followed by kcall + * at top to call routine, followed by call * to sigreturn routine below. After sigreturn * resets the signal mask, the stack, and the * frame pointer, it returns to the user @@ -625,6 +627,8 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, char *sp; struct trapframe *regs; struct segment_descriptor *sdp; + char *xfpusave; + size_t xfpusave_len; int sig; int oonstack; @@ -649,6 +653,18 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, regs = td->td_frame; oonstack = sigonstack(regs->tf_esp); +#ifdef CPU_ENABLE_SSE + if (cpu_max_ext_state_size > sizeof(union savefpu) && use_xsave) { + xfpusave_len = cpu_max_ext_state_size - sizeof(union savefpu); + xfpusave = __builtin_alloca(xfpusave_len); + } else { +#else + { +#endif + xfpusave_len = 0; + xfpusave = NULL; + } + /* Save user context. */ bzero(&sf, sizeof(sf)); sf.sf_uc.uc_sigmask = *mask; @@ -659,7 +675,7 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, sf.sf_uc.uc_mcontext.mc_gs = rgs(); bcopy(regs, &sf.sf_uc.uc_mcontext.mc_fs, sizeof(*regs)); sf.sf_uc.uc_mcontext.mc_len = sizeof(sf.sf_uc.uc_mcontext); /* magic */ - get_fpcontext(td, &sf.sf_uc.uc_mcontext); + get_fpcontext(td, &sf.sf_uc.uc_mcontext, xfpusave, xfpusave_len); fpstate_drop(td); /* * Unconditionally fill the fsbase and gsbase into the mcontext. @@ -670,7 +686,6 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, sdp = &td->td_pcb->pcb_gsd; sf.sf_uc.uc_mcontext.mc_gsbase = sdp->sd_hibase << 24 | sdp->sd_lobase; - sf.sf_uc.uc_mcontext.mc_flags = 0; bzero(sf.sf_uc.uc_mcontext.mc_spare2, sizeof(sf.sf_uc.uc_mcontext.mc_spare2)); bzero(sf.sf_uc.__spare__, sizeof(sf.sf_uc.__spare__)); @@ -678,13 +693,19 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, /* Allocate space for the signal handler context. */ if ((td->td_pflags & TDP_ALTSTACK) != 0 && !oonstack && SIGISMEMBER(psp->ps_sigonstack, sig)) { - sp = td->td_sigstk.ss_sp + - td->td_sigstk.ss_size - sizeof(struct sigframe); + sp = td->td_sigstk.ss_sp + td->td_sigstk.ss_size; #if defined(COMPAT_43) td->td_sigstk.ss_flags |= SS_ONSTACK; #endif } else - sp = (char *)regs->tf_esp - sizeof(struct sigframe); + sp = (char *)regs->tf_esp - 128; + if (xfpusave != NULL) { + sp -= xfpusave_len; + sp = (char *)((unsigned int)sp & ~0x3F); + sf.sf_uc.uc_mcontext.mc_xfpustate = (register_t)sp; + } + sp -= sizeof(struct sigframe); + /* Align to 16 bytes. */ sfp = (struct sigframe *)((unsigned int)sp & ~0xF); @@ -745,7 +766,10 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, /* * Copy the sigframe out to the user's stack. */ - if (copyout(&sf, sfp, sizeof(*sfp)) != 0) { + if (copyout(&sf, sfp, sizeof(*sfp)) != 0 || + (xfpusave != NULL && copyout(xfpusave, + (void *)sf.sf_uc.uc_mcontext.mc_xfpustate, xfpusave_len) + != 0)) { #ifdef DEBUG printf("process %ld has trashed its stack\n", (long)p->p_pid); #endif @@ -1005,11 +1029,16 @@ sys_sigreturn(td, uap) } */ *uap; { ucontext_t uc; + struct proc *p; struct trapframe *regs; ucontext_t *ucp; + char *xfpustate; + size_t xfpustate_len; int cs, eflags, error, ret; ksiginfo_t ksi; + p = td->td_proc; + error = copyin(uap->sigcntxp, &uc, sizeof(uc)); if (error != 0) return (error); @@ -1084,7 +1113,30 @@ sys_sigreturn(td, uap) return (EINVAL); } - ret = set_fpcontext(td, &ucp->uc_mcontext); + if ((uc.uc_mcontext.mc_flags & _MC_HASFPXSTATE) != 0) { + xfpustate_len = uc.uc_mcontext.mc_xfpustate_len; + if (xfpustate_len > cpu_max_ext_state_size - + sizeof(union savefpu)) { + uprintf( + "pid %d (%s): sigreturn xfpusave_len = 0x%zx\n", + p->p_pid, td->td_name, xfpustate_len); + return (EINVAL); + } + xfpustate = __builtin_alloca(xfpustate_len); + error = copyin((const void *)uc.uc_mcontext.mc_xfpustate, + xfpustate, xfpustate_len); + if (error != 0) { + uprintf( + "pid %d (%s): sigreturn copying xfpustate failed\n", + p->p_pid, td->td_name); + return (error); + } + } else { + xfpustate = NULL; + xfpustate_len = 0; + } + ret = set_fpcontext(td, &ucp->uc_mcontext, xfpustate, + xfpustate_len); if (ret != 0) return (ret); bcopy(&ucp->uc_mcontext.mc_fs, regs, sizeof(*regs)); @@ -1575,17 +1627,9 @@ exec_setregs(struct thread *td, struct i */ reset_dbregs(); } - pcb->pcb_flags &= ~PCB_DBREGS; + pcb->pcb_flags &= ~PCB_DBREGS; } - /* - * Initialize the math emulator (if any) for the current process. - * Actually, just clear the bit that says that the emulator has - * been initialized. Initialization is delayed until the process - * traps to the emulator (if it is done at all) mainly because - * emulators don't provide an entry point for initialization. - */ - td->td_pcb->pcb_flags &= ~FP_SOFTFP; pcb->pcb_initial_npxcw = __INITIAL_NPXCW__; /* @@ -2552,14 +2596,16 @@ do_next: #ifdef XEN #define MTOPSIZE (1<<(14 + PAGE_SHIFT)) -void +register_t init386(first) int first; { unsigned long gdtmachpfn; int error, gsel_tss, metadata_missing, x, pa; - size_t kstack0_sz; struct pcpu *pc; +#ifdef CPU_ENABLE_SSE + struct xstate_hdr *xhdr; +#endif struct callback_register event = { .type = CALLBACKTYPE_event, .address = {GSEL(GCODE_SEL, SEL_KPL), (unsigned long)Xhypervisor_callback }, @@ -2571,8 +2617,6 @@ init386(first) thread0.td_kstack = proc0kstack; thread0.td_kstack_pages = KSTACK_PAGES; - kstack0_sz = thread0.td_kstack_pages * PAGE_SIZE; - thread0.td_pcb = (struct pcb *)(thread0.td_kstack + kstack0_sz) - 1; /* * This may be done better later if it gets more high level @@ -2652,7 +2696,6 @@ init386(first) PCPU_SET(prvspace, pc); PCPU_SET(curthread, &thread0); - PCPU_SET(curpcb, thread0.td_pcb); /* * Initialize mutexes. @@ -2735,15 +2778,6 @@ init386(first) initializecpu(); /* Initialize CPU registers */ initializecpucache(); - /* make an initial tss so cpu can get interrupt stack on syscall! */ - /* Note: -16 is so we can grow the trapframe if we came from vm86 */ - PCPU_SET(common_tss.tss_esp0, thread0.td_kstack + - kstack0_sz - sizeof(struct pcb) - 16); - PCPU_SET(common_tss.tss_ss0, GSEL(GDATA_SEL, SEL_KPL)); - gsel_tss = GSEL(GPROC0_SEL, SEL_KPL); - HYPERVISOR_stack_switch(GSEL(GDATA_SEL, SEL_KPL), - PCPU_GET(common_tss.tss_esp0)); - /* pointer to selector slot for %fs/%gs */ PCPU_SET(fsgs_gdt, &gdt[GUFS_SEL].sd); @@ -2771,6 +2805,32 @@ init386(first) /* now running on new page tables, configured,and u/iom is accessible */ msgbufinit(msgbufp, msgbufsize); +#ifdef DEV_NPX + npxinit(true); +#endif + /* + * Set up thread0 pcb after npxinit calculated pcb + fpu save + * area size. Zero out the extended state header in fpu save + * area. + */ + thread0.td_pcb = get_pcb_td(&thread0); + bzero(get_pcb_user_save_td(&thread0), cpu_max_ext_state_size); +#ifdef CPU_ENABLE_SSE + if (use_xsave) { + xhdr = (struct xstate_hdr *)(get_pcb_user_save_td(&thread0) + + 1); + xhdr->xstate_bv = xsave_mask; + } +#endif + PCPU_SET(curpcb, thread0.td_pcb); + /* make an initial tss so cpu can get interrupt stack on syscall! */ + /* Note: -16 is so we can grow the trapframe if we came from vm86 */ + PCPU_SET(common_tss.tss_esp0, (vm_offset_t)thread0.td_pcb - 16); + PCPU_SET(common_tss.tss_ss0, GSEL(GDATA_SEL, SEL_KPL)); + gsel_tss = GSEL(GPROC0_SEL, SEL_KPL); + HYPERVISOR_stack_switch(GSEL(GDATA_SEL, SEL_KPL), + PCPU_GET(common_tss.tss_esp0)); + /* transfer to user mode */ _ucodesel = GSEL(GUCODE_SEL, SEL_UPL); @@ -2789,22 +2849,25 @@ init386(first) thread0.td_pcb->pcb_gsd = PCPU_GET(fsgs_gdt)[1]; cpu_probe_amdc1e(); + + /* Location of kernel stack for locore */ + return ((register_t)thread0.td_pcb); } #else -void +register_t init386(first) int first; { struct gate_descriptor *gdp; int gsel_tss, metadata_missing, x, pa; - size_t kstack0_sz; struct pcpu *pc; +#ifdef CPU_ENABLE_SSE + struct xstate_hdr *xhdr; +#endif thread0.td_kstack = proc0kstack; thread0.td_kstack_pages = KSTACK_PAGES; - kstack0_sz = thread0.td_kstack_pages * PAGE_SIZE; - thread0.td_pcb = (struct pcb *)(thread0.td_kstack + kstack0_sz) - 1; /* * This may be done better later if it gets more high level @@ -2858,7 +2921,6 @@ init386(first) first += DPCPU_SIZE; PCPU_SET(prvspace, pc); PCPU_SET(curthread, &thread0); - PCPU_SET(curpcb, thread0.td_pcb); /* * Initialize mutexes. @@ -3012,17 +3074,6 @@ init386(first) initializecpu(); /* Initialize CPU registers */ initializecpucache(); - /* make an initial tss so cpu can get interrupt stack on syscall! */ - /* Note: -16 is so we can grow the trapframe if we came from vm86 */ - PCPU_SET(common_tss.tss_esp0, thread0.td_kstack + - kstack0_sz - sizeof(struct pcb) - 16); - PCPU_SET(common_tss.tss_ss0, GSEL(GDATA_SEL, SEL_KPL)); - gsel_tss = GSEL(GPROC0_SEL, SEL_KPL); - PCPU_SET(tss_gdt, &gdt[GPROC0_SEL].sd); - PCPU_SET(common_tssd, *PCPU_GET(tss_gdt)); - PCPU_SET(common_tss.tss_ioopt, (sizeof (struct i386tss)) << 16); - ltr(gsel_tss); - /* pointer to selector slot for %fs/%gs */ PCPU_SET(fsgs_gdt, &gdt[GUFS_SEL].sd); @@ -3050,6 +3101,33 @@ init386(first) /* now running on new page tables, configured,and u/iom is accessible */ msgbufinit(msgbufp, msgbufsize); +#ifdef DEV_NPX + npxinit(true); +#endif + /* + * Set up thread0 pcb after npxinit calculated pcb + fpu save + * area size. Zero out the extended state header in fpu save + * area. + */ + thread0.td_pcb = get_pcb_td(&thread0); + bzero(get_pcb_user_save_td(&thread0), cpu_max_ext_state_size); +#ifdef CPU_ENABLE_SSE + if (use_xsave) { + xhdr = (struct xstate_hdr *)(get_pcb_user_save_td(&thread0) + + 1); + xhdr->xstate_bv = xsave_mask; + } +#endif + PCPU_SET(curpcb, thread0.td_pcb); + /* make an initial tss so cpu can get interrupt stack on syscall! */ + /* Note: -16 is so we can grow the trapframe if we came from vm86 */ + PCPU_SET(common_tss.tss_esp0, (vm_offset_t)thread0.td_pcb - 16); + PCPU_SET(common_tss.tss_ss0, GSEL(GDATA_SEL, SEL_KPL)); + gsel_tss = GSEL(GPROC0_SEL, SEL_KPL); + PCPU_SET(tss_gdt, &gdt[GPROC0_SEL].sd); + PCPU_SET(common_tssd, *PCPU_GET(tss_gdt)); + PCPU_SET(common_tss.tss_ioopt, (sizeof (struct i386tss)) << 16); + ltr(gsel_tss); /* make a call gate to reenter kernel with */ gdp = &ldt[LSYS5CALLS_SEL].gd; @@ -3088,6 +3166,9 @@ init386(first) #ifdef FDT x86_init_fdt(); #endif + + /* Location of kernel stack for locore */ + return ((register_t)thread0.td_pcb); } #endif @@ -3368,11 +3449,11 @@ fill_fpregs(struct thread *td, struct fp #endif #ifdef CPU_ENABLE_SSE if (cpu_fxsr) - fill_fpregs_xmm(&td->td_pcb->pcb_user_save.sv_xmm, + fill_fpregs_xmm(&get_pcb_user_save_td(td)->sv_xmm, (struct save87 *)fpregs); else #endif /* CPU_ENABLE_SSE */ - bcopy(&td->td_pcb->pcb_user_save.sv_87, fpregs, + bcopy(&get_pcb_user_save_td(td)->sv_87, fpregs, sizeof(*fpregs)); return (0); } @@ -3384,10 +3465,10 @@ set_fpregs(struct thread *td, struct fpr #ifdef CPU_ENABLE_SSE if (cpu_fxsr) set_fpregs_xmm((struct save87 *)fpregs, - &td->td_pcb->pcb_user_save.sv_xmm); + &get_pcb_user_save_td(td)->sv_xmm); else #endif /* CPU_ENABLE_SSE */ - bcopy(fpregs, &td->td_pcb->pcb_user_save.sv_87, + bcopy(fpregs, &get_pcb_user_save_td(td)->sv_87, sizeof(*fpregs)); #ifdef DEV_NPX npxuserinited(td); @@ -3433,12 +3514,14 @@ get_mcontext(struct thread *td, mcontext mcp->mc_esp = tp->tf_esp; mcp->mc_ss = tp->tf_ss; mcp->mc_len = sizeof(*mcp); - get_fpcontext(td, mcp); + get_fpcontext(td, mcp, NULL, 0); sdp = &td->td_pcb->pcb_fsd; mcp->mc_fsbase = sdp->sd_hibase << 24 | sdp->sd_lobase; sdp = &td->td_pcb->pcb_gsd; mcp->mc_gsbase = sdp->sd_hibase << 24 | sdp->sd_lobase; mcp->mc_flags = 0; + mcp->mc_xfpustate = 0; + mcp->mc_xfpustate_len = 0; bzero(mcp->mc_spare2, sizeof(mcp->mc_spare2)); return (0); } @@ -3453,6 +3536,7 @@ int set_mcontext(struct thread *td, const mcontext_t *mcp) { struct trapframe *tp; + char *xfpustate; int eflags, ret; tp = td->td_frame; @@ -3460,30 +3544,45 @@ set_mcontext(struct thread *td, const mc return (EINVAL); eflags = (mcp->mc_eflags & PSL_USERCHANGE) | (tp->tf_eflags & ~PSL_USERCHANGE); - if ((ret = set_fpcontext(td, mcp)) == 0) { - tp->tf_fs = mcp->mc_fs; - tp->tf_es = mcp->mc_es; - tp->tf_ds = mcp->mc_ds; - tp->tf_edi = mcp->mc_edi; - tp->tf_esi = mcp->mc_esi; - tp->tf_ebp = mcp->mc_ebp; - tp->tf_ebx = mcp->mc_ebx; - tp->tf_edx = mcp->mc_edx; - tp->tf_ecx = mcp->mc_ecx; - tp->tf_eax = mcp->mc_eax; - tp->tf_eip = mcp->mc_eip; - tp->tf_eflags = eflags; - tp->tf_esp = mcp->mc_esp; - tp->tf_ss = mcp->mc_ss; - td->td_pcb->pcb_gs = mcp->mc_gs; - ret = 0; - } - return (ret); + if (mcp->mc_flags & _MC_HASFPXSTATE) { + if (mcp->mc_xfpustate_len > cpu_max_ext_state_size - + sizeof(union savefpu)) + return (EINVAL); + xfpustate = __builtin_alloca(mcp->mc_xfpustate_len); + ret = copyin((void *)mcp->mc_xfpustate, xfpustate, + mcp->mc_xfpustate_len); + if (ret != 0) + return (ret); + } else + xfpustate = NULL; + ret = set_fpcontext(td, mcp, xfpustate, mcp->mc_xfpustate_len); + if (ret != 0) + return (ret); + tp->tf_fs = mcp->mc_fs; + tp->tf_es = mcp->mc_es; + tp->tf_ds = mcp->mc_ds; + tp->tf_edi = mcp->mc_edi; + tp->tf_esi = mcp->mc_esi; + tp->tf_ebp = mcp->mc_ebp; + tp->tf_ebx = mcp->mc_ebx; + tp->tf_edx = mcp->mc_edx; + tp->tf_ecx = mcp->mc_ecx; + tp->tf_eax = mcp->mc_eax; + tp->tf_eip = mcp->mc_eip; + tp->tf_eflags = eflags; + tp->tf_esp = mcp->mc_esp; + tp->tf_ss = mcp->mc_ss; + td->td_pcb->pcb_gs = mcp->mc_gs; + return (0); } static void -get_fpcontext(struct thread *td, mcontext_t *mcp) +get_fpcontext(struct thread *td, mcontext_t *mcp, char *xfpusave, + size_t xfpusave_len) { +#ifdef CPU_ENABLE_SSE + size_t max_len, len; +#endif #ifndef DEV_NPX mcp->mc_fpformat = _MC_FPFMT_NODEV; @@ -3491,37 +3590,56 @@ get_fpcontext(struct thread *td, mcontex bzero(mcp->mc_fpstate, sizeof(mcp->mc_fpstate)); #else mcp->mc_ownedfp = npxgetregs(td); - bcopy(&td->td_pcb->pcb_user_save, &mcp->mc_fpstate[0], + bcopy(get_pcb_user_save_td(td), &mcp->mc_fpstate[0], sizeof(mcp->mc_fpstate)); mcp->mc_fpformat = npxformat(); +#ifdef CPU_ENABLE_SSE + if (!use_xsave || xfpusave_len == 0) + return; + max_len = cpu_max_ext_state_size - sizeof(union savefpu); + len = xfpusave_len; + if (len > max_len) { + len = max_len; + bzero(xfpusave + max_len, len - max_len); + } + mcp->mc_flags |= _MC_HASFPXSTATE; + mcp->mc_xfpustate_len = len; + bcopy(get_pcb_user_save_td(td) + 1, xfpusave, len); +#endif #endif } static int -set_fpcontext(struct thread *td, const mcontext_t *mcp) +set_fpcontext(struct thread *td, const mcontext_t *mcp, char *xfpustate, + size_t xfpustate_len) { + union savefpu *fpstate; + int error; if (mcp->mc_fpformat == _MC_FPFMT_NODEV) return (0); else if (mcp->mc_fpformat != _MC_FPFMT_387 && mcp->mc_fpformat != _MC_FPFMT_XMM) return (EINVAL); - else if (mcp->mc_ownedfp == _MC_FPOWNED_NONE) + else if (mcp->mc_ownedfp == _MC_FPOWNED_NONE) { /* We don't care what state is left in the FPU or PCB. */ fpstate_drop(td); - else if (mcp->mc_ownedfp == _MC_FPOWNED_FPU || + error = 0; + } else if (mcp->mc_ownedfp == _MC_FPOWNED_FPU || mcp->mc_ownedfp == _MC_FPOWNED_PCB) { #ifdef DEV_NPX + fpstate = (union savefpu *)&mcp->mc_fpstate; #ifdef CPU_ENABLE_SSE if (cpu_fxsr) - ((union savefpu *)&mcp->mc_fpstate)->sv_xmm.sv_env. - en_mxcsr &= cpu_mxcsr_mask; + fpstate->sv_xmm.sv_env.en_mxcsr &= cpu_mxcsr_mask; #endif - npxsetregs(td, (union savefpu *)&mcp->mc_fpstate); + error = npxsetregs(td, fpstate, xfpustate, xfpustate_len); +#else + error = EINVAL; #endif } else return (EINVAL); - return (0); + return (error); } static void Modified: stable/10/sys/i386/i386/mp_machdep.c ============================================================================== --- stable/10/sys/i386/i386/mp_machdep.c Mon Dec 22 21:26:49 2014 (r276083) +++ stable/10/sys/i386/i386/mp_machdep.c Mon Dec 22 21:32:39 2014 (r276084) @@ -751,7 +751,7 @@ init_secondary(void) initializecpu(); /* set up FPU state on the AP */ - npxinit(); + npxinit(false); if (cpu_ops.cpu_init) cpu_ops.cpu_init(); @@ -1514,11 +1514,11 @@ cpususpend_handler(void) cpu = PCPU_GET(cpuid); if (savectx(&susppcbs[cpu]->sp_pcb)) { - npxsuspend(&susppcbs[cpu]->sp_fpususpend); + npxsuspend(susppcbs[cpu]->sp_fpususpend); wbinvd(); CPU_SET_ATOMIC(cpu, &suspended_cpus); } else { - npxresume(&susppcbs[cpu]->sp_fpususpend); + npxresume(susppcbs[cpu]->sp_fpususpend); pmap_init_pat(); initializecpu(); PCPU_SET(switchtime, 0); Modified: stable/10/sys/i386/i386/ptrace_machdep.c ============================================================================== --- stable/10/sys/i386/i386/ptrace_machdep.c Mon Dec 22 21:26:49 2014 (r276083) +++ stable/10/sys/i386/i386/ptrace_machdep.c Mon Dec 22 21:32:39 2014 (r276084) @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -41,6 +42,47 @@ __FBSDID("$FreeBSD$"); #define CPU_ENABLE_SSE #endif +#ifdef CPU_ENABLE_SSE +static int +cpu_ptrace_xstate(struct thread *td, int req, void *addr, int data) +{ + char *savefpu; + int error; + + if (!use_xsave) + return (EOPNOTSUPP); + + switch (req) { + case PT_GETXSTATE: + npxgetregs(td); + savefpu = (char *)(get_pcb_user_save_td(td) + 1); + error = copyout(savefpu, addr, + cpu_max_ext_state_size - sizeof(union savefpu)); + break; + + case PT_SETXSTATE: + if (data > cpu_max_ext_state_size - sizeof(union savefpu)) { + error = EINVAL; + break; + } + savefpu = malloc(data, M_TEMP, M_WAITOK); + error = copyin(addr, savefpu, data); + if (error == 0) { + npxgetregs(td); + error = npxsetxstate(td, savefpu, data); + } + free(savefpu, M_TEMP); + break; + + default: + error = EINVAL; + break; + } + + return (error); +} +#endif + int cpu_ptrace(struct thread *td, int req, void *addr, int data) { @@ -51,7 +93,7 @@ cpu_ptrace(struct thread *td, int req, v if (!cpu_fxsr) return (EINVAL); - fpstate = &td->td_pcb->pcb_user_save.sv_xmm; + fpstate = &get_pcb_user_save_td(td)->sv_xmm; switch (req) { case PT_GETXMMREGS: npxgetregs(td); @@ -64,6 +106,11 @@ cpu_ptrace(struct thread *td, int req, v fpstate->sv_env.en_mxcsr &= cpu_mxcsr_mask; break; + case PT_GETXSTATE: + case PT_SETXSTATE: + error = cpu_ptrace_xstate(td, req, addr, data); + break; + default: return (EINVAL); } Modified: stable/10/sys/i386/i386/sys_machdep.c ============================================================================== --- stable/10/sys/i386/i386/sys_machdep.c Mon Dec 22 21:26:49 2014 (r276083) +++ stable/10/sys/i386/i386/sys_machdep.c Mon Dec 22 21:32:39 2014 (r276084) @@ -105,6 +105,7 @@ sysarch(td, uap) union { struct i386_ldt_args largs; struct i386_ioperm_args iargs; + struct i386_get_xfpustate xfpu; } kargs; uint32_t base; struct segment_descriptor sd, *sdp; @@ -126,6 +127,7 @@ sysarch(td, uap) case I386_SET_FSBASE: case I386_GET_GSBASE: case I386_SET_GSBASE: + case I386_GET_XFPUSTATE: break; case I386_SET_IOPERM: @@ -154,6 +156,11 @@ sysarch(td, uap) if (kargs.largs.num > MAX_LD || kargs.largs.num <= 0) return (EINVAL); break; + case I386_GET_XFPUSTATE: + if ((error = copyin(uap->parms, &kargs.xfpu, + sizeof(struct i386_get_xfpustate))) != 0) + return (error); + break; default: break; } @@ -270,6 +277,14 @@ sysarch(td, uap) load_gs(GSEL(GUGS_SEL, SEL_UPL)); } break; + case I386_GET_XFPUSTATE: + if (kargs.xfpu.len > cpu_max_ext_state_size - + sizeof(union savefpu)) + return (EINVAL); + npxgetregs(td); + error = copyout((char *)(get_pcb_user_save_td(td) + 1), + kargs.xfpu.addr, kargs.xfpu.len); + break; default: error = EINVAL; break; Modified: stable/10/sys/i386/i386/trap.c ============================================================================== --- stable/10/sys/i386/i386/trap.c Mon Dec 22 21:26:49 2014 (r276083) +++ stable/10/sys/i386/i386/trap.c Mon Dec 22 21:32:39 2014 (r276084) @@ -1160,7 +1160,7 @@ syscall(struct trapframe *frame) KASSERT(PCB_USER_FPU(td->td_pcb), ("System call %s returning with kernel FPU ctx leaked", syscallname(td->td_proc, sa.code))); - KASSERT(td->td_pcb->pcb_save == &td->td_pcb->pcb_user_save, + KASSERT(td->td_pcb->pcb_save == get_pcb_user_save_td(td), ("System call %s returning with mangled pcb_save", syscallname(td->td_proc, sa.code))); Modified: stable/10/sys/i386/i386/vm_machdep.c ============================================================================== --- stable/10/sys/i386/i386/vm_machdep.c Mon Dec 22 21:26:49 2014 (r276083) +++ stable/10/sys/i386/i386/vm_machdep.c Mon Dec 22 21:32:39 2014 (r276084) @@ -106,6 +106,10 @@ __FBSDID("$FreeBSD$"); #define NSFBUFS (512 + maxusers * 16) #endif +#if !defined(CPU_DISABLE_SSE) && defined(I686_CPU) +#define CPU_ENABLE_SSE +#endif + _Static_assert(OFFSETOF_CURTHREAD == offsetof(struct pcpu, pc_curthread), "OFFSETOF_CURTHREAD does not correspond with offset of pc_curthread."); _Static_assert(OFFSETOF_CURPCB == offsetof(struct pcpu, pc_curpcb), @@ -150,6 +154,54 @@ static u_int sf_buf_alloc_want; */ static struct mtx sf_buf_lock; +union savefpu * +get_pcb_user_save_td(struct thread *td) +{ + vm_offset_t p; + p = td->td_kstack + td->td_kstack_pages * PAGE_SIZE - + cpu_max_ext_state_size; + KASSERT((p % 64) == 0, ("Unaligned pcb_user_save area")); + return ((union savefpu *)p); +} + +union savefpu * +get_pcb_user_save_pcb(struct pcb *pcb) +{ + vm_offset_t p; + + p = (vm_offset_t)(pcb + 1); + return ((union savefpu *)p); +} + +struct pcb * +get_pcb_td(struct thread *td) +{ + vm_offset_t p; + + p = td->td_kstack + td->td_kstack_pages * PAGE_SIZE - + cpu_max_ext_state_size - sizeof(struct pcb); + return ((struct pcb *)p); +} + +void * +alloc_fpusave(int flags) +{ + void *res; +#ifdef CPU_ENABLE_SSE + struct savefpu_ymm *sf; +#endif + + res = malloc(cpu_max_ext_state_size, M_DEVBUF, flags); +#ifdef CPU_ENABLE_SSE + if (use_xsave) { + sf = (struct savefpu_ymm *)res; + bzero(&sf->sv_xstate.sx_hd, sizeof(sf->sv_xstate.sx_hd)); + sf->sv_xstate.sx_hd.xstate_bv = xsave_mask; + } +#endif + return (res); +} + /* * Finish a fork operation, with process p2 nearly set up. * Copy and update the pcb, set up the stack so that the child @@ -199,15 +251,16 @@ cpu_fork(td1, p2, td2, flags) #endif /* Point the pcb to the top of the stack */ - pcb2 = (struct pcb *)(td2->td_kstack + - td2->td_kstack_pages * PAGE_SIZE) - 1; + pcb2 = get_pcb_td(td2); td2->td_pcb = pcb2; /* Copy td1's pcb */ bcopy(td1->td_pcb, pcb2, sizeof(*pcb2)); /* Properly initialize pcb_save */ - pcb2->pcb_save = &pcb2->pcb_user_save; + pcb2->pcb_save = get_pcb_user_save_pcb(pcb2); + bcopy(get_pcb_user_save_td(td1), get_pcb_user_save_pcb(pcb2), + cpu_max_ext_state_size); /* Point mdproc and then copy over td1's contents */ mdp2 = &p2->p_md; @@ -384,12 +437,22 @@ cpu_thread_swapout(struct thread *td) void cpu_thread_alloc(struct thread *td) { + struct pcb *pcb; +#ifdef CPU_ENABLE_SSE + struct xstate_hdr *xhdr; +#endif - td->td_pcb = (struct pcb *)(td->td_kstack + - td->td_kstack_pages * PAGE_SIZE) - 1; - td->td_frame = (struct trapframe *)((caddr_t)td->td_pcb - 16) - 1; - td->td_pcb->pcb_ext = NULL; - td->td_pcb->pcb_save = &td->td_pcb->pcb_user_save; + td->td_pcb = pcb = get_pcb_td(td); + td->td_frame = (struct trapframe *)((caddr_t)pcb - 16) - 1; + pcb->pcb_ext = NULL; + pcb->pcb_save = get_pcb_user_save_pcb(pcb); +#ifdef CPU_ENABLE_SSE + if (use_xsave) { + xhdr = (struct xstate_hdr *)(pcb->pcb_save + 1); + bzero(xhdr, sizeof(*xhdr)); + xhdr->xstate_bv = xsave_mask; + } +#endif } void @@ -457,7 +520,9 @@ cpu_set_upcall(struct thread *td, struct bcopy(td0->td_pcb, pcb2, sizeof(*pcb2)); pcb2->pcb_flags &= ~(PCB_NPXINITDONE | PCB_NPXUSERINITDONE | PCB_KERNNPX); - pcb2->pcb_save = &pcb2->pcb_user_save; + pcb2->pcb_save = get_pcb_user_save_pcb(pcb2); + bcopy(get_pcb_user_save_td(td0), pcb2->pcb_save, + cpu_max_ext_state_size); /* * Create a new fresh stack for the new thread. Modified: stable/10/sys/i386/include/cpufunc.h ============================================================================== --- stable/10/sys/i386/include/cpufunc.h Mon Dec 22 21:26:49 2014 (r276083) +++ stable/10/sys/i386/include/cpufunc.h Mon Dec 22 21:32:39 2014 (r276084) @@ -441,6 +441,25 @@ rcr4(void) return (data); } +static __inline uint64_t +rxcr(u_int reg) +{ + u_int low, high; + + __asm __volatile("xgetbv" : "=a" (low), "=d" (high) : "c" (reg)); + return (low | ((uint64_t)high << 32)); +} + +static __inline void +load_xcr(u_int reg, uint64_t val) +{ + u_int low, high; + + low = val; + high = val >> 32; + __asm __volatile("xsetbv" : : "c" (reg), "a" (low), "d" (high)); +} + /* * Global TLB flush (except for thise for pages marked PG_G) */ Modified: stable/10/sys/i386/include/md_var.h ============================================================================== --- stable/10/sys/i386/include/md_var.h Mon Dec 22 21:26:49 2014 (r276083) +++ stable/10/sys/i386/include/md_var.h Mon Dec 22 21:32:39 2014 (r276084) @@ -52,6 +52,7 @@ extern u_int cpu_stdext_feature; extern u_int cpu_fxsr; extern u_int cpu_high; extern u_int cpu_id; +extern u_int cpu_max_ext_state_size; extern u_int cpu_mxcsr_mask; extern u_int cpu_procinfo; extern u_int cpu_procinfo2; @@ -78,14 +79,19 @@ extern int vm_page_dump_size; extern int workaround_erratum383; extern int _udatasel; extern int _ucodesel; +extern int use_xsave; +extern uint64_t xsave_mask; typedef void alias_for_inthand_t(u_int cs, u_int ef, u_int esp, u_int ss); +struct pcb; +union savefpu; struct thread; struct reg; struct fpreg; struct dbreg; struct dumperinfo; +void *alloc_fpusave(int flags); void bcopyb(const void *from, void *to, size_t len); void busdma_swi(void); void cpu_setregs(void); @@ -116,5 +122,8 @@ void printcpuinfo(void); void setidt(int idx, alias_for_inthand_t *func, int typ, int dpl, int selec); int user_dbreg_trap(void); void minidumpsys(struct dumperinfo *); +union savefpu *get_pcb_user_save_td(struct thread *td); +union savefpu *get_pcb_user_save_pcb(struct pcb *pcb); +struct pcb *get_pcb_td(struct thread *td); #endif /* !_MACHINE_MD_VAR_H_ */ Modified: stable/10/sys/i386/include/npx.h ============================================================================== --- stable/10/sys/i386/include/npx.h Mon Dec 22 21:26:49 2014 (r276083) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Dec 22 21:46:36 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6CB86B4F; Mon, 22 Dec 2014 21:46:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 581EF328B; Mon, 22 Dec 2014 21:46:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBMLkaKZ081262; Mon, 22 Dec 2014 21:46:36 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBMLkaDB081261; Mon, 22 Dec 2014 21:46:36 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201412222146.sBMLkaDB081261@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 22 Dec 2014 21:46:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276085 - stable/10/sys/i386/i386 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Dec 2014 21:46:36 -0000 Author: jhb Date: Mon Dec 22 21:46:35 2014 New Revision: 276085 URL: https://svnweb.freebsd.org/changeset/base/276085 Log: MFC 275035: MFamd64: Check for invalid flags in the machine context in sigreturn() and setcontext(). Modified: stable/10/sys/i386/i386/machdep.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/i386/i386/machdep.c ============================================================================== --- stable/10/sys/i386/i386/machdep.c Mon Dec 22 21:32:39 2014 (r276084) +++ stable/10/sys/i386/i386/machdep.c Mon Dec 22 21:46:35 2014 (r276085) @@ -1043,6 +1043,11 @@ sys_sigreturn(td, uap) if (error != 0) return (error); ucp = &uc; + if ((ucp->uc_mcontext.mc_flags & ~_MC_FLAG_MASK) != 0) { + uprintf("pid %d (%s): sigreturn mc_flags %x\n", p->p_pid, + td->td_name, ucp->uc_mcontext.mc_flags); + return (EINVAL); + } regs = td->td_frame; eflags = ucp->uc_mcontext.mc_eflags; if (eflags & PSL_VM) { @@ -3540,7 +3545,8 @@ set_mcontext(struct thread *td, const mc int eflags, ret; tp = td->td_frame; - if (mcp->mc_len != sizeof(*mcp)) + if (mcp->mc_len != sizeof(*mcp) || + (mcp->mc_flags & ~_MC_FLAG_MASK) != 0) return (EINVAL); eflags = (mcp->mc_eflags & PSL_USERCHANGE) | (tp->tf_eflags & ~PSL_USERCHANGE); From owner-svn-src-all@FreeBSD.ORG Mon Dec 22 21:52:38 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C6E9BEBA; Mon, 22 Dec 2014 21:52:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B2A02345E; Mon, 22 Dec 2014 21:52:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBMLqc7J085649; Mon, 22 Dec 2014 21:52:38 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBMLqc42085648; Mon, 22 Dec 2014 21:52:38 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <201412222152.sBMLqc42085648@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Mon, 22 Dec 2014 21:52:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276086 - head/usr.sbin/freebsd-update X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Dec 2014 21:52:38 -0000 Author: cperciva Date: Mon Dec 22 21:52:37 2014 New Revision: 276086 URL: https://svnweb.freebsd.org/changeset/base/276086 Log: Strip trailing / characters from paths in "not present" index entries, not just "directory" entries. Prior to this commit, if / was added as part of a security update (how? In the most recent case, because lib32 was accidentally omitted and was then re-added, and every installer distribution set gets its own paths) then the code which was supposed to filter out updates to deleted parts of the base system (if someone decides to delete / then we shouldn't re-create it for them) would instead get confused and decided that while / should exist, // should not exist and needs to be removed. This fixes the bug which caused freebsd-update to want to delete / (which is harmless, since `rm /` fails, but scary nonetheless). A workaround is being applied to the update bits in order to avoid triggering the bug on unpatched systems. PR: 196055, 196091, 196147 Modified: head/usr.sbin/freebsd-update/freebsd-update.sh Modified: head/usr.sbin/freebsd-update/freebsd-update.sh ============================================================================== --- head/usr.sbin/freebsd-update/freebsd-update.sh Mon Dec 22 21:46:35 2014 (r276085) +++ head/usr.sbin/freebsd-update/freebsd-update.sh Mon Dec 22 21:52:37 2014 (r276086) @@ -1395,6 +1395,7 @@ fetch_filter_metadata () { # matter, since we add a leading "/" when we use paths later. cut -f 3- -d '|' $1 | sed -e 's,/|d|,|d|,' | + sed -e 's,/|-|,|-|,' | sort -u > $1.tmp # Figure out which lines to ignore and remove them. From owner-svn-src-all@FreeBSD.ORG Mon Dec 22 22:07:24 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DA32734A; Mon, 22 Dec 2014 22:07:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C5CE03634; Mon, 22 Dec 2014 22:07:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBMM7NSJ091058; Mon, 22 Dec 2014 22:07:23 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBMM7NGd091055; Mon, 22 Dec 2014 22:07:23 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201412222207.sBMM7NGd091055@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Mon, 22 Dec 2014 22:07:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276087 - in head/sys/boot: common forth X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Dec 2014 22:07:24 -0000 Author: ian Date: Mon Dec 22 22:07:22 2014 New Revision: 276087 URL: https://svnweb.freebsd.org/changeset/base/276087 Log: Add a new loader(8) variable, twiddle_divisor, allowing control over the output frequency of the "twiddle" IO progress indicator. The default value is 1. For larger values N, the next stage of the animation is only output on every Nth call to the output routine. A sufficiently large N effectively disables the animation completely. Modified: head/sys/boot/common/console.c head/sys/boot/common/loader.8 head/sys/boot/forth/loader.conf Modified: head/sys/boot/common/console.c ============================================================================== --- head/sys/boot/common/console.c Mon Dec 22 21:52:37 2014 (r276086) +++ head/sys/boot/common/console.c Mon Dec 22 22:07:22 2014 (r276087) @@ -39,6 +39,7 @@ static int cons_set(struct env_var *ev, static int cons_find(const char *name); static int cons_check(const char *string); static void cons_change(const char *string); +static int twiddle_set(struct env_var *ev, int flags, const void *value); /* * Detect possible console(s) to use. If preferred console(s) have been @@ -52,6 +53,9 @@ cons_probe(void) int active; char *prefconsole; + /* We want a callback to install the new value when this var changes. */ + env_setenv("twiddle_divisor", EV_VOLATILE, "1", twiddle_set, env_nounset); + /* Do all console probes */ for (cons = 0; consoles[cons] != NULL; cons++) { consoles[cons]->c_flags = 0; @@ -232,3 +236,28 @@ cons_change(const char *string) free(dup); } + +/* + * Change the twiddle divisor. + * + * The user can set the twiddle_divisor variable to directly control how fast + * the progress twiddle spins, useful for folks with slow serial consoles. The + * code to monitor changes to the variable and propagate them to the twiddle + * routines has to live somewhere. Twiddling is console-related so it's here. + */ +static int +twiddle_set(struct env_var *ev, int flags, const void *value) +{ + u_long tdiv; + char * eptr; + + tdiv = strtoul(value, &eptr, 0); + if (*(const char *)value == 0 || *eptr != 0) { + printf("invalid twiddle_divisor '%s'\n", (const char *)value); + return (CMD_ERROR); + } + twiddle_divisor((u_int)tdiv); + env_setenv(ev->ev_name, flags | EV_NOHOOK, value, NULL, NULL); + + return(CMD_OK); +} Modified: head/sys/boot/common/loader.8 ============================================================================== --- head/sys/boot/common/loader.8 Mon Dec 22 21:52:37 2014 (r276086) +++ head/sys/boot/common/loader.8 Mon Dec 22 22:07:22 2014 (r276087) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 1, 2013 +.Dd December 22, 2014 .Dt LOADER 8 .Os .Sh NAME @@ -670,6 +670,12 @@ Overrides the compile-time set value of .Dv TCBHASHSIZE or the preset default of 512. Must be a power of 2. +.It Va twiddle_divisor +Throttles the output of the `twiddle' I/O progress indicator displayed +while loading the kernel and modules. +This is useful on slow serial consoles where the time spent waiting for +these characters to be written can add up to many seconds. +The default is 1 (full speed); a value of 2 spins half as fast, and so on. .It Va vm.kmem_size Sets the size of kernel memory (bytes). This overrides the value determined when the kernel was compiled. Modified: head/sys/boot/forth/loader.conf ============================================================================== --- head/sys/boot/forth/loader.conf Mon Dec 22 21:52:37 2014 (r276086) +++ head/sys/boot/forth/loader.conf Mon Dec 22 22:07:22 2014 (r276087) @@ -75,6 +75,7 @@ module_path="/boot/modules" # Set the mo # the block size is set to 512. If the value # is out of range ( < 8 || > 9008 ) an error is # returned. +#twiddle_divisor="1" # >1 means slow down the progress indicator. ############################################################## From owner-svn-src-all@FreeBSD.ORG Mon Dec 22 22:11:41 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0CA125B0; Mon, 22 Dec 2014 22:11:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EC84E3728; Mon, 22 Dec 2014 22:11:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBMMBeBL094438; Mon, 22 Dec 2014 22:11:40 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBMMBeRl094437; Mon, 22 Dec 2014 22:11:40 GMT (envelope-from des@FreeBSD.org) Message-Id: <201412222211.sBMMBeRl094437@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: des set sender to des@FreeBSD.org using -f From: Dag-Erling Smørgrav Date: Mon, 22 Dec 2014 22:11:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276088 - stable/10/usr.sbin/freebsd-update X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Dec 2014 22:11:41 -0000 Author: des Date: Mon Dec 22 22:11:39 2014 New Revision: 276088 URL: https://svnweb.freebsd.org/changeset/base/276088 Log: Strip trailing / characters from paths in "not present" index entries. Errata: FreeBSD-EN-14:13.freebsd-update Approved by: so@ Modified: stable/10/usr.sbin/freebsd-update/freebsd-update.sh Modified: stable/10/usr.sbin/freebsd-update/freebsd-update.sh ============================================================================== --- stable/10/usr.sbin/freebsd-update/freebsd-update.sh Mon Dec 22 22:07:22 2014 (r276087) +++ stable/10/usr.sbin/freebsd-update/freebsd-update.sh Mon Dec 22 22:11:39 2014 (r276088) @@ -1387,6 +1387,7 @@ fetch_filter_metadata () { # matter, since we add a leading "/" when we use paths later. cut -f 3- -d '|' $1 | sed -e 's,/|d|,|d|,' | + sed -e 's,/|-|,|-|,' | sort -u > $1.tmp # Figure out which lines to ignore and remove them. From owner-svn-src-all@FreeBSD.ORG Mon Dec 22 22:11:46 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 852A26D8; Mon, 22 Dec 2014 22:11:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7114C372A; Mon, 22 Dec 2014 22:11:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBMMBk1x094494; Mon, 22 Dec 2014 22:11:46 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBMMBkkd094493; Mon, 22 Dec 2014 22:11:46 GMT (envelope-from des@FreeBSD.org) Message-Id: <201412222211.sBMMBkkd094493@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: des set sender to des@FreeBSD.org using -f From: Dag-Erling Smørgrav Date: Mon, 22 Dec 2014 22:11:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r276089 - stable/8/usr.sbin/freebsd-update X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Dec 2014 22:11:46 -0000 Author: des Date: Mon Dec 22 22:11:45 2014 New Revision: 276089 URL: https://svnweb.freebsd.org/changeset/base/276089 Log: Strip trailing / characters from paths in "not present" index entries. Errata: FreeBSD-EN-14:13.freebsd-update Approved by: so@ Modified: stable/8/usr.sbin/freebsd-update/freebsd-update.sh Modified: stable/8/usr.sbin/freebsd-update/freebsd-update.sh ============================================================================== --- stable/8/usr.sbin/freebsd-update/freebsd-update.sh Mon Dec 22 22:11:39 2014 (r276088) +++ stable/8/usr.sbin/freebsd-update/freebsd-update.sh Mon Dec 22 22:11:45 2014 (r276089) @@ -1372,6 +1372,7 @@ fetch_filter_metadata () { # matter, since we add a leading "/" when we use paths later. cut -f 3- -d '|' $1 | sed -e 's,/|d|,|d|,' | + sed -e 's,/|-|,|-|,' | sort -u > $1.tmp # Figure out which lines to ignore and remove them. From owner-svn-src-all@FreeBSD.ORG Mon Dec 22 22:11:52 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 08170806; Mon, 22 Dec 2014 22:11:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E7C56372E; Mon, 22 Dec 2014 22:11:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBMMBpHc094553; Mon, 22 Dec 2014 22:11:51 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBMMBpRA094552; Mon, 22 Dec 2014 22:11:51 GMT (envelope-from des@FreeBSD.org) Message-Id: <201412222211.sBMMBpRA094552@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: des set sender to des@FreeBSD.org using -f From: Dag-Erling Smørgrav Date: Mon, 22 Dec 2014 22:11:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r276090 - stable/9/usr.sbin/freebsd-update X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Dec 2014 22:11:52 -0000 Author: des Date: Mon Dec 22 22:11:50 2014 New Revision: 276090 URL: https://svnweb.freebsd.org/changeset/base/276090 Log: Strip trailing / characters from paths in "not present" index entries. Errata: FreeBSD-EN-14:13.freebsd-update Approved by: so@ Modified: stable/9/usr.sbin/freebsd-update/freebsd-update.sh Modified: stable/9/usr.sbin/freebsd-update/freebsd-update.sh ============================================================================== --- stable/9/usr.sbin/freebsd-update/freebsd-update.sh Mon Dec 22 22:11:45 2014 (r276089) +++ stable/9/usr.sbin/freebsd-update/freebsd-update.sh Mon Dec 22 22:11:50 2014 (r276090) @@ -1387,6 +1387,7 @@ fetch_filter_metadata () { # matter, since we add a leading "/" when we use paths later. cut -f 3- -d '|' $1 | sed -e 's,/|d|,|d|,' | + sed -e 's,/|-|,|-|,' | sort -u > $1.tmp # Figure out which lines to ignore and remove them. From owner-svn-src-all@FreeBSD.ORG Mon Dec 22 22:14:22 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 13873960; Mon, 22 Dec 2014 22:14:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E8A0F374E; Mon, 22 Dec 2014 22:14:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBMMELYE095570; Mon, 22 Dec 2014 22:14:21 GMT (envelope-from roberto@FreeBSD.org) Received: (from roberto@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBMMELjL095566; Mon, 22 Dec 2014 22:14:21 GMT (envelope-from roberto@FreeBSD.org) Message-Id: <201412222214.sBMMELjL095566@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: roberto set sender to roberto@FreeBSD.org using -f From: Ollivier Robert Date: Mon, 22 Dec 2014 22:14:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r276091 - vendor/ntp/dist X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Dec 2014 22:14:22 -0000 Author: roberto Date: Mon Dec 22 22:14:20 2014 New Revision: 276091 URL: https://svnweb.freebsd.org/changeset/base/276091 Log: Add back these files deleted by the previous vendor import. Next commit will remove some files from this tree in order to avoid merging them into head as they were never merged before. Forgotten by: cy Added: vendor/ntp/dist/FREEBSD-Xlist vendor/ntp/dist/FREEBSD-upgrade Added: vendor/ntp/dist/FREEBSD-Xlist ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/ntp/dist/FREEBSD-Xlist Mon Dec 22 22:14:20 2014 (r276091) @@ -0,0 +1,2 @@ +*ports +*html/pic Added: vendor/ntp/dist/FREEBSD-upgrade ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/ntp/dist/FREEBSD-upgrade Mon Dec 22 22:14:20 2014 (r276091) @@ -0,0 +1,55 @@ +# ex:ts=8 +# +# $FreeBSD$ + +NTP 4.2.8 + originals can be found on http://www.ntp.org/downloads.html + +Import +------ + +For the import of NTP the following files were removed: + + ports/* NT files + html/pic/* GIF files + html/build/hints/solaris.xtra.4095849 Trigger merge conflict script + +The stripped down version was created using FREEBSD-Xlist during +extraction: + + tar -X FREEBSD-Xlist -xvzf ntp-4.2.8.tar.gz + mv ntp-4.2.8 4.2.8 + +Imported by: + See procedure on +https://www.freebsd.org/doc/en_US.ISO8859-1/articles/committers-guide/subversion-primer.html + +Updating usr.sbin/ntp +--------------------- + +./configure --disable-all-clocks --enable-NMEA --enable-ONCORE +--enable-RAWDCF --with-crypto --disable-debugging +--enable-LOCAL-CLOCK --with-sntp --with-arlib --prefix=/usr + +config.h was generated by running configure and excluding almost all clock +drivers (what is included is DCF77 -- what I use --, NMEA, Motorola OnCORE +and local clocks). + +The file is then edited to edit the value of "NO_PARENB_IGNPAR" because we +need to set no parity on the serial port (needed for DCF77). All clock +drivers are then disabled (some of them are included by default by ntpd). + +Note that there are two #ifdef to support other architectures (WRT to long +size and endianness). They'll need to be redone for each upgrade to the +vendor branch to keep config.h in sync. + +ntpd/ntp_control.c is now the only file that is different from the vendor +branch for unsigned char/int fixes and removal of a DoS. + +Documentation in /usr/share/doc/ntp is generated from the HTML files with +lynx (without the GIF files of course). + +A patch to fix IPV6_MULTICAST_LOOP was committed to head as r222444 and +filed as http://bugs.ntp.org/show_bug.cgi?id=1936. Check if still needed +or re-apply on update. + From owner-svn-src-all@FreeBSD.ORG Mon Dec 22 22:15:32 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0A818A92; Mon, 22 Dec 2014 22:15:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D15FA377A; Mon, 22 Dec 2014 22:15:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBMMFVu7095791; Mon, 22 Dec 2014 22:15:31 GMT (envelope-from roberto@FreeBSD.org) Received: (from roberto@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBMMFVWM095790; Mon, 22 Dec 2014 22:15:31 GMT (envelope-from roberto@FreeBSD.org) Message-Id: <201412222215.sBMMFVWM095790@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: roberto set sender to roberto@FreeBSD.org using -f From: Ollivier Robert Date: Mon, 22 Dec 2014 22:15:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r276092 - in vendor/ntp/dist: html/pic ports X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Dec 2014 22:15:32 -0000 Author: roberto Date: Mon Dec 22 22:15:31 2014 New Revision: 276092 URL: https://svnweb.freebsd.org/changeset/base/276092 Log: Remove files that should not be merged into head when updating ntp. Deleted: vendor/ntp/dist/html/pic/ vendor/ntp/dist/ports/ From owner-svn-src-all@FreeBSD.ORG Mon Dec 22 22:22:11 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E0B7AD66; Mon, 22 Dec 2014 22:22:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B304438A9; Mon, 22 Dec 2014 22:22:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBMMMBHx000268; Mon, 22 Dec 2014 22:22:11 GMT (envelope-from roberto@FreeBSD.org) Received: (from roberto@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBMMMBcu000266; Mon, 22 Dec 2014 22:22:11 GMT (envelope-from roberto@FreeBSD.org) Message-Id: <201412222222.sBMMMBcu000266@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: roberto set sender to roberto@FreeBSD.org using -f From: Ollivier Robert Date: Mon, 22 Dec 2014 22:22:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r276093 - vendor/ntp/dist/ntpd X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Dec 2014 22:22:12 -0000 Author: roberto Date: Mon Dec 22 22:22:10 2014 New Revision: 276093 URL: https://svnweb.freebsd.org/changeset/base/276093 Log: Add the two patches from the port in net/ntp/files to fix compilation issues with vendor code. r375210 & r375215. Modified: vendor/ntp/dist/ntpd/ntp_io.c vendor/ntp/dist/ntpd/refclock_mx4200.c Modified: vendor/ntp/dist/ntpd/ntp_io.c ============================================================================== --- vendor/ntp/dist/ntpd/ntp_io.c Mon Dec 22 22:15:31 2014 (r276092) +++ vendor/ntp/dist/ntpd/ntp_io.c Mon Dec 22 22:22:10 2014 (r276093) @@ -3454,15 +3454,15 @@ read_network_packet( if (AF_INET6 == itf->family) { DPRINTF(1, ("Got an IPv6 packet, from <%s> (%d) to <%s> (%d)\n", stoa(&rb->recv_srcadr), - IN6_IS_ADDR_LOOPBACK(&rb->recv_srcadr), + IN6_IS_ADDR_LOOPBACK(&rb->recv_srcadr.sa6.sin6_addr), stoa(&itf->sin), - !IN6_IS_ADDR_LOOPBACK(&itf->sin) + !IN6_IS_ADDR_LOOPBACK(&itf->sin.sa6.sin6_addr) )); } if ( AF_INET6 == itf->family - && IN6_IS_ADDR_LOOPBACK(&rb->recv_srcadr) - && !IN6_IS_ADDR_LOOPBACK(&itf->sin) + && IN6_IS_ADDR_LOOPBACK(&rb->recv_srcadr.sa6.sin6_addr) + && !IN6_IS_ADDR_LOOPBACK(&itf->sin.sa6.sin6_addr) ) { packets_dropped++; DPRINTF(1, ("DROPPING that packet\n")); Modified: vendor/ntp/dist/ntpd/refclock_mx4200.c ============================================================================== --- vendor/ntp/dist/ntpd/refclock_mx4200.c Mon Dec 22 22:15:31 2014 (r276092) +++ vendor/ntp/dist/ntpd/refclock_mx4200.c Mon Dec 22 22:22:10 2014 (r276093) @@ -1572,7 +1572,7 @@ mx4200_debug(struct peer *peer, char *fm * Print debug message to stdout * In the future, we may want to get get more creative... */ - mvprintf(fmt, ap); + vprintf(fmt, ap); va_end(ap); } @@ -1613,11 +1613,11 @@ mx4200_send(peer, fmt, va_alist) cp = buf; *cp++ = '$'; - n = VSNPRINTF((cp, sizeof(buf) - 1, fmt, ap)); + n = vsnprintf(cp, sizeof(buf) - 1, fmt, ap); ck = mx4200_cksum(cp, n); cp += n; ++n; - n += SNPRINTF((cp, sizeof(buf) - n - 5, "*%02X\r\n", ck)); + n += snprintf(cp, sizeof(buf) - n - 5, "*%02X\r\n", ck); m = write(pp->io.fd, buf, (unsigned)n); if (m < 0) From owner-svn-src-all@FreeBSD.ORG Mon Dec 22 23:03:19 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CE621DD8; Mon, 22 Dec 2014 23:03:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A1B4F647BA; Mon, 22 Dec 2014 23:03:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBMN3J5n020362; Mon, 22 Dec 2014 23:03:19 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBMN3JIs020361; Mon, 22 Dec 2014 23:03:19 GMT (envelope-from des@FreeBSD.org) Message-Id: <201412222303.sBMN3JIs020361@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: des set sender to des@FreeBSD.org using -f From: Dag-Erling Smørgrav Date: Mon, 22 Dec 2014 23:03:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276095 - head/usr.sbin/freebsd-update X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Dec 2014 23:03:19 -0000 Author: des Date: Mon Dec 22 23:03:18 2014 New Revision: 276095 URL: https://svnweb.freebsd.org/changeset/base/276095 Log: Use "RCS tag" instead of "$FreeBSD$ tag", since svn will obediently expand the latter. MFC after: 3 days Modified: head/usr.sbin/freebsd-update/freebsd-update.sh Modified: head/usr.sbin/freebsd-update/freebsd-update.sh ============================================================================== --- head/usr.sbin/freebsd-update/freebsd-update.sh Mon Dec 22 22:29:48 2014 (r276094) +++ head/usr.sbin/freebsd-update/freebsd-update.sh Mon Dec 22 23:03:18 2014 (r276095) @@ -2264,7 +2264,7 @@ upgrade_oldall_to_oldnew () { } # Helper for upgrade_merge: Return zero true iff the two files differ only -# in the contents of their $FreeBSD$ tags. +# in the contents of their RCS tags. samef () { X=`sed -E 's/\\$FreeBSD.*\\$/\$FreeBSD\$/' < $1 | ${SHA256}` Y=`sed -E 's/\\$FreeBSD.*\\$/\$FreeBSD\$/' < $2 | ${SHA256}` @@ -2360,7 +2360,7 @@ upgrade_merge () { # Ask the user to handle any files which didn't merge. while read F; do # If the installed file differs from the version in - # the old release only due to $FreeBSD$ tag expansion + # the old release only due to RCS tag expansion # then just use the version in the new release. if samef merge/old/${F} merge/${OLDRELNUM}/${F}; then cp merge/${RELNUM}/${F} merge/new/${F} @@ -2382,14 +2382,14 @@ manually... # of merging files. while read F; do # Skip files which haven't changed except possibly - # in their $FreeBSD$ tags. + # in their RCS tags. if [ -f merge/old/${F} ] && [ -f merge/new/${F} ] && samef merge/old/${F} merge/new/${F}; then continue fi # Skip files where the installed file differs from - # the old file only due to $FreeBSD$ tags. + # the old file only due to RCS tags. if [ -f merge/old/${F} ] && [ -f merge/${OLDRELNUM}/${F} ] && samef merge/old/${F} merge/${OLDRELNUM}/${F}; then From owner-svn-src-all@FreeBSD.ORG Tue Dec 23 00:47:51 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C9DBA64E; Tue, 23 Dec 2014 00:47:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B2175198; Tue, 23 Dec 2014 00:47:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBN0lp7U070104; Tue, 23 Dec 2014 00:47:51 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBN0llBU070080; Tue, 23 Dec 2014 00:47:47 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201412230047.sBN0llBU070080@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Tue, 23 Dec 2014 00:47:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276096 - in head/sys: arm/conf conf fs/nfs fs/nfsclient modules modules/dtrace modules/dtrace/dtnfsclient modules/dtrace/dtraceall modules/nfs_common modules/nfsclient modules/nfsserve... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2014 00:47:51 -0000 Author: rmacklem Date: Tue Dec 23 00:47:46 2014 New Revision: 276096 URL: https://svnweb.freebsd.org/changeset/base/276096 Log: Remove the old NFS client and server from head, which means that the NFSCLIENT and NFSSERVER kernel options will no longer work. This commit only removes the kernel components. Removal of unused code in the user utilities will be done later. This commit does not include an addition to UPDATING, but that will be committed in a few minutes. Discussed on: freebsd-fs Deleted: head/sys/modules/dtrace/dtnfsclient/ head/sys/modules/nfs_common/ head/sys/modules/nfsclient/ head/sys/modules/nfsserver/ head/sys/nfs/nfs_common.c head/sys/nfsclient/nfs_bio.c head/sys/nfsclient/nfs_kdtrace.c head/sys/nfsclient/nfs_krpc.c head/sys/nfsclient/nfs_nfsiod.c head/sys/nfsclient/nfs_node.c head/sys/nfsclient/nfs_subs.c head/sys/nfsclient/nfs_vfsops.c head/sys/nfsclient/nfs_vnops.c head/sys/nfsserver/nfs_fha_old.c head/sys/nfsserver/nfs_serv.c head/sys/nfsserver/nfs_srvkrpc.c head/sys/nfsserver/nfs_srvsubs.c Modified: head/sys/arm/conf/DOCKSTAR head/sys/arm/conf/DREAMPLUG-1001 head/sys/arm/conf/EA3250 head/sys/conf/NOTES head/sys/conf/files head/sys/conf/options head/sys/fs/nfs/nfs_commonkrpc.c head/sys/fs/nfsclient/nfs_clnode.c head/sys/fs/nfsclient/nfs_clport.c head/sys/fs/nfsclient/nfs_clvfsops.c head/sys/modules/Makefile head/sys/modules/dtrace/Makefile head/sys/modules/dtrace/dtraceall/dtraceall.c head/sys/nfs/bootp_subr.c head/sys/sys/param.h Modified: head/sys/arm/conf/DOCKSTAR ============================================================================== --- head/sys/arm/conf/DOCKSTAR Mon Dec 22 23:03:18 2014 (r276095) +++ head/sys/arm/conf/DOCKSTAR Tue Dec 23 00:47:46 2014 (r276096) @@ -154,7 +154,7 @@ options INVARIANT_SUPPORT # Extra sanit # Enable these options for nfs root configured via BOOTP. options NFSCL # Network Filesystem Client options NFSLOCKD # Network Lock Manager -#options NFS_ROOT # NFS usable as /, requires NFSCLIENT +#options NFS_ROOT # NFS usable as /, requires NFSCL #options BOOTP #options BOOTP_NFSROOT #options BOOTP_NFSV3 Modified: head/sys/arm/conf/DREAMPLUG-1001 ============================================================================== --- head/sys/arm/conf/DREAMPLUG-1001 Mon Dec 22 23:03:18 2014 (r276095) +++ head/sys/arm/conf/DREAMPLUG-1001 Tue Dec 23 00:47:46 2014 (r276096) @@ -162,7 +162,7 @@ options INVARIANT_SUPPORT # Extra sanit # Enable these options for nfs root configured via BOOTP. options NFSCL # Network Filesystem Client options NFSLOCKD # Network Lock Manager -#options NFS_ROOT # NFS usable as /, requires NFSCLIENT +#options NFS_ROOT # NFS usable as /, requires NFSCL #options BOOTP #options BOOTP_NFSROOT #options BOOTP_NFSV3 Modified: head/sys/arm/conf/EA3250 ============================================================================== --- head/sys/arm/conf/EA3250 Mon Dec 22 23:03:18 2014 (r276095) +++ head/sys/arm/conf/EA3250 Tue Dec 23 00:47:46 2014 (r276096) @@ -19,7 +19,7 @@ options INET6 # IPv6 communications p options FFS # Berkeley Fast Filesystem options NFSCL # Network Filesystem Client options NFSLOCKD # Network Lock Manager -options NFS_ROOT # NFS usable as /, requires NFSCLIENT +options NFS_ROOT # NFS usable as /, requires NFSCL options GEOM_PART_BSD # BSD partition scheme options GEOM_PART_MBR # MBR partition scheme options TMPFS # Efficient memory filesystem Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Mon Dec 22 23:03:18 2014 (r276095) +++ head/sys/conf/NOTES Tue Dec 23 00:47:46 2014 (r276096) @@ -1019,7 +1019,7 @@ options DUMMYNET # One of these is mandatory: options FFS #Fast filesystem -options NFSCLIENT #Network File System client +options NFSCL #Network File System client # The rest are optional: options AUTOFS #Automounter filesystem @@ -1027,7 +1027,6 @@ options CD9660 #ISO 9660 filesystem options FDESCFS #File descriptor filesystem options FUSE #FUSE support module options MSDOSFS #MS DOS File System (FAT, FAT32) -options NFSSERVER #Network File System server options NFSLOCKD #Network Lock Manager options NFSCL #New Network Filesystem Client options NFSD #New Network Filesystem Server @@ -2596,7 +2595,7 @@ device pcfclock # Kernel BOOTP support options BOOTP # Use BOOTP to obtain IP address/hostname - # Requires NFSCLIENT and NFS_ROOT + # Requires NFSCL and NFS_ROOT options BOOTP_NFSROOT # NFS mount root filesystem using BOOTP info options BOOTP_NFSV3 # Use NFS v3 to NFS mount root options BOOTP_COMPAT # Workaround for broken bootp daemons. Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Mon Dec 22 23:03:18 2014 (r276095) +++ head/sys/conf/files Tue Dec 23 00:47:46 2014 (r276096) @@ -3559,24 +3559,12 @@ netsmb/smb_smb.c optional netsmb netsmb/smb_subr.c optional netsmb netsmb/smb_trantcp.c optional netsmb netsmb/smb_usr.c optional netsmb -nfs/bootp_subr.c optional bootp nfsclient | bootp nfscl -nfs/krpc_subr.c optional bootp nfsclient | bootp nfscl -nfs/nfs_common.c optional nfsclient | nfsserver -nfs/nfs_diskless.c optional nfsclient nfs_root | nfscl nfs_root -nfs/nfs_fha.c optional nfsserver | nfsd -nfs/nfs_lock.c optional nfsclient | nfscl | nfslockd | nfsd -nfsclient/nfs_bio.c optional nfsclient -nfsclient/nfs_node.c optional nfsclient -nfsclient/nfs_krpc.c optional nfsclient -nfsclient/nfs_subs.c optional nfsclient -nfsclient/nfs_nfsiod.c optional nfsclient -nfsclient/nfs_vfsops.c optional nfsclient -nfsclient/nfs_vnops.c optional nfsclient -nfsserver/nfs_fha_old.c optional nfsserver -nfsserver/nfs_serv.c optional nfsserver -nfsserver/nfs_srvkrpc.c optional nfsserver -nfsserver/nfs_srvsubs.c optional nfsserver -nfs/nfs_nfssvc.c optional nfsserver | nfscl | nfsd +nfs/bootp_subr.c optional bootp nfscl +nfs/krpc_subr.c optional bootp nfscl +nfs/nfs_diskless.c optional nfscl nfs_root +nfs/nfs_fha.c optional nfsd +nfs/nfs_lock.c optional nfscl | nfslockd | nfsd +nfs/nfs_nfssvc.c optional nfscl | nfsd nlm/nlm_advlock.c optional nfslockd | nfsd nlm/nlm_prot_clnt.c optional nfslockd | nfsd nlm/nlm_prot_impl.c optional nfslockd | nfsd @@ -3887,26 +3875,26 @@ opencrypto/gfmult.c optional crypto opencrypto/rmd160.c optional crypto | ipsec opencrypto/skipjack.c optional crypto opencrypto/xform.c optional crypto -rpc/auth_none.c optional krpc | nfslockd | nfsclient | nfsserver | nfscl | nfsd -rpc/auth_unix.c optional krpc | nfslockd | nfsclient | nfscl | nfsd -rpc/authunix_prot.c optional krpc | nfslockd | nfsclient | nfsserver | nfscl | nfsd -rpc/clnt_bck.c optional krpc | nfslockd | nfsserver | nfscl | nfsd -rpc/clnt_dg.c optional krpc | nfslockd | nfsclient | nfscl | nfsd -rpc/clnt_rc.c optional krpc | nfslockd | nfsclient | nfscl | nfsd -rpc/clnt_vc.c optional krpc | nfslockd | nfsclient | nfsserver | nfscl | nfsd -rpc/getnetconfig.c optional krpc | nfslockd | nfsclient | nfsserver | nfscl | nfsd -rpc/replay.c optional krpc | nfslockd | nfsclient | nfsserver | nfscl | nfsd -rpc/rpc_callmsg.c optional krpc | nfslockd | nfsclient | nfsserver | nfscl | nfsd -rpc/rpc_generic.c optional krpc | nfslockd | nfsclient | nfsserver | nfscl | nfsd -rpc/rpc_prot.c optional krpc | nfslockd | nfsclient | nfsserver | nfscl | nfsd -rpc/rpcb_clnt.c optional krpc | nfslockd | nfsclient | nfsserver | nfscl | nfsd -rpc/rpcb_prot.c optional krpc | nfslockd | nfsclient | nfsserver | nfscl | nfsd -rpc/svc.c optional krpc | nfslockd | nfsclient | nfsserver | nfscl | nfsd -rpc/svc_auth.c optional krpc | nfslockd | nfsclient | nfsserver | nfscl | nfsd -rpc/svc_auth_unix.c optional krpc | nfslockd | nfsclient | nfsserver | nfscl | nfsd -rpc/svc_dg.c optional krpc | nfslockd | nfsserver | nfscl | nfsd -rpc/svc_generic.c optional krpc | nfslockd | nfsserver | nfscl | nfsd -rpc/svc_vc.c optional krpc | nfslockd | nfsserver | nfscl | nfsd +rpc/auth_none.c optional krpc | nfslockd | nfscl | nfsd +rpc/auth_unix.c optional krpc | nfslockd | nfscl | nfsd +rpc/authunix_prot.c optional krpc | nfslockd | nfscl | nfsd +rpc/clnt_bck.c optional krpc | nfslockd | nfscl | nfsd +rpc/clnt_dg.c optional krpc | nfslockd | nfscl | nfsd +rpc/clnt_rc.c optional krpc | nfslockd | nfscl | nfsd +rpc/clnt_vc.c optional krpc | nfslockd | nfscl | nfsd +rpc/getnetconfig.c optional krpc | nfslockd | nfscl | nfsd +rpc/replay.c optional krpc | nfslockd | nfscl | nfsd +rpc/rpc_callmsg.c optional krpc | nfslockd | nfscl | nfsd +rpc/rpc_generic.c optional krpc | nfslockd | nfscl | nfsd +rpc/rpc_prot.c optional krpc | nfslockd | nfscl | nfsd +rpc/rpcb_clnt.c optional krpc | nfslockd | nfscl | nfsd +rpc/rpcb_prot.c optional krpc | nfslockd | nfscl | nfsd +rpc/svc.c optional krpc | nfslockd | nfscl | nfsd +rpc/svc_auth.c optional krpc | nfslockd | nfscl | nfsd +rpc/svc_auth_unix.c optional krpc | nfslockd | nfscl | nfsd +rpc/svc_dg.c optional krpc | nfslockd | nfscl | nfsd +rpc/svc_generic.c optional krpc | nfslockd | nfscl | nfsd +rpc/svc_vc.c optional krpc | nfslockd | nfscl | nfsd rpc/rpcsec_gss/rpcsec_gss.c optional krpc kgssapi | nfslockd kgssapi | nfscl kgssapi | nfsd kgssapi rpc/rpcsec_gss/rpcsec_gss_conf.c optional krpc kgssapi | nfslockd kgssapi | nfscl kgssapi | nfsd kgssapi rpc/rpcsec_gss/rpcsec_gss_misc.c optional krpc kgssapi | nfslockd kgssapi | nfscl kgssapi | nfsd kgssapi @@ -4012,9 +4000,9 @@ xen/xenbus/xenbusb_if.m optional xen | xen/xenbus/xenbusb.c optional xen | xenhvm xen/xenbus/xenbusb_front.c optional xen | xenhvm xen/xenbus/xenbusb_back.c optional xen | xenhvm -xdr/xdr.c optional krpc | nfslockd | nfsclient | nfsserver | nfscl | nfsd -xdr/xdr_array.c optional krpc | nfslockd | nfsclient | nfsserver | nfscl | nfsd -xdr/xdr_mbuf.c optional krpc | nfslockd | nfsclient | nfsserver | nfscl | nfsd -xdr/xdr_mem.c optional krpc | nfslockd | nfsclient | nfsserver | nfscl | nfsd -xdr/xdr_reference.c optional krpc | nfslockd | nfsclient | nfsserver | nfscl | nfsd -xdr/xdr_sizeof.c optional krpc | nfslockd | nfsclient | nfsserver | nfscl | nfsd +xdr/xdr.c optional krpc | nfslockd | nfscl | nfsd +xdr/xdr_array.c optional krpc | nfslockd | nfscl | nfsd +xdr/xdr_mbuf.c optional krpc | nfslockd | nfscl | nfsd +xdr/xdr_mem.c optional krpc | nfslockd | nfscl | nfsd +xdr/xdr_reference.c optional krpc | nfslockd | nfscl | nfsd +xdr/xdr_sizeof.c optional krpc | nfslockd | nfscl | nfsd Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Mon Dec 22 23:03:18 2014 (r276095) +++ head/sys/conf/options Tue Dec 23 00:47:46 2014 (r276096) @@ -253,11 +253,6 @@ KGSSAPI_DEBUG opt_kgssapi.h # sys/i386/i386/autoconf.c. If any of these filesystems are # statically compiled into the kernel, code for mounting them as root # filesystems will be enabled - but look below. -NFSCLIENT opt_nfs.h -NFSSERVER opt_nfs.h - -# Use these options to compile the experimental nfs client and/or -# server that supports NFSv4 into a kernel. # NFSCL - client # NFSD - server NFSCL opt_nfs.h Modified: head/sys/fs/nfs/nfs_commonkrpc.c ============================================================================== --- head/sys/fs/nfs/nfs_commonkrpc.c Mon Dec 22 23:03:18 2014 (r276095) +++ head/sys/fs/nfs/nfs_commonkrpc.c Tue Dec 23 00:47:46 2014 (r276096) @@ -260,7 +260,7 @@ newnfs_connect(struct nfsmount *nmp, str client = clnt_reconnect_create(nconf, saddr, nrp->nr_prog, nrp->nr_vers, sndreserve, rcvreserve); - CLNT_CONTROL(client, CLSET_WAITCHAN, "newnfsreq"); + CLNT_CONTROL(client, CLSET_WAITCHAN, "nfsreq"); if (nmp != NULL) { if ((nmp->nm_flag & NFSMNT_INT)) CLNT_CONTROL(client, CLSET_INTERRUPTIBLE, &one); @@ -1166,10 +1166,10 @@ nfs_msg(struct thread *td, const char *s p = td ? td->td_proc : NULL; if (error) { - tprintf(p, LOG_INFO, "newnfs server %s: %s, error %d\n", + tprintf(p, LOG_INFO, "nfs server %s: %s, error %d\n", server, msg, error); } else { - tprintf(p, LOG_INFO, "newnfs server %s: %s\n", server, msg); + tprintf(p, LOG_INFO, "nfs server %s: %s\n", server, msg); } return (0); } Modified: head/sys/fs/nfsclient/nfs_clnode.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clnode.c Mon Dec 22 23:03:18 2014 (r276095) +++ head/sys/fs/nfsclient/nfs_clnode.c Tue Dec 23 00:47:46 2014 (r276096) @@ -122,7 +122,7 @@ ncl_nget(struct mount *mntp, u_int8_t *f } np = uma_zalloc(newnfsnode_zone, M_WAITOK | M_ZERO); - error = getnewvnode("newnfs", mntp, &newnfs_vnodeops, &nvp); + error = getnewvnode("nfs", mntp, &newnfs_vnodeops, &nvp); if (error) { uma_zfree(newnfsnode_zone, np); return (error); Modified: head/sys/fs/nfsclient/nfs_clport.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clport.c Mon Dec 22 23:03:18 2014 (r276095) +++ head/sys/fs/nfsclient/nfs_clport.c Tue Dec 23 00:47:46 2014 (r276096) @@ -198,7 +198,7 @@ nfscl_nget(struct mount *mntp, struct vn } np = uma_zalloc(newnfsnode_zone, M_WAITOK | M_ZERO); - error = getnewvnode("newnfs", mntp, &newnfs_vnodeops, &nvp); + error = getnewvnode("nfs", mntp, &newnfs_vnodeops, &nvp); if (error) { uma_zfree(newnfsnode_zone, np); FREE((caddr_t)nfhp, M_NFSFH); Modified: head/sys/fs/nfsclient/nfs_clvfsops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clvfsops.c Mon Dec 22 23:03:18 2014 (r276095) +++ head/sys/fs/nfsclient/nfs_clvfsops.c Tue Dec 23 00:47:46 2014 (r276096) @@ -152,7 +152,7 @@ MODULE_DEPEND(nfs, nfslock, 1, 1, 1); * will be defined for kernels built without NFS_ROOT, although it * isn't used in that case. */ -#if !defined(NFS_ROOT) && !defined(NFSCLIENT) +#if !defined(NFS_ROOT) struct nfs_diskless nfs_diskless = { { { 0 } } }; struct nfsv3_diskless nfsv3_diskless = { { { 0 } } }; int nfs_diskless_valid = 0; @@ -704,7 +704,7 @@ nfs_decode_args(struct mount *mp, struct while (newnfs_connect(nmp, &nmp->nm_sockreq, cred, td, 0)) { printf("newnfs_args: retrying connect\n"); - (void) nfs_catnap(PSOCK, 0, "newnfscon"); + (void) nfs_catnap(PSOCK, 0, "nfscon"); } } } else { @@ -1063,7 +1063,7 @@ nfs_mount(struct mount *mp) * greater than NFS_MAXDGRAMDATA, those thread(s) will be * hung, retrying the RPC(s) forever. Usually these threads * will be seen doing an uninterruptible sleep on wait channel - * "newnfsreq" (truncated to "newnfsre" by procstat). + * "nfsreq". */ if (args.sotype == SOCK_DGRAM && nmp->nm_sotype == SOCK_STREAM) tprintf(td->td_proc, LOG_WARNING, Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Mon Dec 22 23:03:18 2014 (r276095) +++ head/sys/modules/Makefile Tue Dec 23 00:47:46 2014 (r276096) @@ -248,14 +248,11 @@ SUBDIR= \ netfpga10g \ ${_netgraph} \ ${_nfe} \ - nfs_common \ nfscl \ - nfsclient \ nfscommon \ nfsd \ nfslock \ nfslockd \ - nfsserver \ nfssvc \ nge \ nmdm \ Modified: head/sys/modules/dtrace/Makefile ============================================================================== --- head/sys/modules/dtrace/Makefile Mon Dec 22 23:03:18 2014 (r276095) +++ head/sys/modules/dtrace/Makefile Tue Dec 23 00:47:46 2014 (r276096) @@ -4,7 +4,6 @@ SUBDIR= dtmalloc \ dtnfscl \ - dtnfsclient \ dtrace \ dtraceall \ dtrace_test \ Modified: head/sys/modules/dtrace/dtraceall/dtraceall.c ============================================================================== --- head/sys/modules/dtrace/dtraceall/dtraceall.c Mon Dec 22 23:03:18 2014 (r276095) +++ head/sys/modules/dtrace/dtraceall/dtraceall.c Tue Dec 23 00:47:46 2014 (r276096) @@ -69,9 +69,6 @@ MODULE_DEPEND(dtraceall, dtmalloc, 1, 1, #if defined(NFSCLIENT) MODULE_DEPEND(dtraceall, dtnfscl, 1, 1, 1); #endif -#if defined(NFSCLIENT) -MODULE_DEPEND(dtraceall, dtnfsclient, 1, 1, 1); -#endif #if defined(__amd64__) || defined(__i386__) || defined(__powerpc__) MODULE_DEPEND(dtraceall, fbt, 1, 1, 1); #endif Modified: head/sys/nfs/bootp_subr.c ============================================================================== --- head/sys/nfs/bootp_subr.c Mon Dec 22 23:03:18 2014 (r276095) +++ head/sys/nfs/bootp_subr.c Tue Dec 23 00:47:46 2014 (r276096) @@ -1735,9 +1735,6 @@ retry: goto out; } rootdevnames[0] = "nfs:"; -#ifdef NFSCLIENT - rootdevnames[1] = "oldnfs:"; -#endif nfs_diskless_valid = 3; } Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Mon Dec 22 23:03:18 2014 (r276095) +++ head/sys/sys/param.h Tue Dec 23 00:47:46 2014 (r276096) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1100050 /* Master, propagated to newvers */ +#define __FreeBSD_version 1100051 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-all@FreeBSD.ORG Tue Dec 23 01:32:20 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 42EBD343; Tue, 23 Dec 2014 01:32:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2FD8C11C9; Tue, 23 Dec 2014 01:32:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBN1WKMO093023; Tue, 23 Dec 2014 01:32:20 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBN1WKej093022; Tue, 23 Dec 2014 01:32:20 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201412230132.sBN1WKej093022@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Tue, 23 Dec 2014 01:32:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276097 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2014 01:32:20 -0000 Author: rmacklem Date: Tue Dec 23 01:32:18 2014 New Revision: 276097 URL: https://svnweb.freebsd.org/changeset/base/276097 Log: Add an UPDATING entry for r276096, which removed the kernel sources for the old NFS client and server. Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Tue Dec 23 00:47:46 2014 (r276096) +++ head/UPDATING Tue Dec 23 01:32:18 2014 (r276097) @@ -31,6 +31,14 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11 disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20141222: + The old NFS client and server (kernel options NFSCLIENT, NFSSERVER) + kernel sources have been removed. The .h files remain, since some + utilities include them. This will need to be fixed later. + If "mount -t oldnfs ..." is attempted, it will fail. + If the "-o" option on mountd(8), nfsd(8) or nfsstat(1) is used, + the utilities will report errors. + 20141121: The handling of LOCAL_LIB_DIRS has been altered to skip addition of directories to top level SUBDIR variable when their parent From owner-svn-src-all@FreeBSD.ORG Tue Dec 23 02:14:52 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8B605A0C; Tue, 23 Dec 2014 02:14:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 765901835; Tue, 23 Dec 2014 02:14:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBN2EqpT012079; Tue, 23 Dec 2014 02:14:52 GMT (envelope-from neel@FreeBSD.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBN2Eomp012070; Tue, 23 Dec 2014 02:14:50 GMT (envelope-from neel@FreeBSD.org) Message-Id: <201412230214.sBN2Eomp012070@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: neel set sender to neel@FreeBSD.org using -f From: Neel Natu Date: Tue, 23 Dec 2014 02:14:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276098 - in head/sys/amd64: include vmm vmm/amd vmm/intel X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2014 02:14:52 -0000 Author: neel Date: Tue Dec 23 02:14:49 2014 New Revision: 276098 URL: https://svnweb.freebsd.org/changeset/base/276098 Log: Allow ktr(4) tracing of all guest exceptions via the tunable "hw.vmm.trace_guest_exceptions". To enable this feature set the tunable to "1" before loading vmm.ko. Tracing the guest exceptions can be useful when debugging guest triple faults. Note that there is a performance impact when exception tracing is enabled since every exception will now trigger a VM-exit. Also, handle machine check exceptions that happen during guest execution by vectoring to the host's machine check handler via "int $18". Discussed with: grehan MFC after: 2 weeks Modified: head/sys/amd64/include/vmm.h head/sys/amd64/vmm/amd/svm.c head/sys/amd64/vmm/intel/vmcs.c head/sys/amd64/vmm/intel/vmcs.h head/sys/amd64/vmm/intel/vmx.c head/sys/amd64/vmm/vmm.c Modified: head/sys/amd64/include/vmm.h ============================================================================== --- head/sys/amd64/include/vmm.h Tue Dec 23 01:32:18 2014 (r276097) +++ head/sys/amd64/include/vmm.h Tue Dec 23 02:14:49 2014 (r276098) @@ -358,6 +358,8 @@ void vm_copyin(struct vm *vm, int vcpuid void *kaddr, size_t len); void vm_copyout(struct vm *vm, int vcpuid, const void *kaddr, struct vm_copyinfo *copyinfo, size_t len); + +int vcpu_trace_exceptions(struct vm *vm, int vcpuid); #endif /* KERNEL */ #define VM_MAXCPU 16 /* maximum virtual cpus */ Modified: head/sys/amd64/vmm/amd/svm.c ============================================================================== --- head/sys/amd64/vmm/amd/svm.c Tue Dec 23 01:32:18 2014 (r276097) +++ head/sys/amd64/vmm/amd/svm.c Tue Dec 23 02:14:49 2014 (r276098) @@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include "vmm_lapic.h" @@ -429,8 +430,24 @@ vmcb_init(struct svm_softc *sc, int vcpu svm_enable_intercept(sc, vcpu, VMCB_CR_INTCPT, mask); } - /* Intercept Machine Check exceptions. */ - svm_enable_intercept(sc, vcpu, VMCB_EXC_INTCPT, BIT(IDT_MC)); + + /* + * Intercept everything when tracing guest exceptions otherwise + * just intercept machine check exception. + */ + if (vcpu_trace_exceptions(sc->vm, vcpu)) { + for (n = 0; n < 32; n++) { + /* + * Skip unimplemented vectors in the exception bitmap. + */ + if (n == 2 || n == 9) { + continue; + } + svm_enable_intercept(sc, vcpu, VMCB_EXC_INTCPT, BIT(n)); + } + } else { + svm_enable_intercept(sc, vcpu, VMCB_EXC_INTCPT, BIT(IDT_MC)); + } /* Intercept various events (for e.g. I/O, MSR and CPUID accesses) */ svm_enable_intercept(sc, vcpu, VMCB_CTRL1_INTCPT, VMCB_INTCPT_IO); @@ -1176,9 +1193,10 @@ svm_vmexit(struct svm_softc *svm_sc, int struct vmcb_state *state; struct vmcb_ctrl *ctrl; struct svm_regctx *ctx; + struct vm_exception exception; uint64_t code, info1, info2, val; uint32_t eax, ecx, edx; - int handled; + int error, errcode_valid, handled, idtvec, reflect; bool retu; ctx = svm_get_guest_regctx(svm_sc, vcpu); @@ -1237,8 +1255,78 @@ svm_vmexit(struct svm_softc *svm_sc, int case VMCB_EXIT_NMI: /* external NMI */ handled = 1; break; - case VMCB_EXIT_MC: /* machine check */ + case 0x40 ... 0x5F: vmm_stat_incr(svm_sc->vm, vcpu, VMEXIT_EXCEPTION, 1); + reflect = 1; + idtvec = code - 0x40; + switch (idtvec) { + case IDT_MC: + /* + * Call the machine check handler by hand. Also don't + * reflect the machine check back into the guest. + */ + reflect = 0; + VCPU_CTR0(svm_sc->vm, vcpu, "Vectoring to MCE handler"); + __asm __volatile("int $18"); + break; + case IDT_PF: + error = svm_setreg(svm_sc, vcpu, VM_REG_GUEST_CR2, + info2); + KASSERT(error == 0, ("%s: error %d updating cr2", + __func__, error)); + /* fallthru */ + case IDT_NP: + case IDT_SS: + case IDT_GP: + case IDT_AC: + case IDT_TS: + errcode_valid = 1; + break; + + case IDT_DF: + errcode_valid = 1; + info1 = 0; + break; + + case IDT_BP: + case IDT_OF: + case IDT_BR: + /* + * The 'nrip' field is populated for INT3, INTO and + * BOUND exceptions and this also implies that + * 'inst_length' is non-zero. + * + * Reset 'inst_length' to zero so the guest %rip at + * event injection is identical to what it was when + * the exception originally happened. + */ + VCPU_CTR2(svm_sc->vm, vcpu, "Reset inst_length from %d " + "to zero before injecting exception %d", + vmexit->inst_length, idtvec); + vmexit->inst_length = 0; + /* fallthru */ + default: + errcode_valid = 0; + break; + } + KASSERT(vmexit->inst_length == 0, ("invalid inst_length (%d) " + "when reflecting exception %d into guest", + vmexit->inst_length, idtvec)); + + if (reflect) { + /* Reflect the exception back into the guest */ + exception.vector = idtvec; + exception.error_code_valid = errcode_valid; + exception.error_code = errcode_valid ? info1 : 0; + VCPU_CTR2(svm_sc->vm, vcpu, "Reflecting exception " + "%d/%#x into the guest", exception.vector, + exception.error_code); + error = vm_inject_exception(svm_sc->vm, vcpu, + &exception); + KASSERT(error == 0, ("%s: vm_inject_exception error %d", + __func__, error)); + } + handled = 1; break; case VMCB_EXIT_MSR: /* MSR access. */ eax = state->rax; Modified: head/sys/amd64/vmm/intel/vmcs.c ============================================================================== --- head/sys/amd64/vmm/intel/vmcs.c Tue Dec 23 01:32:18 2014 (r276097) +++ head/sys/amd64/vmm/intel/vmcs.c Tue Dec 23 02:14:49 2014 (r276098) @@ -332,7 +332,6 @@ vmcs_init(struct vmcs *vmcs) int error, codesel, datasel, tsssel; u_long cr0, cr4, efer; uint64_t pat, fsbase, idtrbase; - uint32_t exc_bitmap; codesel = vmm_get_host_codesel(); datasel = vmm_get_host_datasel(); @@ -417,11 +416,6 @@ vmcs_init(struct vmcs *vmcs) if ((error = vmwrite(VMCS_HOST_RIP, (u_long)vmx_exit_guest)) != 0) goto done; - /* exception bitmap */ - exc_bitmap = 1 << IDT_MC; - if ((error = vmwrite(VMCS_EXCEPTION_BITMAP, exc_bitmap)) != 0) - goto done; - /* link pointer */ if ((error = vmwrite(VMCS_LINK_POINTER, ~0)) != 0) goto done; Modified: head/sys/amd64/vmm/intel/vmcs.h ============================================================================== --- head/sys/amd64/vmm/intel/vmcs.h Tue Dec 23 01:32:18 2014 (r276097) +++ head/sys/amd64/vmm/intel/vmcs.h Tue Dec 23 02:14:49 2014 (r276098) @@ -321,7 +321,7 @@ vmcs_write(uint32_t encoding, uint64_t v #define EXIT_REASON_MTF 37 #define EXIT_REASON_MONITOR 39 #define EXIT_REASON_PAUSE 40 -#define EXIT_REASON_MCE 41 +#define EXIT_REASON_MCE_DURING_ENTRY 41 #define EXIT_REASON_TPR 43 #define EXIT_REASON_APIC_ACCESS 44 #define EXIT_REASON_VIRTUALIZED_EOI 45 Modified: head/sys/amd64/vmm/intel/vmx.c ============================================================================== --- head/sys/amd64/vmm/intel/vmx.c Tue Dec 23 01:32:18 2014 (r276097) +++ head/sys/amd64/vmm/intel/vmx.c Tue Dec 23 02:14:49 2014 (r276098) @@ -283,8 +283,8 @@ exit_reason_to_str(int reason) return "monitor"; case EXIT_REASON_PAUSE: return "pause"; - case EXIT_REASON_MCE: - return "mce"; + case EXIT_REASON_MCE_DURING_ENTRY: + return "mce-during-entry"; case EXIT_REASON_TPR: return "tpr"; case EXIT_REASON_APIC_ACCESS: @@ -821,6 +821,7 @@ vmx_vminit(struct vm *vm, pmap_t pmap) int i, error; struct vmx *vmx; struct vmcs *vmcs; + uint32_t exc_bitmap; vmx = malloc(sizeof(struct vmx), M_VMX, M_WAITOK | M_ZERO); if ((uintptr_t)vmx & PAGE_MASK) { @@ -911,6 +912,14 @@ vmx_vminit(struct vm *vm, pmap_t pmap) error += vmwrite(VMCS_ENTRY_CTLS, entry_ctls); error += vmwrite(VMCS_MSR_BITMAP, vtophys(vmx->msr_bitmap)); error += vmwrite(VMCS_VPID, vpid[i]); + + /* exception bitmap */ + if (vcpu_trace_exceptions(vm, i)) + exc_bitmap = 0xffffffff; + else + exc_bitmap = 1 << IDT_MC; + error += vmwrite(VMCS_EXCEPTION_BITMAP, exc_bitmap); + if (virtual_interrupt_delivery) { error += vmwrite(VMCS_APIC_ACCESS, APIC_ACCESS_ADDRESS); error += vmwrite(VMCS_VIRTUAL_APIC, @@ -2056,8 +2065,9 @@ vmx_exit_process(struct vmx *vmx, int vc struct vlapic *vlapic; struct vm_inout_str *vis; struct vm_task_switch *ts; + struct vm_exception vmexc; uint32_t eax, ecx, edx, idtvec_info, idtvec_err, intr_info, inst_info; - uint32_t intr_type, reason; + uint32_t intr_type, intr_vec, reason; uint64_t exitintinfo, qual, gpa; bool retu; @@ -2074,6 +2084,18 @@ vmx_exit_process(struct vmx *vmx, int vc vmm_stat_incr(vmx->vm, vcpu, VMEXIT_COUNT, 1); /* + * VM-entry failures during or after loading guest state. + * + * These VM-exits are uncommon but must be handled specially + * as most VM-exit fields are not populated as usual. + */ + if (__predict_false(reason == EXIT_REASON_MCE_DURING_ENTRY)) { + VCPU_CTR0(vmx->vm, vcpu, "Handling MCE during VM-entry"); + __asm __volatile("int $18"); + return (1); + } + + /* * VM exits that can be triggered during event delivery need to * be handled specially by re-injecting the event if the IDT * vectoring information field's valid bit is set. @@ -2305,6 +2327,9 @@ vmx_exit_process(struct vmx *vmx, int vc KASSERT((intr_info & VMCS_INTR_VALID) != 0, ("VM exit interruption info invalid: %#x", intr_info)); + intr_vec = intr_info & 0xff; + intr_type = intr_info & VMCS_INTR_T_MASK; + /* * If Virtual NMIs control is 1 and the VM-exit is due to a * fault encountered during the execution of IRET then we must @@ -2315,16 +2340,55 @@ vmx_exit_process(struct vmx *vmx, int vc * See "Information for VM Exits Due to Vectored Events". */ if ((idtvec_info & VMCS_IDT_VEC_VALID) == 0 && - (intr_info & 0xff) != IDT_DF && + (intr_vec != IDT_DF) && (intr_info & EXIT_QUAL_NMIUDTI) != 0) vmx_restore_nmi_blocking(vmx, vcpu); /* * The NMI has already been handled in vmx_exit_handle_nmi(). */ - if ((intr_info & VMCS_INTR_T_MASK) == VMCS_INTR_T_NMI) + if (intr_type == VMCS_INTR_T_NMI) return (1); - break; + + /* + * Call the machine check handler by hand. Also don't reflect + * the machine check back into the guest. + */ + if (intr_vec == IDT_MC) { + VCPU_CTR0(vmx->vm, vcpu, "Vectoring to MCE handler"); + __asm __volatile("int $18"); + return (1); + } + + if (intr_vec == IDT_PF) { + error = vmxctx_setreg(vmxctx, VM_REG_GUEST_CR2, qual); + KASSERT(error == 0, ("%s: vmxctx_setreg(cr2) error %d", + __func__, error)); + } + + /* + * Software exceptions exhibit trap-like behavior. This in + * turn requires populating the VM-entry instruction length + * so that the %rip in the trap frame is past the INT3/INTO + * instruction. + */ + if (intr_type == VMCS_INTR_T_SWEXCEPTION) + vmcs_write(VMCS_ENTRY_INST_LENGTH, vmexit->inst_length); + + /* Reflect all other exceptions back into the guest */ + bzero(&vmexc, sizeof(struct vm_exception)); + vmexc.vector = intr_vec; + if (intr_info & VMCS_INTR_DEL_ERRCODE) { + vmexc.error_code_valid = 1; + vmexc.error_code = vmcs_read(VMCS_EXIT_INTR_ERRCODE); + } + VCPU_CTR2(vmx->vm, vcpu, "Reflecting exception %d/%#x into " + "the guest", vmexc.vector, vmexc.error_code); + error = vm_inject_exception(vmx->vm, vcpu, &vmexc); + KASSERT(error == 0, ("%s: vm_inject_exception error %d", + __func__, error)); + return (1); + case EXIT_REASON_EPT_FAULT: /* * If 'gpa' lies within the address space allocated to Modified: head/sys/amd64/vmm/vmm.c ============================================================================== --- head/sys/amd64/vmm/vmm.c Tue Dec 23 01:32:18 2014 (r276097) +++ head/sys/amd64/vmm/vmm.c Tue Dec 23 02:14:49 2014 (r276098) @@ -207,6 +207,11 @@ static int vmm_ipinum; SYSCTL_INT(_hw_vmm, OID_AUTO, ipinum, CTLFLAG_RD, &vmm_ipinum, 0, "IPI vector used for vcpu notifications"); +static int trace_guest_exceptions; +SYSCTL_INT(_hw_vmm, OID_AUTO, trace_guest_exceptions, CTLFLAG_RDTUN, + &trace_guest_exceptions, 0, + "Trap into hypervisor on all guest exceptions and reflect them back"); + static void vcpu_cleanup(struct vm *vm, int i, bool destroy) { @@ -250,6 +255,13 @@ vcpu_init(struct vm *vm, int vcpu_id, bo vmm_stat_init(vcpu->stats); } +int +vcpu_trace_exceptions(struct vm *vm, int vcpuid) +{ + + return (trace_guest_exceptions); +} + struct vm_exit * vm_exitinfo(struct vm *vm, int cpuid) { From owner-svn-src-all@FreeBSD.ORG Tue Dec 23 02:39:56 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C5C3AFA; Tue, 23 Dec 2014 02:39:56 +0000 (UTC) Received: from st11p02mm-asmtp002.mac.com (st11p02mm-asmtpout002.mac.com [17.172.220.237]) (using TLSv1.2 with cipher DHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9781964367; Tue, 23 Dec 2014 02:39:56 +0000 (UTC) Received: from fukuyama.hsd1.ca.comcast.net (unknown [73.162.13.215]) by st11p02mm-asmtp002.mac.com (Oracle Communications Messaging Server 7.0.5.33.0 64bit (built Aug 27 2014)) with ESMTPSA id <0NH000CIMKQC4440@st11p02mm-asmtp002.mac.com>; Tue, 23 Dec 2014 02:39:52 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.13.68,1.0.33,0.0.0000 definitions=2014-12-23_01:2014-12-23,2014-12-23,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1412080000 definitions=main-1412230023 Content-type: text/plain; charset=windows-1252 MIME-version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Subject: Re: svn commit: r276008 - in head/sys: kern sys From: Rui Paulo In-reply-to: <201412221417.42894.jhb@freebsd.org> Date: Mon, 22 Dec 2014 18:39:48 -0800 Content-transfer-encoding: quoted-printable Message-id: <2C4635EF-6BE6-4ED7-B9D1-237F76259E88@me.com> References: <201412211332.sBLDW8VC030548@svn.freebsd.org> <201412220940.02509.jhb@freebsd.org> <08A2ABA0-C982-46BC-B309-3C23B8D277B9@me.com> <201412221417.42894.jhb@freebsd.org> To: John Baldwin X-Mailer: Apple Mail (2.1993) Cc: Konstantin Belousov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Andriy Gapon X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2014 02:39:56 -0000 On Dec 22, 2014, at 11:17, John Baldwin wrote: >=20 > On Monday, December 22, 2014 1:29:38 pm Rui Paulo wrote: >> On Dec 22, 2014, at 06:40, John Baldwin wrote: >>> Is there something specific to core dumps that makes vn_fullpath() = more >>> useful to have working before a process tries to open the core? (As >>> compared to other newly-created files) >>=20 >> Yes: the ability to provide the full path to userland when a core = dump file=20 > is generated. >=20 > Can you be more specific? Are we printing the path on the console = after > destroying the generated path? Is it being written into a note in the = core > itself (but only having the vnode of the core file available and not = the=20 > generated path)? No. I have some code that calls devctl_notify() when a core dump is = generated which is useful for running an automated debugging session. = We use this at work and I'll see if I can upstream it. What Konstantin = fixed was the generation of the cache entry in the corefile_open() = routine. This lets me call vn_fullpath() after vn_close() with a high = probability that it will work whereas, in the past, it was never in the = cache, so vn_fullpath() would always fail. -- Rui Paulo From owner-svn-src-all@FreeBSD.ORG Tue Dec 23 02:46:01 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DB47427D; Tue, 23 Dec 2014 02:46:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C6DB164448; Tue, 23 Dec 2014 02:46:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBN2k1rx026555; Tue, 23 Dec 2014 02:46:01 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBN2k1Rt026554; Tue, 23 Dec 2014 02:46:01 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201412230246.sBN2k1Rt026554@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Tue, 23 Dec 2014 02:46:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276099 - stable/10/usr.bin/sed X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2014 02:46:02 -0000 Author: pfg Date: Tue Dec 23 02:46:00 2014 New Revision: 276099 URL: https://svnweb.freebsd.org/changeset/base/276099 Log: MFC r275838; sed: Bounds check the file path used in the 'w' command. Modified version of a diff from Sebastien Marie to prevent a crash found with the afl fuzzer. Obtained from: OpenBSD (CVS Rev. 1.37) Modified: stable/10/usr.bin/sed/compile.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/sed/compile.c ============================================================================== --- stable/10/usr.bin/sed/compile.c Tue Dec 23 02:14:49 2014 (r276098) +++ stable/10/usr.bin/sed/compile.c Tue Dec 23 02:46:00 2014 (r276099) @@ -558,7 +558,7 @@ compile_flags(char *p, struct s_subst *s { int gn; /* True if we have seen g or n */ unsigned long nval; - char wfile[_POSIX2_LINE_MAX + 1], *q; + char wfile[_POSIX2_LINE_MAX + 1], *q, *eq; s->n = 1; /* Default */ s->p = 0; @@ -611,9 +611,12 @@ compile_flags(char *p, struct s_subst *s #endif EATSPACE(); q = wfile; + eq = wfile + sizeof(wfile) - 1; while (*p) { if (*p == '\n') break; + if (q >= eq) + err(1, "wfile too long"); *q++ = *p++; } *q = '\0'; From owner-svn-src-all@FreeBSD.ORG Tue Dec 23 02:47:15 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 20CD93C7; Tue, 23 Dec 2014 02:47:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0C52364463; Tue, 23 Dec 2014 02:47:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBN2lETG026727; Tue, 23 Dec 2014 02:47:14 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBN2lEm4026726; Tue, 23 Dec 2014 02:47:14 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201412230247.sBN2lEm4026726@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Tue, 23 Dec 2014 02:47:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r276100 - stable/9/usr.bin/sed X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2014 02:47:15 -0000 Author: pfg Date: Tue Dec 23 02:47:14 2014 New Revision: 276100 URL: https://svnweb.freebsd.org/changeset/base/276100 Log: MFC r275838; sed: Bounds check the file path used in the 'w' command. Modified version of a diff from Sebastien Marie to prevent a crash found with the afl fuzzer. Obtained from: OpenBSD (CVS Rev. 1.37) Modified: stable/9/usr.bin/sed/compile.c Directory Properties: stable/9/usr.bin/sed/ (props changed) Modified: stable/9/usr.bin/sed/compile.c ============================================================================== --- stable/9/usr.bin/sed/compile.c Tue Dec 23 02:46:00 2014 (r276099) +++ stable/9/usr.bin/sed/compile.c Tue Dec 23 02:47:14 2014 (r276100) @@ -558,7 +558,7 @@ compile_flags(char *p, struct s_subst *s { int gn; /* True if we have seen g or n */ unsigned long nval; - char wfile[_POSIX2_LINE_MAX + 1], *q; + char wfile[_POSIX2_LINE_MAX + 1], *q, *eq; s->n = 1; /* Default */ s->p = 0; @@ -611,9 +611,12 @@ compile_flags(char *p, struct s_subst *s #endif EATSPACE(); q = wfile; + eq = wfile + sizeof(wfile) - 1; while (*p) { if (*p == '\n') break; + if (q >= eq) + err(1, "wfile too long"); *q++ = *p++; } *q = '\0'; From owner-svn-src-all@FreeBSD.ORG Tue Dec 23 03:00:19 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 52402610; Tue, 23 Dec 2014 03:00:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3E736645F2; Tue, 23 Dec 2014 03:00:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBN30JLj031846; Tue, 23 Dec 2014 03:00:19 GMT (envelope-from rpaulo@FreeBSD.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBN30Jbp031845; Tue, 23 Dec 2014 03:00:19 GMT (envelope-from rpaulo@FreeBSD.org) Message-Id: <201412230300.sBN30Jbp031845@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rpaulo set sender to rpaulo@FreeBSD.org using -f From: Rui Paulo Date: Tue, 23 Dec 2014 03:00:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276101 - head/sys/boot/fdt/dts/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2014 03:00:19 -0000 Author: rpaulo Date: Tue Dec 23 03:00:18 2014 New Revision: 276101 URL: https://svnweb.freebsd.org/changeset/base/276101 Log: Temporarily disable the cpus directive until I figure out what's wrong. Modified: head/sys/boot/fdt/dts/arm/rpi.dts Modified: head/sys/boot/fdt/dts/arm/rpi.dts ============================================================================== --- head/sys/boot/fdt/dts/arm/rpi.dts Tue Dec 23 02:47:14 2014 (r276100) +++ head/sys/boot/fdt/dts/arm/rpi.dts Tue Dec 23 03:00:18 2014 (r276101) @@ -35,6 +35,7 @@ memreserve = <0x08000000 0x08000000>; /* Set by VideoCore */ + /* cpus { #address-cells = <1>; #size-cells = <0>; @@ -45,6 +46,7 @@ clock-frequency = <700000000>; /* 700MHz */ }; }; + */ memory { device_type = "memory"; From owner-svn-src-all@FreeBSD.ORG Tue Dec 23 03:24:18 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 53CD5D28; Tue, 23 Dec 2014 03:24:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 25A9F6625D; Tue, 23 Dec 2014 03:24:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBN3OIge045944; Tue, 23 Dec 2014 03:24:18 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBN3OHtZ045941; Tue, 23 Dec 2014 03:24:17 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201412230324.sBN3OHtZ045941@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Tue, 23 Dec 2014 03:24:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276102 - stable/10/sys/fs/ext2fs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2014 03:24:18 -0000 Author: pfg Date: Tue Dec 23 03:24:16 2014 New Revision: 276102 URL: https://svnweb.freebsd.org/changeset/base/276102 Log: MFC r274437; ifdef ext2_print_inode which is not really used. ext2_print_inode was nice to have for initial development work but is not really used anymore. #ifdef it under a new EXT2FS_DEBUG knob so that we don't spend time compiling it. Modified: stable/10/sys/fs/ext2fs/ext2_extern.h stable/10/sys/fs/ext2fs/ext2_inode_cnv.c stable/10/sys/fs/ext2fs/ext2_vfsops.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/ext2fs/ext2_extern.h ============================================================================== --- stable/10/sys/fs/ext2fs/ext2_extern.h Tue Dec 23 03:00:18 2014 (r276101) +++ stable/10/sys/fs/ext2fs/ext2_extern.h Tue Dec 23 03:24:16 2014 (r276102) @@ -74,7 +74,9 @@ int ext2_vfree(struct vnode *, ino_t, in int ext2_vinit(struct mount *, struct vop_vector *, struct vnode **vpp); int ext2_lookup(struct vop_cachedlookup_args *); int ext2_readdir(struct vop_readdir_args *); +#ifdef EXT2FS_DEBUG void ext2_print_inode(struct inode *); +#endif int ext2_direnter(struct inode *, struct vnode *, struct componentname *); int ext2_dirremove(struct vnode *, struct componentname *); Modified: stable/10/sys/fs/ext2fs/ext2_inode_cnv.c ============================================================================== --- stable/10/sys/fs/ext2fs/ext2_inode_cnv.c Tue Dec 23 03:00:18 2014 (r276101) +++ stable/10/sys/fs/ext2fs/ext2_inode_cnv.c Tue Dec 23 03:24:16 2014 (r276102) @@ -41,6 +41,7 @@ #define XTIME_TO_NSEC(x) ((x & EXT3_NSEC_MASK) >> 2) #define NSEC_TO_XTIME(t) (le32toh(t << 2) & EXT3_NSEC_MASK) +#ifdef EXT2FS_DEBUG void ext2_print_inode(struct inode *in) { @@ -75,6 +76,7 @@ ext2_print_inode(struct inode *in) ep->e_len, ep->e_start_lo, ep->e_start_hi); printf("\n"); } +#endif /* EXT2FS_DEBUG */ /* * raw ext2 inode to inode Modified: stable/10/sys/fs/ext2fs/ext2_vfsops.c ============================================================================== --- stable/10/sys/fs/ext2fs/ext2_vfsops.c Tue Dec 23 03:00:18 2014 (r276101) +++ stable/10/sys/fs/ext2fs/ext2_vfsops.c Tue Dec 23 03:24:16 2014 (r276102) @@ -974,9 +974,9 @@ ext2_vget(struct mount *mp, ino_t ino, i for (i = used_blocks; i < EXT2_NDIR_BLOCKS; i++) ip->i_db[i] = 0; } -/* +#ifdef EXT2FS_DEBUG ext2_print_inode(ip); -*/ +#endif bqrelse(bp); /* From owner-svn-src-all@FreeBSD.ORG Tue Dec 23 03:25:22 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8B095E65; Tue, 23 Dec 2014 03:25:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5D70566270; Tue, 23 Dec 2014 03:25:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBN3PMrJ046145; Tue, 23 Dec 2014 03:25:22 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBN3PLtH046137; Tue, 23 Dec 2014 03:25:21 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201412230325.sBN3PLtH046137@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Tue, 23 Dec 2014 03:25:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r276103 - stable/9/sys/fs/ext2fs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2014 03:25:22 -0000 Author: pfg Date: Tue Dec 23 03:25:20 2014 New Revision: 276103 URL: https://svnweb.freebsd.org/changeset/base/276103 Log: MFC r274437; ifdef ext2_print_inode which is not really used. ext2_print_inode was nice to have for initial development work but is not really used anymore. #ifdef it under a new EXT2FS_DEBUG knob so that we don't spend time compiling it. Modified: stable/9/sys/fs/ext2fs/ext2_extern.h stable/9/sys/fs/ext2fs/ext2_inode_cnv.c stable/9/sys/fs/ext2fs/ext2_vfsops.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/fs/ (props changed) Modified: stable/9/sys/fs/ext2fs/ext2_extern.h ============================================================================== --- stable/9/sys/fs/ext2fs/ext2_extern.h Tue Dec 23 03:24:16 2014 (r276102) +++ stable/9/sys/fs/ext2fs/ext2_extern.h Tue Dec 23 03:25:20 2014 (r276103) @@ -74,7 +74,9 @@ int ext2_vfree(struct vnode *, ino_t, in int ext2_vinit(struct mount *, struct vop_vector *, struct vnode **vpp); int ext2_lookup(struct vop_cachedlookup_args *); int ext2_readdir(struct vop_readdir_args *); +#ifdef EXT2FS_DEBUG void ext2_print_inode(struct inode *); +#endif int ext2_direnter(struct inode *, struct vnode *, struct componentname *); int ext2_dirremove(struct vnode *, struct componentname *); Modified: stable/9/sys/fs/ext2fs/ext2_inode_cnv.c ============================================================================== --- stable/9/sys/fs/ext2fs/ext2_inode_cnv.c Tue Dec 23 03:24:16 2014 (r276102) +++ stable/9/sys/fs/ext2fs/ext2_inode_cnv.c Tue Dec 23 03:25:20 2014 (r276103) @@ -41,6 +41,7 @@ #define XTIME_TO_NSEC(x) ((x & EXT3_NSEC_MASK) >> 2) #define NSEC_TO_XTIME(t) (le32toh(t << 2) & EXT3_NSEC_MASK) +#ifdef EXT2FS_DEBUG void ext2_print_inode(struct inode *in) { @@ -75,6 +76,7 @@ ext2_print_inode(struct inode *in) ep->e_len, ep->e_start_lo, ep->e_start_hi); printf("\n"); } +#endif /* EXT2FS_DEBUG */ /* * raw ext2 inode to inode Modified: stable/9/sys/fs/ext2fs/ext2_vfsops.c ============================================================================== --- stable/9/sys/fs/ext2fs/ext2_vfsops.c Tue Dec 23 03:24:16 2014 (r276102) +++ stable/9/sys/fs/ext2fs/ext2_vfsops.c Tue Dec 23 03:25:20 2014 (r276103) @@ -983,9 +983,9 @@ ext2_vget(struct mount *mp, ino_t ino, i for (i = used_blocks; i < EXT2_NDIR_BLOCKS; i++) ip->i_db[i] = 0; } -/* +#ifdef EXT2FS_DEBUG ext2_print_inode(ip); -*/ +#endif bqrelse(bp); /* From owner-svn-src-all@FreeBSD.ORG Tue Dec 23 05:50:54 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 317387BB; Tue, 23 Dec 2014 05:50:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1DF9F6449B; Tue, 23 Dec 2014 05:50:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBN5orCG012838; Tue, 23 Dec 2014 05:50:53 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBN5orI9012837; Tue, 23 Dec 2014 05:50:53 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201412230550.sBN5orI9012837@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 23 Dec 2014 05:50:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276106 - head/sys/dev/mmc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2014 05:50:54 -0000 Author: imp Date: Tue Dec 23 05:50:53 2014 New Revision: 276106 URL: https://svnweb.freebsd.org/changeset/base/276106 Log: Always select the card before we do the 4.x specific stuff and deselect it after setting the block size. This is a similar bug that was fixed elsewhere, but not here. This makes sure that we leave the card deselected at the end of the loop, and we don't send any commands to the card without it selected. Reviewed by: ian@ Modified: head/sys/dev/mmc/mmc.c Modified: head/sys/dev/mmc/mmc.c ============================================================================== --- head/sys/dev/mmc/mmc.c Tue Dec 23 05:37:09 2014 (r276105) +++ head/sys/dev/mmc/mmc.c Tue Dec 23 05:50:53 2014 (r276106) @@ -1446,10 +1446,10 @@ mmc_discover_cards(struct mmc_softc *sc) break; } + mmc_select_card(sc, ivar->rca); + /* Only MMC >= 4.x cards support EXT_CSD. */ if (ivar->csd.spec_vers >= 4) { - /* Card must be selected to fetch EXT_CSD. */ - mmc_select_card(sc, ivar->rca); mmc_send_ext_csd(sc, ivar->raw_ext_csd); /* Handle extended capacity from EXT_CSD */ sec_count = ivar->raw_ext_csd[EXT_CSD_SEC_CNT] + @@ -1479,7 +1479,6 @@ mmc_discover_cards(struct mmc_softc *sc) mmc_switch(sc, EXT_CSD_CMD_SET_NORMAL, EXT_CSD_ERASE_GRP_DEF, 1); } - mmc_select_card(sc, 0); } else { ivar->bus_width = bus_width_1; ivar->timing = bus_timing_normal; @@ -1506,6 +1505,7 @@ mmc_discover_cards(struct mmc_softc *sc) child = device_add_child(sc->dev, NULL, -1); device_set_ivars(child, ivar); } + mmc_select_card(sc, 0); } } From owner-svn-src-all@FreeBSD.ORG Tue Dec 23 07:04:51 2014 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 79FBD2BC; Tue, 23 Dec 2014 07:04:51 +0000 (UTC) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 21905168A; Tue, 23 Dec 2014 07:04:49 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id JAA02652; Tue, 23 Dec 2014 09:06:35 +0200 (EET) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1Y3JWL-000232-8J; Tue, 23 Dec 2014 09:04:41 +0200 Message-ID: <549913D4.5090103@FreeBSD.org> Date: Tue, 23 Dec 2014 09:03:48 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Rui Paulo , John Baldwin Subject: Re: svn commit: r276008 - in head/sys: kern sys References: <201412211332.sBLDW8VC030548@svn.freebsd.org> <201412220940.02509.jhb@freebsd.org> <08A2ABA0-C982-46BC-B309-3C23B8D277B9@me.com> <201412221417.42894.jhb@freebsd.org> <2C4635EF-6BE6-4ED7-B9D1-237F76259E88@me.com> In-Reply-To: <2C4635EF-6BE6-4ED7-B9D1-237F76259E88@me.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: Konstantin Belousov , svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2014 07:04:51 -0000 On 23/12/2014 04:39, Rui Paulo wrote: > On Dec 22, 2014, at 11:17, John Baldwin wrote: >> >> On Monday, December 22, 2014 1:29:38 pm Rui Paulo wrote: >>> On Dec 22, 2014, at 06:40, John Baldwin wrote: >>>> Is there something specific to core dumps that makes vn_fullpath() more >>>> useful to have working before a process tries to open the core? (As >>>> compared to other newly-created files) >>> >>> Yes: the ability to provide the full path to userland when a core dump file >> is generated. >> >> Can you be more specific? Are we printing the path on the console after >> destroying the generated path? Is it being written into a note in the core >> itself (but only having the vnode of the core file available and not the >> generated path)? > > No. I have some code that calls devctl_notify() when a core dump is generated which is useful for running an automated debugging session. We use this at work and I'll see if I can upstream it. What Konstantin fixed was the generation of the cache entry in the corefile_open() routine. This lets me call vn_fullpath() after vn_close() with a high probability that it will work whereas, in the past, it was never in the cache, so vn_fullpath() would always fail. What is not entirely clear to me is why we need to recover the path from the vnode if we, obviously, have the path even before we have the vnode. -- Andriy Gapon From owner-svn-src-all@FreeBSD.ORG Tue Dec 23 07:56:21 2014 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 23CD483D; Tue, 23 Dec 2014 07:56:21 +0000 (UTC) Received: from st11p02mm-asmtp001.mac.com (st11p02mm-asmtp001.mac.com [17.172.220.236]) (using TLSv1.2 with cipher DHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E83F26460F; Tue, 23 Dec 2014 07:56:20 +0000 (UTC) Received: from fukuyama.hsd1.ca.comcast.net (unknown [73.162.13.215]) by st11p02mm-asmtp001.mac.com (Oracle Communications Messaging Server 7.0.5.33.0 64bit (built Aug 27 2014)) with ESMTPSA id <0NH0008T9ZCP6D10@st11p02mm-asmtp001.mac.com>; Tue, 23 Dec 2014 07:55:39 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.13.68,1.0.33,0.0.0000 definitions=2014-12-23_03:2014-12-23,2014-12-23,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1412080000 definitions=main-1412230083 Content-type: text/plain; charset=windows-1252 MIME-version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Subject: Re: svn commit: r276008 - in head/sys: kern sys From: Rui Paulo In-reply-to: <549913D4.5090103@FreeBSD.org> Date: Mon, 22 Dec 2014 23:55:36 -0800 Content-transfer-encoding: quoted-printable Message-id: <8F0C318C-9312-479E-BF1C-57E3654D6105@me.com> References: <201412211332.sBLDW8VC030548@svn.freebsd.org> <201412220940.02509.jhb@freebsd.org> <08A2ABA0-C982-46BC-B309-3C23B8D277B9@me.com> <201412221417.42894.jhb@freebsd.org> <2C4635EF-6BE6-4ED7-B9D1-237F76259E88@me.com> <549913D4.5090103@FreeBSD.org> To: Andriy Gapon X-Mailer: Apple Mail (2.1993) Cc: Konstantin Belousov , svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, John Baldwin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2014 07:56:21 -0000 On Dec 22, 2014, at 23:03, Andriy Gapon wrote: >=20 > On 23/12/2014 04:39, Rui Paulo wrote: >> On Dec 22, 2014, at 11:17, John Baldwin wrote: >>>=20 >>> On Monday, December 22, 2014 1:29:38 pm Rui Paulo wrote: >>>> On Dec 22, 2014, at 06:40, John Baldwin wrote: >>>>> Is there something specific to core dumps that makes vn_fullpath() = more >>>>> useful to have working before a process tries to open the core? = (As >>>>> compared to other newly-created files) >>>>=20 >>>> Yes: the ability to provide the full path to userland when a core = dump file=20 >>> is generated. >>>=20 >>> Can you be more specific? Are we printing the path on the console = after >>> destroying the generated path? Is it being written into a note in = the core >>> itself (but only having the vnode of the core file available and not = the=20 >>> generated path)? >>=20 >> No. I have some code that calls devctl_notify() when a core dump is = generated which is useful for running an automated debugging session. = We use this at work and I'll see if I can upstream it. What Konstantin = fixed was the generation of the cache entry in the corefile_open() = routine. This lets me call vn_fullpath() after vn_close() with a high = probability that it will work whereas, in the past, it was never in the = cache, so vn_fullpath() would always fail. >=20 > What is not entirely clear to me is why we need to recover the path = from the > vnode if we, obviously, have the path even before we have the vnode. Using the default setting for core files, it's based on the CWD of the = process. If you're using a different kern.corefile setting, it's = different. You will also need to account for the %N format string = (check the code for indexpos). Given that this is far from being a hot = path, it's much easier to just do a vn_fullpath() on the vnode than to = deal with all the other details.=20 -- Rui Paulo From owner-svn-src-all@FreeBSD.ORG Tue Dec 23 08:19:28 2014 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F35188CE; Tue, 23 Dec 2014 08:19:27 +0000 (UTC) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 7E21564861; Tue, 23 Dec 2014 08:19:25 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id KAA03518; Tue, 23 Dec 2014 10:21:18 +0200 (EET) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1Y3Kge-00028G-22; Tue, 23 Dec 2014 10:19:24 +0200 Message-ID: <54992563.8000702@FreeBSD.org> Date: Tue, 23 Dec 2014 10:18:43 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Rui Paulo Subject: Re: svn commit: r276008 - in head/sys: kern sys References: <201412211332.sBLDW8VC030548@svn.freebsd.org> <201412220940.02509.jhb@freebsd.org> <08A2ABA0-C982-46BC-B309-3C23B8D277B9@me.com> <201412221417.42894.jhb@freebsd.org> <2C4635EF-6BE6-4ED7-B9D1-237F76259E88@me.com> <549913D4.5090103@FreeBSD.org> <8F0C318C-9312-479E-BF1C-57E3654D6105@me.com> In-Reply-To: <8F0C318C-9312-479E-BF1C-57E3654D6105@me.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: Konstantin Belousov , svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, John Baldwin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2014 08:19:28 -0000 On 23/12/2014 09:55, Rui Paulo wrote: > On Dec 22, 2014, at 23:03, Andriy Gapon wrote: >> >> On 23/12/2014 04:39, Rui Paulo wrote: >>> On Dec 22, 2014, at 11:17, John Baldwin wrote: >>>> >>>> On Monday, December 22, 2014 1:29:38 pm Rui Paulo wrote: >>>>> On Dec 22, 2014, at 06:40, John Baldwin wrote: >>>>>> Is there something specific to core dumps that makes vn_fullpath() more >>>>>> useful to have working before a process tries to open the core? (As >>>>>> compared to other newly-created files) >>>>> >>>>> Yes: the ability to provide the full path to userland when a core dump file >>>> is generated. >>>> >>>> Can you be more specific? Are we printing the path on the console after >>>> destroying the generated path? Is it being written into a note in the core >>>> itself (but only having the vnode of the core file available and not the >>>> generated path)? >>> >>> No. I have some code that calls devctl_notify() when a core dump is generated which is useful for running an automated debugging session. We use this at work and I'll see if I can upstream it. What Konstantin fixed was the generation of the cache entry in the corefile_open() routine. This lets me call vn_fullpath() after vn_close() with a high probability that it will work whereas, in the past, it was never in the cache, so vn_fullpath() would always fail. >> >> What is not entirely clear to me is why we need to recover the path from the >> vnode if we, obviously, have the path even before we have the vnode. > > Using the default setting for core files, it's based on the CWD of the process. If you're using a different kern.corefile setting, it's different. You will also need to account for the %N format string (check the code for indexpos). Given that this is far from being a hot path, it's much easier to just do a vn_fullpath() on the vnode than to deal with all the other details. Hmm, I mean that given this code: flags = O_CREAT | FWRITE | O_NOFOLLOW; NDINIT(&nd, LOOKUP, NOFOLLOW, UIO_SYSSPACE, name, td); error = vn_open_cred(&nd, &flags, cmode, oflags, td->td_ucred, NULL); 'name' is the name, right? Can we keep and use it? -- Andriy Gapon From owner-svn-src-all@FreeBSD.ORG Tue Dec 23 09:31:25 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 496EF8B3; Tue, 23 Dec 2014 09:31:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 34DB81BBB; Tue, 23 Dec 2014 09:31:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBN9VP7f017970; Tue, 23 Dec 2014 09:31:25 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBN9VPMK017968; Tue, 23 Dec 2014 09:31:25 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201412230931.sBN9VPMK017968@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Tue, 23 Dec 2014 09:31:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276123 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2014 09:31:25 -0000 Author: smh Date: Tue Dec 23 09:31:24 2014 New Revision: 276123 URL: https://svnweb.freebsd.org/changeset/base/276123 Log: Always sync the global ZFS config cache to reflect the new mosconfig This fixes out of date zpool.cache for root pools, which can cause issues such as confusion of zdb etc. MFC after: 1 month Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_config.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_config.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_config.c Tue Dec 23 08:51:30 2014 (r276122) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_config.c Tue Dec 23 09:31:24 2014 (r276123) @@ -536,8 +536,7 @@ spa_config_update(spa_t *spa, int what) /* * Update the global config cache to reflect the new mosconfig. */ - if (!spa->spa_is_root) - spa_config_sync(spa, B_FALSE, what != SPA_CONFIG_UPDATE_POOL); + spa_config_sync(spa, B_FALSE, what != SPA_CONFIG_UPDATE_POOL); if (what == SPA_CONFIG_UPDATE_POOL) spa_config_update(spa, SPA_CONFIG_UPDATE_VDEVS); From owner-svn-src-all@FreeBSD.ORG Tue Dec 23 09:39:41 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B4AC5C87; Tue, 23 Dec 2014 09:39:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A01481CA8; Tue, 23 Dec 2014 09:39:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBN9dfda019618; Tue, 23 Dec 2014 09:39:41 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBN9dfxK019616; Tue, 23 Dec 2014 09:39:41 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201412230939.sBN9dfxK019616@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Tue, 23 Dec 2014 09:39:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276124 - stable/10/sys/net X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2014 09:39:41 -0000 Author: ae Date: Tue Dec 23 09:39:40 2014 New Revision: 276124 URL: https://svnweb.freebsd.org/changeset/base/276124 Log: Add if_inc_counter() and if_get_counter_default() functions that do access to ifnet counters for code compatibility with FreeBSD 11. This is direct commit to stable/10. Discussed with: glebius@, arch@ Modified: stable/10/sys/net/if.c stable/10/sys/net/if_var.h Modified: stable/10/sys/net/if.c ============================================================================== --- stable/10/sys/net/if.c Tue Dec 23 09:31:24 2014 (r276123) +++ stable/10/sys/net/if.c Tue Dec 23 09:39:40 2014 (r276124) @@ -1450,6 +1450,100 @@ if_rtdel(struct radix_node *rn, void *ar } /* + * A compatibility function returns ifnet counter values. + */ +uint64_t +if_get_counter_default(struct ifnet *ifp, ift_counter cnt) +{ + + KASSERT(cnt < IFCOUNTERS, ("%s: invalid cnt %d", __func__, cnt)); + switch (cnt) { + case IFCOUNTER_IPACKETS: + return (ifp->if_ipackets); + case IFCOUNTER_IERRORS: + return (ifp->if_ierrors); + case IFCOUNTER_OPACKETS: + return (ifp->if_opackets); + case IFCOUNTER_OERRORS: + return (ifp->if_oerrors); + case IFCOUNTER_COLLISIONS: + return (ifp->if_collisions); + case IFCOUNTER_IBYTES: + return (ifp->if_ibytes); + case IFCOUNTER_OBYTES: + return (ifp->if_obytes); + case IFCOUNTER_IMCASTS: + return (ifp->if_imcasts); + case IFCOUNTER_OMCASTS: + return (ifp->if_omcasts); + case IFCOUNTER_IQDROPS: + return (ifp->if_iqdrops); +#ifdef _IFI_OQDROPS + case IFCOUNTER_OQDROPS: + return (ifp->if_oqdrops); +#endif + case IFCOUNTER_NOPROTO: + return (ifp->if_noproto); + default: + break; + }; + return (0); +} + +/* + * Increase an ifnet counter. Usually used for counters shared + * between the stack and a driver, but function supports them all. + */ +void +if_inc_counter(struct ifnet *ifp, ift_counter cnt, int64_t inc) +{ + + KASSERT(cnt < IFCOUNTERS, ("%s: invalid cnt %d", __func__, cnt)); + switch (cnt) { + case IFCOUNTER_IPACKETS: + ifp->if_ipackets += inc; + break; + case IFCOUNTER_IERRORS: + ifp->if_ierrors += inc; + break; + case IFCOUNTER_OPACKETS: + ifp->if_opackets += inc; + break; + case IFCOUNTER_OERRORS: + ifp->if_oerrors += inc; + break; + case IFCOUNTER_COLLISIONS: + ifp->if_collisions += inc; + break; + case IFCOUNTER_IBYTES: + ifp->if_ibytes += inc; + break; + case IFCOUNTER_OBYTES: + ifp->if_obytes += inc; + break; + case IFCOUNTER_IMCASTS: + ifp->if_imcasts += inc; + break; + case IFCOUNTER_OMCASTS: + ifp->if_omcasts += inc; + break; + case IFCOUNTER_IQDROPS: + ifp->if_iqdrops += inc; + break; +#ifdef _IFI_OQDROPS + case IFCOUNTER_OQDROPS: + ifp->if_oqdrops += inc; + break; +#endif + case IFCOUNTER_NOPROTO: + ifp->if_noproto += inc; + break; + default: + break; + }; +} + +/* * Wrapper functions for struct ifnet address list locking macros. These are * used by kernel modules to avoid encoding programming interface or binary * interface assumptions that may be violated when kernel-internal locking Modified: stable/10/sys/net/if_var.h ============================================================================== --- stable/10/sys/net/if_var.h Tue Dec 23 09:31:24 2014 (r276123) +++ stable/10/sys/net/if_var.h Tue Dec 23 09:39:40 2014 (r276124) @@ -104,6 +104,22 @@ VNET_DECLARE(struct pfil_head, link_pfil #define V_link_pfil_hook VNET(link_pfil_hook) #endif /* _KERNEL */ +typedef enum { + IFCOUNTER_IPACKETS = 0, + IFCOUNTER_IERRORS, + IFCOUNTER_OPACKETS, + IFCOUNTER_OERRORS, + IFCOUNTER_COLLISIONS, + IFCOUNTER_IBYTES, + IFCOUNTER_OBYTES, + IFCOUNTER_IMCASTS, + IFCOUNTER_OMCASTS, + IFCOUNTER_IQDROPS, + IFCOUNTER_OQDROPS, + IFCOUNTER_NOPROTO, + IFCOUNTERS /* Array size. */ +} ift_counter; + /* * Structure defining a queue for a network interface. */ @@ -981,6 +997,8 @@ typedef void *if_com_alloc_t(u_char type typedef void if_com_free_t(void *com, u_char type); void if_register_com_alloc(u_char type, if_com_alloc_t *a, if_com_free_t *f); void if_deregister_com_alloc(u_char type); +uint64_t if_get_counter_default(struct ifnet *, ift_counter); +void if_inc_counter(struct ifnet *, ift_counter, int64_t); #define IF_LLADDR(ifp) \ LLADDR((struct sockaddr_dl *)((ifp)->if_addr->ifa_addr)) From owner-svn-src-all@FreeBSD.ORG Tue Dec 23 09:46:24 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9657DFEF; Tue, 23 Dec 2014 09:46:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 81B581DB6; Tue, 23 Dec 2014 09:46:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBN9kOER024248; Tue, 23 Dec 2014 09:46:24 GMT (envelope-from nyan@FreeBSD.org) Received: (from nyan@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBN9kOoe024247; Tue, 23 Dec 2014 09:46:24 GMT (envelope-from nyan@FreeBSD.org) Message-Id: <201412230946.sBN9kOoe024247@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nyan set sender to nyan@FreeBSD.org using -f From: Takahashi Yoshihiro Date: Tue, 23 Dec 2014 09:46:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276125 - stable/10/sys/conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2014 09:46:24 -0000 Author: nyan Date: Tue Dec 23 09:46:23 2014 New Revision: 276125 URL: https://svnweb.freebsd.org/changeset/base/276125 Log: MFC: r272490 (partial) - MFi386: Add compile-with option for tau32-ddk.c. - Whitespace change. Modified: stable/10/sys/conf/files.pc98 Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/conf/files.pc98 ============================================================================== --- stable/10/sys/conf/files.pc98 Tue Dec 23 09:39:40 2014 (r276124) +++ stable/10/sys/conf/files.pc98 Tue Dec 23 09:46:23 2014 (r276125) @@ -89,7 +89,8 @@ dev/agp/agp_via.c optional agp dev/aic/aic_cbus.c optional aic isa dev/ce/ceddk.c optional ce dev/ce/if_ce.c optional ce -dev/ce/tau32-ddk.c optional ce +dev/ce/tau32-ddk.c optional ce \ + compile-with "${NORMAL_C} ${NO_WCONSTANT_CONVERSION}" dev/cp/cpddk.c optional cp dev/cp/if_cp.c optional cp dev/ct/bshw_machdep.c optional ct @@ -243,7 +244,7 @@ pc98/pc98/pc98_machdep.c standard # # x86 shared code between IA32, AMD64 and PC98 architectures # -x86/isa/atpic.c optional atpic +x86/isa/atpic.c optional atpic x86/isa/clock.c standard x86/isa/isa.c optional isa x86/pci/pci_bus.c optional pci From owner-svn-src-all@FreeBSD.ORG Tue Dec 23 09:46:26 2014 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 889AE149; Tue, 23 Dec 2014 09:46:26 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2B8C21DB9; Tue, 23 Dec 2014 09:46:25 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id sBN9kKfK025494 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 23 Dec 2014 11:46:20 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua sBN9kKfK025494 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id sBN9kJsv025492; Tue, 23 Dec 2014 11:46:19 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 23 Dec 2014 11:46:19 +0200 From: Konstantin Belousov To: Andriy Gapon Subject: Re: svn commit: r276008 - in head/sys: kern sys Message-ID: <20141223094619.GA2148@kib.kiev.ua> References: <201412211332.sBLDW8VC030548@svn.freebsd.org> <201412220940.02509.jhb@freebsd.org> <08A2ABA0-C982-46BC-B309-3C23B8D277B9@me.com> <201412221417.42894.jhb@freebsd.org> <2C4635EF-6BE6-4ED7-B9D1-237F76259E88@me.com> <549913D4.5090103@FreeBSD.org> <8F0C318C-9312-479E-BF1C-57E3654D6105@me.com> <54992563.8000702@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54992563.8000702@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, John Baldwin , Rui Paulo X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2014 09:46:26 -0000 On Tue, Dec 23, 2014 at 10:18:43AM +0200, Andriy Gapon wrote: > On 23/12/2014 09:55, Rui Paulo wrote: > > On Dec 22, 2014, at 23:03, Andriy Gapon wrote: > >> > >> On 23/12/2014 04:39, Rui Paulo wrote: > >>> On Dec 22, 2014, at 11:17, John Baldwin wrote: > >>>> > >>>> On Monday, December 22, 2014 1:29:38 pm Rui Paulo wrote: > >>>>> On Dec 22, 2014, at 06:40, John Baldwin wrote: > >>>>>> Is there something specific to core dumps that makes vn_fullpath() more > >>>>>> useful to have working before a process tries to open the core? (As > >>>>>> compared to other newly-created files) > >>>>> > >>>>> Yes: the ability to provide the full path to userland when a core dump file > >>>> is generated. > >>>> > >>>> Can you be more specific? Are we printing the path on the console after > >>>> destroying the generated path? Is it being written into a note in the core > >>>> itself (but only having the vnode of the core file available and not the > >>>> generated path)? > >>> > >>> No. I have some code that calls devctl_notify() when a core dump is generated which is useful for running an automated debugging session. We use this at work and I'll see if I can upstream it. What Konstantin fixed was the generation of the cache entry in the corefile_open() routine. This lets me call vn_fullpath() after vn_close() with a high probability that it will work whereas, in the past, it was never in the cache, so vn_fullpath() would always fail. > >> > >> What is not entirely clear to me is why we need to recover the path from the > >> vnode if we, obviously, have the path even before we have the vnode. > > > > Using the default setting for core files, it's based on the CWD of the process. If you're using a different kern.corefile setting, it's different. You will also need to account for the %N format string (check the code for indexpos). Given that this is far from being a hot path, it's much easier to just do a vn_fullpath() on the vnode than to deal with all the other details. > > > Hmm, I mean that given this code: > > flags = O_CREAT | FWRITE | O_NOFOLLOW; > NDINIT(&nd, LOOKUP, NOFOLLOW, UIO_SYSSPACE, name, td); > error = vn_open_cred(&nd, &flags, cmode, oflags, td->td_ucred, NULL); > > 'name' is the name, right? Can we keep and use it? No, not right. It is the name used for resolution using namei(), while the path obtained from vn_fullpath() is passed to usermode. For 'name' to be useful, it must be used in exactly the same lookup environment, i.e. cwd/root dir at al should be the same. From owner-svn-src-all@FreeBSD.ORG Tue Dec 23 09:48:21 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 94B5A313; Tue, 23 Dec 2014 09:48:21 +0000 (UTC) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 1F3051DE5; Tue, 23 Dec 2014 09:48:21 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 10F8C25D37C3; Tue, 23 Dec 2014 09:48:09 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 44933C76FE6; Tue, 23 Dec 2014 09:48:08 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id 2KgKNV8HpdQi; Tue, 23 Dec 2014 09:48:06 +0000 (UTC) Received: from [IPv6:fde9:577b:c1a9:31:cabc:c8ff:fecf:e8e3] (orange-en1.sbone.de [IPv6:fde9:577b:c1a9:31:cabc:c8ff:fecf:e8e3]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 701A3C76FCE; Tue, 23 Dec 2014 09:48:06 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Subject: Re: svn commit: r276096 - in head/sys: arm/conf conf fs/nfs fs/nfsclient modules modules/dtrace modules/dtrace/dtnfsclient modules/dtrace/dtraceall modules/nfs_common modules/nfsclient modules/nfsserve... From: "Bjoern A. Zeeb" In-Reply-To: <201412230047.sBN0llBU070080@svn.freebsd.org> Date: Tue, 23 Dec 2014 09:48:05 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201412230047.sBN0llBU070080@svn.freebsd.org> To: Rick Macklem X-Mailer: Apple Mail (2.1993) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2014 09:48:21 -0000 > On 23 Dec 2014, at 00:47 , Rick Macklem wrote: >=20 > Author: rmacklem > Date: Tue Dec 23 00:47:46 2014 > New Revision: 276096 > URL: https://svnweb.freebsd.org/changeset/base/276096 >=20 > Log: > Remove the old NFS client and server from head, > which means that the NFSCLIENT and NFSSERVER > kernel options will no longer work. This commit > only removes the kernel components. Removal of > unused code in the user utilities will be done > later. This commit does not include an addition > to UPDATING, but that will be committed in a > few minutes. >=20 > Discussed on: freebsd-fs >=20 Hi, I see the following error currently on my (incremental) builds: nfs_clbio.o: In function `ncl_asyncio': /scratch/tmp/bz/head.svn/sys/fs/nfsclient/nfs_clbio.c:(.text+0x1974): = undefined reference to `nfs_debug' /scratch/tmp/bz/head.svn/sys/fs/nfsclient/nfs_clbio.c:(.text+0x19a2): = undefined reference to `nfs_debug' /scratch/tmp/bz/head.svn/sys/fs/nfsclient/nfs_clbio.c:(.text+0x19f9): = undefined reference to `nfs_debug' /scratch/tmp/bz/head.svn/sys/fs/nfsclient/nfs_clbio.c:(.text+0x1a93): = undefined reference to `nfs_debug' /scratch/tmp/bz/head.svn/sys/fs/nfsclient/nfs_clbio.c:(.text+0x1b0a): = undefined reference to `nfs_debug' = nfs_clnfsiod.o:/scratch/tmp/bz/head.svn/sys/fs/nfsclient/nfs_clnfsiod.c:(.= text+0x5d2): more undefined references to `nfs_debug' follow > Deleted: > head/sys/modules/dtrace/dtnfsclient/ > head/sys/modules/nfs_common/ > head/sys/modules/nfsclient/ > head/sys/modules/nfsserver/ > head/sys/nfs/nfs_common.c > head/sys/nfsclient/nfs_bio.c > head/sys/nfsclient/nfs_kdtrace.c > head/sys/nfsclient/nfs_krpc.c > head/sys/nfsclient/nfs_nfsiod.c > head/sys/nfsclient/nfs_node.c > head/sys/nfsclient/nfs_subs.c > head/sys/nfsclient/nfs_vfsops.c > head/sys/nfsclient/nfs_vnops.c > head/sys/nfsserver/nfs_fha_old.c > head/sys/nfsserver/nfs_serv.c > head/sys/nfsserver/nfs_srvkrpc.c > head/sys/nfsserver/nfs_srvsubs.c > Modified: > head/sys/arm/conf/DOCKSTAR > head/sys/arm/conf/DREAMPLUG-1001 > head/sys/arm/conf/EA3250 > head/sys/conf/NOTES > head/sys/conf/files > head/sys/conf/options > head/sys/fs/nfs/nfs_commonkrpc.c > head/sys/fs/nfsclient/nfs_clnode.c > head/sys/fs/nfsclient/nfs_clport.c > head/sys/fs/nfsclient/nfs_clvfsops.c > head/sys/modules/Makefile > head/sys/modules/dtrace/Makefile > head/sys/modules/dtrace/dtraceall/dtraceall.c > head/sys/nfs/bootp_subr.c > head/sys/sys/param.h =E2=80=94=20 Bjoern A. Zeeb Charles Haddon Spurgeon: "Friendship is one of the sweetest joys of life. Many might have failed beneath the bitterness of their trial had they not found a friend." From owner-svn-src-all@FreeBSD.ORG Tue Dec 23 09:57:07 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8F50B510; Tue, 23 Dec 2014 09:57:07 +0000 (UTC) Received: from acme.spoerlein.net (unknown [IPv6:2a02:2528:fa:1000::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.spoerlein.net", Issuer "CAcert Class 3 Root" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 0C2B81F14; Tue, 23 Dec 2014 09:57:06 +0000 (UTC) Received: from localhost (acme.spoerlein.net [IPv6:2a02:2528:fa:1000::1]) by acme.spoerlein.net (8.14.9/8.14.9) with ESMTP id sBN9v3r5003176 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 23 Dec 2014 10:57:03 +0100 (CET) (envelope-from uqs@FreeBSD.org) Date: Tue, 23 Dec 2014 10:57:03 +0100 From: Ulrich =?utf-8?B?U3DDtnJsZWlu?= To: Xin LI Subject: Re: svn commit: r276071 - in head/contrib/ntp: ntpd util Message-ID: <20141223095703.GA6306@acme.spoerlein.net> Mail-Followup-To: Ulrich =?utf-8?B?U3DDtnJsZWlu?= , Xin LI , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201412221854.sBMIsuva096658@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201412221854.sBMIsuva096658@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2014 09:57:07 -0000 On Mon, 2014-12-22 at 18:54:56 +0000, Xin LI wrote: > Author: delphij > Date: Mon Dec 22 18:54:55 2014 > New Revision: 276071 > URL: https://svnweb.freebsd.org/changeset/base/276071 > > Log: > Fix multiple ntp vulnerabilities. > > Reviewed by: roberto (earlier revision), philip > Security: CVE-2014-9293, CVE-2014-9294 > Security: CVE-2014-9295, CVE-2014-9296 > Security: FreeBSD-SA-14:31.ntp > > Differential Revision: https://reviews.freebsd.org/D1343 > Hi the latest Coverity run (which should include these patches, I think) still flags two DEADCODEs in ntp_proto.c: ________________________________________________________________________________________________________ *** CID 1260388: Logically dead code (DEADCODE) /contrib/ntp/ntpd/ntp_proto.c: 702 in receive() 696 if (!(rbufp->dstadr->flags & INT_MCASTOPEN)) { 697 if (AUTH(restrict_mask & RES_DONTTRUST, 698 is_authentic)) 699 fast_xmit(rbufp, MODE_SERVER, skeyid, 700 restrict_mask); 701 else if (is_authentic == AUTH_ERROR) >>> CID 1260388: Logically dead code (DEADCODE) >>> Execution cannot reach this statement "fast_xmit(rbufp, 4, 0U, res...". 702 fast_xmit(rbufp, MODE_SERVER, 0, 703 restrict_mask); 704 return; /* hooray */ 705 } 706 707 /* /contrib/ntp/ntpd/ntp_proto.c: 869 in receive() 863 * symmetric active response is sent. If authentication 864 * fails, send a crypto-NAK packet. 865 */ 866 if (!AUTH(restrict_mask & RES_DONTTRUST, is_authentic)) 867 { 868 if (is_authentic == AUTH_ERROR) >>> CID 1260388: Logically dead code (DEADCODE) >>> Execution cannot reach this statement "fast_xmit(rbufp, 1, 0U, res...". 869 fast_xmit(rbufp, MODE_ACTIVE, 0, 870 restrict_mask); 871 return; /* bad auth */ 872 } 873 if (!AUTH(sys_authenticate | (restrict_mask & 874 RES_NOPEER), is_authentic)) { From owner-svn-src-all@FreeBSD.ORG Tue Dec 23 10:07:24 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C751CAE0; Tue, 23 Dec 2014 10:07:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B29FA2B2B; Tue, 23 Dec 2014 10:07:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBNA7O7s033812; Tue, 23 Dec 2014 10:07:24 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBNA7OPF033811; Tue, 23 Dec 2014 10:07:24 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201412231007.sBNA7OPF033811@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 23 Dec 2014 10:07:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r276126 - stable/9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2014 10:07:25 -0000 Author: kib Date: Tue Dec 23 10:07:23 2014 New Revision: 276126 URL: https://svnweb.freebsd.org/changeset/base/276126 Log: MFC r275120: Fix SA_SIGINFO | SA_RESETHAND handling. Modified: stable/9/sys/kern/kern_sig.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/kern_sig.c ============================================================================== --- stable/9/sys/kern/kern_sig.c Tue Dec 23 09:46:23 2014 (r276125) +++ stable/9/sys/kern/kern_sig.c Tue Dec 23 10:07:23 2014 (r276126) @@ -1847,6 +1847,34 @@ pgsignal(struct pgrp *pgrp, int sig, int } } + +/* + * Recalculate the signal mask and reset the signal disposition after + * usermode frame for delivery is formed. Should be called after + * mach-specific routine, because sysent->sv_sendsig() needs correct + * ps_siginfo and signal mask. + */ +static void +postsig_done(int sig, struct thread *td, struct sigacts *ps) +{ + sigset_t mask; + + mtx_assert(&ps->ps_mtx, MA_OWNED); + td->td_ru.ru_nsignals++; + mask = ps->ps_catchmask[_SIG_IDX(sig)]; + if (!SIGISMEMBER(ps->ps_signodefer, sig)) + SIGADDSET(mask, sig); + kern_sigprocmask(td, SIG_BLOCK, &mask, NULL, + SIGPROCMASK_PROC_LOCKED | SIGPROCMASK_PS_LOCKED); + if (SIGISMEMBER(ps->ps_sigreset, sig)) { + SIGDELSET(ps->ps_sigcatch, sig); + if (sig != SIGCONT && + sigprop(sig) & SA_IGNORE) + SIGADDSET(ps->ps_sigignore, sig); + ps->ps_sigact[_SIG_IDX(sig)] = SIG_DFL; + } +} + /* * Send a signal caused by a trap to the current thread. If it will be * caught immediately, deliver it with correct code. Otherwise, post it @@ -1856,7 +1884,6 @@ void trapsignal(struct thread *td, ksiginfo_t *ksi) { struct sigacts *ps; - sigset_t mask; struct proc *p; int sig; int code; @@ -1871,7 +1898,6 @@ trapsignal(struct thread *td, ksiginfo_t mtx_lock(&ps->ps_mtx); if ((p->p_flag & P_TRACED) == 0 && SIGISMEMBER(ps->ps_sigcatch, sig) && !SIGISMEMBER(td->td_sigmask, sig)) { - td->td_ru.ru_nsignals++; #ifdef KTRACE if (KTRPOINT(curthread, KTR_PSIG)) ktrpsig(sig, ps->ps_sigact[_SIG_IDX(sig)], @@ -1879,21 +1905,7 @@ trapsignal(struct thread *td, ksiginfo_t #endif (*p->p_sysent->sv_sendsig)(ps->ps_sigact[_SIG_IDX(sig)], ksi, &td->td_sigmask); - mask = ps->ps_catchmask[_SIG_IDX(sig)]; - if (!SIGISMEMBER(ps->ps_signodefer, sig)) - SIGADDSET(mask, sig); - kern_sigprocmask(td, SIG_BLOCK, &mask, NULL, - SIGPROCMASK_PROC_LOCKED | SIGPROCMASK_PS_LOCKED); - if (SIGISMEMBER(ps->ps_sigreset, sig)) { - /* - * See kern_sigaction() for origin of this code. - */ - SIGDELSET(ps->ps_sigcatch, sig); - if (sig != SIGCONT && - sigprop(sig) & SA_IGNORE) - SIGADDSET(ps->ps_sigignore, sig); - ps->ps_sigact[_SIG_IDX(sig)] = SIG_DFL; - } + postsig_done(sig, td, ps); mtx_unlock(&ps->ps_mtx); } else { /* @@ -2779,7 +2791,7 @@ postsig(sig) struct sigacts *ps; sig_t action; ksiginfo_t ksi; - sigset_t returnmask, mask; + sigset_t returnmask; KASSERT(sig != 0, ("postsig")); @@ -2834,28 +2846,12 @@ postsig(sig) } else returnmask = td->td_sigmask; - mask = ps->ps_catchmask[_SIG_IDX(sig)]; - if (!SIGISMEMBER(ps->ps_signodefer, sig)) - SIGADDSET(mask, sig); - kern_sigprocmask(td, SIG_BLOCK, &mask, NULL, - SIGPROCMASK_PROC_LOCKED | SIGPROCMASK_PS_LOCKED); - - if (SIGISMEMBER(ps->ps_sigreset, sig)) { - /* - * See kern_sigaction() for origin of this code. - */ - SIGDELSET(ps->ps_sigcatch, sig); - if (sig != SIGCONT && - sigprop(sig) & SA_IGNORE) - SIGADDSET(ps->ps_sigignore, sig); - ps->ps_sigact[_SIG_IDX(sig)] = SIG_DFL; - } - td->td_ru.ru_nsignals++; if (p->p_sig == sig) { p->p_code = 0; p->p_sig = 0; } (*p->p_sysent->sv_sendsig)(action, &ksi, &returnmask); + postsig_done(sig, td, ps); } return (1); } From owner-svn-src-all@FreeBSD.ORG Tue Dec 23 10:18:43 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A9CB8DD6; Tue, 23 Dec 2014 10:18:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 95E502D44; Tue, 23 Dec 2014 10:18:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBNAIhQh038760; Tue, 23 Dec 2014 10:18:43 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBNAIh2w038759; Tue, 23 Dec 2014 10:18:43 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201412231018.sBNAIh2w038759@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 23 Dec 2014 10:18:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276127 - head/sys/cam/ctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2014 10:18:43 -0000 Author: mav Date: Tue Dec 23 10:18:42 2014 New Revision: 276127 URL: https://svnweb.freebsd.org/changeset/base/276127 Log: Fix potential division by zero after r275920. Reported by: Coverity Scan CID: 1260387 MFC after: 3 days Modified: head/sys/cam/ctl/ctl_backend_ramdisk.c Modified: head/sys/cam/ctl/ctl_backend_ramdisk.c ============================================================================== --- head/sys/cam/ctl/ctl_backend_ramdisk.c Tue Dec 23 10:07:23 2014 (r276126) +++ head/sys/cam/ctl/ctl_backend_ramdisk.c Tue Dec 23 10:18:42 2014 (r276127) @@ -569,6 +569,8 @@ ctl_backend_ramdisk_create(struct ctl_be be_lun->size_bytes = be_lun->size_blocks * blocksize; be_lun->ctl_be_lun.maxlba = be_lun->size_blocks - 1; + be_lun->ctl_be_lun.atomicblock = UINT32_MAX; + be_lun->ctl_be_lun.opttxferlen = softc->rd_size / blocksize; } else { be_lun->ctl_be_lun.maxlba = 0; blocksize = 0; @@ -595,8 +597,6 @@ ctl_backend_ramdisk_create(struct ctl_be be_lun->ctl_be_lun.flags = CTL_LUN_FLAG_PRIMARY; if (unmap) be_lun->ctl_be_lun.flags |= CTL_LUN_FLAG_UNMAP; - be_lun->ctl_be_lun.atomicblock = UINT32_MAX; - be_lun->ctl_be_lun.opttxferlen = softc->rd_size / blocksize; be_lun->ctl_be_lun.be_lun = be_lun; if (params->flags & CTL_LUN_FLAG_ID_REQ) { From owner-svn-src-all@FreeBSD.ORG Tue Dec 23 10:43:37 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 23BFA56F; Tue, 23 Dec 2014 10:43:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E949064145; Tue, 23 Dec 2014 10:43:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBNAha43052025; Tue, 23 Dec 2014 10:43:36 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBNAha4o052022; Tue, 23 Dec 2014 10:43:36 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201412231043.sBNAha4o052022@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Tue, 23 Dec 2014 10:43:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276128 - in head: gnu/lib/libssp lib/libbsnmp/libbsnmp share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2014 10:43:37 -0000 Author: bapt Date: Tue Dec 23 10:43:35 2014 New Revision: 276128 URL: https://svnweb.freebsd.org/changeset/base/276128 Log: Fix build with recent binutils Recent binutils considered the .gnu.warning.symbol section as a fatal error when run with --fatal-warnings which makes any users of "insecure" functions from libc failing to build with recent binutils. Introduce a new macro: LD_FATAL_WARNINGS=no to run ld(1) with --no-fatal-warnings for the users of "insecure" functions Differential Revision: https://reviews.freebsd.org/D1320 Modified: head/gnu/lib/libssp/Makefile head/lib/libbsnmp/libbsnmp/Makefile head/share/mk/bsd.lib.mk Modified: head/gnu/lib/libssp/Makefile ============================================================================== --- head/gnu/lib/libssp/Makefile Tue Dec 23 10:18:42 2014 (r276127) +++ head/gnu/lib/libssp/Makefile Tue Dec 23 10:43:35 2014 (r276128) @@ -15,6 +15,7 @@ SRCDIR= ${GCCLIB}/libssp LIB= ssp SHLIB_MAJOR= 0 +LD_FATAL_WARNINGS= no SRCS= ssp.c gets-chk.c memcpy-chk.c memmove-chk.c mempcpy-chk.c \ memset-chk.c snprintf-chk.c sprintf-chk.c stpcpy-chk.c \ Modified: head/lib/libbsnmp/libbsnmp/Makefile ============================================================================== --- head/lib/libbsnmp/libbsnmp/Makefile Tue Dec 23 10:18:42 2014 (r276127) +++ head/lib/libbsnmp/libbsnmp/Makefile Tue Dec 23 10:43:35 2014 (r276128) @@ -9,6 +9,7 @@ CONTRIB= ${.CURDIR}/../../../contrib/bsn LIB= bsnmp SHLIB_MAJOR= 6 +LD_FATAL_WARNINGS= no CFLAGS+= -I${CONTRIB} -DHAVE_ERR_H -DHAVE_GETADDRINFO -DHAVE_STRLCPY CFLAGS+= -DHAVE_STDINT_H -DHAVE_INTTYPES_H -DQUADFMT='"llu"' -DQUADXFMT='"llx"' Modified: head/share/mk/bsd.lib.mk ============================================================================== --- head/share/mk/bsd.lib.mk Tue Dec 23 10:18:42 2014 (r276127) +++ head/share/mk/bsd.lib.mk Tue Dec 23 10:43:35 2014 (r276128) @@ -207,7 +207,12 @@ _LIBS+= ${SHLIB_NAME} SOLINKOPTS= -shared -Wl,-x .if !defined(ALLOW_SHARED_TEXTREL) -SOLINKOPTS+= -Wl,--fatal-warnings -Wl,--warn-shared-textrel +.if defined(LD_FATAL_WARNINGS) && ${LD_FATAL_WARNINGS} == "no" +SOLINKOPTS+= -Wl,--no-fatal-warnings +.else +SOLINKOPTS+= -Wl,--fatal-warnings +.endif +SOLINKOPTS+= -Wl,--warn-shared-textrel .endif .if target(beforelinking) From owner-svn-src-all@FreeBSD.ORG Tue Dec 23 10:46:30 2014 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 48E916FD; Tue, 23 Dec 2014 10:46:30 +0000 (UTC) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id E39B06419B; Tue, 23 Dec 2014 10:46:28 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id MAA05103; Tue, 23 Dec 2014 12:48:19 +0200 (EET) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1Y3Myw-0002H4-1G; Tue, 23 Dec 2014 12:46:26 +0200 Message-ID: <549947C8.9040009@FreeBSD.org> Date: Tue, 23 Dec 2014 12:45:28 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Konstantin Belousov Subject: Re: svn commit: r276008 - in head/sys: kern sys References: <201412211332.sBLDW8VC030548@svn.freebsd.org> <201412220940.02509.jhb@freebsd.org> <08A2ABA0-C982-46BC-B309-3C23B8D277B9@me.com> <201412221417.42894.jhb@freebsd.org> <2C4635EF-6BE6-4ED7-B9D1-237F76259E88@me.com> <549913D4.5090103@FreeBSD.org> <8F0C318C-9312-479E-BF1C-57E3654D6105@me.com> <54992563.8000702@FreeBSD.org> <20141223094619.GA2148@kib.kiev.ua> In-Reply-To: <20141223094619.GA2148@kib.kiev.ua> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, John Baldwin , Rui Paulo X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2014 10:46:30 -0000 On 23/12/2014 11:46, Konstantin Belousov wrote: > On Tue, Dec 23, 2014 at 10:18:43AM +0200, Andriy Gapon wrote: >> Hmm, I mean that given this code: >> >> flags = O_CREAT | FWRITE | O_NOFOLLOW; >> NDINIT(&nd, LOOKUP, NOFOLLOW, UIO_SYSSPACE, name, td); >> error = vn_open_cred(&nd, &flags, cmode, oflags, td->td_ucred, NULL); >> >> 'name' is the name, right? Can we keep and use it? > No, not right. It is the name used for resolution using namei(), while > the path obtained from vn_fullpath() is passed to usermode. For 'name' > to be useful, it must be used in exactly the same lookup environment, > i.e. cwd/root dir at al should be the same. I see now. Thanks! -- Andriy Gapon From owner-svn-src-all@FreeBSD.ORG Tue Dec 23 10:59:16 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E3AFE917; Tue, 23 Dec 2014 10:59:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CECF3642C5; Tue, 23 Dec 2014 10:59:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBNAxGgF057340; Tue, 23 Dec 2014 10:59:16 GMT (envelope-from nyan@FreeBSD.org) Received: (from nyan@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBNAxGPZ057339; Tue, 23 Dec 2014 10:59:16 GMT (envelope-from nyan@FreeBSD.org) Message-Id: <201412231059.sBNAxGPZ057339@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nyan set sender to nyan@FreeBSD.org using -f From: Takahashi Yoshihiro Date: Tue, 23 Dec 2014 10:59:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276129 - stable/10/sys/conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2014 10:59:17 -0000 Author: nyan Date: Tue Dec 23 10:59:15 2014 New Revision: 276129 URL: https://svnweb.freebsd.org/changeset/base/276129 Log: MFC: r272491 Reduce diffs against i386. Modified: stable/10/sys/conf/options.pc98 Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/conf/options.pc98 ============================================================================== --- stable/10/sys/conf/options.pc98 Tue Dec 23 10:43:35 2014 (r276128) +++ stable/10/sys/conf/options.pc98 Tue Dec 23 10:59:15 2014 (r276129) @@ -31,12 +31,6 @@ KVA_PAGES opt_global.h TIMER_FREQ opt_clock.h -# options for serial support -COM_ESP opt_sio.h -COM_MULTIPORT opt_sio.h -CONSPEED opt_sio.h -GDBSPEED opt_sio.h - CPU_BLUELIGHTNING_3X opt_cpu.h CPU_BLUELIGHTNING_FPU_OP_CACHE opt_cpu.h CPU_BTB_EN opt_cpu.h @@ -67,8 +61,17 @@ I486_CPU opt_global.h I586_CPU opt_global.h I686_CPU opt_global.h +# options for serial support +COM_ESP opt_sio.h +COM_MULTIPORT opt_sio.h +CONSPEED opt_sio.h +GDBSPEED opt_sio.h + GDC +# AGP debugging support +AGP_DEBUG opt_agp.h + # Video spigot SPIGOT_UNSECURE opt_spigot.h @@ -96,7 +99,6 @@ DEV_NPX opt_npx.h # Debugging NPX_DEBUG opt_npx.h -AGP_DEBUG opt_agp.h # BPF just-in-time compiler BPF_JITTER opt_bpf.h From owner-svn-src-all@FreeBSD.ORG Tue Dec 23 10:59:54 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 836D2A49; Tue, 23 Dec 2014 10:59:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6ECB3642DC; Tue, 23 Dec 2014 10:59:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBNAxsTY057460; Tue, 23 Dec 2014 10:59:54 GMT (envelope-from nyan@FreeBSD.org) Received: (from nyan@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBNAxsHN057459; Tue, 23 Dec 2014 10:59:54 GMT (envelope-from nyan@FreeBSD.org) Message-Id: <201412231059.sBNAxsHN057459@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nyan set sender to nyan@FreeBSD.org using -f From: Takahashi Yoshihiro Date: Tue, 23 Dec 2014 10:59:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r276130 - stable/9/sys/conf X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2014 10:59:54 -0000 Author: nyan Date: Tue Dec 23 10:59:53 2014 New Revision: 276130 URL: https://svnweb.freebsd.org/changeset/base/276130 Log: MFC: r272491 Reduce diffs against i386. Modified: stable/9/sys/conf/options.pc98 Directory Properties: stable/9/sys/ (props changed) stable/9/sys/conf/ (props changed) Modified: stable/9/sys/conf/options.pc98 ============================================================================== --- stable/9/sys/conf/options.pc98 Tue Dec 23 10:59:15 2014 (r276129) +++ stable/9/sys/conf/options.pc98 Tue Dec 23 10:59:53 2014 (r276130) @@ -31,12 +31,6 @@ KVA_PAGES opt_global.h TIMER_FREQ opt_clock.h -# options for serial support -COM_ESP opt_sio.h -COM_MULTIPORT opt_sio.h -CONSPEED opt_sio.h -GDBSPEED opt_sio.h - CPU_BLUELIGHTNING_3X opt_cpu.h CPU_BLUELIGHTNING_FPU_OP_CACHE opt_cpu.h CPU_BTB_EN opt_cpu.h @@ -67,8 +61,17 @@ I486_CPU opt_global.h I586_CPU opt_global.h I686_CPU opt_global.h +# options for serial support +COM_ESP opt_sio.h +COM_MULTIPORT opt_sio.h +CONSPEED opt_sio.h +GDBSPEED opt_sio.h + GDC +# AGP debugging support +AGP_DEBUG opt_agp.h + # Video spigot SPIGOT_UNSECURE opt_spigot.h @@ -96,7 +99,6 @@ DEV_NPX opt_npx.h # Debugging NPX_DEBUG opt_npx.h -AGP_DEBUG opt_agp.h # BPF just-in-time compiler BPF_JITTER opt_bpf.h From owner-svn-src-all@FreeBSD.ORG Tue Dec 23 11:00:52 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 673AFB8A; Tue, 23 Dec 2014 11:00:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 52AE56437D; Tue, 23 Dec 2014 11:00:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBNB0q4u060129; Tue, 23 Dec 2014 11:00:52 GMT (envelope-from nyan@FreeBSD.org) Received: (from nyan@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBNB0q5s060128; Tue, 23 Dec 2014 11:00:52 GMT (envelope-from nyan@FreeBSD.org) Message-Id: <201412231100.sBNB0q5s060128@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nyan set sender to nyan@FreeBSD.org using -f From: Takahashi Yoshihiro Date: Tue, 23 Dec 2014 11:00:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r276131 - stable/8/sys/conf X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2014 11:00:52 -0000 Author: nyan Date: Tue Dec 23 11:00:51 2014 New Revision: 276131 URL: https://svnweb.freebsd.org/changeset/base/276131 Log: MFC: r272491 Reduce diffs against i386. Modified: stable/8/sys/conf/options.pc98 Directory Properties: stable/8/sys/ (props changed) stable/8/sys/conf/ (props changed) Modified: stable/8/sys/conf/options.pc98 ============================================================================== --- stable/8/sys/conf/options.pc98 Tue Dec 23 10:59:53 2014 (r276130) +++ stable/8/sys/conf/options.pc98 Tue Dec 23 11:00:51 2014 (r276131) @@ -32,12 +32,6 @@ KVA_PAGES opt_global.h TIMER_FREQ opt_clock.h -# options for serial support -COM_ESP opt_sio.h -COM_MULTIPORT opt_sio.h -CONSPEED opt_sio.h -GDBSPEED opt_sio.h - CPU_BLUELIGHTNING_3X opt_cpu.h CPU_BLUELIGHTNING_FPU_OP_CACHE opt_cpu.h CPU_BTB_EN opt_cpu.h @@ -68,8 +62,17 @@ I486_CPU opt_global.h I586_CPU opt_global.h I686_CPU opt_global.h +# options for serial support +COM_ESP opt_sio.h +COM_MULTIPORT opt_sio.h +CONSPEED opt_sio.h +GDBSPEED opt_sio.h + GDC +# AGP debugging support +AGP_DEBUG opt_agp.h + # Video spigot SPIGOT_UNSECURE opt_spigot.h @@ -97,7 +100,6 @@ DEV_NPX opt_npx.h # Debugging NPX_DEBUG opt_npx.h -AGP_DEBUG opt_agp.h # BPF just-in-time compiler BPF_JITTER opt_bpf.h From owner-svn-src-all@FreeBSD.ORG Tue Dec 23 11:55:54 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CB82E347; Tue, 23 Dec 2014 11:55:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B6C51129F; Tue, 23 Dec 2014 11:55:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBNBtsN2084931; Tue, 23 Dec 2014 11:55:54 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBNBtstq084929; Tue, 23 Dec 2014 11:55:54 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201412231155.sBNBtstq084929@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 23 Dec 2014 11:55:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276132 - in stable/10/sys/x86: include x86 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2014 11:55:54 -0000 Author: kib Date: Tue Dec 23 11:55:53 2014 New Revision: 276132 URL: https://svnweb.freebsd.org/changeset/base/276132 Log: MFC r271197: Add more bits for the XSAVE features from CPUID 0xd, sub-function 1 %eax report. Print the XSAVE features 0xd/1 in the boot banner. Modified: stable/10/sys/x86/include/specialreg.h stable/10/sys/x86/x86/identcpu.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/x86/include/specialreg.h ============================================================================== --- stable/10/sys/x86/include/specialreg.h Tue Dec 23 11:00:51 2014 (r276131) +++ stable/10/sys/x86/include/specialreg.h Tue Dec 23 11:55:53 2014 (r276132) @@ -296,6 +296,9 @@ * CPUID instruction 0xd Processor Extended State Enumeration Sub-leaf 1 */ #define CPUID_EXTSTATE_XSAVEOPT 0x00000001 +#define CPUID_EXTSTATE_XSAVEC 0x00000002 +#define CPUID_EXTSTATE_XINUSE 0x00000004 +#define CPUID_EXTSTATE_XSAVES 0x00000008 /* * AMD extended function 8000_0007h edx info Modified: stable/10/sys/x86/x86/identcpu.c ============================================================================== --- stable/10/sys/x86/x86/identcpu.c Tue Dec 23 11:00:51 2014 (r276131) +++ stable/10/sys/x86/x86/identcpu.c Tue Dec 23 11:55:53 2014 (r276132) @@ -913,6 +913,19 @@ printcpuinfo(void) ); } + if ((cpu_feature2 & CPUID2_XSAVE) != 0) { + cpuid_count(0xd, 0x1, regs); + if (regs[0] != 0) { + printf("\n XSAVE Features=0x%b", + regs[0], + "\020" + "\001XSAVEOPT" + "\002XSAVEC" + "\003XINUSE" + "\004XSAVES"); + } + } + if (via_feature_rng != 0 || via_feature_xcrypt != 0) print_via_padlock_info(); From owner-svn-src-all@FreeBSD.ORG Tue Dec 23 12:00:42 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 30D8288B; Tue, 23 Dec 2014 12:00:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1C3911363; Tue, 23 Dec 2014 12:00:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBNC0fCN088619; Tue, 23 Dec 2014 12:00:41 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBNC0foj088618; Tue, 23 Dec 2014 12:00:41 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201412231200.sBNC0foj088618@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 23 Dec 2014 12:00:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276133 - stable/10/sys/x86/include X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2014 12:00:42 -0000 Author: kib Date: Tue Dec 23 12:00:41 2014 New Revision: 276133 URL: https://svnweb.freebsd.org/changeset/base/276133 Log: MFC r271206: Adjust the definition of struct xstate_hdr according to SDM rev. 50. Modified: stable/10/sys/x86/include/fpu.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/x86/include/fpu.h ============================================================================== --- stable/10/sys/x86/include/fpu.h Tue Dec 23 11:55:53 2014 (r276132) +++ stable/10/sys/x86/include/fpu.h Tue Dec 23 12:00:41 2014 (r276133) @@ -150,9 +150,11 @@ struct savefpu { struct xstate_hdr { uint64_t xstate_bv; - uint8_t xstate_rsrv0[16]; + uint64_t xstate_xcomp_bv; + uint8_t xstate_rsrv0[8]; uint8_t xstate_rsrv[40]; }; +#define XSTATE_XCOMP_BV_COMPACT (1ULL << 63) struct savexmm_xstate { struct xstate_hdr sx_hd; From owner-svn-src-all@FreeBSD.ORG Tue Dec 23 12:04:25 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2305FBE4; Tue, 23 Dec 2014 12:04:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0EA331571; Tue, 23 Dec 2014 12:04:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBNC4O1K089587; Tue, 23 Dec 2014 12:04:24 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBNC4Ogj089586; Tue, 23 Dec 2014 12:04:24 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201412231204.sBNC4Ogj089586@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 23 Dec 2014 12:04:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276134 - stable/10/sys/x86/include X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2014 12:04:25 -0000 Author: kib Date: Tue Dec 23 12:04:23 2014 New Revision: 276134 URL: https://svnweb.freebsd.org/changeset/base/276134 Log: MFC r271208: Add a define for index of IA32_XSS MSR. Modified: stable/10/sys/x86/include/specialreg.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/x86/include/specialreg.h ============================================================================== --- stable/10/sys/x86/include/specialreg.h Tue Dec 23 12:00:41 2014 (r276133) +++ stable/10/sys/x86/include/specialreg.h Tue Dec 23 12:04:23 2014 (r276134) @@ -490,6 +490,8 @@ #define MSR_APIC_DCR_TIMER 0x83e #define MSR_APIC_SELF_IPI 0x83f +#define MSR_IA32_XSS 0xda0 + /* * Constants related to MSR's. */ From owner-svn-src-all@FreeBSD.ORG Tue Dec 23 12:13:32 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AE422E4F; Tue, 23 Dec 2014 12:13:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 987C91701; Tue, 23 Dec 2014 12:13:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBNCDWr2094170; Tue, 23 Dec 2014 12:13:32 GMT (envelope-from nyan@FreeBSD.org) Received: (from nyan@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBNCDW90094166; Tue, 23 Dec 2014 12:13:32 GMT (envelope-from nyan@FreeBSD.org) Message-Id: <201412231213.sBNCDW90094166@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nyan set sender to nyan@FreeBSD.org using -f From: Takahashi Yoshihiro Date: Tue, 23 Dec 2014 12:13:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276135 - in stable/10/sys: conf i386/i386 pc98/pc98 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2014 12:13:32 -0000 Author: nyan Date: Tue Dec 23 12:13:31 2014 New Revision: 276135 URL: https://svnweb.freebsd.org/changeset/base/276135 Log: MFC: r272492 Merge pc98's machdep.c into i386/i386/machdep.c. Deleted: stable/10/sys/pc98/pc98/machdep.c Modified: stable/10/sys/conf/files.pc98 stable/10/sys/i386/i386/machdep.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/conf/files.pc98 ============================================================================== --- stable/10/sys/conf/files.pc98 Tue Dec 23 12:04:23 2014 (r276134) +++ stable/10/sys/conf/files.pc98 Tue Dec 23 12:13:31 2014 (r276135) @@ -149,6 +149,7 @@ i386/i386/initcpu.c standard i386/i386/io.c optional io i386/i386/k6_mem.c optional mem i386/i386/locore.s standard no-obj +i386/i386/machdep.c standard i386/i386/mem.c optional mem i386/i386/minidump_machdep.c standard i386/i386/mp_clock.c optional smp @@ -239,7 +240,6 @@ pc98/pc98/busiosubr.c standard pc98/pc98/canbepm.c optional canbepm pc98/pc98/canbus.c optional canbus pc98/pc98/canbus_if.m optional canbus -pc98/pc98/machdep.c standard pc98/pc98/pc98_machdep.c standard # # x86 shared code between IA32, AMD64 and PC98 architectures Modified: stable/10/sys/i386/i386/machdep.c ============================================================================== --- stable/10/sys/i386/i386/machdep.c Tue Dec 23 12:04:23 2014 (r276134) +++ stable/10/sys/i386/i386/machdep.c Tue Dec 23 12:13:31 2014 (r276135) @@ -112,7 +112,11 @@ __FBSDID("$FreeBSD$"); #include #endif +#ifdef PC98 +#include +#else #include +#endif #include @@ -212,6 +216,14 @@ extern vm_offset_t ksym_start, ksym_end; int _udatasel, _ucodesel; u_int basemem; +#ifdef PC98 +int need_pre_dma_flush; /* If 1, use wbinvd befor DMA transfer. */ +int need_post_dma_flush; /* If 1, use invd after DMA transfer. */ + +static int ispc98 = 1; +SYSCTL_INT(_machdep, OID_AUTO, ispc98, CTLFLAG_RD, &ispc98, 0, ""); +#endif + int cold = 1; #ifdef COMPAT_43 @@ -258,7 +270,8 @@ cpu_startup(dummy) { uintmax_t memsize; char *sysenv; - + +#ifndef PC98 /* * On MacBooks, we need to disallow the legacy USB circuit to * generate an SMI# because this can cause several problems, @@ -284,6 +297,7 @@ cpu_startup(dummy) } freeenv(sysenv); } +#endif /* !PC98 */ /* * Good {morning,afternoon,evening,night}. @@ -1290,6 +1304,7 @@ SYSCTL_INT(_machdep, OID_AUTO, idle_mwai #define STATE_MWAIT 0x1 #define STATE_SLEEPING 0x2 +#ifndef PC98 static void cpu_idle_acpi(sbintime_t sbt) { @@ -1308,6 +1323,7 @@ cpu_idle_acpi(sbintime_t sbt) __asm __volatile("sti; hlt"); *state = STATE_RUNNING; } +#endif /* !PC98 */ #ifndef XEN static void @@ -1425,7 +1441,7 @@ cpu_probe_amdc1e(void) } } -#ifdef XEN +#if defined(PC98) || defined(XEN) void (*cpu_idle_fn)(sbintime_t) = cpu_idle_hlt; #else void (*cpu_idle_fn)(sbintime_t) = cpu_idle_acpi; @@ -1513,7 +1529,9 @@ struct { { cpu_idle_spin, "spin" }, { cpu_idle_mwait, "mwait" }, { cpu_idle_hlt, "hlt" }, +#ifndef PC98 { cpu_idle_acpi, "acpi" }, +#endif { NULL, NULL } }; @@ -1530,9 +1548,11 @@ idle_sysctl_available(SYSCTL_HANDLER_ARG if (strstr(idle_tbl[i].id_name, "mwait") && (cpu_feature2 & CPUID2_MON) == 0) continue; +#ifndef PC98 if (strcmp(idle_tbl[i].id_name, "acpi") == 0 && cpu_idle_hook == NULL) continue; +#endif p += sprintf(p, "%s%s", p != avail ? ", " : "", idle_tbl[i].id_name); } @@ -1567,9 +1587,11 @@ idle_sysctl(SYSCTL_HANDLER_ARGS) if (strstr(idle_tbl[i].id_name, "mwait") && (cpu_feature2 & CPUID2_MON) == 0) continue; +#ifndef PC98 if (strcmp(idle_tbl[i].id_name, "acpi") == 0 && cpu_idle_hook == NULL) continue; +#endif if (strcmp(idle_tbl[i].id_name, buf)) continue; cpu_idle_fn = idle_tbl[i].id_fn; @@ -2047,7 +2069,7 @@ sdtossd(sd, ssd) ssd->ssd_gran = sd->sd_gran; } -#ifndef XEN +#if !defined(PC98) && !defined(XEN) static int add_smap_entry(struct bios_smap *smap, vm_paddr_t *physmap, int *physmap_idxp) { @@ -2126,7 +2148,9 @@ add_smap_entry(struct bios_smap *smap, v physmap[insert_idx + 1] = smap->base + smap->length; return (1); } +#endif /* !PC98 && !XEN */ +#ifndef XEN static void basemem_setup(void) { @@ -2174,7 +2198,7 @@ basemem_setup(void) for (i = basemem / 4; i < 160; i++) pte[i] = (i << PAGE_SHIFT) | PG_V | PG_RW | PG_U; } -#endif +#endif /* !XEN */ /* * Populate the (physmap) array with base/bound pairs describing the @@ -2189,6 +2213,271 @@ basemem_setup(void) * * XXX first should be vm_paddr_t. */ +#ifdef PC98 +static void +getmemsize(int first) +{ + int off, physmap_idx, pa_indx, da_indx; + u_long physmem_tunable, memtest; + vm_paddr_t physmap[PHYSMAP_SIZE]; + pt_entry_t *pte; + quad_t dcons_addr, dcons_size; + int i; + int pg_n; + u_int extmem; + u_int under16; + vm_paddr_t pa; + + bzero(physmap, sizeof(physmap)); + + /* XXX - some of EPSON machines can't use PG_N */ + pg_n = PG_N; + if (pc98_machine_type & M_EPSON_PC98) { + switch (epson_machine_id) { +#ifdef WB_CACHE + default: +#endif + case EPSON_PC486_HX: + case EPSON_PC486_HG: + case EPSON_PC486_HA: + pg_n = 0; + break; + } + } + + under16 = pc98_getmemsize(&basemem, &extmem); + basemem_setup(); + + physmap[0] = 0; + physmap[1] = basemem * 1024; + physmap_idx = 2; + physmap[physmap_idx] = 0x100000; + physmap[physmap_idx + 1] = physmap[physmap_idx] + extmem * 1024; + + /* + * Now, physmap contains a map of physical memory. + */ + +#ifdef SMP + /* make hole for AP bootstrap code */ + physmap[1] = mp_bootaddress(physmap[1]); +#endif + + /* + * Maxmem isn't the "maximum memory", it's one larger than the + * highest page of the physical address space. It should be + * called something like "Maxphyspage". We may adjust this + * based on ``hw.physmem'' and the results of the memory test. + */ + Maxmem = atop(physmap[physmap_idx + 1]); + +#ifdef MAXMEM + Maxmem = MAXMEM / 4; +#endif + + if (TUNABLE_ULONG_FETCH("hw.physmem", &physmem_tunable)) + Maxmem = atop(physmem_tunable); + + /* + * By default keep the memtest enabled. Use a general name so that + * one could eventually do more with the code than just disable it. + */ + memtest = 1; + TUNABLE_ULONG_FETCH("hw.memtest.tests", &memtest); + + if (atop(physmap[physmap_idx + 1]) != Maxmem && + (boothowto & RB_VERBOSE)) + printf("Physical memory use set to %ldK\n", Maxmem * 4); + + /* + * If Maxmem has been increased beyond what the system has detected, + * extend the last memory segment to the new limit. + */ + if (atop(physmap[physmap_idx + 1]) < Maxmem) + physmap[physmap_idx + 1] = ptoa((vm_paddr_t)Maxmem); + + /* + * We need to divide chunk if Maxmem is larger than 16MB and + * under 16MB area is not full of memory. + * (1) system area (15-16MB region) is cut off + * (2) extended memory is only over 16MB area (ex. Melco "HYPERMEMORY") + */ + if ((under16 != 16 * 1024) && (extmem > 15 * 1024)) { + /* 15M - 16M region is cut off, so need to divide chunk */ + physmap[physmap_idx + 1] = under16 * 1024; + physmap_idx += 2; + physmap[physmap_idx] = 0x1000000; + physmap[physmap_idx + 1] = physmap[2] + extmem * 1024; + } + + /* call pmap initialization to make new kernel address space */ + pmap_bootstrap(first); + + /* + * Size up each available chunk of physical memory. + */ + physmap[0] = PAGE_SIZE; /* mask off page 0 */ + pa_indx = 0; + da_indx = 1; + phys_avail[pa_indx++] = physmap[0]; + phys_avail[pa_indx] = physmap[0]; + dump_avail[da_indx] = physmap[0]; + pte = CMAP3; + + /* + * Get dcons buffer address + */ + if (getenv_quad("dcons.addr", &dcons_addr) == 0 || + getenv_quad("dcons.size", &dcons_size) == 0) + dcons_addr = 0; + + /* + * physmap is in bytes, so when converting to page boundaries, + * round up the start address and round down the end address. + */ + for (i = 0; i <= physmap_idx; i += 2) { + vm_paddr_t end; + + end = ptoa((vm_paddr_t)Maxmem); + if (physmap[i + 1] < end) + end = trunc_page(physmap[i + 1]); + for (pa = round_page(physmap[i]); pa < end; pa += PAGE_SIZE) { + int tmp, page_bad, full; + int *ptr = (int *)CADDR3; + + full = FALSE; + /* + * block out kernel memory as not available. + */ + if (pa >= KERNLOAD && pa < first) + goto do_dump_avail; + + /* + * block out dcons buffer + */ + if (dcons_addr > 0 + && pa >= trunc_page(dcons_addr) + && pa < dcons_addr + dcons_size) + goto do_dump_avail; + + page_bad = FALSE; + if (memtest == 0) + goto skip_memtest; + + /* + * map page into kernel: valid, read/write,non-cacheable + */ + *pte = pa | PG_V | PG_RW | pg_n; + invltlb(); + + tmp = *(int *)ptr; + /* + * Test for alternating 1's and 0's + */ + *(volatile int *)ptr = 0xaaaaaaaa; + if (*(volatile int *)ptr != 0xaaaaaaaa) + page_bad = TRUE; + /* + * Test for alternating 0's and 1's + */ + *(volatile int *)ptr = 0x55555555; + if (*(volatile int *)ptr != 0x55555555) + page_bad = TRUE; + /* + * Test for all 1's + */ + *(volatile int *)ptr = 0xffffffff; + if (*(volatile int *)ptr != 0xffffffff) + page_bad = TRUE; + /* + * Test for all 0's + */ + *(volatile int *)ptr = 0x0; + if (*(volatile int *)ptr != 0x0) + page_bad = TRUE; + /* + * Restore original value. + */ + *(int *)ptr = tmp; + +skip_memtest: + /* + * Adjust array of valid/good pages. + */ + if (page_bad == TRUE) + continue; + /* + * If this good page is a continuation of the + * previous set of good pages, then just increase + * the end pointer. Otherwise start a new chunk. + * Note that "end" points one higher than end, + * making the range >= start and < end. + * If we're also doing a speculative memory + * test and we at or past the end, bump up Maxmem + * so that we keep going. The first bad page + * will terminate the loop. + */ + if (phys_avail[pa_indx] == pa) { + phys_avail[pa_indx] += PAGE_SIZE; + } else { + pa_indx++; + if (pa_indx == PHYS_AVAIL_ARRAY_END) { + printf( + "Too many holes in the physical address space, giving up\n"); + pa_indx--; + full = TRUE; + goto do_dump_avail; + } + phys_avail[pa_indx++] = pa; /* start */ + phys_avail[pa_indx] = pa + PAGE_SIZE; /* end */ + } + physmem++; +do_dump_avail: + if (dump_avail[da_indx] == pa) { + dump_avail[da_indx] += PAGE_SIZE; + } else { + da_indx++; + if (da_indx == DUMP_AVAIL_ARRAY_END) { + da_indx--; + goto do_next; + } + dump_avail[da_indx++] = pa; /* start */ + dump_avail[da_indx] = pa + PAGE_SIZE; /* end */ + } +do_next: + if (full) + break; + } + } + *pte = 0; + invltlb(); + + /* + * XXX + * The last chunk must contain at least one page plus the message + * buffer to avoid complicating other code (message buffer address + * calculation, etc.). + */ + while (phys_avail[pa_indx - 1] + PAGE_SIZE + + round_page(msgbufsize) >= phys_avail[pa_indx]) { + physmem -= atop(phys_avail[pa_indx] - phys_avail[pa_indx - 1]); + phys_avail[pa_indx--] = 0; + phys_avail[pa_indx--] = 0; + } + + Maxmem = atop(phys_avail[pa_indx]); + + /* Trim off space for the message buffer. */ + phys_avail[pa_indx] -= round_page(msgbufsize); + + /* Map the message buffer. */ + for (off = 0; off < round_page(msgbufsize); off += PAGE_SIZE) + pmap_kenter((vm_offset_t)msgbufp + off, phys_avail[pa_indx] + + off); + + PT_UPDATES_FLUSH(); +} +#else /* PC98 */ static void getmemsize(int first) { @@ -2597,6 +2886,7 @@ do_next: PT_UPDATES_FLUSH(); } +#endif /* PC98 */ #ifdef XEN #define MTOPSIZE (1<<(14 + PAGE_SHIFT)) @@ -2880,6 +3170,13 @@ init386(first) */ proc_linkup0(&proc0, &thread0); +#ifdef PC98 + /* + * Initialize DMAC + */ + pc98_init_dmac(); +#endif + metadata_missing = 0; if (bootinfo.bi_modulep) { preload_metadata = (caddr_t)bootinfo.bi_modulep + KERNBASE; @@ -3042,7 +3339,9 @@ init386(first) #ifdef DEV_ISA #ifdef DEV_ATPIC +#ifndef PC98 elcr_probe(); +#endif atpic_startup(); #else /* Reset and mask the atpics and leave them shut down. */ @@ -3184,6 +3483,7 @@ cpu_pcpu_init(struct pcpu *pcpu, int cpu pcpu->pc_acpi_id = 0xffffffff; } +#ifndef PC98 static int smap_sysctl_handler(SYSCTL_HANDLER_ARGS) { @@ -3221,6 +3521,7 @@ smap_sysctl_handler(SYSCTL_HANDLER_ARGS) } SYSCTL_PROC(_machdep, OID_AUTO, smap, CTLTYPE_OPAQUE|CTLFLAG_RD, NULL, 0, smap_sysctl_handler, "S,bios_smap_xattr", "Raw BIOS SMAP data"); +#endif /* !PC98 */ void spinlock_enter(void) From owner-svn-src-all@FreeBSD.ORG Tue Dec 23 12:26:36 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 43D8C392; Tue, 23 Dec 2014 12:26:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2FE476425C; Tue, 23 Dec 2014 12:26:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBNCQa54099301; Tue, 23 Dec 2014 12:26:36 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBNCQa7d099300; Tue, 23 Dec 2014 12:26:36 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201412231226.sBNCQa7d099300@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Tue, 23 Dec 2014 12:26:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276136 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2014 12:26:36 -0000 Author: glebius Date: Tue Dec 23 12:26:35 2014 New Revision: 276136 URL: https://svnweb.freebsd.org/changeset/base/276136 Log: m_clrprotoflags() is designed to cleanup M_PROTO flags when mbufs cross protocol and facility boundaries. However, now it cleans up only the first mbuf, while intent clearly means all mbufs in a possible chain. Differential Revision: https://reviews.freebsd.org/D1352 Reviewed by: rpaulo, gnn, adrian Sponsored by: Nginx, Inc. Modified: head/sys/sys/mbuf.h Modified: head/sys/sys/mbuf.h ============================================================================== --- head/sys/sys/mbuf.h Tue Dec 23 12:13:31 2014 (r276135) +++ head/sys/sys/mbuf.h Tue Dec 23 12:26:35 2014 (r276136) @@ -757,7 +757,10 @@ static __inline void m_clrprotoflags(struct mbuf *m) { - m->m_flags &= ~M_PROTOFLAGS; + while (m) { + m->m_flags &= ~M_PROTOFLAGS; + m = m->m_next; + } } static __inline struct mbuf * From owner-svn-src-all@FreeBSD.ORG Tue Dec 23 12:41:30 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 062F66C2; Tue, 23 Dec 2014 12:41:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E63186453A; Tue, 23 Dec 2014 12:41:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBNCfTFt007764; Tue, 23 Dec 2014 12:41:29 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBNCfTlj007763; Tue, 23 Dec 2014 12:41:29 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201412231241.sBNCfTlj007763@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 23 Dec 2014 12:41:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276137 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2014 12:41:30 -0000 Author: mav Date: Tue Dec 23 12:41:28 2014 New Revision: 276137 URL: https://svnweb.freebsd.org/changeset/base/276137 Log: MFC r275842: Do not count RCTD bit set as an error. We can not really implement it, but specification tells that it "shall" work, so it can be safely ignored. Modified: stable/10/sys/cam/ctl/ctl_cmd_table.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_cmd_table.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_cmd_table.c Tue Dec 23 12:26:35 2014 (r276136) +++ stable/10/sys/cam/ctl/ctl_cmd_table.c Tue Dec 23 12:41:28 2014 (r276137) @@ -513,7 +513,7 @@ const struct ctl_cmd_entry ctl_cmd_table CTL_FLAG_DATA_IN | CTL_CMD_FLAG_ALLOW_ON_PR_RESV, CTL_LUN_PAT_NONE, - 12, {0x0c, 0x07, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0, 0x07}}, + 12, {0x0c, 0x87, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0, 0x07}}, /* 0D REPORT SUPPORTED_TASK MANAGEMENT FUNCTIONS */ {ctl_report_supported_tmf, CTL_SERIDX_INQ, CTL_CMD_FLAG_OK_ON_BOTH | From owner-svn-src-all@FreeBSD.ORG Tue Dec 23 12:44:18 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F3D2887D; Tue, 23 Dec 2014 12:44:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C55F364573; Tue, 23 Dec 2014 12:44:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBNCiH0V008622; Tue, 23 Dec 2014 12:44:17 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBNCiHH2008621; Tue, 23 Dec 2014 12:44:17 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201412231244.sBNCiHH2008621@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 23 Dec 2014 12:44:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276138 - stable/10/usr.sbin/ctladm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2014 12:44:18 -0000 Author: mav Date: Tue Dec 23 12:44:16 2014 New Revision: 276138 URL: https://svnweb.freebsd.org/changeset/base/276138 Log: MFC r275958: Report XML parsing errors. Modified: stable/10/usr.sbin/ctladm/ctladm.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/ctladm/ctladm.c ============================================================================== --- stable/10/usr.sbin/ctladm/ctladm.c Tue Dec 23 12:41:28 2014 (r276137) +++ stable/10/usr.sbin/ctladm/ctladm.c Tue Dec 23 12:44:16 2014 (r276138) @@ -3643,11 +3643,14 @@ retry: XML_SetCharacterDataHandler(parser, cctl_islist_char_handler); retval = XML_Parse(parser, conn_str, strlen(conn_str), 1); - XML_ParserFree(parser); if (retval != 1) { + warnx("%s: Unable to parse XML: Error %d", __func__, + XML_GetErrorCode(parser)); + XML_ParserFree(parser); retval = 1; goto bailout; } + XML_ParserFree(parser); if (verbose != 0) { STAILQ_FOREACH(conn, &islist.conn_list, links) { @@ -4058,11 +4061,14 @@ retry: XML_SetCharacterDataHandler(parser, cctl_char_handler); retval = XML_Parse(parser, lun_str, strlen(lun_str), 1); - XML_ParserFree(parser); if (retval != 1) { + warnx("%s: Unable to parse XML: Error %d", __func__, + XML_GetErrorCode(parser)); + XML_ParserFree(parser); retval = 1; goto bailout; } + XML_ParserFree(parser); printf("LUN Backend %18s %4s %-16s %-16s\n", "Size (Blocks)", "BS", "Serial Number", "Device ID"); @@ -4336,11 +4342,14 @@ retry: XML_SetCharacterDataHandler(parser, cctl_char_phandler); retval = XML_Parse(parser, port_str, strlen(port_str), 1); - XML_ParserFree(parser); if (retval != 1) { + warnx("%s: Unable to parse XML: Error %d", __func__, + XML_GetErrorCode(parser)); + XML_ParserFree(parser); retval = 1; goto bailout; } + XML_ParserFree(parser); if (quiet == 0) printf("Port Online Frontend Name pp vp\n"); From owner-svn-src-all@FreeBSD.ORG Tue Dec 23 12:45:31 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 203D29BF; Tue, 23 Dec 2014 12:45:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 013D56459C; Tue, 23 Dec 2014 12:45:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBNCjUB5008867; Tue, 23 Dec 2014 12:45:30 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBNCjUEc008864; Tue, 23 Dec 2014 12:45:30 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201412231245.sBNCjUEc008864@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 23 Dec 2014 12:45:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276139 - in stable/10: sys/cam/ctl usr.sbin/ctladm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2014 12:45:31 -0000 Author: mav Date: Tue Dec 23 12:45:29 2014 New Revision: 276139 URL: https://svnweb.freebsd.org/changeset/base/276139 Log: MFC r275959: Report initiator id in portlist XML in more formalized way. Modified: stable/10/sys/cam/ctl/ctl.c stable/10/usr.sbin/ctladm/ctladm.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Tue Dec 23 12:44:16 2014 (r276138) +++ stable/10/sys/cam/ctl/ctl.c Tue Dec 23 12:45:29 2014 (r276139) @@ -3500,11 +3500,11 @@ ctl_ioctl(struct cdev *dev, u_long cmd, if (port->wwpn_iid[j].name != NULL) retval = sbuf_printf(sb, - "\t%u %s\n", + "\t%s\n", j, port->wwpn_iid[j].name); else retval = sbuf_printf(sb, - "\t%u naa.%08jx\n", + "\tnaa.%08jx\n", j, port->wwpn_iid[j].wwpn); if (retval != 0) break; Modified: stable/10/usr.sbin/ctladm/ctladm.c ============================================================================== --- stable/10/usr.sbin/ctladm/ctladm.c Tue Dec 23 12:44:16 2014 (r276138) +++ stable/10/usr.sbin/ctladm/ctladm.c Tue Dec 23 12:45:29 2014 (r276139) @@ -4117,6 +4117,7 @@ struct cctl_portlist_data { STAILQ_HEAD(,cctl_port) port_list; struct cctl_port *cur_port; int level; + uint64_t cur_id; struct sbuf *cur_sb[32]; }; @@ -4139,6 +4140,14 @@ cctl_start_pelement(void *user_data, con if (portlist->cur_sb[portlist->level] == NULL) err(1, "%s: Unable to allocate sbuf", __func__); + portlist->cur_id = 0; + for (i = 0; attr[i] != NULL; i += 2) { + if (strcmp(attr[i], "id") == 0) { + portlist->cur_id = strtoull(attr[i+1], NULL, 0); + break; + } + } + if (strcmp(name, "targ_port") == 0) { if (cur_port != NULL) errx(1, "%s: improper port element nesting", __func__); @@ -4153,16 +4162,8 @@ cctl_start_pelement(void *user_data, con STAILQ_INIT(&cur_port->init_list); STAILQ_INIT(&cur_port->attr_list); + cur_port->port_id = portlist->cur_id; STAILQ_INSERT_TAIL(&portlist->port_list, cur_port, links); - - for (i = 0; attr[i] != NULL; i += 2) { - if (strcmp(attr[i], "id") == 0) { - cur_port->port_id = strtoull(attr[i+1], NULL, 0); - } else { - errx(1, "%s: invalid LUN attribute %s = %s", - __func__, attr[i], attr[i+1]); - } - } } } @@ -4231,7 +4232,10 @@ cctl_end_pelement(void *user_data, const err(1, "%s: can't allocate %zd bytes for nv pair", __func__, sizeof(*nv)); - nv->name = strdup(name); + if (strcmp(name, "initiator") == 0) + asprintf(&nv->name, "%ju", portlist->cur_id); + else + nv->name = strdup(name); if (nv->name == NULL) err(1, "%s: can't allocated %zd bytes for string", __func__, strlen(name)); @@ -4372,7 +4376,8 @@ retry: if (port->target) printf(" Target: %s\n", port->target); STAILQ_FOREACH(nv, &port->init_list, links) { - printf(" Initiator: %s\n", nv->value); + printf(" Initiator %s: %s\n", + nv->name, nv->value); } } From owner-svn-src-all@FreeBSD.ORG Tue Dec 23 14:24:39 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2AADF33E; Tue, 23 Dec 2014 14:24:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 15EC71E93; Tue, 23 Dec 2014 14:24:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBNEOcVP055866; Tue, 23 Dec 2014 14:24:38 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBNEOb72055860; Tue, 23 Dec 2014 14:24:37 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201412231424.sBNEOb72055860@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Tue, 23 Dec 2014 14:24:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276140 - in head/sys: conf fs/nfs fs/nfsclient X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2014 14:24:39 -0000 Author: rmacklem Date: Tue Dec 23 14:24:36 2014 New Revision: 276140 URL: https://svnweb.freebsd.org/changeset/base/276140 Log: Fix kernel builds with "options NFS_DEBUG" that were broken by r276096. Also delete the two kernel options NFS_GATHERDELAY, NFS_WDELAYHASHSIZ which are no longer used. Reported by: bz Modified: head/sys/conf/NOTES head/sys/conf/options head/sys/fs/nfs/nfsport.h head/sys/fs/nfsclient/nfs.h head/sys/fs/nfsclient/nfs_clvfsops.c Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Tue Dec 23 12:45:29 2014 (r276139) +++ head/sys/conf/NOTES Tue Dec 23 14:24:36 2014 (r276140) @@ -1098,8 +1098,6 @@ options NFS_MINATTRTIMO=3 # VREG attrib options NFS_MAXATTRTIMO=60 options NFS_MINDIRATTRTIMO=30 # VDIR attrib cache timeout in sec options NFS_MAXDIRATTRTIMO=60 -options NFS_GATHERDELAY=10 # Default write gather delay (msec) -options NFS_WDELAYHASHSIZ=16 # and with this options NFS_DEBUG # Enable NFS Debugging # Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Tue Dec 23 12:45:29 2014 (r276139) +++ head/sys/conf/options Tue Dec 23 14:24:36 2014 (r276140) @@ -619,8 +619,6 @@ NFS_MINATTRTIMO opt_nfs.h NFS_MAXATTRTIMO opt_nfs.h NFS_MINDIRATTRTIMO opt_nfs.h NFS_MAXDIRATTRTIMO opt_nfs.h -NFS_GATHERDELAY opt_nfs.h -NFS_WDELAYHASHSIZ opt_nfs.h NFS_DEBUG opt_nfs.h # For the Bt848/Bt848A/Bt849/Bt878/Bt879 driver Modified: head/sys/fs/nfs/nfsport.h ============================================================================== --- head/sys/fs/nfs/nfsport.h Tue Dec 23 12:45:29 2014 (r276139) +++ head/sys/fs/nfs/nfsport.h Tue Dec 23 14:24:36 2014 (r276140) @@ -930,24 +930,6 @@ void nfsd_mntinit(void); int newnfs_iosize(struct nfsmount *); -#ifdef NFS_DEBUG - -extern int nfs_debug; -#define NFS_DEBUG_ASYNCIO 1 /* asynchronous i/o */ -#define NFS_DEBUG_WG 2 /* server write gathering */ -#define NFS_DEBUG_RC 4 /* server request caching */ - -#define NFS_DPF(cat, args) \ - do { \ - if (nfs_debug & NFS_DEBUG_##cat) printf args; \ - } while (0) - -#else - -#define NFS_DPF(cat, args) - -#endif - int newnfs_vncmpf(struct vnode *, void *); #ifndef NFS_MINDIRATTRTIMO Modified: head/sys/fs/nfsclient/nfs.h ============================================================================== --- head/sys/fs/nfsclient/nfs.h Tue Dec 23 12:45:29 2014 (r276139) +++ head/sys/fs/nfsclient/nfs.h Tue Dec 23 14:24:36 2014 (r276140) @@ -55,6 +55,24 @@ #define NFS_ISV34(v) \ (VFSTONFS((v)->v_mount)->nm_flag & (NFSMNT_NFSV3 | NFSMNT_NFSV4)) +#ifdef NFS_DEBUG + +extern int nfs_debug; +#define NFS_DEBUG_ASYNCIO 1 /* asynchronous i/o */ +#define NFS_DEBUG_WG 2 /* server write gathering */ +#define NFS_DEBUG_RC 4 /* server request caching */ + +#define NFS_DPF(cat, args) \ + do { \ + if (nfs_debug & NFS_DEBUG_##cat) printf args; \ + } while (0) + +#else + +#define NFS_DPF(cat, args) + +#endif + /* * NFS iod threads can be in one of these three states once spawned. * NFSIOD_NOT_AVAILABLE - Cannot be assigned an I/O operation at this time. Modified: head/sys/fs/nfsclient/nfs_clvfsops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clvfsops.c Tue Dec 23 12:45:29 2014 (r276139) +++ head/sys/fs/nfsclient/nfs_clvfsops.c Tue Dec 23 14:24:36 2014 (r276140) @@ -100,6 +100,11 @@ SYSCTL_INT(_vfs_nfs, NFS_TPRINTF_INITIAL static int nfs_tprintf_delay = NFS_TPRINTF_DELAY; SYSCTL_INT(_vfs_nfs, NFS_TPRINTF_DELAY, downdelayinterval, CTLFLAG_RW, &nfs_tprintf_delay, 0, ""); +#ifdef NFS_DEBUG +int nfs_debug; +SYSCTL_INT(_vfs_nfs, OID_AUTO, debug, CTLFLAG_RW, &nfs_debug, 0, + "Toggle debug flag"); +#endif static int nfs_mountroot(struct mount *); static void nfs_sec_name(char *, int *); From owner-svn-src-all@FreeBSD.ORG Tue Dec 23 14:30:55 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6863D851; Tue, 23 Dec 2014 14:30:55 +0000 (UTC) Received: from esa-annu.net.uoguelph.ca (esa-annu.mail.uoguelph.ca [131.104.91.36]) by mx1.freebsd.org (Postfix) with ESMTP id D9D601F09; Tue, 23 Dec 2014 14:30:54 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AsgEAP17mVSDaFve/2dsb2JhbABbg1hYBIMAwzyFcAKBLQEBAQEBfYQNAQUjVhsUBAICDRIHAlkGExmIEw24UZYKAQEBAQEBAQMBAQEBAQEBAQEBFASBIY4dATMHgmiBQQWJSoJzhRaPG4dnIoIygVogMYFFfgEBAQ X-IronPort-AV: E=Sophos;i="5.07,632,1413259200"; d="scan'208";a="180507464" Received: from muskoka.cs.uoguelph.ca (HELO zcs3.mail.uoguelph.ca) ([131.104.91.222]) by esa-annu.net.uoguelph.ca with ESMTP; 23 Dec 2014 09:30:53 -0500 Received: from zcs3.mail.uoguelph.ca (localhost.localdomain [127.0.0.1]) by zcs3.mail.uoguelph.ca (Postfix) with ESMTP id DB221AEA35; Tue, 23 Dec 2014 09:30:52 -0500 (EST) Date: Tue, 23 Dec 2014 09:30:52 -0500 (EST) From: Rick Macklem To: "Bjoern A. Zeeb" Message-ID: <159360696.1361743.1419345052886.JavaMail.root@uoguelph.ca> In-Reply-To: Subject: Re: svn commit: r276096 - in head/sys: arm/conf conf fs/nfs fs/nfsclient modules modules/dtrace modules/dtrace/dtnfsclient modules/dtrace/dtraceall modules/nfs_common modules/nfsclient modules/nfsserve... MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [172.17.95.12] X-Mailer: Zimbra 7.2.6_GA_2926 (ZimbraWebClient - FF3.0 (Win)/7.2.6_GA_2926) Cc: svn-src-head@freebsd.org, Rick Macklem , svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2014 14:30:55 -0000 Bjoern A. Zeeb wrote: >=20 > > On 23 Dec 2014, at 00:47 , Rick Macklem > > wrote: > >=20 > > Author: rmacklem > > Date: Tue Dec 23 00:47:46 2014 > > New Revision: 276096 > > URL: https://svnweb.freebsd.org/changeset/base/276096 > >=20 > > Log: > > Remove the old NFS client and server from head, > > which means that the NFSCLIENT and NFSSERVER > > kernel options will no longer work. This commit > > only removes the kernel components. Removal of > > unused code in the user utilities will be done > > later. This commit does not include an addition > > to UPDATING, but that will be committed in a > > few minutes. > >=20 > > Discussed on: freebsd-fs > >=20 >=20 > Hi, >=20 > I see the following error currently on my (incremental) builds: >=20 > nfs_clbio.o: In function `ncl_asyncio': > /scratch/tmp/bz/head.svn/sys/fs/nfsclient/nfs_clbio.c:(.text+0x1974): > undefined reference to `nfs_debug' > /scratch/tmp/bz/head.svn/sys/fs/nfsclient/nfs_clbio.c:(.text+0x19a2): > undefined reference to `nfs_debug' > /scratch/tmp/bz/head.svn/sys/fs/nfsclient/nfs_clbio.c:(.text+0x19f9): > undefined reference to `nfs_debug' > /scratch/tmp/bz/head.svn/sys/fs/nfsclient/nfs_clbio.c:(.text+0x1a93): > undefined reference to `nfs_debug' > /scratch/tmp/bz/head.svn/sys/fs/nfsclient/nfs_clbio.c:(.text+0x1b0a): > undefined reference to `nfs_debug' > nfs_clnfsiod.o:/scratch/tmp/bz/head.svn/sys/fs/nfsclient/nfs_clnfsiod.c:(= .text+0x5d2): > more undefined references to `nfs_debug' follow >=20 Oops, sorry about that. Should be fixed by r276140. Thanks for reporting it, rick >=20 >=20 >=20 >=20 > > Deleted: > > head/sys/modules/dtrace/dtnfsclient/ > > head/sys/modules/nfs_common/ > > head/sys/modules/nfsclient/ > > head/sys/modules/nfsserver/ > > head/sys/nfs/nfs_common.c > > head/sys/nfsclient/nfs_bio.c > > head/sys/nfsclient/nfs_kdtrace.c > > head/sys/nfsclient/nfs_krpc.c > > head/sys/nfsclient/nfs_nfsiod.c > > head/sys/nfsclient/nfs_node.c > > head/sys/nfsclient/nfs_subs.c > > head/sys/nfsclient/nfs_vfsops.c > > head/sys/nfsclient/nfs_vnops.c > > head/sys/nfsserver/nfs_fha_old.c > > head/sys/nfsserver/nfs_serv.c > > head/sys/nfsserver/nfs_srvkrpc.c > > head/sys/nfsserver/nfs_srvsubs.c > > Modified: > > head/sys/arm/conf/DOCKSTAR > > head/sys/arm/conf/DREAMPLUG-1001 > > head/sys/arm/conf/EA3250 > > head/sys/conf/NOTES > > head/sys/conf/files > > head/sys/conf/options > > head/sys/fs/nfs/nfs_commonkrpc.c > > head/sys/fs/nfsclient/nfs_clnode.c > > head/sys/fs/nfsclient/nfs_clport.c > > head/sys/fs/nfsclient/nfs_clvfsops.c > > head/sys/modules/Makefile > > head/sys/modules/dtrace/Makefile > > head/sys/modules/dtrace/dtraceall/dtraceall.c > > head/sys/nfs/bootp_subr.c > > head/sys/sys/param.h >=20 > =E2=80=94 > Bjoern A. Zeeb Charles Haddon > Spurgeon: > "Friendship is one of the sweetest joys of life. Many might have > failed > beneath the bitterness of their trial had they not found a friend." >=20 >=20 From owner-svn-src-all@FreeBSD.ORG Tue Dec 23 15:18:29 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B4F62EB5; Tue, 23 Dec 2014 15:18:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A123D66DAF; Tue, 23 Dec 2014 15:18:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBNFITsY081657; Tue, 23 Dec 2014 15:18:29 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBNFITZo081656; Tue, 23 Dec 2014 15:18:29 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201412231518.sBNFITZo081656@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 23 Dec 2014 15:18:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276141 - head/sys/cam/ctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2014 15:18:29 -0000 Author: mav Date: Tue Dec 23 15:18:28 2014 New Revision: 276141 URL: https://svnweb.freebsd.org/changeset/base/276141 Log: Hide block device VPD pages for non-block devices. MFC after: 2 weeks Modified: head/sys/cam/ctl/ctl.c Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Tue Dec 23 14:24:36 2014 (r276140) +++ head/sys/cam/ctl/ctl.c Tue Dec 23 15:18:28 2014 (r276141) @@ -9599,6 +9599,7 @@ ctl_inquiry_evpd_supported(struct ctl_sc struct scsi_vpd_supported_pages *pages; int sup_page_size; struct ctl_lun *lun; + int p; lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; @@ -9632,27 +9633,30 @@ ctl_inquiry_evpd_supported(struct ctl_sc else pages->device = (SID_QUAL_LU_OFFLINE << 5) | T_DIRECT; - pages->length = SCSI_EVPD_NUM_SUPPORTED_PAGES; + p = 0; /* Supported VPD pages */ - pages->page_list[0] = SVPD_SUPPORTED_PAGES; + pages->page_list[p++] = SVPD_SUPPORTED_PAGES; /* Serial Number */ - pages->page_list[1] = SVPD_UNIT_SERIAL_NUMBER; + pages->page_list[p++] = SVPD_UNIT_SERIAL_NUMBER; /* Device Identification */ - pages->page_list[2] = SVPD_DEVICE_ID; + pages->page_list[p++] = SVPD_DEVICE_ID; /* Extended INQUIRY Data */ - pages->page_list[3] = SVPD_EXTENDED_INQUIRY_DATA; + pages->page_list[p++] = SVPD_EXTENDED_INQUIRY_DATA; /* Mode Page Policy */ - pages->page_list[4] = SVPD_MODE_PAGE_POLICY; + pages->page_list[p++] = SVPD_MODE_PAGE_POLICY; /* SCSI Ports */ - pages->page_list[5] = SVPD_SCSI_PORTS; + pages->page_list[p++] = SVPD_SCSI_PORTS; /* Third-party Copy */ - pages->page_list[6] = SVPD_SCSI_TPC; - /* Block limits */ - pages->page_list[7] = SVPD_BLOCK_LIMITS; - /* Block Device Characteristics */ - pages->page_list[8] = SVPD_BDC; - /* Logical Block Provisioning */ - pages->page_list[9] = SVPD_LBP; + pages->page_list[p++] = SVPD_SCSI_TPC; + if (lun != NULL && lun->be_lun->lun_type == T_DIRECT) { + /* Block limits */ + pages->page_list[p++] = SVPD_BLOCK_LIMITS; + /* Block Device Characteristics */ + pages->page_list[p++] = SVPD_BDC; + /* Logical Block Provisioning */ + pages->page_list[p++] = SVPD_LBP; + } + pages->length = p; ctl_set_success(ctsio); ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; @@ -10234,13 +10238,12 @@ ctl_inquiry_evpd_lbp(struct ctl_scsiio * static int ctl_inquiry_evpd(struct ctl_scsiio *ctsio) { + struct ctl_lun *lun; struct scsi_inquiry *cdb; int alloc_len, retval; + lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; cdb = (struct scsi_inquiry *)ctsio->cdb; - - retval = CTL_RETVAL_COMPLETE; - alloc_len = scsi_2btoul(cdb->length); switch (cdb->page_code) { @@ -10266,15 +10269,22 @@ ctl_inquiry_evpd(struct ctl_scsiio *ctsi retval = ctl_inquiry_evpd_tpc(ctsio, alloc_len); break; case SVPD_BLOCK_LIMITS: + if (lun == NULL || lun->be_lun->lun_type != T_DIRECT) + goto err; retval = ctl_inquiry_evpd_block_limits(ctsio, alloc_len); break; case SVPD_BDC: + if (lun == NULL || lun->be_lun->lun_type != T_DIRECT) + goto err; retval = ctl_inquiry_evpd_bdc(ctsio, alloc_len); break; case SVPD_LBP: + if (lun == NULL || lun->be_lun->lun_type != T_DIRECT) + goto err; retval = ctl_inquiry_evpd_lbp(ctsio, alloc_len); break; default: +err: ctl_set_invalid_field(ctsio, /*sks_valid*/ 1, /*command*/ 1, From owner-svn-src-all@FreeBSD.ORG Tue Dec 23 15:38:23 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0D6A74EE; Tue, 23 Dec 2014 15:38:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EAFBC64034; Tue, 23 Dec 2014 15:38:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBNFcMGF091264; Tue, 23 Dec 2014 15:38:22 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBNFcKrx091251; Tue, 23 Dec 2014 15:38:20 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201412231538.sBNFcKrx091251@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 23 Dec 2014 15:38:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276142 - in head/sys: amd64/amd64 cddl/dev/dtrace/amd64 cddl/dev/dtrace/i386 cddl/dev/dtrace/mips cddl/dev/dtrace/powerpc i386/i386 mips/mips powerpc/aim sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2014 15:38:23 -0000 Author: markj Date: Tue Dec 23 15:38:19 2014 New Revision: 276142 URL: https://svnweb.freebsd.org/changeset/base/276142 Log: Restore the trap type argument to the DTrace trap hook, removed in r268600. It's redundant at the moment since it can be obtained from the trapframe on the architectures where DTrace is supported, but this won't be the case with ARM. Modified: head/sys/amd64/amd64/trap.c head/sys/cddl/dev/dtrace/amd64/dtrace_subr.c head/sys/cddl/dev/dtrace/i386/dtrace_subr.c head/sys/cddl/dev/dtrace/mips/dtrace_subr.c head/sys/cddl/dev/dtrace/powerpc/dtrace_subr.c head/sys/i386/i386/trap.c head/sys/mips/mips/trap.c head/sys/powerpc/aim/trap.c head/sys/sys/dtrace_bsd.h Modified: head/sys/amd64/amd64/trap.c ============================================================================== --- head/sys/amd64/amd64/trap.c Tue Dec 23 15:18:28 2014 (r276141) +++ head/sys/amd64/amd64/trap.c Tue Dec 23 15:38:19 2014 (r276142) @@ -614,7 +614,8 @@ trap_check(struct trapframe *frame) { #ifdef KDTRACE_HOOKS - if (dtrace_trap_func != NULL && (*dtrace_trap_func)(frame)) + if (dtrace_trap_func != NULL && + (*dtrace_trap_func)(frame, frame->tf_trapno) != 0) return; #endif trap(frame); Modified: head/sys/cddl/dev/dtrace/amd64/dtrace_subr.c ============================================================================== --- head/sys/cddl/dev/dtrace/amd64/dtrace_subr.c Tue Dec 23 15:18:28 2014 (r276141) +++ head/sys/cddl/dev/dtrace/amd64/dtrace_subr.c Tue Dec 23 15:38:19 2014 (r276142) @@ -464,7 +464,7 @@ dtrace_gethrestime(void) /* Function to handle DTrace traps during probes. See amd64/amd64/trap.c. */ int -dtrace_trap(struct trapframe *frame) +dtrace_trap(struct trapframe *frame, u_int type) { /* * A trap can occur while DTrace executes a probe. Before @@ -480,7 +480,7 @@ dtrace_trap(struct trapframe *frame) * There are only a couple of trap types that are expected. * All the rest will be handled in the usual way. */ - switch (frame->tf_trapno) { + switch (type) { /* General protection fault. */ case T_PROTFLT: /* Flag an illegal operation. */ Modified: head/sys/cddl/dev/dtrace/i386/dtrace_subr.c ============================================================================== --- head/sys/cddl/dev/dtrace/i386/dtrace_subr.c Tue Dec 23 15:18:28 2014 (r276141) +++ head/sys/cddl/dev/dtrace/i386/dtrace_subr.c Tue Dec 23 15:38:19 2014 (r276142) @@ -473,7 +473,7 @@ dtrace_gethrestime(void) /* Function to handle DTrace traps during probes. See i386/i386/trap.c */ int -dtrace_trap(struct trapframe *frame) +dtrace_trap(struct trapframe *frame, u_int type) { /* * A trap can occur while DTrace executes a probe. Before @@ -489,7 +489,7 @@ dtrace_trap(struct trapframe *frame) * There are only a couple of trap types that are expected. * All the rest will be handled in the usual way. */ - switch (frame->tf_trapno) { + switch (type) { /* General protection fault. */ case T_PROTFLT: /* Flag an illegal operation. */ Modified: head/sys/cddl/dev/dtrace/mips/dtrace_subr.c ============================================================================== --- head/sys/cddl/dev/dtrace/mips/dtrace_subr.c Tue Dec 23 15:18:28 2014 (r276141) +++ head/sys/cddl/dev/dtrace/mips/dtrace_subr.c Tue Dec 23 15:38:19 2014 (r276142) @@ -137,11 +137,8 @@ dtrace_gethrestime(void) /* Function to handle DTrace traps during probes. See amd64/amd64/trap.c */ int -dtrace_trap(struct trapframe *frame) +dtrace_trap(struct trapframe *frame, u_int type) { - u_int type; - - type = (trapframe->cause & MIPS_CR_EXC_CODE) >> MIPS_CR_EXC_CODE_SHIFT; /* * A trap can occur while DTrace executes a probe. Before Modified: head/sys/cddl/dev/dtrace/powerpc/dtrace_subr.c ============================================================================== --- head/sys/cddl/dev/dtrace/powerpc/dtrace_subr.c Tue Dec 23 15:18:28 2014 (r276141) +++ head/sys/cddl/dev/dtrace/powerpc/dtrace_subr.c Tue Dec 23 15:38:19 2014 (r276142) @@ -262,8 +262,9 @@ dtrace_gethrestime(void) /* Function to handle DTrace traps during probes. See powerpc/powerpc/trap.c */ int -dtrace_trap(struct trapframe *frame) +dtrace_trap(struct trapframe *frame, u_int type) { + /* * A trap can occur while DTrace executes a probe. Before * executing the probe, DTrace blocks re-scheduling and sets @@ -278,7 +279,7 @@ dtrace_trap(struct trapframe *frame) * There are only a couple of trap types that are expected. * All the rest will be handled in the usual way. */ - switch (frame->exc) { + switch (type) { /* Page fault. */ case EXC_DSI: case EXC_DSE: Modified: head/sys/i386/i386/trap.c ============================================================================== --- head/sys/i386/i386/trap.c Tue Dec 23 15:18:28 2014 (r276141) +++ head/sys/i386/i386/trap.c Tue Dec 23 15:38:19 2014 (r276142) @@ -246,7 +246,7 @@ trap(struct trapframe *frame) * flag is cleared and finally re-scheduling is enabled. */ if ((type == T_PROTFLT || type == T_PAGEFLT) && - dtrace_trap_func != NULL && (*dtrace_trap_func)(frame)) + dtrace_trap_func != NULL && (*dtrace_trap_func)(frame, type)) goto out; #endif Modified: head/sys/mips/mips/trap.c ============================================================================== --- head/sys/mips/mips/trap.c Tue Dec 23 15:18:28 2014 (r276141) +++ head/sys/mips/mips/trap.c Tue Dec 23 15:38:19 2014 (r276142) @@ -617,7 +617,8 @@ trap(struct trapframe *trapframe) * XXXDTRACE: add pid probe handler here (if ever) */ if (!usermode) { - if (dtrace_trap_func != NULL && (*dtrace_trap_func)(trapframe)) + if (dtrace_trap_func != NULL && + (*dtrace_trap_func)(trapframe, type) != 0) return (trapframe->pc); } #endif Modified: head/sys/powerpc/aim/trap.c ============================================================================== --- head/sys/powerpc/aim/trap.c Tue Dec 23 15:18:28 2014 (r276141) +++ head/sys/powerpc/aim/trap.c Tue Dec 23 15:38:19 2014 (r276142) @@ -177,7 +177,7 @@ trap(struct trapframe *frame) * handled the trap and modified the trap frame so that this * function can return normally. */ - if (dtrace_trap_func != NULL && (*dtrace_trap_func)(frame)) + if (dtrace_trap_func != NULL && (*dtrace_trap_func)(frame, type) != 0) return; #endif Modified: head/sys/sys/dtrace_bsd.h ============================================================================== --- head/sys/sys/dtrace_bsd.h Tue Dec 23 15:18:28 2014 (r276141) +++ head/sys/sys/dtrace_bsd.h Tue Dec 23 15:38:19 2014 (r276142) @@ -39,14 +39,14 @@ struct vattr; struct vnode; struct reg; -int dtrace_trap(struct trapframe *); +int dtrace_trap(struct trapframe *, u_int); /* * The dtrace module handles traps that occur during a DTrace probe. * This type definition is used in the trap handler to provide a * hook for the dtrace module to register its handler with. */ -typedef int (*dtrace_trap_func_t)(struct trapframe *); +typedef int (*dtrace_trap_func_t)(struct trapframe *, u_int); extern dtrace_trap_func_t dtrace_trap_func; /* From owner-svn-src-all@FreeBSD.ORG Tue Dec 23 15:40:58 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 51EC366C; Tue, 23 Dec 2014 15:40:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3E82F6406A; Tue, 23 Dec 2014 15:40:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBNFewt5092574; Tue, 23 Dec 2014 15:40:58 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBNFewc1092572; Tue, 23 Dec 2014 15:40:58 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201412231540.sBNFewc1092572@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 23 Dec 2014 15:40:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276143 - head/lib/libproc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2014 15:40:58 -0000 Author: markj Date: Tue Dec 23 15:40:57 2014 New Revision: 276143 URL: https://svnweb.freebsd.org/changeset/base/276143 Log: Fix a memory leak that occured when looking up CTF info for a symbol. Modified: head/lib/libproc/proc_sym.c Modified: head/lib/libproc/proc_sym.c ============================================================================== --- head/lib/libproc/proc_sym.c Tue Dec 23 15:38:19 2014 (r276142) +++ head/lib/libproc/proc_sym.c Tue Dec 23 15:40:57 2014 (r276143) @@ -501,13 +501,16 @@ ctf_file_t * proc_name2ctf(struct proc_handle *p, const char *name) { #ifndef NO_CTF + ctf_file_t *ctf; prmap_t *map; int error; if ((map = proc_name2map(p, name)) == NULL) return (NULL); - return (ctf_open(map->pr_mapname, &error)); + ctf = ctf_open(map->pr_mapname, &error); + free(map); + return (ctf); #else (void)p; (void)name; From owner-svn-src-all@FreeBSD.ORG Tue Dec 23 15:42:34 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3457A7C7; Tue, 23 Dec 2014 15:42:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2079A64114; Tue, 23 Dec 2014 15:42:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBNFgYHp095293; Tue, 23 Dec 2014 15:42:34 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBNFgXLK095292; Tue, 23 Dec 2014 15:42:33 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201412231542.sBNFgXLK095292@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 23 Dec 2014 15:42:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276144 - head/cddl/contrib/opensolaris/lib/libdtrace/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2014 15:42:34 -0000 Author: markj Date: Tue Dec 23 15:42:33 2014 New Revision: 276144 URL: https://svnweb.freebsd.org/changeset/base/276144 Log: We can stop iterating once we've found the DOF section. Submitted by: Fedor Indutny Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/drti.c Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/drti.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/drti.c Tue Dec 23 15:40:57 2014 (r276143) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/drti.c Tue Dec 23 15:42:33 2014 (r276144) @@ -171,6 +171,7 @@ dtrace_dof_init(void) if (s != NULL && strcmp(s, ".SUNW_dof") == 0) { dofdata = elf_getdata(scn, NULL); dof = dofdata->d_buf; + break; } } } From owner-svn-src-all@FreeBSD.ORG Tue Dec 23 15:42:36 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E2738846; Tue, 23 Dec 2014 15:42:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9CB4264116; Tue, 23 Dec 2014 15:42:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBNFgZKB095316; Tue, 23 Dec 2014 15:42:35 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBNFgZjr095312; Tue, 23 Dec 2014 15:42:35 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201412231542.sBNFgZjr095312@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Tue, 23 Dec 2014 15:42:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276145 - in head/sys/boot: arm/uboot powerpc/uboot X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2014 15:42:36 -0000 Author: ian Date: Tue Dec 23 15:42:34 2014 New Revision: 276145 URL: https://svnweb.freebsd.org/changeset/base/276145 Log: Convert a couple lingering NO_FORTH conditionals to test MK_FORTH. Modified: head/sys/boot/arm/uboot/Makefile head/sys/boot/powerpc/uboot/Makefile Modified: head/sys/boot/arm/uboot/Makefile ============================================================================== --- head/sys/boot/arm/uboot/Makefile Tue Dec 23 15:42:33 2014 (r276144) +++ head/sys/boot/arm/uboot/Makefile Tue Dec 23 15:42:34 2014 (r276145) @@ -76,7 +76,7 @@ LIBUBOOT_FDT= ${.OBJDIR}/../../uboot/fdt LIBFDT= ${.OBJDIR}/../../fdt/libfdt.a .endif -.if !defined(NO_FORTH) +.if ${MK_FORTH} != "no" # Enable BootForth BOOT_FORTH= yes CFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../../ficl -I${.CURDIR}/../../ficl/arm Modified: head/sys/boot/powerpc/uboot/Makefile ============================================================================== --- head/sys/boot/powerpc/uboot/Makefile Tue Dec 23 15:42:33 2014 (r276144) +++ head/sys/boot/powerpc/uboot/Makefile Tue Dec 23 15:42:34 2014 (r276145) @@ -66,7 +66,7 @@ LIBUBOOT_FDT= ${.OBJDIR}/../../uboot/fdt LIBFDT= ${.OBJDIR}/../../fdt/libfdt.a .endif -.if !defined(NO_FORTH) +.if ${MK_FORTH} != "no" # Enable BootForth BOOT_FORTH= yes CFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../../ficl -I${.CURDIR}/../../ficl/powerpc From owner-svn-src-all@FreeBSD.ORG Tue Dec 23 15:46:06 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0C3F9C28; Tue, 23 Dec 2014 15:46:06 +0000 (UTC) Received: from mho-01-ewr.mailhop.org (mho-03-ewr.mailhop.org [204.13.248.66]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D37A06419A; Tue, 23 Dec 2014 15:46:05 +0000 (UTC) Received: from [73.34.117.227] (helo=ilsoft.org) by mho-01-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1Y3Reo-000JyQ-LE; Tue, 23 Dec 2014 15:45:58 +0000 Received: from revolution.hippie.lan (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id sBNFjvNk003624; Tue, 23 Dec 2014 08:45:57 -0700 (MST) (envelope-from ian@freebsd.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 73.34.117.227 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX194UtLjfix6NJodtxPpM7fF Message-ID: <1419349557.1018.134.camel@freebsd.org> Subject: Re: svn commit: r276142 - in head/sys: amd64/amd64 cddl/dev/dtrace/amd64 cddl/dev/dtrace/i386 cddl/dev/dtrace/mips cddl/dev/dtrace/powerpc i386/i386 mips/mips powerpc/aim sys From: Ian Lepore To: Mark Johnston Date: Tue, 23 Dec 2014 08:45:57 -0700 In-Reply-To: <201412231538.sBNFcKrx091251@svn.freebsd.org> References: <201412231538.sBNFcKrx091251@svn.freebsd.org> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.12.8 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2014 15:46:06 -0000 On Tue, 2014-12-23 at 15:38 +0000, Mark Johnston wrote: > Author: markj > Date: Tue Dec 23 15:38:19 2014 > New Revision: 276142 > URL: https://svnweb.freebsd.org/changeset/base/276142 > > Log: > Restore the trap type argument to the DTrace trap hook, removed in r268600. > It's redundant at the moment since it can be obtained from the trapframe > on the architectures where DTrace is supported, but this won't be the case > with ARM. > > Modified: > head/sys/amd64/amd64/trap.c > head/sys/cddl/dev/dtrace/amd64/dtrace_subr.c > head/sys/cddl/dev/dtrace/i386/dtrace_subr.c > head/sys/cddl/dev/dtrace/mips/dtrace_subr.c > head/sys/cddl/dev/dtrace/powerpc/dtrace_subr.c > head/sys/i386/i386/trap.c > head/sys/mips/mips/trap.c > head/sys/powerpc/aim/trap.c > head/sys/sys/dtrace_bsd.h > Wouldn't it have been easier to just add the field to the trapframe for arm? iirc we have an unused padding field in the struct already just for ABI alignment, it could go there. -- Ian From owner-svn-src-all@FreeBSD.ORG Tue Dec 23 15:58:46 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ABE2B99; Tue, 23 Dec 2014 15:58:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 979FA64B00; Tue, 23 Dec 2014 15:58:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBNFwkN4001056; Tue, 23 Dec 2014 15:58:46 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBNFwkMZ001054; Tue, 23 Dec 2014 15:58:46 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201412231558.sBNFwkMZ001054@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 23 Dec 2014 15:58:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276146 - in head/sys/boot/amd64: boot1.efi efi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2014 15:58:46 -0000 Author: emaste Date: Tue Dec 23 15:58:45 2014 New Revision: 276146 URL: https://svnweb.freebsd.org/changeset/base/276146 Log: Use explicit --output-target to set EFI file format According to objcopy(1) --target is for use where the input and output formats are the same ("no translation"). In practice it does detect the input format in any case, but be explicit that we're specifying the output format as we are translating from ELF to EFI PE format. Sponsored by: The FreeBSD Foundation Modified: head/sys/boot/amd64/boot1.efi/Makefile head/sys/boot/amd64/efi/Makefile Modified: head/sys/boot/amd64/boot1.efi/Makefile ============================================================================== --- head/sys/boot/amd64/boot1.efi/Makefile Tue Dec 23 15:42:34 2014 (r276145) +++ head/sys/boot/amd64/boot1.efi/Makefile Tue Dec 23 15:58:45 2014 (r276146) @@ -51,7 +51,7 @@ boot1.efi: loader.sym ${OBJCOPY} -j .text -j .sdata -j .data \ -j .dynamic -j .dynsym -j .rel.dyn \ -j .rela.dyn -j .reloc -j .eh_frame -j set_Xcommand_set \ - --target=${EFI_TARGET} ${.ALLSRC} ${.TARGET} + --output-target=${EFI_TARGET} ${.ALLSRC} ${.TARGET} CFLAGS+= -I${.CURDIR}/../../common Modified: head/sys/boot/amd64/efi/Makefile ============================================================================== --- head/sys/boot/amd64/efi/Makefile Tue Dec 23 15:42:34 2014 (r276145) +++ head/sys/boot/amd64/efi/Makefile Tue Dec 23 15:58:45 2014 (r276146) @@ -81,7 +81,7 @@ loader.efi: loader.sym ${OBJCOPY} -j .text -j .sdata -j .data \ -j .dynamic -j .dynsym -j .rel.dyn \ -j .rela.dyn -j .reloc -j .eh_frame -j set_Xcommand_set \ - --target=${EFI_TARGET} ${.ALLSRC} ${.TARGET} + --output-target=${EFI_TARGET} ${.ALLSRC} ${.TARGET} LIBEFI= ${.OBJDIR}/../../efi/libefi/libefi.a CFLAGS+= -I${.CURDIR}/../../common From owner-svn-src-all@FreeBSD.ORG Tue Dec 23 16:00:26 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8D0D420F; Tue, 23 Dec 2014 16:00:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7915164BFD; Tue, 23 Dec 2014 16:00:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBNG0Q1I003788; Tue, 23 Dec 2014 16:00:26 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBNG0QSW003787; Tue, 23 Dec 2014 16:00:26 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201412231600.sBNG0QSW003787@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 23 Dec 2014 16:00:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276147 - head/sys/boot/amd64/boot1.efi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2014 16:00:26 -0000 Author: emaste Date: Tue Dec 23 16:00:25 2014 New Revision: 276147 URL: https://svnweb.freebsd.org/changeset/base/276147 Log: Update comment: only one file in the FAT file system EFI boot image Sponsored by: The FreeBSD Foundation Modified: head/sys/boot/amd64/boot1.efi/generate-fat.sh Modified: head/sys/boot/amd64/boot1.efi/generate-fat.sh ============================================================================== --- head/sys/boot/amd64/boot1.efi/generate-fat.sh Tue Dec 23 15:58:45 2014 (r276146) +++ head/sys/boot/amd64/boot1.efi/generate-fat.sh Tue Dec 23 16:00:25 2014 (r276147) @@ -34,10 +34,10 @@ umount stub mdconfig -d -u $DEVICE rmdir stub -# Locate the offsets of the two fake files +# Locate the offset of the fake file BOOT1_OFFSET=$(hd $OUTPUT_FILE | grep 'Boot1 START' | cut -f 1 -d ' ') -# Convert to numbers of blocks +# Convert to number of blocks BOOT1_OFFSET=$(echo 0x$BOOT1_OFFSET | awk '{printf("%x\n",$1/512);}') echo '# This file autogenerated by generate-fat.sh - DO NOT EDIT' > Makefile.fat From owner-svn-src-all@FreeBSD.ORG Tue Dec 23 16:06:27 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C87ED49B; Tue, 23 Dec 2014 16:06:27 +0000 (UTC) Received: from mail-ie0-x229.google.com (mail-ie0-x229.google.com [IPv6:2607:f8b0:4001:c03::229]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8A4EE64D13; Tue, 23 Dec 2014 16:06:27 +0000 (UTC) Received: by mail-ie0-f169.google.com with SMTP id y20so6296532ier.28; Tue, 23 Dec 2014 08:06:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=AaB8XjV16J9b+jG9w3s0gNrtNRFhFISCTez//B1mwwE=; b=iraSceAGaFBUTxLKmZLDSkvk44/1UpVZMVWvSTkaEhy7REW5hexMYbq4CisqTH3ss7 eOglirTFXey59netV4/qBlM5IhR6dwE87SD6QPc+dzX4HPlh/yapCDlOZEd5bbMEgLbV VSzIlRMXKKsRFhZTB6+zQjZgYkrQyuiSPUTMP+vDI4wLgTrfVeqAOZYa57Uts0aJLvsq Q/BaOB3EXc6wQ4LXvStelANcsyOxmpyxKcyAaS/T5CC8/PUDoM7KsRkpESDwtk5kYFWk gp0hQyZgzjpbZumrWA2U2KXkFnhvgyOJ2+IgiKuW8ekQWtXg0L9cWfkwS2HvbsU1NEa+ Oh8w== X-Received: by 10.107.5.7 with SMTP id 7mr26369996iof.1.1419350786794; Tue, 23 Dec 2014 08:06:26 -0800 (PST) Received: from charmander.home (TOROON0812W-LP130-04-1279423115.dsl.bell.ca. [76.66.114.139]) by mx.google.com with ESMTPSA id kv4sm6471196igb.13.2014.12.23.08.06.25 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Dec 2014 08:06:25 -0800 (PST) Sender: Mark Johnston Date: Tue, 23 Dec 2014 08:05:47 -0800 From: Mark Johnston To: Ian Lepore Subject: Re: svn commit: r276142 - in head/sys: amd64/amd64 cddl/dev/dtrace/amd64 cddl/dev/dtrace/i386 cddl/dev/dtrace/mips cddl/dev/dtrace/powerpc i386/i386 mips/mips powerpc/aim sys Message-ID: <20141223160423.GA24447@charmander.home> References: <201412231538.sBNFcKrx091251@svn.freebsd.org> <1419349557.1018.134.camel@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1419349557.1018.134.camel@freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2014 16:06:27 -0000 On Tue, Dec 23, 2014 at 08:45:57AM -0700, Ian Lepore wrote: > On Tue, 2014-12-23 at 15:38 +0000, Mark Johnston wrote: > > Author: markj > > Date: Tue Dec 23 15:38:19 2014 > > New Revision: 276142 > > URL: https://svnweb.freebsd.org/changeset/base/276142 > > > > Log: > > Restore the trap type argument to the DTrace trap hook, removed in r268600. > > It's redundant at the moment since it can be obtained from the trapframe > > on the architectures where DTrace is supported, but this won't be the case > > with ARM. > > > > Modified: > > head/sys/amd64/amd64/trap.c > > head/sys/cddl/dev/dtrace/amd64/dtrace_subr.c > > head/sys/cddl/dev/dtrace/i386/dtrace_subr.c > > head/sys/cddl/dev/dtrace/mips/dtrace_subr.c > > head/sys/cddl/dev/dtrace/powerpc/dtrace_subr.c > > head/sys/i386/i386/trap.c > > head/sys/mips/mips/trap.c > > head/sys/powerpc/aim/trap.c > > head/sys/sys/dtrace_bsd.h > > > > Wouldn't it have been easier to just add the field to the trapframe for > arm? iirc we have an unused padding field in the struct already just > for ABI alignment, it could go there. In this case, the extra argument will be the fault address AND'ed with FAULT_TYPE_MASK, and the hook is only potentially called in the data abort handler, so this extra field would be unused for other exceptions (and unused for data aborts unless DTrace is active). Maybe that's ok, but restoring the extra hook argument seemed like a less intrusive way to go to me. -Mark From owner-svn-src-all@FreeBSD.ORG Tue Dec 23 16:17:39 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C5A6B786; Tue, 23 Dec 2014 16:17:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A632264E7F; Tue, 23 Dec 2014 16:17:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBNGHdpc010373; Tue, 23 Dec 2014 16:17:39 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBNGHcfe010367; Tue, 23 Dec 2014 16:17:38 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201412231617.sBNGHcfe010367@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Tue, 23 Dec 2014 16:17:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276148 - in head: . sys/net sys/netinet sys/netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2014 16:17:39 -0000 Author: ae Date: Tue Dec 23 16:17:37 2014 New Revision: 276148 URL: https://svnweb.freebsd.org/changeset/base/276148 Log: Remove in_gif.h and in6_gif.h files. They only contain function declarations used by gif(4). Instead declare these functions in C files. Also make some variables static. Deleted: head/sys/netinet/in_gif.h head/sys/netinet6/in6_gif.h Modified: head/ObsoleteFiles.inc head/sys/net/if_gif.c head/sys/netinet/in_gif.c head/sys/netinet6/in6_gif.c Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Tue Dec 23 16:00:25 2014 (r276147) +++ head/ObsoleteFiles.inc Tue Dec 23 16:17:37 2014 (r276148) @@ -38,6 +38,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20141223: remove in6_gif.h and in_gif.h +OLD_FILES+=usr/include/netinet/in_gif.h +OLD_FILES+=usr/include/netinet6/in6_gif.h # 20141202: update to mandoc CVS 20141201 OLD_FILES+=usr.bin/preconv OLD_FILES+=share/man/man1/preconv.1.gz Modified: head/sys/net/if_gif.c ============================================================================== --- head/sys/net/if_gif.c Tue Dec 23 16:00:25 2014 (r276147) +++ head/sys/net/if_gif.c Tue Dec 23 16:17:37 2014 (r276148) @@ -72,7 +72,6 @@ __FBSDID("$FreeBSD$"); #include #ifdef INET #include -#include #include #endif /* INET */ @@ -85,7 +84,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #endif /* INET6 */ @@ -120,6 +118,16 @@ void (*ng_gif_input_orphan_p)(struct ifn void (*ng_gif_attach_p)(struct ifnet *ifp); void (*ng_gif_detach_p)(struct ifnet *ifp); +#ifdef INET +extern int in_gif_output(struct ifnet *, struct mbuf *, int, uint8_t); +extern int in_gif_encapcheck(const struct mbuf *, int, int, void *); +extern int in_gif_attach(struct gif_softc *); +#endif +#ifdef INET6 +extern int in6_gif_output(struct ifnet *, struct mbuf *, int, uint8_t); +extern int in6_gif_encapcheck(const struct mbuf *, int, int, void *); +extern int in6_gif_attach(struct gif_softc *); +#endif static int gif_set_tunnel(struct ifnet *, struct sockaddr *, struct sockaddr *); static void gif_delete_tunnel(struct ifnet *); Modified: head/sys/netinet/in_gif.c ============================================================================== --- head/sys/netinet/in_gif.c Tue Dec 23 16:00:25 2014 (r276147) +++ head/sys/netinet/in_gif.c Tue Dec 23 16:17:37 2014 (r276148) @@ -57,7 +57,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -68,11 +67,16 @@ __FBSDID("$FreeBSD$"); #include +int in_gif_output(struct ifnet *, struct mbuf *, int, uint8_t); +int in_gif_encapcheck(const struct mbuf *, int, int, void *); +int in_gif_attach(struct gif_softc *); + static int gif_validate4(const struct ip *, struct gif_softc *, struct ifnet *); +static int in_gif_input(struct mbuf **, int *, int); extern struct domain inetdomain; -struct protosw in_gif_protosw = { +static struct protosw in_gif_protosw = { .pr_type = SOCK_RAW, .pr_domain = &inetdomain, .pr_protocol = 0/* IPPROTO_IPV[46] */, @@ -83,7 +87,8 @@ struct protosw in_gif_protosw = { .pr_usrreqs = &rip_usrreqs }; -VNET_DEFINE(int, ip_gif_ttl) = GIF_TTL; +#define GIF_TTL 30 +static VNET_DEFINE(int, ip_gif_ttl) = GIF_TTL; #define V_ip_gif_ttl VNET(ip_gif_ttl) SYSCTL_INT(_net_inet_ip, IPCTL_GIF_TTL, gifttl, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ip_gif_ttl), 0, ""); @@ -133,7 +138,7 @@ in_gif_output(struct ifnet *ifp, struct return (ip_output(m, NULL, NULL, 0, NULL, NULL)); } -int +static int in_gif_input(struct mbuf **mp, int *offp, int proto) { struct mbuf *m = *mp; Modified: head/sys/netinet6/in6_gif.c ============================================================================== --- head/sys/netinet6/in6_gif.c Tue Dec 23 16:00:25 2014 (r276147) +++ head/sys/netinet6/in6_gif.c Tue Dec 23 16:17:37 2014 (r276148) @@ -64,7 +64,6 @@ __FBSDID("$FreeBSD$"); #ifdef INET6 #include #include -#include #include #endif #include @@ -74,18 +73,24 @@ __FBSDID("$FreeBSD$"); #include -VNET_DEFINE(int, ip6_gif_hlim) = GIF_HLIM; +#define GIF_HLIM 30 +static VNET_DEFINE(int, ip6_gif_hlim) = GIF_HLIM; #define V_ip6_gif_hlim VNET(ip6_gif_hlim) SYSCTL_DECL(_net_inet6_ip6); SYSCTL_INT(_net_inet6_ip6, IPV6CTL_GIF_HLIM, gifhlim, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ip6_gif_hlim), 0, ""); +int in6_gif_output(struct ifnet *, struct mbuf *, int, uint8_t); +int in6_gif_encapcheck(const struct mbuf *, int, int, void *); +int in6_gif_attach(struct gif_softc *); + static int gif_validate6(const struct ip6_hdr *, struct gif_softc *, struct ifnet *); +static int in6_gif_input(struct mbuf **, int *, int); extern struct domain inet6domain; -struct protosw in6_gif_protosw = { +static struct protosw in6_gif_protosw = { .pr_type = SOCK_RAW, .pr_domain = &inet6domain, .pr_protocol = 0, /* IPPROTO_IPV[46] */ @@ -144,7 +149,7 @@ in6_gif_output(struct ifnet *ifp, struct return (ip6_output(m, 0, NULL, IPV6_MINMTU, 0, NULL, NULL)); } -int +static int in6_gif_input(struct mbuf **mp, int *offp, int proto) { struct mbuf *m = *mp; From owner-svn-src-all@FreeBSD.ORG Tue Dec 23 16:33:46 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 69093BDF; Tue, 23 Dec 2014 16:33:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 526D11125; Tue, 23 Dec 2014 16:33:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBNGXk5N019172; Tue, 23 Dec 2014 16:33:46 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBNGXjER019167; Tue, 23 Dec 2014 16:33:45 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201412231633.sBNGXjER019167@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Tue, 23 Dec 2014 16:33:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276149 - in stable/10: share/man/man4 sys/conf sys/net sys/netinet sys/netinet6 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2014 16:33:46 -0000 Author: ae Date: Tue Dec 23 16:33:44 2014 New Revision: 276149 URL: https://svnweb.freebsd.org/changeset/base/276149 Log: MFC r273087 (with modifications): Overhaul if_gif(4): o convert to if_transmit; o use rmlock to protect access to gif_softc; o use sx lock to protect from concurrent ioctls; o remove a lot of unneeded and duplicated code; o remove cached route support (it won't work with concurrent io); o style fixes. MFC r273090: Move memset under ifdef INET6. MFC r273091: Add more ifdefs. SIOC*_IN6 are defined only with INET6. MFC r273121: Add inet/inet6 to the dependency list. Without them if_gif is useless. MFC r273209 by bz: After r273087,r273090,r273091,r273121 changes to gif(4) try to fix NOIP builds for real. MFC r273587: Remove redundant check and m_pullup() call. Modified: stable/10/share/man/man4/gif.4 stable/10/sys/conf/files stable/10/sys/net/if_gif.c stable/10/sys/net/if_gif.h stable/10/sys/netinet/in_gif.c stable/10/sys/netinet/in_gif.h stable/10/sys/netinet6/in6_gif.c stable/10/sys/netinet6/in6_gif.h Directory Properties: stable/10/ (props changed) stable/10/sys/gnu/dts/ (props changed) Modified: stable/10/share/man/man4/gif.4 ============================================================================== --- stable/10/share/man/man4/gif.4 Tue Dec 23 16:17:37 2014 (r276148) +++ stable/10/share/man/man4/gif.4 Tue Dec 23 16:33:44 2014 (r276149) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 1, 2011 +.Dd October 14, 2014 .Dt GIF 4 .Os .Sh NAME @@ -160,16 +160,6 @@ routed network. It can be turned off by .Dv IFF_LINK2 bit. -.Ss Route caching -Processing each packet requires two route lookups: first on the -packet itself, and second on the tunnel destination. -This second route can be cached, increasing tunnel performance. -However, in a dynamically routed network, the tunnel will stick -to the cached route, ignoring routing table updates. -Route caching can be enabled with the -.Dv IFF_LINK0 -flag. -.\" .Ss Miscellaneous By default, .Nm Modified: stable/10/sys/conf/files ============================================================================== --- stable/10/sys/conf/files Tue Dec 23 16:17:37 2014 (r276148) +++ stable/10/sys/conf/files Tue Dec 23 16:33:44 2014 (r276149) @@ -3175,7 +3175,8 @@ net/if_ethersubr.c optional ether net/if_faith.c optional faith net/if_fddisubr.c optional fddi net/if_fwsubr.c optional fwip -net/if_gif.c optional gif | netgraph_gif +net/if_gif.c optional gif inet | gif inet6 | \ + netgraph_gif inet | netgraph_gif inet6 net/if_gre.c optional gre inet net/if_iso88025subr.c optional token net/if_lagg.c optional lagg @@ -3310,7 +3311,7 @@ netgraph/ng_ether.c optional netgraph_e netgraph/ng_ether_echo.c optional netgraph_ether_echo netgraph/ng_fec.c optional netgraph_fec netgraph/ng_frame_relay.c optional netgraph_frame_relay -netgraph/ng_gif.c optional netgraph_gif +netgraph/ng_gif.c optional netgraph_gif inet6 | netgraph_gif inet netgraph/ng_gif_demux.c optional netgraph_gif_demux netgraph/ng_hole.c optional netgraph_hole netgraph/ng_iface.c optional netgraph_iface Modified: stable/10/sys/net/if_gif.c ============================================================================== --- stable/10/sys/net/if_gif.c Tue Dec 23 16:17:37 2014 (r276148) +++ stable/10/sys/net/if_gif.c Tue Dec 23 16:33:44 2014 (r276149) @@ -1,6 +1,3 @@ -/* $FreeBSD$ */ -/* $KAME: if_gif.c,v 1.87 2001/10/19 08:50:27 itojun Exp $ */ - /*- * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. * All rights reserved. @@ -28,8 +25,13 @@ * 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. + * + * $KAME: if_gif.c,v 1.87 2001/10/19 08:50:27 itojun Exp $ */ +#include +__FBSDID("$FreeBSD$"); + #include "opt_inet.h" #include "opt_inet6.h" @@ -37,11 +39,14 @@ #include #include #include +#include #include #include #include +#include #include #include +#include #include #include #include @@ -53,6 +58,7 @@ #include #include +#include #include #include #include @@ -63,6 +69,7 @@ #include #include #include +#include #ifdef INET #include #include @@ -75,6 +82,7 @@ #endif #include #include +#include #include #include #include @@ -98,6 +106,8 @@ static VNET_DEFINE(struct mtx, gif_mtx); static MALLOC_DEFINE(M_GIF, "gif", "Generic Tunnel Interface"); static VNET_DEFINE(LIST_HEAD(, gif_softc), gif_softc_list); #define V_gif_softc_list VNET(gif_softc_list) +static struct sx gif_ioctl_sx; +SX_SYSINIT(gif_ioctl_sx, &gif_ioctl_sx, "gif_ioctl"); #define GIF_LIST_LOCK_INIT(x) mtx_init(&V_gif_mtx, "gif_mtx", \ NULL, MTX_DEF) @@ -110,7 +120,12 @@ void (*ng_gif_input_orphan_p)(struct ifn void (*ng_gif_attach_p)(struct ifnet *ifp); void (*ng_gif_detach_p)(struct ifnet *ifp); -static void gif_start(struct ifnet *); +static int gif_set_tunnel(struct ifnet *, struct sockaddr *, + struct sockaddr *); +static void gif_delete_tunnel(struct ifnet *); +static int gif_ioctl(struct ifnet *, u_long, caddr_t); +static int gif_transmit(struct ifnet *, struct mbuf *); +static void gif_qflush(struct ifnet *); static int gif_clone_create(struct if_clone *, int, caddr_t); static void gif_clone_destroy(struct ifnet *); static VNET_DEFINE(struct if_clone *, gif_cloner); @@ -167,19 +182,10 @@ gif_clone_create(struct if_clone *ifc, i sc = malloc(sizeof(struct gif_softc), M_GIF, M_WAITOK | M_ZERO); sc->gif_fibnum = curthread->td_proc->p_fibnum; GIF2IFP(sc) = if_alloc(IFT_GIF); - if (GIF2IFP(sc) == NULL) { - free(sc, M_GIF); - return (ENOSPC); - } - GIF_LOCK_INIT(sc); - GIF2IFP(sc)->if_softc = sc; if_initname(GIF2IFP(sc), gifname, unit); - sc->encap_cookie4 = sc->encap_cookie6 = NULL; - sc->gif_options = 0; - GIF2IFP(sc)->if_addrlen = 0; GIF2IFP(sc)->if_mtu = GIF_MTU; GIF2IFP(sc)->if_flags = IFF_POINTOPOINT | IFF_MULTICAST; @@ -188,9 +194,9 @@ gif_clone_create(struct if_clone *ifc, i GIF2IFP(sc)->if_flags |= IFF_LINK2; #endif GIF2IFP(sc)->if_ioctl = gif_ioctl; - GIF2IFP(sc)->if_start = gif_start; + GIF2IFP(sc)->if_transmit = gif_transmit; + GIF2IFP(sc)->if_qflush = gif_qflush; GIF2IFP(sc)->if_output = gif_output; - GIF2IFP(sc)->if_snd.ifq_maxlen = ifqmaxlen; if_attach(GIF2IFP(sc)); bpfattach(GIF2IFP(sc), DLT_NULL, sizeof(u_int32_t)); if (ng_gif_attach_p != NULL) @@ -199,44 +205,29 @@ gif_clone_create(struct if_clone *ifc, i GIF_LIST_LOCK(); LIST_INSERT_HEAD(&V_gif_softc_list, sc, gif_list); GIF_LIST_UNLOCK(); - return (0); } static void gif_clone_destroy(struct ifnet *ifp) { -#if defined(INET) || defined(INET6) - int err; -#endif - struct gif_softc *sc = ifp->if_softc; + struct gif_softc *sc; + sx_xlock(&gif_ioctl_sx); + sc = ifp->if_softc; + gif_delete_tunnel(ifp); GIF_LIST_LOCK(); LIST_REMOVE(sc, gif_list); GIF_LIST_UNLOCK(); - - gif_delete_tunnel(ifp); -#ifdef INET6 - if (sc->encap_cookie6 != NULL) { - err = encap_detach(sc->encap_cookie6); - KASSERT(err == 0, ("Unexpected error detaching encap_cookie6")); - } -#endif -#ifdef INET - if (sc->encap_cookie4 != NULL) { - err = encap_detach(sc->encap_cookie4); - KASSERT(err == 0, ("Unexpected error detaching encap_cookie4")); - } -#endif - if (ng_gif_detach_p != NULL) (*ng_gif_detach_p)(ifp); bpfdetach(ifp); if_detach(ifp); - if_free(ifp); + ifp->if_softc = NULL; + sx_xunlock(&gif_ioctl_sx); + if_free(ifp); GIF_LOCK_DESTROY(sc); - free(sc, M_GIF); } @@ -288,162 +279,191 @@ MODULE_VERSION(if_gif, 1); int gif_encapcheck(const struct mbuf *m, int off, int proto, void *arg) { - struct ip ip; + GIF_RLOCK_TRACKER; struct gif_softc *sc; + int ret; + uint8_t ver; sc = (struct gif_softc *)arg; - if (sc == NULL) - return 0; + if (sc == NULL || (GIF2IFP(sc)->if_flags & IFF_UP) == 0) + return (0); - if ((GIF2IFP(sc)->if_flags & IFF_UP) == 0) - return 0; + ret = 0; + GIF_RLOCK(sc); /* no physical address */ - if (!sc->gif_psrc || !sc->gif_pdst) - return 0; + if (sc->gif_family == 0) + goto done; switch (proto) { #ifdef INET case IPPROTO_IPV4: - break; #endif #ifdef INET6 case IPPROTO_IPV6: - break; #endif case IPPROTO_ETHERIP: break; - default: - return 0; + goto done; } /* Bail on short packets */ - if (m->m_pkthdr.len < sizeof(ip)) - return 0; - - m_copydata(m, 0, sizeof(ip), (caddr_t)&ip); + if (m->m_pkthdr.len < sizeof(struct ip)) + goto done; - switch (ip.ip_v) { + m_copydata(m, 0, 1, &ver); + switch (ver >> 4) { #ifdef INET case 4: - if (sc->gif_psrc->sa_family != AF_INET || - sc->gif_pdst->sa_family != AF_INET) - return 0; - return gif_encapcheck4(m, off, proto, arg); + if (sc->gif_family != AF_INET) + goto done; + ret = in_gif_encapcheck(m, off, proto, arg); + break; #endif #ifdef INET6 case 6: if (m->m_pkthdr.len < sizeof(struct ip6_hdr)) - return 0; - if (sc->gif_psrc->sa_family != AF_INET6 || - sc->gif_pdst->sa_family != AF_INET6) - return 0; - return gif_encapcheck6(m, off, proto, arg); + goto done; + if (sc->gif_family != AF_INET6) + goto done; + ret = in6_gif_encapcheck(m, off, proto, arg); + break; #endif - default: - return 0; } +done: + GIF_RUNLOCK(sc); + return (ret); } + +static int +gif_transmit(struct ifnet *ifp, struct mbuf *m) +{ + struct gif_softc *sc; + struct etherip_header *eth; #ifdef INET -#define GIF_HDR_LEN (ETHER_HDR_LEN + sizeof (struct ip)) + struct ip *ip; #endif #ifdef INET6 -#define GIF_HDR_LEN6 (ETHER_HDR_LEN + sizeof (struct ip6_hdr)) + struct ip6_hdr *ip6; + uint32_t t; #endif - -static void -gif_start(struct ifnet *ifp) -{ - struct gif_softc *sc; - struct mbuf *m; uint32_t af; - int error = 0; + uint8_t proto, ecn; + int error; + error = ENETDOWN; sc = ifp->if_softc; - GIF_LOCK(sc); - ifp->if_drv_flags |= IFF_DRV_OACTIVE; - while (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) { - - IFQ_DRV_DEQUEUE(&ifp->if_snd, m); - if (m == 0) - break; - -#ifdef ALTQ - /* Take out those altq bytes we add in gif_output */ + if (sc->gif_family == 0) { + m_freem(m); + goto err; + } + /* Now pull back the af that we stashed in the csum_data. */ + af = m->m_pkthdr.csum_data; + BPF_MTAP2(ifp, &af, sizeof(af), m); + if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1); + if_inc_counter(ifp, IFCOUNTER_OBYTES, m->m_pkthdr.len); + M_SETFIB(m, sc->gif_fibnum); + /* inner AF-specific encapsulation */ + ecn = 0; + switch (af) { #ifdef INET - if (sc->gif_psrc->sa_family == AF_INET) - m->m_pkthdr.len -= GIF_HDR_LEN; + case AF_INET: + proto = IPPROTO_IPV4; + if (m->m_len < sizeof(struct ip)) + m = m_pullup(m, sizeof(struct ip)); + if (m == NULL) { + error = ENOBUFS; + goto err; + } + ip = mtod(m, struct ip *); + ip_ecn_ingress((ifp->if_flags & IFF_LINK1) ? ECN_ALLOWED: + ECN_NOCARE, &ecn, &ip->ip_tos); + break; #endif #ifdef INET6 - if (sc->gif_psrc->sa_family == AF_INET6) - m->m_pkthdr.len -= GIF_HDR_LEN6; -#endif + case AF_INET6: + proto = IPPROTO_IPV6; + if (m->m_len < sizeof(struct ip6_hdr)) + m = m_pullup(m, sizeof(struct ip6_hdr)); + if (m == NULL) { + error = ENOBUFS; + goto err; + } + t = 0; + ip6 = mtod(m, struct ip6_hdr *); + ip6_ecn_ingress((ifp->if_flags & IFF_LINK1) ? ECN_ALLOWED: + ECN_NOCARE, &t, &ip6->ip6_flow); + ecn = (ntohl(t) >> 20) & 0xff; + break; #endif - /* - * Now pull back the af that we - * stashed in the csum_data. - */ - af = m->m_pkthdr.csum_data; - - /* override to IPPROTO_ETHERIP for bridged traffic */ - if (ifp->if_bridge) - af = AF_LINK; - - BPF_MTAP2(ifp, &af, sizeof(af), m); - ifp->if_opackets++; - -/* Done by IFQ_HANDOFF */ -/* ifp->if_obytes += m->m_pkthdr.len;*/ - - M_SETFIB(m, sc->gif_fibnum); - /* inner AF-specific encapsulation */ - /* XXX should we check if our outer source is legal? */ - /* dispatch to output logic based on outer AF */ - switch (sc->gif_psrc->sa_family) { + case AF_LINK: + proto = IPPROTO_ETHERIP; + M_PREPEND(m, sizeof(struct etherip_header), M_NOWAIT); + if (m == NULL) { + error = ENOBUFS; + goto err; + } + eth = mtod(m, struct etherip_header *); + eth->eip_resvh = 0; + if ((sc->gif_options & GIF_SEND_REVETHIP) != 0) { + eth->eip_ver = 0; + eth->eip_resvl = ETHERIP_VERSION; + } else { + eth->eip_ver = ETHERIP_VERSION; + eth->eip_resvl = 0; + } + break; + default: + error = EAFNOSUPPORT; + m_freem(m); + goto err; + } + /* XXX should we check if our outer source is legal? */ + /* dispatch to output logic based on outer AF */ + switch (sc->gif_family) { #ifdef INET - case AF_INET: - error = in_gif_output(ifp, af, m); - break; + case AF_INET: + error = in_gif_output(ifp, m, proto, ecn); + break; #endif #ifdef INET6 - case AF_INET6: - error = in6_gif_output(ifp, af, m); - break; + case AF_INET6: + error = in6_gif_output(ifp, m, proto, ecn); + break; #endif - default: - m_freem(m); - error = ENETDOWN; - } - if (error) - ifp->if_oerrors++; - + default: + m_freem(m); } - ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; - GIF_UNLOCK(sc); - return; +err: + if (error) + if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); + return (error); +} + +static void +gif_qflush(struct ifnet *ifp __unused) +{ + } int gif_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst, struct route *ro) { - struct gif_softc *sc = ifp->if_softc; struct m_tag *mtag; - int error = 0; - int gif_called; uint32_t af; + int gif_called; + int error = 0; #ifdef MAC error = mac_ifnet_check_transmit(ifp, m); - if (error) { - m_freem(m); - goto end; - } + if (error) + goto err; #endif - if ((ifp->if_flags & IFF_MONITOR) != 0) { + if ((ifp->if_flags & IFF_MONITOR) != 0 || + (ifp->if_flags & IFF_UP) == 0) { error = ENETDOWN; - m_freem(m); - goto end; + goto err; } /* @@ -460,9 +480,8 @@ gif_output(struct ifnet *ifp, struct mbu log(LOG_NOTICE, "gif_output: loop detected on %s\n", (*(struct ifnet **)(mtag + 1))->if_xname); - m_freem(m); error = EIO; /* is there better errno? */ - goto end; + goto err; } mtag = m_tag_locate(m, MTAG_GIF, MTAG_GIF_CALLED, mtag); gif_called++; @@ -471,73 +490,54 @@ gif_output(struct ifnet *ifp, struct mbu log(LOG_NOTICE, "gif_output: recursively called too many times(%d)\n", gif_called); - m_freem(m); error = EIO; /* is there better errno? */ - goto end; + goto err; } mtag = m_tag_alloc(MTAG_GIF, MTAG_GIF_CALLED, sizeof(struct ifnet *), M_NOWAIT); if (mtag == NULL) { - m_freem(m); error = ENOMEM; - goto end; + goto err; } *(struct ifnet **)(mtag + 1) = ifp; m_tag_prepend(m, mtag); m->m_flags &= ~(M_BCAST|M_MCAST); - /* BPF writes need to be handled specially. */ if (dst->sa_family == AF_UNSPEC) bcopy(dst->sa_data, &af, sizeof(af)); else af = dst->sa_family; - /* - * Now save the af in the inbound pkt csum - * data, this is a cheat since we are using - * the inbound csum_data field to carry the - * af over to the gif_start() routine, avoiding - * using yet another mtag. - */ - m->m_pkthdr.csum_data = af; - if (!(ifp->if_flags & IFF_UP) || - sc->gif_psrc == NULL || sc->gif_pdst == NULL) { - m_freem(m); - error = ENETDOWN; - goto end; - } -#ifdef ALTQ + if (ifp->if_bridge) + af = AF_LINK; /* - * Make altq aware of the bytes we will add - * when we actually send it. + * Now save the af in the inbound pkt csum data, this is a cheat since + * we are using the inbound csum_data field to carry the af over to + * the gif_transmit() routine, avoiding using yet another mtag. */ -#ifdef INET - if (sc->gif_psrc->sa_family == AF_INET) - m->m_pkthdr.len += GIF_HDR_LEN; -#endif -#ifdef INET6 - if (sc->gif_psrc->sa_family == AF_INET6) - m->m_pkthdr.len += GIF_HDR_LEN6; -#endif -#endif - /* - * Queue message on interface, update output statistics if - * successful, and start output if interface not yet active. - */ - IFQ_HANDOFF(ifp, m, error); - end: - if (error) - ifp->if_oerrors++; + m->m_pkthdr.csum_data = af; + return (ifp->if_transmit(ifp, m)); +err: + if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); + m_freem(m); return (error); } void -gif_input(struct mbuf *m, int af, struct ifnet *ifp) +gif_input(struct mbuf *m, struct ifnet *ifp, int proto, uint8_t ecn) { - int isr, n; - struct gif_softc *sc; struct etherip_header *eip; +#ifdef INET + struct ip *ip; +#endif +#ifdef INET6 + struct ip6_hdr *ip6; + uint32_t t; +#endif + struct gif_softc *sc; struct ether_header *eh; struct ifnet *oldifp; + uint32_t gif_options; + int isr, n, af; if (ifp == NULL) { /* just in case */ @@ -545,21 +545,61 @@ gif_input(struct mbuf *m, int af, struct return; } sc = ifp->if_softc; + gif_options = sc->gif_options; m->m_pkthdr.rcvif = ifp; m_clrprotoflags(m); + switch (proto) { +#ifdef INET + case IPPROTO_IPV4: + af = AF_INET; + if (m->m_len < sizeof(struct ip)) + m = m_pullup(m, sizeof(struct ip)); + if (m == NULL) + goto drop; + ip = mtod(m, struct ip *); + if (ip_ecn_egress((ifp->if_flags & IFF_LINK1) ? ECN_ALLOWED: + ECN_NOCARE, &ecn, &ip->ip_tos) == 0) { + m_freem(m); + goto drop; + } + break; +#endif +#ifdef INET6 + case IPPROTO_IPV6: + af = AF_INET6; + if (m->m_len < sizeof(struct ip6_hdr)) + m = m_pullup(m, sizeof(struct ip6_hdr)); + if (m == NULL) + goto drop; + t = htonl((uint32_t)ecn << 20); + ip6 = mtod(m, struct ip6_hdr *); + if (ip6_ecn_egress((ifp->if_flags & IFF_LINK1) ? ECN_ALLOWED: + ECN_NOCARE, &t, &ip6->ip6_flow) == 0) { + m_freem(m); + goto drop; + } + break; +#endif + case IPPROTO_ETHERIP: + af = AF_LINK; + break; + default: + m_freem(m); + goto drop; + } #ifdef MAC mac_ifnet_create_mbuf(ifp, m); #endif if (bpf_peers_present(ifp->if_bpf)) { - u_int32_t af1 = af; + uint32_t af1 = af; bpf_mtap2(ifp->if_bpf, &af1, sizeof(af1), m); } if ((ifp->if_flags & IFF_MONITOR) != 0) { - ifp->if_ipackets++; - ifp->if_ibytes += m->m_pkthdr.len; + if_inc_counter(ifp, IFCOUNTER_IPACKETS, 1); + if_inc_counter(ifp, IFCOUNTER_IBYTES, m->m_pkthdr.len); m_freem(m); return; } @@ -567,7 +607,7 @@ gif_input(struct mbuf *m, int af, struct if (ng_gif_input_p != NULL) { (*ng_gif_input_p)(ifp, &m, af); if (m == NULL) - return; + goto drop; } /* @@ -594,33 +634,23 @@ gif_input(struct mbuf *m, int af, struct #endif case AF_LINK: n = sizeof(struct etherip_header) + sizeof(struct ether_header); - if (n > m->m_len) { + if (n > m->m_len) m = m_pullup(m, n); - if (m == NULL) { - ifp->if_ierrors++; - return; - } - } - + if (m == NULL) + goto drop; eip = mtod(m, struct etherip_header *); - /* + /* * GIF_ACCEPT_REVETHIP (enabled by default) intentionally * accepts an EtherIP packet with revered version field in * the header. This is a knob for backward compatibility * with FreeBSD 7.2R or prior. */ - if (sc->gif_options & GIF_ACCEPT_REVETHIP) { - if (eip->eip_resvl != ETHERIP_VERSION - && eip->eip_ver != ETHERIP_VERSION) { + if (eip->eip_ver != ETHERIP_VERSION) { + if ((gif_options & GIF_ACCEPT_REVETHIP) == 0 || + eip->eip_resvl != ETHERIP_VERSION) { /* discard unknown versions */ m_freem(m); - return; - } - } else { - if (eip->eip_ver != ETHERIP_VERSION) { - /* discard unknown versions */ - m_freem(m); - return; + goto drop; } } m_adj(m, sizeof(struct etherip_header)); @@ -636,7 +666,7 @@ gif_input(struct mbuf *m, int af, struct m->m_flags |= M_BCAST; else m->m_flags |= M_MCAST; - ifp->if_imcasts++; + if_inc_counter(ifp, IFCOUNTER_IMCASTS, 1); } BRIDGE_INPUT(ifp, m); @@ -661,53 +691,61 @@ gif_input(struct mbuf *m, int af, struct return; } - ifp->if_ipackets++; - ifp->if_ibytes += m->m_pkthdr.len; + if_inc_counter(ifp, IFCOUNTER_IPACKETS, 1); + if_inc_counter(ifp, IFCOUNTER_IBYTES, m->m_pkthdr.len); M_SETFIB(m, ifp->if_fib); netisr_dispatch(isr, m); + return; +drop: + if_inc_counter(ifp, IFCOUNTER_IERRORS, 1); } /* XXX how should we handle IPv6 scope on SIOC[GS]IFPHYADDR? */ int gif_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) { - struct gif_softc *sc = ifp->if_softc; - struct ifreq *ifr = (struct ifreq*)data; - int error = 0, size; - u_int options; + GIF_RLOCK_TRACKER; + struct ifreq *ifr = (struct ifreq*)data; struct sockaddr *dst, *src; -#ifdef SIOCSIFMTU /* xxx */ - u_long mtu; + struct gif_softc *sc; +#ifdef INET + struct sockaddr_in *sin = NULL; #endif +#ifdef INET6 + struct sockaddr_in6 *sin6 = NULL; +#endif + u_int options; + int error; switch (cmd) { case SIOCSIFADDR: ifp->if_flags |= IFF_UP; - break; - case SIOCADDMULTI: case SIOCDELMULTI: - break; - -#ifdef SIOCSIFMTU /* xxx */ case SIOCGIFMTU: - break; - + case SIOCSIFFLAGS: + return (0); case SIOCSIFMTU: - mtu = ifr->ifr_mtu; - if (mtu < GIF_MTU_MIN || mtu > GIF_MTU_MAX) + if (ifr->ifr_mtu < GIF_MTU_MIN || + ifr->ifr_mtu > GIF_MTU_MAX) return (EINVAL); - ifp->if_mtu = mtu; - break; -#endif /* SIOCSIFMTU */ - -#ifdef INET + else + ifp->if_mtu = ifr->ifr_mtu; + return (0); + } + sx_xlock(&gif_ioctl_sx); + sc = ifp->if_softc; + if (sc == NULL) { + error = ENXIO; + goto bad; + } + error = 0; + switch (cmd) { case SIOCSIFPHYADDR: -#endif #ifdef INET6 case SIOCSIFPHYADDR_IN6: -#endif /* INET6 */ - case SIOCSLIFPHYADDR: +#endif + error = EINVAL; switch (cmd) { #ifdef INET case SIOCSIFPHYADDR: @@ -725,199 +763,172 @@ gif_ioctl(struct ifnet *ifp, u_long cmd, &(((struct in6_aliasreq *)data)->ifra_dstaddr); break; #endif - case SIOCSLIFPHYADDR: - src = (struct sockaddr *) - &(((struct if_laddrreq *)data)->addr); - dst = (struct sockaddr *) - &(((struct if_laddrreq *)data)->dstaddr); - break; default: - return EINVAL; + goto bad; } - /* sa_family must be equal */ - if (src->sa_family != dst->sa_family) - return EINVAL; + if (src->sa_family != dst->sa_family || + src->sa_len != dst->sa_len) + goto bad; /* validate sa_len */ switch (src->sa_family) { #ifdef INET case AF_INET: if (src->sa_len != sizeof(struct sockaddr_in)) - return EINVAL; + goto bad; break; #endif #ifdef INET6 case AF_INET6: if (src->sa_len != sizeof(struct sockaddr_in6)) - return EINVAL; - break; -#endif - default: - return EAFNOSUPPORT; - } - switch (dst->sa_family) { -#ifdef INET - case AF_INET: - if (dst->sa_len != sizeof(struct sockaddr_in)) - return EINVAL; - break; -#endif -#ifdef INET6 - case AF_INET6: - if (dst->sa_len != sizeof(struct sockaddr_in6)) - return EINVAL; + goto bad; break; #endif default: - return EAFNOSUPPORT; + error = EAFNOSUPPORT; + goto bad; } - /* check sa_family looks sane for the cmd */ + error = EAFNOSUPPORT; switch (cmd) { +#ifdef INET case SIOCSIFPHYADDR: if (src->sa_family == AF_INET) break; - return EAFNOSUPPORT; + goto bad; +#endif #ifdef INET6 case SIOCSIFPHYADDR_IN6: if (src->sa_family == AF_INET6) break; - return EAFNOSUPPORT; -#endif /* INET6 */ - case SIOCSLIFPHYADDR: - /* checks done in the above */ - break; + goto bad; +#endif } - - error = gif_set_tunnel(GIF2IFP(sc), src, dst); + error = EADDRNOTAVAIL; + switch (src->sa_family) { +#ifdef INET + case AF_INET: + if (satosin(src)->sin_addr.s_addr == INADDR_ANY || + satosin(dst)->sin_addr.s_addr == INADDR_ANY) + goto bad; + break; +#endif +#ifdef INET6 + case AF_INET6: + if (IN6_IS_ADDR_UNSPECIFIED(&satosin6(src)->sin6_addr) + || + IN6_IS_ADDR_UNSPECIFIED(&satosin6(dst)->sin6_addr)) + goto bad; + /* + * Check validity of the scope zone ID of the + * addresses, and convert it into the kernel + * internal form if necessary. + */ + error = sa6_embedscope(satosin6(src), 0); + if (error != 0) + goto bad; + error = sa6_embedscope(satosin6(dst), 0); + if (error != 0) + goto bad; +#endif + }; + error = gif_set_tunnel(ifp, src, dst); break; - -#ifdef SIOCDIFPHYADDR case SIOCDIFPHYADDR: - gif_delete_tunnel(GIF2IFP(sc)); + gif_delete_tunnel(ifp); break; -#endif - case SIOCGIFPSRCADDR: + case SIOCGIFPDSTADDR: #ifdef INET6 case SIOCGIFPSRCADDR_IN6: -#endif /* INET6 */ - if (sc->gif_psrc == NULL) { + case SIOCGIFPDSTADDR_IN6: +#endif + if (sc->gif_family == 0) { error = EADDRNOTAVAIL; - goto bad; + break; } - src = sc->gif_psrc; + GIF_RLOCK(sc); switch (cmd) { #ifdef INET case SIOCGIFPSRCADDR: - dst = &ifr->ifr_addr; - size = sizeof(ifr->ifr_addr); + case SIOCGIFPDSTADDR: + if (sc->gif_family != AF_INET) { + error = EADDRNOTAVAIL; + break; + } + sin = (struct sockaddr_in *)&ifr->ifr_addr; + memset(sin, 0, sizeof(*sin)); + sin->sin_family = AF_INET; + sin->sin_len = sizeof(*sin); break; -#endif /* INET */ +#endif #ifdef INET6 case SIOCGIFPSRCADDR_IN6: - dst = (struct sockaddr *) + case SIOCGIFPDSTADDR_IN6: + if (sc->gif_family != AF_INET6) { + error = EADDRNOTAVAIL; + break; + } + sin6 = (struct sockaddr_in6 *) &(((struct in6_ifreq *)data)->ifr_addr); - size = sizeof(((struct in6_ifreq *)data)->ifr_addr); + memset(sin6, 0, sizeof(*sin6)); + sin6->sin6_family = AF_INET6; + sin6->sin6_len = sizeof(*sin6); break; -#endif /* INET6 */ +#endif default: *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue Dec 23 18:48:46 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BBDCF16D; Tue, 23 Dec 2014 18:48:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A82D664928; Tue, 23 Dec 2014 18:48:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBNImkv0079606; Tue, 23 Dec 2014 18:48:46 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBNImk61079605; Tue, 23 Dec 2014 18:48:46 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201412231848.sBNImk61079605@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 23 Dec 2014 18:48:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276150 - head/sys/dev/ath X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2014 18:48:46 -0000 Author: adrian Date: Tue Dec 23 18:48:45 2014 New Revision: 276150 URL: https://svnweb.freebsd.org/changeset/base/276150 Log: Bump the valid GPIO range for rfkill up from 8 to 16. AR5416 and later NICs have more than 8 (Well, more than 6) GPIO pins. So to support rfkill on these NICs we need to bump this up or the rfkill GPIO pin may get reset to the wrong value. Noticed by: Anthony Jenkins Modified: head/sys/dev/ath/if_ath_sysctl.c Modified: head/sys/dev/ath/if_ath_sysctl.c ============================================================================== --- head/sys/dev/ath/if_ath_sysctl.c Tue Dec 23 16:33:44 2014 (r276149) +++ head/sys/dev/ath/if_ath_sysctl.c Tue Dec 23 18:48:45 2014 (r276150) @@ -446,7 +446,15 @@ ath_sysctl_rfsilent(SYSCTL_HANDLER_ARGS) return error; if (!ath_hal_setrfsilent(sc->sc_ah, rfsilent)) return EINVAL; - sc->sc_rfsilentpin = rfsilent & 0x1c; + /* + * Earlier chips (< AR5212) have up to 8 GPIO + * pins exposed. + * + * AR5416 and later chips have many more GPIO + * pins (up to 16) so the mask is expanded to + * four bits. + */ + sc->sc_rfsilentpin = rfsilent & 0x3c; sc->sc_rfsilentpol = (rfsilent & 0x2) != 0; return 0; } From owner-svn-src-all@FreeBSD.ORG Tue Dec 23 19:31:57 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 98D26AD0; Tue, 23 Dec 2014 19:31:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8520A19F1; Tue, 23 Dec 2014 19:31:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBNJVv8X001780; Tue, 23 Dec 2014 19:31:57 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBNJVv0j001773; Tue, 23 Dec 2014 19:31:57 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201412231931.sBNJVv0j001773@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Tue, 23 Dec 2014 19:31:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276151 - head/sys/arm/ti X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2014 19:31:57 -0000 Author: loos Date: Tue Dec 23 19:31:56 2014 New Revision: 276151 URL: https://svnweb.freebsd.org/changeset/base/276151 Log: Do not return the total number of available pins but the maximum pin number we can cope. Previously the returned value could prevent access to some of the pins. Modified: head/sys/arm/ti/ti_gpio.c Modified: head/sys/arm/ti/ti_gpio.c ============================================================================== --- head/sys/arm/ti/ti_gpio.c Tue Dec 23 18:48:45 2014 (r276150) +++ head/sys/arm/ti/ti_gpio.c Tue Dec 23 19:31:56 2014 (r276151) @@ -293,19 +293,8 @@ ti_gpio_intr_clr(struct ti_gpio_softc *s static int ti_gpio_pin_max(device_t dev, int *maxpin) { - struct ti_gpio_softc *sc = device_get_softc(dev); - unsigned int i; - unsigned int banks = 0; - - /* Calculate how many valid banks we have and then multiply that by 32 to - * give use the total number of pins. - */ - for (i = 0; i < ti_max_gpio_banks(); i++) { - if (sc->sc_mem_res[i] != NULL) - banks++; - } - *maxpin = (banks * PINS_PER_BANK) - 1; + *maxpin = ti_max_gpio_banks() * PINS_PER_BANK - 1; return (0); } From owner-svn-src-all@FreeBSD.ORG Tue Dec 23 20:55:00 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CE7DCB03; Tue, 23 Dec 2014 20:55:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BADD63111; Tue, 23 Dec 2014 20:55:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBNKt0Kt040081; Tue, 23 Dec 2014 20:55:00 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBNKt0Oa040071; Tue, 23 Dec 2014 20:55:00 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201412232055.sBNKt0Oa040071@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Tue, 23 Dec 2014 20:55:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276152 - in head: . sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2014 20:55:00 -0000 Author: ae Date: Tue Dec 23 20:54:59 2014 New Revision: 276152 URL: https://svnweb.freebsd.org/changeset/base/276152 Log: Remove if_stf.h. It contains only one function declaration used by if_stf(4). Also make in_stf_protosw structure static. Deleted: head/sys/net/if_stf.h Modified: head/ObsoleteFiles.inc head/sys/net/if_stf.c Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Tue Dec 23 19:31:56 2014 (r276151) +++ head/ObsoleteFiles.inc Tue Dec 23 20:54:59 2014 (r276152) @@ -38,7 +38,8 @@ # xargs -n1 | sort | uniq -d; # done -# 20141223: remove in6_gif.h and in_gif.h +# 20141223: remove in6_gif.h, in_gif.h and if_stf.h +OLD_FILES+=usr/include/net/if_stf.h OLD_FILES+=usr/include/netinet/in_gif.h OLD_FILES+=usr/include/netinet6/in6_gif.h # 20141202: update to mandoc CVS 20141201 Modified: head/sys/net/if_stf.c ============================================================================== --- head/sys/net/if_stf.c Tue Dec 23 19:31:56 2014 (r276151) +++ head/sys/net/if_stf.c Tue Dec 23 20:54:59 2014 (r276152) @@ -99,7 +99,6 @@ #include #include #include -#include #include #include @@ -156,7 +155,8 @@ static MALLOC_DEFINE(M_STF, stfname, "6t static const int ip_stf_ttl = 40; extern struct domain inetdomain; -struct protosw in_stf_protosw = { +static int in_stf_input(struct mbuf **, int *, int); +static struct protosw in_stf_protosw = { .pr_type = SOCK_RAW, .pr_domain = &inetdomain, .pr_protocol = IPPROTO_IPV6, @@ -620,7 +620,7 @@ stf_checkaddr6(sc, in6, inifp) return 0; } -int +static int in_stf_input(struct mbuf **mp, int *offp, int proto) { struct stf_softc *sc; From owner-svn-src-all@FreeBSD.ORG Tue Dec 23 22:52:25 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 879338D3; Tue, 23 Dec 2014 22:52:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 71C6E647A0; Tue, 23 Dec 2014 22:52:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBNMqPc0096821; Tue, 23 Dec 2014 22:52:25 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBNMqNEf096810; Tue, 23 Dec 2014 22:52:23 GMT (envelope-from des@FreeBSD.org) Message-Id: <201412232252.sBNMqNEf096810@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: des set sender to des@FreeBSD.org using -f From: Dag-Erling Smørgrav Date: Tue, 23 Dec 2014 22:52:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r276154 - in releng/8.4: . contrib/ntp/ntpd contrib/ntp/util sys/conf usr.sbin/freebsd-update X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2014 22:52:25 -0000 Author: des Date: Tue Dec 23 22:52:22 2014 New Revision: 276154 URL: https://svnweb.freebsd.org/changeset/base/276154 Log: [SA-14:31] Fix multiple vulnerabilities in NTP suite. [EN-14:13] Fix directory deletion issue in freebsd-update. Approved by: so Modified: releng/8.4/UPDATING releng/8.4/contrib/ntp/ntpd/ntp_config.c releng/8.4/contrib/ntp/ntpd/ntp_control.c releng/8.4/contrib/ntp/ntpd/ntp_crypto.c releng/8.4/contrib/ntp/ntpd/ntp_proto.c releng/8.4/contrib/ntp/util/ntp-keygen.c releng/8.4/sys/conf/newvers.sh releng/8.4/usr.sbin/freebsd-update/freebsd-update.sh Modified: releng/8.4/UPDATING ============================================================================== --- releng/8.4/UPDATING Tue Dec 23 21:36:55 2014 (r276153) +++ releng/8.4/UPDATING Tue Dec 23 22:52:22 2014 (r276154) @@ -15,6 +15,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8. debugging tools present in HEAD were left in place because sun4v support still needs work to become production ready. +20141223: p21 FreeBSD-SA-14:31.ntp + FreeBSD-EN-14:13.freebsd-update + + Fix multiple vulnerabilities in NTP suite. [SA-14:31] + Fix directory deletion issue in freebsd-update. [EN-14:13] + 20141210: p20 FreeBSD-SA-14:28.file FreeBSD-SA-14:29.bind Modified: releng/8.4/contrib/ntp/ntpd/ntp_config.c ============================================================================== --- releng/8.4/contrib/ntp/ntpd/ntp_config.c Tue Dec 23 21:36:55 2014 (r276153) +++ releng/8.4/contrib/ntp/ntpd/ntp_config.c Tue Dec 23 22:52:22 2014 (r276154) @@ -1887,7 +1887,7 @@ getconfig( for (i = 0; i < 8; i++) for (j = 1; j < 100; ++j) { - rankey[i] = (char) (ntp_random() & 0xff); + rankey[i] = (char) (arc4random() & 0xff); if (rankey[i] != 0) break; } rankey[8] = 0; Modified: releng/8.4/contrib/ntp/ntpd/ntp_control.c ============================================================================== --- releng/8.4/contrib/ntp/ntpd/ntp_control.c Tue Dec 23 21:36:55 2014 (r276153) +++ releng/8.4/contrib/ntp/ntpd/ntp_control.c Tue Dec 23 22:52:22 2014 (r276154) @@ -24,6 +24,10 @@ #include #include +#ifndef MIN +#define MIN(a, b) (((a) <= (b)) ? (a) : (b)) +#endif + /* * Structure to hold request procedure information */ @@ -893,6 +897,7 @@ ctl_putdata( ) { int overhead; + unsigned int currentlen; overhead = 0; if (!bin) { @@ -916,12 +921,22 @@ ctl_putdata( /* * Save room for trailing junk */ - if (dlen + overhead + datapt > dataend) { + while (dlen + overhead + datapt > dataend) { /* * Not enough room in this one, flush it out. */ + currentlen = MIN(dlen, dataend - datapt); + + memcpy(datapt, dp, currentlen); + + datapt += currentlen; + dp += currentlen; + dlen -= currentlen; + datalinelen += currentlen; + ctl_flushpkt(CTL_MORE); } + memmove((char *)datapt, dp, (unsigned)dlen); datapt += dlen; datalinelen += dlen; Modified: releng/8.4/contrib/ntp/ntpd/ntp_crypto.c ============================================================================== --- releng/8.4/contrib/ntp/ntpd/ntp_crypto.c Tue Dec 23 21:36:55 2014 (r276153) +++ releng/8.4/contrib/ntp/ntpd/ntp_crypto.c Tue Dec 23 22:52:22 2014 (r276154) @@ -864,12 +864,24 @@ crypto_recv( * errors. */ if (vallen == (u_int) EVP_PKEY_size(host_pkey)) { - RSA_private_decrypt(vallen, + u_int32 *cookiebuf = malloc( + RSA_size(host_pkey->pkey.rsa)); + if (cookiebuf == NULL) { + rval = XEVNT_CKY; + break; + } + if (RSA_private_decrypt(vallen, (u_char *)ep->pkt, - (u_char *)&temp32, + (u_char *)cookiebuf, host_pkey->pkey.rsa, - RSA_PKCS1_OAEP_PADDING); - cookie = ntohl(temp32); + RSA_PKCS1_OAEP_PADDING) != 4) { + rval = XEVNT_CKY; + free(cookiebuf); + break; + } else { + cookie = ntohl(*cookiebuf); + free(cookiebuf); + } } else { rval = XEVNT_CKY; break; @@ -3914,7 +3926,7 @@ crypto_setup(void) rand_file); exit (-1); } - get_systime(&seed); + arc4random_buf(&seed, sizeof(l_fp)); RAND_seed(&seed, sizeof(l_fp)); RAND_write_file(rand_file); OpenSSL_add_all_algorithms(); Modified: releng/8.4/contrib/ntp/ntpd/ntp_proto.c ============================================================================== --- releng/8.4/contrib/ntp/ntpd/ntp_proto.c Tue Dec 23 21:36:55 2014 (r276153) +++ releng/8.4/contrib/ntp/ntpd/ntp_proto.c Tue Dec 23 22:52:22 2014 (r276154) @@ -649,6 +649,7 @@ receive( has_mac)) { is_authentic = AUTH_ERROR; sys_badauth++; + return; } else { is_authentic = AUTH_OK; } Modified: releng/8.4/contrib/ntp/util/ntp-keygen.c ============================================================================== --- releng/8.4/contrib/ntp/util/ntp-keygen.c Tue Dec 23 21:36:55 2014 (r276153) +++ releng/8.4/contrib/ntp/util/ntp-keygen.c Tue Dec 23 22:52:22 2014 (r276154) @@ -642,7 +642,7 @@ gen_md5( for (i = 1; i <= MD5KEYS; i++) { for (j = 0; j < 16; j++) { while (1) { - temp = ntp_random() & 0xff; + temp = arc4random() & 0xff; if (temp == '#') continue; if (temp > 0x20 && temp < 0x7f) @@ -675,7 +675,7 @@ gen_rsa( FILE *str; fprintf(stderr, "Generating RSA keys (%d bits)...\n", modulus); - rsa = RSA_generate_key(modulus, 3, cb, "RSA"); + rsa = RSA_generate_key(modulus, 65537, cb, "RSA"); fprintf(stderr, "\n"); if (rsa == NULL) { fprintf(stderr, "RSA generate keys fails\n%s\n", @@ -954,7 +954,7 @@ gen_gqpar( */ fprintf(stderr, "Generating GQ parameters (%d bits)...\n", modulus); - rsa = RSA_generate_key(modulus, 3, cb, "GQ"); + rsa = RSA_generate_key(modulus, 65537, cb, "GQ"); fprintf(stderr, "\n"); if (rsa == NULL) { fprintf(stderr, "RSA generate keys fails\n%s\n", Modified: releng/8.4/sys/conf/newvers.sh ============================================================================== --- releng/8.4/sys/conf/newvers.sh Tue Dec 23 21:36:55 2014 (r276153) +++ releng/8.4/sys/conf/newvers.sh Tue Dec 23 22:52:22 2014 (r276154) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="8.4" -BRANCH="RELEASE-p20" +BRANCH="RELEASE-p21" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi Modified: releng/8.4/usr.sbin/freebsd-update/freebsd-update.sh ============================================================================== --- releng/8.4/usr.sbin/freebsd-update/freebsd-update.sh Tue Dec 23 21:36:55 2014 (r276153) +++ releng/8.4/usr.sbin/freebsd-update/freebsd-update.sh Tue Dec 23 22:52:22 2014 (r276154) @@ -1372,6 +1372,7 @@ fetch_filter_metadata () { # matter, since we add a leading "/" when we use paths later. cut -f 3- -d '|' $1 | sed -e 's,/|d|,|d|,' | + sed -e 's,/|-|,|-|,' | sort -u > $1.tmp # Figure out which lines to ignore and remove them. From owner-svn-src-all@FreeBSD.ORG Tue Dec 23 22:53:06 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D149F9F9; Tue, 23 Dec 2014 22:53:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BB776647AA; Tue, 23 Dec 2014 22:53:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBNMr6Po096964; Tue, 23 Dec 2014 22:53:06 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBNMr49k096952; Tue, 23 Dec 2014 22:53:04 GMT (envelope-from des@FreeBSD.org) Message-Id: <201412232253.sBNMr49k096952@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: des set sender to des@FreeBSD.org using -f From: Dag-Erling Smørgrav Date: Tue, 23 Dec 2014 22:53:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r276155 - in releng/9.1: . contrib/ntp/ntpd contrib/ntp/util sys/conf usr.sbin/freebsd-update X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2014 22:53:07 -0000 Author: des Date: Tue Dec 23 22:53:03 2014 New Revision: 276155 URL: https://svnweb.freebsd.org/changeset/base/276155 Log: [SA-14:31] Fix multiple vulnerabilities in NTP suite. [EN-14:13] Fix directory deletion issue in freebsd-update. Approved by: so Modified: releng/9.1/UPDATING releng/9.1/contrib/ntp/ntpd/ntp_config.c releng/9.1/contrib/ntp/ntpd/ntp_control.c releng/9.1/contrib/ntp/ntpd/ntp_crypto.c releng/9.1/contrib/ntp/ntpd/ntp_proto.c releng/9.1/contrib/ntp/util/ntp-keygen.c releng/9.1/sys/conf/newvers.sh releng/9.1/usr.sbin/freebsd-update/freebsd-update.sh Modified: releng/9.1/UPDATING ============================================================================== --- releng/9.1/UPDATING Tue Dec 23 22:52:22 2014 (r276154) +++ releng/9.1/UPDATING Tue Dec 23 22:53:03 2014 (r276155) @@ -9,6 +9,12 @@ handbook. Items affecting the ports and packages system can be found in /usr/ports/UPDATING. Please read that file before running portupgrade. +20141223: p24 FreeBSD-SA-14:31.ntp + FreeBSD-EN-14:13.freebsd-update + + Fix multiple vulnerabilities in NTP suite. [SA-14:31] + Fix directory deletion issue in freebsd-update. [EN-14:13] + 20141210: p23 FreeBSD-SA-14:28.file FreeBSD-SA-14:29.bind Modified: releng/9.1/contrib/ntp/ntpd/ntp_config.c ============================================================================== --- releng/9.1/contrib/ntp/ntpd/ntp_config.c Tue Dec 23 22:52:22 2014 (r276154) +++ releng/9.1/contrib/ntp/ntpd/ntp_config.c Tue Dec 23 22:53:03 2014 (r276155) @@ -1887,7 +1887,7 @@ getconfig( for (i = 0; i < 8; i++) for (j = 1; j < 100; ++j) { - rankey[i] = (char) (ntp_random() & 0xff); + rankey[i] = (char) (arc4random() & 0xff); if (rankey[i] != 0) break; } rankey[8] = 0; Modified: releng/9.1/contrib/ntp/ntpd/ntp_control.c ============================================================================== --- releng/9.1/contrib/ntp/ntpd/ntp_control.c Tue Dec 23 22:52:22 2014 (r276154) +++ releng/9.1/contrib/ntp/ntpd/ntp_control.c Tue Dec 23 22:53:03 2014 (r276155) @@ -24,6 +24,10 @@ #include #include +#ifndef MIN +#define MIN(a, b) (((a) <= (b)) ? (a) : (b)) +#endif + /* * Structure to hold request procedure information */ @@ -893,6 +897,7 @@ ctl_putdata( ) { int overhead; + unsigned int currentlen; overhead = 0; if (!bin) { @@ -916,12 +921,22 @@ ctl_putdata( /* * Save room for trailing junk */ - if (dlen + overhead + datapt > dataend) { + while (dlen + overhead + datapt > dataend) { /* * Not enough room in this one, flush it out. */ + currentlen = MIN(dlen, dataend - datapt); + + memcpy(datapt, dp, currentlen); + + datapt += currentlen; + dp += currentlen; + dlen -= currentlen; + datalinelen += currentlen; + ctl_flushpkt(CTL_MORE); } + memmove((char *)datapt, dp, (unsigned)dlen); datapt += dlen; datalinelen += dlen; Modified: releng/9.1/contrib/ntp/ntpd/ntp_crypto.c ============================================================================== --- releng/9.1/contrib/ntp/ntpd/ntp_crypto.c Tue Dec 23 22:52:22 2014 (r276154) +++ releng/9.1/contrib/ntp/ntpd/ntp_crypto.c Tue Dec 23 22:53:03 2014 (r276155) @@ -864,12 +864,24 @@ crypto_recv( * errors. */ if (vallen == (u_int) EVP_PKEY_size(host_pkey)) { - RSA_private_decrypt(vallen, + u_int32 *cookiebuf = malloc( + RSA_size(host_pkey->pkey.rsa)); + if (cookiebuf == NULL) { + rval = XEVNT_CKY; + break; + } + if (RSA_private_decrypt(vallen, (u_char *)ep->pkt, - (u_char *)&temp32, + (u_char *)cookiebuf, host_pkey->pkey.rsa, - RSA_PKCS1_OAEP_PADDING); - cookie = ntohl(temp32); + RSA_PKCS1_OAEP_PADDING) != 4) { + rval = XEVNT_CKY; + free(cookiebuf); + break; + } else { + cookie = ntohl(*cookiebuf); + free(cookiebuf); + } } else { rval = XEVNT_CKY; break; @@ -3914,7 +3926,7 @@ crypto_setup(void) rand_file); exit (-1); } - get_systime(&seed); + arc4random_buf(&seed, sizeof(l_fp)); RAND_seed(&seed, sizeof(l_fp)); RAND_write_file(rand_file); OpenSSL_add_all_algorithms(); Modified: releng/9.1/contrib/ntp/ntpd/ntp_proto.c ============================================================================== --- releng/9.1/contrib/ntp/ntpd/ntp_proto.c Tue Dec 23 22:52:22 2014 (r276154) +++ releng/9.1/contrib/ntp/ntpd/ntp_proto.c Tue Dec 23 22:53:03 2014 (r276155) @@ -649,6 +649,7 @@ receive( has_mac)) { is_authentic = AUTH_ERROR; sys_badauth++; + return; } else { is_authentic = AUTH_OK; } Modified: releng/9.1/contrib/ntp/util/ntp-keygen.c ============================================================================== --- releng/9.1/contrib/ntp/util/ntp-keygen.c Tue Dec 23 22:52:22 2014 (r276154) +++ releng/9.1/contrib/ntp/util/ntp-keygen.c Tue Dec 23 22:53:03 2014 (r276155) @@ -642,7 +642,7 @@ gen_md5( for (i = 1; i <= MD5KEYS; i++) { for (j = 0; j < 16; j++) { while (1) { - temp = ntp_random() & 0xff; + temp = arc4random() & 0xff; if (temp == '#') continue; if (temp > 0x20 && temp < 0x7f) @@ -675,7 +675,7 @@ gen_rsa( FILE *str; fprintf(stderr, "Generating RSA keys (%d bits)...\n", modulus); - rsa = RSA_generate_key(modulus, 3, cb, "RSA"); + rsa = RSA_generate_key(modulus, 65537, cb, "RSA"); fprintf(stderr, "\n"); if (rsa == NULL) { fprintf(stderr, "RSA generate keys fails\n%s\n", @@ -954,7 +954,7 @@ gen_gqpar( */ fprintf(stderr, "Generating GQ parameters (%d bits)...\n", modulus); - rsa = RSA_generate_key(modulus, 3, cb, "GQ"); + rsa = RSA_generate_key(modulus, 65537, cb, "GQ"); fprintf(stderr, "\n"); if (rsa == NULL) { fprintf(stderr, "RSA generate keys fails\n%s\n", Modified: releng/9.1/sys/conf/newvers.sh ============================================================================== --- releng/9.1/sys/conf/newvers.sh Tue Dec 23 22:52:22 2014 (r276154) +++ releng/9.1/sys/conf/newvers.sh Tue Dec 23 22:53:03 2014 (r276155) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="9.1" -BRANCH="RELEASE-p23" +BRANCH="RELEASE-p24" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi Modified: releng/9.1/usr.sbin/freebsd-update/freebsd-update.sh ============================================================================== --- releng/9.1/usr.sbin/freebsd-update/freebsd-update.sh Tue Dec 23 22:52:22 2014 (r276154) +++ releng/9.1/usr.sbin/freebsd-update/freebsd-update.sh Tue Dec 23 22:53:03 2014 (r276155) @@ -1387,6 +1387,7 @@ fetch_filter_metadata () { # matter, since we add a leading "/" when we use paths later. cut -f 3- -d '|' $1 | sed -e 's,/|d|,|d|,' | + sed -e 's,/|-|,|-|,' | sort -u > $1.tmp # Figure out which lines to ignore and remove them. From owner-svn-src-all@FreeBSD.ORG Tue Dec 23 22:53:47 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8104BB23; Tue, 23 Dec 2014 22:53:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6B28F647B2; Tue, 23 Dec 2014 22:53:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBNMrlo2097096; Tue, 23 Dec 2014 22:53:47 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBNMrjj7097082; Tue, 23 Dec 2014 22:53:45 GMT (envelope-from des@FreeBSD.org) Message-Id: <201412232253.sBNMrjj7097082@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: des set sender to des@FreeBSD.org using -f From: Dag-Erling Smørgrav Date: Tue, 23 Dec 2014 22:53:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r276156 - in releng/9.2: . contrib/ntp/ntpd contrib/ntp/util sys/conf usr.sbin/freebsd-update X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2014 22:53:47 -0000 Author: des Date: Tue Dec 23 22:53:44 2014 New Revision: 276156 URL: https://svnweb.freebsd.org/changeset/base/276156 Log: [SA-14:31] Fix multiple vulnerabilities in NTP suite. [EN-14:13] Fix directory deletion issue in freebsd-update. Approved by: so Modified: releng/9.2/UPDATING releng/9.2/contrib/ntp/ntpd/ntp_config.c releng/9.2/contrib/ntp/ntpd/ntp_control.c releng/9.2/contrib/ntp/ntpd/ntp_crypto.c releng/9.2/contrib/ntp/ntpd/ntp_proto.c releng/9.2/contrib/ntp/util/ntp-keygen.c releng/9.2/sys/conf/newvers.sh releng/9.2/usr.sbin/freebsd-update/freebsd-update.sh Modified: releng/9.2/UPDATING ============================================================================== --- releng/9.2/UPDATING Tue Dec 23 22:53:03 2014 (r276155) +++ releng/9.2/UPDATING Tue Dec 23 22:53:44 2014 (r276156) @@ -11,6 +11,13 @@ handbook: Items affecting the ports and packages system can be found in /usr/ports/UPDATING. Please read that file before running portupgrade. +20141223: p17 FreeBSD-SA-14:31.ntp + FreeBSD-EN-14:13.freebsd-update + + Fix multiple vulnerabilities in NTP suite. [SA-14:31] + Fix directory deletion issue in freebsd-update. [EN-14:13] + + 20141210: p16 FreeBSD-SA-14:28.file FreeBSD-SA-14:29.bind Modified: releng/9.2/contrib/ntp/ntpd/ntp_config.c ============================================================================== --- releng/9.2/contrib/ntp/ntpd/ntp_config.c Tue Dec 23 22:53:03 2014 (r276155) +++ releng/9.2/contrib/ntp/ntpd/ntp_config.c Tue Dec 23 22:53:44 2014 (r276156) @@ -1887,7 +1887,7 @@ getconfig( for (i = 0; i < 8; i++) for (j = 1; j < 100; ++j) { - rankey[i] = (char) (ntp_random() & 0xff); + rankey[i] = (char) (arc4random() & 0xff); if (rankey[i] != 0) break; } rankey[8] = 0; Modified: releng/9.2/contrib/ntp/ntpd/ntp_control.c ============================================================================== --- releng/9.2/contrib/ntp/ntpd/ntp_control.c Tue Dec 23 22:53:03 2014 (r276155) +++ releng/9.2/contrib/ntp/ntpd/ntp_control.c Tue Dec 23 22:53:44 2014 (r276156) @@ -24,6 +24,10 @@ #include #include +#ifndef MIN +#define MIN(a, b) (((a) <= (b)) ? (a) : (b)) +#endif + /* * Structure to hold request procedure information */ @@ -893,6 +897,7 @@ ctl_putdata( ) { int overhead; + unsigned int currentlen; overhead = 0; if (!bin) { @@ -916,12 +921,22 @@ ctl_putdata( /* * Save room for trailing junk */ - if (dlen + overhead + datapt > dataend) { + while (dlen + overhead + datapt > dataend) { /* * Not enough room in this one, flush it out. */ + currentlen = MIN(dlen, dataend - datapt); + + memcpy(datapt, dp, currentlen); + + datapt += currentlen; + dp += currentlen; + dlen -= currentlen; + datalinelen += currentlen; + ctl_flushpkt(CTL_MORE); } + memmove((char *)datapt, dp, (unsigned)dlen); datapt += dlen; datalinelen += dlen; Modified: releng/9.2/contrib/ntp/ntpd/ntp_crypto.c ============================================================================== --- releng/9.2/contrib/ntp/ntpd/ntp_crypto.c Tue Dec 23 22:53:03 2014 (r276155) +++ releng/9.2/contrib/ntp/ntpd/ntp_crypto.c Tue Dec 23 22:53:44 2014 (r276156) @@ -864,12 +864,24 @@ crypto_recv( * errors. */ if (vallen == (u_int) EVP_PKEY_size(host_pkey)) { - RSA_private_decrypt(vallen, + u_int32 *cookiebuf = malloc( + RSA_size(host_pkey->pkey.rsa)); + if (cookiebuf == NULL) { + rval = XEVNT_CKY; + break; + } + if (RSA_private_decrypt(vallen, (u_char *)ep->pkt, - (u_char *)&temp32, + (u_char *)cookiebuf, host_pkey->pkey.rsa, - RSA_PKCS1_OAEP_PADDING); - cookie = ntohl(temp32); + RSA_PKCS1_OAEP_PADDING) != 4) { + rval = XEVNT_CKY; + free(cookiebuf); + break; + } else { + cookie = ntohl(*cookiebuf); + free(cookiebuf); + } } else { rval = XEVNT_CKY; break; @@ -3914,7 +3926,7 @@ crypto_setup(void) rand_file); exit (-1); } - get_systime(&seed); + arc4random_buf(&seed, sizeof(l_fp)); RAND_seed(&seed, sizeof(l_fp)); RAND_write_file(rand_file); OpenSSL_add_all_algorithms(); Modified: releng/9.2/contrib/ntp/ntpd/ntp_proto.c ============================================================================== --- releng/9.2/contrib/ntp/ntpd/ntp_proto.c Tue Dec 23 22:53:03 2014 (r276155) +++ releng/9.2/contrib/ntp/ntpd/ntp_proto.c Tue Dec 23 22:53:44 2014 (r276156) @@ -649,6 +649,7 @@ receive( has_mac)) { is_authentic = AUTH_ERROR; sys_badauth++; + return; } else { is_authentic = AUTH_OK; } Modified: releng/9.2/contrib/ntp/util/ntp-keygen.c ============================================================================== --- releng/9.2/contrib/ntp/util/ntp-keygen.c Tue Dec 23 22:53:03 2014 (r276155) +++ releng/9.2/contrib/ntp/util/ntp-keygen.c Tue Dec 23 22:53:44 2014 (r276156) @@ -642,7 +642,7 @@ gen_md5( for (i = 1; i <= MD5KEYS; i++) { for (j = 0; j < 16; j++) { while (1) { - temp = ntp_random() & 0xff; + temp = arc4random() & 0xff; if (temp == '#') continue; if (temp > 0x20 && temp < 0x7f) @@ -675,7 +675,7 @@ gen_rsa( FILE *str; fprintf(stderr, "Generating RSA keys (%d bits)...\n", modulus); - rsa = RSA_generate_key(modulus, 3, cb, "RSA"); + rsa = RSA_generate_key(modulus, 65537, cb, "RSA"); fprintf(stderr, "\n"); if (rsa == NULL) { fprintf(stderr, "RSA generate keys fails\n%s\n", @@ -954,7 +954,7 @@ gen_gqpar( */ fprintf(stderr, "Generating GQ parameters (%d bits)...\n", modulus); - rsa = RSA_generate_key(modulus, 3, cb, "GQ"); + rsa = RSA_generate_key(modulus, 65537, cb, "GQ"); fprintf(stderr, "\n"); if (rsa == NULL) { fprintf(stderr, "RSA generate keys fails\n%s\n", Modified: releng/9.2/sys/conf/newvers.sh ============================================================================== --- releng/9.2/sys/conf/newvers.sh Tue Dec 23 22:53:03 2014 (r276155) +++ releng/9.2/sys/conf/newvers.sh Tue Dec 23 22:53:44 2014 (r276156) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="9.2" -BRANCH="RELEASE-p16" +BRANCH="RELEASE-p17" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi Modified: releng/9.2/usr.sbin/freebsd-update/freebsd-update.sh ============================================================================== --- releng/9.2/usr.sbin/freebsd-update/freebsd-update.sh Tue Dec 23 22:53:03 2014 (r276155) +++ releng/9.2/usr.sbin/freebsd-update/freebsd-update.sh Tue Dec 23 22:53:44 2014 (r276156) @@ -1387,6 +1387,7 @@ fetch_filter_metadata () { # matter, since we add a leading "/" when we use paths later. cut -f 3- -d '|' $1 | sed -e 's,/|d|,|d|,' | + sed -e 's,/|-|,|-|,' | sort -u > $1.tmp # Figure out which lines to ignore and remove them. From owner-svn-src-all@FreeBSD.ORG Tue Dec 23 22:54:28 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BB6A9C4F; Tue, 23 Dec 2014 22:54:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A5D31647BB; Tue, 23 Dec 2014 22:54:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBNMsSkv097251; Tue, 23 Dec 2014 22:54:28 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBNMsQI8097239; Tue, 23 Dec 2014 22:54:26 GMT (envelope-from des@FreeBSD.org) Message-Id: <201412232254.sBNMsQI8097239@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: des set sender to des@FreeBSD.org using -f From: Dag-Erling Smørgrav Date: Tue, 23 Dec 2014 22:54:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r276157 - in releng/9.3: . contrib/ntp/ntpd contrib/ntp/util sys/conf usr.sbin/freebsd-update X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2014 22:54:28 -0000 Author: des Date: Tue Dec 23 22:54:25 2014 New Revision: 276157 URL: https://svnweb.freebsd.org/changeset/base/276157 Log: [SA-14:31] Fix multiple vulnerabilities in NTP suite. [EN-14:13] Fix directory deletion issue in freebsd-update. Approved by: so Modified: releng/9.3/UPDATING releng/9.3/contrib/ntp/ntpd/ntp_config.c releng/9.3/contrib/ntp/ntpd/ntp_control.c releng/9.3/contrib/ntp/ntpd/ntp_crypto.c releng/9.3/contrib/ntp/ntpd/ntp_proto.c releng/9.3/contrib/ntp/util/ntp-keygen.c releng/9.3/sys/conf/newvers.sh releng/9.3/usr.sbin/freebsd-update/freebsd-update.sh Modified: releng/9.3/UPDATING ============================================================================== --- releng/9.3/UPDATING Tue Dec 23 22:53:44 2014 (r276156) +++ releng/9.3/UPDATING Tue Dec 23 22:54:25 2014 (r276157) @@ -11,6 +11,12 @@ handbook: Items affecting the ports and packages system can be found in /usr/ports/UPDATING. Please read that file before running portupgrade. +20141223: p7 FreeBSD-SA-14:31.ntp + FreeBSD-EN-14:13.freebsd-update + + Fix multiple vulnerabilities in NTP suite. [SA-14:31] + Fix directory deletion issue in freebsd-update. [EN-14:13] + 20141210: p6 FreeBSD-SA-14:28.file FreeBSD-SA-14:29.bind Modified: releng/9.3/contrib/ntp/ntpd/ntp_config.c ============================================================================== --- releng/9.3/contrib/ntp/ntpd/ntp_config.c Tue Dec 23 22:53:44 2014 (r276156) +++ releng/9.3/contrib/ntp/ntpd/ntp_config.c Tue Dec 23 22:54:25 2014 (r276157) @@ -1887,7 +1887,7 @@ getconfig( for (i = 0; i < 8; i++) for (j = 1; j < 100; ++j) { - rankey[i] = (char) (ntp_random() & 0xff); + rankey[i] = (char) (arc4random() & 0xff); if (rankey[i] != 0) break; } rankey[8] = 0; Modified: releng/9.3/contrib/ntp/ntpd/ntp_control.c ============================================================================== --- releng/9.3/contrib/ntp/ntpd/ntp_control.c Tue Dec 23 22:53:44 2014 (r276156) +++ releng/9.3/contrib/ntp/ntpd/ntp_control.c Tue Dec 23 22:54:25 2014 (r276157) @@ -24,6 +24,10 @@ #include #include +#ifndef MIN +#define MIN(a, b) (((a) <= (b)) ? (a) : (b)) +#endif + /* * Structure to hold request procedure information */ @@ -893,6 +897,7 @@ ctl_putdata( ) { int overhead; + unsigned int currentlen; overhead = 0; if (!bin) { @@ -916,12 +921,22 @@ ctl_putdata( /* * Save room for trailing junk */ - if (dlen + overhead + datapt > dataend) { + while (dlen + overhead + datapt > dataend) { /* * Not enough room in this one, flush it out. */ + currentlen = MIN(dlen, dataend - datapt); + + memcpy(datapt, dp, currentlen); + + datapt += currentlen; + dp += currentlen; + dlen -= currentlen; + datalinelen += currentlen; + ctl_flushpkt(CTL_MORE); } + memmove((char *)datapt, dp, (unsigned)dlen); datapt += dlen; datalinelen += dlen; Modified: releng/9.3/contrib/ntp/ntpd/ntp_crypto.c ============================================================================== --- releng/9.3/contrib/ntp/ntpd/ntp_crypto.c Tue Dec 23 22:53:44 2014 (r276156) +++ releng/9.3/contrib/ntp/ntpd/ntp_crypto.c Tue Dec 23 22:54:25 2014 (r276157) @@ -864,12 +864,24 @@ crypto_recv( * errors. */ if (vallen == (u_int) EVP_PKEY_size(host_pkey)) { - RSA_private_decrypt(vallen, + u_int32 *cookiebuf = malloc( + RSA_size(host_pkey->pkey.rsa)); + if (cookiebuf == NULL) { + rval = XEVNT_CKY; + break; + } + if (RSA_private_decrypt(vallen, (u_char *)ep->pkt, - (u_char *)&temp32, + (u_char *)cookiebuf, host_pkey->pkey.rsa, - RSA_PKCS1_OAEP_PADDING); - cookie = ntohl(temp32); + RSA_PKCS1_OAEP_PADDING) != 4) { + rval = XEVNT_CKY; + free(cookiebuf); + break; + } else { + cookie = ntohl(*cookiebuf); + free(cookiebuf); + } } else { rval = XEVNT_CKY; break; @@ -3914,7 +3926,7 @@ crypto_setup(void) rand_file); exit (-1); } - get_systime(&seed); + arc4random_buf(&seed, sizeof(l_fp)); RAND_seed(&seed, sizeof(l_fp)); RAND_write_file(rand_file); OpenSSL_add_all_algorithms(); Modified: releng/9.3/contrib/ntp/ntpd/ntp_proto.c ============================================================================== --- releng/9.3/contrib/ntp/ntpd/ntp_proto.c Tue Dec 23 22:53:44 2014 (r276156) +++ releng/9.3/contrib/ntp/ntpd/ntp_proto.c Tue Dec 23 22:54:25 2014 (r276157) @@ -649,6 +649,7 @@ receive( has_mac)) { is_authentic = AUTH_ERROR; sys_badauth++; + return; } else { is_authentic = AUTH_OK; } Modified: releng/9.3/contrib/ntp/util/ntp-keygen.c ============================================================================== --- releng/9.3/contrib/ntp/util/ntp-keygen.c Tue Dec 23 22:53:44 2014 (r276156) +++ releng/9.3/contrib/ntp/util/ntp-keygen.c Tue Dec 23 22:54:25 2014 (r276157) @@ -642,7 +642,7 @@ gen_md5( for (i = 1; i <= MD5KEYS; i++) { for (j = 0; j < 16; j++) { while (1) { - temp = ntp_random() & 0xff; + temp = arc4random() & 0xff; if (temp == '#') continue; if (temp > 0x20 && temp < 0x7f) @@ -675,7 +675,7 @@ gen_rsa( FILE *str; fprintf(stderr, "Generating RSA keys (%d bits)...\n", modulus); - rsa = RSA_generate_key(modulus, 3, cb, "RSA"); + rsa = RSA_generate_key(modulus, 65537, cb, "RSA"); fprintf(stderr, "\n"); if (rsa == NULL) { fprintf(stderr, "RSA generate keys fails\n%s\n", @@ -954,7 +954,7 @@ gen_gqpar( */ fprintf(stderr, "Generating GQ parameters (%d bits)...\n", modulus); - rsa = RSA_generate_key(modulus, 3, cb, "GQ"); + rsa = RSA_generate_key(modulus, 65537, cb, "GQ"); fprintf(stderr, "\n"); if (rsa == NULL) { fprintf(stderr, "RSA generate keys fails\n%s\n", Modified: releng/9.3/sys/conf/newvers.sh ============================================================================== --- releng/9.3/sys/conf/newvers.sh Tue Dec 23 22:53:44 2014 (r276156) +++ releng/9.3/sys/conf/newvers.sh Tue Dec 23 22:54:25 2014 (r276157) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="9.3" -BRANCH="RELEASE-p6" +BRANCH="RELEASE-p7" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi Modified: releng/9.3/usr.sbin/freebsd-update/freebsd-update.sh ============================================================================== --- releng/9.3/usr.sbin/freebsd-update/freebsd-update.sh Tue Dec 23 22:53:44 2014 (r276156) +++ releng/9.3/usr.sbin/freebsd-update/freebsd-update.sh Tue Dec 23 22:54:25 2014 (r276157) @@ -1387,6 +1387,7 @@ fetch_filter_metadata () { # matter, since we add a leading "/" when we use paths later. cut -f 3- -d '|' $1 | sed -e 's,/|d|,|d|,' | + sed -e 's,/|-|,|-|,' | sort -u > $1.tmp # Figure out which lines to ignore and remove them. From owner-svn-src-all@FreeBSD.ORG Tue Dec 23 22:55:17 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 80C8DD7B; Tue, 23 Dec 2014 22:55:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6B5B4647E3; Tue, 23 Dec 2014 22:55:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBNMtHR8097461; Tue, 23 Dec 2014 22:55:17 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBNMtFld097449; Tue, 23 Dec 2014 22:55:15 GMT (envelope-from des@FreeBSD.org) Message-Id: <201412232255.sBNMtFld097449@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: des set sender to des@FreeBSD.org using -f From: Dag-Erling Smørgrav Date: Tue, 23 Dec 2014 22:55:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r276158 - in releng/10.0: . contrib/ntp/ntpd contrib/ntp/util sys/conf usr.sbin/freebsd-update X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2014 22:55:17 -0000 Author: des Date: Tue Dec 23 22:55:14 2014 New Revision: 276158 URL: https://svnweb.freebsd.org/changeset/base/276158 Log: [SA-14:31] Fix multiple vulnerabilities in NTP suite. [EN-14:13] Fix directory deletion issue in freebsd-update. Approved by: so Modified: releng/10.0/UPDATING releng/10.0/contrib/ntp/ntpd/ntp_config.c releng/10.0/contrib/ntp/ntpd/ntp_control.c releng/10.0/contrib/ntp/ntpd/ntp_crypto.c releng/10.0/contrib/ntp/ntpd/ntp_proto.c releng/10.0/contrib/ntp/util/ntp-keygen.c releng/10.0/sys/conf/newvers.sh releng/10.0/usr.sbin/freebsd-update/freebsd-update.sh Modified: releng/10.0/UPDATING ============================================================================== --- releng/10.0/UPDATING Tue Dec 23 22:54:25 2014 (r276157) +++ releng/10.0/UPDATING Tue Dec 23 22:55:14 2014 (r276158) @@ -16,6 +16,12 @@ from older versions of FreeBSD, try WITH stable/10, and then rebuild without this option. The bootstrap process from older version of current is a bit fragile. +20141223: p15 FreeBSD-SA-14:31.ntp + FreeBSD-EN-14:13.freebsd-update + + Fix multiple vulnerabilities in NTP suite. [SA-14:31] + Fix directory deletion issue in freebsd-update. [EN-14:13] + 20141217: p14 FreeBSD-SA-14:30.unbound Fix unbound remote denial of service vulnerability. Modified: releng/10.0/contrib/ntp/ntpd/ntp_config.c ============================================================================== --- releng/10.0/contrib/ntp/ntpd/ntp_config.c Tue Dec 23 22:54:25 2014 (r276157) +++ releng/10.0/contrib/ntp/ntpd/ntp_config.c Tue Dec 23 22:55:14 2014 (r276158) @@ -1887,7 +1887,7 @@ getconfig( for (i = 0; i < 8; i++) for (j = 1; j < 100; ++j) { - rankey[i] = (char) (ntp_random() & 0xff); + rankey[i] = (char) (arc4random() & 0xff); if (rankey[i] != 0) break; } rankey[8] = 0; Modified: releng/10.0/contrib/ntp/ntpd/ntp_control.c ============================================================================== --- releng/10.0/contrib/ntp/ntpd/ntp_control.c Tue Dec 23 22:54:25 2014 (r276157) +++ releng/10.0/contrib/ntp/ntpd/ntp_control.c Tue Dec 23 22:55:14 2014 (r276158) @@ -24,6 +24,10 @@ #include #include +#ifndef MIN +#define MIN(a, b) (((a) <= (b)) ? (a) : (b)) +#endif + /* * Structure to hold request procedure information */ @@ -893,6 +897,7 @@ ctl_putdata( ) { int overhead; + unsigned int currentlen; overhead = 0; if (!bin) { @@ -916,12 +921,22 @@ ctl_putdata( /* * Save room for trailing junk */ - if (dlen + overhead + datapt > dataend) { + while (dlen + overhead + datapt > dataend) { /* * Not enough room in this one, flush it out. */ + currentlen = MIN(dlen, dataend - datapt); + + memcpy(datapt, dp, currentlen); + + datapt += currentlen; + dp += currentlen; + dlen -= currentlen; + datalinelen += currentlen; + ctl_flushpkt(CTL_MORE); } + memmove((char *)datapt, dp, (unsigned)dlen); datapt += dlen; datalinelen += dlen; Modified: releng/10.0/contrib/ntp/ntpd/ntp_crypto.c ============================================================================== --- releng/10.0/contrib/ntp/ntpd/ntp_crypto.c Tue Dec 23 22:54:25 2014 (r276157) +++ releng/10.0/contrib/ntp/ntpd/ntp_crypto.c Tue Dec 23 22:55:14 2014 (r276158) @@ -864,12 +864,24 @@ crypto_recv( * errors. */ if (vallen == (u_int) EVP_PKEY_size(host_pkey)) { - RSA_private_decrypt(vallen, + u_int32 *cookiebuf = malloc( + RSA_size(host_pkey->pkey.rsa)); + if (cookiebuf == NULL) { + rval = XEVNT_CKY; + break; + } + if (RSA_private_decrypt(vallen, (u_char *)ep->pkt, - (u_char *)&temp32, + (u_char *)cookiebuf, host_pkey->pkey.rsa, - RSA_PKCS1_OAEP_PADDING); - cookie = ntohl(temp32); + RSA_PKCS1_OAEP_PADDING) != 4) { + rval = XEVNT_CKY; + free(cookiebuf); + break; + } else { + cookie = ntohl(*cookiebuf); + free(cookiebuf); + } } else { rval = XEVNT_CKY; break; @@ -3914,7 +3926,7 @@ crypto_setup(void) rand_file); exit (-1); } - get_systime(&seed); + arc4random_buf(&seed, sizeof(l_fp)); RAND_seed(&seed, sizeof(l_fp)); RAND_write_file(rand_file); OpenSSL_add_all_algorithms(); Modified: releng/10.0/contrib/ntp/ntpd/ntp_proto.c ============================================================================== --- releng/10.0/contrib/ntp/ntpd/ntp_proto.c Tue Dec 23 22:54:25 2014 (r276157) +++ releng/10.0/contrib/ntp/ntpd/ntp_proto.c Tue Dec 23 22:55:14 2014 (r276158) @@ -649,6 +649,7 @@ receive( has_mac)) { is_authentic = AUTH_ERROR; sys_badauth++; + return; } else { is_authentic = AUTH_OK; } Modified: releng/10.0/contrib/ntp/util/ntp-keygen.c ============================================================================== --- releng/10.0/contrib/ntp/util/ntp-keygen.c Tue Dec 23 22:54:25 2014 (r276157) +++ releng/10.0/contrib/ntp/util/ntp-keygen.c Tue Dec 23 22:55:14 2014 (r276158) @@ -642,7 +642,7 @@ gen_md5( for (i = 1; i <= MD5KEYS; i++) { for (j = 0; j < 16; j++) { while (1) { - temp = ntp_random() & 0xff; + temp = arc4random() & 0xff; if (temp == '#') continue; if (temp > 0x20 && temp < 0x7f) @@ -675,7 +675,7 @@ gen_rsa( FILE *str; fprintf(stderr, "Generating RSA keys (%d bits)...\n", modulus); - rsa = RSA_generate_key(modulus, 3, cb, "RSA"); + rsa = RSA_generate_key(modulus, 65537, cb, "RSA"); fprintf(stderr, "\n"); if (rsa == NULL) { fprintf(stderr, "RSA generate keys fails\n%s\n", @@ -954,7 +954,7 @@ gen_gqpar( */ fprintf(stderr, "Generating GQ parameters (%d bits)...\n", modulus); - rsa = RSA_generate_key(modulus, 3, cb, "GQ"); + rsa = RSA_generate_key(modulus, 65537, cb, "GQ"); fprintf(stderr, "\n"); if (rsa == NULL) { fprintf(stderr, "RSA generate keys fails\n%s\n", Modified: releng/10.0/sys/conf/newvers.sh ============================================================================== --- releng/10.0/sys/conf/newvers.sh Tue Dec 23 22:54:25 2014 (r276157) +++ releng/10.0/sys/conf/newvers.sh Tue Dec 23 22:55:14 2014 (r276158) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="10.0" -BRANCH="RELEASE-p14" +BRANCH="RELEASE-p15" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi Modified: releng/10.0/usr.sbin/freebsd-update/freebsd-update.sh ============================================================================== --- releng/10.0/usr.sbin/freebsd-update/freebsd-update.sh Tue Dec 23 22:54:25 2014 (r276157) +++ releng/10.0/usr.sbin/freebsd-update/freebsd-update.sh Tue Dec 23 22:55:14 2014 (r276158) @@ -1387,6 +1387,7 @@ fetch_filter_metadata () { # matter, since we add a leading "/" when we use paths later. cut -f 3- -d '|' $1 | sed -e 's,/|d|,|d|,' | + sed -e 's,/|-|,|-|,' | sort -u > $1.tmp # Figure out which lines to ignore and remove them. From owner-svn-src-all@FreeBSD.ORG Tue Dec 23 22:56:04 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 59302EAC; Tue, 23 Dec 2014 22:56:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 43FBA647EE; Tue, 23 Dec 2014 22:56:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBNMu4RW097619; Tue, 23 Dec 2014 22:56:04 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBNMu2qo097607; Tue, 23 Dec 2014 22:56:02 GMT (envelope-from des@FreeBSD.org) Message-Id: <201412232256.sBNMu2qo097607@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: des set sender to des@FreeBSD.org using -f From: Dag-Erling Smørgrav Date: Tue, 23 Dec 2014 22:56:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r276159 - in releng/10.1: . contrib/ntp/ntpd contrib/ntp/util sys/conf usr.sbin/freebsd-update X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2014 22:56:04 -0000 Author: des Date: Tue Dec 23 22:56:01 2014 New Revision: 276159 URL: https://svnweb.freebsd.org/changeset/base/276159 Log: [SA-14:31] Fix multiple vulnerabilities in NTP suite. [EN-14:13] Fix directory deletion issue in freebsd-update. Approved by: so Modified: releng/10.1/UPDATING releng/10.1/contrib/ntp/ntpd/ntp_config.c releng/10.1/contrib/ntp/ntpd/ntp_control.c releng/10.1/contrib/ntp/ntpd/ntp_crypto.c releng/10.1/contrib/ntp/ntpd/ntp_proto.c releng/10.1/contrib/ntp/util/ntp-keygen.c releng/10.1/sys/conf/newvers.sh releng/10.1/usr.sbin/freebsd-update/freebsd-update.sh Modified: releng/10.1/UPDATING ============================================================================== --- releng/10.1/UPDATING Tue Dec 23 22:55:14 2014 (r276158) +++ releng/10.1/UPDATING Tue Dec 23 22:56:01 2014 (r276159) @@ -16,6 +16,12 @@ from older versions of FreeBSD, try WITH stable/10, and then rebuild without this option. The bootstrap process from older version of current is a bit fragile. +20141223: p3 FreeBSD-SA-14:31.ntp + FreeBSD-EN-14:13.freebsd-update + + Fix multiple vulnerabilities in NTP suite. [SA-14:31] + Fix directory deletion issue in freebsd-update. [EN-14:13] + 20141217: p2 FreeBSD-SA-14:30.unbound Fix unbound remote denial of service vulnerability. Modified: releng/10.1/contrib/ntp/ntpd/ntp_config.c ============================================================================== --- releng/10.1/contrib/ntp/ntpd/ntp_config.c Tue Dec 23 22:55:14 2014 (r276158) +++ releng/10.1/contrib/ntp/ntpd/ntp_config.c Tue Dec 23 22:56:01 2014 (r276159) @@ -1887,7 +1887,7 @@ getconfig( for (i = 0; i < 8; i++) for (j = 1; j < 100; ++j) { - rankey[i] = (char) (ntp_random() & 0xff); + rankey[i] = (char) (arc4random() & 0xff); if (rankey[i] != 0) break; } rankey[8] = 0; Modified: releng/10.1/contrib/ntp/ntpd/ntp_control.c ============================================================================== --- releng/10.1/contrib/ntp/ntpd/ntp_control.c Tue Dec 23 22:55:14 2014 (r276158) +++ releng/10.1/contrib/ntp/ntpd/ntp_control.c Tue Dec 23 22:56:01 2014 (r276159) @@ -24,6 +24,10 @@ #include #include +#ifndef MIN +#define MIN(a, b) (((a) <= (b)) ? (a) : (b)) +#endif + /* * Structure to hold request procedure information */ @@ -893,6 +897,7 @@ ctl_putdata( ) { int overhead; + unsigned int currentlen; overhead = 0; if (!bin) { @@ -916,12 +921,22 @@ ctl_putdata( /* * Save room for trailing junk */ - if (dlen + overhead + datapt > dataend) { + while (dlen + overhead + datapt > dataend) { /* * Not enough room in this one, flush it out. */ + currentlen = MIN(dlen, dataend - datapt); + + memcpy(datapt, dp, currentlen); + + datapt += currentlen; + dp += currentlen; + dlen -= currentlen; + datalinelen += currentlen; + ctl_flushpkt(CTL_MORE); } + memmove((char *)datapt, dp, (unsigned)dlen); datapt += dlen; datalinelen += dlen; Modified: releng/10.1/contrib/ntp/ntpd/ntp_crypto.c ============================================================================== --- releng/10.1/contrib/ntp/ntpd/ntp_crypto.c Tue Dec 23 22:55:14 2014 (r276158) +++ releng/10.1/contrib/ntp/ntpd/ntp_crypto.c Tue Dec 23 22:56:01 2014 (r276159) @@ -864,12 +864,24 @@ crypto_recv( * errors. */ if (vallen == (u_int) EVP_PKEY_size(host_pkey)) { - RSA_private_decrypt(vallen, + u_int32 *cookiebuf = malloc( + RSA_size(host_pkey->pkey.rsa)); + if (cookiebuf == NULL) { + rval = XEVNT_CKY; + break; + } + if (RSA_private_decrypt(vallen, (u_char *)ep->pkt, - (u_char *)&temp32, + (u_char *)cookiebuf, host_pkey->pkey.rsa, - RSA_PKCS1_OAEP_PADDING); - cookie = ntohl(temp32); + RSA_PKCS1_OAEP_PADDING) != 4) { + rval = XEVNT_CKY; + free(cookiebuf); + break; + } else { + cookie = ntohl(*cookiebuf); + free(cookiebuf); + } } else { rval = XEVNT_CKY; break; @@ -3914,7 +3926,7 @@ crypto_setup(void) rand_file); exit (-1); } - get_systime(&seed); + arc4random_buf(&seed, sizeof(l_fp)); RAND_seed(&seed, sizeof(l_fp)); RAND_write_file(rand_file); OpenSSL_add_all_algorithms(); Modified: releng/10.1/contrib/ntp/ntpd/ntp_proto.c ============================================================================== --- releng/10.1/contrib/ntp/ntpd/ntp_proto.c Tue Dec 23 22:55:14 2014 (r276158) +++ releng/10.1/contrib/ntp/ntpd/ntp_proto.c Tue Dec 23 22:56:01 2014 (r276159) @@ -649,6 +649,7 @@ receive( has_mac)) { is_authentic = AUTH_ERROR; sys_badauth++; + return; } else { is_authentic = AUTH_OK; } Modified: releng/10.1/contrib/ntp/util/ntp-keygen.c ============================================================================== --- releng/10.1/contrib/ntp/util/ntp-keygen.c Tue Dec 23 22:55:14 2014 (r276158) +++ releng/10.1/contrib/ntp/util/ntp-keygen.c Tue Dec 23 22:56:01 2014 (r276159) @@ -642,7 +642,7 @@ gen_md5( for (i = 1; i <= MD5KEYS; i++) { for (j = 0; j < 16; j++) { while (1) { - temp = ntp_random() & 0xff; + temp = arc4random() & 0xff; if (temp == '#') continue; if (temp > 0x20 && temp < 0x7f) @@ -675,7 +675,7 @@ gen_rsa( FILE *str; fprintf(stderr, "Generating RSA keys (%d bits)...\n", modulus); - rsa = RSA_generate_key(modulus, 3, cb, "RSA"); + rsa = RSA_generate_key(modulus, 65537, cb, "RSA"); fprintf(stderr, "\n"); if (rsa == NULL) { fprintf(stderr, "RSA generate keys fails\n%s\n", @@ -954,7 +954,7 @@ gen_gqpar( */ fprintf(stderr, "Generating GQ parameters (%d bits)...\n", modulus); - rsa = RSA_generate_key(modulus, 3, cb, "GQ"); + rsa = RSA_generate_key(modulus, 65537, cb, "GQ"); fprintf(stderr, "\n"); if (rsa == NULL) { fprintf(stderr, "RSA generate keys fails\n%s\n", Modified: releng/10.1/sys/conf/newvers.sh ============================================================================== --- releng/10.1/sys/conf/newvers.sh Tue Dec 23 22:55:14 2014 (r276158) +++ releng/10.1/sys/conf/newvers.sh Tue Dec 23 22:56:01 2014 (r276159) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="10.1" -BRANCH="RELEASE-p2" +BRANCH="RELEASE-p3" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi Modified: releng/10.1/usr.sbin/freebsd-update/freebsd-update.sh ============================================================================== --- releng/10.1/usr.sbin/freebsd-update/freebsd-update.sh Tue Dec 23 22:55:14 2014 (r276158) +++ releng/10.1/usr.sbin/freebsd-update/freebsd-update.sh Tue Dec 23 22:56:01 2014 (r276159) @@ -1387,6 +1387,7 @@ fetch_filter_metadata () { # matter, since we add a leading "/" when we use paths later. cut -f 3- -d '|' $1 | sed -e 's,/|d|,|d|,' | + sed -e 's,/|-|,|-|,' | sort -u > $1.tmp # Figure out which lines to ignore and remove them. From owner-svn-src-all@FreeBSD.ORG Wed Dec 24 01:10:54 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6ACA4F08; Wed, 24 Dec 2014 01:10:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5720E158C; Wed, 24 Dec 2014 01:10:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBO1AsCm074250; Wed, 24 Dec 2014 01:10:54 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBO1AsBc074249; Wed, 24 Dec 2014 01:10:54 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201412240110.sBO1AsBc074249@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Wed, 24 Dec 2014 01:10:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276161 - head/sys/boot/fdt/dts/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Dec 2014 01:10:54 -0000 Author: ian Date: Wed Dec 24 01:10:53 2014 New Revision: 276161 URL: https://svnweb.freebsd.org/changeset/base/276161 Log: Revert r276101, it didn't fix the problem and causes a compile error (nested comment blocks). Modified: head/sys/boot/fdt/dts/arm/rpi.dts Modified: head/sys/boot/fdt/dts/arm/rpi.dts ============================================================================== --- head/sys/boot/fdt/dts/arm/rpi.dts Tue Dec 23 23:43:20 2014 (r276160) +++ head/sys/boot/fdt/dts/arm/rpi.dts Wed Dec 24 01:10:53 2014 (r276161) @@ -35,7 +35,6 @@ memreserve = <0x08000000 0x08000000>; /* Set by VideoCore */ - /* cpus { #address-cells = <1>; #size-cells = <0>; @@ -46,7 +45,6 @@ clock-frequency = <700000000>; /* 700MHz */ }; }; - */ memory { device_type = "memory"; From owner-svn-src-all@FreeBSD.ORG Wed Dec 24 01:19:12 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B262C271; Wed, 24 Dec 2014 01:19:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9EFCF16DF; Wed, 24 Dec 2014 01:19:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBO1JCVs076916; Wed, 24 Dec 2014 01:19:12 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBO1JCJB076915; Wed, 24 Dec 2014 01:19:12 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201412240119.sBO1JCJB076915@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Wed, 24 Dec 2014 01:19:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276162 - head/sys/dev/ofw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Dec 2014 01:19:12 -0000 Author: ian Date: Wed Dec 24 01:19:11 2014 New Revision: 276162 URL: https://svnweb.freebsd.org/changeset/base/276162 Log: Don't assume required FDT properties are present. Modified: head/sys/dev/ofw/ofw_cpu.c Modified: head/sys/dev/ofw/ofw_cpu.c ============================================================================== --- head/sys/dev/ofw/ofw_cpu.c Wed Dec 24 01:10:53 2014 (r276161) +++ head/sys/dev/ofw/ofw_cpu.c Wed Dec 24 01:19:11 2014 (r276162) @@ -171,7 +171,7 @@ ofw_cpu_probe(device_t dev) { const char *type = ofw_bus_get_type(dev); - if (strcmp(type, "cpu") != 0) + if (type == NULL || strcmp(type, "cpu") != 0) return (ENXIO); device_set_desc(dev, "Open Firmware CPU"); @@ -182,12 +182,20 @@ static int ofw_cpu_attach(device_t dev) { struct ofw_cpu_softc *sc; + phandle_t node; uint32_t cell; sc = device_get_softc(dev); - OF_getprop(ofw_bus_get_node(dev), "reg", &cell, sizeof(cell)); + node = ofw_bus_get_node(dev); + if (OF_getencprop(node, "reg", &cell, sizeof(cell)) < 0) { + cell = device_get_unit(dev); + device_printf(dev, "missing 'reg' property, using %u\n", cell); + } sc->sc_cpu_pcpu = pcpu_find(cell); - OF_getprop(ofw_bus_get_node(dev), "clock-frequency", &cell, sizeof(cell)); + if (OF_getencprop(node, "clock-frequency", &cell, sizeof(cell)) < 0) { + device_printf(dev, "missing 'clock-frequency' property\n"); + return (ENXIO); + } sc->sc_nominal_mhz = cell / 1000000; /* convert to MHz */ bus_generic_probe(dev); From owner-svn-src-all@FreeBSD.ORG Wed Dec 24 01:34:53 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8CDD99A0; Wed, 24 Dec 2014 01:34:53 +0000 (UTC) Received: from st11p02mm-asmtp002.mac.com (st11p02mm-asmtp002.mac.com [17.172.220.237]) (using TLSv1.2 with cipher DHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 61E781B37; Wed, 24 Dec 2014 01:34:52 +0000 (UTC) Received: from fukuyama.hsd1.ca.comcast.net (unknown [73.162.13.215]) by st11p02mm-asmtp002.mac.com (Oracle Communications Messaging Server 7.0.5.33.0 64bit (built Aug 27 2014)) with ESMTPSA id <0NH2005DQCDVNZ40@st11p02mm-asmtp002.mac.com>; Wed, 24 Dec 2014 01:34:45 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.13.68,1.0.33,0.0.0000 definitions=2014-12-24_01:2014-12-24,2014-12-23,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1412080000 definitions=main-1412240016 Content-type: text/plain; charset=us-ascii MIME-version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Subject: Re: svn commit: r276161 - head/sys/boot/fdt/dts/arm From: Rui Paulo In-reply-to: <201412240110.sBO1AsBc074249@svn.freebsd.org> Date: Tue, 23 Dec 2014 17:34:42 -0800 Content-transfer-encoding: 7bit Message-id: References: <201412240110.sBO1AsBc074249@svn.freebsd.org> To: Ian Lepore X-Mailer: Apple Mail (2.1993) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Dec 2014 01:34:53 -0000 On Dec 23, 2014, at 17:10, Ian Lepore wrote: > > Author: ian > Date: Wed Dec 24 01:10:53 2014 > New Revision: 276161 > URL: https://svnweb.freebsd.org/changeset/base/276161 > > Log: > Revert r276101, it didn't fix the problem and causes a compile error > (nested comment blocks). Ew. I thought I had compiled it in the kernel. -- Rui Paulo From owner-svn-src-all@FreeBSD.ORG Wed Dec 24 01:50:45 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E9231E78; Wed, 24 Dec 2014 01:50:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D643B1D6C; Wed, 24 Dec 2014 01:50:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBO1ojis093983; Wed, 24 Dec 2014 01:50:45 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBO1ojuA093982; Wed, 24 Dec 2014 01:50:45 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201412240150.sBO1ojuA093982@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Wed, 24 Dec 2014 01:50:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276163 - head/etc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Dec 2014 01:50:46 -0000 Author: smh Date: Wed Dec 24 01:50:44 2014 New Revision: 276163 URL: https://svnweb.freebsd.org/changeset/base/276163 Log: Allow info to display correctly in for varying tabstop settings The SAMPLE message and notes where tab seperated for some parts and hence displayed incorrectly unless tabstop was set to 8. Switch to spaces to it displays correctly independent of the tabstop setting. Sponsored by: Multiplay Modified: head/etc/hosts.allow Modified: head/etc/hosts.allow ============================================================================== --- head/etc/hosts.allow Wed Dec 24 01:19:11 2014 (r276162) +++ head/etc/hosts.allow Wed Dec 24 01:50:44 2014 (r276163) @@ -4,15 +4,15 @@ # # NOTE: The hosts.deny file is deprecated. # Place both 'allow' and 'deny' rules in the hosts.allow file. -# See hosts_options(5) for the format of this file. -# hosts_access(5) no longer fully applies. - -# _____ _ _ -# | ____| __ __ __ _ _ __ ___ _ __ | | ___ | | -# | _| \ \/ / / _` | | '_ ` _ \ | '_ \ | | / _ \ | | -# | |___ > < | (_| | | | | | | | | |_) | | | | __/ |_| -# |_____| /_/\_\ \__,_| |_| |_| |_| | .__/ |_| \___| (_) -# |_| +# See hosts_options(5) for the format of this file. +# hosts_access(5) no longer fully applies. +# +# _____ _ _ +# | ____| __ __ __ _ _ __ ___ _ __ | | ___ | | +# | _| \ \/ / / _` | | '_ ` _ \ | '_ \ | | / _ \ | | +# | |___ > < | (_| | | | | | | | | |_) | | | | __/ |_| +# |_____| /_/\_\ \__,_| |_| |_| |_| | .__/ |_| \___| (_) +# |_| # !!! This is an example! You will need to modify it for your specific # !!! requirements! From owner-svn-src-all@FreeBSD.ORG Wed Dec 24 03:02:13 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 809B4A71; Wed, 24 Dec 2014 03:02:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 422CDDC2; Wed, 24 Dec 2014 03:02:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBO32D7e030428; Wed, 24 Dec 2014 03:02:13 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBO32D0T030427; Wed, 24 Dec 2014 03:02:13 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201412240302.sBO32D0T030427@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Wed, 24 Dec 2014 03:02:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276165 - head/sys/arm/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Dec 2014 03:02:13 -0000 Author: ian Date: Wed Dec 24 03:02:12 2014 New Revision: 276165 URL: https://svnweb.freebsd.org/changeset/base/276165 Log: Define the old-school arm arch constants we still use internally based on the somewhat newer constants predefined by the compiler. This will allow userland apps to use various machine/foo.h headers without CPUTYPE defined. Modified: head/sys/arm/include/cpuconf.h Modified: head/sys/arm/include/cpuconf.h ============================================================================== --- head/sys/arm/include/cpuconf.h Wed Dec 24 03:00:23 2014 (r276164) +++ head/sys/arm/include/cpuconf.h Wed Dec 24 03:02:12 2014 (r276165) @@ -85,20 +85,43 @@ #endif #if !defined(ARM_ARCH_6) -#if defined(CPU_ARM1136) || defined(CPU_ARM1176) +#if defined(CPU_ARM1136) || defined(CPU_ARM1176) || defined(CPU_MV_PJ4B) #define ARM_ARCH_6 1 #else #define ARM_ARCH_6 0 #endif #endif -#if defined(CPU_CORTEXA) || defined(CPU_KRAIT) || defined(CPU_MV_PJ4B) +#if defined(CPU_CORTEXA) || defined(CPU_KRAIT) #define ARM_ARCH_7A 1 #else #define ARM_ARCH_7A 0 #endif #define ARM_NARCH (ARM_ARCH_4 + ARM_ARCH_5 + ARM_ARCH_6 | ARM_ARCH_7A) + +/* + * Compatibility for userland builds that have no CPUTYPE defined. Use the ARCH + * constants predefined by the compiler to define our old-school arch constants. + * This is a stopgap measure to tide us over until the conversion of all code + * to the newer ACLE constants defined by ARM (see acle-compat.h). + */ +#if ARM_NARCH == 0 +#if defined(__ARM_ARCH_4T__) +#undef ARM_ARCH_4 +#undef ARM_NARCH +#define ARM_ARCH_4 1 +#define ARM_NARCH 1 +#define CPU_ARM9 1 +#elif defined(__ARM_ARCH_6ZK__) +#undef ARM_ARCH_6 +#undef ARM_NARCH +#define ARM_ARCH_6 1 +#define ARM_NARCH 1 +#define CPU_ARM1176 1 +#endif +#endif + #if ARM_NARCH == 0 && !defined(KLD_MODULE) && defined(_KERNEL) #error ARM_NARCH is 0 #endif From owner-svn-src-all@FreeBSD.ORG Wed Dec 24 03:09:56 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 50BD6DF9; Wed, 24 Dec 2014 03:09:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3DC66F35; Wed, 24 Dec 2014 03:09:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBO39u6p031394; Wed, 24 Dec 2014 03:09:56 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBO39uZv031393; Wed, 24 Dec 2014 03:09:56 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201412240309.sBO39uZv031393@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Wed, 24 Dec 2014 03:09:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276166 - head/sys/arm/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Dec 2014 03:09:56 -0000 Author: ian Date: Wed Dec 24 03:09:55 2014 New Revision: 276166 URL: https://svnweb.freebsd.org/changeset/base/276166 Log: Revert a glitched mismerge that got caught up in the prior commit. The PJ4B family is still armv7, not armv6. Modified: head/sys/arm/include/cpuconf.h Modified: head/sys/arm/include/cpuconf.h ============================================================================== --- head/sys/arm/include/cpuconf.h Wed Dec 24 03:02:12 2014 (r276165) +++ head/sys/arm/include/cpuconf.h Wed Dec 24 03:09:55 2014 (r276166) @@ -85,14 +85,14 @@ #endif #if !defined(ARM_ARCH_6) -#if defined(CPU_ARM1136) || defined(CPU_ARM1176) || defined(CPU_MV_PJ4B) +#if defined(CPU_ARM1136) || defined(CPU_ARM1176) #define ARM_ARCH_6 1 #else #define ARM_ARCH_6 0 #endif #endif -#if defined(CPU_CORTEXA) || defined(CPU_KRAIT) +#if defined(CPU_CORTEXA) || defined(CPU_KRAIT) || defined(CPU_MV_PJ4B) #define ARM_ARCH_7A 1 #else #define ARM_ARCH_7A 0 From owner-svn-src-all@FreeBSD.ORG Wed Dec 24 03:24:51 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5670E1B7; Wed, 24 Dec 2014 03:24:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4348664122; Wed, 24 Dec 2014 03:24:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBO3OpVD040196; Wed, 24 Dec 2014 03:24:51 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBO3OpYK040195; Wed, 24 Dec 2014 03:24:51 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201412240324.sBO3OpYK040195@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Wed, 24 Dec 2014 03:24:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276168 - head/sys/dev/gpio X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Dec 2014 03:24:51 -0000 Author: loos Date: Wed Dec 24 03:24:50 2014 New Revision: 276168 URL: https://svnweb.freebsd.org/changeset/base/276168 Log: Improves the GPIO API description a little bit. gpio_pin_max must return the maximum supported pin number and not the total number of pins on the system. PR: 157070 Submitted by: brix Modified: head/sys/dev/gpio/gpio_if.m Modified: head/sys/dev/gpio/gpio_if.m ============================================================================== --- head/sys/dev/gpio/gpio_if.m Wed Dec 24 03:13:16 2014 (r276167) +++ head/sys/dev/gpio/gpio_if.m Wed Dec 24 03:24:50 2014 (r276168) @@ -56,11 +56,11 @@ HEADER { }; # -# Get total number of pins +# Get maximum pin number # METHOD int pin_max { device_t dev; - int *npins; + int *maxpin; }; # From owner-svn-src-all@FreeBSD.ORG Wed Dec 24 03:49:35 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 10B974A4; Wed, 24 Dec 2014 03:49:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E6E4364355; Wed, 24 Dec 2014 03:49:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBO3nYWE050077; Wed, 24 Dec 2014 03:49:34 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBO3nY3u050074; Wed, 24 Dec 2014 03:49:34 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201412240349.sBO3nY3u050074@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 24 Dec 2014 03:49:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276169 - head/sys/dev/fxp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Dec 2014 03:49:35 -0000 Author: imp Date: Wed Dec 24 03:49:33 2014 New Revision: 276169 URL: https://svnweb.freebsd.org/changeset/base/276169 Log: Add Intel vendor ID to the device table to make it more uniform so that all the pnp info to match the device is in the fxp_ident_table. Modified: head/sys/dev/fxp/if_fxp.c head/sys/dev/fxp/if_fxpreg.h head/sys/dev/fxp/if_fxpvar.h Modified: head/sys/dev/fxp/if_fxp.c ============================================================================== --- head/sys/dev/fxp/if_fxp.c Wed Dec 24 03:24:50 2014 (r276168) +++ head/sys/dev/fxp/if_fxp.c Wed Dec 24 03:49:33 2014 (r276169) @@ -157,52 +157,52 @@ static const u_char fxp_cb_config_templa * them. */ static const struct fxp_ident fxp_ident_table[] = { - { 0x1029, -1, 0, "Intel 82559 PCI/CardBus Pro/100" }, - { 0x1030, -1, 0, "Intel 82559 Pro/100 Ethernet" }, - { 0x1031, -1, 3, "Intel 82801CAM (ICH3) Pro/100 VE Ethernet" }, - { 0x1032, -1, 3, "Intel 82801CAM (ICH3) Pro/100 VE Ethernet" }, - { 0x1033, -1, 3, "Intel 82801CAM (ICH3) Pro/100 VM Ethernet" }, - { 0x1034, -1, 3, "Intel 82801CAM (ICH3) Pro/100 VM Ethernet" }, - { 0x1035, -1, 3, "Intel 82801CAM (ICH3) Pro/100 Ethernet" }, - { 0x1036, -1, 3, "Intel 82801CAM (ICH3) Pro/100 Ethernet" }, - { 0x1037, -1, 3, "Intel 82801CAM (ICH3) Pro/100 Ethernet" }, - { 0x1038, -1, 3, "Intel 82801CAM (ICH3) Pro/100 VM Ethernet" }, - { 0x1039, -1, 4, "Intel 82801DB (ICH4) Pro/100 VE Ethernet" }, - { 0x103A, -1, 4, "Intel 82801DB (ICH4) Pro/100 Ethernet" }, - { 0x103B, -1, 4, "Intel 82801DB (ICH4) Pro/100 VM Ethernet" }, - { 0x103C, -1, 4, "Intel 82801DB (ICH4) Pro/100 Ethernet" }, - { 0x103D, -1, 4, "Intel 82801DB (ICH4) Pro/100 VE Ethernet" }, - { 0x103E, -1, 4, "Intel 82801DB (ICH4) Pro/100 VM Ethernet" }, - { 0x1050, -1, 5, "Intel 82801BA (D865) Pro/100 VE Ethernet" }, - { 0x1051, -1, 5, "Intel 82562ET (ICH5/ICH5R) Pro/100 VE Ethernet" }, - { 0x1059, -1, 0, "Intel 82551QM Pro/100 M Mobile Connection" }, - { 0x1064, -1, 6, "Intel 82562EZ (ICH6)" }, - { 0x1065, -1, 6, "Intel 82562ET/EZ/GT/GZ PRO/100 VE Ethernet" }, - { 0x1068, -1, 6, "Intel 82801FBM (ICH6-M) Pro/100 VE Ethernet" }, - { 0x1069, -1, 6, "Intel 82562EM/EX/GX Pro/100 Ethernet" }, - { 0x1091, -1, 7, "Intel 82562GX Pro/100 Ethernet" }, - { 0x1092, -1, 7, "Intel Pro/100 VE Network Connection" }, - { 0x1093, -1, 7, "Intel Pro/100 VM Network Connection" }, - { 0x1094, -1, 7, "Intel Pro/100 946GZ (ICH7) Network Connection" }, - { 0x1209, -1, 0, "Intel 82559ER Embedded 10/100 Ethernet" }, - { 0x1229, 0x01, 0, "Intel 82557 Pro/100 Ethernet" }, - { 0x1229, 0x02, 0, "Intel 82557 Pro/100 Ethernet" }, - { 0x1229, 0x03, 0, "Intel 82557 Pro/100 Ethernet" }, - { 0x1229, 0x04, 0, "Intel 82558 Pro/100 Ethernet" }, - { 0x1229, 0x05, 0, "Intel 82558 Pro/100 Ethernet" }, - { 0x1229, 0x06, 0, "Intel 82559 Pro/100 Ethernet" }, - { 0x1229, 0x07, 0, "Intel 82559 Pro/100 Ethernet" }, - { 0x1229, 0x08, 0, "Intel 82559 Pro/100 Ethernet" }, - { 0x1229, 0x09, 0, "Intel 82559ER Pro/100 Ethernet" }, - { 0x1229, 0x0c, 0, "Intel 82550 Pro/100 Ethernet" }, - { 0x1229, 0x0d, 0, "Intel 82550C Pro/100 Ethernet" }, - { 0x1229, 0x0e, 0, "Intel 82550 Pro/100 Ethernet" }, - { 0x1229, 0x0f, 0, "Intel 82551 Pro/100 Ethernet" }, - { 0x1229, 0x10, 0, "Intel 82551 Pro/100 Ethernet" }, - { 0x1229, -1, 0, "Intel 82557/8/9 Pro/100 Ethernet" }, - { 0x2449, -1, 2, "Intel 82801BA/CAM (ICH2/3) Pro/100 Ethernet" }, - { 0x27dc, -1, 7, "Intel 82801GB (ICH7) 10/100 Ethernet" }, - { 0, -1, 0, NULL }, + { 0x8086, 0x1029, -1, 0, "Intel 82559 PCI/CardBus Pro/100" }, + { 0x8086, 0x1030, -1, 0, "Intel 82559 Pro/100 Ethernet" }, + { 0x8086, 0x1031, -1, 3, "Intel 82801CAM (ICH3) Pro/100 VE Ethernet" }, + { 0x8086, 0x1032, -1, 3, "Intel 82801CAM (ICH3) Pro/100 VE Ethernet" }, + { 0x8086, 0x1033, -1, 3, "Intel 82801CAM (ICH3) Pro/100 VM Ethernet" }, + { 0x8086, 0x1034, -1, 3, "Intel 82801CAM (ICH3) Pro/100 VM Ethernet" }, + { 0x8086, 0x1035, -1, 3, "Intel 82801CAM (ICH3) Pro/100 Ethernet" }, + { 0x8086, 0x1036, -1, 3, "Intel 82801CAM (ICH3) Pro/100 Ethernet" }, + { 0x8086, 0x1037, -1, 3, "Intel 82801CAM (ICH3) Pro/100 Ethernet" }, + { 0x8086, 0x1038, -1, 3, "Intel 82801CAM (ICH3) Pro/100 VM Ethernet" }, + { 0x8086, 0x1039, -1, 4, "Intel 82801DB (ICH4) Pro/100 VE Ethernet" }, + { 0x8086, 0x103A, -1, 4, "Intel 82801DB (ICH4) Pro/100 Ethernet" }, + { 0x8086, 0x103B, -1, 4, "Intel 82801DB (ICH4) Pro/100 VM Ethernet" }, + { 0x8086, 0x103C, -1, 4, "Intel 82801DB (ICH4) Pro/100 Ethernet" }, + { 0x8086, 0x103D, -1, 4, "Intel 82801DB (ICH4) Pro/100 VE Ethernet" }, + { 0x8086, 0x103E, -1, 4, "Intel 82801DB (ICH4) Pro/100 VM Ethernet" }, + { 0x8086, 0x1050, -1, 5, "Intel 82801BA (D865) Pro/100 VE Ethernet" }, + { 0x8086, 0x1051, -1, 5, "Intel 82562ET (ICH5/ICH5R) Pro/100 VE Ethernet" }, + { 0x8086, 0x1059, -1, 0, "Intel 82551QM Pro/100 M Mobile Connection" }, + { 0x8086, 0x1064, -1, 6, "Intel 82562EZ (ICH6)" }, + { 0x8086, 0x1065, -1, 6, "Intel 82562ET/EZ/GT/GZ PRO/100 VE Ethernet" }, + { 0x8086, 0x1068, -1, 6, "Intel 82801FBM (ICH6-M) Pro/100 VE Ethernet" }, + { 0x8086, 0x1069, -1, 6, "Intel 82562EM/EX/GX Pro/100 Ethernet" }, + { 0x8086, 0x1091, -1, 7, "Intel 82562GX Pro/100 Ethernet" }, + { 0x8086, 0x1092, -1, 7, "Intel Pro/100 VE Network Connection" }, + { 0x8086, 0x1093, -1, 7, "Intel Pro/100 VM Network Connection" }, + { 0x8086, 0x1094, -1, 7, "Intel Pro/100 946GZ (ICH7) Network Connection" }, + { 0x8086, 0x1209, -1, 0, "Intel 82559ER Embedded 10/100 Ethernet" }, + { 0x8086, 0x1229, 0x01, 0, "Intel 82557 Pro/100 Ethernet" }, + { 0x8086, 0x1229, 0x02, 0, "Intel 82557 Pro/100 Ethernet" }, + { 0x8086, 0x1229, 0x03, 0, "Intel 82557 Pro/100 Ethernet" }, + { 0x8086, 0x1229, 0x04, 0, "Intel 82558 Pro/100 Ethernet" }, + { 0x8086, 0x1229, 0x05, 0, "Intel 82558 Pro/100 Ethernet" }, + { 0x8086, 0x1229, 0x06, 0, "Intel 82559 Pro/100 Ethernet" }, + { 0x8086, 0x1229, 0x07, 0, "Intel 82559 Pro/100 Ethernet" }, + { 0x8086, 0x1229, 0x08, 0, "Intel 82559 Pro/100 Ethernet" }, + { 0x8086, 0x1229, 0x09, 0, "Intel 82559ER Pro/100 Ethernet" }, + { 0x8086, 0x1229, 0x0c, 0, "Intel 82550 Pro/100 Ethernet" }, + { 0x8086, 0x1229, 0x0d, 0, "Intel 82550C Pro/100 Ethernet" }, + { 0x8086, 0x1229, 0x0e, 0, "Intel 82550 Pro/100 Ethernet" }, + { 0x8086, 0x1229, 0x0f, 0, "Intel 82551 Pro/100 Ethernet" }, + { 0x8086, 0x1229, 0x10, 0, "Intel 82551 Pro/100 Ethernet" }, + { 0x8086, 0x1229, -1, 0, "Intel 82557/8/9 Pro/100 Ethernet" }, + { 0x8086, 0x2449, -1, 2, "Intel 82801BA/CAM (ICH2/3) Pro/100 Ethernet" }, + { 0x8086, 0x27dc, -1, 7, "Intel 82801GB (ICH7) 10/100 Ethernet" }, + { 0, 0, -1, 0, NULL }, }; #ifdef FXP_IP_CSUM_WAR @@ -374,18 +374,18 @@ fxp_dma_wait(struct fxp_softc *sc, volat static const struct fxp_ident * fxp_find_ident(device_t dev) { - uint16_t devid; + uint16_t vendor; + uint16_t device; uint8_t revid; const struct fxp_ident *ident; - if (pci_get_vendor(dev) == FXP_VENDORID_INTEL) { - devid = pci_get_device(dev); - revid = pci_get_revid(dev); - for (ident = fxp_ident_table; ident->name != NULL; ident++) { - if (ident->devid == devid && - (ident->revid == revid || ident->revid == -1)) { - return (ident); - } + vendor = pci_get_vendor(dev); + device = pci_get_device(dev); + revid = pci_get_revid(dev); + for (ident = fxp_ident_table; ident->name != NULL; ident++) { + if (ident->vendor == vendor && ident->device == device && + (ident->revid == revid || ident->revid == -1)) { + return (ident); } } return (NULL); @@ -628,7 +628,7 @@ fxp_attach(device_t dev) /* For 82559 or later chips, Rx checksum offload is supported. */ if (sc->revision >= FXP_REV_82559_A0) { /* 82559ER does not support Rx checksum offloading. */ - if (sc->ident->devid != 0x1209) + if (sc->ident->device != 0x1209) sc->flags |= FXP_FLAG_82559_RXCSUM; } /* Modified: head/sys/dev/fxp/if_fxpreg.h ============================================================================== --- head/sys/dev/fxp/if_fxpreg.h Wed Dec 24 03:24:50 2014 (r276168) +++ head/sys/dev/fxp/if_fxpreg.h Wed Dec 24 03:49:33 2014 (r276169) @@ -28,8 +28,6 @@ * $FreeBSD$ */ -#define FXP_VENDORID_INTEL 0x8086 - #define FXP_PCI_MMBA 0x10 #define FXP_PCI_IOBA 0x14 Modified: head/sys/dev/fxp/if_fxpvar.h ============================================================================== --- head/sys/dev/fxp/if_fxpvar.h Wed Dec 24 03:24:50 2014 (r276168) +++ head/sys/dev/fxp/if_fxpvar.h Wed Dec 24 03:49:33 2014 (r276169) @@ -143,7 +143,8 @@ struct fxp_desc_list { }; struct fxp_ident { - uint16_t devid; + uint16_t vendor; + uint16_t device; int16_t revid; /* -1 matches anything */ uint8_t ich; const char *name; From owner-svn-src-all@FreeBSD.ORG Wed Dec 24 04:24:10 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1E771C32; Wed, 24 Dec 2014 04:24:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0A9F21ED; Wed, 24 Dec 2014 04:24:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBO4O95E068444; Wed, 24 Dec 2014 04:24:09 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBO4O9Rl068442; Wed, 24 Dec 2014 04:24:09 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201412240424.sBO4O9Rl068442@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Wed, 24 Dec 2014 04:24:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276173 - head/sys/arm/ti X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Dec 2014 04:24:10 -0000 Author: loos Date: Wed Dec 24 04:24:08 2014 New Revision: 276173 URL: https://svnweb.freebsd.org/changeset/base/276173 Log: Bring in the last round of updates before adding the interrupt support. Fix the following issues: - Removed revision from device softc, it isn't used anywhere else out of device attach routine; - Move the duplicated code for verification of valid banks (and pins) to a single function; - Use some macros to simplify the handling of some constants; - Update some stale comments. Modified: head/sys/arm/ti/ti_gpio.c head/sys/arm/ti/ti_gpio.h Modified: head/sys/arm/ti/ti_gpio.c ============================================================================== --- head/sys/arm/ti/ti_gpio.c Wed Dec 24 03:53:59 2014 (r276172) +++ head/sys/arm/ti/ti_gpio.c Wed Dec 24 04:24:08 2014 (r276173) @@ -117,6 +117,8 @@ __FBSDID("$FreeBSD$"); #define AM335X_INTR_PER_BANK 2 #define AM335X_GPIO_REV 0x50600801 #define PINS_PER_BANK 32 +#define TI_GPIO_BANK(p) ((p) / PINS_PER_BANK) +#define TI_GPIO_MASK(p) (1U << ((p) % PINS_PER_BANK)) static u_int ti_max_gpio_banks(void) @@ -236,7 +238,7 @@ static struct resource_spec ti_gpio_irq_ #define TI_GPIO_ASSERT_UNLOCKED(_sc) mtx_assert(&_sc->sc_mtx, MA_NOTOWNED) /** - * ti_gpio_read_4 - reads a 16-bit value from one of the PADCONFS registers + * ti_gpio_read_4 - reads a 32-bit value from one of the GPIO registers * @sc: GPIO device context * @bank: The bank to read from * @off: The offset of a register from the GPIO register address range @@ -252,7 +254,7 @@ ti_gpio_read_4(struct ti_gpio_softc *sc, } /** - * ti_gpio_write_4 - writes a 32-bit value to one of the PADCONFS registers + * ti_gpio_write_4 - writes a 32-bit value to one of the GPIO registers * @sc: GPIO device context * @bank: The bank to write to * @off: The offset of a register from the GPIO register address range @@ -299,6 +301,19 @@ ti_gpio_pin_max(device_t dev, int *maxpi return (0); } +static int +ti_gpio_valid_pin(struct ti_gpio_softc *sc, int pin) +{ + + if (pin > sc->sc_maxpin || + TI_GPIO_BANK(pin) >= ti_max_gpio_banks() || + sc->sc_mem_res[TI_GPIO_BANK(pin)] == NULL) { + return (EINVAL); + } + + return (0); +} + /** * ti_gpio_pin_getcaps - Gets the capabilties of a given pin * @dev: gpio device handle @@ -320,11 +335,10 @@ ti_gpio_pin_max(device_t dev, int *maxpi static int ti_gpio_pin_getcaps(device_t dev, uint32_t pin, uint32_t *caps) { - struct ti_gpio_softc *sc = device_get_softc(dev); - uint32_t bank = (pin / PINS_PER_BANK); + struct ti_gpio_softc *sc; - /* Sanity check the pin number is valid */ - if ((bank >= ti_max_gpio_banks()) || (sc->sc_mem_res[bank] == NULL)) + sc = device_get_softc(dev); + if (ti_gpio_valid_pin(sc, pin) != 0) return (EINVAL); *caps = (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT | GPIO_PIN_PULLUP | @@ -352,11 +366,10 @@ ti_gpio_pin_getcaps(device_t dev, uint32 static int ti_gpio_pin_getflags(device_t dev, uint32_t pin, uint32_t *flags) { - struct ti_gpio_softc *sc = device_get_softc(dev); - uint32_t bank = (pin / PINS_PER_BANK); + struct ti_gpio_softc *sc; - /* Sanity check the pin number is valid */ - if ((bank >= ti_max_gpio_banks()) || (sc->sc_mem_res[bank] == NULL)) + sc = device_get_softc(dev); + if (ti_gpio_valid_pin(sc, pin) != 0) return (EINVAL); /* Get the current pin state */ @@ -385,11 +398,10 @@ ti_gpio_pin_getflags(device_t dev, uint3 static int ti_gpio_pin_getname(device_t dev, uint32_t pin, char *name) { - struct ti_gpio_softc *sc = device_get_softc(dev); - uint32_t bank = (pin / PINS_PER_BANK); + struct ti_gpio_softc *sc; - /* Sanity check the pin number is valid */ - if ((bank >= ti_max_gpio_banks()) || (sc->sc_mem_res[bank] == NULL)) + sc = device_get_softc(dev); + if (ti_gpio_valid_pin(sc, pin) != 0) return (EINVAL); /* Set a very simple name */ @@ -421,13 +433,11 @@ ti_gpio_pin_getname(device_t dev, uint32 static int ti_gpio_pin_setflags(device_t dev, uint32_t pin, uint32_t flags) { - struct ti_gpio_softc *sc = device_get_softc(dev); - uint32_t bank = (pin / PINS_PER_BANK); - uint32_t mask = (1UL << (pin % PINS_PER_BANK)); + struct ti_gpio_softc *sc; uint32_t oe; - /* Sanity check the pin number is valid */ - if ((bank >= ti_max_gpio_banks()) || (sc->sc_mem_res[bank] == NULL)) + sc = device_get_softc(dev); + if (ti_gpio_valid_pin(sc, pin) != 0) return (EINVAL); /* Set the GPIO mode and state */ @@ -438,12 +448,12 @@ ti_gpio_pin_setflags(device_t dev, uint3 } /* If configuring as an output set the "output enable" bit */ - oe = ti_gpio_read_4(sc, bank, TI_GPIO_OE); + oe = ti_gpio_read_4(sc, TI_GPIO_BANK(pin), TI_GPIO_OE); if (flags & GPIO_PIN_INPUT) - oe |= mask; + oe |= TI_GPIO_MASK(pin); else - oe &= ~mask; - ti_gpio_write_4(sc, bank, TI_GPIO_OE, oe); + oe &= ~TI_GPIO_MASK(pin); + ti_gpio_write_4(sc, TI_GPIO_BANK(pin), TI_GPIO_OE, oe); TI_GPIO_UNLOCK(sc); return (0); @@ -466,13 +476,11 @@ ti_gpio_pin_setflags(device_t dev, uint3 static int ti_gpio_pin_set(device_t dev, uint32_t pin, unsigned int value) { - struct ti_gpio_softc *sc = device_get_softc(dev); - uint32_t bank = (pin / PINS_PER_BANK); - uint32_t mask = (1UL << (pin % PINS_PER_BANK)); + struct ti_gpio_softc *sc; uint32_t reg; - /* Sanity check the pin number is valid */ - if ((bank >= ti_max_gpio_banks()) || (sc->sc_mem_res[bank] == NULL)) + sc = device_get_softc(dev); + if (ti_gpio_valid_pin(sc, pin) != 0) return (EINVAL); TI_GPIO_LOCK(sc); @@ -480,7 +488,7 @@ ti_gpio_pin_set(device_t dev, uint32_t p reg = TI_GPIO_CLEARDATAOUT; else reg = TI_GPIO_SETDATAOUT; - ti_gpio_write_4(sc, bank, reg, mask); + ti_gpio_write_4(sc, TI_GPIO_BANK(pin), reg, TI_GPIO_MASK(pin)); TI_GPIO_UNLOCK(sc); return (0); @@ -504,13 +512,11 @@ ti_gpio_pin_set(device_t dev, uint32_t p static int ti_gpio_pin_get(device_t dev, uint32_t pin, unsigned int *value) { - struct ti_gpio_softc *sc = device_get_softc(dev); - uint32_t bank = (pin / PINS_PER_BANK); - uint32_t mask = (1UL << (pin % PINS_PER_BANK)); - uint32_t oe, reg; + struct ti_gpio_softc *sc; + uint32_t oe, reg, val; - /* Sanity check the pin number is valid */ - if ((bank >= ti_max_gpio_banks()) || (sc->sc_mem_res[bank] == NULL)) + sc = device_get_softc(dev); + if (ti_gpio_valid_pin(sc, pin) != 0) return (EINVAL); /* @@ -518,12 +524,13 @@ ti_gpio_pin_get(device_t dev, uint32_t p * input register otherwise. */ TI_GPIO_LOCK(sc); - oe = ti_gpio_read_4(sc, bank, TI_GPIO_OE); - if (oe & mask) + oe = ti_gpio_read_4(sc, TI_GPIO_BANK(pin), TI_GPIO_OE); + if (oe & TI_GPIO_MASK(pin)) reg = TI_GPIO_DATAIN; else reg = TI_GPIO_DATAOUT; - *value = (ti_gpio_read_4(sc, bank, reg) & mask) ? 1 : 0; + val = ti_gpio_read_4(sc, TI_GPIO_BANK(pin), reg); + *value = (val & TI_GPIO_MASK(pin)) ? 1 : 0; TI_GPIO_UNLOCK(sc); return (0); @@ -544,23 +551,21 @@ ti_gpio_pin_get(device_t dev, uint32_t p static int ti_gpio_pin_toggle(device_t dev, uint32_t pin) { - struct ti_gpio_softc *sc = device_get_softc(dev); - uint32_t bank = (pin / PINS_PER_BANK); - uint32_t mask = (1UL << (pin % PINS_PER_BANK)); + struct ti_gpio_softc *sc; uint32_t reg, val; - /* Sanity check the pin number is valid */ - if ((bank >= ti_max_gpio_banks()) || (sc->sc_mem_res[bank] == NULL)) + sc = device_get_softc(dev); + if (ti_gpio_valid_pin(sc, pin) != 0) return (EINVAL); /* Toggle the pin */ TI_GPIO_LOCK(sc); - val = ti_gpio_read_4(sc, bank, TI_GPIO_DATAOUT); - if (val & mask) + val = ti_gpio_read_4(sc, TI_GPIO_BANK(pin), TI_GPIO_DATAOUT); + if (val & TI_GPIO_MASK(pin)) reg = TI_GPIO_CLEARDATAOUT; else reg = TI_GPIO_SETDATAOUT; - ti_gpio_write_4(sc, bank, reg, mask); + ti_gpio_write_4(sc, TI_GPIO_BANK(pin), reg, TI_GPIO_MASK(pin)); TI_GPIO_UNLOCK(sc); return (0); @@ -638,7 +643,7 @@ ti_gpio_bank_init(device_t dev, int bank { int pin; struct ti_gpio_softc *sc; - uint32_t flags, reg_oe; + uint32_t flags, reg_oe, rev; sc = device_get_softc(dev); @@ -650,13 +655,12 @@ ti_gpio_bank_init(device_t dev, int bank * actual revision numbers, so instead the values have been * determined by experimentation. */ - sc->sc_revision[bank] = ti_gpio_read_4(sc, bank, TI_GPIO_REVISION); + rev = ti_gpio_read_4(sc, bank, TI_GPIO_REVISION); /* Check the revision. */ - if (sc->sc_revision[bank] != ti_gpio_rev()) { + if (rev != ti_gpio_rev()) { device_printf(dev, "Warning: could not determine the revision " - "of %u GPIO module (revision:0x%08x)\n", - bank, sc->sc_revision[bank]); + "of GPIO module %d (revision:0x%08x)\n", bank, rev); return (EINVAL); } @@ -697,8 +701,8 @@ ti_gpio_attach(device_t dev) sc = device_get_softc(dev); sc->sc_dev = dev; - TI_GPIO_LOCK_INIT(sc); + ti_gpio_pin_max(dev, &sc->sc_maxpin); /* There are up to 6 different GPIO register sets located in different * memory areas on the chip. The memory range should have been set for Modified: head/sys/arm/ti/ti_gpio.h ============================================================================== --- head/sys/arm/ti/ti_gpio.h Wed Dec 24 03:53:59 2014 (r276172) +++ head/sys/arm/ti/ti_gpio.h Wed Dec 24 04:24:08 2014 (r276173) @@ -46,6 +46,8 @@ */ struct ti_gpio_softc { device_t sc_dev; + int sc_maxpin; + struct mtx sc_mtx; /* * The memory resource(s) for the PRCM register set, when the device is @@ -57,13 +59,6 @@ struct ti_gpio_softc { /* The handle for the register IRQ handlers. */ void *sc_irq_hdl[MAX_GPIO_INTRS]; - - /* - * The following describes the H/W revision of each of the GPIO banks. - */ - uint32_t sc_revision[MAX_GPIO_BANKS]; - - struct mtx sc_mtx; }; #endif /* TI_GPIO_H */ From owner-svn-src-all@FreeBSD.ORG Wed Dec 24 07:04:05 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C8013B4E; Wed, 24 Dec 2014 07:04:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B3D5E2EBD; Wed, 24 Dec 2014 07:04:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBO745Al047211; Wed, 24 Dec 2014 07:04:05 GMT (envelope-from scottl@FreeBSD.org) Received: (from scottl@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBO745Kh047209; Wed, 24 Dec 2014 07:04:05 GMT (envelope-from scottl@FreeBSD.org) Message-Id: <201412240704.sBO745Kh047209@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: scottl set sender to scottl@FreeBSD.org using -f From: Scott Long Date: Wed, 24 Dec 2014 07:04:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276174 - head/sys/dev/isci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Dec 2014 07:04:05 -0000 Author: scottl Date: Wed Dec 24 07:04:04 2014 New Revision: 276174 URL: https://svnweb.freebsd.org/changeset/base/276174 Log: Fix tunable and sysctl handling of the fail_on_task_timeout knob. Reviewed by: emax Obtained from: Netflix, Inc. MFC after: 3 days Modified: head/sys/dev/isci/isci_controller.c head/sys/dev/isci/isci_sysctl.c Modified: head/sys/dev/isci/isci_controller.c ============================================================================== --- head/sys/dev/isci/isci_controller.c Wed Dec 24 04:24:08 2014 (r276173) +++ head/sys/dev/isci/isci_controller.c Wed Dec 24 07:04:04 2014 (r276174) @@ -373,6 +373,8 @@ SCI_STATUS isci_controller_initialize(st fail_on_timeout = 1; TUNABLE_INT_FETCH("hw.isci.fail_on_task_timeout", &fail_on_timeout); + controller->fail_on_task_timeout = fail_on_timeout; + /* Attach to CAM using xpt_bus_register now, then immediately freeze * the simq. It will get released later when initial domain discovery * is complete. Modified: head/sys/dev/isci/isci_sysctl.c ============================================================================== --- head/sys/dev/isci/isci_sysctl.c Wed Dec 24 04:24:08 2014 (r276173) +++ head/sys/dev/isci/isci_sysctl.c Wed Dec 24 07:04:04 2014 (r276174) @@ -226,12 +226,13 @@ static int isci_sysctl_fail_on_task_timeout(SYSCTL_HANDLER_ARGS) { struct isci_softc *isci = (struct isci_softc *)arg1; - int32_t fail_on_timeout = 0; + int32_t fail_on_timeout; int error, i; + fail_on_timeout = isci->controllers[0].fail_on_task_timeout; error = sysctl_handle_int(oidp, &fail_on_timeout, 0, req); - if (error || fail_on_timeout == 0) + if (error || req->newptr == NULL) return (error); for (i = 0; i < isci->controller_count; i++) From owner-svn-src-all@FreeBSD.ORG Wed Dec 24 09:25:17 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3E8735B4; Wed, 24 Dec 2014 09:25:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 288641B12; Wed, 24 Dec 2014 09:25:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBO9PHgT012435; Wed, 24 Dec 2014 09:25:17 GMT (envelope-from bofh@FreeBSD.org) Received: (from bofh@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBO9PHN9012434; Wed, 24 Dec 2014 09:25:17 GMT (envelope-from bofh@FreeBSD.org) Message-Id: <201412240925.sBO9PHN9012434@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bofh set sender to bofh@FreeBSD.org using -f From: Muhammad Moinur Rahman Date: Wed, 24 Dec 2014 09:25:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276175 - head/share/misc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Dec 2014 09:25:17 -0000 Author: bofh (ports committer) Date: Wed Dec 24 09:25:16 2014 New Revision: 276175 URL: https://svnweb.freebsd.org/changeset/base/276175 Log: Update Mentor and Mentee Information (bofh) Differential Revision: https://reviews.freebsd.org/D1363 Reviewed by: bapt Approved by: bapt Modified: head/share/misc/committers-ports.dot Modified: head/share/misc/committers-ports.dot ============================================================================== --- head/share/misc/committers-ports.dot Wed Dec 24 07:04:04 2014 (r276174) +++ head/share/misc/committers-ports.dot Wed Dec 24 09:25:16 2014 (r276175) @@ -67,6 +67,7 @@ beech [label="Beech Rintoul\nbeech@FreeB bf [label="Brendan Fabeny\nbf@FreeBSD.org\n2010/06/02"] bland [label="Alexander Nedotsukov\nbland@FreeBSD.org\n2003/08/14"] bmah [label="Bruce A. Mah\nbmah@FreeBSD.org\n2000/08/23"] +bofh [label="Muhammad Moinur Rahman\bofh@FreeBSD.org\n2014/12/23"] brix [label="Henrik Brix Andersen\nbrix@FreeBSD.org\n2007/10/31"] brooks [label="Brooks Davies\nbrooks@FreeBSD.org\n2004/05/03"] bsam [label="Boris Samorodov\nbsam@FreeBSD.org\n2006/07/20"] @@ -263,6 +264,7 @@ bdrewery -> sbruno bdrewery -> trociny bapt -> bdrewery +bapt -> bofh bapt -> eadler bapt -> grembo bapt -> jlaffaye @@ -430,6 +432,7 @@ marcus -> bland marcus -> eik marcus -> jmallett +marino -> bofh marino -> robak makc -> alonso From owner-svn-src-all@FreeBSD.ORG Wed Dec 24 10:13:54 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8B55022A; Wed, 24 Dec 2014 10:13:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 76FCC66B2B; Wed, 24 Dec 2014 10:13:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBOADsrR036606; Wed, 24 Dec 2014 10:13:54 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBOADsVD036605; Wed, 24 Dec 2014 10:13:54 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201412241013.sBOADsVD036605@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Wed, 24 Dec 2014 10:13:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276176 - head/lib/msun/src X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Dec 2014 10:13:54 -0000 Author: ed Date: Wed Dec 24 10:13:53 2014 New Revision: 276176 URL: https://svnweb.freebsd.org/changeset/base/276176 Log: Clarify to explain that C99 conforming compilers don't need CMPLX*(). Discussed with: kargl@ Modified: head/lib/msun/src/math_private.h Modified: head/lib/msun/src/math_private.h ============================================================================== --- head/lib/msun/src/math_private.h Wed Dec 24 09:25:16 2014 (r276175) +++ head/lib/msun/src/math_private.h Wed Dec 24 10:13:53 2014 (r276176) @@ -456,9 +456,8 @@ typedef union { * to -0.0+I*0.0. * * The C11 standard introduced the macros CMPLX(), CMPLXF() and CMPLXL() - * to construct complex values. The functions below are modelled after - * these macros, with the exception that they cannot be used to - * construct compile-time complex values. + * to construct complex values. Compilers that conform to the C99 + * standard require the following functions to avoid the above issues. */ #ifndef CMPLXF From owner-svn-src-all@FreeBSD.ORG Wed Dec 24 12:26:47 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1033DF32; Wed, 24 Dec 2014 12:26:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E4EB766EFD; Wed, 24 Dec 2014 12:26:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBOCQkSj000626; Wed, 24 Dec 2014 12:26:46 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBOCQivF000604; Wed, 24 Dec 2014 12:26:44 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201412241226.sBOCQivF000604@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Wed, 24 Dec 2014 12:26:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276177 - in head/sys/arm: conf freescale/imx X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Dec 2014 12:26:47 -0000 Author: andrew Date: Wed Dec 24 12:26:43 2014 New Revision: 276177 URL: https://svnweb.freebsd.org/changeset/base/276177 Log: Switch i.MX to use the platform code to help with a single Freescale kernel. Differential Revision: https://reviews.freebsd.org/D1349 Reviewed by: ian, rpaulo Modified: head/sys/arm/conf/EFIKA_MX head/sys/arm/conf/IMX53 head/sys/arm/conf/IMX6 head/sys/arm/freescale/imx/imx51_machdep.c head/sys/arm/freescale/imx/imx53_machdep.c head/sys/arm/freescale/imx/imx6_machdep.c Modified: head/sys/arm/conf/EFIKA_MX ============================================================================== --- head/sys/arm/conf/EFIKA_MX Wed Dec 24 10:13:53 2014 (r276176) +++ head/sys/arm/conf/EFIKA_MX Wed Dec 24 12:26:43 2014 (r276177) @@ -59,6 +59,7 @@ options SYSVMSG # SYSV-style message options SYSVSEM # SYSV-style semaphores options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions options KBD_INSTALL_CDEV # install a CDEV entry in /dev +options PLATFORM options INCLUDE_CONFIG_FILE # Include this file in kernel options VFP # Enable floating point hardware support Modified: head/sys/arm/conf/IMX53 ============================================================================== --- head/sys/arm/conf/IMX53 Wed Dec 24 10:13:53 2014 (r276176) +++ head/sys/arm/conf/IMX53 Wed Dec 24 12:26:43 2014 (r276177) @@ -56,6 +56,7 @@ options SYSVMSG # SYSV-style message options SYSVSEM # SYSV-style semaphores options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions options KBD_INSTALL_CDEV # install a CDEV entry in /dev +options PLATFORM options INCLUDE_CONFIG_FILE # Include this file in kernel options VFP # Enable floating point hardware support Modified: head/sys/arm/conf/IMX6 ============================================================================== --- head/sys/arm/conf/IMX6 Wed Dec 24 10:13:53 2014 (r276176) +++ head/sys/arm/conf/IMX6 Wed Dec 24 12:26:43 2014 (r276177) @@ -53,6 +53,7 @@ options SYSVSEM # SYSV-style semaphor options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions options KBD_INSTALL_CDEV # install a CDEV entry in /dev options INCLUDE_CONFIG_FILE # Include this file in kernel +options PLATFORM options FREEBSD_BOOT_LOADER # Process metadata passed from loader(8) options VFP # Enable floating point hardware support options SMP # Enable multiple cores Modified: head/sys/arm/freescale/imx/imx51_machdep.c ============================================================================== --- head/sys/arm/freescale/imx/imx51_machdep.c Wed Dec 24 10:13:53 2014 (r276176) +++ head/sys/arm/freescale/imx/imx51_machdep.c Wed Dec 24 12:26:43 2014 (r276177) @@ -39,36 +39,28 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include #include -vm_offset_t -platform_lastaddr(void) +#include "platform_if.h" + +static vm_offset_t +imx51_lastaddr(platform_t plat) { return (arm_devmap_lastaddr()); } -void -platform_probe_and_attach(void) +static int +imx51_attach(platform_t plat) { /* XXX - Get rid of this stuff soon. */ boothowto |= RB_VERBOSE|RB_MULTIPLE; bootverbose = 1; -} - -void -platform_gpio_init(void) -{ - -} - -void -platform_late_init(void) -{ + return (0); } /* @@ -78,8 +70,8 @@ platform_late_init(void) * * Notably missing are entries for GPU, IPU, in general anything video related. */ -int -platform_devmap_init(void) +static int +imx51_devmap_init(platform_t plat) { arm_devmap_add_entry(0x70000000, 0x00100000); @@ -101,3 +93,12 @@ u_int imx_soc_type() return (IMXSOC_51); } +static platform_method_t imx51_methods[] = { + PLATFORMMETHOD(platform_attach, imx51_attach), + PLATFORMMETHOD(platform_devmap_init, imx51_devmap_init), + PLATFORMMETHOD(platform_lastaddr, imx51_lastaddr), + + PLATFORMMETHOD_END, +}; + +FDT_PLATFORM_DEF(imx51, "i.MX51", 0, "fsl,imx51"); Modified: head/sys/arm/freescale/imx/imx53_machdep.c ============================================================================== --- head/sys/arm/freescale/imx/imx53_machdep.c Wed Dec 24 10:13:53 2014 (r276176) +++ head/sys/arm/freescale/imx/imx53_machdep.c Wed Dec 24 12:26:43 2014 (r276177) @@ -39,36 +39,28 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include #include -vm_offset_t -platform_lastaddr(void) +#include "platform_if.h" + +static vm_offset_t +imx53_lastaddr(platform_t plat) { return (arm_devmap_lastaddr()); } -void -platform_probe_and_attach(void) +static int +imx53_attach(platform_t plat) { /* XXX - Get rid of this stuff soon. */ boothowto |= RB_VERBOSE|RB_MULTIPLE; bootverbose = 1; -} - -void -platform_gpio_init(void) -{ - -} - -void -platform_late_init(void) -{ + return (0); } /* @@ -78,8 +70,8 @@ platform_late_init(void) * * Notably missing are entries for GPU, IPU, in general anything video related. */ -int -platform_devmap_init(void) +static int +imx53_devmap_init(platform_t plat) { arm_devmap_add_entry(0x50000000, 0x00100000); @@ -101,4 +93,13 @@ u_int imx_soc_type() return (IMXSOC_53); } +static platform_method_t imx53_methods[] = { + PLATFORMMETHOD(platform_attach, imx53_attach), + PLATFORMMETHOD(platform_devmap_init, imx53_devmap_init), + PLATFORMMETHOD(platform_lastaddr, imx53_lastaddr), + + PLATFORMMETHOD_END, +}; + +FDT_PLATFORM_DEF(imx53, "i.MX53", 0, "fsl,imx53"); Modified: head/sys/arm/freescale/imx/imx6_machdep.c ============================================================================== --- head/sys/arm/freescale/imx/imx6_machdep.c Wed Dec 24 10:13:53 2014 (r276176) +++ head/sys/arm/freescale/imx/imx6_machdep.c Wed Dec 24 12:26:43 2014 (r276177) @@ -40,7 +40,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include #include #include @@ -50,6 +50,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include "platform_if.h" + struct fdt_fixup_entry fdt_fixup_table[] = { { NULL, NULL } }; @@ -90,29 +92,25 @@ fdt_pic_decode_t fdt_pic_table[] = { NULL }; -vm_offset_t -platform_lastaddr(void) +static vm_offset_t +imx6_lastaddr(platform_t plat) { return (arm_devmap_lastaddr()); } -void -platform_probe_and_attach(void) +static int +imx6_attach(platform_t plat) { /* Inform the MPCore timer driver that its clock is variable. */ arm_tmr_change_frequency(ARM_TMR_FREQUENCY_VARIES); -} - -void -platform_gpio_init(void) -{ + return (0); } -void -platform_late_init(void) +static void +imx6_late_init(platform_t plat) { /* Cache the gpio1 node handle for imx6_decode_fdt() workaround code. */ @@ -136,8 +134,8 @@ platform_late_init(void) * static map some of that area. Be careful with other things in that area such * as OCRAM that probably shouldn't be mapped as PTE_DEVICE memory. */ -int -platform_devmap_init(void) +static int +imx6_devmap_init(platform_t plat) { const uint32_t IMX6_ARMMP_PHYS = 0x00a00000; const uint32_t IMX6_ARMMP_SIZE = 0x00100000; @@ -271,3 +269,15 @@ imx6_early_putc(int c) early_putc_t *early_putc = imx6_early_putc; #endif +static platform_method_t imx6_methods[] = { + PLATFORMMETHOD(platform_attach, imx6_attach), + PLATFORMMETHOD(platform_lastaddr, imx6_lastaddr), + PLATFORMMETHOD(platform_devmap_init, imx6_devmap_init), + PLATFORMMETHOD(platform_late_init, imx6_late_init), + + PLATFORMMETHOD_END, +}; + +FDT_PLATFORM_DEF2(imx6, imx6s, "i.MX6 Solo", 0, "fsl,imx6s"); +FDT_PLATFORM_DEF2(imx6, imx6d, "i.MX6 Dual", 0, "fsl,imx6d"); +FDT_PLATFORM_DEF2(imx6, imx6q, "i.MX6 Quad", 0, "fsl,imx6q"); From owner-svn-src-all@FreeBSD.ORG Wed Dec 24 13:25:23 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7845510C; Wed, 24 Dec 2014 13:25:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 63FAE28ED; Wed, 24 Dec 2014 13:25:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBODPNKH029702; Wed, 24 Dec 2014 13:25:23 GMT (envelope-from bofh@FreeBSD.org) Received: (from bofh@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBODPNj1029701; Wed, 24 Dec 2014 13:25:23 GMT (envelope-from bofh@FreeBSD.org) Message-Id: <201412241325.sBODPNj1029701@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bofh set sender to bofh@FreeBSD.org using -f From: Muhammad Moinur Rahman Date: Wed, 24 Dec 2014 13:25:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276178 - head/share/misc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Dec 2014 13:25:23 -0000 Author: bofh (ports committer) Date: Wed Dec 24 13:25:22 2014 New Revision: 276178 URL: https://svnweb.freebsd.org/changeset/base/276178 Log: Fix missing \n in committers-ports.dot while adding myself Differential Revision: https://reviews.freebsd.org/D1365 Submitted by: danfe Approved by: bapt(mentor) Modified: head/share/misc/committers-ports.dot Modified: head/share/misc/committers-ports.dot ============================================================================== --- head/share/misc/committers-ports.dot Wed Dec 24 12:26:43 2014 (r276177) +++ head/share/misc/committers-ports.dot Wed Dec 24 13:25:22 2014 (r276178) @@ -67,7 +67,7 @@ beech [label="Beech Rintoul\nbeech@FreeB bf [label="Brendan Fabeny\nbf@FreeBSD.org\n2010/06/02"] bland [label="Alexander Nedotsukov\nbland@FreeBSD.org\n2003/08/14"] bmah [label="Bruce A. Mah\nbmah@FreeBSD.org\n2000/08/23"] -bofh [label="Muhammad Moinur Rahman\bofh@FreeBSD.org\n2014/12/23"] +bofh [label="Muhammad Moinur Rahman\nbofh@FreeBSD.org\n2014/12/23"] brix [label="Henrik Brix Andersen\nbrix@FreeBSD.org\n2007/10/31"] brooks [label="Brooks Davies\nbrooks@FreeBSD.org\n2004/05/03"] bsam [label="Boris Samorodov\nbsam@FreeBSD.org\n2006/07/20"] From owner-svn-src-all@FreeBSD.ORG Wed Dec 24 13:49:43 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E68C2451; Wed, 24 Dec 2014 13:49:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D04D03775; Wed, 24 Dec 2014 13:49:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBODng7Q039569; Wed, 24 Dec 2014 13:49:42 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBODnfMX039561; Wed, 24 Dec 2014 13:49:41 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201412241349.sBODnfMX039561@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 24 Dec 2014 13:49:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276179 - in stable/10: sys/cam/ctl usr.sbin/ctladm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Dec 2014 13:49:43 -0000 Author: mav Date: Wed Dec 24 13:49:40 2014 New Revision: 276179 URL: https://svnweb.freebsd.org/changeset/base/276179 Log: MFC r275865: Add configuration options to override physical and UNMAP blocks geometry. While in most cases CTL should correctly fetch those values from backing storages, there are some initiators (like MS SQL), that may not like large physical block sizes, even if they are true. For such cases allow override fetched values with supported ones (like 4K). Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl.h stable/10/sys/cam/ctl/ctl_backend.h stable/10/sys/cam/ctl/ctl_backend_block.c stable/10/usr.sbin/ctladm/ctladm.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Wed Dec 24 13:25:22 2014 (r276178) +++ stable/10/sys/cam/ctl/ctl.c Wed Dec 24 13:49:40 2014 (r276179) @@ -3902,7 +3902,7 @@ ctl_copy_io(union ctl_io *src, union ctl dest->io_hdr.flags |= CTL_FLAG_INT_COPY; } -static int +int ctl_expand_number(const char *buf, uint64_t *num) { char *endptr; @@ -10148,10 +10148,10 @@ ctl_inquiry_evpd_block_limits(struct ctl if (lun->be_lun->flags & CTL_LUN_FLAG_UNMAP) { scsi_ulto4b(0xffffffff, bl_ptr->max_unmap_lba_cnt); scsi_ulto4b(0xffffffff, bl_ptr->max_unmap_blk_cnt); - if (lun->be_lun->pblockexp != 0) { - scsi_ulto4b((1 << lun->be_lun->pblockexp), + if (lun->be_lun->ublockexp != 0) { + scsi_ulto4b((1 << lun->be_lun->ublockexp), bl_ptr->opt_unmap_grain); - scsi_ulto4b(0x80000000 | lun->be_lun->pblockoff, + scsi_ulto4b(0x80000000 | lun->be_lun->ublockoff, bl_ptr->unmap_grain_align); } } Modified: stable/10/sys/cam/ctl/ctl.h ============================================================================== --- stable/10/sys/cam/ctl/ctl.h Wed Dec 24 13:25:22 2014 (r276178) +++ stable/10/sys/cam/ctl/ctl.h Wed Dec 24 13:49:40 2014 (r276179) @@ -206,6 +206,7 @@ struct ctl_be_arg; void ctl_init_opts(ctl_options_t *opts, int num_args, struct ctl_be_arg *args); void ctl_free_opts(ctl_options_t *opts); char * ctl_get_opt(ctl_options_t *opts, const char *name); +int ctl_expand_number(const char *buf, uint64_t *num); #endif /* _KERNEL */ Modified: stable/10/sys/cam/ctl/ctl_backend.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend.h Wed Dec 24 13:25:22 2014 (r276178) +++ stable/10/sys/cam/ctl/ctl_backend.h Wed Dec 24 13:49:40 2014 (r276179) @@ -194,6 +194,8 @@ struct ctl_be_lun { uint32_t blocksize; /* passed to CTL */ uint16_t pblockexp; /* passed to CTL */ uint16_t pblockoff; /* passed to CTL */ + uint16_t ublockexp; /* passed to CTL */ + uint16_t ublockoff; /* passed to CTL */ uint32_t atomicblock; /* passed to CTL */ uint32_t req_lun_id; /* passed to CTL */ uint32_t lun_id; /* returned from CTL */ Modified: stable/10/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend_block.c Wed Dec 24 13:25:22 2014 (r276178) +++ stable/10/sys/cam/ctl/ctl_backend_block.c Wed Dec 24 13:49:40 2014 (r276179) @@ -175,6 +175,8 @@ struct ctl_be_block_lun { int blocksize_shift; uint16_t pblockexp; uint16_t pblockoff; + uint16_t ublockexp; + uint16_t ublockoff; struct ctl_be_block_softc *softc; struct devstat *disk_stats; ctl_be_block_lun_flags flags; @@ -1742,8 +1744,9 @@ ctl_be_block_open_file(struct ctl_be_blo { struct ctl_be_block_filedata *file_data; struct ctl_lun_create_params *params; + char *value; struct vattr vattr; - off_t pss; + off_t ps, pss, po, pos, us, uss, uo, uos; int error; error = 0; @@ -1803,11 +1806,36 @@ ctl_be_block_open_file(struct ctl_be_blo be_lun->blocksize = params->blocksize_bytes; else be_lun->blocksize = 512; - pss = vattr.va_blocksize / be_lun->blocksize; - if ((pss > 0) && (pss * be_lun->blocksize == vattr.va_blocksize) && - ((pss & (pss - 1)) == 0)) { + + us = ps = vattr.va_blocksize; + uo = po = 0; + + value = ctl_get_opt(&be_lun->ctl_be_lun.options, "pblocksize"); + if (value != NULL) + ctl_expand_number(value, &ps); + value = ctl_get_opt(&be_lun->ctl_be_lun.options, "pblockoffset"); + if (value != NULL) + ctl_expand_number(value, &po); + pss = ps / be_lun->blocksize; + pos = po / be_lun->blocksize; + if ((pss > 0) && (pss * be_lun->blocksize == ps) && (pss >= pos) && + ((pss & (pss - 1)) == 0) && (pos * be_lun->blocksize == po)) { be_lun->pblockexp = fls(pss) - 1; - be_lun->pblockoff = 0; + be_lun->pblockoff = (pss - pos) % pss; + } + + value = ctl_get_opt(&be_lun->ctl_be_lun.options, "ublocksize"); + if (value != NULL) + ctl_expand_number(value, &us); + value = ctl_get_opt(&be_lun->ctl_be_lun.options, "ublockoffset"); + if (value != NULL) + ctl_expand_number(value, &uo); + uss = us / be_lun->blocksize; + uos = uo / be_lun->blocksize; + if ((uss > 0) && (uss * be_lun->blocksize == us) && (uss >= uos) && + ((uss & (uss - 1)) == 0) && (uos * be_lun->blocksize == uo)) { + be_lun->ublockexp = fls(uss) - 1; + be_lun->ublockoff = (uss - uos) % uss; } /* @@ -1830,8 +1858,9 @@ ctl_be_block_open_dev(struct ctl_be_bloc struct vattr vattr; struct cdev *dev; struct cdevsw *devsw; + char *value; int error; - off_t ps, pss, po, pos; + off_t ps, pss, po, pos, us, uss, uo, uos; params = &be_lun->params; @@ -1945,6 +1974,15 @@ ctl_be_block_open_dev(struct ctl_be_bloc if (error) po = 0; } + us = ps; + uo = po; + + value = ctl_get_opt(&be_lun->ctl_be_lun.options, "pblocksize"); + if (value != NULL) + ctl_expand_number(value, &ps); + value = ctl_get_opt(&be_lun->ctl_be_lun.options, "pblockoffset"); + if (value != NULL) + ctl_expand_number(value, &po); pss = ps / be_lun->blocksize; pos = po / be_lun->blocksize; if ((pss > 0) && (pss * be_lun->blocksize == ps) && (pss >= pos) && @@ -1953,6 +1991,20 @@ ctl_be_block_open_dev(struct ctl_be_bloc be_lun->pblockoff = (pss - pos) % pss; } + value = ctl_get_opt(&be_lun->ctl_be_lun.options, "ublocksize"); + if (value != NULL) + ctl_expand_number(value, &us); + value = ctl_get_opt(&be_lun->ctl_be_lun.options, "ublockoffset"); + if (value != NULL) + ctl_expand_number(value, &uo); + uss = us / be_lun->blocksize; + uos = uo / be_lun->blocksize; + if ((uss > 0) && (uss * be_lun->blocksize == us) && (uss >= uos) && + ((uss & (uss - 1)) == 0) && (uos * be_lun->blocksize == uo)) { + be_lun->ublockexp = fls(uss) - 1; + be_lun->ublockoff = (uss - uos) % uss; + } + return (0); } @@ -2165,6 +2217,8 @@ ctl_be_block_create(struct ctl_be_block_ be_lun->blocksize = 0; be_lun->pblockexp = 0; be_lun->pblockoff = 0; + be_lun->ublockexp = 0; + be_lun->ublockoff = 0; be_lun->size_blocks = 0; be_lun->size_bytes = 0; be_lun->ctl_be_lun.maxlba = 0; @@ -2215,6 +2269,8 @@ ctl_be_block_create(struct ctl_be_block_ be_lun->ctl_be_lun.blocksize = be_lun->blocksize; be_lun->ctl_be_lun.pblockexp = be_lun->pblockexp; be_lun->ctl_be_lun.pblockoff = be_lun->pblockoff; + be_lun->ctl_be_lun.ublockexp = be_lun->ublockexp; + be_lun->ctl_be_lun.ublockoff = be_lun->ublockoff; if (be_lun->dispatch == ctl_be_block_dispatch_zvol && be_lun->blocksize != 0) be_lun->ctl_be_lun.atomicblock = CTLBLK_MAX_IO_SIZE / @@ -2594,6 +2650,8 @@ ctl_be_block_modify(struct ctl_be_block_ be_lun->ctl_be_lun.blocksize = be_lun->blocksize; be_lun->ctl_be_lun.pblockexp = be_lun->pblockexp; be_lun->ctl_be_lun.pblockoff = be_lun->pblockoff; + be_lun->ctl_be_lun.ublockexp = be_lun->ublockexp; + be_lun->ctl_be_lun.ublockoff = be_lun->ublockoff; if (be_lun->dispatch == ctl_be_block_dispatch_zvol && be_lun->blocksize != 0) be_lun->ctl_be_lun.atomicblock = CTLBLK_MAX_IO_SIZE / Modified: stable/10/usr.sbin/ctladm/ctladm.8 ============================================================================== --- stable/10/usr.sbin/ctladm/ctladm.8 Wed Dec 24 13:25:22 2014 (r276178) +++ stable/10/usr.sbin/ctladm/ctladm.8 Wed Dec 24 13:49:40 2014 (r276179) @@ -34,7 +34,7 @@ .\" $Id: //depot/users/kenm/FreeBSD-test2/usr.sbin/ctladm/ctladm.8#3 $ .\" $FreeBSD$ .\" -.Dd December 6, 2014 +.Dd December 17, 2014 .Dt CTLADM 8 .Os .Sh NAME @@ -1002,6 +1002,13 @@ Set to "off" to allow them be issued in Parallel issue of consecutive operations may confuse logic of the backing file system, hurting performance; but it may improve performance of backing stores without prefetch/write-back. +.It Va psectorsize +.It Va psectoroffset +Specify physical block size and offset of the device. +.It Va usectorsize +.It Va usectoroffset +Specify UNMAP block size and offset of the device. +.It Va rpm .It Va rpm Specifies medium rotation rate of the device: 0 -- not reported, 1 -- non-rotating (SSD), >1024 -- value in revolutions per minute. From owner-svn-src-all@FreeBSD.ORG Wed Dec 24 15:25:21 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 13BAEDBF; Wed, 24 Dec 2014 15:25:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D9C1A643D0; Wed, 24 Dec 2014 15:25:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBOFPKUD086731; Wed, 24 Dec 2014 15:25:20 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBOFPJsV086727; Wed, 24 Dec 2014 15:25:19 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201412241525.sBOFPJsV086727@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Wed, 24 Dec 2014 15:25:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276180 - in head/sys/arm: arm include mv X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Dec 2014 15:25:21 -0000 Author: andrew Date: Wed Dec 24 15:25:18 2014 New Revision: 276180 URL: https://svnweb.freebsd.org/changeset/base/276180 Log: Rename pic_ipi_get to pic_ipi_read for intrng. Modified: head/sys/arm/arm/gic.c head/sys/arm/arm/mp_machdep.c head/sys/arm/include/smp.h head/sys/arm/mv/mpic.c Modified: head/sys/arm/arm/gic.c ============================================================================== --- head/sys/arm/arm/gic.c Wed Dec 24 13:49:40 2014 (r276179) +++ head/sys/arm/arm/gic.c Wed Dec 24 15:25:18 2014 (r276180) @@ -436,7 +436,7 @@ pic_ipi_send(cpuset_t cpus, u_int ipi) } int -pic_ipi_get(int i) +pic_ipi_read(int i) { if (i != -1) { Modified: head/sys/arm/arm/mp_machdep.c ============================================================================== --- head/sys/arm/arm/mp_machdep.c Wed Dec 24 13:49:40 2014 (r276179) +++ head/sys/arm/arm/mp_machdep.c Wed Dec 24 15:25:18 2014 (r276180) @@ -266,7 +266,7 @@ ipi_handler(void *arg) cpu = PCPU_GET(cpuid); - ipi = pic_ipi_get((int)arg); + ipi = pic_ipi_read((int)arg); while ((ipi != 0x3ff)) { switch (ipi) { @@ -329,7 +329,7 @@ ipi_handler(void *arg) } pic_ipi_clear(ipi); - ipi = pic_ipi_get(-1); + ipi = pic_ipi_read(-1); } return (FILTER_HANDLED); Modified: head/sys/arm/include/smp.h ============================================================================== --- head/sys/arm/include/smp.h Wed Dec 24 13:49:40 2014 (r276179) +++ head/sys/arm/include/smp.h Wed Dec 24 15:25:18 2014 (r276180) @@ -24,7 +24,7 @@ void ipi_selected(cpuset_t cpus, u_int i /* PIC interface */ void pic_ipi_send(cpuset_t cpus, u_int ipi); void pic_ipi_clear(int ipi); -int pic_ipi_get(int arg); +int pic_ipi_read(int arg); /* Platform interface */ void platform_mp_setmaxid(void); Modified: head/sys/arm/mv/mpic.c ============================================================================== --- head/sys/arm/mv/mpic.c Wed Dec 24 13:49:40 2014 (r276179) +++ head/sys/arm/mv/mpic.c Wed Dec 24 15:25:18 2014 (r276180) @@ -375,7 +375,7 @@ pic_ipi_send(cpuset_t cpus, u_int ipi) } int -pic_ipi_get(int i __unused) +pic_ipi_read(int i __unused) { uint32_t val; From owner-svn-src-all@FreeBSD.ORG Wed Dec 24 17:12:52 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6FF91E0B; Wed, 24 Dec 2014 17:12:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5C2023CA9; Wed, 24 Dec 2014 17:12:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBOHCqjU039382; Wed, 24 Dec 2014 17:12:52 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBOHCqvW039381; Wed, 24 Dec 2014 17:12:52 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201412241712.sBOHCqvW039381@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Wed, 24 Dec 2014 17:12:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276187 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Dec 2014 17:12:52 -0000 Author: ian Date: Wed Dec 24 17:12:51 2014 New Revision: 276187 URL: https://svnweb.freebsd.org/changeset/base/276187 Log: Eliminate unnecessary references to pte.h internals by using the standard pmap_kenter_temporary() to map pages while dumping. Submitted by: Svatopluk Kraus , Michal Meloun Modified: head/sys/arm/arm/dump_machdep.c Modified: head/sys/arm/arm/dump_machdep.c ============================================================================== --- head/sys/arm/arm/dump_machdep.c Wed Dec 24 16:11:15 2014 (r276186) +++ head/sys/arm/arm/dump_machdep.c Wed Dec 24 17:12:51 2014 (r276187) @@ -160,11 +160,13 @@ static int cb_dumpdata(struct md_pa *mdp, int seqnr, void *arg) { struct dumperinfo *di = (struct dumperinfo*)arg; - vm_paddr_t pa; + vm_paddr_t a, pa; + void *va; uint32_t pgs; size_t counter, sz, chunk; - int c, error; + int i, c, error; + va = 0; error = 0; /* catch case in which chunk size is 0 */ counter = 0; pgs = mdp->md_size / PAGE_SIZE; @@ -194,16 +196,14 @@ cb_dumpdata(struct md_pa *mdp, int seqnr printf(" %d", pgs * PAGE_SIZE); counter &= (1<<24) - 1; } - if (pa == (pa & L1_ADDR_BITS)) { - pmap_kenter_section(0, pa & L1_ADDR_BITS, 0); - cpu_tlb_flushID_SE(0); - cpu_cpwait(); + for (i = 0; i < chunk; i++) { + a = pa + i * PAGE_SIZE; + va = pmap_kenter_temporary(trunc_page(a), i); } #ifdef SW_WATCHDOG wdog_kern_pat(WD_LASTVAL); #endif - error = dump_write(di, - (void *)(pa - (pa & L1_ADDR_BITS)),0, dumplo, sz); + error = dump_write(di, va, 0, dumplo, sz); if (error) break; dumplo += sz; From owner-svn-src-all@FreeBSD.ORG Wed Dec 24 18:34:58 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 30782133; Wed, 24 Dec 2014 18:34:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1B84364665; Wed, 24 Dec 2014 18:34:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBOIYw9L078226; Wed, 24 Dec 2014 18:34:58 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBOIYvrL078222; Wed, 24 Dec 2014 18:34:57 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201412241834.sBOIYvrL078222@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Wed, 24 Dec 2014 18:34:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276188 - head/sys/netipsec X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Dec 2014 18:34:58 -0000 Author: ae Date: Wed Dec 24 18:34:56 2014 New Revision: 276188 URL: https://svnweb.freebsd.org/changeset/base/276188 Log: Rename ip4_def_policy variable to def_policy. It is used by both IPv4 and IPv6. Initialize it only once in def_policy_init(). Remove its initialization from key_init() and make it static. Remove several fields from struct secpolicy: * lock - it isn't so useful having mutex in the structure, but the only thing we do with it is initialization and destroying. * state - it has only two values - DEAD and ALIVE. Instead of take a lock and change the state to DEAD, then take lock again in GC function and delete policy from the chain - keep in the chain only ALIVE policies. * scangen - it was used in GC function to protect from sending several SADB_SPDEXPIRE messages for one SPD entry. Now we don't keep DEAD entries in the chain and there is no need to have scangen variable. Use TAILQ to implement SPD entries chain. Use rmlock to protect access to SPD entries chain. Protect all SP lookup with RLOCK, and use WLOCK when we are inserting (or removing) SP entry in the chain. Instead of using pattern "LOCK(); refcnt++; UNLOCK();", use refcount(9) API to implement refcounting in SPD. Merge code from key_delsp() and _key_delsp() into _key_freesp(). And use KEY_FREESP() macro in all cases when we want to release reference or just delete SP entry. Obtained from: Yandex LLC Sponsored by: Yandex LLC Modified: head/sys/netipsec/ipsec.c head/sys/netipsec/ipsec.h head/sys/netipsec/key.c head/sys/netipsec/key_debug.c Modified: head/sys/netipsec/ipsec.c ============================================================================== --- head/sys/netipsec/ipsec.c Wed Dec 24 17:12:51 2014 (r276187) +++ head/sys/netipsec/ipsec.c Wed Dec 24 18:34:56 2014 (r276188) @@ -118,11 +118,12 @@ VNET_DEFINE(int, ip4_esp_trans_deflev) = VNET_DEFINE(int, ip4_esp_net_deflev) = IPSEC_LEVEL_USE; VNET_DEFINE(int, ip4_ah_trans_deflev) = IPSEC_LEVEL_USE; VNET_DEFINE(int, ip4_ah_net_deflev) = IPSEC_LEVEL_USE; -VNET_DEFINE(struct secpolicy, ip4_def_policy); /* ECN ignore(-1)/forbidden(0)/allowed(1) */ VNET_DEFINE(int, ip4_ipsec_ecn) = 0; VNET_DEFINE(int, ip4_esp_randpad) = -1; +static VNET_DEFINE(struct secpolicy, def_policy); +#define V_def_policy VNET(def_policy) /* * Crypto support requirements: * @@ -141,7 +142,7 @@ SYSCTL_DECL(_net_inet_ipsec); /* net.inet.ipsec */ SYSCTL_INT(_net_inet_ipsec, IPSECCTL_DEF_POLICY, def_policy, - CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ip4_def_policy).policy, 0, + CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(def_policy).policy, 0, "IPsec default policy."); SYSCTL_INT(_net_inet_ipsec, IPSECCTL_DEF_ESP_TRANSLEV, esp_trans_deflev, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ip4_esp_trans_deflev), 0, @@ -213,7 +214,7 @@ SYSCTL_DECL(_net_inet6_ipsec6); /* net.inet6.ipsec6 */ SYSCTL_INT(_net_inet6_ipsec6, IPSECCTL_DEF_POLICY, def_policy, - CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ip4_def_policy).policy, 0, + CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(def_policy).policy, 0, "IPsec default policy."); SYSCTL_INT(_net_inet6_ipsec6, IPSECCTL_DEF_ESP_TRANSLEV, esp_trans_deflev, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ip6_esp_trans_deflev), 0, @@ -262,7 +263,7 @@ key_allocsp_default(const char* where, i KEYDEBUG(KEYDEBUG_IPSEC_STAMP, printf("DP key_allocsp_default from %s:%u\n", where, tag)); - sp = &V_ip4_def_policy; + sp = &V_def_policy; if (sp->policy != IPSEC_POLICY_DISCARD && sp->policy != IPSEC_POLICY_NONE) { ipseclog((LOG_INFO, "fixed system default policy: %d->%d\n", @@ -828,17 +829,13 @@ ipsec_init_policy(struct socket *so, str ipsec_delpcbpolicy(new); return (ENOBUFS); } - new->sp_in->state = IPSEC_SPSTATE_ALIVE; new->sp_in->policy = IPSEC_POLICY_ENTRUST; - if ((new->sp_out = KEY_NEWSP()) == NULL) { KEY_FREESP(&new->sp_in); ipsec_delpcbpolicy(new); return (ENOBUFS); } - new->sp_out->state = IPSEC_SPSTATE_ALIVE; new->sp_out->policy = IPSEC_POLICY_ENTRUST; - *pcb_sp = new; return (0); @@ -927,7 +924,6 @@ ipsec_deepcopy_policy(struct secpolicy * } dst->req = newchain; - dst->state = src->state; dst->policy = src->policy; /* Do not touch the refcnt fields. */ @@ -979,8 +975,6 @@ ipsec_set_policy_internal(struct secpoli if ((newsp = key_msg2sp(xpl, len, &error)) == NULL) return (error); - newsp->state = IPSEC_SPSTATE_ALIVE; - /* Clear old SP and set new SP. */ KEY_FREESP(pcb_sp); *pcb_sp = newsp; @@ -1693,14 +1687,15 @@ ipsec_dumpmbuf(struct mbuf *m) } static void -ipsec_init(const void *unused __unused) +def_policy_init(const void *unused __unused) { - SECPOLICY_LOCK_INIT(&V_ip4_def_policy); - V_ip4_def_policy.refcnt = 1; /* NB: disallow free. */ + bzero(&V_def_policy, sizeof(struct secpolicy)); + V_def_policy.policy = IPSEC_POLICY_NONE; + V_def_policy.refcnt = 1; } -VNET_SYSINIT(ipsec_init, SI_SUB_PROTO_DOMAININIT, SI_ORDER_ANY, ipsec_init, - NULL); +VNET_SYSINIT(def_policy_init, SI_SUB_PROTO_DOMAININIT, SI_ORDER_ANY, + def_policy_init, NULL); /* XXX This stuff doesn't belong here... */ Modified: head/sys/netipsec/ipsec.h ============================================================================== --- head/sys/netipsec/ipsec.h Wed Dec 24 17:12:51 2014 (r276187) +++ head/sys/netipsec/ipsec.h Wed Dec 24 18:34:56 2014 (r276188) @@ -81,21 +81,15 @@ struct secpolicyindex { /* Security Policy Data Base */ struct secpolicy { - LIST_ENTRY(secpolicy) chain; - struct mtx lock; + TAILQ_ENTRY(secpolicy) chain; - u_int refcnt; /* reference count */ struct secpolicyindex spidx; /* selector */ - u_int32_t id; /* It's unique number on the system. */ - u_int state; /* 0: dead, others: alive */ -#define IPSEC_SPSTATE_DEAD 0 -#define IPSEC_SPSTATE_ALIVE 1 - u_int policy; /* policy_type per pfkeyv2.h */ - u_int16_t scangen; /* scan generation # */ struct ipsecrequest *req; /* pointer to the ipsec request tree, */ /* if policy == IPSEC else this value == NULL.*/ - + u_int refcnt; /* reference count */ + u_int policy; /* policy_type per pfkeyv2.h */ + u_int32_t id; /* It's unique number on the system. */ /* * lifetime handler. * the policy can be used without limitiation if both lifetime and @@ -109,13 +103,6 @@ struct secpolicy { long validtime; /* duration this policy is valid without use */ }; -#define SECPOLICY_LOCK_INIT(_sp) \ - mtx_init(&(_sp)->lock, "ipsec policy", NULL, MTX_DEF) -#define SECPOLICY_LOCK(_sp) mtx_lock(&(_sp)->lock) -#define SECPOLICY_UNLOCK(_sp) mtx_unlock(&(_sp)->lock) -#define SECPOLICY_LOCK_DESTROY(_sp) mtx_destroy(&(_sp)->lock) -#define SECPOLICY_LOCK_ASSERT(_sp) mtx_assert(&(_sp)->lock, MA_OWNED) - /* Request for IPsec */ struct ipsecrequest { struct ipsecrequest *next; @@ -279,7 +266,6 @@ VNET_DECLARE(int, ipsec_integrity); #endif VNET_PCPUSTAT_DECLARE(struct ipsecstat, ipsec4stat); -VNET_DECLARE(struct secpolicy, ip4_def_policy); VNET_DECLARE(int, ip4_esp_trans_deflev); VNET_DECLARE(int, ip4_esp_net_deflev); VNET_DECLARE(int, ip4_ah_trans_deflev); @@ -292,7 +278,6 @@ VNET_DECLARE(int, crypto_support); #define IPSECSTAT_INC(name) \ VNET_PCPUSTAT_ADD(struct ipsecstat, ipsec4stat, name, 1) -#define V_ip4_def_policy VNET(ip4_def_policy) #define V_ip4_esp_trans_deflev VNET(ip4_esp_trans_deflev) #define V_ip4_esp_net_deflev VNET(ip4_esp_net_deflev) #define V_ip4_ah_trans_deflev VNET(ip4_ah_trans_deflev) Modified: head/sys/netipsec/key.c ============================================================================== --- head/sys/netipsec/key.c Wed Dec 24 17:12:51 2014 (r276187) +++ head/sys/netipsec/key.c Wed Dec 24 18:34:56 2014 (r276188) @@ -48,6 +48,7 @@ #include #include #include +#include #include #include #include @@ -141,16 +142,19 @@ static VNET_DEFINE(u_int32_t, acq_seq) = #define V_acq_seq VNET(acq_seq) /* SPD */ -static VNET_DEFINE(LIST_HEAD(_sptree, secpolicy), sptree[IPSEC_DIR_MAX]); +static VNET_DEFINE(TAILQ_HEAD(_sptree, secpolicy), sptree[IPSEC_DIR_MAX]); +static struct rmlock sptree_lock; #define V_sptree VNET(sptree) -static struct mtx sptree_lock; -#define SPTREE_LOCK_INIT() \ - mtx_init(&sptree_lock, "sptree", \ - "fast ipsec security policy database", MTX_DEF) -#define SPTREE_LOCK_DESTROY() mtx_destroy(&sptree_lock) -#define SPTREE_LOCK() mtx_lock(&sptree_lock) -#define SPTREE_UNLOCK() mtx_unlock(&sptree_lock) -#define SPTREE_LOCK_ASSERT() mtx_assert(&sptree_lock, MA_OWNED) +#define SPTREE_LOCK_INIT() rm_init(&sptree_lock, "sptree") +#define SPTREE_LOCK_DESTROY() rm_destroy(&sptree_lock) +#define SPTREE_RLOCK_TRACKER struct rm_priotracker sptree_tracker +#define SPTREE_RLOCK() rm_rlock(&sptree_lock, &sptree_tracker) +#define SPTREE_RUNLOCK() rm_runlock(&sptree_lock, &sptree_tracker) +#define SPTREE_RLOCK_ASSERT() rm_assert(&sptree_lock, RA_RLOCKED) +#define SPTREE_WLOCK() rm_wlock(&sptree_lock) +#define SPTREE_WUNLOCK() rm_wunlock(&sptree_lock) +#define SPTREE_WLOCK_ASSERT() rm_assert(&sptree_lock, RA_WLOCKED) +#define SPTREE_UNLOCK_ASSERT() rm_assert(&sptree_lock, RA_UNLOCKED) static VNET_DEFINE(LIST_HEAD(_sahtree, secashead), sahtree); /* SAD */ #define V_sahtree VNET(sahtree) @@ -416,9 +420,8 @@ static struct callout key_timer; static struct secasvar *key_allocsa_policy(const struct secasindex *); static void key_freesp_so(struct secpolicy **); static struct secasvar *key_do_allocsa_policy(struct secashead *, u_int); -static void key_delsp(struct secpolicy *); +static void key_unlink(struct secpolicy *); static struct secpolicy *key_getsp(struct secpolicyindex *); -static void _key_delsp(struct secpolicy *sp); static struct secpolicy *key_getspbyid(u_int32_t); static u_int32_t key_newreqid(void); static struct mbuf *key_gather_mbuf(struct mbuf *, @@ -575,15 +578,8 @@ sa_delref(struct secasvar *sav) return (refcount_release(&sav->refcnt)); } -#define SP_ADDREF(p) do { \ - (p)->refcnt++; \ - IPSEC_ASSERT((p)->refcnt != 0, ("SP refcnt overflow")); \ -} while (0) -#define SP_DELREF(p) do { \ - IPSEC_ASSERT((p)->refcnt > 0, ("SP refcnt underflow")); \ - (p)->refcnt--; \ -} while (0) - +#define SP_ADDREF(p) refcount_acquire(&(p)->refcnt) +#define SP_DELREF(p) refcount_release(&(p)->refcnt) /* * Update the refcnt while holding the SPTREE lock. @@ -591,9 +587,8 @@ sa_delref(struct secasvar *sav) void key_addref(struct secpolicy *sp) { - SPTREE_LOCK(); + SP_ADDREF(sp); - SPTREE_UNLOCK(); } /* @@ -606,7 +601,7 @@ key_havesp(u_int dir) { return (dir == IPSEC_DIR_INBOUND || dir == IPSEC_DIR_OUTBOUND ? - LIST_FIRST(&V_sptree[dir]) != NULL : 1); + TAILQ_FIRST(&V_sptree[dir]) != NULL : 1); } /* %%% IPsec policy management */ @@ -620,6 +615,7 @@ struct secpolicy * key_allocsp(struct secpolicyindex *spidx, u_int dir, const char* where, int tag) { + SPTREE_RLOCK_TRACKER; struct secpolicy *sp; IPSEC_ASSERT(spidx != NULL, ("null spidx")); @@ -634,14 +630,11 @@ key_allocsp(struct secpolicyindex *spidx printf("*** objects\n"); kdebug_secpolicyindex(spidx)); - SPTREE_LOCK(); - LIST_FOREACH(sp, &V_sptree[dir], chain) { + SPTREE_RLOCK(); + TAILQ_FOREACH(sp, &V_sptree[dir], chain) { KEYDEBUG(KEYDEBUG_IPSEC_DATA, printf("*** in SPD\n"); kdebug_secpolicyindex(&sp->spidx)); - - if (sp->state == IPSEC_SPSTATE_DEAD) - continue; if (key_cmpspidx_withmask(&sp->spidx, spidx)) goto found; } @@ -655,7 +648,7 @@ found: sp->lastused = time_second; SP_ADDREF(sp); } - SPTREE_UNLOCK(); + SPTREE_RUNLOCK(); KEYDEBUG(KEYDEBUG_IPSEC_STAMP, printf("DP %s return SP:%p (ID=%u) refcnt %u\n", __func__, @@ -673,6 +666,7 @@ struct secpolicy * key_allocsp2(u_int32_t spi, union sockaddr_union *dst, u_int8_t proto, u_int dir, const char* where, int tag) { + SPTREE_RLOCK_TRACKER; struct secpolicy *sp; IPSEC_ASSERT(dst != NULL, ("null dst")); @@ -688,14 +682,11 @@ key_allocsp2(u_int32_t spi, union sockad printf("spi %u proto %u dir %u\n", spi, proto, dir); kdebug_sockaddr(&dst->sa)); - SPTREE_LOCK(); - LIST_FOREACH(sp, &V_sptree[dir], chain) { + SPTREE_RLOCK(); + TAILQ_FOREACH(sp, &V_sptree[dir], chain) { KEYDEBUG(KEYDEBUG_IPSEC_DATA, printf("*** in SPD\n"); kdebug_secpolicyindex(&sp->spidx)); - - if (sp->state == IPSEC_SPSTATE_DEAD) - continue; /* compare simple values, then dst address */ if (sp->spidx.ul_proto != proto) continue; @@ -715,7 +706,7 @@ found: sp->lastused = time_second; SP_ADDREF(sp); } - SPTREE_UNLOCK(); + SPTREE_RUNLOCK(); KEYDEBUG(KEYDEBUG_IPSEC_STAMP, printf("DP %s return SP:%p (ID=%u) refcnt %u\n", __func__, @@ -1174,22 +1165,41 @@ done: void _key_freesp(struct secpolicy **spp, const char* where, int tag) { + struct ipsecrequest *isr, *nextisr; struct secpolicy *sp = *spp; IPSEC_ASSERT(sp != NULL, ("null sp")); - - SPTREE_LOCK(); - SP_DELREF(sp); - KEYDEBUG(KEYDEBUG_IPSEC_STAMP, printf("DP %s SP:%p (ID=%u) from %s:%u; refcnt now %u\n", __func__, sp, sp->id, where, tag, sp->refcnt)); - if (sp->refcnt == 0) { - *spp = NULL; - key_delsp(sp); + if (SP_DELREF(sp) == 0) + return; + *spp = NULL; + for (isr = sp->req; isr != NULL; isr = nextisr) { + if (isr->sav != NULL) { + KEY_FREESAV(&isr->sav); + isr->sav = NULL; + } + nextisr = isr->next; + ipsec_delisr(isr); } - SPTREE_UNLOCK(); + free(sp, M_IPSEC_SP); +} + +static void +key_unlink(struct secpolicy *sp) +{ + + IPSEC_ASSERT(sp != NULL, ("null sp")); + IPSEC_ASSERT(sp->spidx.dir == IPSEC_DIR_INBOUND || + sp->spidx.dir == IPSEC_DIR_OUTBOUND, + ("invalid direction %u", sp->spidx.dir)); + SPTREE_UNLOCK_ASSERT(); + + SPTREE_WLOCK(); + TAILQ_REMOVE(&V_sptree[sp->spidx.dir], sp, chain); + SPTREE_WUNLOCK(); } /* @@ -1278,38 +1288,6 @@ key_freesav(struct secasvar **psav, cons /* %%% SPD management */ /* - * free security policy entry. - */ -static void -key_delsp(struct secpolicy *sp) -{ - struct ipsecrequest *isr, *nextisr; - - IPSEC_ASSERT(sp != NULL, ("null sp")); - SPTREE_LOCK_ASSERT(); - - sp->state = IPSEC_SPSTATE_DEAD; - - IPSEC_ASSERT(sp->refcnt == 0, - ("SP with references deleted (refcnt %u)", sp->refcnt)); - - /* remove from SP index */ - if (__LIST_CHAINED(sp)) - LIST_REMOVE(sp, chain); - - for (isr = sp->req; isr != NULL; isr = nextisr) { - if (isr->sav != NULL) { - KEY_FREESAV(&isr->sav); - isr->sav = NULL; - } - - nextisr = isr->next; - ipsec_delisr(isr); - } - _key_delsp(sp); -} - -/* * search SPD * OUT: NULL : not found * others : found, pointer to a SP. @@ -1317,20 +1295,19 @@ key_delsp(struct secpolicy *sp) static struct secpolicy * key_getsp(struct secpolicyindex *spidx) { + SPTREE_RLOCK_TRACKER; struct secpolicy *sp; IPSEC_ASSERT(spidx != NULL, ("null spidx")); - SPTREE_LOCK(); - LIST_FOREACH(sp, &V_sptree[spidx->dir], chain) { - if (sp->state == IPSEC_SPSTATE_DEAD) - continue; + SPTREE_RLOCK(); + TAILQ_FOREACH(sp, &V_sptree[spidx->dir], chain) { if (key_cmpspidx_exactly(spidx, &sp->spidx)) { SP_ADDREF(sp); break; } } - SPTREE_UNLOCK(); + SPTREE_RUNLOCK(); return sp; } @@ -1343,28 +1320,25 @@ key_getsp(struct secpolicyindex *spidx) static struct secpolicy * key_getspbyid(u_int32_t id) { + SPTREE_RLOCK_TRACKER; struct secpolicy *sp; - SPTREE_LOCK(); - LIST_FOREACH(sp, &V_sptree[IPSEC_DIR_INBOUND], chain) { - if (sp->state == IPSEC_SPSTATE_DEAD) - continue; + SPTREE_RLOCK(); + TAILQ_FOREACH(sp, &V_sptree[IPSEC_DIR_INBOUND], chain) { if (sp->id == id) { SP_ADDREF(sp); goto done; } } - LIST_FOREACH(sp, &V_sptree[IPSEC_DIR_OUTBOUND], chain) { - if (sp->state == IPSEC_SPSTATE_DEAD) - continue; + TAILQ_FOREACH(sp, &V_sptree[IPSEC_DIR_OUTBOUND], chain) { if (sp->id == id) { SP_ADDREF(sp); goto done; } } done: - SPTREE_UNLOCK(); + SPTREE_RUNLOCK(); return sp; } @@ -1376,11 +1350,8 @@ key_newsp(const char* where, int tag) newsp = (struct secpolicy *) malloc(sizeof(struct secpolicy), M_IPSEC_SP, M_NOWAIT|M_ZERO); - if (newsp) { - SECPOLICY_LOCK_INIT(newsp); - newsp->refcnt = 1; - newsp->req = NULL; - } + if (newsp) + refcount_init(&newsp->refcnt, 1); KEYDEBUG(KEYDEBUG_IPSEC_STAMP, printf("DP %s from %s:%u return SP:%p\n", __func__, @@ -1388,13 +1359,6 @@ key_newsp(const char* where, int tag) return newsp; } -static void -_key_delsp(struct secpolicy *sp) -{ - SECPOLICY_LOCK_DESTROY(sp); - free(sp, M_IPSEC_SP); -} - /* * create secpolicy structure from sadb_x_policy structure. * NOTE: `state', `secpolicyindex' in secpolicy structure are not set, @@ -1874,9 +1838,7 @@ key_spdadd(struct socket *so, struct mbu newsp = key_getsp(&spidx); if (mhp->msg->sadb_msg_type == SADB_X_SPDUPDATE) { if (newsp) { - SPTREE_LOCK(); - newsp->state = IPSEC_SPSTATE_DEAD; - SPTREE_UNLOCK(); + key_unlink(newsp); KEY_FREESP(&newsp); } } else { @@ -1888,13 +1850,15 @@ key_spdadd(struct socket *so, struct mbu } } + /* XXX: there is race between key_getsp and key_msg2sp. */ + /* allocation new SP entry */ if ((newsp = key_msg2sp(xpl0, PFKEY_EXTLEN(xpl0), &error)) == NULL) { return key_senderror(so, m, error); } if ((newsp->id = key_getnewspid()) == 0) { - _key_delsp(newsp); + KEY_FREESP(&newsp); return key_senderror(so, m, ENOBUFS); } @@ -1910,18 +1874,20 @@ key_spdadd(struct socket *so, struct mbu /* sanity check on addr pair */ if (((struct sockaddr *)(src0 + 1))->sa_family != ((struct sockaddr *)(dst0+ 1))->sa_family) { - _key_delsp(newsp); + KEY_FREESP(&newsp); return key_senderror(so, m, EINVAL); } if (((struct sockaddr *)(src0 + 1))->sa_len != ((struct sockaddr *)(dst0+ 1))->sa_len) { - _key_delsp(newsp); + KEY_FREESP(&newsp); return key_senderror(so, m, EINVAL); } #if 1 - if (newsp->req && newsp->req->saidx.src.sa.sa_family && newsp->req->saidx.dst.sa.sa_family) { - if (newsp->req->saidx.src.sa.sa_family != newsp->req->saidx.dst.sa.sa_family) { - _key_delsp(newsp); + if (newsp->req && newsp->req->saidx.src.sa.sa_family && + newsp->req->saidx.dst.sa.sa_family) { + if (newsp->req->saidx.src.sa.sa_family != + newsp->req->saidx.dst.sa.sa_family) { + KEY_FREESP(&newsp); return key_senderror(so, m, EINVAL); } } @@ -1932,9 +1898,9 @@ key_spdadd(struct socket *so, struct mbu newsp->lifetime = lft ? lft->sadb_lifetime_addtime : 0; newsp->validtime = lft ? lft->sadb_lifetime_usetime : 0; - newsp->refcnt = 1; /* do not reclaim until I say I do */ - newsp->state = IPSEC_SPSTATE_ALIVE; - LIST_INSERT_TAIL(&V_sptree[newsp->spidx.dir], newsp, secpolicy, chain); + SPTREE_WLOCK(); + TAILQ_INSERT_TAIL(&V_sptree[newsp->spidx.dir], newsp, chain); + SPTREE_WUNLOCK(); /* delete the entry in spacqtree */ if (mhp->msg->sadb_msg_type == SADB_X_SPDUPDATE) { @@ -2109,9 +2075,7 @@ key_spddelete(struct socket *so, struct /* save policy id to buffer to be returned. */ xpl0->sadb_x_policy_id = sp->id; - SPTREE_LOCK(); - sp->state = IPSEC_SPSTATE_DEAD; - SPTREE_UNLOCK(); + key_unlink(sp); KEY_FREESP(&sp); { @@ -2176,9 +2140,7 @@ key_spddelete2(struct socket *so, struct return key_senderror(so, m, EINVAL); } - SPTREE_LOCK(); - sp->state = IPSEC_SPSTATE_DEAD; - SPTREE_UNLOCK(); + key_unlink(sp); KEY_FREESP(&sp); { @@ -2356,8 +2318,9 @@ key_spdacquire(struct secpolicy *sp) static int key_spdflush(struct socket *so, struct mbuf *m, const struct sadb_msghdr *mhp) { + TAILQ_HEAD(, secpolicy) drainq; struct sadb_msg *newmsg; - struct secpolicy *sp; + struct secpolicy *sp, *nextsp; u_int dir; IPSEC_ASSERT(so != NULL, ("null socket")); @@ -2368,11 +2331,17 @@ key_spdflush(struct socket *so, struct m if (m->m_len != PFKEY_ALIGN8(sizeof(struct sadb_msg))) return key_senderror(so, m, EINVAL); + TAILQ_INIT(&drainq); + SPTREE_WLOCK(); for (dir = 0; dir < IPSEC_DIR_MAX; dir++) { - SPTREE_LOCK(); - LIST_FOREACH(sp, &V_sptree[dir], chain) - sp->state = IPSEC_SPSTATE_DEAD; - SPTREE_UNLOCK(); + TAILQ_CONCAT(&drainq, &V_sptree[dir], chain); + } + SPTREE_WUNLOCK(); + sp = TAILQ_FIRST(&drainq); + while (sp != NULL) { + nextsp = TAILQ_NEXT(sp, chain); + KEY_FREESP(&sp); + sp = nextsp; } if (sizeof(struct sadb_msg) > m->m_len + M_TRAILINGSPACE(m)) { @@ -2405,6 +2374,7 @@ key_spdflush(struct socket *so, struct m static int key_spddump(struct socket *so, struct mbuf *m, const struct sadb_msghdr *mhp) { + SPTREE_RLOCK_TRACKER; struct secpolicy *sp; int cnt; u_int dir; @@ -2417,20 +2387,20 @@ key_spddump(struct socket *so, struct mb /* search SPD entry and get buffer size. */ cnt = 0; - SPTREE_LOCK(); + SPTREE_RLOCK(); for (dir = 0; dir < IPSEC_DIR_MAX; dir++) { - LIST_FOREACH(sp, &V_sptree[dir], chain) { + TAILQ_FOREACH(sp, &V_sptree[dir], chain) { cnt++; } } if (cnt == 0) { - SPTREE_UNLOCK(); + SPTREE_RUNLOCK(); return key_senderror(so, m, ENOENT); } for (dir = 0; dir < IPSEC_DIR_MAX; dir++) { - LIST_FOREACH(sp, &V_sptree[dir], chain) { + TAILQ_FOREACH(sp, &V_sptree[dir], chain) { --cnt; n = key_setdumpsp(sp, SADB_X_SPDDUMP, cnt, mhp->msg->sadb_msg_pid); @@ -2440,7 +2410,7 @@ key_spddump(struct socket *so, struct mb } } - SPTREE_UNLOCK(); + SPTREE_RUNLOCK(); m_freem(m); return 0; } @@ -2452,6 +2422,8 @@ key_setdumpsp(struct secpolicy *sp, u_in struct mbuf *result = NULL, *m; struct seclifetime lt; + SPTREE_RLOCK_ASSERT(); + m = key_setsadbmsg(type, 0, SADB_SATYPE_UNSPEC, seq, pid, sp->refcnt); if (!m) goto fail; @@ -4226,47 +4198,29 @@ key_bbcmp(const void *a1, const void *a2 static void key_flush_spd(time_t now) { - static u_int16_t sptree_scangen = 0; - u_int16_t gen = sptree_scangen++; + SPTREE_RLOCK_TRACKER; struct secpolicy *sp; u_int dir; /* SPD */ for (dir = 0; dir < IPSEC_DIR_MAX; dir++) { restart: - SPTREE_LOCK(); - LIST_FOREACH(sp, &V_sptree[dir], chain) { - if (sp->scangen == gen) /* previously handled */ - continue; - sp->scangen = gen; - if (sp->state == IPSEC_SPSTATE_DEAD && - sp->refcnt == 1) { - /* - * Ensure that we only decrease refcnt once, - * when we're the last consumer. - * Directly call SP_DELREF/key_delsp instead - * of KEY_FREESP to avoid unlocking/relocking - * SPTREE_LOCK before key_delsp: may refcnt - * be increased again during that time ? - * NB: also clean entries created by - * key_spdflush - */ - SP_DELREF(sp); - key_delsp(sp); - SPTREE_UNLOCK(); - goto restart; - } + SPTREE_RLOCK(); + TAILQ_FOREACH(sp, &V_sptree[dir], chain) { if (sp->lifetime == 0 && sp->validtime == 0) continue; - if ((sp->lifetime && now - sp->created > sp->lifetime) - || (sp->validtime && now - sp->lastused > sp->validtime)) { - sp->state = IPSEC_SPSTATE_DEAD; - SPTREE_UNLOCK(); + if ((sp->lifetime && + now - sp->created > sp->lifetime) || + (sp->validtime && + now - sp->lastused > sp->validtime)) { + SPTREE_RUNLOCK(); + key_unlink(sp); key_spdexpire(sp); + KEY_FREESP(&sp); goto restart; } } - SPTREE_UNLOCK(); + SPTREE_RUNLOCK(); } } @@ -7609,7 +7563,7 @@ key_init(void) int i; for (i = 0; i < IPSEC_DIR_MAX; i++) - LIST_INIT(&V_sptree[i]); + TAILQ_INIT(&V_sptree[i]); LIST_INIT(&V_sahtree); @@ -7619,10 +7573,6 @@ key_init(void) LIST_INIT(&V_acqtree); LIST_INIT(&V_spacqtree); - /* system default */ - V_ip4_def_policy.policy = IPSEC_POLICY_NONE; - V_ip4_def_policy.refcnt++; /*never reclaim this*/ - if (!IS_DEFAULT_VNET(curvnet)) return; @@ -7647,6 +7597,7 @@ key_init(void) void key_destroy(void) { + TAILQ_HEAD(, secpolicy) drainq; struct secpolicy *sp, *nextsp; struct secacq *acq, *nextacq; struct secspacq *spacq, *nextspacq; @@ -7654,18 +7605,18 @@ key_destroy(void) struct secreg *reg; int i; - SPTREE_LOCK(); + TAILQ_INIT(&drainq); + SPTREE_WLOCK(); for (i = 0; i < IPSEC_DIR_MAX; i++) { - for (sp = LIST_FIRST(&V_sptree[i]); - sp != NULL; sp = nextsp) { - nextsp = LIST_NEXT(sp, chain); - if (__LIST_CHAINED(sp)) { - LIST_REMOVE(sp, chain); - free(sp, M_IPSEC_SP); - } - } + TAILQ_CONCAT(&drainq, &V_sptree[dir], chain); + } + SPTREE_WUNLOCK(); + sp = TAILQ_FIRST(&drainq); + while (sp != NULL) { + nextsp = TAILQ_NEXT(sp, chain); + KEY_FREESP(&sp); + sp = nextsp; } - SPTREE_UNLOCK(); SAHTREE_LOCK(); for (sah = LIST_FIRST(&V_sahtree); sah != NULL; sah = nextsah) { Modified: head/sys/netipsec/key_debug.c ============================================================================== --- head/sys/netipsec/key_debug.c Wed Dec 24 17:12:51 2014 (r276187) +++ head/sys/netipsec/key_debug.c Wed Dec 24 18:34:56 2014 (r276188) @@ -463,8 +463,8 @@ kdebug_secpolicy(struct secpolicy *sp) if (sp == NULL) panic("%s: NULL pointer was passed.\n", __func__); - printf("secpolicy{ refcnt=%u state=%u policy=%u\n", - sp->refcnt, sp->state, sp->policy); + printf("secpolicy{ refcnt=%u policy=%u\n", + sp->refcnt, sp->policy); kdebug_secpolicyindex(&sp->spidx); From owner-svn-src-all@FreeBSD.ORG Wed Dec 24 18:51:26 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 62EC6457; Wed, 24 Dec 2014 18:51:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4F7F064945; Wed, 24 Dec 2014 18:51:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBOIpQAq086453; Wed, 24 Dec 2014 18:51:26 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBOIpQv2086431; Wed, 24 Dec 2014 18:51:26 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201412241851.sBOIpQv2086431@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 24 Dec 2014 18:51:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276189 - head/release/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Dec 2014 18:51:26 -0000 Author: emaste Date: Wed Dec 24 18:51:25 2014 New Revision: 276189 URL: https://svnweb.freebsd.org/changeset/base/276189 Log: Build gperf before gcc The ARM image builds build the in-tree gcc in order to build u-boot and gperf is needed to build gcc, but is no longer installed on archs that use clang. Invoking the make targets as separate steps is done to work around a build failure which is not yet fully understood. Reviewed by: gjb, imp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D1317 Modified: head/release/arm/release.sh Modified: head/release/arm/release.sh ============================================================================== --- head/release/arm/release.sh Wed Dec 24 18:34:56 2014 (r276188) +++ head/release/arm/release.sh Wed Dec 24 18:51:25 2014 (r276189) @@ -127,6 +127,14 @@ main() { BATCH=1 FORCE_PKG_REGISTER=1 install clean distclean done + # Certain u-boot versions hardcode the use of a host gcc, and gcc's + # build relies on having gperf installed. + eval chroot ${CHROOTDIR} make -C /usr/src/gnu/usr.bin/gperf \ + WITH_GCC=1 ${WORLD_FLAGS} obj + eval chroot ${CHROOTDIR} make -C /usr/src/gnu/usr.bin/gperf \ + WITH_GCC=1 ${WORLD_FLAGS} -j1 depend all + eval chroot ${CHROOTDIR} make -C /usr/src/gnu/usr.bin/gperf \ + WITH_GCC=1 ${WORLD_FLAGS} -j1 install eval chroot ${CHROOTDIR} make -C /usr/src/gnu/usr.bin/cc \ WITH_GCC=1 ${WORLD_FLAGS} -j1 obj depend all install From owner-svn-src-all@FreeBSD.ORG Wed Dec 24 18:54:35 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C68D75F2; Wed, 24 Dec 2014 18:54:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B01A9649A9; Wed, 24 Dec 2014 18:54:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBOIsZ7v087531; Wed, 24 Dec 2014 18:54:35 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBOIsWIo087516; Wed, 24 Dec 2014 18:54:32 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201412241854.sBOIsWIo087516@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Wed, 24 Dec 2014 18:54:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276190 - in head: gnu/usr.bin/gdb/kgdb sys/arm/arm sys/arm/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Dec 2014 18:54:35 -0000 Author: ian Date: Wed Dec 24 18:54:31 2014 New Revision: 276190 URL: https://svnweb.freebsd.org/changeset/base/276190 Log: Cleanup up ARM *frame structures... - Eliminate unused irqframe - Eliminate unused saframe - Instead of splitting r4-sp storage between the stack and switchframe, just put all the registers in switchframe and eliminate the un_32 struct. Submitted by: Svatopluk Kraus , Michal Meloun Modified: head/gnu/usr.bin/gdb/kgdb/trgt_arm.c head/sys/arm/arm/db_trace.c head/sys/arm/arm/gdb_machdep.c head/sys/arm/arm/genassym.c head/sys/arm/arm/machdep.c head/sys/arm/arm/stack_machdep.c head/sys/arm/arm/swtch.S head/sys/arm/arm/trap.c head/sys/arm/arm/vm_machdep.c head/sys/arm/include/db_machdep.h head/sys/arm/include/frame.h head/sys/arm/include/pcb.h Modified: head/gnu/usr.bin/gdb/kgdb/trgt_arm.c ============================================================================== --- head/gnu/usr.bin/gdb/kgdb/trgt_arm.c Wed Dec 24 18:51:25 2014 (r276189) +++ head/gnu/usr.bin/gdb/kgdb/trgt_arm.c Wed Dec 24 18:54:31 2014 (r276190) @@ -72,20 +72,12 @@ kgdb_trgt_fetch_registers(int regno __un warnx("kvm_read: %s", kvm_geterr(kvm)); memset(&pcb, 0, sizeof(pcb)); } - for (i = ARM_A1_REGNUM + 8; i <= ARM_SP_REGNUM; i++) { - supply_register(i, (char *)&pcb.un_32.pcb32_r8 + - (i - (ARM_A1_REGNUM + 8 )) * 4); - } - if (pcb.un_32.pcb32_sp != 0) { - for (i = 0; i < 4; i++) { - if (kvm_read(kvm, pcb.un_32.pcb32_sp + (i) * 4, - ®, 4) != 4) { - warnx("kvm_read: %s", kvm_geterr(kvm)); - break; - } - supply_register(ARM_A1_REGNUM + 4 + i, (char *)®); - } - if (kvm_read(kvm, pcb.un_32.pcb32_sp + 4 * 4, ®, 4) != 4) + for (i = ARM_A1_REGNUM + 4; i <= ARM_SP_REGNUM; i++) { + supply_register(i, (char *)&pcb.pcb_regs.sf_r4 + + (i - (ARM_A1_REGNUM + 4 )) * 4); + } + if (pcb.pcb_regs.sf_sp != 0) { + if (kvm_read(kvm, pcb.pcb_regs.sf_sp + 4 * 4, ®, 4) != 4) warnx("kvm_read :%s", kvm_geterr(kvm)); else supply_register(ARM_PC_REGNUM, (char *)®); Modified: head/sys/arm/arm/db_trace.c ============================================================================== --- head/sys/arm/arm/db_trace.c Wed Dec 24 18:51:25 2014 (r276189) +++ head/sys/arm/arm/db_trace.c Wed Dec 24 18:54:31 2014 (r276190) @@ -609,14 +609,14 @@ db_trace_thread(struct thread *thr, int ctx = kdb_thr_ctx(thr); #ifdef __ARM_EABI__ - state.registers[FP] = ctx->un_32.pcb32_r11; - state.registers[SP] = ctx->un_32.pcb32_sp; - state.registers[LR] = ctx->un_32.pcb32_lr; - state.registers[PC] = ctx->un_32.pcb32_pc; + state.registers[FP] = ctx->pcb_regs.sf_r11; + state.registers[SP] = ctx->pcb_regs.sf_sp; + state.registers[LR] = ctx->pcb_regs.sf_lr; + state.registers[PC] = ctx->pcb_regs.sf_pc; db_stack_trace_cmd(&state); #else - db_stack_trace_cmd(ctx->un_32.pcb32_r11, -1, TRUE); + db_stack_trace_cmd(ctx->pcb_regs.sf_r11, -1, TRUE); #endif } else db_trace_self(); Modified: head/sys/arm/arm/gdb_machdep.c ============================================================================== --- head/sys/arm/arm/gdb_machdep.c Wed Dec 24 18:51:25 2014 (r276189) +++ head/sys/arm/arm/gdb_machdep.c Wed Dec 24 18:54:31 2014 (r276190) @@ -67,22 +67,26 @@ gdb_cpu_getreg(int regnum, size_t *regsz } switch (regnum) { - case 8: return (&kdb_thrctx->un_32.pcb32_r8); - case 9: return (&kdb_thrctx->un_32.pcb32_r9); - case 10: return (&kdb_thrctx->un_32.pcb32_r10); - case 11: return (&kdb_thrctx->un_32.pcb32_r11); - case 12: return (&kdb_thrctx->un_32.pcb32_r12); - case 13: stacktest = kdb_thrctx->un_32.pcb32_sp + 5 * 4; + case 4: return (&kdb_thrctx->pcb_regs.sf_r4); + case 5: return (&kdb_thrctx->pcb_regs.sf_r5); + case 6: return (&kdb_thrctx->pcb_regs.sf_r6); + case 7: return (&kdb_thrctx->pcb_regs.sf_r7); + case 8: return (&kdb_thrctx->pcb_regs.sf_r8); + case 9: return (&kdb_thrctx->pcb_regs.sf_r9); + case 10: return (&kdb_thrctx->pcb_regs.sf_r10); + case 11: return (&kdb_thrctx->pcb_regs.sf_r11); + case 12: return (&kdb_thrctx->pcb_regs.sf_r12); + case 13: stacktest = kdb_thrctx->pcb_regs.sf_sp + 5 * 4; return (&stacktest); case 15: /* * On context switch, the PC is not put in the PCB, but * we can retrieve it from the stack. */ - if (kdb_thrctx->un_32.pcb32_sp > KERNBASE) { - kdb_thrctx->un_32.pcb32_pc = *(register_t *) - (kdb_thrctx->un_32.pcb32_sp + 4 * 4); - return (&kdb_thrctx->un_32.pcb32_pc); + if (kdb_thrctx->pcb_regs.sf_sp > KERNBASE) { + kdb_thrctx->pcb_regs.sf_pc = *(register_t *) + (kdb_thrctx->pcb_regs.sf_sp + 4 * 4); + return (&kdb_thrctx->pcb_regs.sf_pc); } } Modified: head/sys/arm/arm/genassym.c ============================================================================== --- head/sys/arm/arm/genassym.c Wed Dec 24 18:51:25 2014 (r276189) +++ head/sys/arm/arm/genassym.c Wed Dec 24 18:54:31 2014 (r276190) @@ -63,13 +63,18 @@ ASSYM(PCB_FLAGS, offsetof(struct pcb, pc ASSYM(PCB_PAGEDIR, offsetof(struct pcb, pcb_pagedir)); ASSYM(PCB_L1VEC, offsetof(struct pcb, pcb_l1vec)); ASSYM(PCB_PL1VEC, offsetof(struct pcb, pcb_pl1vec)); -ASSYM(PCB_R8, offsetof(struct pcb, un_32.pcb32_r8)); -ASSYM(PCB_R9, offsetof(struct pcb, un_32.pcb32_r9)); -ASSYM(PCB_R10, offsetof(struct pcb, un_32.pcb32_r10)); -ASSYM(PCB_R11, offsetof(struct pcb, un_32.pcb32_r11)); -ASSYM(PCB_R12, offsetof(struct pcb, un_32.pcb32_r12)); -ASSYM(PCB_PC, offsetof(struct pcb, un_32.pcb32_pc)); -ASSYM(PCB_SP, offsetof(struct pcb, un_32.pcb32_sp)); +ASSYM(PCB_R4, offsetof(struct pcb, pcb_regs.sf_r4)); +ASSYM(PCB_R5, offsetof(struct pcb, pcb_regs.sf_r5)); +ASSYM(PCB_R6, offsetof(struct pcb, pcb_regs.sf_r6)); +ASSYM(PCB_R7, offsetof(struct pcb, pcb_regs.sf_r7)); +ASSYM(PCB_R8, offsetof(struct pcb, pcb_regs.sf_r8)); +ASSYM(PCB_R9, offsetof(struct pcb, pcb_regs.sf_r9)); +ASSYM(PCB_R10, offsetof(struct pcb, pcb_regs.sf_r10)); +ASSYM(PCB_R11, offsetof(struct pcb, pcb_regs.sf_r11)); +ASSYM(PCB_R12, offsetof(struct pcb, pcb_regs.sf_r12)); +ASSYM(PCB_SP, offsetof(struct pcb, pcb_regs.sf_sp)); +ASSYM(PCB_LR, offsetof(struct pcb, pcb_regs.sf_lr)); +ASSYM(PCB_PC, offsetof(struct pcb, pcb_regs.sf_pc)); ASSYM(PC_CURPCB, offsetof(struct pcpu, pc_curpcb)); ASSYM(PC_CURTHREAD, offsetof(struct pcpu, pc_curthread)); Modified: head/sys/arm/arm/machdep.c ============================================================================== --- head/sys/arm/arm/machdep.c Wed Dec 24 18:51:25 2014 (r276189) +++ head/sys/arm/arm/machdep.c Wed Dec 24 18:54:31 2014 (r276190) @@ -378,7 +378,7 @@ cpu_startup(void *dummy) bufinit(); vm_pager_bufferinit(); - pcb->un_32.pcb32_sp = (u_int)thread0.td_kstack + + pcb->pcb_regs.sf_sp = (u_int)thread0.td_kstack + USPACE_SVC_STACK_TOP; vector_page_setprot(VM_PROT_READ); pmap_set_pcb_pagedir(pmap_kernel(), pcb); @@ -770,14 +770,18 @@ sys_sigreturn(td, uap) void makectx(struct trapframe *tf, struct pcb *pcb) { - pcb->un_32.pcb32_r8 = tf->tf_r8; - pcb->un_32.pcb32_r9 = tf->tf_r9; - pcb->un_32.pcb32_r10 = tf->tf_r10; - pcb->un_32.pcb32_r11 = tf->tf_r11; - pcb->un_32.pcb32_r12 = tf->tf_r12; - pcb->un_32.pcb32_pc = tf->tf_pc; - pcb->un_32.pcb32_lr = tf->tf_usr_lr; - pcb->un_32.pcb32_sp = tf->tf_usr_sp; + pcb->pcb_regs.sf_r4 = tf->tf_r4; + pcb->pcb_regs.sf_r5 = tf->tf_r5; + pcb->pcb_regs.sf_r6 = tf->tf_r6; + pcb->pcb_regs.sf_r7 = tf->tf_r7; + pcb->pcb_regs.sf_r8 = tf->tf_r8; + pcb->pcb_regs.sf_r9 = tf->tf_r9; + pcb->pcb_regs.sf_r10 = tf->tf_r10; + pcb->pcb_regs.sf_r11 = tf->tf_r11; + pcb->pcb_regs.sf_r12 = tf->tf_r12; + pcb->pcb_regs.sf_pc = tf->tf_pc; + pcb->pcb_regs.sf_lr = tf->tf_usr_lr; + pcb->pcb_regs.sf_sp = tf->tf_usr_sp; } /* Modified: head/sys/arm/arm/stack_machdep.c ============================================================================== --- head/sys/arm/arm/stack_machdep.c Wed Dec 24 18:51:25 2014 (r276189) +++ head/sys/arm/arm/stack_machdep.c Wed Dec 24 18:54:31 2014 (r276190) @@ -76,7 +76,7 @@ stack_save_td(struct stack *st, struct t * as it doesn't have a frame pointer, however it's value is not used * when building for EABI. */ - frame = (u_int32_t *)td->td_pcb->un_32.pcb32_r11; + frame = (u_int32_t *)td->td_pcb->pcb_regs.sf_r11; stack_zero(st); stack_capture(st, frame); } Modified: head/sys/arm/arm/swtch.S ============================================================================== --- head/sys/arm/arm/swtch.S Wed Dec 24 18:51:25 2014 (r276189) +++ head/sys/arm/arm/swtch.S Wed Dec 24 18:54:31 2014 (r276190) @@ -116,6 +116,14 @@ __FBSDID("$FreeBSD$"); .Lblocked_lock: .word _C_LABEL(blocked_lock) +/* + * cpu_throw(oldtd, newtd) + * + * Remove current thread state, then select the next thread to run + * and load its state. + * r0 = oldtd + * r1 = newtd + */ ENTRY(cpu_throw) mov r5, r1 @@ -144,7 +152,6 @@ ENTRY(cpu_throw) * r0 = Pointer to L1 slot for vector_page (or NULL) * r1 = lwp0's DACR * r5 = lwp0 - * r6 = exit func * r7 = lwp0's PCB * r9 = cpufuncs */ @@ -181,25 +188,11 @@ ENTRY(cpu_throw) mov lr, pc ldr pc, [r9, #CF_CONTEXT_SWITCH] - /* Restore all the save registers */ -#ifndef _ARM_ARCH_5E - add r1, r7, #PCB_R8 - ldmia r1, {r8-r13} -#else - ldr r8, [r7, #(PCB_R8)] - ldr r9, [r7, #(PCB_R9)] - ldr r10, [r7, #(PCB_R10)] - ldr r11, [r7, #(PCB_R11)] - ldr r12, [r7, #(PCB_R12)] - ldr r13, [r7, #(PCB_SP)] -#endif - GET_PCPU(r6, r4) /* Hook in a new pcb */ str r7, [r6, #PC_CURPCB] /* We have a new curthread now so make a note it */ - add r6, r6, #PC_CURTHREAD - str r5, [r6] + str r5, [r6, #PC_CURTHREAD] #ifndef ARM_TP_ADDRESS mcr p15, 0, r5, c13, c0, 4 #endif @@ -215,22 +208,31 @@ ENTRY(cpu_throw) #else mcr p15, 0, r6, c13, c0, 3 #endif - - add sp, sp, #4; - ldmfd sp!, {r4-r7, pc} + /* Restore all the saved registers and exit */ + add r3, r7, #PCB_R4 + ldmia r3, {r4-r12, sp, pc} END(cpu_throw) +/* + * cpu_switch(oldtd, newtd, lock) + * + * Save the current thread state, then select the next thread to run + * and load its state. + * r0 = oldtd + * r1 = newtd + * r2 = lock (new lock for old thread) + */ ENTRY(cpu_switch) - stmfd sp!, {r4-r7, lr} - sub sp, sp, #4; -#ifdef __ARM_EABI__ - .save {r4-r7, lr} - .pad #4 -#endif + /* Interrupts are disabled. */ + /* Save all the registers in the old thread's pcb. */ + ldr r3, [r0, #(TD_PCB)] + + /* Restore all the saved registers and exit */ + add r3, #(PCB_R4) + stmia r3, {r4-r12, sp, lr, pc} mov r6, r2 /* Save the mutex */ -.Lswitch_resume: /* rem: r0 = old lwp */ /* rem: interrupts are disabled */ @@ -246,30 +248,12 @@ ENTRY(cpu_switch) ldr r2, [r1, #TD_PCB] str r2, [r7, #PC_CURPCB] - /* rem: r1 = new process */ - /* rem: interrupts are enabled */ - /* Stage two : Save old context */ /* Get the user structure for the old thread. */ ldr r2, [r0, #(TD_PCB)] mov r4, r0 /* Save the old thread. */ - /* Save all the registers in the old thread's pcb */ -#ifndef _ARM_ARCH_5E - add r7, r2, #(PCB_R8) - stmia r7, {r8-r13} -#else - strd r8, [r2, #(PCB_R8)] - strd r10, [r2, #(PCB_R10)] - strd r12, [r2, #(PCB_R12)] -#endif - str pc, [r2, #(PCB_PC)] - - /* - * NOTE: We can now use r8-r13 until it is time to restore - * them for the new process. - */ #ifdef ARM_TP_ADDRESS /* Store the old tp */ ldr r3, =ARM_TP_ADDRESS @@ -318,7 +302,6 @@ ENTRY(cpu_switch) /* rem: r2 = old PCB */ /* rem: r9 = new PCB */ - /* rem: interrupts are enabled */ ldr r5, [r9, #(PCB_DACR)] /* r5 = new DACR */ mov r2, #DOMAIN_CLIENT @@ -336,7 +319,6 @@ ENTRY(cpu_switch) mrc p15, 0, r10, c2, c0, 0 /* r10 = old L1 */ ldr r11, [r9, #(PCB_PAGEDIR)] /* r11 = new L1 */ - teq r10, r11 /* Same L1? */ cmpeq r0, r5 /* Same DACR? */ beq .Lcs_context_switched /* yes! */ @@ -426,54 +408,18 @@ ENTRY(cpu_switch) /* rem: r9 = new PCB */ - /* Restore all the save registers */ -#ifndef _ARM_ARCH_5E - add r7, r9, #PCB_R8 - ldmia r7, {r8-r13} - sub r7, r7, #PCB_R8 /* restore PCB pointer */ -#else - mov r7, r9 - ldr r8, [r7, #(PCB_R8)] - ldr r9, [r7, #(PCB_R9)] - ldr r10, [r7, #(PCB_R10)] - ldr r11, [r7, #(PCB_R11)] - ldr r12, [r7, #(PCB_R12)] - ldr r13, [r7, #(PCB_SP)] -#endif - - /* rem: r5 = new lwp's proc */ - /* rem: r6 = lock */ - /* rem: r7 = new PCB */ - -.Lswitch_return: - - /* - * Pull the registers that got pushed when either savectx() or - * cpu_switch() was called and return. - */ - add sp, sp, #4; - ldmfd sp!, {r4-r7, pc} -#ifdef DIAGNOSTIC -.Lswitch_bogons: - adr r0, .Lswitch_panic_str - bl _C_LABEL(panic) -1: nop - b 1b - -.Lswitch_panic_str: - .asciz "cpu_switch: sched_qs empty with non-zero sched_whichqs!\n" -#endif + /* Restore all the saved registers and exit */ + add r3, r9, #PCB_R4 + ldmia r3, {r4-r12, sp, pc} END(cpu_switch) ENTRY(savectx) - stmfd sp!, {r4-r7, lr} + stmfd sp!, {lr} sub sp, sp, #4 - /* - * r0 = pcb - */ - /* Store all the registers in the process's pcb */ - add r2, r0, #(PCB_R8) - stmia r2, {r8-r13} + + /* Store all the registers in the thread's pcb */ + add r3, r0, #(PCB_R4) + stmia r3, {r4-r12, sp, lr, pc} #ifdef VFP fmrx r2, fpexc /* If the VFP is enabled */ tst r2, #(VFPEXC_EN) /* the current thread has */ @@ -482,7 +428,7 @@ ENTRY(savectx) blne _C_LABEL(vfp_store) /* and disable the VFP. */ #endif add sp, sp, #4; - ldmfd sp!, {r4-r7, pc} + ldmfd sp!, {pc} END(savectx) ENTRY(fork_trampoline) Modified: head/sys/arm/arm/trap.c ============================================================================== --- head/sys/arm/arm/trap.c Wed Dec 24 18:51:25 2014 (r276189) +++ head/sys/arm/arm/trap.c Wed Dec 24 18:54:31 2014 (r276190) @@ -545,7 +545,7 @@ dab_buserr(struct trapframe *tf, u_int f * If the current trapframe is at the top of the kernel stack, * the fault _must_ have come from user mode. */ - if (tf != ((struct trapframe *)pcb->un_32.pcb32_sp) - 1) { + if (tf != ((struct trapframe *)pcb->pcb_regs.sf_sp) - 1) { /* * Kernel mode. We're either about to die a * spectacular death, or pcb_onfault will come Modified: head/sys/arm/arm/vm_machdep.c ============================================================================== --- head/sys/arm/arm/vm_machdep.c Wed Dec 24 18:51:25 2014 (r276189) +++ head/sys/arm/arm/vm_machdep.c Wed Dec 24 18:54:31 2014 (r276190) @@ -79,7 +79,7 @@ __FBSDID("$FreeBSD$"); * struct switchframe and trapframe must both be a multiple of 8 * for correct stack alignment. */ -CTASSERT(sizeof(struct switchframe) == 24); +CTASSERT(sizeof(struct switchframe) == 48); CTASSERT(sizeof(struct trapframe) == 80); /* @@ -93,43 +93,55 @@ cpu_fork(register struct thread *td1, re { struct pcb *pcb2; struct trapframe *tf; - struct switchframe *sf; struct mdproc *mdp2; if ((flags & RFPROC) == 0) return; - pcb2 = (struct pcb *)(td2->td_kstack + td2->td_kstack_pages * PAGE_SIZE) - 1; + + /* Point the pcb to the top of the stack */ + pcb2 = (struct pcb *) + (td2->td_kstack + td2->td_kstack_pages * PAGE_SIZE) - 1; #ifdef __XSCALE__ #ifndef CPU_XSCALE_CORE3 pmap_use_minicache(td2->td_kstack, td2->td_kstack_pages * PAGE_SIZE); #endif #endif td2->td_pcb = pcb2; + + /* Clone td1's pcb */ bcopy(td1->td_pcb, pcb2, sizeof(*pcb2)); + + /* Point to mdproc and then copy over td1's contents */ mdp2 = &p2->p_md; bcopy(&td1->td_proc->p_md, mdp2, sizeof(*mdp2)); - pcb2->un_32.pcb32_sp = td2->td_kstack + - USPACE_SVC_STACK_TOP - sizeof(*pcb2); + + /* Point the frame to the stack in front of pcb and copy td1's frame */ + td2->td_frame = (struct trapframe *)pcb2 - 1; + *td2->td_frame = *td1->td_frame; + + /* + * Create a new fresh stack for the new process. + * Copy the trap frame for the return to user mode as if from a + * syscall. This copies most of the user mode register values. + */ + pmap_set_pcb_pagedir(vmspace_pmap(p2->p_vmspace), pcb2); + pcb2->pcb_regs.sf_r4 = (register_t)fork_return; + pcb2->pcb_regs.sf_r5 = (register_t)td2; + pcb2->pcb_regs.sf_lr = (register_t)fork_trampoline; + pcb2->pcb_regs.sf_sp = STACKALIGN(td2->td_frame); + pcb2->pcb_vfpcpu = -1; pcb2->pcb_vfpstate.fpscr = VFPSCR_DN | VFPSCR_FZ; - pmap_activate(td2); - td2->td_frame = tf = (struct trapframe *)STACKALIGN( - pcb2->un_32.pcb32_sp - sizeof(struct trapframe)); - *tf = *td1->td_frame; - sf = (struct switchframe *)tf - 1; - sf->sf_r4 = (u_int)fork_return; - sf->sf_r5 = (u_int)td2; - sf->sf_pc = (u_int)fork_trampoline; + + tf = td2->td_frame; tf->tf_spsr &= ~PSR_C; tf->tf_r0 = 0; tf->tf_r1 = 0; - pcb2->un_32.pcb32_sp = (u_int)sf; - KASSERT((pcb2->un_32.pcb32_sp & 7) == 0, - ("cpu_fork: Incorrect stack alignment")); + /* Setup to release spin count in fork_exit(). */ td2->td_md.md_spinlock_count = 1; - td2->td_md.md_saved_cspr = 0; + td2->td_md.md_saved_cspr = PSR_SVC32_MODE;; #ifdef ARM_TP_ADDRESS td2->td_md.md_tp = *(register_t *)ARM_TP_ADDRESS; #else @@ -218,25 +230,21 @@ cpu_set_syscall_retval(struct thread *td void cpu_set_upcall(struct thread *td, struct thread *td0) { - struct trapframe *tf; - struct switchframe *sf; bcopy(td0->td_frame, td->td_frame, sizeof(struct trapframe)); bcopy(td0->td_pcb, td->td_pcb, sizeof(struct pcb)); - tf = td->td_frame; - sf = (struct switchframe *)tf - 1; - sf->sf_r4 = (u_int)fork_return; - sf->sf_r5 = (u_int)td; - sf->sf_pc = (u_int)fork_trampoline; - tf->tf_spsr &= ~PSR_C; - tf->tf_r0 = 0; - td->td_pcb->un_32.pcb32_sp = (u_int)sf; - KASSERT((td->td_pcb->un_32.pcb32_sp & 7) == 0, - ("cpu_set_upcall: Incorrect stack alignment")); + + td->td_pcb->pcb_regs.sf_r4 = (register_t)fork_return; + td->td_pcb->pcb_regs.sf_r5 = (register_t)td; + td->td_pcb->pcb_regs.sf_lr = (register_t)fork_trampoline; + td->td_pcb->pcb_regs.sf_sp = STACKALIGN(td->td_frame); + + td->td_frame->tf_spsr &= ~PSR_C; + td->td_frame->tf_r0 = 0; /* Setup to release spin count in fork_exit(). */ td->td_md.md_spinlock_count = 1; - td->td_md.md_saved_cspr = 0; + td->td_md.md_saved_cspr = PSR_SVC32_MODE; } /* @@ -250,8 +258,7 @@ cpu_set_upcall_kse(struct thread *td, vo { struct trapframe *tf = td->td_frame; - tf->tf_usr_sp = STACKALIGN((int)stack->ss_sp + stack->ss_size - - sizeof(struct trapframe)); + tf->tf_usr_sp = STACKALIGN((int)stack->ss_sp + stack->ss_size); tf->tf_pc = (int)entry; tf->tf_r0 = (int)arg; tf->tf_spsr = PSR_USR32_MODE; @@ -289,9 +296,8 @@ cpu_thread_alloc(struct thread *td) * placed into the stack pointer which must be 8 byte aligned in * the ARM EABI. */ - td->td_frame = (struct trapframe *)STACKALIGN((u_int)td->td_kstack + - USPACE_SVC_STACK_TOP - sizeof(struct pcb) - - sizeof(struct trapframe)); + td->td_frame = (struct trapframe *)((caddr_t)td->td_pcb) - 1; + #ifdef __XSCALE__ #ifndef CPU_XSCALE_CORE3 pmap_use_minicache(td->td_kstack, td->td_kstack_pages * PAGE_SIZE); @@ -318,16 +324,8 @@ cpu_thread_clean(struct thread *td) void cpu_set_fork_handler(struct thread *td, void (*func)(void *), void *arg) { - struct switchframe *sf; - struct trapframe *tf; - - tf = td->td_frame; - sf = (struct switchframe *)tf - 1; - sf->sf_r4 = (u_int)func; - sf->sf_r5 = (u_int)arg; - td->td_pcb->un_32.pcb32_sp = (u_int)sf; - KASSERT((td->td_pcb->un_32.pcb32_sp & 7) == 0, - ("cpu_set_fork_handler: Incorrect stack alignment")); + td->td_pcb->pcb_regs.sf_r4 = (register_t)func; /* function */ + td->td_pcb->pcb_regs.sf_r5 = (register_t)arg; /* first arg */ } /* Modified: head/sys/arm/include/db_machdep.h ============================================================================== --- head/sys/arm/include/db_machdep.h Wed Dec 24 18:51:25 2014 (r276189) +++ head/sys/arm/include/db_machdep.h Wed Dec 24 18:54:31 2014 (r276190) @@ -38,7 +38,7 @@ typedef vm_offset_t db_addr_t; typedef int db_expr_t; -#define PC_REGS() ((db_addr_t)kdb_thrctx->un_32.pcb32_pc) +#define PC_REGS() ((db_addr_t)kdb_thrctx->pcb_regs.sf_pc) #define BKPT_INST (KERNEL_BREAKPOINT) #define BKPT_SIZE (INSN_SIZE) Modified: head/sys/arm/include/frame.h ============================================================================== --- head/sys/arm/include/frame.h Wed Dec 24 18:51:25 2014 (r276189) +++ head/sys/arm/include/frame.h Wed Dec 24 18:54:31 2014 (r276190) @@ -86,57 +86,16 @@ struct trapframe { #define tf_r13 tf_usr_sp #define tf_r14 tf_usr_lr #define tf_r15 tf_pc -/* - * * Scheduler activations upcall frame. Pushed onto user stack before - * * calling an SA upcall. - * */ - -struct saframe { -#if 0 /* in registers on entry to upcall */ - int sa_type; - struct sa_t ** sa_sas; - int sa_events; - int sa_interrupted; -#endif - void * sa_arg; -}; /* - * * Signal frame. Pushed onto user stack before calling sigcode. - * */ - -/* the pointers are use in the trampoline code to locate the ucontext */ + * Signal frame. Pushed onto user stack before calling sigcode. + * The pointers are used in the trampoline code to locate the ucontext. + */ struct sigframe { - siginfo_t sf_si; /* actual saved siginfo */ + siginfo_t sf_si; /* actual saved siginfo */ ucontext_t sf_uc; /* actual saved ucontext */ }; -/* - * System stack frames. - */ - - -typedef struct irqframe { - unsigned int if_spsr; - unsigned int if_r0; - unsigned int if_r1; - unsigned int if_r2; - unsigned int if_r3; - unsigned int if_r4; - unsigned int if_r5; - unsigned int if_r6; - unsigned int if_r7; - unsigned int if_r8; - unsigned int if_r9; - unsigned int if_r10; - unsigned int if_r11; - unsigned int if_r12; - unsigned int if_usr_sp; - unsigned int if_usr_lr; - unsigned int if_svc_sp; - unsigned int if_svc_lr; - unsigned int if_pc; -} irqframe_t; /* * Switch frame. @@ -144,16 +103,23 @@ typedef struct irqframe { * It is important this is a multiple of 8 bytes so the stack is correctly * aligned when we create new threads. */ - -struct switchframe { - u_int pad; /* Used to pad the struct to a multiple of 8-bytes */ - u_int sf_r4; - u_int sf_r5; - u_int sf_r6; - u_int sf_r7; - u_int sf_pc; +struct switchframe +{ + register_t sf_r4; + register_t sf_r5; + register_t sf_r6; + register_t sf_r7; + register_t sf_r8; + register_t sf_r9; + register_t sf_r10; + register_t sf_r11; + register_t sf_r12; + register_t sf_sp; + register_t sf_lr; + register_t sf_pc; }; + /* * Stack frame. Used during stack traces (db_trace.c) */ Modified: head/sys/arm/include/pcb.h ============================================================================== --- head/sys/arm/include/pcb.h Wed Dec 24 18:51:25 2014 (r276189) +++ head/sys/arm/include/pcb.h Wed Dec 24 18:54:31 2014 (r276190) @@ -39,50 +39,29 @@ #define _MACHINE_PCB_H_ #include +#include -struct trapframe; - -struct pcb_arm32 { - vm_offset_t pcb32_pagedir; /* PT hooks */ - uint32_t *pcb32_pl1vec; /* PTR to vector_base L1 entry*/ - uint32_t pcb32_l1vec; /* Value to stuff on ctx sw */ - u_int pcb32_dacr; /* Domain Access Control Reg */ - /* - * WARNING! - * cpuswitch.S relies on pcb32_r8 being quad-aligned in struct pcb - * (due to the use of "strd" when compiled for XSCALE) - */ - u_int pcb32_r8; /* used */ - u_int pcb32_r9; /* used */ - u_int pcb32_r10; /* used */ - u_int pcb32_r11; /* used */ - u_int pcb32_r12; /* used */ - u_int pcb32_sp; /* used */ - u_int pcb32_lr; - u_int pcb32_pc; -}; -#define pcb_pagedir un_32.pcb32_pagedir -#define pcb_pl1vec un_32.pcb32_pl1vec -#define pcb_l1vec un_32.pcb32_l1vec -#define pcb_dacr un_32.pcb32_dacr -#define pcb_cstate un_32.pcb32_cstate - /* * WARNING! - * See warning for struct pcb_arm32, above, before changing struct pcb! + * Keep pcb_regs first for faster access in switch.S */ struct pcb { + struct switchframe pcb_regs; /* CPU state */ u_int pcb_flags; #define PCB_OWNFPU 0x00000001 #define PCB_NOALIGNFLT 0x00000002 caddr_t pcb_onfault; /* On fault handler */ - struct pcb_arm32 un_32; + vm_offset_t pcb_pagedir; /* PT hooks */ + uint32_t *pcb_pl1vec; /* PTR to vector_base L1 entry*/ + uint32_t pcb_l1vec; /* Value to stuff on ctx sw */ + u_int pcb_dacr; /* Domain Access Control Reg */ + struct vfp_state pcb_vfpstate; /* VP/NEON state */ u_int pcb_vfpcpu; /* VP/NEON last cpu */ } __aligned(8); /* * We need the PCB to be aligned on 8 bytes, as we may - * access it using ldrd/strd, and some CPUs require it + * access it using ldrd/strd, and ARM ABI require it * to by aligned on 8 bytes. */ From owner-svn-src-all@FreeBSD.ORG Wed Dec 24 19:47:51 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A5B2FE5B; Wed, 24 Dec 2014 19:47:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 921E12CE8; Wed, 24 Dec 2014 19:47:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBOJlp84011448; Wed, 24 Dec 2014 19:47:51 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBOJlpgf011447; Wed, 24 Dec 2014 19:47:51 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201412241947.sBOJlpgf011447@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Wed, 24 Dec 2014 19:47:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276191 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Dec 2014 19:47:51 -0000 Author: ian Date: Wed Dec 24 19:47:50 2014 New Revision: 276191 URL: https://svnweb.freebsd.org/changeset/base/276191 Log: Display the correct value for cache Level of Coherency. Like the other levels being displayed here, its value needs a +1 adjustment. Modified: head/sys/arm/arm/identcpu.c Modified: head/sys/arm/arm/identcpu.c ============================================================================== --- head/sys/arm/arm/identcpu.c Wed Dec 24 18:54:31 2014 (r276190) +++ head/sys/arm/arm/identcpu.c Wed Dec 24 19:47:50 2014 (r276191) @@ -457,7 +457,7 @@ identify_arm_cpu(void) if (arm_cache_level) { printf("LoUU:%d LoC:%d LoUIS:%d \n", CPU_CLIDR_LOUU(arm_cache_level) + 1, - arm_cache_loc, CPU_CLIDR_LOUIS(arm_cache_level) + 1); + arm_cache_loc + 1, CPU_CLIDR_LOUIS(arm_cache_level) + 1); i = 0; while (((type = CPU_CLIDR_CTYPE(arm_cache_level, i)) != 0) && i < 7) { printf("Cache level %d: \n", i + 1); From owner-svn-src-all@FreeBSD.ORG Wed Dec 24 22:26:51 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6EC99198; Wed, 24 Dec 2014 22:26:51 +0000 (UTC) Received: from nibbler.fubar.geek.nz (nibbler.fubar.geek.nz [199.48.134.198]) by mx1.freebsd.org (Postfix) with ESMTP id 52A6764DC9; Wed, 24 Dec 2014 22:26:51 +0000 (UTC) Received: from bender (unknown [213.205.252.212]) by nibbler.fubar.geek.nz (Postfix) with ESMTPSA id A5D5F7328F; Wed, 24 Dec 2014 22:26:43 +0000 (UTC) Date: Wed, 24 Dec 2014 22:26:37 +0000 From: Andrew Turner To: Ian Lepore Subject: Re: svn commit: r276187 - head/sys/arm/arm Message-ID: <20141224222637.03a19e57@bender> In-Reply-To: <201412241712.sBOHCqvW039381@svn.freebsd.org> References: <201412241712.sBOHCqvW039381@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Dec 2014 22:26:51 -0000 On Wed, 24 Dec 2014 17:12:52 +0000 (UTC) Ian Lepore wrote: > Author: ian > Date: Wed Dec 24 17:12:51 2014 > New Revision: 276187 > URL: https://svnweb.freebsd.org/changeset/base/276187 > > Log: > Eliminate unnecessary references to pte.h internals by using the > standard pmap_kenter_temporary() to map pages while dumping. > > Submitted by: Svatopluk Kraus , > Michal Meloun > > Modified: > head/sys/arm/arm/dump_machdep.c > > Modified: head/sys/arm/arm/dump_machdep.c > ============================================================================== > --- head/sys/arm/arm/dump_machdep.c Wed Dec 24 16:11:15 > 2014 (r276186) +++ head/sys/arm/arm/dump_machdep.c Wed > Dec 24 17:12:51 2014 (r276187) @@ -160,11 +160,13 @@ static int > cb_dumpdata(struct md_pa *mdp, int seqnr, void *arg) > { > struct dumperinfo *di = (struct dumperinfo*)arg; > - vm_paddr_t pa; > + vm_paddr_t a, pa; > + void *va; > uint32_t pgs; > size_t counter, sz, chunk; > - int c, error; > + int i, c, error; > > + va = 0; > error = 0; /* catch case in which chunk size is 0 */ > counter = 0; > pgs = mdp->md_size / PAGE_SIZE; > @@ -194,16 +196,14 @@ cb_dumpdata(struct md_pa *mdp, int seqnr > printf(" %d", pgs * PAGE_SIZE); > counter &= (1<<24) - 1; > } > - if (pa == (pa & L1_ADDR_BITS)) { > - pmap_kenter_section(0, pa & L1_ADDR_BITS, 0); > - cpu_tlb_flushID_SE(0); > - cpu_cpwait(); > + for (i = 0; i < chunk; i++) { > + a = pa + i * PAGE_SIZE; > + va = pmap_kenter_temporary(trunc_page(a), i); Is this correct? It may map multiple chunks here. > } > #ifdef SW_WATCHDOG > wdog_kern_pat(WD_LASTVAL); > #endif > - error = dump_write(di, > - (void *)(pa - (pa & L1_ADDR_BITS)),0, dumplo, > sz); > + error = dump_write(di, va, 0, dumplo, sz); Then uses the last virtual address to dump the data here. Wouldn't this miss the chunks mapped other than the last one? Andrew From owner-svn-src-all@FreeBSD.ORG Wed Dec 24 22:40:21 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4881C68A; Wed, 24 Dec 2014 22:40:21 +0000 (UTC) Received: from mho-01-ewr.mailhop.org (mho-03-ewr.mailhop.org [204.13.248.66]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1DA0D64FEC; Wed, 24 Dec 2014 22:40:20 +0000 (UTC) Received: from [73.34.117.227] (helo=ilsoft.org) by mho-01-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1Y3ubG-000DP2-CR; Wed, 24 Dec 2014 22:40:14 +0000 Received: from revolution.hippie.lan (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id sBOMeCmZ019204; Wed, 24 Dec 2014 15:40:12 -0700 (MST) (envelope-from ian@freebsd.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 73.34.117.227 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX18b3fkXn/89IJdP/1HYUWuv Message-ID: <1419460812.1018.157.camel@freebsd.org> Subject: Re: svn commit: r276187 - head/sys/arm/arm From: Ian Lepore To: Andrew Turner Date: Wed, 24 Dec 2014 15:40:12 -0700 In-Reply-To: <20141224222637.03a19e57@bender> References: <201412241712.sBOHCqvW039381@svn.freebsd.org> <20141224222637.03a19e57@bender> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.12.8 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Dec 2014 22:40:21 -0000 On Wed, 2014-12-24 at 22:26 +0000, Andrew Turner wrote: > On Wed, 24 Dec 2014 17:12:52 +0000 (UTC) > Ian Lepore wrote: > > > Author: ian > > Date: Wed Dec 24 17:12:51 2014 > > New Revision: 276187 > > URL: https://svnweb.freebsd.org/changeset/base/276187 > > > > Log: > > Eliminate unnecessary references to pte.h internals by using the > > standard pmap_kenter_temporary() to map pages while dumping. > > > > Submitted by: Svatopluk Kraus , > > Michal Meloun > > > > Modified: > > head/sys/arm/arm/dump_machdep.c > > > > Modified: head/sys/arm/arm/dump_machdep.c > > ============================================================================== > > --- head/sys/arm/arm/dump_machdep.c Wed Dec 24 16:11:15 > > 2014 (r276186) +++ head/sys/arm/arm/dump_machdep.c Wed > > Dec 24 17:12:51 2014 (r276187) @@ -160,11 +160,13 @@ static int > > cb_dumpdata(struct md_pa *mdp, int seqnr, void *arg) > > { > > struct dumperinfo *di = (struct dumperinfo*)arg; > > - vm_paddr_t pa; > > + vm_paddr_t a, pa; > > + void *va; > > uint32_t pgs; > > size_t counter, sz, chunk; > > - int c, error; > > + int i, c, error; > > > > + va = 0; > > error = 0; /* catch case in which chunk size is 0 */ > > counter = 0; > > pgs = mdp->md_size / PAGE_SIZE; > > @@ -194,16 +196,14 @@ cb_dumpdata(struct md_pa *mdp, int seqnr > > printf(" %d", pgs * PAGE_SIZE); > > counter &= (1<<24) - 1; > > } > > - if (pa == (pa & L1_ADDR_BITS)) { > > - pmap_kenter_section(0, pa & L1_ADDR_BITS, 0); > > - cpu_tlb_flushID_SE(0); > > - cpu_cpwait(); > > + for (i = 0; i < chunk; i++) { > > + a = pa + i * PAGE_SIZE; > > + va = pmap_kenter_temporary(trunc_page(a), i); > > Is this correct? It may map multiple chunks here. > > } > > #ifdef SW_WATCHDOG > > wdog_kern_pat(WD_LASTVAL); > > #endif > > - error = dump_write(di, > > - (void *)(pa - (pa & L1_ADDR_BITS)),0, dumplo, > > sz); > > + error = dump_write(di, va, 0, dumplo, sz); > > Then uses the last virtual address to dump the data here. Wouldn't this > miss the chunks mapped other than the last one? Yeah, but a quirk of pmap_kenter_temporary() is that its return value is constant, so this wrong-looking code is actually right. -- Ian From owner-svn-src-all@FreeBSD.ORG Wed Dec 24 22:58:09 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8ABA092D; Wed, 24 Dec 2014 22:58:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5DABD2D43; Wed, 24 Dec 2014 22:58:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBOMw9fV000517; Wed, 24 Dec 2014 22:58:09 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBOMw9fX000516; Wed, 24 Dec 2014 22:58:09 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201412242258.sBOMw9fX000516@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Wed, 24 Dec 2014 22:58:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276192 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Dec 2014 22:58:09 -0000 Author: rmacklem Date: Wed Dec 24 22:58:08 2014 New Revision: 276192 URL: https://svnweb.freebsd.org/changeset/base/276192 Log: Modify vop_stdadvlock{async}() so that it only locks/unlocks the vnode and does a VOP_GETATTR() for the SEEK_END case. This is safe to do, since lf_advlock{async}() only uses the size argument for the SEEK_END case. The NFSv4 server needs this when vfs.nfsd.enable_locallocks!=0 since locking the vnode results in a LOR that can cause a deadlock for the nfsd threads. Reviewed by: kib MFC after: 1 week Modified: head/sys/kern/vfs_default.c Modified: head/sys/kern/vfs_default.c ============================================================================== --- head/sys/kern/vfs_default.c Wed Dec 24 19:47:50 2014 (r276191) +++ head/sys/kern/vfs_default.c Wed Dec 24 22:58:08 2014 (r276192) @@ -401,17 +401,23 @@ int vop_stdadvlock(struct vop_advlock_args *ap) { struct vnode *vp; - struct ucred *cred; struct vattr vattr; int error; vp = ap->a_vp; - cred = curthread->td_ucred; - vn_lock(vp, LK_SHARED | LK_RETRY); - error = VOP_GETATTR(vp, &vattr, cred); - VOP_UNLOCK(vp, 0); - if (error) - return (error); + if (ap->a_fl->l_whence == SEEK_END) { + /* + * The NFSv4 server will LOR/deadlock if a vn_lock() call + * is done on vp. Fortunately, vattr.va_size is only + * needed for SEEK_END and the NFSv4 server only uses SEEK_SET. + */ + vn_lock(vp, LK_SHARED | LK_RETRY); + error = VOP_GETATTR(vp, &vattr, curthread->td_ucred); + VOP_UNLOCK(vp, 0); + if (error) + return (error); + } else + vattr.va_size = 0; return (lf_advlock(ap, &(vp->v_lockf), vattr.va_size)); } @@ -420,17 +426,19 @@ int vop_stdadvlockasync(struct vop_advlockasync_args *ap) { struct vnode *vp; - struct ucred *cred; struct vattr vattr; int error; vp = ap->a_vp; - cred = curthread->td_ucred; - vn_lock(vp, LK_SHARED | LK_RETRY); - error = VOP_GETATTR(vp, &vattr, cred); - VOP_UNLOCK(vp, 0); - if (error) - return (error); + if (ap->a_fl->l_whence == SEEK_END) { + /* The size argument is only needed for SEEK_END. */ + vn_lock(vp, LK_SHARED | LK_RETRY); + error = VOP_GETATTR(vp, &vattr, curthread->td_ucred); + VOP_UNLOCK(vp, 0); + if (error) + return (error); + } else + vattr.va_size = 0; return (lf_advlockasync(ap, &(vp->v_lockf), vattr.va_size)); } From owner-svn-src-all@FreeBSD.ORG Thu Dec 25 01:06:23 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5E081D62; Thu, 25 Dec 2014 01:06:23 +0000 (UTC) Received: from st11p02mm-asmtp002.mac.com (st11p02mm-asmtp002.mac.com [17.172.220.237]) (using TLSv1.2 with cipher DHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 317E01FC9; Thu, 25 Dec 2014 01:06:22 +0000 (UTC) Received: from fukuyama.hsd1.ca.comcast.net (unknown [73.162.13.215]) by st11p02mm-asmtp002.mac.com (Oracle Communications Messaging Server 7.0.5.33.0 64bit (built Aug 27 2014)) with ESMTPSA id <0NH4002CB5Q03Z40@st11p02mm-asmtp002.mac.com>; Thu, 25 Dec 2014 01:06:02 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.13.68,1.0.33,0.0.0000 definitions=2014-12-24_05:2014-12-24,2014-12-24,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1412080000 definitions=main-1412250011 Content-type: text/plain; charset=us-ascii MIME-version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Subject: Re: svn commit: r276187 - head/sys/arm/arm From: Rui Paulo In-reply-to: <1419460812.1018.157.camel@freebsd.org> Date: Wed, 24 Dec 2014 17:05:59 -0800 Content-transfer-encoding: quoted-printable Message-id: <8E8B7FE3-0C97-4A84-BC1D-1C5A0E732D0C@me.com> References: <201412241712.sBOHCqvW039381@svn.freebsd.org> <20141224222637.03a19e57@bender> <1419460812.1018.157.camel@freebsd.org> To: Ian Lepore X-Mailer: Apple Mail (2.1993) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Andrew Turner X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Dec 2014 01:06:23 -0000 On Dec 24, 2014, at 14:40, Ian Lepore wrote: >=20 > On Wed, 2014-12-24 at 22:26 +0000, Andrew Turner wrote: >> On Wed, 24 Dec 2014 17:12:52 +0000 (UTC) >> Ian Lepore wrote: >>=20 >>> Author: ian >>> Date: Wed Dec 24 17:12:51 2014 >>> New Revision: 276187 >>> URL: https://svnweb.freebsd.org/changeset/base/276187 >>>=20 >>> Log: >>> Eliminate unnecessary references to pte.h internals by using the >>> standard pmap_kenter_temporary() to map pages while dumping. >>>=20 >>> Submitted by: Svatopluk Kraus , >>> Michal Meloun >>>=20 >>> Modified: >>> head/sys/arm/arm/dump_machdep.c >>>=20 >>> Modified: head/sys/arm/arm/dump_machdep.c >>> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >>> --- head/sys/arm/arm/dump_machdep.c Wed Dec 24 16:11:15 >>> 2014 (r276186) +++ head/sys/arm/arm/dump_machdep.c Wed >>> Dec 24 17:12:51 2014 (r276187) @@ -160,11 +160,13 @@ static = int >>> cb_dumpdata(struct md_pa *mdp, int seqnr, void *arg) >>> { >>> struct dumperinfo *di =3D (struct dumperinfo*)arg; >>> - vm_paddr_t pa; >>> + vm_paddr_t a, pa; >>> + void *va; >>> uint32_t pgs; >>> size_t counter, sz, chunk; >>> - int c, error; >>> + int i, c, error; >>>=20 >>> + va =3D 0; >>> error =3D 0; /* catch case in which chunk size is 0 */ >>> counter =3D 0; >>> pgs =3D mdp->md_size / PAGE_SIZE; >>> @@ -194,16 +196,14 @@ cb_dumpdata(struct md_pa *mdp, int seqnr >>> printf(" %d", pgs * PAGE_SIZE); >>> counter &=3D (1<<24) - 1; >>> } >>> - if (pa =3D=3D (pa & L1_ADDR_BITS)) { >>> - pmap_kenter_section(0, pa & L1_ADDR_BITS, 0); >>> - cpu_tlb_flushID_SE(0); >>> - cpu_cpwait(); >>> + for (i =3D 0; i < chunk; i++) { >>> + a =3D pa + i * PAGE_SIZE; >>> + va =3D pmap_kenter_temporary(trunc_page(a), i); >>=20 >> Is this correct? It may map multiple chunks here. >>> } >>> #ifdef SW_WATCHDOG >>> wdog_kern_pat(WD_LASTVAL); >>> #endif >>> - error =3D dump_write(di, >>> - (void *)(pa - (pa & L1_ADDR_BITS)),0, dumplo, >>> sz); >>> + error =3D dump_write(di, va, 0, dumplo, sz); >>=20 >> Then uses the last virtual address to dump the data here. Wouldn't = this >> miss the chunks mapped other than the last one? >=20 > Yeah, but a quirk of pmap_kenter_temporary() is that its return value = is > constant, so this wrong-looking code is actually right. I'm a bit surprised about this. This most likely warrants a comment. -- Rui Paulo From owner-svn-src-all@FreeBSD.ORG Thu Dec 25 01:31:28 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8F1F38C1; Thu, 25 Dec 2014 01:31:28 +0000 (UTC) Received: from mho-01-ewr.mailhop.org (mho-03-ewr.mailhop.org [204.13.248.66]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 616F63098; Thu, 25 Dec 2014 01:31:27 +0000 (UTC) Received: from [73.34.117.227] (helo=ilsoft.org) by mho-01-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1Y3xGw-0005tv-9y; Thu, 25 Dec 2014 01:31:26 +0000 Received: from revolution.hippie.lan (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id sBP1VO18020636; Wed, 24 Dec 2014 18:31:24 -0700 (MST) (envelope-from ian@freebsd.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 73.34.117.227 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX1/knMmIW7Lz6IZCqYAIx3tY Message-ID: <1419471084.1018.160.camel@freebsd.org> Subject: Re: svn commit: r276187 - head/sys/arm/arm From: Ian Lepore To: Rui Paulo Date: Wed, 24 Dec 2014 18:31:24 -0700 In-Reply-To: <8E8B7FE3-0C97-4A84-BC1D-1C5A0E732D0C@me.com> References: <201412241712.sBOHCqvW039381@svn.freebsd.org> <20141224222637.03a19e57@bender> <1419460812.1018.157.camel@freebsd.org> <8E8B7FE3-0C97-4A84-BC1D-1C5A0E732D0C@me.com> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.12.8 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Andrew Turner X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Dec 2014 01:31:28 -0000 On Wed, 2014-12-24 at 17:05 -0800, Rui Paulo wrote: > On Dec 24, 2014, at 14:40, Ian Lepore wrote: > > > > On Wed, 2014-12-24 at 22:26 +0000, Andrew Turner wrote: > >> On Wed, 24 Dec 2014 17:12:52 +0000 (UTC) > >> Ian Lepore wrote: > >> > >>> Author: ian > >>> Date: Wed Dec 24 17:12:51 2014 > >>> New Revision: 276187 > >>> URL: https://svnweb.freebsd.org/changeset/base/276187 > >>> > >>> Log: > >>> Eliminate unnecessary references to pte.h internals by using the > >>> standard pmap_kenter_temporary() to map pages while dumping. > >>> > >>> Submitted by: Svatopluk Kraus , > >>> Michal Meloun > >>> > >>> Modified: > >>> head/sys/arm/arm/dump_machdep.c > >>> > >>> Modified: head/sys/arm/arm/dump_machdep.c > >>> ============================================================================== > >>> --- head/sys/arm/arm/dump_machdep.c Wed Dec 24 16:11:15 > >>> 2014 (r276186) +++ head/sys/arm/arm/dump_machdep.c Wed > >>> Dec 24 17:12:51 2014 (r276187) @@ -160,11 +160,13 @@ static int > >>> cb_dumpdata(struct md_pa *mdp, int seqnr, void *arg) > >>> { > >>> struct dumperinfo *di = (struct dumperinfo*)arg; > >>> - vm_paddr_t pa; > >>> + vm_paddr_t a, pa; > >>> + void *va; > >>> uint32_t pgs; > >>> size_t counter, sz, chunk; > >>> - int c, error; > >>> + int i, c, error; > >>> > >>> + va = 0; > >>> error = 0; /* catch case in which chunk size is 0 */ > >>> counter = 0; > >>> pgs = mdp->md_size / PAGE_SIZE; > >>> @@ -194,16 +196,14 @@ cb_dumpdata(struct md_pa *mdp, int seqnr > >>> printf(" %d", pgs * PAGE_SIZE); > >>> counter &= (1<<24) - 1; > >>> } > >>> - if (pa == (pa & L1_ADDR_BITS)) { > >>> - pmap_kenter_section(0, pa & L1_ADDR_BITS, 0); > >>> - cpu_tlb_flushID_SE(0); > >>> - cpu_cpwait(); > >>> + for (i = 0; i < chunk; i++) { > >>> + a = pa + i * PAGE_SIZE; > >>> + va = pmap_kenter_temporary(trunc_page(a), i); > >> > >> Is this correct? It may map multiple chunks here. > >>> } > >>> #ifdef SW_WATCHDOG > >>> wdog_kern_pat(WD_LASTVAL); > >>> #endif > >>> - error = dump_write(di, > >>> - (void *)(pa - (pa & L1_ADDR_BITS)),0, dumplo, > >>> sz); > >>> + error = dump_write(di, va, 0, dumplo, sz); > >> > >> Then uses the last virtual address to dump the data here. Wouldn't this > >> miss the chunks mapped other than the last one? > > > > Yeah, but a quirk of pmap_kenter_temporary() is that its return value is > > constant, so this wrong-looking code is actually right. > > I'm a bit surprised about this. This most likely warrants a comment. In every architecture and every place it's used, or just arm just here? This appears to be an idiom, or at least something that has been pasted in identical form in every arch so far. -- Ian From owner-svn-src-all@FreeBSD.ORG Thu Dec 25 01:55:18 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BC04A359; Thu, 25 Dec 2014 01:55:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9DF053429; Thu, 25 Dec 2014 01:55:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBP1tIT0086472; Thu, 25 Dec 2014 01:55:18 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBP1tITU086469; Thu, 25 Dec 2014 01:55:18 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201412250155.sBP1tITU086469@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Thu, 25 Dec 2014 01:55:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276193 - head/sys/fs/nfsserver X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Dec 2014 01:55:18 -0000 Author: rmacklem Date: Thu Dec 25 01:55:17 2014 New Revision: 276193 URL: https://svnweb.freebsd.org/changeset/base/276193 Log: A deadlock in the NFSv4 server with vfs.nfsd.enable_locallocks=1 was reported via email. This was caused by a LOR between the sleep lock used to serialize the local locking (nfsrv_locklf()) and locking the vnode. I believe this patch fixes the problem by delaying relocking of the vnode until the sleep lock is unlocked (nfsrv_unlocklf()). To avoid nfsvno_advlock() having the side effect of unlocking the vnode, unlocking the vnode was moved to before the functions that call nfsvno_advlock(). It shouldn't affect the execution of the default case where vfs.nfsd.enable_locallocks=0. Reported by: loic.blot@unix-experience.fr Discussed with: kib MFC after: 1 week Modified: head/sys/fs/nfsserver/nfs_nfsdport.c head/sys/fs/nfsserver/nfs_nfsdstate.c Modified: head/sys/fs/nfsserver/nfs_nfsdport.c ============================================================================== --- head/sys/fs/nfsserver/nfs_nfsdport.c Wed Dec 24 22:58:08 2014 (r276192) +++ head/sys/fs/nfsserver/nfs_nfsdport.c Thu Dec 25 01:55:17 2014 (r276193) @@ -2970,12 +2970,7 @@ nfsvno_advlock(struct vnode *vp, int fty if (nfsrv_dolocallocks == 0) goto out; - - /* Check for VI_DOOMED here, so that VOP_ADVLOCK() isn't performed. */ - if ((vp->v_iflag & VI_DOOMED) != 0) { - error = EPERM; - goto out; - } + ASSERT_VOP_UNLOCKED(vp, "nfsvno_advlock: vp locked"); fl.l_whence = SEEK_SET; fl.l_type = ftype; @@ -2999,14 +2994,12 @@ nfsvno_advlock(struct vnode *vp, int fty fl.l_pid = (pid_t)0; fl.l_sysid = (int)nfsv4_sysid; - NFSVOPUNLOCK(vp, 0); if (ftype == F_UNLCK) error = VOP_ADVLOCK(vp, (caddr_t)td->td_proc, F_UNLCK, &fl, (F_POSIX | F_REMOTE)); else error = VOP_ADVLOCK(vp, (caddr_t)td->td_proc, F_SETLK, &fl, (F_POSIX | F_REMOTE)); - NFSVOPLOCK(vp, LK_EXCLUSIVE | LK_RETRY); out: NFSEXITCODE(error); Modified: head/sys/fs/nfsserver/nfs_nfsdstate.c ============================================================================== --- head/sys/fs/nfsserver/nfs_nfsdstate.c Wed Dec 24 22:58:08 2014 (r276192) +++ head/sys/fs/nfsserver/nfs_nfsdstate.c Thu Dec 25 01:55:17 2014 (r276193) @@ -1344,6 +1344,8 @@ nfsrv_freeallnfslocks(struct nfsstate *s vnode_t tvp = NULL; uint64_t first, end; + if (vp != NULL) + ASSERT_VOP_UNLOCKED(vp, "nfsrv_freeallnfslocks: vnode locked"); lop = LIST_FIRST(&stp->ls_lock); while (lop != LIST_END(&stp->ls_lock)) { nlop = LIST_NEXT(lop, lo_lckowner); @@ -1363,9 +1365,10 @@ nfsrv_freeallnfslocks(struct nfsstate *s if (gottvp == 0) { if (nfsrv_dolocallocks == 0) tvp = NULL; - else if (vp == NULL && cansleep != 0) + else if (vp == NULL && cansleep != 0) { tvp = nfsvno_getvp(&lfp->lf_fh); - else + NFSVOPUNLOCK(tvp, 0); + } else tvp = vp; gottvp = 1; } @@ -1386,7 +1389,7 @@ nfsrv_freeallnfslocks(struct nfsstate *s lop = nlop; } if (vp == NULL && tvp != NULL) - vput(tvp); + vrele(tvp); } /* @@ -1497,7 +1500,7 @@ nfsrv_lockctrl(vnode_t vp, struct nfssta struct nfsclient *clp = NULL; u_int32_t bits; int error = 0, haslock = 0, ret, reterr; - int getlckret, delegation = 0, filestruct_locked; + int getlckret, delegation = 0, filestruct_locked, vnode_unlocked = 0; fhandle_t nfh; uint64_t first, end; uint32_t lock_flags; @@ -1587,6 +1590,11 @@ tryagain: * locking rolled back. */ NFSUNLOCKSTATE(); + if (vnode_unlocked == 0) { + ASSERT_VOP_ELOCKED(vp, "nfsrv_lockctrl1"); + vnode_unlocked = 1; + NFSVOPUNLOCK(vp, 0); + } reterr = nfsrv_locallock(vp, lfp, (new_lop->lo_flags & (NFSLCK_READ | NFSLCK_WRITE)), new_lop->lo_first, new_lop->lo_end, cfp, p); @@ -1756,6 +1764,11 @@ tryagain: if (filestruct_locked != 0) { /* Roll back local locks. */ NFSUNLOCKSTATE(); + if (vnode_unlocked == 0) { + ASSERT_VOP_ELOCKED(vp, "nfsrv_lockctrl2"); + vnode_unlocked = 1; + NFSVOPUNLOCK(vp, 0); + } nfsrv_locallock_rollback(vp, lfp, p); NFSLOCKSTATE(); nfsrv_unlocklf(lfp); @@ -1833,6 +1846,12 @@ tryagain: if (filestruct_locked != 0) { /* Roll back local locks. */ NFSUNLOCKSTATE(); + if (vnode_unlocked == 0) { + ASSERT_VOP_ELOCKED(vp, + "nfsrv_lockctrl3"); + vnode_unlocked = 1; + NFSVOPUNLOCK(vp, 0); + } nfsrv_locallock_rollback(vp, lfp, p); NFSLOCKSTATE(); nfsrv_unlocklf(lfp); @@ -1852,6 +1871,8 @@ tryagain: bits = tstp->ls_flags; bits >>= NFSLCK_SHIFT; if (new_stp->ls_flags & bits & NFSLCK_ACCESSBITS) { + KASSERT(vnode_unlocked == 0, + ("nfsrv_lockctrl: vnode unlocked1")); ret = nfsrv_clientconflict(tstp->ls_clp, &haslock, vp, p); if (ret == 1) { @@ -1883,6 +1904,8 @@ tryagain: * For setattr, just get rid of all the Delegations for other clients. */ if (new_stp->ls_flags & NFSLCK_SETATTR) { + KASSERT(vnode_unlocked == 0, + ("nfsrv_lockctrl: vnode unlocked2")); ret = nfsrv_cleandeleg(vp, lfp, clp, &haslock, p); if (ret) { /* @@ -1933,14 +1956,26 @@ tryagain: (new_lop->lo_flags & NFSLCK_WRITE) && (clp != tstp->ls_clp || (tstp->ls_flags & NFSLCK_DELEGREAD)))) { + ret = 0; if (filestruct_locked != 0) { /* Roll back local locks. */ NFSUNLOCKSTATE(); + if (vnode_unlocked == 0) { + ASSERT_VOP_ELOCKED(vp, "nfsrv_lockctrl4"); + NFSVOPUNLOCK(vp, 0); + } nfsrv_locallock_rollback(vp, lfp, p); NFSLOCKSTATE(); nfsrv_unlocklf(lfp); + NFSUNLOCKSTATE(); + NFSVOPLOCK(vp, LK_EXCLUSIVE | LK_RETRY); + vnode_unlocked = 0; + if ((vp->v_iflag & VI_DOOMED) != 0) + ret = NFSERR_SERVERFAULT; + NFSLOCKSTATE(); } - ret = nfsrv_delegconflict(tstp, &haslock, p, vp); + if (ret == 0) + ret = nfsrv_delegconflict(tstp, &haslock, p, vp); if (ret) { /* * nfsrv_delegconflict unlocks state when it @@ -1979,6 +2014,11 @@ tryagain: stateidp->other[2] = stp->ls_stateid.other[2]; if (filestruct_locked != 0) { NFSUNLOCKSTATE(); + if (vnode_unlocked == 0) { + ASSERT_VOP_ELOCKED(vp, "nfsrv_lockctrl5"); + vnode_unlocked = 1; + NFSVOPUNLOCK(vp, 0); + } /* Update the local locks. */ nfsrv_localunlock(vp, lfp, first, end, p); NFSLOCKSTATE(); @@ -2009,14 +2049,29 @@ tryagain: FREE((caddr_t)other_lop, M_NFSDLOCK); other_lop = NULL; } - ret = nfsrv_clientconflict(lop->lo_stp->ls_clp,&haslock,vp,p); + if (vnode_unlocked != 0) + ret = nfsrv_clientconflict(lop->lo_stp->ls_clp, &haslock, + NULL, p); + else + ret = nfsrv_clientconflict(lop->lo_stp->ls_clp, &haslock, + vp, p); if (ret == 1) { if (filestruct_locked != 0) { + if (vnode_unlocked == 0) { + ASSERT_VOP_ELOCKED(vp, "nfsrv_lockctrl6"); + NFSVOPUNLOCK(vp, 0); + } /* Roll back local locks. */ nfsrv_locallock_rollback(vp, lfp, p); NFSLOCKSTATE(); nfsrv_unlocklf(lfp); NFSUNLOCKSTATE(); + NFSVOPLOCK(vp, LK_EXCLUSIVE | LK_RETRY); + vnode_unlocked = 0; + if ((vp->v_iflag & VI_DOOMED) != 0) { + error = NFSERR_SERVERFAULT; + goto out; + } } /* * nfsrv_clientconflict() unlocks state when it @@ -2050,6 +2105,11 @@ tryagain: if (filestruct_locked != 0 && ret == 0) { /* Roll back local locks. */ NFSUNLOCKSTATE(); + if (vnode_unlocked == 0) { + ASSERT_VOP_ELOCKED(vp, "nfsrv_lockctrl7"); + vnode_unlocked = 1; + NFSVOPUNLOCK(vp, 0); + } nfsrv_locallock_rollback(vp, lfp, p); NFSLOCKSTATE(); nfsrv_unlocklf(lfp); @@ -2128,6 +2188,11 @@ out: nfsv4_unlock(&nfsv4rootfs_lock, 1); NFSUNLOCKV4ROOTMUTEX(); } + if (vnode_unlocked != 0) { + NFSVOPLOCK(vp, LK_EXCLUSIVE | LK_RETRY); + if (error == 0 && (vp->v_iflag & VI_DOOMED) != 0) + error = NFSERR_SERVERFAULT; + } if (other_lop) FREE((caddr_t)other_lop, M_NFSDLOCK); NFSEXITCODE2(error, nd); @@ -3235,11 +3300,14 @@ nfsrv_openupdate(vnode_t vp, struct nfss /* Get the lf lock */ nfsrv_locklf(lfp); NFSUNLOCKSTATE(); + ASSERT_VOP_ELOCKED(vp, "nfsrv_openupdate"); + NFSVOPUNLOCK(vp, 0); if (nfsrv_freeopen(stp, vp, 1, p) == 0) { NFSLOCKSTATE(); nfsrv_unlocklf(lfp); NFSUNLOCKSTATE(); } + NFSVOPLOCK(vp, LK_EXCLUSIVE | LK_RETRY); } else { (void) nfsrv_freeopen(stp, NULL, 0, p); NFSUNLOCKSTATE(); @@ -4627,7 +4695,7 @@ static int nfsrv_clientconflict(struct nfsclient *clp, int *haslockp, vnode_t vp, NFSPROC_T *p) { - int gotlock, lktype; + int gotlock, lktype = 0; /* * If lease hasn't expired, we can't fix it. @@ -4637,8 +4705,10 @@ nfsrv_clientconflict(struct nfsclient *c return (0); if (*haslockp == 0) { NFSUNLOCKSTATE(); - lktype = NFSVOPISLOCKED(vp); - NFSVOPUNLOCK(vp, 0); + if (vp != NULL) { + lktype = NFSVOPISLOCKED(vp); + NFSVOPUNLOCK(vp, 0); + } NFSLOCKV4ROOTMUTEX(); nfsv4_relref(&nfsv4rootfs_lock); do { @@ -4647,11 +4717,12 @@ nfsrv_clientconflict(struct nfsclient *c } while (!gotlock); NFSUNLOCKV4ROOTMUTEX(); *haslockp = 1; - NFSVOPLOCK(vp, lktype | LK_RETRY); - if ((vp->v_iflag & VI_DOOMED) != 0) - return (2); - else - return (1); + if (vp != NULL) { + NFSVOPLOCK(vp, lktype | LK_RETRY); + if ((vp->v_iflag & VI_DOOMED) != 0) + return (2); + } + return (1); } NFSUNLOCKSTATE(); @@ -4692,7 +4763,7 @@ nfsrv_delegconflict(struct nfsstate *stp vnode_t vp) { struct nfsclient *clp = stp->ls_clp; - int gotlock, error, lktype, retrycnt, zapped_clp; + int gotlock, error, lktype = 0, retrycnt, zapped_clp; nfsv4stateid_t tstateid; fhandle_t tfh; @@ -4809,8 +4880,10 @@ nfsrv_delegconflict(struct nfsstate *stp */ if (*haslockp == 0) { NFSUNLOCKSTATE(); - lktype = NFSVOPISLOCKED(vp); - NFSVOPUNLOCK(vp, 0); + if (vp != NULL) { + lktype = NFSVOPISLOCKED(vp); + NFSVOPUNLOCK(vp, 0); + } NFSLOCKV4ROOTMUTEX(); nfsv4_relref(&nfsv4rootfs_lock); do { @@ -4819,14 +4892,16 @@ nfsrv_delegconflict(struct nfsstate *stp } while (!gotlock); NFSUNLOCKV4ROOTMUTEX(); *haslockp = 1; - NFSVOPLOCK(vp, lktype | LK_RETRY); - if ((vp->v_iflag & VI_DOOMED) != 0) { - *haslockp = 0; - NFSLOCKV4ROOTMUTEX(); - nfsv4_unlock(&nfsv4rootfs_lock, 1); - NFSUNLOCKV4ROOTMUTEX(); - error = NFSERR_PERM; - goto out; + if (vp != NULL) { + NFSVOPLOCK(vp, lktype | LK_RETRY); + if ((vp->v_iflag & VI_DOOMED) != 0) { + *haslockp = 0; + NFSLOCKV4ROOTMUTEX(); + nfsv4_unlock(&nfsv4rootfs_lock, 1); + NFSUNLOCKV4ROOTMUTEX(); + error = NFSERR_PERM; + goto out; + } } error = -1; goto out; From owner-svn-src-all@FreeBSD.ORG Thu Dec 25 02:06:08 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5D192858; Thu, 25 Dec 2014 02:06:08 +0000 (UTC) Received: from st11p02mm-asmtp002.mac.com (st11p02mm-asmtp002.mac.com [17.172.220.237]) (using TLSv1.2 with cipher DHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2EDFA359D; Thu, 25 Dec 2014 02:06:07 +0000 (UTC) Received: from fukuyama.hsd1.ca.comcast.net (unknown [73.162.13.215]) by st11p02mm-asmtp002.mac.com (Oracle Communications Messaging Server 7.0.5.33.0 64bit (built Aug 27 2014)) with ESMTPSA id <0NH4007TY8HOKX10@st11p02mm-asmtp002.mac.com>; Thu, 25 Dec 2014 02:05:50 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.13.68,1.0.33,0.0.0000 definitions=2014-12-25_01:2014-12-24,2014-12-25,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1412080000 definitions=main-1412250022 Content-type: text/plain; charset=us-ascii MIME-version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Subject: Re: svn commit: r276187 - head/sys/arm/arm From: Rui Paulo In-reply-to: <1419471084.1018.160.camel@freebsd.org> Date: Wed, 24 Dec 2014 18:05:47 -0800 Content-transfer-encoding: quoted-printable Message-id: <9F69A6CD-D352-4A91-97F6-B3E1FF638211@me.com> References: <201412241712.sBOHCqvW039381@svn.freebsd.org> <20141224222637.03a19e57@bender> <1419460812.1018.157.camel@freebsd.org> <8E8B7FE3-0C97-4A84-BC1D-1C5A0E732D0C@me.com> <1419471084.1018.160.camel@freebsd.org> To: Ian Lepore X-Mailer: Apple Mail (2.1993) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Andrew Turner X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Dec 2014 02:06:08 -0000 On Dec 24, 2014, at 17:31, Ian Lepore wrote: > In every architecture and every place it's used, or just arm just = here? You're right, it can be found at least in MIPS and amd64. > This appears to be an idiom, or at least something that has been = pasted > in identical form in every arch so far. The idiom is a bit different in amd64: the variable in the for-loop = isn't immediately reused, but it's a global variable anyway... That's = what I thought deserves a comment. Regarding the pmap_kenter_temporary(), the first problem is the function = name: it might be a temporary mapping, but the real use is for crash = dumps (I wonder why ACPI abuses this mapping). The other problem is the = fact that a pmap function is so tied to crash dumps. However, that's a = bigger problem. -- Rui Paulo From owner-svn-src-all@FreeBSD.ORG Thu Dec 25 02:17:18 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 77D7EE68; Thu, 25 Dec 2014 02:17:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 63AA536F1; Thu, 25 Dec 2014 02:17:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBP2HI9I096941; Thu, 25 Dec 2014 02:17:18 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBP2HI0f096940; Thu, 25 Dec 2014 02:17:18 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201412250217.sBP2HI0f096940@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Thu, 25 Dec 2014 02:17:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276194 - head/cddl/contrib/opensolaris/cmd/zpool X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Dec 2014 02:17:18 -0000 Author: smh Date: Thu Dec 25 02:17:17 2014 New Revision: 276194 URL: https://svnweb.freebsd.org/changeset/base/276194 Log: Prevent zpool upgrade failing due to unavailable pools Prior to this fix "zpool upgrade" and "zpool upgrade -a" would fail due to an assert when operating on unavailable pools. We now print a warning to stderr but allow the processing of other pools to procesed. MFC after: 1 month Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Thu Dec 25 01:55:17 2014 (r276193) +++ head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Thu Dec 25 02:17:17 2014 (r276194) @@ -4629,6 +4629,13 @@ upgrade_cb(zpool_handle_t *zhp, void *ar boolean_t printnl = B_FALSE; int ret; + if (zpool_get_state(zhp) == POOL_STATE_UNAVAIL) { + (void) fprintf(stderr, gettext("cannot upgrade '%s': pool is " + "currently unavailable\n\n"), zpool_get_name(zhp)); + /* Allow iteration to continue. */ + return (0); + } + config = zpool_get_config(zhp, NULL); verify(nvlist_lookup_uint64(config, ZPOOL_CONFIG_VERSION, &version) == 0); @@ -4729,6 +4736,14 @@ upgrade_list_disabled_cb(zpool_handle_t nvlist_t *config; uint64_t version; + if (zpool_get_state(zhp) == POOL_STATE_UNAVAIL) { + (void) fprintf(stderr, gettext("cannot check supported " + "features on '%s': pool is currently unavailable\n\n"), + zpool_get_name(zhp)); + /* Allow iteration to continue. */ + return (0); + } + config = zpool_get_config(zhp, NULL); verify(nvlist_lookup_uint64(config, ZPOOL_CONFIG_VERSION, &version) == 0); From owner-svn-src-all@FreeBSD.ORG Thu Dec 25 03:15:57 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DEB43B3B; Thu, 25 Dec 2014 03:15:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CA72D64C19; Thu, 25 Dec 2014 03:15:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBP3Fv5R025643; Thu, 25 Dec 2014 03:15:57 GMT (envelope-from alfred@FreeBSD.org) Received: (from alfred@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBP3FvS6025641; Thu, 25 Dec 2014 03:15:57 GMT (envelope-from alfred@FreeBSD.org) Message-Id: <201412250315.sBP3FvS6025641@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: alfred set sender to alfred@FreeBSD.org using -f From: Alfred Perlstein Date: Thu, 25 Dec 2014 03:15:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276195 - in head: . lib/libxo X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Dec 2014 03:15:58 -0000 Author: alfred Date: Thu Dec 25 03:15:56 2014 New Revision: 276195 URL: https://svnweb.freebsd.org/changeset/base/276195 Log: Move libxo to /lib Update ObsoleteFiles to reflect libxo move. Reviewed by: ngie Differential Revision: https://reviews.freebsd.org/D1370 Modified: head/ObsoleteFiles.inc head/lib/libxo/Makefile Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Thu Dec 25 02:17:17 2014 (r276194) +++ head/ObsoleteFiles.inc Thu Dec 25 03:15:56 2014 (r276195) @@ -38,6 +38,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20141224: libxo moved to /lib +OLD_FILES+=usr/lib/libxo.a +OLD_FILES+=usr/lib/libxo_p.a # 20141223: remove in6_gif.h, in_gif.h and if_stf.h OLD_FILES+=usr/include/net/if_stf.h OLD_FILES+=usr/include/netinet/in_gif.h Modified: head/lib/libxo/Makefile ============================================================================== --- head/lib/libxo/Makefile Thu Dec 25 02:17:17 2014 (r276194) +++ head/lib/libxo/Makefile Thu Dec 25 03:15:56 2014 (r276195) @@ -7,6 +7,8 @@ LIBXO= ${.CURDIR:H:H}/contrib/libxo LIB= xo SHLIB_MAJOR=0 +SHLIBDIR?= /lib + SRCS= libxo.c CFLAGS+=-I${LIBXO}/libxo From owner-svn-src-all@FreeBSD.ORG Thu Dec 25 03:41:58 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1A942EBD; Thu, 25 Dec 2014 03:41:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E0C2C64F0E; Thu, 25 Dec 2014 03:41:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBP3fvxx038958; Thu, 25 Dec 2014 03:41:57 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBP3fv4e038957; Thu, 25 Dec 2014 03:41:57 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201412250341.sBP3fv4e038957@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 25 Dec 2014 03:41:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276196 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Dec 2014 03:41:58 -0000 Author: ian Date: Thu Dec 25 03:41:56 2014 New Revision: 276196 URL: https://svnweb.freebsd.org/changeset/base/276196 Log: Change the style of the DO_AST macro to match the others in this file -- semicolons between the code and comments instead of after the comments, and line continuations in the arbitrary but now consistant column 76. No functional changes. Modified: head/sys/arm/arm/exception.S Modified: head/sys/arm/arm/exception.S ============================================================================== --- head/sys/arm/arm/exception.S Thu Dec 25 03:15:56 2014 (r276195) +++ head/sys/arm/arm/exception.S Thu Dec 25 03:41:56 2014 (r276196) @@ -241,26 +241,26 @@ __FBSDID("$FreeBSD$"); #define UNWINDSVCFRAME #endif -#define DO_AST \ - ldr r0, [sp] /* Get the SPSR from stack */ ;\ - mrs r4, cpsr /* save CPSR */ ;\ - orr r1, r4, #(PSR_I|PSR_F) ;\ - msr cpsr_c, r1 /* Disable interrupts */ ;\ - and r0, r0, #(PSR_MODE) /* Returning to USR mode? */ ;\ - teq r0, #(PSR_USR32_MODE) ;\ - bne 2f /* Nope, get out now */ ;\ - bic r4, r4, #(PSR_I|PSR_F) ;\ -1: GET_CURTHREAD_PTR(r5) ;\ - ldr r1, [r5, #(TD_FLAGS)] ;\ - and r1, r1, #(TDF_ASTPENDING|TDF_NEEDRESCHED) ;\ - teq r1, #0x00000000 ;\ - beq 2f /* Nope. Just bail */ ;\ - msr cpsr_c, r4 /* Restore interrupts */ ;\ - mov r0, sp ;\ - bl _C_LABEL(ast) /* ast(frame) */ ;\ - orr r0, r4, #(PSR_I|PSR_F) ;\ - msr cpsr_c, r0 ;\ - b 1b ;\ +#define DO_AST \ + ldr r0, [sp]; /* Get the SPSR from stack */ \ + mrs r4, cpsr; /* save CPSR */ \ + orr r1, r4, #(PSR_I|PSR_F); \ + msr cpsr_c, r1; /* Disable interrupts */ \ + and r0, r0, #(PSR_MODE); /* Returning to USR mode? */ \ + teq r0, #(PSR_USR32_MODE); \ + bne 2f; /* Nope, get out now */ \ + bic r4, r4, #(PSR_I|PSR_F); \ +1: GET_CURTHREAD_PTR(r5); \ + ldr r1, [r5, #(TD_FLAGS)]; \ + and r1, r1, #(TDF_ASTPENDING|TDF_NEEDRESCHED); \ + teq r1, #0; \ + beq 2f; /* Nope. Just bail */ \ + msr cpsr_c, r4; /* Restore interrupts */ \ + mov r0, sp; \ + bl _C_LABEL(ast); /* ast(frame) */ \ + orr r0, r4, #(PSR_I|PSR_F); \ + msr cpsr_c, r0; \ + b 1b \ 2: From owner-svn-src-all@FreeBSD.ORG Thu Dec 25 03:42:39 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 18EDE1000; Thu, 25 Dec 2014 03:42:39 +0000 (UTC) Received: from mail-pa0-x22d.google.com (mail-pa0-x22d.google.com [IPv6:2607:f8b0:400e:c03::22d]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D8CFF64F1E; Thu, 25 Dec 2014 03:42:38 +0000 (UTC) Received: by mail-pa0-f45.google.com with SMTP id lf10so11130517pab.4; Wed, 24 Dec 2014 19:42:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=references:mime-version:in-reply-to:content-type :content-transfer-encoding:message-id:cc:from:subject:date:to; bh=+94SZ9wiVgS44hjOVC0Xcp7Gv6Y5E1u3xhYKa6KlGB8=; b=abBVfW33liseYIkRSEGivcjblFrwQo77UxSfPPavQrUbQfa7gaY8usbsu4XTR07df+ xwDCLbN8qTAi/WyoYvY0t+NN6EKUr0B4amVUOQ/Zr34UX//YIYWRZ6XpskvefN9va4nq 3A81cuRwDJsoQl4YELTMbLIdV0OziLmnhWsgfPKWyKZ6hSZjKDAfLJAZU9oZJx1KI0Ne ZnMFMEk4WXauV9Z83QKxRb0U3Ta5r8EUfDK4ZLlNMpHyQ92ByczYscv+40oKCm8JKW/R FYBRROmY8a84DvjmA9FpDBq6xY5h9+tIE83VjStNv8YEOuynRYeDZsjJ+uTrZv2ZOZVW Cf1A== X-Received: by 10.68.202.98 with SMTP id kh2mr58581701pbc.6.1419478958418; Wed, 24 Dec 2014 19:42:38 -0800 (PST) Received: from [10.157.91.197] (mobile-166-171-251-172.mycingular.net. [166.171.251.172]) by mx.google.com with ESMTPSA id wk2sm16809352pac.12.2014.12.24.19.42.37 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 24 Dec 2014 19:42:37 -0800 (PST) References: <201412250315.sBP3FvS6025641@svn.freebsd.org> Mime-Version: 1.0 (1.0) In-Reply-To: <201412250315.sBP3FvS6025641@svn.freebsd.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Message-Id: <8F2C5A52-365F-4AE9-B60F-78CE7122F5B7@gmail.com> X-Mailer: iPhone Mail (12B440) From: Garrett Cooper Subject: Re: svn commit: r276195 - in head: . lib/libxo Date: Wed, 24 Dec 2014 19:36:58 -0800 To: Alfred Perlstein Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Dec 2014 03:42:39 -0000 > On Dec 24, 2014, at 19:15, Alfred Perlstein wrote: >=20 > Author: alfred > Date: Thu Dec 25 03:15:56 2014 > New Revision: 276195 > URL: https://svnweb.freebsd.org/changeset/base/276195 >=20 > Log: > Move libxo to /lib >=20 > Update ObsoleteFiles to reflect libxo move. >=20 > Reviewed by: ngie > Differential Revision: https://reviews.freebsd.org/D1370 >=20 > Modified: > head/ObsoleteFiles.inc > head/lib/libxo/Makefile >=20 > Modified: head/ObsoleteFiles.inc > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D > --- head/ObsoleteFiles.inc Thu Dec 25 02:17:17 2014 (r276194) > +++ head/ObsoleteFiles.inc Thu Dec 25 03:15:56 2014 (r276195) > @@ -38,6 +38,9 @@ > # xargs -n1 | sort | uniq -d; > # done >=20 > +# 20141224: libxo moved to /lib > +OLD_FILES+=3Dusr/lib/libxo.a > +OLD_FILES+=3Dusr/lib/libxo_p.a This should actually be the .so file only. Static libraries are always in /u= sr/lib . Sorry for not being explicit about this (I'm currently writing from the boon= ies so bandwidth is limited) :/. > # 20141223: remove in6_gif.h, in_gif.h and if_stf.h > OLD_FILES+=3Dusr/include/net/if_stf.h > OLD_FILES+=3Dusr/include/netinet/in_gif.h >=20 > Modified: head/lib/libxo/Makefile > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D > --- head/lib/libxo/Makefile Thu Dec 25 02:17:17 2014 (r276194) > +++ head/lib/libxo/Makefile Thu Dec 25 03:15:56 2014 (r276195) > @@ -7,6 +7,8 @@ LIBXO=3D ${.CURDIR:H:H}/contrib/libxo > LIB=3D xo > SHLIB_MAJOR=3D0 >=20 > +SHLIBDIR?=3D /lib > + > SRCS=3D libxo.c >=20 > CFLAGS+=3D-I${LIBXO}/libxo >=20 From owner-svn-src-all@FreeBSD.ORG Thu Dec 25 03:56:01 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3124627F; Thu, 25 Dec 2014 03:56:01 +0000 (UTC) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 1BDAA66051; Thu, 25 Dec 2014 03:56:00 +0000 (UTC) Received: from AlfredMacbookAir.local (c-76-21-10-192.hsd1.ca.comcast.net [76.21.10.192]) by elvis.mu.org (Postfix) with ESMTPSA id 46A7B341F853; Wed, 24 Dec 2014 19:56:00 -0800 (PST) Message-ID: <549B8AD4.40703@freebsd.org> Date: Wed, 24 Dec 2014 19:56:04 -0800 From: Alfred Perlstein Organization: FreeBSD User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Garrett Cooper Subject: Re: svn commit: r276195 - in head: . lib/libxo References: <201412250315.sBP3FvS6025641@svn.freebsd.org> <8F2C5A52-365F-4AE9-B60F-78CE7122F5B7@gmail.com> In-Reply-To: <8F2C5A52-365F-4AE9-B60F-78CE7122F5B7@gmail.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Dec 2014 03:56:01 -0000 On 12/24/14 7:36 PM, Garrett Cooper wrote: >> On Dec 24, 2014, at 19:15, Alfred Perlstein wrote: >> >> Author: alfred >> Date: Thu Dec 25 03:15:56 2014 >> New Revision: 276195 >> URL: https://svnweb.freebsd.org/changeset/base/276195 >> >> Log: >> Move libxo to /lib >> >> Update ObsoleteFiles to reflect libxo move. >> >> Reviewed by: ngie >> Differential Revision: https://reviews.freebsd.org/D1370 >> >> Modified: >> head/ObsoleteFiles.inc >> head/lib/libxo/Makefile >> >> Modified: head/ObsoleteFiles.inc >> ============================================================================== >> --- head/ObsoleteFiles.inc Thu Dec 25 02:17:17 2014 (r276194) >> +++ head/ObsoleteFiles.inc Thu Dec 25 03:15:56 2014 (r276195) >> @@ -38,6 +38,9 @@ >> # xargs -n1 | sort | uniq -d; >> # done >> >> +# 20141224: libxo moved to /lib >> +OLD_FILES+=usr/lib/libxo.a >> +OLD_FILES+=usr/lib/libxo_p.a > This should actually be the .so file only. Static libraries are always in /usr/lib . > > Sorry for not being explicit about this (I'm currently writing from the boonies so bandwidth is limited) :/. > > I think the .so gets clobbered with a symlink, so it should be fine? Meaning that after I moved the lib to /lib this is what I see in /usr/lib: /usr/src/contrib/libxo % ls -l /usr/lib/libxo* -r--r--r-- 1 root wheel 83764 Dec 24 19:31 /usr/lib/libxo.a lrwxr-xr-x 1 root wheel 15 Dec 24 19:31 /usr/lib/libxo.so -> /lib/libxo.so.0 -r--r--r-- 1 root wheel 95164 Dec 24 19:31 /usr/lib/libxo_p.a Or should I reference it explicitly? What is the end result here? -Alfred From owner-svn-src-all@FreeBSD.ORG Thu Dec 25 04:18:32 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3CDED497; Thu, 25 Dec 2014 04:18:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2938366D40; Thu, 25 Dec 2014 04:18:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBP4IWrj053711; Thu, 25 Dec 2014 04:18:32 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBP4IWD4053710; Thu, 25 Dec 2014 04:18:32 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201412250418.sBP4IWD4053710@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 25 Dec 2014 04:18:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276197 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Dec 2014 04:18:32 -0000 Author: ian Date: Thu Dec 25 04:18:31 2014 New Revision: 276197 URL: https://svnweb.freebsd.org/changeset/base/276197 Log: Oops, I fumbled a semicolon on the style changes; recover it. Modified: head/sys/arm/arm/exception.S Modified: head/sys/arm/arm/exception.S ============================================================================== --- head/sys/arm/arm/exception.S Thu Dec 25 03:41:56 2014 (r276196) +++ head/sys/arm/arm/exception.S Thu Dec 25 04:18:31 2014 (r276197) @@ -260,7 +260,7 @@ __FBSDID("$FreeBSD$"); bl _C_LABEL(ast); /* ast(frame) */ \ orr r0, r4, #(PSR_I|PSR_F); \ msr cpsr_c, r0; \ - b 1b \ + b 1b; \ 2: From owner-svn-src-all@FreeBSD.ORG Thu Dec 25 04:41:45 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 282396AD; Thu, 25 Dec 2014 04:41:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 14AFD66FB7; Thu, 25 Dec 2014 04:41:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBP4finj065613; Thu, 25 Dec 2014 04:41:44 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBP4fiCK065612; Thu, 25 Dec 2014 04:41:44 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201412250441.sBP4fiCK065612@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 25 Dec 2014 04:41:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276198 - head/sys/arm/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Dec 2014 04:41:45 -0000 Author: ian Date: Thu Dec 25 04:41:43 2014 New Revision: 276198 URL: https://svnweb.freebsd.org/changeset/base/276198 Log: Remove _PROF_PROLOGUE from the EENTRY() macros. These macros define 'extra' entry points which are nested within or provide a synonym name for another function. It's most likely not safe to be messing with the IP and LR registers at anything other than the primary entry point to a function. Anywhere beyond initial function entry, those registers may be in use as scratch or variable registers. Modified: head/sys/arm/include/asm.h Modified: head/sys/arm/include/asm.h ============================================================================== --- head/sys/arm/include/asm.h Thu Dec 25 04:18:31 2014 (r276197) +++ head/sys/arm/include/asm.h Thu Dec 25 04:41:43 2014 (r276198) @@ -90,17 +90,17 @@ #endif #define ENTRY(y) _ENTRY(_C_LABEL(y)); _PROF_PROLOGUE -#define EENTRY(y) _EENTRY(_C_LABEL(y)); _PROF_PROLOGUE +#define EENTRY(y) _EENTRY(_C_LABEL(y)); #define ENTRY_NP(y) _ENTRY(_C_LABEL(y)) #define EENTRY_NP(y) _EENTRY(_C_LABEL(y)) #define END(y) _END(_C_LABEL(y)) -#define EEND(y) +#define EEND(y) _EEND(_C_LABEL(y)) #define ASENTRY(y) _ENTRY(_ASM_LABEL(y)); _PROF_PROLOGUE -#define ASEENTRY(y) _EENTRY(_ASM_LABEL(y)); _PROF_PROLOGUE +#define ASEENTRY(y) _EENTRY(_ASM_LABEL(y)); #define ASENTRY_NP(y) _ENTRY(_ASM_LABEL(y)) #define ASEENTRY_NP(y) _EENTRY(_ASM_LABEL(y)) #define ASEND(y) _END(_ASM_LABEL(y)) -#define ASEEND(y) +#define ASEEND(y) _EEND(_ASM_LABEL(y)) #define ASMSTR .asciz From owner-svn-src-all@FreeBSD.ORG Thu Dec 25 09:03:22 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 89884924; Thu, 25 Dec 2014 09:03:22 +0000 (UTC) Received: from mail-pd0-x22f.google.com (mail-pd0-x22f.google.com [IPv6:2607:f8b0:400e:c02::22f]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 545D326A1; Thu, 25 Dec 2014 09:03:22 +0000 (UTC) Received: by mail-pd0-f175.google.com with SMTP id g10so11387440pdj.20; Thu, 25 Dec 2014 01:03:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:content-transfer-encoding:subject:references:from :mime-version:in-reply-to:message-id:date:cc:to; bh=1xWu5Mrlrsi0XOZhK1cf4aUyzZv+rQzu2zq8P1DP4Xk=; b=qqP6SO8ndTfLDBTIF26Xrj2QHn0aBIHICHKCU/yRbFdU9yNzPlTK/mzct13ZWzgHf3 aW3VEngTm9GcwKyu4PURniweQ1q1KuA6OmYsAYJOLk610xpKqKYh3yHVE2MA2ez39i5k kGJ8v7tc5Fh+wPag83JHozJjE6fdtPSr0y7GqmBxSERmNj1dRGEsGEfMgvad3CwthuuZ 40GBXRB5oBCA9Ap3KaLp2O8/zHIv/Zn3TQEFpXZlgJuhevEkK66YYqQogKpSSnorM7N1 HFikjboZ+EOwuWsa2no7x9hi4HVy1z1XHdJv7YoFufVrcaLf6KW4dR0DsMRe1ire/vrZ FYqg== X-Received: by 10.70.128.15 with SMTP id nk15mr58884983pdb.121.1419498201809; Thu, 25 Dec 2014 01:03:21 -0800 (PST) Received: from [10.157.91.197] (mobile-166-171-251-172.mycingular.net. [166.171.251.172]) by mx.google.com with ESMTPSA id uq15sm25035867pab.8.2014.12.25.01.03.20 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 25 Dec 2014 01:03:20 -0800 (PST) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Subject: Re: svn commit: r276195 - in head: . lib/libxo References: <201412250315.sBP3FvS6025641@svn.freebsd.org> <8F2C5A52-365F-4AE9-B60F-78CE7122F5B7@gmail.com> <549B8AD4.40703@freebsd.org> From: Garrett Cooper Mime-Version: 1.0 (1.0) In-Reply-To: <549B8AD4.40703@freebsd.org> Message-Id: Date: Wed, 24 Dec 2014 23:04:01 -0800 To: Alfred Perlstein X-Mailer: iPhone Mail (12B440) Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Dec 2014 09:03:22 -0000 > On Dec 24, 2014, at 19:56, Alfred Perlstein wrote: >=20 >=20 > On 12/24/14 7:36 PM, Garrett Cooper wrote: >>> On Dec 24, 2014, at 19:15, Alfred Perlstein wrote: >>>=20 >>> Author: alfred >>> Date: Thu Dec 25 03:15:56 2014 >>> New Revision: 276195 >>> URL: https://svnweb.freebsd.org/changeset/base/276195 >>>=20 >>> Log: >>> Move libxo to /lib >>>=20 >>> Update ObsoleteFiles to reflect libxo move. >>>=20 >>> Reviewed by: ngie >>> Differential Revision: https://reviews.freebsd.org/D1370 >>>=20 >>> Modified: >>> head/ObsoleteFiles.inc >>> head/lib/libxo/Makefile >>>=20 >>> Modified: head/ObsoleteFiles.inc >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D >>> --- head/ObsoleteFiles.inc Thu Dec 25 02:17:17 2014 (r276194) >>> +++ head/ObsoleteFiles.inc Thu Dec 25 03:15:56 2014 (r276195) >>> @@ -38,6 +38,9 @@ >>> # xargs -n1 | sort | uniq -d; >>> # done >>>=20 >>> +# 20141224: libxo moved to /lib >>> +OLD_FILES+=3Dusr/lib/libxo.a >>> +OLD_FILES+=3Dusr/lib/libxo_p.a >> This should actually be the .so file only. Static libraries are always in= /usr/lib . >>=20 >> Sorry for not being explicit about this (I'm currently writing from the b= oonies so bandwidth is limited) :/. >>=20 >>=20 >=20 > I think the .so gets clobbered with a symlink, so it should be fine? >=20 > Meaning that after I moved the lib to /lib this is what I see in /usr/lib:= > /usr/src/contrib/libxo % ls -l /usr/lib/libxo* > -r--r--r-- 1 root wheel 83764 Dec 24 19:31 /usr/lib/libxo.a > lrwxr-xr-x 1 root wheel 15 Dec 24 19:31 /usr/lib/libxo.so -> /lib/li= bxo.so.0 > -r--r--r-- 1 root wheel 95164 Dec 24 19:31 /usr/lib/libxo_p.a >=20 >=20 > Or should I reference it explicitly? >=20 > What is the end result here? There isn't a leftover versioned .so in /usr/lib ?= From owner-svn-src-all@FreeBSD.ORG Thu Dec 25 10:21:19 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7F2CC3B9; Thu, 25 Dec 2014 10:21:19 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 231A03F6C; Thu, 25 Dec 2014 10:21:18 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id sBPALD7c068655 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 25 Dec 2014 12:21:13 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua sBPALD7c068655 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id sBPALDis068654; Thu, 25 Dec 2014 12:21:13 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 25 Dec 2014 12:21:13 +0200 From: Konstantin Belousov To: Garrett Cooper Subject: Re: svn commit: r276195 - in head: . lib/libxo Message-ID: <20141225102113.GE1754@kib.kiev.ua> References: <201412250315.sBP3FvS6025641@svn.freebsd.org> <8F2C5A52-365F-4AE9-B60F-78CE7122F5B7@gmail.com> <549B8AD4.40703@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , Alfred Perlstein , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Dec 2014 10:21:19 -0000 On Wed, Dec 24, 2014 at 11:04:01PM -0800, Garrett Cooper wrote: > > > On Dec 24, 2014, at 19:56, Alfred Perlstein wrote: > > > > > > On 12/24/14 7:36 PM, Garrett Cooper wrote: > >>> On Dec 24, 2014, at 19:15, Alfred Perlstein wrote: > >>> > >>> Author: alfred > >>> Date: Thu Dec 25 03:15:56 2014 > >>> New Revision: 276195 > >>> URL: https://svnweb.freebsd.org/changeset/base/276195 > >>> > >>> Log: > >>> Move libxo to /lib > >>> > >>> Update ObsoleteFiles to reflect libxo move. > >>> > >>> Reviewed by: ngie > >>> Differential Revision: https://reviews.freebsd.org/D1370 > >>> > >>> Modified: > >>> head/ObsoleteFiles.inc > >>> head/lib/libxo/Makefile > >>> > >>> Modified: head/ObsoleteFiles.inc > >>> ============================================================================== > >>> --- head/ObsoleteFiles.inc Thu Dec 25 02:17:17 2014 (r276194) > >>> +++ head/ObsoleteFiles.inc Thu Dec 25 03:15:56 2014 (r276195) > >>> @@ -38,6 +38,9 @@ > >>> # xargs -n1 | sort | uniq -d; > >>> # done > >>> > >>> +# 20141224: libxo moved to /lib > >>> +OLD_FILES+=usr/lib/libxo.a > >>> +OLD_FILES+=usr/lib/libxo_p.a > >> This should actually be the .so file only. Static libraries are always in /usr/lib . > >> > >> Sorry for not being explicit about this (I'm currently writing from the boonies so bandwidth is limited) :/. > >> > >> > > > > I think the .so gets clobbered with a symlink, so it should be fine? > > > > Meaning that after I moved the lib to /lib this is what I see in /usr/lib: > > /usr/src/contrib/libxo % ls -l /usr/lib/libxo* > > -r--r--r-- 1 root wheel 83764 Dec 24 19:31 /usr/lib/libxo.a > > lrwxr-xr-x 1 root wheel 15 Dec 24 19:31 /usr/lib/libxo.so -> /lib/libxo.so.0 > > -r--r--r-- 1 root wheel 95164 Dec 24 19:31 /usr/lib/libxo_p.a > > > > > > Or should I reference it explicitly? > > > > What is the end result here? > > There isn't a leftover versioned .so in /usr/lib ? usr/lib/libxo.so.0 (without leading slash) must go into OLD_LIBS. It is all explained in the first paragraph of the file comment. From owner-svn-src-all@FreeBSD.ORG Thu Dec 25 10:25:04 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A491D533; Thu, 25 Dec 2014 10:25:04 +0000 (UTC) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 350891059; Thu, 25 Dec 2014 10:25:04 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 610A125D3871; Thu, 25 Dec 2014 10:25:01 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 75272C76FD3; Thu, 25 Dec 2014 10:25:00 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id w4n7IdeIvR0X; Thu, 25 Dec 2014 10:24:58 +0000 (UTC) Received: from [IPv6:fde9:577b:c1a9:31:cabc:c8ff:fecf:e8e3] (orange-en1.sbone.de [IPv6:fde9:577b:c1a9:31:cabc:c8ff:fecf:e8e3]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 41718C76FCD; Thu, 25 Dec 2014 10:24:57 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Subject: Re: svn commit: r276188 - head/sys/netipsec From: "Bjoern A. Zeeb" In-Reply-To: <201412241834.sBOIYvrL078222@svn.freebsd.org> Date: Thu, 25 Dec 2014 10:24:51 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <2AA1B085-9974-4AE5-9498-B07469E5A29B@FreeBSD.org> References: <201412241834.sBOIYvrL078222@svn.freebsd.org> To: "Andrey V. Elsukov" X-Mailer: Apple Mail (2.1993) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Dec 2014 10:25:04 -0000 > On 24 Dec 2014, at 18:34 , Andrey V. Elsukov wrote: >=20 > Author: ae > Date: Wed Dec 24 18:34:56 2014 > New Revision: 276188 > URL: https://svnweb.freebsd.org/changeset/base/276188 >=20 > Log: > Rename ip4_def_policy variable to def_policy. It is used by both IPv4 = and > IPv6. Initialize it only once in def_policy_init(). Remove its > initialization from key_init() and make it static. >=20 > Remove several fields from struct secpolicy: > * lock - it isn't so useful having mutex in the structure, but the = only > thing we do with it is initialization and destroying. > * state - it has only two values - DEAD and ALIVE. Instead of take a = lock > and change the state to DEAD, then take lock again in GC function = and > delete policy from the chain - keep in the chain only ALIVE = policies. > * scangen - it was used in GC function to protect from sending = several > SADB_SPDEXPIRE messages for one SPD entry. Now we don't keep DEAD = entries > in the chain and there is no need to have scangen variable. >=20 > Use TAILQ to implement SPD entries chain. Use rmlock to protect = access > to SPD entries chain. Protect all SP lookup with RLOCK, and use WLOCK > when we are inserting (or removing) SP entry in the chain. >=20 > Instead of using pattern "LOCK(); refcnt++; UNLOCK();", use = refcount(9) > API to implement refcounting in SPD. Merge code from key_delsp() and > _key_delsp() into _key_freesp(). And use KEY_FREESP() macro in all = cases > when we want to release reference or just delete SP entry. >=20 > Obtained from: Yandex LLC > Sponsored by: Yandex LLC >=20 > Modified: > head/sys/netipsec/ipsec.c > head/sys/netipsec/ipsec.h > head/sys/netipsec/key.c > head/sys/netipsec/key_debug.c This broke VIMAGE kernel builds. And I=E2=80=99ll repeat what I said before: I appreciate all your work = but at the same time I remain massively worried by major change commits = to security subsystems without any Reviewed by: lines. Please use = appropriate ways to get extra pairs of eyes. Happy holidays! Bjoern =E2=80=94=20 Bjoern A. Zeeb Charles Haddon Spurgeon: "Friendship is one of the sweetest joys of life. Many might have failed beneath the bitterness of their trial had they not found a friend." From owner-svn-src-all@FreeBSD.ORG Thu Dec 25 13:38:52 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 856FBD64; Thu, 25 Dec 2014 13:38:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7136E643AC; Thu, 25 Dec 2014 13:38:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBPDcq40012728; Thu, 25 Dec 2014 13:38:52 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBPDcqSX012727; Thu, 25 Dec 2014 13:38:52 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201412251338.sBPDcqSX012727@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Thu, 25 Dec 2014 13:38:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276199 - head/sys/netipsec X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Dec 2014 13:38:52 -0000 Author: ae Date: Thu Dec 25 13:38:51 2014 New Revision: 276199 URL: https://svnweb.freebsd.org/changeset/base/276199 Log: Fix VIMAGE build. Modified: head/sys/netipsec/key.c Modified: head/sys/netipsec/key.c ============================================================================== --- head/sys/netipsec/key.c Thu Dec 25 04:41:43 2014 (r276198) +++ head/sys/netipsec/key.c Thu Dec 25 13:38:51 2014 (r276199) @@ -7608,7 +7608,7 @@ key_destroy(void) TAILQ_INIT(&drainq); SPTREE_WLOCK(); for (i = 0; i < IPSEC_DIR_MAX; i++) { - TAILQ_CONCAT(&drainq, &V_sptree[dir], chain); + TAILQ_CONCAT(&drainq, &V_sptree[i], chain); } SPTREE_WUNLOCK(); sp = TAILQ_FIRST(&drainq); From owner-svn-src-all@FreeBSD.ORG Thu Dec 25 14:44:05 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 845FAD19; Thu, 25 Dec 2014 14:44:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 707481ABE; Thu, 25 Dec 2014 14:44:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBPEi5OT047533; Thu, 25 Dec 2014 14:44:05 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBPEi5Sd047532; Thu, 25 Dec 2014 14:44:05 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201412251444.sBPEi5Sd047532@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Thu, 25 Dec 2014 14:44:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276200 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Dec 2014 14:44:05 -0000 Author: rmacklem Date: Thu Dec 25 14:44:04 2014 New Revision: 276200 URL: https://svnweb.freebsd.org/changeset/base/276200 Log: Fix the comment introduced in r276192 so that it clearly states that the change is needed to avoid a deadlock. Suggested by: kib MFC after: 1 week Modified: head/sys/kern/vfs_default.c Modified: head/sys/kern/vfs_default.c ============================================================================== --- head/sys/kern/vfs_default.c Thu Dec 25 13:38:51 2014 (r276199) +++ head/sys/kern/vfs_default.c Thu Dec 25 14:44:04 2014 (r276200) @@ -407,9 +407,10 @@ vop_stdadvlock(struct vop_advlock_args * vp = ap->a_vp; if (ap->a_fl->l_whence == SEEK_END) { /* - * The NFSv4 server will LOR/deadlock if a vn_lock() call - * is done on vp. Fortunately, vattr.va_size is only - * needed for SEEK_END and the NFSv4 server only uses SEEK_SET. + * The NFSv4 server must avoid doing a vn_lock() here, since it + * can deadlock the nfsd threads, due to a LOR. Fortunately + * the NFSv4 server always uses SEEK_SET and this code is + * only required for the SEEK_END case. */ vn_lock(vp, LK_SHARED | LK_RETRY); error = VOP_GETATTR(vp, &vattr, curthread->td_ucred); From owner-svn-src-all@FreeBSD.ORG Thu Dec 25 15:17:59 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2C8A54D7; Thu, 25 Dec 2014 15:17:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 185E51FFA; Thu, 25 Dec 2014 15:17:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBPFHwkB062487; Thu, 25 Dec 2014 15:17:58 GMT (envelope-from kevlo@FreeBSD.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBPFHwLf062484; Thu, 25 Dec 2014 15:17:58 GMT (envelope-from kevlo@FreeBSD.org) Message-Id: <201412251517.sBPFHwLf062484@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kevlo set sender to kevlo@FreeBSD.org using -f From: Kevin Lo Date: Thu, 25 Dec 2014 15:17:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276201 - head/share/man/man9 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Dec 2014 15:17:59 -0000 Author: kevlo Date: Thu Dec 25 15:17:57 2014 New Revision: 276201 URL: https://svnweb.freebsd.org/changeset/base/276201 Log: Replace CC_VAR with CCV, since the CC_VAR macro doesn't exist. While here, add MLINK for CCV.9 and DECLARE_CC_MODULE.9. Modified: head/share/man/man9/Makefile head/share/man/man9/mod_cc.9 Modified: head/share/man/man9/Makefile ============================================================================== --- head/share/man/man9/Makefile Thu Dec 25 14:44:04 2014 (r276200) +++ head/share/man/man9/Makefile Thu Dec 25 15:17:57 2014 (r276201) @@ -1080,6 +1080,8 @@ MLINKS+=microuptime.9 binuptime.9 \ microuptime.9 sbinuptime.9 MLINKS+=mi_switch.9 cpu_switch.9 \ mi_switch.9 cpu_throw.9 +MLINKS+=mod_cc.9 CCV.9 \ + mod_cc.9 DECLARE_CC_MODULE.9 MLINKS+=mtx_pool.9 mtx_pool_alloc.9 \ mtx_pool.9 mtx_pool_create.9 \ mtx_pool.9 mtx_pool_destroy.9 \ Modified: head/share/man/man9/mod_cc.9 ============================================================================== --- head/share/man/man9/mod_cc.9 Thu Dec 25 14:44:04 2014 (r276200) +++ head/share/man/man9/mod_cc.9 Thu Dec 25 15:17:57 2014 (r276201) @@ -31,19 +31,19 @@ .\" .\" $FreeBSD$ .\" -.Dd September 15, 2011 +.Dd December 25, 2014 .Dt MOD_CC 9 .Os .Sh NAME .Nm mod_cc , .Nm DECLARE_CC_MODULE , -.Nm CC_VAR +.Nm CCV .Nd Modular Congestion Control .Sh SYNOPSIS .In netinet/cc.h .In netinet/cc/cc_module.h .Fn DECLARE_CC_MODULE "ccname" "ccalgo" -.Fn CC_VAR "ccv" "what" +.Fn CCV "ccv" "what" .Sh DESCRIPTION The .Nm @@ -223,7 +223,7 @@ To aid the eventual transition towards t the transport protocol's data structures is strongly discouraged. However, it is inevitable at the current time to require access to some of these variables, and so the -.Fn CC_VAR +.Fn CCV macro exists as a convenience accessor. The .Fa ccv From owner-svn-src-all@FreeBSD.ORG Thu Dec 25 16:36:03 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4624C18A; Thu, 25 Dec 2014 16:36:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 17FAB189; Thu, 25 Dec 2014 16:36:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBPGa25e099440; Thu, 25 Dec 2014 16:36:02 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBPGa2Sj099439; Thu, 25 Dec 2014 16:36:02 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201412251636.sBPGa2Sj099439@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 25 Dec 2014 16:36:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276202 - head/sys/arm/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Dec 2014 16:36:03 -0000 Author: ian Date: Thu Dec 25 16:36:02 2014 New Revision: 276202 URL: https://svnweb.freebsd.org/changeset/base/276202 Log: Stylish changes... put tabs where they need to be in macros, move lines around so that related things are more grouped together, rewrite comments. No functional changes, this is all so that the functional changes in the next commit will stand out. Modified: head/sys/arm/include/asm.h Modified: head/sys/arm/include/asm.h ============================================================================== --- head/sys/arm/include/asm.h Thu Dec 25 15:17:57 2014 (r276201) +++ head/sys/arm/include/asm.h Thu Dec 25 16:36:02 2014 (r276202) @@ -58,6 +58,22 @@ #endif /* + * gas/arm uses @ as a single comment character and thus cannot be used here. + * It recognises the # instead of an @ symbol in .type directives. + */ +#define _ASM_TYPE_FUNCTION #function +#define _ASM_TYPE_OBJECT #object + +/* XXX Is this still the right prologue for profiling? */ +#ifdef GPROF +#define _PROF_PROLOGUE \ + mov ip, lr; \ + bl __mcount +#else +#define _PROF_PROLOGUE +#endif + +/* * EENTRY()/EEND() mark "extra" entry/exit points from a function. * The unwind info cannot handle the concept of a nested function, or a function * with multiple .fnstart directives, but some of our assembler code is written @@ -69,25 +85,9 @@ #define _EENTRY(x) .globl x; .type x,_ASM_TYPE_FUNCTION; x: #define _EEND(x) /* nothing */ -/* - * gas/arm uses @ as a single comment character and thus cannot be used here - * Instead it recognised the # instead of an @ symbols in .type directives - * We define a couple of macros so that assembly code will not be dependent - * on one or the other. - */ -#define _ASM_TYPE_FUNCTION #function -#define _ASM_TYPE_OBJECT #object -#define GLOBAL(X) .globl x -#define _ENTRY(x) \ - .text; _ALIGN_TEXT; _EENTRY(x) _FNSTART -#define _END(x) .size x, . - x; _FNEND - -#ifdef GPROF -# define _PROF_PROLOGUE \ - mov ip, lr; bl __mcount -#else -# define _PROF_PROLOGUE -#endif +#define GLOBAL(X) .globl x +#define _ENTRY(x) .text; _ALIGN_TEXT; _EENTRY(x) _FNSTART +#define _END(x) .size x, . - x; _FNEND #define ENTRY(y) _ENTRY(_C_LABEL(y)); _PROF_PROLOGUE #define EENTRY(y) _EENTRY(_C_LABEL(y)); From owner-svn-src-all@FreeBSD.ORG Thu Dec 25 16:43:16 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 50D1F375; Thu, 25 Dec 2014 16:43:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3D12F2EB; Thu, 25 Dec 2014 16:43:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBPGhGTW003835; Thu, 25 Dec 2014 16:43:16 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBPGhGlY003834; Thu, 25 Dec 2014 16:43:16 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201412251643.sBPGhGlY003834@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 25 Dec 2014 16:43:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276203 - head/sys/arm/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Dec 2014 16:43:16 -0000 Author: ian Date: Thu Dec 25 16:43:15 2014 New Revision: 276203 URL: https://svnweb.freebsd.org/changeset/base/276203 Log: Fix the GLOBAL macro so it works (upper vs lowercase X), use it in _EENTRY. Modified: head/sys/arm/include/asm.h Modified: head/sys/arm/include/asm.h ============================================================================== --- head/sys/arm/include/asm.h Thu Dec 25 16:36:02 2014 (r276202) +++ head/sys/arm/include/asm.h Thu Dec 25 16:43:15 2014 (r276203) @@ -82,10 +82,11 @@ * basically just a label that you can jump to. The EEND() macro does nothing * at all, except document the exit point associated with the same-named entry. */ -#define _EENTRY(x) .globl x; .type x,_ASM_TYPE_FUNCTION; x: +#define GLOBAL(x) .global x + +#define _EENTRY(x) GLOBAL(x); .type x,_ASM_TYPE_FUNCTION; x: #define _EEND(x) /* nothing */ -#define GLOBAL(X) .globl x #define _ENTRY(x) .text; _ALIGN_TEXT; _EENTRY(x) _FNSTART #define _END(x) .size x, . - x; _FNEND From owner-svn-src-all@FreeBSD.ORG Thu Dec 25 16:49:35 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 28F32649; Thu, 25 Dec 2014 16:49:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EEE04364; Thu, 25 Dec 2014 16:49:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBPGnYja004792; Thu, 25 Dec 2014 16:49:34 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBPGnYIK004791; Thu, 25 Dec 2014 16:49:34 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201412251649.sBPGnYIK004791@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 25 Dec 2014 16:49:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276204 - head/sys/arm/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Dec 2014 16:49:35 -0000 Author: ian Date: Thu Dec 25 16:49:33 2014 New Revision: 276204 URL: https://svnweb.freebsd.org/changeset/base/276204 Log: Create 'L' variants of all the ENTRY macros for file-static/local symbols. If it seems like this is getting out of hand, I quite agree. I wonder if it's safe, here in the 21st century, to lose the distinction between C and ASM symbols? Modified: head/sys/arm/include/asm.h Modified: head/sys/arm/include/asm.h ============================================================================== --- head/sys/arm/include/asm.h Thu Dec 25 16:43:15 2014 (r276203) +++ head/sys/arm/include/asm.h Thu Dec 25 16:49:33 2014 (r276204) @@ -75,6 +75,7 @@ /* * EENTRY()/EEND() mark "extra" entry/exit points from a function. + * LEENTRY()/LEEND() are the the same for local symbols. * The unwind info cannot handle the concept of a nested function, or a function * with multiple .fnstart directives, but some of our assembler code is written * with multiple labels to allow entry at several points. The EENTRY() macro @@ -84,11 +85,15 @@ */ #define GLOBAL(x) .global x -#define _EENTRY(x) GLOBAL(x); .type x,_ASM_TYPE_FUNCTION; x: -#define _EEND(x) /* nothing */ - -#define _ENTRY(x) .text; _ALIGN_TEXT; _EENTRY(x) _FNSTART -#define _END(x) .size x, . - x; _FNEND +#define _LEENTRY(x) .type x,_ASM_TYPE_FUNCTION; x: +#define _LEEND(x) /* nothing */ +#define _EENTRY(x) GLOBAL(x); _LEENTRY(x) +#define _EEND(x) _LEEND(x) + +#define _LENTRY(x) .text; _ALIGN_TEXT; _LEENTRY(x); _FNSTART +#define _LEND(x) .size x, . - x; _FNEND +#define _ENTRY(x) .text; _ALIGN_TEXT; _EENTRY(x); _FNSTART +#define _END(x) _LEND(x) #define ENTRY(y) _ENTRY(_C_LABEL(y)); _PROF_PROLOGUE #define EENTRY(y) _EENTRY(_C_LABEL(y)); @@ -97,11 +102,17 @@ #define END(y) _END(_C_LABEL(y)) #define EEND(y) _EEND(_C_LABEL(y)) #define ASENTRY(y) _ENTRY(_ASM_LABEL(y)); _PROF_PROLOGUE +#define ASLENTRY(y) _LENTRY(_ASM_LABEL(y)); _PROF_PROLOGUE #define ASEENTRY(y) _EENTRY(_ASM_LABEL(y)); +#define ASLEENTRY(y) _LEENTRY(_ASM_LABEL(y)); #define ASENTRY_NP(y) _ENTRY(_ASM_LABEL(y)) +#define ASLENTRY_NP(y) _LENTRY(_ASM_LABEL(y)) #define ASEENTRY_NP(y) _EENTRY(_ASM_LABEL(y)) +#define ASLEENTRY_NP(y) _LEENTRY(_ASM_LABEL(y)) #define ASEND(y) _END(_ASM_LABEL(y)) +#define ASLEND(y) _LEND(_ASM_LABEL(y)) #define ASEEND(y) _EEND(_ASM_LABEL(y)) +#define ASLEEND(y) _LEEND(_ASM_LABEL(y)) #define ASMSTR .asciz From owner-svn-src-all@FreeBSD.ORG Thu Dec 25 17:07:00 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5B39DA3D; Thu, 25 Dec 2014 17:07:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 470D6241D; Thu, 25 Dec 2014 17:07:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBPH70SL013903; Thu, 25 Dec 2014 17:07:00 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBPH6xnt013898; Thu, 25 Dec 2014 17:06:59 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201412251706.sBPH6xnt013898@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 25 Dec 2014 17:06:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276206 - in head/sys/arm: arm include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Dec 2014 17:07:00 -0000 Author: ian Date: Thu Dec 25 17:06:58 2014 New Revision: 276206 URL: https://svnweb.freebsd.org/changeset/base/276206 Log: For data and instruction prefetch aborts, call the same handler in the C code, passing a 0/1 flag that indicates which type of abort it was. This sets the stage for unifying the handling of page faults in a single routine. Submitted by: Svatopluk Kraus , Michal Meloun Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B00BB6B6; Thu, 25 Dec 2014 17:28:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9A72927CF; Thu, 25 Dec 2014 17:28:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBPHSSab024727; Thu, 25 Dec 2014 17:28:28 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBPHSRil024722; Thu, 25 Dec 2014 17:28:27 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201412251728.sBPHSRil024722@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Thu, 25 Dec 2014 17:28:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276207 - in head/sys: arm/ti boot/fdt/dts/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Dec 2014 17:28:28 -0000 Author: loos Date: Thu Dec 25 17:28:26 2014 New Revision: 276207 URL: https://svnweb.freebsd.org/changeset/base/276207 Log: Add interrupt support for GPIO pins on OMAP4 and AM335x. This enables the use of GPIO pins as interrupt sources for kernel devices directly attached to gpiobus (userland notification will be added soon). The use of gpio interrupts for other kernel devices will be possible when intrng is complete. All GPIO pins can be set to trigger on: - active-low; - active-high; - rising edge; - falling edge. Tested on: Beaglebone-black Modified: head/sys/arm/ti/ti_gpio.c head/sys/arm/ti/ti_gpio.h head/sys/boot/fdt/dts/arm/am335x.dtsi Modified: head/sys/arm/ti/ti_gpio.c ============================================================================== --- head/sys/arm/ti/ti_gpio.c Thu Dec 25 17:06:58 2014 (r276206) +++ head/sys/arm/ti/ti_gpio.c Thu Dec 25 17:28:26 2014 (r276207) @@ -1,6 +1,6 @@ /*- - * Copyright (c) 2011 - * Ben Gray . + * Copyright (c) 2011 Ben Gray . + * Copyright (c) 2014 Luiz Otavio O Souza . * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -26,17 +26,8 @@ */ /** - * Very simple GPIO (general purpose IO) driver module for TI OMAP SoC's. - * - * Currently this driver only does the basics, get a value on a pin & set a - * value on a pin. Hopefully over time I'll expand this to be a bit more generic - * and support interrupts and other various bits on the SoC can do ... in the - * meantime this is all you get. - * - * Beware the OMA datasheet(s) lists GPIO banks 1-6, whereas I've used 0-5 here - * in the code. - * - * + * Beware that the OMAP4 datasheet(s) lists GPIO banks 1-6, whereas the code + * here uses 0-5. */ #include @@ -52,6 +43,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -120,6 +112,8 @@ __FBSDID("$FreeBSD$"); #define TI_GPIO_BANK(p) ((p) / PINS_PER_BANK) #define TI_GPIO_MASK(p) (1U << ((p) % PINS_PER_BANK)) +static struct ti_gpio_softc *ti_gpio_sc = NULL; + static u_int ti_max_gpio_banks(void) { @@ -228,14 +222,14 @@ static struct resource_spec ti_gpio_irq_ /** * Macros for driver mutex locking */ -#define TI_GPIO_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) -#define TI_GPIO_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx) +#define TI_GPIO_LOCK(_sc) mtx_lock_spin(&(_sc)->sc_mtx) +#define TI_GPIO_UNLOCK(_sc) mtx_unlock_spin(&(_sc)->sc_mtx) #define TI_GPIO_LOCK_INIT(_sc) \ - mtx_init(&_sc->sc_mtx, device_get_nameunit(_sc->sc_dev), \ - "ti_gpio", MTX_DEF) -#define TI_GPIO_LOCK_DESTROY(_sc) mtx_destroy(&_sc->sc_mtx) -#define TI_GPIO_ASSERT_LOCKED(_sc) mtx_assert(&_sc->sc_mtx, MA_OWNED) -#define TI_GPIO_ASSERT_UNLOCKED(_sc) mtx_assert(&_sc->sc_mtx, MA_NOTOWNED) + mtx_init(&_sc->sc_mtx, device_get_nameunit((_sc)->sc_dev), \ + "ti_gpio", MTX_SPIN) +#define TI_GPIO_LOCK_DESTROY(_sc) mtx_destroy(&(_sc)->sc_mtx) +#define TI_GPIO_ASSERT_LOCKED(_sc) mtx_assert(&(_sc)->sc_mtx, MA_OWNED) +#define TI_GPIO_ASSERT_UNLOCKED(_sc) mtx_assert(&(_sc)->sc_mtx, MA_NOTOWNED) /** * ti_gpio_read_4 - reads a 32-bit value from one of the GPIO registers @@ -279,6 +273,41 @@ ti_gpio_intr_clr(struct ti_gpio_softc *s ti_gpio_write_4(sc, bank, TI_GPIO_IRQSTATUS_CLR_1, mask); } +static inline void +ti_gpio_intr_set(struct ti_gpio_softc *sc, unsigned int bank, uint32_t mask) +{ + + /* + * On OMAP4 we unmask only the MPU interrupt and on AM335x we + * also activate only the first interrupt. + */ + ti_gpio_write_4(sc, bank, TI_GPIO_IRQSTATUS_SET_0, mask); +} + +static inline void +ti_gpio_intr_ack(struct ti_gpio_softc *sc, unsigned int bank, uint32_t mask) +{ + + /* + * Acknowledge the interrupt on both registers even if we use only + * the first one. + */ + ti_gpio_write_4(sc, bank, TI_GPIO_IRQSTATUS_0, mask); + ti_gpio_write_4(sc, bank, TI_GPIO_IRQSTATUS_1, mask); +} + +static inline uint32_t +ti_gpio_intr_status(struct ti_gpio_softc *sc, unsigned int bank) +{ + uint32_t reg; + + /* Get the status from both registers. */ + reg = ti_gpio_read_4(sc, bank, TI_GPIO_IRQSTATUS_0); + reg |= ti_gpio_read_4(sc, bank, TI_GPIO_IRQSTATUS_1); + + return (reg); +} + /** * ti_gpio_pin_max - Returns the maximum number of GPIO pins * @dev: gpio device handle @@ -575,20 +604,39 @@ ti_gpio_pin_toggle(device_t dev, uint32_ * ti_gpio_intr - ISR for all GPIO modules * @arg: the soft context pointer * - * Unsused - * * LOCKING: * Internally locks the context * */ -static void +static int ti_gpio_intr(void *arg) { - struct ti_gpio_softc *sc = arg; + int bank_last, irq; + struct intr_event *event; + struct ti_gpio_softc *sc; + uint32_t reg; - TI_GPIO_LOCK(sc); - /* TODO: something useful */ - TI_GPIO_UNLOCK(sc); + sc = (struct ti_gpio_softc *)arg; + bank_last = -1; + for (irq = 0; irq < sc->sc_maxpin; irq++) { + + /* Read interrupt status only once for each bank. */ + if (TI_GPIO_BANK(irq) != bank_last) { + reg = ti_gpio_intr_status(sc, TI_GPIO_BANK(irq)); + bank_last = TI_GPIO_BANK(irq); + } + if ((reg & TI_GPIO_MASK(irq)) == 0) + continue; + event = sc->sc_events[irq]; + if (event != NULL && !TAILQ_EMPTY(&event->ie_handlers)) + intr_event_handle(event, NULL); + else + device_printf(sc->sc_dev, "Stray IRQ %d\n", irq); + /* Ack the IRQ Status bit. */ + ti_gpio_intr_ack(sc, TI_GPIO_BANK(irq), TI_GPIO_MASK(irq)); + } + + return (FILTER_HANDLED); } static int @@ -603,13 +651,13 @@ ti_gpio_attach_intr(device_t dev) break; /* - * Register our interrupt handler for each of the IRQ resources. + * Register our interrupt filter for each of the IRQ resources. */ if (bus_setup_intr(dev, sc->sc_irq_res[i], - INTR_TYPE_MISC | INTR_MPSAFE, NULL, ti_gpio_intr, sc, + INTR_TYPE_MISC | INTR_MPSAFE, ti_gpio_intr, NULL, sc, &sc->sc_irq_hdl[i]) != 0) { device_printf(dev, - "WARNING: unable to register interrupt handler\n"); + "WARNING: unable to register interrupt filter\n"); return (-1); } } @@ -623,7 +671,7 @@ ti_gpio_detach_intr(device_t dev) int i; struct ti_gpio_softc *sc; - /* Teardown our interrupt handlers. */ + /* Teardown our interrupt filters. */ sc = device_get_softc(dev); for (i = 0; i < ti_max_gpio_intrs(); i++) { if (sc->sc_irq_res[i] == NULL) @@ -699,7 +747,10 @@ ti_gpio_attach(device_t dev) unsigned int i; int err; - sc = device_get_softc(dev); + if (ti_gpio_sc != NULL) + return (ENXIO); + + ti_gpio_sc = sc = device_get_softc(dev); sc->sc_dev = dev; TI_GPIO_LOCK_INIT(sc); ti_gpio_pin_max(dev, &sc->sc_maxpin); @@ -728,6 +779,24 @@ ti_gpio_attach(device_t dev) return (ENXIO); } + /* + * Initialize the interrupt settings. The default is active-low + * interrupts. + */ + sc->sc_irq_trigger = malloc( + sizeof(*sc->sc_irq_trigger) * sc->sc_maxpin, + M_DEVBUF, M_WAITOK | M_ZERO); + sc->sc_irq_polarity = malloc( + sizeof(*sc->sc_irq_polarity) * sc->sc_maxpin, + M_DEVBUF, M_WAITOK | M_ZERO); + for (i = 0; i < sc->sc_maxpin; i++) { + sc->sc_irq_trigger[i] = INTR_TRIGGER_LEVEL; + sc->sc_irq_polarity[i] = INTR_POLARITY_LOW; + } + + sc->sc_events = malloc(sizeof(struct intr_event *) * sc->sc_maxpin, + M_DEVBUF, M_WAITOK | M_ZERO); + /* We need to go through each block and ensure the clocks are running and * the module is enabled. It might be better to do this only when the * pins are configured which would result in less power used if the GPIO @@ -784,6 +853,10 @@ ti_gpio_detach(device_t dev) bus_generic_detach(dev); + free(sc->sc_events, M_DEVBUF); + free(sc->sc_irq_polarity, M_DEVBUF); + free(sc->sc_irq_trigger, M_DEVBUF); + /* Release the memory and IRQ resources. */ ti_gpio_detach_intr(dev); bus_release_resources(dev, ti_gpio_irq_spec, sc->sc_irq_res); @@ -794,6 +867,193 @@ ti_gpio_detach(device_t dev) return (0); } +static uint32_t +ti_gpio_intr_reg(struct ti_gpio_softc *sc, int irq) +{ + + if (ti_gpio_valid_pin(sc, irq) != 0) + return (0); + + if (sc->sc_irq_trigger[irq] == INTR_TRIGGER_LEVEL) { + if (sc->sc_irq_polarity[irq] == INTR_POLARITY_LOW) + return (TI_GPIO_LEVELDETECT0); + else if (sc->sc_irq_polarity[irq] == INTR_POLARITY_HIGH) + return (TI_GPIO_LEVELDETECT1); + } else if (sc->sc_irq_trigger[irq] == INTR_TRIGGER_EDGE) { + if (sc->sc_irq_polarity[irq] == INTR_POLARITY_LOW) + return (TI_GPIO_FALLINGDETECT); + else if (sc->sc_irq_polarity[irq] == INTR_POLARITY_HIGH) + return (TI_GPIO_RISINGDETECT); + } + + return (0); +} + +static void +ti_gpio_mask_irq(void *source) +{ + int irq; + uint32_t reg, val; + + irq = (int)source; + if (ti_gpio_valid_pin(ti_gpio_sc, irq) != 0) + return; + + TI_GPIO_LOCK(ti_gpio_sc); + ti_gpio_intr_clr(ti_gpio_sc, TI_GPIO_BANK(irq), TI_GPIO_MASK(irq)); + reg = ti_gpio_intr_reg(ti_gpio_sc, irq); + if (reg != 0) { + val = ti_gpio_read_4(ti_gpio_sc, TI_GPIO_BANK(irq), reg); + val &= ~TI_GPIO_MASK(irq); + ti_gpio_write_4(ti_gpio_sc, TI_GPIO_BANK(irq), reg, val); + } + TI_GPIO_UNLOCK(ti_gpio_sc); +} + +static void +ti_gpio_unmask_irq(void *source) +{ + int irq; + uint32_t reg, val; + + irq = (int)source; + if (ti_gpio_valid_pin(ti_gpio_sc, irq) != 0) + return; + + TI_GPIO_LOCK(ti_gpio_sc); + reg = ti_gpio_intr_reg(ti_gpio_sc, irq); + if (reg != 0) { + val = ti_gpio_read_4(ti_gpio_sc, TI_GPIO_BANK(irq), reg); + val |= TI_GPIO_MASK(irq); + ti_gpio_write_4(ti_gpio_sc, TI_GPIO_BANK(irq), reg, val); + ti_gpio_intr_set(ti_gpio_sc, TI_GPIO_BANK(irq), + TI_GPIO_MASK(irq)); + } + TI_GPIO_UNLOCK(ti_gpio_sc); +} + +static int +ti_gpio_activate_resource(device_t dev, device_t child, int type, int rid, + struct resource *res) +{ + int pin; + + if (type != SYS_RES_IRQ) + return (ENXIO); + + /* Unmask the interrupt. */ + pin = rman_get_start(res); + ti_gpio_unmask_irq((void *)(uintptr_t)pin); + + return (0); +} + +static int +ti_gpio_deactivate_resource(device_t dev, device_t child, int type, int rid, + struct resource *res) +{ + int pin; + + if (type != SYS_RES_IRQ) + return (ENXIO); + + /* Mask the interrupt. */ + pin = rman_get_start(res); + ti_gpio_mask_irq((void *)(uintptr_t)pin); + + return (0); +} + +static int +ti_gpio_config_intr(device_t dev, int irq, enum intr_trigger trig, + enum intr_polarity pol) +{ + struct ti_gpio_softc *sc; + uint32_t oldreg, reg, val; + + sc = device_get_softc(dev); + if (ti_gpio_valid_pin(sc, irq) != 0) + return (EINVAL); + + /* There is no standard trigger or polarity. */ + if (trig == INTR_TRIGGER_CONFORM || pol == INTR_POLARITY_CONFORM) + return (EINVAL); + + TI_GPIO_LOCK(sc); + /* + * TRM recommends add the new event before remove the old one to + * avoid losing interrupts. + */ + oldreg = ti_gpio_intr_reg(sc, irq); + sc->sc_irq_trigger[irq] = trig; + sc->sc_irq_polarity[irq] = pol; + reg = ti_gpio_intr_reg(sc, irq); + if (reg != 0) { + /* Apply the new settings. */ + val = ti_gpio_read_4(sc, TI_GPIO_BANK(irq), reg); + val |= TI_GPIO_MASK(irq); + ti_gpio_write_4(sc, TI_GPIO_BANK(irq), reg, val); + } + if (oldreg != 0) { + /* Remove the old settings. */ + val = ti_gpio_read_4(sc, TI_GPIO_BANK(irq), oldreg); + val &= ~TI_GPIO_MASK(irq); + ti_gpio_write_4(sc, TI_GPIO_BANK(irq), oldreg, val); + } + TI_GPIO_UNLOCK(sc); + + return (0); +} + +static int +ti_gpio_setup_intr(device_t dev, device_t child, struct resource *ires, + int flags, driver_filter_t *filt, driver_intr_t *handler, + void *arg, void **cookiep) +{ + struct ti_gpio_softc *sc; + struct intr_event *event; + int pin, error; + + sc = device_get_softc(dev); + pin = rman_get_start(ires); + if (ti_gpio_valid_pin(sc, pin) != 0) + panic("%s: bad pin %d", __func__, pin); + + event = sc->sc_events[pin]; + if (event == NULL) { + error = intr_event_create(&event, (void *)(uintptr_t)pin, 0, + pin, ti_gpio_mask_irq, ti_gpio_unmask_irq, NULL, NULL, + "gpio%d pin%d:", device_get_unit(dev), pin); + if (error != 0) + return (error); + sc->sc_events[pin] = event; + } + intr_event_add_handler(event, device_get_nameunit(child), filt, + handler, arg, intr_priority(flags), flags, cookiep); + + return (0); +} + +static int +ti_gpio_teardown_intr(device_t dev, device_t child, struct resource *ires, + void *cookie) +{ + struct ti_gpio_softc *sc; + int pin, err; + + sc = device_get_softc(dev); + pin = rman_get_start(ires); + if (ti_gpio_valid_pin(sc, pin) != 0) + panic("%s: bad pin %d", __func__, pin); + if (sc->sc_events[pin] == NULL) + panic("Trying to teardown unoccupied IRQ"); + err = intr_event_remove_handler(cookie); + if (!err) + sc->sc_events[pin] = NULL; + + return (err); +} + static phandle_t ti_gpio_get_node(device_t bus, device_t dev) { @@ -816,6 +1076,13 @@ static device_method_t ti_gpio_methods[] DEVMETHOD(gpio_pin_set, ti_gpio_pin_set), DEVMETHOD(gpio_pin_toggle, ti_gpio_pin_toggle), + /* Bus interface */ + DEVMETHOD(bus_activate_resource, ti_gpio_activate_resource), + DEVMETHOD(bus_deactivate_resource, ti_gpio_deactivate_resource), + DEVMETHOD(bus_config_intr, ti_gpio_config_intr), + DEVMETHOD(bus_setup_intr, ti_gpio_setup_intr), + DEVMETHOD(bus_teardown_intr, ti_gpio_teardown_intr), + /* ofw_bus interface */ DEVMETHOD(ofw_bus_get_node, ti_gpio_get_node), Modified: head/sys/arm/ti/ti_gpio.h ============================================================================== --- head/sys/arm/ti/ti_gpio.h Thu Dec 25 17:06:58 2014 (r276206) +++ head/sys/arm/ti/ti_gpio.h Thu Dec 25 17:28:26 2014 (r276207) @@ -46,6 +46,11 @@ */ struct ti_gpio_softc { device_t sc_dev; + + /* Interrupt trigger type and level. */ + enum intr_trigger *sc_irq_trigger; + enum intr_polarity *sc_irq_polarity; + int sc_maxpin; struct mtx sc_mtx; @@ -57,6 +62,9 @@ struct ti_gpio_softc { struct resource *sc_mem_res[MAX_GPIO_BANKS]; struct resource *sc_irq_res[MAX_GPIO_INTRS]; + /* Interrupt events. */ + struct intr_event **sc_events; + /* The handle for the register IRQ handlers. */ void *sc_irq_hdl[MAX_GPIO_INTRS]; }; Modified: head/sys/boot/fdt/dts/arm/am335x.dtsi ============================================================================== --- head/sys/boot/fdt/dts/arm/am335x.dtsi Thu Dec 25 17:06:58 2014 (r276206) +++ head/sys/boot/fdt/dts/arm/am335x.dtsi Thu Dec 25 17:28:26 2014 (r276207) @@ -99,6 +99,8 @@ 0x481AE000 0x1000 >; interrupts = < 96 97 98 99 32 33 62 63 >; interrupt-parent = <&AINTC>; + interrupt-controller; + #interrupt-cells = <1>; }; uart0: serial@44E09000 { From owner-svn-src-all@FreeBSD.ORG Thu Dec 25 17:50:06 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 22E15D8B; Thu, 25 Dec 2014 17:50:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0E9DB2B60; Thu, 25 Dec 2014 17:50:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBPHo5Qq034517; Thu, 25 Dec 2014 17:50:05 GMT (envelope-from phk@FreeBSD.org) Received: (from phk@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBPHo5AW034515; Thu, 25 Dec 2014 17:50:05 GMT (envelope-from phk@FreeBSD.org) Message-Id: <201412251750.sBPHo5AW034515@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: phk set sender to phk@FreeBSD.org using -f From: Poul-Henning Kamp Date: Thu, 25 Dec 2014 17:50:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276208 - in head/sys: amd64/conf conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Dec 2014 17:50:06 -0000 Author: phk Date: Thu Dec 25 17:50:04 2014 New Revision: 276208 URL: https://svnweb.freebsd.org/changeset/base/276208 Log: Use compiled in default keymaps which are available both in syscons and vt. Modified: head/sys/amd64/conf/NOTES head/sys/conf/NOTES Modified: head/sys/amd64/conf/NOTES ============================================================================== --- head/sys/amd64/conf/NOTES Thu Dec 25 17:28:26 2014 (r276207) +++ head/sys/amd64/conf/NOTES Thu Dec 25 17:50:04 2014 (r276208) @@ -215,7 +215,7 @@ hint.atkbd.0.irq="1" # Options for atkbd: options ATKBD_DFLT_KEYMAP # specify the built-in keymap -makeoptions ATKBD_DFLT_KEYMAP=jp.106 +makeoptions ATKBD_DFLT_KEYMAP=fr.dvorak # `flags' for atkbd: # 0x01 Force detection of keyboard, else we always assume a keyboard Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Thu Dec 25 17:28:26 2014 (r276207) +++ head/sys/conf/NOTES Thu Dec 25 17:50:04 2014 (r276208) @@ -2785,7 +2785,7 @@ options U3G_DEBUG # options for ukbd: options UKBD_DFLT_KEYMAP # specify the built-in keymap -makeoptions UKBD_DFLT_KEYMAP=it.iso +makeoptions UKBD_DFLT_KEYMAP=jp.pc98 # options for uplcom: options UPLCOM_INTR_INTERVAL=100 # interrupt pipe interval From owner-svn-src-all@FreeBSD.ORG Thu Dec 25 17:53:44 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 76421EFB; Thu, 25 Dec 2014 17:53:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 625AF2C37; Thu, 25 Dec 2014 17:53:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBPHrigV038392; Thu, 25 Dec 2014 17:53:44 GMT (envelope-from alfred@FreeBSD.org) Received: (from alfred@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBPHri6Q038390; Thu, 25 Dec 2014 17:53:44 GMT (envelope-from alfred@FreeBSD.org) Message-Id: <201412251753.sBPHri6Q038390@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: alfred set sender to alfred@FreeBSD.org using -f From: Alfred Perlstein Date: Thu, 25 Dec 2014 17:53:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276209 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Dec 2014 17:53:44 -0000 Author: alfred Date: Thu Dec 25 17:53:43 2014 New Revision: 276209 URL: https://svnweb.freebsd.org/changeset/base/276209 Log: Fix OLD_LIBS for libxo moved to /lib Pointed out by: kib Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Thu Dec 25 17:50:04 2014 (r276208) +++ head/ObsoleteFiles.inc Thu Dec 25 17:53:43 2014 (r276209) @@ -39,8 +39,7 @@ # done # 20141224: libxo moved to /lib -OLD_FILES+=usr/lib/libxo.a -OLD_FILES+=usr/lib/libxo_p.a +OLD_LIBS+=usr/lib/libxo.so.0 # 20141223: remove in6_gif.h, in_gif.h and if_stf.h OLD_FILES+=usr/include/net/if_stf.h OLD_FILES+=usr/include/netinet/in_gif.h From owner-svn-src-all@FreeBSD.ORG Thu Dec 25 17:54:23 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A07CBBD; Thu, 25 Dec 2014 17:54:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8CECD2C61; Thu, 25 Dec 2014 17:54:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBPHsNKQ038530; Thu, 25 Dec 2014 17:54:23 GMT (envelope-from phk@FreeBSD.org) Received: (from phk@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBPHsNVw038529; Thu, 25 Dec 2014 17:54:23 GMT (envelope-from phk@FreeBSD.org) Message-Id: <201412251754.sBPHsNVw038529@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: phk set sender to phk@FreeBSD.org using -f From: Poul-Henning Kamp Date: Thu, 25 Dec 2014 17:54:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276210 - head/tools/tools/sysbuild X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Dec 2014 17:54:23 -0000 Author: phk Date: Thu Dec 25 17:54:22 2014 New Revision: 276210 URL: https://svnweb.freebsd.org/changeset/base/276210 Log: Create the PKG_DIR if it is missing Modified: head/tools/tools/sysbuild/sysbuild.sh Modified: head/tools/tools/sysbuild/sysbuild.sh ============================================================================== --- head/tools/tools/sysbuild/sysbuild.sh Thu Dec 25 17:53:43 2014 (r276209) +++ head/tools/tools/sysbuild/sysbuild.sh Thu Dec 25 17:54:22 2014 (r276210) @@ -219,6 +219,10 @@ ports_build() ( ports_recurse . $PORTS_WE_WANT + if [ "x${PKG_DIR}" != "x" ] ; then + mkdir -p ${PKG_DIR} + fi + # Now build & install them for p in `cat /tmp/_.plist` do @@ -231,9 +235,7 @@ ports_build() ( ( cd $p - make clean ${PORTS_OPTS} - make all ${PORTS_OPTS} - make install ${PORTS_OPTS} + make clean all install ${PORTS_OPTS} ) > _.$b 2>&1 < /dev/null continue fi From owner-svn-src-all@FreeBSD.ORG Thu Dec 25 18:44:08 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 28DB37BA; Thu, 25 Dec 2014 18:44:08 +0000 (UTC) Received: from mx1.stack.nl (relay02.stack.nl [IPv6:2001:610:1108:5010::104]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mailhost.stack.nl", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id CB65F12FA; Thu, 25 Dec 2014 18:44:07 +0000 (UTC) Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mx1.stack.nl (Postfix) with ESMTP id BF76F35930A; Thu, 25 Dec 2014 19:44:04 +0100 (CET) Received: by snail.stack.nl (Postfix, from userid 1677) id 964AB28494; Thu, 25 Dec 2014 19:44:04 +0100 (CET) Date: Thu, 25 Dec 2014 19:44:04 +0100 From: Jilles Tjoelker To: "Andrey V. Elsukov" Subject: Re: svn commit: r276148 - in head: . sys/net sys/netinet sys/netinet6 Message-ID: <20141225184404.GA28866@stack.nl> References: <201412231617.sBNGHcfe010367@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201412231617.sBNGHcfe010367@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Dec 2014 18:44:08 -0000 On Tue, Dec 23, 2014 at 04:17:38PM +0000, Andrey V. Elsukov wrote: > Author: ae > Date: Tue Dec 23 16:17:37 2014 > New Revision: 276148 > URL: https://svnweb.freebsd.org/changeset/base/276148 > Log: > Remove in_gif.h and in6_gif.h files. They only contain function > declarations used by gif(4). Instead declare these functions in C files. > Also make some variables static. Although making things static where possible is good, moving extern declarations to C files adds duplication and loses compile-time checking that the functions' calls match their definitions (output/encapcheck/attach). > [snip] > Modified: head/sys/net/if_gif.c > ============================================================================== > --- head/sys/net/if_gif.c Tue Dec 23 16:00:25 2014 (r276147) > +++ head/sys/net/if_gif.c Tue Dec 23 16:17:37 2014 (r276148) > @@ -72,7 +72,6 @@ __FBSDID("$FreeBSD$"); > #include > #ifdef INET > #include > -#include > #include > #endif /* INET */ > > @@ -85,7 +84,6 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > -#include > #include > #endif /* INET6 */ > > @@ -120,6 +118,16 @@ void (*ng_gif_input_orphan_p)(struct ifn > void (*ng_gif_attach_p)(struct ifnet *ifp); > void (*ng_gif_detach_p)(struct ifnet *ifp); > > +#ifdef INET > +extern int in_gif_output(struct ifnet *, struct mbuf *, int, uint8_t); > +extern int in_gif_encapcheck(const struct mbuf *, int, int, void *); > +extern int in_gif_attach(struct gif_softc *); > +#endif > +#ifdef INET6 > +extern int in6_gif_output(struct ifnet *, struct mbuf *, int, uint8_t); > +extern int in6_gif_encapcheck(const struct mbuf *, int, int, void *); > +extern int in6_gif_attach(struct gif_softc *); > +#endif > static int gif_set_tunnel(struct ifnet *, struct sockaddr *, > struct sockaddr *); > static void gif_delete_tunnel(struct ifnet *); > > Modified: head/sys/netinet/in_gif.c > ============================================================================== > --- head/sys/netinet/in_gif.c Tue Dec 23 16:00:25 2014 (r276147) > +++ head/sys/netinet/in_gif.c Tue Dec 23 16:17:37 2014 (r276148) > @@ -57,7 +57,6 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > -#include > #include > #include > #include > @@ -68,11 +67,16 @@ __FBSDID("$FreeBSD$"); > > #include > > +int in_gif_output(struct ifnet *, struct mbuf *, int, uint8_t); > +int in_gif_encapcheck(const struct mbuf *, int, int, void *); > +int in_gif_attach(struct gif_softc *); > + > static int gif_validate4(const struct ip *, struct gif_softc *, > struct ifnet *); > +static int in_gif_input(struct mbuf **, int *, int); > > extern struct domain inetdomain; > -struct protosw in_gif_protosw = { > +static struct protosw in_gif_protosw = { > .pr_type = SOCK_RAW, > .pr_domain = &inetdomain, > .pr_protocol = 0/* IPPROTO_IPV[46] */, > @@ -83,7 +87,8 @@ struct protosw in_gif_protosw = { > .pr_usrreqs = &rip_usrreqs > }; > > -VNET_DEFINE(int, ip_gif_ttl) = GIF_TTL; > +#define GIF_TTL 30 > +static VNET_DEFINE(int, ip_gif_ttl) = GIF_TTL; > #define V_ip_gif_ttl VNET(ip_gif_ttl) > SYSCTL_INT(_net_inet_ip, IPCTL_GIF_TTL, gifttl, CTLFLAG_VNET | CTLFLAG_RW, > &VNET_NAME(ip_gif_ttl), 0, ""); > @@ -133,7 +138,7 @@ in_gif_output(struct ifnet *ifp, struct > return (ip_output(m, NULL, NULL, 0, NULL, NULL)); > } > > -int > +static int > in_gif_input(struct mbuf **mp, int *offp, int proto) > { > struct mbuf *m = *mp; > > Modified: head/sys/netinet6/in6_gif.c > ============================================================================== > --- head/sys/netinet6/in6_gif.c Tue Dec 23 16:00:25 2014 (r276147) > +++ head/sys/netinet6/in6_gif.c Tue Dec 23 16:17:37 2014 (r276148) > @@ -64,7 +64,6 @@ __FBSDID("$FreeBSD$"); > #ifdef INET6 > #include > #include > -#include > #include > #endif > #include > @@ -74,18 +73,24 @@ __FBSDID("$FreeBSD$"); > > #include > > -VNET_DEFINE(int, ip6_gif_hlim) = GIF_HLIM; > +#define GIF_HLIM 30 > +static VNET_DEFINE(int, ip6_gif_hlim) = GIF_HLIM; > #define V_ip6_gif_hlim VNET(ip6_gif_hlim) > > SYSCTL_DECL(_net_inet6_ip6); > SYSCTL_INT(_net_inet6_ip6, IPV6CTL_GIF_HLIM, gifhlim, CTLFLAG_VNET | CTLFLAG_RW, > &VNET_NAME(ip6_gif_hlim), 0, ""); > > +int in6_gif_output(struct ifnet *, struct mbuf *, int, uint8_t); > +int in6_gif_encapcheck(const struct mbuf *, int, int, void *); > +int in6_gif_attach(struct gif_softc *); > + > static int gif_validate6(const struct ip6_hdr *, struct gif_softc *, > struct ifnet *); > +static int in6_gif_input(struct mbuf **, int *, int); > > extern struct domain inet6domain; > -struct protosw in6_gif_protosw = { > +static struct protosw in6_gif_protosw = { > .pr_type = SOCK_RAW, > .pr_domain = &inet6domain, > .pr_protocol = 0, /* IPPROTO_IPV[46] */ > @@ -144,7 +149,7 @@ in6_gif_output(struct ifnet *ifp, struct > return (ip6_output(m, 0, NULL, IPV6_MINMTU, 0, NULL, NULL)); > } > > -int > +static int > in6_gif_input(struct mbuf **mp, int *offp, int proto) > { > struct mbuf *m = *mp; -- Jilles Tjoelker From owner-svn-src-all@FreeBSD.ORG Thu Dec 25 19:08:41 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 07B57DD3; Thu, 25 Dec 2014 19:08:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E84101687; Thu, 25 Dec 2014 19:08:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBPJ8euk079940; Thu, 25 Dec 2014 19:08:40 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBPJ8ej0079939; Thu, 25 Dec 2014 19:08:40 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201412251908.sBPJ8ej0079939@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 25 Dec 2014 19:08:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276212 - head/sys/arm/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Dec 2014 19:08:41 -0000 Author: ian Date: Thu Dec 25 19:08:39 2014 New Revision: 276212 URL: https://svnweb.freebsd.org/changeset/base/276212 Log: Add macros for asm barrier instructions with arch-specific implementations. Modified: head/sys/arm/include/asm.h Modified: head/sys/arm/include/asm.h ============================================================================== --- head/sys/arm/include/asm.h Thu Dec 25 18:22:22 2014 (r276211) +++ head/sys/arm/include/asm.h Thu Dec 25 19:08:39 2014 (r276212) @@ -39,6 +39,7 @@ #ifndef _MACHINE_ASM_H_ #define _MACHINE_ASM_H_ #include +#include #define _C_LABEL(x) x #define _ASM_LABEL(x) x @@ -221,4 +222,18 @@ # define RETc(c) mov##c pc, lr #endif +#if __ARM_ARCH >= 7 +#define ISB isb +#define DSB dsb +#define DMB dmb +#elif __ARM_ARCH == 6 +#define ISB mcr CP15_CP15ISB +#define DSB mcr CP15_CP15DSB +#define DMB mcr CP15_CP15DMB +#else +#define ISB mcr CP15_CP15ISB +#define DSB mcr CP15_CP15DSB /* DSB and DMB are the */ +#define DMB mcr CP15_CP15DSB /* same prior to v6.*/ +#endif + #endif /* !_MACHINE_ASM_H_ */ From owner-svn-src-all@FreeBSD.ORG Thu Dec 25 19:22:03 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6526D1D9; Thu, 25 Dec 2014 19:22:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 512526456A; Thu, 25 Dec 2014 19:22:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBPJM3Q1088816; Thu, 25 Dec 2014 19:22:03 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBPJM3Kp088815; Thu, 25 Dec 2014 19:22:03 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201412251922.sBPJM3Kp088815@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 25 Dec 2014 19:22:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276213 - head/sys/arm/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Dec 2014 19:22:03 -0000 Author: ian Date: Thu Dec 25 19:22:02 2014 New Revision: 276213 URL: https://svnweb.freebsd.org/changeset/base/276213 Log: Define only the CP15 register operations that are valid for the architecture. Submitted by: Svatopluk Kraus , Michal Meloun = 6 /* From ARMv6: */ #define CP15_IFSR(rr) p15, 0, rr, c5, c0, 1 /* Instruction Fault Status Register */ +#endif +#if __ARM_ARCH >= 7 /* From ARMv7: */ #define CP15_ADFSR(rr) p15, 0, rr, c5, c1, 0 /* Auxiliary Data Fault Status Register */ #define CP15_AIFSR(rr) p15, 0, rr, c5, c1, 1 /* Auxiliary Instruction Fault Status Register */ #endif - /* * CP15 C6 registers */ @@ -118,7 +119,7 @@ /* * CP15 C7 registers */ -#if __ARM_ARCH >= 6 +#if __ARM_ARCH >= 7 && defined(SMP) /* From ARMv7: */ #define CP15_ICIALLUIS p15, 0, r0, c7, c1, 0 /* Instruction cache invalidate all PoU, IS */ #define CP15_BPIALLIS p15, 0, r0, c7, c1, 6 /* Branch predictor invalidate all IS */ @@ -128,14 +129,14 @@ #define CP15_ICIALLU p15, 0, r0, c7, c5, 0 /* Instruction cache invalidate all PoU */ #define CP15_ICIMVAU(rr) p15, 0, rr, c7, c5, 1 /* Instruction cache invalidate */ -#if __ARM_ARCH >= 6 +#if __ARM_ARCH == 6 /* Deprecated in ARMv7 */ #define CP15_CP15ISB p15, 0, r0, c7, c5, 4 /* ISB */ #endif #define CP15_BPIALL p15, 0, r0, c7, c5, 6 /* Branch predictor invalidate all */ #define CP15_BPIMVA p15, 0, rr, c7, c5, 7 /* Branch predictor invalidate by MVA */ -#if __ARM_ARCH >= 6 +#if __ARM_ARCH == 6 /* Only ARMv6: */ #define CP15_DCIALL p15, 0, r0, c7, c6, 0 /* Data cache invalidate all */ #endif @@ -147,7 +148,7 @@ #define CP15_ATS1CUR(rr) p15, 0, rr, c7, c8, 2 /* Stage 1 Current state unprivileged read */ #define CP15_ATS1CUW(rr) p15, 0, rr, c7, c8, 3 /* Stage 1 Current state unprivileged write */ -#if __ARM_ARCH >= 6 +#if __ARM_ARCH >= 7 /* From ARMv7: */ #define CP15_ATS12NSOPR(rr) p15, 0, rr, c7, c8, 4 /* Stages 1 and 2 Non-secure only PL1 read */ #define CP15_ATS12NSOPW(rr) p15, 0, rr, c7, c8, 5 /* Stages 1 and 2 Non-secure only PL1 write */ @@ -155,24 +156,24 @@ #define CP15_ATS12NSOUW(rr) p15, 0, rr, c7, c8, 7 /* Stages 1 and 2 Non-secure only unprivileged write */ #endif -#if __ARM_ARCH >= 6 +#if __ARM_ARCH == 6 /* Only ARMv6: */ #define CP15_DCCALL p15, 0, r0, c7, c10, 0 /* Data cache clean all */ #endif #define CP15_DCCMVAC(rr) p15, 0, rr, c7, c10, 1 /* Data cache clean by MVA PoC */ #define CP15_DCCSW(rr) p15, 0, rr, c7, c10, 2 /* Data cache clean by set/way */ -#if __ARM_ARCH >= 6 +#if __ARM_ARCH == 6 /* Only ARMv6: */ #define CP15_CP15DSB p15, 0, r0, c7, c10, 4 /* DSB */ #define CP15_CP15DMB p15, 0, r0, c7, c10, 5 /* DMB */ #endif -#if __ARM_ARCH >= 6 +#if __ARM_ARCH >= 7 /* From ARMv7: */ #define CP15_DCCMVAU(rr) p15, 0, rr, c7, c11, 1 /* Data cache clean by MVA PoU */ #endif -#if __ARM_ARCH >= 6 +#if __ARM_ARCH == 6 /* Only ARMv6: */ #define CP15_DCCIALL p15, 0, r0, c7, c14, 0 /* Data cache clean and invalidate all */ #endif @@ -182,7 +183,7 @@ /* * CP15 C8 registers */ -#if __ARM_ARCH >= 6 +#if __ARM_ARCH >= 7 && defined(SMP) /* From ARMv7: */ #define CP15_TLBIALLIS p15, 0, r0, c8, c3, 0 /* Invalidate entire unified TLB IS */ #define CP15_TLBIMVAIS(rr) p15, 0, rr, c8, c3, 1 /* Invalidate unified TLB by MVA IS */ @@ -229,4 +230,9 @@ #define CP15_TPIDRURO(rr) p15, 0, rr, c13, c0, 3 /* User Read-Only Thread ID Register */ #define CP15_TPIDRPRW(rr) p15, 0, rr, c13, c0, 4 /* PL1 only Thread ID Register */ +/* + * CP15 C15 registers + */ +#define CP15_CBAR(rr) p15, 4, rr, c15, c0, 0 /* Configuration Base Address Register */ + #endif /* !MACHINE_SYSREG_H */ From owner-svn-src-all@FreeBSD.ORG Thu Dec 25 20:07:24 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8265DAC0; Thu, 25 Dec 2014 20:07:24 +0000 (UTC) Received: from mail-pd0-x233.google.com (mail-pd0-x233.google.com [IPv6:2607:f8b0:400e:c02::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B75B64CA1; Thu, 25 Dec 2014 20:07:24 +0000 (UTC) Received: by mail-pd0-f179.google.com with SMTP id fp1so11994342pdb.38; Thu, 25 Dec 2014 12:07:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=references:mime-version:in-reply-to:content-type :content-transfer-encoding:message-id:cc:from:subject:date:to; bh=QhJ4KtiV7uT2a5ICIFZoHxdHn7zjbD+SkTCfo6v7rAI=; b=xdHkYUhkddJHuicwtCans5gwILuWQ23RZSoEB2pRGyWCD0KlAuFcWe/dL0V0pPpob7 AkzogzqlgzV/iegCatsXl8DjjzBVZkcoImN3iDTxtrAXK0R7PMLPbP1Vem2756aZSfX0 wmKmvLPteAShqbSQQnb9cajHebLhlLYv0f5esOkTPZ4DSvJbf7bkZGjJKnk3eZvBolc4 A1A5YcnmjF2jUgsEH2fAZ4tPADDfqMvnnEgoPWEaDkXT/QOGv/nkc8VXQZORa5RYS12N HzGS+7m3WbbqUqjnpn01xKzl3ftYaWhxNKdNHNJquMHUa9lha+1t0Xks1ECF+zg2thsY 6/yg== X-Received: by 10.70.129.207 with SMTP id ny15mr62948921pdb.152.1419538043934; Thu, 25 Dec 2014 12:07:23 -0800 (PST) Received: from [10.52.218.68] (mobile-166-171-248-034.mycingular.net. [166.171.248.34]) by mx.google.com with ESMTPSA id sb7sm26106231pbc.54.2014.12.25.12.07.22 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 25 Dec 2014 12:07:23 -0800 (PST) References: <201412250315.sBP3FvS6025641@svn.freebsd.org> <8F2C5A52-365F-4AE9-B60F-78CE7122F5B7@gmail.com> <549B8AD4.40703@freebsd.org> <20141225102113.GE1754@kib.kiev.ua> Mime-Version: 1.0 (1.0) In-Reply-To: <20141225102113.GE1754@kib.kiev.ua> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: X-Mailer: iPhone Mail (12B440) From: Garrett Cooper Subject: Re: svn commit: r276195 - in head: . lib/libxo Date: Thu, 25 Dec 2014 12:07:15 -0800 To: Konstantin Belousov Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , Alfred Perlstein , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Dec 2014 20:07:24 -0000 > On Dec 25, 2014, at 02:21, Konstantin Belousov wrote: > >> On Wed, Dec 24, 2014 at 11:04:01PM -0800, Garrett Cooper wrote: >> >>> On Dec 24, 2014, at 19:56, Alfred Perlstein wrote: >>> >>> >>> On 12/24/14 7:36 PM, Garrett Cooper wrote: ... >> There isn't a leftover versioned .so in /usr/lib ? > usr/lib/libxo.so.0 (without leading slash) must go into OLD_LIBS. > It is all explained in the first paragraph of the file comment. +1 to what kib said :).. From owner-svn-src-all@FreeBSD.ORG Thu Dec 25 20:15:16 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6054AE3F; Thu, 25 Dec 2014 20:15:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4ADF264DF2; Thu, 25 Dec 2014 20:15:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBPKFGQI012588; Thu, 25 Dec 2014 20:15:16 GMT (envelope-from phk@FreeBSD.org) Received: (from phk@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBPKFEUI012580; Thu, 25 Dec 2014 20:15:14 GMT (envelope-from phk@FreeBSD.org) Message-Id: <201412252015.sBPKFEUI012580@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: phk set sender to phk@FreeBSD.org using -f From: Poul-Henning Kamp Date: Thu, 25 Dec 2014 20:15:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276214 - in head: . include lib share/man/man4 share/mk sys/conf sys/dev/ieee488 tools/build/mk tools/build/options X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Dec 2014 20:15:16 -0000 Author: phk Date: Thu Dec 25 20:15:13 2014 New Revision: 276214 URL: https://svnweb.freebsd.org/changeset/base/276214 Log: Deorbit the IEEE-488/GPIB support. Deleted: head/share/man/man4/gpib.4 head/share/man/man4/pcii.4 head/share/man/man4/tnt4882.4 head/sys/dev/ieee488/ibfoo.c head/sys/dev/ieee488/ibfoo_int.h head/sys/dev/ieee488/pcii.c head/sys/dev/ieee488/tnt4882.c head/sys/dev/ieee488/tnt4882.h head/sys/dev/ieee488/ugpib.h head/sys/dev/ieee488/upd7210.c head/sys/dev/ieee488/upd7210.h head/tools/build/options/WITHOUT_GPIB Modified: head/ObsoleteFiles.inc head/include/Makefile head/lib/Makefile head/share/man/man4/Makefile head/share/mk/src.opts.mk head/sys/conf/NOTES head/sys/conf/files head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Thu Dec 25 19:22:02 2014 (r276213) +++ head/ObsoleteFiles.inc Thu Dec 25 20:15:13 2014 (r276214) @@ -38,6 +38,29 @@ # xargs -n1 | sort | uniq -d; # done +# 20141226: Remove gpib/ieee488 +OLD_FILES+=usr/include/dev/ieee488/ibfoo_int.h +OLD_FILES+=usr/include/dev/ieee488/tnt4882.h +OLD_FILES+=usr/include/dev/ieee488/ugpib.h +OLD_FILES+=usr/include/dev/ieee488/upd7210.h +OLD_DIRS+=usr/include/dev/ieee488 +OLD_FILES+=usr/include/gpib/gpib.h +OLD_DIRS+=usr/include/gpib +OLD_FILES+=usr/lib/libgpib.a +OLD_FILES+=usr/lib/libgpib_p.a +OLD_FILES+=usr/lib/libgpib.so +OLD_LIBS+=usr/lib/libgpib.so.3 +OLD_FILES+=usr/lib/libgpib_p.a +OLD_FILES+=share/man/man4/pcii.4.gz +OLD_FILES+=share/man/man4/gpib.4.gz +OLD_FILES+=share/man/man4/tnt4882.4.gz +.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "powerpc64" +OLD_FILES+=usr/lib32/libgpib.a +OLD_FILES+=usr/lib32/libgpib_p.a +OLD_FILES+=usr/lib32/libgpib.so +OLD_LIBS+=usr/lib32/libgpib.so.3 +.endif + # 20141224: libxo moved to /lib OLD_LIBS+=usr/lib/libxo.so.0 # 20141223: remove in6_gif.h, in_gif.h and if_stf.h Modified: head/include/Makefile ============================================================================== --- head/include/Makefile Thu Dec 25 19:22:02 2014 (r276213) +++ head/include/Makefile Thu Dec 25 20:15:13 2014 (r276214) @@ -42,7 +42,7 @@ LDIRS= bsm cam geom net net80211 netgrap LSUBDIRS= cam/ata cam/scsi \ dev/acpica dev/agp dev/an dev/bktr dev/ciss dev/filemon dev/firewire \ dev/hwpmc \ - dev/ic dev/iicbus ${_dev_ieee488} dev/io dev/lmc dev/mfi dev/nvme \ + dev/ic dev/iicbus dev/io dev/lmc dev/mfi dev/nvme \ dev/ofw dev/pbio dev/pci ${_dev_powermac_nvram} dev/ppbus dev/smbus \ dev/speaker dev/usb dev/utopia dev/vkbd dev/wi \ fs/cuse \ @@ -63,10 +63,6 @@ LSUBSUBDIRS= dev/mpt/mpilib _dev_powermac_nvram= dev/powermac_nvram .endif -.if ${MK_GPIB} != "no" -_dev_ieee488= dev/ieee488 -.endif - .if ${MK_GSSAPI} != "no" SUBDIR+= gssapi INCS+= gssapi.h Modified: head/lib/Makefile ============================================================================== --- head/lib/Makefile Thu Dec 25 19:22:02 2014 (r276213) +++ head/lib/Makefile Thu Dec 25 20:15:13 2014 (r276214) @@ -52,7 +52,6 @@ SUBDIR= ${SUBDIR_ORDERED} \ libfetch \ libfigpar \ libgeom \ - ${_libgpib} \ libgpio \ ${_libgssapi} \ ${_librpcsec_gss} \ @@ -195,10 +194,6 @@ _cuse= libcuse _libelftc= libelftc .endif -.if ${MK_GPIB} != "no" -_libgpib= libgpib -.endif - .if ${MK_GSSAPI} != "no" _libgssapi= libgssapi _librpcsec_gss= librpcsec_gss Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Thu Dec 25 19:22:02 2014 (r276213) +++ head/share/man/man4/Makefile Thu Dec 25 20:15:13 2014 (r276214) @@ -156,7 +156,6 @@ MAN= aac.4 \ geom_uncompress.4 \ geom_uzip.4 \ gif.4 \ - gpib.4 \ gpio.4 \ gpioiic.4 \ gpioled.4 \ @@ -372,7 +371,6 @@ MAN= aac.4 \ pci.4 \ pcib.4 \ pcic.4 \ - pcii.4 \ pcm.4 \ pcn.4 \ ${_pf.4} \ @@ -495,7 +493,6 @@ MAN= aac.4 \ ti.4 \ timecounters.4 \ tl.4 \ - tnt4882.4 \ ${_tpm.4} \ trm.4 \ tty.4 \ Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Thu Dec 25 19:22:02 2014 (r276213) +++ head/share/mk/src.opts.mk Thu Dec 25 20:15:13 2014 (r276214) @@ -85,7 +85,6 @@ __DEFAULT_YES_OPTIONS = \ GDB \ GNU \ GNU_GREP_COMPAT \ - GPIB \ GPIO \ GPL_DTC \ GROFF \ Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Thu Dec 25 19:22:02 2014 (r276213) +++ head/sys/conf/NOTES Thu Dec 25 20:15:13 2014 (r276214) @@ -2354,19 +2354,6 @@ options SND_PCM_64 options SND_OLDSTEREO # -# IEEE-488 hardware: -# pcii: PCIIA cards (uPD7210 based isa cards) -# tnt4882: National Instruments PCI-GPIB card. - -device pcii -hint.pcii.0.at="isa" -hint.pcii.0.port="0x2e1" -hint.pcii.0.irq="5" -hint.pcii.0.drq="1" - -device tnt4882 - -# # Miscellaneous hardware: # # scd: Sony CD-ROM using proprietary (non-ATAPI) interface Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Thu Dec 25 19:22:02 2014 (r276213) +++ head/sys/conf/files Thu Dec 25 20:15:13 2014 (r276214) @@ -1448,10 +1448,6 @@ dev/ida/ida_eisa.c optional ida eisa dev/ida/ida_pci.c optional ida pci dev/ie/if_ie.c optional ie isa nowerror dev/ie/if_ie_isa.c optional ie isa -dev/ieee488/ibfoo.c optional pcii | tnt4882 -dev/ieee488/pcii.c optional pcii -dev/ieee488/tnt4882.c optional tnt4882 -dev/ieee488/upd7210.c optional pcii | tnt4882 dev/iicbus/ad7418.c optional ad7418 dev/iicbus/ds133x.c optional ds133x dev/iicbus/ds1374.c optional ds1374 Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Thu Dec 25 19:22:02 2014 (r276213) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Thu Dec 25 20:15:13 2014 (r276214) @@ -1331,26 +1331,6 @@ OLD_FILES+=usr/share/man/man1/gdbserver. OLD_FILES+=usr/share/man/man1/kgdb.1.gz .endif -.if ${MK_GPIB} == no -OLD_FILES+=usr/include/dev/ieee488/ibfoo_int.h -OLD_FILES+=usr/include/dev/ieee488/tnt4882.h -OLD_FILES+=usr/include/dev/ieee488/ugpib.h -OLD_FILES+=usr/include/dev/ieee488/upd7210.h -OLD_DIRS+=usr/include/dev/ieee488 -OLD_FILES+=usr/include/gpib/gpib.h -OLD_DIRS+=usr/include/gpib -OLD_FILES+=usr/lib/libgpib.a -OLD_FILES+=usr/lib/libgpib.so -OLD_LIBS+=usr/lib/libgpib.so.3 -OLD_FILES+=usr/lib/libgpib_p.a -.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "powerpc64" -OLD_FILES+=usr/lib32/libgpib.a -OLD_FILES+=usr/lib32/libgpib.so -OLD_LIBS+=usr/lib32/libgpib.so.3 -OLD_FILES+=usr/lib32/libgpib_p.a -.endif -.endif - .if ${MK_GPIO} == no OLD_FILES+=usr/sbin/gpioctl OLD_FILES+=usr/share/man/man8/gpioctl.8.gz @@ -3703,7 +3683,6 @@ OLD_FILES+=usr/lib/libformw_p.a OLD_FILES+=usr/lib/libgcc_p.a OLD_FILES+=usr/lib/libgeom_p.a OLD_FILES+=usr/lib/libgnuregex_p.a -OLD_FILES+=usr/lib/libgpib_p.a OLD_FILES+=usr/lib/libgssapi_krb5_p.a OLD_FILES+=usr/lib/libgssapi_p.a OLD_FILES+=usr/lib/libhdb_p.a From owner-svn-src-all@FreeBSD.ORG Thu Dec 25 20:27:21 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 66D47E5; Thu, 25 Dec 2014 20:27:21 +0000 (UTC) Received: from elvis.mu.org (elvis.mu.org [IPv6:2001:470:1f05:b76::196]) by mx1.freebsd.org (Postfix) with ESMTP id 4EF4B64F36; Thu, 25 Dec 2014 20:27:21 +0000 (UTC) Received: from AlfredMacbookAir.local (c-76-21-10-192.hsd1.ca.comcast.net [76.21.10.192]) by elvis.mu.org (Postfix) with ESMTPSA id BE890341F858; Thu, 25 Dec 2014 12:27:20 -0800 (PST) Message-ID: <549C732A.8000806@freebsd.org> Date: Thu, 25 Dec 2014 12:27:22 -0800 From: Alfred Perlstein Organization: FreeBSD User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Garrett Cooper , Konstantin Belousov Subject: Re: svn commit: r276195 - in head: . lib/libxo References: <201412250315.sBP3FvS6025641@svn.freebsd.org> <8F2C5A52-365F-4AE9-B60F-78CE7122F5B7@gmail.com> <549B8AD4.40703@freebsd.org> <20141225102113.GE1754@kib.kiev.ua> In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Dec 2014 20:27:21 -0000 On 12/25/14 12:07 PM, Garrett Cooper wrote: >> On Dec 25, 2014, at 02:21, Konstantin Belousov wrote: >> >>> On Wed, Dec 24, 2014 at 11:04:01PM -0800, Garrett Cooper wrote: >>> >>>> On Dec 24, 2014, at 19:56, Alfred Perlstein wrote: >>>> >>>> >>>> On 12/24/14 7:36 PM, Garrett Cooper wrote: > ... > >>> There isn't a leftover versioned .so in /usr/lib ? >> usr/lib/libxo.so.0 (without leading slash) must go into OLD_LIBS. >> It is all explained in the first paragraph of the file comment. > +1 to what kib said :).. > I *think* i fixed it, but tbh the docs in that file make very little sense to the layperson. The suggested sanity scripts should be either make(1) targets, or perhaps scripts in /usr/share to run, not inline comments. Having a "make sanity-obsolete" would be nice. -Alfred From owner-svn-src-all@FreeBSD.ORG Thu Dec 25 21:17:56 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 63F89D64 for ; Thu, 25 Dec 2014 21:17:56 +0000 (UTC) Received: from mail-qc0-f171.google.com (mail-qc0-f171.google.com [209.85.216.171]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 22A953491 for ; Thu, 25 Dec 2014 21:17:55 +0000 (UTC) Received: by mail-qc0-f171.google.com with SMTP id r5so6819341qcx.2 for ; Thu, 25 Dec 2014 13:17:49 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=FrDFeI9AsxgBKMjRZlY9m8NxRIzRDGbZWd3onUOSQcU=; b=lbXms9kBADo9q2EQnhwdelyMgmzjCrlxXdvebsCbgcSXntZYy0vjfHEg5nsLlcB6G4 8zegK4lGKJYigr8Nuk2BHgOar2Ce9XzKQdZnJ1ctH6tE32tqz/Sbr5Fz0OLJ4yw7Nqj/ /CF543eR8L2cahJcB0dsq21P7oqhZQb7MX+zsQKyyi7/mtcKNSUiCxAz8ngu8pII51kZ 096d/qIVvOH8Onxq/0+iEuLWjeEBp/cBQuVnZfY+zzQwcI2RyRKaLKn3fhlSCtUx/n3W qoIqJHYAgKf8XaKsfJQaGrrAkliWMk2eyh+evP8y0rxJr4QX+5+Ev8NpS84w5fgjXTsZ qQsw== X-Gm-Message-State: ALoCoQlQUtFXmlFmEPfbkQWqvu8UKFxjynfL+n1Ox3HXdTLrFyJ3CWyiQ4SF32VfV9rNbW1wN57A MIME-Version: 1.0 X-Received: by 10.224.14.66 with SMTP id f2mr54031664qaa.81.1419541840728; Thu, 25 Dec 2014 13:10:40 -0800 (PST) Received: by 10.140.88.103 with HTTP; Thu, 25 Dec 2014 13:10:40 -0800 (PST) In-Reply-To: <201412230931.sBN9VPMK017968@svn.freebsd.org> References: <201412230931.sBN9VPMK017968@svn.freebsd.org> Date: Thu, 25 Dec 2014 15:10:40 -0600 Message-ID: Subject: Re: svn commit: r276123 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs From: Will Andrews To: Steven Hartland Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Dec 2014 21:17:56 -0000 Why was the original condition there? It may not be documented in a commenf, but presumably there is a reason. Did you ask the original author of the code in question? --Will. On Tuesday, December 23, 2014, Steven Hartland wrote: > Author: smh > Date: Tue Dec 23 09:31:24 2014 > New Revision: 276123 > URL: https://svnweb.freebsd.org/changeset/base/276123 > > Log: > Always sync the global ZFS config cache to reflect the new mosconfig > > This fixes out of date zpool.cache for root pools, which can cause issues > such as confusion of zdb etc. > > MFC after: 1 month > > Modified: > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_config.c > > Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_config.c > > ============================================================================== > --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_config.c > Tue Dec 23 08:51:30 2014 (r276122) > +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_config.c > Tue Dec 23 09:31:24 2014 (r276123) > @@ -536,8 +536,7 @@ spa_config_update(spa_t *spa, int what) > /* > * Update the global config cache to reflect the new mosconfig. > */ > - if (!spa->spa_is_root) > - spa_config_sync(spa, B_FALSE, what != > SPA_CONFIG_UPDATE_POOL); > + spa_config_sync(spa, B_FALSE, what != SPA_CONFIG_UPDATE_POOL); > > if (what == SPA_CONFIG_UPDATE_POOL) > spa_config_update(spa, SPA_CONFIG_UPDATE_VDEVS); > > From owner-svn-src-all@FreeBSD.ORG Thu Dec 25 21:32:40 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D7BDDC4; Thu, 25 Dec 2014 21:32:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C3B5236C8; Thu, 25 Dec 2014 21:32:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBPLWeLm060381; Thu, 25 Dec 2014 21:32:40 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBPLWcV3060371; Thu, 25 Dec 2014 21:32:38 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201412252132.sBPLWcV3060371@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Thu, 25 Dec 2014 21:32:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276215 - in head/sys: net netinet netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Dec 2014 21:32:41 -0000 Author: ae Date: Thu Dec 25 21:32:37 2014 New Revision: 276215 URL: https://svnweb.freebsd.org/changeset/base/276215 Log: Extern declarations in C files loses compile-time checking that the functions' calls match their definitions. Move them to header files. Reviewed by: jilles (previous version) Modified: head/sys/net/if_gif.c head/sys/net/if_gif.h head/sys/net/if_gre.c head/sys/net/if_gre.h head/sys/netinet/in_gif.c head/sys/netinet/ip_gre.c head/sys/netinet6/in6_gif.c head/sys/netinet6/ip6_gre.c Modified: head/sys/net/if_gif.c ============================================================================== --- head/sys/net/if_gif.c Thu Dec 25 20:15:13 2014 (r276214) +++ head/sys/net/if_gif.c Thu Dec 25 21:32:37 2014 (r276215) @@ -118,16 +118,6 @@ void (*ng_gif_input_orphan_p)(struct ifn void (*ng_gif_attach_p)(struct ifnet *ifp); void (*ng_gif_detach_p)(struct ifnet *ifp); -#ifdef INET -extern int in_gif_output(struct ifnet *, struct mbuf *, int, uint8_t); -extern int in_gif_encapcheck(const struct mbuf *, int, int, void *); -extern int in_gif_attach(struct gif_softc *); -#endif -#ifdef INET6 -extern int in6_gif_output(struct ifnet *, struct mbuf *, int, uint8_t); -extern int in6_gif_encapcheck(const struct mbuf *, int, int, void *); -extern int in6_gif_attach(struct gif_softc *); -#endif static int gif_set_tunnel(struct ifnet *, struct sockaddr *, struct sockaddr *); static void gif_delete_tunnel(struct ifnet *); Modified: head/sys/net/if_gif.h ============================================================================== --- head/sys/net/if_gif.h Thu Dec 25 20:15:13 2014 (r276214) +++ head/sys/net/if_gif.h Thu Dec 25 21:32:37 2014 (r276215) @@ -114,6 +114,16 @@ void gif_input(struct mbuf *, struct ifn int gif_output(struct ifnet *, struct mbuf *, const struct sockaddr *, struct route *); int gif_encapcheck(const struct mbuf *, int, int, void *); +#ifdef INET +int in_gif_output(struct ifnet *, struct mbuf *, int, uint8_t); +int in_gif_encapcheck(const struct mbuf *, int, int, void *); +int in_gif_attach(struct gif_softc *); +#endif +#ifdef INET6 +int in6_gif_output(struct ifnet *, struct mbuf *, int, uint8_t); +int in6_gif_encapcheck(const struct mbuf *, int, int, void *); +int in6_gif_attach(struct gif_softc *); +#endif #endif /* _KERNEL */ #define GIFGOPTS _IOWR('i', 150, struct ifreq) Modified: head/sys/net/if_gre.c ============================================================================== --- head/sys/net/if_gre.c Thu Dec 25 20:15:13 2014 (r276214) +++ head/sys/net/if_gre.c Thu Dec 25 21:32:37 2014 (r276215) @@ -119,16 +119,6 @@ static int gre_set_tunnel(struct ifnet * struct sockaddr *); static void gre_delete_tunnel(struct ifnet *); -int gre_input(struct mbuf **, int *, int); -#ifdef INET -extern int in_gre_attach(struct gre_softc *); -extern int in_gre_output(struct mbuf *, int, int); -#endif -#ifdef INET6 -extern int in6_gre_attach(struct gre_softc *); -extern int in6_gre_output(struct mbuf *, int, int); -#endif - SYSCTL_DECL(_net_link); static SYSCTL_NODE(_net_link, IFT_TUNNEL, gre, CTLFLAG_RW, 0, "Generic Routing Encapsulation"); Modified: head/sys/net/if_gre.h ============================================================================== --- head/sys/net/if_gre.h Thu Dec 25 20:15:13 2014 (r276214) +++ head/sys/net/if_gre.h Thu Dec 25 21:32:37 2014 (r276215) @@ -100,6 +100,15 @@ struct gre_softc { #define gre_oip gre_gihdr->gi_ip #define gre_oip6 gre_gi6hdr->gi6_ip6 +int gre_input(struct mbuf **, int *, int); +#ifdef INET +int in_gre_attach(struct gre_softc *); +int in_gre_output(struct mbuf *, int, int); +#endif +#ifdef INET6 +int in6_gre_attach(struct gre_softc *); +int in6_gre_output(struct mbuf *, int, int); +#endif /* * CISCO uses special type for GRE tunnel created as part of WCCP * connection, while in fact those packets are just IPv4 encapsulated Modified: head/sys/netinet/in_gif.c ============================================================================== --- head/sys/netinet/in_gif.c Thu Dec 25 20:15:13 2014 (r276214) +++ head/sys/netinet/in_gif.c Thu Dec 25 21:32:37 2014 (r276215) @@ -67,10 +67,6 @@ __FBSDID("$FreeBSD$"); #include -int in_gif_output(struct ifnet *, struct mbuf *, int, uint8_t); -int in_gif_encapcheck(const struct mbuf *, int, int, void *); -int in_gif_attach(struct gif_softc *); - static int gif_validate4(const struct ip *, struct gif_softc *, struct ifnet *); static int in_gif_input(struct mbuf **, int *, int); Modified: head/sys/netinet/ip_gre.c ============================================================================== --- head/sys/netinet/ip_gre.c Thu Dec 25 20:15:13 2014 (r276214) +++ head/sys/netinet/ip_gre.c Thu Dec 25 21:32:37 2014 (r276215) @@ -68,11 +68,6 @@ __FBSDID("$FreeBSD$"); #include extern struct domain inetdomain; -extern int gre_input(struct mbuf **, int *, int); - -int in_gre_attach(struct gre_softc *); -int in_gre_output(struct mbuf *, int, int); - static const struct protosw in_gre_protosw = { .pr_type = SOCK_RAW, .pr_domain = &inetdomain, Modified: head/sys/netinet6/in6_gif.c ============================================================================== --- head/sys/netinet6/in6_gif.c Thu Dec 25 20:15:13 2014 (r276214) +++ head/sys/netinet6/in6_gif.c Thu Dec 25 21:32:37 2014 (r276215) @@ -81,10 +81,6 @@ SYSCTL_DECL(_net_inet6_ip6); SYSCTL_INT(_net_inet6_ip6, IPV6CTL_GIF_HLIM, gifhlim, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ip6_gif_hlim), 0, ""); -int in6_gif_output(struct ifnet *, struct mbuf *, int, uint8_t); -int in6_gif_encapcheck(const struct mbuf *, int, int, void *); -int in6_gif_attach(struct gif_softc *); - static int gif_validate6(const struct ip6_hdr *, struct gif_softc *, struct ifnet *); static int in6_gif_input(struct mbuf **, int *, int); Modified: head/sys/netinet6/ip6_gre.c ============================================================================== --- head/sys/netinet6/ip6_gre.c Thu Dec 25 20:15:13 2014 (r276214) +++ head/sys/netinet6/ip6_gre.c Thu Dec 25 21:32:37 2014 (r276215) @@ -62,11 +62,6 @@ __FBSDID("$FreeBSD$"); #include extern struct domain inet6domain; -extern int gre_input(struct mbuf **, int *, int); - -int in6_gre_attach(struct gre_softc *); -int in6_gre_output(struct mbuf *, int, int); - struct protosw in6_gre_protosw = { .pr_type = SOCK_RAW, .pr_domain = &inet6domain, From owner-svn-src-all@FreeBSD.ORG Thu Dec 25 21:32:55 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 575191F9 for ; Thu, 25 Dec 2014 21:32:55 +0000 (UTC) Received: from mail-wi0-f176.google.com (mail-wi0-f176.google.com [209.85.212.176]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DAF4736D0 for ; Thu, 25 Dec 2014 21:32:54 +0000 (UTC) Received: by mail-wi0-f176.google.com with SMTP id ex7so16059852wid.3 for ; Thu, 25 Dec 2014 13:32:53 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type; bh=CGWwTkcjhIA+/ENlQXwzDiDJHERM0x6h6B17tpnGmIE=; b=hAXGjiSxydq8/wNG+qtlkJSLTm3x7NLEzXtshVCSyy9TXm+ghL3Rew0NCOVbPxu6cY jVGqYw7tTlwnNCPJWPp4vyioDjZcmXro1tiLCc6S/aElj2+KJ/iXM4nGvOZhVhFgI4sp ePAnJEQlUIgOWqTcmX9iaB9mcWxIkIruhk9LcJ5Kv1BmzoVctd9YhOBqMqBKeoaG6pDH jBpeJy9OhrMNzmhbJP35nm6USU58kPwHDZb9M192cFFSZvG7ipap3mSrt9zzUEyvxsij Zi6mU+7V4CqsqF+b3G3hEZ4d0bbGU+y5d7im/hIob5St4UGpxNN++rqYCqmP09S/njAU 7J/g== X-Gm-Message-State: ALoCoQleEm33iOv9qQORw1u7CaVf/PuC5FJAjqqt7dQ2sOq9FKEqZ9MiFCNSXrEC4secAqdzJCCK X-Received: by 10.194.57.43 with SMTP id f11mr73387057wjq.6.1419542871231; Thu, 25 Dec 2014 13:27:51 -0800 (PST) Received: from [10.10.1.68] (82-69-141-170.dsl.in-addr.zen.co.uk. [82.69.141.170]) by mx.google.com with ESMTPSA id n3sm26021083wiw.5.2014.12.25.13.27.49 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Dec 2014 13:27:50 -0800 (PST) From: Steven Hartland X-Google-Original-From: Steven Hartland Message-ID: <549C8149.5000002@freebsd.org> Date: Thu, 25 Dec 2014 21:27:37 +0000 User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Will Andrews Subject: Re: svn commit: r276123 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs References: <201412230931.sBN9VPMK017968@svn.freebsd.org> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Dec 2014 21:32:55 -0000 I checked when I initially investigated the issue and it was added when ZFS boot support was originally incorporated into Solaris. FreeBSD's ZFS boot support outstrips illumos upstream, not even requiring the cache file, and when initially discussed with others it was thought the most likely reason for the conditional was some sort of incompatibility with their original implementation. I've already raised the issue upstream (https://www.illumos.org/issues/5472) so if anything comes of that I'll update. In the mean time I've not been able to produce any issues with the change, even after sitting in our production tree for a number of months, and it does fix the issues reported by others due to out of date cache files. Regards Steve On 25/12/2014 21:10, Will Andrews wrote: > Why was the original condition there? It may not be documented in a > commenf, but presumably there is a reason. Did you ask the original > author of the code in question? > > --Will. > > > On Tuesday, December 23, 2014, Steven Hartland > wrote: > > Author: smh > Date: Tue Dec 23 09:31:24 2014 > New Revision: 276123 > URL: https://svnweb.freebsd.org/changeset/base/276123 > > Log: > Always sync the global ZFS config cache to reflect the new mosconfig > > This fixes out of date zpool.cache for root pools, which can > cause issues > such as confusion of zdb etc. > > MFC after: 1 month > > Modified: > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_config.c > > Modified: > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_config.c > ============================================================================== > --- > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_config.c > Tue Dec 23 08:51:30 2014 (r276122) > +++ > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_config.c > Tue Dec 23 09:31:24 2014 (r276123) > @@ -536,8 +536,7 @@ spa_config_update(spa_t *spa, int what) > /* > * Update the global config cache to reflect the new > mosconfig. > */ > - if (!spa->spa_is_root) > - spa_config_sync(spa, B_FALSE, what != > SPA_CONFIG_UPDATE_POOL); > + spa_config_sync(spa, B_FALSE, what != SPA_CONFIG_UPDATE_POOL); > > if (what == SPA_CONFIG_UPDATE_POOL) > spa_config_update(spa, SPA_CONFIG_UPDATE_VDEVS); > From owner-svn-src-all@FreeBSD.ORG Thu Dec 25 21:33:30 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1DC21243; Thu, 25 Dec 2014 21:33:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0830C36DC; Thu, 25 Dec 2014 21:33:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBPLXUiv060562; Thu, 25 Dec 2014 21:33:30 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBPLXQ7s060546; Thu, 25 Dec 2014 21:33:26 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201412252133.sBPLXQ7s060546@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Thu, 25 Dec 2014 21:33:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r276216 - vendor/mdocml/dist X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Dec 2014 21:33:30 -0000 Author: bapt Date: Thu Dec 25 21:33:25 2014 New Revision: 276216 URL: https://svnweb.freebsd.org/changeset/base/276216 Log: Import mandoc 1.13.2 Added: vendor/mdocml/dist/mandoc_headers.3 (contents, props changed) Modified: vendor/mdocml/dist/INSTALL vendor/mdocml/dist/LICENSE vendor/mdocml/dist/Makefile vendor/mdocml/dist/Makefile.depend vendor/mdocml/dist/NEWS vendor/mdocml/dist/TODO vendor/mdocml/dist/compat_fts.c vendor/mdocml/dist/compat_reallocarray.c vendor/mdocml/dist/compat_strcasestr.c vendor/mdocml/dist/compat_strsep.c vendor/mdocml/dist/configure vendor/mdocml/dist/configure.local.example vendor/mdocml/dist/example.style.css vendor/mdocml/dist/html.c vendor/mdocml/dist/html.h vendor/mdocml/dist/libman.h vendor/mdocml/dist/libmandoc.h vendor/mdocml/dist/libmdoc.h vendor/mdocml/dist/libroff.h vendor/mdocml/dist/main.c vendor/mdocml/dist/main.h vendor/mdocml/dist/man.h vendor/mdocml/dist/man_hash.c vendor/mdocml/dist/man_html.c vendor/mdocml/dist/man_term.c vendor/mdocml/dist/mandoc.1 vendor/mdocml/dist/mandoc.h vendor/mdocml/dist/mandoc_aux.h vendor/mdocml/dist/mandocdb.c vendor/mdocml/dist/manpath.h vendor/mdocml/dist/mansearch.3 vendor/mdocml/dist/mansearch.c vendor/mdocml/dist/mansearch.h vendor/mdocml/dist/mansearch_const.c vendor/mdocml/dist/mdoc.7 vendor/mdocml/dist/mdoc.h vendor/mdocml/dist/mdoc_html.c vendor/mdocml/dist/mdoc_macro.c vendor/mdocml/dist/mdoc_man.c vendor/mdocml/dist/mdoc_term.c vendor/mdocml/dist/mdoc_validate.c vendor/mdocml/dist/msec.c vendor/mdocml/dist/out.c vendor/mdocml/dist/out.h vendor/mdocml/dist/read.c vendor/mdocml/dist/roff.7 vendor/mdocml/dist/st.in vendor/mdocml/dist/term.c vendor/mdocml/dist/term.h vendor/mdocml/dist/term_ps.c Modified: vendor/mdocml/dist/INSTALL ============================================================================== --- vendor/mdocml/dist/INSTALL Thu Dec 25 21:32:37 2014 (r276215) +++ vendor/mdocml/dist/INSTALL Thu Dec 25 21:33:25 2014 (r276216) @@ -1,13 +1,12 @@ -$Id: INSTALL,v 1.5 2014/08/18 13:27:47 kristaps Exp $ +$Id: INSTALL,v 1.9 2014/12/11 07:44:46 schwarze Exp $ About mdocml, the portable mandoc distribution ---------------------------------------------- The mandoc manpage compiler toolset is a suite of tools compiling mdoc(7), the roff(7) macro language of choice for BSD manual pages, and man(7), the predominant historical language for UNIX manuals. -The toolset does not yet implement man(1); that is only scheduled -for the next release, 1.13.2. It can, however, already serve to -translate source manpages to the output displayed by man(1). +Since the present version 1.13.2, it includes a man(1) manual viewer +in addition to the apropos(1) manual page search tool. For general information, see . In this document, we describe the installation and deployment of @@ -22,7 +21,7 @@ tech@ mailing list, too. Enjoy using the mandoc toolset! -Ingo Schwarze, Karlsruhe, August 2014 +Ingo Schwarze, Karlsruhe, December 2014 Installation @@ -59,8 +58,8 @@ should work. If the build fails, look a and go back to step 2. 4. Run "make -n install" and check whether everything will be -installed to the intended places. Otherwise, put some *DIR variables -into "configure.local" and go back to step 2. +installed to the intended places. Otherwise, put some *DIR or *NM* +variables into "configure.local" and go back to step 2. 5. Run "sudo make install". If you intend to build a binary package using some kind of fake root mechanism, you may need a @@ -70,14 +69,14 @@ in the "Makefile" to understand how DEST 6. To set up a man.cgi(8) server, read its manual page. 7. To use mandoc(1) as your man(1) formatter, read the "Deployment" -section below. +sections below. Understanding mandoc dependencies --------------------------------- -The mandoc(1), preconv(1), and demandoc(1) utilities have no external -dependencies. However, makewhatis(8) and apropos(1) depend on the -following software: +The mandoc(1) and demandoc(1) utilities have no external dependencies. +However, makewhatis(8), apropos(1), and man(1) depend on the following +software: 1. The SQLite database system, see . The recommended version of SQLite is 3.8.4.3 or newer. The mandoc @@ -89,14 +88,14 @@ fails due to the missing sqlite3_errstr( problems, apropos(1) is fully usable with SQLite 3.7.5. Versions older than 3.7.5 may or may not work, they have not been tested. -1.2. The fts(3) directory traversion functions. +2. The fts(3) directory traversion functions. If your system does not have them, the bundled compatibility version will be used, so you need not worry in that case. But be careful: the glibc version of fts(3) is known to be broken on 32bit platforms, see . If you run into that problem, set "HAVE_FTS=0" in configure.local. -1.3. Marc Espie's ohash(3) library. +3. Marc Espie's ohash(3) library. If your system does not have it, the bundled compatibility version will be used, so you probably need not worry about it. @@ -145,11 +144,39 @@ in unusual headers. You can also look a check that no "#define HAVE_*" differ from your expectations. -Deployment ----------- -If you want to integrate the mandoc(1) tools with your existing -man(1) system as a formatter, then contact us first: on systems without -mandoc(1) as the default, you may have your work cut out for you! +Deployment using the integrated man(1) viewer +--------------------------------------------- +This mode of deployment requires database support. In case of +doubt, look at the section "user settings related to database +support" in the file configure.local.example. + +Deployment requires the following steps: + +1. Build and install mandoc as described above in steps 2 to 5 +below "Installation". + +2. If your system uses manpath(1), make sure it is configured +correctly, in particular, it returns all directory trees where +manual pages are installed. If your system uses man.conf(5), make +sure it contains a "_whatdb" line for each directory tree, and the +order of these lines meets your wishes. + +3. Run the command "sudo makewhatis" to build mandoc.db(5) databases +in all the directory trees configured in step 2. + +At this point, your new man(1), apropos(1), and whatis(1) should work. +Otherwise, please look at , both +for help and to have these instructions improved. + +Whenever installing new manual pages, re-run makewhatis(8) to update +the databases, or man(1) will not find the new pages. + + +Deployment using your system's native man(1) viewer +--------------------------------------------------- +This mode of deployment does not require database support, +so it works even if you don't have SQLite3. + Usually, you can have your default installation and mandoc(1) work right alongside each other by using user-specific versions of the files mentioned below. @@ -174,15 +201,17 @@ mandoc(1)" to disregard them. of cached pages being pulled up. You can usually do this by commenting out NOCACHE or similar. + mandoc(1) still has a long way to go in understanding non-trivial low-level roff(7) markup embedded in some man(7) pages. On the BSD systems using mandoc(1), third-party software is generally vetted on whether it may be formatted with mandoc(1). If not, groff(1) is pulled in as a dependency and used to install a pre-formatted -"catpage" intead of directly as manual page source. +"catpage" instead of directly as manual page source. For more background on switching operating systems to use mandoc(1) -instead of groff(1) to format manuals, see the two BSDCan presentations -by Ingo Schwarze: +instead of groff(1) to format manuals, see the BSDCan and EuroBSDCon +presentations by Ingo Schwarze: + Modified: vendor/mdocml/dist/LICENSE ============================================================================== --- vendor/mdocml/dist/LICENSE Thu Dec 25 21:32:37 2014 (r276215) +++ vendor/mdocml/dist/LICENSE Thu Dec 25 21:33:25 2014 (r276216) @@ -1,17 +1,17 @@ -$Id: LICENSE,v 1.4 2014/08/21 00:42:38 schwarze Exp $ +$Id: LICENSE,v 1.5 2014/12/11 07:56:24 schwarze Exp $ With the exceptions noted below, all code and documentation contained in the mdocml toolkit is protected by the Copyright of the following developers: -Copyright (c) 2008, 2009, 2010, 2011, 2012 Kristaps Dzonsons +Copyright (c) 2008-2012, 2014 Kristaps Dzonsons Copyright (c) 2010, 2011, 2012, 2013, 2014 Ingo Schwarze Copyright (c) 2009, 2010, 2011, 2012 Joerg Sonnenberger Copyright (c) 2013 Franco Fichtner Copyright (c) 1999, 2004 Marc Espie Copyright (c) 1998, 2010 Todd C. Miller Copyright (c) 2008 Otto Moerbeek -Copyright (c) 2003 Jason McIntyre +Copyright (c) 2003, 2007, 2008, 2014 Jason McIntyre See the individual source files for information about who contributed to which file during which years. Modified: vendor/mdocml/dist/Makefile ============================================================================== --- vendor/mdocml/dist/Makefile Thu Dec 25 21:32:37 2014 (r276215) +++ vendor/mdocml/dist/Makefile Thu Dec 25 21:33:25 2014 (r276216) @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.448 2014/11/28 18:57:31 schwarze Exp $ +# $Id: Makefile,v 1.453 2014/12/09 09:14:33 schwarze Exp $ # # Copyright (c) 2010, 2011, 2012 Kristaps Dzonsons # Copyright (c) 2011, 2013, 2014 Ingo Schwarze @@ -15,9 +15,7 @@ # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -BASEBIN = mandoc demandoc -DBBIN = makewhatis -CGIBIN = man.cgi +# === LIST OF FILES ==================================================== TESTSRCS = test-dirent-namlen.c \ test-fgetln.c \ @@ -131,6 +129,7 @@ DISTFILES = INSTALL \ mandoc_aux.h \ mandoc_char.7 \ mandoc_escape.3 \ + mandoc_headers.3 \ mandoc_html.3 \ mandoc_malloc.3 \ manpath.h \ @@ -208,18 +207,19 @@ MANDOC_TERM_OBJS = eqn_term.o \ term_ps.o \ tbl_term.o -MANDOC_OBJS = $(MANDOC_HTML_OBJS) \ +BASE_OBJS = $(MANDOC_HTML_OBJS) \ $(MANDOC_MAN_OBJS) \ $(MANDOC_TERM_OBJS) \ main.o \ out.o \ tree.o -MAN_OBJS = $(MANDOC_OBJS) +MAIN_OBJS = $(BASE_OBJS) -MAKEWHATIS_OBJS = mandocdb.o mansearch_const.o manpath.o - -APROPOS_OBJS = mansearch.o mansearch_const.o manpath.o +DB_OBJS = mandocdb.o \ + mansearch.o \ + mansearch_const.o \ + manpath.o CGI_OBJS = $(MANDOC_HTML_OBJS) \ cgi.o \ @@ -237,6 +237,7 @@ WWW_MANS = apropos.1.html \ mandoc.1.html \ mandoc.3.html \ mandoc_escape.3.html \ + mandoc_headers.3.html \ mandoc_html.3.html \ mandoc_malloc.3.html \ mansearch.3.html \ @@ -261,19 +262,17 @@ WWW_MANS = apropos.1.html \ WWW_OBJS = mdocml.tar.gz \ mdocml.sha256 -include Makefile.local +# === USER CONFIGURATION =============================================== -INSTALL_TARGETS = $(BUILD_TARGETS:-build=-install) +include Makefile.local # === DEPENDENCY HANDLING ============================================== all: base-build $(BUILD_TARGETS) Makefile.local -base-build: $(BASEBIN) - -db-build: $(DBBIN) +base-build: mandoc demandoc -cgi-build: $(CGIBIN) +cgi-build: man.cgi install: base-install $(INSTALL_TARGETS) @@ -281,6 +280,9 @@ www: $(WWW_OBJS) $(WWW_MANS) $(WWW_MANS): mandoc +.PHONY: base-install cgi-install db-install install www-install +.PHONY: clean distclean depend + include Makefile.depend # === TARGETS CONTAINING SHELL COMMANDS ================================ @@ -290,8 +292,7 @@ distclean: clean clean: rm -f libmandoc.a $(LIBMANDOC_OBJS) $(COMPAT_OBJS) - rm -f mandoc $(MANDOC_OBJS) $(APROPOS_OBJS) - rm -f makewhatis $(MAKEWHATIS_OBJS) + rm -f mandoc $(BASE_OBJS) $(DB_OBJS) rm -f man.cgi $(CGI_OBJS) rm -f manpage $(MANPAGE_OBJS) rm -f demandoc $(DEMANDOC_OBJS) @@ -306,34 +307,41 @@ base-install: base-build mkdir -p $(DESTDIR)$(MANDIR)/man1 mkdir -p $(DESTDIR)$(MANDIR)/man3 mkdir -p $(DESTDIR)$(MANDIR)/man7 - $(INSTALL_PROGRAM) $(BASEBIN) $(DESTDIR)$(BINDIR) + $(INSTALL_PROGRAM) mandoc demandoc $(DESTDIR)$(BINDIR) $(INSTALL_LIB) libmandoc.a $(DESTDIR)$(LIBDIR) $(INSTALL_LIB) man.h mandoc.h mandoc_aux.h mdoc.h \ $(DESTDIR)$(INCLUDEDIR) - $(INSTALL_MAN) man.1 mandoc.1 demandoc.1 \ - $(DESTDIR)$(MANDIR)/man1 + $(INSTALL_MAN) mandoc.1 demandoc.1 $(DESTDIR)$(MANDIR)/man1 $(INSTALL_MAN) mandoc.3 mandoc_escape.3 mandoc_malloc.3 \ mchars_alloc.3 tbl.3 $(DESTDIR)$(MANDIR)/man3 - $(INSTALL_MAN) man.7 mdoc.7 roff.7 eqn.7 tbl.7 mandoc_char.7 \ - $(DESTDIR)$(MANDIR)/man7 + $(INSTALL_MAN) man.7 $(DESTDIR)$(MANDIR)/man7/${MANM_MAN}.7 + $(INSTALL_MAN) mdoc.7 $(DESTDIR)$(MANDIR)/man7/${MANM_MDOC}.7 + $(INSTALL_MAN) roff.7 $(DESTDIR)$(MANDIR)/man7/${MANM_ROFF}.7 + $(INSTALL_MAN) eqn.7 $(DESTDIR)$(MANDIR)/man7/${MANM_EQN}.7 + $(INSTALL_MAN) tbl.7 $(DESTDIR)$(MANDIR)/man7/${MANM_TBL}.7 + $(INSTALL_MAN) mandoc_char.7 $(DESTDIR)$(MANDIR)/man7 $(INSTALL_DATA) example.style.css $(DESTDIR)$(EXAMPLEDIR) -db-install: db-build +db-install: base-build mkdir -p $(DESTDIR)$(BINDIR) mkdir -p $(DESTDIR)$(SBINDIR) mkdir -p $(DESTDIR)$(MANDIR)/man1 mkdir -p $(DESTDIR)$(MANDIR)/man3 mkdir -p $(DESTDIR)$(MANDIR)/man5 mkdir -p $(DESTDIR)$(MANDIR)/man8 - ln -f $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/apropos - ln -f $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/whatis - $(INSTALL_PROGRAM) makewhatis $(DESTDIR)$(SBINDIR) - $(INSTALL_MAN) apropos.1 $(DESTDIR)$(MANDIR)/man1 - ln -f $(DESTDIR)$(MANDIR)/man1/apropos.1 \ - $(DESTDIR)$(MANDIR)/man1/whatis.1 + ln -f $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_APROPOS) + ln -f $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_MAN) + ln -f $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_WHATIS) + ln -f $(DESTDIR)$(BINDIR)/mandoc \ + $(DESTDIR)$(SBINDIR)/$(BINM_MAKEWHATIS) + $(INSTALL_MAN) apropos.1 $(DESTDIR)$(MANDIR)/man1/$(BINM_APROPOS).1 + $(INSTALL_MAN) man.1 $(DESTDIR)$(MANDIR)/man1/$(BINM_MAN).1 + ln -f $(DESTDIR)$(MANDIR)/man1/$(BINM_APROPOS).1 \ + $(DESTDIR)$(MANDIR)/man1/$(BINM_WHATIS).1 $(INSTALL_MAN) mansearch.3 $(DESTDIR)$(MANDIR)/man3 $(INSTALL_MAN) mandoc.db.5 $(DESTDIR)$(MANDIR)/man5 - $(INSTALL_MAN) makewhatis.8 $(DESTDIR)$(MANDIR)/man8 + $(INSTALL_MAN) makewhatis.8 \ + $(DESTDIR)$(MANDIR)/man8/$(BINM_MAKEWHATIS).8 cgi-install: cgi-build mkdir -p $(DESTDIR)$(CGIBINDIR) @@ -346,34 +354,15 @@ cgi-install: cgi-build $(INSTALL_MAN) apropos.1 $(DESTDIR)$(WWWPREFIX)/man/mandoc/man1/ $(INSTALL_MAN) man.cgi.8 $(DESTDIR)$(WWWPREFIX)/man/mandoc/man8/ -www-install: www - mkdir -p $(DESTDIR)$(HTDOCDIR)/snapshots - $(INSTALL_DATA) $(WWW_MANS) style.css $(DESTDIR)$(HTDOCDIR) - $(INSTALL_DATA) $(WWW_OBJS) $(DESTDIR)$(HTDOCDIR)/snapshots - $(INSTALL_DATA) mdocml.tar.gz \ - $(DESTDIR)$(HTDOCDIR)/snapshots/mdocml-$(VERSION).tar.gz - $(INSTALL_DATA) mdocml.sha256 \ - $(DESTDIR)$(HTDOCDIR)/snapshots/mdocml-$(VERSION).sha256 - Makefile.local config.h: configure ${TESTSRCS} @echo "$@ is out of date; please run ./configure" @exit 1 -depend: config.h - mkdep -f Makefile.depend $(CFLAGS) $(SRCS) - perl -e 'undef $$/; $$_ = <>; s|/usr/include/\S+||g; \ - s|\\\n||g; s| +| |g; s| $$||mg; print;' \ - Makefile.depend > Makefile.tmp - mv Makefile.tmp Makefile.depend - libmandoc.a: $(COMPAT_OBJS) $(LIBMANDOC_OBJS) $(AR) rs $@ $(COMPAT_OBJS) $(LIBMANDOC_OBJS) -mandoc: $(MAN_OBJS) libmandoc.a - $(CC) $(LDFLAGS) -o $@ $(MAN_OBJS) libmandoc.a $(DBLIB) - -makewhatis: $(MAKEWHATIS_OBJS) libmandoc.a - $(CC) $(LDFLAGS) -o $@ $(MAKEWHATIS_OBJS) libmandoc.a $(DBLIB) +mandoc: $(MAIN_OBJS) libmandoc.a + $(CC) $(LDFLAGS) -o $@ $(MAIN_OBJS) libmandoc.a $(DBLIB) manpage: $(MANPAGE_OBJS) libmandoc.a $(CC) $(LDFLAGS) -o $@ $(MANPAGE_OBJS) libmandoc.a $(DBLIB) @@ -384,6 +373,24 @@ man.cgi: $(CGI_OBJS) libmandoc.a demandoc: $(DEMANDOC_OBJS) libmandoc.a $(CC) $(LDFLAGS) -o $@ $(DEMANDOC_OBJS) libmandoc.a +# --- maintainer targets --- + +www-install: www + mkdir -p $(HTDOCDIR)/snapshots + $(INSTALL_DATA) $(WWW_MANS) style.css $(HTDOCDIR)/man + $(INSTALL_DATA) $(WWW_OBJS) $(HTDOCDIR)/snapshots + $(INSTALL_DATA) mdocml.tar.gz \ + $(HTDOCDIR)/snapshots/mdocml-$(VERSION).tar.gz + $(INSTALL_DATA) mdocml.sha256 \ + $(HTDOCDIR)/snapshots/mdocml-$(VERSION).sha256 + +depend: config.h + mkdep -f Makefile.depend $(CFLAGS) $(SRCS) + perl -e 'undef $$/; $$_ = <>; s|/usr/include/\S+||g; \ + s|\\\n||g; s| +| |g; s| $$||mg; print;' \ + Makefile.depend > Makefile.tmp + mv Makefile.tmp Makefile.depend + mdocml.sha256: mdocml.tar.gz sha256 mdocml.tar.gz > $@ @@ -394,8 +401,8 @@ mdocml.tar.gz: $(DISTFILES) ( cd .dist/ && tar zcf ../$@ mdocml-$(VERSION) ) rm -rf .dist/ -.PHONY: base-install cgi-install db-install install www-install -.PHONY: clean distclean depend +# === SUFFIX RULES ===================================================== + .SUFFIXES: .1 .3 .5 .7 .8 .h .SUFFIXES: .1.html .3.html .5.html .7.html .8.html .h.html Modified: vendor/mdocml/dist/Makefile.depend ============================================================================== --- vendor/mdocml/dist/Makefile.depend Thu Dec 25 21:32:37 2014 (r276215) +++ vendor/mdocml/dist/Makefile.depend Thu Dec 25 21:33:25 2014 (r276216) @@ -15,12 +15,12 @@ demandoc.o: demandoc.c config.h man.h md eqn.o: eqn.c config.h mandoc.h mandoc_aux.h libmandoc.h libroff.h eqn_html.o: eqn_html.c config.h mandoc.h out.h html.h eqn_term.o: eqn_term.c config.h mandoc.h out.h term.h -html.o: html.c config.h mandoc.h mandoc_aux.h libmandoc.h out.h html.h main.h +html.o: html.c config.h mandoc.h mandoc_aux.h out.h html.h main.h lib.o: lib.c config.h mdoc.h libmdoc.h lib.in main.o: main.c config.h mandoc.h mandoc_aux.h main.h mdoc.h man.h manpath.h mansearch.h man.o: man.c config.h man.h mandoc.h mandoc_aux.h libman.h libmandoc.h -man_hash.o: man_hash.c config.h man.h mandoc.h libman.h -man_html.o: man_html.c config.h mandoc.h mandoc_aux.h out.h html.h man.h main.h +man_hash.o: man_hash.c config.h man.h libman.h +man_html.o: man_html.c config.h mandoc_aux.h man.h out.h html.h main.h man_macro.o: man_macro.c config.h man.h mandoc.h libmandoc.h libman.h man_term.o: man_term.c config.h mandoc.h mandoc_aux.h out.h man.h term.h main.h man_validate.o: man_validate.c config.h man.h mandoc.h mandoc_aux.h libman.h libmandoc.h @@ -30,19 +30,19 @@ mandocdb.o: mandocdb.c config.h compat_f manpage.o: manpage.c config.h manpath.h mansearch.h manpath.o: manpath.c config.h mandoc_aux.h manpath.h mansearch.o: mansearch.c config.h compat_ohash.h mandoc.h mandoc_aux.h manpath.h mansearch.h -mansearch_const.o: mansearch_const.c config.h manpath.h mansearch.h +mansearch_const.o: mansearch_const.c config.h mansearch.h mdoc.o: mdoc.c config.h mdoc.h mandoc.h mandoc_aux.h libmdoc.h libmandoc.h mdoc_argv.o: mdoc_argv.c config.h mdoc.h mandoc.h mandoc_aux.h libmdoc.h libmandoc.h mdoc_hash.o: mdoc_hash.c config.h mdoc.h libmdoc.h -mdoc_html.o: mdoc_html.c config.h mandoc.h mandoc_aux.h out.h html.h mdoc.h main.h +mdoc_html.o: mdoc_html.c config.h mandoc_aux.h mdoc.h out.h html.h main.h mdoc_macro.o: mdoc_macro.c config.h mdoc.h mandoc.h libmdoc.h libmandoc.h mdoc_man.o: mdoc_man.c config.h mandoc.h mandoc_aux.h out.h man.h mdoc.h main.h mdoc_term.o: mdoc_term.c config.h mandoc.h mandoc_aux.h out.h term.h mdoc.h main.h mdoc_validate.o: mdoc_validate.c config.h mdoc.h mandoc.h mandoc_aux.h libmdoc.h libmandoc.h -msec.o: msec.c config.h mandoc.h libmandoc.h msec.in +msec.o: msec.c config.h libmandoc.h msec.in out.o: out.c config.h mandoc_aux.h mandoc.h out.h preconv.o: preconv.c config.h mandoc.h libmandoc.h -read.o: read.c config.h mandoc.h mandoc_aux.h libmandoc.h mdoc.h man.h main.h +read.o: read.c config.h mandoc.h mandoc_aux.h libmandoc.h mdoc.h man.h roff.o: roff.c config.h mandoc.h mandoc_aux.h libmandoc.h libroff.h predefs.in st.o: st.c config.h mdoc.h libmdoc.h st.in tbl.o: tbl.c config.h mandoc.h mandoc_aux.h libmandoc.h libroff.h @@ -53,7 +53,7 @@ tbl_opts.o: tbl_opts.c config.h mandoc.h tbl_term.o: tbl_term.c config.h mandoc.h out.h term.h term.o: term.c config.h mandoc.h mandoc_aux.h out.h term.h main.h term_ascii.o: term_ascii.c config.h mandoc.h mandoc_aux.h out.h term.h main.h -term_ps.o: term_ps.c config.h mandoc.h mandoc_aux.h out.h main.h term.h +term_ps.o: term_ps.c config.h mandoc_aux.h out.h term.h main.h tree.o: tree.c config.h mandoc.h mdoc.h man.h main.h test-dirent-namlen.o: test-dirent-namlen.c test-fgetln.o: test-fgetln.c Modified: vendor/mdocml/dist/NEWS ============================================================================== --- vendor/mdocml/dist/NEWS Thu Dec 25 21:32:37 2014 (r276215) +++ vendor/mdocml/dist/NEWS Thu Dec 25 21:33:25 2014 (r276216) @@ -1,7 +1,76 @@ -$Id: NEWS,v 1.6 2014/08/11 01:39:00 schwarze Exp $ +$Id: NEWS,v 1.8 2014/12/13 13:43:47 schwarze Exp $ This file lists the most important changes in the mdocml.bsd.lv distribution. +Changes in version 1.13.2, released on December 13, 2014 + + --- MAJOR NEW FEATURES --- + * Include an implementation of man(1), the manual page viewer. + * Unified set of command line option, each one supported by all + command names, including new options -a (format all), -c (no + pager), -h (synopsis only), and -w (list filenames). + * Support the MANPAGER and PAGER environment variables. + * Support gzip'ed manuals by the whole toolset, even as .so targets. + * Support UTF-8 and Latin-1 input by the whole toolset, delete preconv(1). + * Switch the default output mode from -Tascii to -Tlocale. + * Improve -Tascii output for Unicode escape sequences. + * Let the -Thtml output mode produce polyglot HTML5. + * Many improvements for eqn(7), in particular in-line equations, + MathML output in -Thtml mode, and much improved terminal formatting. + --- PORTABILITY IMPROVEMENTS --- + * Change the build sequence to the usual ./configure; make; make install. + * Support ./configure.local for build customizations. + * Autodetect wchar, sqlite3, and manpath support. + * Provide a fallback version of fts(3) for systems lacking it. + * Support choosing alternative binary and manual names. + --- MINOR NEW FEATURES --- + * Rudimentary implementation of the e, x, and z tbl(7) layout + modifiers to equalize, maximize, and ignore the width of columns. + * Implement font modifiers in tbl(7) layouts. + * Allow comma-separated options in the tbl(7) options line. + * Parse and ignore the .pl (page length) roff(7) request. + * Implement .An -[no]split for the mdoc(7) -Thtml output mode. + * Support bold italic font in PostScript and PDF output. + * Warn about commas in function arguments and parentheses in function names. + * Warn about botched .Xr ordering and punctuation below SEE ALSO. + * Warn about AUTHORS sections without .An macros. + * Warn about attempts to call non-callable macros. + * New developer documentation manual page mandoc_headers(3). + --- BUGFIXES --- + * Fix read buffer overrun sometimes triggered by trailing whitespace. + * Fix read buffer overrun triggered by certain invalid \H sequences. + * Fix NULL pointer access triggered by .Bl without any arguments. + * Fix NULL pointer access triggered by .It Nm Fo without .Fc. + * Fix NULL pointer access triggered by .Sh Xo .Sh without .Xc. + * Fix NULL pointer access triggered by missing .Nm. + * Fix an assertion triggered by .It right after .El. + * Fix an assertion triggered by .Ec without preceding .Eo. + * Fix an assertion triggered by .Sm or .Db with multiple arguments. + * Fix assertion failures triggered by very large width arguments. + * Fix a division by zero in the roff(7) parser. + * Prevent negative arguments to .ll from causing integer underflow. + * Correctly autodetect source format even when .Dd is preceded by .ll. + * Multiple fixes with respect to .Bd and .Bl -offset and -width. + * Many bugfixes with respect to scaling units. + * Multiple fixes with respect to delimiter handling by in-line macros. + * Multiple fixes with respect to .Pf. + * Make \c work properly in no-fill mode. + * Stricter syntax checking of Unicode character names. + --- THANKS TO --- + * Kristaps Dzonsons for rewriting the eqn(7) parser, implementing + HTML5 and MathML output, and various other code contributions. + * Jonathan Gray (OpenBSD) for extensive testing with afl (the + American Fuzzy Lop security fuzzer) resulting in many bug reports. + * Anthony Bentley (OpenBSD), Baptiste Daroussin (FreeBSD), Daniel + Dickman, Doug Hogan, Jason McIntyre, Theo de Raadt (OpenBSD), + and Martin Natano for source code patches. + * Carsten Kunze (Heirloom troff), Daniel Levai (Slackware), + Garrett D'Amore (illumos), Giovanni Becchis, Matthew Dempsky, + Stuart Henderson, Ted Unangst, Todd Miller (OpenBSD), Thomas + Klausner (NetBSD), Ulrich Spoerlein (FreeBSD), Justin Haynes, + Marcus Merighi, Sebastien Marie, Steffen Nurpmeso and Theo Buehler + for bug reports. + Changes in version 1.13.1, released on August 10, 2014 --- MAJOR NEW FEATURES --- Modified: vendor/mdocml/dist/TODO ============================================================================== --- vendor/mdocml/dist/TODO Thu Dec 25 21:32:37 2014 (r276215) +++ vendor/mdocml/dist/TODO Thu Dec 25 21:33:25 2014 (r276216) @@ -1,6 +1,6 @@ ************************************************************************ * Official mandoc TODO. -* $Id: TODO,v 1.189 2014/11/26 21:40:17 schwarze Exp $ +* $Id: TODO,v 1.195 2014/12/13 13:14:39 schwarze Exp $ ************************************************************************ Many issues are annotated for difficulty as follows: @@ -72,7 +72,8 @@ are mere guesses, and some may be wrong. - .ta (tab settings) occurs in ircbug(1) and probably gnats(1) reported by brad@ Sat, 15 Jan 2011 15:50:51 -0500 also Tcl_NewStringObj(3) via wiz@ Wed, 5 Mar 2014 22:27:43 +0100 - loc ** exist *** algo ** size ** imp ** + also posix2time(3) Carsten Kunze Mon, 1 Dec 2014 13:03:10 +0100 + loc ** exist *** algo ** size ** imp *** - .ti (temporary indent) found by naddy@ in xloadimage(1) @@ -83,14 +84,10 @@ are mere guesses, and some may be wrong. found by jca@ in ratpoison(1) Sun, 30 Jun 2013 12:01:09 +0200 loc * exist ** algo ** size ** imp ** -- \c (interrupted text) should prevent the line break - even inside .Bd literal; that occurs in chat(8) - also found in cclive(1) - DocBook output - loc ** exist *** algo ** size * imp * - - \h horizontal move - found in cclive(1) DocBook output - Anthony J. Bentley on discuss@ Sat, 21 Sep 2013 22:29:34 -0600 + found in cclive(1) and nasm(1) asciidoc/DocBook output + bentley@ on discuss@ Sat, 21 Sep 2013 22:29:34 -0600 + naddy@ Thu, 4 Dec 2014 16:26:41 +0100 loc ** exist ** algo ** size * imp ** (parser reorg helps a lot) - \n+ and \n- numerical register increment and decrement @@ -125,13 +122,6 @@ are mere guesses, and some may be wrong. from jmc@ Wed, 14 Jul 2010 18:10:32 +0100 loc * exist *** algo *** size ** imp ** -- \\ is now implemented correctly - * when defining strings and macros using .ds and .de - * when parsing roff(7) and man(7) macro arguments - It does not yet work in mdoc(7) macro arguments - because libmdoc does not yet use mandoc_getarg(). - Also check what happens in plain text, it must be identical to \e. - - .Bd -centered implies -filled, not -unfilled, which is not easy to implement; it requires code similar to .ce, which we don't have either. @@ -172,12 +162,6 @@ are mere guesses, and some may be wrong. is not safe, e.g. `.Bl -column .It Pf a b .' gives "ab." but should give "ab ." -- set a meaningful default if no `Bl' list type is assigned - loc * exist * algo * size * imp ** (already done?) - -- have a blank `It' head for `Bl -tag' not puke - loc * exist * algo * size * imp ** (already done?) - - check whether it is correct that `D1' uses INDENT+1; does it need its own constant? loc * exist ** algo ** size * imp ** @@ -315,9 +299,18 @@ are mere guesses, and some may be wrong. * formatting issues: ugly output ************************************************************************ -- a column list with blank `Ta' cells triggers a spurrious +- revisit empty in-line macros + look at the difference between "Em x Em ." and "Sq x Em ." + Carsten Kunze Fri, 12 Dec 2014 00:15:41 +0100 + loc *** exist *** algo *** size * imp ** + +- a column list with blank `Ta' cells triggers a spurious start-with-whitespace printing of a newline +- In .Bl -column, .It a"bc" + shows the quotes in groff, but not in mandoc + loc * exist *** algo ** size * imp ** + - In .Bl -column, .It Em AuthenticationKey Length ought to render "Key Length" with emphasis, too, @@ -403,16 +396,6 @@ are mere guesses, and some may be wrong. Steffen Nurpmeso Sat, 08 Nov 2014 13:34:59 +0100 loc * exist ** algo ** size * imp ** -- .Rv (and probably .Ex) print different text if an `Nm' has been named - or not (run a manual without `Nm blah' to see this). I'm not sure - that this exists in the wild, but it's still an error. - loc * exist * algo * size * imp * (already done?) - -- In .Bl -bullet, the groff bullet is "+\b+\bo\bo", the mandoc bullet - is just "o\bo". The problem is to not break ps/pdf when fixing. - see for example OpenBSD ksh(1) - loc ** exist ** algo ** size * imp ** - - In .Bl -enum -width 0n, groff continues one the same line after the number, mandoc breaks the line. mail to kristaps@ Mon, 20 Jul 2009 02:21:39 +0200 @@ -601,3 +584,9 @@ Several areas can be cleaned up to make - Have Mac OSX systems automatically disable -static compilation of the CGI: -static isn't supported. +************************************************************************ +* to improve in the groff_mdoc(7) macros +************************************************************************ + +- use uname(1) to set doc-default-operating-system at install time + tobimensch Mon, 1 Dec 2014 00:25:07 +0100 Modified: vendor/mdocml/dist/compat_fts.c ============================================================================== --- vendor/mdocml/dist/compat_fts.c Thu Dec 25 21:32:37 2014 (r276215) +++ vendor/mdocml/dist/compat_fts.c Thu Dec 25 21:33:25 2014 (r276216) @@ -6,8 +6,8 @@ int dummy; #else -/* $Id: compat_fts.c,v 1.4 2014/08/17 20:45:59 schwarze Exp $ */ -/* $OpenBSD: fts.c,v 1.46 2014/05/25 17:47:04 tedu Exp $ */ +/* $Id: compat_fts.c,v 1.6 2014/12/11 18:20:07 schwarze Exp $ */ +/* $OpenBSD: fts.c,v 1.49 2014/11/23 00:14:22 guenther Exp $ */ /*- * Copyright (c) 1990, 1993, 1994 @@ -62,6 +62,10 @@ static unsigned short fts_stat(FTS *, F static int fts_safe_changedir(FTS *, FTSENT *, int, const char *); #define ISDOT(a) (a[0] == '.' && (!a[1] || (a[1] == '.' && !a[2]))) +#define MAX(a,b) (((a)>(b))?(a):(b)) +#ifndef O_DIRECTORY +#define O_DIRECTORY 0 +#endif #define CLR(opt) (sp->fts_options &= ~(opt)) #define ISSET(opt) (sp->fts_options & (opt)) @@ -146,7 +150,8 @@ fts_open(char * const *argv, int options * and ".." are all fairly nasty problems. Note, if we can't get the * descriptor we run anyway, just more slowly. */ - if (!ISSET(FTS_NOCHDIR) && (sp->fts_rfd = open(".", O_RDONLY, 0)) < 0) + if (!ISSET(FTS_NOCHDIR) && + (sp->fts_rfd = open(".", O_RDONLY | O_CLOEXEC)) < 0) SET(FTS_NOCHDIR); if (nitems == 0) @@ -406,7 +411,7 @@ fts_build(FTS *sp) DIR *dirp; void *oldaddr; size_t dlen, len, maxlen; - int nitems, cderrno, descend, level, nlinks, nostat, doadjust; + int nitems, cderrno, descend, level, doadjust; int saved_errno; char *cp; @@ -424,14 +429,6 @@ fts_build(FTS *sp) } /* - * Nlinks is the number of possible entries of type directory in the - * directory if we're cheating on stat calls, 0 if we're not doing - * any stat calls at all, -1 if we're doing stats on everything. - */ - nlinks = -1; - nostat = 0; - - /* * If we're going to need to stat anything or we want to descend * and stay in the directory, chdir. If this fails we keep going, * but set a flag so we don't chdir after the post-order visit. @@ -448,8 +445,7 @@ fts_build(FTS *sp) */ cderrno = 0; if (fts_safe_changedir(sp, cur, dirfd(dirp), NULL)) { - if (nlinks) - cur->fts_errno = errno; + cur->fts_errno = errno; cur->fts_flags |= FTS_DONTCHDIR; descend = 0; cderrno = errno; @@ -544,21 +540,9 @@ mem1: saved_errno = errno; } if (cderrno) { - if (nlinks) { - p->fts_info = FTS_NS; - p->fts_errno = cderrno; - } else - p->fts_info = FTS_NSOK; + p->fts_info = FTS_NS; + p->fts_errno = cderrno; p->fts_accpath = cur->fts_accpath; - } else if (nlinks == 0 -#ifdef DT_DIR - || (nostat && - dp->d_type != DT_DIR && dp->d_type != DT_UNKNOWN) -#endif - ) { - p->fts_accpath = - ISSET(FTS_NOCHDIR) ? p->fts_path : p->fts_name; - p->fts_info = FTS_NSOK; } else { /* Build a file name for fts_stat to stat. */ if (ISSET(FTS_NOCHDIR)) { @@ -568,11 +552,6 @@ mem1: saved_errno = errno; p->fts_accpath = p->fts_name; /* Stat it. */ p->fts_info = fts_stat(sp, p); - - /* Decrement link count if applicable. */ - if (nlinks > 0 && (p->fts_info == FTS_D || - p->fts_info == FTS_DC || p->fts_info == FTS_DOT)) - --nlinks; } /* We walk in directory order so "ls -f" doesn't get upset. */ @@ -803,7 +782,7 @@ fts_safe_changedir(FTS *sp, FTSENT *p, i newfd = fd; if (ISSET(FTS_NOCHDIR)) return (0); - if (fd < 0 && (newfd = open(path, O_RDONLY, 0)) < 0) + if (fd < 0 && (newfd = open(path, O_RDONLY|O_DIRECTORY|O_CLOEXEC)) < 0) return (-1); if (fstat(newfd, &sb)) { ret = -1; Modified: vendor/mdocml/dist/compat_reallocarray.c ============================================================================== --- vendor/mdocml/dist/compat_reallocarray.c Thu Dec 25 21:32:37 2014 (r276215) +++ vendor/mdocml/dist/compat_reallocarray.c Thu Dec 25 21:33:25 2014 (r276216) @@ -6,7 +6,8 @@ int dummy; #else -/* $OpenBSD: malloc.c,v 1.158 2014/04/23 15:07:27 tedu Exp $ */ +/* $Id: compat_reallocarray.c,v 1.4 2014/12/11 09:05:01 schwarze Exp $ */ +/* $OpenBSD: reallocarray.c,v 1.2 2014/12/08 03:45:00 bcook Exp $ */ /* * Copyright (c) 2008 Otto Moerbeek * @@ -22,12 +23,17 @@ int dummy; * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ + #include #include #include #include -#define MUL_NO_OVERFLOW (1UL << (sizeof(size_t) * 4)) +/* + * This is sqrt(SIZE_MAX+1), as s1*s2 <= SIZE_MAX + * if both s1 < MUL_NO_OVERFLOW and s2 < MUL_NO_OVERFLOW + */ +#define MUL_NO_OVERFLOW ((size_t)1 << (sizeof(size_t) * 4)) void * reallocarray(void *optr, size_t nmemb, size_t size) Modified: vendor/mdocml/dist/compat_strcasestr.c ============================================================================== --- vendor/mdocml/dist/compat_strcasestr.c Thu Dec 25 21:32:37 2014 (r276215) +++ vendor/mdocml/dist/compat_strcasestr.c Thu Dec 25 21:33:25 2014 (r276216) @@ -6,7 +6,8 @@ int dummy; #else -/* ($)NetBSD: strcasestr.c,v 1.2 2005/02/09 21:35:47 kleink Exp $ */ +/* $Id: compat_strcasestr.c,v 1.4 2014/12/11 09:19:32 schwarze Exp $ */ +/* $NetBSD: strcasestr.c,v 1.3 2005/11/29 03:12:00 christos Exp $ */ /*- * Copyright (c) 1990, 1993 Modified: vendor/mdocml/dist/compat_strsep.c ============================================================================== --- vendor/mdocml/dist/compat_strsep.c Thu Dec 25 21:32:37 2014 (r276215) +++ vendor/mdocml/dist/compat_strsep.c Thu Dec 25 21:33:25 2014 (r276216) @@ -6,7 +6,8 @@ int dummy; #else -/* ($)OpenBSD: strsep.c,v 1.6 2005/08/08 08:05:37 espie Exp $ */ +/* $Id: compat_strsep.c,v 1.4 2014/12/11 09:05:01 schwarze Exp $ */ +/* $OpenBSD: strsep.c,v 1.7 2014/02/05 20:42:32 stsp Exp $ */ /*- * Copyright (c) 1990, 1993 Modified: vendor/mdocml/dist/configure ============================================================================== --- vendor/mdocml/dist/configure Thu Dec 25 21:32:37 2014 (r276215) +++ vendor/mdocml/dist/configure Thu Dec 25 21:33:25 2014 (r276216) @@ -31,7 +31,7 @@ echo "config.log: writing..." # Initialize all variables here, # such that nothing can leak in from the environment. -VERSION="1.13.1" +VERSION="1.13.2" echo "VERSION=\"${VERSION}\"" 1>&2 echo "VERSION=\"${VERSION}\"" 1>&3 @@ -75,6 +75,16 @@ WWWPREFIX="/var/www" HTDOCDIR= CGIBINDIR= +BINM_APROPOS="apropos" +BINM_MAN="man" +BINM_WHATIS="whatis" +BINM_MAKEWHATIS="makewhatis" +MANM_MAN="man" +MANM_MDOC="mdoc" +MANM_ROFF="roff" +MANM_EQN="eqn" +MANM_TBL="tbl" + INSTALL="install" INSTALL_PROGRAM= INSTALL_LIB= @@ -285,6 +295,11 @@ cat << __HEREDOC__ #define HAVE_OHASH ${HAVE_OHASH} #define HAVE_MANPATH ${HAVE_MANPATH} +#define BINM_APROPOS "${BINM_APROPOS}" +#define BINM_MAN "${BINM_MAN}" +#define BINM_WHATIS "${BINM_WHATIS}" +#define BINM_MAKEWHATIS "${BINM_MAKEWHATIS}" + #if !defined(__BEGIN_DECLS) # ifdef __cplusplus # define __BEGIN_DECLS extern "C" { @@ -358,12 +373,15 @@ if [ ${BUILD_DB} -eq 0 -a ${BUILD_CGI} - fi BUILD_TARGETS="base-build" -[ ${BUILD_DB} -gt 0 ] && BUILD_TARGETS="${BUILD_TARGETS} db-build" [ ${BUILD_CGI} -gt 0 ] && BUILD_TARGETS="${BUILD_TARGETS} cgi-build" +INSTALL_TARGETS="base-install" +[ ${BUILD_DB} -gt 0 ] && INSTALL_TARGETS="${INSTALL_TARGETS} db-install" +[ ${BUILD_CGI} -gt 0 ] && INSTALL_TARGETS="${INSTALL_TARGETS} cgi-install" cat << __HEREDOC__ VERSION = ${VERSION} BUILD_TARGETS = ${BUILD_TARGETS} +INSTALL_TARGETS = ${INSTALL_TARGETS} CFLAGS = ${CFLAGS} DBLIB = ${DBLIB} STATIC = ${STATIC} @@ -377,6 +395,15 @@ EXAMPLEDIR = ${EXAMPLEDIR} WWWPREFIX = ${WWWPREFIX} HTDOCDIR = ${HTDOCDIR} CGIBINDIR = ${CGIBINDIR} +BINM_APROPOS = ${BINM_APROPOS} +BINM_MAN = ${BINM_MAN} +BINM_WHATIS = ${BINM_WHATIS} +BINM_MAKEWHATIS = ${BINM_MAKEWHATIS} +MANM_MAN = ${MANM_MAN} +MANM_MDOC = ${MANM_MDOC} +MANM_ROFF = ${MANM_ROFF} +MANM_EQN = ${MANM_EQN} +MANM_TBL = ${MANM_TBL} INSTALL = ${INSTALL} INSTALL_PROGRAM = ${INSTALL_PROGRAM} INSTALL_LIB = ${INSTALL_LIB} @@ -385,7 +412,7 @@ INSTALL_DATA = ${INSTALL_DATA} __HEREDOC__ [ ${BUILD_DB} -gt 0 ] && \ - echo "MAN_OBJS = \$(MANDOC_OBJS) \$(APROPOS_OBJS)" + echo "MAIN_OBJS = \$(BASE_OBJS) \$(DB_OBJS)" echo "Makefile.local: written" 1>&2 echo "Makefile.local: written" 1>&3 Modified: vendor/mdocml/dist/configure.local.example ============================================================================== --- vendor/mdocml/dist/configure.local.example Thu Dec 25 21:32:37 2014 (r276215) +++ vendor/mdocml/dist/configure.local.example Thu Dec 25 21:33:25 2014 (r276216) @@ -1,4 +1,4 @@ -# $Id: configure.local.example,v 1.1 2014/08/16 19:00:01 schwarze Exp $ +# $Id: configure.local.example,v 1.2 2014/12/09 09:14:33 schwarze Exp $ # # Copyright (c) 2014 Ingo Schwarze # @@ -58,7 +58,7 @@ HAVE_WCHAR=0 # If you do not want uname(3) to be called but instead want a fixed # string to be used, use the following line: -OSNAME="OpenBSD 5.5" +OSNAME="OpenBSD 5.6" # The following installation directories are used. # It is possible to set only one or a few of these variables, @@ -74,6 +74,19 @@ LIBDIR="${PREFIX}/lib/mandoc" MANDIR="${PREFIX}/man" EXAMPLEDIR="${PREFIX}/share/examples/mandoc" +# Some distributions may want to avoid naming conflicts among manuals. +# If you want to change the names of installed section 7 manual pages, +# the following alternative names are suggested. +# The suffix ".7" will automatically be appended. +# It is possible to set only one or a few of these variables, +# there is no need to copy the whole block. + +MANM_MAN="mandoc_man" # default is "man" +MANM_MDOC="mandoc_mdoc" # default is "mdoc" +MANM_ROFF="mandoc_roff" # default is "roff" +MANM_EQN="mandoc_eqn" # default is "eqn" +MANM_TBL="mandoc_tbl" # default is "tbl" + # It is possible to change the utility program used for installation # and the modes files are installed with. The defaults are: @@ -125,6 +138,21 @@ HAVE_MANPATH=1 HAVE_MANPATH=0 +# Some distributions may want to avoid naming conflicts +# with groff, man-db, or other tools. +# If you want to change the names of binary programs, +# the following alternative names are suggested. +# Using other names is possible as well. +# This changes the names of the installed section 1 and section 8 +# manual pages as well. +# It is possible to set only one or a few of these variables, +# there is no need to copy the whole block. + +BINM_APROPOS=mapropos # default is "apropos" +BINM_MAN=mman # default is "man" +BINM_WHATIS=mwhatis # default is "whatis" +BINM_MAKEWHATIS=mandocdb # default is "makewhatis" + # --- user settings related man.cgi ------------------------------------ # By default, building man.cgi(8) is disabled. To enable it, copy Modified: vendor/mdocml/dist/example.style.css ============================================================================== --- vendor/mdocml/dist/example.style.css Thu Dec 25 21:32:37 2014 (r276215) +++ vendor/mdocml/dist/example.style.css Thu Dec 25 21:33:25 2014 (r276216) @@ -1,4 +1,4 @@ -/* $Id: example.style.css,v 1.53 2014/09/27 11:16:24 kristaps Exp $ */ +/* $Id: example.style.css,v 1.54 2014/12/10 22:19:45 schwarze Exp $ */ /* * This is an example style-sheet provided for mandoc(1) and the -Thtml * or -Txhtml output mode. @@ -20,11 +20,14 @@ div.mandoc div.subsection { } /* Sub-sec div.mandoc table.synopsis { } /* SYNOPSIS section table. */ div.mandoc table.foot { } /* Document footer. */ div.mandoc td.foot-date { width: 50%; } /* Document footer: date. */ -div.mandoc td.foot-os { width: 50%; } /* Document footer: OS/source. */ +div.mandoc td.foot-os { width: 50%; + text-align: right; } /* Document footer: OS/source. */ div.mandoc table.head { } /* Document header. */ div.mandoc td.head-ltitle { width: 10%; } /* Document header: left-title. */ -div.mandoc td.head-vol { width: 80%; } /* Document header: volume. */ -div.mandoc td.head-rtitle { width: 10%; } /* Document header: right-title. */ +div.mandoc td.head-vol { width: 80%; + text-align: center; } /* Document header: volume. */ +div.mandoc td.head-rtitle { width: 10%; + text-align: right; } /* Document header: right-title. */ div.mandoc .display { } /* All Bd, D1, Dl. */ div.mandoc .list { } /* All Bl. */ div.mandoc i { } /* Italic: BI, IB, I, (implicit). */ Modified: vendor/mdocml/dist/html.c ============================================================================== --- vendor/mdocml/dist/html.c Thu Dec 25 21:32:37 2014 (r276215) +++ vendor/mdocml/dist/html.c Thu Dec 25 21:33:25 2014 (r276216) @@ -1,4 +1,4 @@ -/* $Id: html.c,v 1.181 2014/10/29 00:17:43 schwarze Exp $ */ +/* $Id: html.c,v 1.183 2014/12/02 10:08:06 schwarze Exp $ */ /* * Copyright (c) 2008-2011, 2014 Kristaps Dzonsons * Copyright (c) 2011, 2012, 2013, 2014 Ingo Schwarze @@ -30,7 +30,6 @@ #include "mandoc.h" #include "mandoc_aux.h" -#include "libmandoc.h" #include "out.h" #include "html.h" #include "main.h" @@ -563,8 +562,9 @@ print_text(struct html *h, const char *w if ( ! print_encode(h, word, 0)) { if ( ! (h->flags & HTML_NONOSPACE)) h->flags &= ~HTML_NOSPACE; + h->flags &= ~HTML_NONEWLINE; } else - h->flags |= HTML_NOSPACE; + h->flags |= HTML_NOSPACE | HTML_NONEWLINE; if (h->metaf) { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu Dec 25 21:34:30 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B2F38371; Thu, 25 Dec 2014 21:34:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 858613701; Thu, 25 Dec 2014 21:34:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBPLYUmv060730; Thu, 25 Dec 2014 21:34:30 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBPLYUQH060729; Thu, 25 Dec 2014 21:34:30 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201412252134.sBPLYUQH060729@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Thu, 25 Dec 2014 21:34:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r276217 - vendor/mdocml/1.13.2 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Dec 2014 21:34:30 -0000 Author: bapt Date: Thu Dec 25 21:34:29 2014 New Revision: 276217 URL: https://svnweb.freebsd.org/changeset/base/276217 Log: Tag import of mandoc 1.13.2 Added: vendor/mdocml/1.13.2/ - copied from r276216, vendor/mdocml/dist/ From owner-svn-src-all@FreeBSD.ORG Thu Dec 25 21:51:30 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E278463F; Thu, 25 Dec 2014 21:51:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CE7981A12; Thu, 25 Dec 2014 21:51:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBPLpUsi068555; Thu, 25 Dec 2014 21:51:30 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBPLpTbM068550; Thu, 25 Dec 2014 21:51:29 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201412252151.sBPLpTbM068550@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Thu, 25 Dec 2014 21:51:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276218 - head/usr.bin/patch X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Dec 2014 21:51:31 -0000 Author: pfg Date: Thu Dec 25 21:51:28 2014 New Revision: 276218 URL: https://svnweb.freebsd.org/changeset/base/276218 Log: patch: Bring in xstrdup and use it when appropriate. The function savestr allows NULL return values during Plan A patching so in case of out of memory conditions, Plan B can step in. In many cases, NULL value is not properly handled, so use xstrdup here (it's outside Plan A/B patching, which means that even Plan B relies on successful operations). Clean up some whitespaces while here Obtained from: OpenBSD MFC after: 2 weeks Modified: head/usr.bin/patch/patch.c head/usr.bin/patch/pch.c head/usr.bin/patch/util.c head/usr.bin/patch/util.h Modified: head/usr.bin/patch/patch.c ============================================================================== --- head/usr.bin/patch/patch.c Thu Dec 25 21:34:29 2014 (r276217) +++ head/usr.bin/patch/patch.c Thu Dec 25 21:51:28 2014 (r276218) @@ -23,7 +23,7 @@ * -C option added in 1998, original code by Marc Espie, based on FreeBSD * behaviour * - * $OpenBSD: patch.c,v 1.52 2014/11/26 18:34:51 millert Exp $ + * $OpenBSD: patch.c,v 1.54 2014/12/13 10:31:07 tobias Exp $ * $FreeBSD$ * */ @@ -215,13 +215,13 @@ main(int argc, char *argv[]) for (open_patch_file(filearg[1]); there_is_another_patch(); reinitialize_almost_everything()) { /* for each patch in patch file */ - + patch_seen = true; warn_on_invalid_line = true; if (outname == NULL) - outname = savestr(filearg[0]); + outname = xstrdup(filearg[0]); /* for ed script just up and do it and exit */ if (diff_type == ED_DIFF) { @@ -416,7 +416,7 @@ main(int argc, char *argv[]) } set_signals(1); } - + if (!patch_seen) error = 2; @@ -514,10 +514,10 @@ get_some_switches(void) /* FALLTHROUGH */ case 'z': /* must directly follow 'b' case for backwards compat */ - simple_backup_suffix = savestr(optarg); + simple_backup_suffix = xstrdup(optarg); break; case 'B': - origprae = savestr(optarg); + origprae = xstrdup(optarg); break; case 'c': diff_type = CONTEXT_DIFF; @@ -555,7 +555,7 @@ get_some_switches(void) case 'i': if (++filec == MAXFILEC) fatal("too many file arguments\n"); - filearg[filec] = savestr(optarg); + filearg[filec] = xstrdup(optarg); break; case 'l': canonicalize = true; @@ -567,7 +567,7 @@ get_some_switches(void) noreverse = true; break; case 'o': - outname = savestr(optarg); + outname = xstrdup(optarg); break; case 'p': strippath = atoi(optarg); @@ -611,12 +611,12 @@ get_some_switches(void) Argv += optind; if (Argc > 0) { - filearg[0] = savestr(*Argv++); + filearg[0] = xstrdup(*Argv++); Argc--; while (Argc > 0) { if (++filec == MAXFILEC) fatal("too many file arguments\n"); - filearg[filec] = savestr(*Argv++); + filearg[filec] = xstrdup(*Argv++); Argc--; } } Modified: head/usr.bin/patch/pch.c ============================================================================== --- head/usr.bin/patch/pch.c Thu Dec 25 21:34:29 2014 (r276217) +++ head/usr.bin/patch/pch.c Thu Dec 25 21:51:28 2014 (r276218) @@ -205,14 +205,14 @@ there_is_another_patch(void) while (filearg[0] == NULL) { if (force || batch) { say("No file to patch. Skipping...\n"); - filearg[0] = savestr(bestguess); + filearg[0] = xstrdup(bestguess); skip_rest_of_patch = true; return true; } ask("File to patch: "); if (*buf != '\n') { free(bestguess); - bestguess = savestr(buf); + bestguess = xstrdup(buf); filearg[0] = fetchname(buf, &exists, 0); } if (!exists) { @@ -319,7 +319,7 @@ intuit_diff_type(void) else if (strnEQ(s, "Prereq:", 7)) { for (t = s + 7; isspace((unsigned char)*t); t++) ; - revision = savestr(t); + revision = xstrdup(t); for (t = revision; *t && !isspace((unsigned char)*t); t++) ; @@ -403,7 +403,7 @@ scan_exit: free(bestguess); bestguess = NULL; if (filearg[0] != NULL) - bestguess = savestr(filearg[0]); + bestguess = xstrdup(filearg[0]); else if (!ok_to_create_file) { /* * We don't want to create a new file but we need a @@ -1505,7 +1505,7 @@ posix_name(const struct file_name *names path = names[NEW_FILE].path; } - return path ? savestr(path) : NULL; + return path ? xstrdup(path) : NULL; } static char * @@ -1571,7 +1571,7 @@ best_name(const struct file_name *names, best = names[NEW_FILE].path; } - return best ? savestr(best) : NULL; + return best ? xstrdup(best) : NULL; } static size_t @@ -1613,7 +1613,7 @@ strtolinenum(char *nptr, char **endptr) if (errstr != NULL) fatal("invalid line number at line %ld: `%s' is %s\n", p_input_line, nptr, errstr); - + *p = c; *endptr = p; Modified: head/usr.bin/patch/util.c ============================================================================== --- head/usr.bin/patch/util.c Thu Dec 25 21:34:29 2014 (r276217) +++ head/usr.bin/patch/util.c Thu Dec 25 21:51:28 2014 (r276218) @@ -202,6 +202,22 @@ savestr(const char *s) } /* + * Allocate a unique area for a string. Call fatal if out of memory. + */ +char * +xstrdup(const char *s) +{ + char *rv; + + if (!s) + s = "Oops"; + rv = strdup(s); + if (rv == NULL) + fatal("out of memory\n"); + return rv; +} + +/* * Vanilla terminal output (buffered). */ void Modified: head/usr.bin/patch/util.h ============================================================================== --- head/usr.bin/patch/util.h Thu Dec 25 21:34:29 2014 (r276217) +++ head/usr.bin/patch/util.h Thu Dec 25 21:51:28 2014 (r276218) @@ -23,7 +23,7 @@ * -C option added in 1998, original code by Marc Espie, based on FreeBSD * behaviour * - * $OpenBSD: util.h,v 1.15 2005/06/20 07:14:06 otto Exp $ + * $OpenBSD: util.h,v 1.16 2014/12/13 10:31:07 tobias Exp $ * $FreeBSD$ */ @@ -41,6 +41,7 @@ void pfatal(const char *, ...) void ask(const char *, ...) __attribute__((__format__(__printf__, 1, 2))); char *savestr(const char *); +char *xstrdup(const char *); void set_signals(int); void ignore_signals(void); void makedirs(const char *, bool); From owner-svn-src-all@FreeBSD.ORG Thu Dec 25 21:57:01 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B71B79A4; Thu, 25 Dec 2014 21:57:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A0D111AEA; Thu, 25 Dec 2014 21:57:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBPLv1Y7070453; Thu, 25 Dec 2014 21:57:01 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBPLuvTf070418; Thu, 25 Dec 2014 21:56:57 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201412252156.sBPLuvTf070418@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Thu, 25 Dec 2014 21:56:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276219 - in head: contrib/mdocml lib/libmandoc usr.bin/mandoc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Dec 2014 21:57:01 -0000 Author: bapt Date: Thu Dec 25 21:56:56 2014 New Revision: 276219 URL: https://svnweb.freebsd.org/changeset/base/276219 Log: Update mandoc to 1.13.2 Added: head/contrib/mdocml/mandoc_headers.3 - copied unchanged from r276217, vendor/mdocml/dist/mandoc_headers.3 Modified: head/contrib/mdocml/INSTALL head/contrib/mdocml/LICENSE head/contrib/mdocml/Makefile head/contrib/mdocml/Makefile.depend head/contrib/mdocml/NEWS head/contrib/mdocml/TODO head/contrib/mdocml/compat_fts.c head/contrib/mdocml/compat_reallocarray.c head/contrib/mdocml/compat_strcasestr.c head/contrib/mdocml/compat_strsep.c head/contrib/mdocml/config.h head/contrib/mdocml/configure head/contrib/mdocml/configure.local.example head/contrib/mdocml/example.style.css head/contrib/mdocml/html.c head/contrib/mdocml/html.h head/contrib/mdocml/libman.h head/contrib/mdocml/libmandoc.h head/contrib/mdocml/libmdoc.h head/contrib/mdocml/libroff.h head/contrib/mdocml/main.c head/contrib/mdocml/main.h head/contrib/mdocml/man.h head/contrib/mdocml/man_hash.c head/contrib/mdocml/man_html.c head/contrib/mdocml/man_term.c head/contrib/mdocml/mandoc.1 head/contrib/mdocml/mandoc.h head/contrib/mdocml/mandoc_aux.h head/contrib/mdocml/mandocdb.c head/contrib/mdocml/manpath.h head/contrib/mdocml/mansearch.3 head/contrib/mdocml/mansearch.c head/contrib/mdocml/mansearch.h head/contrib/mdocml/mansearch_const.c head/contrib/mdocml/mdoc.7 head/contrib/mdocml/mdoc.h head/contrib/mdocml/mdoc_html.c head/contrib/mdocml/mdoc_macro.c head/contrib/mdocml/mdoc_man.c head/contrib/mdocml/mdoc_term.c head/contrib/mdocml/mdoc_validate.c head/contrib/mdocml/msec.c head/contrib/mdocml/out.c head/contrib/mdocml/out.h head/contrib/mdocml/read.c head/contrib/mdocml/roff.7 head/contrib/mdocml/st.in head/contrib/mdocml/term.c head/contrib/mdocml/term.h head/contrib/mdocml/term_ps.c head/lib/libmandoc/Makefile head/usr.bin/mandoc/Makefile Directory Properties: head/contrib/mdocml/ (props changed) Modified: head/contrib/mdocml/INSTALL ============================================================================== --- head/contrib/mdocml/INSTALL Thu Dec 25 21:51:28 2014 (r276218) +++ head/contrib/mdocml/INSTALL Thu Dec 25 21:56:56 2014 (r276219) @@ -1,13 +1,12 @@ -$Id: INSTALL,v 1.5 2014/08/18 13:27:47 kristaps Exp $ +$Id: INSTALL,v 1.9 2014/12/11 07:44:46 schwarze Exp $ About mdocml, the portable mandoc distribution ---------------------------------------------- The mandoc manpage compiler toolset is a suite of tools compiling mdoc(7), the roff(7) macro language of choice for BSD manual pages, and man(7), the predominant historical language for UNIX manuals. -The toolset does not yet implement man(1); that is only scheduled -for the next release, 1.13.2. It can, however, already serve to -translate source manpages to the output displayed by man(1). +Since the present version 1.13.2, it includes a man(1) manual viewer +in addition to the apropos(1) manual page search tool. For general information, see . In this document, we describe the installation and deployment of @@ -22,7 +21,7 @@ tech@ mailing list, too. Enjoy using the mandoc toolset! -Ingo Schwarze, Karlsruhe, August 2014 +Ingo Schwarze, Karlsruhe, December 2014 Installation @@ -59,8 +58,8 @@ should work. If the build fails, look a and go back to step 2. 4. Run "make -n install" and check whether everything will be -installed to the intended places. Otherwise, put some *DIR variables -into "configure.local" and go back to step 2. +installed to the intended places. Otherwise, put some *DIR or *NM* +variables into "configure.local" and go back to step 2. 5. Run "sudo make install". If you intend to build a binary package using some kind of fake root mechanism, you may need a @@ -70,14 +69,14 @@ in the "Makefile" to understand how DEST 6. To set up a man.cgi(8) server, read its manual page. 7. To use mandoc(1) as your man(1) formatter, read the "Deployment" -section below. +sections below. Understanding mandoc dependencies --------------------------------- -The mandoc(1), preconv(1), and demandoc(1) utilities have no external -dependencies. However, makewhatis(8) and apropos(1) depend on the -following software: +The mandoc(1) and demandoc(1) utilities have no external dependencies. +However, makewhatis(8), apropos(1), and man(1) depend on the following +software: 1. The SQLite database system, see . The recommended version of SQLite is 3.8.4.3 or newer. The mandoc @@ -89,14 +88,14 @@ fails due to the missing sqlite3_errstr( problems, apropos(1) is fully usable with SQLite 3.7.5. Versions older than 3.7.5 may or may not work, they have not been tested. -1.2. The fts(3) directory traversion functions. +2. The fts(3) directory traversion functions. If your system does not have them, the bundled compatibility version will be used, so you need not worry in that case. But be careful: the glibc version of fts(3) is known to be broken on 32bit platforms, see . If you run into that problem, set "HAVE_FTS=0" in configure.local. -1.3. Marc Espie's ohash(3) library. +3. Marc Espie's ohash(3) library. If your system does not have it, the bundled compatibility version will be used, so you probably need not worry about it. @@ -145,11 +144,39 @@ in unusual headers. You can also look a check that no "#define HAVE_*" differ from your expectations. -Deployment ----------- -If you want to integrate the mandoc(1) tools with your existing -man(1) system as a formatter, then contact us first: on systems without -mandoc(1) as the default, you may have your work cut out for you! +Deployment using the integrated man(1) viewer +--------------------------------------------- +This mode of deployment requires database support. In case of +doubt, look at the section "user settings related to database +support" in the file configure.local.example. + +Deployment requires the following steps: + +1. Build and install mandoc as described above in steps 2 to 5 +below "Installation". + +2. If your system uses manpath(1), make sure it is configured +correctly, in particular, it returns all directory trees where +manual pages are installed. If your system uses man.conf(5), make +sure it contains a "_whatdb" line for each directory tree, and the +order of these lines meets your wishes. + +3. Run the command "sudo makewhatis" to build mandoc.db(5) databases +in all the directory trees configured in step 2. + +At this point, your new man(1), apropos(1), and whatis(1) should work. +Otherwise, please look at , both +for help and to have these instructions improved. + +Whenever installing new manual pages, re-run makewhatis(8) to update +the databases, or man(1) will not find the new pages. + + +Deployment using your system's native man(1) viewer +--------------------------------------------------- +This mode of deployment does not require database support, +so it works even if you don't have SQLite3. + Usually, you can have your default installation and mandoc(1) work right alongside each other by using user-specific versions of the files mentioned below. @@ -174,15 +201,17 @@ mandoc(1)" to disregard them. of cached pages being pulled up. You can usually do this by commenting out NOCACHE or similar. + mandoc(1) still has a long way to go in understanding non-trivial low-level roff(7) markup embedded in some man(7) pages. On the BSD systems using mandoc(1), third-party software is generally vetted on whether it may be formatted with mandoc(1). If not, groff(1) is pulled in as a dependency and used to install a pre-formatted -"catpage" intead of directly as manual page source. +"catpage" instead of directly as manual page source. For more background on switching operating systems to use mandoc(1) -instead of groff(1) to format manuals, see the two BSDCan presentations -by Ingo Schwarze: +instead of groff(1) to format manuals, see the BSDCan and EuroBSDCon +presentations by Ingo Schwarze: + Modified: head/contrib/mdocml/LICENSE ============================================================================== --- head/contrib/mdocml/LICENSE Thu Dec 25 21:51:28 2014 (r276218) +++ head/contrib/mdocml/LICENSE Thu Dec 25 21:56:56 2014 (r276219) @@ -1,17 +1,17 @@ -$Id: LICENSE,v 1.4 2014/08/21 00:42:38 schwarze Exp $ +$Id: LICENSE,v 1.5 2014/12/11 07:56:24 schwarze Exp $ With the exceptions noted below, all code and documentation contained in the mdocml toolkit is protected by the Copyright of the following developers: -Copyright (c) 2008, 2009, 2010, 2011, 2012 Kristaps Dzonsons +Copyright (c) 2008-2012, 2014 Kristaps Dzonsons Copyright (c) 2010, 2011, 2012, 2013, 2014 Ingo Schwarze Copyright (c) 2009, 2010, 2011, 2012 Joerg Sonnenberger Copyright (c) 2013 Franco Fichtner Copyright (c) 1999, 2004 Marc Espie Copyright (c) 1998, 2010 Todd C. Miller Copyright (c) 2008 Otto Moerbeek -Copyright (c) 2003 Jason McIntyre +Copyright (c) 2003, 2007, 2008, 2014 Jason McIntyre See the individual source files for information about who contributed to which file during which years. Modified: head/contrib/mdocml/Makefile ============================================================================== --- head/contrib/mdocml/Makefile Thu Dec 25 21:51:28 2014 (r276218) +++ head/contrib/mdocml/Makefile Thu Dec 25 21:56:56 2014 (r276219) @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.448 2014/11/28 18:57:31 schwarze Exp $ +# $Id: Makefile,v 1.453 2014/12/09 09:14:33 schwarze Exp $ # # Copyright (c) 2010, 2011, 2012 Kristaps Dzonsons # Copyright (c) 2011, 2013, 2014 Ingo Schwarze @@ -15,9 +15,7 @@ # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -BASEBIN = mandoc demandoc -DBBIN = makewhatis -CGIBIN = man.cgi +# === LIST OF FILES ==================================================== TESTSRCS = test-dirent-namlen.c \ test-fgetln.c \ @@ -131,6 +129,7 @@ DISTFILES = INSTALL \ mandoc_aux.h \ mandoc_char.7 \ mandoc_escape.3 \ + mandoc_headers.3 \ mandoc_html.3 \ mandoc_malloc.3 \ manpath.h \ @@ -208,18 +207,19 @@ MANDOC_TERM_OBJS = eqn_term.o \ term_ps.o \ tbl_term.o -MANDOC_OBJS = $(MANDOC_HTML_OBJS) \ +BASE_OBJS = $(MANDOC_HTML_OBJS) \ $(MANDOC_MAN_OBJS) \ $(MANDOC_TERM_OBJS) \ main.o \ out.o \ tree.o -MAN_OBJS = $(MANDOC_OBJS) +MAIN_OBJS = $(BASE_OBJS) -MAKEWHATIS_OBJS = mandocdb.o mansearch_const.o manpath.o - -APROPOS_OBJS = mansearch.o mansearch_const.o manpath.o +DB_OBJS = mandocdb.o \ + mansearch.o \ + mansearch_const.o \ + manpath.o CGI_OBJS = $(MANDOC_HTML_OBJS) \ cgi.o \ @@ -237,6 +237,7 @@ WWW_MANS = apropos.1.html \ mandoc.1.html \ mandoc.3.html \ mandoc_escape.3.html \ + mandoc_headers.3.html \ mandoc_html.3.html \ mandoc_malloc.3.html \ mansearch.3.html \ @@ -261,19 +262,17 @@ WWW_MANS = apropos.1.html \ WWW_OBJS = mdocml.tar.gz \ mdocml.sha256 -include Makefile.local +# === USER CONFIGURATION =============================================== -INSTALL_TARGETS = $(BUILD_TARGETS:-build=-install) +include Makefile.local # === DEPENDENCY HANDLING ============================================== all: base-build $(BUILD_TARGETS) Makefile.local -base-build: $(BASEBIN) - -db-build: $(DBBIN) +base-build: mandoc demandoc -cgi-build: $(CGIBIN) +cgi-build: man.cgi install: base-install $(INSTALL_TARGETS) @@ -281,6 +280,9 @@ www: $(WWW_OBJS) $(WWW_MANS) $(WWW_MANS): mandoc +.PHONY: base-install cgi-install db-install install www-install +.PHONY: clean distclean depend + include Makefile.depend # === TARGETS CONTAINING SHELL COMMANDS ================================ @@ -290,8 +292,7 @@ distclean: clean clean: rm -f libmandoc.a $(LIBMANDOC_OBJS) $(COMPAT_OBJS) - rm -f mandoc $(MANDOC_OBJS) $(APROPOS_OBJS) - rm -f makewhatis $(MAKEWHATIS_OBJS) + rm -f mandoc $(BASE_OBJS) $(DB_OBJS) rm -f man.cgi $(CGI_OBJS) rm -f manpage $(MANPAGE_OBJS) rm -f demandoc $(DEMANDOC_OBJS) @@ -306,34 +307,41 @@ base-install: base-build mkdir -p $(DESTDIR)$(MANDIR)/man1 mkdir -p $(DESTDIR)$(MANDIR)/man3 mkdir -p $(DESTDIR)$(MANDIR)/man7 - $(INSTALL_PROGRAM) $(BASEBIN) $(DESTDIR)$(BINDIR) + $(INSTALL_PROGRAM) mandoc demandoc $(DESTDIR)$(BINDIR) $(INSTALL_LIB) libmandoc.a $(DESTDIR)$(LIBDIR) $(INSTALL_LIB) man.h mandoc.h mandoc_aux.h mdoc.h \ $(DESTDIR)$(INCLUDEDIR) - $(INSTALL_MAN) man.1 mandoc.1 demandoc.1 \ - $(DESTDIR)$(MANDIR)/man1 + $(INSTALL_MAN) mandoc.1 demandoc.1 $(DESTDIR)$(MANDIR)/man1 $(INSTALL_MAN) mandoc.3 mandoc_escape.3 mandoc_malloc.3 \ mchars_alloc.3 tbl.3 $(DESTDIR)$(MANDIR)/man3 - $(INSTALL_MAN) man.7 mdoc.7 roff.7 eqn.7 tbl.7 mandoc_char.7 \ - $(DESTDIR)$(MANDIR)/man7 + $(INSTALL_MAN) man.7 $(DESTDIR)$(MANDIR)/man7/${MANM_MAN}.7 + $(INSTALL_MAN) mdoc.7 $(DESTDIR)$(MANDIR)/man7/${MANM_MDOC}.7 + $(INSTALL_MAN) roff.7 $(DESTDIR)$(MANDIR)/man7/${MANM_ROFF}.7 + $(INSTALL_MAN) eqn.7 $(DESTDIR)$(MANDIR)/man7/${MANM_EQN}.7 + $(INSTALL_MAN) tbl.7 $(DESTDIR)$(MANDIR)/man7/${MANM_TBL}.7 + $(INSTALL_MAN) mandoc_char.7 $(DESTDIR)$(MANDIR)/man7 $(INSTALL_DATA) example.style.css $(DESTDIR)$(EXAMPLEDIR) -db-install: db-build +db-install: base-build mkdir -p $(DESTDIR)$(BINDIR) mkdir -p $(DESTDIR)$(SBINDIR) mkdir -p $(DESTDIR)$(MANDIR)/man1 mkdir -p $(DESTDIR)$(MANDIR)/man3 mkdir -p $(DESTDIR)$(MANDIR)/man5 mkdir -p $(DESTDIR)$(MANDIR)/man8 - ln -f $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/apropos - ln -f $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/whatis - $(INSTALL_PROGRAM) makewhatis $(DESTDIR)$(SBINDIR) - $(INSTALL_MAN) apropos.1 $(DESTDIR)$(MANDIR)/man1 - ln -f $(DESTDIR)$(MANDIR)/man1/apropos.1 \ - $(DESTDIR)$(MANDIR)/man1/whatis.1 + ln -f $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_APROPOS) + ln -f $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_MAN) + ln -f $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_WHATIS) + ln -f $(DESTDIR)$(BINDIR)/mandoc \ + $(DESTDIR)$(SBINDIR)/$(BINM_MAKEWHATIS) + $(INSTALL_MAN) apropos.1 $(DESTDIR)$(MANDIR)/man1/$(BINM_APROPOS).1 + $(INSTALL_MAN) man.1 $(DESTDIR)$(MANDIR)/man1/$(BINM_MAN).1 + ln -f $(DESTDIR)$(MANDIR)/man1/$(BINM_APROPOS).1 \ + $(DESTDIR)$(MANDIR)/man1/$(BINM_WHATIS).1 $(INSTALL_MAN) mansearch.3 $(DESTDIR)$(MANDIR)/man3 $(INSTALL_MAN) mandoc.db.5 $(DESTDIR)$(MANDIR)/man5 - $(INSTALL_MAN) makewhatis.8 $(DESTDIR)$(MANDIR)/man8 + $(INSTALL_MAN) makewhatis.8 \ + $(DESTDIR)$(MANDIR)/man8/$(BINM_MAKEWHATIS).8 cgi-install: cgi-build mkdir -p $(DESTDIR)$(CGIBINDIR) @@ -346,34 +354,15 @@ cgi-install: cgi-build $(INSTALL_MAN) apropos.1 $(DESTDIR)$(WWWPREFIX)/man/mandoc/man1/ $(INSTALL_MAN) man.cgi.8 $(DESTDIR)$(WWWPREFIX)/man/mandoc/man8/ -www-install: www - mkdir -p $(DESTDIR)$(HTDOCDIR)/snapshots - $(INSTALL_DATA) $(WWW_MANS) style.css $(DESTDIR)$(HTDOCDIR) - $(INSTALL_DATA) $(WWW_OBJS) $(DESTDIR)$(HTDOCDIR)/snapshots - $(INSTALL_DATA) mdocml.tar.gz \ - $(DESTDIR)$(HTDOCDIR)/snapshots/mdocml-$(VERSION).tar.gz - $(INSTALL_DATA) mdocml.sha256 \ - $(DESTDIR)$(HTDOCDIR)/snapshots/mdocml-$(VERSION).sha256 - Makefile.local config.h: configure ${TESTSRCS} @echo "$@ is out of date; please run ./configure" @exit 1 -depend: config.h - mkdep -f Makefile.depend $(CFLAGS) $(SRCS) - perl -e 'undef $$/; $$_ = <>; s|/usr/include/\S+||g; \ - s|\\\n||g; s| +| |g; s| $$||mg; print;' \ - Makefile.depend > Makefile.tmp - mv Makefile.tmp Makefile.depend - libmandoc.a: $(COMPAT_OBJS) $(LIBMANDOC_OBJS) $(AR) rs $@ $(COMPAT_OBJS) $(LIBMANDOC_OBJS) -mandoc: $(MAN_OBJS) libmandoc.a - $(CC) $(LDFLAGS) -o $@ $(MAN_OBJS) libmandoc.a $(DBLIB) - -makewhatis: $(MAKEWHATIS_OBJS) libmandoc.a - $(CC) $(LDFLAGS) -o $@ $(MAKEWHATIS_OBJS) libmandoc.a $(DBLIB) +mandoc: $(MAIN_OBJS) libmandoc.a + $(CC) $(LDFLAGS) -o $@ $(MAIN_OBJS) libmandoc.a $(DBLIB) manpage: $(MANPAGE_OBJS) libmandoc.a $(CC) $(LDFLAGS) -o $@ $(MANPAGE_OBJS) libmandoc.a $(DBLIB) @@ -384,6 +373,24 @@ man.cgi: $(CGI_OBJS) libmandoc.a demandoc: $(DEMANDOC_OBJS) libmandoc.a $(CC) $(LDFLAGS) -o $@ $(DEMANDOC_OBJS) libmandoc.a +# --- maintainer targets --- + +www-install: www + mkdir -p $(HTDOCDIR)/snapshots + $(INSTALL_DATA) $(WWW_MANS) style.css $(HTDOCDIR)/man + $(INSTALL_DATA) $(WWW_OBJS) $(HTDOCDIR)/snapshots + $(INSTALL_DATA) mdocml.tar.gz \ + $(HTDOCDIR)/snapshots/mdocml-$(VERSION).tar.gz + $(INSTALL_DATA) mdocml.sha256 \ + $(HTDOCDIR)/snapshots/mdocml-$(VERSION).sha256 + +depend: config.h + mkdep -f Makefile.depend $(CFLAGS) $(SRCS) + perl -e 'undef $$/; $$_ = <>; s|/usr/include/\S+||g; \ + s|\\\n||g; s| +| |g; s| $$||mg; print;' \ + Makefile.depend > Makefile.tmp + mv Makefile.tmp Makefile.depend + mdocml.sha256: mdocml.tar.gz sha256 mdocml.tar.gz > $@ @@ -394,8 +401,8 @@ mdocml.tar.gz: $(DISTFILES) ( cd .dist/ && tar zcf ../$@ mdocml-$(VERSION) ) rm -rf .dist/ -.PHONY: base-install cgi-install db-install install www-install -.PHONY: clean distclean depend +# === SUFFIX RULES ===================================================== + .SUFFIXES: .1 .3 .5 .7 .8 .h .SUFFIXES: .1.html .3.html .5.html .7.html .8.html .h.html Modified: head/contrib/mdocml/Makefile.depend ============================================================================== --- head/contrib/mdocml/Makefile.depend Thu Dec 25 21:51:28 2014 (r276218) +++ head/contrib/mdocml/Makefile.depend Thu Dec 25 21:56:56 2014 (r276219) @@ -15,12 +15,12 @@ demandoc.o: demandoc.c config.h man.h md eqn.o: eqn.c config.h mandoc.h mandoc_aux.h libmandoc.h libroff.h eqn_html.o: eqn_html.c config.h mandoc.h out.h html.h eqn_term.o: eqn_term.c config.h mandoc.h out.h term.h -html.o: html.c config.h mandoc.h mandoc_aux.h libmandoc.h out.h html.h main.h +html.o: html.c config.h mandoc.h mandoc_aux.h out.h html.h main.h lib.o: lib.c config.h mdoc.h libmdoc.h lib.in main.o: main.c config.h mandoc.h mandoc_aux.h main.h mdoc.h man.h manpath.h mansearch.h man.o: man.c config.h man.h mandoc.h mandoc_aux.h libman.h libmandoc.h -man_hash.o: man_hash.c config.h man.h mandoc.h libman.h -man_html.o: man_html.c config.h mandoc.h mandoc_aux.h out.h html.h man.h main.h +man_hash.o: man_hash.c config.h man.h libman.h +man_html.o: man_html.c config.h mandoc_aux.h man.h out.h html.h main.h man_macro.o: man_macro.c config.h man.h mandoc.h libmandoc.h libman.h man_term.o: man_term.c config.h mandoc.h mandoc_aux.h out.h man.h term.h main.h man_validate.o: man_validate.c config.h man.h mandoc.h mandoc_aux.h libman.h libmandoc.h @@ -30,19 +30,19 @@ mandocdb.o: mandocdb.c config.h compat_f manpage.o: manpage.c config.h manpath.h mansearch.h manpath.o: manpath.c config.h mandoc_aux.h manpath.h mansearch.o: mansearch.c config.h compat_ohash.h mandoc.h mandoc_aux.h manpath.h mansearch.h -mansearch_const.o: mansearch_const.c config.h manpath.h mansearch.h +mansearch_const.o: mansearch_const.c config.h mansearch.h mdoc.o: mdoc.c config.h mdoc.h mandoc.h mandoc_aux.h libmdoc.h libmandoc.h mdoc_argv.o: mdoc_argv.c config.h mdoc.h mandoc.h mandoc_aux.h libmdoc.h libmandoc.h mdoc_hash.o: mdoc_hash.c config.h mdoc.h libmdoc.h -mdoc_html.o: mdoc_html.c config.h mandoc.h mandoc_aux.h out.h html.h mdoc.h main.h +mdoc_html.o: mdoc_html.c config.h mandoc_aux.h mdoc.h out.h html.h main.h mdoc_macro.o: mdoc_macro.c config.h mdoc.h mandoc.h libmdoc.h libmandoc.h mdoc_man.o: mdoc_man.c config.h mandoc.h mandoc_aux.h out.h man.h mdoc.h main.h mdoc_term.o: mdoc_term.c config.h mandoc.h mandoc_aux.h out.h term.h mdoc.h main.h mdoc_validate.o: mdoc_validate.c config.h mdoc.h mandoc.h mandoc_aux.h libmdoc.h libmandoc.h -msec.o: msec.c config.h mandoc.h libmandoc.h msec.in +msec.o: msec.c config.h libmandoc.h msec.in out.o: out.c config.h mandoc_aux.h mandoc.h out.h preconv.o: preconv.c config.h mandoc.h libmandoc.h -read.o: read.c config.h mandoc.h mandoc_aux.h libmandoc.h mdoc.h man.h main.h +read.o: read.c config.h mandoc.h mandoc_aux.h libmandoc.h mdoc.h man.h roff.o: roff.c config.h mandoc.h mandoc_aux.h libmandoc.h libroff.h predefs.in st.o: st.c config.h mdoc.h libmdoc.h st.in tbl.o: tbl.c config.h mandoc.h mandoc_aux.h libmandoc.h libroff.h @@ -53,7 +53,7 @@ tbl_opts.o: tbl_opts.c config.h mandoc.h tbl_term.o: tbl_term.c config.h mandoc.h out.h term.h term.o: term.c config.h mandoc.h mandoc_aux.h out.h term.h main.h term_ascii.o: term_ascii.c config.h mandoc.h mandoc_aux.h out.h term.h main.h -term_ps.o: term_ps.c config.h mandoc.h mandoc_aux.h out.h main.h term.h +term_ps.o: term_ps.c config.h mandoc_aux.h out.h term.h main.h tree.o: tree.c config.h mandoc.h mdoc.h man.h main.h test-dirent-namlen.o: test-dirent-namlen.c test-fgetln.o: test-fgetln.c Modified: head/contrib/mdocml/NEWS ============================================================================== --- head/contrib/mdocml/NEWS Thu Dec 25 21:51:28 2014 (r276218) +++ head/contrib/mdocml/NEWS Thu Dec 25 21:56:56 2014 (r276219) @@ -1,7 +1,76 @@ -$Id: NEWS,v 1.6 2014/08/11 01:39:00 schwarze Exp $ +$Id: NEWS,v 1.8 2014/12/13 13:43:47 schwarze Exp $ This file lists the most important changes in the mdocml.bsd.lv distribution. +Changes in version 1.13.2, released on December 13, 2014 + + --- MAJOR NEW FEATURES --- + * Include an implementation of man(1), the manual page viewer. + * Unified set of command line option, each one supported by all + command names, including new options -a (format all), -c (no + pager), -h (synopsis only), and -w (list filenames). + * Support the MANPAGER and PAGER environment variables. + * Support gzip'ed manuals by the whole toolset, even as .so targets. + * Support UTF-8 and Latin-1 input by the whole toolset, delete preconv(1). + * Switch the default output mode from -Tascii to -Tlocale. + * Improve -Tascii output for Unicode escape sequences. + * Let the -Thtml output mode produce polyglot HTML5. + * Many improvements for eqn(7), in particular in-line equations, + MathML output in -Thtml mode, and much improved terminal formatting. + --- PORTABILITY IMPROVEMENTS --- + * Change the build sequence to the usual ./configure; make; make install. + * Support ./configure.local for build customizations. + * Autodetect wchar, sqlite3, and manpath support. + * Provide a fallback version of fts(3) for systems lacking it. + * Support choosing alternative binary and manual names. + --- MINOR NEW FEATURES --- + * Rudimentary implementation of the e, x, and z tbl(7) layout + modifiers to equalize, maximize, and ignore the width of columns. + * Implement font modifiers in tbl(7) layouts. + * Allow comma-separated options in the tbl(7) options line. + * Parse and ignore the .pl (page length) roff(7) request. + * Implement .An -[no]split for the mdoc(7) -Thtml output mode. + * Support bold italic font in PostScript and PDF output. + * Warn about commas in function arguments and parentheses in function names. + * Warn about botched .Xr ordering and punctuation below SEE ALSO. + * Warn about AUTHORS sections without .An macros. + * Warn about attempts to call non-callable macros. + * New developer documentation manual page mandoc_headers(3). + --- BUGFIXES --- + * Fix read buffer overrun sometimes triggered by trailing whitespace. + * Fix read buffer overrun triggered by certain invalid \H sequences. + * Fix NULL pointer access triggered by .Bl without any arguments. + * Fix NULL pointer access triggered by .It Nm Fo without .Fc. + * Fix NULL pointer access triggered by .Sh Xo .Sh without .Xc. + * Fix NULL pointer access triggered by missing .Nm. + * Fix an assertion triggered by .It right after .El. + * Fix an assertion triggered by .Ec without preceding .Eo. + * Fix an assertion triggered by .Sm or .Db with multiple arguments. + * Fix assertion failures triggered by very large width arguments. + * Fix a division by zero in the roff(7) parser. + * Prevent negative arguments to .ll from causing integer underflow. + * Correctly autodetect source format even when .Dd is preceded by .ll. + * Multiple fixes with respect to .Bd and .Bl -offset and -width. + * Many bugfixes with respect to scaling units. + * Multiple fixes with respect to delimiter handling by in-line macros. + * Multiple fixes with respect to .Pf. + * Make \c work properly in no-fill mode. + * Stricter syntax checking of Unicode character names. + --- THANKS TO --- + * Kristaps Dzonsons for rewriting the eqn(7) parser, implementing + HTML5 and MathML output, and various other code contributions. + * Jonathan Gray (OpenBSD) for extensive testing with afl (the + American Fuzzy Lop security fuzzer) resulting in many bug reports. + * Anthony Bentley (OpenBSD), Baptiste Daroussin (FreeBSD), Daniel + Dickman, Doug Hogan, Jason McIntyre, Theo de Raadt (OpenBSD), + and Martin Natano for source code patches. + * Carsten Kunze (Heirloom troff), Daniel Levai (Slackware), + Garrett D'Amore (illumos), Giovanni Becchis, Matthew Dempsky, + Stuart Henderson, Ted Unangst, Todd Miller (OpenBSD), Thomas + Klausner (NetBSD), Ulrich Spoerlein (FreeBSD), Justin Haynes, + Marcus Merighi, Sebastien Marie, Steffen Nurpmeso and Theo Buehler + for bug reports. + Changes in version 1.13.1, released on August 10, 2014 --- MAJOR NEW FEATURES --- Modified: head/contrib/mdocml/TODO ============================================================================== --- head/contrib/mdocml/TODO Thu Dec 25 21:51:28 2014 (r276218) +++ head/contrib/mdocml/TODO Thu Dec 25 21:56:56 2014 (r276219) @@ -1,6 +1,6 @@ ************************************************************************ * Official mandoc TODO. -* $Id: TODO,v 1.189 2014/11/26 21:40:17 schwarze Exp $ +* $Id: TODO,v 1.195 2014/12/13 13:14:39 schwarze Exp $ ************************************************************************ Many issues are annotated for difficulty as follows: @@ -72,7 +72,8 @@ are mere guesses, and some may be wrong. - .ta (tab settings) occurs in ircbug(1) and probably gnats(1) reported by brad@ Sat, 15 Jan 2011 15:50:51 -0500 also Tcl_NewStringObj(3) via wiz@ Wed, 5 Mar 2014 22:27:43 +0100 - loc ** exist *** algo ** size ** imp ** + also posix2time(3) Carsten Kunze Mon, 1 Dec 2014 13:03:10 +0100 + loc ** exist *** algo ** size ** imp *** - .ti (temporary indent) found by naddy@ in xloadimage(1) @@ -83,14 +84,10 @@ are mere guesses, and some may be wrong. found by jca@ in ratpoison(1) Sun, 30 Jun 2013 12:01:09 +0200 loc * exist ** algo ** size ** imp ** -- \c (interrupted text) should prevent the line break - even inside .Bd literal; that occurs in chat(8) - also found in cclive(1) - DocBook output - loc ** exist *** algo ** size * imp * - - \h horizontal move - found in cclive(1) DocBook output - Anthony J. Bentley on discuss@ Sat, 21 Sep 2013 22:29:34 -0600 + found in cclive(1) and nasm(1) asciidoc/DocBook output + bentley@ on discuss@ Sat, 21 Sep 2013 22:29:34 -0600 + naddy@ Thu, 4 Dec 2014 16:26:41 +0100 loc ** exist ** algo ** size * imp ** (parser reorg helps a lot) - \n+ and \n- numerical register increment and decrement @@ -125,13 +122,6 @@ are mere guesses, and some may be wrong. from jmc@ Wed, 14 Jul 2010 18:10:32 +0100 loc * exist *** algo *** size ** imp ** -- \\ is now implemented correctly - * when defining strings and macros using .ds and .de - * when parsing roff(7) and man(7) macro arguments - It does not yet work in mdoc(7) macro arguments - because libmdoc does not yet use mandoc_getarg(). - Also check what happens in plain text, it must be identical to \e. - - .Bd -centered implies -filled, not -unfilled, which is not easy to implement; it requires code similar to .ce, which we don't have either. @@ -172,12 +162,6 @@ are mere guesses, and some may be wrong. is not safe, e.g. `.Bl -column .It Pf a b .' gives "ab." but should give "ab ." -- set a meaningful default if no `Bl' list type is assigned - loc * exist * algo * size * imp ** (already done?) - -- have a blank `It' head for `Bl -tag' not puke - loc * exist * algo * size * imp ** (already done?) - - check whether it is correct that `D1' uses INDENT+1; does it need its own constant? loc * exist ** algo ** size * imp ** @@ -315,9 +299,18 @@ are mere guesses, and some may be wrong. * formatting issues: ugly output ************************************************************************ -- a column list with blank `Ta' cells triggers a spurrious +- revisit empty in-line macros + look at the difference between "Em x Em ." and "Sq x Em ." + Carsten Kunze Fri, 12 Dec 2014 00:15:41 +0100 + loc *** exist *** algo *** size * imp ** + +- a column list with blank `Ta' cells triggers a spurious start-with-whitespace printing of a newline +- In .Bl -column, .It a"bc" + shows the quotes in groff, but not in mandoc + loc * exist *** algo ** size * imp ** + - In .Bl -column, .It Em AuthenticationKey Length ought to render "Key Length" with emphasis, too, @@ -403,16 +396,6 @@ are mere guesses, and some may be wrong. Steffen Nurpmeso Sat, 08 Nov 2014 13:34:59 +0100 loc * exist ** algo ** size * imp ** -- .Rv (and probably .Ex) print different text if an `Nm' has been named - or not (run a manual without `Nm blah' to see this). I'm not sure - that this exists in the wild, but it's still an error. - loc * exist * algo * size * imp * (already done?) - -- In .Bl -bullet, the groff bullet is "+\b+\bo\bo", the mandoc bullet - is just "o\bo". The problem is to not break ps/pdf when fixing. - see for example OpenBSD ksh(1) - loc ** exist ** algo ** size * imp ** - - In .Bl -enum -width 0n, groff continues one the same line after the number, mandoc breaks the line. mail to kristaps@ Mon, 20 Jul 2009 02:21:39 +0200 @@ -601,3 +584,9 @@ Several areas can be cleaned up to make - Have Mac OSX systems automatically disable -static compilation of the CGI: -static isn't supported. +************************************************************************ +* to improve in the groff_mdoc(7) macros +************************************************************************ + +- use uname(1) to set doc-default-operating-system at install time + tobimensch Mon, 1 Dec 2014 00:25:07 +0100 Modified: head/contrib/mdocml/compat_fts.c ============================================================================== --- head/contrib/mdocml/compat_fts.c Thu Dec 25 21:51:28 2014 (r276218) +++ head/contrib/mdocml/compat_fts.c Thu Dec 25 21:56:56 2014 (r276219) @@ -6,8 +6,8 @@ int dummy; #else -/* $Id: compat_fts.c,v 1.4 2014/08/17 20:45:59 schwarze Exp $ */ -/* $OpenBSD: fts.c,v 1.46 2014/05/25 17:47:04 tedu Exp $ */ +/* $Id: compat_fts.c,v 1.6 2014/12/11 18:20:07 schwarze Exp $ */ +/* $OpenBSD: fts.c,v 1.49 2014/11/23 00:14:22 guenther Exp $ */ /*- * Copyright (c) 1990, 1993, 1994 @@ -62,6 +62,10 @@ static unsigned short fts_stat(FTS *, F static int fts_safe_changedir(FTS *, FTSENT *, int, const char *); #define ISDOT(a) (a[0] == '.' && (!a[1] || (a[1] == '.' && !a[2]))) +#define MAX(a,b) (((a)>(b))?(a):(b)) +#ifndef O_DIRECTORY +#define O_DIRECTORY 0 +#endif #define CLR(opt) (sp->fts_options &= ~(opt)) #define ISSET(opt) (sp->fts_options & (opt)) @@ -146,7 +150,8 @@ fts_open(char * const *argv, int options * and ".." are all fairly nasty problems. Note, if we can't get the * descriptor we run anyway, just more slowly. */ - if (!ISSET(FTS_NOCHDIR) && (sp->fts_rfd = open(".", O_RDONLY, 0)) < 0) + if (!ISSET(FTS_NOCHDIR) && + (sp->fts_rfd = open(".", O_RDONLY | O_CLOEXEC)) < 0) SET(FTS_NOCHDIR); if (nitems == 0) @@ -406,7 +411,7 @@ fts_build(FTS *sp) DIR *dirp; void *oldaddr; size_t dlen, len, maxlen; - int nitems, cderrno, descend, level, nlinks, nostat, doadjust; + int nitems, cderrno, descend, level, doadjust; int saved_errno; char *cp; @@ -424,14 +429,6 @@ fts_build(FTS *sp) } /* - * Nlinks is the number of possible entries of type directory in the - * directory if we're cheating on stat calls, 0 if we're not doing - * any stat calls at all, -1 if we're doing stats on everything. - */ - nlinks = -1; - nostat = 0; - - /* * If we're going to need to stat anything or we want to descend * and stay in the directory, chdir. If this fails we keep going, * but set a flag so we don't chdir after the post-order visit. @@ -448,8 +445,7 @@ fts_build(FTS *sp) */ cderrno = 0; if (fts_safe_changedir(sp, cur, dirfd(dirp), NULL)) { - if (nlinks) - cur->fts_errno = errno; + cur->fts_errno = errno; cur->fts_flags |= FTS_DONTCHDIR; descend = 0; cderrno = errno; @@ -544,21 +540,9 @@ mem1: saved_errno = errno; } if (cderrno) { - if (nlinks) { - p->fts_info = FTS_NS; - p->fts_errno = cderrno; - } else - p->fts_info = FTS_NSOK; + p->fts_info = FTS_NS; + p->fts_errno = cderrno; p->fts_accpath = cur->fts_accpath; - } else if (nlinks == 0 -#ifdef DT_DIR - || (nostat && - dp->d_type != DT_DIR && dp->d_type != DT_UNKNOWN) -#endif - ) { - p->fts_accpath = - ISSET(FTS_NOCHDIR) ? p->fts_path : p->fts_name; - p->fts_info = FTS_NSOK; } else { /* Build a file name for fts_stat to stat. */ if (ISSET(FTS_NOCHDIR)) { @@ -568,11 +552,6 @@ mem1: saved_errno = errno; p->fts_accpath = p->fts_name; /* Stat it. */ p->fts_info = fts_stat(sp, p); - - /* Decrement link count if applicable. */ - if (nlinks > 0 && (p->fts_info == FTS_D || - p->fts_info == FTS_DC || p->fts_info == FTS_DOT)) - --nlinks; } /* We walk in directory order so "ls -f" doesn't get upset. */ @@ -803,7 +782,7 @@ fts_safe_changedir(FTS *sp, FTSENT *p, i newfd = fd; if (ISSET(FTS_NOCHDIR)) return (0); - if (fd < 0 && (newfd = open(path, O_RDONLY, 0)) < 0) + if (fd < 0 && (newfd = open(path, O_RDONLY|O_DIRECTORY|O_CLOEXEC)) < 0) return (-1); if (fstat(newfd, &sb)) { ret = -1; Modified: head/contrib/mdocml/compat_reallocarray.c ============================================================================== --- head/contrib/mdocml/compat_reallocarray.c Thu Dec 25 21:51:28 2014 (r276218) +++ head/contrib/mdocml/compat_reallocarray.c Thu Dec 25 21:56:56 2014 (r276219) @@ -6,7 +6,8 @@ int dummy; #else -/* $OpenBSD: malloc.c,v 1.158 2014/04/23 15:07:27 tedu Exp $ */ +/* $Id: compat_reallocarray.c,v 1.4 2014/12/11 09:05:01 schwarze Exp $ */ +/* $OpenBSD: reallocarray.c,v 1.2 2014/12/08 03:45:00 bcook Exp $ */ /* * Copyright (c) 2008 Otto Moerbeek * @@ -22,12 +23,17 @@ int dummy; * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ + #include #include #include #include -#define MUL_NO_OVERFLOW (1UL << (sizeof(size_t) * 4)) +/* + * This is sqrt(SIZE_MAX+1), as s1*s2 <= SIZE_MAX + * if both s1 < MUL_NO_OVERFLOW and s2 < MUL_NO_OVERFLOW + */ +#define MUL_NO_OVERFLOW ((size_t)1 << (sizeof(size_t) * 4)) void * reallocarray(void *optr, size_t nmemb, size_t size) Modified: head/contrib/mdocml/compat_strcasestr.c ============================================================================== --- head/contrib/mdocml/compat_strcasestr.c Thu Dec 25 21:51:28 2014 (r276218) +++ head/contrib/mdocml/compat_strcasestr.c Thu Dec 25 21:56:56 2014 (r276219) @@ -6,7 +6,8 @@ int dummy; #else -/* ($)NetBSD: strcasestr.c,v 1.2 2005/02/09 21:35:47 kleink Exp $ */ +/* $Id: compat_strcasestr.c,v 1.4 2014/12/11 09:19:32 schwarze Exp $ */ +/* $NetBSD: strcasestr.c,v 1.3 2005/11/29 03:12:00 christos Exp $ */ /*- * Copyright (c) 1990, 1993 Modified: head/contrib/mdocml/compat_strsep.c ============================================================================== --- head/contrib/mdocml/compat_strsep.c Thu Dec 25 21:51:28 2014 (r276218) +++ head/contrib/mdocml/compat_strsep.c Thu Dec 25 21:56:56 2014 (r276219) @@ -6,7 +6,8 @@ int dummy; #else -/* ($)OpenBSD: strsep.c,v 1.6 2005/08/08 08:05:37 espie Exp $ */ +/* $Id: compat_strsep.c,v 1.4 2014/12/11 09:05:01 schwarze Exp $ */ +/* $OpenBSD: strsep.c,v 1.7 2014/02/05 20:42:32 stsp Exp $ */ /*- * Copyright (c) 1990, 1993 Modified: head/contrib/mdocml/config.h ============================================================================== --- head/contrib/mdocml/config.h Thu Dec 25 21:51:28 2014 (r276218) +++ head/contrib/mdocml/config.h Thu Dec 25 21:56:56 2014 (r276219) @@ -7,7 +7,7 @@ #include -#define VERSION "1.13.1" +#define VERSION "1.13.2" #define HAVE_DIRENT_NAMLEN 1 #define HAVE_FGETLN 1 #define HAVE_FTS 1 @@ -25,6 +25,11 @@ #define HAVE_OHASH 1 #define HAVE_MANPATH 1 +#define BINM_APROPOS "apropos" +#define BINM_MAN "man" +#define BINM_WHATIS "whatis" +#define BINM_MAKEWHATIS "makewhatis" + #if !defined(__BEGIN_DECLS) # ifdef __cplusplus # define __BEGIN_DECLS extern "C" { Modified: head/contrib/mdocml/configure ============================================================================== --- head/contrib/mdocml/configure Thu Dec 25 21:51:28 2014 (r276218) +++ head/contrib/mdocml/configure Thu Dec 25 21:56:56 2014 (r276219) @@ -31,7 +31,7 @@ echo "config.log: writing..." # Initialize all variables here, # such that nothing can leak in from the environment. -VERSION="1.13.1" +VERSION="1.13.2" echo "VERSION=\"${VERSION}\"" 1>&2 echo "VERSION=\"${VERSION}\"" 1>&3 @@ -75,6 +75,16 @@ WWWPREFIX="/var/www" HTDOCDIR= CGIBINDIR= +BINM_APROPOS="apropos" +BINM_MAN="man" +BINM_WHATIS="whatis" +BINM_MAKEWHATIS="makewhatis" +MANM_MAN="man" +MANM_MDOC="mdoc" +MANM_ROFF="roff" +MANM_EQN="eqn" +MANM_TBL="tbl" + INSTALL="install" INSTALL_PROGRAM= INSTALL_LIB= @@ -285,6 +295,11 @@ cat << __HEREDOC__ #define HAVE_OHASH ${HAVE_OHASH} #define HAVE_MANPATH ${HAVE_MANPATH} +#define BINM_APROPOS "${BINM_APROPOS}" +#define BINM_MAN "${BINM_MAN}" +#define BINM_WHATIS "${BINM_WHATIS}" +#define BINM_MAKEWHATIS "${BINM_MAKEWHATIS}" + #if !defined(__BEGIN_DECLS) # ifdef __cplusplus # define __BEGIN_DECLS extern "C" { @@ -358,12 +373,15 @@ if [ ${BUILD_DB} -eq 0 -a ${BUILD_CGI} - fi BUILD_TARGETS="base-build" -[ ${BUILD_DB} -gt 0 ] && BUILD_TARGETS="${BUILD_TARGETS} db-build" [ ${BUILD_CGI} -gt 0 ] && BUILD_TARGETS="${BUILD_TARGETS} cgi-build" +INSTALL_TARGETS="base-install" +[ ${BUILD_DB} -gt 0 ] && INSTALL_TARGETS="${INSTALL_TARGETS} db-install" +[ ${BUILD_CGI} -gt 0 ] && INSTALL_TARGETS="${INSTALL_TARGETS} cgi-install" cat << __HEREDOC__ VERSION = ${VERSION} BUILD_TARGETS = ${BUILD_TARGETS} +INSTALL_TARGETS = ${INSTALL_TARGETS} CFLAGS = ${CFLAGS} DBLIB = ${DBLIB} STATIC = ${STATIC} @@ -377,6 +395,15 @@ EXAMPLEDIR = ${EXAMPLEDIR} WWWPREFIX = ${WWWPREFIX} HTDOCDIR = ${HTDOCDIR} CGIBINDIR = ${CGIBINDIR} +BINM_APROPOS = ${BINM_APROPOS} +BINM_MAN = ${BINM_MAN} +BINM_WHATIS = ${BINM_WHATIS} +BINM_MAKEWHATIS = ${BINM_MAKEWHATIS} +MANM_MAN = ${MANM_MAN} +MANM_MDOC = ${MANM_MDOC} +MANM_ROFF = ${MANM_ROFF} +MANM_EQN = ${MANM_EQN} +MANM_TBL = ${MANM_TBL} INSTALL = ${INSTALL} INSTALL_PROGRAM = ${INSTALL_PROGRAM} INSTALL_LIB = ${INSTALL_LIB} @@ -385,7 +412,7 @@ INSTALL_DATA = ${INSTALL_DATA} __HEREDOC__ [ ${BUILD_DB} -gt 0 ] && \ - echo "MAN_OBJS = \$(MANDOC_OBJS) \$(APROPOS_OBJS)" + echo "MAIN_OBJS = \$(BASE_OBJS) \$(DB_OBJS)" echo "Makefile.local: written" 1>&2 echo "Makefile.local: written" 1>&3 Modified: head/contrib/mdocml/configure.local.example ============================================================================== --- head/contrib/mdocml/configure.local.example Thu Dec 25 21:51:28 2014 (r276218) +++ head/contrib/mdocml/configure.local.example Thu Dec 25 21:56:56 2014 (r276219) @@ -1,4 +1,4 @@ -# $Id: configure.local.example,v 1.1 2014/08/16 19:00:01 schwarze Exp $ +# $Id: configure.local.example,v 1.2 2014/12/09 09:14:33 schwarze Exp $ # # Copyright (c) 2014 Ingo Schwarze # @@ -58,7 +58,7 @@ HAVE_WCHAR=0 # If you do not want uname(3) to be called but instead want a fixed # string to be used, use the following line: -OSNAME="OpenBSD 5.5" +OSNAME="OpenBSD 5.6" # The following installation directories are used. # It is possible to set only one or a few of these variables, @@ -74,6 +74,19 @@ LIBDIR="${PREFIX}/lib/mandoc" MANDIR="${PREFIX}/man" EXAMPLEDIR="${PREFIX}/share/examples/mandoc" +# Some distributions may want to avoid naming conflicts among manuals. +# If you want to change the names of installed section 7 manual pages, +# the following alternative names are suggested. +# The suffix ".7" will automatically be appended. +# It is possible to set only one or a few of these variables, +# there is no need to copy the whole block. + +MANM_MAN="mandoc_man" # default is "man" +MANM_MDOC="mandoc_mdoc" # default is "mdoc" +MANM_ROFF="mandoc_roff" # default is "roff" +MANM_EQN="mandoc_eqn" # default is "eqn" +MANM_TBL="mandoc_tbl" # default is "tbl" + # It is possible to change the utility program used for installation # and the modes files are installed with. The defaults are: @@ -125,6 +138,21 @@ HAVE_MANPATH=1 HAVE_MANPATH=0 +# Some distributions may want to avoid naming conflicts +# with groff, man-db, or other tools. +# If you want to change the names of binary programs, +# the following alternative names are suggested. +# Using other names is possible as well. +# This changes the names of the installed section 1 and section 8 +# manual pages as well. +# It is possible to set only one or a few of these variables, +# there is no need to copy the whole block. + +BINM_APROPOS=mapropos # default is "apropos" +BINM_MAN=mman # default is "man" +BINM_WHATIS=mwhatis # default is "whatis" +BINM_MAKEWHATIS=mandocdb # default is "makewhatis" + # --- user settings related man.cgi ------------------------------------ # By default, building man.cgi(8) is disabled. To enable it, copy Modified: head/contrib/mdocml/example.style.css ============================================================================== --- head/contrib/mdocml/example.style.css Thu Dec 25 21:51:28 2014 (r276218) +++ head/contrib/mdocml/example.style.css Thu Dec 25 21:56:56 2014 (r276219) @@ -1,4 +1,4 @@ -/* $Id: example.style.css,v 1.53 2014/09/27 11:16:24 kristaps Exp $ */ +/* $Id: example.style.css,v 1.54 2014/12/10 22:19:45 schwarze Exp $ */ /* * This is an example style-sheet provided for mandoc(1) and the -Thtml * or -Txhtml output mode. @@ -20,11 +20,14 @@ div.mandoc div.subsection { } /* Sub-sec div.mandoc table.synopsis { } /* SYNOPSIS section table. */ div.mandoc table.foot { } /* Document footer. */ div.mandoc td.foot-date { width: 50%; } /* Document footer: date. */ -div.mandoc td.foot-os { width: 50%; } /* Document footer: OS/source. */ +div.mandoc td.foot-os { width: 50%; + text-align: right; } /* Document footer: OS/source. */ div.mandoc table.head { } /* Document header. */ div.mandoc td.head-ltitle { width: 10%; } /* Document header: left-title. */ -div.mandoc td.head-vol { width: 80%; } /* Document header: volume. */ -div.mandoc td.head-rtitle { width: 10%; } /* Document header: right-title. */ +div.mandoc td.head-vol { width: 80%; + text-align: center; } /* Document header: volume. */ +div.mandoc td.head-rtitle { width: 10%; + text-align: right; } /* Document header: right-title. */ div.mandoc .display { } /* All Bd, D1, Dl. */ div.mandoc .list { } /* All Bl. */ div.mandoc i { } /* Italic: BI, IB, I, (implicit). */ Modified: head/contrib/mdocml/html.c ============================================================================== --- head/contrib/mdocml/html.c Thu Dec 25 21:51:28 2014 (r276218) +++ head/contrib/mdocml/html.c Thu Dec 25 21:56:56 2014 (r276219) @@ -1,4 +1,4 @@ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu Dec 25 22:04:18 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2A7EFC31; Thu, 25 Dec 2014 22:04:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 179851C60; Thu, 25 Dec 2014 22:04:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBPM4HRP074992; Thu, 25 Dec 2014 22:04:17 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBPM4Hg4074991; Thu, 25 Dec 2014 22:04:17 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201412252204.sBPM4Hg4074991@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Thu, 25 Dec 2014 22:04:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276220 - head/usr.bin/man X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Dec 2014 22:04:18 -0000 Author: bapt Date: Thu Dec 25 22:04:16 2014 New Revision: 276220 URL: https://svnweb.freebsd.org/changeset/base/276220 Log: mandoc -Tlocale is now the default, no need to enforce it anymore Modified: head/usr.bin/man/man.sh Modified: head/usr.bin/man/man.sh ============================================================================== --- head/usr.bin/man/man.sh Thu Dec 25 21:56:56 2014 (r276219) +++ head/usr.bin/man/man.sh Thu Dec 25 22:04:16 2014 (r276220) @@ -312,7 +312,7 @@ man_display_page() { fi testline="mandoc -Tlint -Werror 2>/dev/null" - pipeline="mandoc -Tlocale | $MANPAGER" + pipeline="mandoc | $MANPAGER" if ! eval "$cattool $manpage | $testline" ;then if which -s groff; then From owner-svn-src-all@FreeBSD.ORG Thu Dec 25 22:29:38 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7CDBF159; Thu, 25 Dec 2014 22:29:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 690C21FBC; Thu, 25 Dec 2014 22:29:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBPMTcF7085024; Thu, 25 Dec 2014 22:29:38 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBPMTcPp085023; Thu, 25 Dec 2014 22:29:38 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201412252229.sBPMTcPp085023@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Thu, 25 Dec 2014 22:29:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276221 - head/sys/fs/nfsclient X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Dec 2014 22:29:38 -0000 Author: rmacklem Date: Thu Dec 25 22:29:37 2014 New Revision: 276221 URL: https://svnweb.freebsd.org/changeset/base/276221 Log: Delete some duplicate code that was harmless because exactly the same code is at the end of the nfscl_checksattr() function that is called just before it. As such, this code had already been executed and didn't do anything. MFC after: 1 week Modified: head/sys/fs/nfsclient/nfs_clvnops.c Modified: head/sys/fs/nfsclient/nfs_clvnops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clvnops.c Thu Dec 25 22:04:16 2014 (r276220) +++ head/sys/fs/nfsclient/nfs_clvnops.c Thu Dec 25 22:29:37 2014 (r276221) @@ -1606,20 +1606,6 @@ again: } } else if (NFS_ISV34(dvp) && (fmode & O_EXCL)) { if (nfscl_checksattr(vap, &nfsva)) { - /* - * We are normally called with only a partially - * initialized VAP. Since the NFSv3 spec says that - * the server may use the file attributes to - * store the verifier, the spec requires us to do a - * SETATTR RPC. FreeBSD servers store the verifier in - * atime, but we can't really assume that all servers - * will so we ensure that our SETATTR sets both atime - * and mtime. - */ - if (vap->va_mtime.tv_sec == VNOVAL) - vfs_timestamp(&vap->va_mtime); - if (vap->va_atime.tv_sec == VNOVAL) - vap->va_atime = vap->va_mtime; error = nfsrpc_setattr(newvp, vap, NULL, cnp->cn_cred, cnp->cn_thread, &nfsva, &attrflag, NULL); if (error && (vap->va_uid != (uid_t)VNOVAL || From owner-svn-src-all@FreeBSD.ORG Fri Dec 26 00:01:01 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EC3A4FB; Fri, 26 Dec 2014 00:01:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D85C536A0; Fri, 26 Dec 2014 00:01:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBQ011on031806; Fri, 26 Dec 2014 00:01:01 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBQ011iO031805; Fri, 26 Dec 2014 00:01:01 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201412260001.sBQ011iO031805@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Fri, 26 Dec 2014 00:01:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276224 - head/sys/modules/if_gif X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2014 00:01:02 -0000 Author: bz Date: Fri Dec 26 00:01:00 2014 New Revision: 276224 URL: https://svnweb.freebsd.org/changeset/base/276224 Log: Let's see if we can fix the NOINET if_gif(4) module build after r276215 going by example. Modified: head/sys/modules/if_gif/Makefile Modified: head/sys/modules/if_gif/Makefile ============================================================================== --- head/sys/modules/if_gif/Makefile Thu Dec 25 23:57:31 2014 (r276223) +++ head/sys/modules/if_gif/Makefile Fri Dec 26 00:01:00 2014 (r276224) @@ -6,7 +6,11 @@ SYSDIR?=${.CURDIR}/../.. .PATH: ${SYSDIR}/net ${SYSDIR}/netinet ${SYSDIR}/netinet6 KMOD= if_gif -SRCS= if_gif.c in_gif.c opt_inet.h opt_inet6.h +SRCS= if_gif.c opt_inet.h opt_inet6.h + +.if ${MK_INET_SUPPORT} != "no" +SRCS+= in_gif.c +.endif .if ${MK_INET6_SUPPORT} != "no" SRCS+= in6_gif.c From owner-svn-src-all@FreeBSD.ORG Fri Dec 26 01:12:03 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7B6CDA36; Fri, 26 Dec 2014 01:12:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6686B2233; Fri, 26 Dec 2014 01:12:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBQ1C3op065269; Fri, 26 Dec 2014 01:12:03 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBQ1C3io065268; Fri, 26 Dec 2014 01:12:03 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201412260112.sBQ1C3io065268@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Fri, 26 Dec 2014 01:12:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276226 - head/cddl/contrib/opensolaris/cmd/zpool X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2014 01:12:03 -0000 Author: smh Date: Fri Dec 26 01:12:02 2014 New Revision: 276226 URL: https://svnweb.freebsd.org/changeset/base/276226 Log: Enhancements to zpool upgrade processing Introduce a seperate phase to list all unavailable pools when listing pools to upgrade. This avoids confusing output when displaying older and disabled feature pools. These existing phases now silently skip unavailable pools. Introduce cb_unavail to upgrade_cbdata_t which enables the final output for zpool list to correctly detail if all pools or only all available pools where up-to-date on version / features. Correct the type of upgrade_cbdata_t.cb_first from int -> boolean_t. Change the pool iteration when upgrading named pools to include unavailable pools and update upgrade_one so it doesn't try to upgrade unavailable pools but warns about them. This allows the correct error to be displayed as well as upgrades with available and unavailable pools intermixed to partially complete. Also correct some missing trailing \n's from output in upgrade_one. MFC after: 1 month X-MFC-With: r276194 Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Fri Dec 26 00:10:08 2014 (r276225) +++ head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Fri Dec 26 01:12:02 2014 (r276226) @@ -4509,11 +4509,12 @@ zpool_do_status(int argc, char **argv) } typedef struct upgrade_cbdata { - int cb_first; - char cb_poolname[ZPOOL_MAXNAMELEN]; - int cb_argc; - uint64_t cb_version; - char **cb_argv; + boolean_t cb_first; + boolean_t cb_unavail; + char cb_poolname[ZPOOL_MAXNAMELEN]; + int cb_argc; + uint64_t cb_version; + char **cb_argv; } upgrade_cbdata_t; #ifdef __FreeBSD__ @@ -4631,7 +4632,8 @@ upgrade_cb(zpool_handle_t *zhp, void *ar if (zpool_get_state(zhp) == POOL_STATE_UNAVAIL) { (void) fprintf(stderr, gettext("cannot upgrade '%s': pool is " - "currently unavailable\n\n"), zpool_get_name(zhp)); + "currently unavailable.\n\n"), zpool_get_name(zhp)); + cbp->cb_unavail = B_TRUE; /* Allow iteration to continue. */ return (0); } @@ -4697,12 +4699,41 @@ upgrade_cb(zpool_handle_t *zhp, void *ar } static int +upgrade_list_unavail(zpool_handle_t *zhp, void *arg) +{ + upgrade_cbdata_t *cbp = arg; + + if (zpool_get_state(zhp) == POOL_STATE_UNAVAIL) { + if (cbp->cb_first) { + (void) fprintf(stderr, gettext("The following pools " + "are unavailable and cannot be upgraded as this " + "time.\n\n")); + (void) fprintf(stderr, gettext("POOL\n")); + (void) fprintf(stderr, gettext("------------\n")); + cbp->cb_first = B_FALSE; + } + (void) printf(gettext("%s\n"), zpool_get_name(zhp)); + cbp->cb_unavail = B_TRUE; + } + return (0); +} + +static int upgrade_list_older_cb(zpool_handle_t *zhp, void *arg) { upgrade_cbdata_t *cbp = arg; nvlist_t *config; uint64_t version; + if (zpool_get_state(zhp) == POOL_STATE_UNAVAIL) { + /* + * This will have been reported by upgrade_list_unavail so + * just allow iteration to continue. + */ + cbp->cb_unavail = B_TRUE; + return (0); + } + config = zpool_get_config(zhp, NULL); verify(nvlist_lookup_uint64(config, ZPOOL_CONFIG_VERSION, &version) == 0); @@ -4737,10 +4768,11 @@ upgrade_list_disabled_cb(zpool_handle_t uint64_t version; if (zpool_get_state(zhp) == POOL_STATE_UNAVAIL) { - (void) fprintf(stderr, gettext("cannot check supported " - "features on '%s': pool is currently unavailable\n\n"), - zpool_get_name(zhp)); - /* Allow iteration to continue. */ + /* + * This will have been reported by upgrade_list_unavail so + * just allow iteration to continue. + */ + cbp->cb_unavail = B_TRUE; return (0); } @@ -4797,10 +4829,17 @@ upgrade_one(zpool_handle_t *zhp, void *d uint64_t cur_version; int ret; + if (zpool_get_state(zhp) == POOL_STATE_UNAVAIL) { + (void) fprintf(stderr, gettext("cannot upgrade '%s': pool is " + "is currently unavailable.\n\n"), zpool_get_name(zhp)); + cbp->cb_unavail = B_TRUE; + return (1); + } + if (strcmp("log", zpool_get_name(zhp)) == 0) { (void) printf(gettext("'log' is now a reserved word\n" "Pool 'log' must be renamed using export and import" - " to upgrade.\n")); + " to upgrade.\n\n")); return (1); } @@ -4844,7 +4883,7 @@ upgrade_one(zpool_handle_t *zhp, void *d #endif /* __FreeBSD __*/ } else if (cur_version == SPA_VERSION) { (void) printf(gettext("Pool '%s' already has all " - "supported features enabled.\n"), + "supported features enabled.\n\n"), zpool_get_name(zhp)); } } @@ -5001,11 +5040,13 @@ zpool_do_upgrade(int argc, char **argv) ret = zpool_iter(g_zfs, upgrade_cb, &cb); if (ret == 0 && cb.cb_first) { if (cb.cb_version == SPA_VERSION) { - (void) printf(gettext("All pools are already " - "formatted using feature flags.\n\n")); - (void) printf(gettext("Every feature flags " + (void) printf(gettext("All %spools are already " + "formatted using feature flags.\n\n"), + cb.cb_unavail ? gettext("available ") : ""); + (void) printf(gettext("Every %sfeature flags " "pool already has all supported features " - "enabled.\n")); + "enabled.\n"), + cb.cb_unavail ? gettext("available ") : ""); } else { (void) printf(gettext("All pools are already " "formatted with version %llu or higher.\n"), @@ -5014,12 +5055,21 @@ zpool_do_upgrade(int argc, char **argv) } } else if (argc == 0) { cb.cb_first = B_TRUE; + ret = zpool_iter(g_zfs, upgrade_list_unavail, &cb); + assert(ret == 0); + + if (!cb.cb_first) { + (void) fprintf(stderr, "\n"); + } + + cb.cb_first = B_TRUE; ret = zpool_iter(g_zfs, upgrade_list_older_cb, &cb); assert(ret == 0); if (cb.cb_first) { - (void) printf(gettext("All pools are formatted " - "using feature flags.\n\n")); + (void) printf(gettext("All %spools are formatted using " + "feature flags.\n\n"), cb.cb_unavail ? + gettext("available ") : ""); } else { (void) printf(gettext("\nUse 'zpool upgrade -v' " "for a list of available legacy versions.\n")); @@ -5030,13 +5080,14 @@ zpool_do_upgrade(int argc, char **argv) assert(ret == 0); if (cb.cb_first) { - (void) printf(gettext("Every feature flags pool has " - "all supported features enabled.\n")); + (void) printf(gettext("Every %sfeature flags pool has " + "all supported features enabled.\n"), + cb.cb_unavail ? gettext("available ") : ""); } else { (void) printf(gettext("\n")); } } else { - ret = for_each_pool(argc, argv, B_FALSE, NULL, + ret = for_each_pool(argc, argv, B_TRUE, NULL, upgrade_one, &cb); } From owner-svn-src-all@FreeBSD.ORG Fri Dec 26 01:48:45 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CE4C2101; Fri, 26 Dec 2014 01:48:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BA51D292C; Fri, 26 Dec 2014 01:48:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBQ1mjsH080014; Fri, 26 Dec 2014 01:48:45 GMT (envelope-from kevlo@FreeBSD.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBQ1mjTW080012; Fri, 26 Dec 2014 01:48:45 GMT (envelope-from kevlo@FreeBSD.org) Message-Id: <201412260148.sBQ1mjTW080012@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kevlo set sender to kevlo@FreeBSD.org using -f From: Kevin Lo Date: Fri, 26 Dec 2014 01:48:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276227 - in head/share/man: man4 man9 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2014 01:48:45 -0000 Author: kevlo Date: Fri Dec 26 01:48:44 2014 New Revision: 276227 URL: https://svnweb.freebsd.org/changeset/base/276227 Log: Mention cc_cdg. Modified: head/share/man/man4/mod_cc.4 head/share/man/man9/mod_cc.9 Modified: head/share/man/man4/mod_cc.4 ============================================================================== --- head/share/man/man4/mod_cc.4 Fri Dec 26 01:12:02 2014 (r276226) +++ head/share/man/man4/mod_cc.4 Fri Dec 26 01:48:44 2014 (r276227) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 15, 2011 +.Dd December 26, 2014 .Dt MOD_CC 4 .Os .Sh NAME @@ -75,6 +75,7 @@ one of the names listed by the MIB variable. .El .Sh SEE ALSO +.Xr cc_cdg 4 , .Xr cc_chd 4 , .Xr cc_cubic 4 , .Xr cc_hd 4 , Modified: head/share/man/man9/mod_cc.9 ============================================================================== --- head/share/man/man9/mod_cc.9 Fri Dec 26 01:12:02 2014 (r276226) +++ head/share/man/man9/mod_cc.9 Fri Dec 26 01:48:44 2014 (r276227) @@ -31,7 +31,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 25, 2014 +.Dd December 26, 2014 .Dt MOD_CC 9 .Os .Sh NAME @@ -290,6 +290,7 @@ by the value of the congestion window. Algorithms should use the absence of this flag being set to avoid accumulating a large difference between the congestion window and send window. .Sh SEE ALSO +.Xr cc_cdg 4 , .Xr cc_chd 4 , .Xr cc_cubic 4 , .Xr cc_hd 4 , From owner-svn-src-all@FreeBSD.ORG Fri Dec 26 03:28:56 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 36968D38; Fri, 26 Dec 2014 03:28:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 22FD82287; Fri, 26 Dec 2014 03:28:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBQ33gpk017477; Fri, 26 Dec 2014 03:03:42 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBQ33gN7017476; Fri, 26 Dec 2014 03:03:42 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201412260303.sBQ33gN7017476@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Fri, 26 Dec 2014 03:03:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276228 - head/contrib/binutils/gas X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2014 03:28:56 -0000 Author: pfg Date: Fri Dec 26 03:03:41 2014 New Revision: 276228 URL: https://svnweb.freebsd.org/changeset/base/276228 Log: gas: use memmove instead of bogus memcpy. partial_where points into the buffer that begins with buffer_start so we need to use memmove() to handle the overlap. Sourceware-PR 11456. Obtained from: OpenBSD (CVS rev. 1.2) MFC after: 3 days Modified: head/contrib/binutils/gas/input-scrub.c Modified: head/contrib/binutils/gas/input-scrub.c ============================================================================== --- head/contrib/binutils/gas/input-scrub.c Fri Dec 26 01:48:44 2014 (r276227) +++ head/contrib/binutils/gas/input-scrub.c Fri Dec 26 03:03:41 2014 (r276228) @@ -335,7 +335,7 @@ input_scrub_next_buffer (char **bufp) if (partial_size) { - memcpy (buffer_start + BEFORE_SIZE, partial_where, + memmove (buffer_start + BEFORE_SIZE, partial_where, (unsigned int) partial_size); memcpy (buffer_start + BEFORE_SIZE, save_source, AFTER_SIZE); } From owner-svn-src-all@FreeBSD.ORG Fri Dec 26 04:33:54 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 945FC799; Fri, 26 Dec 2014 04:33:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 74E323C56; Fri, 26 Dec 2014 04:33:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBQ4XsUb059175; Fri, 26 Dec 2014 04:33:54 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBQ4Xspd059173; Fri, 26 Dec 2014 04:33:54 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201412260433.sBQ4Xspd059173@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Fri, 26 Dec 2014 04:33:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276229 - head/contrib/binutils/gas X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2014 04:33:54 -0000 Author: pfg Date: Fri Dec 26 04:33:53 2014 New Revision: 276229 URL: https://svnweb.freebsd.org/changeset/base/276229 Log: Backport fix for binutils 11867: .quad directive not assembled correctly Alan Modra (and Alan's employer) graciously permitted use of his patch under GPLv2. Obtained from: OpenBSD MFC after: 5 days Modified: head/contrib/binutils/gas/expr.c head/contrib/binutils/gas/read.c Modified: head/contrib/binutils/gas/expr.c ============================================================================== --- head/contrib/binutils/gas/expr.c Fri Dec 26 03:03:41 2014 (r276228) +++ head/contrib/binutils/gas/expr.c Fri Dec 26 04:33:53 2014 (r276229) @@ -1040,6 +1040,15 @@ operand (expressionS *expressionP, enum { for (i = 0; i < expressionP->X_add_number; ++i) generic_bignum[i] = ~generic_bignum[i]; + + /* Extend the bignum to at least the size of .octa. */ + if (expressionP->X_add_number < SIZE_OF_LARGE_NUMBER) + { + expressionP->X_add_number = SIZE_OF_LARGE_NUMBER; + for (; i < expressionP->X_add_number; ++i) + generic_bignum[i] = ~(LITTLENUM_TYPE) 0; + } + if (c == '-') for (i = 0; i < expressionP->X_add_number; ++i) { @@ -1050,14 +1059,12 @@ operand (expressionS *expressionP, enum } else if (c == '!') { - int nonzero = 0; for (i = 0; i < expressionP->X_add_number; ++i) - { - if (generic_bignum[i]) - nonzero = 1; - generic_bignum[i] = 0; - } - generic_bignum[0] = nonzero; + if (generic_bignum[i] != 0) + break; + expressionP->X_add_number = i >= expressionP->X_add_number; + expressionP->X_op = O_constant; + expressionP->X_unsigned = 1; } } else if (expressionP->X_op != O_illegal Modified: head/contrib/binutils/gas/read.c ============================================================================== --- head/contrib/binutils/gas/read.c Fri Dec 26 03:03:41 2014 (r276228) +++ head/contrib/binutils/gas/read.c Fri Dec 26 04:33:53 2014 (r276229) @@ -4117,15 +4117,32 @@ emit_expr (expressionS *exp, unsigned in unsigned int size; LITTLENUM_TYPE *nums; - know (nbytes % CHARS_PER_LITTLENUM == 0); - size = exp->X_add_number * CHARS_PER_LITTLENUM; if (nbytes < size) { - as_warn (_("bignum truncated to %d bytes"), nbytes); + int i = nbytes / CHARS_PER_LITTLENUM; + if (i != 0) + { + LITTLENUM_TYPE sign = 0; + if ((generic_bignum[--i] + & (1 << (LITTLENUM_NUMBER_OF_BITS - 1))) != 0) + sign = ~(LITTLENUM_TYPE) 0; + while (++i < exp->X_add_number) + if (generic_bignum[i] != sign) + break; + } + if (i < exp->X_add_number) + as_warn (_("bignum truncated to %d bytes"), nbytes); size = nbytes; } + if (nbytes == 1) + { + md_number_to_chars (p, (valueT) generic_bignum[0], 1); + return; + } + know (nbytes % CHARS_PER_LITTLENUM == 0); + if (target_big_endian) { while (nbytes > size) From owner-svn-src-all@FreeBSD.ORG Fri Dec 26 07:34:44 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0F08C65A; Fri, 26 Dec 2014 07:34:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EF64A661A3; Fri, 26 Dec 2014 07:34:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBQ7YhqP041774; Fri, 26 Dec 2014 07:34:43 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBQ7YhQo041773; Fri, 26 Dec 2014 07:34:43 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201412260734.sBQ7YhQo041773@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Fri, 26 Dec 2014 07:34:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276230 - head/contrib/ee X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2014 07:34:44 -0000 Author: bapt Date: Fri Dec 26 07:34:42 2014 New Revision: 276230 URL: https://svnweb.freebsd.org/changeset/base/276230 Log: Fix .TH having too many arguments Modified: head/contrib/ee/ee.1 Modified: head/contrib/ee/ee.1 ============================================================================== --- head/contrib/ee/ee.1 Fri Dec 26 04:33:53 2014 (r276229) +++ head/contrib/ee/ee.1 Fri Dec 26 07:34:42 2014 (r276230) @@ -7,7 +7,7 @@ .\" $Header: /home/hugh/sources/old_ae/RCS/ee.1,v 1.22 2001/12/16 04:49:27 hugh Exp $ .\" .\" -.TH ee 1 "" "" "" "" +.TH ee 1 "" "" "" .SH NAME ee \- easy editor .SH SYNOPSIS From owner-svn-src-all@FreeBSD.ORG Fri Dec 26 07:36:43 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A39747B3; Fri, 26 Dec 2014 07:36:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 75DF2661C7; Fri, 26 Dec 2014 07:36:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBQ7ahhG042083; Fri, 26 Dec 2014 07:36:43 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBQ7ahTV042082; Fri, 26 Dec 2014 07:36:43 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201412260736.sBQ7ahTV042082@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Fri, 26 Dec 2014 07:36:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276231 - head/contrib/bzip2 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2014 07:36:43 -0000 Author: bapt Date: Fri Dec 26 07:36:42 2014 New Revision: 276231 URL: https://svnweb.freebsd.org/changeset/base/276231 Log: Remove unknown macro Modified: head/contrib/bzip2/bzip2.1 Modified: head/contrib/bzip2/bzip2.1 ============================================================================== --- head/contrib/bzip2/bzip2.1 Fri Dec 26 07:34:42 2014 (r276230) +++ head/contrib/bzip2/bzip2.1 Fri Dec 26 07:36:42 2014 (r276231) @@ -1,4 +1,3 @@ -.PU .TH bzip2 1 .SH NAME bzip2, bunzip2 \- a block-sorting file compressor, v1.0.6 From owner-svn-src-all@FreeBSD.ORG Fri Dec 26 09:09:51 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4EAC7101; Fri, 26 Dec 2014 09:09:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3A7D666676; Fri, 26 Dec 2014 09:09:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBQ99pl9083769; Fri, 26 Dec 2014 09:09:51 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBQ99pbj083768; Fri, 26 Dec 2014 09:09:51 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201412260909.sBQ99pbj083768@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 26 Dec 2014 09:09:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276232 - stable/10/sys/dev/isp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2014 09:09:51 -0000 Author: mav Date: Fri Dec 26 09:09:50 2014 New Revision: 276232 URL: https://svnweb.freebsd.org/changeset/base/276232 Log: MFC r275112: Make isp_find_pdb_by_*() search for targets in portdb in reverse order. Records with target_mode == 1 are allocated from the end of portdb, so it seems logical to start search from the end not traverse whole array. Modified: stable/10/sys/dev/isp/isp_library.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/isp/isp_library.c ============================================================================== --- stable/10/sys/dev/isp/isp_library.c Fri Dec 26 07:36:42 2014 (r276231) +++ stable/10/sys/dev/isp/isp_library.c Fri Dec 26 09:09:50 2014 (r276232) @@ -2369,7 +2369,7 @@ isp_find_pdb_by_wwn(ispsoftc_t *isp, int if (chan < isp->isp_nchan) { fcp = FCPARAM(isp, chan); - for (i = 0; i < MAX_FC_TARG; i++) { + for (i = MAX_FC_TARG - 1; i >= 0; i--) { fcportdb_t *lp = &fcp->portdb[i]; if (lp->target_mode == 0) { @@ -2392,7 +2392,7 @@ isp_find_pdb_by_loopid(ispsoftc_t *isp, if (chan < isp->isp_nchan) { fcp = FCPARAM(isp, chan); - for (i = 0; i < MAX_FC_TARG; i++) { + for (i = MAX_FC_TARG - 1; i >= 0; i--) { fcportdb_t *lp = &fcp->portdb[i]; if (lp->target_mode == 0) { @@ -2418,7 +2418,7 @@ isp_find_pdb_by_sid(ispsoftc_t *isp, int } fcp = FCPARAM(isp, chan); - for (i = 0; i < MAX_FC_TARG; i++) { + for (i = MAX_FC_TARG - 1; i >= 0; i--) { fcportdb_t *lp = &fcp->portdb[i]; if (lp->target_mode == 0) { From owner-svn-src-all@FreeBSD.ORG Fri Dec 26 09:11:27 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D12CF237; Fri, 26 Dec 2014 09:11:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BC2F466714; Fri, 26 Dec 2014 09:11:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBQ9BRY4085303; Fri, 26 Dec 2014 09:11:27 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBQ9BRxt085300; Fri, 26 Dec 2014 09:11:27 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201412260911.sBQ9BRxt085300@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 26 Dec 2014 09:11:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276233 - stable/10/sys/dev/isp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2014 09:11:28 -0000 Author: mav Date: Fri Dec 26 09:11:26 2014 New Revision: 276233 URL: https://svnweb.freebsd.org/changeset/base/276233 Log: MFC r275118: Some microoptimizations. Modified: stable/10/sys/dev/isp/isp_freebsd.c stable/10/sys/dev/isp/isp_freebsd.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/isp/isp_freebsd.c ============================================================================== --- stable/10/sys/dev/isp/isp_freebsd.c Fri Dec 26 09:09:50 2014 (r276232) +++ stable/10/sys/dev/isp/isp_freebsd.c Fri Dec 26 09:11:26 2014 (r276233) @@ -877,7 +877,7 @@ is_lun_enabled(ispsoftc_t *isp, int bus, ISP_GET_PC_ADDR(isp, bus, lun_hash[LUN_HASH_FUNC(lun)], lhp); SLIST_FOREACH(tptr, lhp, next) { - if (xpt_path_lun_id(tptr->owner) == lun) { + if (tptr->ts_lun == lun) { return (1); } } @@ -909,16 +909,13 @@ get_lun_statep(ispsoftc_t *isp, int bus, { tstate_t *tptr = NULL; struct tslist *lhp; - int i; if (bus < isp->isp_nchan) { - for (i = 0; i < LUN_HASH_SIZE; i++) { - ISP_GET_PC_ADDR(isp, bus, lun_hash[i], lhp); - SLIST_FOREACH(tptr, lhp, next) { - if (xpt_path_lun_id(tptr->owner) == lun) { - tptr->hold++; - return (tptr); - } + ISP_GET_PC_ADDR(isp, bus, lun_hash[LUN_HASH_FUNC(lun)], lhp); + SLIST_FOREACH(tptr, lhp, next) { + if (tptr->ts_lun == lun) { + tptr->hold++; + return (tptr); } } } @@ -1132,6 +1129,7 @@ create_lun_state(ispsoftc_t *isp, int bu if (tptr == NULL) { return (CAM_RESRC_UNAVAIL); } + tptr->ts_lun = lun; status = xpt_create_path(&tptr->owner, NULL, xpt_path_path_id(path), xpt_path_target_id(path), lun); if (status != CAM_REQ_CMP) { free(tptr, M_DEVBUF); @@ -1149,7 +1147,7 @@ create_lun_state(ispsoftc_t *isp, int bu tptr->ntpool[i].next = &tptr->ntpool[i+1]; tptr->ntfree = tptr->ntpool; tptr->hold = 1; - ISP_GET_PC_ADDR(isp, bus, lun_hash[LUN_HASH_FUNC(xpt_path_lun_id(tptr->owner))], lhp); + ISP_GET_PC_ADDR(isp, bus, lun_hash[LUN_HASH_FUNC(lun)], lhp); SLIST_INSERT_HEAD(lhp, tptr, next); *rslt = tptr; ISP_PATH_PRT(isp, ISP_LOGTDEBUG0, path, "created tstate\n"); @@ -1180,7 +1178,7 @@ destroy_lun_state(ispsoftc_t *isp, tstat xpt_done(ccb); } } while (ccb); - ISP_GET_PC_ADDR(isp, cam_sim_bus(xpt_path_sim(tptr->owner)), lun_hash[LUN_HASH_FUNC(xpt_path_lun_id(tptr->owner))], lhp); + ISP_GET_PC_ADDR(isp, cam_sim_bus(xpt_path_sim(tptr->owner)), lun_hash[LUN_HASH_FUNC(tptr->ts_lun)], lhp); SLIST_REMOVE(lhp, tptr, tstate, next); ISP_PATH_PRT(isp, ISP_LOGTDEBUG0, tptr->owner, "destroyed tstate\n"); xpt_free_path(tptr->owner); @@ -1356,7 +1354,7 @@ isp_enable_deferred_luns(ispsoftc_t *isp SLIST_FOREACH(tptr, lhp, next) { tptr->hold++; if (tptr->enabled == 0) { - if (isp_enable_deferred(isp, bus, xpt_path_lun_id(tptr->owner)) == CAM_REQ_CMP) { + if (isp_enable_deferred(isp, bus, tptr->ts_lun) == CAM_REQ_CMP) { tptr->enabled = 1; n++; } @@ -6011,7 +6009,7 @@ isp_async(ispsoftc_t *isp, ispasync_t cm */ tptr = get_lun_statep_from_tag(isp, chan, abts->abts_rxid_task); if (tptr) { - nt->nt_lun = xpt_path_lun_id(tptr->owner); + nt->nt_lun = tptr->ts_lun; rls_lun_statep(isp, tptr); } else { nt->nt_lun = LUN_ANY; Modified: stable/10/sys/dev/isp/isp_freebsd.h ============================================================================== --- stable/10/sys/dev/isp/isp_freebsd.h Fri Dec 26 09:09:50 2014 (r276232) +++ stable/10/sys/dev/isp/isp_freebsd.h Fri Dec 26 09:11:26 2014 (r276233) @@ -95,7 +95,7 @@ void isp_put_ecmd(struct ispsoftc *, is #define ISP_TARGET_FUNCTIONS 1 #define ATPDPSIZE 4096 -#define ATPDPHASHSIZE 16 +#define ATPDPHASHSIZE 32 #define ATPDPHASH(x) ((((x) >> 24) ^ ((x) >> 16) ^ ((x) >> 8) ^ (x)) & \ ((ATPDPHASHSIZE) - 1)) @@ -163,6 +163,7 @@ typedef struct isp_timed_notify_ack { TAILQ_HEAD(isp_ccbq, ccb_hdr); typedef struct tstate { SLIST_ENTRY(tstate) next; + lun_id_t ts_lun; struct cam_path *owner; struct isp_ccbq waitq; /* waiting CCBs */ struct ccb_hdr_slist atios; From owner-svn-src-all@FreeBSD.ORG Fri Dec 26 09:12:20 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B58DF370; Fri, 26 Dec 2014 09:12:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A07466673F; Fri, 26 Dec 2014 09:12:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBQ9CK9I087799; Fri, 26 Dec 2014 09:12:20 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBQ9CJpu087795; Fri, 26 Dec 2014 09:12:19 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201412260912.sBQ9CJpu087795@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 26 Dec 2014 09:12:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276234 - in stable/10: sys/dev/iscsi usr.sbin/ctld usr.sbin/iscsid X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2014 09:12:20 -0000 Author: mav Date: Fri Dec 26 09:12:19 2014 New Revision: 276234 URL: https://svnweb.freebsd.org/changeset/base/276234 Log: MFC r275925: Slightly polish iSCSI parameters negotiation. Modified: stable/10/sys/dev/iscsi/iscsi.c stable/10/usr.sbin/ctld/login.c stable/10/usr.sbin/iscsid/login.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/iscsi/iscsi.c ============================================================================== --- stable/10/sys/dev/iscsi/iscsi.c Fri Dec 26 09:11:26 2014 (r276233) +++ stable/10/sys/dev/iscsi/iscsi.c Fri Dec 26 09:12:19 2014 (r276234) @@ -2189,6 +2189,10 @@ iscsi_action_scsiio(struct iscsi_session ISCSI_SESSION_DEBUG(is, "len %zd -> %zd", len, is->is_first_burst_length); len = is->is_first_burst_length; } + if (len > is->is_max_data_segment_length) { + ISCSI_SESSION_DEBUG(is, "len %zd -> %zd", len, is->is_max_data_segment_length); + len = is->is_max_data_segment_length; + } error = icl_pdu_append_data(request, csio->data_ptr, len, M_NOWAIT); if (error != 0) { Modified: stable/10/usr.sbin/ctld/login.c ============================================================================== --- stable/10/usr.sbin/ctld/login.c Fri Dec 26 09:11:26 2014 (r276233) +++ stable/10/usr.sbin/ctld/login.c Fri Dec 26 09:12:19 2014 (r276234) @@ -558,7 +558,7 @@ login_negotiate_key(struct pdu *request, tmp = MAX_DATA_SEGMENT_LENGTH; } conn->conn_max_data_segment_length = tmp; - keys_add_int(response_keys, name, tmp); + keys_add_int(response_keys, name, MAX_DATA_SEGMENT_LENGTH); } else if (strcmp(name, "MaxBurstLength") == 0) { tmp = strtoul(value, NULL, 10); if (tmp <= 0) { Modified: stable/10/usr.sbin/iscsid/login.c ============================================================================== --- stable/10/usr.sbin/iscsid/login.c Fri Dec 26 09:11:26 2014 (r276233) +++ stable/10/usr.sbin/iscsid/login.c Fri Dec 26 09:12:19 2014 (r276234) @@ -388,6 +388,11 @@ login_negotiate_key(struct connection *c if (tmp <= 0) log_errx(1, "received invalid " "MaxRecvDataSegmentLength"); + if (tmp > ISCSI_MAX_DATA_SEGMENT_LENGTH) { + log_debugx("capping MaxRecvDataSegmentLength " + "from %d to %d", tmp, ISCSI_MAX_DATA_SEGMENT_LENGTH); + tmp = ISCSI_MAX_DATA_SEGMENT_LENGTH; + } conn->conn_max_data_segment_length = tmp; } else if (strcmp(name, "MaxBurstLength") == 0) { if (conn->conn_immediate_data) { @@ -451,10 +456,11 @@ login_negotiate(struct connection *conn) keys_add(request_keys, "ImmediateData", "Yes"); keys_add_int(request_keys, "MaxBurstLength", - ISCSI_MAX_DATA_SEGMENT_LENGTH); + 2 * ISCSI_MAX_DATA_SEGMENT_LENGTH); keys_add_int(request_keys, "FirstBurstLength", ISCSI_MAX_DATA_SEGMENT_LENGTH); keys_add(request_keys, "InitialR2T", "Yes"); + keys_add(request_keys, "MaxOutstandingR2T", "1"); } else { keys_add(request_keys, "HeaderDigest", "None"); keys_add(request_keys, "DataDigest", "None"); @@ -465,7 +471,6 @@ login_negotiate(struct connection *conn) keys_add(request_keys, "DefaultTime2Wait", "0"); keys_add(request_keys, "DefaultTime2Retain", "0"); keys_add(request_keys, "ErrorRecoveryLevel", "0"); - keys_add(request_keys, "MaxOutstandingR2T", "1"); keys_save(request_keys, request); keys_delete(request_keys); request_keys = NULL; From owner-svn-src-all@FreeBSD.ORG Fri Dec 26 09:18:35 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1F0DF523; Fri, 26 Dec 2014 09:18:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0BA0566787; Fri, 26 Dec 2014 09:18:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBQ9IYC2088578; Fri, 26 Dec 2014 09:18:34 GMT (envelope-from joel@FreeBSD.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBQ9IYl3088577; Fri, 26 Dec 2014 09:18:34 GMT (envelope-from joel@FreeBSD.org) Message-Id: <201412260918.sBQ9IYl3088577@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: joel set sender to joel@FreeBSD.org using -f From: Joel Dahl Date: Fri, 26 Dec 2014 09:18:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276235 - head/lib/msun/man X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2014 09:18:35 -0000 Author: joel (doc committer) Date: Fri Dec 26 09:18:33 2014 New Revision: 276235 URL: https://svnweb.freebsd.org/changeset/base/276235 Log: Minor Xr fix. Modified: head/lib/msun/man/csqrt.3 Modified: head/lib/msun/man/csqrt.3 ============================================================================== --- head/lib/msun/man/csqrt.3 Fri Dec 26 09:12:19 2014 (r276234) +++ head/lib/msun/man/csqrt.3 Fri Dec 26 09:18:33 2014 (r276235) @@ -85,7 +85,7 @@ an \*(Na is generated, an invalid except .Sh SEE ALSO .Xr cabs 3 , .Xr fenv 3 , -.Xr math 3 , +.Xr math 3 .Sh STANDARDS The .Fn csqrt , From owner-svn-src-all@FreeBSD.ORG Fri Dec 26 09:35:24 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6622C99F; Fri, 26 Dec 2014 09:35:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46CB3669B6; Fri, 26 Dec 2014 09:35:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBQ9ZOlM097433; Fri, 26 Dec 2014 09:35:24 GMT (envelope-from joel@FreeBSD.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBQ9ZOCT097432; Fri, 26 Dec 2014 09:35:24 GMT (envelope-from joel@FreeBSD.org) Message-Id: <201412260935.sBQ9ZOCT097432@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: joel set sender to joel@FreeBSD.org using -f From: Joel Dahl Date: Fri, 26 Dec 2014 09:35:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276236 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2014 09:35:24 -0000 Author: joel (doc committer) Date: Fri Dec 26 09:35:23 2014 New Revision: 276236 URL: https://svnweb.freebsd.org/changeset/base/276236 Log: Minor mdoc fixes. Modified: head/share/man/man4/netmap.4 Modified: head/share/man/man4/netmap.4 ============================================================================== --- head/share/man/man4/netmap.4 Fri Dec 26 09:18:33 2014 (r276235) +++ head/share/man/man4/netmap.4 Fri Dec 26 09:35:23 2014 (r276236) @@ -243,7 +243,6 @@ contains the index of the first of these which are connected in a list (the first uint32_t of each buffer being the index of the next buffer in the list). A 0 indicates the end of the list. -.Pp .It Dv struct netmap_ring (one per ring) .Bd -literal struct netmap_ring { @@ -266,7 +265,6 @@ Implements transmit and receive rings, w pointers, metadata and and an array of .Pa slots describing the buffers. -.Pp .It Dv struct netmap_slot (one per buffer) .Bd -literal struct netmap_slot { @@ -367,7 +365,6 @@ are pushed to the port, and .Va tail may advance if further slots have become available. Below is an example of the evolution of a TX ring: -.Pp .Bd -literal after the syscall, slots between cur and tail are (a)vailable head=cur tail @@ -455,7 +452,6 @@ it MUST be used when the buf_idx in the This can be used to implement zero-copy forwarding, see .Sx ZERO-COPY FORWARDING . -.Pp .It NS_REPORT reports when this buffer has been transmitted. Normally, @@ -533,7 +529,6 @@ A file descriptor obtained through .Pa /dev/netmap also supports the ioctl supported by network devices, see .Xr netintro 4 . -.Pp .Bl -tag -width XXXX .It Dv NIOCGINFO returns EINVAL if the named port does not support netmap. @@ -541,7 +536,6 @@ Otherwise, it returns 0 and (advisory) i about the port. Note that all the information below can change before the interface is actually put in netmap mode. -.Pp .Bl -tag -width XX .It Pa nr_memsize indicates the size of the @@ -603,7 +597,6 @@ that application libraries (such as the .Nm nm_open indicated below) can use to indicate the specific set of rings. In the example below, "netmap:foo" is any valid netmap port name. -.Pp .Bl -tag -width XXXXX .It NR_REG_ALL_NIC "netmap:foo" (default) all hardware ring pairs @@ -784,7 +777,6 @@ are controlled through sysctl variables .Em ( dev.netmap.* ) and module parameters on Linux .Em ( /sys/module/netmap_lin/parameters/* ) : -.Pp .Bl -tag -width indent .It Va dev.netmap.admode: 0 Controls the use of native or emulated adapter mode. @@ -852,42 +844,6 @@ OS primitives, see In particular, .Xr pthread_setaffinity_np 3 may be of use. -.Sh CAVEATS -No matter how fast the CPU and OS are, -achieving line rate on 10G and faster interfaces -requires hardware with sufficient performance. -Several NICs are unable to sustain line rate with -small packet sizes. Insufficient PCIe or memory bandwidth -can also cause reduced performance. -.Pp -Another frequent reason for low performance is the use -of flow control on the link: a slow receiver can limit -the transmit speed. -Be sure to disable flow control when running high -speed experiments. -.Pp -.Ss SPECIAL NIC FEATURES -.Nm -is orthogonal to some NIC features such as -multiqueue, schedulers, packet filters. -.Pp -Multiple transmit and receive rings are supported natively -and can be configured with ordinary OS tools, -such as -.Xr ethtool -or -device-specific sysctl variables. -The same goes for Receive Packet Steering (RPS) -and filtering of incoming traffic. -.Pp -.Nm -.Em does not use -features such as -.Em checksum offloading , TCP segmentation offloading , -.Em encryption , VLAN encapsulation/decapsulation , -etc. . -When using netmap to exchange packets with the host stack, -make sure to disable these features. .Sh EXAMPLES .Ss TEST PROGRAMS .Nm @@ -1065,3 +1021,39 @@ and .Nm VALE have been funded by the European Commission within FP7 Projects CHANGE (257422) and OPENLAB (287581). +.Sh CAVEATS +No matter how fast the CPU and OS are, +achieving line rate on 10G and faster interfaces +requires hardware with sufficient performance. +Several NICs are unable to sustain line rate with +small packet sizes. Insufficient PCIe or memory bandwidth +can also cause reduced performance. +.Pp +Another frequent reason for low performance is the use +of flow control on the link: a slow receiver can limit +the transmit speed. +Be sure to disable flow control when running high +speed experiments. +.Pp +.Ss SPECIAL NIC FEATURES +.Nm +is orthogonal to some NIC features such as +multiqueue, schedulers, packet filters. +.Pp +Multiple transmit and receive rings are supported natively +and can be configured with ordinary OS tools, +such as +.Xr ethtool +or +device-specific sysctl variables. +The same goes for Receive Packet Steering (RPS) +and filtering of incoming traffic. +.Pp +.Nm +.Em does not use +features such as +.Em checksum offloading , TCP segmentation offloading , +.Em encryption , VLAN encapsulation/decapsulation , +etc. . +When using netmap to exchange packets with the host stack, +make sure to disable these features. From owner-svn-src-all@FreeBSD.ORG Fri Dec 26 09:44:34 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ACA79B41; Fri, 26 Dec 2014 09:44:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9765F66ABA; Fri, 26 Dec 2014 09:44:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBQ9iYww002049; Fri, 26 Dec 2014 09:44:34 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBQ9iXYl002042; Fri, 26 Dec 2014 09:44:33 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201412260944.sBQ9iXYl002042@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 26 Dec 2014 09:44:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276237 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2014 09:44:34 -0000 Author: mav Date: Fri Dec 26 09:44:32 2014 New Revision: 276237 URL: https://svnweb.freebsd.org/changeset/base/276237 Log: MFC r275920, r276127: Pass real optimal transfer size supported by backend. For files and ZVOLs that is 1MB now, not 128K. Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl_backend.h stable/10/sys/cam/ctl/ctl_backend_block.c stable/10/sys/cam/ctl/ctl_backend_ramdisk.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Fri Dec 26 09:35:23 2014 (r276236) +++ stable/10/sys/cam/ctl/ctl.c Fri Dec 26 09:44:32 2014 (r276237) @@ -10144,7 +10144,7 @@ ctl_inquiry_evpd_block_limits(struct ctl scsi_ulto4b(0xffffffff, bl_ptr->max_txfer_len); if (lun != NULL) { bs = lun->be_lun->blocksize; - scsi_ulto4b(MAXPHYS / bs, bl_ptr->opt_txfer_len); + scsi_ulto4b(lun->be_lun->opttxferlen, bl_ptr->opt_txfer_len); if (lun->be_lun->flags & CTL_LUN_FLAG_UNMAP) { scsi_ulto4b(0xffffffff, bl_ptr->max_unmap_lba_cnt); scsi_ulto4b(0xffffffff, bl_ptr->max_unmap_blk_cnt); Modified: stable/10/sys/cam/ctl/ctl_backend.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend.h Fri Dec 26 09:35:23 2014 (r276236) +++ stable/10/sys/cam/ctl/ctl_backend.h Fri Dec 26 09:44:32 2014 (r276237) @@ -146,10 +146,16 @@ typedef void (*be_lun_config_t)(void *be * * pblockexp is the log2() of number of LBAs on the LUN per physical sector. * - * pblockoff is the lowest LBA on the LUN aligned ot physical sector. + * pblockoff is the lowest LBA on the LUN aligned to physical sector. + * + * ublockexp is the log2() of number of LBAs on the LUN per UNMAP block. + * + * ublockoff is the lowest LBA on the LUN aligned to UNMAP block. * * atomicblock is the number of blocks that can be written atomically. * + * opttxferlen is the number of blocks that can be written in one operation. + * * req_lun_id is the requested LUN ID. CTL only pays attention to this * field if the CTL_LUN_FLAG_ID_REQ flag is set. If the requested LUN ID is * not available, the LUN addition will fail. If a particular LUN ID isn't @@ -197,6 +203,7 @@ struct ctl_be_lun { uint16_t ublockexp; /* passed to CTL */ uint16_t ublockoff; /* passed to CTL */ uint32_t atomicblock; /* passed to CTL */ + uint32_t opttxferlen; /* passed to CTL */ uint32_t req_lun_id; /* passed to CTL */ uint32_t lun_id; /* returned from CTL */ uint8_t serial_num[CTL_SN_LEN]; /* passed to CTL */ Modified: stable/10/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend_block.c Fri Dec 26 09:35:23 2014 (r276236) +++ stable/10/sys/cam/ctl/ctl_backend_block.c Fri Dec 26 09:44:32 2014 (r276237) @@ -177,6 +177,8 @@ struct ctl_be_block_lun { uint16_t pblockoff; uint16_t ublockexp; uint16_t ublockoff; + uint32_t atomicblock; + uint32_t opttxferlen; struct ctl_be_block_softc *softc; struct devstat *disk_stats; ctl_be_block_lun_flags flags; @@ -1848,6 +1850,8 @@ ctl_be_block_open_file(struct ctl_be_blo "file %s size %ju < block size %u", be_lun->dev_path, (uintmax_t)be_lun->size_bytes, be_lun->blocksize); } + + be_lun->opttxferlen = CTLBLK_MAX_IO_SIZE / be_lun->blocksize; return (error); } @@ -1859,7 +1863,7 @@ ctl_be_block_open_dev(struct ctl_be_bloc struct cdev *dev; struct cdevsw *devsw; char *value; - int error; + int error, atomic, maxio; off_t ps, pss, po, pos, us, uss, uo, uos; params = &be_lun->params; @@ -1873,8 +1877,16 @@ ctl_be_block_open_dev(struct ctl_be_bloc if (strcmp(be_lun->backend.dev.csw->d_name, "zvol") == 0) { be_lun->dispatch = ctl_be_block_dispatch_zvol; be_lun->get_lba_status = ctl_be_block_gls_zvol; - } else + atomic = maxio = CTLBLK_MAX_IO_SIZE; + } else { be_lun->dispatch = ctl_be_block_dispatch_dev; + atomic = 0; + maxio = be_lun->backend.dev.cdev->si_iosize_max; + if (maxio <= 0) + maxio = DFLTPHYS; + if (maxio > CTLBLK_MAX_IO_SIZE) + maxio = CTLBLK_MAX_IO_SIZE; + } be_lun->lun_flush = ctl_be_block_flush_dev; be_lun->unmap = ctl_be_block_unmap_dev; be_lun->getattr = ctl_be_block_getattr_dev; @@ -2005,6 +2017,8 @@ ctl_be_block_open_dev(struct ctl_be_bloc be_lun->ublockoff = (uss - uos) % uss; } + be_lun->atomicblock = atomic / be_lun->blocksize; + be_lun->opttxferlen = maxio / be_lun->blocksize; return (0); } @@ -2271,10 +2285,8 @@ ctl_be_block_create(struct ctl_be_block_ be_lun->ctl_be_lun.pblockoff = be_lun->pblockoff; be_lun->ctl_be_lun.ublockexp = be_lun->ublockexp; be_lun->ctl_be_lun.ublockoff = be_lun->ublockoff; - if (be_lun->dispatch == ctl_be_block_dispatch_zvol && - be_lun->blocksize != 0) - be_lun->ctl_be_lun.atomicblock = CTLBLK_MAX_IO_SIZE / - be_lun->blocksize; + be_lun->ctl_be_lun.atomicblock = be_lun->atomicblock; + be_lun->ctl_be_lun.opttxferlen = be_lun->opttxferlen; /* Tell the user the blocksize we ended up using */ params->lun_size_bytes = be_lun->size_bytes; params->blocksize_bytes = be_lun->blocksize; @@ -2652,10 +2664,8 @@ ctl_be_block_modify(struct ctl_be_block_ be_lun->ctl_be_lun.pblockoff = be_lun->pblockoff; be_lun->ctl_be_lun.ublockexp = be_lun->ublockexp; be_lun->ctl_be_lun.ublockoff = be_lun->ublockoff; - if (be_lun->dispatch == ctl_be_block_dispatch_zvol && - be_lun->blocksize != 0) - be_lun->ctl_be_lun.atomicblock = CTLBLK_MAX_IO_SIZE / - be_lun->blocksize; + be_lun->ctl_be_lun.atomicblock = be_lun->atomicblock; + be_lun->ctl_be_lun.opttxferlen = be_lun->opttxferlen; ctl_lun_capacity_changed(&be_lun->ctl_be_lun); if (oldsize == 0 && be_lun->size_blocks != 0) ctl_lun_online(&be_lun->ctl_be_lun); Modified: stable/10/sys/cam/ctl/ctl_backend_ramdisk.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend_ramdisk.c Fri Dec 26 09:35:23 2014 (r276236) +++ stable/10/sys/cam/ctl/ctl_backend_ramdisk.c Fri Dec 26 09:44:32 2014 (r276237) @@ -570,6 +570,8 @@ ctl_backend_ramdisk_create(struct ctl_be be_lun->size_bytes = be_lun->size_blocks * blocksize; be_lun->ctl_be_lun.maxlba = be_lun->size_blocks - 1; + be_lun->ctl_be_lun.atomicblock = UINT32_MAX; + be_lun->ctl_be_lun.opttxferlen = softc->rd_size / blocksize; } else { be_lun->ctl_be_lun.maxlba = 0; blocksize = 0; @@ -596,7 +598,6 @@ ctl_backend_ramdisk_create(struct ctl_be be_lun->ctl_be_lun.flags = CTL_LUN_FLAG_PRIMARY; if (unmap) be_lun->ctl_be_lun.flags |= CTL_LUN_FLAG_UNMAP; - be_lun->ctl_be_lun.atomicblock = UINT32_MAX; be_lun->ctl_be_lun.be_lun = be_lun; if (params->flags & CTL_LUN_FLAG_ID_REQ) { From owner-svn-src-all@FreeBSD.ORG Fri Dec 26 10:25:38 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7F8A83E4; Fri, 26 Dec 2014 10:25:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 60DF564E88; Fri, 26 Dec 2014 10:25:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBQAPcR9020635; Fri, 26 Dec 2014 10:25:38 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBQAPZ9M020621; Fri, 26 Dec 2014 10:25:35 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201412261025.sBQAPZ9M020621@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 26 Dec 2014 10:25:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276238 - in head/contrib/ofed/libibverbs/examples: . build build/asyncwatch build/device_list build/devinfo build/rc_pingpong build/srq_pingpong build/uc_pingpong build/ud_pingpong X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2014 10:25:38 -0000 Author: hselasky Date: Fri Dec 26 10:25:34 2014 New Revision: 276238 URL: https://svnweb.freebsd.org/changeset/base/276238 Log: Add proper Makefiles to build some infiniband example utilities. MFC after: 1 week Sponsored by: Mellanox Technologies Added: head/contrib/ofed/libibverbs/examples/build/ head/contrib/ofed/libibverbs/examples/build/Makefile (contents, props changed) head/contrib/ofed/libibverbs/examples/build/Makefile.inc (contents, props changed) head/contrib/ofed/libibverbs/examples/build/asyncwatch/ head/contrib/ofed/libibverbs/examples/build/asyncwatch/Makefile (contents, props changed) head/contrib/ofed/libibverbs/examples/build/device_list/ head/contrib/ofed/libibverbs/examples/build/device_list/Makefile (contents, props changed) head/contrib/ofed/libibverbs/examples/build/devinfo/ head/contrib/ofed/libibverbs/examples/build/devinfo/Makefile (contents, props changed) head/contrib/ofed/libibverbs/examples/build/rc_pingpong/ head/contrib/ofed/libibverbs/examples/build/rc_pingpong/Makefile (contents, props changed) head/contrib/ofed/libibverbs/examples/build/srq_pingpong/ head/contrib/ofed/libibverbs/examples/build/srq_pingpong/Makefile (contents, props changed) head/contrib/ofed/libibverbs/examples/build/uc_pingpong/ head/contrib/ofed/libibverbs/examples/build/uc_pingpong/Makefile (contents, props changed) head/contrib/ofed/libibverbs/examples/build/ud_pingpong/ head/contrib/ofed/libibverbs/examples/build/ud_pingpong/Makefile (contents, props changed) Deleted: head/contrib/ofed/libibverbs/examples/Makefile Added: head/contrib/ofed/libibverbs/examples/build/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/ofed/libibverbs/examples/build/Makefile Fri Dec 26 10:25:34 2014 (r276238) @@ -0,0 +1,4 @@ +SUBDIR= asyncwatch devinfo device_list rc_pingpong \ + srq_pingpong uc_pingpong ud_pingpong + +.include Added: head/contrib/ofed/libibverbs/examples/build/Makefile.inc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/ofed/libibverbs/examples/build/Makefile.inc Fri Dec 26 10:25:34 2014 (r276238) @@ -0,0 +1,7 @@ +CFLAGS+= \ + -I../../../../../../sys/ofed/include \ + -I../../../../libibverbs/include \ + -I../../../../include + +LDADD+= -libverbs -lmlx4 -lmthca -pthread + Added: head/contrib/ofed/libibverbs/examples/build/asyncwatch/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/ofed/libibverbs/examples/build/asyncwatch/Makefile Fri Dec 26 10:25:34 2014 (r276238) @@ -0,0 +1,9 @@ +# +# $FreeBSD$ +# +.PATH: ${.CURDIR}/../.. +PROG= asyncwatch +MAN= +SRCS= asyncwatch.c + +.include Added: head/contrib/ofed/libibverbs/examples/build/device_list/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/ofed/libibverbs/examples/build/device_list/Makefile Fri Dec 26 10:25:34 2014 (r276238) @@ -0,0 +1,9 @@ +# +# $FreeBSD$ +# +.PATH: ${.CURDIR}/../.. +PROG= device_list +MAN= +SRCS= device_list.c + +.include Added: head/contrib/ofed/libibverbs/examples/build/devinfo/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/ofed/libibverbs/examples/build/devinfo/Makefile Fri Dec 26 10:25:34 2014 (r276238) @@ -0,0 +1,9 @@ +# +# $FreeBSD$ +# +.PATH: ${.CURDIR}/../.. +PROG= devinfo +MAN= +SRCS= devinfo.c + +.include Added: head/contrib/ofed/libibverbs/examples/build/rc_pingpong/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/ofed/libibverbs/examples/build/rc_pingpong/Makefile Fri Dec 26 10:25:34 2014 (r276238) @@ -0,0 +1,9 @@ +# +# $FreeBSD$ +# +.PATH: ${.CURDIR}/../.. +PROG= rc_pingpong +MAN= +SRCS= rc_pingpong.c pingpong.c + +.include Added: head/contrib/ofed/libibverbs/examples/build/srq_pingpong/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/ofed/libibverbs/examples/build/srq_pingpong/Makefile Fri Dec 26 10:25:34 2014 (r276238) @@ -0,0 +1,9 @@ +# +# $FreeBSD$ +# +.PATH: ${.CURDIR}/../.. +PROG= srq_pingpong +MAN= +SRCS= srq_pingpong.c pingpong.c + +.include Added: head/contrib/ofed/libibverbs/examples/build/uc_pingpong/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/ofed/libibverbs/examples/build/uc_pingpong/Makefile Fri Dec 26 10:25:34 2014 (r276238) @@ -0,0 +1,9 @@ +# +# $FreeBSD$ +# +.PATH: ${.CURDIR}/../.. +PROG= uc_pingpong +MAN= +SRCS= uc_pingpong.c pingpong.c + +.include Added: head/contrib/ofed/libibverbs/examples/build/ud_pingpong/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/ofed/libibverbs/examples/build/ud_pingpong/Makefile Fri Dec 26 10:25:34 2014 (r276238) @@ -0,0 +1,9 @@ +# +# $FreeBSD$ +# +.PATH: ${.CURDIR}/../.. +PROG= ud_pingpong +MAN= +SRCS= ud_pingpong.c pingpong.c + +.include From owner-svn-src-all@FreeBSD.ORG Fri Dec 26 10:53:23 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 95655834; Fri, 26 Dec 2014 10:53:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 812F7661F4; Fri, 26 Dec 2014 10:53:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBQArNnX034076; Fri, 26 Dec 2014 10:53:23 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBQArNpL034074; Fri, 26 Dec 2014 10:53:23 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201412261053.sBQArNpL034074@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 26 Dec 2014 10:53:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276239 - in head/sys/dev/usb: . quirk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2014 10:53:23 -0000 Author: hselasky Date: Fri Dec 26 10:53:22 2014 New Revision: 276239 URL: https://svnweb.freebsd.org/changeset/base/276239 Log: Add more quirks. PR: 180617 MFC after: 1 day Modified: head/sys/dev/usb/quirk/usb_quirk.c head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/quirk/usb_quirk.c ============================================================================== --- head/sys/dev/usb/quirk/usb_quirk.c Fri Dec 26 10:25:34 2014 (r276238) +++ head/sys/dev/usb/quirk/usb_quirk.c Fri Dec 26 10:53:22 2014 (r276239) @@ -449,6 +449,7 @@ static struct usb_quirk_entry usb_quirks USB_QUIRK(WESTERN, MYPASSPORT_08, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE), USB_QUIRK(WESTERN, MYPASSPORT_09, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE), USB_QUIRK(WESTERN, MYPASSPORT_10, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE), + USB_QUIRK(WESTERN, MYPASSPORT_11, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE), USB_QUIRK(WESTERN, MYPASSPORTES_00, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE), USB_QUIRK(WESTERN, MYPASSPORTES_01, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE), USB_QUIRK(WESTERN, MYPASSPORTES_02, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE), Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Fri Dec 26 10:25:34 2014 (r276238) +++ head/sys/dev/usb/usbdevs Fri Dec 26 10:53:22 2014 (r276239) @@ -4492,6 +4492,7 @@ product WESTERN EXTHDD 0x0400 External product WESTERN HUB 0x0500 USB HUB product WESTERN MYBOOK 0x0901 MyBook External HDD product WESTERN MYPASSPORT_00 0x0704 MyPassport External HDD +product WESTERN MYPASSPORT_11 0x0741 MyPassport External HDD product WESTERN MYPASSPORT_01 0x0746 MyPassport External HDD product WESTERN MYPASSPORT_02 0x0748 MyPassport External HDD product WESTERN MYPASSPORT_03 0x074A MyPassport External HDD From owner-svn-src-all@FreeBSD.ORG Fri Dec 26 10:57:40 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9FEA5A4F; Fri, 26 Dec 2014 10:57:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8C2EF66238; Fri, 26 Dec 2014 10:57:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBQAveAe034643; Fri, 26 Dec 2014 10:57:40 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBQAveHI034642; Fri, 26 Dec 2014 10:57:40 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201412261057.sBQAveHI034642@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 26 Dec 2014 10:57:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276240 - head/sys/dev/usb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2014 10:57:40 -0000 Author: hselasky Date: Fri Dec 26 10:57:39 2014 New Revision: 276240 URL: https://svnweb.freebsd.org/changeset/base/276240 Log: Add more USB devices. MFC after: 1 day Submitted by: Dmitry Luhtionov Modified: head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Fri Dec 26 10:53:22 2014 (r276239) +++ head/sys/dev/usb/usbdevs Fri Dec 26 10:57:39 2014 (r276240) @@ -2411,6 +2411,8 @@ product INTEL EASYPC_CAMERA 0x0110 Easy product INTEL TESTBOARD 0x9890 82930 test board product INTEL2 IRMH 0x0020 Integrated Rate Matching Hub product INTEL2 IRMH2 0x0024 Integrated Rate Matching Hub +product INTEL2 IRMH3 0x8000 Integrated Rate Matching Hub +product INTEL2 IRMH4 0x8008 Integrated Rate Matching Hub /* Interbiometric products */ product INTERBIOMETRICS IOBOARD 0x1002 FTDI compatible adapter From owner-svn-src-all@FreeBSD.ORG Fri Dec 26 11:17:00 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C1CFAE3B; Fri, 26 Dec 2014 11:17:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ACAD5640FB; Fri, 26 Dec 2014 11:17:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBQBH0NP044027; Fri, 26 Dec 2014 11:17:00 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBQBH0G1044025; Fri, 26 Dec 2014 11:17:00 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201412261117.sBQBH0G1044025@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 26 Dec 2014 11:17:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276241 - in stable/10/sys/dev/usb: . quirk X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2014 11:17:01 -0000 Author: hselasky Date: Fri Dec 26 11:16:59 2014 New Revision: 276241 URL: https://svnweb.freebsd.org/changeset/base/276241 Log: MFC r259675, r262128, r262129, r275605, r276239 and r276240: Add more USB quirks. PR: 178771 PR: 180617 PR: 195372 Modified: stable/10/sys/dev/usb/quirk/usb_quirk.c stable/10/sys/dev/usb/usbdevs Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/quirk/usb_quirk.c ============================================================================== --- stable/10/sys/dev/usb/quirk/usb_quirk.c Fri Dec 26 10:57:39 2014 (r276240) +++ stable/10/sys/dev/usb/quirk/usb_quirk.c Fri Dec 26 11:16:59 2014 (r276241) @@ -59,7 +59,7 @@ MODULE_DEPEND(usb_quirk, usb, 1, 1, 1); MODULE_VERSION(usb_quirk, 1); -#define USB_DEV_QUIRKS_MAX 256 +#define USB_DEV_QUIRKS_MAX 384 #define USB_SUB_QUIRKS_MAX 8 struct usb_quirk_entry { @@ -340,6 +340,9 @@ static struct usb_quirk_entry usb_quirks USB_QUIRK(SANDISK, SDDR12, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_CBI, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_READ_CAP_OFFBY1, UQ_MSC_NO_GETMAXLUN), + USB_QUIRK(SANDISK, SDCZ2_128, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, + UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_IGNORE_RESIDUE, + UQ_MSC_NO_SYNC_CACHE), USB_QUIRK(SANDISK, SDCZ2_256, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_IGNORE_RESIDUE), USB_QUIRK(SANDISK, SDCZ4_128, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, @@ -435,8 +438,28 @@ static struct usb_quirk_entry usb_quirks USB_QUIRK(WESTERN, MYBOOK, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_INQUIRY_EVPD, UQ_MSC_NO_SYNC_CACHE), - USB_QUIRK(WESTERN, MYPASSWORD, 0x0000, 0xffff, UQ_MSC_FORCE_SHORT_INQ), - USB_QUIRK(WESTERN, MYPASSPORT, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE), + USB_QUIRK(WESTERN, MYPASSPORT_00, 0x0000, 0xffff, UQ_MSC_FORCE_SHORT_INQ), + USB_QUIRK(WESTERN, MYPASSPORT_01, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE), + USB_QUIRK(WESTERN, MYPASSPORT_02, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE), + USB_QUIRK(WESTERN, MYPASSPORT_03, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE), + USB_QUIRK(WESTERN, MYPASSPORT_04, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE), + USB_QUIRK(WESTERN, MYPASSPORT_05, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE), + USB_QUIRK(WESTERN, MYPASSPORT_06, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE), + USB_QUIRK(WESTERN, MYPASSPORT_07, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE), + USB_QUIRK(WESTERN, MYPASSPORT_08, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE), + USB_QUIRK(WESTERN, MYPASSPORT_09, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE), + USB_QUIRK(WESTERN, MYPASSPORT_10, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE), + USB_QUIRK(WESTERN, MYPASSPORT_11, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE), + USB_QUIRK(WESTERN, MYPASSPORTES_00, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE), + USB_QUIRK(WESTERN, MYPASSPORTES_01, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE), + USB_QUIRK(WESTERN, MYPASSPORTES_02, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE), + USB_QUIRK(WESTERN, MYPASSPORTES_03, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE), + USB_QUIRK(WESTERN, MYPASSPORTES_04, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE), + USB_QUIRK(WESTERN, MYPASSPORTES_05, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE), + USB_QUIRK(WESTERN, MYPASSPORTES_06, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE), + USB_QUIRK(WESTERN, MYPASSPORTES_07, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE), + USB_QUIRK(WESTERN, MYPASSPORTES_08, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE), + USB_QUIRK(WESTERN, MYPASSPORTES_09, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE), USB_QUIRK(WINMAXGROUP, FLASH64MC, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_INQUIRY), USB_QUIRK(YANO, FW800HD, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, @@ -457,8 +480,8 @@ static struct usb_quirk_entry usb_quirks UQ_MSC_FORCE_PROTO_ATAPI), USB_QUIRK(MEIZU, M6_SL, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_INQUIRY, UQ_MSC_NO_SYNC_CACHE), - - USB_QUIRK(TOSHIBA, TRANSMEMORY, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE), + USB_QUIRK(TOSHIBA, TRANSMEMORY, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE, + UQ_MSC_NO_PREVENT_ALLOW), USB_QUIRK(VIALABS, USB30SATABRIDGE, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE), /* Non-standard USB MIDI devices */ Modified: stable/10/sys/dev/usb/usbdevs ============================================================================== --- stable/10/sys/dev/usb/usbdevs Fri Dec 26 10:57:39 2014 (r276240) +++ stable/10/sys/dev/usb/usbdevs Fri Dec 26 11:16:59 2014 (r276241) @@ -2409,6 +2409,8 @@ product INTEL EASYPC_CAMERA 0x0110 Easy product INTEL TESTBOARD 0x9890 82930 test board product INTEL2 IRMH 0x0020 Integrated Rate Matching Hub product INTEL2 IRMH2 0x0024 Integrated Rate Matching Hub +product INTEL2 IRMH3 0x8000 Integrated Rate Matching Hub +product INTEL2 IRMH4 0x8008 Integrated Rate Matching Hub /* Interbiometric products */ product INTERBIOMETRICS IOBOARD 0x1002 FTDI compatible adapter @@ -4488,8 +4490,28 @@ product WESTERN COMBO 0x0200 Firewire U product WESTERN EXTHDD 0x0400 External HDD product WESTERN HUB 0x0500 USB HUB product WESTERN MYBOOK 0x0901 MyBook External HDD -product WESTERN MYPASSWORD 0x0704 MyPassword External HDD -product WESTERN MYPASSPORT 0x0748 MyPassport External HDD +product WESTERN MYPASSPORT_00 0x0704 MyPassport External HDD +product WESTERN MYPASSPORT_11 0x0741 MyPassport External HDD +product WESTERN MYPASSPORT_01 0x0746 MyPassport External HDD +product WESTERN MYPASSPORT_02 0x0748 MyPassport External HDD +product WESTERN MYPASSPORT_03 0x074A MyPassport External HDD +product WESTERN MYPASSPORT_04 0x074C MyPassport External HDD +product WESTERN MYPASSPORT_05 0x074E MyPassport External HDD +product WESTERN MYPASSPORT_06 0x07A6 MyPassport External HDD +product WESTERN MYPASSPORT_07 0x07A8 MyPassport External HDD +product WESTERN MYPASSPORT_08 0x07AA MyPassport External HDD +product WESTERN MYPASSPORT_09 0x07AC MyPassport External HDD +product WESTERN MYPASSPORT_10 0x07AE MyPassport External HDD +product WESTERN MYPASSPORTES_00 0x070A MyPassport Essential External HDD +product WESTERN MYPASSPORTES_01 0x071A MyPassport Essential External HDD +product WESTERN MYPASSPORTES_02 0x0730 MyPassport Essential External HDD +product WESTERN MYPASSPORTES_03 0x0732 MyPassport Essential External HDD +product WESTERN MYPASSPORTES_04 0x0740 MyPassport Essential External HDD +product WESTERN MYPASSPORTES_05 0x0742 MyPassport Essential External HDD +product WESTERN MYPASSPORTES_06 0x0750 MyPassport Essential External HDD +product WESTERN MYPASSPORTES_07 0x0752 MyPassport Essential External HDD +product WESTERN MYPASSPORTES_08 0x07A0 MyPassport Essential External HDD +product WESTERN MYPASSPORTES_09 0x07A2 MyPassport Essential External HDD /* WeTelecom products */ product WETELECOM WM_D200 0x6801 WM-D200 From owner-svn-src-all@FreeBSD.ORG Fri Dec 26 11:25:57 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A78B014B; Fri, 26 Dec 2014 11:25:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 92887642CF; Fri, 26 Dec 2014 11:25:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBQBPvfS048611; Fri, 26 Dec 2014 11:25:57 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBQBPvmE048608; Fri, 26 Dec 2014 11:25:57 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201412261125.sBQBPvmE048608@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 26 Dec 2014 11:25:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r276242 - in stable/9/sys/dev/usb: . quirk X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2014 11:25:57 -0000 Author: hselasky Date: Fri Dec 26 11:25:56 2014 New Revision: 276242 URL: https://svnweb.freebsd.org/changeset/base/276242 Log: MFC r262128, r262129, r275605, r276239 and r276240: Add more USB quirks. PR: 178771 PR: 180617 PR: 195372 Modified: stable/9/sys/dev/usb/quirk/usb_quirk.c stable/9/sys/dev/usb/usbdevs Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/quirk/usb_quirk.c ============================================================================== --- stable/9/sys/dev/usb/quirk/usb_quirk.c Fri Dec 26 11:16:59 2014 (r276241) +++ stable/9/sys/dev/usb/quirk/usb_quirk.c Fri Dec 26 11:25:56 2014 (r276242) @@ -59,7 +59,7 @@ MODULE_DEPEND(usb_quirk, usb, 1, 1, 1); MODULE_VERSION(usb_quirk, 1); -#define USB_DEV_QUIRKS_MAX 256 +#define USB_DEV_QUIRKS_MAX 384 #define USB_SUB_QUIRKS_MAX 8 struct usb_quirk_entry { @@ -437,8 +437,28 @@ static struct usb_quirk_entry usb_quirks USB_QUIRK(WESTERN, MYBOOK, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_INQUIRY_EVPD, UQ_MSC_NO_SYNC_CACHE), - USB_QUIRK(WESTERN, MYPASSWORD, 0x0000, 0xffff, UQ_MSC_FORCE_SHORT_INQ), - USB_QUIRK(WESTERN, MYPASSPORT, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE), + USB_QUIRK(WESTERN, MYPASSPORT_00, 0x0000, 0xffff, UQ_MSC_FORCE_SHORT_INQ), + USB_QUIRK(WESTERN, MYPASSPORT_01, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE), + USB_QUIRK(WESTERN, MYPASSPORT_02, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE), + USB_QUIRK(WESTERN, MYPASSPORT_03, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE), + USB_QUIRK(WESTERN, MYPASSPORT_04, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE), + USB_QUIRK(WESTERN, MYPASSPORT_05, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE), + USB_QUIRK(WESTERN, MYPASSPORT_06, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE), + USB_QUIRK(WESTERN, MYPASSPORT_07, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE), + USB_QUIRK(WESTERN, MYPASSPORT_08, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE), + USB_QUIRK(WESTERN, MYPASSPORT_09, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE), + USB_QUIRK(WESTERN, MYPASSPORT_10, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE), + USB_QUIRK(WESTERN, MYPASSPORT_11, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE), + USB_QUIRK(WESTERN, MYPASSPORTES_00, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE), + USB_QUIRK(WESTERN, MYPASSPORTES_01, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE), + USB_QUIRK(WESTERN, MYPASSPORTES_02, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE), + USB_QUIRK(WESTERN, MYPASSPORTES_03, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE), + USB_QUIRK(WESTERN, MYPASSPORTES_04, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE), + USB_QUIRK(WESTERN, MYPASSPORTES_05, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE), + USB_QUIRK(WESTERN, MYPASSPORTES_06, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE), + USB_QUIRK(WESTERN, MYPASSPORTES_07, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE), + USB_QUIRK(WESTERN, MYPASSPORTES_08, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE), + USB_QUIRK(WESTERN, MYPASSPORTES_09, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE), USB_QUIRK(WINMAXGROUP, FLASH64MC, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_INQUIRY), USB_QUIRK(YANO, FW800HD, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, @@ -459,8 +479,8 @@ static struct usb_quirk_entry usb_quirks UQ_MSC_FORCE_PROTO_ATAPI), USB_QUIRK(MEIZU, M6_SL, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_INQUIRY, UQ_MSC_NO_SYNC_CACHE), - - USB_QUIRK(TOSHIBA, TRANSMEMORY, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE), + USB_QUIRK(TOSHIBA, TRANSMEMORY, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE, + UQ_MSC_NO_PREVENT_ALLOW), USB_QUIRK(VIALABS, USB30SATABRIDGE, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE), /* Non-standard USB MIDI devices */ Modified: stable/9/sys/dev/usb/usbdevs ============================================================================== --- stable/9/sys/dev/usb/usbdevs Fri Dec 26 11:16:59 2014 (r276241) +++ stable/9/sys/dev/usb/usbdevs Fri Dec 26 11:25:56 2014 (r276242) @@ -2409,6 +2409,8 @@ product INTEL EASYPC_CAMERA 0x0110 Easy product INTEL TESTBOARD 0x9890 82930 test board product INTEL2 IRMH 0x0020 Integrated Rate Matching Hub product INTEL2 IRMH2 0x0024 Integrated Rate Matching Hub +product INTEL2 IRMH3 0x8000 Integrated Rate Matching Hub +product INTEL2 IRMH4 0x8008 Integrated Rate Matching Hub /* Interbiometric products */ product INTERBIOMETRICS IOBOARD 0x1002 FTDI compatible adapter @@ -4488,8 +4490,28 @@ product WESTERN COMBO 0x0200 Firewire U product WESTERN EXTHDD 0x0400 External HDD product WESTERN HUB 0x0500 USB HUB product WESTERN MYBOOK 0x0901 MyBook External HDD -product WESTERN MYPASSWORD 0x0704 MyPassword External HDD -product WESTERN MYPASSPORT 0x0748 MyPassport External HDD +product WESTERN MYPASSPORT_00 0x0704 MyPassport External HDD +product WESTERN MYPASSPORT_11 0x0741 MyPassport External HDD +product WESTERN MYPASSPORT_01 0x0746 MyPassport External HDD +product WESTERN MYPASSPORT_02 0x0748 MyPassport External HDD +product WESTERN MYPASSPORT_03 0x074A MyPassport External HDD +product WESTERN MYPASSPORT_04 0x074C MyPassport External HDD +product WESTERN MYPASSPORT_05 0x074E MyPassport External HDD +product WESTERN MYPASSPORT_06 0x07A6 MyPassport External HDD +product WESTERN MYPASSPORT_07 0x07A8 MyPassport External HDD +product WESTERN MYPASSPORT_08 0x07AA MyPassport External HDD +product WESTERN MYPASSPORT_09 0x07AC MyPassport External HDD +product WESTERN MYPASSPORT_10 0x07AE MyPassport External HDD +product WESTERN MYPASSPORTES_00 0x070A MyPassport Essential External HDD +product WESTERN MYPASSPORTES_01 0x071A MyPassport Essential External HDD +product WESTERN MYPASSPORTES_02 0x0730 MyPassport Essential External HDD +product WESTERN MYPASSPORTES_03 0x0732 MyPassport Essential External HDD +product WESTERN MYPASSPORTES_04 0x0740 MyPassport Essential External HDD +product WESTERN MYPASSPORTES_05 0x0742 MyPassport Essential External HDD +product WESTERN MYPASSPORTES_06 0x0750 MyPassport Essential External HDD +product WESTERN MYPASSPORTES_07 0x0752 MyPassport Essential External HDD +product WESTERN MYPASSPORTES_08 0x07A0 MyPassport Essential External HDD +product WESTERN MYPASSPORTES_09 0x07A2 MyPassport Essential External HDD /* WeTelecom products */ product WETELECOM WM_D200 0x6801 WM-D200 From owner-svn-src-all@FreeBSD.ORG Fri Dec 26 11:32:36 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D96893BD; Fri, 26 Dec 2014 11:32:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BA0FA64425; Fri, 26 Dec 2014 11:32:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBQBWZCU053151; Fri, 26 Dec 2014 11:32:35 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBQBWZl1053146; Fri, 26 Dec 2014 11:32:35 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201412261132.sBQBWZl1053146@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 26 Dec 2014 11:32:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276243 - in stable/10: etc/devd sys/dev/usb/net sys/dev/usb/serial X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2014 11:32:36 -0000 Author: hselasky Date: Fri Dec 26 11:32:34 2014 New Revision: 276243 URL: https://svnweb.freebsd.org/changeset/base/276243 Log: MFC r275790 and r275791: Resolve USB driver identification conflict. Regenerate etc/devd/usb.conf. Modified: stable/10/etc/devd/usb.conf stable/10/sys/dev/usb/net/if_urndis.c stable/10/sys/dev/usb/serial/umodem.c Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/devd/usb.conf ============================================================================== --- stable/10/etc/devd/usb.conf Fri Dec 26 11:25:56 2014 (r276242) +++ stable/10/etc/devd/usb.conf Fri Dec 26 11:32:34 2014 (r276243) @@ -1017,7 +1017,23 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x056e"; - match "product" "(0x200c|0x4002|0x4005|0x400b|0x4010)"; + match "product" "(0x200c|0x4002|0x4005)"; + action "kldload -n if_aue"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x056e"; + match "product" "0x4008"; + action "kldload -n if_urtwn"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x056e"; + match "product" "(0x400b|0x4010)"; action "kldload -n if_aue"; }; @@ -1177,7 +1193,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x05c6"; - match "product" "(0x1000|0x6000|0x6613|0x9000|0x9204|0x9205)"; + match "product" "(0x1000|0x6000|0x6500|0x6613|0x9000|0x9204|0x9205)"; action "kldload -n u3g"; }; @@ -2545,7 +2561,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x0bda"; - match "product" "(0x8176|0x8176|0x8177|0x8178|0x8179|0x817a|0x817b|0x817c|0x817d|0x817e)"; + match "product" "(0x8176|0x8176|0x8177|0x8178|0x8179|0x817a|0x817b|0x817c|0x817d|0x817e|0x817f)"; action "kldload -n if_urtwn"; }; @@ -3617,7 +3633,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x12d1"; - match "product" "(0x1001|0x1003|0x1004|0x1401|0x1402|0x1403|0x1404|0x1405|0x1406|0x1407|0x1408|0x1409|0x140a|0x140b|0x140c|0x140d|0x140e|0x140f|0x1410|0x1411|0x1412|0x1413|0x1414|0x1415|0x1416|0x1417|0x1418|0x1419|0x141a|0x141b|0x141c|0x141d|0x141e|0x141f|0x1420|0x1421|0x1422|0x1423|0x1424|0x1425|0x1426|0x1427|0x1428|0x1429|0x142a|0x142b|0x142c|0x142d|0x142e|0x142f|0x1430|0x1431|0x1432|0x1433|0x1434|0x1435|0x1436|0x1437|0x1438|0x1439|0x143a|0x143b|0x143c|0x143d|0x143e|0x143f|0x1446|0x1464|0x1465|0x14ac|0x14c9|0x14d1|0x14fe|0x1505|0x1506|0x1520|0x1521)"; + match "product" "(0x1001|0x1003|0x1004|0x1401|0x1402|0x1403|0x1404|0x1405|0x1406|0x1407|0x1408|0x1409|0x140a|0x140b|0x140c|0x140d|0x140e|0x140f|0x1410|0x1411|0x1412|0x1413|0x1414|0x1415|0x1416|0x1417|0x1418|0x1419|0x141a|0x141b|0x141c|0x141d|0x141e|0x141f|0x1420|0x1421|0x1422|0x1423|0x1424|0x1425|0x1426|0x1427|0x1428|0x1429|0x142a|0x142b|0x142c|0x142d|0x142e|0x142f|0x1430|0x1431|0x1432|0x1433|0x1434|0x1435|0x1436|0x1437|0x1438|0x1439|0x143a|0x143b|0x143c|0x143d|0x143e|0x143f|0x1446|0x1464|0x1465|0x14ac|0x14c9|0x14cf|0x14d1|0x14fe|0x1505|0x1506|0x1520|0x1521|0x1526)"; action "kldload -n u3g"; }; @@ -4489,7 +4505,15 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x19d2"; - match "product" "(0x0001|0x0002|0x0003|0x0004|0x0005|0x0006|0x0007|0x0008|0x0009|0x000a|0x000b|0x000c|0x000d|0x000e|0x000f|0x0010|0x0011|0x0012|0x0013|0x0014|0x0015|0x0016|0x0017|0x0018|0x0019|0x0020|0x0021|0x0022|0x0023|0x0024|0x0025|0x0026|0x0027|0x0028|0x0029|0x0030|0x0031|0x0032|0x0033|0x0037|0x0039|0x0042|0x0043|0x0048|0x0049|0x0051|0x0052|0x0053|0x0054|0x0055|0x0057|0x0058|0x0059|0x0060|0x0061|0x0062|0x0063|0x0064|0x0066|0x0069|0x0070|0x0073|0x0076|0x0078|0x0082|0x0086|0x0117|0x1179|0x2000|0x2002|0x2003|0xfff1|0xfff5|0xfffe)"; + match "product" "(0x0001|0x0002|0x0003|0x0004|0x0005|0x0006|0x0007|0x0008|0x0009|0x000a|0x000b|0x000c|0x000d|0x000e|0x000f|0x0010|0x0011|0x0012|0x0013|0x0014|0x0015|0x0016|0x0017|0x0018|0x0019|0x0020|0x0021|0x0022|0x0023|0x0024|0x0025|0x0026|0x0027|0x0028|0x0029|0x0030|0x0031|0x0032|0x0033|0x0037|0x0039|0x0042|0x0043|0x0048|0x0049|0x0051|0x0052|0x0053|0x0054|0x0055|0x0057|0x0058|0x0059|0x0060|0x0061|0x0062|0x0063|0x0064|0x0066|0x0069|0x0070|0x0073|0x0076|0x0078|0x0082|0x0086|0x0117|0x1179|0x1181|0x1514|0x1516|0x2000|0x2002|0x2003|0xffdd|0xffde|0xfff1|0xfff5|0xfffe)"; + action "kldload -n u3g"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x19f5"; + match "product" "0x9909"; action "kldload -n u3g"; }; @@ -4609,7 +4633,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x1cf1"; - match "product" "(0x0001|0x0004|0x0022)"; + match "product" "(0x0001|0x0004|0x001c|0x0022)"; action "kldload -n uftdi"; }; @@ -4697,7 +4721,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x2001"; - match "product" "(0x3307|0x3308|0x3309|0x330a|0x330d|0x330f)"; + match "product" "(0x3307|0x3308|0x3309|0x330a|0x330d|0x330f|0x3310)"; action "kldload -n if_urtwn"; }; @@ -4897,7 +4921,23 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x20f4"; - match "product" "(0x624d|0x648b)"; + match "product" "0x624d"; + action "kldload -n if_urtwn"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x20f4"; + match "product" "0x646b"; + action "kldload -n if_rsu"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x20f4"; + match "product" "0x648b"; action "kldload -n if_urtwn"; }; @@ -5294,6 +5334,16 @@ nomatch 32 { nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; + match "vendor" "0x0830"; + match "intclass" "0x02"; + match "intsubclass" "0x02"; + match "intprotocol" "0xff"; + action "kldload -n if_urndis"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; match "vendor" "0x0a5c"; match "intclass" "0xff"; match "intsubclass" "0x01"; @@ -5305,6 +5355,16 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x12d1"; + match "intclass" "0x02"; + match "intsubclass" "0x02"; + match "intprotocol" "0xff"; + action "kldload -n umodem"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x12d1"; match "intclass" "0xff"; match "intsubclass" "0x02"; match "intprotocol" "0x16"; @@ -5352,15 +5412,6 @@ nomatch 32 { nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; - match "intclass" "0x02"; - match "intsubclass" "0x02"; - match "intprotocol" "0xff"; - action "kldload -n umodem"; -}; - -nomatch 32 { - match "bus" "uhub[0-9]+"; - match "mode" "host"; match "intclass" "0x03"; match "intsubclass" "0x01"; match "intprotocol" "0x01"; @@ -5501,5 +5552,5 @@ nomatch 32 { action "kldload -n umass"; }; -# 2643 USB entries processed +# 2658 USB entries processed Modified: stable/10/sys/dev/usb/net/if_urndis.c ============================================================================== --- stable/10/sys/dev/usb/net/if_urndis.c Fri Dec 26 11:25:56 2014 (r276242) +++ stable/10/sys/dev/usb/net/if_urndis.c Fri Dec 26 11:32:34 2014 (r276243) @@ -170,15 +170,15 @@ static const struct usb_ether_methods ur }; static const STRUCT_USB_HOST_ID urndis_host_devs[] = { -#if 0 - /* XXX this entry has a conflict an entry the umodem driver XXX */ - {USB_IFACE_CLASS(UICLASS_CDC), USB_IFACE_SUBCLASS(UISUBCLASS_ABSTRACT_CONTROL_MODEL), - USB_IFACE_PROTOCOL(0xff)}, -#endif + /* Generic RNDIS class match */ {USB_IFACE_CLASS(UICLASS_WIRELESS), USB_IFACE_SUBCLASS(UISUBCLASS_RF), - USB_IFACE_PROTOCOL(UIPROTO_RNDIS)}, + USB_IFACE_PROTOCOL(UIPROTO_RNDIS)}, {USB_IFACE_CLASS(UICLASS_IAD), USB_IFACE_SUBCLASS(UISUBCLASS_SYNC), - USB_IFACE_PROTOCOL(UIPROTO_ACTIVESYNC)}, + USB_IFACE_PROTOCOL(UIPROTO_ACTIVESYNC)}, + /* HP-WebOS */ + {USB_VENDOR(USB_VENDOR_PALM), USB_IFACE_CLASS(UICLASS_CDC), + USB_IFACE_SUBCLASS(UISUBCLASS_ABSTRACT_CONTROL_MODEL), + USB_IFACE_PROTOCOL(0xff)}, }; static int Modified: stable/10/sys/dev/usb/serial/umodem.c ============================================================================== --- stable/10/sys/dev/usb/serial/umodem.c Fri Dec 26 11:25:56 2014 (r276242) +++ stable/10/sys/dev/usb/serial/umodem.c Fri Dec 26 11:32:34 2014 (r276243) @@ -122,7 +122,7 @@ static const STRUCT_USB_HOST_ID umodem_d USB_IFACE_SUBCLASS(UISUBCLASS_ABSTRACT_CONTROL_MODEL), USB_IFACE_PROTOCOL(UIPROTO_CDC_AT)}, /* Huawei Modem class match */ - {USB_IFACE_CLASS(UICLASS_CDC), + {USB_VENDOR(USB_VENDOR_HUAWEI),USB_IFACE_CLASS(UICLASS_CDC), USB_IFACE_SUBCLASS(UISUBCLASS_ABSTRACT_CONTROL_MODEL), USB_IFACE_PROTOCOL(0xFF)}, /* Kyocera AH-K3001V */ From owner-svn-src-all@FreeBSD.ORG Fri Dec 26 11:34:47 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 85F12522; Fri, 26 Dec 2014 11:34:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 70BDC6444C; Fri, 26 Dec 2014 11:34:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBQBYl9S053501; Fri, 26 Dec 2014 11:34:47 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBQBYkDS053498; Fri, 26 Dec 2014 11:34:46 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201412261134.sBQBYkDS053498@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 26 Dec 2014 11:34:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r276244 - in stable/9: etc/devd sys/dev/usb/net sys/dev/usb/serial X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2014 11:34:47 -0000 Author: hselasky Date: Fri Dec 26 11:34:45 2014 New Revision: 276244 URL: https://svnweb.freebsd.org/changeset/base/276244 Log: MFC r275790 and r275791: Resolve USB driver identification conflict. Regenerate etc/devd/usb.conf. Modified: stable/9/etc/devd/usb.conf stable/9/sys/dev/usb/net/if_urndis.c stable/9/sys/dev/usb/serial/umodem.c Directory Properties: stable/9/etc/ (props changed) stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/etc/devd/usb.conf ============================================================================== --- stable/9/etc/devd/usb.conf Fri Dec 26 11:32:34 2014 (r276243) +++ stable/9/etc/devd/usb.conf Fri Dec 26 11:34:45 2014 (r276244) @@ -1017,7 +1017,23 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x056e"; - match "product" "(0x200c|0x4002|0x4005|0x400b|0x4010)"; + match "product" "(0x200c|0x4002|0x4005)"; + action "kldload -n if_aue"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x056e"; + match "product" "0x4008"; + action "kldload -n if_urtwn"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x056e"; + match "product" "(0x400b|0x4010)"; action "kldload -n if_aue"; }; @@ -1177,7 +1193,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x05c6"; - match "product" "(0x1000|0x6000|0x6613|0x9000|0x9204|0x9205)"; + match "product" "(0x1000|0x6000|0x6500|0x6613|0x9000|0x9204|0x9205)"; action "kldload -n u3g"; }; @@ -2545,7 +2561,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x0bda"; - match "product" "(0x8176|0x8176|0x8177|0x8178|0x8179|0x817a|0x817b|0x817c|0x817d|0x817e)"; + match "product" "(0x8176|0x8176|0x8177|0x8178|0x8179|0x817a|0x817b|0x817c|0x817d|0x817e|0x817f)"; action "kldload -n if_urtwn"; }; @@ -3617,7 +3633,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x12d1"; - match "product" "(0x1001|0x1003|0x1004|0x1401|0x1402|0x1403|0x1404|0x1405|0x1406|0x1407|0x1408|0x1409|0x140a|0x140b|0x140c|0x140d|0x140e|0x140f|0x1410|0x1411|0x1412|0x1413|0x1414|0x1415|0x1416|0x1417|0x1418|0x1419|0x141a|0x141b|0x141c|0x141d|0x141e|0x141f|0x1420|0x1421|0x1422|0x1423|0x1424|0x1425|0x1426|0x1427|0x1428|0x1429|0x142a|0x142b|0x142c|0x142d|0x142e|0x142f|0x1430|0x1431|0x1432|0x1433|0x1434|0x1435|0x1436|0x1437|0x1438|0x1439|0x143a|0x143b|0x143c|0x143d|0x143e|0x143f|0x1446|0x1464|0x1465|0x14ac|0x14c9|0x14d1|0x14fe|0x1505|0x1506|0x1520|0x1521)"; + match "product" "(0x1001|0x1003|0x1004|0x1401|0x1402|0x1403|0x1404|0x1405|0x1406|0x1407|0x1408|0x1409|0x140a|0x140b|0x140c|0x140d|0x140e|0x140f|0x1410|0x1411|0x1412|0x1413|0x1414|0x1415|0x1416|0x1417|0x1418|0x1419|0x141a|0x141b|0x141c|0x141d|0x141e|0x141f|0x1420|0x1421|0x1422|0x1423|0x1424|0x1425|0x1426|0x1427|0x1428|0x1429|0x142a|0x142b|0x142c|0x142d|0x142e|0x142f|0x1430|0x1431|0x1432|0x1433|0x1434|0x1435|0x1436|0x1437|0x1438|0x1439|0x143a|0x143b|0x143c|0x143d|0x143e|0x143f|0x1446|0x1464|0x1465|0x14ac|0x14c9|0x14cf|0x14d1|0x14fe|0x1505|0x1506|0x1520|0x1521|0x1526)"; action "kldload -n u3g"; }; @@ -4489,7 +4505,15 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x19d2"; - match "product" "(0x0001|0x0002|0x0003|0x0004|0x0005|0x0006|0x0007|0x0008|0x0009|0x000a|0x000b|0x000c|0x000d|0x000e|0x000f|0x0010|0x0011|0x0012|0x0013|0x0014|0x0015|0x0016|0x0017|0x0018|0x0019|0x0020|0x0021|0x0022|0x0023|0x0024|0x0025|0x0026|0x0027|0x0028|0x0029|0x0030|0x0031|0x0032|0x0033|0x0037|0x0039|0x0042|0x0043|0x0048|0x0049|0x0051|0x0052|0x0053|0x0054|0x0055|0x0057|0x0058|0x0059|0x0060|0x0061|0x0062|0x0063|0x0064|0x0066|0x0069|0x0070|0x0073|0x0076|0x0078|0x0082|0x0086|0x0117|0x1179|0x2000|0x2002|0x2003|0xfff1|0xfff5|0xfffe)"; + match "product" "(0x0001|0x0002|0x0003|0x0004|0x0005|0x0006|0x0007|0x0008|0x0009|0x000a|0x000b|0x000c|0x000d|0x000e|0x000f|0x0010|0x0011|0x0012|0x0013|0x0014|0x0015|0x0016|0x0017|0x0018|0x0019|0x0020|0x0021|0x0022|0x0023|0x0024|0x0025|0x0026|0x0027|0x0028|0x0029|0x0030|0x0031|0x0032|0x0033|0x0037|0x0039|0x0042|0x0043|0x0048|0x0049|0x0051|0x0052|0x0053|0x0054|0x0055|0x0057|0x0058|0x0059|0x0060|0x0061|0x0062|0x0063|0x0064|0x0066|0x0069|0x0070|0x0073|0x0076|0x0078|0x0082|0x0086|0x0117|0x1179|0x1181|0x1514|0x1516|0x2000|0x2002|0x2003|0xffdd|0xffde|0xfff1|0xfff5|0xfffe)"; + action "kldload -n u3g"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x19f5"; + match "product" "0x9909"; action "kldload -n u3g"; }; @@ -4609,7 +4633,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x1cf1"; - match "product" "(0x0001|0x0004|0x0022)"; + match "product" "(0x0001|0x0004|0x001c|0x0022)"; action "kldload -n uftdi"; }; @@ -4697,7 +4721,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x2001"; - match "product" "(0x3307|0x3308|0x3309|0x330a|0x330d|0x330f)"; + match "product" "(0x3307|0x3308|0x3309|0x330a|0x330d|0x330f|0x3310)"; action "kldload -n if_urtwn"; }; @@ -4897,7 +4921,23 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x20f4"; - match "product" "(0x624d|0x648b)"; + match "product" "0x624d"; + action "kldload -n if_urtwn"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x20f4"; + match "product" "0x646b"; + action "kldload -n if_rsu"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x20f4"; + match "product" "0x648b"; action "kldload -n if_urtwn"; }; @@ -5294,6 +5334,16 @@ nomatch 32 { nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; + match "vendor" "0x0830"; + match "intclass" "0x02"; + match "intsubclass" "0x02"; + match "intprotocol" "0xff"; + action "kldload -n if_urndis"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; match "vendor" "0x0a5c"; match "intclass" "0xff"; match "intsubclass" "0x01"; @@ -5305,6 +5355,16 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x12d1"; + match "intclass" "0x02"; + match "intsubclass" "0x02"; + match "intprotocol" "0xff"; + action "kldload -n umodem"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x12d1"; match "intclass" "0xff"; match "intsubclass" "0x02"; match "intprotocol" "0x16"; @@ -5352,15 +5412,6 @@ nomatch 32 { nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; - match "intclass" "0x02"; - match "intsubclass" "0x02"; - match "intprotocol" "0xff"; - action "kldload -n umodem"; -}; - -nomatch 32 { - match "bus" "uhub[0-9]+"; - match "mode" "host"; match "intclass" "0x03"; match "intsubclass" "0x01"; match "intprotocol" "0x01"; @@ -5501,5 +5552,5 @@ nomatch 32 { action "kldload -n umass"; }; -# 2643 USB entries processed +# 2658 USB entries processed Modified: stable/9/sys/dev/usb/net/if_urndis.c ============================================================================== --- stable/9/sys/dev/usb/net/if_urndis.c Fri Dec 26 11:32:34 2014 (r276243) +++ stable/9/sys/dev/usb/net/if_urndis.c Fri Dec 26 11:34:45 2014 (r276244) @@ -170,15 +170,15 @@ static const struct usb_ether_methods ur }; static const STRUCT_USB_HOST_ID urndis_host_devs[] = { -#if 0 - /* XXX this entry has a conflict an entry the umodem driver XXX */ - {USB_IFACE_CLASS(UICLASS_CDC), USB_IFACE_SUBCLASS(UISUBCLASS_ABSTRACT_CONTROL_MODEL), - USB_IFACE_PROTOCOL(0xff)}, -#endif + /* Generic RNDIS class match */ {USB_IFACE_CLASS(UICLASS_WIRELESS), USB_IFACE_SUBCLASS(UISUBCLASS_RF), - USB_IFACE_PROTOCOL(UIPROTO_RNDIS)}, + USB_IFACE_PROTOCOL(UIPROTO_RNDIS)}, {USB_IFACE_CLASS(UICLASS_IAD), USB_IFACE_SUBCLASS(UISUBCLASS_SYNC), - USB_IFACE_PROTOCOL(UIPROTO_ACTIVESYNC)}, + USB_IFACE_PROTOCOL(UIPROTO_ACTIVESYNC)}, + /* HP-WebOS */ + {USB_VENDOR(USB_VENDOR_PALM), USB_IFACE_CLASS(UICLASS_CDC), + USB_IFACE_SUBCLASS(UISUBCLASS_ABSTRACT_CONTROL_MODEL), + USB_IFACE_PROTOCOL(0xff)}, }; static int Modified: stable/9/sys/dev/usb/serial/umodem.c ============================================================================== --- stable/9/sys/dev/usb/serial/umodem.c Fri Dec 26 11:32:34 2014 (r276243) +++ stable/9/sys/dev/usb/serial/umodem.c Fri Dec 26 11:34:45 2014 (r276244) @@ -122,7 +122,7 @@ static const STRUCT_USB_HOST_ID umodem_d USB_IFACE_SUBCLASS(UISUBCLASS_ABSTRACT_CONTROL_MODEL), USB_IFACE_PROTOCOL(UIPROTO_CDC_AT)}, /* Huawei Modem class match */ - {USB_IFACE_CLASS(UICLASS_CDC), + {USB_VENDOR(USB_VENDOR_HUAWEI),USB_IFACE_CLASS(UICLASS_CDC), USB_IFACE_SUBCLASS(UISUBCLASS_ABSTRACT_CONTROL_MODEL), USB_IFACE_PROTOCOL(0xFF)}, /* Kyocera AH-K3001V */ From owner-svn-src-all@FreeBSD.ORG Fri Dec 26 11:47:12 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DF18B813; Fri, 26 Dec 2014 11:47:12 +0000 (UTC) Received: from nibbler.fubar.geek.nz (nibbler.fubar.geek.nz [199.48.134.198]) by mx1.freebsd.org (Postfix) with ESMTP id C26F4645D2; Fri, 26 Dec 2014 11:47:12 +0000 (UTC) Received: from bender (unknown [213.205.252.212]) by nibbler.fubar.geek.nz (Postfix) with ESMTPSA id 369F17328F; Fri, 26 Dec 2014 11:47:05 +0000 (UTC) Date: Fri, 26 Dec 2014 11:46:59 +0000 From: Andrew Turner To: Ian Lepore Subject: Re: svn commit: r276212 - head/sys/arm/include Message-ID: <20141226114659.37e384b3@bender> In-Reply-To: <201412251908.sBPJ8ej0079939@svn.freebsd.org> References: <201412251908.sBPJ8ej0079939@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2014 11:47:13 -0000 On Thu, 25 Dec 2014 19:08:40 +0000 (UTC) Ian Lepore wrote: > Author: ian > Date: Thu Dec 25 19:08:39 2014 > New Revision: 276212 > URL: https://svnweb.freebsd.org/changeset/base/276212 > > Log: > Add macros for asm barrier instructions with arch-specific > implementations. > > Modified: > head/sys/arm/include/asm.h > > Modified: head/sys/arm/include/asm.h > ============================================================================== > --- head/sys/arm/include/asm.h Thu Dec 25 18:22:22 2014 > (r276211) +++ head/sys/arm/include/asm.h Thu Dec 25 19:08:39 > 2014 (r276212) @@ -39,6 +39,7 @@ > #ifndef _MACHINE_ASM_H_ > #define _MACHINE_ASM_H_ > #include > +#include > > #define _C_LABEL(x) x > #define _ASM_LABEL(x) x > @@ -221,4 +222,18 @@ > # define RETc(c) mov##c pc, lr > #endif > > +#if __ARM_ARCH >= 7 Either this file or all other files that include it should include to pick up __ARM_ARCH when building with gcc. Andrew From owner-svn-src-all@FreeBSD.ORG Fri Dec 26 11:53:47 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8BD2FA5B; Fri, 26 Dec 2014 11:53:47 +0000 (UTC) Received: from nibbler.fubar.geek.nz (nibbler.fubar.geek.nz [199.48.134.198]) by mx1.freebsd.org (Postfix) with ESMTP id 6C3F864741; Fri, 26 Dec 2014 11:53:46 +0000 (UTC) Received: from bender (unknown [213.205.252.212]) by nibbler.fubar.geek.nz (Postfix) with ESMTPSA id 9C0087328F; Fri, 26 Dec 2014 11:53:45 +0000 (UTC) Date: Fri, 26 Dec 2014 11:53:43 +0000 From: Andrew Turner To: Rui Paulo Subject: Re: svn commit: r276187 - head/sys/arm/arm Message-ID: <20141226115343.7abbd2d4@bender> In-Reply-To: <9F69A6CD-D352-4A91-97F6-B3E1FF638211@me.com> References: <201412241712.sBOHCqvW039381@svn.freebsd.org> <20141224222637.03a19e57@bender> <1419460812.1018.157.camel@freebsd.org> <8E8B7FE3-0C97-4A84-BC1D-1C5A0E732D0C@me.com> <1419471084.1018.160.camel@freebsd.org> <9F69A6CD-D352-4A91-97F6-B3E1FF638211@me.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Ian Lepore X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2014 11:53:47 -0000 On Wed, 24 Dec 2014 18:05:47 -0800 Rui Paulo wrote: > On Dec 24, 2014, at 17:31, Ian Lepore wrote: > > In every architecture and every place it's used, or just arm just > > here? > > You're right, it can be found at least in MIPS and amd64. > > > This appears to be an idiom, or at least something that has been > > pasted in identical form in every arch so far. > > The idiom is a bit different in amd64: the variable in the for-loop > isn't immediately reused, but it's a global variable anyway... > That's what I thought deserves a comment. I agree we should add a comment here. It's non-obvious the functions will return the same value across multiple calls. > Regarding the pmap_kenter_temporary(), the first problem is the > function name: it might be a temporary mapping, but the real use is > for crash dumps (I wonder why ACPI abuses this mapping). The other > problem is the fact that a pmap function is so tied to crash dumps. > However, that's a bigger problem. Yes, this functions looks like it needs to be reworked a little but I would have to think about it first. Andrew From owner-svn-src-all@FreeBSD.ORG Fri Dec 26 13:44:42 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 69226CAD; Fri, 26 Dec 2014 13:44:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 55CE467DDF; Fri, 26 Dec 2014 13:44:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBQDig18013793; Fri, 26 Dec 2014 13:44:42 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBQDigpM013792; Fri, 26 Dec 2014 13:44:42 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201412261344.sBQDigpM013792@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 26 Dec 2014 13:44:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276245 - head/sys/arm/ti X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2014 13:44:42 -0000 Author: ian Date: Fri Dec 26 13:44:41 2014 New Revision: 276245 URL: https://svnweb.freebsd.org/changeset/base/276245 Log: Squelch a (bogus) gcc use-before-init warning. Modified: head/sys/arm/ti/ti_gpio.c Modified: head/sys/arm/ti/ti_gpio.c ============================================================================== --- head/sys/arm/ti/ti_gpio.c Fri Dec 26 11:34:45 2014 (r276244) +++ head/sys/arm/ti/ti_gpio.c Fri Dec 26 13:44:41 2014 (r276245) @@ -618,6 +618,7 @@ ti_gpio_intr(void *arg) sc = (struct ti_gpio_softc *)arg; bank_last = -1; + reg = 0; /* squelch bogus gcc warning */ for (irq = 0; irq < sc->sc_maxpin; irq++) { /* Read interrupt status only once for each bank. */ From owner-svn-src-all@FreeBSD.ORG Fri Dec 26 14:26:58 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9B4BD778; Fri, 26 Dec 2014 14:26:58 +0000 (UTC) Received: from mho-01-ewr.mailhop.org (mho-03-ewr.mailhop.org [204.13.248.66]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6FA602449; Fri, 26 Dec 2014 14:26:57 +0000 (UTC) Received: from [73.34.117.227] (helo=ilsoft.org) by mho-01-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1Y4Vqt-000CSz-GY; Fri, 26 Dec 2014 14:26:51 +0000 Received: from revolution.hippie.lan (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id sBQEQnxl039286; Fri, 26 Dec 2014 07:26:49 -0700 (MST) (envelope-from ian@freebsd.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 73.34.117.227 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX1+QBPDbuiEowHfPEG0xSfg6 Message-ID: <1419604009.1018.185.camel@freebsd.org> Subject: Re: svn commit: r276212 - head/sys/arm/include From: Ian Lepore To: Andrew Turner Date: Fri, 26 Dec 2014 07:26:49 -0700 In-Reply-To: <20141226114659.37e384b3@bender> References: <201412251908.sBPJ8ej0079939@svn.freebsd.org> <20141226114659.37e384b3@bender> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.12.8 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2014 14:26:58 -0000 On Fri, 2014-12-26 at 11:46 +0000, Andrew Turner wrote: > On Thu, 25 Dec 2014 19:08:40 +0000 (UTC) > Ian Lepore wrote: > > > Author: ian > > Date: Thu Dec 25 19:08:39 2014 > > New Revision: 276212 > > URL: https://svnweb.freebsd.org/changeset/base/276212 > > > > Log: > > Add macros for asm barrier instructions with arch-specific > > implementations. > > > > Modified: > > head/sys/arm/include/asm.h > > > > Modified: head/sys/arm/include/asm.h > > ============================================================================== > > --- head/sys/arm/include/asm.h Thu Dec 25 18:22:22 2014 > > (r276211) +++ head/sys/arm/include/asm.h Thu Dec 25 19:08:39 > > 2014 (r276212) @@ -39,6 +39,7 @@ > > #ifndef _MACHINE_ASM_H_ > > #define _MACHINE_ASM_H_ > > #include > > +#include > > > > #define _C_LABEL(x) x > > #define _ASM_LABEL(x) x > > @@ -221,4 +222,18 @@ > > # define RETc(c) mov##c pc, lr > > #endif > > > > +#if __ARM_ARCH >= 7 > > Either this file or all other files that include it should include > to pick up __ARM_ARCH when building with gcc. > > Andrew > It was already picking up acle-compat.h via sysreg.h (it passed a gcc arm-universe build). But in general I think that anything, header or source file, that refers to the acle symbols should directly include acle-compat.h for itself (because the contents of that file are essentially an extension of the compiler's builtin predefines). We're overdue for a big cleanup of arm "what arch am I?" symbols, but with intrng and new-pmap in the works, doing it right now will just create lots of merge conflicts. -- Ian From owner-svn-src-all@FreeBSD.ORG Fri Dec 26 14:29:29 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 12AE09A0; Fri, 26 Dec 2014 14:29:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F3644246E; Fri, 26 Dec 2014 14:29:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBQETSZn033936; Fri, 26 Dec 2014 14:29:28 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBQETS0t033935; Fri, 26 Dec 2014 14:29:28 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201412261429.sBQETS0t033935@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 26 Dec 2014 14:29:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276247 - head/sys/arm/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2014 14:29:29 -0000 Author: ian Date: Fri Dec 26 14:29:27 2014 New Revision: 276247 URL: https://svnweb.freebsd.org/changeset/base/276247 Log: Include acle-compat.h directly (we use its symbols) rather than getting it via sysreg.h. Modified: head/sys/arm/include/asm.h Modified: head/sys/arm/include/asm.h ============================================================================== --- head/sys/arm/include/asm.h Fri Dec 26 14:22:39 2014 (r276246) +++ head/sys/arm/include/asm.h Fri Dec 26 14:29:27 2014 (r276247) @@ -39,6 +39,7 @@ #ifndef _MACHINE_ASM_H_ #define _MACHINE_ASM_H_ #include +#include #include #define _C_LABEL(x) x From owner-svn-src-all@FreeBSD.ORG Fri Dec 26 17:45:51 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0390C586; Fri, 26 Dec 2014 17:45:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C9C7966484; Fri, 26 Dec 2014 17:45:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBQHjo7F029673; Fri, 26 Dec 2014 17:45:50 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBQHjoMj029672; Fri, 26 Dec 2014 17:45:50 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201412261745.sBQHjoMj029672@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Fri, 26 Dec 2014 17:45:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276249 - head/sys/arm/ti/am335x X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2014 17:45:51 -0000 Author: loos Date: Fri Dec 26 17:45:49 2014 New Revision: 276249 URL: https://svnweb.freebsd.org/changeset/base/276249 Log: Fix the musb initialization sequence on AM335x. According to http://e2e.ti.com/support/arm/sitara_arm/f/791/t/210729 the USB reset pulse has an undocumented duration of 200ns and during this period the module must not be acessed. We wait for 100us to take into account for some imprecision of the early DELAY() loop. This fixes the eventual 'External Non-Linefetch Abort (S)' that happens at boot while resetting the musb subsystem. While here, enable the USB subsystem clock before the first access. Discussed with: ian, adrian MFC after: 2 weeks Modified: head/sys/arm/ti/am335x/am335x_usbss.c Modified: head/sys/arm/ti/am335x/am335x_usbss.c ============================================================================== --- head/sys/arm/ti/am335x/am335x_usbss.c Fri Dec 26 15:04:03 2014 (r276248) +++ head/sys/arm/ti/am335x/am335x_usbss.c Fri Dec 26 17:45:49 2014 (r276249) @@ -288,21 +288,30 @@ musbotg_attach(device_t dev) return (ENXIO); } + /* Enable device clocks. */ + ti_prcm_clk_enable(MUSB0_CLK); + /* - * Reset USBSS, USB0 and USB1 + * Reset USBSS, USB0 and USB1. + * The registers of USB subsystem must not be accessed while the + * reset pulse is active (200ns). */ + USBSS_WRITE4(sc, USBSS_SYSCONFIG, USBSS_SYSCONFIG_SRESET); + DELAY(100); + i = 10; + while (USBSS_READ4(sc, USBSS_SYSCONFIG) & USBSS_SYSCONFIG_SRESET) { + DELAY(100); + if (i-- == 0) { + device_printf(dev, "reset timeout.\n"); + return (ENXIO); + } + } + + /* Read the module revision. */ rev = USBSS_READ4(sc, USBSS_REVREG); device_printf(dev, "TI AM335X USBSS v%d.%d.%d\n", (rev >> 8) & 7, (rev >> 6) & 3, rev & 63); - ti_prcm_clk_enable(MUSB0_CLK); - - USBSS_WRITE4(sc, USBSS_SYSCONFIG, - USBSS_SYSCONFIG_SRESET); - while (USBSS_READ4(sc, USBSS_SYSCONFIG) & - USBSS_SYSCONFIG_SRESET) - ; - err = bus_setup_intr(dev, sc->sc_irq_res[0], INTR_TYPE_BIO | INTR_MPSAFE, NULL, (driver_intr_t *)musbotg_usbss_interrupt, sc, From owner-svn-src-all@FreeBSD.ORG Fri Dec 26 17:59:03 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C150F7C9; Fri, 26 Dec 2014 17:59:03 +0000 (UTC) Received: from mail-wi0-x22d.google.com (mail-wi0-x22d.google.com [IPv6:2a00:1450:400c:c05::22d]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 512D5665DF; Fri, 26 Dec 2014 17:59:03 +0000 (UTC) Received: by mail-wi0-f173.google.com with SMTP id r20so17406265wiv.12; Fri, 26 Dec 2014 09:59:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=gKtl2rInpapjacQjAr9JU3pBL3VGHJwUzmuO3VUprjQ=; b=YT+Qy5TrNndQPaUH5Ifc4+lQJ3n7Vv08uunA5Fit+KpmnyjaCoOtdEfvz88g6/xKtU AwAHUzDBRSPRT+6a98d5MFOKs9/01WE6h/a2H5ajHGnNPfdt7kV8eApbk08PDjhc2Nv9 PduP+fWbS5MMC9pYjuv0X7+XFRt/5kWrB6HE9SByTgAagZwbcGfdwm672oNXuo6i6gRp TE4x10NJRLnsNzWHlYA/kiIfjfidhXsRrBiAX1XkV59sW/ziApqhNUd+HGDPtAlj38Z8 ILNMMS4Ue5jb1CLgcLFd7h/053g8V9tzlvnrvmDK94uenB7v52TwD+CIScfsB/lLVwG7 oZ7w== MIME-Version: 1.0 X-Received: by 10.180.80.163 with SMTP id s3mr69465539wix.59.1419616741798; Fri, 26 Dec 2014 09:59:01 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.216.106.195 with HTTP; Fri, 26 Dec 2014 09:59:01 -0800 (PST) In-Reply-To: <201412261745.sBQHjoMj029672@svn.freebsd.org> References: <201412261745.sBQHjoMj029672@svn.freebsd.org> Date: Fri, 26 Dec 2014 09:59:01 -0800 X-Google-Sender-Auth: rZ4ZuWBd3fBB2xfSU_TBREHebhI Message-ID: Subject: Re: svn commit: r276249 - head/sys/arm/ti/am335x From: Adrian Chadd To: Luiz Otavio O Souza Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2014 17:59:04 -0000 Holy crap, great catch! -adrian On 26 December 2014 at 09:45, Luiz Otavio O Souza wrote: > Author: loos > Date: Fri Dec 26 17:45:49 2014 > New Revision: 276249 > URL: https://svnweb.freebsd.org/changeset/base/276249 > > Log: > Fix the musb initialization sequence on AM335x. > > According to http://e2e.ti.com/support/arm/sitara_arm/f/791/t/210729 the > USB reset pulse has an undocumented duration of 200ns and during this > period the module must not be acessed. > > We wait for 100us to take into account for some imprecision of the early > DELAY() loop. > > This fixes the eventual 'External Non-Linefetch Abort (S)' that happens at > boot while resetting the musb subsystem. > > While here, enable the USB subsystem clock before the first access. > > Discussed with: ian, adrian > MFC after: 2 weeks > > Modified: > head/sys/arm/ti/am335x/am335x_usbss.c > > Modified: head/sys/arm/ti/am335x/am335x_usbss.c > ============================================================================== > --- head/sys/arm/ti/am335x/am335x_usbss.c Fri Dec 26 15:04:03 2014 (r276248) > +++ head/sys/arm/ti/am335x/am335x_usbss.c Fri Dec 26 17:45:49 2014 (r276249) > @@ -288,21 +288,30 @@ musbotg_attach(device_t dev) > return (ENXIO); > } > > + /* Enable device clocks. */ > + ti_prcm_clk_enable(MUSB0_CLK); > + > /* > - * Reset USBSS, USB0 and USB1 > + * Reset USBSS, USB0 and USB1. > + * The registers of USB subsystem must not be accessed while the > + * reset pulse is active (200ns). > */ > + USBSS_WRITE4(sc, USBSS_SYSCONFIG, USBSS_SYSCONFIG_SRESET); > + DELAY(100); > + i = 10; > + while (USBSS_READ4(sc, USBSS_SYSCONFIG) & USBSS_SYSCONFIG_SRESET) { > + DELAY(100); > + if (i-- == 0) { > + device_printf(dev, "reset timeout.\n"); > + return (ENXIO); > + } > + } > + > + /* Read the module revision. */ > rev = USBSS_READ4(sc, USBSS_REVREG); > device_printf(dev, "TI AM335X USBSS v%d.%d.%d\n", > (rev >> 8) & 7, (rev >> 6) & 3, rev & 63); > > - ti_prcm_clk_enable(MUSB0_CLK); > - > - USBSS_WRITE4(sc, USBSS_SYSCONFIG, > - USBSS_SYSCONFIG_SRESET); > - while (USBSS_READ4(sc, USBSS_SYSCONFIG) & > - USBSS_SYSCONFIG_SRESET) > - ; > - > err = bus_setup_intr(dev, sc->sc_irq_res[0], > INTR_TYPE_BIO | INTR_MPSAFE, > NULL, (driver_intr_t *)musbotg_usbss_interrupt, sc, > From owner-svn-src-all@FreeBSD.ORG Fri Dec 26 18:53:30 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 400EC745; Fri, 26 Dec 2014 18:53:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2BB122DF1; Fri, 26 Dec 2014 18:53:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBQIrUUg062694; Fri, 26 Dec 2014 18:53:30 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBQIrU6S062693; Fri, 26 Dec 2014 18:53:30 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201412261853.sBQIrU6S062693@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 26 Dec 2014 18:53:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276250 - head/cddl/contrib/opensolaris/lib/libdtrace/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2014 18:53:30 -0000 Author: markj Date: Fri Dec 26 18:53:29 2014 New Revision: 276250 URL: https://svnweb.freebsd.org/changeset/base/276250 Log: DOF tables are aligned according to the DOF section's alignment constraint, so take this into account when iterating over DOF tables. PR: 195555 Submitted by: Fedor Indutny (original version) MFC after: 1 week Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/drti.c Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/drti.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/drti.c Fri Dec 26 17:45:49 2014 (r276249) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/drti.c Fri Dec 26 18:53:29 2014 (r276250) @@ -127,6 +127,7 @@ dtrace_dof_init(void) int efd; char *s; size_t shstridx; + uint64_t aligned_filesz; #endif if (getenv("DTRACE_DOF_INIT_DISABLE") != NULL) @@ -183,7 +184,9 @@ dtrace_dof_init(void) } while ((char *) dof < (char *) dofdata->d_buf + dofdata->d_size) { - dof_next = (void *) ((char *) dof + dof->dofh_filesz); + aligned_filesz = (shdr.sh_addralign == 0 ? dof->dofh_filesz : + roundup2(dof->dofh_filesz, shdr.sh_addralign)); + dof_next = (void *) ((char *) dof + aligned_filesz); #endif if (dof->dofh_ident[DOF_ID_MAG0] != DOF_MAG_MAG0 || From owner-svn-src-all@FreeBSD.ORG Fri Dec 26 20:49:25 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4B0B3355; Fri, 26 Dec 2014 20:49:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1CEBA66F43; Fri, 26 Dec 2014 20:49:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBQKnOP3016035; Fri, 26 Dec 2014 20:49:24 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBQKnOL9016031; Fri, 26 Dec 2014 20:49:24 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201412262049.sBQKnOL9016031@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Fri, 26 Dec 2014 20:49:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276251 - head/contrib/elftoolchain/libdwarf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2014 20:49:25 -0000 Author: bapt Date: Fri Dec 26 20:49:23 2014 New Revision: 276251 URL: https://svnweb.freebsd.org/changeset/base/276251 Log: mdoc fixes Modified: head/contrib/elftoolchain/libdwarf/dwarf_get_AT_name.3 head/contrib/elftoolchain/libdwarf/dwarf_get_arange_info.3 head/contrib/elftoolchain/libdwarf/dwarf_hasattr.3 head/contrib/elftoolchain/libdwarf/dwarf_whatattr.3 Modified: head/contrib/elftoolchain/libdwarf/dwarf_get_AT_name.3 ============================================================================== --- head/contrib/elftoolchain/libdwarf/dwarf_get_AT_name.3 Fri Dec 26 18:53:29 2014 (r276250) +++ head/contrib/elftoolchain/libdwarf/dwarf_get_AT_name.3 Fri Dec 26 20:49:23 2014 (r276251) @@ -247,6 +247,7 @@ constants. .It Fn dwarf_get_VIS_name .Dv DW_VIS_* constants. +.El .Sh RETURN VALUES These functions return .Dv DW_DLV_OK on success. Modified: head/contrib/elftoolchain/libdwarf/dwarf_get_arange_info.3 ============================================================================== --- head/contrib/elftoolchain/libdwarf/dwarf_get_arange_info.3 Fri Dec 26 18:53:29 2014 (r276250) +++ head/contrib/elftoolchain/libdwarf/dwarf_get_arange_info.3 Fri Dec 26 20:49:23 2014 (r276251) @@ -102,6 +102,7 @@ One of the arguments or .Ar cu_die_offset was NULL. +.El .Sh EXAMPLE To loop through all the address lookup table entries, use: .Bd -literal -offset indent Modified: head/contrib/elftoolchain/libdwarf/dwarf_hasattr.3 ============================================================================== --- head/contrib/elftoolchain/libdwarf/dwarf_hasattr.3 Fri Dec 26 18:53:29 2014 (r276250) +++ head/contrib/elftoolchain/libdwarf/dwarf_hasattr.3 Fri Dec 26 20:49:23 2014 (r276251) @@ -85,6 +85,7 @@ Either of argument or .Va ret_bool was NULL. +.El .Sh SEE ALSO .Xr dwarf 3 , .Xr dwarf_attr 3 , Modified: head/contrib/elftoolchain/libdwarf/dwarf_whatattr.3 ============================================================================== --- head/contrib/elftoolchain/libdwarf/dwarf_whatattr.3 Fri Dec 26 18:53:29 2014 (r276250) +++ head/contrib/elftoolchain/libdwarf/dwarf_whatattr.3 Fri Dec 26 20:49:23 2014 (r276251) @@ -72,6 +72,7 @@ Either of argument or .Va retcode was NULL. +.El .Sh SEE ALSO .Xr dwarf 3 , .Xr dwarf_attr 3 , From owner-svn-src-all@FreeBSD.ORG Fri Dec 26 20:50:41 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 72C374A0; Fri, 26 Dec 2014 20:50:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5F7AC66F57; Fri, 26 Dec 2014 20:50:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBQKofCl018743; Fri, 26 Dec 2014 20:50:41 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBQKofu9018742; Fri, 26 Dec 2014 20:50:41 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201412262050.sBQKofu9018742@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Fri, 26 Dec 2014 20:50:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276252 - head/contrib/elftoolchain/libelf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2014 20:50:41 -0000 Author: bapt Date: Fri Dec 26 20:50:40 2014 New Revision: 276252 URL: https://svnweb.freebsd.org/changeset/base/276252 Log: mdoc fixes Modified: head/contrib/elftoolchain/libelf/elf.3 Modified: head/contrib/elftoolchain/libelf/elf.3 ============================================================================== --- head/contrib/elftoolchain/libelf/elf.3 Fri Dec 26 20:49:23 2014 (r276251) +++ head/contrib/elftoolchain/libelf/elf.3 Fri Dec 26 20:50:40 2014 (r276252) @@ -389,7 +389,6 @@ See .It Dv SHT_SUNW_move Ta Dv ELF_T_MOVE Ta ELF move records. .It Dv SHT_SUNW_syminfo Ta Dv ELF_T_SYMINFO Ta Additional symbol flags. .El -.TE .Ss Functional Grouping This section contains a brief overview of the available functionality in the ELF library. From owner-svn-src-all@FreeBSD.ORG Fri Dec 26 20:57:12 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3D24863B; Fri, 26 Dec 2014 20:57:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0E79567068; Fri, 26 Dec 2014 20:57:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBQKvBug020498; Fri, 26 Dec 2014 20:57:11 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBQKvBFP020489; Fri, 26 Dec 2014 20:57:11 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201412262057.sBQKvBFP020489@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Fri, 26 Dec 2014 20:57:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276253 - head/contrib/libxo/libxo X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2014 20:57:12 -0000 Author: bapt Date: Fri Dec 26 20:57:10 2014 New Revision: 276253 URL: https://svnweb.freebsd.org/changeset/base/276253 Log: mdoc fixes Modified: head/contrib/libxo/libxo/xo_create.3 head/contrib/libxo/libxo/xo_emit.3 head/contrib/libxo/libxo/xo_open_container.3 Modified: head/contrib/libxo/libxo/xo_create.3 ============================================================================== --- head/contrib/libxo/libxo/xo_create.3 Fri Dec 26 20:50:40 2014 (r276252) +++ head/contrib/libxo/libxo/xo_create.3 Fri Dec 26 20:57:10 2014 (r276253) @@ -76,7 +76,7 @@ https://github.com/Juniper/libxo/release .Sh SEE ALSO .Xr xo_emit 3 and -.Xf xo_set_options 3 . +.Xr xo_set_options 3 . .Sh HISTORY The .Fa libxo Modified: head/contrib/libxo/libxo/xo_emit.3 ============================================================================== --- head/contrib/libxo/libxo/xo_emit.3 Fri Dec 26 20:50:40 2014 (r276252) +++ head/contrib/libxo/libxo/xo_emit.3 Fri Dec 26 20:57:10 2014 (r276253) @@ -35,7 +35,7 @@ but using a more complex format descript .Pp .Fn xo_emit uses the default output handle, as described in -.Xf libxo 3 , +.Xr libxo 3 , where .Fn xo_emit_h uses an explicit handle. Modified: head/contrib/libxo/libxo/xo_open_container.3 ============================================================================== --- head/contrib/libxo/libxo/xo_open_container.3 Fri Dec 26 20:50:40 2014 (r276252) +++ head/contrib/libxo/libxo/xo_open_container.3 Fri Dec 26 20:57:10 2014 (r276253) @@ -105,7 +105,7 @@ container, a warning will be generated.
my-host.example.org
.Ed -.SH EMITTING HIERARCHY +.Sh EMITTING HIERARCHY To create a container, use the .Fn xo_open_container and @@ -131,7 +131,7 @@ traditional C strings can be used direct The close functions with the .Dq _d suffix are used in -.Dq Do The Right Thing +.Dq The Right Thing mode, where the name of the open containers, lists, and instances are maintained internally by .Em libxo @@ -161,7 +161,7 @@ Some user may find tracking the names of instances inconvenient. .Em libxo offers -.Dq Do The Right Thing +.Dq The Right Thing mode, where .Em libxo will track the names of open containers, lists, and instances so From owner-svn-src-all@FreeBSD.ORG Fri Dec 26 21:03:57 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E6B2A8DC; Fri, 26 Dec 2014 21:03:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D354E67158; Fri, 26 Dec 2014 21:03:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBQL3vxq025048; Fri, 26 Dec 2014 21:03:57 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBQL3vLC025047; Fri, 26 Dec 2014 21:03:57 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201412262103.sBQL3vLC025047@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Fri, 26 Dec 2014 21:03:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276254 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2014 21:03:58 -0000 Author: bapt Date: Fri Dec 26 21:03:56 2014 New Revision: 276254 URL: https://svnweb.freebsd.org/changeset/base/276254 Log: mdoc fixes (escape the dot to prevent ... to be considered as a macro) Modified: head/share/man/man4/netmap.4 Modified: head/share/man/man4/netmap.4 ============================================================================== --- head/share/man/man4/netmap.4 Fri Dec 26 20:57:10 2014 (r276253) +++ head/share/man/man4/netmap.4 Fri Dec 26 21:03:56 2014 (r276254) @@ -885,7 +885,7 @@ The following code implements a traffic .Pp .Bd -literal -compact #include -... +\&... void sender(void) { struct netmap_if *nifp; @@ -920,7 +920,7 @@ A simple receiver can be implemented usi .Bd -literal -compact #define NETMAP_WITH_LIBS #include -... +\&... void receiver(void) { struct nm_desc *d; From owner-svn-src-all@FreeBSD.ORG Fri Dec 26 21:11:34 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6F707ACC; Fri, 26 Dec 2014 21:11:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5BCAB67277; Fri, 26 Dec 2014 21:11:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBQLBYPI029460; Fri, 26 Dec 2014 21:11:34 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBQLBYlo029459; Fri, 26 Dec 2014 21:11:34 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201412262111.sBQLBYlo029459@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Fri, 26 Dec 2014 21:11:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276255 - head/share/man/man3 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2014 21:11:34 -0000 Author: bapt Date: Fri Dec 26 21:11:33 2014 New Revision: 276255 URL: https://svnweb.freebsd.org/changeset/base/276255 Log: Escape Ed to prevent mandoc to avoid confusion with the mdoc's Ed macros Modified: head/share/man/man3/ATOMIC_VAR_INIT.3 Modified: head/share/man/man3/ATOMIC_VAR_INIT.3 ============================================================================== --- head/share/man/man3/ATOMIC_VAR_INIT.3 Fri Dec 26 21:03:56 2014 (r276254) +++ head/share/man/man3/ATOMIC_VAR_INIT.3 Fri Dec 26 21:11:33 2014 (r276255) @@ -297,5 +297,5 @@ These macros attempt to conform to These macros appeared in .Fx 10.0 . .Sh AUTHORS -.An Ed Schouten Aq Mt ed@FreeBSD.org +.An \&Ed Schouten Aq Mt ed@FreeBSD.org .An David Chisnall Aq Mt theraven@FreeBSD.org From owner-svn-src-all@FreeBSD.ORG Fri Dec 26 21:40:46 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D7C33E42; Fri, 26 Dec 2014 21:40:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C33CD6761A; Fri, 26 Dec 2014 21:40:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBQLekqs039869; Fri, 26 Dec 2014 21:40:46 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBQLekf0039868; Fri, 26 Dec 2014 21:40:46 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201412262140.sBQLekf0039868@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 26 Dec 2014 21:40:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276256 - stable/10/tools/build/make_check X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2014 21:40:47 -0000 Author: ian Date: Fri Dec 26 21:40:45 2014 New Revision: 276256 URL: https://svnweb.freebsd.org/changeset/base/276256 Log: MFC r270190: Don't kill parallel jobs on (expected) failure of make_check. Modified: stable/10/tools/build/make_check/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/tools/build/make_check/Makefile ============================================================================== --- stable/10/tools/build/make_check/Makefile Fri Dec 26 21:11:33 2014 (r276255) +++ stable/10/tools/build/make_check/Makefile Fri Dec 26 21:40:45 2014 (r276256) @@ -2,6 +2,9 @@ .MAKE.MODE= normal +# Failure is handled by the invoker, don't kill other legs of a parallel build. +MAKE_JOB_ERROR_TOKEN=no + # Test for broken LHS expansion. # This *must* cause make(1) to detect a recursive variable, and fail as such. .if make(lhs_expn) From owner-svn-src-all@FreeBSD.ORG Fri Dec 26 21:45:02 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A1BE61FF; Fri, 26 Dec 2014 21:45:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8DF1522A5; Fri, 26 Dec 2014 21:45:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBQLj2Ap043854; Fri, 26 Dec 2014 21:45:02 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBQLj2CY043853; Fri, 26 Dec 2014 21:45:02 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201412262145.sBQLj2CY043853@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Fri, 26 Dec 2014 21:45:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276257 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2014 21:45:02 -0000 Author: bapt Date: Fri Dec 26 21:45:01 2014 New Revision: 276257 URL: https://svnweb.freebsd.org/changeset/base/276257 Log: mdoc fix Modified: head/share/man/man4/ohci.4 Modified: head/share/man/man4/ohci.4 ============================================================================== --- head/share/man/man4/ohci.4 Fri Dec 26 21:40:45 2014 (r276256) +++ head/share/man/man4/ohci.4 Fri Dec 26 21:45:01 2014 (r276257) @@ -60,9 +60,9 @@ NVIDIA nForce3 Sun PCIO-2 (RIO USB) .El .Sh SEE ALSO -.Xr xhci 4 , .Xr ehci 4 , -.Xr uhci 4 +.Xr uhci 4 , +.Xr xhci 4 .Sh HISTORY The .Nm From owner-svn-src-all@FreeBSD.ORG Fri Dec 26 21:56:31 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0F46D492; Fri, 26 Dec 2014 21:56:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EB8EC2618; Fri, 26 Dec 2014 21:56:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBQLuUNj048935; Fri, 26 Dec 2014 21:56:30 GMT (envelope-from joel@FreeBSD.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBQLuOxI048898; Fri, 26 Dec 2014 21:56:24 GMT (envelope-from joel@FreeBSD.org) Message-Id: <201412262156.sBQLuOxI048898@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: joel set sender to joel@FreeBSD.org using -f From: Joel Dahl Date: Fri, 26 Dec 2014 21:56:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276258 - in head: usr.bin/dpv usr.bin/iscsictl usr.bin/last usr.bin/man usr.bin/mkcsmapper usr.bin/mkesdb usr.bin/rup usr.bin/rusers usr.bin/rwall usr.bin/script usr.bin/setchannel usr... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2014 21:56:31 -0000 Author: joel (doc committer) Date: Fri Dec 26 21:56:23 2014 New Revision: 276258 URL: https://svnweb.freebsd.org/changeset/base/276258 Log: mdoc: sort SEE ALSO. Modified: head/usr.bin/dpv/dpv.1 head/usr.bin/iscsictl/iscsi.conf.5 head/usr.bin/last/last.1 head/usr.bin/man/man.1 head/usr.bin/mkcsmapper/mkcsmapper.1 head/usr.bin/mkesdb/mkesdb.1 head/usr.bin/rup/rup.1 head/usr.bin/rusers/rusers.1 head/usr.bin/rwall/rwall.1 head/usr.bin/script/script.1 head/usr.bin/setchannel/setchannel.1 head/usr.bin/showmount/showmount.8 head/usr.sbin/bluetooth/btpand/btpand.8 head/usr.sbin/bsnmpd/modules/snmp_bridge/snmp_bridge.3 head/usr.sbin/bsnmpd/modules/snmp_wlan/snmp_wlan.3 head/usr.sbin/gpioctl/gpioctl.8 head/usr.sbin/gssd/gssd.8 head/usr.sbin/jail/jail.8 head/usr.sbin/nandsim/nandsim.8 head/usr.sbin/nfsuserd/nfsuserd.8 head/usr.sbin/rpc.umntall/rpc.umntall.8 head/usr.sbin/rtadvctl/rtadvctl.8 head/usr.sbin/rtadvd/rtadvd.conf.5 Modified: head/usr.bin/dpv/dpv.1 ============================================================================== --- head/usr.bin/dpv/dpv.1 Fri Dec 26 21:45:01 2014 (r276257) +++ head/usr.bin/dpv/dpv.1 Fri Dec 26 21:56:23 2014 (r276258) @@ -359,9 +359,9 @@ dpv -o /dev/md42 < /dev/zero .Ed .Sh SEE ALSO .Xr dialog 1 , -.Xr dialog 3 , .Xr sh 1 , -.Xr Xdialog 1 +.Xr Xdialog 1 , +.Xr dialog 3 .Sh HISTORY A .Nm Modified: head/usr.bin/iscsictl/iscsi.conf.5 ============================================================================== --- head/usr.bin/iscsictl/iscsi.conf.5 Fri Dec 26 21:45:01 2014 (r276257) +++ head/usr.bin/iscsictl/iscsi.conf.5 Fri Dec 26 21:56:23 2014 (r276258) @@ -175,8 +175,8 @@ chaptest { .Ed .Sh SEE ALSO .Xr iscsi_initiator 4 , -.Xr iscsictl 8 , -.Xr iscontrol 8 +.Xr iscontrol 8 , +.Xr iscsictl 8 .Sh STANDARDS ISCSI RFC 3720 .\"Sh HISTORY Modified: head/usr.bin/last/last.1 ============================================================================== --- head/usr.bin/last/last.1 Fri Dec 26 21:45:01 2014 (r276257) +++ head/usr.bin/last/last.1 Fri Dec 26 21:56:23 2014 (r276258) @@ -198,9 +198,9 @@ login data base .El .Sh SEE ALSO .Xr lastcomm 1 , -.Xr lastlogin 8 , .Xr getutxent 3 , -.Xr ac 8 +.Xr ac 8 , +.Xr lastlogin 8 .Sh HISTORY A .Nm Modified: head/usr.bin/man/man.1 ============================================================================== --- head/usr.bin/man/man.1 Fri Dec 26 21:45:01 2014 (r276257) +++ head/usr.bin/man/man.1 Fri Dec 26 21:56:23 2014 (r276258) @@ -349,17 +349,17 @@ Local configuration files. .Sh SEE ALSO .Xr apropos 1 , .Xr intro 1 , +.Xr locale 1 , +.Xr manpath 1 , +.Xr nroff 1 , +.Xr troff 1 , +.Xr whatis 1 , .Xr intro 2 , .Xr intro 3 , .Xr intro 4 , .Xr intro 5 , +.Xr man.conf 5 , .Xr intro 6 , .Xr intro 7 , .Xr intro 8 , -.Xr intro 9 , -.Xr locale 1 , -.Xr manpath 1 , -.Xr nroff 1 , -.Xr troff 1 , -.Xr whatis 1 , -.Xr man.conf 5 +.Xr intro 9 Modified: head/usr.bin/mkcsmapper/mkcsmapper.1 ============================================================================== --- head/usr.bin/mkcsmapper/mkcsmapper.1 Fri Dec 26 21:45:01 2014 (r276257) +++ head/usr.bin/mkcsmapper/mkcsmapper.1 Fri Dec 26 21:56:23 2014 (r276258) @@ -77,8 +77,8 @@ Generate pivot data from .Ex -std mkcsmapper .Sh SEE ALSO .Xr iconv 1 , -.Xr iconv 3 , -.Xr mkesdb 1 +.Xr mkesdb 1 , +.Xr iconv 3 .Sh HISTORY .Nm first appeared in Modified: head/usr.bin/mkesdb/mkesdb.1 ============================================================================== --- head/usr.bin/mkesdb/mkesdb.1 Fri Dec 26 21:45:01 2014 (r276257) +++ head/usr.bin/mkesdb/mkesdb.1 Fri Dec 26 21:56:23 2014 (r276258) @@ -72,8 +72,8 @@ Put generated binary data to .Ex -std mkesdb .Sh SEE ALSO .Xr iconv 1 , -.Xr iconv 3 , -.Xr mkcsmapper 1 +.Xr mkcsmapper 1 , +.Xr iconv 3 .Sh HISTORY .Nm first appeared in Modified: head/usr.bin/rup/rup.1 ============================================================================== --- head/usr.bin/rup/rup.1 Fri Dec 26 21:45:01 2014 (r276257) +++ head/usr.bin/rup/rup.1 Fri Dec 26 21:56:23 2014 (r276258) @@ -83,8 +83,8 @@ and cannot accommodate any RPC-based ser The host may be down. .El .Sh SEE ALSO -.Xr rpcbind 8 , -.Xr rpc.rstatd 8 +.Xr rpc.rstatd 8 , +.Xr rpcbind 8 .Sh HISTORY The .Nm Modified: head/usr.bin/rusers/rusers.1 ============================================================================== --- head/usr.bin/rusers/rusers.1 Fri Dec 26 21:45:01 2014 (r276257) +++ head/usr.bin/rusers/rusers.1 Fri Dec 26 21:56:23 2014 (r276258) @@ -92,8 +92,8 @@ The host may be down. .Xr rwho 1 , .Xr users 1 , .Xr who 1 , -.Xr rpcbind 8 , -.Xr rpc.rusersd 8 +.Xr rpc.rusersd 8 , +.Xr rpcbind 8 .Sh HISTORY The .Nm Modified: head/usr.bin/rwall/rwall.1 ============================================================================== --- head/usr.bin/rwall/rwall.1 Fri Dec 26 21:45:01 2014 (r276257) +++ head/usr.bin/rwall/rwall.1 Fri Dec 26 21:56:23 2014 (r276258) @@ -67,8 +67,8 @@ The host may be down. .El .Sh SEE ALSO .Xr who 1 , -.Xr rpcbind 8 , -.Xr rpc.rwalld 8 +.Xr rpc.rwalld 8 , +.Xr rpcbind 8 .Sh HISTORY The .Nm Modified: head/usr.bin/script/script.1 ============================================================================== --- head/usr.bin/script/script.1 Fri Dec 26 21:45:01 2014 (r276257) +++ head/usr.bin/script/script.1 Fri Dec 26 21:56:23 2014 (r276258) @@ -164,7 +164,7 @@ is assumed. .Pq Most shells set this variable automatically . .El .Sh SEE ALSO -.Xr csh 1 +.Xr csh 1 , .Xr filemon 4 .Po for the Modified: head/usr.bin/setchannel/setchannel.1 ============================================================================== --- head/usr.bin/setchannel/setchannel.1 Fri Dec 26 21:45:01 2014 (r276257) +++ head/usr.bin/setchannel/setchannel.1 Fri Dec 26 21:56:23 2014 (r276258) @@ -85,8 +85,8 @@ Channel number to set. Frequency in MHz (must include decimal point). .El .Sh SEE ALSO -.Xr cxm 4 , .Xr bktr 4 , +.Xr cxm 4 , .Xr meteor 4 .Sh HISTORY The Modified: head/usr.bin/showmount/showmount.8 ============================================================================== --- head/usr.bin/showmount/showmount.8 Fri Dec 26 21:45:01 2014 (r276257) +++ head/usr.bin/showmount/showmount.8 Fri Dec 26 21:56:23 2014 (r276258) @@ -84,8 +84,8 @@ Ignored for backwards compatibility. .El .Sh SEE ALSO .Xr mount 8 , -.Xr mountd 8 , -.Xr mount_nfs 8 +.Xr mount_nfs 8 , +.Xr mountd 8 .Sh HISTORY The .Nm Modified: head/usr.sbin/bluetooth/btpand/btpand.8 ============================================================================== --- head/usr.sbin/bluetooth/btpand/btpand.8 Fri Dec 26 21:45:01 2014 (r276257) +++ head/usr.sbin/bluetooth/btpand/btpand.8 Fri Dec 26 21:56:23 2014 (r276258) @@ -206,10 +206,10 @@ Will create a Group Network and register SDP server. .Sh SEE ALSO .Xr bluetooth 3 , -.Xr tap 4 , .Xr bridge 4 , -.Xr hccontrol 8 , +.Xr tap 4 , .Xr dhclient 8 , +.Xr hccontrol 8 , .Xr ifconfig 8 , .Xr sdpd 8 .Pp Modified: head/usr.sbin/bsnmpd/modules/snmp_bridge/snmp_bridge.3 ============================================================================== --- head/usr.sbin/bsnmpd/modules/snmp_bridge/snmp_bridge.3 Fri Dec 26 21:45:01 2014 (r276257) +++ head/usr.sbin/bsnmpd/modules/snmp_bridge/snmp_bridge.3 Fri Dec 26 21:56:23 2014 (r276258) @@ -112,8 +112,8 @@ This is the private BEGEMOT-BRIDGE-MIB t .Sh SEE ALSO .Xr bsnmpd 1 , .Xr gensnmptree 1 , +.Xr snmpmod 3 , .Xr if_bridge 4 , -.Xr ifconfig 8 , -.Xr snmpmod 3 +.Xr ifconfig 8 .Sh AUTHORS .An Shteryana Shopova Aq Mt syrinx@FreeBSD.org Modified: head/usr.sbin/bsnmpd/modules/snmp_wlan/snmp_wlan.3 ============================================================================== --- head/usr.sbin/bsnmpd/modules/snmp_wlan/snmp_wlan.3 Fri Dec 26 21:45:01 2014 (r276257) +++ head/usr.sbin/bsnmpd/modules/snmp_wlan/snmp_wlan.3 Fri Dec 26 21:56:23 2014 (r276258) @@ -151,10 +151,10 @@ The private BEGEMOT-WIRELESS-MIB that is .Sh SEE ALSO .Xr bsnmpd 1 , .Xr gensnmptree 1 , +.Xr snmpmod 3 , .Xr wlan 4 , .Xr wlan_acl 4 , .Xr wlan_wep 4 , -.Xr ifconfig 8 , -.Xr snmpmod 3 +.Xr ifconfig 8 .Sh AUTHORS .An Shteryana Shopova Aq Mt syrinx@FreeBSD.org Modified: head/usr.sbin/gpioctl/gpioctl.8 ============================================================================== --- head/usr.sbin/gpioctl/gpioctl.8 Fri Dec 26 21:45:01 2014 (r276257) +++ head/usr.sbin/gpioctl/gpioctl.8 Fri Dec 26 21:56:23 2014 (r276258) @@ -108,8 +108,8 @@ Configure pin 12 to be input pin gpioctl -f /dev/gpioc0 -c 12 IN .El .Sh SEE ALSO -.Xr gpio 4 -.Xr gpioiic 4 +.Xr gpio 4 , +.Xr gpioiic 4 , .Xr gpioled 4 .Sh HISTORY The Modified: head/usr.sbin/gssd/gssd.8 ============================================================================== --- head/usr.sbin/gssd/gssd.8 Fri Dec 26 21:45:01 2014 (r276257) +++ head/usr.sbin/gssd/gssd.8 Fri Dec 26 21:56:23 2014 (r276258) @@ -106,8 +106,8 @@ by kernel GSS-API services. .Ex -std .Sh SEE ALSO .Xr gssapi 3 , -.Xr mount_nfs 8 , -.Xr syslog 3 +.Xr syslog 3 , +.Xr mount_nfs 8 .Sh HISTORY The .Nm Modified: head/usr.sbin/jail/jail.8 ============================================================================== --- head/usr.sbin/jail/jail.8 Fri Dec 26 21:45:01 2014 (r276257) +++ head/usr.sbin/jail/jail.8 Fri Dec 26 21:56:23 2014 (r276258) @@ -1183,7 +1183,6 @@ environment of the first jail. .Xr pkill 1 , .Xr ps 1 , .Xr quota 1 , -.Xr ifconfig 8 , .Xr jail_set 2 , .Xr devfs 5 , .Xr fdescfs 5 , @@ -1194,6 +1193,7 @@ environment of the first jail. .Xr chroot 8 , .Xr devfs 8 , .Xr halt 8 , +.Xr ifconfig 8 , .Xr inetd 8 , .Xr jexec 8 , .Xr jls 8 , Modified: head/usr.sbin/nandsim/nandsim.8 ============================================================================== --- head/usr.sbin/nandsim/nandsim.8 Fri Dec 26 21:45:01 2014 (r276257) +++ head/usr.sbin/nandsim/nandsim.8 Fri Dec 26 21:56:23 2014 (r276258) @@ -217,7 +217,7 @@ All commands issues to any chip on this .El .Sh SEE ALSO .Xr nand 4 , -.Xr nandsim 4 +.Xr nandsim 4 , .Xr nandsim.conf 5 .Sh HISTORY The Modified: head/usr.sbin/nfsuserd/nfsuserd.8 ============================================================================== --- head/usr.sbin/nfsuserd/nfsuserd.8 Fri Dec 26 21:45:01 2014 (r276257) +++ head/usr.sbin/nfsuserd/nfsuserd.8 Fri Dec 26 21:56:23 2014 (r276258) @@ -89,12 +89,12 @@ performance impact, whereas running too such as a process table entry and swap space. .El .Sh SEE ALSO -.Xr getpwent 3 , .Xr getgrent 3 , +.Xr getpwent 3 , .Xr nfsv4 4 , .Xr group 5 , .Xr passwd 5 , -.Xr nfsd 8 . +.Xr nfsd 8 .Sh HISTORY The .Nm Modified: head/usr.sbin/rpc.umntall/rpc.umntall.8 ============================================================================== --- head/usr.sbin/rpc.umntall/rpc.umntall.8 Fri Dec 26 21:45:01 2014 (r276257) +++ head/usr.sbin/rpc.umntall/rpc.umntall.8 Fri Dec 26 21:56:23 2014 (r276258) @@ -114,8 +114,8 @@ entry. mounted nfs-file systems .El .Sh SEE ALSO -.Xr mountd 8 , .Xr mount_nfs 8 , +.Xr mountd 8 , .Xr umount 8 .Sh HISTORY The Modified: head/usr.sbin/rtadvctl/rtadvctl.8 ============================================================================== --- head/usr.sbin/rtadvctl/rtadvctl.8 Fri Dec 26 21:45:01 2014 (r276257) +++ head/usr.sbin/rtadvctl/rtadvctl.8 Fri Dec 26 21:56:23 2014 (r276258) @@ -92,8 +92,8 @@ Displays information on Router Advertise on each interface. .El .Sh SEE ALSO -.Xr rtadvd 8 , -.Xr rtadvd.conf 5 +.Xr rtadvd.conf 5 , +.Xr rtadvd 8 .Sh HISTORY The .Nm Modified: head/usr.sbin/rtadvd/rtadvd.conf.5 ============================================================================== --- head/usr.sbin/rtadvd/rtadvd.conf.5 Fri Dec 26 21:45:01 2014 (r276257) +++ head/usr.sbin/rtadvd/rtadvd.conf.5 Fri Dec 26 21:56:23 2014 (r276258) @@ -488,8 +488,8 @@ ef0:\\ :addr="2001:db8:ffff:1000::":prefixlen#64:tc=default: .Ed .Sh SEE ALSO -.Xr termcap 5 , .Xr resolver 5 , +.Xr termcap 5 , .Xr rtadvd 8 , .Xr rtsol 8 .Rs From owner-svn-src-all@FreeBSD.ORG Fri Dec 26 22:30:27 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 54F48A12; Fri, 26 Dec 2014 22:30:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3EDD62AA4; Fri, 26 Dec 2014 22:30:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBQMURu6063678; Fri, 26 Dec 2014 22:30:27 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBQMUJTZ063638; Fri, 26 Dec 2014 22:30:19 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201412262230.sBQMUJTZ063638@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Fri, 26 Dec 2014 22:30:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276259 - in head/share/man/man4: . man4.powerpc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2014 22:30:27 -0000 Author: bapt Date: Fri Dec 26 22:30:18 2014 New Revision: 276259 URL: https://svnweb.freebsd.org/changeset/base/276259 Log: Sort SEE ALSO Modified: head/share/man/man4/ata.4 head/share/man/man4/audit.4 head/share/man/man4/bhyve.4 head/share/man/man4/carp.4 head/share/man/man4/ch.4 head/share/man/man4/ehci.4 head/share/man/man4/geom.4 head/share/man/man4/hv_ata_pci_disengage.4 head/share/man/man4/hv_kvp.4 head/share/man/man4/hv_netvsc.4 head/share/man/man4/hv_storvsc.4 head/share/man/man4/hv_utils.4 head/share/man/man4/hv_vmbus.4 head/share/man/man4/igmp.4 head/share/man/man4/ip6.4 head/share/man/man4/ips.4 head/share/man/man4/lagg.4 head/share/man/man4/man4.powerpc/smu.4 head/share/man/man4/mmc.4 head/share/man/man4/mmcsd.4 head/share/man/man4/mpt.4 head/share/man/man4/pflog.4 head/share/man/man4/pfsync.4 head/share/man/man4/ral.4 head/share/man/man4/rsu.4 head/share/man/man4/rum.4 head/share/man/man4/run.4 head/share/man/man4/uhci.4 head/share/man/man4/umass.4 Modified: head/share/man/man4/ata.4 ============================================================================== --- head/share/man/man4/ata.4 Fri Dec 26 21:56:23 2014 (r276258) +++ head/share/man/man4/ata.4 Fri Dec 26 22:30:18 2014 (r276259) @@ -253,10 +253,10 @@ work well on long cables, especially at .Xr ada 4 , .Xr ahci 4 , .Xr cam 4 , -.Xr camcontrol 8 , .Xr cd 4 , .Xr mvs 4 , -.Xr siis 4 +.Xr siis 4 , +.Xr camcontrol 8 .Sh HISTORY The .Nm Modified: head/share/man/man4/audit.4 ============================================================================== --- head/share/man/man4/audit.4 Fri Dec 26 21:56:23 2014 (r276258) +++ head/share/man/man4/audit.4 Fri Dec 26 22:30:18 2014 (r276259) @@ -88,10 +88,10 @@ to track users and events in a fine-grai .Xr setauid 2 , .Xr libbsm 3 , .Xr auditpipe 4 , +.Xr audit.log 5 , .Xr audit_class 5 , .Xr audit_control 5 , .Xr audit_event 5 , -.Xr audit.log 5 , .Xr audit_user 5 , .Xr audit_warn 5 , .Xr rc.conf 5 , Modified: head/share/man/man4/bhyve.4 ============================================================================== --- head/share/man/man4/bhyve.4 Fri Dec 26 21:56:23 2014 (r276258) +++ head/share/man/man4/bhyve.4 Fri Dec 26 22:30:18 2014 (r276259) @@ -45,10 +45,10 @@ unmodified guest operating systems on to relies heavily on hardware assist provided by the CPU and chipset to virtualize processor and memory resources. .Sh SEE ALSO +.Xr vmm 4 , .Xr bhyve 8 , -.Xr bhyveload 8 , .Xr bhyvectl 8 , -.Xr vmm 4 +.Xr bhyveload 8 .Sh HISTORY .Nm first appeared in Modified: head/share/man/man4/carp.4 ============================================================================== --- head/share/man/man4/carp.4 Fri Dec 26 21:56:23 2014 (r276258) +++ head/share/man/man4/carp.4 Fri Dec 26 22:30:18 2014 (r276259) @@ -303,8 +303,8 @@ tcpdump -npi vlan0 -T carp .Sh SEE ALSO .Xr inet 4 , .Xr pfsync 4 , -.Xr rc.conf 5 , .Xr devd.conf 5 , +.Xr rc.conf 5 , .Xr ifconfig 8 , .Xr sysctl 8 , .Xr tcpdump 8 Modified: head/share/man/man4/ch.4 ============================================================================== --- head/share/man/man4/ch.4 Fri Dec 26 21:56:23 2014 (r276258) +++ head/share/man/man4/ch.4 Fri Dec 26 22:30:18 2014 (r276259) @@ -325,8 +325,8 @@ If the media changer does not support fe driver, it will produce both console error messages and failure return codes to the ioctls described here. .Sh SEE ALSO -.Xr cam 4 , .Xr chio 1 , +.Xr cam 4 , .Xr cd 4 , .Xr da 4 , .Xr sa 4 Modified: head/share/man/man4/ehci.4 ============================================================================== --- head/share/man/man4/ehci.4 Fri Dec 26 21:56:23 2014 (r276258) +++ head/share/man/man4/ehci.4 Fri Dec 26 22:30:18 2014 (r276259) @@ -70,10 +70,10 @@ but can be noticed since 2.0 devices plugged in to the same connector appear to connect to different USB busses. .Sh SEE ALSO -.Xr xhci 4 , .Xr ohci 4 , .Xr uhci 4 , -.Xr usb 4 +.Xr usb 4 , +.Xr xhci 4 .Sh HISTORY The .Nm Modified: head/share/man/man4/geom.4 ============================================================================== --- head/share/man/man4/geom.4 Fri Dec 26 21:56:23 2014 (r276258) +++ head/share/man/man4/geom.4 Fri Dec 26 22:30:18 2014 (r276259) @@ -450,8 +450,8 @@ Dump contents of gctl requests. .El .Sh SEE ALSO .Xr libgeom 3 , -.Xr disk 9 , .Xr DECLARE_GEOM_CLASS 9 , +.Xr disk 9 , .Xr g_access 9 , .Xr g_attach 9 , .Xr g_bio 9 , Modified: head/share/man/man4/hv_ata_pci_disengage.4 ============================================================================== --- head/share/man/man4/hv_ata_pci_disengage.4 Fri Dec 26 21:56:23 2014 (r276258) +++ head/share/man/man4/hv_ata_pci_disengage.4 Fri Dec 26 22:30:18 2014 (r276259) @@ -70,10 +70,10 @@ If CDROM access is a must then users may "set hw.ata.disk_enable=1" at boot time to prevent the ATA driver from being disabled. .Sh SEE ALSO -.Xr hv_vmbus 4 , -.Xr hv_utils 4 , .Xr hv_netvsc 4 , -.Xr hv_storvsc 4 +.Xr hv_storvsc 4 , +.Xr hv_utils 4 , +.Xr hv_vmbus 4 .Sh HISTORY Support for .Nm Modified: head/share/man/man4/hv_kvp.4 ============================================================================== --- head/share/man/man4/hv_kvp.4 Fri Dec 26 21:56:23 2014 (r276258) +++ head/share/man/man4/hv_kvp.4 Fri Dec 26 22:30:18 2014 (r276259) @@ -74,11 +74,11 @@ guest's IP address to its original stati On the other hand, the get IP functionality is used to update the guest IP address in the Hyper-V management console window. .Sh SEE ALSO -.Xr hv_vmbus 4 , -.Xr hv_utils 4 , +.Xr hv_ata_pci_disengage 4 , .Xr hv_netvsc 4 , .Xr hv_storvsc 4 , -.Xr hv_ata_pci_disengage 4 , +.Xr hv_utils 4 , +.Xr hv_vmbus 4 , .Xr hv_kvp_daemon 8 .Sh HISTORY Support for Modified: head/share/man/man4/hv_netvsc.4 ============================================================================== --- head/share/man/man4/hv_netvsc.4 Fri Dec 26 21:56:23 2014 (r276258) +++ head/share/man/man4/hv_netvsc.4 Fri Dec 26 22:30:18 2014 (r276259) @@ -63,10 +63,10 @@ driver. The VSP in the root partition then forwards the network related requests to the physical network card. .Sh SEE ALSO -.Xr hv_vmbus 4 , -.Xr hv_utils 4 , +.Xr hv_ata_pci_disengage 4 , .Xr hv_storvsc 4 , -.Xr hv_ata_pci_disengage 4 +.Xr hv_utils 4 , +.Xr hv_vmbus 4 .Sh HISTORY Support for .Nm Modified: head/share/man/man4/hv_storvsc.4 ============================================================================== --- head/share/man/man4/hv_storvsc.4 Fri Dec 26 21:56:23 2014 (r276258) +++ head/share/man/man4/hv_storvsc.4 Fri Dec 26 22:30:18 2014 (r276259) @@ -69,10 +69,10 @@ CAM control blocks (CCBs) are converted into VSCSI protocol messages which are delivered to the root partition VSP over the Hyper-V VMBus. .Sh SEE ALSO -.Xr hv_vmbus 4 , -.Xr hv_utils 4 , +.Xr hv_ata_pci_disengage 4 , .Xr hv_netvsc 4 , -.Xr hv_ata_pci_disengage 4 +.Xr hv_utils 4 , +.Xr hv_vmbus 4 .Sh HISTORY Support for .Nm Modified: head/share/man/man4/hv_utils.4 ============================================================================== --- head/share/man/man4/hv_utils.4 Fri Dec 26 21:56:23 2014 (r276258) +++ head/share/man/man4/hv_utils.4 Fri Dec 26 22:30:18 2014 (r276259) @@ -65,10 +65,10 @@ command. (c) Heartbeat: This feature allows the virtualization server to detect whether the guest partition is running and responsive. .Sh SEE ALSO -.Xr hv_vmbus 4 , +.Xr hv_ata_pci_disengage 4 , .Xr hv_netvsc 4 , .Xr hv_storvsc 4 , -.Xr hv_ata_pci_disengage 4 +.Xr hv_vmbus 4 .Sh HISTORY Support for .Nm Modified: head/share/man/man4/hv_vmbus.4 ============================================================================== --- head/share/man/man4/hv_vmbus.4 Fri Dec 26 21:56:23 2014 (r276258) +++ head/share/man/man4/hv_vmbus.4 Fri Dec 26 22:30:18 2014 (r276259) @@ -73,10 +73,10 @@ the interface that facilitate high perfo between the VSCs and VSPs. All VSCs utilize the VMBus driver. .Sh SEE ALSO -.Xr hv_utils 4 , +.Xr hv_ata_pci_disengage 4 , .Xr hv_netvsc 4 , .Xr hv_storvsc 4 , -.Xr hv_ata_pci_disengage 4 +.Xr hv_utils 4 .Sh HISTORY Support for .Nm Modified: head/share/man/man4/igmp.4 ============================================================================== --- head/share/man/man4/igmp.4 Fri Dec 26 21:56:23 2014 (r276258) +++ head/share/man/man4/igmp.4 Fri Dec 26 22:30:18 2014 (r276259) @@ -126,11 +126,11 @@ This sysctl is normally enabled by defau .\" .El .Sh SEE ALSO -.Xr ifmcstat 8 , +.Xr netstat 1 , +.Xr sourcefilter 3 , .Xr inet 4 , .Xr multicast 4 , -.Xr netstat 1 , -.Xr sourcefilter 3 +.Xr ifmcstat 8 .Sh HISTORY The .Nm Modified: head/share/man/man4/ip6.4 ============================================================================== --- head/share/man/man4/ip6.4 Fri Dec 26 21:56:23 2014 (r276258) +++ head/share/man/man4/ip6.4 Fri Dec 26 22:30:18 2014 (r276259) @@ -653,8 +653,8 @@ An ancillary data object was improperly .Xr if_nametoindex 3 , .Xr bpf 4 , .Xr icmp6 4 , -.Xr ip 4 , .Xr inet6 4 , +.Xr ip 4 , .Xr netintro 4 , .Xr tcp 4 , .Xr udp 4 Modified: head/share/man/man4/ips.4 ============================================================================== --- head/share/man/man4/ips.4 Fri Dec 26 21:56:23 2014 (r276258) +++ head/share/man/man4/ips.4 Fri Dec 26 22:30:18 2014 (r276259) @@ -187,9 +187,9 @@ driver does not use the subsystem. .Sh SEE ALSO .Xr aac 4 , -.Xr mfi 4 , .Xr ch 4 , .Xr da 4 , +.Xr mfi 4 , .Xr sysctl 8 .Sh AUTHORS The Modified: head/share/man/man4/lagg.4 ============================================================================== --- head/share/man/man4/lagg.4 Fri Dec 26 21:56:23 2014 (r276258) +++ head/share/man/man4/lagg.4 Fri Dec 26 22:30:18 2014 (r276259) @@ -176,8 +176,8 @@ device will be used: device as a workaround.) .Sh SEE ALSO .Xr ng_one2many 4 , -.Xr sysctl 8 , -.Xr ifconfig 8 +.Xr ifconfig 8 , +.Xr sysctl 8 .Sh HISTORY The .Nm Modified: head/share/man/man4/man4.powerpc/smu.4 ============================================================================== --- head/share/man/man4/man4.powerpc/smu.4 Fri Dec 26 21:56:23 2014 (r276258) +++ head/share/man/man4/man4.powerpc/smu.4 Fri Dec 26 22:30:18 2014 (r276259) @@ -109,8 +109,8 @@ annunciator interface at .Pa /dev/led/sleepled . .Sh SEE ALSO .Xr acpi 4 , -.Xr pmu 4 , -.Xr led 4 +.Xr led 4 , +.Xr pmu 4 .Sh HISTORY The .Nm Modified: head/share/man/man4/mmc.4 ============================================================================== --- head/share/man/man4/mmc.4 Fri Dec 26 21:56:23 2014 (r276258) +++ head/share/man/man4/mmc.4 Fri Dec 26 22:30:18 2014 (r276259) @@ -47,8 +47,8 @@ bus typically has only one slot, and onl MultiMediaCards exist only in memory. SD Cards exist as memory, I/O, or combination cards. .Sh SEE ALSO -.Xr mmcsd 4 , .Xr at91_mci 4 , +.Xr mmcsd 4 , .Xr sdhci 4 .Rs .%T "SD Specifications, Part 1, Physical Layer, Simplified Specification" Modified: head/share/man/man4/mmcsd.4 ============================================================================== --- head/share/man/man4/mmcsd.4 Fri Dec 26 21:56:23 2014 (r276258) +++ head/share/man/man4/mmcsd.4 Fri Dec 26 22:30:18 2014 (r276259) @@ -37,8 +37,8 @@ The .Nm driver implements direct access block device for MMC and SD memory cards. .Sh SEE ALSO -.Xr mmc 4 , .Xr at91_mci 4 , +.Xr mmc 4 , .Xr sdhci 4 .Rs .%T "SD Specifications, Part 1, Physical Layer, Simplified Specification" Modified: head/share/man/man4/mpt.4 ============================================================================== --- head/share/man/man4/mpt.4 Fri Dec 26 21:56:23 2014 (r276258) +++ head/share/man/man4/mpt.4 Fri Dec 26 22:30:18 2014 (r276259) @@ -157,8 +157,8 @@ can take on - no separate compilation is .Xr sa 4 , .Xr scsi 4 , .Xr targ 4 , -.Xr mptutil 8 , -.Xr gmultipath 8 +.Xr gmultipath 8 , +.Xr mptutil 8 .Rs .%T "LSI Logic Website" .%U http://www.lsi.com/ Modified: head/share/man/man4/pflog.4 ============================================================================== --- head/share/man/man4/pflog.4 Fri Dec 26 21:56:23 2014 (r276258) +++ head/share/man/man4/pflog.4 Fri Dec 26 22:30:18 2014 (r276259) @@ -91,13 +91,13 @@ and monitor all packets logged on it: # tcpdump -n -e -ttt -i pflog1 .Ed .Sh SEE ALSO +.Xr tcpdump 1 , .Xr inet 4 , .Xr inet6 4 , .Xr netintro 4 , .Xr pf 4 , .Xr ifconfig 8 , -.Xr pflogd 8 , -.Xr tcpdump 1 +.Xr pflogd 8 .Sh HISTORY The .Nm Modified: head/share/man/man4/pfsync.4 ============================================================================== --- head/share/man/man4/pfsync.4 Fri Dec 26 21:56:23 2014 (r276258) +++ head/share/man/man4/pfsync.4 Fri Dec 26 22:30:18 2014 (r276259) @@ -200,6 +200,7 @@ The following must also be added to net.inet.carp.preempt=1 .Ed .Sh SEE ALSO +.Xr tcpdump 1 , .Xr bpf 4 , .Xr carp 4 , .Xr enc 4 , @@ -211,8 +212,7 @@ net.inet.carp.preempt=1 .Xr pf.conf 5 , .Xr protocols 5 , .Xr rc.conf 5 , -.Xr ifconfig 8 , -.Xr tcpdump 1 +.Xr ifconfig 8 .Sh HISTORY The .Nm Modified: head/share/man/man4/ral.4 ============================================================================== --- head/share/man/man4/ral.4 Fri Dec 26 21:56:23 2014 (r276258) +++ head/share/man/man4/ral.4 Fri Dec 26 22:30:18 2014 (r276259) @@ -240,8 +240,8 @@ The driver will reset the hardware. This should not happen. .El .Sh SEE ALSO -.Xr intro 4 , .Xr cardbus 4 , +.Xr intro 4 , .Xr wlan 4 , .Xr wlan_ccmp 4 , .Xr wlan_tkip 4 , Modified: head/share/man/man4/rsu.4 ============================================================================== --- head/share/man/man4/rsu.4 Fri Dec 26 21:56:23 2014 (r276258) +++ head/share/man/man4/rsu.4 Fri Dec 26 22:30:18 2014 (r276259) @@ -153,9 +153,9 @@ This should not happen. .El .Sh SEE ALSO .Xr intro 1 , -.Xr usb 4 , .Xr netintro 4 , .Xr rsufw 4 , +.Xr usb 4 , .Xr wlan 4 , .Xr arp 8 , .Xr hostapd 8 , Modified: head/share/man/man4/rum.4 ============================================================================== --- head/share/man/man4/rum.4 Fri Dec 26 21:56:23 2014 (r276258) +++ head/share/man/man4/rum.4 Fri Dec 26 22:30:18 2014 (r276259) @@ -162,8 +162,8 @@ This should not happen. .Xr wlan_tkip 4 , .Xr wlan_wep 4 , .Xr wlan_xauth 4 , -.Xr ifconfig 8 , .Xr hostapd 8 , +.Xr ifconfig 8 , .Xr wpa_supplicant 8 . .Rs .%T "Ralink Technology" Modified: head/share/man/man4/run.4 ============================================================================== --- head/share/man/man4/run.4 Fri Dec 26 21:56:23 2014 (r276258) +++ head/share/man/man4/run.4 Fri Dec 26 22:30:18 2014 (r276259) @@ -219,9 +219,9 @@ The driver will reset the hardware. This should not happen. .El .Sh SEE ALSO -.Xr runfw 4 , .Xr intro 4 , .Xr netintro 4 , +.Xr runfw 4 , .Xr usb 4 , .Xr wlan 4 , .Xr wlan_amrr 4 , @@ -229,8 +229,8 @@ This should not happen. .Xr wlan_tkip 4 , .Xr wlan_wep 4 , .Xr wlan_xauth 4 , -.Xr ifconfig 8 , .Xr hostapd 8 , +.Xr ifconfig 8 , .Xr wpa_supplicant 8 .Pp Ralink Technology: Modified: head/share/man/man4/uhci.4 ============================================================================== --- head/share/man/man4/uhci.4 Fri Dec 26 21:56:23 2014 (r276258) +++ head/share/man/man4/uhci.4 Fri Dec 26 22:30:18 2014 (r276259) @@ -50,9 +50,9 @@ Intel 82371SB (PIIX3) VIA 83C572 .El .Sh SEE ALSO -.Xr xhci 4 , .Xr ehci 4 , -.Xr ohci 4 +.Xr ohci 4 , +.Xr xhci 4 .Sh HISTORY The .Nm Modified: head/share/man/man4/umass.4 ============================================================================== --- head/share/man/man4/umass.4 Fri Dec 26 21:56:23 2014 (r276258) +++ head/share/man/man4/umass.4 Fri Dec 26 22:30:18 2014 (r276259) @@ -240,11 +240,11 @@ when using .Xr mount 8 . .Sh SEE ALSO .Xr ehci 4 , -.Xr xhci 4 , .Xr ohci 4 , .Xr uhci 4 , .Xr usb 4 , .Xr vpo 4 , +.Xr xhci 4 , .Xr disktab 5 , .Xr bsdlabel 8 , .Xr camcontrol 8 From owner-svn-src-all@FreeBSD.ORG Fri Dec 26 22:34:16 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5F418BF1; Fri, 26 Dec 2014 22:34:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4A45B2BD6; Fri, 26 Dec 2014 22:34:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBQMYGMt067565; Fri, 26 Dec 2014 22:34:16 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBQMYG7V067564; Fri, 26 Dec 2014 22:34:16 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201412262234.sBQMYG7V067564@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Fri, 26 Dec 2014 22:34:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276260 - head/contrib/libxo/libxo X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2014 22:34:16 -0000 Author: bapt Date: Fri Dec 26 22:34:15 2014 New Revision: 276260 URL: https://svnweb.freebsd.org/changeset/base/276260 Log: Escape Do to prevent mdoc(7) parser to get confused with the "Do" macro Reported by: sjg Modified: head/contrib/libxo/libxo/xo_open_container.3 Modified: head/contrib/libxo/libxo/xo_open_container.3 ============================================================================== --- head/contrib/libxo/libxo/xo_open_container.3 Fri Dec 26 22:30:18 2014 (r276259) +++ head/contrib/libxo/libxo/xo_open_container.3 Fri Dec 26 22:34:15 2014 (r276260) @@ -131,7 +131,7 @@ traditional C strings can be used direct The close functions with the .Dq _d suffix are used in -.Dq The Right Thing +.Dq \&Do The Right Thing mode, where the name of the open containers, lists, and instances are maintained internally by .Em libxo @@ -161,7 +161,7 @@ Some user may find tracking the names of instances inconvenient. .Em libxo offers -.Dq The Right Thing +.Dq \&Do The Right Thing mode, where .Em libxo will track the names of open containers, lists, and instances so From owner-svn-src-all@FreeBSD.ORG Fri Dec 26 22:41:14 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 07CE1FDD; Fri, 26 Dec 2014 22:41:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DC7302D4A; Fri, 26 Dec 2014 22:41:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBQMfDlu069028; Fri, 26 Dec 2014 22:41:13 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBQMfB3j068458; Fri, 26 Dec 2014 22:41:11 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201412262241.sBQMfB3j068458@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Fri, 26 Dec 2014 22:41:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276261 - head/share/man/man3 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2014 22:41:14 -0000 Author: bapt Date: Fri Dec 26 22:41:10 2014 New Revision: 276261 URL: https://svnweb.freebsd.org/changeset/base/276261 Log: sort SEE ALSO Modified: head/share/man/man3/makedev.3 head/share/man/man3/pthread.3 head/share/man/man3/pthread_attr.3 head/share/man/man3/pthread_cond_init.3 head/share/man/man3/pthread_mutex_init.3 head/share/man/man3/pthread_mutexattr_getkind_np.3 head/share/man/man3/pthread_rwlock_init.3 head/share/man/man3/pthread_rwlockattr_getpshared.3 head/share/man/man3/pthread_rwlockattr_init.3 head/share/man/man3/pthread_rwlockattr_setpshared.3 Modified: head/share/man/man3/makedev.3 ============================================================================== --- head/share/man/man3/makedev.3 Fri Dec 26 22:34:15 2014 (r276260) +++ head/share/man/man3/makedev.3 Fri Dec 26 22:41:10 2014 (r276261) @@ -85,6 +85,6 @@ macro returns a device minor number whos range of an .Vt int . .Sh SEE ALSO -.Xr devfs 5 , +.Xr mknod 2 , .Xr devname 3 , -.Xr mknod 2 +.Xr devfs 5 Modified: head/share/man/man3/pthread.3 ============================================================================== --- head/share/man/man3/pthread.3 Fri Dec 26 22:34:15 2014 (r276260) +++ head/share/man/man3/pthread.3 Fri Dec 26 22:41:10 2014 (r276261) @@ -484,14 +484,14 @@ Threaded applications are linked with th .Xr pthread_cancel 3 , .Xr pthread_cleanup_pop 3 , .Xr pthread_cleanup_push 3 , -.Xr pthread_condattr_destroy 3 , -.Xr pthread_condattr_init 3 , .Xr pthread_cond_broadcast 3 , .Xr pthread_cond_destroy 3 , .Xr pthread_cond_init 3 , .Xr pthread_cond_signal 3 , .Xr pthread_cond_timedwait 3 , .Xr pthread_cond_wait 3 , +.Xr pthread_condattr_destroy 3 , +.Xr pthread_condattr_init 3 , .Xr pthread_create 3 , .Xr pthread_detach 3 , .Xr pthread_equal 3 , @@ -500,6 +500,11 @@ Threaded applications are linked with th .Xr pthread_join 3 , .Xr pthread_key_delete 3 , .Xr pthread_kill 3 , +.Xr pthread_mutex_destroy 3 , +.Xr pthread_mutex_init 3 , +.Xr pthread_mutex_lock 3 , +.Xr pthread_mutex_trylock 3 , +.Xr pthread_mutex_unlock 3 , .Xr pthread_mutexattr_destroy 3 , .Xr pthread_mutexattr_getprioceiling 3 , .Xr pthread_mutexattr_getprotocol 3 , @@ -508,21 +513,16 @@ Threaded applications are linked with th .Xr pthread_mutexattr_setprioceiling 3 , .Xr pthread_mutexattr_setprotocol 3 , .Xr pthread_mutexattr_settype 3 , -.Xr pthread_mutex_destroy 3 , -.Xr pthread_mutex_init 3 , -.Xr pthread_mutex_lock 3 , -.Xr pthread_mutex_trylock 3 , -.Xr pthread_mutex_unlock 3 , .Xr pthread_once 3 , -.Xr pthread_rwlockattr_destroy 3 , -.Xr pthread_rwlockattr_getpshared 3 , -.Xr pthread_rwlockattr_init 3 , -.Xr pthread_rwlockattr_setpshared 3 , .Xr pthread_rwlock_destroy 3 , .Xr pthread_rwlock_init 3 , .Xr pthread_rwlock_rdlock 3 , .Xr pthread_rwlock_unlock 3 , .Xr pthread_rwlock_wrlock 3 , +.Xr pthread_rwlockattr_destroy 3 , +.Xr pthread_rwlockattr_getpshared 3 , +.Xr pthread_rwlockattr_init 3 , +.Xr pthread_rwlockattr_setpshared 3 , .Xr pthread_self 3 , .Xr pthread_setcancelstate 3 , .Xr pthread_setcanceltype 3 , Modified: head/share/man/man3/pthread_attr.3 ============================================================================== --- head/share/man/man3/pthread_attr.3 Fri Dec 26 22:34:15 2014 (r276260) +++ head/share/man/man3/pthread_attr.3 Fri Dec 26 22:41:10 2014 (r276261) @@ -208,8 +208,8 @@ Invalid or unsupported value for .Fa contentionscope . .El .Sh SEE ALSO -.Xr pthread_attr_get_np 3 , .Xr pthread_attr_affinity_np 3 , +.Xr pthread_attr_get_np 3 , .Xr pthread_create 3 .Sh STANDARDS .Fn pthread_attr_init , Modified: head/share/man/man3/pthread_cond_init.3 ============================================================================== --- head/share/man/man3/pthread_cond_init.3 Fri Dec 26 22:34:15 2014 (r276260) +++ head/share/man/man3/pthread_cond_init.3 Fri Dec 26 22:41:10 2014 (r276261) @@ -70,12 +70,12 @@ The system temporarily lacks the resourc variable. .El .Sh SEE ALSO -.Xr pthread_condattr 3 , .Xr pthread_cond_broadcast 3 , .Xr pthread_cond_destroy 3 , .Xr pthread_cond_signal 3 , .Xr pthread_cond_timedwait 3 , -.Xr pthread_cond_wait 3 +.Xr pthread_cond_wait 3 , +.Xr pthread_condattr 3 .Sh STANDARDS The .Fn pthread_cond_init Modified: head/share/man/man3/pthread_mutex_init.3 ============================================================================== --- head/share/man/man3/pthread_mutex_init.3 Fri Dec 26 22:34:15 2014 (r276260) +++ head/share/man/man3/pthread_mutex_init.3 Fri Dec 26 22:41:10 2014 (r276261) @@ -66,11 +66,11 @@ is invalid. The process cannot allocate enough memory to create another mutex. .El .Sh SEE ALSO -.Xr pthread_mutexattr 3 , .Xr pthread_mutex_destroy 3 , .Xr pthread_mutex_lock 3 , .Xr pthread_mutex_trylock 3 , -.Xr pthread_mutex_unlock 3 +.Xr pthread_mutex_unlock 3 , +.Xr pthread_mutexattr 3 .Sh STANDARDS The .Fn pthread_mutex_init Modified: head/share/man/man3/pthread_mutexattr_getkind_np.3 ============================================================================== --- head/share/man/man3/pthread_mutexattr_getkind_np.3 Fri Dec 26 22:34:15 2014 (r276260) +++ head/share/man/man3/pthread_mutexattr_getkind_np.3 Fri Dec 26 22:41:10 2014 (r276261) @@ -75,7 +75,7 @@ The value specified by is invalid. .El .Sh SEE ALSO -.Xr pthread_mutexattr_gettype 3 , -.Xr pthread_mutexattr_settype 3 , .Xr pthread_mutex_destroy 3 , -.Xr pthread_mutex_init 3 +.Xr pthread_mutex_init 3 , +.Xr pthread_mutexattr_gettype 3 , +.Xr pthread_mutexattr_settype 3 Modified: head/share/man/man3/pthread_rwlock_init.3 ============================================================================== --- head/share/man/man3/pthread_rwlock_init.3 Fri Dec 26 22:34:15 2014 (r276260) +++ head/share/man/man3/pthread_rwlock_init.3 Fri Dec 26 22:41:10 2014 (r276261) @@ -85,9 +85,9 @@ The value specified by is invalid. .El .Sh SEE ALSO +.Xr pthread_rwlock_destroy 3 , .Xr pthread_rwlockattr_init 3 , -.Xr pthread_rwlockattr_setpshared 3 , -.Xr pthread_rwlock_destroy 3 +.Xr pthread_rwlockattr_setpshared 3 .Sh STANDARDS The .Fn pthread_rwlock_init Modified: head/share/man/man3/pthread_rwlockattr_getpshared.3 ============================================================================== --- head/share/man/man3/pthread_rwlockattr_getpshared.3 Fri Dec 26 22:34:15 2014 (r276260) +++ head/share/man/man3/pthread_rwlockattr_getpshared.3 Fri Dec 26 22:41:10 2014 (r276261) @@ -71,9 +71,9 @@ The value specified by is invalid. .El .Sh SEE ALSO +.Xr pthread_rwlock_init 3 , .Xr pthread_rwlockattr_init 3 , -.Xr pthread_rwlockattr_setpshared 3 , -.Xr pthread_rwlock_init 3 +.Xr pthread_rwlockattr_setpshared 3 .Sh STANDARDS The .Fn pthread_rwlockattr_getpshared Modified: head/share/man/man3/pthread_rwlockattr_init.3 ============================================================================== --- head/share/man/man3/pthread_rwlockattr_init.3 Fri Dec 26 22:34:15 2014 (r276260) +++ head/share/man/man3/pthread_rwlockattr_init.3 Fri Dec 26 22:41:10 2014 (r276261) @@ -55,10 +55,10 @@ function will fail if: Insufficient memory exists to initialize the attribute object. .El .Sh SEE ALSO +.Xr pthread_rwlock_init 3 , .Xr pthread_rwlockattr_destroy 3 , .Xr pthread_rwlockattr_getpshared 3 , -.Xr pthread_rwlockattr_setpshared 3 , -.Xr pthread_rwlock_init 3 +.Xr pthread_rwlockattr_setpshared 3 .Sh STANDARDS The .Fn pthread_rwlockattr_init Modified: head/share/man/man3/pthread_rwlockattr_setpshared.3 ============================================================================== --- head/share/man/man3/pthread_rwlockattr_setpshared.3 Fri Dec 26 22:34:15 2014 (r276260) +++ head/share/man/man3/pthread_rwlockattr_setpshared.3 Fri Dec 26 22:41:10 2014 (r276261) @@ -75,9 +75,9 @@ or is invalid. .El .Sh SEE ALSO +.Xr pthread_rwlock_init 3 , .Xr pthread_rwlockattr_getpshared 3 , -.Xr pthread_rwlockattr_init 3 , -.Xr pthread_rwlock_init 3 +.Xr pthread_rwlockattr_init 3 .Sh STANDARDS The .Fn pthread_rwlockattr_setpshared From owner-svn-src-all@FreeBSD.ORG Fri Dec 26 22:43:56 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 284771CC; Fri, 26 Dec 2014 22:43:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 13BB22D8E; Fri, 26 Dec 2014 22:43:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBQMht59072182; Fri, 26 Dec 2014 22:43:55 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBQMht6t072179; Fri, 26 Dec 2014 22:43:55 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201412262243.sBQMht6t072179@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Fri, 26 Dec 2014 22:43:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276262 - head/share/man/man7 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2014 22:43:56 -0000 Author: bapt Date: Fri Dec 26 22:43:54 2014 New Revision: 276262 URL: https://svnweb.freebsd.org/changeset/base/276262 Log: sort SEE ALSO Modified: head/share/man/man7/c99.7 head/share/man/man7/environ.7 head/share/man/man7/tuning.7 Modified: head/share/man/man7/c99.7 ============================================================================== --- head/share/man/man7/c99.7 Fri Dec 26 22:41:10 2014 (r276261) +++ head/share/man/man7/c99.7 Fri Dec 26 22:43:54 2014 (r276262) @@ -142,9 +142,9 @@ Most of the UNIX-like operating systems but those addition in GNU C should not be considered as standard features. .Sh SEE ALSO -.Xr cc 1 , .Xr c89 1 , -.Xr c99 1 +.Xr c99 1 , +.Xr cc 1 .Sh STANDARDS .Rs .%A ANSI Modified: head/share/man/man7/environ.7 ============================================================================== --- head/share/man/man7/environ.7 Fri Dec 26 22:41:10 2014 (r276261) +++ head/share/man/man7/environ.7 Fri Dec 26 22:43:54 2014 (r276262) @@ -250,8 +250,8 @@ built-in command in .Xr sh 1 , .Xr execve 2 , .Xr execle 3 , -.Xr getenv 3 , .Xr getbsize 3 , +.Xr getenv 3 , .Xr setenv 3 , .Xr setlocale 3 , .Xr system 3 , Modified: head/share/man/man7/tuning.7 ============================================================================== --- head/share/man/man7/tuning.7 Fri Dec 26 22:41:10 2014 (r276261) +++ head/share/man/man7/tuning.7 Fri Dec 26 22:43:54 2014 (r276262) @@ -747,8 +747,8 @@ over services you export from your box ( .Xr login.conf 5 , .Xr rc.conf 5 , .Xr sysctl.conf 5 , -.Xr firewall 7 , .Xr eventtimers 7 , +.Xr firewall 7 , .Xr hier 7 , .Xr ports 7 , .Xr boot 8 , From owner-svn-src-all@FreeBSD.ORG Fri Dec 26 22:44:28 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 42304309; Fri, 26 Dec 2014 22:44:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2DEFB2DA2; Fri, 26 Dec 2014 22:44:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBQMiSnQ072328; Fri, 26 Dec 2014 22:44:28 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBQMiSeZ072327; Fri, 26 Dec 2014 22:44:28 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201412262244.sBQMiSeZ072327@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Fri, 26 Dec 2014 22:44:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276263 - head/share/man/man8 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2014 22:44:28 -0000 Author: bapt Date: Fri Dec 26 22:44:27 2014 New Revision: 276263 URL: https://svnweb.freebsd.org/changeset/base/276263 Log: Sort SEE ALSO Modified: head/share/man/man8/rc.8 Modified: head/share/man/man8/rc.8 ============================================================================== --- head/share/man/man8/rc.8 Fri Dec 26 22:43:54 2014 (r276262) +++ head/share/man/man8/rc.8 Fri Dec 26 22:44:27 2014 (r276263) @@ -550,8 +550,8 @@ is unnecessary, but is often included. .Xr kill 1 , .Xr rc.conf 5 , .Xr init 8 , -.Xr rcorder 8 , .Xr rc.subr 8 , +.Xr rcorder 8 , .Xr reboot 8 , .Xr savecore 8 .Sh HISTORY From owner-svn-src-all@FreeBSD.ORG Fri Dec 26 22:49:28 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 47EE1511; Fri, 26 Dec 2014 22:49:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 323C62E02; Fri, 26 Dec 2014 22:49:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBQMnSIc073065; Fri, 26 Dec 2014 22:49:28 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBQMnSw3073062; Fri, 26 Dec 2014 22:49:28 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201412262249.sBQMnSw3073062@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 26 Dec 2014 22:49:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r276264 - stable/9/cddl/contrib/opensolaris/lib/libdtrace/common X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2014 22:49:28 -0000 Author: markj Date: Fri Dec 26 22:49:27 2014 New Revision: 276264 URL: https://svnweb.freebsd.org/changeset/base/276264 Log: MFC r275011: The module load address always needs to be included when setting the dm_*_va fields of dt_module_t. Previously, this was only done on architectures where kernel modules have type ET_REL; this change fixes that. As a result, symbol name resolution in the stack() action now works properly for kernel modules on i386. Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_module.c Directory Properties: stable/9/cddl/contrib/opensolaris/ (props changed) stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/ (props changed) Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_module.c ============================================================================== --- stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_module.c Fri Dec 26 22:44:27 2014 (r276263) +++ stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_module.c Fri Dec 26 22:49:27 2014 (r276264) @@ -970,13 +970,13 @@ dt_module_update(dtrace_hdl_t *dtp, stru #if defined(__FreeBSD__) if (sh.sh_size == 0) continue; - if (is_elf_obj && (sh.sh_type == SHT_PROGBITS || - sh.sh_type == SHT_NOBITS)) { + if (sh.sh_type == SHT_PROGBITS || sh.sh_type == SHT_NOBITS) { alignmask = sh.sh_addralign - 1; mapbase += alignmask; mapbase &= ~alignmask; sh.sh_addr = mapbase; - dmp->dm_sec_offsets[elf_ndxscn(sp)] = sh.sh_addr; + if (is_elf_obj) + dmp->dm_sec_offsets[elf_ndxscn(sp)] = sh.sh_addr; mapbase += sh.sh_size; } #endif From owner-svn-src-all@FreeBSD.ORG Fri Dec 26 22:50:35 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DE5EF64C; Fri, 26 Dec 2014 22:50:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C8A592EB7; Fri, 26 Dec 2014 22:50:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBQMoZEK073967; Fri, 26 Dec 2014 22:50:35 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBQMoZgp073965; Fri, 26 Dec 2014 22:50:35 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201412262250.sBQMoZgp073965@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 26 Dec 2014 22:50:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276265 - stable/10/cddl/contrib/opensolaris/lib/libdtrace/common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2014 22:50:36 -0000 Author: markj Date: Fri Dec 26 22:50:34 2014 New Revision: 276265 URL: https://svnweb.freebsd.org/changeset/base/276265 Log: MFC r275011: The module load address always needs to be included when setting the dm_*_va fields of dt_module_t. Previously, this was only done on architectures where kernel modules have type ET_REL; this change fixes that. As a result, symbol name resolution in the stack() action now works properly for kernel modules on i386. Modified: stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_module.c Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_module.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_module.c Fri Dec 26 22:49:27 2014 (r276264) +++ stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_module.c Fri Dec 26 22:50:34 2014 (r276265) @@ -1211,13 +1211,13 @@ dt_module_update(dtrace_hdl_t *dtp, stru #if defined(__FreeBSD__) if (sh.sh_size == 0) continue; - if (is_elf_obj && (sh.sh_type == SHT_PROGBITS || - sh.sh_type == SHT_NOBITS)) { + if (sh.sh_type == SHT_PROGBITS || sh.sh_type == SHT_NOBITS) { alignmask = sh.sh_addralign - 1; mapbase += alignmask; mapbase &= ~alignmask; sh.sh_addr = mapbase; - dmp->dm_sec_offsets[elf_ndxscn(sp)] = sh.sh_addr; + if (is_elf_obj) + dmp->dm_sec_offsets[elf_ndxscn(sp)] = sh.sh_addr; mapbase += sh.sh_size; } #endif From owner-svn-src-all@FreeBSD.ORG Fri Dec 26 22:52:46 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3741E7C4; Fri, 26 Dec 2014 22:52:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 07BF564D37; Fri, 26 Dec 2014 22:52:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBQMqjsK077128; Fri, 26 Dec 2014 22:52:45 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBQMqjCq077127; Fri, 26 Dec 2014 22:52:45 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201412262252.sBQMqjCq077127@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 26 Dec 2014 22:52:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276267 - stable/10/cddl/contrib/opensolaris/lib/libdtrace/common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2014 22:52:46 -0000 Author: markj Date: Fri Dec 26 22:52:44 2014 New Revision: 276267 URL: https://svnweb.freebsd.org/changeset/base/276267 Log: MFC r272671: Treat D keywords as identifiers in certain postfix expressions. This allows one to, for example, access the "provider" field of a struct g_consumer, even though "provider" is a D keyword. PR: 169657 Modified: stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_grammar.y Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_grammar.y ============================================================================== --- stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_grammar.y Fri Dec 26 22:52:43 2014 (r276266) +++ stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_grammar.y Fri Dec 26 22:52:44 2014 (r276267) @@ -207,6 +207,8 @@ %type unary_operator %type struct_or_union +%type dtrace_keyword_ident + %% dtrace_program: d_expression DT_TOK_EOF { return (dt_node_root($1)); } @@ -391,12 +393,18 @@ postfix_expression: | postfix_expression DT_TOK_DOT DT_TOK_TNAME { $$ = OP2(DT_TOK_DOT, $1, dt_node_ident($3)); } + | postfix_expression DT_TOK_DOT dtrace_keyword_ident { + $$ = OP2(DT_TOK_DOT, $1, dt_node_ident($3)); + } | postfix_expression DT_TOK_PTR DT_TOK_IDENT { $$ = OP2(DT_TOK_PTR, $1, dt_node_ident($3)); } | postfix_expression DT_TOK_PTR DT_TOK_TNAME { $$ = OP2(DT_TOK_PTR, $1, dt_node_ident($3)); } + | postfix_expression DT_TOK_PTR dtrace_keyword_ident { + $$ = OP2(DT_TOK_PTR, $1, dt_node_ident($3)); + } | postfix_expression DT_TOK_ADDADD { $$ = OP1(DT_TOK_POSTINC, $1); } @@ -411,6 +419,10 @@ postfix_expression: DT_TOK_TNAME DT_TOK_RPAR { $$ = dt_node_offsetof($3, $5); } + | DT_TOK_OFFSETOF DT_TOK_LPAR type_name DT_TOK_COMMA + dtrace_keyword_ident DT_TOK_RPAR { + $$ = dt_node_offsetof($3, $5); + } | DT_TOK_XLATE DT_TOK_LT type_name DT_TOK_GT DT_TOK_LPAR expression DT_TOK_RPAR { $$ = OP2(DT_TOK_XLATE, dt_node_type($3), $6); @@ -835,4 +847,15 @@ function_parameters: | parameter_type_list { $$ = $1; } ; +dtrace_keyword_ident: + DT_KEY_PROBE { $$ = DUP("probe"); } + | DT_KEY_PROVIDER { $$ = DUP("provider"); } + | DT_KEY_SELF { $$ = DUP("self"); } + | DT_KEY_STRING { $$ = DUP("string"); } + | DT_TOK_STRINGOF { $$ = DUP("stringof"); } + | DT_KEY_USERLAND { $$ = DUP("userland"); } + | DT_TOK_XLATE { $$ = DUP("xlate"); } + | DT_KEY_XLATOR { $$ = DUP("translator"); } + ; + %% From owner-svn-src-all@FreeBSD.ORG Fri Dec 26 22:52:44 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DB8707C1; Fri, 26 Dec 2014 22:52:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ABFAD64D34; Fri, 26 Dec 2014 22:52:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBQMqiXo077093; Fri, 26 Dec 2014 22:52:44 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBQMqiIF077092; Fri, 26 Dec 2014 22:52:44 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201412262252.sBQMqiIF077092@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 26 Dec 2014 22:52:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r276266 - stable/9/cddl/contrib/opensolaris/lib/libdtrace/common X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2014 22:52:45 -0000 Author: markj Date: Fri Dec 26 22:52:43 2014 New Revision: 276266 URL: https://svnweb.freebsd.org/changeset/base/276266 Log: MFC r272671: Treat D keywords as identifiers in certain postfix expressions. This allows one to, for example, access the "provider" field of a struct g_consumer, even though "provider" is a D keyword. PR: 169657 Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_grammar.y Directory Properties: stable/9/cddl/contrib/opensolaris/ (props changed) stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/ (props changed) Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_grammar.y ============================================================================== --- stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_grammar.y Fri Dec 26 22:50:34 2014 (r276265) +++ stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_grammar.y Fri Dec 26 22:52:43 2014 (r276266) @@ -204,6 +204,8 @@ %type unary_operator %type struct_or_union +%type dtrace_keyword_ident + %% dtrace_program: d_expression DT_TOK_EOF { return (dt_node_root($1)); } @@ -388,12 +390,18 @@ postfix_expression: | postfix_expression DT_TOK_DOT DT_TOK_TNAME { $$ = OP2(DT_TOK_DOT, $1, dt_node_ident($3)); } + | postfix_expression DT_TOK_DOT dtrace_keyword_ident { + $$ = OP2(DT_TOK_DOT, $1, dt_node_ident($3)); + } | postfix_expression DT_TOK_PTR DT_TOK_IDENT { $$ = OP2(DT_TOK_PTR, $1, dt_node_ident($3)); } | postfix_expression DT_TOK_PTR DT_TOK_TNAME { $$ = OP2(DT_TOK_PTR, $1, dt_node_ident($3)); } + | postfix_expression DT_TOK_PTR dtrace_keyword_ident { + $$ = OP2(DT_TOK_PTR, $1, dt_node_ident($3)); + } | postfix_expression DT_TOK_ADDADD { $$ = OP1(DT_TOK_POSTINC, $1); } @@ -408,6 +416,10 @@ postfix_expression: DT_TOK_TNAME DT_TOK_RPAR { $$ = dt_node_offsetof($3, $5); } + | DT_TOK_OFFSETOF DT_TOK_LPAR type_name DT_TOK_COMMA + dtrace_keyword_ident DT_TOK_RPAR { + $$ = dt_node_offsetof($3, $5); + } | DT_TOK_XLATE DT_TOK_LT type_name DT_TOK_GT DT_TOK_LPAR expression DT_TOK_RPAR { $$ = OP2(DT_TOK_XLATE, dt_node_type($3), $6); @@ -831,4 +843,15 @@ function_parameters: | parameter_type_list { $$ = $1; } ; +dtrace_keyword_ident: + DT_KEY_PROBE { $$ = DUP("probe"); } + | DT_KEY_PROVIDER { $$ = DUP("provider"); } + | DT_KEY_SELF { $$ = DUP("self"); } + | DT_KEY_STRING { $$ = DUP("string"); } + | DT_TOK_STRINGOF { $$ = DUP("stringof"); } + | DT_KEY_USERLAND { $$ = DUP("userland"); } + | DT_TOK_XLATE { $$ = DUP("xlate"); } + | DT_KEY_XLATOR { $$ = DUP("translator"); } + ; + %% From owner-svn-src-all@FreeBSD.ORG Fri Dec 26 22:56:04 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1721BA8A; Fri, 26 Dec 2014 22:56:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 01F9764D7D; Fri, 26 Dec 2014 22:56:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBQMu3Mc077628; Fri, 26 Dec 2014 22:56:03 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBQMu3CG077626; Fri, 26 Dec 2014 22:56:03 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201412262256.sBQMu3CG077626@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 26 Dec 2014 22:56:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276268 - in stable/10/sys/dev: ahci ida X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2014 22:56:04 -0000 Author: ian Date: Fri Dec 26 22:56:02 2014 New Revision: 276268 URL: https://svnweb.freebsd.org/changeset/base/276268 Log: MFC r274188, r274189: DMA tag alignment should be 1 (not 0) when a device can dma at any address. Modified: stable/10/sys/dev/ahci/ahci.c stable/10/sys/dev/ida/ida_eisa.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/ahci/ahci.c ============================================================================== --- stable/10/sys/dev/ahci/ahci.c Fri Dec 26 22:52:44 2014 (r276267) +++ stable/10/sys/dev/ahci/ahci.c Fri Dec 26 22:56:02 2014 (r276268) @@ -529,7 +529,7 @@ ahci_attach(device_t dev) ctlr->emloc = ATA_INL(ctlr->r_mem, AHCI_EM_LOC); /* Create controller-wide DMA tag. */ - if (bus_dma_tag_create(bus_get_dma_tag(dev), 0, 0, + if (bus_dma_tag_create(bus_get_dma_tag(dev), 1, 0, (ctlr->caps & AHCI_CAP_64BIT) ? BUS_SPACE_MAXADDR : BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, BUS_SPACE_MAXSIZE, BUS_SPACE_UNRESTRICTED, BUS_SPACE_MAXSIZE, Modified: stable/10/sys/dev/ida/ida_eisa.c ============================================================================== --- stable/10/sys/dev/ida/ida_eisa.c Fri Dec 26 22:52:44 2014 (r276267) +++ stable/10/sys/dev/ida/ida_eisa.c Fri Dec 26 22:56:02 2014 (r276268) @@ -296,7 +296,7 @@ ida_eisa_attach(device_t dev) error = bus_dma_tag_create( /* parent */ bus_get_dma_tag(dev), - /* alignment */ 0, + /* alignment */ 1, /* boundary */ 0, /* lowaddr */ BUS_SPACE_MAXADDR_32BIT, /* highaddr */ BUS_SPACE_MAXADDR, From owner-svn-src-all@FreeBSD.ORG Fri Dec 26 23:18:11 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 50E06F6F; Fri, 26 Dec 2014 23:18:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3B51F6622B; Fri, 26 Dec 2014 23:18:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBQNIBYo087259; Fri, 26 Dec 2014 23:18:11 GMT (envelope-from scottl@FreeBSD.org) Received: (from scottl@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBQNIAlf087254; Fri, 26 Dec 2014 23:18:10 GMT (envelope-from scottl@FreeBSD.org) Message-Id: <201412262318.sBQNIAlf087254@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: scottl set sender to scottl@FreeBSD.org using -f From: Scott Long Date: Fri, 26 Dec 2014 23:18:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276269 - stable/10/sys/dev/isci X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2014 23:18:11 -0000 Author: scottl Date: Fri Dec 26 23:18:09 2014 New Revision: 276269 URL: https://svnweb.freebsd.org/changeset/base/276269 Log: MFC 276174: Fix tunable and sysctl handling of the fail_on_task_timeout knob. Reviewed by: emax Obtained from: Netflix, Inc. Modified: stable/10/sys/dev/isci/isci_controller.c stable/10/sys/dev/isci/isci_sysctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/isci/isci_controller.c ============================================================================== --- stable/10/sys/dev/isci/isci_controller.c Fri Dec 26 22:56:02 2014 (r276268) +++ stable/10/sys/dev/isci/isci_controller.c Fri Dec 26 23:18:09 2014 (r276269) @@ -373,6 +373,8 @@ SCI_STATUS isci_controller_initialize(st fail_on_timeout = 1; TUNABLE_INT_FETCH("hw.isci.fail_on_task_timeout", &fail_on_timeout); + controller->fail_on_task_timeout = fail_on_timeout; + /* Attach to CAM using xpt_bus_register now, then immediately freeze * the simq. It will get released later when initial domain discovery * is complete. Modified: stable/10/sys/dev/isci/isci_sysctl.c ============================================================================== --- stable/10/sys/dev/isci/isci_sysctl.c Fri Dec 26 22:56:02 2014 (r276268) +++ stable/10/sys/dev/isci/isci_sysctl.c Fri Dec 26 23:18:09 2014 (r276269) @@ -226,12 +226,13 @@ static int isci_sysctl_fail_on_task_timeout(SYSCTL_HANDLER_ARGS) { struct isci_softc *isci = (struct isci_softc *)arg1; - int32_t fail_on_timeout = 0; + int32_t fail_on_timeout; int error, i; + fail_on_timeout = isci->controllers[0].fail_on_task_timeout; error = sysctl_handle_int(oidp, &fail_on_timeout, 0, req); - if (error || fail_on_timeout == 0) + if (error || req->newptr == NULL) return (error); for (i = 0; i < isci->controller_count; i++) From owner-svn-src-all@FreeBSD.ORG Sat Dec 27 00:01:29 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6CC119CD; Sat, 27 Dec 2014 00:01:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5846F668B3; Sat, 27 Dec 2014 00:01:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBR01TTP010134; Sat, 27 Dec 2014 00:01:29 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBR01TbI010133; Sat, 27 Dec 2014 00:01:29 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201412270001.sBR01TbI010133@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 27 Dec 2014 00:01:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276270 - stable/10/sys/dev/mpt X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2014 00:01:29 -0000 Author: ian Date: Sat Dec 27 00:01:28 2014 New Revision: 276270 URL: https://svnweb.freebsd.org/changeset/base/276270 Log: MFC r274926: Squelch a (bogus) gcc used before init warning Modified: stable/10/sys/dev/mpt/mpt.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/mpt/mpt.c ============================================================================== --- stable/10/sys/dev/mpt/mpt.c Fri Dec 26 23:18:09 2014 (r276269) +++ stable/10/sys/dev/mpt/mpt.c Sat Dec 27 00:01:28 2014 (r276270) @@ -1334,6 +1334,7 @@ mpt_wait_req(struct mpt_softc *mpt, requ /* Set timeout as well so final timeout check works. */ timeout = time_ms; } else { + sbt = 0; /* Squelch bogus gcc warning. */ timeout = time_ms * 2; } req->state |= REQ_STATE_NEED_WAKEUP; From owner-svn-src-all@FreeBSD.ORG Sat Dec 27 00:44:34 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5998B70E; Sat, 27 Dec 2014 00:44:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 442D067B95; Sat, 27 Dec 2014 00:44:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBR0iYxL031072; Sat, 27 Dec 2014 00:44:34 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBR0iYEo031071; Sat, 27 Dec 2014 00:44:34 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201412270044.sBR0iYEo031071@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 27 Dec 2014 00:44:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276271 - stable/10/sys/dev/cpuctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2014 00:44:34 -0000 Author: kib Date: Sat Dec 27 00:44:33 2014 New Revision: 276271 URL: https://svnweb.freebsd.org/changeset/base/276271 Log: MFC r275960: Increase allowed size of the microcode blob to 32KB. Modified: stable/10/sys/dev/cpuctl/cpuctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cpuctl/cpuctl.c ============================================================================== --- stable/10/sys/dev/cpuctl/cpuctl.c Sat Dec 27 00:01:28 2014 (r276270) +++ stable/10/sys/dev/cpuctl/cpuctl.c Sat Dec 27 00:44:33 2014 (r276271) @@ -63,7 +63,7 @@ static d_ioctl_t cpuctl_ioctl; # define DPRINTF(...) #endif -#define UCODE_SIZE_MAX (16 * 1024) +#define UCODE_SIZE_MAX (32 * 1024) static int cpuctl_do_msr(int cpu, cpuctl_msr_args_t *data, u_long cmd, struct thread *td); From owner-svn-src-all@FreeBSD.ORG Sat Dec 27 00:55:18 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3C940B96; Sat, 27 Dec 2014 00:55:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 26ADD67D38; Sat, 27 Dec 2014 00:55:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBR0tIAV036221; Sat, 27 Dec 2014 00:55:18 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBR0tFEx036205; Sat, 27 Dec 2014 00:55:15 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201412270055.sBR0tFEx036205@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 27 Dec 2014 00:55:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276272 - in stable/10: bin/ps sys/kern sys/rpc sys/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2014 00:55:18 -0000 Author: kib Date: Sat Dec 27 00:55:14 2014 New Revision: 276272 URL: https://svnweb.freebsd.org/changeset/base/276272 Log: MFC r275745: Add facility to stop all userspace processes. MFC r275753: Fix gcc build. MFC r275820: Add missed break. Modified: stable/10/bin/ps/ps.1 stable/10/sys/kern/kern_exec.c stable/10/sys/kern/kern_exit.c stable/10/sys/kern/kern_fork.c stable/10/sys/kern/kern_proc.c stable/10/sys/kern/kern_sig.c stable/10/sys/kern/kern_thread.c stable/10/sys/rpc/svc.c stable/10/sys/sys/proc.h Directory Properties: stable/10/ (props changed) Modified: stable/10/bin/ps/ps.1 ============================================================================== --- stable/10/bin/ps/ps.1 Sat Dec 27 00:44:33 2014 (r276271) +++ stable/10/bin/ps/ps.1 Sat Dec 27 00:55:14 2014 (r276272) @@ -29,7 +29,7 @@ .\" @(#)ps.1 8.3 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd August 7, 2014 +.Dd December 9, 2014 .Dt PS 1 .Os .Sh NAME @@ -332,6 +332,7 @@ the include file .It Dv "P_SINGLE_BOUNDARY" Ta No "0x400000" Ta "Threads should suspend at user boundary" .It Dv "P_HWPMC" Ta No "0x800000" Ta "Process is using HWPMCs" .It Dv "P_JAILED" Ta No "0x1000000" Ta "Process is in jail" +.It Dv "P_TOTAL_STOP" Ta No "0x2000000" Ta "Stopped for system suspend" .It Dv "P_INEXEC" Ta No "0x4000000" Ta "Process is in execve()" .It Dv "P_STATCHILD" Ta No "0x8000000" Ta "Child process stopped or exited" .It Dv "P_INMEM" Ta No "0x10000000" Ta "Loaded into memory" Modified: stable/10/sys/kern/kern_exec.c ============================================================================== --- stable/10/sys/kern/kern_exec.c Sat Dec 27 00:44:33 2014 (r276271) +++ stable/10/sys/kern/kern_exec.c Sat Dec 27 00:55:14 2014 (r276272) @@ -292,7 +292,7 @@ kern_execve(td, args, mac_p) args->endp - args->begin_envv); if (p->p_flag & P_HADTHREADS) { PROC_LOCK(p); - if (thread_single(SINGLE_BOUNDARY)) { + if (thread_single(p, SINGLE_BOUNDARY)) { PROC_UNLOCK(p); exec_free_args(args); return (ERESTART); /* Try again later. */ @@ -311,9 +311,9 @@ kern_execve(td, args, mac_p) * force other threads to suicide. */ if (error == 0) - thread_single(SINGLE_EXIT); + thread_single(p, SINGLE_EXIT); else - thread_single_end(); + thread_single_end(p, SINGLE_BOUNDARY); PROC_UNLOCK(p); } if ((td->td_pflags & TDP_EXECVMSPC) != 0) { Modified: stable/10/sys/kern/kern_exit.c ============================================================================== --- stable/10/sys/kern/kern_exit.c Sat Dec 27 00:44:33 2014 (r276271) +++ stable/10/sys/kern/kern_exit.c Sat Dec 27 00:55:14 2014 (r276272) @@ -208,7 +208,7 @@ exit1(struct thread *td, int rv) * re-check all suspension request, the thread should * either be suspended there or exit. */ - if (!thread_single(SINGLE_EXIT)) + if (!thread_single(p, SINGLE_EXIT)) /* * All other activity in this process is now * stopped. Threading support has been turned Modified: stable/10/sys/kern/kern_fork.c ============================================================================== --- stable/10/sys/kern/kern_fork.c Sat Dec 27 00:44:33 2014 (r276271) +++ stable/10/sys/kern/kern_fork.c Sat Dec 27 00:55:14 2014 (r276272) @@ -323,7 +323,7 @@ fork_norfproc(struct thread *td, int fla if (((p1->p_flag & (P_HADTHREADS|P_SYSTEM)) == P_HADTHREADS) && (flags & (RFCFDG | RFFDG))) { PROC_LOCK(p1); - if (thread_single(SINGLE_BOUNDARY)) { + if (thread_single(p1, SINGLE_BOUNDARY)) { PROC_UNLOCK(p1); return (ERESTART); } @@ -354,7 +354,7 @@ fail: if (((p1->p_flag & (P_HADTHREADS|P_SYSTEM)) == P_HADTHREADS) && (flags & (RFCFDG | RFFDG))) { PROC_LOCK(p1); - thread_single_end(); + thread_single_end(p1, SINGLE_BOUNDARY); PROC_UNLOCK(p1); } return (error); @@ -390,6 +390,7 @@ do_fork(struct thread *td, int flags, st p2->p_pid = trypid; AUDIT_ARG_PID(p2->p_pid); LIST_INSERT_HEAD(&allproc, p2, p_list); + allproc_gen++; LIST_INSERT_HEAD(PIDHASH(p2->p_pid), p2, p_hash); tidhash_add(td2); PROC_LOCK(p2); Modified: stable/10/sys/kern/kern_proc.c ============================================================================== --- stable/10/sys/kern/kern_proc.c Sat Dec 27 00:44:33 2014 (r276271) +++ stable/10/sys/kern/kern_proc.c Sat Dec 27 00:55:14 2014 (r276272) @@ -2854,3 +2854,142 @@ static SYSCTL_NODE(_kern_proc, KERN_PROC static SYSCTL_NODE(_kern_proc, KERN_PROC_SIGTRAMP, sigtramp, CTLFLAG_RD | CTLFLAG_MPSAFE, sysctl_kern_proc_sigtramp, "Process signal trampoline location"); + +int allproc_gen; + +void +stop_all_proc(void) +{ + struct proc *cp, *p; + int r, gen; + bool restart, seen_stopped, seen_exiting, stopped_some; + + cp = curproc; + /* + * stop_all_proc() assumes that all process which have + * usermode must be stopped, except current process, for + * obvious reasons. Since other threads in the process + * establishing global stop could unstop something, disable + * calls from multithreaded processes as precaution. The + * service must not be user-callable anyway. + */ + KASSERT((cp->p_flag & P_HADTHREADS) == 0 || + (cp->p_flag & P_KTHREAD) != 0, ("mt stop_all_proc")); + +allproc_loop: + sx_xlock(&allproc_lock); + gen = allproc_gen; + seen_exiting = seen_stopped = stopped_some = restart = false; + LIST_REMOVE(cp, p_list); + LIST_INSERT_HEAD(&allproc, cp, p_list); + for (;;) { + p = LIST_NEXT(cp, p_list); + if (p == NULL) + break; + LIST_REMOVE(cp, p_list); + LIST_INSERT_AFTER(p, cp, p_list); + PROC_LOCK(p); + if ((p->p_flag & (P_KTHREAD | P_SYSTEM | + P_TOTAL_STOP)) != 0) { + PROC_UNLOCK(p); + continue; + } + if ((p->p_flag & P_WEXIT) != 0) { + seen_exiting = true; + PROC_UNLOCK(p); + continue; + } + if (P_SHOULDSTOP(p) == P_STOPPED_SINGLE) { + /* + * Stopped processes are tolerated when there + * are no other processes which might continue + * them. P_STOPPED_SINGLE but not + * P_TOTAL_STOP process still has at least one + * thread running. + */ + seen_stopped = true; + PROC_UNLOCK(p); + continue; + } + _PHOLD(p); + sx_xunlock(&allproc_lock); + r = thread_single(p, SINGLE_ALLPROC); + if (r != 0) + restart = true; + else + stopped_some = true; + _PRELE(p); + PROC_UNLOCK(p); + sx_xlock(&allproc_lock); + } + /* Catch forked children we did not see in iteration. */ + if (gen != allproc_gen) + restart = true; + sx_xunlock(&allproc_lock); + if (restart || stopped_some || seen_exiting || seen_stopped) { + kern_yield(PRI_USER); + goto allproc_loop; + } +} + +void +resume_all_proc(void) +{ + struct proc *cp, *p; + + cp = curproc; + sx_xlock(&allproc_lock); + LIST_REMOVE(cp, p_list); + LIST_INSERT_HEAD(&allproc, cp, p_list); + for (;;) { + p = LIST_NEXT(cp, p_list); + if (p == NULL) + break; + LIST_REMOVE(cp, p_list); + LIST_INSERT_AFTER(p, cp, p_list); + PROC_LOCK(p); + if ((p->p_flag & P_TOTAL_STOP) != 0) { + sx_xunlock(&allproc_lock); + _PHOLD(p); + thread_single_end(p, SINGLE_ALLPROC); + _PRELE(p); + PROC_UNLOCK(p); + sx_xlock(&allproc_lock); + } else { + PROC_UNLOCK(p); + } + } + sx_xunlock(&allproc_lock); +} + +#define TOTAL_STOP_DEBUG 1 +#ifdef TOTAL_STOP_DEBUG +volatile static int ap_resume; +#include + +static int +sysctl_debug_stop_all_proc(SYSCTL_HANDLER_ARGS) +{ + int error, val; + + val = 0; + ap_resume = 0; + error = sysctl_handle_int(oidp, &val, 0, req); + if (error != 0 || req->newptr == NULL) + return (error); + if (val != 0) { + stop_all_proc(); + syncer_suspend(); + while (ap_resume == 0) + ; + syncer_resume(); + resume_all_proc(); + } + return (0); +} + +SYSCTL_PROC(_debug, OID_AUTO, stop_all_proc, CTLTYPE_INT | CTLFLAG_RW | + CTLFLAG_MPSAFE, __DEVOLATILE(int *, &ap_resume), 0, + sysctl_debug_stop_all_proc, "I", + ""); +#endif Modified: stable/10/sys/kern/kern_sig.c ============================================================================== --- stable/10/sys/kern/kern_sig.c Sat Dec 27 00:44:33 2014 (r276271) +++ stable/10/sys/kern/kern_sig.c Sat Dec 27 00:55:14 2014 (r276272) @@ -2500,7 +2500,7 @@ ptracestop(struct thread *td, int sig) cv_broadcast(&p->p_dbgwait); } stopme: - thread_suspend_switch(td); + thread_suspend_switch(td, p); if (p->p_xthread == td) p->p_xthread = NULL; if (!(p->p_flag & P_TRACED)) @@ -2761,7 +2761,7 @@ issignal(struct thread *td) p->p_xstat = sig; PROC_SLOCK(p); sig_suspend_threads(td, p, 0); - thread_suspend_switch(td); + thread_suspend_switch(td, p); PROC_SUNLOCK(p); mtx_lock(&ps->ps_mtx); break; @@ -2942,7 +2942,7 @@ sigexit(td, sig) * XXX If another thread attempts to single-thread before us * (e.g. via fork()), we won't get a dump at all. */ - if ((sigprop(sig) & SA_CORE) && (thread_single(SINGLE_NO_EXIT) == 0)) { + if ((sigprop(sig) & SA_CORE) && thread_single(p, SINGLE_NO_EXIT) == 0) { p->p_sig = sig; /* * Log signals which would cause core dumps Modified: stable/10/sys/kern/kern_thread.c ============================================================================== --- stable/10/sys/kern/kern_thread.c Sat Dec 27 00:44:33 2014 (r276271) +++ stable/10/sys/kern/kern_thread.c Sat Dec 27 00:55:14 2014 (r276272) @@ -446,7 +446,7 @@ thread_exit(void) if (p->p_numthreads == p->p_suspcount) { thread_lock(p->p_singlethread); wakeup_swapper = thread_unsuspend_one( - p->p_singlethread); + p->p_singlethread, p); thread_unlock(p->p_singlethread); if (wakeup_swapper) kick_proc0(); @@ -575,7 +575,7 @@ calc_remaining(struct proc *p, int mode) remaining = p->p_numthreads; else if (mode == SINGLE_BOUNDARY) remaining = p->p_numthreads - p->p_boundary_count; - else if (mode == SINGLE_NO_EXIT) + else if (mode == SINGLE_NO_EXIT || mode == SINGLE_ALLPROC) remaining = p->p_numthreads - p->p_suspcount; else panic("calc_remaining: wrong mode %d", mode); @@ -586,7 +586,7 @@ static int remain_for_mode(int mode) { - return (1); + return (mode == SINGLE_ALLPROC ? 0 : 1); } static int @@ -602,22 +602,43 @@ weed_inhib(int mode, struct thread *td2, switch (mode) { case SINGLE_EXIT: if (TD_IS_SUSPENDED(td2)) - wakeup_swapper |= thread_unsuspend_one(td2); + wakeup_swapper |= thread_unsuspend_one(td2, p); if (TD_ON_SLEEPQ(td2) && (td2->td_flags & TDF_SINTR) != 0) wakeup_swapper |= sleepq_abort(td2, EINTR); break; case SINGLE_BOUNDARY: if (TD_IS_SUSPENDED(td2) && (td2->td_flags & TDF_BOUNDARY) == 0) - wakeup_swapper |= thread_unsuspend_one(td2); + wakeup_swapper |= thread_unsuspend_one(td2, p); if (TD_ON_SLEEPQ(td2) && (td2->td_flags & TDF_SINTR) != 0) wakeup_swapper |= sleepq_abort(td2, ERESTART); break; case SINGLE_NO_EXIT: if (TD_IS_SUSPENDED(td2) && (td2->td_flags & TDF_BOUNDARY) == 0) - wakeup_swapper |= thread_unsuspend_one(td2); + wakeup_swapper |= thread_unsuspend_one(td2, p); if (TD_ON_SLEEPQ(td2) && (td2->td_flags & TDF_SINTR) != 0) wakeup_swapper |= sleepq_abort(td2, ERESTART); break; + case SINGLE_ALLPROC: + /* + * ALLPROC suspend tries to avoid spurious EINTR for + * threads sleeping interruptable, by suspending the + * thread directly, similarly to sig_suspend_threads(). + * Since such sleep is not performed at the user + * boundary, TDF_BOUNDARY flag is not set, and TDF_ALLPROCSUSP + * is used to avoid immediate un-suspend. + */ + if (TD_IS_SUSPENDED(td2) && (td2->td_flags & (TDF_BOUNDARY | + TDF_ALLPROCSUSP)) == 0) + wakeup_swapper |= thread_unsuspend_one(td2, p); + if (TD_ON_SLEEPQ(td2) && (td2->td_flags & TDF_SINTR) != 0) { + if ((td2->td_flags & TDF_SBDRY) == 0) { + thread_suspend_one(td2); + td2->td_flags |= TDF_ALLPROCSUSP; + } else { + wakeup_swapper |= sleepq_abort(td2, ERESTART); + } + } + break; } return (wakeup_swapper); } @@ -636,19 +657,29 @@ weed_inhib(int mode, struct thread *td2, * any sleeping threads that are interruptable. (PCATCH). */ int -thread_single(int mode) +thread_single(struct proc *p, int mode) { struct thread *td; struct thread *td2; - struct proc *p; int remaining, wakeup_swapper; td = curthread; - p = td->td_proc; + KASSERT(mode == SINGLE_EXIT || mode == SINGLE_BOUNDARY || + mode == SINGLE_ALLPROC || mode == SINGLE_NO_EXIT, + ("invalid mode %d", mode)); + /* + * If allowing non-ALLPROC singlethreading for non-curproc + * callers, calc_remaining() and remain_for_mode() should be + * adjusted to also account for td->td_proc != p. For now + * this is not implemented because it is not used. + */ + KASSERT((mode == SINGLE_ALLPROC && td->td_proc != p) || + (mode != SINGLE_ALLPROC && td->td_proc == p), + ("mode %d proc %p curproc %p", mode, p, td->td_proc)); mtx_assert(&Giant, MA_NOTOWNED); PROC_LOCK_ASSERT(p, MA_OWNED); - if ((p->p_flag & P_HADTHREADS) == 0) + if ((p->p_flag & P_HADTHREADS) == 0 && mode != SINGLE_ALLPROC) return (0); /* Is someone already single threading? */ @@ -665,6 +696,8 @@ thread_single(int mode) else p->p_flag &= ~P_SINGLE_BOUNDARY; } + if (mode == SINGLE_ALLPROC) + p->p_flag |= P_TOTAL_STOP; p->p_flag |= P_STOPPED_SINGLE; PROC_SLOCK(p); p->p_singlethread = td; @@ -678,13 +711,13 @@ thread_single(int mode) continue; thread_lock(td2); td2->td_flags |= TDF_ASTPENDING | TDF_NEEDSUSPCHK; - if (TD_IS_INHIBITED(td2)) + if (TD_IS_INHIBITED(td2)) { wakeup_swapper |= weed_inhib(mode, td2, p); #ifdef SMP - else if (TD_IS_RUNNING(td2) && td != td2) { + } else if (TD_IS_RUNNING(td2) && td != td2) { forward_signal(td2); - } #endif + } thread_unlock(td2); } if (wakeup_swapper) @@ -702,7 +735,7 @@ stopme: * Wake us up when everyone else has suspended. * In the mean time we suspend as well. */ - thread_suspend_switch(td); + thread_suspend_switch(td, p); remaining = calc_remaining(p, mode); } if (mode == SINGLE_EXIT) { @@ -812,8 +845,9 @@ thread_suspend_check(int return_instead) * Ignore suspend requests for stop signals if they * are deferred. */ - if (P_SHOULDSTOP(p) == P_STOPPED_SIG && - td->td_flags & TDF_SBDRY) { + if ((P_SHOULDSTOP(p) == P_STOPPED_SIG || + (p->p_flag & P_TOTAL_STOP) != 0) && + (td->td_flags & TDF_SBDRY) != 0) { KASSERT(return_instead, ("TDF_SBDRY set for unsafe thread_suspend_check")); return (0); @@ -840,7 +874,7 @@ thread_suspend_check(int return_instead) if (p->p_numthreads == p->p_suspcount + 1) { thread_lock(p->p_singlethread); wakeup_swapper = - thread_unsuspend_one(p->p_singlethread); + thread_unsuspend_one(p->p_singlethread, p); thread_unlock(p->p_singlethread); if (wakeup_swapper) kick_proc0(); @@ -873,11 +907,9 @@ thread_suspend_check(int return_instead) } void -thread_suspend_switch(struct thread *td) +thread_suspend_switch(struct thread *td, struct proc *p) { - struct proc *p; - p = td->td_proc; KASSERT(!TD_IS_SUSPENDED(td), ("already suspended")); PROC_LOCK_ASSERT(p, MA_OWNED); PROC_SLOCK_ASSERT(p, MA_OWNED); @@ -885,8 +917,10 @@ thread_suspend_switch(struct thread *td) * We implement thread_suspend_one in stages here to avoid * dropping the proc lock while the thread lock is owned. */ - thread_stopped(p); - p->p_suspcount++; + if (p == td->td_proc) { + thread_stopped(p); + p->p_suspcount++; + } PROC_UNLOCK(p); thread_lock(td); td->td_flags &= ~TDF_NEEDSUSPCHK; @@ -904,8 +938,9 @@ thread_suspend_switch(struct thread *td) void thread_suspend_one(struct thread *td) { - struct proc *p = td->td_proc; + struct proc *p; + p = td->td_proc; PROC_SLOCK_ASSERT(p, MA_OWNED); THREAD_LOCK_ASSERT(td, MA_OWNED); KASSERT(!TD_IS_SUSPENDED(td), ("already suspended")); @@ -916,15 +951,17 @@ thread_suspend_one(struct thread *td) } int -thread_unsuspend_one(struct thread *td) +thread_unsuspend_one(struct thread *td, struct proc *p) { - struct proc *p = td->td_proc; - PROC_SLOCK_ASSERT(p, MA_OWNED); THREAD_LOCK_ASSERT(td, MA_OWNED); KASSERT(TD_IS_SUSPENDED(td), ("Thread not suspended")); TD_CLR_SUSPENDED(td); - p->p_suspcount--; + td->td_flags &= ~TDF_ALLPROCSUSP; + if (td->td_proc == p) { + PROC_SLOCK_ASSERT(p, MA_OWNED); + p->p_suspcount--; + } return (setrunnable(td)); } @@ -944,7 +981,7 @@ thread_unsuspend(struct proc *p) FOREACH_THREAD_IN_PROC(p, td) { thread_lock(td); if (TD_IS_SUSPENDED(td)) { - wakeup_swapper |= thread_unsuspend_one(td); + wakeup_swapper |= thread_unsuspend_one(td, p); } thread_unlock(td); } @@ -955,9 +992,12 @@ thread_unsuspend(struct proc *p) * threading request. Now we've downgraded to single-threaded, * let it continue. */ - thread_lock(p->p_singlethread); - wakeup_swapper = thread_unsuspend_one(p->p_singlethread); - thread_unlock(p->p_singlethread); + if (p->p_singlethread->td_proc == p) { + thread_lock(p->p_singlethread); + wakeup_swapper = thread_unsuspend_one( + p->p_singlethread, p); + thread_unlock(p->p_singlethread); + } } if (wakeup_swapper) kick_proc0(); @@ -967,15 +1007,20 @@ thread_unsuspend(struct proc *p) * End the single threading mode.. */ void -thread_single_end(void) +thread_single_end(struct proc *p, int mode) { struct thread *td; - struct proc *p; int wakeup_swapper; - p = curproc; + KASSERT(mode == SINGLE_EXIT || mode == SINGLE_BOUNDARY || + mode == SINGLE_ALLPROC || mode == SINGLE_NO_EXIT, + ("invalid mode %d", mode)); PROC_LOCK_ASSERT(p, MA_OWNED); - p->p_flag &= ~(P_STOPPED_SINGLE | P_SINGLE_EXIT | P_SINGLE_BOUNDARY); + KASSERT((mode == SINGLE_ALLPROC && (p->p_flag & P_TOTAL_STOP) != 0) || + (mode != SINGLE_ALLPROC && (p->p_flag & P_TOTAL_STOP) == 0), + ("mode %d does not match P_TOTAL_STOP", mode)); + p->p_flag &= ~(P_STOPPED_SINGLE | P_SINGLE_EXIT | P_SINGLE_BOUNDARY | + P_TOTAL_STOP); PROC_SLOCK(p); p->p_singlethread = NULL; wakeup_swapper = 0; @@ -985,12 +1030,11 @@ thread_single_end(void) * on the process. The single threader must be allowed * to continue however as this is a bad place to stop. */ - if (p->p_numthreads != remain_for_mode(SINGLE_EXIT) && - !P_SHOULDSTOP(p)) { + if (p->p_numthreads != remain_for_mode(mode) && !P_SHOULDSTOP(p)) { FOREACH_THREAD_IN_PROC(p, td) { thread_lock(td); if (TD_IS_SUSPENDED(td)) { - wakeup_swapper |= thread_unsuspend_one(td); + wakeup_swapper |= thread_unsuspend_one(td, p); } thread_unlock(td); } Modified: stable/10/sys/rpc/svc.c ============================================================================== --- stable/10/sys/rpc/svc.c Sat Dec 27 00:44:33 2014 (r276271) +++ stable/10/sys/rpc/svc.c Sat Dec 27 00:55:14 2014 (r276272) @@ -1190,7 +1190,8 @@ svc_run_internal(SVCGROUP *grp, bool_t i mtx_unlock(&grp->sg_lock); p = curproc; PROC_LOCK(p); - if (P_SHOULDSTOP(p)) { + if (P_SHOULDSTOP(p) || + (p->p_flag & P_TOTAL_STOP) != 0) { thread_suspend_check(0); PROC_UNLOCK(p); mtx_lock(&grp->sg_lock); Modified: stable/10/sys/sys/proc.h ============================================================================== --- stable/10/sys/sys/proc.h Sat Dec 27 00:44:33 2014 (r276271) +++ stable/10/sys/sys/proc.h Sat Dec 27 00:55:14 2014 (r276272) @@ -355,7 +355,7 @@ do { \ #define TDF_CANSWAP 0x00000040 /* Thread can be swapped. */ #define TDF_SLEEPABORT 0x00000080 /* sleepq_abort was called. */ #define TDF_KTH_SUSP 0x00000100 /* kthread is suspended */ -#define TDF_UNUSED09 0x00000200 /* --available-- */ +#define TDF_ALLPROCSUSP 0x00000200 /* suspended by SINGLE_ALLPROC */ #define TDF_BOUNDARY 0x00000400 /* Thread suspended at user boundary */ #define TDF_ASTPENDING 0x00000800 /* Thread has some asynchronous events. */ #define TDF_TIMOFAIL 0x00001000 /* Timeout from sleep after we were awake. */ @@ -629,7 +629,7 @@ struct proc { #define P_SINGLE_BOUNDARY 0x400000 /* Threads should suspend at user boundary. */ #define P_HWPMC 0x800000 /* Process is using HWPMCs */ #define P_JAILED 0x1000000 /* Process is in jail. */ -#define P_UNUSED1 0x2000000 +#define P_TOTAL_STOP 0x2000000 /* Stopped in proc_stop_total. */ #define P_INEXEC 0x4000000 /* Process is in execve(). */ #define P_STATCHILD 0x8000000 /* Child process stopped or exited. */ #define P_INMEM 0x10000000 /* Loaded into memory. */ @@ -690,6 +690,7 @@ struct proc { #define SINGLE_NO_EXIT 0 #define SINGLE_EXIT 1 #define SINGLE_BOUNDARY 2 +#define SINGLE_ALLPROC 3 #ifdef MALLOC_DECLARE MALLOC_DECLARE(M_PARGS); @@ -816,6 +817,7 @@ extern LIST_HEAD(pgrphashhead, pgrp) *pg extern u_long pgrphash; extern struct sx allproc_lock; +extern int allproc_gen; extern struct sx proctree_lock; extern struct mtx ppeers_lock; extern struct proc proc0; /* Process slot for swapper. */ @@ -939,8 +941,8 @@ void thread_exit(void) __dead2; void thread_free(struct thread *td); void thread_link(struct thread *td, struct proc *p); void thread_reap(void); -int thread_single(int how); -void thread_single_end(void); +int thread_single(struct proc *p, int how); +void thread_single_end(struct proc *p, int how); void thread_stash(struct thread *td); void thread_stopped(struct proc *p); void childproc_stopped(struct proc *child, int reason); @@ -948,14 +950,17 @@ void childproc_continued(struct proc *ch void childproc_exited(struct proc *child); int thread_suspend_check(int how); bool thread_suspend_check_needed(void); -void thread_suspend_switch(struct thread *); +void thread_suspend_switch(struct thread *, struct proc *p); void thread_suspend_one(struct thread *td); void thread_unlink(struct thread *td); void thread_unsuspend(struct proc *p); -int thread_unsuspend_one(struct thread *td); +int thread_unsuspend_one(struct thread *td, struct proc *p); void thread_wait(struct proc *p); struct thread *thread_find(struct proc *p, lwpid_t tid); +void stop_all_proc(void); +void resume_all_proc(void); + static __inline int curthread_pflags_set(int flags) { From owner-svn-src-all@FreeBSD.ORG Sat Dec 27 01:06:20 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DB8C8E7A; Sat, 27 Dec 2014 01:06:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C74FA67E72; Sat, 27 Dec 2014 01:06:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBR16Kqd041112; Sat, 27 Dec 2014 01:06:20 GMT (envelope-from alfred@FreeBSD.org) Received: (from alfred@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBR16K5F041111; Sat, 27 Dec 2014 01:06:20 GMT (envelope-from alfred@FreeBSD.org) Message-Id: <201412270106.sBR16K5F041111@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: alfred set sender to alfred@FreeBSD.org using -f From: Alfred Perlstein Date: Sat, 27 Dec 2014 01:06:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276273 - head/contrib/libxo/libxo X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2014 01:06:21 -0000 Author: alfred Date: Sat Dec 27 01:06:19 2014 New Revision: 276273 URL: https://svnweb.freebsd.org/changeset/base/276273 Log: Output strerror from xo_warn Reported by: bapt Reviewed by: bapt, ngie Differential Revision: https://reviews.freebsd.org/D1378 Modified: head/contrib/libxo/libxo/libxo.c Modified: head/contrib/libxo/libxo/libxo.c ============================================================================== --- head/contrib/libxo/libxo/libxo.c Sat Dec 27 00:55:14 2014 (r276272) +++ head/contrib/libxo/libxo/libxo.c Sat Dec 27 01:06:19 2014 (r276273) @@ -956,9 +956,6 @@ xo_warn_hcv (xo_handle_t *xop, int code, } memcpy(newfmt + plen, fmt, len); - /* Add a newline to the fmt string */ - if (!(xop->xo_flags & XOF_WARN_XML)) - newfmt[len++ + plen] = '\n'; newfmt[len + plen] = '\0'; if (xop->xo_flags & XOF_WARN_XML) { @@ -1010,6 +1007,7 @@ xo_warn_hcv (xo_handle_t *xop, int code, } else { vfprintf(stderr, newfmt, vap); + fprintf(stderr, ": %s\n", strerror(code)); } } From owner-svn-src-all@FreeBSD.ORG Sat Dec 27 01:28:53 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 17F9A3E4; Sat, 27 Dec 2014 01:28:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EC9026414F; Sat, 27 Dec 2014 01:28:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBR1Sq2G050988; Sat, 27 Dec 2014 01:28:52 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBR1Sq4J050987; Sat, 27 Dec 2014 01:28:52 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201412270128.sBR1Sq4J050987@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 27 Dec 2014 01:28:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276274 - stable/10/sys/arm/arm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2014 01:28:53 -0000 Author: ian Date: Sat Dec 27 01:28:52 2014 New Revision: 276274 URL: https://svnweb.freebsd.org/changeset/base/276274 Log: MFC r274538, r274545, r274596, r274602, r274603, r274604, r274605, r274839: When doing busdma sync ops for BUSDMA_COHERENT memory, there is no need for cache maintenance operations, but ensure that all prior writes have reached memory when doing a PREWRITE sync. Do not do a cache invalidate on a PREREAD sync that is also a PREWRITE sync. Do the cache invalidate sequence from the outermost to innermost, required for correct operation. Correct the sequence of busdma sync ops involved with PRE/POSTREAD syncs. When doing a PREREAD sync of an mbuf-type dma buffer, do a writeback of the first cacheline if the buffer start address is not on a cacheline boundary. Modified: stable/10/sys/arm/arm/busdma_machdep-v6.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/busdma_machdep-v6.c ============================================================================== --- stable/10/sys/arm/arm/busdma_machdep-v6.c Sat Dec 27 01:06:19 2014 (r276273) +++ stable/10/sys/arm/arm/busdma_machdep-v6.c Sat Dec 27 01:28:52 2014 (r276274) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2012 Ian Lepore + * Copyright (c) 2012-2014 Ian Lepore * Copyright (c) 2010 Mark Tinguely * Copyright (c) 2004 Olivier Houchard * Copyright (c) 2002 Peter Grehan @@ -322,6 +322,7 @@ static __inline int might_bounce(bus_dma_tag_t dmat, bus_dmamap_t map, bus_addr_t addr, bus_size_t size) { + return ((dmat->flags & BUS_DMA_EXCL_BOUNCE) || alignment_bounce(dmat, addr) || cacheline_bounce(map, addr, size)); @@ -420,6 +421,7 @@ busdma_lock_mutex(void *arg, bus_dma_loc static void dflt_lock(void *arg, bus_dma_lock_op_t op) { + panic("driver error: busdma dflt_lock called"); } @@ -600,7 +602,7 @@ out: static int allocate_bz_and_pages(bus_dma_tag_t dmat, bus_dmamap_t mapp) { - struct bounce_zone *bz; + struct bounce_zone *bz; int maxpages; int error; @@ -1227,13 +1229,13 @@ _bus_dmamap_unload(bus_dma_tag_t dmat, b } #ifdef notyetbounceuser - /* If busdma uses user pages, then the interrupt handler could - * be use the kernel vm mapping. Both bounce pages and sync list - * do not cross page boundaries. - * Below is a rough sequence that a person would do to fix the - * user page reference in the kernel vmspace. This would be - * done in the dma post routine. - */ +/* If busdma uses user pages, then the interrupt handler could + * be use the kernel vm mapping. Both bounce pages and sync list + * do not cross page boundaries. + * Below is a rough sequence that a person would do to fix the + * user page reference in the kernel vmspace. This would be + * done in the dma post routine. + */ void _bus_dmamap_fix_user(vm_offset_t buf, bus_size_t len, pmap_t pmap, int op) @@ -1242,10 +1244,10 @@ _bus_dmamap_fix_user(vm_offset_t buf, bu bus_addr_t curaddr; vm_offset_t va; - /* each synclist entry is contained within a single page. - * - * this would be needed if BUS_DMASYNC_POSTxxxx was implemented - */ + /* + * each synclist entry is contained within a single page. + * this would be needed if BUS_DMASYNC_POSTxxxx was implemented + */ curaddr = pmap_extract(pmap, buf); va = pmap_dma_map(curaddr); switch (op) { @@ -1287,17 +1289,20 @@ _bus_dmamap_sync(bus_dma_tag_t dmat, bus /* * If the buffer was from user space, it is possible that this is not * the same vm map, especially on a POST operation. It's not clear that - * dma on userland buffers can work at all right now, certainly not if a - * partial cacheline flush has to be handled. To be safe, until we're - * able to test direct userland dma, panic on a map mismatch. + * dma on userland buffers can work at all right now. To be safe, until + * we're able to test direct userland dma, panic on a map mismatch. */ if ((bpage = STAILQ_FIRST(&map->bpages)) != NULL) { if (!pmap_dmap_iscurrent(map->pmap)) panic("_bus_dmamap_sync: wrong user map for bounce sync."); - /* Handle data bouncing. */ + CTR4(KTR_BUSDMA, "%s: tag %p tag flags 0x%x op 0x%x " "performing bounce", __func__, dmat, dmat->flags, op); + /* + * For PREWRITE do a writeback. Clean the caches from the + * innermost to the outermost levels. + */ if (op & BUS_DMASYNC_PREWRITE) { while (bpage != NULL) { if (bpage->datavaddr != 0) @@ -1309,7 +1314,7 @@ _bus_dmamap_sync(bus_dma_tag_t dmat, bus (void *)bpage->vaddr, bpage->datacount); cpu_dcache_wb_range((vm_offset_t)bpage->vaddr, - bpage->datacount); + bpage->datacount); l2cache_wb_range((vm_offset_t)bpage->vaddr, (vm_offset_t)bpage->busaddr, bpage->datacount); @@ -1318,7 +1323,18 @@ _bus_dmamap_sync(bus_dma_tag_t dmat, bus dmat->bounce_zone->total_bounced++; } - if (op & BUS_DMASYNC_PREREAD) { + /* + * Do an invalidate for PREREAD unless a writeback was already + * done above due to PREWRITE also being set. The reason for a + * PREREAD invalidate is to prevent dirty lines currently in the + * cache from being evicted during the DMA. If a writeback was + * done due to PREWRITE also being set there will be no dirty + * lines and the POSTREAD invalidate handles the rest. The + * invalidate is done from the innermost to outermost level. If + * L2 were done first, a dirty cacheline could be automatically + * evicted from L1 before we invalidated it, re-dirtying the L2. + */ + if ((op & BUS_DMASYNC_PREREAD) && !(op & BUS_DMASYNC_PREWRITE)) { bpage = STAILQ_FIRST(&map->bpages); while (bpage != NULL) { cpu_dcache_inv_range((vm_offset_t)bpage->vaddr, @@ -1329,6 +1345,16 @@ _bus_dmamap_sync(bus_dma_tag_t dmat, bus bpage = STAILQ_NEXT(bpage, links); } } + + /* + * Re-invalidate the caches on a POSTREAD, even though they were + * already invalidated at PREREAD time. Aggressive prefetching + * due to accesses to other data near the dma buffer could have + * brought buffer data into the caches which is now stale. The + * caches are invalidated from the outermost to innermost; the + * prefetches could be happening right now, and if L1 were + * invalidated first, stale L2 data could be prefetched into L1. + */ if (op & BUS_DMASYNC_POSTREAD) { while (bpage != NULL) { vm_offset_t startv; @@ -1345,8 +1371,8 @@ _bus_dmamap_sync(bus_dma_tag_t dmat, bus len = (len - (len & arm_dcache_align_mask)) + arm_dcache_align; - cpu_dcache_inv_range(startv, len); l2cache_inv_range(startv, startp, len); + cpu_dcache_inv_range(startv, len); if (bpage->datavaddr != 0) bcopy((void *)bpage->vaddr, (void *)bpage->datavaddr, @@ -1360,13 +1386,33 @@ _bus_dmamap_sync(bus_dma_tag_t dmat, bus dmat->bounce_zone->total_bounced++; } } - if (map->flags & DMAMAP_COHERENT) + + /* + * For COHERENT memory no cache maintenance is necessary, but ensure all + * writes have reached memory for the PREWRITE case. No action is + * needed for a PREREAD without PREWRITE also set, because that would + * imply that the cpu had written to the COHERENT buffer and expected + * the dma device to see that change, and by definition a PREWRITE sync + * is required to make that happen. + */ + if (map->flags & DMAMAP_COHERENT) { + if (op & BUS_DMASYNC_PREWRITE) { + dsb(); + cpu_l2cache_drain_writebuf(); + } return; + } + /* + * Cache maintenance for normal (non-COHERENT non-bounce) buffers. All + * the comments about the sequences for flushing cache levels in the + * bounce buffer code above apply here as well. In particular, the fact + * that the sequence is inner-to-outer for PREREAD invalidation and + * outer-to-inner for POSTREAD invalidation is not a mistake. + */ if (map->sync_count != 0) { if (!pmap_dmap_iscurrent(map->pmap)) panic("_bus_dmamap_sync: wrong user map for sync."); - /* ARM caches are not self-snooping for dma */ sl = &map->slist[0]; end = &map->slist[map->sync_count]; @@ -1375,16 +1421,34 @@ _bus_dmamap_sync(bus_dma_tag_t dmat, bus switch (op) { case BUS_DMASYNC_PREWRITE: + case BUS_DMASYNC_PREWRITE | BUS_DMASYNC_PREREAD: while (sl != end) { - cpu_dcache_wb_range(sl->vaddr, sl->datacount); - l2cache_wb_range(sl->vaddr, sl->busaddr, - sl->datacount); - sl++; + cpu_dcache_wb_range(sl->vaddr, sl->datacount); + l2cache_wb_range(sl->vaddr, sl->busaddr, + sl->datacount); + sl++; } break; case BUS_DMASYNC_PREREAD: + /* + * An mbuf may start in the middle of a cacheline. There + * will be no cpu writes to the beginning of that line + * (which contains the mbuf header) while dma is in + * progress. Handle that case by doing a writeback of + * just the first cacheline before invalidating the + * overall buffer. Any mbuf in a chain may have this + * misalignment. Buffers which are not mbufs bounce if + * they are not aligned to a cacheline. + */ while (sl != end) { + if (sl->vaddr & arm_dcache_align_mask) { + KASSERT(map->flags & DMAMAP_MBUF, + ("unaligned buffer is not an mbuf")); + cpu_dcache_wb_range(sl->vaddr, 1); + l2cache_wb_range(sl->vaddr, + sl->busaddr, 1); + } cpu_dcache_inv_range(sl->vaddr, sl->datacount); l2cache_inv_range(sl->vaddr, sl->busaddr, sl->datacount); @@ -1392,19 +1456,19 @@ _bus_dmamap_sync(bus_dma_tag_t dmat, bus } break; - case BUS_DMASYNC_PREWRITE | BUS_DMASYNC_PREREAD: - while (sl != end) { - cpu_dcache_wbinv_range(sl->vaddr, sl->datacount); - l2cache_wbinv_range(sl->vaddr, - sl->busaddr, sl->datacount); - sl++; - } + case BUS_DMASYNC_POSTWRITE: break; case BUS_DMASYNC_POSTREAD: - case BUS_DMASYNC_POSTWRITE: case BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE: + while (sl != end) { + l2cache_inv_range(sl->vaddr, sl->busaddr, + sl->datacount); + cpu_dcache_inv_range(sl->vaddr, sl->datacount); + sl++; + } break; + default: panic("unsupported combination of sync operations: 0x%08x\n", op); break; @@ -1427,12 +1491,14 @@ SYSINIT(bpages, SI_SUB_LOCK, SI_ORDER_AN static struct sysctl_ctx_list * busdma_sysctl_tree(struct bounce_zone *bz) { + return (&bz->sysctl_tree); } static struct sysctl_oid * busdma_sysctl_tree_top(struct bounce_zone *bz) { + return (bz->sysctl_tree_top); } From owner-svn-src-all@FreeBSD.ORG Sat Dec 27 01:35:05 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 34CAD6E0; Sat, 27 Dec 2014 01:35:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 756B1642D6; Sat, 27 Dec 2014 01:35:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBR1Z454055298; Sat, 27 Dec 2014 01:35:04 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBR1Z4Rt055293; Sat, 27 Dec 2014 01:35:04 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201412270135.sBR1Z4Rt055293@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 27 Dec 2014 01:35:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276275 - in stable/10/sys: arm/freescale/imx dev/fdt X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2014 01:35:05 -0000 Author: ian Date: Sat Dec 27 01:35:03 2014 New Revision: 276275 URL: https://svnweb.freebsd.org/changeset/base/276275 Log: MFC r274412, r274413, r274414: Bugfixes for imx5/6 pinctrl driver. Modified: stable/10/sys/arm/freescale/imx/imx_iomux.c stable/10/sys/dev/fdt/fdt_pinctrl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/freescale/imx/imx_iomux.c ============================================================================== --- stable/10/sys/arm/freescale/imx/imx_iomux.c Sat Dec 27 01:28:52 2014 (r276274) +++ stable/10/sys/arm/freescale/imx/imx_iomux.c Sat Dec 27 01:35:03 2014 (r276275) @@ -99,6 +99,10 @@ struct pincfg { uint32_t padconf_val; }; +#define PADCONF_NONE (1U << 31) /* Do not configure pad. */ +#define PADCONF_SION (1U << 30) /* Force SION bit in mux register. */ +#define PADMUX_SION (1U << 4) /* The SION bit in the mux register. */ + static inline uint32_t RD4(struct iomux_softc *sc, bus_size_t off) { @@ -120,6 +124,7 @@ iomux_configure_pins(device_t dev, phand struct pincfg *cfgtuples, *cfg; phandle_t cfgnode; int i, ntuples; + uint32_t sion; sc = device_get_softc(dev); cfgnode = OF_node_from_xref(cfgxref); @@ -130,9 +135,22 @@ iomux_configure_pins(device_t dev, phand if (ntuples == 0) return (0); /* Empty property is not an error. */ for (i = 0, cfg = cfgtuples; i < ntuples; i++, cfg++) { - WR4(sc, cfg->mux_reg, cfg->mux_val); - WR4(sc, cfg->input_reg, cfg->input_val); - WR4(sc, cfg->padconf_reg, cfg->padconf_val); + sion = (cfg->padconf_val & PADCONF_SION) ? PADMUX_SION : 0; + WR4(sc, cfg->mux_reg, cfg->mux_val | sion); + if (cfg->input_reg != 0) + WR4(sc, cfg->input_reg, cfg->input_val); + if ((cfg->padconf_val & PADCONF_NONE) == 0) + WR4(sc, cfg->padconf_reg, cfg->padconf_val); + if (bootverbose) { + char name[32]; + OF_getprop(cfgnode, "name", &name, sizeof(name)); + printf("%16s: muxreg 0x%04x muxval 0x%02x " + "inpreg 0x%04x inpval 0x%02x " + "padreg 0x%04x padval 0x%08x\n", + name, cfg->mux_reg, cfg->mux_val | sion, + cfg->input_reg, cfg->input_val, + cfg->padconf_reg, cfg->padconf_val); + } } free(cfgtuples, M_OFWPROP); return (0); Modified: stable/10/sys/dev/fdt/fdt_pinctrl.c ============================================================================== --- stable/10/sys/dev/fdt/fdt_pinctrl.c Sat Dec 27 01:28:52 2014 (r276274) +++ stable/10/sys/dev/fdt/fdt_pinctrl.c Sat Dec 27 01:35:03 2014 (r276275) @@ -124,15 +124,14 @@ pinctrl_configure_children(device_t pinc pinctrl_configure_children(pinctrl, node); nconfigs = OF_getencprop_alloc(node, "pinctrl-0", sizeof(*configs), (void **)&configs); -#ifdef DEBUG - { + if (nconfigs <= 0) + continue; + if (bootverbose) { char name[32]; OF_getprop(node, "name", &name, sizeof(name)); - printf("%d items in pinctrl-0 for %s\n", nconfigs, name); + printf("Processing %d pin-config node(s) in pinctrl-0 for %s\n", + nconfigs, name); } -#endif - if (nconfigs <= 0) - continue; for (i = 0; i < nconfigs; i++) { if (OF_device_from_xref(configs[i]) == pinctrl) FDT_PINCTRL_CONFIGURE(pinctrl, configs[i]); From owner-svn-src-all@FreeBSD.ORG Sat Dec 27 02:17:37 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2CD02B2B; Sat, 27 Dec 2014 02:17:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 192E864907; Sat, 27 Dec 2014 02:17:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBR2HaRx074321; Sat, 27 Dec 2014 02:17:36 GMT (envelope-from jamie@FreeBSD.org) Received: (from jamie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBR2HaZG074320; Sat, 27 Dec 2014 02:17:36 GMT (envelope-from jamie@FreeBSD.org) Message-Id: <201412270217.sBR2HaZG074320@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jamie set sender to jamie@FreeBSD.org using -f From: Jamie Gritton Date: Sat, 27 Dec 2014 02:17:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276277 - stable/10/usr.sbin/jail X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2014 02:17:37 -0000 Author: jamie Date: Sat Dec 27 02:17:35 2014 New Revision: 276277 URL: https://svnweb.freebsd.org/changeset/base/276277 Log: MFC r275906: Setgid before running a command as a specified user. Previously only initgroups(3) was called, what isn't quite enough. This brings jail(8) in line with jexec(8), which was already doing the right thing. PR: 195984 Modified: stable/10/usr.sbin/jail/command.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/jail/command.c ============================================================================== --- stable/10/usr.sbin/jail/command.c Sat Dec 27 02:17:35 2014 (r276276) +++ stable/10/usr.sbin/jail/command.c Sat Dec 27 02:17:35 2014 (r276277) @@ -668,6 +668,11 @@ run_command(struct cfjail *j) if (term != NULL) setenv("TERM", term, 1); } + if (setgid(pwd->pw_gid) < 0) { + jail_warnx(j, "setgid %d: %s", pwd->pw_gid, + strerror(errno)); + exit(1); + } if (setusercontext(lcap, pwd, pwd->pw_uid, username ? LOGIN_SETALL & ~LOGIN_SETGROUP & ~LOGIN_SETLOGIN : LOGIN_SETPATH | LOGIN_SETENV) < 0) { From owner-svn-src-all@FreeBSD.ORG Sat Dec 27 02:17:36 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 42830B29; Sat, 27 Dec 2014 02:17:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2E93664905; Sat, 27 Dec 2014 02:17:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBR2HanO074294; Sat, 27 Dec 2014 02:17:36 GMT (envelope-from jamie@FreeBSD.org) Received: (from jamie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBR2HaR5074293; Sat, 27 Dec 2014 02:17:36 GMT (envelope-from jamie@FreeBSD.org) Message-Id: <201412270217.sBR2HaR5074293@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jamie set sender to jamie@FreeBSD.org using -f From: Jamie Gritton Date: Sat, 27 Dec 2014 02:17:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r276276 - stable/9/usr.sbin/jail X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2014 02:17:36 -0000 Author: jamie Date: Sat Dec 27 02:17:35 2014 New Revision: 276276 URL: https://svnweb.freebsd.org/changeset/base/276276 Log: MFC r275906: Setgid before running a command as a specified user. Previously only initgroups(3) was called, what isn't quite enough. This brings jail(8) in line with jexec(8), which was already doing the right thing. PR: 195984 Modified: stable/9/usr.sbin/jail/command.c Directory Properties: stable/9/usr.sbin/jail/ (props changed) Modified: stable/9/usr.sbin/jail/command.c ============================================================================== --- stable/9/usr.sbin/jail/command.c Sat Dec 27 01:35:03 2014 (r276275) +++ stable/9/usr.sbin/jail/command.c Sat Dec 27 02:17:35 2014 (r276276) @@ -591,6 +591,11 @@ run_command(struct cfjail *j) if (term != NULL) setenv("TERM", term, 1); } + if (setgid(pwd->pw_gid) < 0) { + jail_warnx(j, "setgid %d: %s", pwd->pw_gid, + strerror(errno)); + exit(1); + } if (setusercontext(lcap, pwd, pwd->pw_uid, username ? LOGIN_SETALL & ~LOGIN_SETGROUP & ~LOGIN_SETLOGIN : LOGIN_SETPATH | LOGIN_SETENV) < 0) { From owner-svn-src-all@FreeBSD.ORG Sat Dec 27 02:37:55 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 07F9DF44; Sat, 27 Dec 2014 02:37:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E589466A10; Sat, 27 Dec 2014 02:37:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBR2bs3W083660; Sat, 27 Dec 2014 02:37:54 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBR2br8e083647; Sat, 27 Dec 2014 02:37:53 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201412270237.sBR2br8e083647@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 27 Dec 2014 02:37:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276278 - in stable/10: share/man/man4 sys/arm/freescale/imx sys/arm/ti sys/dev/iicbus sys/dev/ofw X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2014 02:37:55 -0000 Author: ian Date: Sat Dec 27 02:37:52 2014 New Revision: 276278 URL: https://svnweb.freebsd.org/changeset/base/276278 Log: MFC r274641, r274644, r274822, r276049: Allow i2c bus speed to be configured via hints, FDT data, and sysctl. Implement bus speed setting for OMAP4, AM335x, and imx5/6. Fix the i2c bus speed divisors for TI OMAP4 and AM335x to give the advertised 100, 400, and 1000 KHz speeds. PR: 195009 Modified: stable/10/share/man/man4/iicbus.4 stable/10/sys/arm/freescale/imx/imx_i2c.c stable/10/sys/arm/ti/ti_i2c.c stable/10/sys/dev/iicbus/iicbus.c stable/10/sys/dev/iicbus/iicbus.h stable/10/sys/dev/iicbus/iicbus_if.m stable/10/sys/dev/ofw/ofw_iicbus.c Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/iicbus.4 ============================================================================== --- stable/10/share/man/man4/iicbus.4 Sat Dec 27 02:17:35 2014 (r276277) +++ stable/10/share/man/man4/iicbus.4 Sat Dec 27 02:37:52 2014 (r276278) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 24, 2014 +.Dd November 17, 2014 .Dt IICBUS 4 .Os .Sh NAME @@ -103,11 +103,58 @@ Some I2C interfaces are available: .It Sy lpbb Ta "parallel port specific bit-banging interface" .It Sy bktr Ta "Brooktree848 video chipset, hardware and software master-only interface" .El +.Sh BUS FREQUENCY CONFIGURATION +The operating frequency of an I2C bus may be fixed or configurable. +The bus may be used as part of some larger standard interface, and that +interface specification may require a fixed frequency. +The driver for that hardware would not honor an attempt to configure a +different speed. +A general purpose I2C bus, such as those found in many embedded systems, +will often support multiple bus frequencies. +.Pp +When a system supports multiple I2C busses, a different frequency can +be configured for each bus by number, represented by the +.Va %d +in the variable names below. +Busses can be configured using any combination of device hints, +Flattened Device Tree (FDT) data, tunables set via +.Xr loader 8 , +or at runtime using +.Xr sysctl 8 . +When configuration is supplied using more than one method, FDT and +hint data will be overridden by a tunable, which can be overriden by +.Xr sysctl 8 . +.Ss Device Hints +Set +.Va hint.iicbus.%d.frequency +to the frequency in Hz, on systems that use device hints to configure +I2C devices. +The hint is also honored by systems that use FDT data if +no frequency is configured using FDT. +.Ss Flattened Device Tree Data +Configure the I2C bus speed using the FDT standard +.Va clock-frequency +property of the node describing the I2C controller hardware. +.Ss Sysctl and Tunable +Set +.Va dev.iicbus.%d.frequency +in +.Xr loader.conf 5 . +The same variable can be changed at any time with +.Xr sysctl 8 . +Reset the bus using +.Xr i2c 8 +or the +.Xr iic 4 +.Va I2CRSTCARD +ioctl to make the change take effect. .Sh SEE ALSO +.Xr fdt 4 , .Xr iic 4 , .Xr iicbb 4 , .Xr lpbb 4 , -.Xr pcf 4 +.Xr pcf 4 , +.Xr i2c 8 .Sh HISTORY The .Nm Modified: stable/10/sys/arm/freescale/imx/imx_i2c.c ============================================================================== --- stable/10/sys/arm/freescale/imx/imx_i2c.c Sat Dec 27 02:17:35 2014 (r276277) +++ stable/10/sys/arm/freescale/imx/imx_i2c.c Sat Dec 27 02:37:52 2014 (r276278) @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -45,6 +46,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include + #include #include #include "iicbus_if.h" @@ -79,6 +82,32 @@ __FBSDID("$FreeBSD$"); #define I2C_BAUD_RATE_DEF 0x3F #define I2C_DFSSR_DIV 0x10 +/* + * A table of available divisors and the associated coded values to put in the + * FDR register to achieve that divisor.. There is no algorithmic relationship I + * can see between divisors and the codes that go into the register. The table + * begins and ends with entries that handle insane configuration values. + */ +struct clkdiv { + u_int divisor; + u_int regcode; +}; +static struct clkdiv clkdiv_table[] = { + { 0, 0x20 }, { 22, 0x20 }, { 24, 0x21 }, { 26, 0x22 }, + { 28, 0x23 }, { 30, 0x00 }, { 32, 0x24 }, { 36, 0x25 }, + { 40, 0x26 }, { 42, 0x03 }, { 44, 0x27 }, { 48, 0x28 }, + { 52, 0x05 }, { 56, 0x29 }, { 60, 0x06 }, { 64, 0x2a }, + { 72, 0x2b }, { 80, 0x2c }, { 88, 0x09 }, { 96, 0x2d }, + { 104, 0x0a }, { 112, 0x2e }, { 128, 0x2f }, { 144, 0x0c }, + { 160, 0x30 }, { 192, 0x31 }, { 224, 0x32 }, { 240, 0x0f }, + { 256, 0x33 }, { 288, 0x10 }, { 320, 0x34 }, { 384, 0x35 }, + { 448, 0x36 }, { 480, 0x13 }, { 512, 0x37 }, { 576, 0x14 }, + { 640, 0x38 }, { 768, 0x39 }, { 896, 0x3a }, { 960, 0x17 }, + { 1024, 0x3b }, { 1152, 0x18 }, { 1280, 0x3c }, { 1536, 0x3d }, + { 1792, 0x3e }, { 1920, 0x1b }, { 2048, 0x3f }, { 2304, 0x1c }, + { 2560, 0x1d }, { 3072, 0x1e }, { 3840, 0x1f }, {UINT_MAX, 0x1f} +}; + #ifdef DEBUG #define debugf(fmt, args...) do { printf("%s(): ", __func__); \ printf(fmt,##args); } while (0) @@ -390,28 +419,29 @@ static int i2c_reset(device_t dev, u_char speed, u_char addr, u_char *oldadr) { struct i2c_softc *sc; - uint8_t baud_rate; + u_int busfreq, div, i, ipgfreq; sc = device_get_softc(dev); - switch (speed) { - case IIC_FAST: - baud_rate = I2C_BAUD_RATE_FAST; - break; - case IIC_SLOW: - case IIC_UNKNOWN: - case IIC_FASTEST: - default: - baud_rate = I2C_BAUD_RATE_DEF; - break; + /* + * Look up the divisor that gives the nearest speed that doesn't exceed + * the configured value for the bus. + */ + ipgfreq = imx_ccm_ipg_hz(); + busfreq = IICBUS_GET_FREQUENCY(sc->iicbus, speed); + div = (ipgfreq + busfreq - 1) / busfreq; + for (i = 0; i < nitems(clkdiv_table); i++) { + if (clkdiv_table[i].divisor >= div) + break; } + div = clkdiv_table[i].regcode; mtx_lock(&sc->mutex); i2c_write_reg(sc, I2C_CONTROL_REG, 0x0); i2c_write_reg(sc, I2C_STATUS_REG, 0x0); DELAY(1000); - i2c_write_reg(sc, I2C_FDR_REG, 20); + i2c_write_reg(sc, I2C_FDR_REG, (uint8_t)div); i2c_write_reg(sc, I2C_CONTROL_REG, I2CCR_MEN); DELAY(1000); i2c_write_reg(sc, I2C_STATUS_REG, 0x0); Modified: stable/10/sys/arm/ti/ti_i2c.c ============================================================================== --- stable/10/sys/arm/ti/ti_i2c.c Sat Dec 27 02:17:35 2014 (r276277) +++ stable/10/sys/arm/ti/ti_i2c.c Sat Dec 27 02:37:52 2014 (r276278) @@ -102,8 +102,7 @@ struct ti_i2c_softc struct ti_i2c_clock_config { - int speed; - int bitrate; + u_int frequency; /* Bus frequency in Hz */ uint8_t psc; /* Fast/Standard mode prescale divider */ uint8_t scll; /* Fast/Standard mode SCL low time */ uint8_t sclh; /* Fast/Standard mode SCL high time */ @@ -116,27 +115,30 @@ struct ti_i2c_clock_config #endif #if defined(SOC_OMAP4) +/* + * OMAP4 i2c bus clock is 96MHz / ((psc + 1) * (scll + 7 + sclh + 5)). + * The prescaler values for 100KHz and 400KHz modes come from the table in the + * OMAP4 TRM. The table doesn't list 1MHz; these values should give that speed. + */ static struct ti_i2c_clock_config ti_omap4_i2c_clock_configs[] = { - { IIC_UNKNOWN, 100000, 23, 13, 15, 0, 0}, - { IIC_SLOW, 100000, 23, 13, 15, 0, 0}, - { IIC_FAST, 400000, 9, 5, 7, 0, 0}, - { IIC_FASTEST, 1000000, 5, 3, 4, 0, 0}, - /* { IIC_FASTEST, 3200000, 1, 113, 115, 7, 10}, - HS mode */ - { -1, 0 } + { 100000, 23, 13, 15, 0, 0}, + { 400000, 9, 5, 7, 0, 0}, + { 1000000, 3, 5, 7, 0, 0}, +/* { 3200000, 1, 113, 115, 7, 10}, - HS mode */ + { 0 /* Table terminator */ } }; #endif #if defined(SOC_TI_AM335X) /* - * AM335X doesn't support HS mode. For 100kHz I2C clock set the internal - * clock to 12Mhz, for 400kHz I2C clock set the internal clock to 24Mhz. + * AM335x i2c bus clock is 48MHZ / ((psc + 1) * (scll + 7 + sclh + 5)) + * In all cases we prescale the clock to 24MHz as recommended in the manual. */ static struct ti_i2c_clock_config ti_am335x_i2c_clock_configs[] = { - { IIC_UNKNOWN, 100000, 7, 59, 61, 0, 0}, - { IIC_SLOW, 100000, 7, 59, 61, 0, 0}, - { IIC_FAST, 400000, 3, 23, 25, 0, 0}, - { IIC_FASTEST, 400000, 3, 23, 25, 0, 0}, - { -1, 0 } + { 100000, 1, 111, 117, 0, 0}, + { 400000, 1, 23, 25, 0, 0}, + { 1000000, 1, 5, 7, 0, 0}, + { 0 /* Table terminator */ } }; #endif @@ -512,6 +514,7 @@ ti_i2c_reset(struct ti_i2c_softc *sc, u_ { int timeout; struct ti_i2c_clock_config *clkcfg; + u_int busfreq; uint16_t fifo_trsh, reg, scll, sclh; switch (ti_chip()) { @@ -528,13 +531,24 @@ ti_i2c_reset(struct ti_i2c_softc *sc, u_ default: panic("Unknown Ti SoC, unable to reset the i2c"); } - while (clkcfg->speed != -1) { - if (clkcfg->speed == speed) + + /* + * If we haven't attached the bus yet, just init at the default slow + * speed. This lets us get the hardware initialized enough to attach + * the bus which is where the real speed configuration is handled. After + * the bus is attached, get the configured speed from it. Search the + * configuration table for the best speed we can do that doesn't exceed + * the requested speed. + */ + if (sc->sc_iicbus == NULL) + busfreq = 100000; + else + busfreq = IICBUS_GET_FREQUENCY(sc->sc_iicbus, speed); + for (;;) { + if (clkcfg[1].frequency == 0 || clkcfg[1].frequency > busfreq) break; clkcfg++; } - if (clkcfg->speed == -1) - return (EINVAL); /* * 23.1.4.3 - HS I2C Software Reset Modified: stable/10/sys/dev/iicbus/iicbus.c ============================================================================== --- stable/10/sys/dev/iicbus/iicbus.c Sat Dec 27 02:17:35 2014 (r276277) +++ stable/10/sys/dev/iicbus/iicbus.c Sat Dec 27 02:37:52 2014 (r276278) @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -96,6 +97,7 @@ iicbus_attach(device_t dev) sc->dev = dev; mtx_init(&sc->lock, "iicbus", NULL, MTX_DEF); + iicbus_init_frequency(dev, 0); iicbus_reset(dev, IIC_FASTEST, 0, NULL); if (resource_int_value(device_get_name(dev), device_get_unit(dev), "strict", &strict) == 0) @@ -243,6 +245,51 @@ iicbus_null_repeated_start(device_t dev, return (IIC_ENOTSUPP); } +void +iicbus_init_frequency(device_t dev, u_int bus_freq) +{ + struct iicbus_softc *sc = IICBUS_SOFTC(dev); + + /* + * If a bus frequency value was passed in, use it. Otherwise initialize + * it first to the standard i2c 100KHz frequency, then override that + * from a hint if one exists. + */ + if (bus_freq > 0) + sc->bus_freq = bus_freq; + else { + sc->bus_freq = 100000; + resource_int_value(device_get_name(dev), device_get_unit(dev), + "frequency", (int *)&sc->bus_freq); + } + /* + * Set up the sysctl that allows the bus frequency to be changed. + * It is flagged as a tunable so that the user can set the value in + * loader(8), and that will override any other setting from any source. + * The sysctl tunable/value is the one most directly controlled by the + * user and thus the one that always takes precedence. + */ + SYSCTL_ADD_UINT(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, "frequency", CTLFLAG_RW | CTLFLAG_TUN, &sc->bus_freq, + sc->bus_freq, "Bus frequency in Hz"); +} + +static u_int +iicbus_get_frequency(device_t dev, u_char speed) +{ + struct iicbus_softc *sc = IICBUS_SOFTC(dev); + + /* + * If the frequency has not been configured for the bus, or the request + * is specifically for SLOW speed, use the standard 100KHz rate, else + * use the configured bus speed. + */ + if (sc->bus_freq == 0 || speed == IIC_SLOW) + return (100000); + return (sc->bus_freq); +} + static device_method_t iicbus_methods[] = { /* device interface */ DEVMETHOD(device_probe, iicbus_probe), @@ -260,6 +307,7 @@ static device_method_t iicbus_methods[] /* iicbus interface */ DEVMETHOD(iicbus_transfer, iicbus_transfer), + DEVMETHOD(iicbus_get_frequency, iicbus_get_frequency), DEVMETHOD_END }; Modified: stable/10/sys/dev/iicbus/iicbus.h ============================================================================== --- stable/10/sys/dev/iicbus/iicbus.h Sat Dec 27 02:17:35 2014 (r276277) +++ stable/10/sys/dev/iicbus/iicbus.h Sat Dec 27 02:37:52 2014 (r276278) @@ -44,6 +44,7 @@ struct iicbus_softc u_char strict; /* deny operations that violate the * I2C protocol */ struct mtx lock; + u_int bus_freq; /* Configured bus Hz. */ }; struct iicbus_ivar @@ -67,7 +68,8 @@ IICBUS_ACCESSOR(nostop, NOSTOP, bool) #define IICBUS_UNLOCK(sc) mtx_unlock(&(sc)->lock) #define IICBUS_ASSERT_LOCKED(sc) mtx_assert(&(sc)->lock, MA_OWNED) -extern int iicbus_generic_intr(device_t dev, int event, char *buf); +int iicbus_generic_intr(device_t dev, int event, char *buf); +void iicbus_init_frequency(device_t dev, u_int bus_freq); extern driver_t iicbus_driver; extern devclass_t iicbus_devclass; Modified: stable/10/sys/dev/iicbus/iicbus_if.m ============================================================================== --- stable/10/sys/dev/iicbus/iicbus_if.m Sat Dec 27 02:17:35 2014 (r276277) +++ stable/10/sys/dev/iicbus/iicbus_if.m Sat Dec 27 02:37:52 2014 (r276278) @@ -31,6 +31,15 @@ INTERFACE iicbus; +CODE { + static u_int + iicbus_default_frequency(device_t bus, u_char speed) + { + + return (100000); + } +}; + # # Interpret interrupt # @@ -115,3 +124,14 @@ METHOD int transfer { struct iic_msg *msgs; uint32_t nmsgs; }; + +# +# Return the frequency in Hz for the bus running at the given +# symbolic speed. Only the IIC_SLOW speed has meaning, it is always +# 100KHz. The UNKNOWN, FAST, and FASTEST rates all map to the +# configured bus frequency, or 100KHz when not otherwise configured. +# +METHOD u_int get_frequency { + device_t dev; + u_char speed; +} DEFAULT iicbus_default_frequency; Modified: stable/10/sys/dev/ofw/ofw_iicbus.c ============================================================================== --- stable/10/sys/dev/ofw/ofw_iicbus.c Sat Dec 27 02:17:35 2014 (r276277) +++ stable/10/sys/dev/ofw/ofw_iicbus.c Sat Dec 27 02:37:52 2014 (r276278) @@ -101,12 +101,24 @@ ofw_iicbus_attach(device_t dev) { struct iicbus_softc *sc = IICBUS_SOFTC(dev); struct ofw_iicbus_devinfo *dinfo; - phandle_t child; - pcell_t paddr; + phandle_t child, node; + pcell_t freq, paddr; device_t childdev; sc->dev = dev; mtx_init(&sc->lock, "iicbus", NULL, MTX_DEF); + + /* + * If there is a clock-frequency property for the device node, use it as + * the starting value for the bus frequency. Then call the common + * routine that handles the tunable/sysctl which allows the FDT value to + * be overridden by the user. + */ + node = ofw_bus_get_node(dev); + freq = 0; + OF_getencprop(node, "clock-frequency", &freq, sizeof(freq)); + iicbus_init_frequency(dev, freq); + iicbus_reset(dev, IIC_FASTEST, 0, NULL); bus_generic_probe(dev); @@ -115,8 +127,7 @@ ofw_iicbus_attach(device_t dev) /* * Attach those children represented in the device tree. */ - for (child = OF_child(ofw_bus_get_node(dev)); child != 0; - child = OF_peer(child)) { + for (child = OF_child(node); child != 0; child = OF_peer(child)) { /* * Try to get the I2C address first from the i2c-address * property, then try the reg property. It moves around From owner-svn-src-all@FreeBSD.ORG Sat Dec 27 03:19:05 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8B985705; Sat, 27 Dec 2014 03:19:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5D8A96616B; Sat, 27 Dec 2014 03:19:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBR3J5N0003359; Sat, 27 Dec 2014 03:19:05 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBR3J4on003357; Sat, 27 Dec 2014 03:19:04 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201412270319.sBR3J4on003357@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 27 Dec 2014 03:19:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276280 - stable/10/usr.sbin/config X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2014 03:19:05 -0000 Author: ian Date: Sat Dec 27 03:19:04 2014 New Revision: 276280 URL: https://svnweb.freebsd.org/changeset/base/276280 Log: MFC r274924, r274936: Consider the negation operator (!) to be a word even if it is not followed by whitespace. This allows "optional !foo" which is what most programmers are naturally going to tend to do as opposed to "optional ! foo". Fix the negation (!) operator so that it binds only to the word that immediately follows it. Modified: stable/10/usr.sbin/config/main.c stable/10/usr.sbin/config/mkmakefile.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/config/main.c ============================================================================== --- stable/10/usr.sbin/config/main.c Sat Dec 27 03:01:19 2014 (r276279) +++ stable/10/usr.sbin/config/main.c Sat Dec 27 03:19:04 2014 (r276280) @@ -314,6 +314,11 @@ begin: } cp = line; *cp++ = ch; + /* Negation operator is a word by itself. */ + if (ch == '!') { + *cp = 0; + return (line); + } while ((ch = getc(fp)) != EOF) { if (isspace(ch)) break; Modified: stable/10/usr.sbin/config/mkmakefile.c ============================================================================== --- stable/10/usr.sbin/config/mkmakefile.c Sat Dec 27 03:01:19 2014 (r276279) +++ stable/10/usr.sbin/config/mkmakefile.c Sat Dec 27 03:19:04 2014 (r276280) @@ -386,13 +386,9 @@ next: if (nreqs == 0) errout("%s: syntax error describing %s\n", fname, this); - if (not) - compile += !match; - else - compile += match; + compile += match; match = 1; nreqs = 0; - not = 0; continue; } if (eq(wd, "no-obj")) { @@ -474,19 +470,23 @@ next: this, wd); STAILQ_FOREACH(dp, &dtab, d_next) if (eq(dp->d_name, wd)) { - dp->d_done |= DEVDONE; + if (not) + match = 0; + else + dp->d_done |= DEVDONE; goto nextparam; } SLIST_FOREACH(op, &opt, op_next) - if (op->op_value == 0 && opteq(op->op_name, wd)) + if (op->op_value == 0 && opteq(op->op_name, wd)) { + if (not) + match = 0; goto nextparam; - match = 0; + } + match &= not; nextparam:; + not = 0; } - if (not) - compile += !match; - else - compile += match; + compile += match; if (compile && tp == NULL) { if (std == 0 && nreqs == 0) errout("%s: what is %s optional on?\n", From owner-svn-src-all@FreeBSD.ORG Sat Dec 27 03:20:35 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8B462835; Sat, 27 Dec 2014 03:20:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 778DD6620C; Sat, 27 Dec 2014 03:20:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBR3KZeF004102; Sat, 27 Dec 2014 03:20:35 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBR3KZTL004101; Sat, 27 Dec 2014 03:20:35 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201412270320.sBR3KZTL004101@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 27 Dec 2014 03:20:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276281 - stable/10 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2014 03:20:35 -0000 Author: ian Date: Sat Dec 27 03:20:34 2014 New Revision: 276281 URL: https://svnweb.freebsd.org/changeset/base/276281 Log: MFC r265840: Eliminate spurious warnings when grep doesn't find NO_UNIVERSE Modified: stable/10/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/Makefile ============================================================================== --- stable/10/Makefile Sat Dec 27 03:19:04 2014 (r276280) +++ stable/10/Makefile Sat Dec 27 03:20:34 2014 (r276281) @@ -476,7 +476,7 @@ TARGET!= uname -m .if defined(MAKE_ALL_KERNELS) _THINNER=cat .else -_THINNER=xargs grep -L "^.NO_UNIVERSE" +_THINNER=xargs grep -L "^.NO_UNIVERSE" || true .endif KERNCONFS!= cd ${KERNSRCDIR}/${TARGET}/conf && \ find [A-Z0-9]*[A-Z0-9] -type f -maxdepth 0 \ From owner-svn-src-all@FreeBSD.ORG Sat Dec 27 04:21:26 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6D998DFD; Sat, 27 Dec 2014 04:21:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5916B29D9; Sat, 27 Dec 2014 04:21:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBR4LQQF032737; Sat, 27 Dec 2014 04:21:26 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBR4LP7c032735; Sat, 27 Dec 2014 04:21:25 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201412270421.sBR4LP7c032735@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sat, 27 Dec 2014 04:21:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276282 - head/sys/dev/vt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2014 04:21:26 -0000 Author: emaste Date: Sat Dec 27 04:21:24 2014 New Revision: 276282 URL: https://svnweb.freebsd.org/changeset/base/276282 Log: Support ALT_BREAK_TO_DEBUGGER in vt(4) Submitted by: Andre Albsmeier on -hackers Modified: head/sys/dev/vt/vt.h head/sys/dev/vt/vt_core.c Modified: head/sys/dev/vt/vt.h ============================================================================== --- head/sys/dev/vt/vt.h Sat Dec 27 03:20:34 2014 (r276281) +++ head/sys/dev/vt/vt.h Sat Dec 27 04:21:24 2014 (r276282) @@ -155,6 +155,7 @@ struct vt_device { int vd_keyboard; /* (G) Keyboard index. */ unsigned int vd_kbstate; /* (?) Device unit. */ unsigned int vd_unit; /* (c) Device unit. */ + int vd_altbrk; /* (?) Alt break seq. state */ }; #define VD_PASTEBUF(vd) ((vd)->vd_pastebuf.vpb_buf) Modified: head/sys/dev/vt/vt_core.c ============================================================================== --- head/sys/dev/vt/vt_core.c Sat Dec 27 03:20:34 2014 (r276281) +++ head/sys/dev/vt/vt_core.c Sat Dec 27 04:21:24 2014 (r276282) @@ -825,7 +825,9 @@ vt_processkey(keyboard_t *kbd, struct vt terminal_input_char(vw->vw_terminal, 0x1b); } #endif - +#if defined(KDB) + kdb_alt_break(c, &vd->vd_altbrk); +#endif terminal_input_char(vw->vw_terminal, KEYCHAR(c)); } else terminal_input_raw(vw->vw_terminal, c); From owner-svn-src-all@FreeBSD.ORG Sat Dec 27 04:30:44 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 12157FB0; Sat, 27 Dec 2014 04:30:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D813C2A75; Sat, 27 Dec 2014 04:30:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBR4Uhmj036164; Sat, 27 Dec 2014 04:30:43 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBR4Uhnk036162; Sat, 27 Dec 2014 04:30:43 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201412270430.sBR4Uhnk036162@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 27 Dec 2014 04:30:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276283 - stable/10/sys/conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2014 04:30:44 -0000 Author: ian Date: Sat Dec 27 04:30:42 2014 New Revision: 276283 URL: https://svnweb.freebsd.org/changeset/base/276283 Log: MFC r274937: Add ARMV6 as an arm option. This will cause obscure magic in config(8) to automatically set the armv6 option when MACHINE_ARCH is armv6. That allows replacing ever-growing lists of cpu names as options to compile a given file with the using either "optional armv6" or "optional !armv6". Modified: stable/10/sys/conf/files.arm stable/10/sys/conf/options.arm Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/conf/files.arm ============================================================================== --- stable/10/sys/conf/files.arm Sat Dec 27 04:21:24 2014 (r276282) +++ stable/10/sys/conf/files.arm Sat Dec 27 04:30:42 2014 (r276283) @@ -5,8 +5,8 @@ arm/arm/bcopyinout.S standard arm/arm/blockio.S standard arm/arm/bootconfig.c standard arm/arm/bus_space_asm_generic.S standard -arm/arm/busdma_machdep.c optional cpu_arm9 | cpu_arm9e | cpu_fa526 | cpu_xscale_80219 | cpu_xscale_80321 | cpu_xscale_81342 | cpu_xscale_ixp425 | cpu_xscale_ixp435 | cpu_xscale_pxa2x0 -arm/arm/busdma_machdep-v6.c optional cpu_arm1136 | cpu_arm1176 | cpu_cortexa | cpu_mv_pj4b | cpu_krait +arm/arm/busdma_machdep.c optional !armv6 +arm/arm/busdma_machdep-v6.c optional armv6 arm/arm/copystr.S standard arm/arm/cpufunc.c standard arm/arm/cpufunc_asm.S standard @@ -36,8 +36,8 @@ arm/arm/nexus.c standard arm/arm/physmem.c standard arm/arm/pl190.c optional pl190 arm/arm/pl310.c optional pl310 -arm/arm/pmap.c optional cpu_arm9 | cpu_arm9e | cpu_fa526 | cpu_xscale_80219 | cpu_xscale_80321 | cpu_xscale_81342 | cpu_xscale_ixp425 | cpu_xscale_ixp435 | cpu_xscale_pxa2x0 -arm/arm/pmap-v6.c optional cpu_arm1136 | cpu_arm1176 | cpu_cortexa | cpu_mv_pj4b | cpu_krait +arm/arm/pmap.c optional !armv6 +arm/arm/pmap-v6.c optional armv6 arm/arm/sc_machdep.c optional sc arm/arm/setcpsr.S standard arm/arm/setstack.s standard Modified: stable/10/sys/conf/options.arm ============================================================================== --- stable/10/sys/conf/options.arm Sat Dec 27 04:21:24 2014 (r276282) +++ stable/10/sys/conf/options.arm Sat Dec 27 04:30:42 2014 (r276283) @@ -1,5 +1,6 @@ #$FreeBSD$ ARM9_CACHE_WRITE_THROUGH opt_global.h +ARMV6 opt_global.h ARM_CACHE_LOCK_ENABLE opt_global.h ARM_KERN_DIRECTMAP opt_vm.h ARM_L2_PIPT opt_global.h From owner-svn-src-all@FreeBSD.ORG Sat Dec 27 04:33:36 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D33AE17A; Sat, 27 Dec 2014 04:33:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BFB932B6F; Sat, 27 Dec 2014 04:33:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBR4XaIl039997; Sat, 27 Dec 2014 04:33:36 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBR4XafP039996; Sat, 27 Dec 2014 04:33:36 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201412270433.sBR4XafP039996@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 27 Dec 2014 04:33:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276284 - stable/10/sys/arm/include X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2014 04:33:36 -0000 Author: ian Date: Sat Dec 27 04:33:35 2014 New Revision: 276284 URL: https://svnweb.freebsd.org/changeset/base/276284 Log: MFC r274941: The arm PJ4B cpu is armv7 architecture, not v6. Modified: stable/10/sys/arm/include/cpuconf.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/include/cpuconf.h ============================================================================== --- stable/10/sys/arm/include/cpuconf.h Sat Dec 27 04:30:42 2014 (r276283) +++ stable/10/sys/arm/include/cpuconf.h Sat Dec 27 04:33:35 2014 (r276284) @@ -85,14 +85,14 @@ #endif #if !defined(ARM_ARCH_6) -#if defined(CPU_ARM1136) || defined(CPU_ARM1176) || defined(CPU_MV_PJ4B) +#if defined(CPU_ARM1136) || defined(CPU_ARM1176) #define ARM_ARCH_6 1 #else #define ARM_ARCH_6 0 #endif #endif -#if defined(CPU_CORTEXA) || defined(CPU_KRAIT) +#if defined(CPU_CORTEXA) || defined(CPU_KRAIT) || defined(CPU_MV_PJ4B) #define ARM_ARCH_7A 1 #else #define ARM_ARCH_7A 0 From owner-svn-src-all@FreeBSD.ORG Sat Dec 27 04:35:19 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5E3062C1; Sat, 27 Dec 2014 04:35:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3148B2B8E; Sat, 27 Dec 2014 04:35:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBR4ZJQK040270; Sat, 27 Dec 2014 04:35:19 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBR4ZJvA040269; Sat, 27 Dec 2014 04:35:19 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201412270435.sBR4ZJvA040269@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 27 Dec 2014 04:35:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276285 - stable/10/sys/dev/ffec X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2014 04:35:19 -0000 Author: ian Date: Sat Dec 27 04:35:18 2014 New Revision: 276285 URL: https://svnweb.freebsd.org/changeset/base/276285 Log: MFC r274967: Add busdma sync ops before reading and after modifying the descriptor rings Modified: stable/10/sys/dev/ffec/if_ffec.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/ffec/if_ffec.c ============================================================================== --- stable/10/sys/dev/ffec/if_ffec.c Sat Dec 27 04:33:35 2014 (r276284) +++ stable/10/sys/dev/ffec/if_ffec.c Sat Dec 27 04:35:18 2014 (r276285) @@ -653,7 +653,9 @@ ffec_txstart_locked(struct ffec_softc *s } if (enqueued != 0) { + bus_dmamap_sync(sc->txdesc_tag, sc->txdesc_map, BUS_DMASYNC_PREWRITE); WR4(sc, FEC_TDAR_REG, FEC_TDAR_TDAR); + bus_dmamap_sync(sc->txdesc_tag, sc->txdesc_map, BUS_DMASYNC_POSTWRITE); sc->tx_watchdog_count = WATCHDOG_TIMEOUT_SECS; } } @@ -678,6 +680,9 @@ ffec_txfinish_locked(struct ffec_softc * FFEC_ASSERT_LOCKED(sc); + /* XXX Can't set PRE|POST right now, but we need both. */ + bus_dmamap_sync(sc->txdesc_tag, sc->txdesc_map, BUS_DMASYNC_PREREAD); + bus_dmamap_sync(sc->txdesc_tag, sc->txdesc_map, BUS_DMASYNC_POSTREAD); ifp = sc->ifp; retired_buffer = false; while (sc->tx_idx_tail != sc->tx_idx_head) { @@ -842,6 +847,9 @@ ffec_rxfinish_locked(struct ffec_softc * FFEC_ASSERT_LOCKED(sc); + /* XXX Can't set PRE|POST right now, but we need both. */ + bus_dmamap_sync(sc->rxdesc_tag, sc->rxdesc_map, BUS_DMASYNC_PREREAD); + bus_dmamap_sync(sc->rxdesc_tag, sc->rxdesc_map, BUS_DMASYNC_POSTREAD); produced_empty_buffer = false; for (;;) { desc = &sc->rxdesc_ring[sc->rx_idx]; @@ -889,7 +897,9 @@ ffec_rxfinish_locked(struct ffec_softc * } if (produced_empty_buffer) { + bus_dmamap_sync(sc->rxdesc_tag, sc->txdesc_map, BUS_DMASYNC_PREWRITE); WR4(sc, FEC_RDAR_REG, FEC_RDAR_RDAR); + bus_dmamap_sync(sc->rxdesc_tag, sc->txdesc_map, BUS_DMASYNC_POSTWRITE); } } From owner-svn-src-all@FreeBSD.ORG Sat Dec 27 04:51:22 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CBC734B1; Sat, 27 Dec 2014 04:51:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B7D1B2D92; Sat, 27 Dec 2014 04:51:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBR4pMIB048293; Sat, 27 Dec 2014 04:51:22 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBR4pMUI048292; Sat, 27 Dec 2014 04:51:22 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201412270451.sBR4pMUI048292@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 27 Dec 2014 04:51:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276286 - stable/10/sys/arm/broadcom/bcm2835 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2014 04:51:22 -0000 Author: ian Date: Sat Dec 27 04:51:21 2014 New Revision: 276286 URL: https://svnweb.freebsd.org/changeset/base/276286 Log: MFC r275660: Fix the watchdog timeout calculation to prevent wrap. Modified: stable/10/sys/arm/broadcom/bcm2835/bcm2835_wdog.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/broadcom/bcm2835/bcm2835_wdog.c ============================================================================== --- stable/10/sys/arm/broadcom/bcm2835/bcm2835_wdog.c Sat Dec 27 04:35:18 2014 (r276285) +++ stable/10/sys/arm/broadcom/bcm2835/bcm2835_wdog.c Sat Dec 27 04:51:21 2014 (r276286) @@ -142,14 +142,13 @@ bcmwd_watchdog_fn(void *private, u_int c if (cmd > 0) { sec = ((uint64_t)1 << (cmd & WD_INTERVAL)) / 1000000000; - ticks = (sec << 16) & BCM2835_WDOG_TIME_MASK; - if (ticks == 0) { + if (sec == 0 || sec > 15) { /* * Can't arm * disable watchdog as watchdog(9) requires */ device_printf(sc->dev, - "Can't arm, timeout is less than 1 second\n"); + "Can't arm, timeout must be between 1-15 seconds\n"); WRITE(sc, BCM2835_RSTC_REG, (BCM2835_PASWORD << BCM2835_PASSWORD_SHIFT) | BCM2835_RSTC_RESET); @@ -157,6 +156,7 @@ bcmwd_watchdog_fn(void *private, u_int c return; } + ticks = (sec << 16) & BCM2835_WDOG_TIME_MASK; reg = (BCM2835_PASWORD << BCM2835_PASSWORD_SHIFT) | ticks; WRITE(sc, BCM2835_WDOG_REG, reg); From owner-svn-src-all@FreeBSD.ORG Sat Dec 27 04:54:38 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 807185FC; Sat, 27 Dec 2014 04:54:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 62E462DD9; Sat, 27 Dec 2014 04:54:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBR4scTi049304; Sat, 27 Dec 2014 04:54:38 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBR4sbaE049301; Sat, 27 Dec 2014 04:54:37 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201412270454.sBR4sbaE049301@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 27 Dec 2014 04:54:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276287 - in stable/10/sys: arm/ti dev/sdhci X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2014 04:54:38 -0000 Author: ian Date: Sat Dec 27 04:54:36 2014 New Revision: 276287 URL: https://svnweb.freebsd.org/changeset/base/276287 Log: MFC r275944, r275946, r275949, r275950: Add code to set and reset open-drain mode on the bus when requested. When command and data interrupts have been aggregated together, don't do the data-completed processing if a command-error interrupt is also asserted. Add a new sdhci quirk, SDHCI_QUIRK_WAITFOR_RESET_ASSERTED, to work around TI OMAP controllers which will return the reset-in-progress bit as zero if you read the status register too fast after setting the reset bit. Modified: stable/10/sys/arm/ti/ti_sdhci.c stable/10/sys/dev/sdhci/sdhci.c stable/10/sys/dev/sdhci/sdhci.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/ti/ti_sdhci.c ============================================================================== --- stable/10/sys/arm/ti/ti_sdhci.c Sat Dec 27 04:51:21 2014 (r276286) +++ stable/10/sys/arm/ti/ti_sdhci.c Sat Dec 27 04:54:36 2014 (r276287) @@ -112,6 +112,7 @@ static struct ofw_compat_data compat_dat #define MMCHS_CON 0x02C #define MMCHS_CON_DW8 (1 << 5) #define MMCHS_CON_DVAL_8_4MS (3 << 9) +#define MMCHS_CON_OD (1 << 0) #define MMCHS_SYSCTL 0x12C #define MMCHS_SYSCTL_CLKD_MASK 0x3FF #define MMCHS_SYSCTL_CLKD_SHIFT 6 @@ -327,7 +328,7 @@ ti_sdhci_update_ios(device_t brdev, devi struct ti_sdhci_softc *sc = device_get_softc(brdev); struct sdhci_slot *slot; struct mmc_ios *ios; - uint32_t val32; + uint32_t val32, newval32; slot = device_get_ivars(reqdev); ios = &slot->host.ios; @@ -339,10 +340,20 @@ ti_sdhci_update_ios(device_t brdev, devi * requested, then let the standard driver handle everything else. */ val32 = ti_mmchs_read_4(sc, MMCHS_CON); + newval32 = val32; + if (ios->bus_width == bus_width_8) - ti_mmchs_write_4(sc, MMCHS_CON, val32 | MMCHS_CON_DW8); + newval32 |= MMCHS_CON_DW8; else - ti_mmchs_write_4(sc, MMCHS_CON, val32 & ~MMCHS_CON_DW8); + newval32 &= ~MMCHS_CON_DW8; + + if (ios->bus_mode == opendrain) + newval32 |= MMCHS_CON_OD; + else /* if (ios->bus_mode == pushpull) */ + newval32 &= ~MMCHS_CON_OD; + + if (newval32 != val32) + ti_mmchs_write_4(sc, MMCHS_CON, newval32); return (sdhci_generic_update_ios(brdev, reqdev)); } @@ -392,20 +403,42 @@ ti_sdhci_hw_init(device_t dev) /* Issue a softreset to the controller */ ti_mmchs_write_4(sc, MMCHS_SYSCONFIG, MMCHS_SYSCONFIG_RESET); timeout = 1000; - while (!(ti_mmchs_read_4(sc, MMCHS_SYSSTATUS) & MMCHS_SYSSTATUS_RESETDONE)) { + while (!(ti_mmchs_read_4(sc, MMCHS_SYSSTATUS) & + MMCHS_SYSSTATUS_RESETDONE)) { if (--timeout == 0) { - device_printf(dev, "Error: Controller reset operation timed out\n"); + device_printf(dev, + "Error: Controller reset operation timed out\n"); break; } DELAY(100); } - /* Reset both the command and data state machines */ + /* + * Reset the command and data state machines and also other aspects of + * the controller such as bus clock and power. + * + * If we read the software reset register too fast after writing it we + * can get back a zero that means the reset hasn't started yet rather + * than that the reset is complete. Per TI recommendations, work around + * it by reading until we see the reset bit asserted, then read until + * it's clear. We also set the SDHCI_QUIRK_WAITFOR_RESET_ASSERTED quirk + * so that the main sdhci driver uses this same logic in its resets. + */ ti_sdhci_write_1(dev, NULL, SDHCI_SOFTWARE_RESET, SDHCI_RESET_ALL); - timeout = 1000; - while ((ti_sdhci_read_1(dev, NULL, SDHCI_SOFTWARE_RESET) & SDHCI_RESET_ALL)) { + timeout = 10000; + while ((ti_sdhci_read_1(dev, NULL, SDHCI_SOFTWARE_RESET) & + SDHCI_RESET_ALL) != SDHCI_RESET_ALL) { if (--timeout == 0) { - device_printf(dev, "Error: Software reset operation timed out\n"); + break; + } + DELAY(1); + } + timeout = 10000; + while ((ti_sdhci_read_1(dev, NULL, SDHCI_SOFTWARE_RESET) & + SDHCI_RESET_ALL)) { + if (--timeout == 0) { + device_printf(dev, + "Error: Software reset operation timed out\n"); break; } DELAY(100); @@ -562,6 +595,12 @@ ti_sdhci_attach(device_t dev) sc->slot.quirks |= SDHCI_QUIRK_DONT_SHIFT_RESPONSE; /* + * Reset bits are broken, have to wait to see the bits asserted + * before waiting to see them de-asserted. + */ + sc->slot.quirks |= SDHCI_QUIRK_WAITFOR_RESET_ASSERTED; + + /* * DMA is not really broken, I just haven't implemented it yet. */ sc->slot.quirks |= SDHCI_QUIRK_BROKEN_DMA; Modified: stable/10/sys/dev/sdhci/sdhci.c ============================================================================== --- stable/10/sys/dev/sdhci/sdhci.c Sat Dec 27 04:51:21 2014 (r276286) +++ stable/10/sys/dev/sdhci/sdhci.c Sat Dec 27 04:54:36 2014 (r276287) @@ -150,7 +150,6 @@ static void sdhci_reset(struct sdhci_slot *slot, uint8_t mask) { int timeout; - uint8_t res; if (slot->quirks & SDHCI_QUIRK_NO_CARD_NO_RESET) { if (!(RD4(slot, SDHCI_PRESENT_STATE) & @@ -169,26 +168,43 @@ sdhci_reset(struct sdhci_slot *slot, uin sdhci_set_clock(slot, clock); } - WR1(slot, SDHCI_SOFTWARE_RESET, mask); - if (mask & SDHCI_RESET_ALL) { slot->clock = 0; slot->power = 0; } + WR1(slot, SDHCI_SOFTWARE_RESET, mask); + + if (slot->quirks & SDHCI_QUIRK_WAITFOR_RESET_ASSERTED) { + /* + * Resets on TI OMAPs and AM335x are incompatible with SDHCI + * specification. The reset bit has internal propagation delay, + * so a fast read after write returns 0 even if reset process is + * in progress. The workaround is to poll for 1 before polling + * for 0. In the worst case, if we miss seeing it asserted the + * time we spent waiting is enough to ensure the reset finishes. + */ + timeout = 10000; + while ((RD1(slot, SDHCI_SOFTWARE_RESET) & mask) != mask) { + if (timeout <= 0) + break; + timeout--; + DELAY(1); + } + } + /* Wait max 100 ms */ - timeout = 100; + timeout = 10000; /* Controller clears the bits when it's done */ - while ((res = RD1(slot, SDHCI_SOFTWARE_RESET)) & mask) { - if (timeout == 0) { - slot_printf(slot, - "Reset 0x%x never completed - 0x%x.\n", - (int)mask, (int)res); + while (RD1(slot, SDHCI_SOFTWARE_RESET) & mask) { + if (timeout <= 0) { + slot_printf(slot, "Reset 0x%x never completed.\n", + mask); sdhci_dumpregs(slot); return; } timeout--; - DELAY(1000); + DELAY(10); } } @@ -714,9 +730,13 @@ sdhci_timeout(void *arg) struct sdhci_slot *slot = arg; if (slot->curcmd != NULL) { + slot_printf(slot, " Controller timeout\n"); + sdhci_dumpregs(slot); sdhci_reset(slot, SDHCI_RESET_CMD|SDHCI_RESET_DATA); slot->curcmd->error = MMC_ERR_TIMEOUT; sdhci_req_done(slot); + } else { + slot_printf(slot, " Spurious timeout - no active command\n"); } } @@ -1275,7 +1295,9 @@ sdhci_generic_intr(struct sdhci_slot *sl /* Handle data interrupts. */ if (intmask & SDHCI_INT_DATA_MASK) { WR4(slot, SDHCI_INT_STATUS, intmask & SDHCI_INT_DATA_MASK); - sdhci_data_irq(slot, intmask & SDHCI_INT_DATA_MASK); + /* Dont call data_irq in case of errored command */ + if ((intmask & SDHCI_INT_CMD_ERROR_MASK) == 0) + sdhci_data_irq(slot, intmask & SDHCI_INT_DATA_MASK); } /* Handle AutoCMD12 error interrupt. */ if (intmask & SDHCI_INT_ACMD12ERR) { Modified: stable/10/sys/dev/sdhci/sdhci.h ============================================================================== --- stable/10/sys/dev/sdhci/sdhci.h Sat Dec 27 04:51:21 2014 (r276286) +++ stable/10/sys/dev/sdhci/sdhci.h Sat Dec 27 04:54:36 2014 (r276287) @@ -59,6 +59,8 @@ #define SDHCI_QUIRK_MISSING_CAPS (1<<12) /* Hardware shifts the 136-bit response, don't do it in software. */ #define SDHCI_QUIRK_DONT_SHIFT_RESPONSE (1<<13) +/* Wait to see reset bit asserted before waiting for de-asserted */ +#define SDHCI_QUIRK_WAITFOR_RESET_ASSERTED (1<<14) /* * Controller registers @@ -182,8 +184,11 @@ #define SDHCI_INT_NORMAL_MASK 0x00007FFF #define SDHCI_INT_ERROR_MASK 0xFFFF8000 -#define SDHCI_INT_CMD_MASK (SDHCI_INT_RESPONSE | SDHCI_INT_TIMEOUT | \ +#define SDHCI_INT_CMD_ERROR_MASK (SDHCI_INT_TIMEOUT | \ SDHCI_INT_CRC | SDHCI_INT_END_BIT | SDHCI_INT_INDEX) + +#define SDHCI_INT_CMD_MASK (SDHCI_INT_RESPONSE | SDHCI_INT_CMD_ERROR_MASK) + #define SDHCI_INT_DATA_MASK (SDHCI_INT_DATA_END | SDHCI_INT_DMA_END | \ SDHCI_INT_DATA_AVAIL | SDHCI_INT_SPACE_AVAIL | \ SDHCI_INT_DATA_TIMEOUT | SDHCI_INT_DATA_CRC | \ From owner-svn-src-all@FreeBSD.ORG Sat Dec 27 04:55:47 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DB08D730; Sat, 27 Dec 2014 04:55:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C6D272DEB; Sat, 27 Dec 2014 04:55:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBR4tkbp049521; Sat, 27 Dec 2014 04:55:46 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBR4tkrC049519; Sat, 27 Dec 2014 04:55:46 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201412270455.sBR4tkrC049519@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 27 Dec 2014 04:55:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276288 - stable/10/sys/dev/mmc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2014 04:55:47 -0000 Author: ian Date: Sat Dec 27 04:55:45 2014 New Revision: 276288 URL: https://svnweb.freebsd.org/changeset/base/276288 Log: MFC r275951: Log mmc and sd command failures. Modified: stable/10/sys/dev/mmc/mmc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/mmc/mmc.c ============================================================================== --- stable/10/sys/dev/mmc/mmc.c Sat Dec 27 04:54:36 2014 (r276287) +++ stable/10/sys/dev/mmc/mmc.c Sat Dec 27 04:55:45 2014 (r276288) @@ -63,6 +63,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -76,8 +77,13 @@ struct mmc_softc { struct intr_config_hook config_intrhook; device_t owner; uint32_t last_rca; + int squelched; /* suppress reporting of (expected) errors */ + int log_count; + struct timeval log_time; }; +#define LOG_PPS 5 /* Log no more than 5 errors per second. */ + /* * Per-card data */ @@ -426,6 +432,13 @@ mmc_wait_for_cmd(struct mmc_softc *sc, s err = cmd->error; } while (err != MMC_ERR_NONE && retries-- > 0); + if (err != MMC_ERR_NONE && sc->squelched == 0) { + if (ppsratecheck(&sc->log_time, &sc->log_count, LOG_PPS)) { + device_printf(sc->dev, "CMD%d failed, RESULT: %d\n", + cmd->opcode, err); + } + } + return (err); } @@ -436,6 +449,8 @@ mmc_wait_for_app_cmd(struct mmc_softc *s struct mmc_command appcmd; int err; + /* Squelch error reporting at lower levels, we report below. */ + sc->squelched++; do { memset(&appcmd, 0, sizeof(appcmd)); appcmd.opcode = MMC_APP_CMD; @@ -455,6 +470,14 @@ mmc_wait_for_app_cmd(struct mmc_softc *s err = cmd->error; } } while (err != MMC_ERR_NONE && retries-- > 0); + sc->squelched--; + + if (err != MMC_ERR_NONE && sc->squelched == 0) { + if (ppsratecheck(&sc->log_time, &sc->log_count, LOG_PPS)) { + device_printf(sc->dev, "ACMD%d failed, RESULT: %d\n", + cmd->opcode, err); + } + } return (err); } @@ -760,6 +783,7 @@ mmc_test_bus_width(struct mmc_softc *sc) mmcbr_set_bus_width(sc->dev, bus_width_8); mmcbr_update_ios(sc->dev); + sc->squelched++; /* Errors are expected, squelch reporting. */ memset(&cmd, 0, sizeof(cmd)); memset(&data, 0, sizeof(data)); cmd.opcode = MMC_BUSTEST_W; @@ -783,6 +807,7 @@ mmc_test_bus_width(struct mmc_softc *sc) data.len = 8; data.flags = MMC_DATA_READ; err = mmc_wait_for_cmd(sc, &cmd, 0); + sc->squelched--; mmcbr_set_bus_width(sc->dev, bus_width_1); mmcbr_update_ios(sc->dev); @@ -795,6 +820,7 @@ mmc_test_bus_width(struct mmc_softc *sc) mmcbr_set_bus_width(sc->dev, bus_width_4); mmcbr_update_ios(sc->dev); + sc->squelched++; /* Errors are expected, squelch reporting. */ memset(&cmd, 0, sizeof(cmd)); memset(&data, 0, sizeof(data)); cmd.opcode = MMC_BUSTEST_W; @@ -818,6 +844,7 @@ mmc_test_bus_width(struct mmc_softc *sc) data.len = 4; data.flags = MMC_DATA_READ; err = mmc_wait_for_cmd(sc, &cmd, 0); + sc->squelched--; mmcbr_set_bus_width(sc->dev, bus_width_1); mmcbr_update_ios(sc->dev); @@ -1270,7 +1297,9 @@ mmc_discover_cards(struct mmc_softc *sc) if (bootverbose || mmc_debug) device_printf(sc->dev, "Probing cards\n"); while (1) { + sc->squelched++; /* Errors are expected, squelch reporting. */ err = mmc_all_send_cid(sc, raw_cid); + sc->squelched--; if (err == MMC_ERR_TIMEOUT) break; if (err != MMC_ERR_NONE) { @@ -1536,6 +1565,7 @@ mmc_go_discovery(struct mmc_softc *sc) /* * First, try SD modes */ + sc->squelched++; /* Errors are expected, squelch reporting. */ mmcbr_set_mode(dev, mode_sd); mmc_power_up(sc); mmcbr_set_bus_mode(dev, pushpull); @@ -1561,6 +1591,7 @@ mmc_go_discovery(struct mmc_softc *sc) "MMC probe: OK (OCR: 0x%08x)\n", ocr); } else if (bootverbose || mmc_debug) device_printf(sc->dev, "SD probe: OK (OCR: 0x%08x)\n", ocr); + sc->squelched--; mmcbr_set_ocr(dev, mmc_select_vdd(sc, ocr)); if (mmcbr_get_ocr(dev) != 0) From owner-svn-src-all@FreeBSD.ORG Sat Dec 27 05:10:08 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AA7859F3; Sat, 27 Dec 2014 05:10:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 969742F44; Sat, 27 Dec 2014 05:10:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBR5A8vW054746; Sat, 27 Dec 2014 05:10:08 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBR5A8RS054745; Sat, 27 Dec 2014 05:10:08 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201412270510.sBR5A8RS054745@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 27 Dec 2014 05:10:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276289 - stable/10/sys/boot/uboot/common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2014 05:10:08 -0000 Author: ian Date: Sat Dec 27 05:10:07 2014 New Revision: 276289 URL: https://svnweb.freebsd.org/changeset/base/276289 Log: r276026: Allow whitspace to appear between device name and unit number in loaderdev. Modified: stable/10/sys/boot/uboot/common/main.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/boot/uboot/common/main.c ============================================================================== --- stable/10/sys/boot/uboot/common/main.c Sat Dec 27 04:55:45 2014 (r276288) +++ stable/10/sys/boot/uboot/common/main.c Sat Dec 27 05:10:07 2014 (r276289) @@ -212,10 +212,11 @@ get_load_device(int *type, int *unit, in p = get_device_type(devstr, type); - /* - * Empty device string, or unknown device name, or a bare, known - * device name. - */ + /* Ignore optional spaces after the device name. */ + while (*p == ' ') + p++; + + /* Unknown device name, or a known name without unit number. */ if ((*type == -1) || (*p == '\0')) { return; } From owner-svn-src-all@FreeBSD.ORG Sat Dec 27 05:11:35 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 94D84B20; Sat, 27 Dec 2014 05:11:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 814CE2FEE; Sat, 27 Dec 2014 05:11:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBR5BZWO057907; Sat, 27 Dec 2014 05:11:35 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBR5BZ3F057906; Sat, 27 Dec 2014 05:11:35 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201412270511.sBR5BZ3F057906@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 27 Dec 2014 05:11:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276290 - stable/10/sys/arm/ti X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2014 05:11:35 -0000 Author: ian Date: Sat Dec 27 05:11:34 2014 New Revision: 276290 URL: https://svnweb.freebsd.org/changeset/base/276290 Log: MFC r276029: Remove a volatile qualifier on return type that is ignored and results in a -Wreturn-type warning when compiled with gcc. Modified: stable/10/sys/arm/ti/ti_wdt.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/ti/ti_wdt.c ============================================================================== --- stable/10/sys/arm/ti/ti_wdt.c Sat Dec 27 05:10:07 2014 (r276289) +++ stable/10/sys/arm/ti/ti_wdt.c Sat Dec 27 05:11:34 2014 (r276290) @@ -95,7 +95,7 @@ static devclass_t ti_wdt_devclass; DRIVER_MODULE(ti_wdt, simplebus, ti_wdt_driver, ti_wdt_devclass, 0, 0); -static volatile __inline uint32_t +static __inline uint32_t ti_wdt_reg_read(struct ti_wdt_softc *sc, uint32_t reg) { From owner-svn-src-all@FreeBSD.ORG Sat Dec 27 05:24:19 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 99C61D35; Sat, 27 Dec 2014 05:24:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8569966233; Sat, 27 Dec 2014 05:24:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBR5OJ0H063239; Sat, 27 Dec 2014 05:24:19 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBR5OJiK063238; Sat, 27 Dec 2014 05:24:19 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201412270524.sBR5OJiK063238@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 27 Dec 2014 05:24:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276291 - stable/10/contrib/gcc/config/arm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2014 05:24:19 -0000 Author: ian Date: Sat Dec 27 05:24:18 2014 New Revision: 276291 URL: https://svnweb.freebsd.org/changeset/base/276291 Log: MFC r276045: Allow -march=armv7a on the gcc command line, for compatibility with clang. Modified: stable/10/contrib/gcc/config/arm/arm.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/gcc/config/arm/arm.c ============================================================================== --- stable/10/contrib/gcc/config/arm/arm.c Sat Dec 27 05:11:34 2014 (r276290) +++ stable/10/contrib/gcc/config/arm/arm.c Sat Dec 27 05:24:18 2014 (r276291) @@ -604,6 +604,8 @@ static const struct processors all_archi {"armv6k", mpcore, "6K", FL_CO_PROC | FL_FOR_ARCH6K, NULL}, {"armv6z", arm1176jzs, "6Z", FL_CO_PROC | FL_FOR_ARCH6Z, NULL}, {"armv6zk", arm1176jzs, "6ZK", FL_CO_PROC | FL_FOR_ARCH6ZK, NULL}, + /* Clang compatibility... define __ARM_ARCH_7A__, but codegen is still 6ZK. */ + {"armv7a", arm1176jzs, "7A", FL_CO_PROC | FL_FOR_ARCH6ZK, NULL}, {"ep9312", ep9312, "4T", FL_LDSCHED | FL_CIRRUS | FL_FOR_ARCH4, NULL}, {"iwmmxt", iwmmxt, "5TE", FL_LDSCHED | FL_STRONG | FL_FOR_ARCH5TE | FL_XSCALE | FL_IWMMXT , NULL}, {NULL, arm_none, NULL, 0 , NULL} From owner-svn-src-all@FreeBSD.ORG Sat Dec 27 07:07:41 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 31A9D3EB; Sat, 27 Dec 2014 07:07:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 122FD64CBE; Sat, 27 Dec 2014 07:07:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBR77eZX009275; Sat, 27 Dec 2014 07:07:40 GMT (envelope-from joel@FreeBSD.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBR77cDX009264; Sat, 27 Dec 2014 07:07:38 GMT (envelope-from joel@FreeBSD.org) Message-Id: <201412270707.sBR77cDX009264@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: joel set sender to joel@FreeBSD.org using -f From: Joel Dahl Date: Sat, 27 Dec 2014 07:07:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276292 - in head: share/man/man4/man4.i386 share/man/man4/man4.powerpc sys/boot/forth sys/teken/libteken tools/tools/ether_reflect tools/tools/vimage X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2014 07:07:41 -0000 Author: joel (doc committer) Date: Sat Dec 27 07:07:37 2014 New Revision: 276292 URL: https://svnweb.freebsd.org/changeset/base/276292 Log: mdoc: improvements to SEE ALSO. Modified: head/share/man/man4/man4.i386/glxsb.4 head/share/man/man4/man4.powerpc/snd_ai2s.4 head/share/man/man4/man4.powerpc/snd_davbus.4 head/sys/boot/forth/brand.4th.8 head/sys/boot/forth/delay.4th.8 head/sys/boot/forth/menu.4th.8 head/sys/boot/forth/menusets.4th.8 head/sys/boot/forth/version.4th.8 head/sys/teken/libteken/teken.3 head/tools/tools/ether_reflect/ether_reflect.1 head/tools/tools/vimage/vimage.8 Modified: head/share/man/man4/man4.i386/glxsb.4 ============================================================================== --- head/share/man/man4/man4.i386/glxsb.4 Sat Dec 27 05:24:18 2014 (r276291) +++ head/share/man/man4/man4.i386/glxsb.4 Sat Dec 27 07:07:37 2014 (r276292) @@ -70,8 +70,8 @@ device driver with AES keys of length != .Sh SEE ALSO .Xr crypto 4 , .Xr intro 4 , -.Xr pci 4 , .Xr ipsec 4 , +.Xr pci 4 , .Xr random 4 , .Xr crypto 9 .Sh HISTORY Modified: head/share/man/man4/man4.powerpc/snd_ai2s.4 ============================================================================== --- head/share/man/man4/man4.powerpc/snd_ai2s.4 Sat Dec 27 05:24:18 2014 (r276291) +++ head/share/man/man4/man4.powerpc/snd_ai2s.4 Sat Dec 27 07:07:37 2014 (r276292) @@ -65,8 +65,8 @@ Apple Tumbler Audio Apple Snapper Audio .El .Sh SEE ALSO -.Xr sound 4 , -.Xr snd_davbus 4 +.Xr snd_davbus 4 , +.Xr sound 4 .Sh HISTORY The .Nm Modified: head/share/man/man4/man4.powerpc/snd_davbus.4 ============================================================================== --- head/share/man/man4/man4.powerpc/snd_davbus.4 Sat Dec 27 05:24:18 2014 (r276291) +++ head/share/man/man4/man4.powerpc/snd_davbus.4 Sat Dec 27 07:07:37 2014 (r276292) @@ -63,8 +63,8 @@ Apple Burgundy Audio Apple Screamer Audio .El .Sh SEE ALSO -.Xr sound 4 , -.Xr snd_ai2s 4 +.Xr snd_ai2s 4 , +.Xr sound 4 .Sh HISTORY The .Nm Modified: head/sys/boot/forth/brand.4th.8 ============================================================================== --- head/sys/boot/forth/brand.4th.8 Sat Dec 27 05:24:18 2014 (r276291) +++ head/sys/boot/forth/brand.4th.8 Sat Dec 27 07:07:37 2014 (r276292) @@ -111,7 +111,7 @@ loader_brand="fbsd" .Ed .Sh SEE ALSO .Xr loader.conf 5 , -.Xr loader 8 , +.Xr loader 8 .Sh HISTORY The .Nm Modified: head/sys/boot/forth/delay.4th.8 ============================================================================== --- head/sys/boot/forth/delay.4th.8 Sat Dec 27 05:24:18 2014 (r276291) +++ head/sys/boot/forth/delay.4th.8 Sat Dec 27 07:07:37 2014 (r276292) @@ -110,8 +110,8 @@ delay_execute .Ed .Sh SEE ALSO .Xr loader.conf 5 , -.Xr loader 8 , .Xr beastie.4th 8 , +.Xr loader 8 , .Xr loader.4th 8 .Sh HISTORY The Modified: head/sys/boot/forth/menu.4th.8 ============================================================================== --- head/sys/boot/forth/menu.4th.8 Sat Dec 27 05:24:18 2014 (r276291) +++ head/sys/boot/forth/menu.4th.8 Sat Dec 27 07:07:37 2014 (r276292) @@ -336,9 +336,9 @@ menu-display .Ed .Sh SEE ALSO .Xr loader.conf 5 , +.Xr beastie.4th 8 , .Xr loader 8 , -.Xr loader.4th 8 , -.Xr beastie.4th 8 +.Xr loader.4th 8 .Sh HISTORY The .Nm Modified: head/sys/boot/forth/menusets.4th.8 ============================================================================== --- head/sys/boot/forth/menusets.4th.8 Sat Dec 27 05:24:18 2014 (r276291) +++ head/sys/boot/forth/menusets.4th.8 Sat Dec 27 07:07:37 2014 (r276292) @@ -355,10 +355,10 @@ set submenu_command[1]="1 goto_menu" .Ed .Sh SEE ALSO .Xr loader.conf 5 , +.Xr beastie.4th 8 , .Xr loader 8 , .Xr loader.4th 8 , -.Xr menu.4th 8 , -.Xr beastie.4th 8 +.Xr menu.4th 8 .Sh HISTORY The .Nm Modified: head/sys/boot/forth/version.4th.8 ============================================================================== --- head/sys/boot/forth/version.4th.8 Sat Dec 27 05:24:18 2014 (r276291) +++ head/sys/boot/forth/version.4th.8 Sat Dec 27 07:07:37 2014 (r276292) @@ -113,8 +113,8 @@ loader_version="loader 1.1" .Ed .Sh SEE ALSO .Xr loader.conf 5 , -.Xr loader 8 , -.Xr color.4th 8 +.Xr color.4th 8 , +.Xr loader 8 .Sh HISTORY The .Nm Modified: head/sys/teken/libteken/teken.3 ============================================================================== --- head/sys/teken/libteken/teken.3 Sat Dec 27 05:24:18 2014 (r276291) +++ head/sys/teken/libteken/teken.3 Sat Dec 27 07:07:37 2014 (r276292) @@ -188,7 +188,7 @@ prior to 9.0. .Sh SEE ALSO .Xr ncurses 3 , .Xr termcap 3 , -.Xr syscons 4 . +.Xr syscons 4 .Sh HISTORY The .Nm Modified: head/tools/tools/ether_reflect/ether_reflect.1 ============================================================================== --- head/tools/tools/ether_reflect/ether_reflect.1 Sat Dec 27 05:24:18 2014 (r276291) +++ head/tools/tools/ether_reflect/ether_reflect.1 Sat Dec 27 07:07:37 2014 (r276292) @@ -91,10 +91,10 @@ are seen on ineterface em0. The timeout Rewrite the destination address in each packet to 00:00:00:aa:bb:cc before reflecting the packet. .Sh SEE ALSO -.Xr ifconfig 8 , .Xr tcpdump 1 , +.Xr bpf 2 , .Xr pcap 4 , -.Xr bpf 2 . +.Xr ifconfig 8 .Sh HISTORY The .Nm Modified: head/tools/tools/vimage/vimage.8 ============================================================================== --- head/tools/tools/vimage/vimage.8 Sat Dec 27 05:24:18 2014 (r276291) +++ head/tools/tools/vimage/vimage.8 Sat Dec 27 07:07:37 2014 (r276292) @@ -178,8 +178,8 @@ The .Nm command exits 0 on success, and >0 if an error occurs. .Sh SEE ALSO -.Xr jail 8 -.Xr jexec 8 +.Xr jail 8 , +.Xr jexec 8 , .Xr jls 8 .Sh HISTORY Network stack virtualization framework first appeared as a patchset From owner-svn-src-all@FreeBSD.ORG Sat Dec 27 08:23:02 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C1AB4931; Sat, 27 Dec 2014 08:23:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A27096667F; Sat, 27 Dec 2014 08:23:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBR8N202045643; Sat, 27 Dec 2014 08:23:02 GMT (envelope-from joel@FreeBSD.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBR8MxSC045614; Sat, 27 Dec 2014 08:22:59 GMT (envelope-from joel@FreeBSD.org) Message-Id: <201412270822.sBR8MxSC045614@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: joel set sender to joel@FreeBSD.org using -f From: Joel Dahl Date: Sat, 27 Dec 2014 08:22:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276293 - in head: lib/libdpv lib/msun/man sbin/dhclient sbin/ifconfig sbin/iscontrol sbin/mount sbin/mount_fusefs sbin/newfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2014 08:23:03 -0000 Author: joel (doc committer) Date: Sat Dec 27 08:22:58 2014 New Revision: 276293 URL: https://svnweb.freebsd.org/changeset/base/276293 Log: mdoc: improvements to SEE ALSO. Modified: head/lib/libdpv/dpv.3 head/lib/msun/man/cexp.3 head/lib/msun/man/complex.3 head/lib/msun/man/sin.3 head/sbin/dhclient/dhclient.conf.5 head/sbin/dhclient/dhclient.leases.5 head/sbin/ifconfig/ifconfig.8 head/sbin/iscontrol/iscontrol.8 head/sbin/mount/mount.8 head/sbin/mount_fusefs/mount_fusefs.8 head/sbin/newfs/newfs.8 Modified: head/lib/libdpv/dpv.3 ============================================================================== --- head/lib/libdpv/dpv.3 Sat Dec 27 07:07:37 2014 (r276292) +++ head/lib/libdpv/dpv.3 Sat Dec 27 08:22:58 2014 (r276293) @@ -435,8 +435,8 @@ or desired values. .El .Sh SEE ALSO .Xr dialog 1 , -.Xr dialog 3 , -.Xr Xdialog 1 +.Xr Xdialog 1 , +.Xr dialog 3 .Sh HISTORY The .Nm Modified: head/lib/msun/man/cexp.3 ============================================================================== --- head/lib/msun/man/cexp.3 Sat Dec 27 07:07:37 2014 (r276292) +++ head/lib/msun/man/cexp.3 Sat Dec 27 08:22:58 2014 (r276293) @@ -103,7 +103,7 @@ is not finite, the sign of the result is .Sh SEE ALSO .Xr complex 3 , .Xr exp 3 , -.Xr math 3 , +.Xr math 3 .Sh STANDARDS The .Fn cexp Modified: head/lib/msun/man/complex.3 ============================================================================== --- head/lib/msun/man/complex.3 Sat Dec 27 07:07:37 2014 (r276292) +++ head/lib/msun/man/complex.3 Sat Dec 27 08:22:58 2014 (r276293) @@ -103,9 +103,9 @@ ctan tangent ctanh hyperbolic tangent .El .Sh SEE ALSO -.Xr math 3 , .Xr fenv 3 , .Xr ieee 3 , +.Xr math 3 , .Xr tgmath 3 .Rs .%T "ISO/IEC 9899:TC3" Modified: head/lib/msun/man/sin.3 ============================================================================== --- head/lib/msun/man/sin.3 Sat Dec 27 07:07:37 2014 (r276292) +++ head/lib/msun/man/sin.3 Sat Dec 27 08:22:58 2014 (r276293) @@ -70,9 +70,9 @@ functions return the sine value. .Xr asin 3 , .Xr atan 3 , .Xr atan2 3 , -.Xr csin 3 , .Xr cos 3 , .Xr cosh 3 , +.Xr csin 3 , .Xr math 3 , .Xr sinh 3 , .Xr tan 3 , Modified: head/sbin/dhclient/dhclient.conf.5 ============================================================================== --- head/sbin/dhclient/dhclient.conf.5 Sat Dec 27 07:07:37 2014 (r276292) +++ head/sbin/dhclient/dhclient.conf.5 Sat Dec 27 08:22:58 2014 (r276293) @@ -524,8 +524,8 @@ In many cases, it is sufficient to just file - the defaults are usually fine. .Sh SEE ALSO .Xr dhclient.leases 5 , -.Xr dhcpd.conf 5 , .Xr dhcp-options 5 , +.Xr dhcpd.conf 5 , .Xr dhclient 8 , .Xr dhcpd 8 .Rs Modified: head/sbin/dhclient/dhclient.leases.5 ============================================================================== --- head/sbin/dhclient/dhclient.leases.5 Sat Dec 27 07:07:37 2014 (r276292) +++ head/sbin/dhclient/dhclient.leases.5 Sat Dec 27 08:22:58 2014 (r276293) @@ -75,8 +75,8 @@ Current lease file. .El .Sh SEE ALSO .Xr dhclient.conf 5 , -.Xr dhcpd.conf 5 , .Xr dhcp-options 5 , +.Xr dhcpd.conf 5 , .Xr dhclient 8 , .Xr dhcpd 8 .Rs Modified: head/sbin/ifconfig/ifconfig.8 ============================================================================== --- head/sbin/ifconfig/ifconfig.8 Sat Dec 27 07:07:37 2014 (r276292) +++ head/sbin/ifconfig/ifconfig.8 Sat Dec 27 08:22:58 2014 (r276293) @@ -2819,9 +2819,9 @@ tried to alter an interface's configurat .Xr devd.conf 5 , .\" .Xr eon 5 , .Xr devd 8 , +.Xr jail 8 , .Xr rc 8 , .Xr routed 8 , -.Xr jail 8 , .Xr sysctl 8 .Sh HISTORY The Modified: head/sbin/iscontrol/iscontrol.8 ============================================================================== --- head/sbin/iscontrol/iscontrol.8 Sat Dec 27 07:07:37 2014 (r276292) +++ head/sbin/iscontrol/iscontrol.8 Sat Dec 27 08:22:58 2014 (r276293) @@ -121,8 +121,8 @@ whatever options are specified, and star .Xr iscsi_initiator 4 , .Xr sa 4 , .Xr iscsi.conf 5 , -.Xr iscsictl 8 , -.Xr camcontrol 8 +.Xr camcontrol 8 , +.Xr iscsictl 8 .Sh STANDARDS RFC 3720 .\"Sh HISTORY Modified: head/sbin/mount/mount.8 ============================================================================== --- head/sbin/mount/mount.8 Sat Dec 27 07:07:37 2014 (r276292) +++ head/sbin/mount/mount.8 Sat Dec 27 08:22:58 2014 (r276293) @@ -548,6 +548,7 @@ support for a particular file system mig .Xr ext2fs 5 , .Xr fstab 5 , .Xr procfs 5 , +.Xr tmpfs 5 , .Xr automount 8 , .Xr fstyp 8 , .Xr kldload 8 , @@ -558,7 +559,6 @@ support for a particular file system mig .Xr mount_smbfs 8 , .Xr mount_udf 8 , .Xr mount_unionfs 8 , -.Xr tmpfs 5 , .Xr umount 8 , .Xr zfs 8 , .Xr zpool 8 Modified: head/sbin/mount_fusefs/mount_fusefs.8 ============================================================================== --- head/sbin/mount_fusefs/mount_fusefs.8 Sat Dec 27 07:07:37 2014 (r276292) +++ head/sbin/mount_fusefs/mount_fusefs.8 Sat Dec 27 08:22:58 2014 (r276293) @@ -326,8 +326,8 @@ does not call any external utility and a .Sh SEE ALSO .Xr fstat 1 , .Xr mount 8 , -.Xr umount 8 , -.Xr sudo 8 +.Xr sudo 8 , +.Xr umount 8 .Sh HISTORY .Nm appears as the part of the FreeBSD implementation of the Fuse userspace filesystem Modified: head/sbin/newfs/newfs.8 ============================================================================== --- head/sbin/newfs/newfs.8 Sat Dec 27 07:07:37 2014 (r276292) +++ head/sbin/newfs/newfs.8 Sat Dec 27 08:22:58 2014 (r276293) @@ -310,10 +310,10 @@ on file systems that contain many small .Xr fsck 8 , .Xr gjournal 8 , .Xr growfs 8 , +.Xr gvinum 8 , .Xr makefs 8 , .Xr mount 8 , -.Xr tunefs 8 , -.Xr gvinum 8 +.Xr tunefs 8 .Rs .%A M. McKusick .%A W. Joy From owner-svn-src-all@FreeBSD.ORG Sat Dec 27 08:31:55 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DAD13BCB; Sat, 27 Dec 2014 08:31:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BBA9366788; Sat, 27 Dec 2014 08:31:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBR8VtDP050167; Sat, 27 Dec 2014 08:31:55 GMT (envelope-from joel@FreeBSD.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBR8VrO3050157; Sat, 27 Dec 2014 08:31:53 GMT (envelope-from joel@FreeBSD.org) Message-Id: <201412270831.sBR8VrO3050157@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: joel set sender to joel@FreeBSD.org using -f From: Joel Dahl Date: Sat, 27 Dec 2014 08:31:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276294 - in head: cddl/usr.bin/ctfconvert lib/libc/iconv lib/libc/locale lib/libc/rpc lib/libpam/modules/pam_guest lib/librtld_db lib/libusb lib/libutil X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2014 08:31:56 -0000 Author: joel (doc committer) Date: Sat Dec 27 08:31:52 2014 New Revision: 276294 URL: https://svnweb.freebsd.org/changeset/base/276294 Log: mdoc: improvements to SEE ALSO. Modified: head/cddl/usr.bin/ctfconvert/ctfconvert.1 head/lib/libc/iconv/iconvlist.3 head/lib/libc/locale/digittoint.3 head/lib/libc/locale/xlocale.3 head/lib/libc/rpc/rpc.3 head/lib/libc/rpc/rpc_svc_reg.3 head/lib/libpam/modules/pam_guest/pam_guest.8 head/lib/librtld_db/librtld_db.3 head/lib/libusb/libusb20.3 head/lib/libutil/quotafile.3 Modified: head/cddl/usr.bin/ctfconvert/ctfconvert.1 ============================================================================== --- head/cddl/usr.bin/ctfconvert/ctfconvert.1 Sat Dec 27 08:22:58 2014 (r276293) +++ head/cddl/usr.bin/ctfconvert/ctfconvert.1 Sat Dec 27 08:31:52 2014 (r276294) @@ -74,8 +74,8 @@ Write the output to file in .Sh EXIT STATUS .Ex -std .Sh SEE ALSO -.Xr ctfmerge 1 , -.Xr ctfdump 1 +.Xr ctfdump 1 , +.Xr ctfmerge 1 .Sh HISTORY The .Nm Modified: head/lib/libc/iconv/iconvlist.3 ============================================================================== --- head/lib/libc/iconv/iconvlist.3 Sat Dec 27 08:22:58 2014 (r276293) +++ head/lib/libc/iconv/iconvlist.3 Sat Dec 27 08:31:52 2014 (r276294) @@ -78,9 +78,9 @@ If an error occurs, will be NULL when calling .Fn do_one . .Sh SEE ALSO -.Xr iconv 3 , +.Xr __iconv_free_list 3 , .Xr __iconv_get_list 3 , -.Xr __iconv_free_list 3 +.Xr iconv 3 .Sh STANDARDS The .Nm Modified: head/lib/libc/locale/digittoint.3 ============================================================================== --- head/lib/libc/locale/digittoint.3 Sat Dec 27 08:22:58 2014 (r276293) +++ head/lib/libc/locale/digittoint.3 Sat Dec 27 08:31:52 2014 (r276294) @@ -64,5 +64,5 @@ the function will return 0. .Sh SEE ALSO .Xr ctype 3 , .Xr isdigit 3 , -.Xr isxdigit 3, +.Xr isxdigit 3 , .Xr xlocale 3 Modified: head/lib/libc/locale/xlocale.3 ============================================================================== --- head/lib/libc/locale/xlocale.3 Sat Dec 27 08:22:58 2014 (r276293) +++ head/lib/libc/locale/xlocale.3 Sat Dec 27 08:31:52 2014 (r276294) @@ -71,7 +71,7 @@ function. .Xr localeconv 3 , .Xr newlocale 3 , .Xr querylocale 3 , -.Xr uselocale 3 , +.Xr uselocale 3 .Sh CONVENIENCE FUNCTIONS The xlocale API includes a number of .Fa _l Modified: head/lib/libc/rpc/rpc.3 ============================================================================== --- head/lib/libc/rpc/rpc.3 Sat Dec 27 08:22:58 2014 (r276293) +++ head/lib/libc/rpc/rpc.3 Sat Dec 27 08:31:52 2014 (r276294) @@ -504,7 +504,6 @@ pages on which they are described: .Sh SEE ALSO .Xr getnetconfig 3 , .Xr getnetpath 3 , -.Xr rpcbind 3 , .Xr rpc_clnt_auth 3 , .Xr rpc_clnt_calls 3 , .Xr rpc_clnt_create 3 , @@ -513,5 +512,6 @@ pages on which they are described: .Xr rpc_svc_err 3 , .Xr rpc_svc_reg 3 , .Xr rpc_xdr 3 , +.Xr rpcbind 3 , .Xr xdr 3 , .Xr netconfig 5 Modified: head/lib/libc/rpc/rpc_svc_reg.3 ============================================================================== --- head/lib/libc/rpc/rpc_svc_reg.3 Sat Dec 27 08:22:58 2014 (r276293) +++ head/lib/libc/rpc/rpc_svc_reg.3 Sat Dec 27 08:31:52 2014 (r276294) @@ -176,8 +176,8 @@ Service implementors usually do not need .Sh SEE ALSO .Xr select 2 , .Xr rpc 3 , -.Xr rpcbind 3 , .Xr rpc_svc_calls 3 , .Xr rpc_svc_create 3 , .Xr rpc_svc_err 3 , +.Xr rpcbind 3 , .Xr rpcbind 8 Modified: head/lib/libpam/modules/pam_guest/pam_guest.8 ============================================================================== --- head/lib/libpam/modules/pam_guest/pam_guest.8 Sat Dec 27 08:22:58 2014 (r276293) +++ head/lib/libpam/modules/pam_guest/pam_guest.8 Sat Dec 27 08:31:52 2014 (r276294) @@ -82,8 +82,8 @@ password. Requires the guest user to type in the guest account name as password. .El .Sh SEE ALSO -.Xr pam_getenv 3 , .Xr pam_get_item 3 , +.Xr pam_getenv 3 , .Xr pam.conf 5 , .Xr pam 8 .Sh AUTHORS Modified: head/lib/librtld_db/librtld_db.3 ============================================================================== --- head/lib/librtld_db/librtld_db.3 Sat Dec 27 08:22:58 2014 (r276293) +++ head/lib/librtld_db/librtld_db.3 Sat Dec 27 08:31:52 2014 (r276294) @@ -167,8 +167,8 @@ You can get the error string using .Xr ld 1 , .Xr ld-elf.so.1 1 , .Xr ld.so 1 , -.Xr libproc 3 , -.Xr rtld 1 +.Xr rtld 1 , +.Xr libproc 3 .Sh HISTORY The .Nm librtld_db Modified: head/lib/libusb/libusb20.3 ============================================================================== --- head/lib/libusb/libusb20.3 Sat Dec 27 08:22:58 2014 (r276293) +++ head/lib/libusb/libusb20.3 Sat Dec 27 08:31:52 2014 (r276294) @@ -1053,8 +1053,8 @@ This function does not return NULL. .It Pa /dev/usb .El .Sh SEE ALSO -.Xr usb 4 , .Xr libusb 3 , +.Xr usb 4 , .Xr usbconfig 8 , .Xr usbdump 8 . Modified: head/lib/libutil/quotafile.3 ============================================================================== --- head/lib/libutil/quotafile.3 Sat Dec 27 08:22:58 2014 (r276293) +++ head/lib/libutil/quotafile.3 Sat Dec 27 08:31:52 2014 (r276294) @@ -273,8 +273,8 @@ and set to indicate the error. .Sh SEE ALSO .Xr quotactl 2 , -.Xr quota.user 5 , -.Xr quota.group 5 +.Xr quota.group 5 , +.Xr quota.user 5 .Sh HISTORY The .Nm quotafile From owner-svn-src-all@FreeBSD.ORG Sat Dec 27 10:28:21 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9CBF810C; Sat, 27 Dec 2014 10:28:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 88DD1669B2; Sat, 27 Dec 2014 10:28:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBRASLdD002088; Sat, 27 Dec 2014 10:28:21 GMT (envelope-from schweikh@FreeBSD.org) Received: (from schweikh@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBRASLSh002087; Sat, 27 Dec 2014 10:28:21 GMT (envelope-from schweikh@FreeBSD.org) Message-Id: <201412271028.sBRASLSh002087@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: schweikh set sender to schweikh@FreeBSD.org using -f From: Jens Schweikhardt Date: Sat, 27 Dec 2014 10:28:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276295 - head/share/man/man5 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2014 10:28:21 -0000 Author: schweikh Date: Sat Dec 27 10:28:20 2014 New Revision: 276295 URL: https://svnweb.freebsd.org/changeset/base/276295 Log: Correct a typo. Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Sat Dec 27 08:31:52 2014 (r276294) +++ head/share/man/man5/src.conf.5 Sat Dec 27 10:28:20 2014 (r276295) @@ -1143,7 +1143,7 @@ support files (fonts and keymaps). Set this to not add warning flags to the compiler invocations. Useful as a temporary workaround when code enters the tree which triggers warnings in environments that differ from the -original develoepr. +original developer. .It Va WITHOUT_WIRELESS .\" from FreeBSD: head/tools/build/options/WITHOUT_WIRELESS 183242 2008-09-21 22:02:26Z sam Set to not build programs used for 802.11 wireless networks; especially From owner-svn-src-all@FreeBSD.ORG Sat Dec 27 13:17:28 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7041FC88; Sat, 27 Dec 2014 13:17:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5C3B26422C; Sat, 27 Dec 2014 13:17:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBRDHSGJ080699; Sat, 27 Dec 2014 13:17:28 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBRDHS6v080698; Sat, 27 Dec 2014 13:17:28 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201412271317.sBRDHS6v080698@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Sat, 27 Dec 2014 13:17:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276296 - head/sys/arm/broadcom/bcm2835 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2014 13:17:28 -0000 Author: loos Date: Sat Dec 27 13:17:27 2014 New Revision: 276296 URL: https://svnweb.freebsd.org/changeset/base/276296 Log: Make consistent use of the correct debug macros across the file. Modified: head/sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c Modified: head/sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c Sat Dec 27 10:28:20 2014 (r276295) +++ head/sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c Sat Dec 27 13:17:27 2014 (r276296) @@ -125,7 +125,7 @@ TUNABLE_INT("hw.bcm2835.cpufreq.verbose" static int cpufreq_lowest_freq = DEFAULT_LOWEST_FREQ; TUNABLE_INT("hw.bcm2835.cpufreq.lowest_freq", &cpufreq_lowest_freq); -#ifdef DEBUG +#ifdef PROP_DEBUG static void bcm2835_dump(const void *data, int len) { From owner-svn-src-all@FreeBSD.ORG Sat Dec 27 13:52:34 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BA701327; Sat, 27 Dec 2014 13:52:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A5CC466270; Sat, 27 Dec 2014 13:52:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBRDqYjM098449; Sat, 27 Dec 2014 13:52:34 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBRDqY6M098448; Sat, 27 Dec 2014 13:52:34 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201412271352.sBRDqY6M098448@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Sat, 27 Dec 2014 13:52:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276297 - head/sys/arm/broadcom/bcm2835 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2014 13:52:34 -0000 Author: loos Date: Sat Dec 27 13:52:33 2014 New Revision: 276297 URL: https://svnweb.freebsd.org/changeset/base/276297 Log: On interrupt handler, save the actual data read from mbox. The previous macro wasn't needed and was being used with swapped arguments which always give the same result (0) defeating the overflow check. On initialization, do not use bcm_mbox_intr() to read the pending messages, with the new semaphore based implementation this will lead to semaphore being incremented on the channels that contain pending data and will make the first read for that channel return stale data. This fixes the hang that happens on boot while initializing the cpufreq on Raspberry Pi. Modified: head/sys/arm/broadcom/bcm2835/bcm2835_mbox.c Modified: head/sys/arm/broadcom/bcm2835/bcm2835_mbox.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_mbox.c Sat Dec 27 13:17:27 2014 (r276296) +++ head/sys/arm/broadcom/bcm2835/bcm2835_mbox.c Sat Dec 27 13:52:33 2014 (r276297) @@ -76,6 +76,7 @@ __FBSDID("$FreeBSD$"); mtx_unlock(&(sc)->lock); \ } while(0) +#undef DEBUG #ifdef DEBUG #define dprintf(fmt, args...) printf(fmt, ##args) #else @@ -116,7 +117,7 @@ bcm_mbox_intr(void *arg) continue; } dprintf("bcm_mbox_intr: chan %d, data %08x\n", chan, data); - sc->msg[chan] = MBOX_MSG(data, 0xf); + sc->msg[chan] = msg; sema_post(&sc->sema[chan]); } } @@ -174,7 +175,8 @@ bcm_mbox_attach(device_t dev) } /* Read all pending messages */ - bcm_mbox_intr(sc); + while ((mbox_read_4(sc, REG_STATUS) & STATUS_EMPTY) == 0) + (void)mbox_read_4(sc, REG_READ); mbox_write_4(sc, REG_CONFIG, CONFIG_DATA_IRQ); From owner-svn-src-all@FreeBSD.ORG Sat Dec 27 14:06:06 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4936A67F; Sat, 27 Dec 2014 14:06:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 35011663CD; Sat, 27 Dec 2014 14:06:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBRE66lv003707; Sat, 27 Dec 2014 14:06:06 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBRE66o4003706; Sat, 27 Dec 2014 14:06:06 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201412271406.sBRE66o4003706@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Sat, 27 Dec 2014 14:06:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276298 - head/sys/arm/broadcom/bcm2835 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2014 14:06:06 -0000 Author: loos Date: Sat Dec 27 14:06:05 2014 New Revision: 276298 URL: https://svnweb.freebsd.org/changeset/base/276298 Log: Remove the '#undef DEBUG' that should not be committed. Modified: head/sys/arm/broadcom/bcm2835/bcm2835_mbox.c Modified: head/sys/arm/broadcom/bcm2835/bcm2835_mbox.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_mbox.c Sat Dec 27 13:52:33 2014 (r276297) +++ head/sys/arm/broadcom/bcm2835/bcm2835_mbox.c Sat Dec 27 14:06:05 2014 (r276298) @@ -76,7 +76,6 @@ __FBSDID("$FreeBSD$"); mtx_unlock(&(sc)->lock); \ } while(0) -#undef DEBUG #ifdef DEBUG #define dprintf(fmt, args...) printf(fmt, ##args) #else From owner-svn-src-all@FreeBSD.ORG Sat Dec 27 14:26:19 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 92FFB949; Sat, 27 Dec 2014 14:26:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7F00366603; Sat, 27 Dec 2014 14:26:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBREQJKw012893; Sat, 27 Dec 2014 14:26:19 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBREQJoU012889; Sat, 27 Dec 2014 14:26:19 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201412271426.sBREQJoU012889@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sat, 27 Dec 2014 14:26:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276299 - in head/sys/dev: bge pci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2014 14:26:19 -0000 Author: marius Date: Sat Dec 27 14:26:18 2014 New Revision: 276299 URL: https://svnweb.freebsd.org/changeset/base/276299 Log: - Make PCI_QUIRK_MSI_INTX_BUG work by using the ID of the actual PCI device for the lookup. - For devices affected by PCI_QUIRK_MSI_INTX_BUG, ensure PCIM_CMD_INTxDIS is cleared when using MSI/MSI-X. - Employ PCI_QUIRK_MSI_INTX_BUG for BCM5714(S)/BCM5715(S)/BCM5780(S) rather than clearing PCIM_CMD_INTxDIS unconditionally for all devices in bge(4). MFC after: 3 days Modified: head/sys/dev/bge/if_bge.c head/sys/dev/pci/pci.c Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Sat Dec 27 14:06:05 2014 (r276298) +++ head/sys/dev/bge/if_bge.c Sat Dec 27 14:26:18 2014 (r276299) @@ -1946,11 +1946,9 @@ bge_chipinit(struct bge_softc *sc) /* * Disable memory write invalidate. Apparently it is not supported - * properly by these devices. Also ensure that INTx isn't disabled, - * as these chips need it even when using MSI. + * properly by these devices. */ - PCI_CLRBIT(sc->bge_dev, BGE_PCI_CMD, - PCIM_CMD_INTxDIS | PCIM_CMD_MWIEN, 4); + PCI_CLRBIT(sc->bge_dev, BGE_PCI_CMD, PCIM_CMD_MWIEN, 4); /* Set the timer prescaler (always 66 MHz). */ CSR_WRITE_4(sc, BGE_MISC_CFG, BGE_32BITTIME_66MHZ); Modified: head/sys/dev/pci/pci.c ============================================================================== --- head/sys/dev/pci/pci.c Sat Dec 27 14:06:05 2014 (r276298) +++ head/sys/dev/pci/pci.c Sat Dec 27 14:26:18 2014 (r276299) @@ -268,7 +268,7 @@ static const struct pci_quirk pci_quirks { 0x43851002, PCI_QUIRK_UNMAP_REG, 0x14, 0 }, /* - * Atheros AR8161/AR8162/E2200 ethernet controller has a bug that + * Atheros AR8161/AR8162/E2200 Ethernet controllers have a bug that * MSI interrupt does not assert if PCIM_CMD_INTxDIS bit of the * command register is set. */ @@ -276,6 +276,17 @@ static const struct pci_quirk pci_quirks { 0xE0911969, PCI_QUIRK_MSI_INTX_BUG, 0, 0 }, { 0x10901969, PCI_QUIRK_MSI_INTX_BUG, 0, 0 }, + /* + * Broadcom BCM5714(S)/BCM5715(S)/BCM5780(S) Ethernet MACs don't + * issue MSI interrupts with PCIM_CMD_INTxDIS set either. + */ + { 0x166814e4, PCI_QUIRK_MSI_INTX_BUG, 0, 0 }, /* BCM5714 */ + { 0x166914e4, PCI_QUIRK_MSI_INTX_BUG, 0, 0 }, /* BCM5714S */ + { 0x166a14e4, PCI_QUIRK_MSI_INTX_BUG, 0, 0 }, /* BCM5780 */ + { 0x166b14e4, PCI_QUIRK_MSI_INTX_BUG, 0, 0 }, /* BCM5780S */ + { 0x167814e4, PCI_QUIRK_MSI_INTX_BUG, 0, 0 }, /* BCM5715 */ + { 0x167914e4, PCI_QUIRK_MSI_INTX_BUG, 0, 0 }, /* BCM5715S */ + { 0 } }; @@ -3866,14 +3877,16 @@ pci_setup_intr(device_t dev, device_t ch mte->mte_handlers++; } - if (!pci_has_quirk(pci_get_devid(dev), - PCI_QUIRK_MSI_INTX_BUG)) { - /* - * Make sure that INTx is disabled if we are - * using MSI/MSIX - */ + /* + * Make sure that INTx is disabled if we are using MSI/MSI-X, + * unless the device is affected by PCI_QUIRK_MSI_INTX_BUG, + * in which case we "enable" INTx so MSI/MSI-X actually works. + */ + if (!pci_has_quirk(pci_get_devid(child), + PCI_QUIRK_MSI_INTX_BUG)) pci_set_command_bit(dev, child, PCIM_CMD_INTxDIS); - } + else + pci_clear_command_bit(dev, child, PCIM_CMD_INTxDIS); bad: if (error) { (void)bus_generic_teardown_intr(dev, child, irq, From owner-svn-src-all@FreeBSD.ORG Sat Dec 27 15:13:26 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BA0438BB; Sat, 27 Dec 2014 15:13:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8CC32E0E; Sat, 27 Dec 2014 15:13:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBRFDQZj036488; Sat, 27 Dec 2014 15:13:26 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBRFDQts036487; Sat, 27 Dec 2014 15:13:26 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201412271513.sBRFDQts036487@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Sat, 27 Dec 2014 15:13:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276303 - head/sys/arm/broadcom/bcm2835 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2014 15:13:26 -0000 Author: loos Date: Sat Dec 27 15:13:25 2014 New Revision: 276303 URL: https://svnweb.freebsd.org/changeset/base/276303 Log: Removes unused and duplicate headers. Bring the wait limit on mailbox write to a more sane value. Fix a off-by-one bug on wait time limit. Remove extra blank line. Modified: head/sys/arm/broadcom/bcm2835/bcm2835_mbox.c Modified: head/sys/arm/broadcom/bcm2835/bcm2835_mbox.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_mbox.c Sat Dec 27 14:58:52 2014 (r276302) +++ head/sys/arm/broadcom/bcm2835/bcm2835_mbox.c Sat Dec 27 15:13:25 2014 (r276303) @@ -31,25 +31,16 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include -#include +#include #include #include -#include -#include -#include #include -#include -#include -#include -#include #include #include -#include -#include - #include #include "mbox_if.h" @@ -188,25 +179,21 @@ bcm_mbox_attach(device_t dev) static int bcm_mbox_write(device_t dev, int chan, uint32_t data) { - int limit = 20000; + int limit = 1000; struct bcm_mbox_softc *sc = device_get_softc(dev); dprintf("bcm_mbox_write: chan %d, data %08x\n", chan, data); MBOX_LOCK(sc); - - while ((mbox_read_4(sc, REG_STATUS) & STATUS_FULL) && limit--) { - DELAY(2); - } - + while ((mbox_read_4(sc, REG_STATUS) & STATUS_FULL) && --limit) + DELAY(5); if (limit == 0) { printf("bcm_mbox_write: STATUS_FULL stuck"); MBOX_UNLOCK(sc); return (EAGAIN); } - mbox_write_4(sc, REG_WRITE, MBOX_MSG(chan, data)); - MBOX_UNLOCK(sc); + return (0); } @@ -254,4 +241,3 @@ static driver_t bcm_mbox_driver = { static devclass_t bcm_mbox_devclass; DRIVER_MODULE(mbox, simplebus, bcm_mbox_driver, bcm_mbox_devclass, 0, 0); - From owner-svn-src-all@FreeBSD.ORG Sat Dec 27 15:18:01 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1E57EB08; Sat, 27 Dec 2014 15:18:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 097FEE4E; Sat, 27 Dec 2014 15:18:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBRFI0sj037210; Sat, 27 Dec 2014 15:18:00 GMT (envelope-from julian@FreeBSD.org) Received: (from julian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBRFI0ce037209; Sat, 27 Dec 2014 15:18:00 GMT (envelope-from julian@FreeBSD.org) Message-Id: <201412271518.sBRFI0ce037209@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: julian set sender to julian@FreeBSD.org using -f From: Julian Elischer Date: Sat, 27 Dec 2014 15:18:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276304 - head/sys/modules/dtrace/dtraceall X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2014 15:18:01 -0000 Author: julian Date: Sat Dec 27 15:17:59 2014 New Revision: 276304 URL: https://svnweb.freebsd.org/changeset/base/276304 Log: Submitted by: rick Maclem MFC after: 1 week Modified: head/sys/modules/dtrace/dtraceall/dtraceall.c Modified: head/sys/modules/dtrace/dtraceall/dtraceall.c ============================================================================== --- head/sys/modules/dtrace/dtraceall/dtraceall.c Sat Dec 27 15:13:25 2014 (r276303) +++ head/sys/modules/dtrace/dtraceall/dtraceall.c Sat Dec 27 15:17:59 2014 (r276304) @@ -66,7 +66,7 @@ MODULE_VERSION(dtraceall, 1); MODULE_DEPEND(dtraceall, opensolaris, 1, 1, 1); MODULE_DEPEND(dtraceall, dtrace, 1, 1, 1); MODULE_DEPEND(dtraceall, dtmalloc, 1, 1, 1); -#if defined(NFSCLIENT) +#if defined(NFSCL) MODULE_DEPEND(dtraceall, dtnfscl, 1, 1, 1); #endif #if defined(__amd64__) || defined(__i386__) || defined(__powerpc__) From owner-svn-src-all@FreeBSD.ORG Sat Dec 27 16:43:29 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 361B9CC1; Sat, 27 Dec 2014 16:43:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1EF0A66ADF; Sat, 27 Dec 2014 16:43:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBRGhTf1081181; Sat, 27 Dec 2014 16:43:29 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBRGhNGH081153; Sat, 27 Dec 2014 16:43:23 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201412271643.sBRGhNGH081153@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 27 Dec 2014 16:43:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276305 - in stable/10: contrib/bmake contrib/bmake/lst.lib contrib/bmake/mk contrib/bmake/mk/sys usr.bin/bmake X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2014 16:43:29 -0000 Author: ngie Date: Sat Dec 27 16:43:22 2014 New Revision: 276305 URL: https://svnweb.freebsd.org/changeset/base/276305 Log: MFC bmake changes to stable/10 (r255285,r255916,r258113,r258114,r261212,r266760,r268437) Discussed with: sjg r255285: If MAKE_JOB_ERROR_TOKEN is set to false, do not put an error token ("E") into the job queue. This avoids closing down an entire build on failure of one branch. Probably has no use outside the context of universe/tinderbox. Reviewed by: obrien r255916: Fix Fx syntax. PR: 182269 Approved by: re@ r258113: Avoid SEGV when passed NULL for list r258114: Don't SEGV when Hash_Table is uninitialized r261212: Merge bmake-20140101 from vendor r266760: Portmgr no longer need the UL hack. Reviewed by: obrien r268437: Update to bmake-20140620 Main change is detection of malformed variable references. Reviewed by: obrien Modified: stable/10/contrib/bmake/ChangeLog stable/10/contrib/bmake/Makefile stable/10/contrib/bmake/Makefile.config.in stable/10/contrib/bmake/README stable/10/contrib/bmake/bmake.1 stable/10/contrib/bmake/bmake.cat1 stable/10/contrib/bmake/boot-strap stable/10/contrib/bmake/bsd.after-import.mk stable/10/contrib/bmake/compat.c stable/10/contrib/bmake/config.h.in stable/10/contrib/bmake/configure stable/10/contrib/bmake/configure.in stable/10/contrib/bmake/hash.c stable/10/contrib/bmake/lst.lib/lstMember.c stable/10/contrib/bmake/main.c stable/10/contrib/bmake/make-bootstrap.sh.in stable/10/contrib/bmake/make.1 stable/10/contrib/bmake/make.h stable/10/contrib/bmake/meta.c stable/10/contrib/bmake/mk/ChangeLog stable/10/contrib/bmake/mk/autodep.mk stable/10/contrib/bmake/mk/dirdeps.mk stable/10/contrib/bmake/mk/dpadd.mk stable/10/contrib/bmake/mk/gendirdeps.mk stable/10/contrib/bmake/mk/host-target.mk stable/10/contrib/bmake/mk/install-mk stable/10/contrib/bmake/mk/lib.mk stable/10/contrib/bmake/mk/meta.autodep.mk stable/10/contrib/bmake/mk/meta2deps.py stable/10/contrib/bmake/mk/meta2deps.sh stable/10/contrib/bmake/mk/options.mk stable/10/contrib/bmake/mk/rst2htm.mk stable/10/contrib/bmake/mk/sys.mk stable/10/contrib/bmake/mk/sys/SunOS.mk stable/10/contrib/bmake/mk/target-flags.mk stable/10/contrib/bmake/mk/warnings.mk stable/10/contrib/bmake/os.sh stable/10/contrib/bmake/parse.c stable/10/contrib/bmake/str.c stable/10/contrib/bmake/util.c stable/10/contrib/bmake/var.c stable/10/usr.bin/bmake/Makefile stable/10/usr.bin/bmake/Makefile.config stable/10/usr.bin/bmake/config.h Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/bmake/ChangeLog ============================================================================== --- stable/10/contrib/bmake/ChangeLog Sat Dec 27 15:17:59 2014 (r276304) +++ stable/10/contrib/bmake/ChangeLog Sat Dec 27 16:43:22 2014 (r276305) @@ -1,3 +1,62 @@ +2014-06-20 Simon J. Gerraty + + * Makefile (MAKE_VERSION): 20140620 + Merge with NetBSD make, pick up + o var.c return varNoError rather than var_Error for ::= modidiers. + +2014-05-22 Simon J. Gerraty + + * Makefile (MAKE_VERSION): 20140522 + Merge with NetBSD make, pick up + o var.c detect some parse errors. + +2014-04-05 Simon J. Gerraty + + * Fix spelling errors - patch from Pedro Giffuni + +2014-02-14 Simon J. Gerraty + + * Makefile (MAKE_VERSION): 20140214 + Merge with NetBSD make, pick up + o .INCLUDEFROM* + o use Var_Value to get MAKEOBJDIR[PREFIX] + o reduced realloc'ign in brk_string. + * configure.in: add a check for compiler supporting __func__ + +2014-01-03 Simon J. Gerraty + + * boot-strap: ignore mksrc=none + +2014-01-02 Simon J. Gerraty + + * Makefile (DEFAULT_SYS_PATH?): use just ${prefix}/share/mk + +2014-01-01 Simon J. Gerraty + + * Makefile (MAKE_VERSION): 20140101 + * configure.in: set bmake_path_max to min(_SC_PATH_MAX,1024) + * Makefile.config: defined BMAKE_PATH_MAX to bmake_path_max + * make.h: use BMAKE_PATH_MAX if MAXPATHLEN not defined (needed for + Hurd) + * configure.in: Add AC_PREREQ and check for + sysctl; patch from Andrew Shadura andrewsh at debian.org + +2013-10-16 Simon J. Gerraty + + * Makefile (MAKE_VERSION): 20131010 + * lose the const from arg to systcl to avoid problems on older BSDs. + +2013-10-01 Simon J. Gerraty + + * Makefile (MAKE_VERSION): 20131001 + Merge with NetBSD make, pick up + o main.c: for NATIVE build sysctl to get MACHINE_ARCH from + hw.machine_arch if necessary. + o meta.c: meta_oodate - need to look at src of Link and target + of Move as well. + * main.c: check that CTL_HW and HW_MACHINE_ARCH exist. + provide __arraycount() if needed. + 2013-09-04 Simon J. Gerraty * Makefile (MAKE_VERSION): 20130904 @@ -30,7 +89,7 @@ * Makefile (MAKE_VERSION): 20130716 Merge with NetBSD make, pick up - o number of gmake compatability tweaks + o number of gmake compatibility tweaks -w for gmake style entering/leaving messages if .MAKE.LEVEL > 0 indicate it in progname "make[1]" etc. handle MAKEFLAGS containing only letters. Modified: stable/10/contrib/bmake/Makefile ============================================================================== --- stable/10/contrib/bmake/Makefile Sat Dec 27 15:17:59 2014 (r276304) +++ stable/10/contrib/bmake/Makefile Sat Dec 27 16:43:22 2014 (r276305) @@ -1,7 +1,7 @@ -# $Id: Makefile,v 1.20 2013/09/04 15:42:03 sjg Exp $ +# $Id: Makefile,v 1.27 2014/06/20 14:51:54 sjg Exp $ # Base version on src date -MAKE_VERSION= 20130904 +MAKE_VERSION= 20140620 PROG= bmake @@ -68,7 +68,7 @@ SRCS+= ${LIBOBJS:T:.o=.c} prefix?= /usr srcdir?= ${.CURDIR} -DEFAULT_SYS_PATH?= .../share/mk:${prefix}/share/mk +DEFAULT_SYS_PATH?= ${prefix}/share/mk CPPFLAGS+= -DUSE_META CFLAGS+= ${CPPFLAGS} @@ -117,7 +117,7 @@ MANTARGET?= man # turn this on by default - ignored if we are root WITH_INSTALL_AS_USER= -# supress with -DWITHOUT_* +# suppress with -DWITHOUT_* OPTIONS_DEFAULT_YES+= \ AUTOCONF_MK \ INSTALL_MK \ Modified: stable/10/contrib/bmake/Makefile.config.in ============================================================================== --- stable/10/contrib/bmake/Makefile.config.in Sat Dec 27 15:17:59 2014 (r276304) +++ stable/10/contrib/bmake/Makefile.config.in Sat Dec 27 16:43:22 2014 (r276305) @@ -14,3 +14,7 @@ LIBOBJS= @LIBOBJS@ LDADD= @LIBS@ USE_META= @use_meta@ FILEMON_H= @filemon_h@ +BMAKE_PATH_MAX?= @bmake_path_max@ +# used if MAXPATHLEN not defined +CPPFLAGS+= -DBMAKE_PATH_MAX=${BMAKE_PATH_MAX} + Modified: stable/10/contrib/bmake/README ============================================================================== --- stable/10/contrib/bmake/README Sat Dec 27 15:17:59 2014 (r276304) +++ stable/10/contrib/bmake/README Sat Dec 27 16:43:22 2014 (r276305) @@ -18,7 +18,7 @@ interesting changes, so that bmake track Building: -The prefered way to bootstrap bmake is: +The preferred way to bootstrap bmake is: ./bmake/boot-strap Modified: stable/10/contrib/bmake/bmake.1 ============================================================================== --- stable/10/contrib/bmake/bmake.1 Sat Dec 27 15:17:59 2014 (r276304) +++ stable/10/contrib/bmake/bmake.1 Sat Dec 27 16:43:22 2014 (r276305) @@ -1,4 +1,4 @@ -.\" $NetBSD: make.1,v 1.222 2013/08/11 09:53:49 apb Exp $ +.\" $NetBSD: make.1,v 1.229 2014/01/19 10:23:29 apb Exp $ .\" .\" Copyright (c) 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" from: @(#)make.1 8.4 (Berkeley) 3/19/94 .\" -.Dd August 11, 2013 +.Dd February 14, 2014 .Dt MAKE 1 .Os .Sh NAME @@ -706,6 +706,10 @@ was executed. Refer to the description of .Ql Ev PWD for more details. +.It Va .INCLUDEDFROMDIR +The directory of the file this Makefile was included from. +.It Va .INCLUDEDFROMFILE +The filename of the file this Makefile was included from. .It Ev MAKE The name that .Nm @@ -745,7 +749,7 @@ then output for each target is prefixed .Ql --- target --- the first part of which can be controlled via .Va .MAKE.JOB.PREFIX . -If +If .Va .MAKE.JOB.PREFIX is empty, no token is printed. .br @@ -1066,6 +1070,13 @@ may be used. The wildcard characters may be escaped with a backslash .Pq Ql \e . +As a consequence of the way values are split into words, matched, +and then joined, a construct like +.Dl ${VAR:M*} +will normalise the inter-word spacing, removing all leading and +trailing space, and converting multiple consecutive spaces +to single spaces. +. .It Cm \&:N Ns Ar pattern This is identical to .Ql Cm \&:M , @@ -1209,7 +1220,7 @@ The modifier is just like the .Cm \&:S modifier except that the old and new strings, instead of being -simple strings, are a regular expression (see +simple strings, are an extended regular expression (see .Xr regex 3 ) string .Ar pattern @@ -1239,6 +1250,15 @@ and are orthogonal; the former specifies whether multiple words are potentially affected, the latter whether multiple substitutions can potentially occur within each affected word. +.Pp +As for the +.Cm \&:S +modifier, the +.Ar pattern +and +.Ar replacement +are subjected to variable expansion before being parsed as +regular expressions. .It Cm \&:T Replaces each word in the variable with its last component. .It Cm \&:u @@ -1751,7 +1771,7 @@ or .Fl t options were specified. Normally used to mark recursive -.Nm Ns 's . +.Nm Ns s . .It Ic .META Create a meta file for the target, even if it is flagged as .Ic .PHONY , Modified: stable/10/contrib/bmake/bmake.cat1 ============================================================================== --- stable/10/contrib/bmake/bmake.cat1 Sat Dec 27 15:17:59 2014 (r276304) +++ stable/10/contrib/bmake/bmake.cat1 Sat Dec 27 16:43:22 2014 (r276305) @@ -450,6 +450,13 @@ VVAARRIIAABBLLEE AASSSSIIGG _._C_U_R_D_I_R A path to the directory where bbmmaakkee was executed. Refer to the description of `PWD' for more details. + _._I_N_C_L_U_D_E_D_F_R_O_M_D_I_R + The directory of the file this Makefile was included + from. + + _._I_N_C_L_U_D_E_D_F_R_O_M_F_I_L_E + The filename of the file this Makefile was included from. + MAKE The name that bbmmaakkee was executed with (_a_r_g_v_[_0_]). For compatibility bbmmaakkee also sets _._M_A_K_E with the same value. The preferred variable to use is the environment variable @@ -690,7 +697,13 @@ VVAARRIIAABBLLEE AASSSSIIGG ::MM_p_a_t_t_e_r_n Select only those words that match _p_a_t_t_e_r_n. The standard shell wildcard characters (`*', `?', and `[]') may be used. The wildcard - characters may be escaped with a backslash (`\'). + characters may be escaped with a backslash (`\'). As a consequence + of the way values are split into words, matched, and then joined, a + construct like + ${VAR:M*} + will normalise the inter-word spacing, removing all leading and + trailing space, and converting multiple consecutive spaces to single + spaces. ::NN_p_a_t_t_e_r_n This is identical to `::MM', but selects all words which do not match @@ -777,18 +790,21 @@ VVAARRIIAABBLLEE AASSSSIIGG ::CC/_p_a_t_t_e_r_n/_r_e_p_l_a_c_e_m_e_n_t/[11ggWW] The ::CC modifier is just like the ::SS modifier except that the old and - new strings, instead of being simple strings, are a regular expres- - sion (see regex(3)) string _p_a_t_t_e_r_n and an ed(1)-style string - _r_e_p_l_a_c_e_m_e_n_t. Normally, the first occurrence of the pattern _p_a_t_t_e_r_n - in each word of the value is substituted with _r_e_p_l_a_c_e_m_e_n_t. The `1' - modifier causes the substitution to apply to at most one word; the - `g' modifier causes the substitution to apply to as many instances - of the search pattern _p_a_t_t_e_r_n as occur in the word or words it is - found in; the `W' modifier causes the value to be treated as a sin- - gle word (possibly containing embedded white space). Note that `1' - and `g' are orthogonal; the former specifies whether multiple words - are potentially affected, the latter whether multiple substitutions - can potentially occur within each affected word. + new strings, instead of being simple strings, are an extended regu- + lar expression (see regex(3)) string _p_a_t_t_e_r_n and an ed(1)-style + string _r_e_p_l_a_c_e_m_e_n_t. Normally, the first occurrence of the pattern + _p_a_t_t_e_r_n in each word of the value is substituted with _r_e_p_l_a_c_e_m_e_n_t. + The `1' modifier causes the substitution to apply to at most one + word; the `g' modifier causes the substitution to apply to as many + instances of the search pattern _p_a_t_t_e_r_n as occur in the word or + words it is found in; the `W' modifier causes the value to be + treated as a single word (possibly containing embedded white space). + Note that `1' and `g' are orthogonal; the former specifies whether + multiple words are potentially affected, the latter whether multiple + substitutions can potentially occur within each affected word. + + As for the ::SS modifier, the _p_a_t_t_e_r_n and _r_e_p_l_a_c_e_m_e_n_t are subjected to + variable expansion before being parsed as regular expressions. ::TT Replaces each word in the variable with its last component. @@ -1107,7 +1123,7 @@ SSPPEECCIIAALL SSOOUURRCCEE ..MMAAKKEE Execute the commands associated with this target even if the --nn or --tt options were specified. Normally used to mark recursive - bbmmaakkee's. + bbmmaakkees. ..MMEETTAA Create a meta file for the target, even if it is flagged as ..PPHHOONNYY, ..MMAAKKEE, or ..SSPPEECCIIAALL. Usage in conjunction with ..MMAAKKEE is @@ -1378,4 +1394,4 @@ BBUUGGSS There is no way of escaping a space character in a filename. -NetBSD 5.1 August 11, 2013 NetBSD 5.1 +NetBSD 5.1 February 14, 2014 NetBSD 5.1 Modified: stable/10/contrib/bmake/boot-strap ============================================================================== --- stable/10/contrib/bmake/boot-strap Sat Dec 27 15:17:59 2014 (r276304) +++ stable/10/contrib/bmake/boot-strap Sat Dec 27 16:43:22 2014 (r276305) @@ -111,7 +111,7 @@ # Simon J. Gerraty # RCSid: -# $Id: boot-strap,v 1.43 2013/03/02 18:55:23 sjg Exp $ +# $Id: boot-strap,v 1.45 2014/04/05 22:56:54 sjg Exp $ # # @(#) Copyright (c) 2001 Simon J. Gerraty # @@ -197,7 +197,7 @@ get_optarg() { here=`'pwd'` if [ $here = $Mydir ]; then - # avoid polution + # avoid pollution OBJROOT=../ fi @@ -216,11 +216,9 @@ do --share=*) share_dir=`get_optarg "$1"`;; --share) share_dir="$2"; shift;; --with-default-sys-path=*) - CONFIGURE_ARGS="$1" - MAKESYSPATH=`get_optarg "$1"`;; + CONFIGURE_ARGS="$1";; --with-default-sys-path) - CONFIGURE_ARGS="$1 $2" - MAKESYSPATH="$2"; shift;; + CONFIGURE_ARGS="$1 $2";; --install) INSTALL_PREFIX=${INSTALL_PREFIX:-$prefix};; --install-host-target) INSTALL_PREFIX=${INSTALL_PREFIX:-$prefix} @@ -330,8 +328,8 @@ add_path () { srcdir=`GetDir /bmake make-bootstrap.sh.in "$srcdir" "$2" "$Mydir" ./bmake* "$Mydir"/../bmake*` [ -d "${srcdir:-/dev/null}" ] || Usage case "$mksrc" in -none|-) # we don't want it - mksrc= +none|-) # we ignore this now + mksrc=$Mydir/mk ;; .../*) # find here or above mksrc=`FindHereOrAbove -C "$Mydir" -s "$mksrc/sys.mk"` @@ -455,7 +453,7 @@ op_all() { echo "Use --install-destdir=/somewhere to set DESTDIR during install" echo "Use --install-host-target to use INSTALL_BIN=$HOST_TARGET/bin" echo "Use -DWITH_PROG_VERSION to install as bmake-$MAKE_VERSION" - echo "Use -DWITHOUT_PROG_LINK to supress bmake -> bmake-$MAKE_VERSION symlink" + echo "Use -DWITHOUT_PROG_LINK to suppress bmake -> bmake-$MAKE_VERSION symlink" echo "Use -DWITHOUT_INSTALL_MK to skip installing files to $prefix/share/mk" fi } Modified: stable/10/contrib/bmake/bsd.after-import.mk ============================================================================== --- stable/10/contrib/bmake/bsd.after-import.mk Sat Dec 27 15:17:59 2014 (r276304) +++ stable/10/contrib/bmake/bsd.after-import.mk Sat Dec 27 16:43:22 2014 (r276305) @@ -1,4 +1,4 @@ -# $Id: bsd.after-import.mk,v 1.11 2012/12/29 19:32:25 sjg Exp $ +# $Id: bsd.after-import.mk,v 1.12 2014/02/14 23:45:49 sjg Exp $ # This makefile is for use when integrating bmake into a BSD build # system. Use this makefile after importing bmake. @@ -41,15 +41,13 @@ SRCTOP := ${srctop} HOST_OS!= uname .endif -# .../share/mk will find ${SRCTOP}/share/mk -# if we are within ${SRCTOP} -DEFAULT_SYS_PATH= .../share/mk:/usr/share/mk - BOOTSTRAP_ARGS = \ - --with-default-sys-path='${DEFAULT_SYS_PATH}' \ --prefix /usr \ --share /usr/share +.if !empty(DEFAULT_SYS_PATH) +BOOTSTRAP_ARGS += --with-default-sys-path='${DEFAULT_SYS_PATH}' +.endif # run boot-strap with minimal influence bootstrap: ${BMAKE_SRC}/boot-strap ${MAKEFILE} Modified: stable/10/contrib/bmake/compat.c ============================================================================== --- stable/10/contrib/bmake/compat.c Sat Dec 27 15:17:59 2014 (r276304) +++ stable/10/contrib/bmake/compat.c Sat Dec 27 16:43:22 2014 (r276305) @@ -1,4 +1,4 @@ -/* $NetBSD: compat.c,v 1.93 2013/09/02 19:26:42 sjg Exp $ */ +/* $NetBSD: compat.c,v 1.94 2014/01/03 00:02:01 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -70,14 +70,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: compat.c,v 1.93 2013/09/02 19:26:42 sjg Exp $"; +static char rcsid[] = "$NetBSD: compat.c,v 1.94 2014/01/03 00:02:01 sjg Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)compat.c 8.2 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: compat.c,v 1.93 2013/09/02 19:26:42 sjg Exp $"); +__RCSID("$NetBSD: compat.c,v 1.94 2014/01/03 00:02:01 sjg Exp $"); #endif #endif /* not lint */ #endif @@ -133,7 +133,7 @@ Compat_Init(void) Shell_Init(); /* setup default shell */ - for (cp = "#=|^(){};&<>*?[]:$`\\\n"; *cp != '\0'; cp++) { + for (cp = "~#=|^(){};&<>*?[]:$`\\\n"; *cp != '\0'; cp++) { meta[(unsigned char) *cp] = 1; } /* Modified: stable/10/contrib/bmake/config.h.in ============================================================================== --- stable/10/contrib/bmake/config.h.in Sat Dec 27 15:17:59 2014 (r276304) +++ stable/10/contrib/bmake/config.h.in Sat Dec 27 16:43:22 2014 (r276305) @@ -144,6 +144,9 @@ `HAVE_STRUCT_STAT_ST_RDEV' instead. */ #undef HAVE_ST_RDEV +/* Define to 1 if you have the `sysctl' function. */ +#undef HAVE_SYSCTL + /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_SYS_DIR_H @@ -164,6 +167,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_SYSCTL_H + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIME_H @@ -298,6 +304,9 @@ /* Define to 1 if you need to in order for `stat' and other things to work. */ #undef _POSIX_SOURCE +/* C99 function name */ +#undef __func__ + /* Define to empty if `const' does not conform to ANSI C. */ #undef const Modified: stable/10/contrib/bmake/configure ============================================================================== Binary file (source and/or target). No diff available. Modified: stable/10/contrib/bmake/configure.in ============================================================================== --- stable/10/contrib/bmake/configure.in Sat Dec 27 15:17:59 2014 (r276304) +++ stable/10/contrib/bmake/configure.in Sat Dec 27 16:43:22 2014 (r276305) @@ -1,11 +1,12 @@ dnl dnl RCSid: -dnl $Id: configure.in,v 1.49 2013/07/06 18:25:19 sjg Exp $ +dnl $Id: configure.in,v 1.52 2014/02/15 22:27:59 sjg Exp $ dnl dnl Process this file with autoconf to produce a configure script dnl -AC_INIT([bmake], [20130706], [sjg@NetBSD.org]) -AC_CONFIG_HEADER(config.h) +AC_PREREQ(2.50) +AC_INIT([bmake], [20140214], [sjg@NetBSD.org]) +AC_CONFIG_HEADERS(config.h) dnl make srcdir absolute case "$srcdir" in @@ -77,7 +78,18 @@ AC_PROG_GCC_TRADITIONAL AC_PROG_INSTALL dnl Executable suffix - normally empty; .exe on os2. AC_SUBST(ac_exe_suffix)dnl - +dnl +dnl Hurd refuses to define PATH_MAX or MAXPATHLEN +if test -x /usr/bin/getconf; then + bmake_path_max=`getconf PATH_MAX / 2> /dev/null` +fi +bmake_path_max=${bmake_path_max:-1024} +if test $bmake_path_max -gt 1024; then + # this is all we expect + bmake_path_max=1024 +fi +echo "Using: BMAKE_PATH_MAX=$bmake_path_max" >&6 +AC_SUBST(bmake_path_max)dnl dnl dnl AC_C_CROSS dnl @@ -98,6 +110,7 @@ AC_CHECK_HEADERS( \ sys/mman.h \ sys/select.h \ sys/socket.h \ + sys/sysctl.h \ sys/time.h \ sys/uio.h \ unistd.h \ @@ -159,6 +172,7 @@ AC_CHECK_FUNCS( \ strsep \ strtod \ strtol \ + sysctl \ unsetenv \ vsnprintf \ wait3 \ @@ -189,6 +203,11 @@ dnl AC_HEADER_STAT AC_STRUCT_ST_RDEV dnl +echo "checking if compiler supports __func__" >&6 +AC_LANG(C) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[[const char *func = __func__;]])],, + AC_DEFINE(__func__, __FUNCTION__, C99 function name)) +dnl dnl we want this for unit-tests/Makefile echo $ECHO_N "checking if diff -u works... $ECHO_C" >&6 if diff -u /dev/null /dev/null > /dev/null 2>&1; then Modified: stable/10/contrib/bmake/hash.c ============================================================================== --- stable/10/contrib/bmake/hash.c Sat Dec 27 15:17:59 2014 (r276304) +++ stable/10/contrib/bmake/hash.c Sat Dec 27 16:43:22 2014 (r276305) @@ -1,4 +1,4 @@ -/* $NetBSD: hash.c,v 1.19 2009/01/24 10:59:09 dsl Exp $ */ +/* $NetBSD: hash.c,v 1.20 2013/11/14 00:27:05 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -70,14 +70,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: hash.c,v 1.19 2009/01/24 10:59:09 dsl Exp $"; +static char rcsid[] = "$NetBSD: hash.c,v 1.20 2013/11/14 00:27:05 sjg Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)hash.c 8.1 (Berkeley) 6/6/93"; #else -__RCSID("$NetBSD: hash.c,v 1.19 2009/01/24 10:59:09 dsl Exp $"); +__RCSID("$NetBSD: hash.c,v 1.20 2013/11/14 00:27:05 sjg Exp $"); #endif #endif /* not lint */ #endif @@ -221,6 +221,9 @@ Hash_FindEntry(Hash_Table *t, const char unsigned h; const char *p; + if (t == NULL || t->bucketPtr == NULL) { + return NULL; + } for (h = 0, p = key; *p;) h = (h << 5) - h + *p++; p = key; Modified: stable/10/contrib/bmake/lst.lib/lstMember.c ============================================================================== --- stable/10/contrib/bmake/lst.lib/lstMember.c Sat Dec 27 15:17:59 2014 (r276304) +++ stable/10/contrib/bmake/lst.lib/lstMember.c Sat Dec 27 16:43:22 2014 (r276305) @@ -1,4 +1,4 @@ -/* $NetBSD: lstMember.c,v 1.13 2009/01/23 21:26:30 dsl Exp $ */ +/* $NetBSD: lstMember.c,v 1.14 2013/11/14 00:01:28 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -33,14 +33,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: lstMember.c,v 1.13 2009/01/23 21:26:30 dsl Exp $"; +static char rcsid[] = "$NetBSD: lstMember.c,v 1.14 2013/11/14 00:01:28 sjg Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)lstMember.c 8.1 (Berkeley) 6/6/93"; #else -__RCSID("$NetBSD: lstMember.c,v 1.13 2009/01/23 21:26:30 dsl Exp $"); +__RCSID("$NetBSD: lstMember.c,v 1.14 2013/11/14 00:01:28 sjg Exp $"); #endif #endif /* not lint */ #endif @@ -58,6 +58,9 @@ Lst_Member(Lst l, void *d) List list = l; ListNode lNode; + if (list == NULL) { + return NULL; + } lNode = list->firstPtr; if (lNode == NULL) { return NULL; Modified: stable/10/contrib/bmake/main.c ============================================================================== --- stable/10/contrib/bmake/main.c Sat Dec 27 15:17:59 2014 (r276304) +++ stable/10/contrib/bmake/main.c Sat Dec 27 16:43:22 2014 (r276305) @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.224 2013/09/04 15:38:26 sjg Exp $ */ +/* $NetBSD: main.c,v 1.226 2014/02/07 17:23:35 pooka Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,7 +69,7 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: main.c,v 1.224 2013/09/04 15:38:26 sjg Exp $"; +static char rcsid[] = "$NetBSD: main.c,v 1.226 2014/02/07 17:23:35 pooka Exp $"; #else #include #ifndef lint @@ -81,7 +81,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 19 #if 0 static char sccsid[] = "@(#)main.c 8.3 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: main.c,v 1.224 2013/09/04 15:38:26 sjg Exp $"); +__RCSID("$NetBSD: main.c,v 1.226 2014/02/07 17:23:35 pooka Exp $"); #endif #endif /* not lint */ #endif @@ -118,6 +118,9 @@ __RCSID("$NetBSD: main.c,v 1.224 2013/09 #include #include #include +#if defined(MAKE_NATIVE) && defined(HAVE_SYSCTL) +#include +#endif #include #include "wait.h" @@ -145,6 +148,10 @@ __RCSID("$NetBSD: main.c,v 1.224 2013/09 #define DEFMAXLOCAL DEFMAXJOBS #endif /* DEFMAXLOCAL */ +#ifndef __arraycount +# define __arraycount(__x) (sizeof(__x) / sizeof(__x[0])) +#endif + Lst create; /* Targets to be made */ time_t now; /* Time at start of make */ GNode *DEFAULT; /* .DEFAULT node */ @@ -910,6 +917,20 @@ main(int argc, char **argv) } if (!machine_arch) { +#if defined(MAKE_NATIVE) && defined(HAVE_SYSCTL) && defined(CTL_HW) && defined(HW_MACHINE_ARCH) + static char machine_arch_buf[sizeof(utsname.machine)]; + int mib[2] = { CTL_HW, HW_MACHINE_ARCH }; + size_t len = sizeof(machine_arch_buf); + + if (sysctl(mib, __arraycount(mib), machine_arch_buf, + &len, NULL, 0) < 0) { + (void)fprintf(stderr, "%s: sysctl failed (%s).\n", progname, + strerror(errno)); + exit(2); + } + + machine_arch = machine_arch_buf; +#else #ifndef MACHINE_ARCH #ifdef MAKE_MACHINE_ARCH machine_arch = MAKE_MACHINE_ARCH; @@ -919,6 +940,7 @@ main(int argc, char **argv) #else machine_arch = MACHINE_ARCH; #endif +#endif } myPid = getpid(); /* remember this for vFork() */ @@ -1080,11 +1102,12 @@ main(int argc, char **argv) */ #ifndef NO_PWD_OVERRIDE if (!ignorePWD) { - char *pwd; + char *pwd, *ptmp1 = NULL, *ptmp2 = NULL; if ((pwd = getenv("PWD")) != NULL && - getenv("MAKEOBJDIRPREFIX") == NULL) { - const char *makeobjdir = getenv("MAKEOBJDIR"); + Var_Value("MAKEOBJDIRPREFIX", VAR_CMD, &ptmp1) == NULL) { + const char *makeobjdir = Var_Value("MAKEOBJDIR", + VAR_CMD, &ptmp2); if (makeobjdir == NULL || !strchr(makeobjdir, '$')) { if (stat(pwd, &sb) == 0 && @@ -1093,6 +1116,8 @@ main(int argc, char **argv) (void)strncpy(curdir, pwd, MAXPATHLEN); } } + free(ptmp1); + free(ptmp2); } #endif Var_Set(".CURDIR", curdir, VAR_GLOBAL, 0); @@ -1109,11 +1134,13 @@ main(int argc, char **argv) Dir_Init(curdir); (void)Main_SetObjdir(curdir); - if ((path = getenv("MAKEOBJDIRPREFIX")) != NULL) { + if ((path = Var_Value("MAKEOBJDIRPREFIX", VAR_CMD, &p1)) != NULL) { (void)snprintf(mdpath, MAXPATHLEN, "%s%s", path, curdir); (void)Main_SetObjdir(mdpath); - } else if ((path = getenv("MAKEOBJDIR")) != NULL) { + free(p1); + } else if ((path = Var_Value("MAKEOBJDIR", VAR_CMD, &p1)) != NULL) { (void)Main_SetObjdir(path); + free(p1); } else { (void)snprintf(mdpath, MAXPATHLEN, "%s.%s", _PATH_OBJDIR, machine); if (!Main_SetObjdir(mdpath) && !Main_SetObjdir(_PATH_OBJDIR)) { Modified: stable/10/contrib/bmake/make-bootstrap.sh.in ============================================================================== --- stable/10/contrib/bmake/make-bootstrap.sh.in Sat Dec 27 15:17:59 2014 (r276304) +++ stable/10/contrib/bmake/make-bootstrap.sh.in Sat Dec 27 16:43:22 2014 (r276305) @@ -11,7 +11,7 @@ yes) XDEFS="-DUSE_META ${XDEFS}";; esac CC="@CC@" -CFLAGS="@CFLAGS@ -I. -I${srcdir} @DEFS@ @CPPFLAGS@ -DMAKE_NATIVE ${XDEFS}" +CFLAGS="@CFLAGS@ -I. -I${srcdir} @DEFS@ @CPPFLAGS@ -DMAKE_NATIVE ${XDEFS} -DBMAKE_PATH_MAX=@bmake_path_max@" MAKE_VERSION=`sed -n '/^MAKE_VERSION=/s,.*=[^0-9]*,,p' $srcdir/Makefile` Modified: stable/10/contrib/bmake/make.1 ============================================================================== --- stable/10/contrib/bmake/make.1 Sat Dec 27 15:17:59 2014 (r276304) +++ stable/10/contrib/bmake/make.1 Sat Dec 27 16:43:22 2014 (r276305) @@ -1,4 +1,4 @@ -.\" $NetBSD: make.1,v 1.222 2013/08/11 09:53:49 apb Exp $ +.\" $NetBSD: make.1,v 1.230 2014/02/15 18:55:30 sjg Exp $ .\" .\" Copyright (c) 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" from: @(#)make.1 8.4 (Berkeley) 3/19/94 .\" -.Dd August 11, 2013 +.Dd February 14, 2014 .Dt MAKE 1 .Os .Sh NAME @@ -706,6 +706,10 @@ was executed. Refer to the description of .Ql Ev PWD for more details. +.It Va .INCLUDEDFROMDIR +The directory of the file this Makefile was included from. +.It Va .INCLUDEDFROMFILE +The filename of the file this Makefile was included from. .It Ev MAKE The name that .Nm @@ -756,7 +760,7 @@ then output for each target is prefixed .Ql --- target --- the first part of which can be controlled via .Va .MAKE.JOB.PREFIX . -If +If .Va .MAKE.JOB.PREFIX is empty, no token is printed. .br @@ -1077,6 +1081,13 @@ may be used. The wildcard characters may be escaped with a backslash .Pq Ql \e . +As a consequence of the way values are split into words, matched, +and then joined, a construct like +.Dl ${VAR:M*} +will normalise the inter-word spacing, removing all leading and +trailing space, and converting multiple consecutive spaces +to single spaces. +. .It Cm \&:N Ns Ar pattern This is identical to .Ql Cm \&:M , @@ -1220,7 +1231,7 @@ The modifier is just like the .Cm \&:S modifier except that the old and new strings, instead of being -simple strings, are a regular expression (see +simple strings, are an extended regular expression (see .Xr regex 3 ) string .Ar pattern @@ -1250,6 +1261,15 @@ and are orthogonal; the former specifies whether multiple words are potentially affected, the latter whether multiple substitutions can potentially occur within each affected word. +.Pp +As for the +.Cm \&:S +modifier, the +.Ar pattern +and +.Ar replacement +are subjected to variable expansion before being parsed as +regular expressions. .It Cm \&:T Replaces each word in the variable with its last component. .It Cm \&:u @@ -1762,7 +1782,7 @@ or .Fl t options were specified. Normally used to mark recursive -.Nm Ns 's . +.Nm Ns s . .It Ic .META Create a meta file for the target, even if it is flagged as .Ic .PHONY , Modified: stable/10/contrib/bmake/make.h ============================================================================== --- stable/10/contrib/bmake/make.h Sat Dec 27 15:17:59 2014 (r276304) +++ stable/10/contrib/bmake/make.h Sat Dec 27 16:43:22 2014 (r276305) @@ -518,4 +518,8 @@ int str2Lst_Append(Lst, char *, const ch #define MAX(a, b) ((a > b) ? a : b) #endif +#ifndef MAXPATHLEN +#define MAXPATHLEN BMAKE_PATH_MAX +#endif + #endif /* _MAKE_H_ */ Modified: stable/10/contrib/bmake/meta.c ============================================================================== --- stable/10/contrib/bmake/meta.c Sat Dec 27 15:17:59 2014 (r276304) +++ stable/10/contrib/bmake/meta.c Sat Dec 27 16:43:22 2014 (r276305) @@ -1,4 +1,4 @@ -/* $NetBSD: meta.c,v 1.32 2013/06/25 00:20:54 sjg Exp $ */ +/* $NetBSD: meta.c,v 1.33 2013/10/01 05:37:17 sjg Exp $ */ /* * Implement 'meta' mode. @@ -860,6 +860,13 @@ string_match(const void *p, const void * continue; \ } +#define DEQUOTE(p) if (*p == '\'') { \ + char *ep; \ + p++; \ + if ((ep = strchr(p, '\''))) \ + *ep = '\0'; \ + } + Boolean meta_oodate(GNode *gn, Boolean oodate) { @@ -872,6 +879,8 @@ meta_oodate(GNode *gn, Boolean oodate) char fname2[MAXPATHLEN]; char *p; char *cp; + char *link_src; + char *move_target; static size_t cwdlen = 0; static size_t tmplen = 0; FILE *fp; @@ -938,6 +947,8 @@ meta_oodate(GNode *gn, Boolean oodate) oodate = TRUE; break; } + link_src = NULL; + move_target = NULL; /* Find the start of the build monitor section. */ if (!f) { if (strncmp(buf, "-- filemon", 10) == 0) { @@ -1051,16 +1062,21 @@ meta_oodate(GNode *gn, Boolean oodate) break; case 'M': /* renaMe */ - if (Lst_IsEmpty(missingFiles)) - break; + /* + * For 'M'oves we want to check + * the src as for 'R'ead + * and the target as for 'W'rite. + */ + cp = p; /* save this for a second */ + /* now get target */ + if (strsep(&p, " ") == NULL) + continue; + CHECK_VALID_META(p); + move_target = p; + p = cp; /* 'L' and 'M' put single quotes around the args */ - if (*p == '\'') { - char *ep; - - p++; - if ((ep = strchr(p, '\''))) - *ep = '\0'; - } + DEQUOTE(p); + DEQUOTE(move_target); /* FALLTHROUGH */ case 'D': /* unlink */ if (*p == '/' && !Lst_IsEmpty(missingFiles)) { @@ -1072,22 +1088,39 @@ meta_oodate(GNode *gn, Boolean oodate) ln = NULL; /* we're done with it */ } } + if (buf[0] == 'M') { + /* the target of the mv is a file 'W'ritten */ +#ifdef DEBUG_META_MODE + if (DEBUG(META)) + fprintf(debug_file, "meta_oodate: M %s -> %s\n", + p, move_target); +#endif + p = move_target; + goto check_write; + } break; case 'L': /* Link */ - /* we want the target */ + /* + * For 'L'inks check + * the src as for 'R'ead + * and the target as for 'W'rite. + */ + link_src = p; + /* now get target */ if (strsep(&p, " ") == NULL) continue; CHECK_VALID_META(p); /* 'L' and 'M' put single quotes around the args */ - if (*p == '\'') { - char *ep; - - p++; - if ((ep = strchr(p, '\''))) - *ep = '\0'; - } + DEQUOTE(p); + DEQUOTE(link_src); +#ifdef DEBUG_META_MODE + if (DEBUG(META)) + fprintf(debug_file, "meta_oodate: L %s -> %s\n", + link_src, p); +#endif /* FALLTHROUGH */ case 'W': /* Write */ + check_write: /* * If a file we generated within our bailiwick * but outside of .OBJDIR is missing, @@ -1119,6 +1152,14 @@ meta_oodate(GNode *gn, Boolean oodate) Lst_AtEnd(missingFiles, bmake_strdup(p)); } break; + check_link_src: + p = link_src; + link_src = NULL; +#ifdef DEBUG_META_MODE + if (DEBUG(META)) + fprintf(debug_file, "meta_oodate: L src %s\n", p); +#endif + /* FALLTHROUGH */ case 'R': /* Read */ case 'E': /* Exec */ /* @@ -1213,6 +1254,8 @@ meta_oodate(GNode *gn, Boolean oodate) default: break; } + if (!oodate && buf[0] == 'L' && link_src != NULL) + goto check_link_src; } else if (strcmp(buf, "CMD") == 0) { /* * Compare the current command with the one in the Modified: stable/10/contrib/bmake/mk/ChangeLog ============================================================================== --- stable/10/contrib/bmake/mk/ChangeLog Sat Dec 27 15:17:59 2014 (r276304) +++ stable/10/contrib/bmake/mk/ChangeLog Sat Dec 27 16:43:22 2014 (r276305) @@ -1,3 +1,79 @@ +2014-05-22 Simon J. Gerraty + + * install-mk (MK_VERSION): 20140522 + + * lib.mk: use CC to link shlib for linux too + patch from Brendan MacDonell + +2014-05-05 Simon J. Gerraty + + * meta.autodep.mk: add _reldir_{finish,failed} for gathering stats + if WITH_META_STATS is defined. + +2014-05-02 Simon J. Gerraty + + * dirdeps.mk: accept -DWITHOUT_DIRDEPS (same a as -DNO_DIRDEPS) + to supress dirdeps outside of .CURDIR. + +2014-04-05 Simon J. Gerraty + + * Fix spelling errors - patch from Pedro Giffuni + +2014-03-14 Simon J. Gerraty + + * install-mk (MK_VERSION): 20140314 + + * dirdeps.mk (beforedirdeps): a handy hook + + * dirdeps.mk (DIRDEP_MAKE): allow the actual command we run + to visit leaf dirs to be intercepted (eg. for distributed + build). + + * dirdeps.mk (__depdirs): ensure // don't sneak in + + * gendirdeps.mk (DIRDEPS): ensure // don't sneak in + + +2014-02-21 Simon J. Gerraty + + * rst2htm.mk (RST2PDF): add support for rst2pdf + +2014-02-14 Simon J. Gerraty + + * install-mk (MK_VERSION): bump version + * dirdeps.mk (_last_dependfile): use .INCLUDEDFROMFILE if + available. + +2014-02-10 Simon J. Gerraty + + * options.mk: avoid :U so this isn't bmake dependent + +2014-02-09 Simon J. Gerraty + + * options.mk: cleanup and simplify semanitcs + NO_* dominates all, if both WITH_* and WITHOUT_* + are defined then result is DOMINATE_* which defaults to "no". + Ie. WITHOUT_ normally wins. + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sat Dec 27 17:02:41 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 046192B4; Sat, 27 Dec 2014 17:02:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3921C877; Sat, 27 Dec 2014 17:02:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBRH2AlF090480; Sat, 27 Dec 2014 17:02:10 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBRH2A1p090479; Sat, 27 Dec 2014 17:02:10 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201412271702.sBRH2A1p090479@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 27 Dec 2014 17:02:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276306 - head/sys/boot/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2014 17:02:41 -0000 Author: ian Date: Sat Dec 27 17:02:09 2014 New Revision: 276306 URL: https://svnweb.freebsd.org/changeset/base/276306 Log: Use the proper markup for single quotes. Modified: head/sys/boot/common/loader.8 Modified: head/sys/boot/common/loader.8 ============================================================================== --- head/sys/boot/common/loader.8 Sat Dec 27 16:43:22 2014 (r276305) +++ head/sys/boot/common/loader.8 Sat Dec 27 17:02:09 2014 (r276306) @@ -671,8 +671,9 @@ Overrides the compile-time set value of or the preset default of 512. Must be a power of 2. .It Va twiddle_divisor -Throttles the output of the `twiddle' I/O progress indicator displayed -while loading the kernel and modules. +Throttles the output of the +.Sq twiddle +I/O progress indicator displayed while loading the kernel and modules. This is useful on slow serial consoles where the time spent waiting for these characters to be written can add up to many seconds. The default is 1 (full speed); a value of 2 spins half as fast, and so on. From owner-svn-src-all@FreeBSD.ORG Sat Dec 27 17:10:17 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7E5414C9; Sat, 27 Dec 2014 17:10:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 68829FDE; Sat, 27 Dec 2014 17:10:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBRHAH67092179; Sat, 27 Dec 2014 17:10:17 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBRHAFlW092169; Sat, 27 Dec 2014 17:10:15 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201412271710.sBRHAFlW092169@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 27 Dec 2014 17:10:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276307 - in stable/10/gnu/usr.bin/groff: . src src/devices src/libs src/preproc src/roff src/utils X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2014 17:10:17 -0000 Author: ngie Date: Sat Dec 27 17:10:14 2014 New Revision: 276307 URL: https://svnweb.freebsd.org/changeset/base/276307 Log: MFC r275866: Parallelize building gnu/usr.bin/groff This speeds up building the directory from the bootstrap-tools stage in buildworld as well as building from the subdirectory Based on a patch submitted via -arch: https://lists.freebsd.org/pipermail/freebsd-arch/2014-December/016493.html Submitted by: Jia-Shiun Li Sponsored by: EMC / Isilon Storage Division Modified: stable/10/gnu/usr.bin/groff/Makefile stable/10/gnu/usr.bin/groff/src/Makefile stable/10/gnu/usr.bin/groff/src/devices/Makefile stable/10/gnu/usr.bin/groff/src/libs/Makefile stable/10/gnu/usr.bin/groff/src/preproc/Makefile stable/10/gnu/usr.bin/groff/src/roff/Makefile stable/10/gnu/usr.bin/groff/src/utils/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/gnu/usr.bin/groff/Makefile ============================================================================== --- stable/10/gnu/usr.bin/groff/Makefile Sat Dec 27 17:02:09 2014 (r276306) +++ stable/10/gnu/usr.bin/groff/Makefile Sat Dec 27 17:10:14 2014 (r276307) @@ -2,4 +2,8 @@ SUBDIR= contrib doc font man src tmac +.for subdir in ${SUBDIR:Nsrc} +SUBDIR_DEPEND_${subdir}= src +.endfor + .include Modified: stable/10/gnu/usr.bin/groff/src/Makefile ============================================================================== --- stable/10/gnu/usr.bin/groff/src/Makefile Sat Dec 27 17:02:09 2014 (r276306) +++ stable/10/gnu/usr.bin/groff/src/Makefile Sat Dec 27 17:10:14 2014 (r276307) @@ -2,4 +2,10 @@ SUBDIR= libs devices preproc roff utils +SUBDIR_PARALLEL= + +.for subdir in ${SUBDIR:Nlibs} +SUBDIR_DEPEND_${subdir}= libs +.endfor + .include Modified: stable/10/gnu/usr.bin/groff/src/devices/Makefile ============================================================================== --- stable/10/gnu/usr.bin/groff/src/devices/Makefile Sat Dec 27 17:02:09 2014 (r276306) +++ stable/10/gnu/usr.bin/groff/src/devices/Makefile Sat Dec 27 17:10:14 2014 (r276307) @@ -2,4 +2,6 @@ SUBDIR= grodvi grohtml grolbp grolj4 grops grotty +SUBDIR_PARALLEL= + .include Modified: stable/10/gnu/usr.bin/groff/src/libs/Makefile ============================================================================== --- stable/10/gnu/usr.bin/groff/src/libs/Makefile Sat Dec 27 17:02:09 2014 (r276306) +++ stable/10/gnu/usr.bin/groff/src/libs/Makefile Sat Dec 27 17:10:14 2014 (r276307) @@ -2,4 +2,6 @@ SUBDIR= libgroff libdriver libbib +SUBDIR_PARALLEL= + .include Modified: stable/10/gnu/usr.bin/groff/src/preproc/Makefile ============================================================================== --- stable/10/gnu/usr.bin/groff/src/preproc/Makefile Sat Dec 27 17:02:09 2014 (r276306) +++ stable/10/gnu/usr.bin/groff/src/preproc/Makefile Sat Dec 27 17:10:14 2014 (r276307) @@ -2,4 +2,6 @@ SUBDIR= eqn grn html pic refer soelim tbl +SUBDIR_PARALLEL= + .include Modified: stable/10/gnu/usr.bin/groff/src/roff/Makefile ============================================================================== --- stable/10/gnu/usr.bin/groff/src/roff/Makefile Sat Dec 27 17:02:09 2014 (r276306) +++ stable/10/gnu/usr.bin/groff/src/roff/Makefile Sat Dec 27 17:10:14 2014 (r276307) @@ -2,4 +2,6 @@ SUBDIR= groff grog nroff psroff troff +SUBDIR_PARALLEL= + .include Modified: stable/10/gnu/usr.bin/groff/src/utils/Makefile ============================================================================== --- stable/10/gnu/usr.bin/groff/src/utils/Makefile Sat Dec 27 17:02:09 2014 (r276306) +++ stable/10/gnu/usr.bin/groff/src/utils/Makefile Sat Dec 27 17:10:14 2014 (r276307) @@ -2,4 +2,6 @@ SUBDIR= addftinfo afmtodit hpftodit indxbib lkbib lookbib pfbtops tfmtodit +SUBDIR_PARALLEL= + .include From owner-svn-src-all@FreeBSD.ORG Sat Dec 27 17:10:36 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B634C5F7; Sat, 27 Dec 2014 17:10:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A2329FE9; Sat, 27 Dec 2014 17:10:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBRHAaQY092734; Sat, 27 Dec 2014 17:10:36 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBRHAaqH092733; Sat, 27 Dec 2014 17:10:36 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201412271710.sBRHAaqH092733@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sat, 27 Dec 2014 17:10:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276308 - in head/sys: conf contrib/dev/iwn X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2014 17:10:36 -0000 Author: marius Date: Sat Dec 27 17:10:35 2014 New Revision: 276308 URL: https://svnweb.freebsd.org/changeset/base/276308 Log: Use the same 6000 series g2{a,b} firmware versions when embedding these images into the kernel as currently included into iwn6000g2{a,b}fw.ko and delete the old files, missed in r254199 and r259135 respectively. MFC after: 3 days Deleted: head/sys/contrib/dev/iwn/iwlwifi-6000g2a-17.168.5.2.fw.uu head/sys/contrib/dev/iwn/iwlwifi-6000g2b-17.168.5.2.fw.uu Modified: head/sys/conf/files Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Sat Dec 27 17:10:14 2014 (r276307) +++ head/sys/conf/files Sat Dec 27 17:10:35 2014 (r276308) @@ -1731,7 +1731,7 @@ iwn6000g2afw.fwo optional iwn6000g2afw no-implicit-rule \ clean "iwn6000g2afw.fwo" iwn6000g2a.fw optional iwn6000g2afw | iwnfw \ - dependency "$S/contrib/dev/iwn/iwlwifi-6000g2a-17.168.5.2.fw.uu" \ + dependency "$S/contrib/dev/iwn/iwlwifi-6000g2a-18.168.6.1.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwn6000g2a.fw" @@ -1745,7 +1745,7 @@ iwn6000g2bfw.fwo optional iwn6000g2bfw no-implicit-rule \ clean "iwn6000g2bfw.fwo" iwn6000g2b.fw optional iwn6000g2bfw | iwnfw \ - dependency "$S/contrib/dev/iwn/iwlwifi-6000g2b-17.168.5.2.fw.uu" \ + dependency "$S/contrib/dev/iwn/iwlwifi-6000g2b-18.168.6.1.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwn6000g2b.fw" From owner-svn-src-all@FreeBSD.ORG Sat Dec 27 17:13:10 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B9D05754; Sat, 27 Dec 2014 17:13:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A6001641E5; Sat, 27 Dec 2014 17:13:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBRHDAOL095441; Sat, 27 Dec 2014 17:13:10 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBRHDAPR095440; Sat, 27 Dec 2014 17:13:10 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201412271713.sBRHDAPR095440@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 27 Dec 2014 17:13:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276309 - head/share/man/man7 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2014 17:13:10 -0000 Author: ngie Date: Sat Dec 27 17:13:09 2014 New Revision: 276309 URL: https://svnweb.freebsd.org/changeset/base/276309 Log: Bump .Dd for change done in r275908 Modified: head/share/man/man7/build.7 Modified: head/share/man/man7/build.7 ============================================================================== --- head/share/man/man7/build.7 Sat Dec 27 17:10:35 2014 (r276308) +++ head/share/man/man7/build.7 Sat Dec 27 17:13:09 2014 (r276309) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 25, 2014 +.Dd December 18, 2014 .Dt BUILD 7 .Os .Sh NAME From owner-svn-src-all@FreeBSD.ORG Sat Dec 27 17:14:55 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 361988A2; Sat, 27 Dec 2014 17:14:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2194664201; Sat, 27 Dec 2014 17:14:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBRHEtKb095715; Sat, 27 Dec 2014 17:14:55 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBRHEsOm095714; Sat, 27 Dec 2014 17:14:54 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201412271714.sBRHEsOm095714@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 27 Dec 2014 17:14:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276310 - stable/10/share/man/man7 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2014 17:14:55 -0000 Author: ngie Date: Sat Dec 27 17:14:53 2014 New Revision: 276310 URL: https://svnweb.freebsd.org/changeset/base/276310 Log: MFC r275908,r276309: r275908: Document STRIP_CMD in build(7) and note its importance with LOCAL_ITOOLS Phabric: D1335 Reviewed by: brueffer Sponsored by: EMC / Isilon Storage Division r276309: Bump .Dd for change done in r275908 Modified: stable/10/share/man/man7/build.7 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man7/build.7 ============================================================================== --- stable/10/share/man/man7/build.7 Sat Dec 27 17:13:09 2014 (r276309) +++ stable/10/share/man/man7/build.7 Sat Dec 27 17:14:53 2014 (r276310) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 25, 2014 +.Dd December 27, 2014 .Dt BUILD 7 .Os .Sh NAME @@ -445,6 +445,21 @@ process. .Bd -literal -offset indent make PORTS_MODULES=emulators/kqemu-kmod kernel .Ed +.It Va STRIP_CMD +Command to use at install time when stripping binaries. +Be sure to add any additional tools required to run +.Va STRIP_CMD +to the +.Va LOCAL_ITOOLS +.Xr make 1 +variable before running the +.Cm distributeworld +or +.Cm installworld +targets. +See +.Xr install 1 +for more details. .It Va SUBDIR_OVERRIDE Override the default list of sub-directories and only build the sub-directory named in this variable. From owner-svn-src-all@FreeBSD.ORG Sat Dec 27 17:20:25 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 84757A56; Sat, 27 Dec 2014 17:20:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 704F464323; Sat, 27 Dec 2014 17:20:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBRHKPMf098078; Sat, 27 Dec 2014 17:20:25 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBRHKPrm098077; Sat, 27 Dec 2014 17:20:25 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201412271720.sBRHKPrm098077@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 27 Dec 2014 17:20:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276311 - stable/10 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2014 17:20:25 -0000 Author: ngie Date: Sat Dec 27 17:20:24 2014 New Revision: 276311 URL: https://svnweb.freebsd.org/changeset/base/276311 Log: MFC r275867: Fix sporadic build failures due to race when running make installworld when strip gets replaced at install time by adding it to ITOOLS for the default usr.bin/xinstall STRIP_CMD This will fix the failure noted in this Jenkins build step: https://jenkins.freebsd.org/job/Build-UFS-image/688/ This will also fix the issue reported by alfred@ dealing with installing on targets that differ from build hosts (e.g. installing on i386/i386 when built on amd64/amd64) Sponsored by: EMC / Isilon Storage Division Modified: stable/10/Makefile.inc1 Directory Properties: stable/10/ (props changed) Modified: stable/10/Makefile.inc1 ============================================================================== --- stable/10/Makefile.inc1 Sat Dec 27 17:14:53 2014 (r276310) +++ stable/10/Makefile.inc1 Sat Dec 27 17:20:24 2014 (r276311) @@ -779,7 +779,7 @@ _nmtree_itools= nmtree ITOOLS= [ awk cap_mkdb cat chflags chmod chown \ date echo egrep find grep id install ${_install-info} \ ln lockf make mkdir mtree ${_nmtree_itools} mv pwd_mkdb \ - rm sed sh sysctl test true uname wc ${_zoneinfo} \ + rm sed sh strip sysctl test true uname wc ${_zoneinfo} \ ${LOCAL_ITOOLS} # Needed for share/man From owner-svn-src-all@FreeBSD.ORG Sat Dec 27 17:36:50 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 763EBDA4; Sat, 27 Dec 2014 17:36:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 61DE0645DC; Sat, 27 Dec 2014 17:36:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBRHaovP005570; Sat, 27 Dec 2014 17:36:50 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBRHaoHl005569; Sat, 27 Dec 2014 17:36:50 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201412271736.sBRHaoHl005569@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 27 Dec 2014 17:36:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276312 - stable/10/sys/arm/include X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2014 17:36:50 -0000 Author: ian Date: Sat Dec 27 17:36:49 2014 New Revision: 276312 URL: https://svnweb.freebsd.org/changeset/base/276312 Log: MFC r276165, r276166: Define the old-school arm arch constants we still use internally based on the somewhat newer constants predefined by the compiler. This will allow userland apps to use various machine/foo.h headers without CPUTYPE defined. Modified: stable/10/sys/arm/include/cpuconf.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/include/cpuconf.h ============================================================================== --- stable/10/sys/arm/include/cpuconf.h Sat Dec 27 17:20:24 2014 (r276311) +++ stable/10/sys/arm/include/cpuconf.h Sat Dec 27 17:36:49 2014 (r276312) @@ -99,6 +99,29 @@ #endif #define ARM_NARCH (ARM_ARCH_4 + ARM_ARCH_5 + ARM_ARCH_6 | ARM_ARCH_7A) + +/* + * Compatibility for userland builds that have no CPUTYPE defined. Use the ARCH + * constants predefined by the compiler to define our old-school arch constants. + * This is a stopgap measure to tide us over until the conversion of all code + * to the newer ACLE constants defined by ARM (see acle-compat.h). + */ +#if ARM_NARCH == 0 +#if defined(__ARM_ARCH_4T__) +#undef ARM_ARCH_4 +#undef ARM_NARCH +#define ARM_ARCH_4 1 +#define ARM_NARCH 1 +#define CPU_ARM9 1 +#elif defined(__ARM_ARCH_6ZK__) +#undef ARM_ARCH_6 +#undef ARM_NARCH +#define ARM_ARCH_6 1 +#define ARM_NARCH 1 +#define CPU_ARM1176 1 +#endif +#endif + #if ARM_NARCH == 0 && !defined(KLD_MODULE) && defined(_KERNEL) #error ARM_NARCH is 0 #endif From owner-svn-src-all@FreeBSD.ORG Sat Dec 27 18:07:34 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2F86070E; Sat, 27 Dec 2014 18:07:34 +0000 (UTC) Received: from mail-wi0-x22d.google.com (mail-wi0-x22d.google.com [IPv6:2a00:1450:400c:c05::22d]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B536064A21; Sat, 27 Dec 2014 18:07:33 +0000 (UTC) Received: by mail-wi0-f173.google.com with SMTP id r20so18950227wiv.0; Sat, 27 Dec 2014 10:07:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=2ZZEiE78ssq/CHiPRwA1lo4JYJ4amjPS6t/WjVaoWNM=; b=FvjBvsi+niyVTQ+501x95ZsaLD1+3GVmW5Ew5dwGZ3ijKbrp7YX8PxfIet/JIc2jWv Uyex1Kjy2S/CA0YQ+s6kysYani2AGumGlu0ZAHn3we1jruDzUxf4+JeDg+Af0N29gxVX 19WJwAEidZk9FVxuimi/BavKRdFhFJAEC/aA7IBCWUUzktQHWQhageQtLL4bpCdZGr3H wuOM6R2TLW+5W5CPRyM2kngI5lXjBXzvtHGYgBeCrxL4m/aUGzAxf3P/MQF5HYjTvVou SF4M8Bp3PIeXTa2604vXMVEz/x0PO9BoKjrr6AxcUpVU7AuaUoA5v+bApMhMFqK19slG rLbA== MIME-Version: 1.0 X-Received: by 10.194.24.103 with SMTP id t7mr93200320wjf.15.1419703651922; Sat, 27 Dec 2014 10:07:31 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.216.106.195 with HTTP; Sat, 27 Dec 2014 10:07:31 -0800 (PST) In-Reply-To: <201412271710.sBRHAaqH092733@svn.freebsd.org> References: <201412271710.sBRHAaqH092733@svn.freebsd.org> Date: Sat, 27 Dec 2014 10:07:31 -0800 X-Google-Sender-Auth: pCPw_WYY9pdd49qUkDUd71KvPGc Message-ID: Subject: Re: svn commit: r276308 - in head/sys: conf contrib/dev/iwn From: Adrian Chadd To: Marius Strobl Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2014 18:07:34 -0000 Hi! Thanks for catching this! -adrian On 27 December 2014 at 09:10, Marius Strobl wrote: > Author: marius > Date: Sat Dec 27 17:10:35 2014 > New Revision: 276308 > URL: https://svnweb.freebsd.org/changeset/base/276308 > > Log: > Use the same 6000 series g2{a,b} firmware versions when embedding these > images into the kernel as currently included into iwn6000g2{a,b}fw.ko > and delete the old files, missed in r254199 and r259135 respectively. > > MFC after: 3 days > > Deleted: > head/sys/contrib/dev/iwn/iwlwifi-6000g2a-17.168.5.2.fw.uu > head/sys/contrib/dev/iwn/iwlwifi-6000g2b-17.168.5.2.fw.uu > Modified: > head/sys/conf/files > > Modified: head/sys/conf/files > ============================================================================== > --- head/sys/conf/files Sat Dec 27 17:10:14 2014 (r276307) > +++ head/sys/conf/files Sat Dec 27 17:10:35 2014 (r276308) > @@ -1731,7 +1731,7 @@ iwn6000g2afw.fwo optional iwn6000g2afw > no-implicit-rule \ > clean "iwn6000g2afw.fwo" > iwn6000g2a.fw optional iwn6000g2afw | iwnfw \ > - dependency "$S/contrib/dev/iwn/iwlwifi-6000g2a-17.168.5.2.fw.uu" \ > + dependency "$S/contrib/dev/iwn/iwlwifi-6000g2a-18.168.6.1.fw.uu" \ > compile-with "${NORMAL_FW}" \ > no-obj no-implicit-rule \ > clean "iwn6000g2a.fw" > @@ -1745,7 +1745,7 @@ iwn6000g2bfw.fwo optional iwn6000g2bfw > no-implicit-rule \ > clean "iwn6000g2bfw.fwo" > iwn6000g2b.fw optional iwn6000g2bfw | iwnfw \ > - dependency "$S/contrib/dev/iwn/iwlwifi-6000g2b-17.168.5.2.fw.uu" \ > + dependency "$S/contrib/dev/iwn/iwlwifi-6000g2b-18.168.6.1.fw.uu" \ > compile-with "${NORMAL_FW}" \ > no-obj no-implicit-rule \ > clean "iwn6000g2b.fw" > From owner-svn-src-all@FreeBSD.ORG Sat Dec 27 18:24:17 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0FD5FB25; Sat, 27 Dec 2014 18:24:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F02DB66BD9; Sat, 27 Dec 2014 18:24:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBRIOGtu028542; Sat, 27 Dec 2014 18:24:16 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBRIOGTH028541; Sat, 27 Dec 2014 18:24:16 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201412271824.sBRIOGTH028541@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sat, 27 Dec 2014 18:24:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276313 - head/sys/dev/bce X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2014 18:24:17 -0000 Author: marius Date: Sat Dec 27 18:24:15 2014 New Revision: 276313 URL: https://svnweb.freebsd.org/changeset/base/276313 Log: Const'ify a firmware image missed in r251142. MFC after: 3 days Modified: head/sys/dev/bce/if_bcefw.h Modified: head/sys/dev/bce/if_bcefw.h ============================================================================== --- head/sys/dev/bce/if_bcefw.h Sat Dec 27 17:36:49 2014 (r276312) +++ head/sys/dev/bce/if_bcefw.h Sat Dec 27 18:24:15 2014 (r276313) @@ -7997,7 +7997,7 @@ const u32 bce_TPAT_b09FwBss[(0x12b4/4) + const u32 bce_TPAT_b09FwSbss[(0x3c/4) + 1] = { 0x0 }; const u32 bce_TPAT_b09FwSdata[(0x0/4) + 1] = { 0x0 }; - + int bce_COM_b09FwReleaseMajor = 0x6; int bce_COM_b09FwReleaseMinor = 0x0; int bce_COM_b09FwReleaseFix = 0x11; @@ -11727,8 +11727,8 @@ const u32 bce_RXP_b09FwText[(0x9090/4) + 0x90cf0009, 0x240d0004, 0x31ee00ff, 0x11cdfd85, 0x24020001, 0x3c010801, 0xa022950d, 0xa002154, 0x0, 0x0 }; -u32 bce_RXP_b09FwData[(0x0/4) + 1] = { 0x0 }; -u32 bce_RXP_b09FwRodata[(0x33c/4) + 1] = { +const u32 bce_RXP_b09FwData[(0x0/4) + 1] = { 0x0 }; +const u32 bce_RXP_b09FwRodata[(0x33c/4) + 1] = { 0x8003344, 0x8003344, 0x8003420, 0x80033f4, 0x80033d8, 0x8003328, 0x8003328, 0x8003328, 0x800334c, From owner-svn-src-all@FreeBSD.ORG Sat Dec 27 18:54:41 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2D349250; Sat, 27 Dec 2014 18:54:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ACF1966F70; Sat, 27 Dec 2014 18:54:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBRIse9J042686; Sat, 27 Dec 2014 18:54:40 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBRIseMq042684; Sat, 27 Dec 2014 18:54:40 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201412271854.sBRIseMq042684@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Sat, 27 Dec 2014 18:54:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276314 - head/sys/arm/broadcom/bcm2835 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2014 18:54:41 -0000 Author: loos Date: Sat Dec 27 18:54:39 2014 New Revision: 276314 URL: https://svnweb.freebsd.org/changeset/base/276314 Log: Convert the BSC (i2c) driver to use the new iicbus_get_frequency(). Tested on: Raspberry pi Modified: head/sys/arm/broadcom/bcm2835/bcm2835_bsc.c head/sys/arm/broadcom/bcm2835/bcm2835_bscvar.h Modified: head/sys/arm/broadcom/bcm2835/bcm2835_bsc.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_bsc.c Sat Dec 27 18:24:15 2014 (r276313) +++ head/sys/arm/broadcom/bcm2835/bcm2835_bsc.c Sat Dec 27 18:54:39 2014 (r276314) @@ -53,6 +53,7 @@ __FBSDID("$FreeBSD$"); #include "iicbus_if.h" static void bcm_bsc_intr(void *); +static int bcm_bsc_detach(device_t); static void bcm_bsc_modifyreg(struct bcm_bsc_softc *sc, uint32_t off, uint32_t mask, @@ -72,10 +73,8 @@ bcm_bsc_clock_proc(SYSCTL_HANDLER_ARGS) { struct bcm_bsc_softc *sc; uint32_t clk; - int error; sc = (struct bcm_bsc_softc *)arg1; - BCM_BSC_LOCK(sc); clk = BCM_BSC_READ(sc, BCM_BSC_CLOCK); BCM_BSC_UNLOCK(sc); @@ -83,20 +82,8 @@ bcm_bsc_clock_proc(SYSCTL_HANDLER_ARGS) if (clk == 0) clk = 32768; clk = BCM_BSC_CORE_CLK / clk; - error = sysctl_handle_int(oidp, &clk, sizeof(clk), req); - if (error != 0 || req->newptr == NULL) - return (error); - clk = BCM_BSC_CORE_CLK / clk; - if (clk % 2) - clk--; - if (clk > 0xffff) - clk = 0xffff; - BCM_BSC_LOCK(sc); - BCM_BSC_WRITE(sc, BCM_BSC_CLOCK, clk); - BCM_BSC_UNLOCK(sc); - - return (0); + return (sysctl_handle_int(oidp, &clk, 0, req)); } static int @@ -192,7 +179,7 @@ bcm_bsc_sysctl_init(struct bcm_bsc_softc ctx = device_get_sysctl_ctx(sc->sc_dev); tree_node = device_get_sysctl_tree(sc->sc_dev); tree = SYSCTL_CHILDREN(tree_node); - SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "clock", + SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "frequency", CTLFLAG_RW | CTLTYPE_UINT, sc, sizeof(*sc), bcm_bsc_clock_proc, "IU", "I2C BUS clock frequency"); SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "clock_stretch", @@ -307,7 +294,11 @@ bcm_bsc_attach(device_t dev) bcm_bsc_reset(sc); BCM_BSC_UNLOCK(sc); - device_add_child(dev, "iicbus", -1); + sc->sc_iicbus = device_add_child(dev, "iicbus", -1); + if (sc->sc_iicbus == NULL) { + bcm_bsc_detach(dev); + return (ENXIO); + } return (bus_generic_attach(dev)); } @@ -462,29 +453,16 @@ static int bcm_bsc_iicbus_reset(device_t dev, u_char speed, u_char addr, u_char *oldaddr) { struct bcm_bsc_softc *sc; - uint32_t freq; - + uint32_t busfreq; + sc = device_get_softc(dev); BCM_BSC_LOCK(sc); bcm_bsc_reset(sc); - freq = 0; - switch (speed) { - case IIC_SLOW: - freq = BCM_BSC_SLOW; - break; - case IIC_FAST: - freq = BCM_BSC_FAST; - break; - case IIC_FASTEST: - freq = BCM_BSC_FASTEST; - break; - case IIC_UNKNOWN: - default: - /* Reuse last frequency. */ - break; - } - if (freq != 0) - BCM_BSC_WRITE(sc, BCM_BSC_CLOCK, BCM_BSC_CORE_CLK / freq); + if (sc->sc_iicbus == NULL) + busfreq = 100000; + else + busfreq = IICBUS_GET_FREQUENCY(sc->sc_iicbus, speed); + BCM_BSC_WRITE(sc, BCM_BSC_CLOCK, BCM_BSC_CORE_CLK / busfreq); BCM_BSC_UNLOCK(sc); return (IIC_ENOADDR); Modified: head/sys/arm/broadcom/bcm2835/bcm2835_bscvar.h ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_bscvar.h Sat Dec 27 18:24:15 2014 (r276313) +++ head/sys/arm/broadcom/bcm2835/bcm2835_bscvar.h Sat Dec 27 18:54:39 2014 (r276314) @@ -41,6 +41,7 @@ struct { struct bcm_bsc_softc { device_t sc_dev; + device_t sc_iicbus; struct mtx sc_mtx; struct resource * sc_mem_res; struct resource * sc_irq_res; @@ -56,10 +57,6 @@ struct bcm_bsc_softc { #define BCM_I2C_READ 0x02 #define BCM_I2C_ERROR 0x04 -#define BCM_BSC_SLOW 10000 /* 10 kHz. */ -#define BCM_BSC_FAST 50000 /* 50 kHz. */ -#define BCM_BSC_FASTEST 100000 /* 100 kHz. */ - #define BCM_BSC_WRITE(_sc, _off, _val) \ bus_space_write_4(_sc->sc_bst, _sc->sc_bsh, _off, _val) #define BCM_BSC_READ(_sc, _off) \ From owner-svn-src-all@FreeBSD.ORG Sat Dec 27 19:56:05 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 76E54C74; Sat, 27 Dec 2014 19:56:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6329B19DA; Sat, 27 Dec 2014 19:56:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBRJu5G9070955; Sat, 27 Dec 2014 19:56:05 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBRJu53t070954; Sat, 27 Dec 2014 19:56:05 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201412271956.sBRJu53t070954@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Sat, 27 Dec 2014 19:56:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276315 - head/sys/arm/ti X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2014 19:56:05 -0000 Author: loos Date: Sat Dec 27 19:56:04 2014 New Revision: 276315 URL: https://svnweb.freebsd.org/changeset/base/276315 Log: Fix a off-by-one bug. Pointy hat to: loos Modified: head/sys/arm/ti/ti_gpio.c Modified: head/sys/arm/ti/ti_gpio.c ============================================================================== --- head/sys/arm/ti/ti_gpio.c Sat Dec 27 18:54:39 2014 (r276314) +++ head/sys/arm/ti/ti_gpio.c Sat Dec 27 19:56:04 2014 (r276315) @@ -334,7 +334,7 @@ static int ti_gpio_valid_pin(struct ti_gpio_softc *sc, int pin) { - if (pin > sc->sc_maxpin || + if (pin >= sc->sc_maxpin || TI_GPIO_BANK(pin) >= ti_max_gpio_banks() || sc->sc_mem_res[TI_GPIO_BANK(pin)] == NULL) { return (EINVAL); @@ -755,6 +755,7 @@ ti_gpio_attach(device_t dev) sc->sc_dev = dev; TI_GPIO_LOCK_INIT(sc); ti_gpio_pin_max(dev, &sc->sc_maxpin); + sc->sc_maxpin++; /* There are up to 6 different GPIO register sets located in different * memory areas on the chip. The memory range should have been set for From owner-svn-src-all@FreeBSD.ORG Sat Dec 27 20:06:18 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F1130E3C; Sat, 27 Dec 2014 20:06:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DD44B1B41; Sat, 27 Dec 2014 20:06:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBRK6HOj075801; Sat, 27 Dec 2014 20:06:17 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBRK6Hh2075800; Sat, 27 Dec 2014 20:06:17 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201412272006.sBRK6Hh2075800@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Sat, 27 Dec 2014 20:06:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276316 - head/sys/arm/ti X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2014 20:06:18 -0000 Author: loos Date: Sat Dec 27 20:06:16 2014 New Revision: 276316 URL: https://svnweb.freebsd.org/changeset/base/276316 Log: Remove unnecessary code and, instead, use the provided iicbus_null_callback callback. Modified: head/sys/arm/ti/ti_i2c.c Modified: head/sys/arm/ti/ti_i2c.c ============================================================================== --- head/sys/arm/ti/ti_i2c.c Sat Dec 27 19:56:04 2014 (r276315) +++ head/sys/arm/ti/ti_i2c.c Sat Dec 27 20:06:16 2014 (r276316) @@ -473,38 +473,6 @@ out: return (err); } -/** - * ti_i2c_callback - as we only provide iicbus_transfer() interface - * we don't need to implement the serialization here. - * @dev: i2c device handle - * - * - * - * LOCKING: - * Called from timer context - * - * RETURNS: - * EH_HANDLED or EH_NOT_HANDLED - */ -static int -ti_i2c_callback(device_t dev, int index, caddr_t data) -{ - int error = 0; - - switch (index) { - case IIC_REQUEST_BUS: - break; - - case IIC_RELEASE_BUS: - break; - - default: - error = EINVAL; - } - - return (error); -} - static int ti_i2c_reset(struct ti_i2c_softc *sc, u_char speed) { @@ -955,7 +923,7 @@ static device_method_t ti_i2c_methods[] DEVMETHOD(ofw_bus_get_node, ti_i2c_get_node), /* iicbus interface */ - DEVMETHOD(iicbus_callback, ti_i2c_callback), + DEVMETHOD(iicbus_callback, iicbus_null_callback), DEVMETHOD(iicbus_reset, ti_i2c_iicbus_reset), DEVMETHOD(iicbus_transfer, ti_i2c_transfer), From owner-svn-src-all@FreeBSD.ORG Sat Dec 27 20:33:05 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BAC9C461; Sat, 27 Dec 2014 20:33:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A6EC164F9B; Sat, 27 Dec 2014 20:33:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBRKX5MQ089383; Sat, 27 Dec 2014 20:33:05 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBRKX5Y6089382; Sat, 27 Dec 2014 20:33:05 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201412272033.sBRKX5Y6089382@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 27 Dec 2014 20:33:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276317 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2014 20:33:05 -0000 Author: ngie Date: Sat Dec 27 20:33:04 2014 New Revision: 276317 URL: https://svnweb.freebsd.org/changeset/base/276317 Log: Add LIBADD to PROG_VARS, similar to DPADD/LDADD Modified: head/share/mk/bsd.progs.mk Modified: head/share/mk/bsd.progs.mk ============================================================================== --- head/share/mk/bsd.progs.mk Sat Dec 27 20:06:16 2014 (r276316) +++ head/share/mk/bsd.progs.mk Sat Dec 27 20:33:04 2014 (r276317) @@ -43,7 +43,7 @@ PROG ?= $t .if defined(PROG) # just one of many PROG_OVERRIDE_VARS += BINDIR DPSRCS MAN SRCS -PROG_VARS += CFLAGS CPPFLAGS CXXFLAGS DPADD DPLIBS LDADD LDFLAGS ${PROG_OVERRIDE_VARS} +PROG_VARS += CFLAGS CPPFLAGS CXXFLAGS DPADD DPLIBS LDADD LIBADD LDFLAGS ${PROG_OVERRIDE_VARS} .for v in ${PROG_VARS:O:u} .if empty(${PROG_OVERRIDE_VARS:M$v}) .if defined(${v}.${PROG}) From owner-svn-src-all@FreeBSD.ORG Sat Dec 27 20:48:38 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 61470751; Sat, 27 Dec 2014 20:48:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4D3EB2D2; Sat, 27 Dec 2014 20:48:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBRKmcqi094638; Sat, 27 Dec 2014 20:48:38 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBRKmbA8094633; Sat, 27 Dec 2014 20:48:37 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201412272048.sBRKmbA8094633@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 27 Dec 2014 20:48:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276318 - in head/lib/libc/tests: . hash X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2014 20:48:38 -0000 Author: ngie Date: Sat Dec 27 20:48:36 2014 New Revision: 276318 URL: https://svnweb.freebsd.org/changeset/base/276318 Log: Build/install lib/libc/tests/hash/t_sha2 if MK_OPENSSL == yes Reported by: Beeblebrox Modified: head/lib/libc/tests/Makefile head/lib/libc/tests/hash/Makefile Modified: head/lib/libc/tests/Makefile ============================================================================== Modified: head/lib/libc/tests/hash/Makefile ============================================================================== --- head/lib/libc/tests/hash/Makefile Sat Dec 27 20:33:04 2014 (r276317) +++ head/lib/libc/tests/hash/Makefile Sat Dec 27 20:48:36 2014 (r276318) @@ -1,8 +1,14 @@ # $FreeBSD$ +.include + TESTSDIR= ${TESTSBASE}/lib/libc/hash -NETBSD_ATF_TESTS_C= sha2_test +NETBSD_ATF_TESTS_C= + +.if ${MK_OPENSSL} != "no" +NETBSD_ATF_TESTS_C+= sha2_test +.endif NETBSD_ATF_TESTS_SH= hash_test From owner-svn-src-all@FreeBSD.ORG Sat Dec 27 20:56:07 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A5EB7974; Sat, 27 Dec 2014 20:56:07 +0000 (UTC) Received: from st11p02mm-asmtp002.mac.com (st11p02mm-asmtpout002.mac.com [17.172.220.237]) (using TLSv1.2 with cipher DHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7A92D3F5; Sat, 27 Dec 2014 20:56:07 +0000 (UTC) Received: from fukuyama.hsd1.ca.comcast.net (unknown [73.162.13.215]) by st11p02mm-asmtp002.mac.com (Oracle Communications Messaging Server 7.0.5.33.0 64bit (built Aug 27 2014)) with ESMTPSA id <0NH90030SE51O720@st11p02mm-asmtp002.mac.com>; Sat, 27 Dec 2014 20:55:51 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.13.68,1.0.33,0.0.0000 definitions=2014-12-27_02:2014-12-24,2014-12-27,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1412080000 definitions=main-1412270229 Content-type: text/plain; charset=us-ascii MIME-version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Subject: Re: svn commit: r276297 - head/sys/arm/broadcom/bcm2835 From: Rui Paulo In-reply-to: <201412271352.sBRDqY6M098448@svn.freebsd.org> Date: Sat, 27 Dec 2014 12:55:48 -0800 Content-transfer-encoding: quoted-printable Message-id: References: <201412271352.sBRDqY6M098448@svn.freebsd.org> To: Luiz Otavio O Souza X-Mailer: Apple Mail (2.1993) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2014 20:56:07 -0000 On Dec 27, 2014, at 05:52, Luiz Otavio O Souza wrote: >=20 > Author: loos > Date: Sat Dec 27 13:52:33 2014 > New Revision: 276297 > URL: https://svnweb.freebsd.org/changeset/base/276297 >=20 > Log: > On interrupt handler, save the actual data read from mbox. The = previous > macro wasn't needed and was being used with swapped arguments which = always > give the same result (0) defeating the overflow check. >=20 > On initialization, do not use bcm_mbox_intr() to read the pending = messages, > with the new semaphore based implementation this will lead to = semaphore > being incremented on the channels that contain pending data and will = make > the first read for that channel return stale data. >=20 > This fixes the hang that happens on boot while initializing the = cpufreq on > Raspberry Pi. Thanks! -- Rui Paulo From owner-svn-src-all@FreeBSD.ORG Sat Dec 27 20:58:02 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AE633AE8; Sat, 27 Dec 2014 20:58:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 98B5660A; Sat, 27 Dec 2014 20:58:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBRKw20A099181; Sat, 27 Dec 2014 20:58:02 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBRKw2s7099180; Sat, 27 Dec 2014 20:58:02 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201412272058.sBRKw2s7099180@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 27 Dec 2014 20:58:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276319 - head/contrib/bsnmp/lib X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2014 20:58:02 -0000 Author: ngie Date: Sat Dec 27 20:58:01 2014 New Revision: 276319 URL: https://svnweb.freebsd.org/changeset/base/276319 Log: Fix the function signatures when MK_CRYPT == no for snmp_get_local_keys and snmp_passwd_to_keys MFC after: 1 week Reported by: Beeblebrox Modified: head/contrib/bsnmp/lib/snmpcrypto.c Modified: head/contrib/bsnmp/lib/snmpcrypto.c ============================================================================== --- head/contrib/bsnmp/lib/snmpcrypto.c Sat Dec 27 20:48:36 2014 (r276318) +++ head/contrib/bsnmp/lib/snmpcrypto.c Sat Dec 27 20:58:01 2014 (r276319) @@ -366,7 +366,7 @@ snmp_pdu_decrypt(const struct snmp_pdu * return (SNMP_CODE_OK); } -int +enum snmp_code snmp_passwd_to_keys(struct snmp_user *user, char *passwd __unused) { if (user->auth_proto == SNMP_AUTH_NOAUTH && @@ -378,7 +378,7 @@ snmp_passwd_to_keys(struct snmp_user *us return (SNMP_CODE_FAILED); } -int +enum snmp_code snmp_get_local_keys(struct snmp_user *user, uint8_t *eid __unused, uint32_t elen __unused) { From owner-svn-src-all@FreeBSD.ORG Sat Dec 27 21:11:44 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 16DF5C96; Sat, 27 Dec 2014 21:11:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 036B17D6; Sat, 27 Dec 2014 21:11:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBRLBhBw007331; Sat, 27 Dec 2014 21:11:43 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBRLBhm5007330; Sat, 27 Dec 2014 21:11:43 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201412272111.sBRLBhm5007330@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 27 Dec 2014 21:11:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276320 - head/lib/ncurses X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2014 21:11:44 -0000 Author: ngie Date: Sat Dec 27 21:11:42 2014 New Revision: 276320 URL: https://svnweb.freebsd.org/changeset/base/276320 Log: Parallelize building lib/ncurses MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D1353 Modified: head/lib/ncurses/Makefile Modified: head/lib/ncurses/Makefile ============================================================================== --- head/lib/ncurses/Makefile Sat Dec 27 20:58:01 2014 (r276319) +++ head/lib/ncurses/Makefile Sat Dec 27 21:11:42 2014 (r276320) @@ -3,4 +3,11 @@ SUBDIR= ncurses form menu panel \ ncursesw formw menuw panelw +SUBDIR_PARALLEL= + +.for subdir in ${SUBDIR:Nncurses*:N*w} +SUBDIR_DEPEND_${subdir}= ncurses +SUBDIR_DEPEND_${subdir}w= ncursesw +.endfor + .include From owner-svn-src-all@FreeBSD.ORG Sat Dec 27 21:50:48 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C30DF263; Sat, 27 Dec 2014 21:50:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AE08864B0A; Sat, 27 Dec 2014 21:50:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBRLom1h023822; Sat, 27 Dec 2014 21:50:48 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBRLom1P023820; Sat, 27 Dec 2014 21:50:48 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201412272150.sBRLom1P023820@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sat, 27 Dec 2014 21:50:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276321 - head/sys/dev/usb/controller X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2014 21:50:49 -0000 Author: marius Date: Sat Dec 27 21:50:47 2014 New Revision: 276321 URL: https://svnweb.freebsd.org/changeset/base/276321 Log: Improve/fix interrupt allocation/setup/release: - Simplify MSI allocation to what is actually needed for a single one. - Release the MSI and the corresponding bus resource as appropriate when either the interrupt resource cannot be allocated or setting up the interrupt fails. - Error out when interrupt allocation or setup fails and polling is disabled. - Release the MSI after the corresponding bus resource so the former is not leaked on detach. - Remove a redundant softc member. MFC after: 3 days Modified: head/sys/dev/usb/controller/xhci.h head/sys/dev/usb/controller/xhci_pci.c Modified: head/sys/dev/usb/controller/xhci.h ============================================================================== --- head/sys/dev/usb/controller/xhci.h Sat Dec 27 21:11:42 2014 (r276320) +++ head/sys/dev/usb/controller/xhci.h Sat Dec 27 21:50:47 2014 (r276321) @@ -452,7 +452,6 @@ struct xhci_softc { struct usb_device *sc_devices[XHCI_MAX_DEVICES]; struct resource *sc_io_res; - int sc_irq_rid; struct resource *sc_irq_res; void *sc_intr_hdl; Modified: head/sys/dev/usb/controller/xhci_pci.c ============================================================================== --- head/sys/dev/usb/controller/xhci_pci.c Sat Dec 27 21:11:42 2014 (r276320) +++ head/sys/dev/usb/controller/xhci_pci.c Sat Dec 27 21:50:47 2014 (r276321) @@ -203,21 +203,19 @@ xhci_pci_attach(device_t self) usb_callout_init_mtx(&sc->sc_callout, &sc->sc_bus.bus_mtx, 0); - sc->sc_irq_rid = 0; + rid = 0; if (xhci_use_msi) { - count = pci_msi_count(self); - if (count >= 1) { - count = 1; - if (pci_alloc_msi(self, &count) == 0) { - if (bootverbose) - device_printf(self, "MSI enabled\n"); - sc->sc_irq_rid = 1; - } + count = 1; + if (pci_alloc_msi(self, &count) == 0) { + if (bootverbose) + device_printf(self, "MSI enabled\n"); + rid = 1; } } - sc->sc_irq_res = bus_alloc_resource_any(self, SYS_RES_IRQ, - &sc->sc_irq_rid, RF_SHAREABLE | RF_ACTIVE); + sc->sc_irq_res = bus_alloc_resource_any(self, SYS_RES_IRQ, &rid, + RF_ACTIVE | (rid != 0 ? 0 : RF_SHAREABLE)); if (sc->sc_irq_res == NULL) { + pci_release_msi(self); device_printf(self, "Could not allocate IRQ\n"); /* goto error; FALLTHROUGH - use polling */ } @@ -234,16 +232,22 @@ xhci_pci_attach(device_t self) err = bus_setup_intr(self, sc->sc_irq_res, INTR_TYPE_BIO | INTR_MPSAFE, NULL, (driver_intr_t *)xhci_interrupt, sc, &sc->sc_intr_hdl); if (err != 0) { + bus_release_resource(self, SYS_RES_IRQ, + rman_get_rid(sc->sc_irq_res), sc->sc_irq_res); + sc->sc_irq_res = NULL; + pci_release_msi(self); device_printf(self, "Could not setup IRQ, err=%d\n", err); sc->sc_intr_hdl = NULL; } } - if (sc->sc_irq_res == NULL || sc->sc_intr_hdl == NULL || - xhci_use_polling() != 0) { - device_printf(self, "Interrupt polling at %dHz\n", hz); - USB_BUS_LOCK(&sc->sc_bus); - xhci_interrupt_poll(sc); - USB_BUS_UNLOCK(&sc->sc_bus); + if (sc->sc_irq_res == NULL || sc->sc_intr_hdl == NULL) { + if (xhci_use_polling() != 0) { + device_printf(self, "Interrupt polling at %dHz\n", hz); + USB_BUS_LOCK(&sc->sc_bus); + xhci_interrupt_poll(sc); + USB_BUS_UNLOCK(&sc->sc_bus); + } else + goto error; } /* On Intel chipsets reroute ports from EHCI to XHCI controller. */ @@ -307,11 +311,10 @@ xhci_pci_detach(device_t self) sc->sc_intr_hdl = NULL; } if (sc->sc_irq_res) { - if (sc->sc_irq_rid == 1) - pci_release_msi(self); - bus_release_resource(self, SYS_RES_IRQ, sc->sc_irq_rid, - sc->sc_irq_res); + bus_release_resource(self, SYS_RES_IRQ, + rman_get_rid(sc->sc_irq_res), sc->sc_irq_res); sc->sc_irq_res = NULL; + pci_release_msi(self); } if (sc->sc_io_res) { bus_release_resource(self, SYS_RES_MEMORY, PCI_XHCI_CBMEM, From owner-svn-src-all@FreeBSD.ORG Sat Dec 27 23:19:09 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EA17ECB2; Sat, 27 Dec 2014 23:19:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D5B96CB0; Sat, 27 Dec 2014 23:19:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBRNJ9Zr063690; Sat, 27 Dec 2014 23:19:09 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBRNJ9R2063688; Sat, 27 Dec 2014 23:19:09 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201412272319.sBRNJ9R2063688@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 27 Dec 2014 23:19:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276322 - head/sys/amd64/ia32 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2014 23:19:10 -0000 Author: kib Date: Sat Dec 27 23:19:08 2014 New Revision: 276322 URL: https://svnweb.freebsd.org/changeset/base/276322 Log: Change the way the lcall $7,$0 is reflected to usermode. Instead of setting call gate, which must be 64 bit, put a code segment descriptor into ldt slot 0. This way, syscall shim does not switch temporary to 64bit trampoline, and does not create a window where signal delivery interrupts 64 bit mode (signal handler cannot return). The cost is shim running with non-zero based segment in %cs, which requires vfork() handling make more assumptions. Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/amd64/ia32/ia32_sigtramp.S head/sys/amd64/ia32/ia32_syscall.c Modified: head/sys/amd64/ia32/ia32_sigtramp.S ============================================================================== --- head/sys/amd64/ia32/ia32_sigtramp.S Sat Dec 27 21:50:47 2014 (r276321) +++ head/sys/amd64/ia32/ia32_sigtramp.S Sat Dec 27 23:19:08 2014 (r276322) @@ -86,34 +86,14 @@ ia32_osigcode: * executed, we would have a window where the ring 0 code is * executed with the wrong gsbase. * - * Instead, reflect the lcall $7,$0 back to ring 3 trampoline - * which sets up the frame for int $0x80. + * Instead, set LDT descriptor 0 as code segment, which reflects + * the lcall $7,$0 back to ring 3 trampoline. The trampoline sets up + * the frame for int $0x80. */ ALIGN_TEXT lcall_tramp: - .code64 - /* - * There, we are in 64bit mode and need to return to 32bit. - * First, convert call frame from 64 to 32 bit format. - */ - pushq %rax - movl 16(%rsp),%eax - movl %eax,20(%rsp) /* ret %cs */ - movl 8(%rsp),%eax - movl %eax,16(%rsp) /* ret %rip -> %eip */ - popq %rax - addq $8,%rsp - /* Now return to 32bit */ - pushq $0x33 /* _ucode32sel UPL */ - callq 1f -1: - addq $2f-1b,(%rsp) - lretq -2: - /* Back in 32bit mode */ - .code32 cmpl $SYS_vfork,%eax - je 4f + je 1f pushl %ebp movl %esp,%ebp pushl 0x24(%ebp) /* arg 6 */ @@ -122,21 +102,20 @@ lcall_tramp: pushl 0x18(%ebp) pushl 0x14(%ebp) pushl 0x10(%ebp) /* arg 1 */ - pushl 0xc(%ebp) /* gap */ + subl $4,%esp /* gap */ int $0x80 leavel -3: lretl -4: +1: /* * vfork handling is special and relies on the libc stub saving - * the return ip in %ecx. If vfork failed, then there is no - * child which can corrupt the frame created by call gate. + * the return ip in %ecx. Also, we assume that the call was done + * with ucode32 selector in %cs. */ int $0x80 - jb 3b - addl $8,%esp - jmpl *%ecx + movl $0x33,4(%esp) /* GUCODE32_SEL | SEL_UPL */ + movl %ecx,(%esp) + lretl #endif ALIGN_TEXT Modified: head/sys/amd64/ia32/ia32_syscall.c ============================================================================== --- head/sys/amd64/ia32/ia32_syscall.c Sat Dec 27 21:50:47 2014 (r276321) +++ head/sys/amd64/ia32/ia32_syscall.c Sat Dec 27 23:19:08 2014 (r276322) @@ -223,39 +223,28 @@ int setup_lcall_gate(void) { struct i386_ldt_args uap; - struct user_segment_descriptor descs[2]; - struct gate_descriptor *ssd; + struct user_segment_descriptor desc; uint32_t lcall_addr; int error; bzero(&uap, sizeof(uap)); uap.start = 0; - uap.num = 2; - - /* - * This is the easiest way to cut the space for system - * descriptor in ldt. Manually adjust the descriptor type to - * the call gate later. - */ - bzero(&descs[0], sizeof(descs)); - descs[0].sd_type = SDT_SYSNULL; - descs[1].sd_type = SDT_SYSNULL; - error = amd64_set_ldt(curthread, &uap, descs); + uap.num = 1; + lcall_addr = curproc->p_sysent->sv_psstrings - sz_lcall_tramp; + bzero(&desc, sizeof(desc)); + desc.sd_type = SDT_MEMERA; + desc.sd_dpl = SEL_UPL; + desc.sd_p = 1; + desc.sd_def32 = 1; + desc.sd_gran = 1; + desc.sd_lolimit = 0xffff; + desc.sd_hilimit = 0xf; + desc.sd_lobase = lcall_addr; + desc.sd_hibase = lcall_addr >> 24; + error = amd64_set_ldt(curthread, &uap, &desc); if (error != 0) return (error); - lcall_addr = curproc->p_sysent->sv_psstrings - sz_lcall_tramp; - mtx_lock(&dt_lock); - ssd = (struct gate_descriptor *)(curproc->p_md.md_ldt->ldt_base); - bzero(ssd, sizeof(*ssd)); - ssd->gd_looffset = lcall_addr; - ssd->gd_hioffset = lcall_addr >> 16; - ssd->gd_selector = _ucodesel; - ssd->gd_type = SDT_SYSCGT; - ssd->gd_dpl = SEL_UPL; - ssd->gd_p = 1; - mtx_unlock(&dt_lock); - return (0); } #endif