summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h
diff options
context:
space:
mode:
authorYiPeng Chai <YiPeng.Chai@amd.com>2025-07-24 15:34:29 +0800
committerAlex Deucher <alexander.deucher@amd.com>2025-07-28 16:40:06 -0400
commitf3486918979030f8982e1af901561dbd6e2cd1bc (patch)
treeb21eabca436b6d0c3a5a1e3a813bf9164b0ebcc8 /drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h
parentd45c5e6845a76169ef3d6076f0f04487e5776905 (diff)
drm/amdgpu: support ras critical address check
Support ras critical address check. Signed-off-by: YiPeng Chai <YiPeng.Chai@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h
index aa155cb5d58e..434e23c84962 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h
@@ -496,6 +496,13 @@ struct ras_ecc_log_info {
uint64_t prev_de_queried_count;
};
+struct ras_critical_region {
+ struct list_head node;
+ struct amdgpu_bo *bo;
+ uint64_t start;
+ uint64_t size;
+};
+
struct amdgpu_ras {
/* ras infrastructure */
/* for ras itself. */
@@ -575,6 +582,10 @@ struct amdgpu_ras {
char init_task_comm[TASK_COMM_LEN];
int bad_page_num;
+
+ struct list_head critical_region_head;
+ struct mutex critical_region_lock;
+
};
struct ras_fs_data {
@@ -979,6 +990,9 @@ int amdgpu_ras_mark_ras_event_caller(struct amdgpu_device *adev, enum ras_event_
int amdgpu_ras_reserve_page(struct amdgpu_device *adev, uint64_t pfn);
+int amdgpu_ras_add_critical_region(struct amdgpu_device *adev, struct amdgpu_bo *bo);
+bool amdgpu_ras_check_critical_address(struct amdgpu_device *adev, uint64_t addr);
+
int amdgpu_ras_put_poison_req(struct amdgpu_device *adev,
enum amdgpu_ras_block block, uint16_t pasid,
pasid_notify pasid_fn, void *data, uint32_t reset);