1. 23 3月, 2016 1 次提交
    • S
      cpufreq: powernv: Add sysfs attributes to show throttle stats · 1b028984
      Shilpasri G Bhat 提交于
      Create sysfs attributes to export throttle information in
      /sys/devices/system/cpu/cpuX/cpufreq/throttle_stats directory. The
      newly added sysfs files are as follows:
      
       1)/sys/devices/system/cpu/cpuX/cpufreq/throttle_stats/turbo_stat
       2)/sys/devices/system/cpu/cpuX/cpufreq/throttle_stats/sub-turbo_stat
       3)/sys/devices/system/cpu/cpuX/cpufreq/throttle_stats/unthrottle
       4)/sys/devices/system/cpu/cpuX/cpufreq/throttle_stats/powercap
       5)/sys/devices/system/cpu/cpuX/cpufreq/throttle_stats/overtemp
       6)/sys/devices/system/cpu/cpuX/cpufreq/throttle_stats/supply_fault
       7)/sys/devices/system/cpu/cpuX/cpufreq/throttle_stats/overcurrent
       8)/sys/devices/system/cpu/cpuX/cpufreq/throttle_stats/occ_reset
      
      Detailed explanation of each attribute is added to
      Documentation/ABI/testing/sysfs-devices-system-cpu
      Signed-off-by: NShilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com>
      Acked-by: NViresh Kumar <viresh.kumar@linaro.org>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      1b028984
  2. 22 3月, 2016 1 次提交
  3. 27 2月, 2016 1 次提交
  4. 05 2月, 2016 4 次提交
  5. 17 12月, 2015 1 次提交
  6. 26 9月, 2015 1 次提交
  7. 01 9月, 2015 1 次提交
  8. 28 7月, 2015 5 次提交
  9. 02 4月, 2015 1 次提交
    • S
      cpufreq: powernv: Report cpu frequency throttling · 09a972d1
      Shilpasri G Bhat 提交于
      The power and thermal safety of the system is taken care by an
      On-Chip-Controller (OCC) which is real-time subsystem embedded within
      the POWER8 processor. OCC continuously monitors the memory and core
      temperature, the total system power, state of power supply and fan.
      
      The cpu frequency can be throttled by OCC for the following reasons:
      1)If a processor crosses its power and temperature limit then OCC will
        lower its Pmax to reduce the frequency and voltage.
      2)If OCC crashes then the system is forced to Psafe frequency.
      3)If OCC fails to recover then the kernel is not allowed to do any
        further frequency changes and the chip will remain in Psafe.
      
      The user can see a drop in performance when frequency is throttled and
      is unaware of throttling. So detect and report such a condition, so
      the user can check the OCC status to reboot the system or check for
      power supply or fan failures.
      
      The current status of the core is read from Power Management Status
      Register(PMSR) to check if any of the throttling condition is occurred
      and the appropriate throttling message is reported.
      Signed-off-by: NShilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com>
      Reviewed-by: NPreeti U Murthy <preeti@linux.vnet.ibm.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      09a972d1
  10. 29 9月, 2014 2 次提交
  11. 05 8月, 2014 1 次提交
  12. 17 5月, 2014 1 次提交
  13. 22 4月, 2014 1 次提交
  14. 07 4月, 2014 2 次提交
    • G
      cpufreq: powernv: Use cpufreq_frequency_table.driver_data to store pstate ids · 0692c691
      Gautham R. Shenoy 提交于
      The .driver_data field in the cpufreq_frequency_table was supposed to
      be private to the drivers. However at some later point, it was being
      used to indicate if the particular frequency in the table is the
      BOOST_FREQUENCY. After patches [1] and [2], the .driver_data is once
      again private to the driver. Thus we can safely use
      cpufreq_frequency_table.driver_data to store pstate_ids instead of
      having to maintain a separate array powernv_pstate_ids[] for this
      purpose.
      
      [1]:
        Subject: cpufreq: don't print value of .driver_data from core
        From   : Viresh Kumar <viresh.kumar@ linaro.org>
        url    : http://marc.info/?l=linux-pm&m=139601421504709&w=2
      
      [2]:
        Subject: cpufreq: create another field .flags in cpufreq_frequency_table
        From   : Viresh Kumar <viresh.kumar@linaro.org>
        url    : http://marc.info/?l=linux-pm&m=139601416804702&w=2Signed-off-by: NGautham R. Shenoy <ego@linux.vnet.ibm.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      0692c691
    • V
      cpufreq: powernv: cpufreq driver for powernv platform · b3d627a5
      Vaidyanathan Srinivasan 提交于
      Backend driver to dynamically set voltage and frequency on
      IBM POWER non-virtualized platforms.  Power management SPRs
      are used to set the required PState.
      
      This driver works in conjunction with cpufreq governors
      like 'ondemand' to provide a demand based frequency and
      voltage setting on IBM POWER non-virtualized platforms.
      
      PState table is obtained from OPAL v3 firmware through device
      tree.
      
      powernv_cpufreq back-end driver would parse the relevant device-tree
      nodes and initialise the cpufreq subsystem on powernv platform.
      
      The code was originally written by svaidy@linux.vnet.ibm.com. Over
      time it was modified to accomodate bug-fixes as well as updates to the
      the cpu-freq core. Relevant portions of the change logs corresponding
      to those modifications are noted below:
      
       * The policy->cpus needs to be populated in a hotplug-invariant
         manner instead of using cpu_sibling_mask() which varies with
         cpu-hotplug. This is because the cpufreq core code copies this
         content into policy->related_cpus mask which should not vary on
         cpu-hotplug. [Authored by srivatsa.bhat@linux.vnet.ibm.com]
      
       * Create a helper routine that can return the cpu-frequency for the
         corresponding pstate_id. Also, cache the values of the pstate_max,
         pstate_min and pstate_nominal and nr_pstates in a static structure
         so that they can be reused in the future to perform any
         validations. [Authored by ego@linux.vnet.ibm.com]
      
       * Create a driver attribute named cpuinfo_nominal_freq which creates
         a sysfs read-only file named cpuinfo_nominal_freq. Export the
         frequency corresponding to the nominal_pstate through this
         interface.
      
           Nominal frequency is the highest non-turbo frequency for the
         platform.  This is generally used for setting governor policies
         from user space for optimal energy efficiency. [Authored by
         ego@linux.vnet.ibm.com]
      
       * Implement a powernv_cpufreq_get(unsigned int cpu) method which will
         return the current operating frequency. Export this via the sysfs
         interface cpuinfo_cur_freq by setting powernv_cpufreq_driver.get to
         powernv_cpufreq_get(). [Authored by ego@linux.vnet.ibm.com]
      
      [Change log updated by ego@linux.vnet.ibm.com]
      Reviewed-by: NPreeti U Murthy <preeti@linux.vnet.ibm.com>
      Signed-off-by: NVaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
      Signed-off-by: NSrivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
      Signed-off-by: NAnton Blanchard <anton@samba.org>
      Signed-off-by: NGautham R. Shenoy <ego@linux.vnet.ibm.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      b3d627a5