mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Ali Ahmet Memiş" <aliamemis@disroot.org>
To: "Rafael J . Wysocki" <rafael@kernel.org>
Cc: "Hans de Goede" <johannes.goede@oss.qualcomm.com>,
	"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
	"Heikki Krogerus" <heikki.krogerus@linux.intel.com>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Len Brown" <lenb@kernel.org>, "Ike Panhc" <ikepanhc@gmail.com>,
	"Derek J . Clark" <derekjohn.clark@gmail.com>,
	"Mark Pearson" <mpearson-lenovo@squebb.ca>,
	"Rong Zhang" <i@rong.moe>, "Armin Wolf" <W_Armin@gmx.de>,
	"Avraham Hollander" <anhollander516@gmail.com>,
	"Jeffrey Wälti" <jeffrey@waelti.dev>, Rick <rickk1166@gmail.com>,
	linux-acpi@vger.kernel.org, platform-driver-x86@vger.kernel.org,
	linux-usb@vger.kernel.org, acpica-devel@lists.linux.dev,
	linux-kernel@vger.kernel.org
Subject: [PATCH 2/4] ACPI: EC: Evaluate _Qxx methods exclusively
Date: Wed, 14 Oct 2026 22:04:54 +0300	[thread overview]
Message-ID: <20261014190544.150093-3-aliamemis@disroot.org> (raw)
In-Reply-To: <20261014190544.150093-1-aliamemis@disroot.org>

On some Lenovo IdeaPad and Yoga models, _Q0A, _Q0B and the UCSI
notification query _Q16 take the same AML mutex as the battery, UCSI and
ideapad methods. Making those exclusive does not help as long as the
_Qxx methods still run interleaved with them.

Evaluate _Qxx with acpi_evaluate_object_exclusive().

Link: https://bugzilla.kernel.org/show_bug.cgi?id=221065
Signed-off-by: Ali Ahmet Memiş <aliamemis@disroot.org>
---
 drivers/acpi/ec.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index a89f10256dbb..6cec5a319ec2 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -1154,10 +1154,15 @@ static void acpi_ec_event_processor(struct work_struct *work)
 
 	ec_dbg_evt("Query(0x%02x) started", handler->query_bit);
 
+	/*
+	 * Evaluate _Qxx exclusively, as on some laptops they take the same
+	 * AML mutex as the battery, UCSI and platform methods, which then
+	 * time out waiting for it.
+	 */
 	if (handler->func)
 		handler->func(handler->data);
 	else if (handler->handle)
-		acpi_evaluate_object(handler->handle, NULL, NULL, NULL);
+		acpi_evaluate_object_exclusive(handler->handle, NULL, NULL, NULL);
 
 	ec_dbg_evt("Query(0x%02x) stopped", handler->query_bit);
 
-- 
2.55.0


  parent reply	other threads:[~2026-10-14 19:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-14 19:04 [PATCH 0/4] ACPI: Serialize EC queries, UCSI and ideapad methods Ali Ahmet Memiş
2026-10-14 19:04 ` [PATCH 1/4] ACPI: utils: Add acpi_evaluate_dsm_exclusive() Ali Ahmet Memiş
2026-10-14 19:04 ` Ali Ahmet Memiş [this message]
2026-10-14 19:04 ` [PATCH 3/4] usb: typec: ucsi: acpi: Evaluate _DSM exclusively Ali Ahmet Memiş
2026-10-14 19:04 ` [PATCH 4/4] platform/x86: ideapad-laptop: Evaluate ACPI methods exclusively Ali Ahmet Memiş

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=20261014190544.150093-3-aliamemis@disroot.org \
    --to=aliamemis@disroot.org \
    --cc=W_Armin@gmx.de \
    --cc=acpica-devel@lists.linux.dev \
    --cc=anhollander516@gmail.com \
    --cc=derekjohn.clark@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=heikki.krogerus@linux.intel.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-usb@vger.kernel.org \
    --cc=mpearson-lenovo@squebb.ca \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=rickk1166@gmail.com \
    /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®