Mark some sysctls as CTLFLAG_MPSAFE.
MFC after: 2 weeks
This commit is contained in:
parent
c2da954203
commit
b776de6796
@ -922,7 +922,7 @@ ahci_ch_attach(device_t dev)
|
||||
ctx = device_get_sysctl_ctx(dev);
|
||||
tree = device_get_sysctl_tree(dev);
|
||||
SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "disable_phy",
|
||||
CTLFLAG_RW | CTLTYPE_UINT | CTLFLAG_NEEDGIANT, ch,
|
||||
CTLFLAG_RW | CTLTYPE_UINT | CTLFLAG_MPSAFE, ch,
|
||||
0, ahci_ch_disablephy_proc, "IU", "Disable PHY");
|
||||
return (0);
|
||||
|
||||
|
@ -1952,7 +1952,7 @@ ioat_setup_sysctl(device_t device)
|
||||
"submitter processing");
|
||||
|
||||
SYSCTL_ADD_PROC(ctx, state, OID_AUTO, "chansts",
|
||||
CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NEEDGIANT, ioat, 0,
|
||||
CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, ioat, 0,
|
||||
sysctl_handle_chansts, "A", "String of the channel status");
|
||||
|
||||
SYSCTL_ADD_U16(ctx, state, OID_AUTO, "intrdelay", CTLFLAG_RD,
|
||||
@ -1965,7 +1965,7 @@ ioat_setup_sysctl(device_t device)
|
||||
hammer = SYSCTL_CHILDREN(tmp);
|
||||
|
||||
SYSCTL_ADD_PROC(ctx, hammer, OID_AUTO, "force_hw_reset",
|
||||
CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, ioat, 0,
|
||||
CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, ioat, 0,
|
||||
sysctl_handle_reset, "I", "Set to non-zero to reset the hardware");
|
||||
|
||||
tmp = SYSCTL_ADD_NODE(ctx, par, OID_AUTO, "stats",
|
||||
@ -1992,7 +1992,7 @@ ioat_setup_sysctl(device_t device)
|
||||
"The raw CHANERR when the channel was last halted");
|
||||
|
||||
SYSCTL_ADD_PROC(ctx, statpar, OID_AUTO, "desc_per_interrupt",
|
||||
CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NEEDGIANT, ioat, 0,
|
||||
CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, ioat, 0,
|
||||
sysctl_handle_dpi, "A", "Descriptors per interrupt");
|
||||
}
|
||||
|
||||
|
@ -191,7 +191,7 @@ isp_attach_chan(ispsoftc_t *isp, struct cam_devq *devq, int chan)
|
||||
"Cause a Lost Frame on a Read");
|
||||
#endif
|
||||
SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
|
||||
"role", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT,
|
||||
"role", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE,
|
||||
isp, chan, isp_role_sysctl, "I", "Current role");
|
||||
SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
|
||||
"speed", CTLFLAG_RD, &fcp->isp_gbspeed, 0,
|
||||
|
@ -1915,7 +1915,7 @@ mpr_setup_sysctl(struct mpr_softc *sc)
|
||||
|
||||
SYSCTL_ADD_PROC(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree),
|
||||
OID_AUTO, "dump_reqs",
|
||||
CTLTYPE_OPAQUE | CTLFLAG_RD | CTLFLAG_SKIP | CTLFLAG_NEEDGIANT,
|
||||
CTLTYPE_OPAQUE | CTLFLAG_RD | CTLFLAG_SKIP | CTLFLAG_MPSAFE,
|
||||
sc, 0, mpr_dump_reqs, "I", "Dump Active Requests");
|
||||
|
||||
SYSCTL_ADD_INT(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree),
|
||||
|
@ -1762,17 +1762,17 @@ mps_setup_sysctl(struct mps_softc *sc)
|
||||
|
||||
SYSCTL_ADD_PROC(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree),
|
||||
OID_AUTO, "mapping_table_dump",
|
||||
CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NEEDGIANT, sc, 0,
|
||||
CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, sc, 0,
|
||||
mps_mapping_dump, "A", "Mapping Table Dump");
|
||||
|
||||
SYSCTL_ADD_PROC(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree),
|
||||
OID_AUTO, "encl_table_dump",
|
||||
CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NEEDGIANT, sc, 0,
|
||||
CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, sc, 0,
|
||||
mps_mapping_encl_dump, "A", "Enclosure Table Dump");
|
||||
|
||||
SYSCTL_ADD_PROC(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree),
|
||||
OID_AUTO, "dump_reqs",
|
||||
CTLTYPE_OPAQUE | CTLFLAG_RD | CTLFLAG_SKIP | CTLFLAG_NEEDGIANT,
|
||||
CTLTYPE_OPAQUE | CTLFLAG_RD | CTLFLAG_SKIP | CTLFLAG_MPSAFE,
|
||||
sc, 0, mps_dump_reqs, "I", "Dump Active Requests");
|
||||
|
||||
SYSCTL_ADD_INT(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree),
|
||||
|
@ -1747,8 +1747,6 @@ mpt_raid_sysctl_vol_member_wce(SYSCTL_HANDLER_ARGS)
|
||||
u_int size;
|
||||
u_int i;
|
||||
|
||||
GIANT_REQUIRED;
|
||||
|
||||
mpt = (struct mpt_softc *)arg1;
|
||||
str = mpt_vol_mwce_strs[mpt->raid_mwce_setting];
|
||||
error = SYSCTL_OUT(req, str, strlen(str) + 1);
|
||||
@ -1781,8 +1779,6 @@ mpt_raid_sysctl_vol_resync_rate(SYSCTL_HANDLER_ARGS)
|
||||
u_int raid_resync_rate;
|
||||
int error;
|
||||
|
||||
GIANT_REQUIRED;
|
||||
|
||||
mpt = (struct mpt_softc *)arg1;
|
||||
raid_resync_rate = mpt->raid_resync_rate;
|
||||
|
||||
@ -1801,8 +1797,6 @@ mpt_raid_sysctl_vol_queue_depth(SYSCTL_HANDLER_ARGS)
|
||||
u_int raid_queue_depth;
|
||||
int error;
|
||||
|
||||
GIANT_REQUIRED;
|
||||
|
||||
mpt = (struct mpt_softc *)arg1;
|
||||
raid_queue_depth = mpt->raid_queue_depth;
|
||||
|
||||
@ -1821,17 +1815,17 @@ mpt_raid_sysctl_attach(struct mpt_softc *mpt)
|
||||
struct sysctl_oid *tree = device_get_sysctl_tree(mpt->dev);
|
||||
|
||||
SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
|
||||
"vol_member_wce", CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_NEEDGIANT,
|
||||
"vol_member_wce", CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_MPSAFE,
|
||||
mpt, 0, mpt_raid_sysctl_vol_member_wce, "A",
|
||||
"volume member WCE(On,Off,On-During-Rebuild,NC)");
|
||||
|
||||
SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
|
||||
"vol_queue_depth", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT,
|
||||
"vol_queue_depth", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE,
|
||||
mpt, 0, mpt_raid_sysctl_vol_queue_depth, "I",
|
||||
"default volume queue depth");
|
||||
|
||||
SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
|
||||
"vol_resync_rate", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT,
|
||||
"vol_resync_rate", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE,
|
||||
mpt, 0, mpt_raid_sysctl_vol_resync_rate, "I",
|
||||
"volume resync priority (0 == NC, 1 - 255)");
|
||||
SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
|
||||
|
@ -278,7 +278,7 @@ nvme_sysctl_initialize_queue(struct nvme_qpair *qpair,
|
||||
"Number of commands ending in failure after all retries");
|
||||
|
||||
SYSCTL_ADD_PROC(ctrlr_ctx, que_list, OID_AUTO,
|
||||
"dump_debug", CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT,
|
||||
"dump_debug", CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_MPSAFE,
|
||||
qpair, 0, nvme_sysctl_dump_debug, "IU", "Dump debug data");
|
||||
}
|
||||
|
||||
@ -301,46 +301,46 @@ nvme_sysctl_initialize_ctrlr(struct nvme_controller *ctrlr)
|
||||
"Number of I/O queue pairs");
|
||||
|
||||
SYSCTL_ADD_PROC(ctrlr_ctx, ctrlr_list, OID_AUTO,
|
||||
"int_coal_time", CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT,
|
||||
"int_coal_time", CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_MPSAFE,
|
||||
ctrlr, 0, nvme_sysctl_int_coal_time, "IU",
|
||||
"Interrupt coalescing timeout (in microseconds)");
|
||||
|
||||
SYSCTL_ADD_PROC(ctrlr_ctx, ctrlr_list, OID_AUTO,
|
||||
"int_coal_threshold",
|
||||
CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, ctrlr, 0,
|
||||
CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_MPSAFE, ctrlr, 0,
|
||||
nvme_sysctl_int_coal_threshold, "IU",
|
||||
"Interrupt coalescing threshold");
|
||||
|
||||
SYSCTL_ADD_PROC(ctrlr_ctx, ctrlr_list, OID_AUTO,
|
||||
"timeout_period", CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT,
|
||||
"timeout_period", CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_MPSAFE,
|
||||
ctrlr, 0, nvme_sysctl_timeout_period, "IU",
|
||||
"Timeout period (in seconds)");
|
||||
|
||||
SYSCTL_ADD_PROC(ctrlr_ctx, ctrlr_list, OID_AUTO,
|
||||
"num_cmds", CTLTYPE_S64 | CTLFLAG_RD | CTLFLAG_NEEDGIANT,
|
||||
"num_cmds", CTLTYPE_S64 | CTLFLAG_RD | CTLFLAG_MPSAFE,
|
||||
ctrlr, 0, nvme_sysctl_num_cmds, "IU",
|
||||
"Number of commands submitted");
|
||||
|
||||
SYSCTL_ADD_PROC(ctrlr_ctx, ctrlr_list, OID_AUTO,
|
||||
"num_intr_handler_calls",
|
||||
CTLTYPE_S64 | CTLFLAG_RD | CTLFLAG_NEEDGIANT, ctrlr, 0,
|
||||
CTLTYPE_S64 | CTLFLAG_RD | CTLFLAG_MPSAFE, ctrlr, 0,
|
||||
nvme_sysctl_num_intr_handler_calls, "IU",
|
||||
"Number of times interrupt handler was invoked (will "
|
||||
"typically be less than number of actual interrupts "
|
||||
"generated due to coalescing)");
|
||||
|
||||
SYSCTL_ADD_PROC(ctrlr_ctx, ctrlr_list, OID_AUTO,
|
||||
"num_retries", CTLTYPE_S64 | CTLFLAG_RD | CTLFLAG_NEEDGIANT,
|
||||
"num_retries", CTLTYPE_S64 | CTLFLAG_RD | CTLFLAG_MPSAFE,
|
||||
ctrlr, 0, nvme_sysctl_num_retries, "IU",
|
||||
"Number of commands retried");
|
||||
|
||||
SYSCTL_ADD_PROC(ctrlr_ctx, ctrlr_list, OID_AUTO,
|
||||
"num_failures", CTLTYPE_S64 | CTLFLAG_RD | CTLFLAG_NEEDGIANT,
|
||||
"num_failures", CTLTYPE_S64 | CTLFLAG_RD | CTLFLAG_MPSAFE,
|
||||
ctrlr, 0, nvme_sysctl_num_failures, "IU",
|
||||
"Number of commands ending in failure after all retries");
|
||||
|
||||
SYSCTL_ADD_PROC(ctrlr_ctx, ctrlr_list, OID_AUTO,
|
||||
"reset_stats", CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, ctrlr,
|
||||
"reset_stats", CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_MPSAFE, ctrlr,
|
||||
0, nvme_sysctl_reset_stats, "IU", "Reset statistics to zero");
|
||||
|
||||
que_tree = SYSCTL_ADD_NODE(ctrlr_ctx, ctrlr_list, OID_AUTO, "adminq",
|
||||
|
Loading…
x
Reference in New Issue
Block a user