Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (16 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. Mark all obvious cases as MPSAFE. Reviewed by: royger Approved by: kib (mentor, blanket) Differential Revision: https://reviews.freebsd.org/D23638
This commit is contained in:
parent
650ab02d61
commit
4b01601205
@ -79,7 +79,9 @@ static struct balloon_stats balloon_stats;
|
||||
#define bs balloon_stats
|
||||
|
||||
SYSCTL_DECL(_dev_xen);
|
||||
static SYSCTL_NODE(_dev_xen, OID_AUTO, balloon, CTLFLAG_RD, NULL, "Balloon");
|
||||
static SYSCTL_NODE(_dev_xen, OID_AUTO, balloon,
|
||||
CTLFLAG_RD | CTLFLAG_MPSAFE, NULL,
|
||||
"Balloon");
|
||||
SYSCTL_ULONG(_dev_xen_balloon, OID_AUTO, current, CTLFLAG_RD,
|
||||
&bs.current_pages, 0, "Current allocation");
|
||||
SYSCTL_ULONG(_dev_xen_balloon, OID_AUTO, target, CTLFLAG_RD,
|
||||
|
@ -83,7 +83,8 @@ static void xbd_startio(struct xbd_softc *sc);
|
||||
static MALLOC_DEFINE(M_XENBLOCKFRONT, "xbd", "Xen Block Front driver data");
|
||||
|
||||
static int xbd_enable_indirect = 1;
|
||||
SYSCTL_NODE(_hw, OID_AUTO, xbd, CTLFLAG_RD, 0, "xbd driver parameters");
|
||||
SYSCTL_NODE(_hw, OID_AUTO, xbd, CTLFLAG_RD | CTLFLAG_MPSAFE, 0,
|
||||
"xbd driver parameters");
|
||||
SYSCTL_INT(_hw_xbd, OID_AUTO, xbd_enable_indirect, CTLFLAG_RDTUN,
|
||||
&xbd_enable_indirect, 0, "Enable xbd indirect segments");
|
||||
|
||||
@ -926,8 +927,8 @@ xbd_setup_sysctl(struct xbd_softc *xbd)
|
||||
"communication channel pages (negotiated)");
|
||||
|
||||
SYSCTL_ADD_PROC(sysctl_ctx, children, OID_AUTO,
|
||||
"features", CTLTYPE_STRING|CTLFLAG_RD, xbd, 0,
|
||||
xbd_sysctl_features, "A", "protocol features (negotiated)");
|
||||
"features", CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NEEDGIANT, xbd,
|
||||
0, xbd_sysctl_features, "A", "protocol features (negotiated)");
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1157,7 +1157,7 @@ xnb_setup_sysctl(struct xnb_softc *xnb)
|
||||
SYSCTL_CHILDREN(sysctl_tree),
|
||||
OID_AUTO,
|
||||
"unit_test_results",
|
||||
CTLTYPE_STRING | CTLFLAG_RD,
|
||||
CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NEEDGIANT,
|
||||
xnb,
|
||||
0,
|
||||
xnb_unit_test_main,
|
||||
@ -1168,7 +1168,7 @@ xnb_setup_sysctl(struct xnb_softc *xnb)
|
||||
SYSCTL_CHILDREN(sysctl_tree),
|
||||
OID_AUTO,
|
||||
"dump_rings",
|
||||
CTLTYPE_STRING | CTLFLAG_RD,
|
||||
CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NEEDGIANT,
|
||||
xnb,
|
||||
0,
|
||||
xnb_dump_rings,
|
||||
|
@ -1241,7 +1241,8 @@ DRIVER_MODULE(xenstore, xenpv, xenstore_driver, xenstore_devclass, 0, 0);
|
||||
|
||||
/*------------------------------- Sysctl Data --------------------------------*/
|
||||
/* XXX Shouldn't the node be somewhere else? */
|
||||
SYSCTL_NODE(_dev, OID_AUTO, xen, CTLFLAG_RD, NULL, "Xen");
|
||||
SYSCTL_NODE(_dev, OID_AUTO, xen, CTLFLAG_RD | CTLFLAG_MPSAFE, NULL,
|
||||
"Xen");
|
||||
SYSCTL_INT(_dev_xen, OID_AUTO, xsd_port, CTLFLAG_RD, &xs.evtchn, 0, "");
|
||||
SYSCTL_ULONG(_dev_xen, OID_AUTO, xsd_kva, CTLFLAG_RD, (u_long *) &xen_store, 0, "");
|
||||
|
||||
|
@ -351,7 +351,7 @@ xenbusb_device_sysctl_init(device_t dev)
|
||||
SYSCTL_CHILDREN(tree),
|
||||
OID_AUTO,
|
||||
"xenstore_path",
|
||||
CTLTYPE_STRING | CTLFLAG_RD,
|
||||
CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE,
|
||||
dev,
|
||||
XENBUS_IVAR_NODE,
|
||||
xenbusb_device_sysctl_handler,
|
||||
@ -362,7 +362,7 @@ xenbusb_device_sysctl_init(device_t dev)
|
||||
SYSCTL_CHILDREN(tree),
|
||||
OID_AUTO,
|
||||
"xenbus_dev_type",
|
||||
CTLTYPE_STRING | CTLFLAG_RD,
|
||||
CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE,
|
||||
dev,
|
||||
XENBUS_IVAR_TYPE,
|
||||
xenbusb_device_sysctl_handler,
|
||||
@ -373,7 +373,7 @@ xenbusb_device_sysctl_init(device_t dev)
|
||||
SYSCTL_CHILDREN(tree),
|
||||
OID_AUTO,
|
||||
"xenbus_connection_state",
|
||||
CTLTYPE_STRING | CTLFLAG_RD,
|
||||
CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE,
|
||||
dev,
|
||||
XENBUS_IVAR_STATE,
|
||||
xenbusb_device_sysctl_handler,
|
||||
@ -384,7 +384,7 @@ xenbusb_device_sysctl_init(device_t dev)
|
||||
SYSCTL_CHILDREN(tree),
|
||||
OID_AUTO,
|
||||
"xenbus_peer_domid",
|
||||
CTLTYPE_INT | CTLFLAG_RD,
|
||||
CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE,
|
||||
dev,
|
||||
XENBUS_IVAR_OTHEREND_ID,
|
||||
xenbusb_device_sysctl_handler,
|
||||
@ -395,7 +395,7 @@ xenbusb_device_sysctl_init(device_t dev)
|
||||
SYSCTL_CHILDREN(tree),
|
||||
OID_AUTO,
|
||||
"xenstore_peer_path",
|
||||
CTLTYPE_STRING | CTLFLAG_RD,
|
||||
CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE,
|
||||
dev,
|
||||
XENBUS_IVAR_OTHEREND_PATH,
|
||||
xenbusb_device_sysctl_handler,
|
||||
|
Loading…
Reference in New Issue
Block a user