diff options
author | Philip Yang <Philip.Yang@amd.com> | 2021-09-14 16:33:40 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2021-09-23 15:17:29 -0400 |
commit | e7eb2137e84adc7c6594463fbb41b9962d311f16 (patch) | |
tree | 2d04952519f55aeda6e64940521fd34f89ec3488 /kernel/kheaders.c | |
parent | 1aed482819524b10923ef5171caea47e23bbf014 (diff) | |
download | linux-e7eb2137e84adc7c6594463fbb41b9962d311f16.tar.bz2 |
drm/amdkfd: fix dma mapping leaking warning
For xnack off, restore work dma unmap previous system memory page, and
dma map the updated system memory page to update GPU mapping, this is
not dma mapping leaking, remove the WARN_ONCE for dma mapping leaking.
prange->dma_addr store the VRAM page pfn after the range migrated to
VRAM, should not dma unmap VRAM page when updating GPU mapping or
remove prange. Add helper svm_is_valid_dma_mapping_addr to check VRAM
page and error cases.
Mask out SVM_RANGE_VRAM_DOMAIN flag in dma_addr before calling amdgpu vm
update to avoid BUG_ON(*addr & 0xFFFF00000000003FULL), and set it again
immediately after. This flag is used to know the type of page later to
dma unmapping system memory page.
Fixes: 1d5dbfe6c06a ("drm/amdkfd: classify and map mixed svm range pages in GPU")
Signed-off-by: Philip Yang <Philip.Yang@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'kernel/kheaders.c')
0 files changed, 0 insertions, 0 deletions