diff options
author | avg <avg@FreeBSD.org> | 2017-03-04 13:03:31 +0000 |
---|---|---|
committer | avg <avg@FreeBSD.org> | 2017-03-04 13:03:31 +0000 |
commit | ee895f7b426627aad1638091f62f0eb122a17460 (patch) | |
tree | 822fb78084d564fa54c140dfab630370fb3397e6 /sys/dev | |
parent | a3480d5c9e3eb277d85d4bef6f03fd62eb864799 (diff) | |
download | FreeBSD-src-ee895f7b426627aad1638091f62f0eb122a17460.zip FreeBSD-src-ee895f7b426627aad1638091f62f0eb122a17460.tar.gz |
MFC r283291: don't use CALLOUT_MPSAFE with callout_init()
The main purpose of this MFC is to reduce conflicts for other merges.
Parts of the original change have already "trickled down" via individual MFCs.
Diffstat (limited to 'sys/dev')
37 files changed, 53 insertions, 57 deletions
diff --git a/sys/dev/altera/jtag_uart/altera_jtag_uart_tty.c b/sys/dev/altera/jtag_uart/altera_jtag_uart_tty.c index dd46ea0..1e9a1b8 100644 --- a/sys/dev/altera/jtag_uart/altera_jtag_uart_tty.c +++ b/sys/dev/altera/jtag_uart/altera_jtag_uart_tty.c @@ -454,11 +454,11 @@ altera_jtag_uart_attach(struct altera_jtag_uart_softc *sc) aju_intr_readable_enable(sc); AJU_UNLOCK(sc); } else { - callout_init(&sc->ajus_io_callout, CALLOUT_MPSAFE); + callout_init(&sc->ajus_io_callout, 1); callout_reset(&sc->ajus_io_callout, AJU_IO_POLLINTERVAL, aju_io_callout, sc); } - callout_init(&sc->ajus_ac_callout, CALLOUT_MPSAFE); + callout_init(&sc->ajus_ac_callout, 1); callout_reset(&sc->ajus_ac_callout, AJU_AC_POLLINTERVAL, aju_ac_callout, sc); return (0); diff --git a/sys/dev/ath/if_ath.c b/sys/dev/ath/if_ath.c index 6e58896..c91bc09 100644 --- a/sys/dev/ath/if_ath.c +++ b/sys/dev/ath/if_ath.c @@ -547,7 +547,7 @@ ath_attach(u_int16_t devid, struct ath_softc *sc) sc->sc_ledstate = 1; sc->sc_ledon = 0; /* low true */ sc->sc_ledidle = (2700*hz)/1000; /* 2.7sec */ - callout_init(&sc->sc_ledtimer, CALLOUT_MPSAFE); + callout_init(&sc->sc_ledtimer, 1); /* * Don't setup hardware-based blinking. diff --git a/sys/dev/ce/if_ce.c b/sys/dev/ce/if_ce.c index 3f1a550..2156aa3 100644 --- a/sys/dev/ce/if_ce.c +++ b/sys/dev/ce/if_ce.c @@ -103,10 +103,6 @@ __FBSDID("$FreeBSD$"); #define CE_DEBUG2(d,s) ({if (d->chan->debug>1) {\ printf ("%s: ", d->name); printf s;}}) -#ifndef CALLOUT_MPSAFE -#define CALLOUT_MPSAFE 0 -#endif - #ifndef IF_DRAIN #define IF_DRAIN(ifq) do { \ struct mbuf *m; \ @@ -625,7 +621,7 @@ static int ce_attach (device_t dev) return (ENXIO); } #if __FreeBSD_version >= 500000 - callout_init (&led_timo[unit], CALLOUT_MPSAFE); + callout_init (&led_timo[unit], 1); #else callout_init (&led_timo[unit]); #endif @@ -677,7 +673,7 @@ static int ce_attach (device_t dev) continue; d = c->sys; - callout_init (&d->timeout_handle, CALLOUT_MPSAFE); + callout_init (&d->timeout_handle, 1); #ifdef NETGRAPH if (ng_make_node_common (&typestruct, &d->node) != 0) { printf ("%s: cannot make common node\n", d->name); @@ -2580,7 +2576,7 @@ static int ce_modevent (module_t mod, int type, void *unused) cdevsw_add (&ce_cdevsw); #endif #if __FreeBSD_version >= 500000 - callout_init (&timeout_handle, CALLOUT_MPSAFE); + callout_init (&timeout_handle, 1); #else callout_init (&timeout_handle); #endif diff --git a/sys/dev/cp/if_cp.c b/sys/dev/cp/if_cp.c index e5f86b1..10e5ac2 100644 --- a/sys/dev/cp/if_cp.c +++ b/sys/dev/cp/if_cp.c @@ -461,7 +461,7 @@ static int cp_attach (device_t dev) splx (s); return (ENXIO); } - callout_init (&led_timo[unit], CALLOUT_MPSAFE); + callout_init (&led_timo[unit], 1); error = bus_setup_intr (dev, bd->cp_irq, INTR_TYPE_NET|INTR_MPSAFE, NULL, cp_intr, bd, &bd->cp_intrhand); @@ -490,7 +490,7 @@ static int cp_attach (device_t dev) d->board = b; d->chan = c; c->sys = d; - callout_init (&d->timeout_handle, CALLOUT_MPSAFE); + callout_init (&d->timeout_handle, 1); #ifdef NETGRAPH if (ng_make_node_common (&typestruct, &d->node) != 0) { printf ("%s: cannot make common node\n", d->name); @@ -2240,7 +2240,7 @@ static int cp_modevent (module_t mod, int type, void *unused) printf ("Failed to register ng_cp\n"); #endif ++load_count; - callout_init (&timeout_handle, CALLOUT_MPSAFE); + callout_init (&timeout_handle, 1); callout_reset (&timeout_handle, hz*5, cp_timeout, 0); break; case MOD_UNLOAD: diff --git a/sys/dev/ctau/if_ct.c b/sys/dev/ctau/if_ct.c index 4956e4e..7a3d769 100644 --- a/sys/dev/ctau/if_ct.c +++ b/sys/dev/ctau/if_ct.c @@ -663,7 +663,7 @@ static int ct_attach (device_t dev) return ENXIO; } - callout_init (&led_timo[unit], CALLOUT_MPSAFE); + callout_init (&led_timo[unit], 1); s = splimp (); if (bus_setup_intr (dev, bd->irq_res, INTR_TYPE_NET|INTR_MPSAFE, @@ -702,7 +702,7 @@ static int ct_attach (device_t dev) c->sys = d; channel [b->num*NCHAN + c->num] = d; sprintf (d->name, "ct%d.%d", b->num, c->num); - callout_init (&d->timeout_handle, CALLOUT_MPSAFE); + callout_init (&d->timeout_handle, 1); #ifdef NETGRAPH if (ng_make_node_common (&typestruct, &d->node) != 0) { @@ -2180,7 +2180,7 @@ static int ct_modevent (module_t mod, int type, void *unused) printf ("Failed to register ng_ct\n"); #endif ++load_count; - callout_init (&timeout_handle, CALLOUT_MPSAFE); + callout_init (&timeout_handle, 1); callout_reset (&timeout_handle, hz*5, ct_timeout, 0); break; case MOD_UNLOAD: diff --git a/sys/dev/cx/if_cx.c b/sys/dev/cx/if_cx.c index 2abc453..f159578 100644 --- a/sys/dev/cx/if_cx.c +++ b/sys/dev/cx/if_cx.c @@ -762,7 +762,7 @@ static int cx_attach (device_t dev) return ENXIO; } b->sys = bd; - callout_init (&led_timo[b->num], CALLOUT_MPSAFE); + callout_init (&led_timo[b->num], 1); s = splhigh (); if (bus_setup_intr (dev, bd->irq_res, INTR_TYPE_NET|INTR_MPSAFE, @@ -812,7 +812,7 @@ static int cx_attach (device_t dev) case T_UNIV_RS232: case T_UNIV_RS449: case T_UNIV_V35: - callout_init (&d->timeout_handle, CALLOUT_MPSAFE); + callout_init (&d->timeout_handle, 1); #ifdef NETGRAPH if (ng_make_node_common (&typestruct, &d->node) != 0) { printf ("%s: cannot make common node\n", d->name); @@ -883,7 +883,7 @@ static int cx_attach (device_t dev) ttycreate(d->tty, TS_CALLOUT, "x%r%r", b->num, c->num); d->devt = make_dev (&cx_cdevsw, b->num*NCHAN + c->num + 64, UID_ROOT, GID_WHEEL, 0600, "cx%d", b->num*NCHAN + c->num); d->devt->si_drv1 = d; - callout_init (&d->dcd_timeout_handle, CALLOUT_MPSAFE); + callout_init (&d->dcd_timeout_handle, 1); } splx (s); @@ -2514,7 +2514,7 @@ static int cx_modevent (module_t mod, int type, void *unused) #endif ++load_count; - callout_init (&timeout_handle, CALLOUT_MPSAFE); + callout_init (&timeout_handle, 1); callout_reset (&timeout_handle, hz*5, cx_timeout, 0); /* Software interrupt. */ swi_add(&tty_intr_event, "cx", cx_softintr, NULL, SWI_TTY, diff --git a/sys/dev/cxgb/cxgb_main.c b/sys/dev/cxgb/cxgb_main.c index 293de3d..542d438 100644 --- a/sys/dev/cxgb/cxgb_main.c +++ b/sys/dev/cxgb/cxgb_main.c @@ -1009,7 +1009,7 @@ cxgb_port_attach(device_t dev) device_get_unit(device_get_parent(dev)), p->port_id); PORT_LOCK_INIT(p, p->lockbuf); - callout_init(&p->link_check_ch, CALLOUT_MPSAFE); + callout_init(&p->link_check_ch, 1); TASK_INIT(&p->link_check_task, 0, check_link_status, p); /* Allocate an ifnet object and set it up */ diff --git a/sys/dev/cxgb/cxgb_sge.c b/sys/dev/cxgb/cxgb_sge.c index 3a16c06..c716672 100644 --- a/sys/dev/cxgb/cxgb_sge.c +++ b/sys/dev/cxgb/cxgb_sge.c @@ -1013,7 +1013,7 @@ sge_timer_cb(void *arg) int t3_sge_init_adapter(adapter_t *sc) { - callout_init(&sc->sge_timer_ch, CALLOUT_MPSAFE); + callout_init(&sc->sge_timer_ch, 1); callout_reset(&sc->sge_timer_ch, TX_RECLAIM_PERIOD, sge_timer_cb, sc); TASK_INIT(&sc->slow_intr_task, 0, sge_slow_intr_handler, sc); return (0); diff --git a/sys/dev/dcons/dcons_os.c b/sys/dev/dcons/dcons_os.c index bf0be0b..01e6166 100644 --- a/sys/dev/dcons/dcons_os.c +++ b/sys/dev/dcons/dcons_os.c @@ -374,7 +374,7 @@ dcons_attach(void) dcons_attach_port(DCONS_CON, "dcons", 0); dcons_attach_port(DCONS_GDB, "dgdb", DC_GDB); - callout_init(&dcons_callout, CALLOUT_MPSAFE); + callout_init(&dcons_callout, 1); polltime = hz / poll_hz; callout_reset(&dcons_callout, polltime, dcons_timeout, NULL); return(0); diff --git a/sys/dev/drm2/drm_irq.c b/sys/dev/drm2/drm_irq.c index f93cd38..bb13f90 100644 --- a/sys/dev/drm2/drm_irq.c +++ b/sys/dev/drm2/drm_irq.c @@ -210,7 +210,7 @@ int drm_vblank_init(struct drm_device *dev, int num_crtcs) { int i, ret = -ENOMEM; - callout_init(&dev->vblank_disable_callout, CALLOUT_MPSAFE); + callout_init(&dev->vblank_disable_callout, 1); mtx_init(&dev->vbl_lock, "drmvbl", NULL, MTX_DEF); mtx_init(&dev->vblank_time_lock, "drmvtl", NULL, MTX_DEF); diff --git a/sys/dev/drm2/i915/intel_display.c b/sys/dev/drm2/i915/intel_display.c index aafd4fa..b460902 100644 --- a/sys/dev/drm2/i915/intel_display.c +++ b/sys/dev/drm2/i915/intel_display.c @@ -6449,7 +6449,7 @@ static void intel_crtc_init(struct drm_device *dev, int pipe) intel_crtc->busy = false; - callout_init(&intel_crtc->idle_callout, CALLOUT_MPSAFE); + callout_init(&intel_crtc->idle_callout, 1); } int intel_get_pipe_from_crtc_id(struct drm_device *dev, void *data, @@ -7038,7 +7038,7 @@ void intel_modeset_init(struct drm_device *dev) intel_setup_outputs(dev); TASK_INIT(&dev_priv->idle_task, 0, intel_idle_update, dev_priv); - callout_init(&dev_priv->idle_callout, CALLOUT_MPSAFE); + callout_init(&dev_priv->idle_callout, 1); } void intel_modeset_gem_init(struct drm_device *dev) diff --git a/sys/dev/glxsb/glxsb.c b/sys/dev/glxsb/glxsb.c index 646fe3f..bfe7eea 100644 --- a/sys/dev/glxsb/glxsb.c +++ b/sys/dev/glxsb/glxsb.c @@ -331,7 +331,7 @@ glxsb_attach(device_t dev) sc->sc_rnghz = hz / 100; else sc->sc_rnghz = 1; - callout_init(&sc->sc_rngco, CALLOUT_MPSAFE); + callout_init(&sc->sc_rngco, 1); glxsb_rnd(sc); return (0); diff --git a/sys/dev/gxemul/cons/gxemul_cons.c b/sys/dev/gxemul/cons/gxemul_cons.c index cb3b000..15deaf0 100644 --- a/sys/dev/gxemul/cons/gxemul_cons.c +++ b/sys/dev/gxemul/cons/gxemul_cons.c @@ -279,7 +279,7 @@ gxemul_cons_ttyinit(void *unused) tp = tty_alloc(&gxemul_cons_ttydevsw, NULL); tty_init_console(tp, 0); tty_makedev(tp, NULL, "%s", "ttyu0"); - callout_init(&gxemul_cons_callout, CALLOUT_MPSAFE); + callout_init(&gxemul_cons_callout, 1); callout_reset(&gxemul_cons_callout, gxemul_cons_polltime, gxemul_cons_timeout, tp); diff --git a/sys/dev/hifn/hifn7751.c b/sys/dev/hifn/hifn7751.c index 8954242..a13b2d0 100644 --- a/sys/dev/hifn/hifn7751.c +++ b/sys/dev/hifn/hifn7751.c @@ -590,7 +590,7 @@ hifn_attach(device_t dev) if (sc->sc_flags & (HIFN_HAS_PUBLIC | HIFN_HAS_RNG)) hifn_init_pubrng(sc); - callout_init(&sc->sc_tickto, CALLOUT_MPSAFE); + callout_init(&sc->sc_tickto, 1); callout_reset(&sc->sc_tickto, hz, hifn_tick, sc); return (0); @@ -768,7 +768,7 @@ hifn_init_pubrng(struct hifn_softc *sc) sc->sc_rnghz = hz / 100; else sc->sc_rnghz = 1; - callout_init(&sc->sc_rngto, CALLOUT_MPSAFE); + callout_init(&sc->sc_rngto, 1); callout_reset(&sc->sc_rngto, sc->sc_rnghz, hifn_rng, sc); } diff --git a/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c b/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c index f186457..1fe3e6c 100644 --- a/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c +++ b/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c @@ -1553,7 +1553,7 @@ storvsc_action(struct cam_sim *sim, union ccb *ccb) #ifdef notyet if (ccb->ccb_h.timeout != CAM_TIME_INFINITY) { - callout_init(&reqp->callout, CALLOUT_MPSAFE); + callout_init(&reqp->callout, 1); callout_reset_sbt(&reqp->callout, SBT_1MS * ccb->ccb_h.timeout, 0, storvsc_timeout, reqp, 0); diff --git a/sys/dev/if_ndis/if_ndis.c b/sys/dev/if_ndis/if_ndis.c index eae33c5..790c349 100644 --- a/sys/dev/if_ndis/if_ndis.c +++ b/sys/dev/if_ndis/if_ndis.c @@ -557,7 +557,7 @@ ndis_attach(dev) InitializeListHead(&sc->ndis_shlist); InitializeListHead(&sc->ndisusb_tasklist); InitializeListHead(&sc->ndisusb_xferdonelist); - callout_init(&sc->ndis_stat_callout, CALLOUT_MPSAFE); + callout_init(&sc->ndis_stat_callout, 1); if (sc->ndis_iftype == PCMCIABus) { error = ndis_alloc_amem(sc); @@ -733,7 +733,7 @@ ndis_attach(dev) uint32_t arg; int r; - callout_init(&sc->ndis_scan_callout, CALLOUT_MPSAFE); + callout_init(&sc->ndis_scan_callout, 1); ifp->if_ioctl = ndis_ioctl_80211; ic->ic_ifp = ifp; diff --git a/sys/dev/isci/isci_io_request.c b/sys/dev/isci/isci_io_request.c index 066e0d9..f86c126 100644 --- a/sys/dev/isci/isci_io_request.c +++ b/sys/dev/isci/isci_io_request.c @@ -680,7 +680,7 @@ isci_request_construct(struct ISCI_REQUEST *request, request->dma_tag = io_buffer_dma_tag; request->physical_address = physical_address; bus_dmamap_create(request->dma_tag, 0, &request->dma_map); - callout_init(&request->timer, CALLOUT_MPSAFE); + callout_init(&request->timer, 1); } static void diff --git a/sys/dev/mfi/mfi.c b/sys/dev/mfi/mfi.c index 13640f8..6054ba6 100644 --- a/sys/dev/mfi/mfi.c +++ b/sys/dev/mfi/mfi.c @@ -788,7 +788,7 @@ mfi_attach(struct mfi_softc *sc) bus_generic_attach(sc->mfi_dev); /* Start the timeout watchdog */ - callout_init(&sc->mfi_watchdog_callout, CALLOUT_MPSAFE); + callout_init(&sc->mfi_watchdog_callout, 1); callout_reset(&sc->mfi_watchdog_callout, mfi_cmd_timeout * hz, mfi_timeout, sc); diff --git a/sys/dev/mwl/if_mwl.c b/sys/dev/mwl/if_mwl.c index 8d9099b..ba7085b 100644 --- a/sys/dev/mwl/if_mwl.c +++ b/sys/dev/mwl/if_mwl.c @@ -368,7 +368,7 @@ mwl_attach(uint16_t devid, struct mwl_softc *sc) if (error != 0) /* NB: mwl_setupdma prints msg */ goto bad1; - callout_init(&sc->sc_timer, CALLOUT_MPSAFE); + callout_init(&sc->sc_timer, 1); callout_init_mtx(&sc->sc_watchdog, &sc->sc_mtx, 0); sc->sc_tq = taskqueue_create("mwl_taskq", M_NOWAIT, diff --git a/sys/dev/nand/nandsim_chip.c b/sys/dev/nand/nandsim_chip.c index f04ad80..3241e1a 100644 --- a/sys/dev/nand/nandsim_chip.c +++ b/sys/dev/nand/nandsim_chip.c @@ -94,7 +94,7 @@ nandsim_chip_init(struct nandsim_softc* sc, uint8_t chip_num, return (NULL); mtx_init(&chip->ns_lock, "nandsim lock", NULL, MTX_DEF); - callout_init(&chip->ns_callout, CALLOUT_MPSAFE); + callout_init(&chip->ns_callout, 1); STAILQ_INIT(&chip->nandsim_events); chip->chip_num = chip_num; diff --git a/sys/dev/ntb/ntb_hw/ntb_hw.c b/sys/dev/ntb/ntb_hw/ntb_hw.c index 609aa4d..2fe1a6a 100644 --- a/sys/dev/ntb/ntb_hw/ntb_hw.c +++ b/sys/dev/ntb/ntb_hw/ntb_hw.c @@ -662,8 +662,8 @@ intel_ntb_attach(device_t device) ntb->msix_mw_idx = B2B_MW_DISABLED; /* Heartbeat timer for NTB_ATOM since there is no link interrupt */ - callout_init(&ntb->heartbeat_timer, CALLOUT_MPSAFE); - callout_init(&ntb->lr_timer, CALLOUT_MPSAFE); + callout_init(&ntb->heartbeat_timer, 1); + callout_init(&ntb->lr_timer, 1); callout_init(&ntb->peer_msix_work, 1); mtx_init(&ntb->db_mask_lock, "ntb hw bits", NULL, MTX_SPIN); diff --git a/sys/dev/nxge/if_nxge.c b/sys/dev/nxge/if_nxge.c index df1b9ec..9a8dd9e 100644 --- a/sys/dev/nxge/if_nxge.c +++ b/sys/dev/nxge/if_nxge.c @@ -1743,7 +1743,7 @@ xge_device_init(xge_lldev_t *lldev, xge_hal_channel_reopen_e option) return; /* Initializing timer */ - callout_init(&lldev->timer, CALLOUT_MPSAFE); + callout_init(&lldev->timer, 1); xge_trace(XGE_TRACE, "Set MTU size"); status = xge_hal_device_mtu_set(hldev, ifnetp->if_mtu); diff --git a/sys/dev/oce/oce_if.c b/sys/dev/oce/oce_if.c index f37ef3a..779dd72 100644 --- a/sys/dev/oce/oce_if.c +++ b/sys/dev/oce/oce_if.c @@ -341,7 +341,7 @@ oce_attach(device_t dev) oce_add_sysctls(sc); - callout_init(&sc->timer, CALLOUT_MPSAFE); + callout_init(&sc->timer, 1); rc = callout_reset(&sc->timer, 2 * hz, oce_local_timer, sc); if (rc) goto stats_free; diff --git a/sys/dev/patm/if_patm_attach.c b/sys/dev/patm/if_patm_attach.c index 97b6b95..ad45396 100644 --- a/sys/dev/patm/if_patm_attach.c +++ b/sys/dev/patm/if_patm_attach.c @@ -207,7 +207,7 @@ patm_attach(device_t dev) mtx_init(&sc->tst_lock, "tst lock", NULL, MTX_DEF); cv_init(&sc->vcc_cv, "vcc_close"); - callout_init(&sc->tst_callout, CALLOUT_MPSAFE); + callout_init(&sc->tst_callout, 1); sysctl_ctx_init(&sc->sysctl_ctx); diff --git a/sys/dev/rndtest/rndtest.c b/sys/dev/rndtest/rndtest.c index e4fd3b0..871d0b7 100644 --- a/sys/dev/rndtest/rndtest.c +++ b/sys/dev/rndtest/rndtest.c @@ -98,7 +98,7 @@ rndtest_attach(device_t dev) #if __FreeBSD_version < 500000 callout_init(&rsp->rs_to); #else - callout_init(&rsp->rs_to, CALLOUT_MPSAFE); + callout_init(&rsp->rs_to, 1); #endif } else device_printf(dev, "rndtest_init: no memory for state block\n"); diff --git a/sys/dev/safe/safe.c b/sys/dev/safe/safe.c index a3590ef..0392dc5 100644 --- a/sys/dev/safe/safe.c +++ b/sys/dev/safe/safe.c @@ -425,7 +425,7 @@ safe_attach(device_t dev) #endif safe_rng_init(sc); - callout_init(&sc->sc_rngto, CALLOUT_MPSAFE); + callout_init(&sc->sc_rngto, 1); callout_reset(&sc->sc_rngto, hz*safe_rnginterval, safe_rng, sc); } #endif /* SAFE_NO_RNG */ diff --git a/sys/dev/sound/midi/mpu401.c b/sys/dev/sound/midi/mpu401.c index 3e061a7..5ce6648 100644 --- a/sys/dev/sound/midi/mpu401.c +++ b/sys/dev/sound/midi/mpu401.c @@ -185,7 +185,7 @@ mpu401_init(kobj_class_t cls, void *cookie, driver_intr_t softintr, kobj_init((kobj_t)m, cls); - callout_init(&m->timer, CALLOUT_MPSAFE); + callout_init(&m->timer, 1); m->si = softintr; m->cookie = cookie; diff --git a/sys/dev/sound/pci/atiixp.c b/sys/dev/sound/pci/atiixp.c index 9026e53..642e8da 100644 --- a/sys/dev/sound/pci/atiixp.c +++ b/sys/dev/sound/pci/atiixp.c @@ -1193,7 +1193,7 @@ atiixp_pci_attach(device_t dev) sc->lock = snd_mtxcreate(device_get_nameunit(dev), "snd_atiixp softc"); sc->dev = dev; - callout_init(&sc->poll_timer, CALLOUT_MPSAFE); + callout_init(&sc->poll_timer, 1); sc->poll_ticks = 1; if (resource_int_value(device_get_name(sc->dev), diff --git a/sys/dev/sound/pci/es137x.c b/sys/dev/sound/pci/es137x.c index 42d0450..0dd88a8 100644 --- a/sys/dev/sound/pci/es137x.c +++ b/sys/dev/sound/pci/es137x.c @@ -1741,7 +1741,7 @@ es_pci_attach(device_t dev) es->st = rman_get_bustag(es->reg); es->sh = rman_get_bushandle(es->reg); - callout_init(&es->poll_timer, CALLOUT_MPSAFE); + callout_init(&es->poll_timer, 1); es->poll_ticks = 1; if (resource_int_value(device_get_name(dev), diff --git a/sys/dev/sound/pci/hda/hdaa.c b/sys/dev/sound/pci/hda/hdaa.c index 14aee62..1ca2f3f 100644 --- a/sys/dev/sound/pci/hda/hdaa.c +++ b/sys/dev/sound/pci/hda/hdaa.c @@ -6592,7 +6592,7 @@ hdaa_attach(device_t dev) devinfo->newquirks = -1; devinfo->newgpio = -1; devinfo->newgpo = -1; - callout_init(&devinfo->poll_jack, CALLOUT_MPSAFE); + callout_init(&devinfo->poll_jack, 1); devinfo->poll_ival = hz; hdaa_lock(devinfo); diff --git a/sys/dev/sound/pci/hda/hdac.c b/sys/dev/sound/pci/hda/hdac.c index 3a6b94d..d0f5f6e 100644 --- a/sys/dev/sound/pci/hda/hdac.c +++ b/sys/dev/sound/pci/hda/hdac.c @@ -1116,7 +1116,7 @@ hdac_attach(device_t dev) sc->lock = snd_mtxcreate(device_get_nameunit(dev), "HDA driver mutex"); sc->dev = dev; TASK_INIT(&sc->unsolq_task, 0, hdac_unsolq_task, sc); - callout_init(&sc->poll_callout, CALLOUT_MPSAFE); + callout_init(&sc->poll_callout, 1); for (i = 0; i < HDAC_CODEC_MAX; i++) sc->codecs[i].dev = NULL; if (devid >= 0) { diff --git a/sys/dev/sound/pci/via8233.c b/sys/dev/sound/pci/via8233.c index 1f5f482..62c3e7c 100644 --- a/sys/dev/sound/pci/via8233.c +++ b/sys/dev/sound/pci/via8233.c @@ -1175,7 +1175,7 @@ via_attach(device_t dev) "snd_via8233 softc"); via->dev = dev; - callout_init(&via->poll_timer, CALLOUT_MPSAFE); + callout_init(&via->poll_timer, 1); via->poll_ticks = 1; if (resource_int_value(device_get_name(dev), diff --git a/sys/dev/twa/tw_osl_freebsd.c b/sys/dev/twa/tw_osl_freebsd.c index 8b56267..dbd249a 100644 --- a/sys/dev/twa/tw_osl_freebsd.c +++ b/sys/dev/twa/tw_osl_freebsd.c @@ -423,8 +423,8 @@ twa_attach(device_t dev) } sc->watchdog_index = 0; - callout_init(&(sc->watchdog_callout[0]), CALLOUT_MPSAFE); - callout_init(&(sc->watchdog_callout[1]), CALLOUT_MPSAFE); + callout_init(&(sc->watchdog_callout[0]), 1); + callout_init(&(sc->watchdog_callout[1]), 1); callout_reset(&(sc->watchdog_callout[0]), 5*hz, twa_watchdog, &sc->ctlr_handle); return(0); diff --git a/sys/dev/tws/tws.c b/sys/dev/tws/tws.c index 73ab501..f4facdf 100644 --- a/sys/dev/tws/tws.c +++ b/sys/dev/tws/tws.c @@ -198,7 +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); + callout_init(&sc->stats_timer, 1); if ( tws_init_trace_q(sc) == FAILURE ) printf("trace init failure\n"); @@ -706,7 +706,7 @@ tws_init_reqs(struct tws_softc *sc, u_int32_t dma_mem_size) sc->reqs[i].cmd_pkt->hdr.header_desc.size_header = 128; - callout_init(&sc->reqs[i].timeout, CALLOUT_MPSAFE); + callout_init(&sc->reqs[i].timeout, 1); sc->reqs[i].state = TWS_REQ_STATE_FREE; if ( i >= TWS_RESERVED_REQS ) tws_q_insert_tail(sc, &sc->reqs[i], TWS_FREE_Q); diff --git a/sys/dev/ubsec/ubsec.c b/sys/dev/ubsec/ubsec.c index 6c06b71..09d2646 100644 --- a/sys/dev/ubsec/ubsec.c +++ b/sys/dev/ubsec/ubsec.c @@ -456,7 +456,7 @@ ubsec_attach(device_t dev) sc->sc_rnghz = hz / 100; else sc->sc_rnghz = 1; - callout_init(&sc->sc_rngto, CALLOUT_MPSAFE); + callout_init(&sc->sc_rngto, 1); callout_reset(&sc->sc_rngto, sc->sc_rnghz, ubsec_rng, sc); skip_rng: ; diff --git a/sys/dev/virtio/random/virtio_random.c b/sys/dev/virtio/random/virtio_random.c index bd1f0df..caa4288 100644 --- a/sys/dev/virtio/random/virtio_random.c +++ b/sys/dev/virtio/random/virtio_random.c @@ -129,7 +129,7 @@ vtrnd_attach(device_t dev) sc = device_get_softc(dev); sc->vtrnd_dev = dev; - callout_init(&sc->vtrnd_callout, CALLOUT_MPSAFE); + callout_init(&sc->vtrnd_callout, 1); virtio_set_feature_desc(dev, vtrnd_feature_desc); vtrnd_negotiate_features(sc); diff --git a/sys/dev/xen/netfront/netfront.c b/sys/dev/xen/netfront/netfront.c index 71965ac..2d03f38 100644 --- a/sys/dev/xen/netfront/netfront.c +++ b/sys/dev/xen/netfront/netfront.c @@ -2132,7 +2132,7 @@ create_netdev(device_t dev) ifp->if_hw_tsomaxsegsize = PAGE_SIZE; ether_ifattach(ifp, np->mac); - callout_init(&np->xn_stat_ch, CALLOUT_MPSAFE); + callout_init(&np->xn_stat_ch, 1); netfront_carrier_off(np); return (0); |