From fa8f711d2f14381d1a47420b6da94b62e6484c56 Mon Sep 17 00:00:00 2001 From: James Morse Date: Wed, 28 Jul 2021 17:06:30 +0000 Subject: x86/resctrl: Pass configuration type to resctrl_arch_get_config() The ctrl_val[] array for a struct rdt_hw_resource only holds configurations of one type. The type is implicit. Once the CDP resources are merged, the ctrl_val[] array will hold all the configurations for the hardware resource. When a particular type of configuration is needed, it must be specified explicitly. Pass the expected type from the schema into resctrl_arch_get_config(). Nothing uses this yet, but once a single ctrl_val[] array is used for the three struct rdt_hw_resources that share hardware, the type will be used to return the correct configuration value from the shared array. 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-18-james.morse@arm.com --- include/linux/resctrl.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/linux/resctrl.h b/include/linux/resctrl.h index 3a2309403094..69d7387b7f22 100644 --- a/include/linux/resctrl.h +++ b/include/linux/resctrl.h @@ -201,6 +201,7 @@ struct resctrl_schema { u32 resctrl_arch_get_num_closid(struct rdt_resource *r); int resctrl_arch_update_domains(struct rdt_resource *r, u32 closid); void resctrl_arch_get_config(struct rdt_resource *r, struct rdt_domain *d, - u32 closid, u32 *value); + u32 closid, enum resctrl_conf_type type, + u32 *value); #endif /* _RESCTRL_H */ -- cgit v1.2.3-59-g8ed1b