• Rafael J. Wysocki's avatar
    cpufreq: Introduce CPUFREQ_NEED_UPDATE_LIMITS driver flag · 1c534352
    Rafael J. Wysocki authored
    Generally, a cpufreq driver may need to update some internal upper
    and lower frequency boundaries on policy max and min changes,
    respectively, but currently this does not work if the target
    frequency does not change along with the policy limit.
    
    Namely, if the target frequency does not change along with the
    policy min or max, the "target_freq == policy->cur" check in
    __cpufreq_driver_target() prevents driver callbacks from being
    invoked and they do not even have a chance to update the
    corresponding internal boundary.
    
    This particularly affects the "powersave" and "performance"
    governors that always set the target frequency to one of the
    policy limits and it never changes when the other limit is updated.
    
    To allow cpufreq the drivers needing to update internal frequency
    boundaries on policy limits changes to avoid this issue, introduce
    a new driver flag, CPUFREQ_NEED_UPDATE_LIMITS, that (when set) will
    neutralize the check mentioned above.
    Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
    Acked-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
    1c534352
cpufreq.c 73.1 KB