diff options
author | James Morse <james.morse@arm.com> | 2021-07-28 17:06:30 +0000 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2021-08-11 17:53:53 +0200 |
commit | fa8f711d2f14381d1a47420b6da94b62e6484c56 (patch) | |
tree | 9effd7e5ce26fb77584f27d447c8092c43cbdf5a /arch/x86/kernel/cpu/resctrl/ctrlmondata.c | |
parent | x86/resctrl: Add a helper to read a closid's configuration (diff) | |
download | wireguard-linux-fa8f711d2f14381d1a47420b6da94b62e6484c56.tar.xz wireguard-linux-fa8f711d2f14381d1a47420b6da94b62e6484c56.zip |
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 <james.morse@arm.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Jamie Iles <jamie@nuviainc.com>
Reviewed-by: Reinette Chatre <reinette.chatre@intel.com>
Tested-by: Babu Moger <babu.moger@amd.com>
Link: https://lkml.kernel.org/r/20210728170637.25610-18-james.morse@arm.com
Diffstat (limited to 'arch/x86/kernel/cpu/resctrl/ctrlmondata.c')
-rw-r--r-- | arch/x86/kernel/cpu/resctrl/ctrlmondata.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/x86/kernel/cpu/resctrl/ctrlmondata.c b/arch/x86/kernel/cpu/resctrl/ctrlmondata.c index 4da08ba0deda..9ead0c0bf6ee 100644 --- a/arch/x86/kernel/cpu/resctrl/ctrlmondata.c +++ b/arch/x86/kernel/cpu/resctrl/ctrlmondata.c @@ -402,7 +402,7 @@ out: } 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) { struct rdt_hw_domain *hw_dom = resctrl_to_arch_dom(d); @@ -424,7 +424,8 @@ static void show_doms(struct seq_file *s, struct resctrl_schema *schema, int clo if (sep) seq_puts(s, ";"); - resctrl_arch_get_config(r, dom, closid, &ctrl_val); + resctrl_arch_get_config(r, dom, closid, schema->conf_type, + &ctrl_val); seq_printf(s, r->format_str, dom->id, max_data_width, ctrl_val); sep = true; |