[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e69097c9-b9f4-456e-ad38-955a5511c414@gmx.de>
Date: Tue, 13 May 2025 21:45:09 +0200
From: Armin Wolf <W_Armin@....de>
To: Kurt Borja <kuurtb@...il.com>, Antheas Kapenekakis <lkml@...heas.dev>,
platform-driver-x86@...r.kernel.org
Cc: Jonathan Corbet <corbet@....net>, Hans de Goede <hdegoede@...hat.com>,
Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>,
Jean Delvare <jdelvare@...e.com>, Guenter Roeck <linux@...ck-us.net>,
linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-hwmon@...r.kernel.org
Subject: Re: [PATCH v1 02/10] platform/x86: msi-wmi-platform: Add unlocked
msi_wmi_platform_query
Am 12.05.25 um 21:21 schrieb Kurt Borja:
> On Sun May 11, 2025 at 5:44 PM -03, Antheas Kapenekakis wrote:
>> This driver requires to be able to handle transactions that perform
>> multiple WMI actions at a time. Therefore, it needs to be able to
>> lock the wmi_lock mutex for multiple operations.
>>
>> Add msi_wmi_platform_query_unlocked() to allow the caller to
>> perform the WMI query without locking the wmi_lock mutex, by
>> renaming the existing function and adding a new one that only
>> locks the mutex.
>>
>> Signed-off-by: Antheas Kapenekakis <lkml@...heas.dev>
> You only use msi_wmi_platform_query_unlocked() to protect the
> fan_curve/AP state right?
>
> If that's the case I think we don't need it. AFAIK sysfs reads/writes
> are already synchronized/locked, and as I mentioned in Patch 10, I don't
> think you need this variant in probe/remove either.
>
> I'd like to hear more opinions on this though.
>
The reason why we want such a function is that sometimes we need to perform
read-modify-write operations over the WMI interface, forcing us to prevent
other clients from calling a WMI method.
Thanks,
Armin Wolf
Powered by blists - more mailing lists