[RFC PATCH 07/17] x86/resctrl: Prepare for resource specific event ids

Tony Luck posted 17 patches 11 months, 1 week ago
There is a newer version of this series
[RFC PATCH 07/17] x86/resctrl: Prepare for resource specific event ids
Posted by Tony Luck 11 months, 1 week 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>
---
 arch/x86/kernel/cpu/resctrl/internal.h | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/arch/x86/kernel/cpu/resctrl/internal.h b/arch/x86/kernel/cpu/resctrl/internal.h
index b8f37170f6e5..c8da6fac4720 100644
--- a/arch/x86/kernel/cpu/resctrl/internal.h
+++ b/arch/x86/kernel/cpu/resctrl/internal.h
@@ -114,13 +114,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;
@@ -131,7 +131,7 @@ struct mon_evt {
  * @priv:              Used to store monitoring event data in @u
  *                     as kernfs private data.
  * @u.rid:             Resource id associated with the event file.
- * @u.evtid:           Event id associated with the event file.
+ * @u.evtid:           Per resource event id associated with the event file.
  * @u.sum:             Set when event must be summed across multiple
  *                     domains.
  * @u.domid:           When @u.sum is zero this is the domain to which
@@ -143,10 +143,10 @@ struct mon_evt {
 union mon_data_bits {
 	void *priv;
 	struct {
-		unsigned int rid		: 10;
-		enum resctrl_event_id evtid	: 7;
-		unsigned int sum		: 1;
-		unsigned int domid		: 14;
+		unsigned int rid	: 10;
+		unsigned int evtid	: 7;
+		unsigned int sum	: 1;
+		unsigned int domid	: 14;
 	} u;
 };
 
-- 
2.48.1