* [PATCH v1] PM: runtime: Introduce one more usage counter guard
@ 2025-10-01 17:34 Rafael J. Wysocki
2025-10-03 9:02 ` Jonathan Cameron
0 siblings, 1 reply; 2+ messages in thread
From: Rafael J. Wysocki @ 2025-10-01 17:34 UTC (permalink / raw)
To: Linux PM; +Cc: LKML, Ulf Hansson, Takashi Iwai, Jonathan Cameron, Dhruva Gole
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>
---
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 *,
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH v1] PM: runtime: Introduce one more usage counter guard
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
0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Cameron @ 2025-10-03 9:02 UTC (permalink / raw)
To: Rafael J. Wysocki; +Cc: Linux PM, LKML, Ulf Hansson, Takashi Iwai, Dhruva Gole
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 *,
>
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-10-03 9:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox