diff options
author | Pawel Biernacki <kaktus@FreeBSD.org> | 2020-02-26 14:26:36 +0000 |
---|---|---|
committer | Pawel Biernacki <kaktus@FreeBSD.org> | 2020-02-26 14:26:36 +0000 |
commit | 7029da5c36f2d3cf6bb6c81bf551229f416399e8 (patch) | |
tree | 53cae9da1371117a3ac21d0d0f3f030a692807ae /sys/dev/hwpmc/hwpmc_mod.c | |
parent | d7313dc6f5fcab29946951936597772dfff6a4be (diff) |
Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 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. All entries that haven't been marked
as MPSAFE before are by default marked as NEEDGIANT
Approved by: kib (mentor, blanket)
Commented by: kib, gallatin, melifaro
Differential Revision: https://reviews.freebsd.org/D23718
Notes
Notes:
svn path=/head/; revision=358333
Diffstat (limited to 'sys/dev/hwpmc/hwpmc_mod.c')
-rw-r--r-- | sys/dev/hwpmc/hwpmc_mod.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/dev/hwpmc/hwpmc_mod.c b/sys/dev/hwpmc/hwpmc_mod.c index 3c3f848d5667..49667704ff64 100644 --- a/sys/dev/hwpmc/hwpmc_mod.c +++ b/sys/dev/hwpmc/hwpmc_mod.c @@ -275,7 +275,8 @@ static void pmc_process_allproc(struct pmc *pm); */ SYSCTL_DECL(_kern_hwpmc); -SYSCTL_NODE(_kern_hwpmc, OID_AUTO, stats, CTLFLAG_RW, 0, "HWPMC stats"); +SYSCTL_NODE(_kern_hwpmc, OID_AUTO, stats, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + "HWPMC stats"); /* Stats. */ @@ -313,8 +314,9 @@ char pmc_debugstr[PMC_DEBUG_STRSIZE]; TUNABLE_STR(PMC_SYSCTL_NAME_PREFIX "debugflags", pmc_debugstr, sizeof(pmc_debugstr)); SYSCTL_PROC(_kern_hwpmc, OID_AUTO, debugflags, - CTLTYPE_STRING | CTLFLAG_RWTUN | CTLFLAG_NOFETCH, - 0, 0, pmc_debugflags_sysctl_handler, "A", "debug flags"); + CTLTYPE_STRING | CTLFLAG_RWTUN | CTLFLAG_NOFETCH | CTLFLAG_NEEDGIANT, + 0, 0, pmc_debugflags_sysctl_handler, "A", + "debug flags"); #endif |