]> git.baikalelectronics.ru Git - kernel.git/commit
x86/mce/therm_throt: Undo thermal polling properly on CPU offline
authorThomas Gleixner <tglx@linutronix.de>
Tue, 25 Feb 2020 13:55:15 +0000 (14:55 +0100)
committerBorislav Petkov <bp@suse.de>
Tue, 25 Feb 2020 20:21:44 +0000 (21:21 +0100)
commitb524fc9c872b4c2da332ef3f2b0b8ef774c25560
tree98351e626862f649d85d13ea7ebbbf98304ef1d1
parent218d2ac1a4bfbb8ed3c4e9a719c4de27a9bf80db
x86/mce/therm_throt: Undo thermal polling properly on CPU offline

Chris Wilson reported splats from running the thermal throttling
workqueue callback on offlined CPUs. The problem is that that callback
should not even run on offlined CPUs but it happens nevertheless because
the offlining callback thermal_throttle_offline() does not symmetrically
undo the setup work done in its onlining counterpart. IOW,

 1. The thermal interrupt vector should be masked out before ...

 2. ... cancelling any pending work synchronously so that no new work is
 enqueued anymore.

Do those things and fix the issue properly.

 [ bp: Write commit message. ]

Fixes: 56903cda11e5 ("x86/mce/therm_throt: Optimize notifications of thermal throttle")
Reported-by: Chris Wilson <chris@chris-wilson.co.uk>
Tested-by: Pandruvada, Srinivas <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lkml.kernel.org/r/158120068234.18291.7938335950259651295@skylake-alporthouse-com
arch/x86/kernel/cpu/mce/therm_throt.c