Home
last modified time | relevance | path

Searched refs:num_cpus (Results 1 – 25 of 99) sorted by relevance

1234

/linux-6.1.9/tools/testing/selftests/bpf/prog_tests/
Dfor_each.c17 __u32 key, num_cpus; in test_hash_map() local
39 num_cpus = bpf_num_possible_cpus(); in test_hash_map()
40 percpu_val_sz = sizeof(__u64) * num_cpus; in test_hash_map()
46 for (i = 0; i < num_cpus; i++) in test_hash_map()
67 ASSERT_LT(skel->bss->cpu, num_cpus, "num_cpus"); in test_hash_map()
79 __u32 key, num_cpus, max_entries; in test_array_map() local
109 num_cpus = bpf_num_possible_cpus(); in test_array_map()
110 percpu_val_sz = sizeof(__u64) * num_cpus; in test_array_map()
116 for (i = 0; i < num_cpus; i++) in test_array_map()
/linux-6.1.9/drivers/net/ethernet/freescale/dpaa/
Ddpaa_ethtool.c194 static void copy_stats(struct dpaa_percpu_priv *percpu_priv, int num_cpus, in copy_stats() argument
197 int num_values = num_cpus + 1; in copy_stats()
202 data[crr++ * num_values + num_cpus] += percpu_priv->in_interrupt; in copy_stats()
205 data[crr++ * num_values + num_cpus] += percpu_priv->stats.rx_packets; in copy_stats()
208 data[crr++ * num_values + num_cpus] += percpu_priv->stats.tx_packets; in copy_stats()
211 data[crr++ * num_values + num_cpus] += percpu_priv->tx_confirm; in copy_stats()
214 data[crr++ * num_values + num_cpus] += percpu_priv->tx_frag_skbuffs; in copy_stats()
217 data[crr++ * num_values + num_cpus] += percpu_priv->stats.tx_errors; in copy_stats()
220 data[crr++ * num_values + num_cpus] += percpu_priv->stats.rx_errors; in copy_stats()
223 data[crr++ * num_values + num_cpus] += percpu_priv->stats.rx_dropped; in copy_stats()
[all …]
/linux-6.1.9/arch/sparc/kernel/
Dcpumap.c35 int num_cpus; /* Number of CPUs in this hierarchy */ member
190 int num_cpus[CPUINFO_LVL_MAX]; in build_cpuinfo_tree() local
220 node->num_cpus = 1; in build_cpuinfo_tree()
230 num_cpus[level] = 1; in build_cpuinfo_tree()
253 node->num_cpus = num_cpus[level]; in build_cpuinfo_tree()
254 num_cpus[level] = 1; in build_cpuinfo_tree()
257 node->num_cpus++; in build_cpuinfo_tree()
288 num_cpus[level]++; in build_cpuinfo_tree()
368 for (i = 0; i < cpuinfo_tree->nodes[0].num_cpus; i++) in _cpu_map_rebuild()
406 if (unlikely(root_node->num_cpus != num_online_cpus())) { in _map_to_cpu()
[all …]
/linux-6.1.9/drivers/acpi/
Dacpi_pad.c257 static void acpi_pad_idle_cpus(unsigned int num_cpus) in acpi_pad_idle_cpus() argument
261 num_cpus = min_t(unsigned int, num_cpus, num_online_cpus()); in acpi_pad_idle_cpus()
262 set_power_saving_task_num(num_cpus); in acpi_pad_idle_cpus()
396 int num_cpus; in acpi_pad_handle_notify() local
404 num_cpus = acpi_pad_pur(handle); in acpi_pad_handle_notify()
405 if (num_cpus < 0) { in acpi_pad_handle_notify()
409 acpi_pad_idle_cpus(num_cpus); in acpi_pad_handle_notify()
/linux-6.1.9/drivers/pci/controller/
Dpci-xgene-msi.c41 int num_cpus; member
164 return (hwirq % xgene_msi_ctrl.num_cpus); in hwirq_to_cpu()
203 msi->num_cpus, 0); in xgene_irq_domain_alloc()
205 bitmap_set(msi->bitmap, msi_irq, msi->num_cpus); in xgene_irq_domain_alloc()
231 bitmap_clear(msi->bitmap, hwirq, msi->num_cpus); in xgene_irq_domain_free()
377 for (i = cpu; i < NR_HW_IRQS; i += msi->num_cpus) { in xgene_msi_hwirq_alloc()
418 for (i = cpu; i < NR_HW_IRQS; i += msi->num_cpus) { in xgene_msi_hwirq_free()
454 xgene_msi->num_cpus = num_possible_cpus(); in xgene_msi_probe()
/linux-6.1.9/tools/testing/selftests/net/
Dtoeplitz.c82 static int num_cpus; variable
249 for (i = 0; i < num_cpus; i++) in process_rings()
374 if (cfg_num_queues || num_cpus > 256 || in create_ring()
403 for (i = 0; i < num_cpus; i++) { in setup_rings()
409 for (i = 0; i < num_cpus; i++) in setup_rings()
417 for (i = 0; i < num_cpus; i++) { in cleanup_rings()
555 num_cpus = get_nprocs(); in parse_opts()
556 if (num_cpus > RSS_MAX_CPUS) in parse_opts()
/linux-6.1.9/tools/testing/selftests/bpf/progs/
Dbpf_iter_bpf_percpu_array_map.c23 volatile const __u32 num_cpus = 0; variable
41 for (i = 0; i < num_cpus; i++) { in dump_bpf_percpu_array_map()
Dbpf_iter_bpf_percpu_hash_map.c23 volatile const __u32 num_cpus = 0; variable
45 for (i = 0; i < num_cpus; i++) { in dump_bpf_percpu_hash_map()
/linux-6.1.9/drivers/infiniband/sw/siw/
Dsiw_main.c190 int i, num_cpus, cpu, min_use, node = sdev->numa_node, tx_cpu = -1; in siw_get_tx_cpu() local
197 num_cpus = cpumask_weight(tx_cpumask); in siw_get_tx_cpu()
198 if (!num_cpus) { in siw_get_tx_cpu()
201 num_cpus = cpumask_weight(tx_cpumask); in siw_get_tx_cpu()
203 if (!num_cpus) in siw_get_tx_cpu()
208 for (i = 0, min_use = SIW_MAX_QP; i < num_cpus; in siw_get_tx_cpu()
/linux-6.1.9/drivers/thermal/
Dcpufreq_cooling.c265 unsigned int freq, num_cpus, idx; in cpufreq_state2power() local
272 num_cpus = cpumask_weight(cpufreq_cdev->policy->cpus); in cpufreq_state2power()
276 *power = cpu_freq_to_power(cpufreq_cdev, freq) * num_cpus; in cpufreq_state2power()
354 unsigned int num_cpus = cpumask_weight(cpufreq_cdev->policy->related_cpus); in allocate_idle_time() local
356 cpufreq_cdev->idle_time = kcalloc(num_cpus, in allocate_idle_time()
/linux-6.1.9/arch/parisc/kernel/
Dalternative.c28 int num_cpus = num_online_cpus(); in apply_alternatives() local
32 ((num_cpus == 1) ? ALT_COND_NO_SMP : 0) | in apply_alternatives()
/linux-6.1.9/arch/powerpc/platforms/pseries/
Drtas-fadump.c316 u32 num_cpus, *note_buf; in rtas_fadump_build_cpu_notes() local
337 num_cpus = be32_to_cpu(*((__be32 *)(vaddr))); in rtas_fadump_build_cpu_notes()
338 pr_debug("NumCpus : %u\n", num_cpus); in rtas_fadump_build_cpu_notes()
342 rc = fadump_setup_cpu_notes_buf(num_cpus); in rtas_fadump_build_cpu_notes()
351 for (i = 0; i < num_cpus; i++) { in rtas_fadump_build_cpu_notes()
/linux-6.1.9/tools/perf/tests/
Dexpr.c72 double val, num_cpus, num_cores, num_dies, num_packages; in test__expr() local
198 TEST_ASSERT_VAL("#num_cpus", expr__parse(&num_cpus, ctx, "#num_cpus") == 0); in test__expr()
200 TEST_ASSERT_VAL("#num_cpus >= #num_cores", num_cpus >= num_cores); in test__expr()
/linux-6.1.9/sound/soc/intel/boards/
Dsof_ssp_amp.c246 links[id].num_cpus = 1; in sof_card_dai_links_create()
270 links[id].num_cpus = 1; in sof_card_dai_links_create()
294 links[id].num_cpus = 1; in sof_card_dai_links_create()
324 links[id].num_cpus = 1; in sof_card_dai_links_create()
375 links[id].num_cpus = 1; in sof_card_dai_links_create()
Dsof_cs42l42.c341 links[*id].num_cpus = 1; in create_spk_amp_dai_links()
379 links[*id].num_cpus = 1; in create_hp_codec_dai_links()
421 links[*id].num_cpus = 1; in create_dmic_dai_links()
462 links[*id].num_cpus = 1; in create_hdmi_dai_links()
519 links[*id].num_cpus = 1; in create_bt_offload_dai_links()
Dsof_nau8825.c384 links[id].num_cpus = 1; in sof_card_dai_links_create()
412 links[id].num_cpus = 1; in sof_card_dai_links_create()
440 links[id].num_cpus = 1; in sof_card_dai_links_create()
498 links[id].num_cpus = 1; in sof_card_dai_links_create()
528 links[id].num_cpus = 1; in sof_card_dai_links_create()
Dsof_pcm512x.c257 links[id].num_cpus = 1; in sof_card_dai_links_create()
291 links[id].num_cpus = 1; in sof_card_dai_links_create()
318 links[id].num_cpus = 1; in sof_card_dai_links_create()
/linux-6.1.9/sound/soc/amd/acp/
Dacp-mach-common.c595 links[i].num_cpus = ARRAY_SIZE(sof_sp); in acp_sofdsp_dai_links_create()
626 links[i].num_cpus = ARRAY_SIZE(sof_hs); in acp_sofdsp_dai_links_create()
657 links[i].num_cpus = ARRAY_SIZE(sof_sp); in acp_sofdsp_dai_links_create()
689 links[i].num_cpus = ARRAY_SIZE(sof_hs); in acp_sofdsp_dai_links_create()
723 links[i].num_cpus = ARRAY_SIZE(sof_dmic); in acp_sofdsp_dai_links_create()
760 links[i].num_cpus = ARRAY_SIZE(i2s_sp); in acp_legacy_dai_links_create()
789 links[i].num_cpus = ARRAY_SIZE(i2s_hs); in acp_legacy_dai_links_create()
823 links[i].num_cpus = ARRAY_SIZE(i2s_sp); in acp_legacy_dai_links_create()
853 links[i].num_cpus = ARRAY_SIZE(i2s_hs); in acp_legacy_dai_links_create()
896 links[i].num_cpus = ARRAY_SIZE(pdm_dmic); in acp_legacy_dai_links_create()
/linux-6.1.9/arch/powerpc/platforms/powernv/
Dopal-fadump.c423 u32 num_cpus = 1, *note_buf; in opal_fadump_build_cpu_notes() local
430 num_cpus = (fadump_conf->cpu_state_data_size / size_per_thread); in opal_fadump_build_cpu_notes()
435 rc = fadump_setup_cpu_notes_buf(num_cpus); in opal_fadump_build_cpu_notes()
455 pr_debug("NumCpus : %u\n", num_cpus); in opal_fadump_build_cpu_notes()
459 for (i = 0; i < num_cpus; i++, bufp += size_per_thread) { in opal_fadump_build_cpu_notes()
Dopal-core.c35 u32 num_cpus; member
246 pr_debug("NumCpus : %u\n", oc_conf->num_cpus); in opalcore_append_cpu_notes()
258 for (i = 0; i < oc_conf->num_cpus; i++, bufp += size_per_thread) { in opalcore_append_cpu_notes()
315 cpu_notes_size = ((oc_conf->num_cpus * (CRASH_CORE_NOTE_HEAD_BYTES + in create_opalcore()
557 oc_conf->num_cpus = (oc_conf->cpu_state_data_size / in opalcore_config_init()
/linux-6.1.9/kernel/power/
Denergy_model.c204 int cpu, ret, num_cpus; in em_create_pd() local
207 num_cpus = cpumask_weight(cpus); in em_create_pd()
210 if (num_cpus > EM_MAX_NUM_CPUS) { in em_create_pd()
/linux-6.1.9/tools/perf/util/bpf_skel/
Dbperf_cgroup.bpf.c59 const volatile __u32 num_cpus = 1; variable
179 key = idx * num_cpus + cpu; in bperf_cgroup_count()
/linux-6.1.9/sound/soc/
Dsoc-generic-dmaengine-pcm.c57 if (rtd->dai_link->num_cpus > 1) { in snd_dmaengine_pcm_prepare_slave_config()
108 if (rtd->dai_link->num_cpus > 1) { in dmaengine_pcm_set_runtime_hwparams()
182 if (rtd->dai_link->num_cpus > 1) { in dmaengine_pcm_compat_request_channel()
/linux-6.1.9/arch/arm64/mm/
Dproc.S262 num_cpus .req w1
289 eor w17, w17, num_cpus
354 .unreq num_cpus
/linux-6.1.9/arch/ia64/kernel/
Diosapic.c651 int num_cpus, cpu_index, iosapic_index, numa_cpu, i = 0; in get_target_cpu() local
660 num_cpus = 0; in get_target_cpu()
663 num_cpus++; in get_target_cpu()
666 if (!num_cpus) in get_target_cpu()
670 cpu_index = irq % num_cpus; in get_target_cpu()

1234