mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
gpu: nvgpu: gr: remove only created sysfs nodes
Sysfs nodes for GR stats are created on GR init. If nvgpu module is removed without any ops, then it tries to remove sysfs nodes which do not exist resulting in kernel panic. Fix this issue by removing sysfs nodes only if ecc counters are initialized. Bug 1987855 Change-Id: I3f967ee92ec02ad19ffbd9bfa8bace5bfd229dd2 Signed-off-by: Nitin Kumbhar <nkumbhar@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1730536 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
Tejal Kudav
parent
f9da1781f6
commit
2318e66a59
@@ -796,6 +796,9 @@ static void gr_gp10b_remove_sysfs(struct device *dev)
|
||||
{
|
||||
struct gk20a *g = get_gk20a(dev);
|
||||
|
||||
if (!g->ecc.gr.sm_lrf_single_err_count.counters)
|
||||
return;
|
||||
|
||||
gr_gp10b_ecc_stat_remove(dev,
|
||||
0,
|
||||
&g->ecc.gr.sm_lrf_single_err_count,
|
||||
|
||||
@@ -502,6 +502,9 @@ static void gr_gv11b_remove_sysfs(struct device *dev)
|
||||
{
|
||||
struct gk20a *g = get_gk20a(dev);
|
||||
|
||||
if (!g->ecc.gr.sm_l1_tag_corrected_err_count.counters)
|
||||
return;
|
||||
|
||||
gr_gp10b_ecc_stat_remove(dev,
|
||||
0,
|
||||
&g->ecc.gr.sm_l1_tag_corrected_err_count,
|
||||
|
||||
Reference in New Issue
Block a user