summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlf Hansson <ulf.hansson@linaro.org>2025-11-25 12:26:44 +0100
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2025-11-25 19:01:29 +0100
commite2e4695f015eacbe11178540524438f631ba9413 (patch)
treeca6a86f8edd8f35f1762c5cd60fd74cb10bb00e1
parent8e7de6dc420979f4e4443807b71dcc8b72d8c4a9 (diff)
pmdomain: Respect the CPU system wakeup QoS limit for cpuidle
The CPU system wakeup QoS limit must be respected for the regular cpuidle state selection. Therefore, let's extend the genpd governor for CPUs to take the constraint into account when it selects a domain idle state for the corresponding PM domain. Reviewed-by: Dhruva Gole <d-gole@ti.com> Reviewed-by: Kevin Hilman (TI) <khilman@baylibre.com> Tested-by: Kevin Hilman (TI) <khilman@baylibre.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Link: https://patch.msgid.link/20251125112650.329269-4-ulf.hansson@linaro.org Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r--drivers/pmdomain/governor.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/pmdomain/governor.c b/drivers/pmdomain/governor.c
index bd1b9d66d4a5..05e68680f34b 100644
--- a/drivers/pmdomain/governor.c
+++ b/drivers/pmdomain/governor.c
@@ -351,7 +351,7 @@ static bool cpu_power_down_ok(struct dev_pm_domain *pd)
ktime_t domain_wakeup, next_hrtimer;
ktime_t now = ktime_get();
struct device *cpu_dev;
- s64 cpu_constraint, global_constraint;
+ s64 cpu_constraint, global_constraint, wakeup_constraint;
s64 idle_duration_ns;
int cpu, i;
@@ -362,7 +362,11 @@ static bool cpu_power_down_ok(struct dev_pm_domain *pd)
if (!(genpd->flags & GENPD_FLAG_CPU_DOMAIN))
return true;
+ wakeup_constraint = cpu_wakeup_latency_qos_limit();
global_constraint = cpu_latency_qos_limit();
+ if (global_constraint > wakeup_constraint)
+ global_constraint = wakeup_constraint;
+
/*
* Find the next wakeup for any of the online CPUs within the PM domain
* and its subdomains. Note, we only need the genpd->cpus, as it already