resctrl_schema holds properties that vary with the style of configuration
that resctrl applies to a resource.
Once the arch code has a single resource per cache that can be configured,
resctrl will need to keep track of the num_closid itself.
Add num_closid to resctrl_schema. Change callers like
rdtgroup_schemata_show() to walk the schema instead.
Signed-off-by: James Morse <james.morse@xxxxxxx>
---
arch/x86/kernel/cpu/resctrl/ctrlmondata.c | 13 ++++++++-----
arch/x86/kernel/cpu/resctrl/rdtgroup.c | 11 +++++------
include/linux/resctrl.h | 2 ++
3 files changed, 15 insertions(+), 11 deletions(-)
diff --git a/include/linux/resctrl.h b/include/linux/resctrl.h
index de6cbc725753..b32152968bca 100644
--- a/include/linux/resctrl.h
+++ b/include/linux/resctrl.h
@@ -166,10 +166,12 @@ struct rdt_resource {
/**
* @list: Member of resctrl's schema list
* @res: The rdt_resource for this entry
+ * @num_closid Number of CLOSIDs available for this resource
*/
struct resctrl_schema {
struct list_head list;
struct rdt_resource *res;
+ u32 num_closid;
};
/* The number of closid supported by this resource regardless of CDP */