drm/amdgpu: address remove from fault filter
authorPhilip Yang <Philip.Yang@amd.com>
Tue, 20 Apr 2021 14:05:44 +0000 (10:05 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 29 Apr 2021 03:36:05 +0000 (23:36 -0400)
commit36255b5f619594504e9d76de23b58e99c5e08ceb
tree1e577bc472fe9602bb30e2b5d8fcc66c71cd82be
parent373e3ccd859b4bc52ccb511e00b0c14e7e57430a
drm/amdgpu: address remove from fault filter

Add interface to remove address from fault filter ring by resetting
fault ring entry key, then future vm fault on the address will be
processed to recover.

Define fault key as atomic64_t type to use atomic read/set/cmpxchg key
to protect fault ring access by interrupt handler and interrupt deferred
work for vg20. Change fault->timestamp to 48-bit to share same uint64_t
with 8-bit fault->next, it is enough for 48bit IH timestamp.

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>
drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h