aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/idle_inject.h
diff options
context:
space:
mode:
authorDaniel Lezcano <daniel.lezcano@linaro.org>2020-04-29 12:36:39 +0200
committerDaniel Lezcano <daniel.lezcano@linaro.org>2020-05-19 12:54:05 +0200
commit333cff6c963fbc8b9820ca2b6a8b2e22a572cd43 (patch)
tree270067d377010903156d0a116f5c12b73350a12f /include/linux/idle_inject.h
parentthermal/drivers/ti-soc-thermal: Avoid dereferencing ERR_PTR (diff)
downloadwireguard-linux-333cff6c963fbc8b9820ca2b6a8b2e22a572cd43.tar.xz
wireguard-linux-333cff6c963fbc8b9820ca2b6a8b2e22a572cd43.zip
powercap/drivers/idle_inject: Specify idle state max latency
Currently the idle injection framework uses the play_idle() function which puts the current CPU in an idle state. The idle state is the deepest one, as specified by the latency constraint when calling the subsequent play_idle_precise() function with the INT_MAX. The idle_injection is used by the cpuidle_cooling device which computes the idle / run duration to mitigate the temperature by injecting idle cycles. The cooling device has no control on the depth of the idle state. Allow finer control of the idle injection mechanism by allowing to specify the latency for the idle state. Thus the cooling device has the ability to have a guarantee on the exit latency of the idle states it is injecting. Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Reviewed-by: Amit Kucheria <amit.kucheria@linaro.org> Link: https://lore.kernel.org/r/20200429103644.5492-1-daniel.lezcano@linaro.org
Diffstat (limited to 'include/linux/idle_inject.h')
-rw-r--r--include/linux/idle_inject.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/idle_inject.h b/include/linux/idle_inject.h
index a445cd1a36c5..91a8612b8bf9 100644
--- a/include/linux/idle_inject.h
+++ b/include/linux/idle_inject.h
@@ -26,4 +26,8 @@ void idle_inject_set_duration(struct idle_inject_device *ii_dev,
void idle_inject_get_duration(struct idle_inject_device *ii_dev,
unsigned int *run_duration_us,
unsigned int *idle_duration_us);
+
+void idle_inject_set_latency(struct idle_inject_device *ii_dev,
+ unsigned int latency_ns);
+
#endif /* __IDLE_INJECT_H__ */