From 1c290682c0c9c47aa7594ffc83b9cedd20c1ec87 Mon Sep 17 00:00:00 2001 From: James Morse Date: Wed, 28 Jul 2021 17:06:22 +0000 Subject: x86/resctrl: Pass the schema to resctrl filesystem functions Once the CDP resources are merged, there will be two struct resctrl_schema for one struct rdt_resource. CDP becomes a type of configuration that belongs to the schema. Helpers like rdtgroup_cbm_overlaps() need access to the schema to query the configuration (or configurations) based on schema properties. Change these functions to take a struct schema instead of the struct rdt_resource. All the modified functions are part of the filesystem code that will move to /fs/resctrl once it is possible to support a second architecture. 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-10-james.morse@arm.com --- include/linux/resctrl.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include/linux/resctrl.h') diff --git a/include/linux/resctrl.h b/include/linux/resctrl.h index b9d200592e54..979592c869e6 100644 --- a/include/linux/resctrl.h +++ b/include/linux/resctrl.h @@ -121,6 +121,7 @@ struct resctrl_membw { }; struct rdt_parse_data; +struct resctrl_schema; /** * struct rdt_resource - attributes of a resctrl resource @@ -158,7 +159,7 @@ struct rdt_resource { u32 default_ctrl; const char *format_str; int (*parse_ctrlval)(struct rdt_parse_data *data, - struct rdt_resource *r, + struct resctrl_schema *s, struct rdt_domain *d); struct list_head evt_list; unsigned long fflags; -- cgit