Home
last modified time | relevance | path

Searched refs:cptvf (Results 1 - 25 of 32) sorted by relevance

12

/kernel/linux/linux-5.10/drivers/crypto/marvell/octeontx/
H A Dotx_cptvf_main.c17 #define DRV_NAME "octeontx-cptvf"
28 static int init_worker_threads(struct otx_cptvf *cptvf) in init_worker_threads() argument
30 struct pci_dev *pdev = cptvf->pdev; in init_worker_threads()
38 if (cptvf->num_queues) { in init_worker_threads()
40 cptvf->num_queues); in init_worker_threads()
43 for (i = 0; i < cptvf->num_queues; i++) { in init_worker_threads()
46 cwqe_info->vq_wqe[i].cptvf = cptvf; in init_worker_threads()
48 cptvf->wqe_info = cwqe_info; in init_worker_threads()
53 static void cleanup_worker_threads(struct otx_cptvf *cptvf) in cleanup_worker_threads() argument
127 init_pending_queues(struct otx_cptvf *cptvf, u32 qlen, u32 num_queues) init_pending_queues() argument
145 cleanup_pending_queues(struct otx_cptvf *cptvf) cleanup_pending_queues() argument
157 free_command_queues(struct otx_cptvf *cptvf, struct otx_cpt_cmd_qinfo *cqinfo) free_command_queues() argument
187 alloc_command_queues(struct otx_cptvf *cptvf, struct otx_cpt_cmd_qinfo *cqinfo, u32 qlen) alloc_command_queues() argument
265 init_command_queues(struct otx_cptvf *cptvf, u32 qlen) init_command_queues() argument
280 cleanup_command_queues(struct otx_cptvf *cptvf) cleanup_command_queues() argument
292 cptvf_sw_cleanup(struct otx_cptvf *cptvf) cptvf_sw_cleanup() argument
299 cptvf_sw_init(struct otx_cptvf *cptvf, u32 qlen, u32 num_queues) cptvf_sw_init() argument
342 cptvf_free_irq_affinity(struct otx_cptvf *cptvf, int vec) cptvf_free_irq_affinity() argument
348 cptvf_write_vq_ctl(struct otx_cptvf *cptvf, bool val) cptvf_write_vq_ctl() argument
357 otx_cptvf_write_vq_doorbell(struct otx_cptvf *cptvf, u32 val) otx_cptvf_write_vq_doorbell() argument
366 cptvf_write_vq_inprog(struct otx_cptvf *cptvf, u8 val) cptvf_write_vq_inprog() argument
375 cptvf_write_vq_done_numwait(struct otx_cptvf *cptvf, u32 val) cptvf_write_vq_done_numwait() argument
384 cptvf_read_vq_done_numwait(struct otx_cptvf *cptvf) cptvf_read_vq_done_numwait() argument
392 cptvf_write_vq_done_timewait(struct otx_cptvf *cptvf, u16 time) cptvf_write_vq_done_timewait() argument
402 cptvf_read_vq_done_timewait(struct otx_cptvf *cptvf) cptvf_read_vq_done_timewait() argument
410 cptvf_enable_swerr_interrupts(struct otx_cptvf *cptvf) cptvf_enable_swerr_interrupts() argument
420 cptvf_enable_mbox_interrupts(struct otx_cptvf *cptvf) cptvf_enable_mbox_interrupts() argument
430 cptvf_enable_done_interrupts(struct otx_cptvf *cptvf) cptvf_enable_done_interrupts() argument
440 cptvf_clear_dovf_intr(struct otx_cptvf *cptvf) cptvf_clear_dovf_intr() argument
450 cptvf_clear_irde_intr(struct otx_cptvf *cptvf) cptvf_clear_irde_intr() argument
460 cptvf_clear_nwrp_intr(struct otx_cptvf *cptvf) cptvf_clear_nwrp_intr() argument
470 cptvf_clear_mbox_intr(struct otx_cptvf *cptvf) cptvf_clear_mbox_intr() argument
480 cptvf_clear_swerr_intr(struct otx_cptvf *cptvf) cptvf_clear_swerr_intr() argument
490 cptvf_read_vf_misc_intr_status(struct otx_cptvf *cptvf) cptvf_read_vf_misc_intr_status() argument
498 struct otx_cptvf *cptvf = arg; cptvf_misc_intr_handler() local
539 get_cptvf_vq_wqe(struct otx_cptvf *cptvf, int qno) get_cptvf_vq_wqe() argument
551 cptvf_read_vq_done_count(struct otx_cptvf *cptvf) cptvf_read_vq_done_count() argument
559 cptvf_write_vq_done_ack(struct otx_cptvf *cptvf, u32 ackcnt) cptvf_write_vq_done_ack() argument
572 struct otx_cptvf *cptvf = (struct otx_cptvf *)cptvf_dev; cptvf_done_intr_handler() local
597 cptvf_set_irq_affinity(struct otx_cptvf *cptvf, int vec) cptvf_set_irq_affinity() argument
617 cptvf_write_vq_saddr(struct otx_cptvf *cptvf, u64 val) cptvf_write_vq_saddr() argument
625 cptvf_device_init(struct otx_cptvf *cptvf) cptvf_device_init() argument
651 struct otx_cptvf *cptvf = dev_get_drvdata(dev); vf_type_show() local
674 struct otx_cptvf *cptvf = dev_get_drvdata(dev); vf_engine_group_show() local
683 struct otx_cptvf *cptvf = dev_get_drvdata(dev); vf_engine_group_store() local
710 struct otx_cptvf *cptvf = dev_get_drvdata(dev); vf_coalesc_time_wait_show() local
720 struct otx_cptvf *cptvf = dev_get_drvdata(dev); vf_coalesc_num_wait_show() local
730 struct otx_cptvf *cptvf = dev_get_drvdata(dev); vf_coalesc_time_wait_store() local
750 struct otx_cptvf *cptvf = dev_get_drvdata(dev); vf_coalesc_num_wait_store() local
787 struct otx_cptvf *cptvf; otx_cptvf_probe() local
919 free_irq(pci_irq_vector(pdev, CPT_VF_INT_VEC_E_DONE), cptvf); otx_cptvf_probe() local
923 free_irq(pci_irq_vector(pdev, CPT_VF_INT_VEC_E_MISC), cptvf); otx_cptvf_probe() local
940 struct otx_cptvf *cptvf = pci_get_drvdata(pdev); otx_cptvf_remove() local
955 free_irq(pci_irq_vector(pdev, CPT_VF_INT_VEC_E_DONE), cptvf); otx_cptvf_remove() local
956 free_irq(pci_irq_vector(pdev, CPT_VF_INT_VEC_E_MISC), cptvf); otx_cptvf_remove() local
[all...]
H A Dotx_cptvf_mbox.c75 static void cptvf_send_msg_to_pf(struct otx_cptvf *cptvf, in cptvf_send_msg_to_pf() argument
79 writeq(mbx->msg, cptvf->reg_base + OTX_CPT_VFX_PF_MBOXX(0, 0)); in cptvf_send_msg_to_pf()
80 writeq(mbx->data, cptvf->reg_base + OTX_CPT_VFX_PF_MBOXX(0, 1)); in cptvf_send_msg_to_pf()
84 void otx_cptvf_handle_mbox_intr(struct otx_cptvf *cptvf) in otx_cptvf_handle_mbox_intr() argument
92 mbx.msg = readq(cptvf->reg_base + OTX_CPT_VFX_PF_MBOXX(0, 0)); in otx_cptvf_handle_mbox_intr()
93 mbx.data = readq(cptvf->reg_base + OTX_CPT_VFX_PF_MBOXX(0, 1)); in otx_cptvf_handle_mbox_intr()
99 cptvf->pf_acked = true; in otx_cptvf_handle_mbox_intr()
100 cptvf->num_vfs = mbx.data; in otx_cptvf_handle_mbox_intr()
103 cptvf->pf_acked = true; in otx_cptvf_handle_mbox_intr()
104 cptvf in otx_cptvf_handle_mbox_intr()
128 cptvf_send_msg_to_pf_timeout(struct otx_cptvf *cptvf, struct otx_cpt_mbox *mbx) cptvf_send_msg_to_pf_timeout() argument
159 otx_cptvf_check_pf_ready(struct otx_cptvf *cptvf) otx_cptvf_check_pf_ready() argument
174 otx_cptvf_send_vq_size_msg(struct otx_cptvf *cptvf) otx_cptvf_send_vq_size_msg() argument
189 otx_cptvf_send_vf_to_grp_msg(struct otx_cptvf *cptvf, int group) otx_cptvf_send_vf_to_grp_msg() argument
208 otx_cptvf_send_vf_priority_msg(struct otx_cptvf *cptvf) otx_cptvf_send_vf_priority_msg() argument
224 otx_cptvf_send_vf_up(struct otx_cptvf *cptvf) otx_cptvf_send_vf_up() argument
238 otx_cptvf_send_vf_down(struct otx_cptvf *cptvf) otx_cptvf_send_vf_down() argument
[all...]
H A Dotx_cptvf.h62 struct otx_cptvf *cptvf; member
95 int otx_cptvf_send_vf_up(struct otx_cptvf *cptvf);
96 int otx_cptvf_send_vf_down(struct otx_cptvf *cptvf);
97 int otx_cptvf_send_vf_to_grp_msg(struct otx_cptvf *cptvf, int group);
98 int otx_cptvf_send_vf_priority_msg(struct otx_cptvf *cptvf);
99 int otx_cptvf_send_vq_size_msg(struct otx_cptvf *cptvf);
100 int otx_cptvf_check_pf_ready(struct otx_cptvf *cptvf);
101 void otx_cptvf_handle_mbox_intr(struct otx_cptvf *cptvf);
102 void otx_cptvf_write_vq_doorbell(struct otx_cptvf *cptvf, u32 val);
H A Dotx_cptvf_reqmgr.c268 static void cpt_send_cmd(union otx_cpt_inst_s *cptinst, struct otx_cptvf *cptvf) in cpt_send_cmd() argument
270 struct otx_cpt_cmd_qinfo *qinfo = &cptvf->cqinfo; in cpt_send_cmd()
294 otx_cptvf_write_vq_doorbell(cptvf, 1); in cpt_send_cmd()
299 struct otx_cptvf *cptvf) in process_request()
386 cpt_send_cmd(&cptinst, cptvf); in process_request()
407 struct otx_cptvf *cptvf = pci_get_drvdata(pdev); in otx_cpt_do_request() local
409 if (!otx_cpt_device_ready(cptvf)) { in otx_cpt_do_request()
414 if ((cptvf->vftype == OTX_CPT_SE_TYPES) && (!req->ctrl.s.se_req)) { in otx_cpt_do_request()
416 cptvf->vfid); in otx_cpt_do_request()
418 } else if ((cptvf in otx_cpt_do_request()
297 process_request(struct pci_dev *pdev, struct otx_cpt_req_info *req, struct otx_cpt_pending_queue *pqueue, struct otx_cptvf *cptvf) process_request() argument
[all...]
H A DMakefile2 obj-$(CONFIG_CRYPTO_DEV_OCTEONTX_CPT) += octeontx-cpt.o octeontx-cptvf.o
5 octeontx-cptvf-objs := otx_cptvf_main.o otx_cptvf_mbox.o otx_cptvf_reqmgr.o \
/kernel/linux/linux-6.6/drivers/crypto/marvell/octeontx/
H A Dotx_cptvf_main.c17 #define DRV_NAME "octeontx-cptvf"
28 static int init_worker_threads(struct otx_cptvf *cptvf) in init_worker_threads() argument
30 struct pci_dev *pdev = cptvf->pdev; in init_worker_threads()
38 if (cptvf->num_queues) { in init_worker_threads()
40 cptvf->num_queues); in init_worker_threads()
43 for (i = 0; i < cptvf->num_queues; i++) { in init_worker_threads()
46 cwqe_info->vq_wqe[i].cptvf = cptvf; in init_worker_threads()
48 cptvf->wqe_info = cwqe_info; in init_worker_threads()
53 static void cleanup_worker_threads(struct otx_cptvf *cptvf) in cleanup_worker_threads() argument
125 init_pending_queues(struct otx_cptvf *cptvf, u32 qlen, u32 num_queues) init_pending_queues() argument
143 cleanup_pending_queues(struct otx_cptvf *cptvf) cleanup_pending_queues() argument
155 free_command_queues(struct otx_cptvf *cptvf, struct otx_cpt_cmd_qinfo *cqinfo) free_command_queues() argument
185 alloc_command_queues(struct otx_cptvf *cptvf, struct otx_cpt_cmd_qinfo *cqinfo, u32 qlen) alloc_command_queues() argument
262 init_command_queues(struct otx_cptvf *cptvf, u32 qlen) init_command_queues() argument
277 cleanup_command_queues(struct otx_cptvf *cptvf) cleanup_command_queues() argument
289 cptvf_sw_cleanup(struct otx_cptvf *cptvf) cptvf_sw_cleanup() argument
296 cptvf_sw_init(struct otx_cptvf *cptvf, u32 qlen, u32 num_queues) cptvf_sw_init() argument
339 cptvf_free_irq_affinity(struct otx_cptvf *cptvf, int vec) cptvf_free_irq_affinity() argument
345 cptvf_write_vq_ctl(struct otx_cptvf *cptvf, bool val) cptvf_write_vq_ctl() argument
354 otx_cptvf_write_vq_doorbell(struct otx_cptvf *cptvf, u32 val) otx_cptvf_write_vq_doorbell() argument
363 cptvf_write_vq_inprog(struct otx_cptvf *cptvf, u8 val) cptvf_write_vq_inprog() argument
372 cptvf_write_vq_done_numwait(struct otx_cptvf *cptvf, u32 val) cptvf_write_vq_done_numwait() argument
381 cptvf_read_vq_done_numwait(struct otx_cptvf *cptvf) cptvf_read_vq_done_numwait() argument
389 cptvf_write_vq_done_timewait(struct otx_cptvf *cptvf, u16 time) cptvf_write_vq_done_timewait() argument
399 cptvf_read_vq_done_timewait(struct otx_cptvf *cptvf) cptvf_read_vq_done_timewait() argument
407 cptvf_enable_swerr_interrupts(struct otx_cptvf *cptvf) cptvf_enable_swerr_interrupts() argument
417 cptvf_enable_mbox_interrupts(struct otx_cptvf *cptvf) cptvf_enable_mbox_interrupts() argument
427 cptvf_enable_done_interrupts(struct otx_cptvf *cptvf) cptvf_enable_done_interrupts() argument
437 cptvf_clear_dovf_intr(struct otx_cptvf *cptvf) cptvf_clear_dovf_intr() argument
447 cptvf_clear_irde_intr(struct otx_cptvf *cptvf) cptvf_clear_irde_intr() argument
457 cptvf_clear_nwrp_intr(struct otx_cptvf *cptvf) cptvf_clear_nwrp_intr() argument
467 cptvf_clear_mbox_intr(struct otx_cptvf *cptvf) cptvf_clear_mbox_intr() argument
477 cptvf_clear_swerr_intr(struct otx_cptvf *cptvf) cptvf_clear_swerr_intr() argument
487 cptvf_read_vf_misc_intr_status(struct otx_cptvf *cptvf) cptvf_read_vf_misc_intr_status() argument
495 struct otx_cptvf *cptvf = arg; cptvf_misc_intr_handler() local
536 get_cptvf_vq_wqe(struct otx_cptvf *cptvf, int qno) get_cptvf_vq_wqe() argument
548 cptvf_read_vq_done_count(struct otx_cptvf *cptvf) cptvf_read_vq_done_count() argument
556 cptvf_write_vq_done_ack(struct otx_cptvf *cptvf, u32 ackcnt) cptvf_write_vq_done_ack() argument
569 struct otx_cptvf *cptvf = (struct otx_cptvf *)cptvf_dev; cptvf_done_intr_handler() local
594 cptvf_set_irq_affinity(struct otx_cptvf *cptvf, int vec) cptvf_set_irq_affinity() argument
614 cptvf_write_vq_saddr(struct otx_cptvf *cptvf, u64 val) cptvf_write_vq_saddr() argument
622 cptvf_device_init(struct otx_cptvf *cptvf) cptvf_device_init() argument
648 struct otx_cptvf *cptvf = dev_get_drvdata(dev); vf_type_show() local
671 struct otx_cptvf *cptvf = dev_get_drvdata(dev); vf_engine_group_show() local
680 struct otx_cptvf *cptvf = dev_get_drvdata(dev); vf_engine_group_store() local
707 struct otx_cptvf *cptvf = dev_get_drvdata(dev); vf_coalesc_time_wait_show() local
717 struct otx_cptvf *cptvf = dev_get_drvdata(dev); vf_coalesc_num_wait_show() local
727 struct otx_cptvf *cptvf = dev_get_drvdata(dev); vf_coalesc_time_wait_store() local
747 struct otx_cptvf *cptvf = dev_get_drvdata(dev); vf_coalesc_num_wait_store() local
784 struct otx_cptvf *cptvf; otx_cptvf_probe() local
910 free_irq(pci_irq_vector(pdev, CPT_VF_INT_VEC_E_DONE), cptvf); otx_cptvf_probe() local
914 free_irq(pci_irq_vector(pdev, CPT_VF_INT_VEC_E_MISC), cptvf); otx_cptvf_probe() local
931 struct otx_cptvf *cptvf = pci_get_drvdata(pdev); otx_cptvf_remove() local
946 free_irq(pci_irq_vector(pdev, CPT_VF_INT_VEC_E_DONE), cptvf); otx_cptvf_remove() local
947 free_irq(pci_irq_vector(pdev, CPT_VF_INT_VEC_E_MISC), cptvf); otx_cptvf_remove() local
[all...]
H A Dotx_cptvf_mbox.c75 static void cptvf_send_msg_to_pf(struct otx_cptvf *cptvf, in cptvf_send_msg_to_pf() argument
79 writeq(mbx->msg, cptvf->reg_base + OTX_CPT_VFX_PF_MBOXX(0, 0)); in cptvf_send_msg_to_pf()
80 writeq(mbx->data, cptvf->reg_base + OTX_CPT_VFX_PF_MBOXX(0, 1)); in cptvf_send_msg_to_pf()
84 void otx_cptvf_handle_mbox_intr(struct otx_cptvf *cptvf) in otx_cptvf_handle_mbox_intr() argument
92 mbx.msg = readq(cptvf->reg_base + OTX_CPT_VFX_PF_MBOXX(0, 0)); in otx_cptvf_handle_mbox_intr()
93 mbx.data = readq(cptvf->reg_base + OTX_CPT_VFX_PF_MBOXX(0, 1)); in otx_cptvf_handle_mbox_intr()
99 cptvf->pf_acked = true; in otx_cptvf_handle_mbox_intr()
100 cptvf->num_vfs = mbx.data; in otx_cptvf_handle_mbox_intr()
103 cptvf->pf_acked = true; in otx_cptvf_handle_mbox_intr()
104 cptvf in otx_cptvf_handle_mbox_intr()
128 cptvf_send_msg_to_pf_timeout(struct otx_cptvf *cptvf, struct otx_cpt_mbox *mbx) cptvf_send_msg_to_pf_timeout() argument
159 otx_cptvf_check_pf_ready(struct otx_cptvf *cptvf) otx_cptvf_check_pf_ready() argument
172 otx_cptvf_send_vq_size_msg(struct otx_cptvf *cptvf) otx_cptvf_send_vq_size_msg() argument
185 otx_cptvf_send_vf_to_grp_msg(struct otx_cptvf *cptvf, int group) otx_cptvf_send_vf_to_grp_msg() argument
204 otx_cptvf_send_vf_priority_msg(struct otx_cptvf *cptvf) otx_cptvf_send_vf_priority_msg() argument
218 otx_cptvf_send_vf_up(struct otx_cptvf *cptvf) otx_cptvf_send_vf_up() argument
230 otx_cptvf_send_vf_down(struct otx_cptvf *cptvf) otx_cptvf_send_vf_down() argument
[all...]
H A Dotx_cptvf.h62 struct otx_cptvf *cptvf; member
95 int otx_cptvf_send_vf_up(struct otx_cptvf *cptvf);
96 int otx_cptvf_send_vf_down(struct otx_cptvf *cptvf);
97 int otx_cptvf_send_vf_to_grp_msg(struct otx_cptvf *cptvf, int group);
98 int otx_cptvf_send_vf_priority_msg(struct otx_cptvf *cptvf);
99 int otx_cptvf_send_vq_size_msg(struct otx_cptvf *cptvf);
100 int otx_cptvf_check_pf_ready(struct otx_cptvf *cptvf);
101 void otx_cptvf_handle_mbox_intr(struct otx_cptvf *cptvf);
102 void otx_cptvf_write_vq_doorbell(struct otx_cptvf *cptvf, u32 val);
H A Dotx_cptvf_reqmgr.c268 static void cpt_send_cmd(union otx_cpt_inst_s *cptinst, struct otx_cptvf *cptvf) in cpt_send_cmd() argument
270 struct otx_cpt_cmd_qinfo *qinfo = &cptvf->cqinfo; in cpt_send_cmd()
294 otx_cptvf_write_vq_doorbell(cptvf, 1); in cpt_send_cmd()
299 struct otx_cptvf *cptvf) in process_request()
386 cpt_send_cmd(&cptinst, cptvf); in process_request()
407 struct otx_cptvf *cptvf = pci_get_drvdata(pdev); in otx_cpt_do_request() local
409 if (!otx_cpt_device_ready(cptvf)) { in otx_cpt_do_request()
414 if ((cptvf->vftype == OTX_CPT_SE_TYPES) && (!req->ctrl.s.se_req)) { in otx_cpt_do_request()
416 cptvf->vfid); in otx_cpt_do_request()
418 } else if ((cptvf in otx_cpt_do_request()
297 process_request(struct pci_dev *pdev, struct otx_cpt_req_info *req, struct otx_cpt_pending_queue *pqueue, struct otx_cptvf *cptvf) process_request() argument
[all...]
H A DMakefile2 obj-$(CONFIG_CRYPTO_DEV_OCTEONTX_CPT) += octeontx-cpt.o octeontx-cptvf.o
5 octeontx-cptvf-objs := otx_cptvf_main.o otx_cptvf_mbox.o otx_cptvf_reqmgr.o \
/kernel/linux/linux-5.10/drivers/crypto/cavium/cpt/
H A Dcptvf_mbox.c6 #include "cptvf.h"
8 static void cptvf_send_msg_to_pf(struct cpt_vf *cptvf, struct cpt_mbox *mbx) in cptvf_send_msg_to_pf() argument
11 cpt_write_csr64(cptvf->reg_base, CPTX_VFX_PF_MBOXX(0, 0, 0), in cptvf_send_msg_to_pf()
13 cpt_write_csr64(cptvf->reg_base, CPTX_VFX_PF_MBOXX(0, 0, 1), in cptvf_send_msg_to_pf()
18 void cptvf_handle_mbox_intr(struct cpt_vf *cptvf) in cptvf_handle_mbox_intr() argument
26 mbx.msg = cpt_read_csr64(cptvf->reg_base, CPTX_VFX_PF_MBOXX(0, 0, 0)); in cptvf_handle_mbox_intr()
27 mbx.data = cpt_read_csr64(cptvf->reg_base, CPTX_VFX_PF_MBOXX(0, 0, 1)); in cptvf_handle_mbox_intr()
28 dev_dbg(&cptvf->pdev->dev, "%s: Mailbox msg 0x%llx from PF\n", in cptvf_handle_mbox_intr()
33 cptvf->pf_acked = true; in cptvf_handle_mbox_intr()
34 cptvf in cptvf_handle_mbox_intr()
58 cptvf_send_msg_to_pf_timeout(struct cpt_vf *cptvf, struct cpt_mbox *mbx) cptvf_send_msg_to_pf_timeout() argument
89 cptvf_check_pf_ready(struct cpt_vf *cptvf) cptvf_check_pf_ready() argument
107 cptvf_send_vq_size_msg(struct cpt_vf *cptvf) cptvf_send_vq_size_msg() argument
125 cptvf_send_vf_to_grp_msg(struct cpt_vf *cptvf) cptvf_send_vf_to_grp_msg() argument
144 cptvf_send_vf_priority_msg(struct cpt_vf *cptvf) cptvf_send_vf_priority_msg() argument
162 cptvf_send_vf_up(struct cpt_vf *cptvf) cptvf_send_vf_up() argument
179 cptvf_send_vf_down(struct cpt_vf *cptvf) cptvf_send_vf_down() argument
[all...]
H A Dcptvf_main.c9 #include "cptvf.h"
11 #define DRV_NAME "thunder-cptvf"
16 void *cptvf; member
29 vq_post_process(cwqe->cptvf, cwqe->qno); in vq_work_handler()
32 static int init_worker_threads(struct cpt_vf *cptvf) in init_worker_threads() argument
34 struct pci_dev *pdev = cptvf->pdev; in init_worker_threads()
42 if (cptvf->nr_queues) { in init_worker_threads()
44 cptvf->nr_queues); in init_worker_threads()
47 for (i = 0; i < cptvf->nr_queues; i++) { in init_worker_threads()
51 cwqe_info->vq_wqe[i].cptvf in init_worker_threads()
59 cleanup_worker_threads(struct cpt_vf *cptvf) cleanup_worker_threads() argument
139 init_pending_queues(struct cpt_vf *cptvf, u32 qlen, u32 nr_queues) init_pending_queues() argument
157 cleanup_pending_queues(struct cpt_vf *cptvf) cleanup_pending_queues() argument
169 free_command_queues(struct cpt_vf *cptvf, struct command_qinfo *cqinfo) free_command_queues() argument
203 alloc_command_queues(struct cpt_vf *cptvf, struct command_qinfo *cqinfo, size_t cmd_size, u32 qlen) alloc_command_queues() argument
279 init_command_queues(struct cpt_vf *cptvf, u32 qlen) init_command_queues() argument
296 cleanup_command_queues(struct cpt_vf *cptvf) cleanup_command_queues() argument
308 cptvf_sw_cleanup(struct cpt_vf *cptvf) cptvf_sw_cleanup() argument
315 cptvf_sw_init(struct cpt_vf *cptvf, u32 qlen, u32 nr_queues) cptvf_sw_init() argument
359 cptvf_free_irq_affinity(struct cpt_vf *cptvf, int vec) cptvf_free_irq_affinity() argument
365 cptvf_write_vq_ctl(struct cpt_vf *cptvf, bool val) cptvf_write_vq_ctl() argument
374 cptvf_write_vq_doorbell(struct cpt_vf *cptvf, u32 val) cptvf_write_vq_doorbell() argument
385 cptvf_write_vq_inprog(struct cpt_vf *cptvf, u8 val) cptvf_write_vq_inprog() argument
394 cptvf_write_vq_done_numwait(struct cpt_vf *cptvf, u32 val) cptvf_write_vq_done_numwait() argument
405 cptvf_write_vq_done_timewait(struct cpt_vf *cptvf, u16 time) cptvf_write_vq_done_timewait() argument
416 cptvf_enable_swerr_interrupts(struct cpt_vf *cptvf) cptvf_enable_swerr_interrupts() argument
428 cptvf_enable_mbox_interrupts(struct cpt_vf *cptvf) cptvf_enable_mbox_interrupts() argument
440 cptvf_enable_done_interrupts(struct cpt_vf *cptvf) cptvf_enable_done_interrupts() argument
452 cptvf_clear_dovf_intr(struct cpt_vf *cptvf) cptvf_clear_dovf_intr() argument
464 cptvf_clear_irde_intr(struct cpt_vf *cptvf) cptvf_clear_irde_intr() argument
476 cptvf_clear_nwrp_intr(struct cpt_vf *cptvf) cptvf_clear_nwrp_intr() argument
488 cptvf_clear_mbox_intr(struct cpt_vf *cptvf) cptvf_clear_mbox_intr() argument
500 cptvf_clear_swerr_intr(struct cpt_vf *cptvf) cptvf_clear_swerr_intr() argument
512 cptvf_read_vf_misc_intr_status(struct cpt_vf *cptvf) cptvf_read_vf_misc_intr_status() argument
519 struct cpt_vf *cptvf = (struct cpt_vf *)cptvf_irq; cptvf_misc_intr_handler() local
556 get_cptvf_vq_wqe(struct cpt_vf *cptvf, int qno) get_cptvf_vq_wqe() argument
568 cptvf_read_vq_done_count(struct cpt_vf *cptvf) cptvf_read_vq_done_count() argument
576 cptvf_write_vq_done_ack(struct cpt_vf *cptvf, u32 ackcnt) cptvf_write_vq_done_ack() argument
590 struct cpt_vf *cptvf = (struct cpt_vf *)cptvf_irq; cptvf_done_intr_handler() local
614 cptvf_set_irq_affinity(struct cpt_vf *cptvf, int vec) cptvf_set_irq_affinity() argument
633 cptvf_write_vq_saddr(struct cpt_vf *cptvf, u64 val) cptvf_write_vq_saddr() argument
641 cptvf_device_init(struct cpt_vf *cptvf) cptvf_device_init() argument
667 struct cpt_vf *cptvf; cptvf_probe() local
801 free_irq(pci_irq_vector(pdev, CPT_VF_INT_VEC_E_MISC), cptvf); cptvf_probe() local
815 struct cpt_vf *cptvf = pci_get_drvdata(pdev); cptvf_remove() local
828 free_irq(pci_irq_vector(pdev, CPT_VF_INT_VEC_E_DONE), cptvf); cptvf_remove() local
829 free_irq(pci_irq_vector(pdev, CPT_VF_INT_VEC_E_MISC), cptvf); cptvf_remove() local
[all...]
H A Dcptvf_reqmanager.c6 #include "cptvf.h"
44 static int setup_sgio_components(struct cpt_vf *cptvf, struct buf_ptr *list, in setup_sgio_components() argument
50 struct pci_dev *pdev = cptvf->pdev; in setup_sgio_components()
121 static inline int setup_sgio_list(struct cpt_vf *cptvf, in setup_sgio_list() argument
127 struct pci_dev *pdev = cptvf->pdev; in setup_sgio_list()
143 ret = setup_sgio_components(cptvf, req->in, in setup_sgio_list()
160 ret = setup_sgio_components(cptvf, req->out, in setup_sgio_list()
223 static int send_cpt_command(struct cpt_vf *cptvf, union cpt_inst_s *cmd, in send_cpt_command() argument
226 struct pci_dev *pdev = cptvf->pdev; in send_cpt_command()
233 if (unlikely(qno >= cptvf in send_cpt_command()
270 do_request_cleanup(struct cpt_vf *cptvf, struct cpt_info_buffer *info) do_request_cleanup() argument
316 do_post_process(struct cpt_vf *cptvf, struct cpt_info_buffer *info) do_post_process() argument
328 process_pending_queue(struct cpt_vf *cptvf, struct pending_qinfo *pqinfo, int qno) process_pending_queue() argument
410 process_request(struct cpt_vf *cptvf, struct cpt_request_info *req) process_request() argument
545 vq_post_process(struct cpt_vf *cptvf, u32 qno) vq_post_process() argument
560 struct cpt_vf *cptvf = (struct cpt_vf *)vfdev; cptvf_do_request() local
[all...]
H A Dcptvf.h118 int cptvf_send_vf_up(struct cpt_vf *cptvf);
119 int cptvf_send_vf_down(struct cpt_vf *cptvf);
120 int cptvf_send_vf_to_grp_msg(struct cpt_vf *cptvf);
121 int cptvf_send_vf_priority_msg(struct cpt_vf *cptvf);
122 int cptvf_send_vq_size_msg(struct cpt_vf *cptvf);
123 int cptvf_check_pf_ready(struct cpt_vf *cptvf);
124 void cptvf_handle_mbox_intr(struct cpt_vf *cptvf);
126 int cvm_crypto_init(struct cpt_vf *cptvf);
127 void vq_post_process(struct cpt_vf *cptvf, u32 qno);
128 void cptvf_write_vq_doorbell(struct cpt_vf *cptvf, u3
[all...]
H A DMakefile2 obj-$(CONFIG_CAVIUM_CPT) += cptpf.o cptvf.o
4 cptvf-objs := cptvf_main.o cptvf_reqmanager.o cptvf_mbox.o cptvf_algs.o
H A Drequest_manager.h91 struct cpt_vf *cptvf; member
144 void vq_post_process(struct cpt_vf *cptvf, u32 qno);
145 int process_request(struct cpt_vf *cptvf, struct cpt_request_info *req);
/kernel/linux/linux-6.6/drivers/crypto/cavium/cpt/
H A Dcptvf_mbox.c6 #include "cptvf.h"
8 static void cptvf_send_msg_to_pf(struct cpt_vf *cptvf, struct cpt_mbox *mbx) in cptvf_send_msg_to_pf() argument
11 cpt_write_csr64(cptvf->reg_base, CPTX_VFX_PF_MBOXX(0, 0, 0), in cptvf_send_msg_to_pf()
13 cpt_write_csr64(cptvf->reg_base, CPTX_VFX_PF_MBOXX(0, 0, 1), in cptvf_send_msg_to_pf()
18 void cptvf_handle_mbox_intr(struct cpt_vf *cptvf) in cptvf_handle_mbox_intr() argument
26 mbx.msg = cpt_read_csr64(cptvf->reg_base, CPTX_VFX_PF_MBOXX(0, 0, 0)); in cptvf_handle_mbox_intr()
27 mbx.data = cpt_read_csr64(cptvf->reg_base, CPTX_VFX_PF_MBOXX(0, 0, 1)); in cptvf_handle_mbox_intr()
28 dev_dbg(&cptvf->pdev->dev, "%s: Mailbox msg 0x%llx from PF\n", in cptvf_handle_mbox_intr()
33 cptvf->pf_acked = true; in cptvf_handle_mbox_intr()
34 cptvf in cptvf_handle_mbox_intr()
58 cptvf_send_msg_to_pf_timeout(struct cpt_vf *cptvf, struct cpt_mbox *mbx) cptvf_send_msg_to_pf_timeout() argument
89 cptvf_check_pf_ready(struct cpt_vf *cptvf) cptvf_check_pf_ready() argument
107 cptvf_send_vq_size_msg(struct cpt_vf *cptvf) cptvf_send_vq_size_msg() argument
125 cptvf_send_vf_to_grp_msg(struct cpt_vf *cptvf) cptvf_send_vf_to_grp_msg() argument
144 cptvf_send_vf_priority_msg(struct cpt_vf *cptvf) cptvf_send_vf_priority_msg() argument
162 cptvf_send_vf_up(struct cpt_vf *cptvf) cptvf_send_vf_up() argument
179 cptvf_send_vf_down(struct cpt_vf *cptvf) cptvf_send_vf_down() argument
[all...]
H A Dcptvf_main.c9 #include "cptvf.h"
11 #define DRV_NAME "thunder-cptvf"
16 void *cptvf; member
29 vq_post_process(cwqe->cptvf, cwqe->qno); in vq_work_handler()
32 static int init_worker_threads(struct cpt_vf *cptvf) in init_worker_threads() argument
34 struct pci_dev *pdev = cptvf->pdev; in init_worker_threads()
42 if (cptvf->nr_queues) { in init_worker_threads()
44 cptvf->nr_queues); in init_worker_threads()
47 for (i = 0; i < cptvf->nr_queues; i++) { in init_worker_threads()
51 cwqe_info->vq_wqe[i].cptvf in init_worker_threads()
59 cleanup_worker_threads(struct cpt_vf *cptvf) cleanup_worker_threads() argument
136 init_pending_queues(struct cpt_vf *cptvf, u32 qlen, u32 nr_queues) init_pending_queues() argument
154 cleanup_pending_queues(struct cpt_vf *cptvf) cleanup_pending_queues() argument
166 free_command_queues(struct cpt_vf *cptvf, struct command_qinfo *cqinfo) free_command_queues() argument
200 alloc_command_queues(struct cpt_vf *cptvf, struct command_qinfo *cqinfo, size_t cmd_size, u32 qlen) alloc_command_queues() argument
276 init_command_queues(struct cpt_vf *cptvf, u32 qlen) init_command_queues() argument
293 cleanup_command_queues(struct cpt_vf *cptvf) cleanup_command_queues() argument
305 cptvf_sw_cleanup(struct cpt_vf *cptvf) cptvf_sw_cleanup() argument
312 cptvf_sw_init(struct cpt_vf *cptvf, u32 qlen, u32 nr_queues) cptvf_sw_init() argument
356 cptvf_free_irq_affinity(struct cpt_vf *cptvf, int vec) cptvf_free_irq_affinity() argument
362 cptvf_write_vq_ctl(struct cpt_vf *cptvf, bool val) cptvf_write_vq_ctl() argument
371 cptvf_write_vq_doorbell(struct cpt_vf *cptvf, u32 val) cptvf_write_vq_doorbell() argument
382 cptvf_write_vq_inprog(struct cpt_vf *cptvf, u8 val) cptvf_write_vq_inprog() argument
391 cptvf_write_vq_done_numwait(struct cpt_vf *cptvf, u32 val) cptvf_write_vq_done_numwait() argument
402 cptvf_write_vq_done_timewait(struct cpt_vf *cptvf, u16 time) cptvf_write_vq_done_timewait() argument
413 cptvf_enable_swerr_interrupts(struct cpt_vf *cptvf) cptvf_enable_swerr_interrupts() argument
425 cptvf_enable_mbox_interrupts(struct cpt_vf *cptvf) cptvf_enable_mbox_interrupts() argument
437 cptvf_enable_done_interrupts(struct cpt_vf *cptvf) cptvf_enable_done_interrupts() argument
449 cptvf_clear_dovf_intr(struct cpt_vf *cptvf) cptvf_clear_dovf_intr() argument
461 cptvf_clear_irde_intr(struct cpt_vf *cptvf) cptvf_clear_irde_intr() argument
473 cptvf_clear_nwrp_intr(struct cpt_vf *cptvf) cptvf_clear_nwrp_intr() argument
485 cptvf_clear_mbox_intr(struct cpt_vf *cptvf) cptvf_clear_mbox_intr() argument
497 cptvf_clear_swerr_intr(struct cpt_vf *cptvf) cptvf_clear_swerr_intr() argument
509 cptvf_read_vf_misc_intr_status(struct cpt_vf *cptvf) cptvf_read_vf_misc_intr_status() argument
516 struct cpt_vf *cptvf = (struct cpt_vf *)cptvf_irq; cptvf_misc_intr_handler() local
553 get_cptvf_vq_wqe(struct cpt_vf *cptvf, int qno) get_cptvf_vq_wqe() argument
565 cptvf_read_vq_done_count(struct cpt_vf *cptvf) cptvf_read_vq_done_count() argument
573 cptvf_write_vq_done_ack(struct cpt_vf *cptvf, u32 ackcnt) cptvf_write_vq_done_ack() argument
587 struct cpt_vf *cptvf = (struct cpt_vf *)cptvf_irq; cptvf_done_intr_handler() local
611 cptvf_set_irq_affinity(struct cpt_vf *cptvf, int vec) cptvf_set_irq_affinity() argument
630 cptvf_write_vq_saddr(struct cpt_vf *cptvf, u64 val) cptvf_write_vq_saddr() argument
638 cptvf_device_init(struct cpt_vf *cptvf) cptvf_device_init() argument
664 struct cpt_vf *cptvf; cptvf_probe() local
792 free_irq(pci_irq_vector(pdev, CPT_VF_INT_VEC_E_MISC), cptvf); cptvf_probe() local
806 struct cpt_vf *cptvf = pci_get_drvdata(pdev); cptvf_remove() local
819 free_irq(pci_irq_vector(pdev, CPT_VF_INT_VEC_E_DONE), cptvf); cptvf_remove() local
820 free_irq(pci_irq_vector(pdev, CPT_VF_INT_VEC_E_MISC), cptvf); cptvf_remove() local
[all...]
H A Dcptvf_reqmanager.c6 #include "cptvf.h"
44 static int setup_sgio_components(struct cpt_vf *cptvf, struct buf_ptr *list, in setup_sgio_components() argument
50 struct pci_dev *pdev = cptvf->pdev; in setup_sgio_components()
121 static inline int setup_sgio_list(struct cpt_vf *cptvf, in setup_sgio_list() argument
127 struct pci_dev *pdev = cptvf->pdev; in setup_sgio_list()
143 ret = setup_sgio_components(cptvf, req->in, in setup_sgio_list()
160 ret = setup_sgio_components(cptvf, req->out, in setup_sgio_list()
223 static int send_cpt_command(struct cpt_vf *cptvf, union cpt_inst_s *cmd, in send_cpt_command() argument
226 struct pci_dev *pdev = cptvf->pdev; in send_cpt_command()
233 if (unlikely(qno >= cptvf in send_cpt_command()
266 do_request_cleanup(struct cpt_vf *cptvf, struct cpt_info_buffer *info) do_request_cleanup() argument
312 do_post_process(struct cpt_vf *cptvf, struct cpt_info_buffer *info) do_post_process() argument
324 process_pending_queue(struct cpt_vf *cptvf, struct pending_qinfo *pqinfo, int qno) process_pending_queue() argument
406 process_request(struct cpt_vf *cptvf, struct cpt_request_info *req) process_request() argument
541 vq_post_process(struct cpt_vf *cptvf, u32 qno) vq_post_process() argument
556 struct cpt_vf *cptvf = (struct cpt_vf *)vfdev; cptvf_do_request() local
[all...]
H A Dcptvf.h118 int cptvf_send_vf_up(struct cpt_vf *cptvf);
119 int cptvf_send_vf_down(struct cpt_vf *cptvf);
120 int cptvf_send_vf_to_grp_msg(struct cpt_vf *cptvf);
121 int cptvf_send_vf_priority_msg(struct cpt_vf *cptvf);
122 int cptvf_send_vq_size_msg(struct cpt_vf *cptvf);
123 int cptvf_check_pf_ready(struct cpt_vf *cptvf);
124 void cptvf_handle_mbox_intr(struct cpt_vf *cptvf);
126 int cvm_crypto_init(struct cpt_vf *cptvf);
127 void vq_post_process(struct cpt_vf *cptvf, u32 qno);
128 void cptvf_write_vq_doorbell(struct cpt_vf *cptvf, u3
[all...]
H A DMakefile2 obj-$(CONFIG_CAVIUM_CPT) += cptpf.o cptvf.o
4 cptvf-objs := cptvf_main.o cptvf_reqmanager.o cptvf_mbox.o cptvf_algs.o
/kernel/linux/linux-6.6/drivers/crypto/marvell/octeontx2/
H A Dotx2_cptvf_main.c13 static void cptvf_enable_pfvf_mbox_intrs(struct otx2_cptvf_dev *cptvf) in cptvf_enable_pfvf_mbox_intrs() argument
16 otx2_cpt_write64(cptvf->reg_base, BLKADDR_RVUM, 0, OTX2_RVU_VF_INT, in cptvf_enable_pfvf_mbox_intrs()
20 otx2_cpt_write64(cptvf->reg_base, BLKADDR_RVUM, 0, in cptvf_enable_pfvf_mbox_intrs()
24 static void cptvf_disable_pfvf_mbox_intrs(struct otx2_cptvf_dev *cptvf) in cptvf_disable_pfvf_mbox_intrs() argument
27 otx2_cpt_write64(cptvf->reg_base, BLKADDR_RVUM, 0, in cptvf_disable_pfvf_mbox_intrs()
31 otx2_cpt_write64(cptvf->reg_base, BLKADDR_RVUM, 0, OTX2_RVU_VF_INT, in cptvf_disable_pfvf_mbox_intrs()
35 static int cptvf_register_interrupts(struct otx2_cptvf_dev *cptvf) in cptvf_register_interrupts() argument
40 num_vec = pci_msix_vec_count(cptvf->pdev); in cptvf_register_interrupts()
45 ret = pci_alloc_irq_vectors(cptvf->pdev, num_vec, num_vec, in cptvf_register_interrupts()
48 dev_err(&cptvf in cptvf_register_interrupts()
72 cptvf_pfvf_mbox_init(struct otx2_cptvf_dev *cptvf) cptvf_pfvf_mbox_init() argument
122 cptvf_pfvf_mbox_destroy(struct otx2_cptvf_dev *cptvf) cptvf_pfvf_mbox_destroy() argument
259 cptvf_lf_init(struct otx2_cptvf_dev *cptvf) cptvf_lf_init() argument
338 struct otx2_cptvf_dev *cptvf; otx2_cptvf_probe() local
405 struct otx2_cptvf_dev *cptvf = pci_get_drvdata(pdev); otx2_cptvf_remove() local
[all...]
H A Dotx2_cptvf_mbox.c8 int otx2_cpt_mbox_bbuf_init(struct otx2_cptvf_dev *cptvf, struct pci_dev *pdev) in otx2_cpt_mbox_bbuf_init() argument
13 cptvf->bbuf_base = devm_kmalloc(&pdev->dev, MBOX_SIZE, GFP_KERNEL); in otx2_cpt_mbox_bbuf_init()
14 if (!cptvf->bbuf_base) in otx2_cpt_mbox_bbuf_init()
21 otx2_mbox = &cptvf->pfvf_mbox; in otx2_cpt_mbox_bbuf_init()
23 mdev->mbase = cptvf->bbuf_base; in otx2_cpt_mbox_bbuf_init()
52 struct otx2_cptvf_dev *cptvf = arg; in otx2_cptvf_pfvf_mbox_intr() local
56 intr = otx2_cpt_read64(cptvf->reg_base, BLKADDR_RVUM, 0, in otx2_cptvf_pfvf_mbox_intr()
61 queue_work(cptvf->pfvf_mbox_wq, &cptvf->pfvf_mbox_work); in otx2_cptvf_pfvf_mbox_intr()
63 otx2_cpt_write64(cptvf in otx2_cptvf_pfvf_mbox_intr()
69 process_pfvf_mbox_mbox_msg(struct otx2_cptvf_dev *cptvf, struct mbox_msghdr *msg) process_pfvf_mbox_mbox_msg() argument
139 struct otx2_cptvf_dev *cptvf; otx2_cptvf_pfvf_mbox_handler() local
168 otx2_cptvf_send_eng_grp_num_msg(struct otx2_cptvf_dev *cptvf, int eng_type) otx2_cptvf_send_eng_grp_num_msg() argument
189 otx2_cptvf_send_kvf_limits_msg(struct otx2_cptvf_dev *cptvf) otx2_cptvf_send_kvf_limits_msg() argument
[all...]
H A Dcn10k_cpt.c76 int cn10k_cptvf_lmtst_init(struct otx2_cptvf_dev *cptvf) in cn10k_cptvf_lmtst_init() argument
78 struct pci_dev *pdev = cptvf->pdev; in cn10k_cptvf_lmtst_init()
81 if (!test_bit(CN10K_LMTST, &cptvf->cap_flag)) { in cn10k_cptvf_lmtst_init()
82 cptvf->lfs.ops = &otx2_hw_ops; in cn10k_cptvf_lmtst_init()
86 cptvf->lfs.ops = &cn10k_hw_ops; in cn10k_cptvf_lmtst_init()
90 cptvf->lfs.lmt_base = devm_ioremap_wc(&pdev->dev, offset, size); in cn10k_cptvf_lmtst_init()
91 if (!cptvf->lfs.lmt_base) { in cn10k_cptvf_lmtst_init()
H A Dotx2_cptvf.h29 int otx2_cptvf_send_eng_grp_num_msg(struct otx2_cptvf_dev *cptvf, int eng_type);
30 int otx2_cptvf_send_kvf_limits_msg(struct otx2_cptvf_dev *cptvf);
31 int otx2_cpt_mbox_bbuf_init(struct otx2_cptvf_dev *cptvf, struct pci_dev *pdev);

Completed in 11 milliseconds

12