From: Kevin Hilman <khilman@kernel.org>
To: Johan Hovold <johan+linaro@kernel.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Ulf Hansson <ulf.hansson@linaro.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Matthias Kaehlcke <mka@chromium.org>,
linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
Johan Hovold <johan+linaro@kernel.org>
Subject: Re: [PATCH] PM: domains: log failures to register always-on domains
Date: Thu, 29 Sep 2022 16:57:05 -0700 [thread overview]
Message-ID: <7h7d1lwx7y.fsf@baylibre.com> (raw)
In-Reply-To: <20220929154214.7305-1-johan+linaro@kernel.org>
Johan Hovold <johan+linaro@kernel.org> writes:
> Always-on PM domains must be on during initialisation or the domain is
> currently silently rejected.
>
> Print an error message in case an always-on domain is not on to make it
> easier to debug drivers getting this wrong (e.g. by setting an always-on
> genpd flag without making sure that the state matches).
>
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Reviewed-by: Kevin Hilman <khilman@baylibre.com>
> ---
> drivers/base/power/domain.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
>
> Both myself and Matthias have hit this with the Qualcomm GCC drivers
> when updating static genpd flags directly instead of using/adding driver
> specific flags to propagate the setting.
>
> Johan
>
>
> diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
> index bbfbf05b3446..7200e307effb 100644
> --- a/drivers/base/power/domain.c
> +++ b/drivers/base/power/domain.c
> @@ -2087,8 +2087,10 @@ int pm_genpd_init(struct generic_pm_domain *genpd,
>
> /* Always-on domains must be powered on at initialization. */
> if ((genpd_is_always_on(genpd) || genpd_is_rpm_always_on(genpd)) &&
> - !genpd_status_on(genpd))
> + !genpd_status_on(genpd)) {
> + pr_err("always-on PM domain %s is not on\n", genpd->name);
> return -EINVAL;
> + }
>
> /* Multiple states but no governor doesn't make sense. */
> if (!gov && genpd->state_count > 1)
> --
> 2.35.1
next prev parent reply other threads:[~2022-09-29 23:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-29 15:42 [PATCH] PM: domains: log failures to register always-on domains Johan Hovold
2022-09-29 23:57 ` Kevin Hilman [this message]
2022-09-30 10:38 ` Ulf Hansson
2022-10-04 14:27 ` Rafael J. Wysocki
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=7h7d1lwx7y.fsf@baylibre.com \
--to=khilman@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=johan+linaro@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mka@chromium.org \
--cc=rafael@kernel.org \
--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