1. 24 2月, 2017 1 次提交
  2. 07 2月, 2017 1 次提交
  3. 30 1月, 2017 11 次提交
  4. 27 1月, 2017 8 次提交
  5. 06 12月, 2016 7 次提交
  6. 01 12月, 2016 1 次提交
    • S
      PM / OPP: Pass opp_table to dev_pm_opp_put_regulator() · 91291d9a
      Stephen Boyd 提交于
      Joonyoung Shim reported an interesting problem on his ARM octa-core
      Odoroid-XU3 platform. During system suspend, dev_pm_opp_put_regulator()
      was failing for a struct device for which dev_pm_opp_set_regulator() is
      called earlier.
      
      This happened because an earlier call to
      dev_pm_opp_of_cpumask_remove_table() function (from cpufreq-dt.c file)
      removed all the entries from opp_table->dev_list apart from the last CPU
      device in the cpumask of CPUs sharing the OPP.
      
      But both dev_pm_opp_set_regulator() and dev_pm_opp_put_regulator()
      routines get CPU device for the first CPU in the cpumask. And so the OPP
      core failed to find the OPP table for the struct device.
      
      This patch attempts to fix this problem by returning a pointer to the
      opp_table from dev_pm_opp_set_regulator() and using that as the
      parameter to dev_pm_opp_put_regulator(). This ensures that the
      dev_pm_opp_put_regulator() doesn't fail to find the opp table.
      
      Note that similar design problem also exists with other
      dev_pm_opp_put_*() APIs, but those aren't used currently by anyone and
      so we don't need to update them for now.
      
      Cc: 4.4+ <stable@vger.kernel.org> # 4.4+
      Reported-by: NJoonyoung Shim <jy0922.shim@samsung.com>
      Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
      Signed-off-by: NViresh Kumar <viresh.kumar@linaro.org>
      [ Viresh: Wrote commit log and tested on exynos 5250 ]
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      91291d9a
  7. 17 9月, 2016 1 次提交
    • A
      PM / OPP: avoid maybe-uninitialized warning · 4df27c91
      Arnd Bergmann 提交于
      When CONFIG_OPTIMIZE_INLINING is set and we are building with -Wmaybe-uninitialized
      enabled, we can get a warning for the opp core driver:
      
      drivers/base/power/opp/core.c: In function 'dev_pm_opp_set_rate':
      drivers/base/power/opp/core.c:560:8: warning: 'ou_volt_min' may be used uninitialized in this function [-Wmaybe-uninitialized]
      
      This has only now appeared as a result of commit 797da559 ("PM / devfreq:
      Add COMPILE_TEST for build coverage"), which makes the driver visible in
      some configurations that didn't have it before.
      
      The warning is a false positive that I got with gcc-6.1.1, but there is
      a simple workaround in removing the local variables that we get warnings
      for (all three are affected depending on the configuration). This also
      makes the code easier to read.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Reviewed-by: NStephen Boyd <sboyd@codeaurora.org>
      Acked-by: NViresh Kumar <viresh.kumar@linaro.org>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      4df27c91
  8. 29 7月, 2016 1 次提交
  9. 06 5月, 2016 1 次提交
  10. 05 5月, 2016 2 次提交
  11. 21 2月, 2016 2 次提交
  12. 16 2月, 2016 2 次提交
    • V
      PM / OPP: Initialize regulator pointer to an error value · 0c717d0f
      Viresh Kumar 提交于
      We are currently required to do two checks for regulator pointer:
      IS_ERR() and IS_NULL().
      
      And multiple instances are reported, about both of these not being used
      consistently and so resulting in crashes.
      
      Fix that by initializing regulator pointer with an error value and
      checking it only against an error.
      
      This makes code more consistent and more efficient.
      
      Fixes: 7d34d56e (PM / OPP: Disable OPPs that aren't supported by the regulator)
      Reported-and-tested-by: NJon Hunter <jonathanh@nvidia.com>
      Reported-and-tested-by: NTony Lindgren <tony@atomide.com>
      Reported-and-tested-by: NGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: NViresh Kumar <viresh.kumar@linaro.org>
      [ rjw: Initialize to -ENXIO ]
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      0c717d0f
    • V
      PM / OPP: Initialize u_volt_min/max to a valid value · c88c395f
      Viresh Kumar 提交于
      We kept u_volt_min/max initialized to 0, when only the target voltage is
      present in DT, instead of the target/min/max triplet.
      
      This didn't go well with the regulator framework, as on few calls the
      min voltage was set to target and max was set to 0 and so resulted in a
      kernel crash like below:
      
      kernel BUG at ../drivers/regulator/core.c:216!
      
      [<c0684af4>] (regulator_check_voltage) from [<c06857ac>] (regulator_set_voltage_unlocked+0x58/0x230)
      [<c06857ac>] (regulator_set_voltage_unlocked) from [<c06859ac>] (regulator_set_voltage+0x28/0x54)
      [<c06859ac>] (regulator_set_voltage) from [<c0775b28>] (_set_opp_voltage+0x30/0x98)
      [<c0775b28>] (_set_opp_voltage) from [<c0776630>] (dev_pm_opp_set_rate+0xf0/0x28c)
      [<c0776630>] (dev_pm_opp_set_rate) from [<c096f784>] (__cpufreq_driver_target+0x184/0x2b4)
      [<c096f784>] (__cpufreq_driver_target) from [<c0973760>] (dbs_check_cpu+0x1b0/0x1f4)
      [<c0973760>] (dbs_check_cpu) from [<c0973f30>] (cpufreq_governor_dbs+0x324/0x5c4)
      [<c0973f30>] (cpufreq_governor_dbs) from [<c0970958>] (__cpufreq_governor+0xe4/0x1ec)
      [<c0970958>] (__cpufreq_governor) from [<c09711e0>] (cpufreq_init_policy+0x64/0x8c)
      [<c09711e0>] (cpufreq_init_policy) from [<c09718cc>] (cpufreq_online+0x2fc/0x708)
      [<c09718cc>] (cpufreq_online) from [<c0765ff0>] (subsys_interface_register+0x94/0xd8)
      [<c0765ff0>] (subsys_interface_register) from [<c0970530>] (cpufreq_register_driver+0x14c/0x19c)
      [<c0970530>] (cpufreq_register_driver) from [<c09746dc>] (dt_cpufreq_probe+0x70/0xec)
      [<c09746dc>] (dt_cpufreq_probe) from [<c076907c>] (platform_drv_probe+0x4c/0xb0)
      [<c076907c>] (platform_drv_probe) from [<c07678e0>] (driver_probe_device+0x214/0x2c0)
      [<c07678e0>] (driver_probe_device) from [<c0767a18>] (__driver_attach+0x8c/0x90)
      [<c0767a18>] (__driver_attach) from [<c0765c2c>] (bus_for_each_dev+0x68/0x9c)
      [<c0765c2c>] (bus_for_each_dev) from [<c0766d78>] (bus_add_driver+0x1a0/0x218)
      [<c0766d78>] (bus_add_driver) from [<c076810c>] (driver_register+0x78/0xf8)
      [<c076810c>] (driver_register) from [<c0301d74>] (do_one_initcall+0x90/0x1d8)
      [<c0301d74>] (do_one_initcall) from [<c1100e14>] (kernel_init_freeable+0x15c/0x1fc)
      [<c1100e14>] (kernel_init_freeable) from [<c0b27a0c>] (kernel_init+0x8/0xf0)
      [<c0b27a0c>] (kernel_init) from [<c0307d78>] (ret_from_fork+0x14/0x3c)
      Code: e1550004 baffffeb e3a00000 e8bd8070 (e7f001f2)
      
      Fix that by initializing u_volt_min/max to the target voltage in such cases.
      Reported-and-tested-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com>
      Fixes: 27465902 (PM / OPP: Add support to parse "operating-points-v2" bindings)
      Signed-off-by: NViresh Kumar <viresh.kumar@linaro.org>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      c88c395f
  13. 12 2月, 2016 1 次提交
  14. 10 2月, 2016 1 次提交