[PATCH 2/8] drm/amdkfd: fix the kdf debugger issue
Felix Kuehling
felix.kuehling at amd.com
Thu May 30 20:47:28 UTC 2024
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 at amd.com>
Please add a Fixes tag. I think this is the commit that introduced the
problem:
commit 75de8428c3d632eacc7890b7cb39dbec04d286c3
Author: Jonathan Kim <jonathan.kim at 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 at amd.com>
Tested-by: Lancelot Six <lancelot.six at amd.com>
Reviewed-by: Eric Huang <jinhuieric.huang at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at 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;
More information about the amd-gfx
mailing list