diff options
author | Seema Khowala <seemaj@nvidia.com> | 2017-03-07 15:16:07 -0500 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-07-08 14:35:48 -0400 |
commit | 2f6d321390a98ace1e52f21c6a399e06b3fe71e7 (patch) | |
tree | 70ab64bacd4b7a66a13a3a27f303f470175dad92 /drivers/gpu/nvgpu/gv11b/ce_gv11b.c | |
parent | aa05648fd6038b69d1ed841f33b24cf1875efd83 (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/ce_gv11b.c')
-rw-r--r-- | drivers/gpu/nvgpu/gv11b/ce_gv11b.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gv11b/ce_gv11b.c b/drivers/gpu/nvgpu/gv11b/ce_gv11b.c index 0bbd05b6..af87f990 100644 --- a/drivers/gpu/nvgpu/gv11b/ce_gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/ce_gv11b.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include "ce_gv11b.h" | 26 | #include "ce_gv11b.h" |
27 | 27 | ||
28 | #include <nvgpu/hw/gv11b/hw_ce_gv11b.h> | 28 | #include <nvgpu/hw/gv11b/hw_ce_gv11b.h> |
29 | #include <nvgpu/hw/gv11b/hw_top_gv11b.h> | ||
29 | 30 | ||
30 | static u32 gv11b_ce_get_num_pce(struct gk20a *g) | 31 | static u32 gv11b_ce_get_num_pce(struct gk20a *g) |
31 | { | 32 | { |
@@ -74,6 +75,25 @@ static void gv11b_ce_isr(struct gk20a *g, u32 inst_id, u32 pri_base) | |||
74 | gp10b_ce_isr(g, inst_id, pri_base); | 75 | gp10b_ce_isr(g, inst_id, pri_base); |
75 | } | 76 | } |
76 | 77 | ||
78 | void gv11b_ce_mthd_buffer_fault_in_bar2_fault(struct gk20a *g) | ||
79 | { | ||
80 | u32 reg_val, num_lce, lce, clear_intr; | ||
81 | |||
82 | reg_val = gk20a_readl(g, top_num_ces_r()); | ||
83 | num_lce = top_num_ces_value_v(reg_val); | ||
84 | nvgpu_log_info(g, "num LCE: %d", num_lce); | ||
85 | |||
86 | for (lce = 0; lce < num_lce; lce++) { | ||
87 | reg_val = gk20a_readl(g, ce_intr_status_r(lce)); | ||
88 | if (reg_val & ce_intr_status_mthd_buffer_fault_pending_f()) { | ||
89 | nvgpu_log(g, gpu_dbg_intr, | ||
90 | "ce: lce %d: mthd buffer fault", lce); | ||
91 | clear_intr = ce_intr_status_mthd_buffer_fault_reset_f(); | ||
92 | gk20a_writel(g, ce_intr_status_r(lce), clear_intr); | ||
93 | } | ||
94 | } | ||
95 | } | ||
96 | |||
77 | void gv11b_init_ce(struct gpu_ops *gops) | 97 | void gv11b_init_ce(struct gpu_ops *gops) |
78 | { | 98 | { |
79 | gp10b_init_ce(gops); | 99 | gp10b_init_ce(gops); |