Lines Matching refs:group

385 	wq->group = NULL;  in idxd_wq_device_reset_cleanup()
670 engine->group = NULL; in idxd_engines_clear_state()
676 struct idxd_group *group; in idxd_groups_clear_state() local
681 group = idxd->groups[i]; in idxd_groups_clear_state()
682 memset(&group->grpcfg, 0, sizeof(group->grpcfg)); in idxd_groups_clear_state()
683 group->num_engines = 0; in idxd_groups_clear_state()
684 group->num_wqs = 0; in idxd_groups_clear_state()
685 group->use_rdbuf_limit = false; in idxd_groups_clear_state()
690 group->rdbufs_allowed = idxd->max_rdbufs; in idxd_groups_clear_state()
691 group->rdbufs_reserved = 0; in idxd_groups_clear_state()
693 group->tc_a = 1; in idxd_groups_clear_state()
694 group->tc_b = 1; in idxd_groups_clear_state()
696 group->tc_a = -1; in idxd_groups_clear_state()
697 group->tc_b = -1; in idxd_groups_clear_state()
699 group->desc_progress_limit = 0; in idxd_groups_clear_state()
700 group->batch_progress_limit = 0; in idxd_groups_clear_state()
839 static void idxd_group_config_write(struct idxd_group *group) in idxd_group_config_write() argument
841 struct idxd_device *idxd = group->idxd; in idxd_group_config_write()
846 dev_dbg(dev, "Writing group %d cfg registers\n", group->id); in idxd_group_config_write()
850 grpcfg_offset = GRPWQCFG_OFFSET(idxd, group->id, i); in idxd_group_config_write()
851 iowrite64(group->grpcfg.wqs[i], idxd->reg_base + grpcfg_offset); in idxd_group_config_write()
853 group->id, i, grpcfg_offset, in idxd_group_config_write()
858 grpcfg_offset = GRPENGCFG_OFFSET(idxd, group->id); in idxd_group_config_write()
859 iowrite64(group->grpcfg.engines, idxd->reg_base + grpcfg_offset); in idxd_group_config_write()
860 dev_dbg(dev, "GRPCFG engs[%d: %#x]: %#llx\n", group->id, in idxd_group_config_write()
864 grpcfg_offset = GRPFLGCFG_OFFSET(idxd, group->id); in idxd_group_config_write()
865 iowrite64(group->grpcfg.flags.bits, idxd->reg_base + grpcfg_offset); in idxd_group_config_write()
867 group->id, grpcfg_offset, in idxd_group_config_write()
889 struct idxd_group *group = idxd->groups[i]; in idxd_groups_config_write() local
891 idxd_group_config_write(group); in idxd_groups_config_write()
913 if (!wq->group) in idxd_wq_config_write()
1017 struct idxd_group *group = idxd->groups[i]; in idxd_group_flags_setup() local
1019 if (group->tc_a == -1) in idxd_group_flags_setup()
1020 group->tc_a = group->grpcfg.flags.tc_a = 0; in idxd_group_flags_setup()
1022 group->grpcfg.flags.tc_a = group->tc_a; in idxd_group_flags_setup()
1023 if (group->tc_b == -1) in idxd_group_flags_setup()
1024 group->tc_b = group->grpcfg.flags.tc_b = 1; in idxd_group_flags_setup()
1026 group->grpcfg.flags.tc_b = group->tc_b; in idxd_group_flags_setup()
1027 group->grpcfg.flags.use_rdbuf_limit = group->use_rdbuf_limit; in idxd_group_flags_setup()
1028 group->grpcfg.flags.rdbufs_reserved = group->rdbufs_reserved; in idxd_group_flags_setup()
1029 group->grpcfg.flags.rdbufs_allowed = group->rdbufs_allowed; in idxd_group_flags_setup()
1030 group->grpcfg.flags.desc_progress_limit = group->desc_progress_limit; in idxd_group_flags_setup()
1031 group->grpcfg.flags.batch_progress_limit = group->batch_progress_limit; in idxd_group_flags_setup()
1039 struct idxd_group *group; in idxd_engines_setup() local
1042 group = idxd->groups[i]; in idxd_engines_setup()
1043 group->grpcfg.engines = 0; in idxd_engines_setup()
1048 group = eng->group; in idxd_engines_setup()
1050 if (!group) in idxd_engines_setup()
1053 group->grpcfg.engines |= BIT(eng->id); in idxd_engines_setup()
1066 struct idxd_group *group; in idxd_wqs_setup() local
1071 group = idxd->groups[i]; in idxd_wqs_setup()
1073 group->grpcfg.wqs[j] = 0; in idxd_wqs_setup()
1078 group = wq->group; in idxd_wqs_setup()
1080 if (!wq->group) in idxd_wqs_setup()
1089 group->grpcfg.wqs[wq->id / 64] |= BIT(wq->id % 64); in idxd_wqs_setup()
1159 static void idxd_group_load_config(struct idxd_group *group) in idxd_group_load_config() argument
1161 struct idxd_device *idxd = group->idxd; in idxd_group_load_config()
1172 grpcfg_offset = GRPWQCFG_OFFSET(idxd, group->id, i); in idxd_group_load_config()
1173 group->grpcfg.wqs[i] = ioread64(idxd->reg_base + grpcfg_offset); in idxd_group_load_config()
1175 group->id, i, grpcfg_offset, group->grpcfg.wqs[i]); in idxd_group_load_config()
1189 if (group->grpcfg.wqs[i] & BIT(j)) { in idxd_group_load_config()
1191 wq->group = group; in idxd_group_load_config()
1196 grpcfg_offset = GRPENGCFG_OFFSET(idxd, group->id); in idxd_group_load_config()
1197 group->grpcfg.engines = ioread64(idxd->reg_base + grpcfg_offset); in idxd_group_load_config()
1198 dev_dbg(dev, "GRPCFG engs[%d: %#x]: %#llx\n", group->id, in idxd_group_load_config()
1199 grpcfg_offset, group->grpcfg.engines); in idxd_group_load_config()
1206 if (group->grpcfg.engines & BIT(i)) { in idxd_group_load_config()
1209 engine->group = group; in idxd_group_load_config()
1213 grpcfg_offset = GRPFLGCFG_OFFSET(idxd, group->id); in idxd_group_load_config()
1214 group->grpcfg.flags.bits = ioread64(idxd->reg_base + grpcfg_offset); in idxd_group_load_config()
1216 group->id, grpcfg_offset, group->grpcfg.flags.bits); in idxd_group_load_config()
1228 struct idxd_group *group = idxd->groups[i]; in idxd_device_load_config() local
1230 idxd_group_load_config(group); in idxd_device_load_config()
1380 if (!wq->group) { in drv_enable_wq()