
driver inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I7F2F2 CVE: NA -------------------------------- Keep to advertise PERF_PMU_CAP_EXCLUSIVE. Such pmus can only have one event scheduled at a time, and the perf tool will report device busy. Signed-off-by: Junhao He <hejunhao3@huawei.com> --- drivers/hwtracing/ptt/hisi_ptt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwtracing/ptt/hisi_ptt.c b/drivers/hwtracing/ptt/hisi_ptt.c index 1c8113215885..773acbb54099 100644 --- a/drivers/hwtracing/ptt/hisi_ptt.c +++ b/drivers/hwtracing/ptt/hisi_ptt.c @@ -1215,7 +1215,7 @@ static int hisi_ptt_register_pmu(struct hisi_ptt *hisi_ptt) hisi_ptt->hisi_ptt_pmu = (struct pmu) { .module = THIS_MODULE, - .capabilities = PERF_PMU_CAP_NO_EXCLUDE, + .capabilities = PERF_PMU_CAP_NO_EXCLUDE | PERF_PMU_CAP_EXCLUSIVE, .task_ctx_nr = perf_sw_context, .attr_groups = hisi_ptt_pmu_groups, .event_init = hisi_ptt_pmu_event_init, -- 2.33.0