diff options
author | James Morse <james.morse@arm.com> | 2021-07-28 17:06:32 +0000 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2021-08-11 18:03:28 +0200 |
commit | 2e7df368fc9260ac2229335755de2f403ec8f08f (patch) | |
tree | 1944551984c2d55c719d6c1fe9b6e9b873ea9a5a /crypto/lzo-rle.c | |
parent | 141739aa73505539f315d15068b9c0707ab5ecb4 (diff) | |
download | linux-2e7df368fc9260ac2229335755de2f403ec8f08f.tar.bz2 |
x86/resctrl: Apply offset correction when config is staged
When resctrl comes to copy the CAT MSR values from the ctrl_val[] array
into hardware, it applies an offset adjustment based on the type of
the resource. CODE and DATA resources have their closid mapped into an
odd/even range. This mapping is based on a property of the resource.
This happens once the new control value has been written to the ctrl_val[]
array. Once the CDP resources are merged, there will only be a single
property that needs to cover both odd/even mappings to the single
ctrl_val[] array. The offset adjustment must be applied before the new
value is written to the array.
Move the logic from cat_wrmsr() to resctrl_arch_update_domains(). The
value provided to apply_config() is now an index in the array, not the
closid. The parameters provided via struct msr_param are now indexes
too. As resctrl's use of closid is a u32, struct msr_param's type is
changed to match.
With this, the CODE and DATA resources only use the odd or even
indexes in the array. This allows the temporary num_closid/2 fixes in
domain_setup_ctrlval() and reset_all_ctrls() to be removed.
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-20-james.morse@arm.com
Diffstat (limited to 'crypto/lzo-rle.c')
0 files changed, 0 insertions, 0 deletions