AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Felix Kuehling <felix.kuehling@amd.com>
To: Jesse Zhang <jesse.zhang@amd.com>, amd-gfx@lists.freedesktop.org
Cc: Alexander.Deucher@amd.com,
	Christian Koenig <christian.koenig@amd.com>,
	jonathan.kim@amd.com, Tim.Huang@amd.com
Subject: Re: [PATCH 2/8] drm/amdkfd: fix the kdf debugger issue
Date: Thu, 30 May 2024 16:47:28 -0400	[thread overview]
Message-ID: <01cb58cd-e8d7-4e5d-b5ef-f89cfa17614c@amd.com> (raw)
In-Reply-To: <20240530034720.2341171-1-jesse.zhang@amd.com>


On 2024-05-29 23:47, Jesse Zhang wrote:
> the expression caps | HSA_CAP_TRAP_DEBUG_PRECISE_MEMORY_OPERATIONS_SUPPORTED
> is always 1/true regardless of the values of its operand.
>
> Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com>

Please add a Fixes tag. I think this is the commit that introduced the 
problem:

commit 75de8428c3d632eacc7890b7cb39dbec04d286c3
Author: Jonathan Kim <jonathan.kim@amd.com>
Date:   Mon Aug 21 11:47:47 2023 -0400

     drm/amdkfd: enable single alu ops for gfx12

     GFX12 debugging requires setting up precise ALU operation for catching
     ALU exceptions.

     Signed-off-by: Jonathan Kim <jonathan.kim@amd.com>
     Tested-by: Lancelot Six <lancelot.six@amd.com>
     Reviewed-by: Eric Huang <jinhuieric.huang@amd.com>
     Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

> ---
>   drivers/gpu/drm/amd/amdkfd/kfd_debug.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_debug.c b/drivers/gpu/drm/amd/amdkfd/kfd_debug.c
> index 3f27bab7a502..4abd275056d6 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_debug.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_debug.c
> @@ -503,7 +503,7 @@ int kfd_dbg_trap_set_flags(struct kfd_process *target, uint32_t *flags)
>   				kfd_topology_device_by_id(target->pdds[i]->dev->id);
>   		uint32_t caps = topo_dev->node_props.capability;
>   
> -		if (!(caps | HSA_CAP_TRAP_DEBUG_PRECISE_MEMORY_OPERATIONS_SUPPORTED) &&
> +		if (!(caps & HSA_CAP_TRAP_DEBUG_PRECISE_MEMORY_OPERATIONS_SUPPORTED) &&

Looks like the same mistake was copied and pasted for 
HSA_CAP_TRAP_DEBUG_PRECISE_ALU_OPERATIONS_SUPPORTED a few lines below. 
Please fix that as well while you're at it.

Thanks,
   Felix


>   			(*flags & KFD_DBG_TRAP_FLAG_SINGLE_MEM_OP)) {
>   			*flags = prev_flags;
>   			return -EACCES;

  reply	other threads:[~2024-05-30 20:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-30  3:47 [PATCH 2/8] drm/amdkfd: fix the kdf debugger issue Jesse Zhang
2024-05-30 20:47 ` Felix Kuehling [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-05-31  2:51 Jesse Zhang
2024-05-31 18:45 ` Felix Kuehling

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=01cb58cd-e8d7-4e5d-b5ef-f89cfa17614c@amd.com \
    --to=felix.kuehling@amd.com \
    --cc=Alexander.Deucher@amd.com \
    --cc=Tim.Huang@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=christian.koenig@amd.com \
    --cc=jesse.zhang@amd.com \
    --cc=jonathan.kim@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox