This is a note to let you know that I've just added the patch titled cpuidle: tegra: Check whether PMC is ready to the 5.10-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: cpuidle-tegra-check-whether-pmc-is-ready.patch and it can be found in the queue-5.10 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit 23c14eacbd57f267e348f8ade7d2e1da53825735 Author: Dmitry Osipenko <digetx@xxxxxxxxx> Date: Sun Sep 12 23:29:07 2021 +0300 cpuidle: tegra: Check whether PMC is ready [ Upstream commit bdb1ffdad3b73e4d0538098fc02e2ea87a6b27cd ] 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. Acked-by: Daniel Lezcano <daniel.lezcano@xxxxxxxxxx> Signed-off-by: Dmitry Osipenko <digetx@xxxxxxxxx> Signed-off-by: Thierry Reding <treding@xxxxxxxxxx> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/drivers/cpuidle/cpuidle-tegra.c b/drivers/cpuidle/cpuidle-tegra.c index 29c5e83500d33..e6f96d272d240 100644 --- a/drivers/cpuidle/cpuidle-tegra.c +++ b/drivers/cpuidle/cpuidle-tegra.c @@ -346,6 +346,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);