Lines Matching refs:coproc
673 static inline void nx_add_coprocs_list(struct nx_coproc *coproc, in nx_add_coprocs_list() argument
676 coproc->chip_id = chipid; in nx_add_coprocs_list()
677 INIT_LIST_HEAD(&coproc->list); in nx_add_coprocs_list()
678 list_add(&coproc->list, &nx_coprocs); in nx_add_coprocs_list()
681 static struct vas_window *nx_alloc_txwin(struct nx_coproc *coproc) in nx_alloc_txwin() argument
690 vas_init_tx_win_attr(&txattr, coproc->ct); in nx_alloc_txwin()
696 txwin = vas_tx_win_open(coproc->vas.id, coproc->ct, &txattr); in nx_alloc_txwin()
712 struct nx_coproc *coproc, *n; in nx_open_percpu_txwins() local
720 list_for_each_entry_safe(coproc, n, &nx_coprocs, list) { in nx_open_percpu_txwins()
727 if (coproc->ct != VAS_COP_TYPE_842_HIPRI) in nx_open_percpu_txwins()
730 if (coproc->chip_id == chip_id) { in nx_open_percpu_txwins()
731 txwin = nx_alloc_txwin(coproc); in nx_open_percpu_txwins()
750 static int __init nx_set_ct(struct nx_coproc *coproc, const char *priority, in nx_set_ct() argument
754 coproc->ct = high; in nx_set_ct()
756 coproc->ct = normal; in nx_set_ct()
771 struct nx_coproc *coproc; in vas_cfg_coproc_info() local
812 coproc = kzalloc(sizeof(*coproc), GFP_KERNEL); in vas_cfg_coproc_info()
813 if (!coproc) in vas_cfg_coproc_info()
817 ret = nx_set_ct(coproc, priority, VAS_COP_TYPE_842_HIPRI, in vas_cfg_coproc_info()
820 ret = nx_set_ct(coproc, priority, VAS_COP_TYPE_GZIP_HIPRI, in vas_cfg_coproc_info()
826 vas_init_rx_win_attr(&rxattr, coproc->ct); in vas_cfg_coproc_info()
842 rxwin = vas_rx_win_open(vasid, coproc->ct, &rxattr); in vas_cfg_coproc_info()
850 coproc->vas.rxwin = rxwin; in vas_cfg_coproc_info()
851 coproc->vas.id = vasid; in vas_cfg_coproc_info()
852 nx_add_coprocs_list(coproc, chip_id); in vas_cfg_coproc_info()
866 kfree(coproc); in vas_cfg_coproc_info()
953 struct nx_coproc *coproc; in nx842_powernv_probe() local
973 coproc = kzalloc(sizeof(*coproc), GFP_KERNEL); in nx842_powernv_probe()
974 if (!coproc) in nx842_powernv_probe()
977 coproc->ct = ct; in nx842_powernv_probe()
978 coproc->ci = ci; in nx842_powernv_probe()
979 nx_add_coprocs_list(coproc, chip_id); in nx842_powernv_probe()
994 struct nx_coproc *coproc, *n; in nx_delete_coprocs() local
1009 list_for_each_entry_safe(coproc, n, &nx_coprocs, list) { in nx_delete_coprocs()
1010 if (coproc->vas.rxwin) in nx_delete_coprocs()
1011 vas_win_close(coproc->vas.rxwin); in nx_delete_coprocs()
1013 list_del(&coproc->list); in nx_delete_coprocs()
1014 kfree(coproc); in nx_delete_coprocs()