#include <linux/hisi_acc_qm.h>
#include "qm_common.h"
#define QM_DFX_BASE …
#define QM_DFX_STATE1 …
#define QM_DFX_STATE2 …
#define QM_DFX_COMMON …
#define QM_DFX_BASE_LEN …
#define QM_DFX_STATE1_LEN …
#define QM_DFX_STATE2_LEN …
#define QM_DFX_COMMON_LEN …
#define QM_DFX_REGS_LEN …
#define QM_DBG_TMP_BUF_LEN …
#define QM_XQC_ADDR_MASK …
#define CURRENT_FUN_MASK …
#define CURRENT_Q_MASK …
#define QM_SQE_ADDR_MASK …
#define QM_DFX_MB_CNT_VF …
#define QM_DFX_DB_CNT_VF …
#define QM_DFX_SQE_CNT_VF_SQN …
#define QM_DFX_CQE_CNT_VF_CQN …
#define QM_DFX_QN_SHIFT …
#define QM_DFX_CNT_CLR_CE …
#define QM_DBG_WRITE_LEN …
#define QM_IN_IDLE_ST_REG …
#define QM_IN_IDLE_STATE …
static const char * const qm_debug_file_name[] = …;
static const char * const qm_s[] = …;
struct qm_dfx_item { … };
struct qm_cmd_dump_item { … };
static struct qm_dfx_item qm_dfx_files[] = …;
#define CNT_CYC_REGS_NUM …
static const struct debugfs_reg32 qm_dfx_regs[] = …;
static const struct debugfs_reg32 qm_vf_dfx_regs[] = …;
static struct dfx_diff_registers qm_diff_regs[] = …;
static struct hisi_qm *file_to_qm(struct debugfs_file *file)
{ … }
static ssize_t qm_cmd_read(struct file *filp, char __user *buffer,
size_t count, loff_t *pos)
{ … }
static void dump_show(struct hisi_qm *qm, void *info,
unsigned int info_size, char *info_name)
{ … }
static int qm_sqc_dump(struct hisi_qm *qm, char *s, char *name)
{ … }
static int qm_cqc_dump(struct hisi_qm *qm, char *s, char *name)
{ … }
static int qm_eqc_aeqc_dump(struct hisi_qm *qm, char *s, char *name)
{ … }
static int q_dump_param_parse(struct hisi_qm *qm, char *s,
u32 *e_id, u32 *q_id, u16 q_depth)
{ … }
static int qm_sq_dump(struct hisi_qm *qm, char *s, char *name)
{ … }
static int qm_cq_dump(struct hisi_qm *qm, char *s, char *name)
{ … }
static int qm_eq_aeq_dump(struct hisi_qm *qm, char *s, char *name)
{ … }
static int qm_dbg_help(struct hisi_qm *qm, char *s)
{ … }
static const struct qm_cmd_dump_item qm_cmd_dump_table[] = …;
static int qm_cmd_write_dump(struct hisi_qm *qm, const char *cmd_buf)
{ … }
static ssize_t qm_cmd_write(struct file *filp, const char __user *buffer,
size_t count, loff_t *pos)
{ … }
static const struct file_operations qm_cmd_fops = …;
void hisi_qm_regs_dump(struct seq_file *s, struct debugfs_regset32 *regset)
{ … }
EXPORT_SYMBOL_GPL(…);
static int qm_regs_show(struct seq_file *s, void *unused)
{ … }
DEFINE_SHOW_ATTRIBUTE(…);
static u32 current_q_read(struct hisi_qm *qm)
{ … }
static int current_q_write(struct hisi_qm *qm, u32 val)
{ … }
static u32 clear_enable_read(struct hisi_qm *qm)
{ … }
static int clear_enable_write(struct hisi_qm *qm, u32 rd_clr_ctrl)
{ … }
static u32 current_qm_read(struct hisi_qm *qm)
{ … }
static int qm_get_vf_qp_num(struct hisi_qm *qm, u32 fun_num)
{ … }
static int current_qm_write(struct hisi_qm *qm, u32 val)
{ … }
static ssize_t qm_debug_read(struct file *filp, char __user *buf,
size_t count, loff_t *pos)
{ … }
static ssize_t qm_debug_write(struct file *filp, const char __user *buf,
size_t count, loff_t *pos)
{ … }
static const struct file_operations qm_debug_fops = …;
static void dfx_regs_uninit(struct hisi_qm *qm,
struct dfx_diff_registers *dregs, int reg_len)
{ … }
static struct dfx_diff_registers *dfx_regs_init(struct hisi_qm *qm,
const struct dfx_diff_registers *cregs, u32 reg_len)
{ … }
static int qm_diff_regs_init(struct hisi_qm *qm,
struct dfx_diff_registers *dregs, u32 reg_len)
{ … }
static void qm_last_regs_uninit(struct hisi_qm *qm)
{ … }
static int qm_last_regs_init(struct hisi_qm *qm)
{ … }
static void qm_diff_regs_uninit(struct hisi_qm *qm, u32 reg_len)
{ … }
int hisi_qm_regs_debugfs_init(struct hisi_qm *qm,
struct dfx_diff_registers *dregs, u32 reg_len)
{ … }
EXPORT_SYMBOL_GPL(…);
void hisi_qm_regs_debugfs_uninit(struct hisi_qm *qm, u32 reg_len)
{ … }
EXPORT_SYMBOL_GPL(…);
void hisi_qm_acc_diff_regs_dump(struct hisi_qm *qm, struct seq_file *s,
struct dfx_diff_registers *dregs, u32 regs_len)
{ … }
EXPORT_SYMBOL_GPL(…);
void hisi_qm_show_last_dfx_regs(struct hisi_qm *qm)
{ … }
static int qm_diff_regs_show(struct seq_file *s, void *unused)
{ … }
DEFINE_SHOW_ATTRIBUTE(…);
static int qm_state_show(struct seq_file *s, void *unused)
{ … }
DEFINE_SHOW_ATTRIBUTE(…);
static ssize_t qm_status_read(struct file *filp, char __user *buffer,
size_t count, loff_t *pos)
{ … }
static const struct file_operations qm_status_fops = …;
static void qm_create_debugfs_file(struct hisi_qm *qm, struct dentry *dir,
enum qm_debug_file index)
{ … }
static int qm_debugfs_atomic64_set(void *data, u64 val)
{ … }
static int qm_debugfs_atomic64_get(void *data, u64 *val)
{ … }
DEFINE_DEBUGFS_ATTRIBUTE(…);
void hisi_qm_debug_init(struct hisi_qm *qm)
{ … }
EXPORT_SYMBOL_GPL(…);
void hisi_qm_debug_regs_clear(struct hisi_qm *qm)
{ … }
EXPORT_SYMBOL_GPL(…);