summaryrefslogtreecommitdiff
path: root/drivers/resctrl
diff options
context:
space:
mode:
authorBen Horgan <ben.horgan@arm.com>2026-09-17 15:56:13 +0100
committerJames Morse <james.morse@arm.com>2026-10-02 17:39:32 +0100
commit724eae25d16ee49e5cabbd927af95ef2be8fd78c (patch)
tree70ba93ce9337e42381e3ac420e3d192e67478284 /drivers/resctrl
parent4643335d5846123a25f535aad697c23f0135faca (diff)
arm_mpam: resctrl: Correct check that existing class is L3
The class used to back mbm_total_bytes can be either at the L3 or the memory. If a platform had candidate classes at both the memory and the L3 then, as the check for whether the existing class is L3 or not in counter_update_class() is broken, the class that will be chosen depends on which order the classes are considered and so the probe order. Fix the check. Fixes: 1458c4f05335 ("arm_mpam: resctrl: Add support for csu counters") Tested-by: Gavin Shan <gshan@redhat.com> Signed-off-by: Ben Horgan <ben.horgan@arm.com> Reviewed-by: Gavin Shan <gshan@redhat.com> Reviewed-by: James Morse <james.morse@arm.com> Signed-off-by: James Morse <james.morse@arm.com>
Diffstat (limited to 'drivers/resctrl')
-rw-r--r--drivers/resctrl/mpam_resctrl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/resctrl/mpam_resctrl.c b/drivers/resctrl/mpam_resctrl.c
index 9d223057953a..b825bd90d4bd 100644
--- a/drivers/resctrl/mpam_resctrl.c
+++ b/drivers/resctrl/mpam_resctrl.c
@@ -1076,7 +1076,7 @@ static void counter_update_class(enum resctrl_event_id evt_id,
struct mpam_class *existing_class = mpam_resctrl_counters[evt_id].class;
if (existing_class) {
- if (class->level == 3) {
+ if (existing_class->level == 3) {
pr_debug("Existing class is L3 - L3 wins\n");
return;
}