From: "Ali Ahmet Memiş" <aliamemis@disroot.org>
To: "Rafael J . Wysocki" <rafael@kernel.org>
Cc: "Hans de Goede" <johannes.goede@oss.qualcomm.com>,
"Rong Zhang" <i@rong.moe>, "Len Brown" <lenb@kernel.org>,
"Daniel Lezcano" <daniel.lezcano@kernel.org>,
"Zhang Rui" <rui.zhang@intel.com>,
"Lukasz Luba" <lukasz.luba@arm.com>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
"Ike Panhc" <ikepanhc@gmail.com>,
"Derek J . Clark" <derekjohn.clark@gmail.com>,
"Mark Pearson" <mpearson-lenovo@squebb.ca>,
"Armin Wolf" <W_Armin@gmx.de>,
"Charis Stratakis" <c.stratakis@proton.me>,
"Avraham Hollander" <anhollander516@gmail.com>,
"Jeffrey Wälti" <jeffrey@waelti.dev>, Rick <rickk1166@gmail.com>,
linux-acpi@vger.kernel.org, linux-pm@vger.kernel.org,
platform-driver-x86@vger.kernel.org,
acpica-devel@lists.linux.dev, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: [PATCH v2 3/4] thermal: intel: int340x: Evaluate _TMP exclusively
Date: Sat, 17 Oct 2026 16:06:36 +0300 [thread overview]
Message-ID: <20261017130652.318778-4-aliamemis@disroot.org> (raw)
In-Reply-To: <20261017130652.318778-1-aliamemis@disroot.org>
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().
Fixes: d33e89d12295 ("thermal: core: Suspend thermal zones later and resume them earlier")
Reported-by: Charis Stratakis <c.stratakis@proton.me>
Closes: https://lore.kernel.org/all/37N_jFulf7n-Z55NfKfE71C_wVPxYvZ0xD_iRUg2fXu7TypDiF5PStQ6siSfVBih6fThg5WoPes8U5ZQpfVm_teMFcUGXFxz2DdMbfSWuws=@proton.me/
Cc: stable@vger.kernel.org
Signed-off-by: Ali Ahmet Memiş <aliamemis@disroot.org>
Reviewed-by: Hans de Goede <johannes.goede@oss.qualcomm.com>
Reviewed-by: Rong Zhang <i@rong.moe>
---
.../thermal/intel/int340x_thermal/int340x_thermal_zone.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.c b/drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.c
index 965700ee6962..9451fea1f65c 100644
--- a/drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.c
+++ b/drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.c
@@ -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;
--
2.55.0
next prev parent reply other threads:[~2026-10-17 13:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-17 13:06 [PATCH v2 0/4] ACPI: Serialize battery, INT3403 _TMP and ideapad methods Ali Ahmet Memiş
2026-10-17 13:06 ` [PATCH v2 1/4] ACPI: utils: Add exclusive AML evaluation helpers Ali Ahmet Memiş
2026-10-17 13:06 ` [PATCH v2 2/4] ACPI: battery: Evaluate battery methods exclusively Ali Ahmet Memiş
2026-10-17 13:06 ` Ali Ahmet Memiş [this message]
2026-10-17 13:08 ` [PATCH v2 4/4] platform/x86: ideapad-laptop: Evaluate ACPI " Ali Ahmet Memiş
2026-10-17 18:06 ` [PATCH v2 0/4] ACPI: Serialize battery, INT3403 _TMP and ideapad methods Rong Zhang
2026-10-17 18:24 ` Rong Zhang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261017130652.318778-4-aliamemis@disroot.org \
--to=aliamemis@disroot.org \
--cc=W_Armin@gmx.de \
--cc=acpica-devel@lists.linux.dev \
--cc=anhollander516@gmail.com \
--cc=c.stratakis@proton.me \
--cc=daniel.lezcano@kernel.org \
--cc=derekjohn.clark@gmail.com \
--cc=i@rong.moe \
--cc=ikepanhc@gmail.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=jeffrey@waelti.dev \
--cc=johannes.goede@oss.qualcomm.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=lukasz.luba@arm.com \
--cc=mpearson-lenovo@squebb.ca \
--cc=platform-driver-x86@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=rickk1166@gmail.com \
--cc=rui.zhang@intel.com \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®