summaryrefslogtreecommitdiffstats
path: root/include/linux/resctrl.h
diff options
context:
space:
mode:
authorJames Morse <james.morse@arm.com>2021-07-28 17:06:27 +0000
committerBorislav Petkov <bp@suse.de>2021-08-11 16:33:42 +0200
commit75408e43509ed6207870c0e7e28656acbbc1f7fd (patch)
tree2ab4d7962811cc00d9150a84bc85e01c5073278f /include/linux/resctrl.h
parente8f7282552b902af3bd1f07a87d657b7f5f12ab8 (diff)
downloadlinux-75408e43509ed6207870c0e7e28656acbbc1f7fd.tar.bz2
x86/resctrl: Allow different CODE/DATA configurations to be staged
Before the CDP resources can be merged, struct rdt_domain will need an array of struct resctrl_staged_config, one per type of configuration. Use the type as an index to the array to ensure that a schema configuration string can't specify the same domain twice. This will allow two schemata to apply configuration changes to one resource. 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-15-james.morse@arm.com
Diffstat (limited to 'include/linux/resctrl.h')
-rw-r--r--include/linux/resctrl.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/linux/resctrl.h b/include/linux/resctrl.h
index ff7f7d7e1348..51ba372f96cd 100644
--- a/include/linux/resctrl.h
+++ b/include/linux/resctrl.h
@@ -27,6 +27,8 @@ enum resctrl_conf_type {
CDP_DATA,
};
+#define CDP_NUM_TYPES (CDP_DATA + 1)
+
/**
* struct resctrl_staged_config - parsed configuration to be applied
* @new_ctrl: new ctrl value to be loaded
@@ -64,7 +66,7 @@ struct rdt_domain {
int mbm_work_cpu;
int cqm_work_cpu;
struct pseudo_lock_region *plr;
- struct resctrl_staged_config staged_config;
+ struct resctrl_staged_config staged_config[CDP_NUM_TYPES];
};
/**