diff options
author | Seema Khowala <seemaj@nvidia.com> | 2017-03-06 16:11:38 -0500 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-07-08 14:35:45 -0400 |
commit | 0e53ae618c21a0ac21f2648346301f9e29d4d463 (patch) | |
tree | 7c9bb2e91d544b48e3fdb7a2ef676ed6e45ad074 /drivers/gpu/nvgpu/gk20a | |
parent | cba424539d39ea184157f80b64938cfa31bc3924 (diff) |
gpu: nvgpu: add ops and var for t19x mmu fault
Add new ops and fields required for t19x mmu fault
JIRA GPUT19X-7
JIRA GPUT19X-12
Change-Id: I29694c15ff9a4150bb1737adac6b58ccba76bea4
Signed-off-by: Seema Khowala <seemaj@nvidia.com>
Reviewed-on: https://git-master/r/1492640
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.h | 1 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/mm_gk20a.c | 3 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/mm_gk20a.h | 11 |
3 files changed, 14 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h index 90d3338a..fa1b39fd 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gk20a.h | |||
@@ -729,6 +729,7 @@ struct gpu_ops { | |||
729 | int (*secure_alloc)(struct gk20a *g, | 729 | int (*secure_alloc)(struct gk20a *g, |
730 | struct gr_ctx_buffer_desc *desc, | 730 | struct gr_ctx_buffer_desc *desc, |
731 | size_t size); | 731 | size_t size); |
732 | void (*fault_info_mem_destroy)(struct gk20a *g); | ||
732 | } mm; | 733 | } mm; |
733 | struct { | 734 | struct { |
734 | u32 (*enter)(struct gk20a *g, struct nvgpu_mem *mem, | 735 | u32 (*enter)(struct gk20a *g, struct nvgpu_mem *mem, |
diff --git a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c index d984d1f9..fab80e69 100644 --- a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c | |||
@@ -464,6 +464,9 @@ static void gk20a_remove_mm_support(struct mm_gk20a *mm) | |||
464 | { | 464 | { |
465 | struct gk20a *g = gk20a_from_mm(mm); | 465 | struct gk20a *g = gk20a_from_mm(mm); |
466 | 466 | ||
467 | if (g->ops.mm.fault_info_mem_destroy) | ||
468 | g->ops.mm.fault_info_mem_destroy(g); | ||
469 | |||
467 | if (g->ops.mm.remove_bar2_vm) | 470 | if (g->ops.mm.remove_bar2_vm) |
468 | g->ops.mm.remove_bar2_vm(g); | 471 | g->ops.mm.remove_bar2_vm(g); |
469 | 472 | ||
diff --git a/drivers/gpu/nvgpu/gk20a/mm_gk20a.h b/drivers/gpu/nvgpu/gk20a/mm_gk20a.h index cadcffa4..2f35df71 100644 --- a/drivers/gpu/nvgpu/gk20a/mm_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/mm_gk20a.h | |||
@@ -147,6 +147,8 @@ void gk20a_mm_l2_flush(struct gk20a *g, bool invalidate); | |||
147 | void gk20a_mm_cbc_clean(struct gk20a *g); | 147 | void gk20a_mm_cbc_clean(struct gk20a *g); |
148 | void gk20a_mm_l2_invalidate(struct gk20a *g); | 148 | void gk20a_mm_l2_invalidate(struct gk20a *g); |
149 | 149 | ||
150 | #define FAULT_TYPE_NUM 2 /* replay and nonreplay faults */ | ||
151 | |||
150 | struct mmu_fault_info { | 152 | struct mmu_fault_info { |
151 | u64 inst_ptr; | 153 | u64 inst_ptr; |
152 | u32 inst_aperture; | 154 | u32 inst_aperture; |
@@ -224,8 +226,15 @@ struct mm_gk20a { | |||
224 | struct nvgpu_mutex l2_op_lock; | 226 | struct nvgpu_mutex l2_op_lock; |
225 | struct nvgpu_mutex tlb_lock; | 227 | struct nvgpu_mutex tlb_lock; |
226 | struct nvgpu_mutex priv_lock; | 228 | struct nvgpu_mutex priv_lock; |
227 | #ifdef CONFIG_ARCH_TEGRA_18x_SOC | 229 | |
228 | struct nvgpu_mem bar2_desc; | 230 | struct nvgpu_mem bar2_desc; |
231 | |||
232 | #ifdef CONFIG_TEGRA_19x_GPU | ||
233 | struct nvgpu_mem hw_fault_buf[FAULT_TYPE_NUM]; | ||
234 | unsigned int hw_fault_buf_status[FAULT_TYPE_NUM]; | ||
235 | struct mmu_fault_info *fault_info[FAULT_TYPE_NUM]; | ||
236 | struct nvgpu_mutex hub_isr_mutex; | ||
237 | u32 hub_intr_types; | ||
229 | #endif | 238 | #endif |
230 | /* | 239 | /* |
231 | * Separate function to cleanup the CE since it requires a channel to | 240 | * Separate function to cleanup the CE since it requires a channel to |