hyperv/vmbus: Mark sysctls MPSAFE

MFC after:	1 week
Sponsored by:	Microsoft OSTC
This commit is contained in:
Sepherosa Ziehau 2016-04-27 05:45:14 +00:00
parent b649be4068
commit 677d0d5076
2 changed files with 9 additions and 9 deletions

View File

@ -118,21 +118,21 @@ vmbus_channel_sysctl_create(hv_vmbus_channel* channel)
/* This creates dev.DEVNAME.DEVUNIT.channel tree */
devch_sysctl = SYSCTL_ADD_NODE(ctx,
SYSCTL_CHILDREN(device_get_sysctl_tree(dev)),
OID_AUTO, "channel", CTLFLAG_RD, 0, "");
OID_AUTO, "channel", CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "");
/* This creates dev.DEVNAME.DEVUNIT.channel.CHANID tree */
snprintf(name, sizeof(name), "%d", ch_id);
devch_id_sysctl = SYSCTL_ADD_NODE(ctx,
SYSCTL_CHILDREN(devch_sysctl),
OID_AUTO, name, CTLFLAG_RD, 0, "");
OID_AUTO, name, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "");
if (primary_ch != NULL) {
devch_sub_sysctl = SYSCTL_ADD_NODE(ctx,
SYSCTL_CHILDREN(devch_id_sysctl),
OID_AUTO, "sub", CTLFLAG_RD, 0, "");
OID_AUTO, "sub", CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "");
snprintf(name, sizeof(name), "%d", sub_ch_id);
devch_id_sysctl = SYSCTL_ADD_NODE(ctx,
SYSCTL_CHILDREN(devch_sub_sysctl),
OID_AUTO, name, CTLFLAG_RD, 0, "");
OID_AUTO, name, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "");
SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(devch_id_sysctl),
OID_AUTO, "chanid", CTLFLAG_RD,
@ -141,20 +141,20 @@ vmbus_channel_sysctl_create(hv_vmbus_channel* channel)
SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(devch_id_sysctl), OID_AUTO,
"cpu", CTLFLAG_RD, &channel->target_cpu, 0, "owner CPU id");
SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(devch_id_sysctl), OID_AUTO,
"monitor_allocated", CTLTYPE_INT | CTLFLAG_RD, channel, 0,
vmbus_channel_sysctl_monalloc, "I",
"monitor_allocated", CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE,
channel, 0, vmbus_channel_sysctl_monalloc, "I",
"is monitor allocated to this channel");
devch_id_in_sysctl = SYSCTL_ADD_NODE(ctx,
SYSCTL_CHILDREN(devch_id_sysctl),
OID_AUTO,
"in",
CTLFLAG_RD, 0, "");
CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "");
devch_id_out_sysctl = SYSCTL_ADD_NODE(ctx,
SYSCTL_CHILDREN(devch_id_sysctl),
OID_AUTO,
"out",
CTLFLAG_RD, 0, "");
CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "");
hv_ring_buffer_stat(ctx,
SYSCTL_CHILDREN(devch_id_in_sysctl),
&(channel->inbound),

View File

@ -76,7 +76,7 @@ hv_ring_buffer_stat(
{
SYSCTL_ADD_PROC(ctx, tree_node, OID_AUTO,
"ring_buffer_stats",
CTLTYPE_STRING|CTLFLAG_RD, rbi, 0,
CTLTYPE_STRING|CTLFLAG_RD|CTLFLAG_MPSAFE, rbi, 0,
hv_rbi_sysctl_stats, "A", desc);
}
/**