Lines Matching refs:hisi_qm
370 struct hisi_qm *qm;
386 int (*get_vft)(struct hisi_qm *qm, u32 *base, u32 *number);
387 void (*qm_db)(struct hisi_qm *qm, u16 qn,
389 int (*debug_init)(struct hisi_qm *qm);
390 void (*hw_error_init)(struct hisi_qm *qm);
391 void (*hw_error_uninit)(struct hisi_qm *qm);
392 enum acc_err_result (*hw_error_handle)(struct hisi_qm *qm);
393 int (*set_msi)(struct hisi_qm *qm, bool set);
457 static void qm_irqs_unregister(struct hisi_qm *qm);
459 static bool qm_avail_state(struct hisi_qm *qm, enum qm_state new) in qm_avail_state()
491 static bool qm_qp_avail_state(struct hisi_qm *qm, struct hisi_qp *qp, in qm_qp_avail_state()
538 static u32 qm_get_hw_error_status(struct hisi_qm *qm) in qm_get_hw_error_status()
543 static u32 qm_get_dev_err_status(struct hisi_qm *qm) in qm_get_dev_err_status()
549 static bool qm_check_dev_error(struct hisi_qm *qm) in qm_check_dev_error()
562 static int qm_wait_reset_finish(struct hisi_qm *qm) in qm_wait_reset_finish()
576 static int qm_reset_prepare_ready(struct hisi_qm *qm) in qm_reset_prepare_ready()
579 struct hisi_qm *pf_qm = pci_get_drvdata(pci_physfn(pdev)); in qm_reset_prepare_ready()
591 static void qm_reset_bit_clear(struct hisi_qm *qm) in qm_reset_bit_clear()
594 struct hisi_qm *pf_qm = pci_get_drvdata(pci_physfn(pdev)); in qm_reset_bit_clear()
615 int hisi_qm_wait_mb_ready(struct hisi_qm *qm) in hisi_qm_wait_mb_ready()
626 static void qm_mb_write(struct hisi_qm *qm, const void *src) in qm_mb_write()
652 static int qm_mb_nolock(struct hisi_qm *qm, struct qm_mailbox *mailbox) in qm_mb_nolock()
685 int hisi_qm_mb(struct hisi_qm *qm, u8 cmd, dma_addr_t dma_addr, u16 queue, in hisi_qm_mb()
704 static void qm_db_v1(struct hisi_qm *qm, u16 qn, u8 cmd, u16 index, u8 priority) in qm_db_v1()
715 static void qm_db_v2(struct hisi_qm *qm, u16 qn, u8 cmd, u16 index, u8 priority) in qm_db_v2()
735 static void qm_db(struct hisi_qm *qm, u16 qn, u8 cmd, u16 index, u8 priority) in qm_db()
743 static void qm_disable_clock_gate(struct hisi_qm *qm) in qm_disable_clock_gate()
756 static int qm_dev_mem_reset(struct hisi_qm *qm) in qm_dev_mem_reset()
775 u32 hisi_qm_get_hw_info(struct hisi_qm *qm, in hisi_qm_get_hw_info()
796 static void qm_get_xqc_depth(struct hisi_qm *qm, u16 *low_bits, in qm_get_xqc_depth()
806 int hisi_qm_set_algs(struct hisi_qm *qm, u64 alg_msk, const struct qm_dev_alg *dev_algs, in hisi_qm_set_algs()
840 static u32 qm_get_irq_num(struct hisi_qm *qm) in qm_get_irq_num()
848 static int qm_pm_get_sync(struct hisi_qm *qm) in qm_pm_get_sync()
865 static void qm_pm_put_sync(struct hisi_qm *qm) in qm_pm_put_sync()
889 struct hisi_qm *qm = qp->qm; in qm_poll_req_cb()
912 struct hisi_qm *qm = poll_data->qm; in qm_work_process()
932 static void qm_get_complete_eqe_num(struct hisi_qm *qm) in qm_get_complete_eqe_num()
975 struct hisi_qm *qm = data; in qm_eq_irq()
985 struct hisi_qm *qm = data; in qm_mb_cmd_irq()
1017 static void qm_disable_qp(struct hisi_qm *qm, u32 qp_id) in qm_disable_qp()
1026 static void qm_reset_function(struct hisi_qm *qm) in qm_reset_function()
1028 struct hisi_qm *pf_qm = pci_get_drvdata(pci_physfn(qm->pdev)); in qm_reset_function()
1057 struct hisi_qm *qm = data; in qm_aeq_thread()
1111 static void qm_init_prefetch(struct hisi_qm *qm) in qm_init_prefetch()
1204 static void qm_vft_data_cfg(struct hisi_qm *qm, enum vft_type type, u32 base, in qm_vft_data_cfg()
1250 static int qm_set_vft_common(struct hisi_qm *qm, enum vft_type type, in qm_set_vft_common()
1283 static int qm_shaper_init_vft(struct hisi_qm *qm, u32 fun_num) in qm_shaper_init_vft()
1305 static int qm_set_sqc_cqc_vft(struct hisi_qm *qm, u32 fun_num, u32 base, in qm_set_sqc_cqc_vft()
1331 static int qm_get_vft_v2(struct hisi_qm *qm, u32 *base, u32 *number) in qm_get_vft_v2()
1349 void *hisi_qm_ctx_alloc(struct hisi_qm *qm, size_t ctx_size, in hisi_qm_ctx_alloc()
1369 void hisi_qm_ctx_free(struct hisi_qm *qm, size_t ctx_size, in hisi_qm_ctx_free()
1378 static int qm_dump_sqc_raw(struct hisi_qm *qm, dma_addr_t dma_addr, u16 qp_id) in qm_dump_sqc_raw()
1383 static int qm_dump_cqc_raw(struct hisi_qm *qm, dma_addr_t dma_addr, u16 qp_id) in qm_dump_cqc_raw()
1388 static void qm_hw_error_init_v1(struct hisi_qm *qm) in qm_hw_error_init_v1()
1393 static void qm_hw_error_cfg(struct hisi_qm *qm) in qm_hw_error_cfg()
1408 static void qm_hw_error_init_v2(struct hisi_qm *qm) in qm_hw_error_init_v2()
1419 static void qm_hw_error_uninit_v2(struct hisi_qm *qm) in qm_hw_error_uninit_v2()
1427 static void qm_hw_error_init_v3(struct hisi_qm *qm) in qm_hw_error_init_v3()
1441 static void qm_hw_error_uninit_v3(struct hisi_qm *qm) in qm_hw_error_uninit_v3()
1452 static void qm_log_hw_error(struct hisi_qm *qm, u32 error_status) in qm_log_hw_error()
1489 static enum acc_err_result qm_hw_error_handle_v2(struct hisi_qm *qm) in qm_hw_error_handle_v2()
1512 static int qm_get_mb_cmd(struct hisi_qm *qm, u64 *msg, u16 fun_num) in qm_get_mb_cmd()
1531 static void qm_clear_cmd_interrupt(struct hisi_qm *qm, u64 vf_mask) in qm_clear_cmd_interrupt()
1543 static void qm_handle_vf_msg(struct hisi_qm *qm, u32 vf_id) in qm_handle_vf_msg()
1573 static int qm_wait_vf_prepare_finish(struct hisi_qm *qm) in qm_wait_vf_prepare_finish()
1613 static void qm_trigger_vf_interrupt(struct hisi_qm *qm, u32 fun_num) in qm_trigger_vf_interrupt()
1627 static void qm_trigger_pf_interrupt(struct hisi_qm *qm) in qm_trigger_pf_interrupt()
1636 static int qm_ping_single_vf(struct hisi_qm *qm, u64 cmd, u32 fun_num) in qm_ping_single_vf()
1672 static int qm_ping_all_vfs(struct hisi_qm *qm, u64 cmd) in qm_ping_all_vfs()
1717 static int qm_ping_pf(struct hisi_qm *qm, u64 cmd) in qm_ping_pf()
1756 static int qm_set_msi(struct hisi_qm *qm, bool set) in qm_set_msi()
1778 static void qm_wait_msi_finish(struct hisi_qm *qm) in qm_wait_msi_finish()
1813 static int qm_set_msi_v3(struct hisi_qm *qm, bool set) in qm_set_msi_v3()
1887 static struct hisi_qp *qm_create_qp_nolock(struct hisi_qm *qm, u8 alg_type) in qm_create_qp_nolock()
1933 static struct hisi_qp *hisi_qm_create_qp(struct hisi_qm *qm, u8 alg_type) in hisi_qm_create_qp()
1960 struct hisi_qm *qm = qp->qm; in hisi_qm_release_qp()
1979 struct hisi_qm *qm = qp->qm; in qm_sq_ctx_cfg()
2021 struct hisi_qm *qm = qp->qm; in qm_cq_ctx_cfg()
2075 struct hisi_qm *qm = qp->qm; in qm_start_qp_nolock()
2104 struct hisi_qm *qm = qp->qm; in hisi_qm_start_qp()
2127 struct hisi_qm *qm = qp->qm; in qp_stop_fail_cb()
2148 struct hisi_qm *qm = qp->qm; in qm_drain_qp()
2303 static void hisi_qm_cache_wb(struct hisi_qm *qm) in hisi_qm_cache_wb()
2325 struct hisi_qm *qm = uacce->priv; in hisi_qm_get_available_instances()
2335 static void hisi_qm_set_hw_reset(struct hisi_qm *qm, int offset) in hisi_qm_set_hw_reset()
2347 struct hisi_qm *qm = uacce->priv; in hisi_qm_uacce_get_queue()
2378 struct hisi_qm *qm = qp->qm; in hisi_qm_uacce_mmap()
2457 struct hisi_qm *qm = q->uacce->priv; in qm_set_sqctype()
2512 static int qm_hw_err_isolate(struct hisi_qm *qm) in qm_hw_err_isolate()
2556 static void qm_hw_err_destroy(struct hisi_qm *qm) in qm_hw_err_destroy()
2570 struct hisi_qm *qm = uacce->priv; in hisi_qm_get_isolate_state()
2571 struct hisi_qm *pf_qm; in hisi_qm_get_isolate_state()
2584 struct hisi_qm *qm = uacce->priv; in hisi_qm_isolate_threshold_write()
2603 struct hisi_qm *qm = uacce->priv; in hisi_qm_isolate_threshold_read()
2604 struct hisi_qm *pf_qm; in hisi_qm_isolate_threshold_read()
2628 static void qm_remove_uacce(struct hisi_qm *qm) in qm_remove_uacce()
2639 static int qm_alloc_uacce(struct hisi_qm *qm) in qm_alloc_uacce()
2711 static int qm_frozen(struct hisi_qm *qm) in qm_frozen()
2733 struct hisi_qm *qm, *vf_qm; in qm_try_frozen_vfs()
2766 void hisi_qm_wait_task_finish(struct hisi_qm *qm, struct hisi_qm_list *qm_list) in hisi_qm_wait_task_finish()
2785 static void hisi_qp_memory_uninit(struct hisi_qm *qm, int num) in hisi_qp_memory_uninit()
2801 static int hisi_qp_memory_init(struct hisi_qm *qm, size_t dma_size, int id, in hisi_qp_memory_init()
2837 static void hisi_qm_pre_init(struct hisi_qm *qm) in hisi_qm_pre_init()
2858 static void qm_cmd_uninit(struct hisi_qm *qm) in qm_cmd_uninit()
2870 static void qm_cmd_init(struct hisi_qm *qm) in qm_cmd_init()
2886 static void qm_put_pci_res(struct hisi_qm *qm) in qm_put_pci_res()
2897 static void hisi_qm_pci_uninit(struct hisi_qm *qm) in hisi_qm_pci_uninit()
2906 static void hisi_qm_set_state(struct hisi_qm *qm, u8 state) in hisi_qm_set_state()
2912 static void hisi_qm_unint_work(struct hisi_qm *qm) in hisi_qm_unint_work()
2917 static void hisi_qm_memory_uninit(struct hisi_qm *qm) in hisi_qm_memory_uninit()
2940 void hisi_qm_uninit(struct hisi_qm *qm) in hisi_qm_uninit()
2976 static int hisi_qm_get_vft(struct hisi_qm *qm, u32 *base, u32 *number) in hisi_qm_get_vft()
3003 static int hisi_qm_set_vft(struct hisi_qm *qm, u32 fun_num, u32 base, in hisi_qm_set_vft()
3015 static void qm_init_eq_aeq_status(struct hisi_qm *qm) in qm_init_eq_aeq_status()
3025 static void qm_enable_eq_aeq_interrupts(struct hisi_qm *qm) in qm_enable_eq_aeq_interrupts()
3035 static void qm_disable_eq_aeq_interrupts(struct hisi_qm *qm) in qm_disable_eq_aeq_interrupts()
3041 static int qm_eq_ctx_cfg(struct hisi_qm *qm) in qm_eq_ctx_cfg()
3072 static int qm_aeq_ctx_cfg(struct hisi_qm *qm) in qm_aeq_ctx_cfg()
3101 static int qm_eq_aeq_ctx_cfg(struct hisi_qm *qm) in qm_eq_aeq_ctx_cfg()
3117 static int __hisi_qm_start(struct hisi_qm *qm) in __hisi_qm_start()
3153 int hisi_qm_start(struct hisi_qm *qm) in hisi_qm_start()
3184 static int qm_restart(struct hisi_qm *qm) in qm_restart()
3215 static int qm_stop_started_qp(struct hisi_qm *qm) in qm_stop_started_qp()
3243 static void qm_clear_queues(struct hisi_qm *qm) in qm_clear_queues()
3266 int hisi_qm_stop(struct hisi_qm *qm, enum qm_stop_reason r) in hisi_qm_stop()
3309 static void qm_hw_error_init(struct hisi_qm *qm) in qm_hw_error_init()
3319 static void qm_hw_error_uninit(struct hisi_qm *qm) in qm_hw_error_uninit()
3329 static enum acc_err_result qm_hw_error_handle(struct hisi_qm *qm) in qm_hw_error_handle()
3345 void hisi_qm_dev_err_init(struct hisi_qm *qm) in hisi_qm_dev_err_init()
3366 void hisi_qm_dev_err_uninit(struct hisi_qm *qm) in hisi_qm_dev_err_uninit()
3412 struct hisi_qm *qm; in hisi_qm_sort_devices()
3498 static int qm_vf_q_assign(struct hisi_qm *qm, u32 num_vfs) in qm_vf_q_assign()
3545 static int qm_clear_vft_config(struct hisi_qm *qm) in qm_clear_vft_config()
3560 static int qm_func_shaper_enable(struct hisi_qm *qm, u32 fun_index, u32 qos) in qm_func_shaper_enable()
3590 static u32 qm_get_shaper_vft_qos(struct hisi_qm *qm, u32 fun_index) in qm_get_shaper_vft_qos()
3640 static void qm_vf_get_qos(struct hisi_qm *qm, u32 fun_num) in qm_vf_get_qos()
3659 static int qm_vf_read_qos(struct hisi_qm *qm) in qm_vf_read_qos()
3691 struct hisi_qm *qm = filp->private_data; in qm_algqos_read()
3728 static ssize_t qm_get_qos_value(struct hisi_qm *qm, const char *buf, in qm_get_qos_value()
3765 struct hisi_qm *qm = filp->private_data; in qm_algqos_write()
3829 void hisi_qm_set_algqos_init(struct hisi_qm *qm) in hisi_qm_set_algqos_init()
3839 static void hisi_qm_init_vf_qos(struct hisi_qm *qm, int total_func) in hisi_qm_init_vf_qos()
3858 struct hisi_qm *qm = pci_get_drvdata(pdev); in hisi_qm_sriov_enable()
3918 struct hisi_qm *qm = pci_get_drvdata(pdev); in hisi_qm_sriov_disable()
3960 static enum acc_err_result qm_dev_err_handle(struct hisi_qm *qm) in qm_dev_err_handle()
3988 static enum acc_err_result qm_process_dev_error(struct hisi_qm *qm) in qm_process_dev_error()
4014 struct hisi_qm *qm = pci_get_drvdata(pdev); in hisi_qm_dev_err_detected()
4032 static int qm_check_req_recv(struct hisi_qm *qm) in qm_check_req_recv()
4060 static int qm_set_pf_mse(struct hisi_qm *qm, bool set) in qm_set_pf_mse()
4084 static int qm_set_vf_mse(struct hisi_qm *qm, bool set) in qm_set_vf_mse()
4111 static int qm_vf_reset_prepare(struct hisi_qm *qm, in qm_vf_reset_prepare()
4117 struct hisi_qm *vf_qm; in qm_vf_reset_prepare()
4141 static int qm_try_stop_vfs(struct hisi_qm *qm, u64 cmd, in qm_try_stop_vfs()
4164 static int qm_controller_reset_prepare(struct hisi_qm *qm) in qm_controller_reset_prepare()
4205 static void qm_dev_ecc_mbit_handle(struct hisi_qm *qm) in qm_dev_ecc_mbit_handle()
4227 static int qm_soft_reset(struct hisi_qm *qm) in qm_soft_reset()
4302 static int qm_vf_reset_done(struct hisi_qm *qm) in qm_vf_reset_done()
4307 struct hisi_qm *vf_qm; in qm_vf_reset_done()
4331 static int qm_try_start_vfs(struct hisi_qm *qm, enum qm_mb_cmd cmd) in qm_try_start_vfs()
4359 static int qm_dev_hw_init(struct hisi_qm *qm) in qm_dev_hw_init()
4364 static void qm_restart_prepare(struct hisi_qm *qm) in qm_restart_prepare()
4395 static void qm_restart_done(struct hisi_qm *qm) in qm_restart_done()
4416 static int qm_controller_reset_done(struct hisi_qm *qm) in qm_controller_reset_done()
4480 static int qm_controller_reset(struct hisi_qm *qm) in qm_controller_reset()
4530 struct hisi_qm *qm = pci_get_drvdata(pdev); in hisi_qm_dev_slot_reset()
4549 struct hisi_qm *pf_qm = pci_get_drvdata(pci_physfn(pdev)); in hisi_qm_reset_prepare()
4550 struct hisi_qm *qm = pci_get_drvdata(pdev); in hisi_qm_reset_prepare()
4599 struct hisi_qm *qm = pci_get_drvdata(pf_pdev); in qm_flr_reset_complete()
4613 struct hisi_qm *pf_qm = pci_get_drvdata(pci_physfn(pdev)); in hisi_qm_reset_done()
4614 struct hisi_qm *qm = pci_get_drvdata(pdev); in hisi_qm_reset_done()
4654 struct hisi_qm *qm = data; in qm_abnormal_irq()
4675 struct hisi_qm *qm = pci_get_drvdata(pdev); in hisi_qm_dev_shutdown()
4688 struct hisi_qm *qm = container_of(rst_work, struct hisi_qm, rst_work); in hisi_qm_controller_reset()
4705 static void qm_pf_reset_vf_prepare(struct hisi_qm *qm, in qm_pf_reset_vf_prepare()
4740 static void qm_pf_reset_vf_done(struct hisi_qm *qm) in qm_pf_reset_vf_done()
4761 static int qm_wait_pf_reset_finish(struct hisi_qm *qm) in qm_wait_pf_reset_finish()
4798 static void qm_pf_reset_vf_process(struct hisi_qm *qm, in qm_pf_reset_vf_process()
4825 static void qm_handle_cmd_msg(struct hisi_qm *qm, u32 fun_num) in qm_handle_cmd_msg()
4865 struct hisi_qm *qm = container_of(cmd_process, in qm_cmd_process()
4866 struct hisi_qm, cmd_process); in qm_cmd_process()
4895 int hisi_qm_alg_register(struct hisi_qm *qm, struct hisi_qm_list *qm_list) in hisi_qm_alg_register()
4934 void hisi_qm_alg_unregister(struct hisi_qm *qm, struct hisi_qm_list *qm_list) in hisi_qm_alg_unregister()
4948 static void qm_unregister_abnormal_irq(struct hisi_qm *qm) in qm_unregister_abnormal_irq()
4964 static int qm_register_abnormal_irq(struct hisi_qm *qm) in qm_register_abnormal_irq()
4985 static void qm_unregister_mb_cmd_irq(struct hisi_qm *qm) in qm_unregister_mb_cmd_irq()
4998 static int qm_register_mb_cmd_irq(struct hisi_qm *qm) in qm_register_mb_cmd_irq()
5016 static void qm_unregister_aeq_irq(struct hisi_qm *qm) in qm_unregister_aeq_irq()
5029 static int qm_register_aeq_irq(struct hisi_qm *qm) in qm_register_aeq_irq()
5048 static void qm_unregister_eq_irq(struct hisi_qm *qm) in qm_unregister_eq_irq()
5061 static int qm_register_eq_irq(struct hisi_qm *qm) in qm_register_eq_irq()
5079 static void qm_irqs_unregister(struct hisi_qm *qm) in qm_irqs_unregister()
5087 static int qm_irqs_register(struct hisi_qm *qm) in qm_irqs_register()
5118 static int qm_get_qp_num(struct hisi_qm *qm) in qm_get_qp_num()
5155 static int qm_pre_store_irq_type_caps(struct hisi_qm *qm) in qm_pre_store_irq_type_caps()
5177 static int qm_get_hw_caps(struct hisi_qm *qm) in qm_get_hw_caps()
5213 static int qm_get_pci_res(struct hisi_qm *qm) in qm_get_pci_res()
5267 static int hisi_qm_pci_init(struct hisi_qm *qm) in hisi_qm_pci_init()
5305 static int hisi_qm_init_work(struct hisi_qm *qm) in hisi_qm_init_work()
5329 static int hisi_qp_alloc_memory(struct hisi_qm *qm) in hisi_qp_alloc_memory()
5367 static int hisi_qm_memory_init(struct hisi_qm *qm) in hisi_qm_memory_init()
5430 int hisi_qm_init(struct hisi_qm *qm) in hisi_qm_init()
5497 int hisi_qm_get_dfx_access(struct hisi_qm *qm) in hisi_qm_get_dfx_access()
5516 void hisi_qm_put_dfx_access(struct hisi_qm *qm) in hisi_qm_put_dfx_access()
5528 void hisi_qm_pm_init(struct hisi_qm *qm) in hisi_qm_pm_init()
5547 void hisi_qm_pm_uninit(struct hisi_qm *qm) in hisi_qm_pm_uninit()
5559 static int qm_prepare_for_suspend(struct hisi_qm *qm) in qm_prepare_for_suspend()
5591 static int qm_rebuild_for_resume(struct hisi_qm *qm) in qm_rebuild_for_resume()
5635 struct hisi_qm *qm = pci_get_drvdata(pdev); in hisi_qm_suspend()
5663 struct hisi_qm *qm = pci_get_drvdata(pdev); in hisi_qm_resume()