All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amdkfd: Fix type of 'dbg_flags' in 'struct kfd_process'
@ 2023-12-21 17:39 Srinivasan Shanmugam
  2023-12-21 18:00 ` Felix Kuehling
  0 siblings, 1 reply; 3+ messages in thread
From: Srinivasan Shanmugam @ 2023-12-21 17:39 UTC (permalink / raw)
  To: Alex Deucher, Christian König, Felix Kuehling, Lijo Lazar
  Cc: Srinivasan Shanmugam, amd-gfx

dbg_flags looks to be defined with incorrect data type; to process
multiple debug flag options, and hence defined dbg_flags as u32.

Fixes the below:

drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_packet_manager_v9.c:117 pm_map_process_aldebaran() warn: maybe use && instead of &

Suggested-by: Lijo Lazar <lijo.lazar@amd.com>
Cc: Felix Kuehling <Felix.Kuehling@amd.com>
Cc: Christian König <christian.koenig@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>
---
 drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h b/drivers/gpu/drm/amd/amdkfd/kfd_priv.h
index 45366b4ca976..745024b31340 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_priv.h
@@ -970,7 +970,7 @@ struct kfd_process {
 	struct work_struct debug_event_workarea;
 
 	/* Tracks debug per-vmid request for debug flags */
-	bool dbg_flags;
+	u32 dbg_flags;
 
 	atomic_t poison;
 	/* Queues are in paused stated because we are in the process of doing a CRIU checkpoint */
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/amdkfd: Fix type of 'dbg_flags' in 'struct kfd_process'
  2023-12-21 17:39 [PATCH] drm/amdkfd: Fix type of 'dbg_flags' in 'struct kfd_process' Srinivasan Shanmugam
@ 2023-12-21 18:00 ` Felix Kuehling
  2023-12-29  9:52   ` SRINIVASAN SHANMUGAM
  0 siblings, 1 reply; 3+ messages in thread
From: Felix Kuehling @ 2023-12-21 18:00 UTC (permalink / raw)
  To: Srinivasan Shanmugam, Alex Deucher, Christian König, Lijo Lazar
  Cc: amd-gfx

On 2023-12-21 12:39, Srinivasan Shanmugam wrote:
> dbg_flags looks to be defined with incorrect data type; to process
> multiple debug flag options, and hence defined dbg_flags as u32.
>
> Fixes the below:
>
> drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_packet_manager_v9.c:117 pm_map_process_aldebaran() warn: maybe use && instead of &

Please add a Fixes-tag:

Fixes: 0de4ec9a0353 ("drm/amdgpu: prepare map process for multi-process 
debug devices")


>
> Suggested-by: Lijo Lazar <lijo.lazar@amd.com>
> Cc: Felix Kuehling <Felix.Kuehling@amd.com>
> Cc: Christian König <christian.koenig@amd.com>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>
> ---
>   drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h b/drivers/gpu/drm/amd/amdkfd/kfd_priv.h
> index 45366b4ca976..745024b31340 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_priv.h
> @@ -970,7 +970,7 @@ struct kfd_process {
>   	struct work_struct debug_event_workarea;
>   
>   	/* Tracks debug per-vmid request for debug flags */
> -	bool dbg_flags;
> +	u32 dbg_flags;

For consistency with the rest of this header file, I'd prefer we use 
uint32_t here. Other than that, the patch is

Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>


>   
>   	atomic_t poison;
>   	/* Queues are in paused stated because we are in the process of doing a CRIU checkpoint */

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/amdkfd: Fix type of 'dbg_flags' in 'struct kfd_process'
  2023-12-21 18:00 ` Felix Kuehling
@ 2023-12-29  9:52   ` SRINIVASAN SHANMUGAM
  0 siblings, 0 replies; 3+ messages in thread
From: SRINIVASAN SHANMUGAM @ 2023-12-29  9:52 UTC (permalink / raw)
  To: Felix Kuehling, Alex Deucher, Christian König, Lijo Lazar; +Cc: amd-gfx


On 12/21/2023 11:30 PM, Felix Kuehling wrote:
> On 2023-12-21 12:39, Srinivasan Shanmugam wrote:
>> dbg_flags looks to be defined with incorrect data type; to process
>> multiple debug flag options, and hence defined dbg_flags as u32.
>>
>> Fixes the below:
>>
>> drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_packet_manager_v9.c:117 
>> pm_map_process_aldebaran() warn: maybe use && instead of &
>
> Please add a Fixes-tag:
>
> Fixes: 0de4ec9a0353 ("drm/amdgpu: prepare map process for 
> multi-process debug devices")
>
>
>>
>> Suggested-by: Lijo Lazar <lijo.lazar@amd.com>
>> Cc: Felix Kuehling <Felix.Kuehling@amd.com>
>> Cc: Christian König <christian.koenig@amd.com>
>> Cc: Alex Deucher <alexander.deucher@amd.com>
>> Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>
>> ---
>>   drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h 
>> b/drivers/gpu/drm/amd/amdkfd/kfd_priv.h
>> index 45366b4ca976..745024b31340 100644
>> --- a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h
>> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_priv.h
>> @@ -970,7 +970,7 @@ struct kfd_process {
>>       struct work_struct debug_event_workarea;
>>         /* Tracks debug per-vmid request for debug flags */
>> -    bool dbg_flags;
>> +    u32 dbg_flags;
>
> For consistency with the rest of this header file, I'd prefer we use 
> uint32_t here. Other than that, the patch is

Thanks for reviews & feedbacks Felix! I have proposed an another patch 
"[PATCH] drm/amdkfd: Prefer kernel data types u8, u16, u32, u64 in 
amdkfd/kfd_priv.h", where I have changed to u8, u16, u32, u64, for 
consistency, which is the preferred way as per kernel coding style.

Regards,

Srini

>
> Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
>
>
>>         atomic_t poison;
>>       /* Queues are in paused stated because we are in the process of 
>> doing a CRIU checkpoint */

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-12-29  9:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-21 17:39 [PATCH] drm/amdkfd: Fix type of 'dbg_flags' in 'struct kfd_process' Srinivasan Shanmugam
2023-12-21 18:00 ` Felix Kuehling
2023-12-29  9:52   ` SRINIVASAN SHANMUGAM

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.