diff options
author | Jeremy Ho <jeremyh@nvidia.com> | 2019-07-02 04:43:17 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2019-07-16 09:12:03 -0400 |
commit | 42c2bdfb9f1afed4b22f74cb635db52d5f3e7cd0 (patch) | |
tree | 72ee74708ebc835bca06aa1a38d023d8f060f098 /drivers/gpu/nvgpu/gk20a/clk_gk20a.h | |
parent | 00b41b85389fe08be780d0e6134e9e891ea65399 (diff) |
gpu: nvgpu: remove reversed ordering for deadlock
In some cases, we would get deadlock issue due to there are two locks
acquisition on common clk driver's lock and nvgpu driver's locks. At
the bug, inconsistent lock ordering problem will come with one thread
gets "nvgpu lock -> clk lock" and the other thread gets "clk lock ->
nvgpu lock".
Slove the latter path with one-time initializing clk_parent entry
and use cached data afterward.
Bug 2555115
Change-Id: I31c5c2728f406307e7cfd4e555f4db0c163234d8
Signed-off-by: Jeremy Ho <jeremyh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2146727
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Aleksandr Frid <afrid@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/clk_gk20a.h')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/clk_gk20a.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/clk_gk20a.h b/drivers/gpu/nvgpu/gk20a/clk_gk20a.h index 03aa6ab7..b8ec9420 100644 --- a/drivers/gpu/nvgpu/gk20a/clk_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/clk_gk20a.h | |||
@@ -95,6 +95,7 @@ struct clk_gk20a { | |||
95 | struct gk20a *g; | 95 | struct gk20a *g; |
96 | #if defined(CONFIG_COMMON_CLK) | 96 | #if defined(CONFIG_COMMON_CLK) |
97 | struct clk *tegra_clk; | 97 | struct clk *tegra_clk; |
98 | struct clk *tegra_clk_parent; | ||
98 | struct clk_hw hw; | 99 | struct clk_hw hw; |
99 | #endif | 100 | #endif |
100 | struct pll gpc_pll; | 101 | struct pll gpc_pll; |