• V
    PM / OPP: Move away from RCU locking · 052c6f19
    Viresh Kumar 提交于
    The RCU locking isn't well suited for the OPP core. The RCU locking fits
    better for reader heavy stuff, while the OPP core have at max one or two
    readers only at a time.
    
    Over that, it was getting very confusing the way RCU locking was used
    with the OPP core. The individual OPPs are mostly well handled, i.e. for
    an update a new structure was created and then that replaced the older
    one. But the OPP tables were updated directly all the time from various
    parts of the core. Though they were mostly used from within RCU locked
    region, they didn't had much to do with RCU and were governed by the
    mutex instead.
    
    And that mixed with the 'opp_table_lock' has made the core even more
    confusing.
    
    Now that we are already managing the OPPs and the OPP tables with kernel
    reference infrastructure, we can get rid of RCU locking completely and
    simplify the code a lot.
    
    Remove all RCU references from code and comments.
    
    Acquire opp_table->lock while parsing the list of OPPs though.
    Signed-off-by: NViresh Kumar <viresh.kumar@linaro.org>
    Reviewed-by: NStephen Boyd <sboyd@codeaurora.org>
    Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
    052c6f19
cpu.c 6.0 KB