Changeset View
Changeset View
Standalone View
Standalone View
sys/arm/nvidia/tegra124/tegra124_coretemp.c
Show All 12 Lines | |||||
rv = tegra124_coretemp_ofw_parse(sc); | rv = tegra124_coretemp_ofw_parse(sc); | ||||
if (rv != 0) | if (rv != 0) | ||||
return (rv); | return (rv); | ||||
ctx = device_get_sysctl_ctx(dev); | ctx = device_get_sysctl_ctx(dev); | ||||
oid = SYSCTL_ADD_NODE(ctx, | oid = SYSCTL_ADD_NODE(ctx, | ||||
SYSCTL_CHILDREN(device_get_sysctl_tree(pdev)), OID_AUTO, | SYSCTL_CHILDREN(device_get_sysctl_tree(pdev)), OID_AUTO, | ||||
"coretemp", CTLFLAG_RD, NULL, "Per-CPU thermal information"); | "coretemp", CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, | ||||
"Per-CPU thermal information"); | |||||
/* | /* | ||||
* Add the MIBs to dev.cpu.N and dev.cpu.N.coretemp. | * Add the MIBs to dev.cpu.N and dev.cpu.N.coretemp. | ||||
*/ | */ | ||||
SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(device_get_sysctl_tree(pdev)), | SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(device_get_sysctl_tree(pdev)), | ||||
OID_AUTO, "temperature", CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, | OID_AUTO, "temperature", CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, | ||||
dev, CORETEMP_TEMP, coretemp_get_val_sysctl, "IK", | dev, CORETEMP_TEMP, coretemp_get_val_sysctl, "IK", | ||||
"Current temperature"); | "Current temperature"); | ||||
Show All 12 Lines |