Lines Matching refs:obj_handle

19 static int qat_uclo_init_ae_data(struct icp_qat_uclo_objhandle *obj_handle,  in qat_uclo_init_ae_data()  argument
27 ae_data = &obj_handle->ae_data[ae]; in qat_uclo_init_ae_data()
28 encap_image = &obj_handle->ae_uimage[image_num]; in qat_uclo_init_ae_data()
35 ae_data->eff_ustore_size = obj_handle->ustore_phy_size; in qat_uclo_init_ae_data()
221 struct icp_qat_uclo_objhandle *obj_handle = handle->obj_handle; in qat_uclo_fetch_initmem_ae() local
232 str = qat_uclo_get_string(&obj_handle->str_table, init_mem->sym_name); in qat_uclo_fetch_initmem_ae()
310 struct icp_qat_uclo_objhandle *obj_handle = handle->obj_handle; in qat_uclo_init_lmem_seg() local
317 &obj_handle->lm_init_tab[ae])) in qat_uclo_init_lmem_seg()
325 struct icp_qat_uclo_objhandle *obj_handle = handle->obj_handle; in qat_uclo_init_umem_seg() local
329 ustore_size = obj_handle->ustore_phy_size; in qat_uclo_init_umem_seg()
333 &obj_handle->umem_init_tab[ae])) in qat_uclo_init_umem_seg()
337 aed = &obj_handle->ae_data[ae]; in qat_uclo_init_umem_seg()
374 struct icp_qat_uclo_objhandle *obj_handle = handle->obj_handle; in qat_uclo_init_ustore() local
398 ustore_size = obj_handle->ae_data[ae].eff_ustore_size; in qat_uclo_init_ustore()
414 struct icp_qat_uclo_objhandle *obj_handle = handle->obj_handle; in qat_uclo_init_memory() local
415 struct icp_qat_uof_initmem *initmem = obj_handle->init_mem_tab.init_mem; in qat_uclo_init_memory()
418 for (i = 0; i < obj_handle->init_mem_tab.entry_num; i++) { in qat_uclo_init_memory()
432 obj_handle->lm_init_tab[ae])) { in qat_uclo_init_memory()
437 &obj_handle->lm_init_tab[ae]); in qat_uclo_init_memory()
439 obj_handle->umem_init_tab[ae]); in qat_uclo_init_memory()
441 &obj_handle-> in qat_uclo_init_memory()
598 static int qat_uclo_map_uimage(struct icp_qat_uclo_objhandle *obj_handle, in qat_uclo_map_uimage() argument
609 &obj_handle->encap_uof_obj; in qat_uclo_map_uimage()
620 obj_handle->obj_hdr->file_buff); in qat_uclo_map_uimage()
627 obj_handle->obj_hdr->file_buff); in qat_uclo_map_uimage()
633 (image->sbreak_tab + obj_handle->obj_hdr->file_buff); in qat_uclo_map_uimage()
660 struct icp_qat_uclo_objhandle *obj_handle = handle->obj_handle; in qat_uclo_map_ae() local
668 for (i = 0; i < obj_handle->uimage_num; i++) { in qat_uclo_map_ae()
669 unsigned long ae_assigned = obj_handle->ae_uimage[i].img_ptr->ae_assigned; in qat_uclo_map_ae()
674 if (qat_uclo_init_ae_data(obj_handle, ae, i)) in qat_uclo_map_ae()
743 static int qat_uclo_check_uof_compat(struct icp_qat_uclo_objhandle *obj_handle) in qat_uclo_check_uof_compat() argument
745 unsigned int maj_ver, prod_type = obj_handle->prod_type; in qat_uclo_check_uof_compat()
747 if (!(prod_type & obj_handle->encap_uof_obj.obj_hdr->ac_dev_type)) { in qat_uclo_check_uof_compat()
749 obj_handle->encap_uof_obj.obj_hdr->ac_dev_type, in qat_uclo_check_uof_compat()
753 maj_ver = obj_handle->prod_rev & 0xff; in qat_uclo_check_uof_compat()
754 if (obj_handle->encap_uof_obj.obj_hdr->max_cpu_ver < maj_ver || in qat_uclo_check_uof_compat()
755 obj_handle->encap_uof_obj.obj_hdr->min_cpu_ver > maj_ver) { in qat_uclo_check_uof_compat()
862 struct icp_qat_uclo_objhandle *obj_handle = handle->obj_handle; in qat_uclo_init_globals() local
867 if (obj_handle->global_inited) in qat_uclo_init_globals()
869 if (obj_handle->init_mem_tab.entry_num) { in qat_uclo_init_globals()
877 aed = &obj_handle->ae_data[ae]; in qat_uclo_init_globals()
885 obj_handle->global_inited = 1; in qat_uclo_init_globals()
890 struct icp_qat_uclo_objhandle *obj_handle, in qat_hal_set_modes() argument
946 struct icp_qat_uclo_objhandle *obj_handle = handle->obj_handle; in qat_uclo_set_ae_mode() local
956 ae_data = &obj_handle->ae_data[ae]; in qat_uclo_set_ae_mode()
959 if (!obj_handle->ae_data[ae].ae_slices[s].encap_image) in qat_uclo_set_ae_mode()
962 error = qat_hal_set_modes(handle, obj_handle, ae, in qat_uclo_set_ae_mode()
973 struct icp_qat_uclo_objhandle *obj_handle = handle->obj_handle; in qat_uclo_init_uword_num() local
977 for (a = 0; a < obj_handle->uimage_num; a++) { in qat_uclo_init_uword_num()
978 image = &obj_handle->ae_uimage[a]; in qat_uclo_init_uword_num()
986 struct icp_qat_uclo_objhandle *obj_handle = handle->obj_handle; in qat_uclo_parse_uof_obj() local
989 obj_handle->encap_uof_obj.beg_uof = obj_handle->obj_hdr->file_buff; in qat_uclo_parse_uof_obj()
990 obj_handle->encap_uof_obj.obj_hdr = (struct icp_qat_uof_objhdr *) in qat_uclo_parse_uof_obj()
991 obj_handle->obj_hdr->file_buff; in qat_uclo_parse_uof_obj()
992 obj_handle->uword_in_bytes = 6; in qat_uclo_parse_uof_obj()
993 obj_handle->prod_type = qat_uclo_get_dev_type(handle); in qat_uclo_parse_uof_obj()
994 obj_handle->prod_rev = PID_MAJOR_REV | in qat_uclo_parse_uof_obj()
996 if (qat_uclo_check_uof_compat(obj_handle)) { in qat_uclo_parse_uof_obj()
1000 obj_handle->uword_buf = kcalloc(UWORD_CPYBUF_SIZE, sizeof(u64), in qat_uclo_parse_uof_obj()
1002 if (!obj_handle->uword_buf) in qat_uclo_parse_uof_obj()
1004 obj_handle->ustore_phy_size = ICP_QAT_UCLO_MAX_USTORE; in qat_uclo_parse_uof_obj()
1005 if (!obj_handle->obj_hdr->file_buff || in qat_uclo_parse_uof_obj()
1006 !qat_uclo_map_str_table(obj_handle->obj_hdr, ICP_QAT_UOF_STRT, in qat_uclo_parse_uof_obj()
1007 &obj_handle->str_table)) { in qat_uclo_parse_uof_obj()
1011 obj_handle->uimage_num = in qat_uclo_parse_uof_obj()
1012 qat_uclo_map_uimage(obj_handle, obj_handle->ae_uimage, in qat_uclo_parse_uof_obj()
1014 if (!obj_handle->uimage_num) in qat_uclo_parse_uof_obj()
1021 qat_uclo_map_initmem_table(&obj_handle->encap_uof_obj, in qat_uclo_parse_uof_obj()
1022 &obj_handle->init_mem_tab); in qat_uclo_parse_uof_obj()
1027 for (ae = 0; ae < obj_handle->uimage_num; ae++) in qat_uclo_parse_uof_obj()
1028 kfree(obj_handle->ae_uimage[ae].page); in qat_uclo_parse_uof_obj()
1030 kfree(obj_handle->uword_buf); in qat_uclo_parse_uof_obj()
1634 handle->obj_handle = objhdl; in qat_uclo_map_uof_obj()
1640 handle->obj_handle = NULL; in qat_uclo_map_uof_obj()
1919 struct icp_qat_uclo_objhandle *obj_handle = handle->obj_handle; in qat_uclo_del_obj() local
1926 if (!obj_handle) in qat_uclo_del_obj()
1929 kfree(obj_handle->uword_buf); in qat_uclo_del_obj()
1930 for (a = 0; a < obj_handle->uimage_num; a++) in qat_uclo_del_obj()
1931 kfree(obj_handle->ae_uimage[a].page); in qat_uclo_del_obj()
1934 qat_uclo_free_ae_data(&obj_handle->ae_data[a]); in qat_uclo_del_obj()
1936 kfree(obj_handle->obj_hdr); in qat_uclo_del_obj()
1937 kfree(obj_handle->obj_buf); in qat_uclo_del_obj()
1938 kfree(obj_handle); in qat_uclo_del_obj()
1939 handle->obj_handle = NULL; in qat_uclo_del_obj()
1942 static void qat_uclo_fill_uwords(struct icp_qat_uclo_objhandle *obj_handle, in qat_uclo_fill_uwords() argument
1960 addr *= obj_handle->uword_in_bytes; in qat_uclo_fill_uwords()
1963 obj_handle->uword_in_bytes); in qat_uclo_fill_uwords()
1977 struct icp_qat_uclo_objhandle *obj_handle = handle->obj_handle; in qat_uclo_wr_uimage_raw_page() local
1982 memcpy(&fill_pat, obj_handle->ae_uimage[0].img_ptr->fill_pattern, in qat_uclo_wr_uimage_raw_page()
1995 qat_uclo_fill_uwords(obj_handle, encap_page, in qat_uclo_wr_uimage_raw_page()
1996 &obj_handle->uword_buf[i], in qat_uclo_wr_uimage_raw_page()
2003 obj_handle->uword_buf); in qat_uclo_wr_uimage_raw_page()
2014 struct icp_qat_uclo_objhandle *obj_handle = handle->obj_handle; in qat_uclo_wr_uimage_page() local
2037 aed = &obj_handle->ae_data[ae]; in qat_uclo_wr_uimage_page()
2102 struct icp_qat_uclo_objhandle *obj_handle = handle->obj_handle; in qat_uclo_wr_uof_img() local
2107 for (i = 0; i < obj_handle->uimage_num; i++) { in qat_uclo_wr_uof_img()
2108 if (!obj_handle->ae_uimage[i].img_ptr) in qat_uclo_wr_uof_img()
2110 if (qat_uclo_init_ustore(handle, &obj_handle->ae_uimage[i])) in qat_uclo_wr_uof_img()
2113 obj_handle->ae_uimage[i].img_ptr); in qat_uclo_wr_uof_img()