Home
last modified time | relevance | path

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

123456

/openbmc/openbmc/meta-openembedded/meta-oe/recipes-extended/zram/zram/
H A Dinit19 num_cpus=$(grep -c processor /proc/cpuinfo)
21 [ "$num_cpus" != 0 ] || num_cpus=1
24 last_cpu=$((num_cpus - 1))
34 mem_by_cpu=$(($memtotal/$num_cpus*$factor/100*1024))
37 modprobe zram num_devices=$num_cpus
53 num_cpus=$(grep -c processor /proc/cpuinfo)
56 last_cpu=$((num_cpus - 1))
/openbmc/linux/drivers/net/ethernet/freescale/dpaa/
H A Ddpaa_ethtool.c139 int num_values = num_cpus + 1; in copy_stats()
153 data[crr++ * num_values + num_cpus] += percpu_priv->tx_confirm; in copy_stats()
171 data[crr++ * num_values + num_cpus] += bp_count; in copy_stats()
179 unsigned int num_cpus, offset; in dpaa_get_ethtool_stats() local
189 num_cpus = num_online_cpus(); in dpaa_get_ethtool_stats()
216 copy_stats(percpu_priv, num_cpus, i, bp_count, data); in dpaa_get_ethtool_stats()
219 offset = (num_cpus + 1) * (DPAA_STATS_PERCPU_LEN + 1); in dpaa_get_ethtool_stats()
246 unsigned int i, j, num_cpus, size; in dpaa_get_strings() local
252 num_cpus = num_online_cpus(); in dpaa_get_strings()
256 for (j = 0; j < num_cpus; j++) { in dpaa_get_strings()
[all …]
/openbmc/linux/tools/testing/selftests/bpf/prog_tests/
H A 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()
/openbmc/openbmc/meta-arm/meta-arm/lib/oeqa/runtime/cases/
H A Dfvp_devices.py76 self.num_cpus = int(self.td.get('TEST_CPU_HOTPLUG_NUM_CPUS',
81 self.assertEqual(int(cpus), self.num_cpus)
83 if self.num_cpus > 1:
85 for i in range(self.num_cpus):
90 for i in range(self.num_cpus - 1):
93 self.assertFalse(self.disable_cpu(self.num_cpus - 1))
96 for i in range(self.num_cpus):
/openbmc/linux/arch/sparc/kernel/
H A 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 …]
/openbmc/qemu/hw/openrisc/
H A Dopenrisc_sim.c110 int num_cpus, uint64_t mem_size, in openrisc_create_fdt() argument
140 for (cpu = 0; cpu < num_cpus; cpu++) { in openrisc_create_fdt()
188 if (num_cpus > 1) { in openrisc_sim_net_init()
190 qdev_prop_set_uint32(splitter, "num-lines", num_cpus); in openrisc_sim_net_init()
192 for (i = 0; i < num_cpus; i++) { in openrisc_sim_net_init()
215 hwaddr size, int num_cpus, in openrisc_sim_ompic_init() argument
225 qdev_prop_set_uint32(dev, "num-cpus", num_cpus); in openrisc_sim_ompic_init()
229 for (i = 0; i < num_cpus; i++) { in openrisc_sim_ompic_init()
256 if (num_cpus > 1) { in openrisc_sim_serial_init()
258 qdev_prop_set_uint32(splitter, "num-lines", num_cpus); in openrisc_sim_serial_init()
[all …]
H A Dvirt.c112 if (num_cpus > 1) { in get_per_cpu_irq()
114 qdev_prop_set_uint32(splitter, "num-lines", num_cpus); in get_per_cpu_irq()
116 for (i = 0; i < num_cpus; i++) { in get_per_cpu_irq()
127 int num_cpus, uint64_t mem_size, in openrisc_create_fdt() argument
164 for (cpu = 0; cpu < num_cpus; cpu++) { in openrisc_create_fdt()
200 hwaddr size, int num_cpus, in openrisc_virt_ompic_init() argument
210 qdev_prop_set_uint32(dev, "num-cpus", num_cpus); in openrisc_virt_ompic_init()
214 for (i = 0; i < num_cpus; i++) { in openrisc_virt_ompic_init()
231 hwaddr size, int num_cpus, in openrisc_virt_serial_init() argument
295 hwaddr size, int num_cpus, in openrisc_virt_rtc_init() argument
[all …]
/openbmc/qemu/linux-user/alpha/
H A Dtarget_proc.h12 int num_cpus = sysconf(_SC_NPROCESSORS_ONLN); in open_cpuinfo() local
27 if (num_cpus >= sizeof(cpu_mask) * 8) { in open_cpuinfo()
30 cpu_mask = (1UL << num_cpus) - 1; in open_cpuinfo()
61 max_cpus, num_cpus, cpu_mask); in open_cpuinfo()
/openbmc/qemu/linux-user/s390x/
H A Dtarget_proc.h50 int num_cpus = sysconf(_SC_NPROCESSORS_ONLN); in show_cpu_summary() local
58 num_cpus); in show_cpu_summary()
72 for (i = 0; i < num_cpus; i++) { in show_cpu_summary()
98 int num_cpus = sysconf(_SC_NPROCESSORS_ONLN); in open_cpuinfo() local
102 for (i = 0; i < num_cpus; i++) { in open_cpuinfo()
/openbmc/u-boot/arch/x86/cpu/
H A Dmp_init.c33 static int num_cpus; variable
245 size = params->stack_size * num_cpus; in load_sipi_vector()
379 int num_aps = num_cpus - 1; in bsp_do_flight_plan()
514 num_cpus = cpu_get_count(cpu); in mp_init()
515 if (num_cpus < 0) { in mp_init()
516 debug("Cannot get number of CPUs: err=%d\n", num_cpus); in mp_init()
517 return num_cpus; in mp_init()
520 if (num_cpus < 2) in mp_init()
523 ret = check_cpu_devices(num_cpus); in mp_init()
532 ret = load_sipi_vector(&ap_count, num_cpus); in mp_init()
[all …]
/openbmc/qemu/hw/intc/
H A Dompic.c54 uint32_t num_cpus; member
121 if (s->num_cpus > OMPIC_MAX_CPUS) { in or1k_ompic_realize()
122 error_setg(errp, "Exceeded maximum CPUs %d", s->num_cpus); in or1k_ompic_realize()
126 for (i = 0; i < s->num_cpus; i++) { in or1k_ompic_realize()
132 DEFINE_PROP_UINT32("num-cpus", OR1KOMPICState, num_cpus, 1),
154 VMSTATE_UINT32(num_cpus, OR1KOMPICState),
/openbmc/qemu/linux-user/hppa/
H A Dtarget_proc.h11 int i, num_cpus; in open_cpuinfo() local
13 num_cpus = sysconf(_SC_NPROCESSORS_ONLN); in open_cpuinfo()
14 for (i = 0; i < num_cpus; i++) { in open_cpuinfo()
/openbmc/linux/drivers/acpi/
H A Dacpi_pad.c260 static void acpi_pad_idle_cpus(unsigned int num_cpus) in acpi_pad_idle_cpus() argument
264 num_cpus = min_t(unsigned int, num_cpus, num_online_cpus()); in acpi_pad_idle_cpus()
265 set_power_saving_task_num(num_cpus); in acpi_pad_idle_cpus()
399 int num_cpus; in acpi_pad_handle_notify() local
407 num_cpus = acpi_pad_pur(handle); in acpi_pad_handle_notify()
408 if (num_cpus < 0) { in acpi_pad_handle_notify()
412 acpi_pad_idle_cpus(num_cpus); in acpi_pad_handle_notify()
/openbmc/linux/drivers/pci/controller/
H A 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()
375 for (i = cpu; i < NR_HW_IRQS; i += msi->num_cpus) { in xgene_msi_hwirq_alloc()
416 for (i = cpu; i < NR_HW_IRQS; i += msi->num_cpus) { in xgene_msi_hwirq_free()
451 xgene_msi->num_cpus = num_possible_cpus(); in xgene_msi_probe()
/openbmc/qemu/hw/arm/
H A Darmsse.c64 int num_cpus; member
519 .num_cpus = 1,
540 .num_cpus = 2,
561 .num_cpus = 1,
594 if (info->num_cpus > 1) { in armsse_sys_config_value()
716 for (i = 0; i < info->num_cpus; i++) { in armsse_init()
863 if (info->num_cpus > 1) { in armsse_init()
900 if (info->num_cpus == 1) { in armsse_get_common_irq_in()
987 for (i = 0; i < info->num_cpus; i++) { in armsse_realize()
1087 if (info->num_cpus > 1) { in armsse_realize()
[all …]
H A Daspeed_ast27x0.c317 for (i = 0; i < sc->num_cpus; i++) { in aspeed_soc_ast2700_init()
404 qdev_prop_set_uint32(gicdev, "num-cpu", sc->num_cpus); in aspeed_soc_ast2700_gic_realize()
408 qlist_append_int(redist_region_count, sc->num_cpus); in aspeed_soc_ast2700_gic_realize()
417 for (i = 0; i < sc->num_cpus; i++) { in aspeed_soc_ast2700_gic_realize()
443 sysbus_connect_irq(gicbusdev, i + sc->num_cpus, in aspeed_soc_ast2700_gic_realize()
445 sysbus_connect_irq(gicbusdev, i + 2 * sc->num_cpus, in aspeed_soc_ast2700_gic_realize()
447 sysbus_connect_irq(gicbusdev, i + 3 * sc->num_cpus, in aspeed_soc_ast2700_gic_realize()
471 for (i = 0; i < sc->num_cpus; i++) { in aspeed_soc_ast2700_realize()
701 sc->num_cpus = 4; in aspeed_soc_ast2700_class_init()
/openbmc/qemu/linux-user/arm/
H A Dtarget_proc.h16 int num_cpus, len_part, len_var; in open_cpuinfo() local
64 num_cpus = sysconf(_SC_NPROCESSORS_ONLN); in open_cpuinfo()
65 for (int i = 0; i < num_cpus; i++) { in open_cpuinfo()
/openbmc/qemu/linux-user/riscv/
H A Dtarget_proc.h12 int num_cpus = sysconf(_SC_NPROCESSORS_ONLN); in open_cpuinfo() local
24 for (i = 0; i < num_cpus; i++) { in open_cpuinfo()
/openbmc/linux/tools/testing/selftests/bpf/progs/
H A 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()
H A 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()
/openbmc/linux/tools/testing/selftests/net/
H A 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()
/openbmc/linux/drivers/infiniband/sw/siw/
H A Dsiw_main.c166 int i, num_cpus, cpu, min_use, node = sdev->numa_node, tx_cpu = -1; in siw_get_tx_cpu() local
173 num_cpus = cpumask_weight(tx_cpumask); in siw_get_tx_cpu()
174 if (!num_cpus) { in siw_get_tx_cpu()
177 num_cpus = cpumask_weight(tx_cpumask); in siw_get_tx_cpu()
179 if (!num_cpus) in siw_get_tx_cpu()
184 for (i = 0, min_use = SIW_MAX_QP; i < num_cpus; in siw_get_tx_cpu()
/openbmc/linux/drivers/net/ethernet/intel/ice/
H A Dice_irq.c139 int num_cpus, hw_num_msix, v_other, v_wanted, v_actual; in ice_ena_msix_range() local
144 num_cpus = num_online_cpus(); in ice_ena_msix_range()
159 pf->num_lan_msix = num_cpus; in ice_ena_msix_range()
164 pf->num_rdma_msix = num_cpus + ICE_RDMA_NUM_AEQ_MSIX; in ice_ena_msix_range()
/openbmc/linux/drivers/thermal/
H A 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()
/openbmc/linux/arch/parisc/kernel/
H A Dalternative.c28 int num_cpus = num_present_cpus(); in apply_alternatives() local
32 ((num_cpus == 1) ? ALT_COND_NO_SMP : 0) | in apply_alternatives()

123456