public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Gergo Koteles <soyer@irl.hu>
Cc: Hans de Goede <hdegoede@redhat.com>,
	Ike Panhc <ike.pan@canonical.com>,
	 platform-driver-x86@vger.kernel.org,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 4/4] platform/x86: ideapad-laptop: add a mutex to synchronize VPC commands
Date: Thu, 18 Jul 2024 11:06:55 +0300 (EEST)	[thread overview]
Message-ID: <06e44cdc-b984-23ea-2d89-b4489bce2c27@linux.intel.com> (raw)
In-Reply-To: <70d3957b315815085cdd8cb04b002cdb4a372ddc.1721258854.git.soyer@irl.hu>

On Thu, 18 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@irl.hu>
> ---

> @@ -2027,6 +2053,8 @@ static int ideapad_acpi_add(struct platform_device *pdev)
>  	priv->adev = adev;
>  	priv->platform_device = pdev;
>  
> +	mutex_init(&priv->vpc_mutex);
> +
>  	ideapad_check_features(priv);
>  
>  	err = ideapad_sysfs_init(priv);

mutex_destroy() missing from rollback and ideapad_acpi_remove().

-- 
 i.


  reply	other threads:[~2024-07-18  8:07 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-18  7:27 [PATCH v2 0/4] platform/x86: ideapad-laptop: synchronize VPC commands Gergo Koteles
2024-07-18  7:27 ` [PATCH v2 1/4] platform/x86: ideapad-laptop: introduce a generic notification chain Gergo Koteles
2024-07-18  7:27 ` [PATCH v2 2/4] platform/x86: ideapad-laptop: move ymc_trigger_ec from lenovo-ymc Gergo Koteles
2024-07-18  8:10   ` Ilpo Järvinen
2024-07-18  7:27 ` [PATCH v2 3/4] platform/x86: ideapad-laptop: move ACPI helpers from header to source file Gergo Koteles
2024-07-18  8:12   ` Ilpo Järvinen
2024-07-18  7:27 ` [PATCH v2 4/4] platform/x86: ideapad-laptop: add a mutex to synchronize VPC commands Gergo Koteles
2024-07-18  8:06   ` Ilpo Järvinen [this message]
2024-07-18  8:12     ` Hans de Goede
2024-07-18  8:17       ` Ilpo Järvinen

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=06e44cdc-b984-23ea-2d89-b4489bce2c27@linux.intel.com \
    --to=ilpo.jarvinen@linux.intel.com \
    --cc=hdegoede@redhat.com \
    --cc=ike.pan@canonical.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=soyer@irl.hu \
    /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