The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Jonathan Cameron <jonathan.cameron@huawei.com>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Linux PM <linux-pm@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	Takashi Iwai <tiwai@suse.de>, Dhruva Gole <d-gole@ti.com>
Subject: Re: [PATCH v1] PM: runtime: Introduce one more usage counter guard
Date: Fri, 3 Oct 2025 10:02:35 +0100	[thread overview]
Message-ID: <20251003100235.00003a98@huawei.com> (raw)
In-Reply-To: <12752072.O9o76ZdvQC@rafael.j.wysocki>

On Wed, 01 Oct 2025 19:34:29 +0200
"Rafael J. Wysocki" <rafael@kernel.org> wrote:

> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> 
> Follow previous commit 9a0abc39450a ("PM: runtime: Add auto-cleanup
> macros for "resume and get" operations") and define a runtime PM
> usage counter guard in which pm_runtime_get_noresume() and
> pm_runtime_put_noidle() will be used for incrementing and
> decrementing it, respectively.
> 
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

Make sense to complete the set.

Reviewed-by: Jonathan Cameron <jonathan.cameorn@huawei.com>

> ---
> 
> Commit 9a0abc39450a is there in my linux-next branch.
> 
> ---
>  include/linux/pm_runtime.h |    3 +++
>  1 file changed, 3 insertions(+)
> 
> --- a/include/linux/pm_runtime.h
> +++ b/include/linux/pm_runtime.h
> @@ -610,6 +610,9 @@ static inline int pm_runtime_put_autosus
>  	return __pm_runtime_put_autosuspend(dev);
>  }
>  
> +DEFINE_GUARD(pm_runtime_noresume, struct device *,
> +	     pm_runtime_get_noresume(_T), pm_runtime_put_noidle(_T));
> +
>  DEFINE_GUARD(pm_runtime_active, struct device *,
>  	     pm_runtime_get_sync(_T), pm_runtime_put(_T));
>  DEFINE_GUARD(pm_runtime_active_auto, struct device *,
> 
> 
> 


      reply	other threads:[~2025-10-03  9:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-01 17:34 [PATCH v1] PM: runtime: Introduce one more usage counter guard Rafael J. Wysocki
2025-10-03  9:02 ` Jonathan Cameron [this message]

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=20251003100235.00003a98@huawei.com \
    --to=jonathan.cameron@huawei.com \
    --cc=d-gole@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=tiwai@suse.de \
    --cc=ulf.hansson@linaro.org \
    /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