• Oded Gabbay's avatar
    amdkfd: use schedule() in sync_with_hw · 9a5634a7
    Oded Gabbay authored
    amdkfd uses cpu_relax() in its sync_with_hw() function. Because cpu_relax() is
    defined as 'REP; NOP' on x86_64, it will block the CPU from servicing
    IOMMU PPR requests.
    
    This may cause a deadlock, because sync_with_hw() won't be completed
    until the PPR request has been served.
    
    Therefore, we need to use schedule() instead of cpu_relax() as it is the
    minimum requirement to allow other threads to execute.
    Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
    Signed-off-by: default avatarOded Gabbay <oded.gabbay@amd.com>
    9a5634a7
kfd_kernel_queue.c 8.78 KB