From cdb9ebc9178461c27d618bb1238e851da17271de Mon Sep 17 00:00:00 2001 From: James Morse Date: Wed, 28 Jul 2021 17:06:16 +0000 Subject: x86/resctrl: Add a separate schema list for resctrl Resctrl exposes schemata to user-space, which allow the control values to be specified for a group of tasks. User-visible properties of the interface, (such as the schemata names and how the values are parsed) are rooted in a struct provided by the architecture code. (struct rdt_hw_resource). Once a second architecture uses resctrl, this would allow user-visible properties to diverge between architectures. These properties should come from the resctrl code that will be common to all architectures. Resctrl has no per-schema structure, only struct rdt_{hw_,}resource. Create a struct resctrl_schema to hold the rdt_resource. Before a second architecture can be supported, this structure will also need to hold the schema name visible to user-space and the type of configuration values for resctrl. Signed-off-by: James Morse Signed-off-by: Borislav Petkov Reviewed-by: Jamie Iles Reviewed-by: Reinette Chatre Tested-by: Babu Moger Link: https://lkml.kernel.org/r/20210728170637.25610-4-james.morse@arm.com --- include/linux/resctrl.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'include/linux') diff --git a/include/linux/resctrl.h b/include/linux/resctrl.h index a4c89dafd7fa..5a21d483da6a 100644 --- a/include/linux/resctrl.h +++ b/include/linux/resctrl.h @@ -153,4 +153,15 @@ struct rdt_resource { }; +/** + * struct resctrl_schema - configuration abilities of a resource presented to + * user-space + * @list: Member of resctrl_schema_all. + * @res: The resource structure exported by the architecture to describe + * the hardware that is configured by this schema. + */ +struct resctrl_schema { + struct list_head list; + struct rdt_resource *res; +}; #endif /* _RESCTRL_H */ -- cgit v1.2.3