Skip to content
Snippets Groups Projects
Commit 9ef0ad49 authored by Liao Chang's avatar Liao Chang Committed by Rafael J. Wysocki
Browse files

cpufreq: userspace: Move is_managed indicator into per-policy structure


The userspace governor uses the 'cpu' field of cpufreq_policy structure
to track if it is allowed to set the speed of the policy.

However, there is a window where the 'cpu' field is equal to the value
of nr_cpus_id when all affected CPUs of policy are offline, which is an
illegal value to get the per-CPU variable.

To avoid this issue, modify the governor to use a per-policy indicator
to track if the policy is managed.

Signed-off-by: default avatarLiao Chang <liaochang1@huawei.com>
Acked-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
[ rjw: Changelog edits ]
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 285189c5
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment