Commit 181c93e5 authored by Tao Zhou's avatar Tao Zhou Committed by Alex Deucher

drm/amdgpu: move umc ras fini to umc block

it's more suitable to put umc ras fini in umc block
Signed-off-by: default avatarTao Zhou <tao.zhou1@amd.com>
Reviewed-by: default avatarGuchun Chen <guchun.chen@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent f2575941
...@@ -309,17 +309,7 @@ bool amdgpu_gmc_filter_faults(struct amdgpu_device *adev, uint64_t addr, ...@@ -309,17 +309,7 @@ bool amdgpu_gmc_filter_faults(struct amdgpu_device *adev, uint64_t addr,
void amdgpu_gmc_ras_fini(struct amdgpu_device *adev) void amdgpu_gmc_ras_fini(struct amdgpu_device *adev)
{ {
if (amdgpu_ras_is_supported(adev, AMDGPU_RAS_BLOCK__UMC) && amdgpu_umc_ras_fini(adev);
adev->umc.ras_if) {
struct ras_common_if *ras_if = adev->umc.ras_if;
struct ras_ih_if ih_info = {
.head = *ras_if,
.cb = amdgpu_umc_process_ras_data_cb,
};
amdgpu_ras_late_fini(adev, ras_if, &ih_info);
kfree(ras_if);
}
if (amdgpu_ras_is_supported(adev, AMDGPU_RAS_BLOCK__MMHUB) && if (amdgpu_ras_is_supported(adev, AMDGPU_RAS_BLOCK__MMHUB) &&
adev->mmhub.ras_if) { adev->mmhub.ras_if) {
......
...@@ -74,6 +74,21 @@ int amdgpu_umc_ras_late_init(struct amdgpu_device *adev) ...@@ -74,6 +74,21 @@ int amdgpu_umc_ras_late_init(struct amdgpu_device *adev)
return r; return r;
} }
void amdgpu_umc_ras_fini(struct amdgpu_device *adev)
{
if (amdgpu_ras_is_supported(adev, AMDGPU_RAS_BLOCK__UMC) &&
adev->umc.ras_if) {
struct ras_common_if *ras_if = adev->umc.ras_if;
struct ras_ih_if ih_info = {
.head = *ras_if,
.cb = amdgpu_umc_process_ras_data_cb,
};
amdgpu_ras_late_fini(adev, ras_if, &ih_info);
kfree(ras_if);
}
}
int amdgpu_umc_process_ras_data_cb(struct amdgpu_device *adev, int amdgpu_umc_process_ras_data_cb(struct amdgpu_device *adev,
void *ras_error_status, void *ras_error_status,
struct amdgpu_iv_entry *entry) struct amdgpu_iv_entry *entry)
......
...@@ -83,6 +83,7 @@ struct amdgpu_umc { ...@@ -83,6 +83,7 @@ struct amdgpu_umc {
}; };
int amdgpu_umc_ras_late_init(struct amdgpu_device *adev); int amdgpu_umc_ras_late_init(struct amdgpu_device *adev);
void amdgpu_umc_ras_fini(struct amdgpu_device *adev);
int amdgpu_umc_process_ras_data_cb(struct amdgpu_device *adev, int amdgpu_umc_process_ras_data_cb(struct amdgpu_device *adev,
void *ras_error_status, void *ras_error_status,
struct amdgpu_iv_entry *entry); struct amdgpu_iv_entry *entry);
......
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