1. 04 3月, 2017 1 次提交
    • R
      cpufreq: intel_pstate: Do not use performance_limits in passive mode · 2bc756e7
      Rafael J. Wysocki 提交于
      Using performance_limits in the passive mode doesn't make
      sense, because in that mode the global limits are applied to the
      frequency selected by the scaling governor.
      
      The maximum and minimum P-state limits in performance_limits are both
      set to 100 percent which will put all CPUs into the turbo range
      regardless of what governor is used and what frequencies are
      selected by it (that is particularly undesirable on CPUs with the
      generic powersave governor attached).
      
      For this reason, make intel_pstate_register_driver() always point
      limits to powersave_limits in the passive mode.
      
      Fixes: 001c76f0 (cpufreq: intel_pstate: Generic governors support)
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      2bc756e7
  2. 28 2月, 2017 1 次提交
  3. 24 2月, 2017 1 次提交
  4. 16 2月, 2017 3 次提交
  5. 10 2月, 2017 2 次提交
  6. 09 2月, 2017 5 次提交
  7. 04 2月, 2017 10 次提交
  8. 30 1月, 2017 2 次提交
    • V
      PM / OPP: Update OPP users to put reference · 8a31d9d9
      Viresh Kumar 提交于
      This patch updates dev_pm_opp_find_freq_*() routines to get a reference
      to the OPPs returned by them.
      
      Also updates the users of dev_pm_opp_find_freq_*() routines to call
      dev_pm_opp_put() after they are done using the OPPs.
      
      As it is guaranteed the that OPPs wouldn't get freed while being used,
      the RCU read side locking present with the users isn't required anymore.
      Drop it as well.
      
      This patch also updates all users of devfreq_recommended_opp() which was
      returning an OPP received from the OPP core.
      
      Note that some of the OPP core routines have gained
      rcu_read_{lock|unlock}() calls, as those still use RCU specific APIs
      within them.
      Signed-off-by: NViresh Kumar <viresh.kumar@linaro.org>
      Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com> [Devfreq]
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      8a31d9d9
    • V
      PM / OPP: Return opp_table from dev_pm_opp_set_*() routines · fa30184d
      Viresh Kumar 提交于
      Now that we have proper kernel reference infrastructure in place for OPP
      tables, use it to guarantee that the OPP table isn't freed while being
      used by the callers of dev_pm_opp_set_*() APIs.
      
      Make them all return the pointer to the OPP table after taking its
      reference and put the reference back with dev_pm_opp_put_*() APIs.
      
      Now that the OPP table wouldn't get freed while these routines are
      executing after dev_pm_opp_get_opp_table() is called, there is no need
      to take opp_table_lock. Drop them as well.
      
      Remove the rcu specific comments from these routines as they aren't
      relevant anymore.
      
      Note that prototypes of dev_pm_opp_{set|put}_regulators() were already
      updated by another patch.
      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>
      fa30184d
  9. 27 1月, 2017 3 次提交
  10. 20 1月, 2017 1 次提交
  11. 05 1月, 2017 1 次提交
  12. 01 1月, 2017 3 次提交
  13. 27 12月, 2016 1 次提交
  14. 25 12月, 2016 1 次提交
  15. 21 12月, 2016 2 次提交
  16. 08 12月, 2016 2 次提交
    • S
      cpufreq: intel_pstate: Support for energy performance hints with HWP · 984edbdc
      Srinivas Pandruvada 提交于
      It is possible to provide hints to the HWP algorithms in the processor
      to be more performance centric to more energy centric. These hints are
      provided by using HWP energy performance preference (EPP) or energy
      performance bias (EPB) settings.
      
      The scope of these settings is per logical processor, which means that
      each of the logical processors in the package can be programmed with a
      different value.
      
      This change provides cpufreq sysfs interface to provide hint. For each
      policy, two additional attributes will be available to check and provide
      hint. These attributes will only be present when the intel_pstate driver
      is using HWP mode.
      
      These attributes are:
       - energy_performance_available_preferences
       - energy_performance_preference
      
      To get list of supported hints:
      $ cat energy_performance_available_preferences
      default performance balance_performance balance_power power
      
      The current preference can be read or changed via cpufreq sysfs
      attribute "energy_performance_preference". Reading from this attribute
      will display current effective setting changed via any method. User can
      write any of the valid preference string to this attribute. User can
      always restore to power-on default by writing "default".
      
      Implementation
      Since these hints can be provided by direct MSR write or using some tools
      like x86_energy_perf_policy, the driver internally doesn't maintain any
      state. The user operation will result in direct read/write of MSR: 0x774
      (HWP_REQUEST_MSR). Also driver use read modify write to update other
      fields in this MSR.
      
      Summary of changes:
       - struct cpudata field epp_saved is renamed to epp_powersave, as this
         stores the value to restore once policy is switched from performance
         to powersave to restore original powersave EPP value.
       - A new struct cpudata field epp_saved is used to store the raw MSR
         EPP/EPB value when a CPU goes offline or on suspend and restore on
         online/resume. This ensures that EPP value is restored to correct
         value irrespective of the means used to set.
       - EPP/EPB value ranges are fixed for each preference, which can be
         set for the cpufreq sysfs, so user request is mapped to/from this
         range.
       - New attributes are only added when HWP is present.
       - Since EPP value of 0 is valid the fields are initialized to
         -EINVAL when not valid. The field epp_default is read only once
         after powerup to avoid reading on subsequent CPU online operation
       - New suspend callback to store epp on suspend operation
       - Don't invalidate old epp_saved field on resume and online as now
         we can restore last epp value on suspend and this field can still
         have old EPP value sampled during switch to performance from
         powersave.
       - While here optimized setting of cpu_data->epp_powersave = epp in
         intel_pstate_hwp_set() as this was done in both true and false
         paths.
       - epp/epb set function returns error to caller on failure to pass
         on to user space for display.
      Signed-off-by: NSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      984edbdc
    • S
      cpufreq: intel_pstate: Add locking around HWP requests · b59fe540
      Srinivas Pandruvada 提交于
      To avoid race conditions from multiple threads, increase the scope
      of intel_pstate_limits_lock to include HWP requests also.
      Signed-off-by: NSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
      [ rjw: Subject ]
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      b59fe540
  17. 06 12月, 2016 1 次提交