linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Ulf Hansson <ulf.hansson@linaro.org>
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	 Mark Rutland <mark.rutland@arm.com>,
	Lorenzo Pieralisi <lpieralisi@kernel.org>,
	linux-pm@vger.kernel.org,  linux-arm-kernel@lists.infradead.org,
	linux-arm-msm@vger.kernel.org
Subject: Re: [PATCH v2] firmware/psci: Print a warning if PSCI doesn't accept PC mode
Date: Fri, 5 Aug 2022 16:16:37 +0200	[thread overview]
Message-ID: <CAPDyKFrqxUS7HHcYRatqpnH9FyG5BSQX2KLsSJ-sPXSENpNzug@mail.gmail.com> (raw)
In-Reply-To: <20220804130750.3706897-1-dmitry.baryshkov@linaro.org>

On Thu, 4 Aug 2022 at 15:07, Dmitry Baryshkov
<dmitry.baryshkov@linaro.org> wrote:
>
> The function psci_pd_try_set_osi_mode() will print an error if enabling
> OSI mode fails. To ease debugging PSCI issues print corresponding
> message if switching to PC mode fails too.
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>

Seems reasonable to me!

Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>

Kind regards
Uffe

> ---
> This is a replacement for [1], now moving the warning from
> psci_set_osi_mode() callers to the function iself.
>
> https://lore.kernel.org/all/20220727182034.983727-1-dmitry.baryshkov@linaro.org/
>
> ---
>  drivers/cpuidle/cpuidle-psci-domain.c | 4 +---
>  drivers/firmware/psci/psci.c          | 2 ++
>  2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/cpuidle/cpuidle-psci-domain.c b/drivers/cpuidle/cpuidle-psci-domain.c
> index 3db4fca1172b..821984947ed9 100644
> --- a/drivers/cpuidle/cpuidle-psci-domain.c
> +++ b/drivers/cpuidle/cpuidle-psci-domain.c
> @@ -124,10 +124,8 @@ static bool psci_pd_try_set_osi_mode(void)
>                 return false;
>
>         ret = psci_set_osi_mode(true);
> -       if (ret) {
> -               pr_warn("failed to enable OSI mode: %d\n", ret);
> +       if (ret)
>                 return false;
> -       }
>
>         return true;
>  }
> diff --git a/drivers/firmware/psci/psci.c b/drivers/firmware/psci/psci.c
> index cfb448eabdaa..1628f1edef4a 100644
> --- a/drivers/firmware/psci/psci.c
> +++ b/drivers/firmware/psci/psci.c
> @@ -163,6 +163,8 @@ int psci_set_osi_mode(bool enable)
>                         PSCI_1_0_SUSPEND_MODE_PC;
>
>         err = invoke_psci_fn(PSCI_1_0_FN_SET_SUSPEND_MODE, suspend_mode, 0, 0);
> +       if (err < 0)
> +               pr_warn("failed to set %s mode: %d\n", enable ? "OSI" : "PC", err);
>         return psci_to_linux_errno(err);
>  }
>
> --
> 2.35.1
>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2022-08-05 14:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-04 13:07 [PATCH v2] firmware/psci: Print a warning if PSCI doesn't accept PC mode Dmitry Baryshkov
2022-08-05 14:16 ` Ulf Hansson [this message]
2022-08-05 14:19 ` Mark Rutland
2022-09-19 11:58   ` Dmitry Baryshkov
2022-09-21 14:36     ` Sudeep Holla
2022-09-21 14:43       ` Dmitry Baryshkov
2022-08-05 15:50 ` Sudeep Holla

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=CAPDyKFrqxUS7HHcYRatqpnH9FyG5BSQX2KLsSJ-sPXSENpNzug@mail.gmail.com \
    --to=ulf.hansson@linaro.org \
    --cc=daniel.lezcano@linaro.org \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=lpieralisi@kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=rafael@kernel.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;
as well as URLs for NNTP newsgroup(s).