Commit e3d4de8d authored by Yang Wang's avatar Yang Wang Committed by Alex Deucher

drm/amdgpu: retire unused aca_bank_report data structure

retire unused aca_bank_report data structure.
Signed-off-by: default avatarYang Wang <kevinyang.wang@amd.com>
Reviewed-by: default avatarHawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent b5b6d625
...@@ -297,29 +297,26 @@ int aca_error_cache_log_bank_error(struct aca_handle *handle, struct aca_bank_in ...@@ -297,29 +297,26 @@ int aca_error_cache_log_bank_error(struct aca_handle *handle, struct aca_bank_in
return 0; return 0;
} }
static int aca_generate_bank_report(struct aca_handle *handle, struct aca_bank *bank, static int aca_bank_parser(struct aca_handle *handle, struct aca_bank *bank, enum aca_smu_type type)
enum aca_smu_type type, struct aca_bank_report *report)
{ {
const struct aca_bank_ops *bank_ops = handle->bank_ops; const struct aca_bank_ops *bank_ops = handle->bank_ops;
if (!bank || !report) if (!bank)
return -EINVAL; return -EINVAL;
if (!bank_ops->aca_bank_generate_report) if (!bank_ops->aca_bank_parser)
return -EOPNOTSUPP; return -EOPNOTSUPP;
memset(report, 0, sizeof(*report)); return bank_ops->aca_bank_parser(handle, bank, type,
return bank_ops->aca_bank_generate_report(handle, bank, type, handle->data);
report, handle->data);
} }
static int handler_aca_log_bank_error(struct aca_handle *handle, struct aca_bank *bank, static int handler_aca_log_bank_error(struct aca_handle *handle, struct aca_bank *bank,
enum aca_smu_type smu_type, void *data) enum aca_smu_type type, void *data)
{ {
struct aca_bank_report report;
int ret; int ret;
ret = aca_generate_bank_report(handle, bank, smu_type, &report); ret = aca_bank_parser(handle, bank, type);
if (ret) if (ret)
return ret; return ret;
......
...@@ -122,11 +122,6 @@ struct aca_bank_info { ...@@ -122,11 +122,6 @@ struct aca_bank_info {
int mcatype; int mcatype;
}; };
struct aca_bank_report {
struct aca_bank_info info;
u64 count[ACA_ERROR_TYPE_COUNT];
};
struct aca_bank_error { struct aca_bank_error {
struct list_head node; struct list_head node;
struct aca_bank_info info; struct aca_bank_info info;
...@@ -164,8 +159,7 @@ struct aca_handle { ...@@ -164,8 +159,7 @@ struct aca_handle {
}; };
struct aca_bank_ops { struct aca_bank_ops {
int (*aca_bank_generate_report)(struct aca_handle *handle, struct aca_bank *bank, enum aca_smu_type type, int (*aca_bank_parser)(struct aca_handle *handle, struct aca_bank *bank, enum aca_smu_type type, void *data);
struct aca_bank_report *report, void *data);
bool (*aca_bank_is_valid)(struct aca_handle *handle, struct aca_bank *bank, enum aca_smu_type type, bool (*aca_bank_is_valid)(struct aca_handle *handle, struct aca_bank *bank, enum aca_smu_type type,
void *data); void *data);
}; };
......
...@@ -1035,8 +1035,8 @@ int amdgpu_xgmi_remove_device(struct amdgpu_device *adev) ...@@ -1035,8 +1035,8 @@ int amdgpu_xgmi_remove_device(struct amdgpu_device *adev)
return 0; return 0;
} }
static int xgmi_v6_4_0_aca_bank_generate_report(struct aca_handle *handle, struct aca_bank *bank, enum aca_smu_type type, static int xgmi_v6_4_0_aca_bank_parser(struct aca_handle *handle, struct aca_bank *bank,
struct aca_bank_report *report, void *data) enum aca_smu_type type, void *data)
{ {
struct amdgpu_device *adev = handle->adev; struct amdgpu_device *adev = handle->adev;
struct aca_bank_info info; struct aca_bank_info info;
...@@ -1075,7 +1075,7 @@ static int xgmi_v6_4_0_aca_bank_generate_report(struct aca_handle *handle, struc ...@@ -1075,7 +1075,7 @@ static int xgmi_v6_4_0_aca_bank_generate_report(struct aca_handle *handle, struc
} }
static const struct aca_bank_ops xgmi_v6_4_0_aca_bank_ops = { static const struct aca_bank_ops xgmi_v6_4_0_aca_bank_ops = {
.aca_bank_generate_report = xgmi_v6_4_0_aca_bank_generate_report, .aca_bank_parser = xgmi_v6_4_0_aca_bank_parser,
}; };
static const struct aca_info xgmi_v6_4_0_aca_info = { static const struct aca_info xgmi_v6_4_0_aca_info = {
......
...@@ -680,9 +680,9 @@ static const struct amdgpu_gfx_funcs gfx_v9_4_3_gfx_funcs = { ...@@ -680,9 +680,9 @@ static const struct amdgpu_gfx_funcs gfx_v9_4_3_gfx_funcs = {
.ih_node_to_logical_xcc = &gfx_v9_4_3_ih_to_xcc_inst, .ih_node_to_logical_xcc = &gfx_v9_4_3_ih_to_xcc_inst,
}; };
static int gfx_v9_4_3_aca_bank_generate_report(struct aca_handle *handle, static int gfx_v9_4_3_aca_bank_parser(struct aca_handle *handle,
struct aca_bank *bank, enum aca_smu_type type, struct aca_bank *bank, enum aca_smu_type type,
struct aca_bank_report *report, void *data) void *data)
{ {
struct aca_bank_info info; struct aca_bank_info info;
u64 misc0; u64 misc0;
...@@ -736,7 +736,7 @@ static bool gfx_v9_4_3_aca_bank_is_valid(struct aca_handle *handle, struct aca_b ...@@ -736,7 +736,7 @@ static bool gfx_v9_4_3_aca_bank_is_valid(struct aca_handle *handle, struct aca_b
} }
static const struct aca_bank_ops gfx_v9_4_3_aca_bank_ops = { static const struct aca_bank_ops gfx_v9_4_3_aca_bank_ops = {
.aca_bank_generate_report = gfx_v9_4_3_aca_bank_generate_report, .aca_bank_parser = gfx_v9_4_3_aca_bank_parser,
.aca_bank_is_valid = gfx_v9_4_3_aca_bank_is_valid, .aca_bank_is_valid = gfx_v9_4_3_aca_bank_is_valid,
}; };
......
...@@ -721,9 +721,8 @@ static const struct amdgpu_ras_block_hw_ops mmhub_v1_8_ras_hw_ops = { ...@@ -721,9 +721,8 @@ static const struct amdgpu_ras_block_hw_ops mmhub_v1_8_ras_hw_ops = {
.reset_ras_error_count = mmhub_v1_8_reset_ras_error_count, .reset_ras_error_count = mmhub_v1_8_reset_ras_error_count,
}; };
static int mmhub_v1_8_aca_bank_generate_report(struct aca_handle *handle, static int mmhub_v1_8_aca_bank_parser(struct aca_handle *handle, struct aca_bank *bank,
struct aca_bank *bank, enum aca_smu_type type, enum aca_smu_type type, void *data)
struct aca_bank_report *report, void *data)
{ {
struct aca_bank_info info; struct aca_bank_info info;
u64 misc0; u64 misc0;
...@@ -780,7 +779,7 @@ static bool mmhub_v1_8_aca_bank_is_valid(struct aca_handle *handle, struct aca_b ...@@ -780,7 +779,7 @@ static bool mmhub_v1_8_aca_bank_is_valid(struct aca_handle *handle, struct aca_b
} }
static const struct aca_bank_ops mmhub_v1_8_aca_bank_ops = { static const struct aca_bank_ops mmhub_v1_8_aca_bank_ops = {
.aca_bank_generate_report = mmhub_v1_8_aca_bank_generate_report, .aca_bank_parser = mmhub_v1_8_aca_bank_parser,
.aca_bank_is_valid = mmhub_v1_8_aca_bank_is_valid, .aca_bank_is_valid = mmhub_v1_8_aca_bank_is_valid,
}; };
......
...@@ -2189,9 +2189,8 @@ static const struct amdgpu_ras_block_hw_ops sdma_v4_4_2_ras_hw_ops = { ...@@ -2189,9 +2189,8 @@ static const struct amdgpu_ras_block_hw_ops sdma_v4_4_2_ras_hw_ops = {
.reset_ras_error_count = sdma_v4_4_2_reset_ras_error_count, .reset_ras_error_count = sdma_v4_4_2_reset_ras_error_count,
}; };
static int sdma_v4_4_2_aca_bank_generate_report(struct aca_handle *handle, static int sdma_v4_4_2_aca_bank_parser(struct aca_handle *handle, struct aca_bank *bank,
struct aca_bank *bank, enum aca_smu_type type, enum aca_smu_type type, void *data)
struct aca_bank_report *report, void *data)
{ {
struct aca_bank_info info; struct aca_bank_info info;
u64 misc0; u64 misc0;
...@@ -2241,7 +2240,7 @@ static bool sdma_v4_4_2_aca_bank_is_valid(struct aca_handle *handle, struct aca_ ...@@ -2241,7 +2240,7 @@ static bool sdma_v4_4_2_aca_bank_is_valid(struct aca_handle *handle, struct aca_
} }
static const struct aca_bank_ops sdma_v4_4_2_aca_bank_ops = { static const struct aca_bank_ops sdma_v4_4_2_aca_bank_ops = {
.aca_bank_generate_report = sdma_v4_4_2_aca_bank_generate_report, .aca_bank_parser = sdma_v4_4_2_aca_bank_parser,
.aca_bank_is_valid = sdma_v4_4_2_aca_bank_is_valid, .aca_bank_is_valid = sdma_v4_4_2_aca_bank_is_valid,
}; };
......
...@@ -504,8 +504,8 @@ const struct amdgpu_ras_block_hw_ops umc_v12_0_ras_hw_ops = { ...@@ -504,8 +504,8 @@ const struct amdgpu_ras_block_hw_ops umc_v12_0_ras_hw_ops = {
.query_ras_error_address = umc_v12_0_query_ras_error_address, .query_ras_error_address = umc_v12_0_query_ras_error_address,
}; };
static int umc_v12_0_aca_bank_generate_report(struct aca_handle *handle, struct aca_bank *bank, enum aca_smu_type type, static int umc_v12_0_aca_bank_parser(struct aca_handle *handle, struct aca_bank *bank,
struct aca_bank_report *report, void *data) enum aca_smu_type type, void *data)
{ {
struct amdgpu_device *adev = handle->adev; struct amdgpu_device *adev = handle->adev;
struct aca_bank_info info; struct aca_bank_info info;
...@@ -542,7 +542,7 @@ static int umc_v12_0_aca_bank_generate_report(struct aca_handle *handle, struct ...@@ -542,7 +542,7 @@ static int umc_v12_0_aca_bank_generate_report(struct aca_handle *handle, struct
} }
static const struct aca_bank_ops umc_v12_0_aca_bank_ops = { static const struct aca_bank_ops umc_v12_0_aca_bank_ops = {
.aca_bank_generate_report = umc_v12_0_aca_bank_generate_report, .aca_bank_parser = umc_v12_0_aca_bank_parser,
}; };
const struct aca_info umc_v12_0_aca_info = { const struct aca_info umc_v12_0_aca_info = {
......
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