summaryrefslogtreecommitdiff
path: root/drivers/cpuidle/cpuidle-psci-domain.c
diff options
context:
space:
mode:
authorUlf Hansson <ulf.hansson@linaro.org>2025-03-14 11:00:57 +0100
committerUlf Hansson <ulf.hansson@linaro.org>2025-04-23 10:08:34 +0200
commitd0252ba821a3076615b34c1107854f8ff31ecd2e (patch)
tree6876a9eb3f3fbad608f383a1f787e5159cabd6ed /drivers/cpuidle/cpuidle-psci-domain.c
parent3290e9f98a2d3c43c0c9b89a73affa3aaebe62a3 (diff)
cpuidle: psci: Correct the domain-idlestate statistics in debugfs
When trying to enter a domain-idlestate, we may occasionally fail to enter the state, which is informed to us by psci_cpu_suspend_enter() returning an error-code. In these cases, our corresponding genpd->power_off() callback has already returned zero to indicate success, leading to getting in-correct domain-idlestate statistics in debugfs for the genpd in question. Let's fix this by making use of the new pm_genpd_inc_rejected() helper, as it allows us to correct the domain-idlestate statistics for this type of scenario. Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Link: https://lore.kernel.org/r/20250314100103.1294715-4-ulf.hansson@linaro.org
Diffstat (limited to 'drivers/cpuidle/cpuidle-psci-domain.c')
-rw-r--r--drivers/cpuidle/cpuidle-psci-domain.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/cpuidle/cpuidle-psci-domain.c b/drivers/cpuidle/cpuidle-psci-domain.c
index 5fb5228f6bf1..2041f59116ce 100644
--- a/drivers/cpuidle/cpuidle-psci-domain.c
+++ b/drivers/cpuidle/cpuidle-psci-domain.c
@@ -43,7 +43,7 @@ static int psci_pd_power_off(struct generic_pm_domain *pd)
/* OSI mode is enabled, set the corresponding domain state. */
pd_state = state->data;
- psci_set_domain_state(*pd_state);
+ psci_set_domain_state(pd, pd->state_idx, *pd_state);
return 0;
}