From: Thierry Reding <thierry.reding@gmail.com>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Jonathan Hunter <jonathanh@nvidia.com>,
Dmitry Osipenko <digetx@gmail.com>,
linux-pm@vger.kernel.org, linux-tegra@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 2/2] cpuidle: tegra: Check whether PMC is ready
Date: Wed, 11 Aug 2021 11:49:53 +0200 [thread overview]
Message-ID: <YROdQXO4aVLQ8DkP@orome.fritz.box> (raw)
In-Reply-To: <20210718212706.21659-3-digetx@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1352 bytes --]
On Mon, Jul 19, 2021 at 12:27:06AM +0300, Dmitry Osipenko wrote:
> Check whether PMC is ready before proceeding with the cpuidle registration.
> This fixes racing with the PMC driver probe order, which results in a
> disabled deepest CC6 idling state if cpuidle driver is probed before the
> PMC.
>
> Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
> ---
> drivers/cpuidle/cpuidle-tegra.c | 3 +++
> 1 file changed, 3 insertions(+)
Rafael, Daniel,
would you mind if I took this into the Tegra tree? It's got a dependency
on the PMC driver, which usually goes via the Tegra tree already, and
there's nothing cpuidle-specific in here, it's all Tegra-specific
integration quirks.
Thierry
>
> diff --git a/drivers/cpuidle/cpuidle-tegra.c b/drivers/cpuidle/cpuidle-tegra.c
> index 508bd9f23792..9845629aeb6d 100644
> --- a/drivers/cpuidle/cpuidle-tegra.c
> +++ b/drivers/cpuidle/cpuidle-tegra.c
> @@ -337,6 +337,9 @@ static void tegra_cpuidle_setup_tegra114_c7_state(void)
>
> static int tegra_cpuidle_probe(struct platform_device *pdev)
> {
> + if (tegra_pmc_get_suspend_mode() == TEGRA_SUSPEND_NOT_READY)
> + return -EPROBE_DEFER;
> +
> /* LP2 could be disabled in device-tree */
> if (tegra_pmc_get_suspend_mode() < TEGRA_SUSPEND_LP2)
> tegra_cpuidle_disable_state(TEGRA_CC6);
> --
> 2.32.0
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2021-08-11 9:47 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-18 21:27 [PATCH v1 0/2] Fix Tegra PMC driver racing with cpuidle driver Dmitry Osipenko
2021-07-18 21:27 ` [PATCH v1 1/2] soc/tegra: pmc: Prevent racing with cpuilde driver Dmitry Osipenko
2021-08-11 9:52 ` Thierry Reding
2021-07-18 21:27 ` [PATCH v1 2/2] cpuidle: tegra: Check whether PMC is ready Dmitry Osipenko
2021-08-11 9:49 ` Thierry Reding [this message]
2021-08-14 10:37 ` Daniel Lezcano
2021-08-14 13:45 ` Dmitry Osipenko
2021-08-16 9:53 ` Thierry Reding
2021-08-16 15:32 ` Dmitry Osipenko
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=YROdQXO4aVLQ8DkP@orome.fritz.box \
--to=thierry.reding@gmail.com \
--cc=daniel.lezcano@linaro.org \
--cc=digetx@gmail.com \
--cc=jonathanh@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=rjw@rjwysocki.net \
/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).