Commit 2b8d5947 authored by Ulf Hansson's avatar Ulf Hansson Committed by Rafael J. Wysocki
Browse files

cpuidle: 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 common governor helper
cpuidle_governor_latency_req(), to take the constraint into account.

Reviewed-by: default avatarDhruva Gole <d-gole@ti.com>
Reviewed-by: default avatarKevin Hilman (TI) <khilman@baylibre.com>
Tested-by: default avatarKevin Hilman (TI) <khilman@baylibre.com>
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
Link: https://patch.msgid.link/20251125112650.329269-6-ulf.hansson@linaro.org


Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 99b42445
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -111,6 +111,10 @@ s64 cpuidle_governor_latency_req(unsigned int cpu)
	struct device *device = get_cpu_device(cpu);
	int device_req = dev_pm_qos_raw_resume_latency(device);
	int global_req = cpu_latency_qos_limit();
	int global_wake_req = cpu_wakeup_latency_qos_limit();

	if (global_req > global_wake_req)
		global_req = global_wake_req;

	if (device_req > global_req)
		device_req = global_req;