aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/coretemp
diff options
context:
space:
mode:
authorMark Johnston <markj@FreeBSD.org>2013-02-18 22:47:16 +0000
committerMark Johnston <markj@FreeBSD.org>2013-02-18 22:47:16 +0000
commite42412a96695d0e9116de5c6ac75823d2711218d (patch)
treece387e9a961674db04280499ee8f628c13edc113 /sys/dev/coretemp
parentfea692b5f6cfedb06fd8ff67140d3cf041345a2e (diff)
downloadsrc-e42412a96695d0e9116de5c6ac75823d2711218d.tar.gz
src-e42412a96695d0e9116de5c6ac75823d2711218d.zip
Mark the coretemp(4) sysctls as MPSAFE, ensuring that Giant won't be held
unnecessarily by a user thread waiting to run on a specific CPU after calling sched_bind(). Reviewed by: rstone Approved by: emaste (co-mentor) Sponsored by: Sandvine Incorporated MFC after: 1 week
Notes
Notes: svn path=/head/; revision=246951
Diffstat (limited to 'sys/dev/coretemp')
-rw-r--r--sys/dev/coretemp/coretemp.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/dev/coretemp/coretemp.c b/sys/dev/coretemp/coretemp.c
index 55efca232b14..a7d5fdca3120 100644
--- a/sys/dev/coretemp/coretemp.c
+++ b/sys/dev/coretemp/coretemp.c
@@ -274,23 +274,23 @@ coretemp_attach(device_t dev)
* Add the MIBs to dev.cpu.N and dev.cpu.N.coretemp.
*/
SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(device_get_sysctl_tree(pdev)),
- OID_AUTO, "temperature", CTLTYPE_INT | CTLFLAG_RD, dev,
- CORETEMP_TEMP, coretemp_get_val_sysctl, "IK",
+ OID_AUTO, "temperature", CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE,
+ dev, CORETEMP_TEMP, coretemp_get_val_sysctl, "IK",
"Current temperature");
SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, "delta",
- CTLTYPE_INT | CTLFLAG_RD, dev, CORETEMP_DELTA,
+ CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, dev, CORETEMP_DELTA,
coretemp_get_val_sysctl, "I",
"Delta between TCC activation and current temperature");
SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, "resolution",
- CTLTYPE_INT | CTLFLAG_RD, dev, CORETEMP_RESOLUTION,
+ CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, dev, CORETEMP_RESOLUTION,
coretemp_get_val_sysctl, "I",
"Resolution of CPU thermal sensor");
SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, "tjmax",
- CTLTYPE_INT | CTLFLAG_RD, dev, CORETEMP_TJMAX,
+ CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, dev, CORETEMP_TJMAX,
coretemp_get_val_sysctl, "IK",
"TCC activation temperature");
SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(oid), OID_AUTO,
- "throttle_log", CTLTYPE_INT | CTLFLAG_RW, dev, 0,
+ "throttle_log", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, dev, 0,
coretemp_throttle_log_sysctl, "I",
"Set to 1 if the thermal sensor has tripped");