summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjkim <jkim@FreeBSD.org>2015-05-22 17:05:21 +0000
committerjkim <jkim@FreeBSD.org>2015-05-22 17:05:21 +0000
commit318c4f97e694c1972b55450cafe914f39977d179 (patch)
tree9c598a67317c5e22e5e44d49e8bb797cb28e79b9
parentb15207d5c210e55bafbc6c85235ab64d12815e79 (diff)
downloadFreeBSD-src-318c4f97e694c1972b55450cafe914f39977d179.zip
FreeBSD-src-318c4f97e694c1972b55450cafe914f39977d179.tar.gz
CALLOUT_MPSAFE has lost its meaning since r141428, i.e., for more than ten
years for head. However, it is continuously misused as the mpsafe argument for callout_init(9). Deprecate the flag and clean up callout_init() calls to make them more consistent. Differential Revision: https://reviews.freebsd.org/D2613 Reviewed by: jhb MFC after: 2 weeks
-rw-r--r--sys/amd64/amd64/mp_watchdog.c2
-rw-r--r--sys/amd64/vmm/io/vatpit.c2
-rw-r--r--sys/arm/amlogic/aml8726/aml8726_rng.c2
-rw-r--r--sys/arm/freescale/imx/imx_sdhci.c2
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c4
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c2
-rw-r--r--sys/cddl/dev/profile/profile.c4
-rw-r--r--sys/compat/ndis/subr_ntoskrnl.c2
-rw-r--r--sys/contrib/ipfilter/netinet/ip_fil_freebsd.c4
-rw-r--r--sys/contrib/vchiq/interface/compat/vchi_bsd.c2
-rw-r--r--sys/dev/acpica/acpi.c2
-rw-r--r--sys/dev/altera/jtag_uart/altera_jtag_uart_tty.c4
-rw-r--r--sys/dev/ath/if_ath.c2
-rw-r--r--sys/dev/ce/if_ce.c10
-rw-r--r--sys/dev/cp/if_cp.c6
-rw-r--r--sys/dev/ctau/if_ct.c6
-rw-r--r--sys/dev/cx/if_cx.c8
-rw-r--r--sys/dev/cxgb/cxgb_main.c4
-rw-r--r--sys/dev/cxgb/cxgb_sge.c2
-rw-r--r--sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cm.c6
-rw-r--r--sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c2
-rw-r--r--sys/dev/cxgbe/t4_main.c4
-rw-r--r--sys/dev/dcons/dcons_os.c2
-rw-r--r--sys/dev/drm2/drm_irq.c2
-rw-r--r--sys/dev/drm2/i915/intel_display.c4
-rw-r--r--sys/dev/glxsb/glxsb.c2
-rw-r--r--sys/dev/gxemul/cons/gxemul_cons.c2
-rw-r--r--sys/dev/hifn/hifn7751.c4
-rw-r--r--sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c2
-rw-r--r--sys/dev/if_ndis/if_ndis.c4
-rw-r--r--sys/dev/isci/isci_io_request.c2
-rw-r--r--sys/dev/mfi/mfi.c2
-rw-r--r--sys/dev/mwl/if_mwl.c2
-rw-r--r--sys/dev/nand/nandsim_chip.c2
-rw-r--r--sys/dev/ntb/if_ntb/if_ntb.c4
-rw-r--r--sys/dev/ntb/ntb_hw/ntb_hw.c4
-rw-r--r--sys/dev/nxge/if_nxge.c2
-rw-r--r--sys/dev/oce/oce_if.c2
-rw-r--r--sys/dev/patm/if_patm_attach.c2
-rw-r--r--sys/dev/qlxgb/qla_os.c2
-rw-r--r--sys/dev/qlxgbe/ql_os.c2
-rw-r--r--sys/dev/qlxge/qls_os.c2
-rw-r--r--sys/dev/rndtest/rndtest.c2
-rw-r--r--sys/dev/safe/safe.c2
-rw-r--r--sys/dev/sfxge/sfxge_rx.c2
-rw-r--r--sys/dev/sound/midi/mpu401.c2
-rw-r--r--sys/dev/sound/pci/atiixp.c2
-rw-r--r--sys/dev/sound/pci/es137x.c2
-rw-r--r--sys/dev/sound/pci/hda/hdaa.c2
-rw-r--r--sys/dev/sound/pci/hda/hdac.c2
-rw-r--r--sys/dev/sound/pci/via8233.c2
-rw-r--r--sys/dev/twa/tw_osl_freebsd.c4
-rw-r--r--sys/dev/tws/tws.c4
-rw-r--r--sys/dev/ubsec/ubsec.c2
-rw-r--r--sys/dev/virtio/random/virtio_random.c2
-rw-r--r--sys/dev/watchdog/watchdog.c4
-rw-r--r--sys/dev/xen/netfront/netfront.c2
-rw-r--r--sys/fs/nfs/nfs_commonport.c2
-rw-r--r--sys/gdb/gdb_cons.c2
-rw-r--r--sys/geom/gate/g_gate.c2
-rw-r--r--sys/geom/journal/g_journal.c2
-rw-r--r--sys/geom/mirror/g_mirror.c2
-rw-r--r--sys/geom/raid3/g_raid3.c2
-rw-r--r--sys/geom/sched/gs_rr.c2
-rw-r--r--sys/i386/i386/mp_watchdog.c2
-rw-r--r--sys/kern/init_main.c2
-rw-r--r--sys/kern/kern_cons.c2
-rw-r--r--sys/kern/kern_event.c2
-rw-r--r--sys/kern/kern_synch.c2
-rw-r--r--sys/kern/kern_thread.c2
-rw-r--r--sys/kern/subr_vmem.c2
-rw-r--r--sys/kern/uipc_domain.c4
-rw-r--r--sys/mips/cavium/octe/ethernet.c2
-rw-r--r--sys/mips/cavium/octeon_rnd.c2
-rw-r--r--sys/mips/nlm/dev/net/xlpge.c2
-rw-r--r--sys/mips/rmi/dev/xlr/rge.c4
-rw-r--r--sys/net/if_spppsubr.c16
-rw-r--r--sys/net80211/ieee80211_ht.c2
-rw-r--r--sys/net80211/ieee80211_hwmp.c2
-rw-r--r--sys/net80211/ieee80211_mesh.c10
-rw-r--r--sys/net80211/ieee80211_node.c2
-rw-r--r--sys/net80211/ieee80211_proto.c2
-rw-r--r--sys/netgraph/netflow/ng_netflow.c2
-rw-r--r--sys/netgraph/netgraph.h2
-rw-r--r--sys/netinet/in_pcb.c2
-rw-r--r--sys/netinet/ip_mroute.c6
-rw-r--r--sys/netinet/tcp_hostcache.c2
-rw-r--r--sys/netinet/tcp_subr.c10
-rw-r--r--sys/netinet6/in6_rmx.c2
-rw-r--r--sys/netipsec/key.c2
-rw-r--r--sys/netpfil/ipfw/ip_dummynet.c2
-rw-r--r--sys/netpfil/ipfw/ip_fw_dynamic.c2
-rw-r--r--sys/netpfil/pf/if_pfsync.c2
-rw-r--r--sys/ofed/include/linux/timer.h4
-rw-r--r--sys/ofed/include/linux/workqueue.h2
-rw-r--r--sys/powerpc/mambo/mambo_console.c2
-rw-r--r--sys/powerpc/pseries/phyp_console.c2
-rw-r--r--sys/sys/callout.h2
-rw-r--r--sys/vm/uma_core.c2
-rw-r--r--sys/x86/x86/mca.c2
100 files changed, 145 insertions, 149 deletions
diff --git a/sys/amd64/amd64/mp_watchdog.c b/sys/amd64/amd64/mp_watchdog.c
index b03d261..f6b853a 100644
--- a/sys/amd64/amd64/mp_watchdog.c
+++ b/sys/amd64/amd64/mp_watchdog.c
@@ -85,7 +85,7 @@ static void
watchdog_init(void *arg)
{
- callout_init(&watchdog_callout, CALLOUT_MPSAFE);
+ callout_init(&watchdog_callout, 1);
if (watchdog_cpu != -1)
watchdog_change(watchdog_cpu);
}
diff --git a/sys/amd64/vmm/io/vatpit.c b/sys/amd64/vmm/io/vatpit.c
index 173ef1f..d39c759 100644
--- a/sys/amd64/vmm/io/vatpit.c
+++ b/sys/amd64/vmm/io/vatpit.c
@@ -436,7 +436,7 @@ vatpit_init(struct vm *vm)
vatpit->freq_sbt = bttosbt(bt);
for (i = 0; i < 3; i++) {
- callout_init(&vatpit->channel[i].callout, true);
+ callout_init(&vatpit->channel[i].callout, 1);
arg = &vatpit->channel[i].callout_arg;
arg->vatpit = vatpit;
arg->channel_num = i;
diff --git a/sys/arm/amlogic/aml8726/aml8726_rng.c b/sys/arm/amlogic/aml8726/aml8726_rng.c
index b5a44e3..e3397aa 100644
--- a/sys/arm/amlogic/aml8726/aml8726_rng.c
+++ b/sys/arm/amlogic/aml8726/aml8726_rng.c
@@ -115,7 +115,7 @@ aml8726_rng_attach(device_t dev)
else
sc->ticks = 1;
- callout_init(&sc->co, CALLOUT_MPSAFE);
+ callout_init(&sc->co, 1);
callout_reset(&sc->co, sc->ticks, aml8726_rng_harvest, sc);
return (0);
diff --git a/sys/arm/freescale/imx/imx_sdhci.c b/sys/arm/freescale/imx/imx_sdhci.c
index f197309..290a031 100644
--- a/sys/arm/freescale/imx/imx_sdhci.c
+++ b/sys/arm/freescale/imx/imx_sdhci.c
@@ -745,7 +745,7 @@ imx_sdhci_attach(device_t dev)
sc->force_card_present = true;
}
- callout_init(&sc->r1bfix_callout, true);
+ callout_init(&sc->r1bfix_callout, 1);
sdhci_init_slot(dev, &sc->slot, 0);
bus_generic_probe(dev);
diff --git a/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c b/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c
index b31e8bb..4e55160 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c
@@ -14225,8 +14225,8 @@ dtrace_state_create(struct cdev *dev)
state->dts_cleaner = CYCLIC_NONE;
state->dts_deadman = CYCLIC_NONE;
#else
- callout_init(&state->dts_cleaner, CALLOUT_MPSAFE);
- callout_init(&state->dts_deadman, CALLOUT_MPSAFE);
+ callout_init(&state->dts_cleaner, 1);
+ callout_init(&state->dts_deadman, 1);
#endif
state->dts_vstate.dtvs_state = state;
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c
index b51dd97..d072dc3 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c
@@ -671,7 +671,7 @@ spa_add(const char *name, nvlist_t *config, const char *altroot)
mutex_exit(&cpu_lock);
#else /* !illumos */
#ifdef _KERNEL
- callout_init(&spa->spa_deadman_cycid, CALLOUT_MPSAFE);
+ callout_init(&spa->spa_deadman_cycid, 1);
#endif
#endif
refcount_create(&spa->spa_refcount);
diff --git a/sys/cddl/dev/profile/profile.c b/sys/cddl/dev/profile/profile.c
index d31d5c8..dd13397 100644
--- a/sys/cddl/dev/profile/profile.c
+++ b/sys/cddl/dev/profile/profile.c
@@ -342,7 +342,7 @@ profile_create(hrtime_t interval, char *name, int kind)
prof->prof_cyclic = CYCLIC_NONE;
#else
prof->prof_interval = nsec_to_sbt(interval);
- callout_init(&prof->prof_cyclic, CALLOUT_MPSAFE);
+ callout_init(&prof->prof_cyclic, 1);
#endif
prof->prof_kind = kind;
prof->prof_id = dtrace_probe_create(profile_id,
@@ -590,7 +590,7 @@ profile_enable_omni(profile_probe_t *prof)
pcpu->profc_probe = prof;
pcpu->profc_expected = sbinuptime() + prof->prof_interval;
pcpu->profc_interval = prof->prof_interval;
- callout_init(&pcpu->profc_cyclic, CALLOUT_MPSAFE);
+ callout_init(&pcpu->profc_cyclic, 1);
callout_reset_sbt_on(&pcpu->profc_cyclic,
pcpu->profc_expected, 0, profile_fire, pcpu,
cpu, C_DIRECT_EXEC | C_ABSOLUTE);
diff --git a/sys/compat/ndis/subr_ntoskrnl.c b/sys/compat/ndis/subr_ntoskrnl.c
index 482392d..95670ba 100644
--- a/sys/compat/ndis/subr_ntoskrnl.c
+++ b/sys/compat/ndis/subr_ntoskrnl.c
@@ -3749,7 +3749,7 @@ ntoskrnl_insert_timer(timer, ticks)
timer->k_callout = c;
- callout_init(c, CALLOUT_MPSAFE);
+ callout_init(c, 1);
callout_reset(c, ticks, ntoskrnl_timercall, timer);
}
diff --git a/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c b/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c
index 3bb46cf..93ea572 100644
--- a/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c
+++ b/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c
@@ -189,7 +189,7 @@ ipf_timer_func(arg)
#if 0
softc->ipf_slow_ch = timeout(ipf_timer_func, softc, hz/2);
#endif
- callout_init(&softc->ipf_slow_ch, CALLOUT_MPSAFE);
+ callout_init(&softc->ipf_slow_ch, 1);
callout_reset(&softc->ipf_slow_ch,
(hz / IPF_HZ_DIVIDE) * IPF_HZ_MULT,
ipf_timer_func, softc);
@@ -235,7 +235,7 @@ ipfattach(softc)
softc->ipf_slow_ch = timeout(ipf_timer_func, softc,
(hz / IPF_HZ_DIVIDE) * IPF_HZ_MULT);
#endif
- callout_init(&softc->ipf_slow_ch, CALLOUT_MPSAFE);
+ callout_init(&softc->ipf_slow_ch, 1);
callout_reset(&softc->ipf_slow_ch, (hz / IPF_HZ_DIVIDE) * IPF_HZ_MULT,
ipf_timer_func, softc);
return 0;
diff --git a/sys/contrib/vchiq/interface/compat/vchi_bsd.c b/sys/contrib/vchiq/interface/compat/vchi_bsd.c
index 31170bc..3d939b1 100644
--- a/sys/contrib/vchiq/interface/compat/vchi_bsd.c
+++ b/sys/contrib/vchiq/interface/compat/vchi_bsd.c
@@ -80,7 +80,7 @@ void
init_timer(struct timer_list *t)
{
mtx_init(&t->mtx, "dahdi timer lock", NULL, MTX_SPIN);
- callout_init(&t->callout, CALLOUT_MPSAFE);
+ callout_init(&t->callout, 1);
t->expires = 0;
/*
* function and data are not initialized intentionally:
diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c
index 2176191..d5d15da 100644
--- a/sys/dev/acpica/acpi.c
+++ b/sys/dev/acpica/acpi.c
@@ -447,7 +447,7 @@ acpi_attach(device_t dev)
sc = device_get_softc(dev);
sc->acpi_dev = dev;
- callout_init(&sc->susp_force_to, TRUE);
+ callout_init(&sc->susp_force_to, 1);
error = ENXIO;
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 4b7f8bc..83d9bd2 100644
--- a/sys/dev/ath/if_ath.c
+++ b/sys/dev/ath/if_ath.c
@@ -847,7 +847,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 7d81720..8ef3e1e 100644
--- a/sys/dev/ce/if_ce.c
+++ b/sys/dev/ce/if_ce.c
@@ -104,10 +104,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; \
@@ -609,7 +605,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
@@ -661,7 +657,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);
@@ -2558,7 +2554,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 3d07ef2..44791d0 100644
--- a/sys/dev/cp/if_cp.c
+++ b/sys/dev/cp/if_cp.c
@@ -445,7 +445,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);
@@ -474,7 +474,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);
@@ -2223,7 +2223,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 2e9d2e2..e7b8927 100644
--- a/sys/dev/ctau/if_ct.c
+++ b/sys/dev/ctau/if_ct.c
@@ -646,7 +646,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,
@@ -685,7 +685,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) {
@@ -2162,7 +2162,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 2327403..cac69ab 100644
--- a/sys/dev/cx/if_cx.c
+++ b/sys/dev/cx/if_cx.c
@@ -746,7 +746,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,
@@ -796,7 +796,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);
@@ -867,7 +867,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);
@@ -2497,7 +2497,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 1d8ebc9..c03d70c 100644
--- a/sys/dev/cxgb/cxgb_main.c
+++ b/sys/dev/cxgb/cxgb_main.c
@@ -592,7 +592,7 @@ cxgb_controller_attach(device_t dev)
/* Create a periodic callout for checking adapter status */
- callout_init(&sc->cxgb_tick_ch, TRUE);
+ callout_init(&sc->cxgb_tick_ch, 1);
if (t3_check_fw_version(sc) < 0 || force_fw_update) {
/*
@@ -1006,7 +1006,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 71087cc..a749900 100644
--- a/sys/dev/cxgb/cxgb_sge.c
+++ b/sys/dev/cxgb/cxgb_sge.c
@@ -1008,7 +1008,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/cxgb/ulp/iw_cxgb/iw_cxgb_cm.c b/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cm.c
index eba1ab7..7b43560 100644
--- a/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cm.c
+++ b/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cm.c
@@ -163,7 +163,7 @@ start_ep_timer(struct iwch_ep *ep)
* XXX this looks racy
*/
get_ep(&ep->com);
- callout_init(&ep->timer, TRUE);
+ callout_init(&ep->timer, 1);
}
callout_reset(&ep->timer, ep_timeout_secs * hz, ep_timeout, ep);
}
@@ -1307,7 +1307,7 @@ iwch_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param)
err = (-ENOMEM);
goto out;
}
- callout_init(&ep->timer, TRUE);
+ callout_init(&ep->timer, 1);
ep->plen = conn_param->private_data_len;
if (ep->plen)
memcpy(ep->mpa_pkt + sizeof(struct mpa_message),
@@ -1598,7 +1598,7 @@ process_newconn(struct iwch_ep *parent_ep)
free(remote, M_SONAME);
get_ep(&parent_ep->com);
child_ep->parent_ep = parent_ep;
- callout_init(&child_ep->timer, TRUE);
+ callout_init(&child_ep->timer, 1);
state_set(&child_ep->com, MPA_REQ_WAIT);
start_ep_timer(child_ep);
diff --git a/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c b/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c
index 9a3d75f..8f4980f 100644
--- a/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c
+++ b/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c
@@ -906,7 +906,7 @@ static struct ib_qp *iwch_create_qp(struct ib_pd *pd,
insert_mmap(ucontext, mm2);
}
qhp->ibqp.qp_num = qhp->wq.qpid;
- callout_init(&(qhp->timer), TRUE);
+ callout_init(&(qhp->timer), 1);
CTR6(KTR_IW_CXGB, "sq_num_entries %d, rq_num_entries %d "
"qpid 0x%0x qhp %p dma_addr 0x%llx size %d",
qhp->attr.sq_num_entries, qhp->attr.rq_num_entries,
diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c
index 4bbb55e..f5b2644 100644
--- a/sys/dev/cxgbe/t4_main.c
+++ b/sys/dev/cxgbe/t4_main.c
@@ -613,7 +613,7 @@ t4_attach(device_t dev)
mtx_init(&sc->sfl_lock, "starving freelists", 0, MTX_DEF);
TAILQ_INIT(&sc->sfl);
- callout_init(&sc->sfl_callout, CALLOUT_MPSAFE);
+ callout_init(&sc->sfl_callout, 1);
mtx_init(&sc->regwin_lock, "register and memory window", 0, MTX_DEF);
@@ -1082,7 +1082,7 @@ cxgbe_attach(device_t dev)
pi->ifp = ifp;
ifp->if_softc = pi;
- callout_init(&pi->tick, CALLOUT_MPSAFE);
+ callout_init(&pi->tick, 1);
if_initname(ifp, device_get_name(dev), device_get_unit(dev));
ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
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 9a467ed..943ce7d 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 8330d30..5b72482 100644
--- a/sys/dev/hifn/hifn7751.c
+++ b/sys/dev/hifn/hifn7751.c
@@ -589,7 +589,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);
@@ -765,7 +765,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 3a27115..27a94ef 100644
--- a/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c
+++ b/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c
@@ -1473,7 +1473,7 @@ storvsc_action(struct cam_sim *sim, union ccb *ccb)
}
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 c066483..7ac1dea 100644
--- a/sys/dev/if_ndis/if_ndis.c
+++ b/sys/dev/if_ndis/if_ndis.c
@@ -558,7 +558,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);
@@ -734,7 +734,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 4151900..e6b68fd 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 5ec813e..a2d604c 100644
--- a/sys/dev/mfi/mfi.c
+++ b/sys/dev/mfi/mfi.c
@@ -780,7 +780,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 89a39c0..5997dbc 100644
--- a/sys/dev/mwl/if_mwl.c
+++ b/sys/dev/mwl/if_mwl.c
@@ -363,7 +363,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/if_ntb/if_ntb.c b/sys/dev/ntb/if_ntb/if_ntb.c
index e86ed53..84716d9 100644
--- a/sys/dev/ntb/if_ntb/if_ntb.c
+++ b/sys/dev/ntb/if_ntb/if_ntb.c
@@ -555,8 +555,8 @@ ntb_transport_init_queue(struct ntb_netdev *nt, unsigned int qp_num)
qp->tx_index = 0;
callout_init(&qp->link_work, 0);
- callout_init(&qp->queue_full, CALLOUT_MPSAFE);
- callout_init(&qp->rx_full, CALLOUT_MPSAFE);
+ callout_init(&qp->queue_full, 1);
+ callout_init(&qp->rx_full, 1);
mtx_init(&qp->ntb_rx_pend_q_lock, "ntb rx pend q", NULL, MTX_SPIN);
mtx_init(&qp->ntb_rx_free_q_lock, "ntb rx free q", NULL, MTX_SPIN);
diff --git a/sys/dev/ntb/ntb_hw/ntb_hw.c b/sys/dev/ntb/ntb_hw/ntb_hw.c
index 019f2a7..731dfaf 100644
--- a/sys/dev/ntb/ntb_hw/ntb_hw.c
+++ b/sys/dev/ntb/ntb_hw/ntb_hw.c
@@ -266,8 +266,8 @@ ntb_attach(device_t device)
ntb->features = p->features;
/* Heartbeat timer for NTB_SOC 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);
DETACH_ON_ERROR(ntb_map_pci_bars(ntb));
DETACH_ON_ERROR(ntb_initialize_hw(ntb));
diff --git a/sys/dev/nxge/if_nxge.c b/sys/dev/nxge/if_nxge.c
index 9fa2cfe..90871ae 100644
--- a/sys/dev/nxge/if_nxge.c
+++ b/sys/dev/nxge/if_nxge.c
@@ -1744,7 +1744,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 062181b..826cd3c 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 f4b8c4e..ed48bda 100644
--- a/sys/dev/patm/if_patm_attach.c
+++ b/sys/dev/patm/if_patm_attach.c
@@ -208,7 +208,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/qlxgb/qla_os.c b/sys/dev/qlxgb/qla_os.c
index 54619cb..da1e34f 100644
--- a/sys/dev/qlxgb/qla_os.c
+++ b/sys/dev/qlxgb/qla_os.c
@@ -378,7 +378,7 @@ qla_pci_attach(device_t dev)
ha->flags.qla_watchdog_active = 1;
ha->flags.qla_watchdog_pause = 1;
- callout_init(&ha->tx_callout, TRUE);
+ callout_init(&ha->tx_callout, 1);
/* create ioctl device interface */
if (qla_make_cdev(ha)) {
diff --git a/sys/dev/qlxgbe/ql_os.c b/sys/dev/qlxgbe/ql_os.c
index 04fbf71..8b7023c 100644
--- a/sys/dev/qlxgbe/ql_os.c
+++ b/sys/dev/qlxgbe/ql_os.c
@@ -419,7 +419,7 @@ qla_pci_attach(device_t dev)
taskqueue_start_threads(&ha->tx_tq, 1, PI_NET, "%s txq",
device_get_nameunit(ha->pci_dev));
- callout_init(&ha->tx_callout, TRUE);
+ callout_init(&ha->tx_callout, 1);
ha->flags.qla_callout_init = 1;
/* create ioctl device interface */
diff --git a/sys/dev/qlxge/qls_os.c b/sys/dev/qlxge/qls_os.c
index 1617d24..878a0e6 100644
--- a/sys/dev/qlxge/qls_os.c
+++ b/sys/dev/qlxge/qls_os.c
@@ -453,7 +453,7 @@ qls_pci_attach(device_t dev)
taskqueue_start_threads(&ha->tx_tq, 1, PI_NET, "%s txq",
device_get_nameunit(ha->pci_dev));
- callout_init(&ha->tx_callout, TRUE);
+ callout_init(&ha->tx_callout, 1);
ha->flags.qla_callout_init = 1;
/* create ioctl device interface */
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 9b91ed0..2df1f51 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/sfxge/sfxge_rx.c b/sys/dev/sfxge/sfxge_rx.c
index e38419c..2535e87 100644
--- a/sys/dev/sfxge/sfxge_rx.c
+++ b/sys/dev/sfxge/sfxge_rx.c
@@ -1217,7 +1217,7 @@ sfxge_rx_qinit(struct sfxge_softc *sc, unsigned int index)
M_SFXGE, M_WAITOK | M_ZERO);
sfxge_lro_init(rxq);
- callout_init(&rxq->refill_callout, B_TRUE);
+ callout_init(&rxq->refill_callout, 1);
rxq->init_state = SFXGE_RXQ_INITIALIZED;
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 9b8c55e..8df67aa 100644
--- a/sys/dev/sound/pci/atiixp.c
+++ b/sys/dev/sound/pci/atiixp.c
@@ -1194,7 +1194,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 fe45343..a1b9f7c 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 1e173c6..b0f250c 100644
--- a/sys/dev/sound/pci/hda/hdac.c
+++ b/sys/dev/sound/pci/hda/hdac.c
@@ -1110,7 +1110,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 171278c..0694cef 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 9c70db3..4c3529e 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");
@@ -719,7 +719,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 a79886c..27bb591 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/watchdog/watchdog.c b/sys/dev/watchdog/watchdog.c
index 5c9c6a1..9d87327 100644
--- a/sys/dev/watchdog/watchdog.c
+++ b/sys/dev/watchdog/watchdog.c
@@ -389,8 +389,8 @@ watchdog_modevent(module_t mod __unused, int type, void *data __unused)
{
switch(type) {
case MOD_LOAD:
- callout_init(&wd_pretimeo_handle, true);
- callout_init(&wd_softtimeo_handle, true);
+ callout_init(&wd_pretimeo_handle, 1);
+ callout_init(&wd_softtimeo_handle, 1);
wd_dev = make_dev(&wd_cdevsw, 0,
UID_ROOT, GID_WHEEL, 0600, _PATH_WATCHDOG);
return 0;
diff --git a/sys/dev/xen/netfront/netfront.c b/sys/dev/xen/netfront/netfront.c
index 4e3b4df..317a339 100644
--- a/sys/dev/xen/netfront/netfront.c
+++ b/sys/dev/xen/netfront/netfront.c
@@ -2092,7 +2092,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);
diff --git a/sys/fs/nfs/nfs_commonport.c b/sys/fs/nfs/nfs_commonport.c
index eea146a..bc5d9de 100644
--- a/sys/fs/nfs/nfs_commonport.c
+++ b/sys/fs/nfs/nfs_commonport.c
@@ -589,7 +589,7 @@ nfscommon_modevent(module_t mod, int type, void *data)
mtx_init(&nfs_req_mutex, "nfs_req_mutex", NULL, MTX_DEF);
mtx_init(&nfsrv_nfsuserdsock.nr_mtx, "nfsuserd", NULL,
MTX_DEF);
- callout_init(&newnfsd_callout, CALLOUT_MPSAFE);
+ callout_init(&newnfsd_callout, 1);
newnfs_init();
nfsd_call_nfscommon = nfssvc_nfscommon;
loaded = 1;
diff --git a/sys/gdb/gdb_cons.c b/sys/gdb/gdb_cons.c
index 47f453f..6bf2f9b 100644
--- a/sys/gdb/gdb_cons.c
+++ b/sys/gdb/gdb_cons.c
@@ -76,7 +76,7 @@ gdb_cninit(struct consdev *cp)
/* setup tx buffer and callout */
if (c->npending == -1) {
c->npending = 0;
- callout_init(&c->flush, CALLOUT_MPSAFE);
+ callout_init(&c->flush, 1);
cp->cn_arg = c;
}
}
diff --git a/sys/geom/gate/g_gate.c b/sys/geom/gate/g_gate.c
index ae0d7b0..3453eef 100644
--- a/sys/geom/gate/g_gate.c
+++ b/sys/geom/gate/g_gate.c
@@ -486,7 +486,7 @@ g_gate_create(struct g_gate_ctl_create *ggio)
if (sc->sc_queue_size > G_GATE_MAX_QUEUE_SIZE)
sc->sc_queue_size = G_GATE_MAX_QUEUE_SIZE;
sc->sc_timeout = ggio->gctl_timeout;
- callout_init(&sc->sc_callout, CALLOUT_MPSAFE);
+ callout_init(&sc->sc_callout, 1);
mtx_lock(&g_gate_units_lock);
sc->sc_unit = g_gate_getunit(ggio->gctl_unit, &error);
diff --git a/sys/geom/journal/g_journal.c b/sys/geom/journal/g_journal.c
index 9cc324c..f0eb103 100644
--- a/sys/geom/journal/g_journal.c
+++ b/sys/geom/journal/g_journal.c
@@ -2314,7 +2314,7 @@ g_journal_create(struct g_class *mp, struct g_provider *pp,
sc->sc_rootmount = root_mount_hold("GJOURNAL");
GJ_DEBUG(1, "root_mount_hold %p", sc->sc_rootmount);
- callout_init(&sc->sc_callout, CALLOUT_MPSAFE);
+ callout_init(&sc->sc_callout, 1);
if (md->md_type != GJ_TYPE_COMPLETE) {
/*
* Journal and data are on separate providers.
diff --git a/sys/geom/mirror/g_mirror.c b/sys/geom/mirror/g_mirror.c
index 1912271..cb2e41b 100644
--- a/sys/geom/mirror/g_mirror.c
+++ b/sys/geom/mirror/g_mirror.c
@@ -2935,7 +2935,7 @@ g_mirror_create(struct g_class *mp, const struct g_mirror_metadata *md)
LIST_INIT(&sc->sc_disks);
TAILQ_INIT(&sc->sc_events);
mtx_init(&sc->sc_events_mtx, "gmirror:events", NULL, MTX_DEF);
- callout_init(&sc->sc_callout, CALLOUT_MPSAFE);
+ callout_init(&sc->sc_callout, 1);
mtx_init(&sc->sc_done_mtx, "gmirror:done", NULL, MTX_DEF);
sc->sc_state = G_MIRROR_DEVICE_STATE_STARTING;
gp->softc = sc;
diff --git a/sys/geom/raid3/g_raid3.c b/sys/geom/raid3/g_raid3.c
index f935f78..132ef84 100644
--- a/sys/geom/raid3/g_raid3.c
+++ b/sys/geom/raid3/g_raid3.c
@@ -3156,7 +3156,7 @@ g_raid3_create(struct g_class *mp, const struct g_raid3_metadata *md)
bioq_init(&sc->sc_sync_delayed);
TAILQ_INIT(&sc->sc_events);
mtx_init(&sc->sc_events_mtx, "graid3:events", NULL, MTX_DEF);
- callout_init(&sc->sc_callout, CALLOUT_MPSAFE);
+ callout_init(&sc->sc_callout, 1);
sc->sc_state = G_RAID3_DEVICE_STATE_STARTING;
gp->softc = sc;
sc->sc_geom = gp;
diff --git a/sys/geom/sched/gs_rr.c b/sys/geom/sched/gs_rr.c
index b9d5d1b..7742ef6 100644
--- a/sys/geom/sched/gs_rr.c
+++ b/sys/geom/sched/gs_rr.c
@@ -602,7 +602,7 @@ g_rr_init(struct g_geom *geom)
sc = malloc(sizeof *sc, M_GEOM_SCHED, M_NOWAIT | M_ZERO);
sc->sc_geom = geom;
TAILQ_INIT(&sc->sc_rr_tailq);
- callout_init(&sc->sc_wait, CALLOUT_MPSAFE);
+ callout_init(&sc->sc_wait, 1);
LIST_INSERT_HEAD(&me.sc_head, sc, sc_next);
me.units++;
diff --git a/sys/i386/i386/mp_watchdog.c b/sys/i386/i386/mp_watchdog.c
index b03d261..f6b853a 100644
--- a/sys/i386/i386/mp_watchdog.c
+++ b/sys/i386/i386/mp_watchdog.c
@@ -85,7 +85,7 @@ static void
watchdog_init(void *arg)
{
- callout_init(&watchdog_callout, CALLOUT_MPSAFE);
+ callout_init(&watchdog_callout, 1);
if (watchdog_cpu != -1)
watchdog_change(watchdog_cpu);
}
diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c
index 3f51cb5..c263356 100644
--- a/sys/kern/init_main.c
+++ b/sys/kern/init_main.c
@@ -506,7 +506,7 @@ proc0_init(void *dummy __unused)
callout_init_mtx(&p->p_itcallout, &p->p_mtx, 0);
callout_init_mtx(&p->p_limco, &p->p_mtx, 0);
- callout_init(&td->td_slpcallout, CALLOUT_MPSAFE);
+ callout_init(&td->td_slpcallout, 1);
/* Create credentials. */
newcred = crget();
diff --git a/sys/kern/kern_cons.c b/sys/kern/kern_cons.c
index 75f8b9c..d219c81 100644
--- a/sys/kern/kern_cons.c
+++ b/sys/kern/kern_cons.c
@@ -654,7 +654,7 @@ static void
sysbeep_init(void *unused)
{
- callout_init(&beeping_timer, CALLOUT_MPSAFE);
+ callout_init(&beeping_timer, 1);
}
SYSINIT(sysbeep, SI_SUB_SOFTINTR, SI_ORDER_ANY, sysbeep_init, NULL);
#else
diff --git a/sys/kern/kern_event.c b/sys/kern/kern_event.c
index e01f12c..b6d8a79 100644
--- a/sys/kern/kern_event.c
+++ b/sys/kern/kern_event.c
@@ -615,7 +615,7 @@ filt_timerattach(struct knote *kn)
kn->kn_status &= ~KN_DETACHED; /* knlist_add clears it */
kn->kn_ptr.p_nexttime = malloc(sizeof(sbintime_t), M_KQUEUE, M_WAITOK);
calloutp = malloc(sizeof(*calloutp), M_KQUEUE, M_WAITOK);
- callout_init(calloutp, CALLOUT_MPSAFE);
+ callout_init(calloutp, 1);
kn->kn_hook = calloutp;
*kn->kn_ptr.p_nexttime = to + sbinuptime();
callout_reset_sbt_on(calloutp, *kn->kn_ptr.p_nexttime, 0,
diff --git a/sys/kern/kern_synch.c b/sys/kern/kern_synch.c
index a238a09..e0ee2dc 100644
--- a/sys/kern/kern_synch.c
+++ b/sys/kern/kern_synch.c
@@ -556,7 +556,7 @@ loadav(void *arg)
static void
synch_setup(void *dummy)
{
- callout_init(&loadav_callout, CALLOUT_MPSAFE);
+ callout_init(&loadav_callout, 1);
/* Kick off timeout driven events by calling first time. */
loadav(NULL);
diff --git a/sys/kern/kern_thread.c b/sys/kern/kern_thread.c
index 3c8e13a..cfcdfc9 100644
--- a/sys/kern/kern_thread.c
+++ b/sys/kern/kern_thread.c
@@ -546,7 +546,7 @@ thread_link(struct thread *td, struct proc *p)
LIST_INIT(&td->td_lprof[0]);
LIST_INIT(&td->td_lprof[1]);
sigqueue_init(&td->td_sigqueue, p);
- callout_init(&td->td_slpcallout, CALLOUT_MPSAFE);
+ callout_init(&td->td_slpcallout, 1);
TAILQ_INSERT_TAIL(&p->p_threads, td, td_plist);
p->p_numthreads++;
}
diff --git a/sys/kern/subr_vmem.c b/sys/kern/subr_vmem.c
index 80940be..4e08113 100644
--- a/sys/kern/subr_vmem.c
+++ b/sys/kern/subr_vmem.c
@@ -766,7 +766,7 @@ vmem_start_callout(void *unused)
TASK_INIT(&vmem_periodic_wk, 0, vmem_periodic, NULL);
vmem_periodic_interval = hz * 10;
- callout_init(&vmem_periodic_ch, CALLOUT_MPSAFE);
+ callout_init(&vmem_periodic_ch, 1);
callout_reset(&vmem_periodic_ch, vmem_periodic_interval,
vmem_periodic_kick, NULL);
}
diff --git a/sys/kern/uipc_domain.c b/sys/kern/uipc_domain.c
index 9eda77c..6dc24f9 100644
--- a/sys/kern/uipc_domain.c
+++ b/sys/kern/uipc_domain.c
@@ -248,8 +248,8 @@ domaininit(void *dummy)
if (max_linkhdr < 16) /* XXX */
max_linkhdr = 16;
- callout_init(&pffast_callout, CALLOUT_MPSAFE);
- callout_init(&pfslow_callout, CALLOUT_MPSAFE);
+ callout_init(&pffast_callout, 1);
+ callout_init(&pfslow_callout, 1);
mtx_lock(&dom_mtx);
KASSERT(domain_init_status == 0, ("domaininit called too late!"));
diff --git a/sys/mips/cavium/octe/ethernet.c b/sys/mips/cavium/octe/ethernet.c
index b2a5ddf..d473d82 100644
--- a/sys/mips/cavium/octe/ethernet.c
+++ b/sys/mips/cavium/octe/ethernet.c
@@ -455,7 +455,7 @@ int cvm_oct_init_module(device_t bus)
cvmx_write_csr(CVMX_POW_WQ_INT_THRX(pow_receive_group), 0x1001);
}
- callout_init(&cvm_oct_poll_timer, CALLOUT_MPSAFE);
+ callout_init(&cvm_oct_poll_timer, 1);
callout_reset(&cvm_oct_poll_timer, hz, cvm_do_timer, NULL);
return 0;
diff --git a/sys/mips/cavium/octeon_rnd.c b/sys/mips/cavium/octeon_rnd.c
index 9419314..844de45 100644
--- a/sys/mips/cavium/octeon_rnd.c
+++ b/sys/mips/cavium/octeon_rnd.c
@@ -95,7 +95,7 @@ octeon_rnd_attach(device_t dev)
struct octeon_rnd_softc *sc;
sc = device_get_softc(dev);
- callout_init(&sc->sc_callout, CALLOUT_MPSAFE);
+ callout_init(&sc->sc_callout, 1);
callout_reset(&sc->sc_callout, hz * 5, octeon_rnd_harvest, sc);
cvmx_rng_enable();
diff --git a/sys/mips/nlm/dev/net/xlpge.c b/sys/mips/nlm/dev/net/xlpge.c
index e9bb86e..aaa6379 100644
--- a/sys/mips/nlm/dev/net/xlpge.c
+++ b/sys/mips/nlm/dev/net/xlpge.c
@@ -1240,7 +1240,7 @@ nlm_xlpge_attach(device_t dev)
sc->prepad_en = sc->network_sc->prepad_en;
sc->prepad_size = sc->network_sc->prepad_size;
- callout_init(&sc->xlpge_callout, CALLOUT_MPSAFE);
+ callout_init(&sc->xlpge_callout, 1);
XLPGE_LOCK_INIT(sc, device_get_nameunit(dev));
diff --git a/sys/mips/rmi/dev/xlr/rge.c b/sys/mips/rmi/dev/xlr/rge.c
index 6fd2bc6..248dd42 100644
--- a/sys/mips/rmi/dev/xlr/rge.c
+++ b/sys/mips/rmi/dev/xlr/rge.c
@@ -1894,9 +1894,9 @@ rge_attach(device_t dev)
if (!gmac_common_init_done) {
mac_common_init();
gmac_common_init_done = 1;
- callout_init(&xlr_tx_stop_bkp, CALLOUT_MPSAFE);
+ callout_init(&xlr_tx_stop_bkp, 1);
callout_reset(&xlr_tx_stop_bkp, hz, xlr_tx_q_wakeup, NULL);
- callout_init(&rge_dbg_count, CALLOUT_MPSAFE);
+ callout_init(&rge_dbg_count, 1);
//callout_reset(&rge_dbg_count, hz, xlr_debug_count, NULL);
}
if ((ret = rmi_xlr_mac_open(sc)) == -1) {
diff --git a/sys/net/if_spppsubr.c b/sys/net/if_spppsubr.c
index c0f8e39..6743981 100644
--- a/sys/net/if_spppsubr.c
+++ b/sys/net/if_spppsubr.c
@@ -1005,7 +1005,7 @@ sppp_attach(struct ifnet *ifp)
mtx_init(&sp->mtx, "sppp", MTX_NETWORK_LOCK, MTX_DEF | MTX_RECURSE);
/* Initialize keepalive handler. */
- callout_init(&sp->keepalive_callout, CALLOUT_MPSAFE);
+ callout_init(&sp->keepalive_callout, 1);
callout_reset(&sp->keepalive_callout, hz * 10, sppp_keepalive,
(void *)sp);
@@ -1037,7 +1037,7 @@ sppp_attach(struct ifnet *ifp)
#ifdef INET6
sp->confflags |= CONF_ENABLE_IPV6;
#endif
- callout_init(&sp->ifstart_callout, CALLOUT_MPSAFE);
+ callout_init(&sp->ifstart_callout, 1);
sp->if_start = ifp->if_start;
ifp->if_start = sppp_ifstart;
sp->pp_comp = malloc(sizeof(struct slcompress), M_TEMP, M_WAITOK);
@@ -2145,7 +2145,7 @@ sppp_lcp_init(struct sppp *sp)
sp->lcp.max_terminate = 2;
sp->lcp.max_configure = 10;
sp->lcp.max_failure = 10;
- callout_init(&sp->ch[IDX_LCP], CALLOUT_MPSAFE);
+ callout_init(&sp->ch[IDX_LCP], 1);
}
static void
@@ -2836,7 +2836,7 @@ sppp_ipcp_init(struct sppp *sp)
sp->fail_counter[IDX_IPCP] = 0;
sp->pp_seq[IDX_IPCP] = 0;
sp->pp_rseq[IDX_IPCP] = 0;
- callout_init(&sp->ch[IDX_IPCP], CALLOUT_MPSAFE);
+ callout_init(&sp->ch[IDX_IPCP], 1);
}
static void
@@ -3395,7 +3395,7 @@ sppp_ipv6cp_init(struct sppp *sp)
sp->fail_counter[IDX_IPV6CP] = 0;
sp->pp_seq[IDX_IPV6CP] = 0;
sp->pp_rseq[IDX_IPV6CP] = 0;
- callout_init(&sp->ch[IDX_IPV6CP], CALLOUT_MPSAFE);
+ callout_init(&sp->ch[IDX_IPV6CP], 1);
}
static void
@@ -4200,7 +4200,7 @@ sppp_chap_init(struct sppp *sp)
sp->fail_counter[IDX_CHAP] = 0;
sp->pp_seq[IDX_CHAP] = 0;
sp->pp_rseq[IDX_CHAP] = 0;
- callout_init(&sp->ch[IDX_CHAP], CALLOUT_MPSAFE);
+ callout_init(&sp->ch[IDX_CHAP], 1);
}
static void
@@ -4522,8 +4522,8 @@ sppp_pap_init(struct sppp *sp)
sp->fail_counter[IDX_PAP] = 0;
sp->pp_seq[IDX_PAP] = 0;
sp->pp_rseq[IDX_PAP] = 0;
- callout_init(&sp->ch[IDX_PAP], CALLOUT_MPSAFE);
- callout_init(&sp->pap_my_to_ch, CALLOUT_MPSAFE);
+ callout_init(&sp->ch[IDX_PAP], 1);
+ callout_init(&sp->pap_my_to_ch, 1);
}
static void
diff --git a/sys/net80211/ieee80211_ht.c b/sys/net80211/ieee80211_ht.c
index 618252f..0700de8 100644
--- a/sys/net80211/ieee80211_ht.c
+++ b/sys/net80211/ieee80211_ht.c
@@ -1691,7 +1691,7 @@ ieee80211_setup_basic_htrates(struct ieee80211_node *ni, const uint8_t *ie)
static void
ampdu_tx_setup(struct ieee80211_tx_ampdu *tap)
{
- callout_init(&tap->txa_timer, CALLOUT_MPSAFE);
+ callout_init(&tap->txa_timer, 1);
tap->txa_flags |= IEEE80211_AGGR_SETUP;
tap->txa_lastsample = ticks;
}
diff --git a/sys/net80211/ieee80211_hwmp.c b/sys/net80211/ieee80211_hwmp.c
index 8d57302..601b848 100644
--- a/sys/net80211/ieee80211_hwmp.c
+++ b/sys/net80211/ieee80211_hwmp.c
@@ -275,7 +275,7 @@ hwmp_vattach(struct ieee80211vap *vap)
return;
}
hs->hs_maxhops = IEEE80211_HWMP_DEFAULT_MAXHOPS;
- callout_init(&hs->hs_roottimer, CALLOUT_MPSAFE);
+ callout_init(&hs->hs_roottimer, 1);
vap->iv_hwmp = hs;
}
diff --git a/sys/net80211/ieee80211_mesh.c b/sys/net80211/ieee80211_mesh.c
index 2c2151f..5ffd50b 100644
--- a/sys/net80211/ieee80211_mesh.c
+++ b/sys/net80211/ieee80211_mesh.c
@@ -217,7 +217,7 @@ mesh_rt_add_locked(struct ieee80211vap *vap,
IEEE80211_ADDR_COPY(rt->rt_dest, dest);
rt->rt_priv = (void *)ALIGN(&rt[1]);
mtx_init(&rt->rt_lock, "MBSS_RT", "802.11s route entry", MTX_DEF);
- callout_init(&rt->rt_discovery, CALLOUT_MPSAFE);
+ callout_init(&rt->rt_discovery, 1);
rt->rt_updtime = ticks; /* create time */
TAILQ_INSERT_TAIL(&ms->ms_routes, rt, rt_next);
}
@@ -679,8 +679,8 @@ mesh_vattach(struct ieee80211vap *vap)
TAILQ_INIT(&ms->ms_known_gates);
TAILQ_INIT(&ms->ms_routes);
mtx_init(&ms->ms_rt_lock, "MBSS", "802.11s routing table", MTX_DEF);
- callout_init(&ms->ms_cleantimer, CALLOUT_MPSAFE);
- callout_init(&ms->ms_gatetimer, CALLOUT_MPSAFE);
+ callout_init(&ms->ms_cleantimer, 1);
+ callout_init(&ms->ms_gatetimer, 1);
ms->ms_gateseq = 0;
mesh_select_proto_metric(vap, "AIRTIME");
KASSERT(ms->ms_pmetric, ("ms_pmetric == NULL"));
@@ -3384,8 +3384,8 @@ void
ieee80211_mesh_node_init(struct ieee80211vap *vap, struct ieee80211_node *ni)
{
ni->ni_flags |= IEEE80211_NODE_QOS;
- callout_init(&ni->ni_mltimer, CALLOUT_MPSAFE);
- callout_init(&ni->ni_mlhtimer, CALLOUT_MPSAFE);
+ callout_init(&ni->ni_mltimer, 1);
+ callout_init(&ni->ni_mlhtimer, 1);
}
/*
diff --git a/sys/net80211/ieee80211_node.c b/sys/net80211/ieee80211_node.c
index c84f9a8..fbb8e93 100644
--- a/sys/net80211/ieee80211_node.c
+++ b/sys/net80211/ieee80211_node.c
@@ -114,7 +114,7 @@ ieee80211_node_attach(struct ieee80211com *ic)
"802.11 staging q");
ieee80211_node_table_init(ic, &ic->ic_sta, "station",
IEEE80211_INACT_INIT, ic->ic_max_keyix);
- callout_init(&ic->ic_inact, CALLOUT_MPSAFE);
+ callout_init(&ic->ic_inact, 1);
callout_reset(&ic->ic_inact, IEEE80211_INACT_WAIT*hz,
ieee80211_node_timeout, ic);
diff --git a/sys/net80211/ieee80211_proto.c b/sys/net80211/ieee80211_proto.c
index 2f84769..1f09616 100644
--- a/sys/net80211/ieee80211_proto.c
+++ b/sys/net80211/ieee80211_proto.c
@@ -195,7 +195,7 @@ ieee80211_proto_vattach(struct ieee80211vap *vap)
vap->iv_fragthreshold = IEEE80211_FRAG_DEFAULT;
vap->iv_bmiss_max = IEEE80211_BMISS_MAX;
callout_init_mtx(&vap->iv_swbmiss, IEEE80211_LOCK_OBJ(ic), 0);
- callout_init(&vap->iv_mgtsend, CALLOUT_MPSAFE);
+ callout_init(&vap->iv_mgtsend, 1);
TASK_INIT(&vap->iv_nstate_task, 0, ieee80211_newstate_cb, vap);
TASK_INIT(&vap->iv_swbmiss_task, 0, beacon_swmiss, vap);
/*
diff --git a/sys/netgraph/netflow/ng_netflow.c b/sys/netgraph/netflow/ng_netflow.c
index 7b23e61..b5a82a4 100644
--- a/sys/netgraph/netflow/ng_netflow.c
+++ b/sys/netgraph/netflow/ng_netflow.c
@@ -259,7 +259,7 @@ ng_netflow_constructor(node_p node)
priv->ifaces[i].info.conf = NG_NETFLOW_CONF_INGRESS;
/* Initialize callout handle */
- callout_init(&priv->exp_callout, CALLOUT_MPSAFE);
+ callout_init(&priv->exp_callout, 1);
/* Allocate memory and set up flow cache */
ng_netflow_cache_init(priv);
diff --git a/sys/netgraph/netgraph.h b/sys/netgraph/netgraph.h
index dc008f4..9fc8986 100644
--- a/sys/netgraph/netgraph.h
+++ b/sys/netgraph/netgraph.h
@@ -1161,7 +1161,7 @@ int ng_send_fn2(node_p node, hook_p hook, item_p pitem, ng_item_fn2 *fn,
int ng_uncallout(struct callout *c, node_p node);
int ng_callout(struct callout *c, node_p node, hook_p hook, int ticks,
ng_item_fn *fn, void * arg1, int arg2);
-#define ng_callout_init(c) callout_init(c, CALLOUT_MPSAFE)
+#define ng_callout_init(c) callout_init(c, 1)
/* Flags for netgraph functions. */
#define NG_NOFLAGS 0x00000000 /* no special options */
diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c
index f8f2905..bc48e10 100644
--- a/sys/netinet/in_pcb.c
+++ b/sys/netinet/in_pcb.c
@@ -2249,7 +2249,7 @@ ipport_tick_init(const void *unused __unused)
{
/* Start ipport_tick. */
- callout_init(&ipport_tick_callout, CALLOUT_MPSAFE);
+ callout_init(&ipport_tick_callout, 1);
callout_reset(&ipport_tick_callout, 1, ipport_tick, NULL);
EVENTHANDLER_REGISTER(shutdown_pre_sync, ip_fini, NULL,
SHUTDOWN_PRI_DEFAULT);
diff --git a/sys/netinet/ip_mroute.c b/sys/netinet/ip_mroute.c
index a71e91c..ffa88ae 100644
--- a/sys/netinet/ip_mroute.c
+++ b/sys/netinet/ip_mroute.c
@@ -2816,9 +2816,9 @@ vnet_mroute_init(const void *unused __unused)
MALLOC(V_nexpire, u_char *, mfchashsize, M_MRTABLE, M_WAITOK|M_ZERO);
bzero(V_bw_meter_timers, sizeof(V_bw_meter_timers));
- callout_init(&V_expire_upcalls_ch, CALLOUT_MPSAFE);
- callout_init(&V_bw_upcalls_ch, CALLOUT_MPSAFE);
- callout_init(&V_bw_meter_ch, CALLOUT_MPSAFE);
+ callout_init(&V_expire_upcalls_ch, 1);
+ callout_init(&V_bw_upcalls_ch, 1);
+ callout_init(&V_bw_meter_ch, 1);
}
VNET_SYSINIT(vnet_mroute_init, SI_SUB_PSEUDO, SI_ORDER_ANY, vnet_mroute_init,
diff --git a/sys/netinet/tcp_hostcache.c b/sys/netinet/tcp_hostcache.c
index 6ff447c..a492540 100644
--- a/sys/netinet/tcp_hostcache.c
+++ b/sys/netinet/tcp_hostcache.c
@@ -238,7 +238,7 @@ tcp_hc_init(void)
/*
* Set up periodic cache cleanup.
*/
- callout_init(&V_tcp_hc_callout, CALLOUT_MPSAFE);
+ callout_init(&V_tcp_hc_callout, 1);
callout_reset(&V_tcp_hc_callout, V_tcp_hostcache.prune * hz,
tcp_hc_purge, curvnet);
}
diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c
index d75221c..757bcf2 100644
--- a/sys/netinet/tcp_subr.c
+++ b/sys/netinet/tcp_subr.c
@@ -791,11 +791,11 @@ tcp_newtcpcb(struct inpcb *inp)
V_tcp_mssdflt;
/* Set up our timeouts. */
- callout_init(&tp->t_timers->tt_rexmt, CALLOUT_MPSAFE);
- callout_init(&tp->t_timers->tt_persist, CALLOUT_MPSAFE);
- callout_init(&tp->t_timers->tt_keep, CALLOUT_MPSAFE);
- callout_init(&tp->t_timers->tt_2msl, CALLOUT_MPSAFE);
- callout_init(&tp->t_timers->tt_delack, CALLOUT_MPSAFE);
+ callout_init(&tp->t_timers->tt_rexmt, 1);
+ callout_init(&tp->t_timers->tt_persist, 1);
+ callout_init(&tp->t_timers->tt_keep, 1);
+ callout_init(&tp->t_timers->tt_2msl, 1);
+ callout_init(&tp->t_timers->tt_delack, 1);
if (V_tcp_do_rfc1323)
tp->t_flags = (TF_REQ_SCALE|TF_REQ_TSTMP);
diff --git a/sys/netinet6/in6_rmx.c b/sys/netinet6/in6_rmx.c
index 1403647..9aef3db 100644
--- a/sys/netinet6/in6_rmx.c
+++ b/sys/netinet6/in6_rmx.c
@@ -263,7 +263,7 @@ in6_inithead(void **head, int off)
rnh->rnh_addaddr = in6_addroute;
if (V__in6_rt_was_here == 0) {
- callout_init(&V_rtq_mtutimer, CALLOUT_MPSAFE);
+ callout_init(&V_rtq_mtutimer, 1);
in6_mtutimo(curvnet); /* kick off timeout first time */
V__in6_rt_was_here = 1;
}
diff --git a/sys/netipsec/key.c b/sys/netipsec/key.c
index f642ff4..1e70fb2 100644
--- a/sys/netipsec/key.c
+++ b/sys/netipsec/key.c
@@ -7560,7 +7560,7 @@ key_init(void)
SPACQ_LOCK_INIT();
#ifndef IPSEC_DEBUG2
- callout_init(&key_timer, CALLOUT_MPSAFE);
+ callout_init(&key_timer, 1);
callout_reset(&key_timer, hz, key_timehandler, NULL);
#endif /*IPSEC_DEBUG2*/
diff --git a/sys/netpfil/ipfw/ip_dummynet.c b/sys/netpfil/ipfw/ip_dummynet.c
index 06f80df..3ba110e 100644
--- a/sys/netpfil/ipfw/ip_dummynet.c
+++ b/sys/netpfil/ipfw/ip_dummynet.c
@@ -2169,7 +2169,7 @@ ip_dn_init(void)
taskqueue_thread_enqueue, &dn_tq);
taskqueue_start_threads(&dn_tq, 1, PI_NET, "dummynet");
- callout_init(&dn_timeout, CALLOUT_MPSAFE);
+ callout_init(&dn_timeout, 1);
dn_reschedule();
/* Initialize curr_time adjustment mechanics. */
diff --git a/sys/netpfil/ipfw/ip_fw_dynamic.c b/sys/netpfil/ipfw/ip_fw_dynamic.c
index 2b43869..083244d 100644
--- a/sys/netpfil/ipfw/ip_fw_dynamic.c
+++ b/sys/netpfil/ipfw/ip_fw_dynamic.c
@@ -1395,7 +1395,7 @@ ipfw_dyn_init(struct ip_fw_chain *chain)
/* Enforce limit on dynamic rules */
uma_zone_set_max(V_ipfw_dyn_rule_zone, V_dyn_max);
- callout_init(&V_ipfw_timeout, CALLOUT_MPSAFE);
+ callout_init(&V_ipfw_timeout, 1);
/*
* This can potentially be done on first dynamic rule
diff --git a/sys/netpfil/pf/if_pfsync.c b/sys/netpfil/pf/if_pfsync.c
index 3d62cf5..516a92a 100644
--- a/sys/netpfil/pf/if_pfsync.c
+++ b/sys/netpfil/pf/if_pfsync.c
@@ -324,7 +324,7 @@ pfsync_clone_create(struct if_clone *ifc, int unit, caddr_t param)
ifp->if_mtu = ETHERMTU;
mtx_init(&sc->sc_mtx, pfsyncname, NULL, MTX_DEF);
mtx_init(&sc->sc_bulk_mtx, "pfsync bulk", NULL, MTX_DEF);
- callout_init(&sc->sc_tmo, CALLOUT_MPSAFE);
+ callout_init(&sc->sc_tmo, 1);
callout_init_mtx(&sc->sc_bulk_tmo, &sc->sc_bulk_mtx, 0);
callout_init_mtx(&sc->sc_bulkfail_tmo, &sc->sc_bulk_mtx, 0);
diff --git a/sys/ofed/include/linux/timer.h b/sys/ofed/include/linux/timer.h
index 0bb85b4..53ee20b 100644
--- a/sys/ofed/include/linux/timer.h
+++ b/sys/ofed/include/linux/timer.h
@@ -48,14 +48,14 @@ extern unsigned long linux_timer_hz_mask;
do { \
(timer)->function = (func); \
(timer)->data = (dat); \
- callout_init(&(timer)->timer_callout, CALLOUT_MPSAFE); \
+ callout_init(&(timer)->timer_callout, 1); \
} while (0)
#define init_timer(timer) \
do { \
(timer)->function = NULL; \
(timer)->data = 0; \
- callout_init(&(timer)->timer_callout, CALLOUT_MPSAFE); \
+ callout_init(&(timer)->timer_callout, 1); \
} while (0)
extern void mod_timer(struct timer_list *, unsigned long);
diff --git a/sys/ofed/include/linux/workqueue.h b/sys/ofed/include/linux/workqueue.h
index 38cd2fe..075016a 100644
--- a/sys/ofed/include/linux/workqueue.h
+++ b/sys/ofed/include/linux/workqueue.h
@@ -78,7 +78,7 @@ do { \
#define INIT_DELAYED_WORK(_work, func) \
do { \
INIT_WORK(&(_work)->work, func); \
- callout_init(&(_work)->timer, CALLOUT_MPSAFE); \
+ callout_init(&(_work)->timer, 1); \
} while (0)
#define INIT_DEFERRABLE_WORK INIT_DELAYED_WORK
diff --git a/sys/powerpc/mambo/mambo_console.c b/sys/powerpc/mambo/mambo_console.c
index c8b0ad7..1334581 100644
--- a/sys/powerpc/mambo/mambo_console.c
+++ b/sys/powerpc/mambo/mambo_console.c
@@ -89,7 +89,7 @@ cn_drvinit(void *unused)
polltime = 1;
- callout_init(&mambo_callout, CALLOUT_MPSAFE);
+ callout_init(&mambo_callout, 1);
callout_reset(&mambo_callout, polltime, mambo_timeout, NULL);
}
}
diff --git a/sys/powerpc/pseries/phyp_console.c b/sys/powerpc/pseries/phyp_console.c
index 79d9094..261f92b 100644
--- a/sys/powerpc/pseries/phyp_console.c
+++ b/sys/powerpc/pseries/phyp_console.c
@@ -256,7 +256,7 @@ uart_phyp_attach(device_t dev)
bus_setup_intr(dev, sc->irqres, INTR_TYPE_TTY | INTR_MPSAFE,
NULL, uart_phyp_intr, sc, &sc->sc_icookie);
} else {
- callout_init(&sc->callout, CALLOUT_MPSAFE);
+ callout_init(&sc->callout, 1);
sc->polltime = hz / 20;
if (sc->polltime < 1)
sc->polltime = 1;
diff --git a/sys/sys/callout.h b/sys/sys/callout.h
index 6e18ae7..5e21164 100644
--- a/sys/sys/callout.h
+++ b/sys/sys/callout.h
@@ -43,7 +43,7 @@
#define CALLOUT_LOCAL_ALLOC 0x0001 /* was allocated from callfree */
#define CALLOUT_ACTIVE 0x0002 /* callout is currently active */
#define CALLOUT_PENDING 0x0004 /* callout is waiting for timeout */
-#define CALLOUT_MPSAFE 0x0008 /* callout handler is mp safe */
+#define CALLOUT_MPSAFE 0x0008 /* deprecated */
#define CALLOUT_RETURNUNLOCKED 0x0010 /* handler returns with mtx unlocked */
#define CALLOUT_SHAREDLOCK 0x0020 /* callout lock held in shared mode */
#define CALLOUT_DFRMIGRATION 0x0040 /* callout in deferred migration mode */
diff --git a/sys/vm/uma_core.c b/sys/vm/uma_core.c
index d1573e6..6780bad 100644
--- a/sys/vm/uma_core.c
+++ b/sys/vm/uma_core.c
@@ -1891,7 +1891,7 @@ uma_startup3(void)
#ifdef UMA_DEBUG
printf("Starting callout.\n");
#endif
- callout_init(&uma_callout, CALLOUT_MPSAFE);
+ callout_init(&uma_callout, 1);
callout_reset(&uma_callout, UMA_TIMEOUT * hz, uma_timeout, NULL);
#ifdef UMA_DEBUG
printf("UMA startup3 complete.\n");
diff --git a/sys/x86/x86/mca.c b/sys/x86/x86/mca.c
index 8026b15..b4c7643 100644
--- a/sys/x86/x86/mca.c
+++ b/sys/x86/x86/mca.c
@@ -762,7 +762,7 @@ mca_setup(uint64_t mcg_cap)
mtx_init(&mca_lock, "mca", NULL, MTX_SPIN);
STAILQ_INIT(&mca_records);
TASK_INIT(&mca_scan_task, 0, mca_scan_cpus, NULL);
- callout_init(&mca_timer, CALLOUT_MPSAFE);
+ callout_init(&mca_timer, 1);
STAILQ_INIT(&mca_freelist);
TASK_INIT(&mca_refill_task, 0, mca_refill, NULL);
mca_fill_freelist();
OpenPOWER on IntegriCloud