Lines Matching refs:cpuc
771 struct pmu_hw_events *cpuc = this_cpu_ptr(cpu_pmu->hw_events);
775 for_each_set_bit(i, cpuc->used_mask, ARMPMU_MAX_HWEVENTS) {
776 if (armv8pmu_event_has_user_read(cpuc->events[i]))
782 for_each_andnot_bit(i, cpu_pmu->cntr_mask, cpuc->used_mask,
844 struct pmu_hw_events *cpuc = this_cpu_ptr(cpu_pmu->hw_events);
870 struct perf_event *event = cpuc->events[idx];
903 static int armv8pmu_get_single_idx(struct pmu_hw_events *cpuc,
909 if (!test_and_set_bit(idx, cpuc->used_mask))
915 static int armv8pmu_get_chain_idx(struct pmu_hw_events *cpuc,
927 if (!test_and_set_bit(idx, cpuc->used_mask)) {
929 if (!test_and_set_bit(idx - 1, cpuc->used_mask))
932 clear_bit(idx, cpuc->used_mask);
938 static int armv8pmu_get_event_idx(struct pmu_hw_events *cpuc,
948 if (!test_and_set_bit(ARMV8_PMU_CYCLE_IDX, cpuc->used_mask))
965 if (!test_and_set_bit(ARMV8_PMU_INSTR_IDX, cpuc->used_mask))
973 return armv8pmu_get_chain_idx(cpuc, cpu_pmu);
975 return armv8pmu_get_single_idx(cpuc, cpu_pmu);
978 static void armv8pmu_clear_event_idx(struct pmu_hw_events *cpuc,
983 clear_bit(idx, cpuc->used_mask);
985 clear_bit(idx - 1, cpuc->used_mask);