summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_gr_gv11b.h
diff options
context:
space:
mode:
authorDeepak Nibade <dnibade@nvidia.com>2018-01-04 08:02:46 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2018-01-12 14:05:31 -0500
commit5b10690479d016dd27d4592d94e7bd12a9277a34 (patch)
tree663501e778ad0089c1930c7beff8a62dfac34ea6 /drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_gr_gv11b.h
parent6170f1eed53b4e6770a6948474ab8a8a5e2621bc (diff)
gpu: nvgpu: handle SM reported MMU_NACK exception
Upon receiving MMU_FAULT error, MMU will forward MMU_NACK to SM If MMU_NACK is masked out, SM will simply release the semaphores And if semaphores are released before MMU fault is handled, user space could see that operation as successful incorrectly Fix this by handling SM reported MMU_NACK exception Enable MMU_NACK reporting in gv11b_gr_set_hww_esr_report_mask In MMU_NACK handling path, we just set the error notifier and clear the interrupt so that the User Space sees the error as soon as semaphores are released by SM And MMU_FAULT handling path will take care of triggering RC recovery anyways Also add necessary h/w accessors for mmu_nack Bug 2040594 Jira NVGPU-473 Change-Id: Ic925c2d3f3069016c57d177713066c29ab39dc3d Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1631708 GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_gr_gv11b.h')
-rw-r--r--drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_gr_gv11b.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_gr_gv11b.h b/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_gr_gv11b.h
index 1e82456f..2b9bffdd 100644
--- a/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_gr_gv11b.h
+++ b/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_gr_gv11b.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved. 2 * Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved.
3 * 3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a 4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"), 5 * copy of this software and associated documentation files (the "Software"),
@@ -3940,6 +3940,10 @@ static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_report_mask_stack_overflow_repor
3940{ 3940{
3941 return 0x400000U; 3941 return 0x400000U;
3942} 3942}
3943static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_report_mask_mmu_nack_report_f(void)
3944{
3945 return 0x4000000U;
3946}
3943static inline u32 gr_gpcs_tpcs_tpccs_tpc_exception_en_r(void) 3947static inline u32 gr_gpcs_tpcs_tpccs_tpc_exception_en_r(void)
3944{ 3948{
3945 return 0x00419d0cU; 3949 return 0x00419d0cU;
@@ -4240,6 +4244,10 @@ static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_error_none_f(void)
4240{ 4244{
4241 return 0x0U; 4245 return 0x0U;
4242} 4246}
4247static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_error_mmu_nack_f(void)
4248{
4249 return 0x20U;
4250}
4243static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_wrap_id_m(void) 4251static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_wrap_id_m(void)
4244{ 4252{
4245 return 0xffU << 16U; 4253 return 0xffU << 16U;