Re: [PATCH 0/3] ACPI: Serialize battery methods and INT3403 _TMP
From: Hans de Goede
Date: Wed Oct 14 2026 - 09:54:10 EST
Hi,
On 14-Oct-26 15:26, Ali Ahmet Memiş wrote:
> As discussed in [1], add exclusive variants of acpi_evaluate_object()
> and acpi_evaluate_integer() and use them for the battery methods and
> INT3403 _TMP, which interleave badly on ThinkPad P1 Gen2 and P53.
Thank you for your work on this!
> UCSI (bko221065) is not converted. There the contention is on a
> firmware AML mutex that _Qxx EC queries also take, which a wrapper
> around acpi_evaluate_object() cannot cover, and Rong's notification
> merging in 7.3 already reduces it on the battery side.
Hmm, I wonder if we should export the lock added in patch 1/3 and
then also take that in the ACPI EC interrupt handler ?
The ACPI code already uses a threaded IRQ handler for both EC GPIO
IRQs and GPEs so sleeping in the handler should be ok.
Note this is something which can be done on top of this set. I'm just
thinking that if we're going to do this it would be nice to cover
the bko221065 UCSI case too. Rong's notification changes do not fix
the race, they just make it a bit harder to hit, but users are still
hitting it just less frequent.
Regards,
Hans
>
> [1] https://lore.kernel.org/all/CAJZ5v0gS4agVUkCO6M=VW4Wi2y1-s+k23bpzmX9aAZ0Rsv4z9Q@xxxxxxxxxxxxxx/
>
> Ali Ahmet Memiş (3):
> ACPI: utils: Add exclusive AML evaluation helpers
> ACPI: battery: Evaluate battery methods exclusively
> thermal: intel: int340x: Evaluate _TMP exclusively
>
> drivers/acpi/battery.c | 17 +++---
> drivers/acpi/utils.c | 56 +++++++++++++++++--
> .../int340x_thermal/int340x_thermal_zone.c | 3 +-
> include/acpi/acpi_bus.h | 8 +++
> 4 files changed, 71 insertions(+), 13 deletions(-)
>
>
> base-commit: 24a19b953e2a3d0ea5a8c4951a0ab8f32720c907