Lines Matching refs:rmid
28 u32 rmid; member
130 static inline u64 get_corrected_mbm_count(u32 rmid, unsigned long val) in get_corrected_mbm_count() argument
133 if (rmid > mbm_cf_rmidthreshold) in get_corrected_mbm_count()
139 static inline struct rmid_entry *__rmid_entry(u32 rmid) in __rmid_entry() argument
143 entry = &rmid_ptrs[rmid]; in __rmid_entry()
144 WARN_ON(entry->rmid != rmid); in __rmid_entry()
149 static int __rmid_read(u32 rmid, enum resctrl_event_id eventid, u64 *val) in __rmid_read() argument
161 wrmsr(MSR_IA32_QM_EVTSEL, eventid, rmid); in __rmid_read()
174 u32 rmid, in get_arch_mbm_state() argument
181 return &hw_dom->arch_mbm_total[rmid]; in get_arch_mbm_state()
183 return &hw_dom->arch_mbm_local[rmid]; in get_arch_mbm_state()
193 u32 rmid, enum resctrl_event_id eventid) in resctrl_arch_reset_rmid() argument
198 am = get_arch_mbm_state(hw_dom, rmid, eventid); in resctrl_arch_reset_rmid()
203 __rmid_read(rmid, eventid, &am->prev_msr); in resctrl_arch_reset_rmid()
216 u32 rmid, enum resctrl_event_id eventid, u64 *val) in resctrl_arch_rmid_read() argument
227 ret = __rmid_read(rmid, eventid, &msr_val); in resctrl_arch_rmid_read()
231 am = get_arch_mbm_state(hw_dom, rmid, eventid); in resctrl_arch_rmid_read()
235 chunks = get_corrected_mbm_count(rmid, am->chunks); in resctrl_arch_rmid_read()
273 if (resctrl_arch_rmid_read(r, d, entry->rmid, in __check_limbo()
281 clear_bit(entry->rmid, d->rmid_busy_llc); in __check_limbo()
314 return entry->rmid; in alloc_rmid()
328 err = resctrl_arch_rmid_read(r, d, entry->rmid, in add_rmid_to_limbo()
341 set_bit(entry->rmid, d->rmid_busy_llc); in add_rmid_to_limbo()
352 void free_rmid(u32 rmid) in free_rmid() argument
356 if (!rmid) in free_rmid()
361 entry = __rmid_entry(rmid); in free_rmid()
369 static int __mon_event_count(u32 rmid, struct rmid_read *rr) in __mon_event_count() argument
375 resctrl_arch_reset_rmid(rr->r, rr->d, rmid, rr->evtid); in __mon_event_count()
377 rr->err = resctrl_arch_rmid_read(rr->r, rr->d, rmid, rr->evtid, &tval); in __mon_event_count()
386 m = &rr->d->mbm_total[rmid]; in __mon_event_count()
389 m = &rr->d->mbm_local[rmid]; in __mon_event_count()
420 static void mbm_bw_count(u32 rmid, struct rmid_read *rr) in mbm_bw_count() argument
422 struct mbm_state *m = &rr->d->mbm_local[rmid]; in mbm_bw_count()
450 ret = __mon_event_count(rdtgrp->mon.rmid, rr); in mon_event_count()
461 if (__mon_event_count(entry->mon.rmid, rr) == 0) in mon_event_count()
509 u32 closid, rmid, cur_msr_val, new_msr_val; in update_mba_bw() local
523 rmid = rgrp->mon.rmid; in update_mba_bw()
524 pmbm_data = &dom_mbm->mbm_local[rmid]; in update_mba_bw()
544 cmbm_data = &dom_mbm->mbm_local[entry->mon.rmid]; in update_mba_bw()
586 cmbm_data = &dom_mbm->mbm_local[entry->mon.rmid]; in update_mba_bw()
591 static void mbm_update(struct rdt_resource *r, struct rdt_domain *d, int rmid) in mbm_update() argument
606 __mon_event_count(rmid, &rr); in mbm_update()
611 __mon_event_count(rmid, &rr); in mbm_update()
619 mbm_bw_count(rmid, &rr); in mbm_update()
676 mbm_update(r, d, prgrp->mon.rmid); in mbm_handle_overflow()
680 mbm_update(r, d, crgrp->mon.rmid); in mbm_handle_overflow()
718 entry->rmid = i; in dom_data_init()