]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drivers/perf: hisi_pcie: Merge find_related_event() and get_event_idx()
authorJunhao He <hejunhao3@huawei.com>
Fri, 23 Feb 2024 10:33:58 +0000 (18:33 +0800)
committerWill Deacon <will@kernel.org>
Mon, 4 Mar 2024 14:18:29 +0000 (14:18 +0000)
commit7da377059ee653dd4ddcc126fd26c9c78f7bc4e7
tree8e13e415e70ca83729fe13fc4d909b706d655f69
parent2fbf96ed883adcdf0f641cfe07e695dac7e5d540
drivers/perf: hisi_pcie: Merge find_related_event() and get_event_idx()

The function xxx_find_related_event() scan all working events to find
related events. During this process, we also can find the idle counters.
If not found related events, return the first idle counter to simplify
the code.

Signed-off-by: Junhao He <hejunhao3@huawei.com>
Signed-off-by: Yicong Yang <yangyicong@hisilicon.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/r/20240223103359.18669-8-yangyicong@huawei.com
Signed-off-by: Will Deacon <will@kernel.org>
drivers/perf/hisilicon/hisi_pcie_pmu.c