rdtgrp 706 arch/x86/kernel/cpu/resctrl/core.c struct rdtgroup *rdtgrp; rdtgrp 712 arch/x86/kernel/cpu/resctrl/core.c list_for_each_entry(rdtgrp, &rdt_all_groups, rdtgroup_list) { rdtgrp 713 arch/x86/kernel/cpu/resctrl/core.c if (cpumask_test_and_clear_cpu(cpu, &rdtgrp->cpu_mask)) { rdtgrp 714 arch/x86/kernel/cpu/resctrl/core.c clear_childcpus(rdtgrp, cpu); rdtgrp 197 arch/x86/kernel/cpu/resctrl/ctrlmondata.c struct rdtgroup *rdtgrp = data->rdtgrp; rdtgrp 209 arch/x86/kernel/cpu/resctrl/ctrlmondata.c if (rdtgrp->mode == RDT_MODE_PSEUDO_LOCKSETUP && rdtgrp 218 arch/x86/kernel/cpu/resctrl/ctrlmondata.c if ((rdtgrp->mode == RDT_MODE_EXCLUSIVE || rdtgrp 219 arch/x86/kernel/cpu/resctrl/ctrlmondata.c rdtgrp->mode == RDT_MODE_SHAREABLE) && rdtgrp 229 arch/x86/kernel/cpu/resctrl/ctrlmondata.c if (rdtgroup_cbm_overlaps(r, d, cbm_val, rdtgrp->closid, true)) { rdtgrp 234 arch/x86/kernel/cpu/resctrl/ctrlmondata.c if (rdtgroup_cbm_overlaps(r, d, cbm_val, rdtgrp->closid, false)) { rdtgrp 235 arch/x86/kernel/cpu/resctrl/ctrlmondata.c if (rdtgrp->mode == RDT_MODE_EXCLUSIVE || rdtgrp 236 arch/x86/kernel/cpu/resctrl/ctrlmondata.c rdtgrp->mode == RDT_MODE_PSEUDO_LOCKSETUP) { rdtgrp 255 arch/x86/kernel/cpu/resctrl/ctrlmondata.c struct rdtgroup *rdtgrp) rdtgrp 262 arch/x86/kernel/cpu/resctrl/ctrlmondata.c if (rdtgrp->mode == RDT_MODE_PSEUDO_LOCKSETUP && rdtgrp 281 arch/x86/kernel/cpu/resctrl/ctrlmondata.c data.rdtgrp = rdtgrp; rdtgrp 284 arch/x86/kernel/cpu/resctrl/ctrlmondata.c if (rdtgrp->mode == RDT_MODE_PSEUDO_LOCKSETUP) { rdtgrp 293 arch/x86/kernel/cpu/resctrl/ctrlmondata.c rdtgrp->plr->r = r; rdtgrp 294 arch/x86/kernel/cpu/resctrl/ctrlmondata.c rdtgrp->plr->d = d; rdtgrp 295 arch/x86/kernel/cpu/resctrl/ctrlmondata.c rdtgrp->plr->cbm = d->new_ctrl; rdtgrp 296 arch/x86/kernel/cpu/resctrl/ctrlmondata.c d->plr = rdtgrp->plr; rdtgrp 351 arch/x86/kernel/cpu/resctrl/ctrlmondata.c struct rdtgroup *rdtgrp) rdtgrp 356 arch/x86/kernel/cpu/resctrl/ctrlmondata.c if (!strcmp(resname, r->name) && rdtgrp->closid < r->num_closid) rdtgrp 357 arch/x86/kernel/cpu/resctrl/ctrlmondata.c return parse_line(tok, r, rdtgrp); rdtgrp 366 arch/x86/kernel/cpu/resctrl/ctrlmondata.c struct rdtgroup *rdtgrp; rdtgrp 378 arch/x86/kernel/cpu/resctrl/ctrlmondata.c rdtgrp = rdtgroup_kn_lock_live(of->kn); rdtgrp 379 arch/x86/kernel/cpu/resctrl/ctrlmondata.c if (!rdtgrp) { rdtgrp 390 arch/x86/kernel/cpu/resctrl/ctrlmondata.c if (rdtgrp->mode == RDT_MODE_PSEUDO_LOCKED) { rdtgrp 413 arch/x86/kernel/cpu/resctrl/ctrlmondata.c ret = rdtgroup_parse_resource(resname, tok, rdtgrp); rdtgrp 419 arch/x86/kernel/cpu/resctrl/ctrlmondata.c ret = update_domains(r, rdtgrp->closid); rdtgrp 424 arch/x86/kernel/cpu/resctrl/ctrlmondata.c if (rdtgrp->mode == RDT_MODE_PSEUDO_LOCKSETUP) { rdtgrp 431 arch/x86/kernel/cpu/resctrl/ctrlmondata.c ret = rdtgroup_pseudo_lock_create(rdtgrp); rdtgrp 463 arch/x86/kernel/cpu/resctrl/ctrlmondata.c struct rdtgroup *rdtgrp; rdtgrp 468 arch/x86/kernel/cpu/resctrl/ctrlmondata.c rdtgrp = rdtgroup_kn_lock_live(of->kn); rdtgrp 469 arch/x86/kernel/cpu/resctrl/ctrlmondata.c if (rdtgrp) { rdtgrp 470 arch/x86/kernel/cpu/resctrl/ctrlmondata.c if (rdtgrp->mode == RDT_MODE_PSEUDO_LOCKSETUP) { rdtgrp 473 arch/x86/kernel/cpu/resctrl/ctrlmondata.c } else if (rdtgrp->mode == RDT_MODE_PSEUDO_LOCKED) { rdtgrp 474 arch/x86/kernel/cpu/resctrl/ctrlmondata.c if (!rdtgrp->plr->d) { rdtgrp 480 arch/x86/kernel/cpu/resctrl/ctrlmondata.c rdtgrp->plr->r->name, rdtgrp 481 arch/x86/kernel/cpu/resctrl/ctrlmondata.c rdtgrp->plr->d->id, rdtgrp 482 arch/x86/kernel/cpu/resctrl/ctrlmondata.c rdtgrp->plr->cbm); rdtgrp 485 arch/x86/kernel/cpu/resctrl/ctrlmondata.c closid = rdtgrp->closid; rdtgrp 499 arch/x86/kernel/cpu/resctrl/ctrlmondata.c struct rdtgroup *rdtgrp, int evtid, int first) rdtgrp 504 arch/x86/kernel/cpu/resctrl/ctrlmondata.c rr->rgrp = rdtgrp; rdtgrp 517 arch/x86/kernel/cpu/resctrl/ctrlmondata.c struct rdtgroup *rdtgrp; rdtgrp 524 arch/x86/kernel/cpu/resctrl/ctrlmondata.c rdtgrp = rdtgroup_kn_lock_live(of->kn); rdtgrp 525 arch/x86/kernel/cpu/resctrl/ctrlmondata.c if (!rdtgrp) { rdtgrp 542 arch/x86/kernel/cpu/resctrl/ctrlmondata.c mon_event_read(&rr, d, rdtgrp, evtid, false); rdtgrp 410 arch/x86/kernel/cpu/resctrl/internal.h struct rdtgroup *rdtgrp; rdtgrp 569 arch/x86/kernel/cpu/resctrl/internal.h int rdtgroup_locksetup_enter(struct rdtgroup *rdtgrp); rdtgrp 570 arch/x86/kernel/cpu/resctrl/internal.h int rdtgroup_locksetup_exit(struct rdtgroup *rdtgrp); rdtgrp 575 arch/x86/kernel/cpu/resctrl/internal.h int rdtgroup_pseudo_lock_create(struct rdtgroup *rdtgrp); rdtgrp 576 arch/x86/kernel/cpu/resctrl/internal.h void rdtgroup_pseudo_lock_remove(struct rdtgroup *rdtgrp); rdtgrp 591 arch/x86/kernel/cpu/resctrl/internal.h struct rdtgroup *rdtgrp, int evtid, int first); rdtgrp 299 arch/x86/kernel/cpu/resctrl/monitor.c struct rdtgroup *rdtgrp, *entry; rdtgrp 303 arch/x86/kernel/cpu/resctrl/monitor.c rdtgrp = rr->rgrp; rdtgrp 305 arch/x86/kernel/cpu/resctrl/monitor.c if (__mon_event_count(rdtgrp->mon.rmid, rr)) rdtgrp 311 arch/x86/kernel/cpu/resctrl/monitor.c head = &rdtgrp->mon.crdtgrp_list; rdtgrp 313 arch/x86/kernel/cpu/resctrl/monitor.c if (rdtgrp->type == RDTCTRL_GROUP) { rdtgrp 153 arch/x86/kernel/cpu/resctrl/pseudo_lock.c struct rdtgroup *rdtgrp, *rdtgrp_match = NULL; rdtgrp 155 arch/x86/kernel/cpu/resctrl/pseudo_lock.c list_for_each_entry(rdtgrp, &rdt_all_groups, rdtgroup_list) { rdtgrp 156 arch/x86/kernel/cpu/resctrl/pseudo_lock.c if (rdtgrp->plr && rdtgrp->plr->minor == minor) { rdtgrp 157 arch/x86/kernel/cpu/resctrl/pseudo_lock.c rdtgrp_match = rdtgrp; rdtgrp 320 arch/x86/kernel/cpu/resctrl/pseudo_lock.c static int pseudo_lock_init(struct rdtgroup *rdtgrp) rdtgrp 330 arch/x86/kernel/cpu/resctrl/pseudo_lock.c rdtgrp->plr = plr; rdtgrp 387 arch/x86/kernel/cpu/resctrl/pseudo_lock.c static void pseudo_lock_free(struct rdtgroup *rdtgrp) rdtgrp 389 arch/x86/kernel/cpu/resctrl/pseudo_lock.c pseudo_lock_region_clear(rdtgrp->plr); rdtgrp 390 arch/x86/kernel/cpu/resctrl/pseudo_lock.c kfree(rdtgrp->plr); rdtgrp 391 arch/x86/kernel/cpu/resctrl/pseudo_lock.c rdtgrp->plr = NULL; rdtgrp 415 arch/x86/kernel/cpu/resctrl/pseudo_lock.c struct rdtgroup *rdtgrp = _rdtgrp; rdtgrp 416 arch/x86/kernel/cpu/resctrl/pseudo_lock.c struct pseudo_lock_region *plr = rdtgrp->plr; rdtgrp 474 arch/x86/kernel/cpu/resctrl/pseudo_lock.c __wrmsr(IA32_PQR_ASSOC, rmid_p, rdtgrp->closid); rdtgrp 528 arch/x86/kernel/cpu/resctrl/pseudo_lock.c static int rdtgroup_monitor_in_progress(struct rdtgroup *rdtgrp) rdtgrp 530 arch/x86/kernel/cpu/resctrl/pseudo_lock.c return !list_empty(&rdtgrp->mon.crdtgrp_list); rdtgrp 548 arch/x86/kernel/cpu/resctrl/pseudo_lock.c static int rdtgroup_locksetup_user_restrict(struct rdtgroup *rdtgrp) rdtgrp 552 arch/x86/kernel/cpu/resctrl/pseudo_lock.c ret = rdtgroup_kn_mode_restrict(rdtgrp, "tasks"); rdtgrp 556 arch/x86/kernel/cpu/resctrl/pseudo_lock.c ret = rdtgroup_kn_mode_restrict(rdtgrp, "cpus"); rdtgrp 560 arch/x86/kernel/cpu/resctrl/pseudo_lock.c ret = rdtgroup_kn_mode_restrict(rdtgrp, "cpus_list"); rdtgrp 565 arch/x86/kernel/cpu/resctrl/pseudo_lock.c ret = rdtgroup_kn_mode_restrict(rdtgrp, "mon_groups"); rdtgrp 574 arch/x86/kernel/cpu/resctrl/pseudo_lock.c rdtgroup_kn_mode_restore(rdtgrp, "cpus_list", 0777); rdtgrp 576 arch/x86/kernel/cpu/resctrl/pseudo_lock.c rdtgroup_kn_mode_restore(rdtgrp, "cpus", 0777); rdtgrp 578 arch/x86/kernel/cpu/resctrl/pseudo_lock.c rdtgroup_kn_mode_restore(rdtgrp, "tasks", 0777); rdtgrp 595 arch/x86/kernel/cpu/resctrl/pseudo_lock.c static int rdtgroup_locksetup_user_restore(struct rdtgroup *rdtgrp) rdtgrp 599 arch/x86/kernel/cpu/resctrl/pseudo_lock.c ret = rdtgroup_kn_mode_restore(rdtgrp, "tasks", 0777); rdtgrp 603 arch/x86/kernel/cpu/resctrl/pseudo_lock.c ret = rdtgroup_kn_mode_restore(rdtgrp, "cpus", 0777); rdtgrp 607 arch/x86/kernel/cpu/resctrl/pseudo_lock.c ret = rdtgroup_kn_mode_restore(rdtgrp, "cpus_list", 0777); rdtgrp 612 arch/x86/kernel/cpu/resctrl/pseudo_lock.c ret = rdtgroup_kn_mode_restore(rdtgrp, "mon_groups", 0777); rdtgrp 621 arch/x86/kernel/cpu/resctrl/pseudo_lock.c rdtgroup_kn_mode_restrict(rdtgrp, "cpus_list"); rdtgrp 623 arch/x86/kernel/cpu/resctrl/pseudo_lock.c rdtgroup_kn_mode_restrict(rdtgrp, "cpus"); rdtgrp 625 arch/x86/kernel/cpu/resctrl/pseudo_lock.c rdtgroup_kn_mode_restrict(rdtgrp, "tasks"); rdtgrp 648 arch/x86/kernel/cpu/resctrl/pseudo_lock.c int rdtgroup_locksetup_enter(struct rdtgroup *rdtgrp) rdtgrp 656 arch/x86/kernel/cpu/resctrl/pseudo_lock.c if (rdtgrp == &rdtgroup_default) { rdtgrp 703 arch/x86/kernel/cpu/resctrl/pseudo_lock.c if (rdtgroup_monitor_in_progress(rdtgrp)) { rdtgrp 708 arch/x86/kernel/cpu/resctrl/pseudo_lock.c if (rdtgroup_tasks_assigned(rdtgrp)) { rdtgrp 713 arch/x86/kernel/cpu/resctrl/pseudo_lock.c if (!cpumask_empty(&rdtgrp->cpu_mask)) { rdtgrp 718 arch/x86/kernel/cpu/resctrl/pseudo_lock.c if (rdtgroup_locksetup_user_restrict(rdtgrp)) { rdtgrp 723 arch/x86/kernel/cpu/resctrl/pseudo_lock.c ret = pseudo_lock_init(rdtgrp); rdtgrp 735 arch/x86/kernel/cpu/resctrl/pseudo_lock.c free_rmid(rdtgrp->mon.rmid); rdtgrp 741 arch/x86/kernel/cpu/resctrl/pseudo_lock.c rdtgroup_locksetup_user_restore(rdtgrp); rdtgrp 755 arch/x86/kernel/cpu/resctrl/pseudo_lock.c int rdtgroup_locksetup_exit(struct rdtgroup *rdtgrp) rdtgrp 765 arch/x86/kernel/cpu/resctrl/pseudo_lock.c rdtgrp->mon.rmid = ret; rdtgrp 768 arch/x86/kernel/cpu/resctrl/pseudo_lock.c ret = rdtgroup_locksetup_user_restore(rdtgrp); rdtgrp 770 arch/x86/kernel/cpu/resctrl/pseudo_lock.c free_rmid(rdtgrp->mon.rmid); rdtgrp 774 arch/x86/kernel/cpu/resctrl/pseudo_lock.c pseudo_lock_free(rdtgrp); rdtgrp 1151 arch/x86/kernel/cpu/resctrl/pseudo_lock.c static int pseudo_lock_measure_cycles(struct rdtgroup *rdtgrp, int sel) rdtgrp 1153 arch/x86/kernel/cpu/resctrl/pseudo_lock.c struct pseudo_lock_region *plr = rdtgrp->plr; rdtgrp 1161 arch/x86/kernel/cpu/resctrl/pseudo_lock.c if (rdtgrp->flags & RDT_DELETED) { rdtgrp 1222 arch/x86/kernel/cpu/resctrl/pseudo_lock.c struct rdtgroup *rdtgrp = file->private_data; rdtgrp 1240 arch/x86/kernel/cpu/resctrl/pseudo_lock.c ret = pseudo_lock_measure_cycles(rdtgrp, sel); rdtgrp 1271 arch/x86/kernel/cpu/resctrl/pseudo_lock.c int rdtgroup_pseudo_lock_create(struct rdtgroup *rdtgrp) rdtgrp 1273 arch/x86/kernel/cpu/resctrl/pseudo_lock.c struct pseudo_lock_region *plr = rdtgrp->plr; rdtgrp 1291 arch/x86/kernel/cpu/resctrl/pseudo_lock.c thread = kthread_create_on_node(pseudo_lock_fn, rdtgrp, rdtgrp 1336 arch/x86/kernel/cpu/resctrl/pseudo_lock.c plr->debugfs_dir = debugfs_create_dir(rdtgrp->kn->name, rdtgrp 1340 arch/x86/kernel/cpu/resctrl/pseudo_lock.c plr->debugfs_dir, rdtgrp, rdtgrp 1346 arch/x86/kernel/cpu/resctrl/pseudo_lock.c rdtgrp, "%s", rdtgrp->kn->name); rdtgrp 1358 arch/x86/kernel/cpu/resctrl/pseudo_lock.c if (rdtgrp->flags & RDT_DELETED) { rdtgrp 1365 arch/x86/kernel/cpu/resctrl/pseudo_lock.c rdtgrp->mode = RDT_MODE_PSEUDO_LOCKED; rdtgrp 1366 arch/x86/kernel/cpu/resctrl/pseudo_lock.c closid_free(rdtgrp->closid); rdtgrp 1367 arch/x86/kernel/cpu/resctrl/pseudo_lock.c rdtgroup_kn_mode_restore(rdtgrp, "cpus", 0444); rdtgrp 1368 arch/x86/kernel/cpu/resctrl/pseudo_lock.c rdtgroup_kn_mode_restore(rdtgrp, "cpus_list", 0444); rdtgrp 1400 arch/x86/kernel/cpu/resctrl/pseudo_lock.c void rdtgroup_pseudo_lock_remove(struct rdtgroup *rdtgrp) rdtgrp 1402 arch/x86/kernel/cpu/resctrl/pseudo_lock.c struct pseudo_lock_region *plr = rdtgrp->plr; rdtgrp 1404 arch/x86/kernel/cpu/resctrl/pseudo_lock.c if (rdtgrp->mode == RDT_MODE_PSEUDO_LOCKSETUP) { rdtgrp 1409 arch/x86/kernel/cpu/resctrl/pseudo_lock.c closid_free(rdtgrp->closid); rdtgrp 1414 arch/x86/kernel/cpu/resctrl/pseudo_lock.c debugfs_remove_recursive(rdtgrp->plr->debugfs_dir); rdtgrp 1419 arch/x86/kernel/cpu/resctrl/pseudo_lock.c pseudo_lock_free(rdtgrp); rdtgrp 1424 arch/x86/kernel/cpu/resctrl/pseudo_lock.c struct rdtgroup *rdtgrp; rdtgrp 1428 arch/x86/kernel/cpu/resctrl/pseudo_lock.c rdtgrp = region_find_by_minor(iminor(inode)); rdtgrp 1429 arch/x86/kernel/cpu/resctrl/pseudo_lock.c if (!rdtgrp) { rdtgrp 1434 arch/x86/kernel/cpu/resctrl/pseudo_lock.c filp->private_data = rdtgrp; rdtgrp 1435 arch/x86/kernel/cpu/resctrl/pseudo_lock.c atomic_inc(&rdtgrp->waitcount); rdtgrp 1446 arch/x86/kernel/cpu/resctrl/pseudo_lock.c struct rdtgroup *rdtgrp; rdtgrp 1449 arch/x86/kernel/cpu/resctrl/pseudo_lock.c rdtgrp = filp->private_data; rdtgrp 1450 arch/x86/kernel/cpu/resctrl/pseudo_lock.c WARN_ON(!rdtgrp); rdtgrp 1451 arch/x86/kernel/cpu/resctrl/pseudo_lock.c if (!rdtgrp) { rdtgrp 1456 arch/x86/kernel/cpu/resctrl/pseudo_lock.c atomic_dec(&rdtgrp->waitcount); rdtgrp 1476 arch/x86/kernel/cpu/resctrl/pseudo_lock.c struct rdtgroup *rdtgrp; rdtgrp 1482 arch/x86/kernel/cpu/resctrl/pseudo_lock.c rdtgrp = filp->private_data; rdtgrp 1483 arch/x86/kernel/cpu/resctrl/pseudo_lock.c WARN_ON(!rdtgrp); rdtgrp 1484 arch/x86/kernel/cpu/resctrl/pseudo_lock.c if (!rdtgrp) { rdtgrp 1489 arch/x86/kernel/cpu/resctrl/pseudo_lock.c plr = rdtgrp->plr; rdtgrp 1553 arch/x86/kernel/cpu/resctrl/pseudo_lock.c struct rdtgroup *rdtgrp; rdtgrp 1555 arch/x86/kernel/cpu/resctrl/pseudo_lock.c rdtgrp = dev_get_drvdata(dev); rdtgrp 1558 arch/x86/kernel/cpu/resctrl/pseudo_lock.c return kasprintf(GFP_KERNEL, "pseudo_lock/%s", rdtgrp->kn->name); rdtgrp 157 arch/x86/kernel/cpu/resctrl/rdtgroup.c struct rdtgroup *rdtgrp; rdtgrp 159 arch/x86/kernel/cpu/resctrl/rdtgroup.c list_for_each_entry(rdtgrp, &rdt_all_groups, rdtgroup_list) { rdtgrp 160 arch/x86/kernel/cpu/resctrl/rdtgroup.c if (rdtgrp->closid == closid) rdtgrp 161 arch/x86/kernel/cpu/resctrl/rdtgroup.c return rdtgrp->mode; rdtgrp 264 arch/x86/kernel/cpu/resctrl/rdtgroup.c struct rdtgroup *rdtgrp; rdtgrp 268 arch/x86/kernel/cpu/resctrl/rdtgroup.c rdtgrp = rdtgroup_kn_lock_live(of->kn); rdtgrp 270 arch/x86/kernel/cpu/resctrl/rdtgroup.c if (rdtgrp) { rdtgrp 271 arch/x86/kernel/cpu/resctrl/rdtgroup.c if (rdtgrp->mode == RDT_MODE_PSEUDO_LOCKED) { rdtgrp 272 arch/x86/kernel/cpu/resctrl/rdtgroup.c if (!rdtgrp->plr->d) { rdtgrp 277 arch/x86/kernel/cpu/resctrl/rdtgroup.c mask = &rdtgrp->plr->d->cpu_mask; rdtgrp 284 arch/x86/kernel/cpu/resctrl/rdtgroup.c cpumask_pr_args(&rdtgrp->cpu_mask)); rdtgrp 333 arch/x86/kernel/cpu/resctrl/rdtgroup.c static int cpus_mon_write(struct rdtgroup *rdtgrp, cpumask_var_t newmask, rdtgrp 336 arch/x86/kernel/cpu/resctrl/rdtgroup.c struct rdtgroup *prgrp = rdtgrp->mon.parent, *crgrp; rdtgrp 347 arch/x86/kernel/cpu/resctrl/rdtgroup.c cpumask_andnot(tmpmask, &rdtgrp->cpu_mask, newmask); rdtgrp 358 arch/x86/kernel/cpu/resctrl/rdtgroup.c cpumask_andnot(tmpmask, newmask, &rdtgrp->cpu_mask); rdtgrp 362 arch/x86/kernel/cpu/resctrl/rdtgroup.c if (crgrp == rdtgrp) rdtgrp 367 arch/x86/kernel/cpu/resctrl/rdtgroup.c update_closid_rmid(tmpmask, rdtgrp); rdtgrp 371 arch/x86/kernel/cpu/resctrl/rdtgroup.c cpumask_copy(&rdtgrp->cpu_mask, newmask); rdtgrp 386 arch/x86/kernel/cpu/resctrl/rdtgroup.c static int cpus_ctrl_write(struct rdtgroup *rdtgrp, cpumask_var_t newmask, rdtgrp 393 arch/x86/kernel/cpu/resctrl/rdtgroup.c cpumask_andnot(tmpmask, &rdtgrp->cpu_mask, newmask); rdtgrp 396 arch/x86/kernel/cpu/resctrl/rdtgroup.c if (rdtgrp == &rdtgroup_default) { rdtgrp 412 arch/x86/kernel/cpu/resctrl/rdtgroup.c cpumask_andnot(tmpmask, newmask, &rdtgrp->cpu_mask); rdtgrp 415 arch/x86/kernel/cpu/resctrl/rdtgroup.c if (r == rdtgrp) rdtgrp 421 arch/x86/kernel/cpu/resctrl/rdtgroup.c update_closid_rmid(tmpmask, rdtgrp); rdtgrp 425 arch/x86/kernel/cpu/resctrl/rdtgroup.c cpumask_copy(&rdtgrp->cpu_mask, newmask); rdtgrp 431 arch/x86/kernel/cpu/resctrl/rdtgroup.c head = &rdtgrp->mon.crdtgrp_list; rdtgrp 433 arch/x86/kernel/cpu/resctrl/rdtgroup.c cpumask_and(tmpmask, &rdtgrp->cpu_mask, &crgrp->cpu_mask); rdtgrp 434 arch/x86/kernel/cpu/resctrl/rdtgroup.c update_closid_rmid(tmpmask, rdtgrp); rdtgrp 445 arch/x86/kernel/cpu/resctrl/rdtgroup.c struct rdtgroup *rdtgrp; rdtgrp 463 arch/x86/kernel/cpu/resctrl/rdtgroup.c rdtgrp = rdtgroup_kn_lock_live(of->kn); rdtgrp 464 arch/x86/kernel/cpu/resctrl/rdtgroup.c if (!rdtgrp) { rdtgrp 469 arch/x86/kernel/cpu/resctrl/rdtgroup.c if (rdtgrp->mode == RDT_MODE_PSEUDO_LOCKED || rdtgrp 470 arch/x86/kernel/cpu/resctrl/rdtgroup.c rdtgrp->mode == RDT_MODE_PSEUDO_LOCKSETUP) { rdtgrp 494 arch/x86/kernel/cpu/resctrl/rdtgroup.c if (rdtgrp->type == RDTCTRL_GROUP) rdtgrp 495 arch/x86/kernel/cpu/resctrl/rdtgroup.c ret = cpus_ctrl_write(rdtgrp, newmask, tmpmask, tmpmask1); rdtgrp 496 arch/x86/kernel/cpu/resctrl/rdtgroup.c else if (rdtgrp->type == RDTMON_GROUP) rdtgrp 497 arch/x86/kernel/cpu/resctrl/rdtgroup.c ret = cpus_mon_write(rdtgrp, newmask, tmpmask); rdtgrp 512 arch/x86/kernel/cpu/resctrl/rdtgroup.c struct rdtgroup *rdtgrp; rdtgrp 518 arch/x86/kernel/cpu/resctrl/rdtgroup.c struct rdtgroup *rdtgrp; rdtgrp 521 arch/x86/kernel/cpu/resctrl/rdtgroup.c rdtgrp = callback->rdtgrp; rdtgrp 528 arch/x86/kernel/cpu/resctrl/rdtgroup.c if (atomic_dec_and_test(&rdtgrp->waitcount) && rdtgrp 529 arch/x86/kernel/cpu/resctrl/rdtgroup.c (rdtgrp->flags & RDT_DELETED)) { rdtgrp 532 arch/x86/kernel/cpu/resctrl/rdtgroup.c kfree(rdtgrp); rdtgrp 544 arch/x86/kernel/cpu/resctrl/rdtgroup.c struct rdtgroup *rdtgrp) rdtgrp 553 arch/x86/kernel/cpu/resctrl/rdtgroup.c callback->rdtgrp = rdtgrp; rdtgrp 559 arch/x86/kernel/cpu/resctrl/rdtgroup.c atomic_inc(&rdtgrp->waitcount); rdtgrp 567 arch/x86/kernel/cpu/resctrl/rdtgroup.c atomic_dec(&rdtgrp->waitcount); rdtgrp 576 arch/x86/kernel/cpu/resctrl/rdtgroup.c if (rdtgrp->type == RDTCTRL_GROUP) { rdtgrp 577 arch/x86/kernel/cpu/resctrl/rdtgroup.c tsk->closid = rdtgrp->closid; rdtgrp 578 arch/x86/kernel/cpu/resctrl/rdtgroup.c tsk->rmid = rdtgrp->mon.rmid; rdtgrp 579 arch/x86/kernel/cpu/resctrl/rdtgroup.c } else if (rdtgrp->type == RDTMON_GROUP) { rdtgrp 580 arch/x86/kernel/cpu/resctrl/rdtgroup.c if (rdtgrp->mon.parent->closid == tsk->closid) { rdtgrp 581 arch/x86/kernel/cpu/resctrl/rdtgroup.c tsk->rmid = rdtgrp->mon.rmid; rdtgrp 639 arch/x86/kernel/cpu/resctrl/rdtgroup.c static int rdtgroup_move_task(pid_t pid, struct rdtgroup *rdtgrp, rdtgrp 662 arch/x86/kernel/cpu/resctrl/rdtgroup.c ret = __rdtgroup_move_task(tsk, rdtgrp); rdtgrp 671 arch/x86/kernel/cpu/resctrl/rdtgroup.c struct rdtgroup *rdtgrp; rdtgrp 677 arch/x86/kernel/cpu/resctrl/rdtgroup.c rdtgrp = rdtgroup_kn_lock_live(of->kn); rdtgrp 678 arch/x86/kernel/cpu/resctrl/rdtgroup.c if (!rdtgrp) { rdtgrp 684 arch/x86/kernel/cpu/resctrl/rdtgroup.c if (rdtgrp->mode == RDT_MODE_PSEUDO_LOCKED || rdtgrp 685 arch/x86/kernel/cpu/resctrl/rdtgroup.c rdtgrp->mode == RDT_MODE_PSEUDO_LOCKSETUP) { rdtgrp 691 arch/x86/kernel/cpu/resctrl/rdtgroup.c ret = rdtgroup_move_task(pid, rdtgrp, of); rdtgrp 715 arch/x86/kernel/cpu/resctrl/rdtgroup.c struct rdtgroup *rdtgrp; rdtgrp 718 arch/x86/kernel/cpu/resctrl/rdtgroup.c rdtgrp = rdtgroup_kn_lock_live(of->kn); rdtgrp 719 arch/x86/kernel/cpu/resctrl/rdtgroup.c if (rdtgrp) rdtgrp 720 arch/x86/kernel/cpu/resctrl/rdtgroup.c show_rdt_tasks(rdtgrp, s); rdtgrp 955 arch/x86/kernel/cpu/resctrl/rdtgroup.c struct rdtgroup *rdtgrp; rdtgrp 957 arch/x86/kernel/cpu/resctrl/rdtgroup.c rdtgrp = rdtgroup_kn_lock_live(of->kn); rdtgrp 958 arch/x86/kernel/cpu/resctrl/rdtgroup.c if (!rdtgrp) { rdtgrp 963 arch/x86/kernel/cpu/resctrl/rdtgroup.c seq_printf(s, "%s\n", rdtgroup_mode_str(rdtgrp->mode)); rdtgrp 1143 arch/x86/kernel/cpu/resctrl/rdtgroup.c static bool rdtgroup_mode_test_exclusive(struct rdtgroup *rdtgrp) rdtgrp 1145 arch/x86/kernel/cpu/resctrl/rdtgroup.c int closid = rdtgrp->closid; rdtgrp 1156 arch/x86/kernel/cpu/resctrl/rdtgroup.c rdtgrp->closid, false)) { rdtgrp 1178 arch/x86/kernel/cpu/resctrl/rdtgroup.c struct rdtgroup *rdtgrp; rdtgrp 1187 arch/x86/kernel/cpu/resctrl/rdtgroup.c rdtgrp = rdtgroup_kn_lock_live(of->kn); rdtgrp 1188 arch/x86/kernel/cpu/resctrl/rdtgroup.c if (!rdtgrp) { rdtgrp 1195 arch/x86/kernel/cpu/resctrl/rdtgroup.c mode = rdtgrp->mode; rdtgrp 1211 arch/x86/kernel/cpu/resctrl/rdtgroup.c if (rdtgrp->mode == RDT_MODE_PSEUDO_LOCKSETUP) { rdtgrp 1212 arch/x86/kernel/cpu/resctrl/rdtgroup.c ret = rdtgroup_locksetup_exit(rdtgrp); rdtgrp 1216 arch/x86/kernel/cpu/resctrl/rdtgroup.c rdtgrp->mode = RDT_MODE_SHAREABLE; rdtgrp 1218 arch/x86/kernel/cpu/resctrl/rdtgroup.c if (!rdtgroup_mode_test_exclusive(rdtgrp)) { rdtgrp 1222 arch/x86/kernel/cpu/resctrl/rdtgroup.c if (rdtgrp->mode == RDT_MODE_PSEUDO_LOCKSETUP) { rdtgrp 1223 arch/x86/kernel/cpu/resctrl/rdtgroup.c ret = rdtgroup_locksetup_exit(rdtgrp); rdtgrp 1227 arch/x86/kernel/cpu/resctrl/rdtgroup.c rdtgrp->mode = RDT_MODE_EXCLUSIVE; rdtgrp 1229 arch/x86/kernel/cpu/resctrl/rdtgroup.c ret = rdtgroup_locksetup_enter(rdtgrp); rdtgrp 1232 arch/x86/kernel/cpu/resctrl/rdtgroup.c rdtgrp->mode = RDT_MODE_PSEUDO_LOCKSETUP; rdtgrp 1287 arch/x86/kernel/cpu/resctrl/rdtgroup.c struct rdtgroup *rdtgrp; rdtgrp 1295 arch/x86/kernel/cpu/resctrl/rdtgroup.c rdtgrp = rdtgroup_kn_lock_live(of->kn); rdtgrp 1296 arch/x86/kernel/cpu/resctrl/rdtgroup.c if (!rdtgrp) { rdtgrp 1301 arch/x86/kernel/cpu/resctrl/rdtgroup.c if (rdtgrp->mode == RDT_MODE_PSEUDO_LOCKED) { rdtgrp 1302 arch/x86/kernel/cpu/resctrl/rdtgroup.c if (!rdtgrp->plr->d) { rdtgrp 1308 arch/x86/kernel/cpu/resctrl/rdtgroup.c rdtgrp->plr->r->name); rdtgrp 1309 arch/x86/kernel/cpu/resctrl/rdtgroup.c size = rdtgroup_cbm_to_size(rdtgrp->plr->r, rdtgrp 1310 arch/x86/kernel/cpu/resctrl/rdtgroup.c rdtgrp->plr->d, rdtgrp 1311 arch/x86/kernel/cpu/resctrl/rdtgroup.c rdtgrp->plr->cbm); rdtgrp 1312 arch/x86/kernel/cpu/resctrl/rdtgroup.c seq_printf(s, "%d=%u\n", rdtgrp->plr->d->id, size); rdtgrp 1323 arch/x86/kernel/cpu/resctrl/rdtgroup.c if (rdtgrp->mode == RDT_MODE_PSEUDO_LOCKSETUP) { rdtgrp 1327 arch/x86/kernel/cpu/resctrl/rdtgroup.c d->ctrl_val[rdtgrp->closid] : rdtgrp 1328 arch/x86/kernel/cpu/resctrl/rdtgroup.c d->mbps_val[rdtgrp->closid]); rdtgrp 1898 arch/x86/kernel/cpu/resctrl/rdtgroup.c struct rdtgroup *rdtgrp = kernfs_to_rdtgroup(kn); rdtgrp 1900 arch/x86/kernel/cpu/resctrl/rdtgroup.c if (!rdtgrp) rdtgrp 1903 arch/x86/kernel/cpu/resctrl/rdtgroup.c atomic_inc(&rdtgrp->waitcount); rdtgrp 1909 arch/x86/kernel/cpu/resctrl/rdtgroup.c if (rdtgrp->flags & RDT_DELETED) rdtgrp 1912 arch/x86/kernel/cpu/resctrl/rdtgroup.c return rdtgrp; rdtgrp 1917 arch/x86/kernel/cpu/resctrl/rdtgroup.c struct rdtgroup *rdtgrp = kernfs_to_rdtgroup(kn); rdtgrp 1919 arch/x86/kernel/cpu/resctrl/rdtgroup.c if (!rdtgrp) rdtgrp 1924 arch/x86/kernel/cpu/resctrl/rdtgroup.c if (atomic_dec_and_test(&rdtgrp->waitcount) && rdtgrp 1925 arch/x86/kernel/cpu/resctrl/rdtgroup.c (rdtgrp->flags & RDT_DELETED)) { rdtgrp 1926 arch/x86/kernel/cpu/resctrl/rdtgroup.c if (rdtgrp->mode == RDT_MODE_PSEUDO_LOCKSETUP || rdtgrp 1927 arch/x86/kernel/cpu/resctrl/rdtgroup.c rdtgrp->mode == RDT_MODE_PSEUDO_LOCKED) rdtgrp 1928 arch/x86/kernel/cpu/resctrl/rdtgroup.c rdtgroup_pseudo_lock_remove(rdtgrp); rdtgrp 1930 arch/x86/kernel/cpu/resctrl/rdtgroup.c kernfs_put(rdtgrp->kn); rdtgrp 1931 arch/x86/kernel/cpu/resctrl/rdtgroup.c kfree(rdtgrp); rdtgrp 2212 arch/x86/kernel/cpu/resctrl/rdtgroup.c static void free_all_child_rdtgrp(struct rdtgroup *rdtgrp) rdtgrp 2217 arch/x86/kernel/cpu/resctrl/rdtgroup.c head = &rdtgrp->mon.crdtgrp_list; rdtgrp 2234 arch/x86/kernel/cpu/resctrl/rdtgroup.c struct rdtgroup *rdtgrp, *tmp; rdtgrp 2239 arch/x86/kernel/cpu/resctrl/rdtgroup.c list_for_each_entry_safe(rdtgrp, tmp, &rdt_all_groups, rdtgroup_list) { rdtgrp 2241 arch/x86/kernel/cpu/resctrl/rdtgroup.c free_all_child_rdtgrp(rdtgrp); rdtgrp 2244 arch/x86/kernel/cpu/resctrl/rdtgroup.c if (rdtgrp == &rdtgroup_default) rdtgrp 2247 arch/x86/kernel/cpu/resctrl/rdtgroup.c if (rdtgrp->mode == RDT_MODE_PSEUDO_LOCKSETUP || rdtgrp 2248 arch/x86/kernel/cpu/resctrl/rdtgroup.c rdtgrp->mode == RDT_MODE_PSEUDO_LOCKED) rdtgrp 2249 arch/x86/kernel/cpu/resctrl/rdtgroup.c rdtgroup_pseudo_lock_remove(rdtgrp); rdtgrp 2257 arch/x86/kernel/cpu/resctrl/rdtgroup.c &rdtgroup_default.cpu_mask, &rdtgrp->cpu_mask); rdtgrp 2259 arch/x86/kernel/cpu/resctrl/rdtgroup.c free_rmid(rdtgrp->mon.rmid); rdtgrp 2261 arch/x86/kernel/cpu/resctrl/rdtgroup.c kernfs_remove(rdtgrp->kn); rdtgrp 2262 arch/x86/kernel/cpu/resctrl/rdtgroup.c list_del(&rdtgrp->rdtgroup_list); rdtgrp 2264 arch/x86/kernel/cpu/resctrl/rdtgroup.c if (atomic_read(&rdtgrp->waitcount) != 0) rdtgrp 2265 arch/x86/kernel/cpu/resctrl/rdtgroup.c rdtgrp->flags = RDT_DELETED; rdtgrp 2267 arch/x86/kernel/cpu/resctrl/rdtgroup.c kfree(rdtgrp); rdtgrp 2632 arch/x86/kernel/cpu/resctrl/rdtgroup.c static int rdtgroup_init_alloc(struct rdtgroup *rdtgrp) rdtgrp 2641 arch/x86/kernel/cpu/resctrl/rdtgroup.c ret = rdtgroup_init_cat(r, rdtgrp->closid); rdtgrp 2646 arch/x86/kernel/cpu/resctrl/rdtgroup.c ret = update_domains(r, rdtgrp->closid); rdtgrp 2654 arch/x86/kernel/cpu/resctrl/rdtgroup.c rdtgrp->mode = RDT_MODE_SHAREABLE; rdtgrp 2664 arch/x86/kernel/cpu/resctrl/rdtgroup.c struct rdtgroup *prdtgrp, *rdtgrp; rdtgrp 2684 arch/x86/kernel/cpu/resctrl/rdtgroup.c rdtgrp = kzalloc(sizeof(*rdtgrp), GFP_KERNEL); rdtgrp 2685 arch/x86/kernel/cpu/resctrl/rdtgroup.c if (!rdtgrp) { rdtgrp 2690 arch/x86/kernel/cpu/resctrl/rdtgroup.c *r = rdtgrp; rdtgrp 2691 arch/x86/kernel/cpu/resctrl/rdtgroup.c rdtgrp->mon.parent = prdtgrp; rdtgrp 2692 arch/x86/kernel/cpu/resctrl/rdtgroup.c rdtgrp->type = rtype; rdtgrp 2693 arch/x86/kernel/cpu/resctrl/rdtgroup.c INIT_LIST_HEAD(&rdtgrp->mon.crdtgrp_list); rdtgrp 2696 arch/x86/kernel/cpu/resctrl/rdtgroup.c kn = kernfs_create_dir(parent_kn, name, mode, rdtgrp); rdtgrp 2702 arch/x86/kernel/cpu/resctrl/rdtgroup.c rdtgrp->kn = kn; rdtgrp 2731 arch/x86/kernel/cpu/resctrl/rdtgroup.c rdtgrp->mon.rmid = ret; rdtgrp 2733 arch/x86/kernel/cpu/resctrl/rdtgroup.c ret = mkdir_mondata_all(kn, rdtgrp, &rdtgrp->mon.mon_data_kn); rdtgrp 2747 arch/x86/kernel/cpu/resctrl/rdtgroup.c free_rmid(rdtgrp->mon.rmid); rdtgrp 2749 arch/x86/kernel/cpu/resctrl/rdtgroup.c kernfs_remove(rdtgrp->kn); rdtgrp 2751 arch/x86/kernel/cpu/resctrl/rdtgroup.c kfree(rdtgrp); rdtgrp 2774 arch/x86/kernel/cpu/resctrl/rdtgroup.c struct rdtgroup *rdtgrp, *prgrp; rdtgrp 2778 arch/x86/kernel/cpu/resctrl/rdtgroup.c &rdtgrp); rdtgrp 2782 arch/x86/kernel/cpu/resctrl/rdtgroup.c prgrp = rdtgrp->mon.parent; rdtgrp 2783 arch/x86/kernel/cpu/resctrl/rdtgroup.c rdtgrp->closid = prgrp->closid; rdtgrp 2789 arch/x86/kernel/cpu/resctrl/rdtgroup.c list_add_tail(&rdtgrp->mon.crdtgrp_list, &prgrp->mon.crdtgrp_list); rdtgrp 2803 arch/x86/kernel/cpu/resctrl/rdtgroup.c struct rdtgroup *rdtgrp; rdtgrp 2809 arch/x86/kernel/cpu/resctrl/rdtgroup.c &rdtgrp); rdtgrp 2813 arch/x86/kernel/cpu/resctrl/rdtgroup.c kn = rdtgrp->kn; rdtgrp 2822 arch/x86/kernel/cpu/resctrl/rdtgroup.c rdtgrp->closid = closid; rdtgrp 2823 arch/x86/kernel/cpu/resctrl/rdtgroup.c ret = rdtgroup_init_alloc(rdtgrp); rdtgrp 2827 arch/x86/kernel/cpu/resctrl/rdtgroup.c list_add(&rdtgrp->rdtgroup_list, &rdt_all_groups); rdtgrp 2834 arch/x86/kernel/cpu/resctrl/rdtgroup.c ret = mongroup_create_dir(kn, rdtgrp, "mon_groups", NULL); rdtgrp 2844 arch/x86/kernel/cpu/resctrl/rdtgroup.c list_del(&rdtgrp->rdtgroup_list); rdtgrp 2848 arch/x86/kernel/cpu/resctrl/rdtgroup.c mkdir_rdt_prepare_clean(rdtgrp); rdtgrp 2895 arch/x86/kernel/cpu/resctrl/rdtgroup.c static int rdtgroup_rmdir_mon(struct kernfs_node *kn, struct rdtgroup *rdtgrp, rdtgrp 2898 arch/x86/kernel/cpu/resctrl/rdtgroup.c struct rdtgroup *prdtgrp = rdtgrp->mon.parent; rdtgrp 2902 arch/x86/kernel/cpu/resctrl/rdtgroup.c rdt_move_group_tasks(rdtgrp, prdtgrp, tmpmask); rdtgrp 2905 arch/x86/kernel/cpu/resctrl/rdtgroup.c for_each_cpu(cpu, &rdtgrp->cpu_mask) rdtgrp 2911 arch/x86/kernel/cpu/resctrl/rdtgroup.c cpumask_or(tmpmask, tmpmask, &rdtgrp->cpu_mask); rdtgrp 2914 arch/x86/kernel/cpu/resctrl/rdtgroup.c rdtgrp->flags = RDT_DELETED; rdtgrp 2915 arch/x86/kernel/cpu/resctrl/rdtgroup.c free_rmid(rdtgrp->mon.rmid); rdtgrp 2921 arch/x86/kernel/cpu/resctrl/rdtgroup.c list_del(&rdtgrp->mon.crdtgrp_list); rdtgrp 2928 arch/x86/kernel/cpu/resctrl/rdtgroup.c kernfs_remove(rdtgrp->kn); rdtgrp 2934 arch/x86/kernel/cpu/resctrl/rdtgroup.c struct rdtgroup *rdtgrp) rdtgrp 2936 arch/x86/kernel/cpu/resctrl/rdtgroup.c rdtgrp->flags = RDT_DELETED; rdtgrp 2937 arch/x86/kernel/cpu/resctrl/rdtgroup.c list_del(&rdtgrp->rdtgroup_list); rdtgrp 2944 arch/x86/kernel/cpu/resctrl/rdtgroup.c kernfs_remove(rdtgrp->kn); rdtgrp 2948 arch/x86/kernel/cpu/resctrl/rdtgroup.c static int rdtgroup_rmdir_ctrl(struct kernfs_node *kn, struct rdtgroup *rdtgrp, rdtgrp 2954 arch/x86/kernel/cpu/resctrl/rdtgroup.c rdt_move_group_tasks(rdtgrp, &rdtgroup_default, tmpmask); rdtgrp 2958 arch/x86/kernel/cpu/resctrl/rdtgroup.c &rdtgroup_default.cpu_mask, &rdtgrp->cpu_mask); rdtgrp 2961 arch/x86/kernel/cpu/resctrl/rdtgroup.c for_each_cpu(cpu, &rdtgrp->cpu_mask) { rdtgrp 2970 arch/x86/kernel/cpu/resctrl/rdtgroup.c cpumask_or(tmpmask, tmpmask, &rdtgrp->cpu_mask); rdtgrp 2973 arch/x86/kernel/cpu/resctrl/rdtgroup.c closid_free(rdtgrp->closid); rdtgrp 2974 arch/x86/kernel/cpu/resctrl/rdtgroup.c free_rmid(rdtgrp->mon.rmid); rdtgrp 2976 arch/x86/kernel/cpu/resctrl/rdtgroup.c rdtgroup_ctrl_remove(kn, rdtgrp); rdtgrp 2981 arch/x86/kernel/cpu/resctrl/rdtgroup.c free_all_child_rdtgrp(rdtgrp); rdtgrp 2989 arch/x86/kernel/cpu/resctrl/rdtgroup.c struct rdtgroup *rdtgrp; rdtgrp 2996 arch/x86/kernel/cpu/resctrl/rdtgroup.c rdtgrp = rdtgroup_kn_lock_live(kn); rdtgrp 2997 arch/x86/kernel/cpu/resctrl/rdtgroup.c if (!rdtgrp) { rdtgrp 3009 arch/x86/kernel/cpu/resctrl/rdtgroup.c if (rdtgrp->type == RDTCTRL_GROUP && parent_kn == rdtgroup_default.kn && rdtgrp 3010 arch/x86/kernel/cpu/resctrl/rdtgroup.c rdtgrp != &rdtgroup_default) { rdtgrp 3011 arch/x86/kernel/cpu/resctrl/rdtgroup.c if (rdtgrp->mode == RDT_MODE_PSEUDO_LOCKSETUP || rdtgrp 3012 arch/x86/kernel/cpu/resctrl/rdtgroup.c rdtgrp->mode == RDT_MODE_PSEUDO_LOCKED) { rdtgrp 3013 arch/x86/kernel/cpu/resctrl/rdtgroup.c ret = rdtgroup_ctrl_remove(kn, rdtgrp); rdtgrp 3015 arch/x86/kernel/cpu/resctrl/rdtgroup.c ret = rdtgroup_rmdir_ctrl(kn, rdtgrp, tmpmask); rdtgrp 3017 arch/x86/kernel/cpu/resctrl/rdtgroup.c } else if (rdtgrp->type == RDTMON_GROUP && rdtgrp 3019 arch/x86/kernel/cpu/resctrl/rdtgroup.c ret = rdtgroup_rmdir_mon(kn, rdtgrp, tmpmask);