Home
last modified time | relevance | path

Searched refs:used_mask (Results 1 – 19 of 19) sorted by relevance

/linux/arch/sh/kernel/
H A Dperf_event.c30 unsigned long used_mask[BITS_TO_LONGS(MAX_HWEVENTS)]; member
239 __clear_bit(event->hw.idx, cpuc->used_mask); in sh_pmu_del()
253 if (__test_and_set_bit(idx, cpuc->used_mask)) { in sh_pmu_add()
254 idx = find_first_zero_bit(cpuc->used_mask, sh_pmu->num_events); in sh_pmu_add()
258 __set_bit(idx, cpuc->used_mask); in sh_pmu_add()
/linux/drivers/perf/
H A Darm_dsu_pmu.c87 DECLARE_BITMAP(used_mask, DSU_PMU_MAX_HW_CNTRS);
284 unsigned long *used_mask = hw_events->used_mask; in dsu_pmu_get_event_idx() local
287 if (!test_and_set_bit(DSU_PMU_IDX_CYCLE_COUNTER, used_mask)) in dsu_pmu_get_event_idx()
291 idx = find_first_zero_bit(used_mask, dsu_pmu->num_counters); in dsu_pmu_get_event_idx()
294 set_bit(idx, hw_events->used_mask); in dsu_pmu_get_event_idx()
457 clear_bit(idx, hw_events->used_mask); in dsu_pmu_del()
468 if (bitmap_empty(dsu_pmu->hw_events.used_mask, DSU_PMU_MAX_HW_CNTRS)) in dsu_pmu_enable()
515 memset(fake_hw.used_mask, 0, sizeof(fake_hw.used_mask)); in dsu_pmu_validate_group()
H A Dstarfive_starlink_pmu.c65 DECLARE_BITMAP(used_mask, STARLINK_PMU_MAX_COUNTERS);
295 unsigned long *used_mask = hw_events->used_mask; in starlink_pmu_add() local
309 idx = find_first_zero_bit(used_mask, n_events); in starlink_pmu_add()
314 set_bit(idx, used_mask); in starlink_pmu_add()
338 clear_bit(hwc->idx, hw_events->used_mask); in starlink_pmu_del()
452 bool enabled = !bitmap_empty(hw_events->used_mask, STARLINK_PMU_MAX_COUNTERS); in starlink_pmu_pm_notify()
H A Dfujitsu_uncore_pmu.c59 unsigned long *used_mask; member
255 idx = bitmap_find_free_region(uncorepmu->used_mask, uncorepmu->num_counters, 0); in fujitsu_uncore_event_add()
281 bitmap_release_region(uncorepmu->used_mask, hwc->idx, 0); in fujitsu_uncore_event_del()
510 alloc_size = sizeof(uncorepmu->used_mask[0]) * BITS_TO_LONGS(uncorepmu->num_counters); in fujitsu_uncore_pmu_probe()
511 uncorepmu->used_mask = devm_kzalloc(dev, alloc_size, GFP_KERNEL); in fujitsu_uncore_pmu_probe()
512 if (!uncorepmu->used_mask) in fujitsu_uncore_pmu_probe()
H A Darm-cci.c70 unsigned long *used_mask; member
315 if (test_and_set_bit(CCI400_PMU_CYCLE_CNTR_IDX, hw->used_mask)) in cci400_get_event_idx()
322 if (!test_and_set_bit(idx, hw->used_mask)) in cci400_get_event_idx()
644 for_each_set_bit(i, cci_pmu->hw_events.used_mask, cci_pmu->num_cntrs) { in cci_pmu_sync_counters()
797 if (!test_and_set_bit(idx, hw->used_mask)) in pmu_get_event_idx()
1086 bool enabled = !bitmap_empty(hw_events->used_mask, cci_pmu->num_cntrs); in cci_pmu_enable()
1210 clear_bit(idx, hw_events->used_mask); in cci_pmu_del()
1249 .used_mask = mask, in validate_group()
1620 cci_pmu->hw_events.used_mask = devm_bitmap_zalloc(dev, in cci_pmu_alloc()
1623 if (!cci_pmu->hw_events.used_mask) in cci_pmu_alloc()
H A Darm_pmu.c413 memset(&fake_pmu.used_mask, 0, sizeof(fake_pmu.used_mask)); in validate_group()
537 bool enabled = !bitmap_empty(hw_events->used_mask, ARMPMU_MAX_HWEVENTS); in armpmu_enable()
786 bool enabled = !bitmap_empty(hw_events->used_mask, ARMPMU_MAX_HWEVENTS); in cpu_pm_pmu_notify()
H A Dqcom_l3_pmu.c159 unsigned long used_mask[BITS_TO_LONGS(L3_NUM_COUNTERS)]; member
557 idx = bitmap_find_free_region(l3pmu->used_mask, L3_NUM_COUNTERS, order); in qcom_l3_cache__event_add()
584 bitmap_release_region(l3pmu->used_mask, hwc->idx, order); in qcom_l3_cache__event_del()
H A Dalibaba_uncore_drw_pmu.c101 DECLARE_BITMAP(used_mask, ALI_DRW_PMU_COMMON_MAX_COUNTERS);
272 if (!test_and_set_bit(idx, drw_pmu->used_mask)) in ali_drw_get_counter_idx()
650 clear_bit(idx, drw_pmu->used_mask); in ali_drw_pmu_del()
H A Darm_dmc620_pmu.c99 DECLARE_BITMAP(used_mask, DMC620_PMU_MAX_COUNTERS);
307 if (!test_and_set_bit(idx, dmc620_pmu->used_mask)) in dmc620_get_event_idx()
631 clear_bit(idx, dmc620_pmu->used_mask); in dmc620_pmu_del()
/linux/drivers/perf/hisilicon/
H A Dhisi_uncore_pmu.c133 unsigned long *used_mask = hisi_pmu->pmu_events.used_mask; in hisi_uncore_pmu_get_event_idx() local
137 idx = find_first_zero_bit(used_mask, num_counters); in hisi_uncore_pmu_get_event_idx()
141 set_bit(idx, used_mask); in hisi_uncore_pmu_get_event_idx()
149 clear_bit(idx, hisi_pmu->pmu_events.used_mask); in hisi_uncore_pmu_clear_event_idx()
418 bool enabled = !bitmap_empty(hisi_pmu->pmu_events.used_mask, in hisi_uncore_pmu_enable()
H A Dhisi_uncore_ddrc_pmu.c127 unsigned long *used_mask = ddrc_pmu->pmu_events.used_mask; in hisi_ddrc_pmu_v1_get_event_idx() local
132 if (test_bit(idx, used_mask)) in hisi_ddrc_pmu_v1_get_event_idx()
135 set_bit(idx, used_mask); in hisi_ddrc_pmu_v1_get_event_idx()
H A Dhisi_uncore_pmu.h83 DECLARE_BITMAP(used_mask, HISI_MAX_COUNTERS);
H A Dhisi_uncore_noc_pmu.c83 cur_idx = find_first_bit(pmu_events->used_mask, noc_pmu->num_counters); in hisi_noc_pmu_get_event_idx()
216 if (bitmap_weight(noc_pmu->pmu_events.used_mask, noc_pmu->num_counters) > 1) in hisi_noc_pmu_disable_filter()
/linux/arch/loongarch/kernel/
H A Dperf_event.c97 unsigned long used_mask[BITS_TO_LONGS(LOONGARCH_MAX_HWEVENTS)]; member
258 if (!test_and_set_bit(i, cpuc->used_mask)) in loongarch_pmu_alloc_counter()
430 clear_bit(idx, cpuc->used_mask); in loongarch_pmu_del()
508 if (test_bit(n, cpuc->used_mask)) { in pmu_handle_irq()
/linux/drivers/hwtracing/coresight/
H A Dcoresight-cti.h71 u32 used_mask; member
H A Dcoresight-cti-sysfs.c934 unsigned long mask = con->con_in->used_mask; in trigin_sig_show()
948 unsigned long mask = con->con_out->used_mask; in trigout_sig_show()
/linux/drivers/dma/idxd/
H A Dperfmon.c110 if (!test_and_set_bit(i, idxd_pmu->used_mask)) in perfmon_assign_event()
369 clear_bit(cntr, idxd->idxd_pmu->used_mask); in perfmon_pmu_event_stop()
H A Didxd.h122 DECLARE_BITMAP(used_mask, IDXD_PMU_EVENT_MAX);
/linux/arch/x86/events/intel/
H A Duncore.c476 unsigned long used_mask[BITS_TO_LONGS(UNCORE_PMC_IDX_MAX)]; in uncore_assign_events() local
481 bitmap_zero(used_mask, UNCORE_PMC_IDX_MAX); in uncore_assign_events()
504 if (test_bit(hwc->idx, used_mask)) in uncore_assign_events()
507 __set_bit(hwc->idx, used_mask); in uncore_assign_events()