drm/amdgpu: make amdgpu_vm_bo_lookup_mapping() take a raw address
Subsystems (3)
PATCH 1/4 drm/amdgpu: make amdgpu_vm_bo_lookup_mapping() take a raw address
amdgpu_vm_bo_lookup_mapping() expected callers to pre-shift the address to a page frame number before calling in, unlike its sibling functions amdgpu_vm_bo_map() and amdgpu_vm_bo_replace_map(), which accept a raw address and shift internally. This inconsistency meant every caller had to duplicate the same shift to make it pfn and many place the shift is not AMDGPU_GPU_PAGE_SHIFT but normal PAGE_SHIFT too.
Move the shift inside amdgpu_vm_bo_lookup_mapping() and update all callers to stop pre-shifting, so the function's calling convention matches its siblings.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 2 -- drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c | 8 +++----- drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c | 9 +++------ drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 1 + drivers/gpu/drm/amd/amdgpu/mes_userqueue.c | 2 +- drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 2 +- drivers/gpu/drm/amd/amdkfd/kfd_queue.c | 10 +++++----- 8 files changed, 15 insertions(+), 21 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +0 -2
@@ -1809,8 +1809,6 @@ int amdgpu_cs_find_mapping(struct amdgpu_cs_parser *parser,struct amdgpu_bo_va_mapping *mapping;int i, r; - addr /=AMDGPU_GPU_PAGE_SIZE ; - mapping =amdgpu_vm_bo_lookup_mapping (vm, addr);if (!mapping || !mapping->bo_va || !mapping->bo_va->base.bo)return -EINVAL ;
drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c +3 -5
@@ -256,10 +256,9 @@ amdgpu_devcoredump_print_ibs(struct drm_printer *p, goto unlock;for (int i =0 ; i < coredump->num_ibs; i++) { -u64 pfn = (coredump->ibs[i].gpu_addr & -AMDGPU_GMC_HOLE_MASK ) /AMDGPU_GPU_PAGE_SIZE ; +u64 addr = coredump->ibs[i].gpu_addr &AMDGPU_GMC_HOLE_MASK ; - mapping =amdgpu_vm_bo_lookup_mapping (vm, pfn); + mapping =amdgpu_vm_bo_lookup_mapping (vm, addr);if (!mapping)continue ;
@@ -280,8 +279,7 @@ amdgpu_devcoredump_print_ibs(struct drm_printer *p,continue ; va_start = coredump->ibs[i].gpu_addr &AMDGPU_GMC_HOLE_MASK ; - mapping =amdgpu_vm_bo_lookup_mapping (vm, - va_start /AMDGPU_GPU_PAGE_SIZE ); + mapping =amdgpu_vm_bo_lookup_mapping (vm, va_start);if (!mapping) goto output_ib_content;
drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c +3 -6
@@ -241,7 +241,6 @@ int amdgpu_userq_input_va_validate(struct amdgpu_device *adev,struct amdgpu_vm *vm = queue->vm;u64 start_addr;u64 end_addr; -u64 start_page;/* Caller must hold vm->root.bo reservation */ dma_resv_assert_held (queue->vm->root.bo->tbo.base.resv);
@@ -253,16 +252,14 @@ int amdgpu_userq_input_va_validate(struct amdgpu_device *adev,if (check_add_overflow (start_addr, expected_size -1 , &end_addr))return -EINVAL ; - start_page = start_addr >>AMDGPU_GPU_PAGE_SHIFT ; - - va_map =amdgpu_vm_bo_lookup_mapping (vm, start_page); + va_map =amdgpu_vm_bo_lookup_mapping (vm, start_addr);if (!va_map)return -EINVAL ; -/* Lookup guarantees start_page is mapped; ensure full span is covered. */ +/* Lookup guarantees start_addr is mapped; ensure full span is covered. */ if ((end_addr >>AMDGPU_GPU_PAGE_SHIFT ) <= va_map->last) { va_map->bo_va->userq_va_mapped = true; - *va_out = start_page; + *va_out = start_addr;return 0 ; }
drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c +1 -1
@@ -385,7 +385,7 @@ static int amdgpu_userq_fence_read_wptr(struct amdgpu_device *adev,if (unlikely (ret)) goto lock_error; - mapping =amdgpu_vm_bo_lookup_mapping (queue->vm, addr >>PAGE_SHIFT ); + mapping =amdgpu_vm_bo_lookup_mapping (queue->vm, addr);if (!mapping) { ret = -EINVAL ; goto lock_error;
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +1 -0
@@ -2165,6 +2165,7 @@ int amdgpu_vm_bo_clear_mappings(struct amdgpu_device *adev,struct amdgpu_bo_va_mapping *amdgpu_vm_bo_lookup_mapping (struct amdgpu_vm *vm,uint64_t addr) { + addr /=AMDGPU_GPU_PAGE_SIZE ;return amdgpu_vm_it_iter_first (&vm->va, addr, addr); }
drivers/gpu/drm/amd/amdgpu/mes_userqueue.c +1 -1
@@ -53,7 +53,7 @@ mes_userq_create_wptr_mapping(struct amdgpu_device *adev,if (unlikely (ret)) goto fail_lock; - wptr_mapping =amdgpu_vm_bo_lookup_mapping (vm, wptr >>PAGE_SHIFT ); + wptr_mapping =amdgpu_vm_bo_lookup_mapping (vm, wptr);if (!wptr_mapping) { ret = -EINVAL ; goto fail_lock;
drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c +1 -1
@@ -2064,7 +2064,7 @@ static int vcn_v1_0_validate_bo(struct amdgpu_cs_parser *parser,return -EINVAL ; } - mapping =amdgpu_vm_bo_lookup_mapping (vm, addr/AMDGPU_GPU_PAGE_SIZE ); + mapping =amdgpu_vm_bo_lookup_mapping (vm, addr);if (!mapping || !mapping->bo_va || !mapping->bo_va->base.bo)return -EINVAL ;
drivers/gpu/drm/amd/amdkfd/kfd_queue.c +5 -5
@@ -197,18 +197,18 @@ int kfd_queue_buffer_get(struct amdgpu_vm *vm, void __user *addr, struct amdgpu_ u64 expected_size) {struct amdgpu_bo_va_mapping *mapping; -u64 user_addr; +u64 user_pfn;u64 size; - user_addr = (u64 )addr >>AMDGPU_GPU_PAGE_SHIFT ; size = expected_size >>AMDGPU_GPU_PAGE_SHIFT ; - mapping =amdgpu_vm_bo_lookup_mapping (vm, user_addr); + mapping =amdgpu_vm_bo_lookup_mapping (vm, (u64 )(uintptr_t )addr);if (!mapping) goto out_err; -if (user_addr != mapping->start || - (size !=0 && user_addr + size -1 != mapping->last)) { + user_pfn = (u64 )(uintptr_t )addr >>AMDGPU_GPU_PAGE_SHIFT ; +if (user_pfn != mapping->start || + (size !=0 && user_pfn + size -1 != mapping->last)) {pr_debug ("expected size 0x%llx not equal to mapping addr 0x%llx size 0x%llx\n" , expected_size, mapping->start <<AMDGPU_GPU_PAGE_SHIFT , (mapping->last - mapping->start +1 ) <<AMDGPU_GPU_PAGE_SHIFT );
Signature · 1 line
2.34.1
PATCH 2/4 drm/amdgpu/userq: update the kernel docs for amdgpu_userq_fence_read_wptr
update the kernel docs for amdgpu_userq_fence_read_wptr.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c +1 -1
@@ -361,7 +361,7 @@ static const struct dma_fence_ops amdgpu_userq_fence_ops = {* * Read the wptr value from userq's MQD. The userq signal IOCTL * creates a dma_fence for the shared buffers that expects the -* RPTR value written to seq64 memory >= WPTR. +* fence_val written to seq64 fence address >= WPTR. * * Returns wptr value on success, error on failure. */
Signature · 1 line
2.34.1
Christian König
maintainerRe: [PATCH v1 2/4] drm/amdgpu/userq: update the kernel docs for amdgpu_userq_fence_read_wptr
Quoted 12 lines · Sunil Khatri
update the kernel docs for
amdgpu_userq_fence_read_wptr.Signed-off-by Sunil Khatri <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c +0
-0
drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c static const struct dma_fence_ops amdgpu_userq_fence_ops = { · line 364
Quoted 5 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c +1
-1@@ -361,7 +361,7 @@ static const struct dma_fence_ops amdgpu_userq_fence_ops = {* * Read the wptr value from userq's MQD. The userq signal IOCTL * creates a dma_fence for the shared buffers that expects the -* RPTR value written to seq64 memory >= WPTR. +* fence_val written to seq64 fence address >= WPTR.
Mhm, that isn't ideal either. Maybe use something like this:
Read the wptr value from userq's MQD. This value will become the rptr when the HW executes the commands and written it to the seq64 memory. This way the wptr can be used a seq_no to create a dma_fence.
Regards,
Christian.
Quoted 3 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c +0
-0* * Returns wptr value on success, error on failure. */
PATCH 3/4 drm/amdgpu: use AMDGPU_GPU_PAGE_SHIFT instead of PAGE_SHIFT
In reply to Sunil KhatriFor different address types the variable PAGE_SHIFT might not work well and it's better to use the GPU specific one
--- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +1 -1
@@ -2090,7 +2090,7 @@ int amdgpu_vm_bo_clear_mappings(struct amdgpu_device *adev, after->start = eaddr +1 ; after->last = tmp->last; after->offset = tmp->offset; - after->offset += (after->start - tmp->start) <<PAGE_SHIFT ; + after->offset += (after->start - tmp->start) <<AMDGPU_GPU_PAGE_SHIFT ; after->flags = tmp->flags; after->bo_va = tmp->bo_va;list_add (&after->list, &tmp->bo_va->invalids);
Signature · 1 line
2.34.1
Christian König
maintainerRe: [PATCH v1 3/4] drm/amdgpu: use AMDGPU_GPU_PAGE_SHIFT instead of PAGE_SHIFT
Quoted 4 lines · Sunil Khatri
For different address types the variable
PAGE_SHIFTmight not work well and it's better to use the GPU specific oneSigned-off-by Sunil Khatri <[email protected]>
Oh good catch, Reviewed-by: Christian König <[email protected]>
This patch might need a CC stable as well.
Regards,
Christian.
Quoted 17 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +1
-1@@ -2090,7 +2090,7 @@ int amdgpu_vm_bo_clear_mappings(struct amdgpu_device *adev, after->start = eaddr +1 ; after->last = tmp->last; after->offset = tmp->offset; - after->offset += (after->start - tmp->start) <<PAGE_SHIFT ; + after->offset += (after->start - tmp->start) <<AMDGPU_GPU_PAGE_SHIFT ; after->flags = tmp->flags; after->bo_va = tmp->bo_va;list_add (&after->list, &tmp->bo_va->invalids);
PATCH 4/4 drm/amdgpu: fix Idle BOs list in VM debugfs status info
In reply to Sunil Khatriamdgpu_debugfs_vm_bo_status_info() prints the "Idle BOs" section by iterating lists->needs_update, the same list already printed just above under "Moved BOs". struct amdgpu_vm_bo_status has a dedicated idle list, populated whenever a BO's state machine settles, but it was never read here, so genuinely idle BOs never show up in the debugfs output and the "Idle BOs" section duplicates "Moved BOs" instead.
Iterate lists->idle for the "Idle BOs" section.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +1 -1
@@ -3121,7 +3121,7 @@ static void amdgpu_debugfs_vm_bo_status_info(struct seq_file *m, id =0 ;seq_puts (m,"\tIdle BOs:\n" ); -list_for_each_entry (base, &lists->needs_update, vm_status) { +list_for_each_entry (base, &lists->idle, vm_status) {if (!base->bo)continue ;
Signature · 1 line
2.34.1
Re: [PATCH v1 4/4] drm/amdgpu: fix Idle BOs list in VM debugfs status info
Series is:
Quoted 33 lines · Sunil Khatri
amdgpu_debugfs_vm_bo_status_info()prints the "Idle BOs" section by iteratinglists->needs_update, the same list already printed just above under "Moved BOs". structamdgpu_vm_bo_statushas a dedicated idle list, populated whenever a BO's state machine settles, but it was never read here, so genuinely idle BOs never show up in the debugfs output and the "Idle BOs" section duplicates "Moved BOs" instead.Iterate
lists->idlefor the "Idle BOs" section.Fixes 4cdbba5a16aa ("drm/amdgpu: restructure VM state machine v4")Signed-off-by Sunil Khatri <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +1
-2@@ -3121,7 +3121,7 @@ static void amdgpu_debugfs_vm_bo_status_info(struct seq_file *m, id =0 ;seq_puts (m,"\tIdle BOs:\n" ); -list_for_each_entry (base, &lists->needs_update, vm_status) { +list_for_each_entry (base, &lists->idle, vm_status) {if (!base->bo)continue ; --2.34.1
Re: [PATCH v1 4/4] drm/amdgpu: fix Idle BOs list in VM debugfs status info
In reply to Sunil KhatriQuoted 8 lines · Sunil Khatri
amdgpu_debugfs_vm_bo_status_info()prints the "Idle BOs" section by iteratinglists->needs_update, the same list already printed just above under "Moved BOs". structamdgpu_vm_bo_statushas a dedicated idle list, populated whenever a BO's state machine settles, but it was never read here, so genuinely idle BOs never show up in the debugfs output and the "Idle BOs" section duplicates "Moved BOs" instead.
Quoted 4 lines
Iterate
lists->idlefor the "Idle BOs" section.Fixes 4cdbba5a16aa ("drm/amdgpu: restructure VM state machine v4")Signed-off-by Sunil Khatri <[email protected]>
Quoted 17 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +1
-1@@ -3121,7 +3121,7 @@ static void amdgpu_debugfs_vm_bo_status_info(struct seq_file *m, id =0 ;seq_puts (m,"\tIdle BOs:\n" ); -list_for_each_entry (base, &lists->needs_update, vm_status) { +list_for_each_entry (base, &lists->idle, vm_status) {if (!base->bo)continue ;
Christian König
maintainerQuoted 82 lines · Sunil Khatri
amdgpu_vm_bo_lookup_mapping()expected callers to pre-shift the address to a page frame number before calling in, unlike its sibling functionsamdgpu_vm_bo_map()andamdgpu_vm_bo_replace_map(), which accept a raw address and shift internally. This inconsistency meant every caller had to duplicate the same shift to make it pfn and many place the shift is notAMDGPU_GPU_PAGE_SHIFTbut normalPAGE_SHIFTtoo.Move the shift inside
amdgpu_vm_bo_lookup_mapping()and update all callers to stop pre-shifting, so the function's calling convention matches its siblings.Signed-off-by Sunil Khatri <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 2 -- drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c | 8 +++----- drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c | 9 +++------ drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 1 + drivers/gpu/drm/amd/amdgpu/mes_userqueue.c | 2 +- drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 2 +- drivers/gpu/drm/amd/amdkfd/kfd_queue.c | 10 +++++----- 8 files changed, 15 insertions(+), 21 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +0
-2@@ -1809,8 +1809,6 @@ int amdgpu_cs_find_mapping(struct amdgpu_cs_parser *parser,struct amdgpu_bo_va_mapping *mapping;int i, r; - addr /=AMDGPU_GPU_PAGE_SIZE ; - mapping =amdgpu_vm_bo_lookup_mapping (vm, addr);if (!mapping || !mapping->bo_va || !mapping->bo_va->base.bo)return -EINVAL ;drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c +3
-5@@ -256,10 +256,9 @@ amdgpu_devcoredump_print_ibs(struct drm_printer *p, goto unlock;for (int i =0 ; i < coredump->num_ibs; i++) { -u64 pfn = (coredump->ibs[i].gpu_addr & -AMDGPU_GMC_HOLE_MASK ) /AMDGPU_GPU_PAGE_SIZE ; +u64 addr = coredump->ibs[i].gpu_addr &AMDGPU_GMC_HOLE_MASK ; - mapping =amdgpu_vm_bo_lookup_mapping (vm, pfn); + mapping =amdgpu_vm_bo_lookup_mapping (vm, addr);if (!mapping)continue ;@@ -280,8 +279,7 @@ amdgpu_devcoredump_print_ibs(struct drm_printer *p,continue ; va_start = coredump->ibs[i].gpu_addr &AMDGPU_GMC_HOLE_MASK ; - mapping =amdgpu_vm_bo_lookup_mapping (vm, - va_start /AMDGPU_GPU_PAGE_SIZE ); + mapping =amdgpu_vm_bo_lookup_mapping (vm, va_start);if (!mapping) goto output_ib_content;drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c +0
-4@@ -241,7 +241,6 @@ int amdgpu_userq_input_va_validate(struct amdgpu_device *adev,struct amdgpu_vm *vm = queue->vm;u64 start_addr;u64 end_addr; -u64 start_page;/* Caller must hold vm->root.bo reservation */ dma_resv_assert_held (queue->vm->root.bo->tbo.base.resv);@@ -253,16 +252,14 @@ int amdgpu_userq_input_va_validate(struct amdgpu_device *adev,if (check_add_overflow (start_addr, expected_size -1 , &end_addr))return -EINVAL ; - start_page = start_addr >>AMDGPU_GPU_PAGE_SHIFT ; - - va_map =amdgpu_vm_bo_lookup_mapping (vm, start_page);
drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c int amdgpu_userq_input_va_validate(struct amdgpu_device *adev, · line 262
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c +3
-2+ va_map =amdgpu_vm_bo_lookup_mapping (vm, start_addr);if (!va_map)return -EINVAL ; -/* Lookup guarantees start_page is mapped; ensure full span is covered. */ +/* Lookup guarantees start_addr is mapped; ensure full span is covered. */ if ((end_addr >>AMDGPU_GPU_PAGE_SHIFT ) <= va_map->last) { va_map->bo_va->userq_va_mapped = true; - *va_out = start_page; + *va_out = start_addr;
What is va_out used for? Cause that is now an address instead of a pfn.
Apart from that it looks good to me.
Regards,
Christian.
Quoted 82 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c +0
-0return 0 ; }drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c +1
-1@@ -385,7 +385,7 @@ static int amdgpu_userq_fence_read_wptr(struct amdgpu_device *adev,if (unlikely (ret)) goto lock_error; - mapping =amdgpu_vm_bo_lookup_mapping (queue->vm, addr >>PAGE_SHIFT ); + mapping =amdgpu_vm_bo_lookup_mapping (queue->vm, addr);if (!mapping) { ret = -EINVAL ; goto lock_error;drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +1
-0@@ -2165,6 +2165,7 @@ int amdgpu_vm_bo_clear_mappings(struct amdgpu_device *adev,struct amdgpu_bo_va_mapping *amdgpu_vm_bo_lookup_mapping (struct amdgpu_vm *vm,uint64_t addr) { + addr /=AMDGPU_GPU_PAGE_SIZE ;return amdgpu_vm_it_iter_first (&vm->va, addr, addr); }drivers/gpu/drm/amd/amdgpu/mes_userqueue.c +1
-1@@ -53,7 +53,7 @@ mes_userq_create_wptr_mapping(struct amdgpu_device *adev,if (unlikely (ret)) goto fail_lock; - wptr_mapping =amdgpu_vm_bo_lookup_mapping (vm, wptr >>PAGE_SHIFT ); + wptr_mapping =amdgpu_vm_bo_lookup_mapping (vm, wptr);if (!wptr_mapping) { ret = -EINVAL ; goto fail_lock;drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c +1
-1@@ -2064,7 +2064,7 @@ static int vcn_v1_0_validate_bo(struct amdgpu_cs_parser *parser,return -EINVAL ; } - mapping =amdgpu_vm_bo_lookup_mapping (vm, addr/AMDGPU_GPU_PAGE_SIZE ); + mapping =amdgpu_vm_bo_lookup_mapping (vm, addr);if (!mapping || !mapping->bo_va || !mapping->bo_va->base.bo)return -EINVAL ;drivers/gpu/drm/amd/amdkfd/kfd_queue.c +5
-5@@ -197,18 +197,18 @@ int kfd_queue_buffer_get(struct amdgpu_vm *vm, void __user *addr, struct amdgpu_ u64 expected_size) {struct amdgpu_bo_va_mapping *mapping; -u64 user_addr; +u64 user_pfn;u64 size; - user_addr = (u64 )addr >>AMDGPU_GPU_PAGE_SHIFT ; size = expected_size >>AMDGPU_GPU_PAGE_SHIFT ; - mapping =amdgpu_vm_bo_lookup_mapping (vm, user_addr); + mapping =amdgpu_vm_bo_lookup_mapping (vm, (u64 )(uintptr_t )addr);if (!mapping) goto out_err; -if (user_addr != mapping->start || - (size !=0 && user_addr + size -1 != mapping->last)) { + user_pfn = (u64 )(uintptr_t )addr >>AMDGPU_GPU_PAGE_SHIFT ; +if (user_pfn != mapping->start || + (size !=0 && user_pfn + size -1 != mapping->last)) {pr_debug ("expected size 0x%llx not equal to mapping addr 0x%llx size 0x%llx\n" , expected_size, mapping->start <<AMDGPU_GPU_PAGE_SHIFT , (mapping->last - mapping->start +1 ) <<AMDGPU_GPU_PAGE_SHIFT );