| /linux/kernel/gcov/ |
| H A D | clang.c | 74 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/tools/testing/selftests/kvm/riscv/ |
| H A D | sbi_pmu_test.c | 207 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 D | uncore.c | 50 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 D | uncore_snbep.c | 875 .num_counters = 2, 1032 .num_counters = 4, 1142 .num_counters = 4, 1235 .num_counters = 4, 1243 .num_counters = 4, 1255 .num_counters = 4, 1271 .num_counters = 4, 1280 .num_counters = 3, 1661 .num_counters = 2, 1792 .num_counters = 4, [all …]
|
| /linux/drivers/infiniband/hw/mlx5/ |
| H A D | counters.c | 394 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/net/bridge/netfilter/ |
| H A D | ebtables.c | 1020 if (repl->num_counters) { in do_replace_finish() 1021 counterstmp = vmalloc_array(repl->num_counters, 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(num_counters, sizeof(*tmp)); in do_update_counters() [all …]
|
| /linux/drivers/net/ethernet/marvell/prestera/ |
| H A D | prestera_counter.c | 28 u32 num_counters; member 156 &block->num_counters); in prestera_counter_block_get() 160 block->stats = kzalloc_objs(*block->stats, block->num_counters); in prestera_counter_block_get() 166 block->counter_flag = kcalloc(block->num_counters, in prestera_counter_block_get() 235 block->offset + block->num_counters, in prestera_counter_get_vacant() 380 if (!done || counter->total_read < block->num_counters) { in prestera_counter_stats_work() 385 for (i = 0; i < block->num_counters; i++) { in prestera_counter_stats_work()
|
| /linux/arch/loongarch/kernel/ |
| H A D | perf_event.c | 135 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() 668 int counters = loongarch_pmu.num_counters; in reset_counters() 830 int ctr = loongarch_pmu.num_counters; in pause_local_counters() 845 int ctr = loongarch_pmu.num_counters; in resume_local_counters() 872 loongarch_pmu.num_counters = counters; in init_hw_perf_events()
|
| /linux/drivers/perf/ |
| H A D | fujitsu_uncore_pmu.c | 55 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 D | arm_smmuv3_pmu.c | 130 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 D | riscv_pmu_sbi.c | 1426 int num_counters; in pmu_sbi_device_probe() local 1433 num_counters = pmu_sbi_find_num_ctrs(); in pmu_sbi_device_probe() 1434 if (num_counters < 0) { in pmu_sbi_device_probe() 1440 if (num_counters > RISCV_MAX_COUNTERS) { in pmu_sbi_device_probe() 1441 num_counters = RISCV_MAX_COUNTERS; in pmu_sbi_device_probe() 1442 …rned more than maximum number of counters. Limiting the number of counters to %d\n", num_counters); in pmu_sbi_device_probe() 1446 if (pmu_sbi_get_ctrinfo(num_counters, &cmask)) in pmu_sbi_device_probe()
|
| /linux/drivers/perf/hisilicon/ |
| H A D | hisi_uncore_pmu.c | 127 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 D | hisi_uncore_noc_pmu.c | 84 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/drivers/infiniband/core/ |
| H A D | sysfs.c | 772 if (ret == stats->num_counters) in update_hw_stats() 851 if (!stats->descs || stats->num_counters <= 0) in alloc_hw_stats_device() 858 data = kzalloc_flex(*data, attrs, size_add(stats->num_counters, 1)); in alloc_hw_stats_device() 862 stats->num_counters + 2); in alloc_hw_stats_device() 900 data->stats->num_counters); in ib_setup_device_attrs() 901 if (ret != data->stats->num_counters) { in ib_setup_device_attrs() 909 for (i = 0; i < data->stats->num_counters; i++) { in ib_setup_device_attrs() 957 if (!stats->descs || stats->num_counters <= 0) in alloc_hw_stats_port() 964 data = kzalloc_flex(*data, attrs, size_add(stats->num_counters, 1)); in alloc_hw_stats_port() 967 group->attrs = kzalloc_objs(*group->attrs, stats->num_counters + 2); in alloc_hw_stats_port() [all …]
|
| /linux/drivers/memory/samsung/ |
| H A D | exynos5422-dmc.c | 183 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 D | ni_tio.h | 109 unsigned int num_counters; member 124 unsigned int num_counters,
|
| H A D | ni_tio.c | 1770 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 = kzalloc_objs(*counter, num_counters); in ni_gpct_device_construct() 1806 for (i = 0; i < num_counters; ++i) { in ni_gpct_device_construct()
|
| /linux/net/ipv4/netfilter/ |
| H A D | arp_tables.c | 883 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 D | ip_tables.c | 1037 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/net/ipv6/netfilter/ |
| H A D | ip6_tables.c | 1054 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 D | sysfs.c | 583 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 = kzalloc_objs(*all_attrs, num_counters + 1); in acpi_irq_stats_init() 871 all_counters = kzalloc_objs(*all_counters, num_counters); in acpi_irq_stats_init() 879 counter_attrs = kzalloc_objs(*counter_attrs, num_counters); 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 D | ebtables.h | 54 unsigned int num_counters; member 70 unsigned int num_counters; member
|
| /linux/include/rdma/ |
| H A D | rdma_counter.h | 32 unsigned int num_counters; 31 unsigned int num_counters; global() member
|
| /linux/drivers/net/ethernet/mellanox/mlx5/core/ |
| H A D | fs_counters.c | 200 int num_counters = 0; in mlx5_fc_num_counters() local 204 num_counters++; in mlx5_fc_num_counters() 205 return num_counters; in mlx5_fc_num_counters()
|
| /linux/include/linux/netfilter/ |
| H A D | x_tables.h | 305 unsigned int num_counters, 490 compat_uint_t num_counters; member
|