Files
linux-nvgpu/drivers/gpu/nvgpu/common
Sagar Kamble 4ee71f9852 gpu: nvgpu: guard ecc sysfs remove with NVGPU_DISABLE_ECC_STATS
Following error is seen on unloading nvgpu on platforms with
NVGPU_DISABLE_ECC_STATS set to true.

[ 3712.384639] Internal error: Oops: 96000004 [#1] PREEMPT SMP
[ 3712.388479] pc : sysfs_remove_file_ns+0x28/0x50
[ 3712.389119] lr : sysfs_remove_file_ns+0x28/0x50
...
[ 3712.400640]  sysfs_remove_file_ns+0x28/0x50
[ 3712.401280]  device_remove_file+0x34/0x50
[ 3712.414720]  nvgpu_ecc_sysfs_remove+0x74/0xc0 [nvgpu]
[ 3712.428800]  nvgpu_ecc_remove_support+0x38/0x80 [nvgpu]
[ 3712.442240]  nvgpu_put+0xb8/0x160 [nvgpu]
[ 3712.456319]  nvgpu_pci_remove+0x168/0x250 [nvgpu]
[ 3712.456959]  pci_device_remove+0x4c/0x100

This is happening as ecc sysfs files are not created, however
their removal is attempted. Add NVGPU_DISABLE_ECC_STATS check
for ecc sysfs removal.

Bug 3495440

Change-Id: I9726cf43a740c2b591ca39bdc572e8f4ff5684d3
Signed-off-by: Sagar Kamble <skamble@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2891876
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com>
Reviewed-by: Rajesh Devaraj <rdevaraj@nvidia.com>
Reviewed-by: Divya Singhatwaria <dsinghatwari@nvidia.com>
Reviewed-by: Martin Radev <mradev@nvidia.com>
Reviewed-by: Seema Khowala <seemaj@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-26 20:08:45 -07:00
..
2022-05-07 15:18:39 -07:00
2022-12-15 20:55:54 -08:00
2023-03-24 17:07:49 -07:00
2023-03-12 08:13:41 -07:00
2022-01-28 04:50:12 -08:00
2023-03-21 02:37:08 -07:00
2023-01-20 03:35:49 -08:00
2020-12-15 14:13:28 -06:00
2022-06-03 12:05:26 -07:00
2023-04-21 11:32:05 -07:00
2023-01-21 16:52:39 -08:00