• Rafael J. Wysocki's avatar
    cpufreq: intel_pstate: Do not walk policy->cpus · 2bfc4cbb
    Rafael J. Wysocki authored
    intel_pstate_hwp_set() is the only function walking policy->cpus
    in intel_pstate.  The rest of the code simply assumes one CPU per
    policy, including the initialization code.
    
    Therefore it doesn't make sense for intel_pstate_hwp_set() to
    walk policy->cpus as it is guaranteed to have only one bit set
    for policy->cpu.
    
    For this reason, rearrange intel_pstate_hwp_set() to take the CPU
    number as the argument and drop the loop over policy->cpus from it.
    Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
    2bfc4cbb
intel_pstate.c 64.8 KB