[PATCH v2 06/16] x86/resctrl: Prepare for resource specific event ids

Tony Luck posted 16 patches 10 months, 3 weeks ago
There is a newer version of this series
[PATCH v2 06/16] x86/resctrl: Prepare for resource specific event ids
Posted by Tony Luck 10 months, 3 weeks ago
Event ids ought to be specific to each resource. Keep enum resctrl_event_id
for event ids in the RDT_RESOURCE_L3. But change the type in generic
areas to unsigned int so that new resources can have their own event
ids.

Signed-off-by: Tony Luck <tony.luck@intel.com>
---
 fs/resctrl/internal.h | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/fs/resctrl/internal.h b/fs/resctrl/internal.h
index 3a100007301d..422f36573db7 100644
--- a/fs/resctrl/internal.h
+++ b/fs/resctrl/internal.h
@@ -69,13 +69,13 @@ static inline struct rdt_fs_context *rdt_fc2context(struct fs_context *fc)
 
 /**
  * struct mon_evt - Entry in the event list of a resource
- * @evtid:		event id
+ * @evtid:		per resource event id
  * @name:		name of the event
  * @configurable:	true if the event is configurable
  * @list:		entry in &rdt_resource->evt_list
  */
 struct mon_evt {
-	enum resctrl_event_id	evtid;
+	unsigned int		evtid;
 	char			*name;
 	bool			configurable;
 	struct list_head	list;
@@ -84,7 +84,7 @@ struct mon_evt {
 /**
  * struct mon_data - Monitoring details for each event file.
  * @rid:             Resource id associated with the event file.
- * @evtid:           Event id associated with the event file.
+ * @evtid:           Per resource event id associated with the event file.
  * @sum:             Set when event must be summed across multiple
  *                   domains.
  * @domid:           When @sum is zero this is the domain to which
@@ -97,7 +97,7 @@ struct mon_evt {
  */
 struct mon_data {
 	unsigned int rid;
-	enum resctrl_event_id evtid;
+	unsigned int evtid;
 	unsigned int sum;
 	unsigned int domid;
 };
@@ -124,7 +124,7 @@ struct rmid_read {
 	struct rdtgroup		*rgrp;
 	struct rdt_resource	*r;
 	struct rdt_mon_domain	*d;
-	enum resctrl_event_id	evtid;
+	unsigned int		evtid;
 	bool			first;
 	struct cacheinfo	*ci;
 	int			err;
-- 
2.48.1