linux/drivers/thermal
Rafael J. Wysocki f7c1b0e4ae thermal: core: Back off when polling thermal zones on errors
Commit a8a2617744 ("thermal: core: Call monitor_thermal_zone() if zone
temperature is invalid") introduced a polling mechanism by which the
thermal core attampts to get a valid temperature value for thermal zones
where the .get_temp() callback returns errors to start with (for
example, due to initialization ordering woes).  However, this polling is
carried out periodically ad infinitum and every iteration of it causes
a message to be printed to the kernel log which means a lot of log noise
on systems where there are thermal zones that never get ready for some
reason.  It is also not really useful to continuously poll thermal zones
that never respond.

To address this, modify the thermal core to increase the delay between
consecutive thermal zone temperature checks after every check that fails
until it reaches a certain maximum value.  At that point, the thermal
zone in question will be disabled, but user space will be able to
reenable it if it believes that the failure is transient.

Also change the code to print messages regarding failed temperature
checks to the kernel log only twice, once when the thermal zone's
.get_temp() callback returns an error for the first time and once when
disabling the given thermal zone.  In addition, a dev_crit() message
will be printed at that point if the given thermal zone contains a
critical trip point to notify the system operator about the situation.

Fixes: a8a2617744 ("thermal: core: Call monitor_thermal_zone() if zone temperature is invalid")
Link: https://lore.kernel.org/linux-acpi/CAGnHSE=RyPK++UG0-wAtVKgeJxe0uzFYgLxm+RUOKKoQquW=Ow@mail.gmail.com/
Reported-by: Tom Yan <tom.ty89@gmail.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Link: https://patch.msgid.link/2962033.e9J7NaK4W3@rjwysocki.net
2024-07-24 12:40:23 +02:00
..
broadcom thermal/drivers/broadcom: Simplify with dev_err_probe() 2024-07-15 13:31:40 +02:00
intel Merge branch 'thermal-intel' 2024-07-15 20:44:31 +02:00
mediatek thermal/drivers/mediatek/lvts_thermal: Provide default calibration data 2024-07-15 13:31:39 +02:00
qcom Merge branch 'thermal-core' 2024-07-15 20:43:21 +02:00
renesas thermal/drivers/renesas/rcar: Add dependency on OF 2024-07-15 13:31:39 +02:00
samsung thermal/drivers/exynos: Simplify with dev_err_probe() 2024-07-15 13:31:40 +02:00
st thermal/drivers/sti: Cleanup code related to stih416 2024-07-15 13:31:41 +02:00
tegra thermal: trip: Pass trip pointer to .set_trip_temp() thermal zone callback 2024-07-12 15:14:01 +02:00
ti-soc-thermal
amlogic_thermal.c
armada_thermal.c
cpufreq_cooling.c
cpuidle_cooling.c
da9062-thermal.c
db8500_thermal.c
devfreq_cooling.c
dove_thermal.c
gov_bang_bang.c
gov_fair_share.c
gov_power_allocator.c thermal: gov_power_allocator: Return early in manage if trip_max is NULL 2024-07-04 13:35:50 +02:00
gov_step_wise.c thermal: gov_step_wise: Go straight to instance->lower when mitigation is over 2024-06-25 14:37:05 +02:00
gov_user_space.c
hisi_thermal.c thermal/drivers/hisi: Simplify with dev_err_probe() 2024-07-15 13:31:40 +02:00
imx8mm_thermal.c
imx_sc_thermal.c
imx_thermal.c Merge branch 'thermal-core' 2024-07-15 20:43:21 +02:00
k3_bandgap.c
k3_j72xx_bandgap.c thermal/drivers/k3_j72xx_bandgap: Implement suspend/resume support 2024-07-15 13:31:39 +02:00
Kconfig thermal/drivers/renesas: Group all renesas thermal drivers together 2024-07-15 13:31:38 +02:00
khadas_mcu_fan.c
kirkwood_thermal.c
loongson2_thermal.c
Makefile thermal/drivers/renesas: Group all renesas thermal drivers together 2024-07-15 13:31:38 +02:00
max77620_thermal.c
qoriq_thermal.c
rockchip_thermal.c
spear_thermal.c
sprd_thermal.c
sun8i_thermal.c
thermal_core.c thermal: core: Back off when polling thermal zones on errors 2024-07-24 12:40:23 +02:00
thermal_core.h thermal: core: Back off when polling thermal zones on errors 2024-07-24 12:40:23 +02:00
thermal_debugfs.c
thermal_debugfs.h
thermal_helpers.c thermal: core: Allow thermal zones to tell the core to ignore them 2024-07-18 13:35:55 +02:00
thermal_hwmon.c
thermal_hwmon.h
thermal_mmio.c
thermal_netlink.c
thermal_netlink.h
thermal_of.c
thermal_sysfs.c thermal: trip: Pass trip pointer to .set_trip_temp() thermal zone callback 2024-07-12 15:14:01 +02:00
thermal_trace_ipa.h
thermal_trace.h
thermal_trip.c thermal: trip: Fold __thermal_zone_get_trip() into its caller 2024-07-12 15:14:56 +02:00
thermal-generic-adc.c thermal/drivers/generic-adc: Simplify with dev_err_probe() 2024-07-15 13:31:41 +02:00
uniphier_thermal.c thermal: uniphier: Use thermal_zone_for_each_trip() for walking trip points 2024-07-04 13:25:31 +02:00