Home
last modified time | relevance | path

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

1234

/linux-6.12.1/tools/testing/selftests/kvm/riscv/
Dsbi_pmu_test.c188 static void update_counter_info(int num_counters) in update_counter_info() argument
193 for (i = 0; i < num_counters; i++) { in update_counter_info()
397 int num_counters = 0; in test_pmu_events() local
400 num_counters = get_num_counters(); in test_pmu_events()
401 update_counter_info(num_counters); in test_pmu_events()
418 int num_counters = 0, i; in test_pmu_basic_sanity() local
424 num_counters = get_num_counters(); in test_pmu_basic_sanity()
426 for (i = 0; i < num_counters; i++) { in test_pmu_basic_sanity()
454 int num_counters = 0; in test_pmu_events_snaphost() local
464 num_counters = get_num_counters(); in test_pmu_events_snaphost()
[all …]
/linux-6.12.1/kernel/gcov/
Dclang.c74 u32 num_counters; member
128 void llvm_gcda_emit_arcs(u32 num_counters, u64 *counters) in llvm_gcda_emit_arcs() argument
133 info->num_counters = num_counters; in llvm_gcda_emit_arcs()
231 sizeof(fn->counters[0]) * fn->num_counters); in gcov_info_reset()
281 for (i = 0; i < sfn_ptr->num_counters; i++) in gcov_info_add()
297 cv_size = fn->num_counters * sizeof(fn->counters[0]); in gcov_fn_info_dup()
387 pos += store_gcov_u32(buffer, pos, fi_ptr->num_counters * 2); in convert_to_gcda()
388 for (i = 0; i < fi_ptr->num_counters; i++) in convert_to_gcda()
/linux-6.12.1/arch/x86/events/amd/
Duncore.c46 int num_counters; member
155 for (i = 0; i < pmu->num_counters; i++) { in amd_uncore_add()
164 for (i = 0; i < pmu->num_counters; i++) { in amd_uncore_add()
200 for (i = 0; i < pmu->num_counters; i++) { in amd_uncore_del()
487 pmu->num_counters, in amd_uncore_ctx_init()
661 int num_counters; in amd_uncore_df_ctx_init() local
667 num_counters = amd_uncore_ctx_num_pmcs(uncore, cpu); in amd_uncore_df_ctx_init()
668 if (!num_counters) in amd_uncore_df_ctx_init()
684 pmu->num_counters = num_counters; in amd_uncore_df_ctx_init()
720 pr_info("%d %s%s counters detected\n", pmu->num_counters, in amd_uncore_df_ctx_init()
[all …]
/linux-6.12.1/drivers/perf/
Darm_dsu_pmu.c121 s8 num_counters; member
226 return (idx < dsu_pmu->num_counters) || in dsu_pmu_counter_valid()
295 idx = find_first_zero_bit(used_mask, dsu_pmu->num_counters); in dsu_pmu_get_event_idx()
296 if (idx >= dsu_pmu->num_counters) in dsu_pmu_get_event_idx()
583 dsu_pmu->num_counters = -1; in dsu_pmu_alloc()
652 u64 num_counters; in dsu_pmu_probe_pmu() local
655 num_counters = (__dsu_pmu_read_pmcr() >> CLUSTERPMCR_N_SHIFT) & in dsu_pmu_probe_pmu()
658 if (WARN_ON(num_counters > 31)) in dsu_pmu_probe_pmu()
659 num_counters = 31; in dsu_pmu_probe_pmu()
660 dsu_pmu->num_counters = num_counters; in dsu_pmu_probe_pmu()
[all …]
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()
441 if (++group_num_events > smmu_pmu->num_counters) in smmu_pmu_event_init()
699 for_each_set_bit(idx, ovs, smmu_pmu->num_counters) { in smmu_pmu_handle_irq()
777 u64 counter_present_mask = GENMASK_ULL(smmu_pmu->num_counters - 1, 0); in smmu_pmu_reset()
901 smmu_pmu->num_counters = FIELD_GET(SMMU_PMCG_CFGR_NCTR, cfgr) + 1; in smmu_pmu_probe()
[all …]
Dqcom_l2_pmu.c113 int num_counters; member
344 int num_ctrs = cluster->l2cache_pmu->num_counters - 1; in l2_cache_get_event_idx()
388 int num_counters = cluster->l2cache_pmu->num_counters; in l2_cache_handle_irq() local
396 for_each_set_bit(idx, cluster->used_counters, num_counters) { in l2_cache_handle_irq()
919 l2cache_pmu->num_counters = get_num_counters(); in l2_cache_pmu_probe()
926 l2_cycle_ctr_idx = l2cache_pmu->num_counters - 1; in l2_cache_pmu_probe()
927 l2_counter_present_mask = GENMASK(l2cache_pmu->num_counters - 2, 0) | in l2_cache_pmu_probe()
/linux-6.12.1/arch/x86/events/intel/
Duncore_snb.c329 .num_counters = 2,
347 .num_counters = 2,
407 .num_counters = 4,
445 .num_counters = 2,
472 .num_counters = 1,
486 .num_counters = 1,
590 .num_counters = 2,
602 .num_counters = 2,
616 .num_counters = 1,
643 .num_counters = 2,
[all …]
Duncore_snbep.c890 .num_counters = 2,
1047 .num_counters = 4,
1157 .num_counters = 4,
1250 .num_counters = 4,
1258 .num_counters = 4,
1270 .num_counters = 4,
1286 .num_counters = 4,
1295 .num_counters = 3,
1676 .num_counters = 2,
1807 .num_counters = 4,
[all …]
/linux-6.12.1/drivers/infiniband/hw/mlx5/
Dcounters.c375 int ret, num_counters; in do_get_hw_stats() local
380 num_counters = cnts->num_q_counters + in do_get_hw_stats()
427 return num_counters; in do_get_hw_stats()
486 int num_counters, num_hw_counters, num_op_counters; in mlx5_ib_get_hw_stats() local
493 num_counters = num_hw_counters + cnts->num_op_counters; in mlx5_ib_get_hw_stats()
495 if (index < 0 || index > num_counters) in mlx5_ib_get_hw_stats()
499 else if (index >= num_hw_counters && index < num_counters) in mlx5_ib_get_hw_stats()
688 u32 num_counters, num_op_counters = 0, size; in __mlx5_ib_alloc_counters() local
692 num_counters = size; in __mlx5_ib_alloc_counters()
697 num_counters += size; in __mlx5_ib_alloc_counters()
[all …]
/linux-6.12.1/arch/loongarch/kernel/
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()
508 for (n = 0; n < loongarch_pmu.num_counters; n++) { in pmu_handle_irq()
654 int counters = loongarch_pmu.num_counters; in reset_counters()
816 int ctr = loongarch_pmu.num_counters; in pause_local_counters()
831 int ctr = loongarch_pmu.num_counters; in resume_local_counters()
857 loongarch_pmu.num_counters = counters; in init_hw_perf_events()
/linux-6.12.1/drivers/perf/hisilicon/
Dhisi_uncore_pmu.c81 return counters <= hisi_pmu->num_counters; in hisi_validate_event_group()
88 u32 num_counters = hisi_pmu->num_counters; in hisi_uncore_pmu_get_event_idx() local
91 idx = find_first_zero_bit(used_mask, num_counters); in hisi_uncore_pmu_get_event_idx()
92 if (idx == num_counters) in hisi_uncore_pmu_get_event_idx()
131 for_each_set_bit(idx, &overflown, hisi_pmu->num_counters) { in hisi_uncore_pmu_isr()
385 hisi_pmu->num_counters); in hisi_uncore_pmu_enable()
/linux-6.12.1/drivers/net/ethernet/marvell/prestera/
Dprestera_counter.c28 u32 num_counters; member
156 &block->num_counters); in prestera_counter_block_get()
160 block->stats = kcalloc(block->num_counters, in prestera_counter_block_get()
167 block->counter_flag = kcalloc(block->num_counters, in prestera_counter_block_get()
236 block->offset + block->num_counters, in prestera_counter_get_vacant()
382 if (!done || counter->total_read < block->num_counters) { in prestera_counter_stats_work()
387 for (i = 0; i < block->num_counters; i++) { in prestera_counter_stats_work()
/linux-6.12.1/net/bridge/netfilter/
Debtables.c1020 if (repl->num_counters) { in do_replace_finish()
1021 unsigned long size = repl->num_counters * sizeof(*counterstmp); in do_replace_finish()
1048 if (repl->num_counters && repl->num_counters != t->private->nentries) { in do_replace_finish()
1063 if (repl->num_counters) in do_replace_finish()
1075 if (repl->num_counters && in do_replace_finish()
1077 array_size(repl->num_counters, sizeof(struct ebt_counter)))) { in do_replace_finish()
1129 if (tmp.num_counters >= INT_MAX / sizeof(struct ebt_counter)) in do_replace()
1380 unsigned int num_counters, unsigned int len) in do_update_counters() argument
1386 if (num_counters == 0) in do_update_counters()
1389 tmp = vmalloc(array_size(num_counters, sizeof(*tmp))); in do_update_counters()
[all …]
/linux-6.12.1/drivers/infiniband/core/
Dcounters.c20 if (port_counter->num_counters) in __counter_set_mode()
58 mode = (port_counter->num_counters) ? RDMA_COUNTER_MODE_MANUAL : in rdma_counter_set_auto_mode()
119 if (!stats || index >= stats->num_counters || in rdma_counter_modify()
184 port_counter->num_counters++; in alloc_and_bind()
213 port_counter->num_counters--; in rdma_counter_free()
214 if (!port_counter->num_counters && in rdma_counter_free()
268 for (i = 0; i < counter->stats->num_counters; i++) in counter_history_stat_update()
Dsysfs.c824 if (ret == stats->num_counters) in update_hw_stats()
903 if (!stats->descs || stats->num_counters <= 0) in alloc_hw_stats_device()
910 data = kzalloc(struct_size(data, attrs, size_add(stats->num_counters, 1)), in alloc_hw_stats_device()
914 data->group.attrs = kcalloc(stats->num_counters + 2, in alloc_hw_stats_device()
953 data->stats->num_counters); in ib_setup_device_attrs()
954 if (ret != data->stats->num_counters) { in ib_setup_device_attrs()
962 for (i = 0; i < data->stats->num_counters; i++) { in ib_setup_device_attrs()
1009 if (!stats->descs || stats->num_counters <= 0) in alloc_hw_stats_port()
1016 data = kzalloc(struct_size(data, attrs, size_add(stats->num_counters, 1)), in alloc_hw_stats_port()
1020 group->attrs = kcalloc(stats->num_counters + 2, in alloc_hw_stats_port()
[all …]
/linux-6.12.1/arch/x86/kvm/svm/
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-6.12.1/arch/x86/kvm/vmx/
Dpmu_intel.c64 unsigned int num_counters; in intel_rdpmc_ecx_to_pmc() local
91 num_counters = pmu->nr_arch_fixed_counters; in intel_rdpmc_ecx_to_pmc()
96 num_counters = pmu->nr_arch_gp_counters; in intel_rdpmc_ecx_to_pmc()
104 if (idx >= num_counters) in intel_rdpmc_ecx_to_pmc()
108 return &counters[array_index_nospec(idx, num_counters)]; in intel_rdpmc_ecx_to_pmc()
490 pmu->nr_arch_gp_counters = min_t(int, eax.split.num_counters, in intel_pmu_refresh()
/linux-6.12.1/drivers/comedi/drivers/
Dni_tio.h109 unsigned int num_counters; member
124 unsigned int num_counters,
/linux-6.12.1/drivers/memory/samsung/
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-6.12.1/net/ipv4/netfilter/
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 …]
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 = 0; in translate_compat_table()
[all …]
/linux-6.12.1/net/ipv6/netfilter/
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 = 0; in translate_compat_table()
[all …]
/linux-6.12.1/drivers/acpi/
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-6.12.1/drivers/infiniband/hw/bnxt_re/
Dhw_counters.c382 int num_counters = 0; in bnxt_re_ib_alloc_hw_port_stats() local
385 num_counters = BNXT_RE_NUM_EXT_COUNTERS; in bnxt_re_ib_alloc_hw_port_stats()
387 num_counters = BNXT_RE_NUM_STD_COUNTERS; in bnxt_re_ib_alloc_hw_port_stats()
389 return rdma_alloc_hw_stats_struct(bnxt_re_stat_descs, num_counters, in bnxt_re_ib_alloc_hw_port_stats()
/linux-6.12.1/include/uapi/linux/netfilter_bridge/
Debtables.h54 unsigned int num_counters; member
70 unsigned int num_counters; member

1234