[AMD Official Use Only - Internal Distribution Only] Hi Alex, I will send another patch to make this change, because this patch is been pushed to branch. Regards, Stanley -----Original Message----- From: Alex Deucher <alexdeucher@xxxxxxxxx> Sent: Tuesday, March 10, 2020 9:23 PM To: Yang, Stanley <Stanley.Yang@xxxxxxx> Cc: amd-gfx list <amd-gfx@xxxxxxxxxxxxxxxxxxxxx>; Chen, Guchun <Guchun.Chen@xxxxxxx>; Zhou1, Tao <Tao.Zhou1@xxxxxxx>; Clements, John <John.Clements@xxxxxxx>; Li, Dennis <Dennis.Li@xxxxxxx>; Zhang, Hawking <Hawking.Zhang@xxxxxxx> Subject: Re: [PATCH 2/2] drm/amdgpu: call ras_debugfs_create_all in debugfs_init On Mon, Mar 9, 2020 at 5:12 AM Stanley.Yang <Stanley.Yang@xxxxxxx> wrote: > > From: Tao Zhou <tao.zhou1@xxxxxxx> > > and remove each ras IP's own debugfs creation > > Signed-off-by: Tao Zhou <tao.zhou1@xxxxxxx> > Signed-off-by: Stanley.Yang <Stanley.Yang@xxxxxxx> > Change-Id: If3d16862afa0d97abad183dd6e60478b34029e95 > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 3 +++ > drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 1 - > drivers/gpu/drm/amd/amdgpu/amdgpu_mmhub.c | 1 - > drivers/gpu/drm/amd/amdgpu/amdgpu_nbio.c | 1 - > drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 5 ----- > drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c | 1 - > drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c | 1 - > drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c | 1 - > 8 files changed, 3 insertions(+), 11 deletions(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c > b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c > index deca6343d0cc..1d513e4f9934 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c > @@ -1315,6 +1315,7 @@ DEFINE_SIMPLE_ATTRIBUTE(fops_ib_preempt, NULL, > DEFINE_SIMPLE_ATTRIBUTE(fops_sclk_set, NULL, > amdgpu_debugfs_sclk_set, "%llu\n"); > > +extern void amdgpu_ras_debugfs_create_all(struct amdgpu_device > +*adev); Can we put this in amdgpu_ras.h and include that instead? > int amdgpu_debugfs_init(struct amdgpu_device *adev) { > int r, i; > @@ -1387,6 +1388,8 @@ int amdgpu_debugfs_init(struct amdgpu_device *adev) > } > } > > + amdgpu_ras_debugfs_create_all(adev); > + > return amdgpu_debugfs_add_files(adev, amdgpu_debugfs_list, > > ARRAY_SIZE(amdgpu_debugfs_list)); } diff --git > a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c > b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c > index 7403588684b3..d12bb4a35780 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c > @@ -565,7 +565,6 @@ int amdgpu_gfx_ras_late_init(struct amdgpu_device *adev) > int r; > struct ras_fs_if fs_info = { > .sysfs_name = "gfx_err_count", > - .debugfs_name = "gfx_err_inject", > }; > struct ras_ih_if ih_info = { > .cb = amdgpu_gfx_process_ras_data_cb, diff --git > a/drivers/gpu/drm/amd/amdgpu/amdgpu_mmhub.c > b/drivers/gpu/drm/amd/amdgpu/amdgpu_mmhub.c > index 676c48c02d77..ead3dc572ec5 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_mmhub.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_mmhub.c > @@ -32,7 +32,6 @@ int amdgpu_mmhub_ras_late_init(struct amdgpu_device *adev) > }; > struct ras_fs_if fs_info = { > .sysfs_name = "mmhub_err_count", > - .debugfs_name = "mmhub_err_inject", > }; > > if (!adev->mmhub.ras_if) { > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_nbio.c > b/drivers/gpu/drm/amd/amdgpu/amdgpu_nbio.c > index 7d5c3a9de9ea..6201a5f4b4fa 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_nbio.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_nbio.c > @@ -30,7 +30,6 @@ int amdgpu_nbio_ras_late_init(struct amdgpu_device *adev) > }; > struct ras_fs_if fs_info = { > .sysfs_name = "pcie_bif_err_count", > - .debugfs_name = "pcie_bif_err_inject", > }; > > if (!adev->nbio.ras_if) { > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c > b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c > index 422cdd1ce3ad..57af4ea8fb58 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c > @@ -1178,7 +1178,6 @@ static void amdgpu_ras_debugfs_remove_all(struct > amdgpu_device *adev) static int amdgpu_ras_fs_init(struct > amdgpu_device *adev) { > amdgpu_ras_sysfs_create_feature_node(adev); > - amdgpu_ras_debugfs_create_ctrl_node(adev); > > return 0; > } > @@ -1882,8 +1881,6 @@ int amdgpu_ras_late_init(struct amdgpu_device *adev, > goto interrupt; > } > > - amdgpu_ras_debugfs_create(adev, fs_info); > - > r = amdgpu_ras_sysfs_create(adev, fs_info); > if (r) > goto sysfs; > @@ -1892,7 +1889,6 @@ int amdgpu_ras_late_init(struct amdgpu_device > *adev, > cleanup: > amdgpu_ras_sysfs_remove(adev, ras_block); > sysfs: > - amdgpu_ras_debugfs_remove(adev, ras_block); > if (ih_info->cb) > amdgpu_ras_interrupt_remove_handler(adev, ih_info); > interrupt: > @@ -1909,7 +1905,6 @@ void amdgpu_ras_late_fini(struct amdgpu_device *adev, > return; > > amdgpu_ras_sysfs_remove(adev, ras_block); > - amdgpu_ras_debugfs_remove(adev, ras_block); > if (ih_info->cb) > amdgpu_ras_interrupt_remove_handler(adev, ih_info); > amdgpu_ras_feature_enable(adev, ras_block, 0); diff --git > a/drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c > b/drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c > index 7854c053e85d..250a309e4dee 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c > @@ -93,7 +93,6 @@ int amdgpu_sdma_ras_late_init(struct amdgpu_device *adev, > struct ras_ih_if *ih_info = (struct ras_ih_if *)ras_ih_info; > struct ras_fs_if fs_info = { > .sysfs_name = "sdma_err_count", > - .debugfs_name = "sdma_err_inject", > }; > > if (!ih_info) > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c > b/drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c > index f4d40855147b..9dd51f0d2c11 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c > @@ -28,7 +28,6 @@ int amdgpu_umc_ras_late_init(struct amdgpu_device *adev) > int r; > struct ras_fs_if fs_info = { > .sysfs_name = "umc_err_count", > - .debugfs_name = "umc_err_inject", > }; > struct ras_ih_if ih_info = { > .cb = amdgpu_umc_process_ras_data_cb, diff --git > a/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c > b/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c > index a54ce398ed77..0837f872741b 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c > @@ -598,7 +598,6 @@ int amdgpu_xgmi_ras_late_init(struct amdgpu_device *adev) > }; > struct ras_fs_if fs_info = { > .sysfs_name = "xgmi_wafl_err_count", > - .debugfs_name = "xgmi_wafl_err_inject", > }; > > if (!adev->gmc.xgmi.supported || > -- > 2.17.1 > > _______________________________________________ > amd-gfx mailing list > amd-gfx@xxxxxxxxxxxxxxxxxxxxx > https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flist > s.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=02%7C01%7CSt > anley.Yang%40amd.com%7C7bcd4010164046f818d408d7c4f63e27%7C3dd8961fe488 > 4e608e11a82d994e183d%7C0%7C0%7C637194434220278715&sdata=GSrYIyxHb6 > qQtGi1E%2BSkgF6q8nyC6uSKgO%2BWE7cxGm8%3D&reserved=0 _______________________________________________ amd-gfx mailing list amd-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/amd-gfx