]> asedeno.scripts.mit.edu Git - linux.git/commit
hwmon: (coretemp) Fixup target cpu for package when cpu is offlined
authorThomas Gleixner <tglx@linutronix.de>
Tue, 22 Nov 2016 17:42:02 +0000 (17:42 +0000)
committerGuenter Roeck <linux@roeck-us.net>
Sat, 10 Dec 2016 05:54:06 +0000 (21:54 -0800)
commit723f573433b2900f1d4539b8eb0d24cd17a42c65
tree6ccba8fe96980a3a480927e4b44dc92c7333c67a
parent78305ae70cbad28acba65b69d3497cd301cf3479
hwmon: (coretemp) Fixup target cpu for package when cpu is offlined

When a CPU is offlined nothing checks whether it is the target CPU for the
package temperature sysfs interface.

As a consequence all future readouts of the package temperature return
crap:

90000

which is Tjmax of that package.

Check whether the outgoing CPU is the target for the package and assign it
to some other still online CPU in the package. Protect the change against
the rdmsr_on_cpu() in show_crit_alarm().

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/coretemp.c