1. 17 Sep, 2015 1 commit
  2. 16 Sep, 2015 2 commits
    • Mans Rullgard's avatar
      clk: check for invalid parent index of orphans in __clk_init() · 9054a31d
      Mans Rullgard authored
      If a mux clock is initialised (by hardware or firmware) with an
      invalid parent, its ->get_parent() can return an out of range
      index.  For example, the generic mux clock attempts to return
      -EINVAL, which due to the u8 return type ends up a rather large
      number.  Using this index with the parent_names[] array results
      in an invalid pointer and (usually) a crash in the following
      strcmp().
      
      This patch adds a check for the parent index being in range,
      ignoring clocks reporting invalid values.
      Signed-off-by: default avatarMans Rullgard <mans@mansr.com>
      Tested-by: default avatarRhyland Klein <rklein@nvidia.com>
      Signed-off-by: default avatarStephen Boyd <sboyd@codeaurora.org>
      9054a31d
    • Thierry Reding's avatar
      clk: tegra: dfll: Properly protect OPP list · e1595d89
      Thierry Reding authored
      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: default avatarThierry 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: default avatarVince Hsu <vince.h@nvidia.com>
      [sboyd@codeaurora.org: Dropped second hunk that nested the rcu
      read lock unnecessarily]
      Signed-off-by: default avatarStephen Boyd <sboyd@codeaurora.org>
      e1595d89
  3. 14 Sep, 2015 1 commit
  4. 10 Sep, 2015 3 commits
  5. 03 Sep, 2015 2 commits
    • Leo Yan's avatar
      clk: Hi6220: separately build stub clock driver · 9f42a89d
      Leo Yan authored
      The previous code, kernel builds Hi6220's common clock driver and stub
      clock driver together. Stub clock driver has introduced the dependency
      with CONFIG_MAILBOX, so kernel will not build Hi6220's common clock
      driver due ARM64's defconfig have not enabled CONFIG_MAILBOX by default.
      
      So separately build stub clock driver and common clock driver for
      Hi6220; and only let stub clock driver has the dependency with
      CONFIG_MAILBOX.
      Signed-off-by: default avatarLeo Yan <leo.yan@linaro.org>
      Tested-by: default avatarKevin Hilman <khilman@linaro.org>
      Signed-off-by: default avatarStephen Boyd <sboyd@codeaurora.org>
      9f42a89d
    • Guenter Roeck's avatar
      clk: h8s2678: Fix compile error · ac0e137a
      Guenter Roeck authored
      Recent cleanup removed some include files without checking if the cleaned
      up code still compiles. This results in the following compile error.
      
      drivers/clk/h8300/clk-h8s2678.c: In function ‘h8s2678_pll_clk_setup’:
      drivers/clk/h8300/clk-h8s2678.c:99:14: error:
      	implicit declaration of function ‘kzalloc’
      drivers/clk/h8300/clk-h8s2678.c:138:2: error:
            implicit declaration of function ‘kfree’
      
      Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: default avatarStephen Boyd <sboyd@codeaurora.org>
      ac0e137a
  6. 27 Aug, 2015 1 commit
  7. 26 Aug, 2015 4 commits
  8. 25 Aug, 2015 4 commits
  9. 24 Aug, 2015 22 commits