* [PATCH] drm/amdkfd: remove unused function get_reserved_sdma_queues_bitmap
@ 2023-05-25 20:07 Tom Rix
2023-05-25 20:14 ` Nathan Chancellor
2023-05-25 21:10 ` Felix Kuehling
0 siblings, 2 replies; 4+ messages in thread
From: Tom Rix @ 2023-05-25 20:07 UTC (permalink / raw)
To: Felix.Kuehling, alexander.deucher, christian.koenig, Xinhui.Pan,
airlied, daniel, nathan, ndesaulniers
Cc: amd-gfx, dri-devel, linux-kernel, llvm, Tom Rix
clang with W=1 reports
drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_device_queue_manager.c:122:24: error:
unused function 'get_reserved_sdma_queues_bitmap' [-Werror,-Wunused-function]
static inline uint64_t get_reserved_sdma_queues_bitmap(struct device_queue_manager *dqm)
^
This function is not used so remove it.
Signed-off-by: Tom Rix <trix@redhat.com>
---
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
index 493b4b66f180..2fbd0a96424f 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
@@ -119,11 +119,6 @@ unsigned int get_num_xgmi_sdma_queues(struct device_queue_manager *dqm)
dqm->dev->kfd->device_info.num_sdma_queues_per_engine;
}
-static inline uint64_t get_reserved_sdma_queues_bitmap(struct device_queue_manager *dqm)
-{
- return dqm->dev->kfd->device_info.reserved_sdma_queues_bitmap;
-}
-
static void init_sdma_bitmaps(struct device_queue_manager *dqm)
{
bitmap_zero(dqm->sdma_bitmap, KFD_MAX_SDMA_QUEUES);
--
2.27.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] drm/amdkfd: remove unused function get_reserved_sdma_queues_bitmap 2023-05-25 20:07 [PATCH] drm/amdkfd: remove unused function get_reserved_sdma_queues_bitmap Tom Rix @ 2023-05-25 20:14 ` Nathan Chancellor 2023-05-25 21:10 ` Felix Kuehling 1 sibling, 0 replies; 4+ messages in thread From: Nathan Chancellor @ 2023-05-25 20:14 UTC (permalink / raw) To: Tom Rix Cc: Felix.Kuehling, alexander.deucher, christian.koenig, Xinhui.Pan, airlied, daniel, ndesaulniers, amd-gfx, dri-devel, linux-kernel, llvm On Thu, May 25, 2023 at 04:07:59PM -0400, Tom Rix wrote: > clang with W=1 reports > drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_device_queue_manager.c:122:24: error: > unused function 'get_reserved_sdma_queues_bitmap' [-Werror,-Wunused-function] > static inline uint64_t get_reserved_sdma_queues_bitmap(struct device_queue_manager *dqm) > ^ > This function is not used so remove it. > > Signed-off-by: Tom Rix <trix@redhat.com> Caused by commit 09a95a85cf3e ("drm/amdkfd: Update SDMA queue management for GFX9.4.3") it seems. You can actually go a step farther and remove the reserved_sdma_queues_bitmap member from 'struct kfd_device_info' because it is now only assigned, never read. $ git grep reserved_sdma_queues_bitmap next-20230525 next:20230525:drivers/gpu/drm/amd/amdkfd/kfd_device.c: kfd->device_info.reserved_sdma_queues_bitmap = 0xFULL; next:20230525:drivers/gpu/drm/amd/amdkfd/kfd_device.c: kfd->device_info.reserved_sdma_queues_bitmap = 0x3ULL; next:20230525:drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c:static inline uint64_t get_reserved_sdma_queues_bitmap(struct device_queue_manager *dqm) next:20230525:drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c: return dqm->dev->kfd->device_info.reserved_sdma_queues_bitmap; next:20230525:drivers/gpu/drm/amd/amdkfd/kfd_priv.h: uint64_t reserved_sdma_queues_bitmap; > --- > drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 5 ----- > 1 file changed, 5 deletions(-) > > diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c > index 493b4b66f180..2fbd0a96424f 100644 > --- a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c > +++ b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c > @@ -119,11 +119,6 @@ unsigned int get_num_xgmi_sdma_queues(struct device_queue_manager *dqm) > dqm->dev->kfd->device_info.num_sdma_queues_per_engine; > } > > -static inline uint64_t get_reserved_sdma_queues_bitmap(struct device_queue_manager *dqm) > -{ > - return dqm->dev->kfd->device_info.reserved_sdma_queues_bitmap; > -} > - > static void init_sdma_bitmaps(struct device_queue_manager *dqm) > { > bitmap_zero(dqm->sdma_bitmap, KFD_MAX_SDMA_QUEUES); > -- > 2.27.0 > ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/amdkfd: remove unused function get_reserved_sdma_queues_bitmap 2023-05-25 20:07 [PATCH] drm/amdkfd: remove unused function get_reserved_sdma_queues_bitmap Tom Rix 2023-05-25 20:14 ` Nathan Chancellor @ 2023-05-25 21:10 ` Felix Kuehling 2023-05-26 1:39 ` Joshi, Mukul 1 sibling, 1 reply; 4+ messages in thread From: Felix Kuehling @ 2023-05-25 21:10 UTC (permalink / raw) To: Tom Rix, alexander.deucher, christian.koenig, Xinhui.Pan, airlied, daniel, nathan, ndesaulniers, Joshi, Mukul Cc: amd-gfx, dri-devel, linux-kernel, llvm [+Mukul] Looks like this problem was introduced by Mukul's patch "drm/amdkfd: Update SDMA queue management for GFX9.4.3". Could this be a merge error between GFX 9.4.3 and GFX11 branches? I think the reserved_sdma_queues_bitmap was introduced after the 9.4.3 branch was created. Mukul, you worked on both, so you're probably in the best position to resolve this. Regards, Felix On 2023-05-25 16:07, Tom Rix wrote: > clang with W=1 reports > drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_device_queue_manager.c:122:24: error: > unused function 'get_reserved_sdma_queues_bitmap' [-Werror,-Wunused-function] > static inline uint64_t get_reserved_sdma_queues_bitmap(struct device_queue_manager *dqm) > ^ > This function is not used so remove it. > > Signed-off-by: Tom Rix <trix@redhat.com> > --- > drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 5 ----- > 1 file changed, 5 deletions(-) > > diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c > index 493b4b66f180..2fbd0a96424f 100644 > --- a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c > +++ b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c > @@ -119,11 +119,6 @@ unsigned int get_num_xgmi_sdma_queues(struct device_queue_manager *dqm) > dqm->dev->kfd->device_info.num_sdma_queues_per_engine; > } > > -static inline uint64_t get_reserved_sdma_queues_bitmap(struct device_queue_manager *dqm) > -{ > - return dqm->dev->kfd->device_info.reserved_sdma_queues_bitmap; > -} > - > static void init_sdma_bitmaps(struct device_queue_manager *dqm) > { > bitmap_zero(dqm->sdma_bitmap, KFD_MAX_SDMA_QUEUES); ^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH] drm/amdkfd: remove unused function get_reserved_sdma_queues_bitmap 2023-05-25 21:10 ` Felix Kuehling @ 2023-05-26 1:39 ` Joshi, Mukul 0 siblings, 0 replies; 4+ messages in thread From: Joshi, Mukul @ 2023-05-26 1:39 UTC (permalink / raw) To: Kuehling, Felix, Tom Rix, Deucher, Alexander, Koenig, Christian, Pan, Xinhui, airlied@gmail.com, daniel@ffwll.ch, nathan@kernel.org, ndesaulniers@google.com Cc: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev [AMD Official Use Only - General] > -----Original Message----- > From: Kuehling, Felix <Felix.Kuehling@amd.com> > Sent: Thursday, May 25, 2023 5:10 PM > To: Tom Rix <trix@redhat.com>; Deucher, Alexander > <Alexander.Deucher@amd.com>; Koenig, Christian > <Christian.Koenig@amd.com>; Pan, Xinhui <Xinhui.Pan@amd.com>; > airlied@gmail.com; daniel@ffwll.ch; nathan@kernel.org; > ndesaulniers@google.com; Joshi, Mukul <Mukul.Joshi@amd.com> > Cc: amd-gfx@lists.freedesktop.org; dri-devel@lists.freedesktop.org; linux- > kernel@vger.kernel.org; llvm@lists.linux.dev > Subject: Re: [PATCH] drm/amdkfd: remove unused function > get_reserved_sdma_queues_bitmap > > [+Mukul] > > Looks like this problem was introduced by Mukul's patch "drm/amdkfd: > Update SDMA queue management for GFX9.4.3". Could this be a merge > error between GFX 9.4.3 and GFX11 branches? I think the > reserved_sdma_queues_bitmap was introduced after the 9.4.3 branch was > created. Mukul, you worked on both, so you're probably in the best position > to resolve this. > Yes my patch introduced this regression. We need the get_reserved_sdma_queues_bitmap function. I will fix this regression and send out a new patch. Thanks for noticing/catching this. Regards, Mukul > Regards, > Felix > > > On 2023-05-25 16:07, Tom Rix wrote: > > clang with W=1 reports > > > drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_device_queue_manager.c:12 > 2:24: error: > > unused function 'get_reserved_sdma_queues_bitmap' > > [-Werror,-Wunused-function] static inline uint64_t > get_reserved_sdma_queues_bitmap(struct device_queue_manager *dqm) > > ^ > > This function is not used so remove it. > > > > Signed-off-by: Tom Rix <trix@redhat.com> > > --- > > drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 5 ----- > > 1 file changed, 5 deletions(-) > > > > diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c > > b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c > > index 493b4b66f180..2fbd0a96424f 100644 > > --- a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c > > +++ b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c > > @@ -119,11 +119,6 @@ unsigned int get_num_xgmi_sdma_queues(struct > device_queue_manager *dqm) > > dqm->dev->kfd- > >device_info.num_sdma_queues_per_engine; > > } > > > > -static inline uint64_t get_reserved_sdma_queues_bitmap(struct > > device_queue_manager *dqm) -{ > > - return dqm->dev->kfd- > >device_info.reserved_sdma_queues_bitmap; > > -} > > - > > static void init_sdma_bitmaps(struct device_queue_manager *dqm) > > { > > bitmap_zero(dqm->sdma_bitmap, KFD_MAX_SDMA_QUEUES); ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-05-26 1:39 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2023-05-25 20:07 [PATCH] drm/amdkfd: remove unused function get_reserved_sdma_queues_bitmap Tom Rix 2023-05-25 20:14 ` Nathan Chancellor 2023-05-25 21:10 ` Felix Kuehling 2023-05-26 1:39 ` Joshi, Mukul
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox