Home
last modified time | relevance | path

Searched refs:num_counters (Results 1 – 25 of 56) sorted by relevance

123

/linux/tools/testing/selftests/kvm/riscv/
H A Dsbi_pmu_test.c207 static void update_counter_info(int num_counters) in update_counter_info() argument
212 for (i = 0; i < num_counters; i++) { in update_counter_info()
416 int num_counters = 0; in test_pmu_events() local
419 num_counters = get_num_counters(); in test_pmu_events()
420 update_counter_info(num_counters); in test_pmu_events()
437 int num_counters = 0, i; in test_pmu_basic_sanity() local
443 num_counters = get_num_counters(); in test_pmu_basic_sanity()
445 for (i = 0; i < num_counters; i++) { in test_pmu_basic_sanity()
473 int num_counters = 0; in test_pmu_events_snaphost() local
483 num_counters = get_num_counters(); in test_pmu_events_snaphost()
[all …]
/linux/arch/x86/events/amd/
H A Duncore.c50 int num_counters; member
212 for (i = 0; i < pmu->num_counters; i++) { in amd_uncore_add()
221 for (i = 0; i < pmu->num_counters; i++) { in amd_uncore_add()
257 for (i = 0; i < pmu->num_counters; i++) { in amd_uncore_del()
544 pmu->num_counters, in amd_uncore_ctx_init()
718 int num_counters; in amd_uncore_df_ctx_init() local
724 num_counters = amd_uncore_ctx_num_pmcs(uncore, cpu); in amd_uncore_df_ctx_init()
725 if (!num_counters) in amd_uncore_df_ctx_init()
741 pmu->num_counters = num_counters; in amd_uncore_df_ctx_init()
777 pr_info("%d %s%s counters detected\n", pmu->num_counters, in amd_uncore_df_ctx_init()
[all …]
/linux/arch/x86/events/intel/
H A Duncore_snbep.c891 .num_counters = 2,
1048 .num_counters = 4,
1158 .num_counters = 4,
1251 .num_counters = 4,
1259 .num_counters = 4,
1271 .num_counters = 4,
1287 .num_counters = 4,
1296 .num_counters = 3,
1677 .num_counters = 2,
1808 .num_counters = 4,
[all …]
H A Duncore_snb.c330 .num_counters = 2,
348 .num_counters = 2,
408 .num_counters = 4,
446 .num_counters = 2,
473 .num_counters = 1,
487 .num_counters = 1,
591 .num_counters = 2,
603 .num_counters = 2,
617 .num_counters = 1,
644 .num_counters = 2,
[all …]
H A Duncore.h52 int num_counters; member
182 unsigned int num_counters; member
478 return box->pmu->type->freerunning[type].num_counters; in uncore_num_freerunning()
499 return box->pmu->type->num_counters; in uncore_num_counters()
/linux/arch/loongarch/kernel/
H A Dperf_event.c135 unsigned int num_counters; member
257 for (i = 0; i < loongarch_pmu.num_counters; i++) { in loongarch_pmu_alloc_counter()
271 WARN_ON(idx < 0 || idx >= loongarch_pmu.num_counters); in loongarch_pmu_enable_event()
290 WARN_ON(idx < 0 || idx >= loongarch_pmu.num_counters); in loongarch_pmu_disable_event()
426 WARN_ON(idx < 0 || idx >= loongarch_pmu.num_counters); in loongarch_pmu_del()
507 for (n = 0; n < loongarch_pmu.num_counters; n++) { in pmu_handle_irq()
653 int counters = loongarch_pmu.num_counters; in reset_counters()
815 int ctr = loongarch_pmu.num_counters; in pause_local_counters()
830 int ctr = loongarch_pmu.num_counters; in resume_local_counters()
857 loongarch_pmu.num_counters = counters; in init_hw_perf_events()
/linux/drivers/infiniband/hw/mlx5/
H A Dcounters.c394 int ret, num_counters; in do_get_hw_stats() local
399 num_counters = cnts->num_q_counters + in do_get_hw_stats()
446 return num_counters; in do_get_hw_stats()
554 int num_counters, num_hw_counters, num_op_counters; in mlx5_ib_get_hw_stats() local
561 num_counters = num_hw_counters + cnts->num_op_counters; in mlx5_ib_get_hw_stats()
563 if (index < 0 || index > num_counters) in mlx5_ib_get_hw_stats()
567 else if (index >= num_hw_counters && index < num_counters) in mlx5_ib_get_hw_stats()
806 u32 num_counters, num_op_counters = 0, size; in __mlx5_ib_alloc_counters() local
810 num_counters = size; in __mlx5_ib_alloc_counters()
815 num_counters += size; in __mlx5_ib_alloc_counters()
[all …]
/linux/drivers/perf/
H A Dfujitsu_uncore_pmu.c55 int num_counters; member
126 for (i = 0; i < uncorepmu->num_counters; ++i) { in fujitsu_uncore_init()
146 for_each_set_bit(idx, &status, uncorepmu->num_counters) { in fujitsu_uncore_handle_irq()
191 return counters <= uncorepmu->num_counters; in fujitsu_uncore_validate_event_group()
256 idx = bitmap_find_free_region(uncorepmu->used_mask, uncorepmu->num_counters, 0); in fujitsu_uncore_event_add()
471 uncorepmu->num_counters = MAC_NUM_COUNTERS; in fujitsu_uncore_pmu_probe()
477 uncorepmu->num_counters = PCI_NUM_COUNTERS; in fujitsu_uncore_pmu_probe()
506 alloc_size = sizeof(uncorepmu->events[0]) * uncorepmu->num_counters; in fujitsu_uncore_pmu_probe()
511 alloc_size = sizeof(uncorepmu->used_mask[0]) * BITS_TO_LONGS(uncorepmu->num_counters); in fujitsu_uncore_pmu_probe()
H A Darm_smmuv3_pmu.c130 unsigned int num_counters; member
171 for_each_set_bit(idx, smmu_pmu->used_counters, smmu_pmu->num_counters) in smmu_pmu_enable_quirk_hip08_09()
195 for_each_set_bit(idx, smmu_pmu->used_counters, smmu_pmu->num_counters) in smmu_pmu_disable_quirk_hip08_09()
330 unsigned int cur_idx, num_ctrs = smmu_pmu->num_counters; in smmu_pmu_apply_event_filter()
361 unsigned int num_ctrs = smmu_pmu->num_counters; in smmu_pmu_get_event_idx()
430 if (++group_num_events > smmu_pmu->num_counters) in smmu_pmu_event_init()
452 if (++group_num_events > smmu_pmu->num_counters) in smmu_pmu_event_init()
702 for_each_set_bit(idx, ovs, smmu_pmu->num_counters) { in smmu_pmu_handle_irq()
780 u64 counter_present_mask = GENMASK_ULL(smmu_pmu->num_counters - 1, 0); in smmu_pmu_reset()
904 smmu_pmu->num_counters = FIELD_GET(SMMU_PMCG_CFGR_NCTR, cfgr) + 1; in smmu_pmu_probe()
[all …]
H A Dcxl_pmu.c104 u8 num_counters; member
140 info->num_counters = FIELD_GET(CXL_PMU_CAP_NUM_COUNTERS_MSK, val) + 1; in cxl_pmu_parse_caps()
151 for (i = 0; i < info->num_counters; i++) { in cxl_pmu_parse_caps()
782 for_each_set_bit(i, overflowedbm, info->num_counters) { in cxl_pmu_irq()
837 info->hw_events = devm_kcalloc(dev, info->num_counters, in cxl_pmu_probe()
/linux/drivers/perf/hisilicon/
H A Dhisi_uncore_pmu.c127 return counters <= hisi_pmu->num_counters; in hisi_validate_event_group()
134 u32 num_counters = hisi_pmu->num_counters; 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()
138 if (idx == num_counters) in hisi_uncore_pmu_get_event_idx()
167 for_each_set_bit(idx, &overflown, hisi_pmu->num_counters) { in hisi_uncore_pmu_isr()
422 hisi_pmu->num_counters); in hisi_uncore_pmu_enable()
H A Dhisi_uncore_noc_pmu.c84 cur_idx = find_first_bit(pmu_events->used_mask, noc_pmu->num_counters); in hisi_noc_pmu_get_event_idx()
85 if (cur_idx != noc_pmu->num_counters && in hisi_noc_pmu_get_event_idx()
217 if (bitmap_weight(noc_pmu->pmu_events.used_mask, noc_pmu->num_counters) > 1) in hisi_noc_pmu_disable_filter()
315 noc_pmu->num_counters = NOC_PMU_NR_COUNTERS; in hisi_noc_pmu_dev_init()
/linux/arch/x86/kvm/svm/
H A Dpmu.c30 unsigned int num_counters = pmu->nr_arch_gp_counters; in amd_pmu_get_pmc() local
32 if (pmc_idx >= num_counters) in amd_pmu_get_pmc()
35 return &pmu->gp_counters[array_index_nospec(pmc_idx, num_counters)]; in amd_pmu_get_pmc()
/linux/drivers/memory/samsung/
H A Dexynos5422-dmc.c183 int num_counters; member
243 for (i = 0; i < dmc->num_counters; i++) { in exynos5_counters_set_event()
257 for (i = 0; i < dmc->num_counters; i++) { in exynos5_counters_enable_edev()
271 for (i = 0; i < dmc->num_counters; i++) { in exynos5_counters_disable_edev()
737 for (i = 0; i < dmc->num_counters; i++) { in exynos5_counters_get()
1328 dmc->num_counters = devfreq_event_get_edev_count(dev, "devfreq-events"); in exynos5_performance_counters_init()
1329 if (dmc->num_counters < 0) { in exynos5_performance_counters_init()
1331 return dmc->num_counters; in exynos5_performance_counters_init()
1334 dmc->counter = devm_kcalloc(dev, dmc->num_counters, in exynos5_performance_counters_init()
1339 for (i = 0; i < dmc->num_counters; i++) { in exynos5_performance_counters_init()
/linux/drivers/comedi/drivers/
H A Dni_tio.h109 unsigned int num_counters; member
124 unsigned int num_counters,
H A Dni_tio.c1770 unsigned int num_counters, in ni_gpct_device_construct() argument
1778 if (num_counters == 0 || counters_per_chip == 0) in ni_gpct_device_construct()
1793 counter_dev->num_counters = num_counters; in ni_gpct_device_construct()
1794 counter_dev->num_chips = DIV_ROUND_UP(num_counters, counters_per_chip); in ni_gpct_device_construct()
1796 counter_dev->counters = kcalloc(num_counters, sizeof(*counter), in ni_gpct_device_construct()
1807 for (i = 0; i < num_counters; ++i) { in ni_gpct_device_construct()
/linux/net/ipv4/netfilter/
H A Darp_tables.c883 unsigned int num_counters, in __do_replace() argument
894 counters = xt_counters_alloc(num_counters); in __do_replace()
912 oldinfo = xt_replace_table(t, num_counters, newinfo, &ret); in __do_replace()
935 sizeof(struct xt_counters) * num_counters) != 0) { in __do_replace()
965 if (tmp.num_counters >= INT_MAX / sizeof(struct xt_counters)) in do_replace()
967 if (tmp.num_counters == 0) in do_replace()
990 tmp.num_counters, tmp.counters); in do_replace()
1026 if (private->number != tmp.num_counters) { in do_add_counters()
1060 u32 num_counters; member
1227 repl.num_counters = 0; in translate_compat_table()
[all …]
H A Dip_tables.c1037 struct xt_table_info *newinfo, unsigned int num_counters, in __do_replace() argument
1046 counters = xt_counters_alloc(num_counters); in __do_replace()
1064 oldinfo = xt_replace_table(t, num_counters, newinfo, &ret); in __do_replace()
1086 sizeof(struct xt_counters) * num_counters) != 0) { in __do_replace()
1117 if (tmp.num_counters >= INT_MAX / sizeof(struct xt_counters)) in do_replace()
1119 if (tmp.num_counters == 0) in do_replace()
1142 tmp.num_counters, tmp.counters); in do_replace()
1179 if (private->number != tmp.num_counters) { in do_add_counters()
1212 u32 num_counters; member
1464 repl.num_counters in translate_compat_table()
[all...]
/linux/arch/x86/kvm/vmx/
H A Dpmu_intel.c84 unsigned int num_counters; in intel_rdpmc_ecx_to_pmc() local
111 num_counters = pmu->nr_arch_fixed_counters; in intel_rdpmc_ecx_to_pmc()
116 num_counters = pmu->nr_arch_gp_counters; in intel_rdpmc_ecx_to_pmc()
124 if (idx >= num_counters) in intel_rdpmc_ecx_to_pmc()
128 return &counters[array_index_nospec(idx, num_counters)]; in intel_rdpmc_ecx_to_pmc()
535 pmu->nr_arch_gp_counters = min_t(int, eax.split.num_counters, in intel_pmu_refresh()
/linux/net/ipv6/netfilter/
H A Dip6_tables.c1054 struct xt_table_info *newinfo, unsigned int num_counters, in __do_replace() argument
1063 counters = xt_counters_alloc(num_counters); in __do_replace()
1081 oldinfo = xt_replace_table(t, num_counters, newinfo, &ret); in __do_replace()
1103 sizeof(struct xt_counters) * num_counters) != 0) { in __do_replace()
1134 if (tmp.num_counters >= INT_MAX / sizeof(struct xt_counters)) in do_replace()
1136 if (tmp.num_counters == 0) in do_replace()
1159 tmp.num_counters, tmp.counters); in do_replace()
1195 if (private->number != tmp.num_counters) { in do_add_counters()
1228 u32 num_counters; member
1473 repl.num_counters in translate_compat_table()
[all...]
/linux/drivers/acpi/
H A Dsysfs.c583 static u32 num_counters; variable
744 for (i = 0; i < num_counters; ++i) in counter_set()
865 num_counters = num_gpes + ACPI_NUM_FIXED_EVENTS + NUM_COUNTERS_EXTRA; in acpi_irq_stats_init()
867 all_attrs = kcalloc(num_counters + 1, sizeof(*all_attrs), GFP_KERNEL); in acpi_irq_stats_init()
871 all_counters = kcalloc(num_counters, sizeof(*all_counters), GFP_KERNEL); in acpi_irq_stats_init()
879 counter_attrs = kcalloc(num_counters, sizeof(*counter_attrs), GFP_KERNEL); in acpi_irq_stats_init()
883 for (i = 0; i < num_counters; ++i) { in acpi_irq_stats_init()
/linux/include/uapi/linux/netfilter_bridge/
H A Debtables.h54 unsigned int num_counters; member
70 unsigned int num_counters; member
/linux/include/rdma/
H A Drdma_counter.h32 unsigned int num_counters;
31 unsigned int num_counters; global() member
/linux/drivers/net/ethernet/mellanox/mlx5/core/
H A Dfs_counters.c199 int num_counters = 0; in mlx5_fc_num_counters() local
203 num_counters++; in mlx5_fc_num_counters()
204 return num_counters; in mlx5_fc_num_counters()
/linux/include/linux/netfilter/
H A Dx_tables.h305 unsigned int num_counters,
490 compat_uint_t num_counters; member

123