Lines Matching refs:debug
136 struct qm_debug *debug = file->debug; in file_to_qm() local
138 return container_of(debug, struct hisi_qm, debug); in file_to_qm()
338 memset(sqe + qm->debug.sqe_mask_offset, QM_SQE_ADDR_MASK, in qm_sq_dump()
339 qm->debug.sqe_mask_len); in qm_sq_dump()
633 if (val >= qm->debug.curr_qm_qp_num) in current_q_write()
697 qm->debug.curr_qm_qp_num = qm->qp_num; in current_qm_write()
699 qm->debug.curr_qm_qp_num = qm_get_vf_qp_num(qm, val); in current_qm_write()
879 qm->debug.qm_diff_regs = dfx_regs_init(qm, qm_diff_regs, ARRAY_SIZE(qm_diff_regs)); in qm_diff_regs_init()
880 if (IS_ERR(qm->debug.qm_diff_regs)) { in qm_diff_regs_init()
881 ret = PTR_ERR(qm->debug.qm_diff_regs); in qm_diff_regs_init()
882 qm->debug.qm_diff_regs = NULL; in qm_diff_regs_init()
886 qm->debug.acc_diff_regs = dfx_regs_init(qm, dregs, reg_len); in qm_diff_regs_init()
887 if (IS_ERR(qm->debug.acc_diff_regs)) { in qm_diff_regs_init()
888 dfx_regs_uninit(qm, qm->debug.qm_diff_regs, ARRAY_SIZE(qm_diff_regs)); in qm_diff_regs_init()
889 ret = PTR_ERR(qm->debug.acc_diff_regs); in qm_diff_regs_init()
890 qm->debug.acc_diff_regs = NULL; in qm_diff_regs_init()
899 struct qm_debug *debug = &qm->debug; in qm_last_regs_uninit() local
901 if (qm->fun_type == QM_HW_VF || !debug->qm_last_words) in qm_last_regs_uninit()
904 kfree(debug->qm_last_words); in qm_last_regs_uninit()
905 debug->qm_last_words = NULL; in qm_last_regs_uninit()
911 struct qm_debug *debug = &qm->debug; in qm_last_regs_init() local
917 debug->qm_last_words = kcalloc(dfx_regs_num, sizeof(unsigned int), GFP_KERNEL); in qm_last_regs_init()
918 if (!debug->qm_last_words) in qm_last_regs_init()
922 debug->qm_last_words[i] = readl_relaxed(qm->io_base + in qm_last_regs_init()
931 dfx_regs_uninit(qm, qm->debug.acc_diff_regs, reg_len); in qm_diff_regs_uninit()
932 qm->debug.acc_diff_regs = NULL; in qm_diff_regs_uninit()
933 dfx_regs_uninit(qm, qm->debug.qm_diff_regs, ARRAY_SIZE(qm_diff_regs)); in qm_diff_regs_uninit()
934 qm->debug.qm_diff_regs = NULL; in qm_diff_regs_uninit()
1026 struct qm_debug *debug = &qm->debug; in hisi_qm_show_last_dfx_regs() local
1031 if (qm->fun_type == QM_HW_VF || !debug->qm_last_words) in hisi_qm_show_last_dfx_regs()
1036 if (debug->qm_last_words[i] != val) in hisi_qm_show_last_dfx_regs()
1038 qm_dfx_regs[i].name, debug->qm_last_words[i], val); in hisi_qm_show_last_dfx_regs()
1046 hisi_qm_acc_diff_regs_dump(qm, s, qm->debug.qm_diff_regs, in qm_diff_regs_show()
1099 struct debugfs_file *file = qm->debug.files + index; in qm_create_debugfs_file()
1103 file->debug = &qm->debug; in qm_create_debugfs_file()
1137 struct dfx_diff_registers *qm_regs = qm->debug.qm_diff_regs; in hisi_qm_debug_init()
1138 struct qm_dev_dfx *dev_dfx = &qm->debug.dev_dfx; in hisi_qm_debug_init()
1139 struct qm_dfx *dfx = &qm->debug.dfx; in hisi_qm_debug_init()
1144 qm_d = debugfs_create_dir("qm", qm->debug.debug_root); in hisi_qm_debug_init()
1145 qm->debug.qm_d = qm_d; in hisi_qm_debug_init()
1149 debugfs_create_file("qm_state", 0444, qm->debug.qm_d, in hisi_qm_debug_init()
1152 qm_create_debugfs_file(qm, qm->debug.debug_root, CURRENT_QM); in hisi_qm_debug_init()
1154 qm_create_debugfs_file(qm, qm->debug.qm_d, i); in hisi_qm_debug_init()
1158 debugfs_create_file("diff_regs", 0444, qm->debug.qm_d, in hisi_qm_debug_init()
1161 debugfs_create_file("regs", 0444, qm->debug.qm_d, qm, &qm_regs_fops); in hisi_qm_debug_init()
1163 debugfs_create_file("cmd", 0600, qm->debug.qm_d, qm, &qm_cmd_fops); in hisi_qm_debug_init()
1165 debugfs_create_file("status", 0444, qm->debug.qm_d, qm, in hisi_qm_debug_init()
1168 debugfs_create_u32("dev_state", 0444, qm->debug.qm_d, &dev_dfx->dev_state); in hisi_qm_debug_init()
1169 debugfs_create_u32("dev_timeout", 0644, qm->debug.qm_d, &dev_dfx->dev_timeout); in hisi_qm_debug_init()