x86/resctrl: Allow different CODE/DATA configurations to be staged
authorJames Morse <james.morse@arm.com>
Wed, 28 Jul 2021 17:06:27 +0000 (17:06 +0000)
committerBorislav Petkov <bp@suse.de>
Wed, 11 Aug 2021 14:33:42 +0000 (16:33 +0200)
commit75408e43509ed6207870c0e7e28656acbbc1f7fd
tree2ab4d7962811cc00d9150a84bc85e01c5073278f
parente8f7282552b902af3bd1f07a87d657b7f5f12ab8
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
arch/x86/kernel/cpu/resctrl/ctrlmondata.c
arch/x86/kernel/cpu/resctrl/rdtgroup.c
include/linux/resctrl.h