linux/drivers/thermal
Rafael J. Wysocki b44444027c thermal: trip: Remove lockdep assertion from for_each_thermal_trip()
The lockdep assertion in for_each_thermal_trip() was added to possibly
catch incorrect usage of that function without the thermal zone lock.
However, it turns out that the ACPI thermal driver has a legitimate
reason to call for_each_thermal_trip() without locking.

Namely, it is called by acpi_thermal_bind_unbind_cdev() in the thermal
zone registration and unregistration paths.  That function cannot acquire
the thermal zone lock by itself, because it calls functions that acquire
it, thermal_bind_cdev_to_trip() or thermal_unbind_cdev_from_trip().
However, it is invoked when the ACPI notify handler for the thermal
zone in question has not been registered yet (in the registration path)
or after that handler has been unregistered (in the unregistration
path).  Therefore, when for_each_thermal_trip() is called by
acpi_thermal_bind_unbind_cdev(), thermal trip changes induced by the
platform firmware cannot take place and so the thermal zone's trips[]
table is effectively immutable.  Hence, it is valid to call
for_each_thermal_trip() from acpi_thermal_bind_unbind_cdev() without
locking and the lockdep assertion in the former is in fact incorrect, so
remove it.

Fixes: d5ea889246 ("ACPI: thermal: Do not use trip indices for cooling device binding")
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2023-10-07 13:29:22 +02:00
..
broadcom thermal/drivers/broadcom/brcstb_thermal: Removed unneeded platform_set_drvdata() 2023-08-16 12:22:28 +02:00
intel thermal: Use thermal_tripless_zone_device_register() 2023-09-05 21:42:18 +02:00
mediatek thermal/drivers/mediatek/auxadc_thermal: Removed call to platform_set_drvdata() 2023-08-16 12:33:11 +02:00
qcom thermal/drivers/tsens: Make tsens_xxxx_nvmem static 2023-08-16 09:54:39 +02:00
samsung thermal/drivers/samsung: Fix Wvoid-pointer-to-enum-cast warning 2023-08-16 12:11:19 +02:00
st thermal: Explicitly include correct DT includes 2023-07-31 20:03:42 +02:00
tegra thermal/drivers/tegra-bpmp: Check if BPMP supports trip points 2023-08-22 19:10:28 +02:00
ti-soc-thermal thermal: Constify the trip argument of the .get_trend() zone callback 2023-09-11 17:16:40 +02:00
amlogic_thermal.c thermal: Explicitly include correct DT includes 2023-07-31 20:03:42 +02:00
armada_thermal.c thermal: Use thermal_tripless_zone_device_register() 2023-09-05 21:42:18 +02:00
cpufreq_cooling.c - Add more thermal zone device encapsulation: prevent setting 2023-04-03 20:43:32 +02:00
cpuidle_cooling.c More thermal control updates for 6.4-rc1 2023-05-03 11:46:01 -07:00
da9062-thermal.c thermal/drivers/da9062: Don't access the thermal zone device fields 2023-03-03 20:45:03 +01:00
db8500_thermal.c thermal/drivers/db8500: Remove redundant of_match_ptr() 2023-08-16 12:09:19 +02:00
devfreq_cooling.c thermal/core: Relocate the traces definition in thermal directory 2023-04-01 20:51:45 +02:00
dove_thermal.c thermal: Use thermal_tripless_zone_device_register() 2023-09-05 21:42:18 +02:00
gov_bang_bang.c thermal: core: Store trip pointer in struct thermal_instance 2023-09-28 12:55:29 +02:00
gov_fair_share.c thermal: core: Store trip pointer in struct thermal_instance 2023-09-28 12:55:29 +02:00
gov_power_allocator.c thermal: core: Store trip pointer in struct thermal_instance 2023-09-28 12:55:29 +02:00
gov_step_wise.c thermal: core: Store trip pointer in struct thermal_instance 2023-09-28 12:55:29 +02:00
gov_user_space.c thermal: gov_user_space: Do not lock thermal zone mutex 2022-08-30 20:18:47 +02:00
hisi_thermal.c thermal: Explicitly include correct DT includes 2023-07-31 20:03:42 +02:00
imx8mm_thermal.c thermal/drivers/imx8mm: Suppress log message on probe deferral 2023-08-16 09:54:39 +02:00
imx_sc_thermal.c thermal: Explicitly include correct DT includes 2023-07-31 20:03:42 +02:00
imx_thermal.c thermal: Explicitly include correct DT includes 2023-07-31 20:03:42 +02:00
k3_bandgap.c thermal/drivers/k3_bandgap: Remove unneeded call to platform_set_drvdata() 2023-08-16 12:19:28 +02:00
k3_j72xx_bandgap.c thermal/drivers/k3_j72xx_bandgap: Removed unneeded call to platform_set_drvdata() 2023-08-16 12:18:02 +02:00
Kconfig thermal/drivers/loongson-2: Add thermal management support 2023-08-17 09:27:18 +02:00
khadas_mcu_fan.c
kirkwood_thermal.c thermal: Use thermal_tripless_zone_device_register() 2023-09-05 21:42:18 +02:00
loongson2_thermal.c thermal/drivers/loongson-2: Add thermal management support 2023-08-17 09:27:18 +02:00
Makefile thermal/drivers/loongson-2: Add thermal management support 2023-08-17 09:27:18 +02:00
max77620_thermal.c thermal/drivers/max77620_thermal: Removed unneeded call to platform_set_drvdata() 2023-08-16 12:33:53 +02:00
qoriq_thermal.c thermal/drivers/qoriq: Remove redundant msg in qoriq_tmu_register_tmu_zone() 2023-06-26 12:03:14 +02:00
rcar_gen3_thermal.c thermal: Explicitly include correct DT includes 2023-07-31 20:03:42 +02:00
rcar_thermal.c thermal: Explicitly include correct DT includes 2023-07-31 20:03:42 +02:00
rockchip_thermal.c thermal/drivers/rockchip: use devm_reset_control_array_get_exclusive() 2023-04-07 10:31:33 +02:00
rzg2l_thermal.c thermal: Explicitly include correct DT includes 2023-07-31 20:03:42 +02:00
spear_thermal.c thermal: Use thermal_tripless_zone_device_register() 2023-09-05 21:42:18 +02:00
sprd_thermal.c thermal: Explicitly include correct DT includes 2023-07-31 20:03:42 +02:00
sun8i_thermal.c thermal/drivers/sun8i_thermal: Remove unneeded call to platform_set_drvdata() 2023-08-16 12:31:22 +02:00
thermal_acpi.c thermal: ACPI: Make helpers retrieve temperature only 2023-02-02 15:26:45 +01:00
thermal_core.c thermal: core: Drop thermal_zone_device_exec() 2023-10-05 13:32:55 +02:00
thermal_core.h thermal: core: Store trip pointer in struct thermal_instance 2023-09-28 12:55:29 +02:00
thermal_helpers.c thermal: core: Store trip pointer in struct thermal_instance 2023-09-28 12:55:29 +02:00
thermal_hwmon.c thermal/hwmon: Add error information printing for devm_thermal_add_hwmon_sysfs() 2023-06-26 12:03:14 +02:00
thermal_hwmon.h thermal/hwmon: Use the right device for devm_thermal_add_hwmon_sysfs() 2023-03-03 20:45:02 +01:00
thermal_mmio.c thermal/core: Use the thermal zone 'devdata' accessor in thermal located drivers 2023-03-03 20:45:02 +01:00
thermal_netlink.c thermal/core: Fix unregistering netlink at thermal init time 2023-01-25 16:40:39 +01:00
thermal_netlink.h thermal/core: Fix unregistering netlink at thermal init time 2023-01-25 16:40:39 +01:00
thermal_of.c thermal/of: add missing of_node_put() 2023-09-11 17:16:36 +02:00
thermal_sysfs.c thermal: core: Store trip pointer in struct thermal_instance 2023-09-28 12:55:29 +02:00
thermal_trace_ipa.h thermal/core: Relocate the traces definition in thermal directory 2023-04-01 20:51:45 +02:00
thermal_trace.h thermal/core: Relocate the traces definition in thermal directory 2023-04-01 20:51:45 +02:00
thermal_trip.c thermal: trip: Remove lockdep assertion from for_each_thermal_trip() 2023-10-07 13:29:22 +02:00
thermal-generic-adc.c thermal/drivers/generic-adc: Removed unneeded call to platform_set_drvdata() 2023-08-16 12:36:21 +02:00
uniphier_thermal.c thermal: Explicitly include correct DT includes 2023-07-31 20:03:42 +02:00