]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
thermal/x86_pkg_temp: Move work into package struct
authorThomas Gleixner <tglx@linutronix.de>
Tue, 22 Nov 2016 17:57:13 +0000 (17:57 +0000)
committerZhang Rui <rui.zhang@intel.com>
Wed, 30 Nov 2016 02:25:34 +0000 (10:25 +0800)
commit411bb3835f473d1b50676b31abb16f1a464ea7e3
treef3b7508783646f1e96d699f6c552f9f561ff4558
parent64ca738f1fba850fa522cd88b0b935492d846fff
thermal/x86_pkg_temp: Move work into package struct

Delayed work structs are held in a static percpu storage, which makes no
sense at all because work is strictly per package and we never schedule
more than one work per package.

Aside of that the work cancelation in the hotplug is broken when the work
is queued on the outgoing cpu and canceled. Nothing reschedules the work on
another online cpu in the package, so the interrupts stay disabled and the
work_scheduled flag stays active.

Move the delayed work struct into the package struct, which is the only
sensible place to have it.

To simplify the cancelation logic schedule the work always on the cpu which
is the target for the sysfs files. This is required so the cancelation
logic in the cpu offline path cancels only when the outgoing cpu is the
current target and reschedule the work when there is still a online
CPU in the package.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
drivers/thermal/x86_pkg_temp_thermal.c