#include <linux/sched/clock.h>
#include "hclge_err.h"
static const struct hclge_hw_error hclge_imp_tcm_ecc_int[] = …;
static const struct hclge_hw_error hclge_cmdq_nic_mem_ecc_int[] = …;
static const struct hclge_hw_error hclge_tqp_int_ecc_int[] = …;
static const struct hclge_hw_error hclge_msix_sram_ecc_int[] = …;
static const struct hclge_hw_error hclge_igu_int[] = …;
static const struct hclge_hw_error hclge_igu_egu_tnl_int[] = …;
static const struct hclge_hw_error hclge_ncsi_err_int[] = …;
static const struct hclge_hw_error hclge_ppp_mpf_abnormal_int_st1[] = …;
static const struct hclge_hw_error hclge_ppp_pf_abnormal_int[] = …;
static const struct hclge_hw_error hclge_ppp_mpf_abnormal_int_st3[] = …;
static const struct hclge_hw_error hclge_tm_sch_rint[] = …;
static const struct hclge_hw_error hclge_qcn_fifo_rint[] = …;
static const struct hclge_hw_error hclge_qcn_ecc_rint[] = …;
static const struct hclge_hw_error hclge_mac_afifo_tnl_int[] = …;
static const struct hclge_hw_error hclge_ppu_mpf_abnormal_int_st2[] = …;
static const struct hclge_hw_error hclge_ppu_mpf_abnormal_int_st3[] = …;
static const struct hclge_hw_error hclge_ppu_pf_abnormal_int[] = …;
static const struct hclge_hw_error hclge_ssu_com_err_int[] = …;
#define HCLGE_SSU_MEM_ECC_ERR(x) …
static const struct hclge_hw_error hclge_ssu_mem_ecc_err_int[] = …;
static const struct hclge_hw_error hclge_ssu_port_based_err_int[] = …;
static const struct hclge_hw_error hclge_ssu_fifo_overflow_int[] = …;
static const struct hclge_hw_error hclge_ssu_ets_tcg_int[] = …;
static const struct hclge_hw_error hclge_ssu_port_based_pf_int[] = …;
static const struct hclge_hw_error hclge_rocee_qmm_ovf_err_int[] = …;
static const struct hclge_mod_reg_info hclge_ssu_reg_0_info[] = …;
static const struct hclge_mod_reg_info hclge_ssu_reg_1_info[] = …;
static const struct hclge_mod_reg_info hclge_rpu_reg_0_info[] = …;
static const struct hclge_mod_reg_info hclge_rpu_reg_1_info[] = …;
static const struct hclge_mod_reg_info hclge_igu_egu_reg_info[] = …;
static const struct hclge_mod_reg_info hclge_gen_reg_info_tnl[] = …;
static const struct hclge_mod_reg_info hclge_gen_reg_info[] = …;
static const struct hclge_mod_reg_common_msg hclge_ssu_reg_common_msg[] = …;
static int
hclge_print_mod_reg_info(struct device *dev, struct hclge_desc *desc,
const struct hclge_mod_reg_info *reg_info, int size)
{ … }
static bool hclge_err_mod_check_support_cmd(enum hclge_opcode_type opcode,
struct hclge_dev *hdev)
{ … }
static void
hclge_query_reg_info(struct hclge_dev *hdev,
struct hclge_mod_reg_common_msg *msg, u32 loop_time,
u32 *loop_para)
{ … }
static void hclge_query_reg_info_of_ssu(struct hclge_dev *hdev)
{ … }
static const struct hclge_hw_module_id hclge_hw_module_id_st[] = …;
static const struct hclge_hw_type_id hclge_hw_type_id_st[] = …;
static void hclge_log_error(struct device *dev, char *reg,
const struct hclge_hw_error *err,
u32 err_sts, unsigned long *reset_requests)
{ … }
static int hclge_cmd_query_error(struct hclge_dev *hdev,
struct hclge_desc *desc, u32 cmd, u16 flag)
{ … }
static int hclge_clear_mac_tnl_int(struct hclge_dev *hdev)
{ … }
static int hclge_config_common_hw_err_int(struct hclge_dev *hdev, bool en)
{ … }
static int hclge_config_ncsi_hw_err_int(struct hclge_dev *hdev, bool en)
{ … }
static int hclge_config_igu_egu_hw_err_int(struct hclge_dev *hdev, bool en)
{ … }
static int hclge_config_ppp_error_interrupt(struct hclge_dev *hdev, u32 cmd,
bool en)
{ … }
static int hclge_config_ppp_hw_err_int(struct hclge_dev *hdev, bool en)
{ … }
static int hclge_config_tm_hw_err_int(struct hclge_dev *hdev, bool en)
{ … }
static int hclge_config_mac_err_int(struct hclge_dev *hdev, bool en)
{ … }
int hclge_config_mac_tnl_int(struct hclge_dev *hdev, bool en)
{ … }
static int hclge_config_ppu_error_interrupts(struct hclge_dev *hdev, u32 cmd,
bool en)
{ … }
static int hclge_config_ppu_hw_err_int(struct hclge_dev *hdev, bool en)
{ … }
static int hclge_config_ssu_hw_err_int(struct hclge_dev *hdev, bool en)
{ … }
static int hclge_query_bd_num(struct hclge_dev *hdev, bool is_ras,
u32 *mpf_bd_num, u32 *pf_bd_num)
{ … }
static int hclge_handle_mpf_ras_error(struct hclge_dev *hdev,
struct hclge_desc *desc,
int num)
{ … }
static int hclge_handle_pf_ras_error(struct hclge_dev *hdev,
struct hclge_desc *desc,
int num)
{ … }
static int hclge_handle_all_ras_errors(struct hclge_dev *hdev)
{ … }
static int hclge_log_rocee_axi_error(struct hclge_dev *hdev)
{ … }
static int hclge_log_rocee_ecc_error(struct hclge_dev *hdev)
{ … }
static int hclge_log_rocee_ovf_error(struct hclge_dev *hdev)
{ … }
static enum hnae3_reset_type
hclge_log_and_clear_rocee_ras_error(struct hclge_dev *hdev)
{ … }
int hclge_config_rocee_ras_interrupt(struct hclge_dev *hdev, bool en)
{ … }
static void hclge_handle_rocee_ras_error(struct hnae3_ae_dev *ae_dev)
{ … }
static const struct hclge_hw_blk hw_blk[] = …;
static void hclge_config_all_msix_error(struct hclge_dev *hdev, bool enable)
{ … }
int hclge_config_nic_hw_error(struct hclge_dev *hdev, bool state)
{ … }
pci_ers_result_t hclge_handle_hw_ras_error(struct hnae3_ae_dev *ae_dev)
{ … }
static int hclge_clear_hw_msix_error(struct hclge_dev *hdev,
struct hclge_desc *desc, bool is_mpf,
u32 bd_num)
{ … }
static int hclge_query_over_8bd_err_info(struct hclge_dev *hdev, u16 *vf_id,
u16 *q_id)
{ … }
static void hclge_handle_over_8bd_err(struct hclge_dev *hdev,
unsigned long *reset_requests)
{ … }
static int hclge_handle_mpf_msix_error(struct hclge_dev *hdev,
struct hclge_desc *desc,
int mpf_bd_num,
unsigned long *reset_requests)
{ … }
static int hclge_handle_pf_msix_error(struct hclge_dev *hdev,
struct hclge_desc *desc,
int pf_bd_num,
unsigned long *reset_requests)
{ … }
static int hclge_handle_all_hw_msix_error(struct hclge_dev *hdev,
unsigned long *reset_requests)
{ … }
int hclge_handle_hw_msix_error(struct hclge_dev *hdev,
unsigned long *reset_requests)
{ … }
int hclge_handle_mac_tnl(struct hclge_dev *hdev)
{ … }
void hclge_handle_all_hns_hw_errors(struct hnae3_ae_dev *ae_dev)
{ … }
bool hclge_find_error_source(struct hclge_dev *hdev)
{ … }
void hclge_handle_occurred_error(struct hclge_dev *hdev)
{ … }
static bool
hclge_handle_error_type_reg_log(struct hclge_dev *hdev,
struct hclge_mod_err_info *mod_info,
struct hclge_type_reg_err_info *type_reg_info)
{ … }
static void hclge_handle_error_module_log(struct hnae3_ae_dev *ae_dev,
const u32 *buf, u32 buf_size)
{ … }
static int hclge_query_all_err_bd_num(struct hclge_dev *hdev, u32 *bd_num)
{ … }
static int hclge_query_all_err_info(struct hclge_dev *hdev,
struct hclge_desc *desc, u32 bd_num)
{ … }
int hclge_handle_error_info_log(struct hnae3_ae_dev *ae_dev)
{ … }
static bool hclge_reset_vf_in_bitmap(struct hclge_dev *hdev,
unsigned long *bitmap)
{ … }
static void hclge_get_vf_fault_bitmap(struct hclge_desc *desc,
unsigned long *bitmap)
{ … }
int hclge_handle_vf_queue_err_ras(struct hclge_dev *hdev)
{ … }