• Thomas Gleixner's avatar
    hwmon: (coretemp) Simplify sibling management · e1b370b6
    Thomas Gleixner authored
    The coretemp driver provides a sysfs interface per physical core. If
    hyperthreading is enabled and one of the siblings goes offline the sysfs
    interface is removed and then immeditately created again for the
    sibling. The only difference of them is the target cpu for the
    rdmsr_on_cpu() in the sysfs show functions.
    
    It's way simpler to keep a cpumask of cpus which are active in a package
    and only remove the interface when the last sibling goes offline. Otherwise
    just move the target cpu for the sysfs show functions to the still online
    sibling.
    Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
    Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
    e1b370b6
coretemp.c 22.1 KB