k8temp choose the higher temp of the two sensors on one core

Dag-Erling Smørgrav des at des.no
Wed Sep 3 13:12:47 UTC 2008


"army.of.root at googlemail.com" <army.of.root at googlemail.com> writes:
> I noticed that not the highest of the two temp values of one core is used:
>
> dev.cpu.0.temperature: 46
> dev.cpu.1.temperature: 46 <==
> dev.k8temp.0.%desc: AMD K8 Thermal Sensors
> dev.k8temp.0.%driver: k8temp
> dev.k8temp.0.%parent: hostb3
> dev.k8temp.0.sensor0.core0: 46
> dev.k8temp.0.sensor0.core1: 49 <==
> dev.k8temp.0.sensor1.core0: 46
> dev.k8temp.0.sensor1.core1: 46
>
> I assume the dev.cpu.1.temperature sysctl comes from the k8temp
> module, because it only shows up if it is loaded.

That's not the only error:

        sysctlnode = SYSCTL_ADD_NODE(sysctlctx,
            SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, "sensor1",
            CTLFLAG_RD, 0, "Sensor 1");
        
        SYSCTL_ADD_PROC(sysctlctx,
            SYSCTL_CHILDREN(sysctlnode),
            OID_AUTO, "core0", CTLTYPE_INT | CTLFLAG_RD,
            dev, SENSOR0_CORE0, k8temp_sysctl, "I",
            "Sensor 1 / Core 0 temperature");
        
        SYSCTL_ADD_PROC(sysctlctx,
            SYSCTL_CHILDREN(sysctlnode),
            OID_AUTO, "core1", CTLTYPE_INT | CTLFLAG_RD,
            dev, SENSOR0_CORE0, k8temp_sysctl, "I",
            "Sensor 1 / Core 1 temperature");

Another thing - wouldn't coreX.sensorY make more sense than
sensorY.coreX?

DES
-- 
Dag-Erling Smørgrav - des at des.no


More information about the freebsd-current mailing list