Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 02018626 authored by Dmitry Torokhov's avatar Dmitry Torokhov Committed by Amit Pundir
Browse files

cpufreq: interactive: fix policy locking

cpufreq_interactive_speedchange_task() is running as a separate kernel
thread and is calling __cpufreq_driver_target(), which requires callers
to hold policy->rwsem for writing to prevent racing with other parts of
the kernel trying to adjust the frequency, for example kernel thermal
throttling. Let's change the code to take policy->rwsem and while at it
refactor the code a bit.

This was originally 2 changes reviewed at:
	https://chromium-review.googlesource.com/246273
	https://chromium-review.googlesource.com/256120



Change-Id: Icc2d97c6c1b929acd2ee32e8c81d81fd2af778ab
Signed-off-by: default avatarDmitry Torokhov <dtor@chromium.org>
Reviewed-by: default avatarDylan Reid <dgreid@chromium.org>
Reviewed-by: default avatarDouglas Anderson <dianders@chromium.org>
Signed-off-by: default avatarDmitry Torokhov <dtor@google.com>
parent 73a20ae3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment