summaryrefslogtreecommitdiff
path: root/drivers/perf
diff options
context:
space:
mode:
authorNeil Leeder <nleeder@codeaurora.org>2017-07-25 00:17:02 +0300
committerWill Deacon <will.deacon@arm.com>2017-07-26 11:27:43 +0300
commit6c17c1c3099d7367e67d51290884846dfeecf7bf (patch)
tree837f47c38e3fc99ecef48cac7a3df8067f286f4c /drivers/perf
parent288be97cc74e31b7871c75eb11a8dd768dcb535d (diff)
downloadlinux-6c17c1c3099d7367e67d51290884846dfeecf7bf.tar.xz
perf: qcom_l2: fix column exclusion check
The check for column exclusion did not verify that the event being checked was an L2 event, and not a software event. Software events should not be checked for column exclusion. This resulted in a group with both software and L2 events sometimes incorrectly rejecting the L2 event for column exclusion and not counting it. Add a check for PMU type before applying column exclusion logic. Fixes: 21bdbb7102edeaeb ("perf: add qcom l2 cache perf events driver") Acked-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Neil Leeder <nleeder@codeaurora.org> Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'drivers/perf')
-rw-r--r--drivers/perf/qcom_l2_pmu.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/perf/qcom_l2_pmu.c b/drivers/perf/qcom_l2_pmu.c
index c259848228b4..b242cce10468 100644
--- a/drivers/perf/qcom_l2_pmu.c
+++ b/drivers/perf/qcom_l2_pmu.c
@@ -546,6 +546,7 @@ static int l2_cache_event_init(struct perf_event *event)
}
if ((event != event->group_leader) &&
+ !is_software_event(event->group_leader) &&
(L2_EVT_GROUP(event->group_leader->attr.config) ==
L2_EVT_GROUP(event->attr.config))) {
dev_dbg_ratelimited(&l2cache_pmu->pdev->dev,
@@ -558,6 +559,7 @@ static int l2_cache_event_init(struct perf_event *event)
list_for_each_entry(sibling, &event->group_leader->sibling_list,
group_entry) {
if ((sibling != event) &&
+ !is_software_event(sibling) &&
(L2_EVT_GROUP(sibling->attr.config) ==
L2_EVT_GROUP(event->attr.config))) {
dev_dbg_ratelimited(&l2cache_pmu->pdev->dev,