linux/drivers/thermal
Daniel Wagner 2207ec6666 thermal: Defer thermal wakups to threads
On RT the spin lock in pkg_temp_thermal_platfrom_thermal_notify will
call schedule while we run in irq context.

[<ffffffff816850ac>] dump_stack+0x4e/0x8f
[<ffffffff81680f7d>] __schedule_bug+0xa6/0xb4
[<ffffffff816896b4>] __schedule+0x5b4/0x700
[<ffffffff8168982a>] schedule+0x2a/0x90
[<ffffffff8168a8b5>] rt_spin_lock_slowlock+0xe5/0x2d0
[<ffffffff8168afd5>] rt_spin_lock+0x25/0x30
[<ffffffffa03a7b75>] pkg_temp_thermal_platform_thermal_notify+0x45/0x134 [x86_pkg_temp_thermal]
[<ffffffff8103d4db>] ? therm_throt_process+0x1b/0x160
[<ffffffff8103d831>] intel_thermal_interrupt+0x211/0x250
[<ffffffff8103d8c1>] smp_thermal_interrupt+0x21/0x40
[<ffffffff8169415d>] thermal_interrupt+0x6d/0x80

Let's defer the work to a kthread.

Cc: stable-rt@vger.kernel.org
Signed-off-by: Daniel Wagner <daniel.wagner@bmw-carit.de>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
[bigeasy: reoder init/denit position. TODO: flush swork on exit]
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
2020-10-14 00:59:24 +03:00
..
samsung Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux 2014-01-24 17:13:49 -08:00
ti-soc-thermal thermal: ti-soc-thermal: use thermal DT infrastructure 2013-12-04 09:34:25 -04:00
Kconfig thermal,rcar_thermal: Add dependency on HAS_IOMEM 2014-03-03 23:15:02 +08:00
Makefile Merge branches 'misc', 'soc', 'soc-eduardo' and 'int3404-thermal' of .git into next 2014-01-02 14:22:28 +08:00
armada_thermal.c Merge branches 'misc', 'drv_cleanup', 'devm-cleanup' and 'ti-soc' of .git into next 2013-05-28 10:46:46 +08:00
cpu_cooling.c Merge branches 'misc', 'soc', 'soc-eduardo' and 'int3404-thermal' of .git into next 2014-01-02 14:22:28 +08:00
db8500_cpufreq_cooling.c thermal: db8500_cpufreq_cooling: remove usage of IS_ERR_OR_NULL() 2013-04-27 09:28:38 +08:00
db8500_thermal.c thermal: db8500: Fix missing mutex_unlock() in probe error paths 2013-03-26 22:08:08 +08:00
dove_thermal.c Merge branches 'misc', 'drv_cleanup', 'devm-cleanup' and 'ti-soc' of .git into next 2013-05-28 10:46:46 +08:00
fair_share.c Thermal: build thermal governors into thermal_sys module 2013-04-14 23:28:43 +08:00
imx_thermal.c Merge branch 'misc' of .git into next 2014-01-06 22:48:19 +08:00
int3403_thermal.c Thermal: ACPI INT3403 thermal driver 2014-01-02 09:42:12 +08:00
intel_powerclamp.c tick/powerclamp: Remove tick_nohz_idle abuse 2015-01-27 08:18:55 -08:00
kirkwood_thermal.c Merge branches 'misc', 'drv_cleanup', 'devm-cleanup' and 'ti-soc' of .git into next 2013-05-28 10:46:46 +08:00
of-thermal.c thermal: introduce device tree parser 2013-12-04 09:31:34 -04:00
rcar_thermal.c thermal: rcar: comment spelling 2014-01-08 10:11:36 +01:00
spear_thermal.c Merge branches 'misc', 'drv_cleanup', 'devm-cleanup' and 'ti-soc' of .git into next 2013-05-28 10:46:46 +08:00
step_wise.c thermal: step_wise: Revert optimization 2015-06-06 08:19:39 -07:00
thermal_core.c thermal: Fix error path in thermal_init() 2015-01-08 10:00:49 -08:00
thermal_core.h thermal: introduce device tree parser 2013-12-04 09:31:34 -04:00
thermal_hwmon.c thermal: hwmon: Make the check for critical temp valid consistent 2014-07-17 16:21:03 -07:00
thermal_hwmon.h thermal: hwmon: move hwmon support to single file 2013-09-03 09:09:12 -04:00
user_space.c Thermal: build thermal governors into thermal_sys module 2013-04-14 23:28:43 +08:00
x86_pkg_temp_thermal.c thermal: Defer thermal wakups to threads 2020-10-14 00:59:24 +03:00