1. 30 1月, 2017 1 次提交
    • 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
  2. 28 4月, 2016 1 次提交
  3. 03 3月, 2016 1 次提交
  4. 20 10月, 2015 1 次提交
  5. 17 9月, 2015 1 次提交
    • T
      clk: tegra: dfll: Properly protect OPP list · e1595d89
      Thierry Reding 提交于
      The OPP list needs to be protected against concurrent accesses. Using
      simple RCU read locks does the trick and gets rid of the following
      lockdep warning:
      
      	===============================
      	[ INFO: suspicious RCU usage. ]
      	4.2.0-next-20150908 #1 Not tainted
      	-------------------------------
      	drivers/base/power/opp.c:460 Missing rcu_read_lock() or dev_opp_list_lock protection!
      
      	other info that might help us debug this:
      
      	rcu_scheduler_active = 1, debug_locks = 0
      	4 locks held by kworker/u8:0/6:
      	 #0:  ("%s""deferwq"){++++.+}, at: [<c0040d8c>] process_one_work+0x118/0x4bc
      	 #1:  (deferred_probe_work){+.+.+.}, at: [<c0040d8c>] process_one_work+0x118/0x4bc
      	 #2:  (&dev->mutex){......}, at: [<c03b8194>] __device_attach+0x20/0x118
      	 #3:  (prepare_lock){+.+...}, at: [<c054bc08>] clk_prepare_lock+0x10/0xf8
      
      	stack backtrace:
      	CPU: 2 PID: 6 Comm: kworker/u8:0 Not tainted 4.2.0-next-20150908 #1
      	Hardware name: NVIDIA Tegra SoC (Flattened Device Tree)
      	Workqueue: deferwq deferred_probe_work_func
      	[<c001802c>] (unwind_backtrace) from [<c00135a4>] (show_stack+0x10/0x14)
      	[<c00135a4>] (show_stack) from [<c02a8418>] (dump_stack+0x94/0xd4)
      	[<c02a8418>] (dump_stack) from [<c03c6f6c>] (dev_pm_opp_find_freq_ceil+0x108/0x114)
      	[<c03c6f6c>] (dev_pm_opp_find_freq_ceil) from [<c0551a3c>] (dfll_calculate_rate_request+0xb8/0x170)
      	[<c0551a3c>] (dfll_calculate_rate_request) from [<c0551b10>] (dfll_clk_round_rate+0x1c/0x2c)
      	[<c0551b10>] (dfll_clk_round_rate) from [<c054de2c>] (clk_calc_new_rates+0x1b8/0x228)
      	[<c054de2c>] (clk_calc_new_rates) from [<c054e44c>] (clk_core_set_rate_nolock+0x44/0xac)
      	[<c054e44c>] (clk_core_set_rate_nolock) from [<c054e4d8>] (clk_set_rate+0x24/0x34)
      	[<c054e4d8>] (clk_set_rate) from [<c0512460>] (tegra124_cpufreq_probe+0x120/0x230)
      	[<c0512460>] (tegra124_cpufreq_probe) from [<c03b9cbc>] (platform_drv_probe+0x44/0xac)
      	[<c03b9cbc>] (platform_drv_probe) from [<c03b84c8>] (driver_probe_device+0x218/0x304)
      	[<c03b84c8>] (driver_probe_device) from [<c03b69b0>] (bus_for_each_drv+0x60/0x94)
      	[<c03b69b0>] (bus_for_each_drv) from [<c03b8228>] (__device_attach+0xb4/0x118)
      	ata1: SATA link down (SStatus 0 SControl 300)
      	[<c03b8228>] (__device_attach) from [<c03b77c8>] (bus_probe_device+0x88/0x90)
      	[<c03b77c8>] (bus_probe_device) from [<c03b7be8>] (deferred_probe_work_func+0x58/0x8c)
      	[<c03b7be8>] (deferred_probe_work_func) from [<c0040dfc>] (process_one_work+0x188/0x4bc)
      	[<c0040dfc>] (process_one_work) from [<c004117c>] (worker_thread+0x4c/0x4f4)
      	[<c004117c>] (worker_thread) from [<c0047230>] (kthread+0xe4/0xf8)
      	[<c0047230>] (kthread) from [<c000f7d0>] (ret_from_fork+0x14/0x24)
      Signed-off-by: NThierry Reding <treding@nvidia.com>
      Fixes: c4fe70ad ("clk: tegra: Add closed loop support for the DFLL")
      [vince.h@nvidia.com: Unlock rcu on error path]
      Signed-off-by: NVince Hsu <vince.h@nvidia.com>
      [sboyd@codeaurora.org: Dropped second hunk that nested the rcu
      read lock unnecessarily]
      Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
      e1595d89
  6. 15 9月, 2015 1 次提交
  7. 26 8月, 2015 1 次提交
    • S
      clk: tegra: Fix some static checker problems · c5a132a8
      Stephen Boyd 提交于
      The latest Tegra clk pull had some problems. Fix them.
      
      drivers/clk/tegra/clk-tegra124.c:1450:6: warning: symbol 'tegra124_clock_assert_dfll_dvco_reset' was not declared. Should it be static?
      drivers/clk/tegra/clk-tegra124.c:1466:6: warning: symbol 'tegra124_clock_deassert_dfll_dvco_reset' was not declared. Should it be static?
      drivers/clk/tegra/clk-tegra124.c:1476:5: warning: symbol 'tegra124_reset_assert' was not declared. Should it be static?
      drivers/clk/tegra/clk-tegra124.c:1486:5: warning: symbol 'tegra124_reset_deassert' was not declared. Should it be static?
      drivers/clk/tegra/clk-dfll.c:590 dfll_load_i2c_lut() warn: inconsistent indenting
      drivers/clk/tegra/clk-dfll.c:1448 dfll_build_i2c_lut() warn: unsigned 'td->i2c_lut[0]' is never less than zero.
      Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
      c5a132a8
  8. 16 7月, 2015 3 次提交