Lines Matching refs:rr

360 static int __mon_event_count(u32 closid, u32 rmid, struct rmid_read *rr)  in __mon_event_count()  argument
369 if (rr->first) { in __mon_event_count()
370 resctrl_arch_reset_rmid(rr->r, rr->d, closid, rmid, rr->evtid); in __mon_event_count()
371 m = get_mbm_state(rr->d, closid, rmid, rr->evtid); in __mon_event_count()
377 if (rr->d) { in __mon_event_count()
379 if (!cpumask_test_cpu(cpu, &rr->d->hdr.cpu_mask)) in __mon_event_count()
381 rr->err = resctrl_arch_rmid_read(rr->r, rr->d, closid, rmid, in __mon_event_count()
382 rr->evtid, &tval, rr->arch_mon_ctx); in __mon_event_count()
383 if (rr->err) in __mon_event_count()
384 return rr->err; in __mon_event_count()
386 rr->val += tval; in __mon_event_count()
393 if (!ci || ci->id != rr->ci_id) in __mon_event_count()
404 list_for_each_entry(d, &rr->r->mon_domains, hdr.list) { in __mon_event_count()
405 if (d->ci_id != rr->ci_id) in __mon_event_count()
407 err = resctrl_arch_rmid_read(rr->r, d, closid, rmid, in __mon_event_count()
408 rr->evtid, &tval, rr->arch_mon_ctx); in __mon_event_count()
410 rr->val += tval; in __mon_event_count()
416 rr->err = ret; in __mon_event_count()
433 static void mbm_bw_count(u32 closid, u32 rmid, struct rmid_read *rr) in mbm_bw_count() argument
438 m = get_mbm_state(rr->d, closid, rmid, rr->evtid); in mbm_bw_count()
442 cur_bytes = rr->val; in mbm_bw_count()
458 struct rmid_read *rr = info; in mon_event_count() local
462 rdtgrp = rr->rgrp; in mon_event_count()
464 ret = __mon_event_count(rdtgrp->closid, rdtgrp->mon.rmid, rr); in mon_event_count()
476 rr) == 0) in mon_event_count()
487 rr->err = 0; in mon_event_count()
609 struct rmid_read rr = {0}; in mbm_update_one_event() local
611 rr.r = r; in mbm_update_one_event()
612 rr.d = d; in mbm_update_one_event()
613 rr.evtid = evtid; in mbm_update_one_event()
614 rr.arch_mon_ctx = resctrl_arch_mon_ctx_alloc(rr.r, rr.evtid); in mbm_update_one_event()
615 if (IS_ERR(rr.arch_mon_ctx)) { in mbm_update_one_event()
617 PTR_ERR(rr.arch_mon_ctx)); in mbm_update_one_event()
621 __mon_event_count(closid, rmid, &rr); in mbm_update_one_event()
628 mbm_bw_count(closid, rmid, &rr); in mbm_update_one_event()
630 resctrl_arch_mon_ctx_free(rr.r, rr.evtid, rr.arch_mon_ctx); in mbm_update_one_event()