aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/cppc_acpi.c
diff options
context:
space:
mode:
authorPeter Newman <[email protected]>2022-12-20 16:41:31 +0000
committerBorislav Petkov (AMD) <[email protected]>2023-01-10 18:51:59 +0000
commit2a81160d29d65b5876ab3f824fda99ae0219f05e (patch)
tree0ab7e380b797e025c2ed4141254e06d68b07a73b /drivers/acpi/cppc_acpi.c
parentx86/resctrl: Fix task CLOSID/RMID update race (diff)
downloadkernel-2a81160d29d65b5876ab3f824fda99ae0219f05e.tar.gz
kernel-2a81160d29d65b5876ab3f824fda99ae0219f05e.zip
x86/resctrl: Fix event counts regression in reused RMIDs
When creating a new monitoring group, the RMID allocated for it may have been used by a group which was previously removed. In this case, the hardware counters will have non-zero values which should be deducted from what is reported in the new group's counts. resctrl_arch_reset_rmid() initializes the prev_msr value for counters to 0, causing the initial count to be charged to the new group. Resurrect __rmid_read() and use it to initialize prev_msr correctly. Unlike before, __rmid_read() checks for error bits in the MSR read so that callers don't need to. Fixes: 1d81d15db39c ("x86/resctrl: Move mbm_overflow_count() into resctrl_arch_rmid_read()") Signed-off-by: Peter Newman <[email protected]> Signed-off-by: Borislav Petkov (AMD) <[email protected]> Reviewed-by: Reinette Chatre <[email protected]> Tested-by: Babu Moger <[email protected]> Cc: [email protected] Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'drivers/acpi/cppc_acpi.c')
0 files changed, 0 insertions, 0 deletions