Commit fb1db476 authored by Robin Murphy's avatar Robin Murphy Committed by Lee Jones
Browse files

UPSTREAM: Partially revert "perf/arm-cmn: Optimise DTC counter accesses"



It turns out the optimisation implemented by commit 4f2c3872 is
totally broken, since all the places that consume hw->dtcs_used for
events other than cycle count are still not expecting it to be sparsely
populated, and fail to read all the relevant DTC counters correctly if
so.

If implemented correctly, the optimisation potentially saves up to 3
register reads per event update, which is reasonably significant for
events targeting a single node, but still not worth a massive amount of
additional code complexity overall. Getting it right within the current
design looks a fair bit more involved than it was ever intended to be,
so let's just make a functional revert which restores the old behaviour
while still backporting easily.

Bug: 254441685
Fixes: 4f2c3872 ("perf/arm-cmn: Optimise DTC counter accesses")
Reported-by: default avatarIlkka Koskinen <ilkka@os.amperecomputing.com>
Signed-off-by: default avatarRobin Murphy <robin.murphy@arm.com>
Link: https://lore.kernel.org/r/b41bb4ed7283c3d8400ce5cf5e6ec94915e6750f.1674498637.git.robin.murphy@arm.com


Signed-off-by: default avatarWill Deacon <will@kernel.org>
(cherry picked from commit a428eb4b)
Signed-off-by: default avatarLee Jones <joneslee@google.com>
Change-Id: Iffe5d1198e75b3af0ba987e69c8cec8948524fde
parent 1f12217e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment