#include "umc_v12_0.h"
#include "amdgpu_ras.h"
#include "amdgpu_umc.h"
#include "amdgpu.h"
#include "umc/umc_12_0_0_offset.h"
#include "umc/umc_12_0_0_sh_mask.h"
#include "mp/mp_13_0_6_sh_mask.h"
#define MAX_ECC_NUM_PER_RETIREMENT …
#define DELAYED_TIME_FOR_GPU_RESET …
static inline uint64_t get_umc_v12_0_reg_offset(struct amdgpu_device *adev,
uint32_t node_inst,
uint32_t umc_inst,
uint32_t ch_inst)
{ … }
static int umc_v12_0_reset_error_count_per_channel(struct amdgpu_device *adev,
uint32_t node_inst, uint32_t umc_inst,
uint32_t ch_inst, void *data)
{ … }
static void umc_v12_0_reset_error_count(struct amdgpu_device *adev)
{ … }
bool umc_v12_0_is_deferred_error(struct amdgpu_device *adev, uint64_t mc_umc_status)
{ … }
bool umc_v12_0_is_uncorrectable_error(struct amdgpu_device *adev, uint64_t mc_umc_status)
{ … }
bool umc_v12_0_is_correctable_error(struct amdgpu_device *adev, uint64_t mc_umc_status)
{ … }
static void umc_v12_0_query_error_count_per_type(struct amdgpu_device *adev,
uint64_t umc_reg_offset,
unsigned long *error_count,
check_error_type_func error_type_func)
{ … }
static int umc_v12_0_query_error_count(struct amdgpu_device *adev,
uint32_t node_inst, uint32_t umc_inst,
uint32_t ch_inst, void *data)
{ … }
static void umc_v12_0_query_ras_error_count(struct amdgpu_device *adev,
void *ras_error_status)
{ … }
static void umc_v12_0_convert_error_address(struct amdgpu_device *adev,
struct ras_err_data *err_data,
struct ta_ras_query_address_input *addr_in)
{ … }
static int umc_v12_0_convert_err_addr(struct amdgpu_device *adev,
struct ta_ras_query_address_input *addr_in,
uint64_t *pfns, int len)
{ … }
static int umc_v12_0_query_error_address(struct amdgpu_device *adev,
uint32_t node_inst, uint32_t umc_inst,
uint32_t ch_inst, void *data)
{ … }
static void umc_v12_0_query_ras_error_address(struct amdgpu_device *adev,
void *ras_error_status)
{ … }
static int umc_v12_0_err_cnt_init_per_channel(struct amdgpu_device *adev,
uint32_t node_inst, uint32_t umc_inst,
uint32_t ch_inst, void *data)
{ … }
static bool umc_v12_0_check_ecc_err_status(struct amdgpu_device *adev,
enum amdgpu_mca_error_type type, void *ras_error_status)
{ … }
static void umc_v12_0_err_cnt_init(struct amdgpu_device *adev)
{ … }
static bool umc_v12_0_query_ras_poison_mode(struct amdgpu_device *adev)
{ … }
const struct amdgpu_ras_block_hw_ops umc_v12_0_ras_hw_ops = …;
static int umc_v12_0_aca_bank_parser(struct aca_handle *handle, struct aca_bank *bank,
enum aca_smu_type type, void *data)
{ … }
static const struct aca_bank_ops umc_v12_0_aca_bank_ops = …;
const struct aca_info umc_v12_0_aca_info = …;
static int umc_v12_0_ras_late_init(struct amdgpu_device *adev, struct ras_common_if *ras_block)
{ … }
static int umc_v12_0_update_ecc_status(struct amdgpu_device *adev,
uint64_t status, uint64_t ipid, uint64_t addr)
{ … }
static int umc_v12_0_fill_error_record(struct amdgpu_device *adev,
struct ras_ecc_err *ecc_err, void *ras_error_status)
{ … }
static void umc_v12_0_query_ras_ecc_err_addr(struct amdgpu_device *adev,
void *ras_error_status)
{ … }
struct amdgpu_umc_ras umc_v12_0_ras = …;