1. 07 2月, 2018 1 次提交
  2. 22 11月, 2017 1 次提交
    • J
      cpufreq: Add Loongson machine dependencies · 0d307935
      James Hogan 提交于
      The MIPS loongson cpufreq drivers don't build unless configured for the
      correct machine type, due to dependency on machine specific architecture
      headers and symbols in machine specific platform code.
      
      More specifically loongson1-cpufreq.c uses RST_CPU_EN and RST_CPU,
      neither of which is defined in asm/mach-loongson32/regs-clk.h unless
      CONFIG_LOONGSON1_LS1B=y, and loongson2_cpufreq.c references
      loongson2_clockmod_table[], which is only defined in
      arch/mips/loongson64/lemote-2f/clock.c, i.e. when
      CONFIG_LEMOTE_MACH2F=y.
      
      Add these dependencies to Kconfig to avoid randconfig / allyesconfig
      build failures (e.g. when based on BMIPS which also has a cpufreq
      driver).
      Signed-off-by: NJames Hogan <jhogan@kernel.org>
      Acked-by: NViresh Kumar <viresh.kumar@linaro.org>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      0d307935
  3. 09 2月, 2017 2 次提交
  4. 04 2月, 2017 1 次提交
  5. 13 9月, 2016 1 次提交
  6. 17 8月, 2016 1 次提交
    • R
      cpufreq / sched: Pass flags to cpufreq_update_util() · 58919e83
      Rafael J. Wysocki 提交于
      It is useful to know the reason why cpufreq_update_util() has just
      been called and that can be passed as flags to cpufreq_update_util()
      and to the ->func() callback in struct update_util_data.  However,
      doing that in addition to passing the util and max arguments they
      already take would be clumsy, so avoid it.
      
      Instead, use the observation that the schedutil governor is part
      of the scheduler proper, so it can access scheduler data directly.
      This allows the util and max arguments of cpufreq_update_util()
      and the ->func() callback in struct update_util_data to be replaced
      with a flags one, but schedutil has to be modified to follow.
      
      Thus make the schedutil governor obtain the CFS utilization
      information from the scheduler and use the "RT" and "DL" flags
      instead of the special utilization value of ULONG_MAX to track
      updates from the RT and DL sched classes.  Make it non-modular
      too to avoid having to export scheduler variables to modules at
      large.
      
      Next, update all of the other users of cpufreq_update_util()
      and the ->func() callback in struct update_util_data accordingly.
      Suggested-by: NPeter Zijlstra <peterz@infradead.org>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Acked-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
      Acked-by: NViresh Kumar <viresh.kumar@linaro.org>
      58919e83
  7. 03 8月, 2016 1 次提交
  8. 03 6月, 2016 1 次提交
    • R
      cpufreq: stats: Make the stats code non-modular · 1aefc75b
      Rafael J. Wysocki 提交于
      The modularity of cpufreq_stats is quite problematic.
      
      First off, the usage of policy notifiers for the initialization
      and cleanup in the cpufreq_stats module is inherently racy with
      respect to CPU offline/online and the initialization and cleanup
      of the cpufreq driver.
      
      Second, fast frequency switching (used by the schedutil governor)
      cannot be enabled if any transition notifiers are registered, so
      if the cpufreq_stats module (that registers a transition notifier
      for updating transition statistics) is loaded, the schedutil governor
      cannot use fast frequency switching.
      
      On the other hand, allowing cpufreq_stats to be built as a module
      doesn't really add much value.  Arguably, there's not much reason
      for that code to be modular at all.
      
      For the above reasons, make the cpufreq stats code non-modular,
      modify the core to invoke functions provided by that code directly
      and drop the notifiers from it.
      
      Make the stats sysfs attributes appear empty if fast frequency
      switching is enabled as the statistics will not be updated in that
      case anyway (and returning -EBUSY from those attributes breaks
      powertop).
      
      While at it, clean up Kconfig help for the CPU_FREQ_STAT and
      CPU_FREQ_STAT_DETAILS options.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Acked-by: NViresh Kumar <viresh.kumar@linaro.org>
      1aefc75b
  9. 12 5月, 2016 1 次提交
  10. 07 5月, 2016 1 次提交
  11. 09 4月, 2016 1 次提交
  12. 02 4月, 2016 2 次提交
    • R
      cpufreq: schedutil: New governor based on scheduler utilization data · 9bdcb44e
      Rafael J. Wysocki 提交于
      Add a new cpufreq scaling governor, called "schedutil", that uses
      scheduler-provided CPU utilization information as input for making
      its decisions.
      
      Doing that is possible after commit 34e2c555 (cpufreq: Add
      mechanism for registering utilization update callbacks) that
      introduced cpufreq_update_util() called by the scheduler on
      utilization changes (from CFS) and RT/DL task status updates.
      In particular, CPU frequency scaling decisions may be based on
      the the utilization data passed to cpufreq_update_util() by CFS.
      
      The new governor is relatively simple.
      
      The frequency selection formula used by it depends on whether or not
      the utilization is frequency-invariant.  In the frequency-invariant
      case the new CPU frequency is given by
      
      	next_freq = 1.25 * max_freq * util / max
      
      where util and max are the last two arguments of cpufreq_update_util().
      In turn, if util is not frequency-invariant, the maximum frequency in
      the above formula is replaced with the current frequency of the CPU:
      
      	next_freq = 1.25 * curr_freq * util / max
      
      The coefficient 1.25 corresponds to the frequency tipping point at
      (util / max) = 0.8.
      
      All of the computations are carried out in the utilization update
      handlers provided by the new governor.  One of those handlers is
      used for cpufreq policies shared between multiple CPUs and the other
      one is for policies with one CPU only (and therefore it doesn't need
      to use any extra synchronization means).
      
      The governor supports fast frequency switching if that is supported
      by the cpufreq driver in use and possible for the given policy.
      In the fast switching case, all operations of the governor take
      place in its utilization update handlers.  If fast switching cannot
      be used, the frequency switch operations are carried out with the
      help of a work item which only calls __cpufreq_driver_target()
      (under a mutex) to trigger a frequency update (to a value already
      computed beforehand in one of the utilization update handlers).
      
      Currently, the governor treats all of the RT and DL tasks as
      "unknown utilization" and sets the frequency to the allowed
      maximum when updated from the RT or DL sched classes.  That
      heavy-handed approach should be replaced with something more
      subtle and specifically targeted at RT and DL tasks.
      
      The governor shares some tunables management code with the
      "ondemand" and "conservative" governors and uses some common
      definitions from cpufreq_governor.h, but apart from that it
      is stand-alone.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Acked-by: NViresh Kumar <viresh.kumar@linaro.org>
      Acked-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
      9bdcb44e
    • R
      cpufreq: governor: Move abstract gov_attr_set code to seperate file · 2d0c58ad
      Rafael J. Wysocki 提交于
      Move abstract code related to struct gov_attr_set to a separate (new)
      file so it can be shared with (future) goverernors that won't share
      more code with "ondemand" and "conservative".
      
      No intentional functional changes.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Acked-by: NViresh Kumar <viresh.kumar@linaro.org>
      2d0c58ad
  13. 09 3月, 2016 2 次提交
  14. 01 3月, 2016 1 次提交
  15. 19 3月, 2015 1 次提交
  16. 07 1月, 2015 1 次提交
    • P
      rcu: Make SRCU optional by using CONFIG_SRCU · 83fe27ea
      Pranith Kumar 提交于
      SRCU is not necessary to be compiled by default in all cases. For tinification
      efforts not compiling SRCU unless necessary is desirable.
      
      The current patch tries to make compiling SRCU optional by introducing a new
      Kconfig option CONFIG_SRCU which is selected when any of the components making
      use of SRCU are selected.
      
      If we do not select CONFIG_SRCU, srcu.o will not be compiled at all.
      
         text    data     bss     dec     hex filename
         2007       0       0    2007     7d7 kernel/rcu/srcu.o
      
      Size of arch/powerpc/boot/zImage changes from
      
         text    data     bss     dec     hex filename
       831552   64180   23944  919676   e087c arch/powerpc/boot/zImage : before
       829504   64180   23952  917636   e0084 arch/powerpc/boot/zImage : after
      
      so the savings are about ~2000 bytes.
      Signed-off-by: NPranith Kumar <bobby.prani@gmail.com>
      CC: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
      CC: Josh Triplett <josh@joshtriplett.org>
      CC: Lai Jiangshan <laijs@cn.fujitsu.com>
      Signed-off-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      [ paulmck: resolve conflict due to removal of arch/ia64/kvm/Kconfig. ]
      83fe27ea
  17. 18 11月, 2014 1 次提交
  18. 06 11月, 2014 2 次提交
  19. 03 10月, 2014 1 次提交
  20. 17 6月, 2014 1 次提交
  21. 11 6月, 2014 1 次提交
    • V
      cpufreq: cpufreq-cpu0: remove dependency on THERMAL and REGULATOR · 5fbfbcd3
      Viresh Kumar 提交于
      cpufreq-cpu0 uses thermal framework to register a cooling device, but doesn't
      depend on it as there are dummy calls provided by thermal layer when
      CONFIG_THERMAL=n. And when these calls fail, the driver is still usable.
      
      Similar explanation is valid for regulators as well. We do have dummy calls
      available for regulator APIs and the driver can work even when those calls
      fail.
      
      So, we don't really need to mention thermal and regulators as a dependency for
      cpufreq-cpu0 in Kconfig as platforms without support for thermal/regulator can
      also use this driver. Remove this dependency.
      Signed-off-by: NViresh Kumar <viresh.kumar@linaro.org>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      5fbfbcd3
  22. 01 3月, 2014 1 次提交
  23. 28 2月, 2014 1 次提交
  24. 17 1月, 2014 1 次提交
  25. 23 12月, 2013 1 次提交
  26. 04 12月, 2013 1 次提交
    • E
      cpufreq: cpufreq-cpu0: add dt node parsing for cooling device properties · 77cff592
      Eduardo Valentin 提交于
      This patch changes the cpufreq-cpu0 driver to consider if
      a cpu needs cooling (with cpufreq). In case the cooling is needed,
      the cpu0 device tree node needs to be properly configured
      with cooling device properties.
      
      In case these properties are present,, the driver will
      load a cpufreq cooling device in the system. The cpufreq-cpu0
      driver is not interested in determining how the system should
      be using the cooling device. The driver is responsible
      only of loading the cooling device.
      
      Describing how the cooling device will be used can be
      accomplished by setting up a thermal zone that references
      and is composed by the cpufreq cooling device.
      
      Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
      Cc: Grant Likely <grant.likely@linaro.org>
      Cc: Rob Herring <rob.herring@calxeda.com>
      Cc: cpufreq@vger.kernel.org
      Cc: linux-pm@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Cc: devicetree-discuss@lists.ozlabs.org
      Acked-by: NViresh Kumar <viresh.kumar@linaro.org>
      Signed-off-by: NEduardo Valentin <eduardo.valentin@ti.com>
      77cff592
  27. 16 10月, 2013 2 次提交
  28. 12 5月, 2013 1 次提交
  29. 10 4月, 2013 5 次提交
  30. 02 2月, 2013 1 次提交
  31. 03 1月, 2013 1 次提交
    • L
      cpufreq / governor: Fix problem with cpufreq_ondemand or cpufreq_conservative · 1e15f295
      Larry Finger 提交于
      Since commit 2aacdfff entitled "cpufreq: Move common part from governors
      to separate file", whenever the drivers that depend on this new file
      (cpufreq_ondemand or cpufreq_conservative) are built as modules, a new
      module named cpufreq_governor is created because the Makefile includes
      cpufreq_governor.o twice. As drivers/cpufreq/cpufreq_governor.c contains no
      MODULE directives, the resulting module has no license specified, which
      results in logging of a "module license 'unspecified' taints kernel". In
      addition, a number of globals are exported GPL only, and are therefore
      not available. This fix establishes a new boolean configuration variable
      that forces cpufreq_governor.o to be linked into the kernel whenever
      either cpufreq_ondemand or cpufreq_conservative is selected.
      Signed-off-by: NLarry Finger <Larry.Finger@lwfinger.net>
      Reviewed-by: NViresh Kumar <viresh.kumar@linaro.org>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      1e15f295