FAILED: patch "[PATCH] thermal: intel: int340x: Evaluate _TMP exclusively" failed to apply to 7.3-stable tree
Subsystems (2)
Sasha Levin
maintainerThe patch below does not apply to the 7.3-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-7.3.y
git checkout FETCH_HEAD
git cherry-pick -x c4aae727beb23a736c15b8d53e219da29d791065
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '[email protected]' --subject-prefix 'PATCH 7.3.y' 'HEAD^..'
Thanks,
Sasha
------------------ original commit in Linus's tree ------------------
From c4aae727beb23a736c15b8d53e219da29d791065 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ali=20Ahmet=20Memi=C5=9F?= <[email protected]>
Date: Sun, 18 Oct 2026 15:22:19 +0300
Subject: [PATCH] thermal: intel: int340x: Evaluate _TMP exclusively
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
On ThinkPad P1 Gen2 and P53, INT3403 _TMP switches the EC page selector without taking the mutex the battery methods use, so it must not run interleaved with them.
Evaluate _TMP with acpi_evaluate_integer_exclusive(), also where int3403 and processor_thermal probe for it.
--- drivers/thermal/intel/int340x_thermal/int3403_thermal.c | 3 +-- .../thermal/intel/int340x_thermal/int340x_thermal_zone.c | 6 +++++- .../intel/int340x_thermal/processor_thermal_device.c | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-)
drivers/thermal/intel/int340x_thermal/int3403_thermal.c +1 -2
@@ -217,8 +217,7 @@ static int int3403_add(struct platform_device *pdev) } - status =acpi_evaluate_integer (priv->adev->handle,"_TMP" , -NULL , &tmp); + status =acpi_evaluate_integer_exclusive (priv->adev->handle,"_TMP" ,NULL , &tmp);if (ACPI_FAILURE (status)) { status =acpi_evaluate_integer (priv->adev->handle,"PTYP" ,NULL , &priv->type);
drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.c +5 -1
@@ -18,7 +18,11 @@ static int int340x_thermal_get_zone_temp(struct thermal_zone_device *zone,unsigned long long tmp;acpi_status status; - status =acpi_evaluate_integer (d->adev->handle,"_TMP" ,NULL , &tmp); +/* +* On some ThinkPads _TMP switches the EC page selector without +* taking the mutex the battery methods use. +*/ + status =acpi_evaluate_integer_exclusive (d->adev->handle,"_TMP" ,NULL , &tmp);if (ACPI_FAILURE (status))return -EIO ;
drivers/thermal/intel/int340x_thermal/processor_thermal_device.c +1 -1
@@ -287,7 +287,7 @@ int proc_thermal_add(struct device *dev, struct proc_thermal_device *proc_priv)if (ret)return ret; - status =acpi_evaluate_integer (adev->handle,"_TMP" ,NULL , &tmp); + status =acpi_evaluate_integer_exclusive (adev->handle,"_TMP" ,NULL , &tmp);if (ACPI_FAILURE (status)) {/* there is no _TMP method, add local method */ if (intel_tcc_get_tjmax (-1 ) >0 )
Signature · 1 line
2.53.0
Sasha Levin
maintainerPATCH 1/1 thermal: intel: int340x: Evaluate _TMP exclusively
From: Ali Ahmet Memiş <[email protected]>
[ Upstream commit c4aae727beb23a736c15b8d53e219da29d791065 ]
On ThinkPad P1 Gen2 and P53, INT3403 _TMP switches the EC page selector without taking the mutex the battery methods use, so it must not run interleaved with them.
Evaluate _TMP with acpi_evaluate_integer_exclusive(), also where int3403 and processor_thermal probe for it.
---
Depends on <[email protected]>
drivers/thermal/intel/int340x_thermal/int3403_thermal.c | 3 +-- .../thermal/intel/int340x_thermal/int340x_thermal_zone.c | 6 +++++- .../intel/int340x_thermal/processor_thermal_device.c | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-)
drivers/thermal/intel/int340x_thermal/int3403_thermal.c +1 -2
@@ -217,8 +217,7 @@ static int int3403_add(struct platform_device *pdev) } - status =acpi_evaluate_integer (priv->adev->handle,"_TMP" , -NULL , &tmp); + status =acpi_evaluate_integer_exclusive (priv->adev->handle,"_TMP" ,NULL , &tmp);if (ACPI_FAILURE (status)) { status =acpi_evaluate_integer (priv->adev->handle,"PTYP" ,NULL , &priv->type);
drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.c +5 -1
@@ -18,7 +18,11 @@ static int int340x_thermal_get_zone_temp(struct thermal_zone_device *zone,unsigned long long tmp;acpi_status status; - status =acpi_evaluate_integer (d->adev->handle,"_TMP" ,NULL , &tmp); +/* +* On some ThinkPads _TMP switches the EC page selector without +* taking the mutex the battery methods use. +*/ + status =acpi_evaluate_integer_exclusive (d->adev->handle,"_TMP" ,NULL , &tmp);if (ACPI_FAILURE (status))return -EIO ;
drivers/thermal/intel/int340x_thermal/processor_thermal_device.c +1 -1
@@ -287,7 +287,7 @@ int proc_thermal_add(struct device *dev, struct proc_thermal_device *proc_priv)if (ret)return ret; - status =acpi_evaluate_integer (adev->handle,"_TMP" ,NULL , &tmp); + status =acpi_evaluate_integer_exclusive (adev->handle,"_TMP" ,NULL , &tmp);if (ACPI_FAILURE (status)) {/* there is no _TMP method, add local method */ if (intel_tcc_get_tjmax (-1 ) >0 )
Signature · 1 line
2.53.0