1. 18 Feb, 2019 5 commits
  2. 14 Feb, 2019 1 commit
  3. 13 Feb, 2019 2 commits
    • Erwan Velu's avatar
      cpufreq: intel_pstate: Add reasons for failure and debug messages · 076b862c
      Erwan Velu authored
      The init code path has several exceptions where the driver can
      decide not to load.
      
      As CONFIG_X86_INTEL_PSTATE is generally set to Y, the return code is
      not reachable.  The initialization code is neither verbose of the
      reason why it did choose to prematurely exit, so it is difficult for
      a user to determine, on a given platform, why the driver didn't load
      properly.
      
      This patch is about reporting to the user the reason/context of why
      the driver failed to load.  That is a precious hint when debugging
      a platform.
      Signed-off-by: default avatarErwan Velu <e.velu@criteo.com>
      [ rjw: Subject & changelog, minor fixups ]
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      076b862c
    • Rafael J. Wysocki's avatar
      Merge branch 'cpufreq/arm/linux-next' of... · b53c7348
      Rafael J. Wysocki authored
      Merge branch 'cpufreq/arm/linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm into pm-cpufreq
      
      Pull ARM cpufreq driver updates for v5.1 from Viresh Kumar:
      
      "This pull request contains following changes:
      
       - New Armada 8k cpufreq driver (Gregory CLEMENT).
       - qcom driver cleanups (Amit Kucheria, Taniya Das, Yangtao Li).
       - s5pv210 driver cleanup (Paweł Chmiel).
       - tegra driver cleanup (Yangtao Li).
       - Minor update to MAINTAINERS file (Baruch Siach)."
      
      * 'cpufreq/arm/linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm:
        cpufreq: qcom-hw: Register an Energy Model
        cpufreq: qcom: Read voltage LUT and populate OPP
        cpufreq: qcom-hw: Move to device_initcall
        cpufreq: tegra124: add missing of_node_put()
        cpufreq: qcom-kryo: make some variables static
        MAINTAINERS: Update the active pm tree for ARM
        cpufreq: ap806: add cpufreq driver for Armada 8K
        MAINTAINERS: add new entries for Armada 8K cpufreq driver
        cpufreq: s5pv210: Defer probe if getting regulators fail
        MAINTAINERS: use common indentation
        PM / OPP: Introduce a power estimation helper
        PM / OPP: Remove unused parameter of _generic_set_opp_clk_only()
      b53c7348
  4. 12 Feb, 2019 2 commits
    • Viresh Kumar's avatar
      cpufreq: dt: Implement online/offline() callbacks · 263abfe7
      Viresh Kumar authored
      Implement the light-weight tear down and bring up helpers to reduce the
      amount of work to do on CPU offline/online operation.
      Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      263abfe7
    • Viresh Kumar's avatar
      cpufreq: Allow light-weight tear down and bring up of CPUs · 91a12e91
      Viresh Kumar authored
      The cpufreq core doesn't remove the cpufreq policy anymore on CPU
      offline operation, rather that happens when the CPU device gets
      unregistered from the kernel. This allows faster recovery when the CPU
      comes back online. This is also very useful during system wide
      suspend/resume where we offline all non-boot CPUs during suspend and
      then bring them back on resume.
      
      This commit takes the same idea a step ahead to allow drivers to do
      light weight tear-down and bring-up during CPU offline and online
      operations.
      
      A new set of callbacks is introduced, online/offline(). online() gets
      called when the first CPU of an inactive policy is brought up and
      offline() gets called when all the CPUs of a policy are offlined.
      
      The existing init/exit() callback get called on policy
      creation/destruction. They also get called instead of online/offline()
      callbacks if the online/offline() callbacks aren't provided.
      
      This also moves around some code to get executed only for the new-policy
      case going forward.
      Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      91a12e91
  5. 08 Feb, 2019 5 commits
  6. 07 Feb, 2019 9 commits
  7. 01 Feb, 2019 2 commits
  8. 30 Jan, 2019 8 commits
  9. 29 Jan, 2019 2 commits
    • Amit Kucheria's avatar
      thermal: cpu_cooling: Require thermal core to be compiled in · afa1f2ab
      Amit Kucheria authored
      The CPU cooling driver (cpu_cooling.c) allows the platform's cpufreq
      driver to register as a cooling device and cool down the platform by
      throttling the CPU frequency. In order to be able to auto-register a
      cpufreq driver as a cooling device from the cpufreq core, we need access
      to code inside cpu_cooling.c which, in turn, accesses code inside
      thermal core.
      
      CPU_FREQ is a bool while THERMAL is tristate.  In some configurations
      (e.g. allmodconfig), CONFIG_THERMAL ends up as a module while
      CONFIG_CPU_FREQ is compiled in. This leads to following error:
      
      drivers/cpufreq/cpufreq.o: In function `cpufreq_offline':
      cpufreq.c:(.text+0x407c): undefined reference to `cpufreq_cooling_unregister'
      drivers/cpufreq/cpufreq.o: In function `cpufreq_online':
      cpufreq.c:(.text+0x70c0): undefined reference to `of_cpufreq_cooling_register'
      
      Given that platforms using CPU_THERMAL usually want it compiled-in so it
      is available early in boot, make CPU_THERMAL depend on THERMAL being
      compiled-in instead of allowing it to be a module.
      
      As a result of this change, get rid of the ugly (!CPU_THERMAL ||
      THERMAL) dependency in all cpufreq drivers using CPU_THERMAL.
      Suggested-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Signed-off-by: default avatarAmit Kucheria <amit.kucheria@linaro.org>
      Acked-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      afa1f2ab
    • Viresh Kumar's avatar
      cpufreq: Use struct kobj_attribute instead of struct global_attr · 625c85a6
      Viresh Kumar authored
      The cpufreq_global_kobject is created using kobject_create_and_add()
      helper, which assigns the kobj_type as dynamic_kobj_ktype and show/store
      routines are set to kobj_attr_show() and kobj_attr_store().
      
      These routines pass struct kobj_attribute as an argument to the
      show/store callbacks. But all the cpufreq files created using the
      cpufreq_global_kobject expect the argument to be of type struct
      attribute. Things work fine currently as no one accesses the "attr"
      argument. We may not see issues even if the argument is used, as struct
      kobj_attribute has struct attribute as its first element and so they
      will both get same address.
      
      But this is logically incorrect and we should rather use struct
      kobj_attribute instead of struct global_attr in the cpufreq core and
      drivers and the show/store callbacks should take struct kobj_attribute
      as argument instead.
      
      This bug is caught using CFI CLANG builds in android kernel which
      catches mismatch in function prototypes for such callbacks.
      Reported-by: default avatarDonghee Han <dh.han@samsung.com>
      Reported-by: default avatarSangkyu Kim <skwith.kim@samsung.com>
      Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      625c85a6
  10. 21 Jan, 2019 1 commit
  11. 15 Jan, 2019 2 commits
  12. 13 Jan, 2019 1 commit