Lines Matching defs:qm
355 struct hisi_qm *qm; member
444 static bool qm_avail_state(struct hisi_qm *qm, enum qm_state new) in qm_avail_state()
476 static bool qm_qp_avail_state(struct hisi_qm *qm, struct hisi_qp *qp, in qm_qp_avail_state()
523 static u32 qm_get_hw_error_status(struct hisi_qm *qm) in qm_get_hw_error_status()
528 static u32 qm_get_dev_err_status(struct hisi_qm *qm) in qm_get_dev_err_status()
534 static bool qm_check_dev_error(struct hisi_qm *qm) in qm_check_dev_error()
547 static int qm_wait_reset_finish(struct hisi_qm *qm) in qm_wait_reset_finish()
561 static int qm_reset_prepare_ready(struct hisi_qm *qm) in qm_reset_prepare_ready()
576 static void qm_reset_bit_clear(struct hisi_qm *qm) in qm_reset_bit_clear()
600 int hisi_qm_wait_mb_ready(struct hisi_qm *qm) in hisi_qm_wait_mb_ready()
611 static void qm_mb_write(struct hisi_qm *qm, const void *src) in qm_mb_write()
632 static int qm_mb_nolock(struct hisi_qm *qm, struct qm_mailbox *mailbox) in qm_mb_nolock()
665 int hisi_qm_mb(struct hisi_qm *qm, u8 cmd, dma_addr_t dma_addr, u16 queue, in hisi_qm_mb()
684 static void qm_db_v1(struct hisi_qm *qm, u16 qn, u8 cmd, u16 index, u8 priority) in qm_db_v1()
695 static void qm_db_v2(struct hisi_qm *qm, u16 qn, u8 cmd, u16 index, u8 priority) in qm_db_v2()
715 static void qm_db(struct hisi_qm *qm, u16 qn, u8 cmd, u16 index, u8 priority) in qm_db()
723 static void qm_disable_clock_gate(struct hisi_qm *qm) in qm_disable_clock_gate()
736 static int qm_dev_mem_reset(struct hisi_qm *qm) in qm_dev_mem_reset()
755 u32 hisi_qm_get_hw_info(struct hisi_qm *qm, in hisi_qm_get_hw_info()
776 static void qm_get_xqc_depth(struct hisi_qm *qm, u16 *low_bits, in qm_get_xqc_depth()
786 static u32 qm_get_irq_num(struct hisi_qm *qm) in qm_get_irq_num()
794 static int qm_pm_get_sync(struct hisi_qm *qm) in qm_pm_get_sync()
811 static void qm_pm_put_sync(struct hisi_qm *qm) in qm_pm_put_sync()
835 struct hisi_qm *qm = qp->qm; in qm_poll_req_cb() local
854 struct hisi_qm *qm = poll_data->qm; in qm_get_complete_eqe_num() local
887 struct hisi_qm *qm = poll_data->qm; in qm_work_process() local
908 static bool do_qm_eq_irq(struct hisi_qm *qm) in do_qm_eq_irq()
930 struct hisi_qm *qm = data; in qm_eq_irq() local
945 struct hisi_qm *qm = data; in qm_mb_cmd_irq() local
972 static void qm_disable_qp(struct hisi_qm *qm, u32 qp_id) in qm_disable_qp()
981 static void qm_reset_function(struct hisi_qm *qm) in qm_reset_function()
1012 struct hisi_qm *qm = data; in qm_aeq_thread() local
1056 struct hisi_qm *qm = data; in qm_aeq_irq() local
1075 static void qm_init_prefetch(struct hisi_qm *qm) in qm_init_prefetch()
1168 static void qm_vft_data_cfg(struct hisi_qm *qm, enum vft_type type, u32 base, in qm_vft_data_cfg()
1214 static int qm_set_vft_common(struct hisi_qm *qm, enum vft_type type, in qm_set_vft_common()
1247 static int qm_shaper_init_vft(struct hisi_qm *qm, u32 fun_num) in qm_shaper_init_vft()
1269 static int qm_set_sqc_cqc_vft(struct hisi_qm *qm, u32 fun_num, u32 base, in qm_set_sqc_cqc_vft()
1295 static int qm_get_vft_v2(struct hisi_qm *qm, u32 *base, u32 *number) in qm_get_vft_v2()
1313 void *hisi_qm_ctx_alloc(struct hisi_qm *qm, size_t ctx_size, in hisi_qm_ctx_alloc()
1333 void hisi_qm_ctx_free(struct hisi_qm *qm, size_t ctx_size, in hisi_qm_ctx_free()
1342 static int qm_dump_sqc_raw(struct hisi_qm *qm, dma_addr_t dma_addr, u16 qp_id) in qm_dump_sqc_raw()
1347 static int qm_dump_cqc_raw(struct hisi_qm *qm, dma_addr_t dma_addr, u16 qp_id) in qm_dump_cqc_raw()
1352 static void qm_hw_error_init_v1(struct hisi_qm *qm) in qm_hw_error_init_v1()
1357 static void qm_hw_error_cfg(struct hisi_qm *qm) in qm_hw_error_cfg()
1372 static void qm_hw_error_init_v2(struct hisi_qm *qm) in qm_hw_error_init_v2()
1383 static void qm_hw_error_uninit_v2(struct hisi_qm *qm) in qm_hw_error_uninit_v2()
1391 static void qm_hw_error_init_v3(struct hisi_qm *qm) in qm_hw_error_init_v3()
1405 static void qm_hw_error_uninit_v3(struct hisi_qm *qm) in qm_hw_error_uninit_v3()
1416 static void qm_log_hw_error(struct hisi_qm *qm, u32 error_status) in qm_log_hw_error()
1453 static enum acc_err_result qm_hw_error_handle_v2(struct hisi_qm *qm) in qm_hw_error_handle_v2()
1476 static int qm_get_mb_cmd(struct hisi_qm *qm, u64 *msg, u16 fun_num) in qm_get_mb_cmd()
1495 static void qm_clear_cmd_interrupt(struct hisi_qm *qm, u64 vf_mask) in qm_clear_cmd_interrupt()
1507 static void qm_handle_vf_msg(struct hisi_qm *qm, u32 vf_id) in qm_handle_vf_msg()
1537 static int qm_wait_vf_prepare_finish(struct hisi_qm *qm) in qm_wait_vf_prepare_finish()
1577 static void qm_trigger_vf_interrupt(struct hisi_qm *qm, u32 fun_num) in qm_trigger_vf_interrupt()
1591 static void qm_trigger_pf_interrupt(struct hisi_qm *qm) in qm_trigger_pf_interrupt()
1600 static int qm_ping_single_vf(struct hisi_qm *qm, u64 cmd, u32 fun_num) in qm_ping_single_vf()
1636 static int qm_ping_all_vfs(struct hisi_qm *qm, u64 cmd) in qm_ping_all_vfs()
1681 static int qm_ping_pf(struct hisi_qm *qm, u64 cmd) in qm_ping_pf()
1720 static int qm_set_msi(struct hisi_qm *qm, bool set) in qm_set_msi()
1742 static void qm_wait_msi_finish(struct hisi_qm *qm) in qm_wait_msi_finish()
1777 static int qm_set_msi_v3(struct hisi_qm *qm, bool set) in qm_set_msi_v3()
1851 static struct hisi_qp *qm_create_qp_nolock(struct hisi_qm *qm, u8 alg_type) in qm_create_qp_nolock()
1897 static struct hisi_qp *hisi_qm_create_qp(struct hisi_qm *qm, u8 alg_type) in hisi_qm_create_qp()
1924 struct hisi_qm *qm = qp->qm; in hisi_qm_release_qp() local
1943 struct hisi_qm *qm = qp->qm; in qm_sq_ctx_cfg() local
1985 struct hisi_qm *qm = qp->qm; in qm_cq_ctx_cfg() local
2039 struct hisi_qm *qm = qp->qm; in qm_start_qp_nolock() local
2068 struct hisi_qm *qm = qp->qm; in hisi_qm_start_qp() local
2091 struct hisi_qm *qm = qp->qm; in qp_stop_fail_cb() local
2112 struct hisi_qm *qm = qp->qm; in qm_drain_qp() local
2267 static void hisi_qm_cache_wb(struct hisi_qm *qm) in hisi_qm_cache_wb()
2289 struct hisi_qm *qm = uacce->priv; in hisi_qm_get_available_instances() local
2299 static void hisi_qm_set_hw_reset(struct hisi_qm *qm, int offset) in hisi_qm_set_hw_reset()
2311 struct hisi_qm *qm = uacce->priv; in hisi_qm_uacce_get_queue() local
2342 struct hisi_qm *qm = qp->qm; in hisi_qm_uacce_mmap() local
2421 struct hisi_qm *qm = q->uacce->priv; in qm_set_sqctype() local
2476 static int qm_hw_err_isolate(struct hisi_qm *qm) in qm_hw_err_isolate()
2520 static void qm_hw_err_destroy(struct hisi_qm *qm) in qm_hw_err_destroy()
2534 struct hisi_qm *qm = uacce->priv; in hisi_qm_get_isolate_state() local
2548 struct hisi_qm *qm = uacce->priv; in hisi_qm_isolate_threshold_write() local
2567 struct hisi_qm *qm = uacce->priv; in hisi_qm_isolate_threshold_read() local
2592 static void qm_remove_uacce(struct hisi_qm *qm) in qm_remove_uacce()
2603 static int qm_alloc_uacce(struct hisi_qm *qm) in qm_alloc_uacce()
2675 static int qm_frozen(struct hisi_qm *qm) in qm_frozen()
2697 struct hisi_qm *qm, *vf_qm; in qm_try_frozen_vfs() local
2730 void hisi_qm_wait_task_finish(struct hisi_qm *qm, struct hisi_qm_list *qm_list) in hisi_qm_wait_task_finish()
2746 static void hisi_qp_memory_uninit(struct hisi_qm *qm, int num) in hisi_qp_memory_uninit()
2762 static int hisi_qp_memory_init(struct hisi_qm *qm, size_t dma_size, int id, in hisi_qp_memory_init()
2798 static void hisi_qm_pre_init(struct hisi_qm *qm) in hisi_qm_pre_init()
2820 static void qm_cmd_uninit(struct hisi_qm *qm) in qm_cmd_uninit()
2832 static void qm_cmd_init(struct hisi_qm *qm) in qm_cmd_init()
2848 static void qm_put_pci_res(struct hisi_qm *qm) in qm_put_pci_res()
2859 static void hisi_qm_pci_uninit(struct hisi_qm *qm) in hisi_qm_pci_uninit()
2868 static void hisi_qm_set_state(struct hisi_qm *qm, u8 state) in hisi_qm_set_state()
2874 static void hisi_qm_unint_work(struct hisi_qm *qm) in hisi_qm_unint_work()
2879 static void hisi_qm_memory_uninit(struct hisi_qm *qm) in hisi_qm_memory_uninit()
2902 void hisi_qm_uninit(struct hisi_qm *qm) in hisi_qm_uninit()
2938 static int hisi_qm_get_vft(struct hisi_qm *qm, u32 *base, u32 *number) in hisi_qm_get_vft()
2965 static int hisi_qm_set_vft(struct hisi_qm *qm, u32 fun_num, u32 base, in hisi_qm_set_vft()
2977 static void qm_init_eq_aeq_status(struct hisi_qm *qm) in qm_init_eq_aeq_status()
2987 static void qm_enable_eq_aeq_interrupts(struct hisi_qm *qm) in qm_enable_eq_aeq_interrupts()
2997 static void qm_disable_eq_aeq_interrupts(struct hisi_qm *qm) in qm_disable_eq_aeq_interrupts()
3003 static int qm_eq_ctx_cfg(struct hisi_qm *qm) in qm_eq_ctx_cfg()
3034 static int qm_aeq_ctx_cfg(struct hisi_qm *qm) in qm_aeq_ctx_cfg()
3063 static int qm_eq_aeq_ctx_cfg(struct hisi_qm *qm) in qm_eq_aeq_ctx_cfg()
3079 static int __hisi_qm_start(struct hisi_qm *qm) in __hisi_qm_start()
3115 int hisi_qm_start(struct hisi_qm *qm) in hisi_qm_start()
3146 static int qm_restart(struct hisi_qm *qm) in qm_restart()
3177 static int qm_stop_started_qp(struct hisi_qm *qm) in qm_stop_started_qp()
3205 static void qm_clear_queues(struct hisi_qm *qm) in qm_clear_queues()
3228 int hisi_qm_stop(struct hisi_qm *qm, enum qm_stop_reason r) in hisi_qm_stop()
3271 static void qm_hw_error_init(struct hisi_qm *qm) in qm_hw_error_init()
3281 static void qm_hw_error_uninit(struct hisi_qm *qm) in qm_hw_error_uninit()
3291 static enum acc_err_result qm_hw_error_handle(struct hisi_qm *qm) in qm_hw_error_handle()
3307 void hisi_qm_dev_err_init(struct hisi_qm *qm) in hisi_qm_dev_err_init()
3328 void hisi_qm_dev_err_uninit(struct hisi_qm *qm) in hisi_qm_dev_err_uninit()
3374 struct hisi_qm *qm; in hisi_qm_sort_devices() local
3460 static int qm_vf_q_assign(struct hisi_qm *qm, u32 num_vfs) in qm_vf_q_assign()
3507 static int qm_clear_vft_config(struct hisi_qm *qm) in qm_clear_vft_config()
3522 static int qm_func_shaper_enable(struct hisi_qm *qm, u32 fun_index, u32 qos) in qm_func_shaper_enable()
3552 static u32 qm_get_shaper_vft_qos(struct hisi_qm *qm, u32 fun_index) in qm_get_shaper_vft_qos()
3602 static void qm_vf_get_qos(struct hisi_qm *qm, u32 fun_num) in qm_vf_get_qos()
3621 static int qm_vf_read_qos(struct hisi_qm *qm) in qm_vf_read_qos()
3653 struct hisi_qm *qm = filp->private_data; in qm_algqos_read() local
3690 static ssize_t qm_get_qos_value(struct hisi_qm *qm, const char *buf, in qm_get_qos_value()
3727 struct hisi_qm *qm = filp->private_data; in qm_algqos_write() local
3791 void hisi_qm_set_algqos_init(struct hisi_qm *qm) in hisi_qm_set_algqos_init()
3801 static void hisi_qm_init_vf_qos(struct hisi_qm *qm, int total_func) in hisi_qm_init_vf_qos()
3820 struct hisi_qm *qm = pci_get_drvdata(pdev); in hisi_qm_sriov_enable() local
3880 struct hisi_qm *qm = pci_get_drvdata(pdev); in hisi_qm_sriov_disable() local
3922 static enum acc_err_result qm_dev_err_handle(struct hisi_qm *qm) in qm_dev_err_handle()
3950 static enum acc_err_result qm_process_dev_error(struct hisi_qm *qm) in qm_process_dev_error()
3976 struct hisi_qm *qm = pci_get_drvdata(pdev); in hisi_qm_dev_err_detected() local
3994 static int qm_check_req_recv(struct hisi_qm *qm) in qm_check_req_recv()
4022 static int qm_set_pf_mse(struct hisi_qm *qm, bool set) in qm_set_pf_mse()
4046 static int qm_set_vf_mse(struct hisi_qm *qm, bool set) in qm_set_vf_mse()
4073 static int qm_vf_reset_prepare(struct hisi_qm *qm, in qm_vf_reset_prepare()
4103 static int qm_try_stop_vfs(struct hisi_qm *qm, u64 cmd, in qm_try_stop_vfs()
4126 static int qm_controller_reset_prepare(struct hisi_qm *qm) in qm_controller_reset_prepare()
4167 static void qm_dev_ecc_mbit_handle(struct hisi_qm *qm) in qm_dev_ecc_mbit_handle()
4189 static int qm_soft_reset(struct hisi_qm *qm) in qm_soft_reset()
4264 static int qm_vf_reset_done(struct hisi_qm *qm) in qm_vf_reset_done()
4293 static int qm_try_start_vfs(struct hisi_qm *qm, enum qm_mb_cmd cmd) in qm_try_start_vfs()
4321 static int qm_dev_hw_init(struct hisi_qm *qm) in qm_dev_hw_init()
4326 static void qm_restart_prepare(struct hisi_qm *qm) in qm_restart_prepare()
4357 static void qm_restart_done(struct hisi_qm *qm) in qm_restart_done()
4378 static int qm_controller_reset_done(struct hisi_qm *qm) in qm_controller_reset_done()
4442 static int qm_controller_reset(struct hisi_qm *qm) in qm_controller_reset()
4492 struct hisi_qm *qm = pci_get_drvdata(pdev); in hisi_qm_dev_slot_reset() local
4512 struct hisi_qm *qm = pci_get_drvdata(pdev); in hisi_qm_reset_prepare() local
4561 struct hisi_qm *qm = pci_get_drvdata(pf_pdev); in qm_flr_reset_complete() local
4576 struct hisi_qm *qm = pci_get_drvdata(pdev); in hisi_qm_reset_done() local
4616 struct hisi_qm *qm = data; in qm_abnormal_irq() local
4637 struct hisi_qm *qm = pci_get_drvdata(pdev); in hisi_qm_dev_shutdown() local
4648 struct hisi_qm *qm = container_of(rst_work, struct hisi_qm, rst_work); in hisi_qm_controller_reset() local
4665 static void qm_pf_reset_vf_prepare(struct hisi_qm *qm, in qm_pf_reset_vf_prepare()
4700 static void qm_pf_reset_vf_done(struct hisi_qm *qm) in qm_pf_reset_vf_done()
4721 static int qm_wait_pf_reset_finish(struct hisi_qm *qm) in qm_wait_pf_reset_finish()
4758 static void qm_pf_reset_vf_process(struct hisi_qm *qm, in qm_pf_reset_vf_process()
4785 static void qm_handle_cmd_msg(struct hisi_qm *qm, u32 fun_num) in qm_handle_cmd_msg()
4825 struct hisi_qm *qm = container_of(cmd_process, in qm_cmd_process() local
4855 int hisi_qm_alg_register(struct hisi_qm *qm, struct hisi_qm_list *qm_list) in hisi_qm_alg_register()
4894 void hisi_qm_alg_unregister(struct hisi_qm *qm, struct hisi_qm_list *qm_list) in hisi_qm_alg_unregister()
4908 static void qm_unregister_abnormal_irq(struct hisi_qm *qm) in qm_unregister_abnormal_irq()
4924 static int qm_register_abnormal_irq(struct hisi_qm *qm) in qm_register_abnormal_irq()
4945 static void qm_unregister_mb_cmd_irq(struct hisi_qm *qm) in qm_unregister_mb_cmd_irq()
4958 static int qm_register_mb_cmd_irq(struct hisi_qm *qm) in qm_register_mb_cmd_irq()
4976 static void qm_unregister_aeq_irq(struct hisi_qm *qm) in qm_unregister_aeq_irq()
4989 static int qm_register_aeq_irq(struct hisi_qm *qm) in qm_register_aeq_irq()
5008 static void qm_unregister_eq_irq(struct hisi_qm *qm) in qm_unregister_eq_irq()
5021 static int qm_register_eq_irq(struct hisi_qm *qm) in qm_register_eq_irq()
5039 static void qm_irqs_unregister(struct hisi_qm *qm) in qm_irqs_unregister()
5047 static int qm_irqs_register(struct hisi_qm *qm) in qm_irqs_register()
5078 static int qm_get_qp_num(struct hisi_qm *qm) in qm_get_qp_num()
5106 static void qm_get_hw_caps(struct hisi_qm *qm) in qm_get_hw_caps()
5139 static int qm_get_pci_res(struct hisi_qm *qm) in qm_get_pci_res()
5190 static int hisi_qm_pci_init(struct hisi_qm *qm) in hisi_qm_pci_init()
5228 static int hisi_qm_init_work(struct hisi_qm *qm) in hisi_qm_init_work()
5252 static int hisi_qp_alloc_memory(struct hisi_qm *qm) in hisi_qp_alloc_memory()
5290 static int hisi_qm_memory_init(struct hisi_qm *qm) in hisi_qm_memory_init()
5306 #define QM_INIT_BUF(qm, type, num) do { \ in hisi_qm_memory_init() argument
5353 int hisi_qm_init(struct hisi_qm *qm) in hisi_qm_init()
5418 int hisi_qm_get_dfx_access(struct hisi_qm *qm) in hisi_qm_get_dfx_access()
5437 void hisi_qm_put_dfx_access(struct hisi_qm *qm) in hisi_qm_put_dfx_access()
5449 void hisi_qm_pm_init(struct hisi_qm *qm) in hisi_qm_pm_init()
5468 void hisi_qm_pm_uninit(struct hisi_qm *qm) in hisi_qm_pm_uninit()
5480 static int qm_prepare_for_suspend(struct hisi_qm *qm) in qm_prepare_for_suspend()
5512 static int qm_rebuild_for_resume(struct hisi_qm *qm) in qm_rebuild_for_resume()
5554 struct hisi_qm *qm = pci_get_drvdata(pdev); in hisi_qm_suspend() local
5582 struct hisi_qm *qm = pci_get_drvdata(pdev); in hisi_qm_resume() local