Commit 0ea54b9b authored by Christian König's avatar Christian König Committed by Alex Deucher

drm/amdgpu: make the VMID owner always 64bit

Otherwise we could (in theory) run into problems on 32bit systems.
Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
Reviewed-by: default avatarChunming Zhou <david1.zhou@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 4d9c514d
...@@ -897,7 +897,7 @@ struct amdgpu_vm_id { ...@@ -897,7 +897,7 @@ struct amdgpu_vm_id {
struct amdgpu_sync active; struct amdgpu_sync active;
struct fence *last_flush; struct fence *last_flush;
struct amdgpu_ring *last_user; struct amdgpu_ring *last_user;
atomic_long_t owner; atomic64_t owner;
uint64_t pd_gpu_addr; uint64_t pd_gpu_addr;
/* last flushed PD/PT update */ /* last flushed PD/PT update */
......
...@@ -185,7 +185,7 @@ int amdgpu_vm_grab_id(struct amdgpu_vm *vm, struct amdgpu_ring *ring, ...@@ -185,7 +185,7 @@ int amdgpu_vm_grab_id(struct amdgpu_vm *vm, struct amdgpu_ring *ring,
if (!id) if (!id)
continue; continue;
if (atomic_long_read(&id->owner) != vm->client_id) if (atomic64_read(&id->owner) != vm->client_id)
continue; continue;
if (pd_addr != id->pd_gpu_addr) if (pd_addr != id->pd_gpu_addr)
...@@ -261,7 +261,7 @@ int amdgpu_vm_grab_id(struct amdgpu_vm *vm, struct amdgpu_ring *ring, ...@@ -261,7 +261,7 @@ int amdgpu_vm_grab_id(struct amdgpu_vm *vm, struct amdgpu_ring *ring,
list_move_tail(&id->list, &adev->vm_manager.ids_lru); list_move_tail(&id->list, &adev->vm_manager.ids_lru);
id->last_user = ring; id->last_user = ring;
atomic_long_set(&id->owner, vm->client_id); atomic64_set(&id->owner, vm->client_id);
vm->ids[ring->idx] = id; vm->ids[ring->idx] = id;
*vm_id = id - adev->vm_manager.ids; *vm_id = id - adev->vm_manager.ids;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment