Patch "drm/amdgpu: SDMA update use unlocked iterator" has been added to the 6.0-stable tree

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

 



This is a note to let you know that I've just added the patch titled

    drm/amdgpu: SDMA update use unlocked iterator

to the 6.0-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     drm-amdgpu-sdma-update-use-unlocked-iterator.patch
and it can be found in the queue-6.0 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 9b70c754cd9f43a24a25f5edf9c5f64307b8f890
Author: Philip Yang <Philip.Yang@xxxxxxx>
Date:   Tue Sep 13 15:46:30 2022 -0400

    drm/amdgpu: SDMA update use unlocked iterator
    
    [ Upstream commit 3913f0179ba366f7d7d160c506ce00de1602bbc4 ]
    
    SDMA update page table may be called from unlocked context, this
    generate below warning. Use unlocked iterator to handle this case.
    
    WARNING: CPU: 0 PID: 1475 at
    drivers/dma-buf/dma-resv.c:483 dma_resv_iter_next
    Call Trace:
     dma_resv_iter_first+0x43/0xa0
     amdgpu_vm_sdma_update+0x69/0x2d0 [amdgpu]
     amdgpu_vm_ptes_update+0x29c/0x870 [amdgpu]
     amdgpu_vm_update_range+0x2f6/0x6c0 [amdgpu]
     svm_range_unmap_from_gpus+0x115/0x300 [amdgpu]
     svm_range_cpu_invalidate_pagetables+0x510/0x5e0 [amdgpu]
     __mmu_notifier_invalidate_range_start+0x1d3/0x230
     unmap_vmas+0x140/0x150
     unmap_region+0xa8/0x110
    
    Signed-off-by: Philip Yang <Philip.Yang@xxxxxxx>
    Suggested-by: Felix Kuehling <felix.kuehling@xxxxxxx>
    Reviewed-by: Christian König <christian.koenig@xxxxxxx>
    Signed-off-by: Alex Deucher <alexander.deucher@xxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c
index 1fd3cbca20a2..718db7d98e5a 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c
@@ -211,12 +211,15 @@ static int amdgpu_vm_sdma_update(struct amdgpu_vm_update_params *p,
 	int r;
 
 	/* Wait for PD/PT moves to be completed */
-	dma_resv_for_each_fence(&cursor, bo->tbo.base.resv,
-				DMA_RESV_USAGE_KERNEL, fence) {
+	dma_resv_iter_begin(&cursor, bo->tbo.base.resv, DMA_RESV_USAGE_KERNEL);
+	dma_resv_for_each_fence_unlocked(&cursor, fence) {
 		r = amdgpu_sync_fence(&p->job->sync, fence);
-		if (r)
+		if (r) {
+			dma_resv_iter_end(&cursor);
 			return r;
+		}
 	}
+	dma_resv_iter_end(&cursor);
 
 	do {
 		ndw = p->num_dw_left;



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux