Re: [PATCH 2/8] drm/amdkfd: fix the kdf debugger issue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2024-05-30 22:51, Jesse Zhang wrote:
The expression caps | HSA_CAP_TRAP_DEBUG_PRECISE_MEMORY_OPERATIONS_SUPPORTED
and  caps | HSA_CAP_TRAP_DEBUG_PRECISE_ALU_OPERATIONS_SUPPORTED
are always 1/true regardless of the values of its operand.

Fixes: 75de8428c3d632 ("drm/amdkfd: enable single alu ops for gfx12")
Signed-off-by: Jesse Zhang <Jesse.Zhang@xxxxxxx>
Suggested-by: Felix Kuehling <felix.kuehling@xxxxxxx>

Reviewed-by: Felix Kuehling <felix.kuehling@xxxxxxx>


---
  drivers/gpu/drm/amd/amdkfd/kfd_debug.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_debug.c b/drivers/gpu/drm/amd/amdkfd/kfd_debug.c
index 3f27bab7a502..34a282540c7e 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_debug.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_debug.c
@@ -503,13 +503,13 @@ 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) &&
  			(*flags & KFD_DBG_TRAP_FLAG_SINGLE_MEM_OP)) {
  			*flags = prev_flags;
  			return -EACCES;
  		}
- if (!(caps | HSA_CAP_TRAP_DEBUG_PRECISE_ALU_OPERATIONS_SUPPORTED) &&
+		if (!(caps & HSA_CAP_TRAP_DEBUG_PRECISE_ALU_OPERATIONS_SUPPORTED) &&
  		    (*flags & KFD_DBG_TRAP_FLAG_SINGLE_ALU_OP)) {
  			*flags = prev_flags;
  			return -EACCES;



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux