mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Rong Zhang <i@rong.moe>
To: "Ali Ahmet Memi�0�6" <aliamemis@disroot.org>,
	"Hans de Goede" <johannes.goede@oss.qualcomm.com>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>,
	Len Brown <lenb@kernel.org>,
	 Daniel Lezcano <daniel.lezcano@kernel.org>,
	Zhang Rui <rui.zhang@intel.com>,
	Lukasz Luba <lukasz.luba@arm.com>,  Armin Wolf <W_Armin@gmx.de>,
	Charis Stratakis <c.stratakis@proton.me>,
	linux-acpi@vger.kernel.org, 	linux-pm@vger.kernel.org,
	acpica-devel@lists.linux.dev, 	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/3] ACPI: Serialize battery methods and INT3403 _TMP
Date: Thu, 15 Oct 2026 19:51:22 +0800	[thread overview]
Message-ID: <08b6196a955faef9968224d7946ea5b1150f2ae3.camel@rong.moe> (raw)
In-Reply-To: <20261014150537.121547-1-aliamemis@disroot.org>

Hi Ali,

On Wed, 2026-10-14 at 18:05 +0300, Ali Ahmet Memiş wrote:
> On Wed, Oct 14, 2026 at 03:45:10PM +0200, Hans de Goede wrote:
> > 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.
> 
> Sleeping is fine, but the interrupt handler completes the EC
> transactions, so taking the lock there would deadlock an exclusive
> _BST.  Doing it in acpi_ec_event_processor() where the _Qxx methods
> are evaluated, works though.  With the brightness key queries also
> running the \GTST copy, 283 of 891 _BST reads were broken without it
> and 0 of 804 with it.
> 
> > I'm just thinking that if we're going to do this it would be nice to
> > cover the bko221065 UCSI case too.
> 
> UCSI and _Qxx alone aren't enough there.  I emulated the ECMT users
> from the 83DR tables and the EC helpers kept waiting up to ~680 ms of
> their 1 s timeout behind GBMD/SBMC until the ideapad methods were
> exclusive too.

Nah. Emulation doesn't count at all.

Without a real EC, any call to ECCC or RDER (called by GBMD and SBMC)
times out because CMDB is never reset to 0:

        CMDB = Arg0
        Local0 = 0x0100
        While ((Local0 && CMDB))
        {
            Sleep (0x02)
            Local0--
        }

Thus, any call to ECCC or RDER consumes at least 200ms in emulation, but
in reality it doesn't.

If the EC is really stuck for such a long time in reality, the platform
will shut down or reset itself.

Thanks,
Rong

> 
> > Note this is something which can be done on top of this set.
> 
> I can send a series on top of this one for the EC queries, UCSI and
> ideapad if that sounds good.

  parent reply	other threads:[~2026-10-15 11:56 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-14 13:26 Ali Ahmet Memiş
2026-10-14 13:30 ` [PATCH 1/3] ACPI: utils: Add exclusive AML evaluation helpers Ali Ahmet Memiş
2026-10-14 13:39   ` Hans de Goede
2026-10-15 11:47   ` Rong Zhang
2026-10-14 13:30 ` [PATCH 2/3] ACPI: battery: Evaluate battery methods exclusively Ali Ahmet Memiş
2026-10-14 13:39   ` Hans de Goede
2026-10-15 11:48   ` Rong Zhang
2026-10-14 13:30 ` [PATCH 3/3] thermal: intel: int340x: Evaluate _TMP exclusively Ali Ahmet Memiş
2026-10-14 13:39   ` Hans de Goede
2026-10-15 11:49   ` Rong Zhang
2026-10-14 13:45 ` [PATCH 0/3] ACPI: Serialize battery methods and INT3403 _TMP Hans de Goede
2026-10-14 15:05   ` Ali Ahmet Memiş
2026-10-14 15:30     ` Hans de Goede
2026-10-14 15:38       ` Rafael J. Wysocki (Intel)
2026-10-15 11:51     ` Rong Zhang [this message]
2026-10-15 12:09       ` Ali Ahmet Memiş
2026-10-15 13:45         ` Rafael J. Wysocki (Intel)
2026-10-15 11:45 ` Rong Zhang
2026-10-15 13:13   ` Hans de Goede
2026-10-15 13:48     ` Rong Zhang
2026-10-15 18:35       ` Hans de Goede

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=08b6196a955faef9968224d7946ea5b1150f2ae3.camel@rong.moe \
    --to=i@rong.moe \
    --cc=W_Armin@gmx.de \
    --cc=acpica-devel@lists.linux.dev \
    --cc=aliamemis@disroot.org \
    --cc=c.stratakis@proton.me \
    --cc=daniel.lezcano@kernel.org \
    --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=rafael@kernel.org \
    --cc=rui.zhang@intel.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®