linux/drivers/thermal/intel
Srinivas Pandruvada 3a3f789ee1 thermal: int3400: Fix reading of current_uuid for active policy
commit 7082503622 upstream.

When the current_uuid attribute is set to the active policy UUID,
reading back the same attribute is returning "INVALID" instead of
the active policy UUID on some platforms before Ice Lake.

In platforms before Ice Lake, firmware provides a list of supported
thermal policies. In this case, user space can select any of the
supported thermal policies via a write to attribute "current_uuid".

In commit c7ff297639 ("thermal: int340x: Update OS policy capability
handshake")', the OS policy handshake was updated to support Ice Lake
and later platforms and it treated priv->current_uuid_index=0 as
invalid. However, priv->current_uuid_index=0 is for the active policy,
only priv->current_uuid_index=-1 is invalid.

Fix this issue by updating the priv->current_uuid_index check.

Fixes: c7ff297639 ("thermal: int340x: Update OS policy capability handshake")
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Cc: 5.18+ <stable@vger.kernel.org> # 5.18+
Link: https://patch.msgid.link/20241114200213.422303-1-srinivas.pandruvada@linux.intel.com
[ rjw: Subject and changelog edits ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2024-12-09 10:41:08 +01:00
..
int340x_thermal thermal: int3400: Fix reading of current_uuid for active policy 2024-12-09 10:41:08 +01:00
intel_bxt_pmic_thermal.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00
intel_hfi.c thermal: intel: hfi: Give HFI instances package scope 2024-07-09 18:29:07 +02:00
intel_hfi.h thermal: intel: hfi: Enable notification interrupt 2022-02-03 19:50:49 +01:00
intel_pch_thermal.c thermal: intel: intel_pch: Improve cooling log 2024-06-07 21:24:37 +02:00
intel_powerclamp.c x86/cpu/topology: Rename topology_max_die_per_package() 2024-02-15 22:07:45 +01:00
intel_quark_dts_thermal.c thermal: trip: Pass trip pointer to .set_trip_temp() thermal zone callback 2024-07-12 15:14:01 +02:00
intel_soc_dts_iosf.c thermal: trip: Pass trip pointer to .set_trip_temp() thermal zone callback 2024-07-12 15:14:01 +02:00
intel_soc_dts_iosf.h thermal: intel: Set THERMAL_TRIP_FLAG_RW_TEMP directly 2024-02-27 12:04:01 +01:00
intel_soc_dts_thermal.c thermal: intel: intel_soc_dts_thermal: Switch to new Intel CPU model defines 2024-06-07 20:47:05 +02:00
intel_tcc.c thermal: intel: intel_tcc: Add model checks for temperature registers 2024-06-21 14:52:12 +02:00
intel_tcc_cooling.c thermal: intel: intel_tcc_cooling: Use a model-specific bitmask for TCC offset 2024-06-21 14:52:12 +02:00
Kconfig thermal: Get rid of CONFIG_THERMAL_WRITABLE_TRIPS 2024-02-23 18:24:48 +01:00
Makefile thermal: intel: menlow: Get rid of this driver 2023-04-27 19:24:13 +02:00
therm_throt.c thermal: intel: Avoid updating unsupported THERM_STATUS_CLEAR mask bits 2023-04-11 18:12:19 +02:00
thermal_interrupt.h thermal: intel: Protect clearing of thermal status bits 2022-11-23 20:09:06 +01:00
x86_pkg_temp_thermal.c thermal: trip: Pass trip pointer to .set_trip_temp() thermal zone callback 2024-07-12 15:14:01 +02:00