Skip to content
  • Rafael J. Wysocki's avatar
    cpufreq: intel_pstate: Fix intel_cpufreq_verify_policy() · 7f17326f
    Rafael J. Wysocki authored
    The intel_pstate_update_perf_limits() called from
    intel_cpufreq_verify_policy() may cause global P-state limits
    to change which is generally confusing and unnecessary.
    
    In the passive mode the global limits are only applied to the
    frequency selected by the scaling governor (they are not taken
    into account by governors when making decisions anyway), so making
    them follow the per-policy limits serves no purpose and may go
    against user expectations (as it generally causes the global
    attributes in sysfs to change even though they have not been
    written to in some cases).
    
    Fix that by dropping the intel_pstate_update_perf_limits()
    invocation from intel_cpufreq_verify_policy() (which also
    reduces the code size by a few lines).
    
    This change does not affect the per-CPU limits case, because those
    limits allow any P-state to be set by default in the passive mode
    and it removes the only piece of code updating them in that mode,
    so the per-policy settings will be the only ones taken into account
    in that case as expected.
    
    Fixes: 001c76f0
    
     (cpufreq: intel_pstate: Generic governors support)
    Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
    7f17326f