summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gv11b/mm_gv11b.c
diff options
context:
space:
mode:
authorSeema Khowala <seemaj@nvidia.com>2017-03-07 15:16:07 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2017-07-08 14:35:48 -0400
commit2f6d321390a98ace1e52f21c6a399e06b3fe71e7 (patch)
tree70ab64bacd4b7a66a13a3a27f303f470175dad92 /drivers/gpu/nvgpu/gv11b/mm_gv11b.c
parentaa05648fd6038b69d1ed841f33b24cf1875efd83 (diff)
gpu: nvgpu: gv11b: add mmu fault handling
HUB reports following memory sub-system interrupts: a) ACCESS_COUNTER_NOTIFY: GET != PUT for access counter notify buffer b) ACCESS_COUNTER_ERROR: HUB received a NACK (BAR2 fault) when writing the notify buffer out to memory c) MMU_ECC_UNCORRECTED_ERROR_NOTIFY: Uncorrected ECC error detected by HUB MMU d) MMU_REPLAYABLE_FAULT_NOTIFY: GET != PUT for replayable fault buffer e) MMU_REPLAYABLE_FAULT_OVERFLOW: Overflow when writing to the replayable fault buffer f) MMU_NONREPLAYABLE_FAULT_NOTIFY: GET != PUT for non-replayable fault buffer g) MMU_NONREPLAYABLE_FAULT_OVERFLOW: Overflow when writing to the non-replayable fault buffer h) MMU_OTHER_FAULT_NOTIFY: All other fault notifications from MMU This change is to : -Detect other fault notify -Copy fault info from fault snap register for other fault notify interrupt -Detect and handle nonreplay/replay fault notify and fault overflow -Copy fault info from fault buffer for nonreplay/replay fault -Print fault info JIRA GPUT19X-7 JIRA GPUT19X-12 Change-Id: Ifa08a4ebcd119a7d81c2eae3f52dc825d1ce3898 Signed-off-by: Seema Khowala <seemaj@nvidia.com> Reviewed-on: https://git-master/r/1493394 Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com> GVS: Gerrit_Virtual_Submit
Diffstat (limited to 'drivers/gpu/nvgpu/gv11b/mm_gv11b.c')
-rw-r--r--drivers/gpu/nvgpu/gv11b/mm_gv11b.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gv11b/mm_gv11b.c b/drivers/gpu/nvgpu/gv11b/mm_gv11b.c
index d6184cee..f4fc4db4 100644
--- a/drivers/gpu/nvgpu/gv11b/mm_gv11b.c
+++ b/drivers/gpu/nvgpu/gv11b/mm_gv11b.c
@@ -59,6 +59,8 @@ static bool gv11b_mm_mmu_fault_pending(struct gk20a *g)
59 59
60static void gv11b_mm_fault_info_mem_destroy(struct gk20a *g) 60static void gv11b_mm_fault_info_mem_destroy(struct gk20a *g)
61{ 61{
62 nvgpu_log_fn(g, " ");
63
62 nvgpu_mutex_acquire(&g->mm.hub_isr_mutex); 64 nvgpu_mutex_acquire(&g->mm.hub_isr_mutex);
63 65
64 gv11b_fb_disable_hub_intr(g, STALL_REG_INDEX, HUB_INTR_TYPE_OTHER | 66 gv11b_fb_disable_hub_intr(g, STALL_REG_INDEX, HUB_INTR_TYPE_OTHER |
@@ -136,6 +138,8 @@ static void gv11b_mm_mmu_hw_fault_buf_deinit(struct gk20a *g)
136{ 138{
137 struct vm_gk20a *vm = g->mm.bar2.vm; 139 struct vm_gk20a *vm = g->mm.bar2.vm;
138 140
141 nvgpu_log_fn(g, " ");
142
139 gv11b_fb_disable_hub_intr(g, STALL_REG_INDEX, HUB_INTR_TYPE_NONREPLAY | 143 gv11b_fb_disable_hub_intr(g, STALL_REG_INDEX, HUB_INTR_TYPE_NONREPLAY |
140 HUB_INTR_TYPE_REPLAY); 144 HUB_INTR_TYPE_REPLAY);
141 145
@@ -173,6 +177,8 @@ static void gv11b_mm_remove_bar2_vm(struct gk20a *g)
173{ 177{
174 struct mm_gk20a *mm = &g->mm; 178 struct mm_gk20a *mm = &g->mm;
175 179
180 nvgpu_log_fn(g, " ");
181
176 gv11b_mm_mmu_hw_fault_buf_deinit(g); 182 gv11b_mm_mmu_hw_fault_buf_deinit(g);
177 183
178 gk20a_free_inst_block(g, &mm->bar2.inst_block); 184 gk20a_free_inst_block(g, &mm->bar2.inst_block);
@@ -195,6 +201,8 @@ static int gv11b_mm_mmu_fault_setup_sw(struct gk20a *g)
195{ 201{
196 int err; 202 int err;
197 203
204 nvgpu_log_fn(g, " ");
205
198 nvgpu_mutex_init(&g->mm.hub_isr_mutex); 206 nvgpu_mutex_init(&g->mm.hub_isr_mutex);
199 207
200 g->mm.hw_fault_buf_status[NONREPLAY_REG_INDEX] = 208 g->mm.hw_fault_buf_status[NONREPLAY_REG_INDEX] =
@@ -216,7 +224,7 @@ static int gv11b_init_mm_setup_hw(struct gk20a *g)
216{ 224{
217 int err = 0; 225 int err = 0;
218 226
219 nvgpu_log_fn(g, "start"); 227 nvgpu_log_fn(g, " ");
220 228
221 g->ops.fb.set_mmu_page_size(g); 229 g->ops.fb.set_mmu_page_size(g);
222 g->ops.fb.init_hw(g); 230 g->ops.fb.init_hw(g);