cpufreq: governor: No need to manage state machine now
authorViresh Kumar <viresh.kumar@linaro.org>
Thu, 11 Feb 2016 12:01:14 +0000 (17:31 +0530)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 9 Mar 2016 13:41:01 +0000 (14:41 +0100)
commit581c214b21e4faba06d913952e38e80635d9ada5
tree73d7d025dd49f268caf78c88d3f6dab1e29dc44a
parent99522fe6788f5bf627dce7c20ed9484c933511a3
cpufreq: governor: No need to manage state machine now

The cpufreq core now guarantees that policy->rwsem won't be dropped
while running the ->governor callback for the CPUFREQ_GOV_POLICY_EXIT
event and will be held acquired until the complete sequence of governor
state changes has finished.

This allows governor state machine checks to be dropped from multiple
functions in cpufreq_governor.c.

This also means that policy_dbs->policy can be initialized upfront, so
the entire initialization of struct policy_dbs can be carried out in
one place.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Tested-by: Juri Lelli <juri.lelli@arm.com>
Tested-by: Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com>
[ rjw: Changelog ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/cpufreq_governor.c