Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Neil Leeder and committed by
Will Deacon
6c17c1c3 288be97c

+2
+2
drivers/perf/qcom_l2_pmu.c
··· 546 546 } 547 547 548 548 if ((event != event->group_leader) && 549 + !is_software_event(event->group_leader) && 549 550 (L2_EVT_GROUP(event->group_leader->attr.config) == 550 551 L2_EVT_GROUP(event->attr.config))) { 551 552 dev_dbg_ratelimited(&l2cache_pmu->pdev->dev, ··· 559 558 list_for_each_entry(sibling, &event->group_leader->sibling_list, 560 559 group_entry) { 561 560 if ((sibling != event) && 561 + !is_software_event(sibling) && 562 562 (L2_EVT_GROUP(sibling->attr.config) == 563 563 L2_EVT_GROUP(event->attr.config))) { 564 564 dev_dbg_ratelimited(&l2cache_pmu->pdev->dev,