Re: [PATCH v4 4/4] platform/x86: ideapad-laptop: add a mutex to synchronize VPC commands

From: Gergo Koteles
Date: Tue Jul 30 2024 - 12:01:02 EST


Hi Ilpo,

On Tue, 2024-07-30 at 16:37 +0300, Ilpo Järvinen wrote:
> On Thu, 25 Jul 2024, Gergo Koteles wrote:
>
> > Calling VPC commands consists of several VPCW and VPCR ACPI calls.
> > These calls and their results can get mixed up if they are called
> > simultaneously from different threads, like acpi notify handler,
> > sysfs, debugfs, notification chain.
> >
> > Add a mutex to synchronize VPC commands.
> >
> > Signed-off-by: Gergo Koteles <soyer@xxxxxx>
>
> What commit does this fix? I was going to add a Fixes tag myself while
> applying this but wasn't sure if it should be the ACPI concurrency commit
> e2ffcda16290 or the change introducing lenovo-ymc driver?
>

YMC triggering works in 6.7, but not reliably in 6.8. So I assume the
culprit is e2ffcda16290.

But in theory debugfs, sysfs, acpi notify handler can race with each
other in the same way for 10+ years. Technically, probably not.

> Also, I'd prefer to not take the move patch (PATCH 3/4) now so I could
> take this through fixes branch since it causes a real issue if I remember
> the earlier discussions right? Do you think there's any issue if I take
> only patches 1, 2, and 4? They seemed to apply without conflicts when I
> tried to apply the entire series and then cherrypicked the last patch
> dropping the third patch.
>

Yes, this is a real issue.

You can skip the third patch. The series compiles and works fine
without it.

> The code movement patch could go through for-next fixes branch is then
> merged into it (or after one kernel cycle).
>
>

Fine.

Thanks,
Gergo