summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gp10b/mc_gp10b.c
diff options
context:
space:
mode:
authorSunny He <suhe@nvidia.com>2017-06-27 17:25:25 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-07-13 03:09:08 -0400
commit47cb48f1e2d9c34f22f9fcf443ef67a32cd54a73 (patch)
tree830b854aa34a0faa6ac07e40cb7d46f72c5d5907 /drivers/gpu/nvgpu/gp10b/mc_gp10b.c
parente78153ea1b6b610f2307b86fc42ea33d678b250f (diff)
gpu: nvgpu: Move gops.mc's non-fp members
Move non-function pointer members out of the mc substruct of gpu_ops. Ideally gpu_ops will have only function ponters, better matching its intended purpose and improving readability. gops.mc.intr_mask_restore is now mc_intr_mask_restore Jira NVGPU-74 Change-Id: Iddf5e761012086e993c375d59e1bbdfb1e64db0c Signed-off-by: Sunny He <suhe@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1509602 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Alex Waterman <alexw@nvidia.com> Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gp10b/mc_gp10b.c')
-rw-r--r--drivers/gpu/nvgpu/gp10b/mc_gp10b.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/gpu/nvgpu/gp10b/mc_gp10b.c b/drivers/gpu/nvgpu/gp10b/mc_gp10b.c
index 5a1d5dcc..718869f6 100644
--- a/drivers/gpu/nvgpu/gp10b/mc_gp10b.c
+++ b/drivers/gpu/nvgpu/gp10b/mc_gp10b.c
@@ -29,7 +29,7 @@ void mc_gp10b_intr_enable(struct gk20a *g)
29 29
30 gk20a_writel(g, mc_intr_en_clear_r(NVGPU_MC_INTR_STALLING), 30 gk20a_writel(g, mc_intr_en_clear_r(NVGPU_MC_INTR_STALLING),
31 0xffffffff); 31 0xffffffff);
32 g->ops.mc.intr_mask_restore[NVGPU_MC_INTR_STALLING] = 32 g->mc_intr_mask_restore[NVGPU_MC_INTR_STALLING] =
33 mc_intr_pfifo_pending_f() | 33 mc_intr_pfifo_pending_f() |
34 mc_intr_priv_ring_pending_f() | 34 mc_intr_priv_ring_pending_f() |
35 mc_intr_pbus_pending_f() | 35 mc_intr_pbus_pending_f() |
@@ -37,15 +37,15 @@ void mc_gp10b_intr_enable(struct gk20a *g)
37 mc_intr_replayable_fault_pending_f() | 37 mc_intr_replayable_fault_pending_f() |
38 eng_intr_mask; 38 eng_intr_mask;
39 gk20a_writel(g, mc_intr_en_set_r(NVGPU_MC_INTR_STALLING), 39 gk20a_writel(g, mc_intr_en_set_r(NVGPU_MC_INTR_STALLING),
40 g->ops.mc.intr_mask_restore[NVGPU_MC_INTR_STALLING]); 40 g->mc_intr_mask_restore[NVGPU_MC_INTR_STALLING]);
41 41
42 gk20a_writel(g, mc_intr_en_clear_r(NVGPU_MC_INTR_NONSTALLING), 42 gk20a_writel(g, mc_intr_en_clear_r(NVGPU_MC_INTR_NONSTALLING),
43 0xffffffff); 43 0xffffffff);
44 g->ops.mc.intr_mask_restore[NVGPU_MC_INTR_NONSTALLING] = 44 g->mc_intr_mask_restore[NVGPU_MC_INTR_NONSTALLING] =
45 mc_intr_pfifo_pending_f() | 45 mc_intr_pfifo_pending_f() |
46 eng_intr_mask; 46 eng_intr_mask;
47 gk20a_writel(g, mc_intr_en_set_r(NVGPU_MC_INTR_NONSTALLING), 47 gk20a_writel(g, mc_intr_en_set_r(NVGPU_MC_INTR_NONSTALLING),
48 g->ops.mc.intr_mask_restore[NVGPU_MC_INTR_NONSTALLING]); 48 g->mc_intr_mask_restore[NVGPU_MC_INTR_NONSTALLING]);
49} 49}
50 50
51void mc_gp10b_intr_unit_config(struct gk20a *g, bool enable, 51void mc_gp10b_intr_unit_config(struct gk20a *g, bool enable,
@@ -58,11 +58,11 @@ void mc_gp10b_intr_unit_config(struct gk20a *g, bool enable,
58 NVGPU_MC_INTR_NONSTALLING); 58 NVGPU_MC_INTR_NONSTALLING);
59 if (enable) { 59 if (enable) {
60 reg = mc_intr_en_set_r(intr_index); 60 reg = mc_intr_en_set_r(intr_index);
61 g->ops.mc.intr_mask_restore[intr_index] |= mask; 61 g->mc_intr_mask_restore[intr_index] |= mask;
62 62
63 } else { 63 } else {
64 reg = mc_intr_en_clear_r(intr_index); 64 reg = mc_intr_en_clear_r(intr_index);
65 g->ops.mc.intr_mask_restore[intr_index] &= ~mask; 65 g->mc_intr_mask_restore[intr_index] &= ~mask;
66 } 66 }
67 67
68 gk20a_writel(g, reg, mask); 68 gk20a_writel(g, reg, mask);
@@ -136,7 +136,7 @@ void mc_gp10b_intr_stall_pause(struct gk20a *g)
136void mc_gp10b_intr_stall_resume(struct gk20a *g) 136void mc_gp10b_intr_stall_resume(struct gk20a *g)
137{ 137{
138 gk20a_writel(g, mc_intr_en_set_r(NVGPU_MC_INTR_STALLING), 138 gk20a_writel(g, mc_intr_en_set_r(NVGPU_MC_INTR_STALLING),
139 g->ops.mc.intr_mask_restore[NVGPU_MC_INTR_STALLING]); 139 g->mc_intr_mask_restore[NVGPU_MC_INTR_STALLING]);
140} 140}
141 141
142u32 mc_gp10b_intr_nonstall(struct gk20a *g) 142u32 mc_gp10b_intr_nonstall(struct gk20a *g)
@@ -153,7 +153,7 @@ void mc_gp10b_intr_nonstall_pause(struct gk20a *g)
153void mc_gp10b_intr_nonstall_resume(struct gk20a *g) 153void mc_gp10b_intr_nonstall_resume(struct gk20a *g)
154{ 154{
155 gk20a_writel(g, mc_intr_en_set_r(NVGPU_MC_INTR_NONSTALLING), 155 gk20a_writel(g, mc_intr_en_set_r(NVGPU_MC_INTR_NONSTALLING),
156 g->ops.mc.intr_mask_restore[NVGPU_MC_INTR_NONSTALLING]); 156 g->mc_intr_mask_restore[NVGPU_MC_INTR_NONSTALLING]);
157} 157}
158 158
159bool mc_gp10b_is_intr1_pending(struct gk20a *g, 159bool mc_gp10b_is_intr1_pending(struct gk20a *g,