Skip to content

Commit 0d1e013

Browse files
committed
Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux
Pull arm64 fix from Will Deacon: - Fix event counting regression in Arm CMN PMU driver due to broken optimisation * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: Partially revert "perf/arm-cmn: Optimise DTC counter accesses"
2 parents db7c467 + a428eb4 commit 0d1e013

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

drivers/perf/arm-cmn.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1576,7 +1576,6 @@ static int arm_cmn_event_init(struct perf_event *event)
15761576
hw->dn++;
15771577
continue;
15781578
}
1579-
hw->dtcs_used |= arm_cmn_node_to_xp(cmn, dn)->dtc;
15801579
hw->num_dns++;
15811580
if (bynodeid)
15821581
break;
@@ -1589,6 +1588,12 @@ static int arm_cmn_event_init(struct perf_event *event)
15891588
nodeid, nid.x, nid.y, nid.port, nid.dev, type);
15901589
return -EINVAL;
15911590
}
1591+
/*
1592+
* Keep assuming non-cycles events count in all DTC domains; turns out
1593+
* it's hard to make a worthwhile optimisation around this, short of
1594+
* going all-in with domain-local counter allocation as well.
1595+
*/
1596+
hw->dtcs_used = (1U << cmn->num_dtcs) - 1;
15921597

15931598
return arm_cmn_validate_group(cmn, event);
15941599
}

0 commit comments

Comments
 (0)