mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-26 02:20:51 +01:00
Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (13 of many)
r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are still not MPSAFE (or already are but aren’t properly marked). Use it in preparation for a general review of all nodes. This is non-functional change that adds annotations to SYSCTL_NODE and SYSCTL_PROC nodes using one of the soon-to-be-required flags. Approved by: kib (mentor, blanket) Differential Revision: https://reviews.freebsd.org/D23635
This commit is contained in:
parent
53a6215c83
commit
8eea36ae5b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=358284
@ -278,7 +278,7 @@ aw_sid_attach(device_t dev)
|
||||
SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev),
|
||||
SYSCTL_CHILDREN(device_get_sysctl_tree(dev)),
|
||||
OID_AUTO, sc->sid_conf->efuses[i].name,
|
||||
CTLTYPE_STRING | CTLFLAG_RD,
|
||||
CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NEEDGIANT,
|
||||
dev, sc->sid_conf->efuses[i].id, aw_sid_sysctl,
|
||||
"A", sc->sid_conf->efuses[i].desc);
|
||||
}
|
||||
|
@ -676,7 +676,7 @@ aw_thermal_attach(device_t dev)
|
||||
SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev),
|
||||
SYSCTL_CHILDREN(device_get_sysctl_tree(dev)),
|
||||
OID_AUTO, sc->conf->sensors[i].name,
|
||||
CTLTYPE_INT | CTLFLAG_RD,
|
||||
CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT,
|
||||
sc, i, aw_thermal_sysctl, "IK0",
|
||||
sc->conf->sensors[i].desc);
|
||||
|
||||
|
@ -204,7 +204,8 @@ aw_ts_attach(device_t dev)
|
||||
/* Add sysctl */
|
||||
SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev),
|
||||
SYSCTL_CHILDREN(device_get_sysctl_tree(dev)),
|
||||
OID_AUTO, "temperature", CTLTYPE_INT | CTLFLAG_RD,
|
||||
OID_AUTO, "temperature",
|
||||
CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT,
|
||||
&sc->temp_data, 0, sysctl_handle_int,
|
||||
"IK3", "CPU Temperature");
|
||||
|
||||
|
@ -1268,7 +1268,7 @@ axp2xx_start(void *pdev)
|
||||
SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev),
|
||||
SYSCTL_CHILDREN(device_get_sysctl_tree(dev)),
|
||||
OID_AUTO, sc->sensors[i].name,
|
||||
CTLTYPE_INT | CTLFLAG_RD,
|
||||
CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT,
|
||||
dev, sc->sensors[i].id, axp2xx_sysctl,
|
||||
sc->sensors[i].format,
|
||||
sc->sensors[i].desc);
|
||||
|
@ -1538,7 +1538,7 @@ axp8xx_attach(device_t dev)
|
||||
SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev),
|
||||
SYSCTL_CHILDREN(device_get_sysctl_tree(dev)),
|
||||
OID_AUTO, sc->sensors[i].name,
|
||||
CTLTYPE_INT | CTLFLAG_RD,
|
||||
CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT,
|
||||
dev, sc->sensors[i].id, axp8xx_sysctl,
|
||||
sc->sensors[i].format,
|
||||
sc->sensors[i].desc);
|
||||
@ -1546,7 +1546,7 @@ axp8xx_attach(device_t dev)
|
||||
SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev),
|
||||
SYSCTL_CHILDREN(device_get_sysctl_tree(dev)),
|
||||
OID_AUTO, "batchargecurrentstep",
|
||||
CTLTYPE_INT | CTLFLAG_RW,
|
||||
CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT,
|
||||
dev, 0, axp8xx_sysctl_chargecurrent,
|
||||
"I", "Battery Charging Current Step, "
|
||||
"0: 200mA, 1: 400mA, 2: 600mA, 3: 800mA, "
|
||||
|
@ -923,7 +923,8 @@ emac_attach(device_t dev)
|
||||
/* Create device sysctl node. */
|
||||
SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev),
|
||||
SYSCTL_CHILDREN(device_get_sysctl_tree(dev)),
|
||||
OID_AUTO, "process_limit", CTLTYPE_INT | CTLFLAG_RW,
|
||||
OID_AUTO, "process_limit",
|
||||
CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT,
|
||||
&sc->emac_rx_process_limit, 0, sysctl_hw_emac_proc_limit, "I",
|
||||
"max number of Rx events to process");
|
||||
|
||||
|
@ -558,7 +558,7 @@ tsadc_init_sysctl(struct tsadc_softc *sc)
|
||||
/* create node for hw.temp */
|
||||
oid = SYSCTL_ADD_NODE(&tsadc_sysctl_ctx,
|
||||
SYSCTL_STATIC_CHILDREN(_hw), OID_AUTO, "temperature",
|
||||
CTLFLAG_RD, NULL, "");
|
||||
CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "");
|
||||
if (oid == NULL)
|
||||
return (ENXIO);
|
||||
|
||||
@ -566,7 +566,7 @@ tsadc_init_sysctl(struct tsadc_softc *sc)
|
||||
for (i = sc->conf->ntsensors - 1; i >= 0; i--) {
|
||||
tmp = SYSCTL_ADD_PROC(&tsadc_sysctl_ctx,
|
||||
SYSCTL_CHILDREN(oid), OID_AUTO, sc->conf->tsensors[i].name,
|
||||
CTLTYPE_INT | CTLFLAG_RD, sc, i,
|
||||
CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, sc, i,
|
||||
tsadc_sysctl_temperature, "IK", "SoC Temperature");
|
||||
if (tmp == NULL)
|
||||
return (ENXIO);
|
||||
|
Loading…
Reference in New Issue
Block a user