@@ -109,7 +109,7 @@ static inline u64 get_corrected_mbm_count(u32 rmid, unsigned long val)
109109 *
110110 * In RMID sharing mode there are fewer "logical RMID" values available
111111 * to accumulate data ("physical RMIDs" are divided evenly between SNC
112- * nodes that share an L3 cache). Linux creates an rdt_mon_domain for
112+ * nodes that share an L3 cache). Linux creates an rdt_l3_mon_domain for
113113 * each SNC node.
114114 *
115115 * The value loaded into IA32_PQR_ASSOC is the "logical RMID".
@@ -157,7 +157,7 @@ static int __rmid_read_phys(u32 prmid, enum resctrl_event_id eventid, u64 *val)
157157 return 0 ;
158158}
159159
160- static struct arch_mbm_state * get_arch_mbm_state (struct rdt_hw_mon_domain * hw_dom ,
160+ static struct arch_mbm_state * get_arch_mbm_state (struct rdt_hw_l3_mon_domain * hw_dom ,
161161 u32 rmid ,
162162 enum resctrl_event_id eventid )
163163{
@@ -171,11 +171,11 @@ static struct arch_mbm_state *get_arch_mbm_state(struct rdt_hw_mon_domain *hw_do
171171 return state ? & state [rmid ] : NULL ;
172172}
173173
174- void resctrl_arch_reset_rmid (struct rdt_resource * r , struct rdt_mon_domain * d ,
174+ void resctrl_arch_reset_rmid (struct rdt_resource * r , struct rdt_l3_mon_domain * d ,
175175 u32 unused , u32 rmid ,
176176 enum resctrl_event_id eventid )
177177{
178- struct rdt_hw_mon_domain * hw_dom = resctrl_to_arch_mon_dom (d );
178+ struct rdt_hw_l3_mon_domain * hw_dom = resctrl_to_arch_mon_dom (d );
179179 int cpu = cpumask_any (& d -> hdr .cpu_mask );
180180 struct arch_mbm_state * am ;
181181 u32 prmid ;
@@ -194,9 +194,9 @@ void resctrl_arch_reset_rmid(struct rdt_resource *r, struct rdt_mon_domain *d,
194194 * Assumes that hardware counters are also reset and thus that there is
195195 * no need to record initial non-zero counts.
196196 */
197- void resctrl_arch_reset_rmid_all (struct rdt_resource * r , struct rdt_mon_domain * d )
197+ void resctrl_arch_reset_rmid_all (struct rdt_resource * r , struct rdt_l3_mon_domain * d )
198198{
199- struct rdt_hw_mon_domain * hw_dom = resctrl_to_arch_mon_dom (d );
199+ struct rdt_hw_l3_mon_domain * hw_dom = resctrl_to_arch_mon_dom (d );
200200 enum resctrl_event_id eventid ;
201201 int idx ;
202202
@@ -217,10 +217,10 @@ static u64 mbm_overflow_count(u64 prev_msr, u64 cur_msr, unsigned int width)
217217 return chunks >> shift ;
218218}
219219
220- static u64 get_corrected_val (struct rdt_resource * r , struct rdt_mon_domain * d ,
220+ static u64 get_corrected_val (struct rdt_resource * r , struct rdt_l3_mon_domain * d ,
221221 u32 rmid , enum resctrl_event_id eventid , u64 msr_val )
222222{
223- struct rdt_hw_mon_domain * hw_dom = resctrl_to_arch_mon_dom (d );
223+ struct rdt_hw_l3_mon_domain * hw_dom = resctrl_to_arch_mon_dom (d );
224224 struct rdt_hw_resource * hw_res = resctrl_to_arch_res (r );
225225 struct arch_mbm_state * am ;
226226 u64 chunks ;
@@ -242,9 +242,9 @@ int resctrl_arch_rmid_read(struct rdt_resource *r, struct rdt_domain_hdr *hdr,
242242 u32 unused , u32 rmid , enum resctrl_event_id eventid ,
243243 u64 * val , void * ignored )
244244{
245- struct rdt_hw_mon_domain * hw_dom ;
245+ struct rdt_hw_l3_mon_domain * hw_dom ;
246+ struct rdt_l3_mon_domain * d ;
246247 struct arch_mbm_state * am ;
247- struct rdt_mon_domain * d ;
248248 u64 msr_val ;
249249 u32 prmid ;
250250 int cpu ;
@@ -254,7 +254,7 @@ int resctrl_arch_rmid_read(struct rdt_resource *r, struct rdt_domain_hdr *hdr,
254254 if (!domain_header_is_valid (hdr , RESCTRL_MON_DOMAIN , RDT_RESOURCE_L3 ))
255255 return - EINVAL ;
256256
257- d = container_of (hdr , struct rdt_mon_domain , hdr );
257+ d = container_of (hdr , struct rdt_l3_mon_domain , hdr );
258258 hw_dom = resctrl_to_arch_mon_dom (d );
259259 cpu = cpumask_any (& hdr -> cpu_mask );
260260 prmid = logical_rmid_to_physical_rmid (cpu , rmid );
@@ -308,11 +308,11 @@ static int __cntr_id_read(u32 cntr_id, u64 *val)
308308 return 0 ;
309309}
310310
311- void resctrl_arch_reset_cntr (struct rdt_resource * r , struct rdt_mon_domain * d ,
311+ void resctrl_arch_reset_cntr (struct rdt_resource * r , struct rdt_l3_mon_domain * d ,
312312 u32 unused , u32 rmid , int cntr_id ,
313313 enum resctrl_event_id eventid )
314314{
315- struct rdt_hw_mon_domain * hw_dom = resctrl_to_arch_mon_dom (d );
315+ struct rdt_hw_l3_mon_domain * hw_dom = resctrl_to_arch_mon_dom (d );
316316 struct arch_mbm_state * am ;
317317
318318 am = get_arch_mbm_state (hw_dom , rmid , eventid );
@@ -324,7 +324,7 @@ void resctrl_arch_reset_cntr(struct rdt_resource *r, struct rdt_mon_domain *d,
324324 }
325325}
326326
327- int resctrl_arch_cntr_read (struct rdt_resource * r , struct rdt_mon_domain * d ,
327+ int resctrl_arch_cntr_read (struct rdt_resource * r , struct rdt_l3_mon_domain * d ,
328328 u32 unused , u32 rmid , int cntr_id ,
329329 enum resctrl_event_id eventid , u64 * val )
330330{
@@ -354,7 +354,7 @@ int resctrl_arch_cntr_read(struct rdt_resource *r, struct rdt_mon_domain *d,
354354 * must adjust RMID counter numbers based on SNC node. See
355355 * logical_rmid_to_physical_rmid() for code that does this.
356356 */
357- void arch_mon_domain_online (struct rdt_resource * r , struct rdt_mon_domain * d )
357+ void arch_mon_domain_online (struct rdt_resource * r , struct rdt_l3_mon_domain * d )
358358{
359359 if (snc_nodes_per_l3_cache > 1 )
360360 msr_clear_bit (MSR_RMID_SNC_CONFIG , 0 );
@@ -516,7 +516,7 @@ static void resctrl_abmc_set_one_amd(void *arg)
516516 */
517517static void _resctrl_abmc_enable (struct rdt_resource * r , bool enable )
518518{
519- struct rdt_mon_domain * d ;
519+ struct rdt_l3_mon_domain * d ;
520520
521521 lockdep_assert_cpus_held ();
522522
@@ -555,11 +555,11 @@ static void resctrl_abmc_config_one_amd(void *info)
555555/*
556556 * Send an IPI to the domain to assign the counter to RMID, event pair.
557557 */
558- void resctrl_arch_config_cntr (struct rdt_resource * r , struct rdt_mon_domain * d ,
558+ void resctrl_arch_config_cntr (struct rdt_resource * r , struct rdt_l3_mon_domain * d ,
559559 enum resctrl_event_id evtid , u32 rmid , u32 closid ,
560560 u32 cntr_id , bool assign )
561561{
562- struct rdt_hw_mon_domain * hw_dom = resctrl_to_arch_mon_dom (d );
562+ struct rdt_hw_l3_mon_domain * hw_dom = resctrl_to_arch_mon_dom (d );
563563 union l3_qos_abmc_cfg abmc_cfg = { 0 };
564564 struct arch_mbm_state * am ;
565565
0 commit comments