Skip to content
Commit 6d7d51e8 authored by Yicong Yang's avatar Yicong Yang Committed by Will Deacon
Browse files

drivers/perf: hisi_pcie: Check the type first in pmu::event_init()



Check whether the event type matches the PMU type firstly in
pmu::event_init() before touching the event. Otherwise we'll
change the events of others and lead to incorrect results.
Since in perf_init_event() we may call every pmu's event_init()
in a certain case, we should not modify the event if it's not
ours.

Fixes: 8404b0fb ("drivers/perf: hisi: Add driver for HiSilicon PCIe PMU")
Signed-off-by: default avatarYicong Yang <yangyicong@hisilicon.com>
Link: https://lore.kernel.org/r/20231024092954.42297-2-yangyicong@huawei.com


Signed-off-by: default avatarWill Deacon <will@kernel.org>
parent ab33c66f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment