]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
perf/smmuv3: Don't trample existing events with global filter
authorRobin Murphy <robin.murphy@arm.com>
Tue, 8 Jun 2021 11:55:12 +0000 (12:55 +0100)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 13 Aug 2021 07:29:46 +0000 (09:29 +0200)
commitee1da1de90a0dfba05227c91080fa43a588cbcf8
tree7cb38fd0e3e9aa73d04bb85515d6828c9238da39
parent273a20b40d247cd05e457f19852d2e7dc26a67a5
perf/smmuv3: Don't trample existing events with global filter

BugLink: https://bugs.launchpad.net/bugs/1938340
commit 4c1daba15c209b99d192f147fea3dade30f72ed2 upstream.

With global filtering, we only allow an event to be scheduled if its
filter settings exactly match those of any existing events, therefore
it is pointless to reapply the filter in that case. Much worse, though,
is that in doing that we trample the event type of counter 0 if it's
already active, and never touch the appropriate PMEVTYPERn so the new
event is likely not counting the right thing either. Don't do that.

CC: stable@vger.kernel.org
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Link: https://lore.kernel.org/r/32c80c0e46237f49ad8da0c9f8864e13c4a803aa.1623153312.git.robin.murphy@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/perf/arm_smmuv3_pmu.c