Lines Matching defs:rr
549 static int __mon_event_count(u32 closid, u32 rmid, struct rmid_read *rr)
554 if (rr->first) {
555 resctrl_arch_reset_rmid(rr->r, rr->d, closid, rmid, rr->evtid);
556 m = get_mbm_state(rr->d, closid, rmid, rr->evtid);
562 rr->err = resctrl_arch_rmid_read(rr->r, rr->d, closid, rmid, rr->evtid,
563 &tval, rr->arch_mon_ctx);
564 if (rr->err)
565 return rr->err;
567 rr->val += tval;
577 * @rr: The struct rmid_read populated by __mon_event_count().
584 static void mbm_bw_count(u32 closid, u32 rmid, struct rmid_read *rr)
587 struct mbm_state *m = &rr->d->mbm_local[idx];
590 cur_bytes = rr->val;
606 struct rmid_read *rr = info;
610 rdtgrp = rr->rgrp;
612 ret = __mon_event_count(rdtgrp->closid, rdtgrp->mon.rmid, rr);
624 rr) == 0)
635 rr->err = 0;
739 struct rmid_read rr;
741 rr.first = false;
742 rr.r = r;
743 rr.d = d;
750 rr.evtid = QOS_L3_MBM_TOTAL_EVENT_ID;
751 rr.val = 0;
752 rr.arch_mon_ctx = resctrl_arch_mon_ctx_alloc(rr.r, rr.evtid);
753 if (IS_ERR(rr.arch_mon_ctx)) {
755 PTR_ERR(rr.arch_mon_ctx));
759 __mon_event_count(closid, rmid, &rr);
761 resctrl_arch_mon_ctx_free(rr.r, rr.evtid, rr.arch_mon_ctx);
764 rr.evtid = QOS_L3_MBM_LOCAL_EVENT_ID;
765 rr.val = 0;
766 rr.arch_mon_ctx = resctrl_arch_mon_ctx_alloc(rr.r, rr.evtid);
767 if (IS_ERR(rr.arch_mon_ctx)) {
769 PTR_ERR(rr.arch_mon_ctx));
773 __mon_event_count(closid, rmid, &rr);
781 mbm_bw_count(closid, rmid, &rr);
783 resctrl_arch_mon_ctx_free(rr.r, rr.evtid, rr.arch_mon_ctx);