summaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
authorJames Morse <james.morse@arm.com>2021-07-28 20:06:34 +0300
committerBorislav Petkov <bp@suse.de>2021-08-11 19:31:04 +0300
commit43ac1dbf6101722944758f364ea39859d5db3ce0 (patch)
tree840e618e9d7a754bd51fec2bbdccfc21611fe879 /init
parent2b8dd4ab65dad1251822fbf74fb0d5623e4eaee0 (diff)
downloadlinux-43ac1dbf6101722944758f364ea39859d5db3ce0.tar.xz
x86/resctrl: Merge the ctrl_val arrays
Each struct rdt_hw_resource has its own ctrl_val[] array. When CDP is enabled, two resources are in use, each with its own ctrl_val[] array that holds half of the configuration used by hardware. One uses the odd slots, the other the even. rdt_cdp_peer_get() is the helper to find the alternate resource, its domain, and corresponding entry in the other ctrl_val[] array. Once the CDP resources are merged there will be one struct rdt_hw_resource and one ctrl_val[] array for each hardware resource. This will include changes to rdt_cdp_peer_get(), making it hard to bisect any issue. Merge the ctrl_val[] arrays for three CODE/DATA/NONE resources first. Doing this before merging the resources temporarily complicates allocating and freeing the ctrl_val arrays. Add a helper to allocate the ctrl_val array, that returns the value on the L2 or L3 resource if it already exists. This gets removed once the resources are merged, and there really is only one ctrl_val[] 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-22-james.morse@arm.com
Diffstat (limited to 'init')
0 files changed, 0 insertions, 0 deletions