+static int hisi_hw_perf_event_init(struct perf_event *event)
>+{
>+ struct hw_perf_event *hwc = &event->hw;
>+ struct hisi_pmu *hisi_pmu = to_hisi_pmu(event->pmu);
>+ struct device *dev = hisi_pmu->dev;
+Please also check the number of counters.
>+ /*
>+ * We must NOT create groups containing mixed PMUs, although
>+ * software events are acceptable
>+ */
>+ if (event->group_leader->pmu != event->pmu &&
>+ !is_software_event(event->group_leader))
>+ return -EINVAL;
>+
>+ list_for_each_entry(sibling, &event->group_leader->sibling_list,
>+ group_entry)
>+ if (sibling->pmu != event->pmu && !is_software_event(sibling))
>+ return -EINVAL;
[...]