• Home
  • Raw
  • Download

Lines Matching refs:zc

571 static inline struct zcrypt_queue *zcrypt_pick_queue(struct zcrypt_card *zc,  in zcrypt_pick_queue()  argument
580 atomic_add(weight, &zc->load); in zcrypt_pick_queue()
587 static inline void zcrypt_drop_queue(struct zcrypt_card *zc, in zcrypt_drop_queue() argument
593 atomic_sub(weight, &zc->load); in zcrypt_drop_queue()
600 static inline bool zcrypt_card_compare(struct zcrypt_card *zc, in zcrypt_card_compare() argument
607 weight += atomic_read(&zc->load); in zcrypt_card_compare()
610 return atomic64_read(&zc->card->total_request_count) < in zcrypt_card_compare()
637 struct zcrypt_card *zc, *pref_zc; in zcrypt_rsa_modexpo() local
674 for_each_zcrypt_card(zc) { in zcrypt_rsa_modexpo()
676 if (!zc->online || !zc->card->config || in zcrypt_rsa_modexpo()
677 !(zc->card->functions & 0x18000000)) in zcrypt_rsa_modexpo()
680 if (zc->min_mod_size > mex->inputdatalength || in zcrypt_rsa_modexpo()
681 zc->max_mod_size < mex->inputdatalength) in zcrypt_rsa_modexpo()
684 if (!zcrypt_check_card(perms, zc->card->id)) in zcrypt_rsa_modexpo()
687 wgt = zc->speed_rating[func_code]; in zcrypt_rsa_modexpo()
690 AP_QID_CARD(tr->last_qid) == zc->card->id) ? in zcrypt_rsa_modexpo()
692 if (!zcrypt_card_compare(zc, pref_zc, wgt + cpen, pref_wgt)) in zcrypt_rsa_modexpo()
694 for_each_zcrypt_queue(zq, zc) { in zcrypt_rsa_modexpo()
710 pref_zc = zc; in zcrypt_rsa_modexpo()
745 struct zcrypt_card *zc, *pref_zc; in zcrypt_rsa_crt() local
782 for_each_zcrypt_card(zc) { in zcrypt_rsa_crt()
784 if (!zc->online || !zc->card->config || in zcrypt_rsa_crt()
785 !(zc->card->functions & 0x18000000)) in zcrypt_rsa_crt()
788 if (zc->min_mod_size > crt->inputdatalength || in zcrypt_rsa_crt()
789 zc->max_mod_size < crt->inputdatalength) in zcrypt_rsa_crt()
792 if (!zcrypt_check_card(perms, zc->card->id)) in zcrypt_rsa_crt()
795 wgt = zc->speed_rating[func_code]; in zcrypt_rsa_crt()
798 AP_QID_CARD(tr->last_qid) == zc->card->id) ? in zcrypt_rsa_crt()
800 if (!zcrypt_card_compare(zc, pref_zc, wgt + cpen, pref_wgt)) in zcrypt_rsa_crt()
802 for_each_zcrypt_queue(zq, zc) { in zcrypt_rsa_crt()
818 pref_zc = zc; in zcrypt_rsa_crt()
853 struct zcrypt_card *zc, *pref_zc; in _zcrypt_send_cprb() local
895 for_each_zcrypt_card(zc) { in _zcrypt_send_cprb()
897 if (!zc->online || !zc->card->config || in _zcrypt_send_cprb()
898 !(zc->card->functions & 0x10000000)) in _zcrypt_send_cprb()
902 xcRB->user_defined != zc->card->id) in _zcrypt_send_cprb()
905 if (!zcrypt_check_card(perms, zc->card->id)) in _zcrypt_send_cprb()
908 wgt = speed_idx_cca(func_code) * zc->speed_rating[SECKEY]; in _zcrypt_send_cprb()
911 AP_QID_CARD(tr->last_qid) == zc->card->id) ? in _zcrypt_send_cprb()
913 if (!zcrypt_card_compare(zc, pref_zc, wgt + cpen, pref_wgt)) in _zcrypt_send_cprb()
915 for_each_zcrypt_queue(zq, zc) { in _zcrypt_send_cprb()
934 pref_zc = zc; in _zcrypt_send_cprb()
1014 struct zcrypt_card *zc, *pref_zc; in _zcrypt_send_ep11_cprb() local
1063 for_each_zcrypt_card(zc) { in _zcrypt_send_ep11_cprb()
1065 if (!zc->online || !zc->card->config || in _zcrypt_send_ep11_cprb()
1066 !(zc->card->functions & 0x04000000)) in _zcrypt_send_ep11_cprb()
1070 !is_desired_ep11_card(zc->card->id, target_num, targets)) in _zcrypt_send_ep11_cprb()
1073 if (!zcrypt_check_card(perms, zc->card->id)) in _zcrypt_send_ep11_cprb()
1076 wgt = speed_idx_ep11(func_code) * zc->speed_rating[SECKEY]; in _zcrypt_send_ep11_cprb()
1079 AP_QID_CARD(tr->last_qid) == zc->card->id) ? in _zcrypt_send_ep11_cprb()
1081 if (!zcrypt_card_compare(zc, pref_zc, wgt + cpen, pref_wgt)) in _zcrypt_send_ep11_cprb()
1083 for_each_zcrypt_queue(zq, zc) { in _zcrypt_send_ep11_cprb()
1103 pref_zc = zc; in _zcrypt_send_ep11_cprb()
1144 struct zcrypt_card *zc, *pref_zc; in zcrypt_rng() local
1163 for_each_zcrypt_card(zc) { in zcrypt_rng()
1165 if (!zc->online || !zc->card->config || in zcrypt_rng()
1166 !(zc->card->functions & 0x10000000)) in zcrypt_rng()
1169 wgt = zc->speed_rating[func_code]; in zcrypt_rng()
1170 if (!zcrypt_card_compare(zc, pref_zc, wgt, pref_wgt)) in zcrypt_rng()
1172 for_each_zcrypt_queue(zq, zc) { in zcrypt_rng()
1179 pref_zc = zc; in zcrypt_rng()
1208 struct zcrypt_card *zc; in zcrypt_device_status_mask() local
1217 for_each_zcrypt_card(zc) { in zcrypt_device_status_mask()
1218 for_each_zcrypt_queue(zq, zc) { in zcrypt_device_status_mask()
1224 stat->hwtype = zc->card->ap_dev.device_type; in zcrypt_device_status_mask()
1225 stat->functions = zc->card->functions >> 26; in zcrypt_device_status_mask()
1235 struct zcrypt_card *zc; in zcrypt_device_status_mask_ext() local
1244 for_each_zcrypt_card(zc) { in zcrypt_device_status_mask_ext()
1245 for_each_zcrypt_queue(zq, zc) { in zcrypt_device_status_mask_ext()
1249 stat->hwtype = zc->card->ap_dev.device_type; in zcrypt_device_status_mask_ext()
1250 stat->functions = zc->card->functions >> 26; in zcrypt_device_status_mask_ext()
1262 struct zcrypt_card *zc; in zcrypt_device_status_ext() local
1268 for_each_zcrypt_card(zc) { in zcrypt_device_status_ext()
1269 for_each_zcrypt_queue(zq, zc) { in zcrypt_device_status_ext()
1272 devstat->hwtype = zc->card->ap_dev.device_type; in zcrypt_device_status_ext()
1273 devstat->functions = zc->card->functions >> 26; in zcrypt_device_status_ext()
1289 struct zcrypt_card *zc; in zcrypt_status_mask() local
1295 for_each_zcrypt_card(zc) { in zcrypt_status_mask()
1296 for_each_zcrypt_queue(zq, zc) { in zcrypt_status_mask()
1301 status[card] = zc->online ? zc->user_space_type : 0x0d; in zcrypt_status_mask()
1309 struct zcrypt_card *zc; in zcrypt_qdepth_mask() local
1316 for_each_zcrypt_card(zc) { in zcrypt_qdepth_mask()
1317 for_each_zcrypt_queue(zq, zc) { in zcrypt_qdepth_mask()
1335 struct zcrypt_card *zc; in zcrypt_perdev_reqcnt() local
1343 for_each_zcrypt_card(zc) { in zcrypt_perdev_reqcnt()
1344 for_each_zcrypt_queue(zq, zc) { in zcrypt_perdev_reqcnt()
1361 struct zcrypt_card *zc; in zcrypt_pendingq_count() local
1368 for_each_zcrypt_card(zc) { in zcrypt_pendingq_count()
1369 for_each_zcrypt_queue(zq, zc) { in zcrypt_pendingq_count()
1384 struct zcrypt_card *zc; in zcrypt_requestq_count() local
1391 for_each_zcrypt_card(zc) { in zcrypt_requestq_count()
1392 for_each_zcrypt_queue(zq, zc) { in zcrypt_requestq_count()