Home
last modified time | relevance | path

Searched refs:ncpus (Results 1 – 25 of 54) sorted by relevance

123

/Linux-v6.6/lib/
Dgroup_cpus.c105 unsigned ncpus; member
114 return ln->ncpus - rn->ncpus; in ncpus_cmp_func()
141 node_groups[n].ncpus = UINT_MAX; in alloc_nodes_groups()
145 unsigned ncpus; in alloc_nodes_groups() local
148 ncpus = cpumask_weight(nmsk); in alloc_nodes_groups()
150 if (!ncpus) in alloc_nodes_groups()
152 remaining_ncpus += ncpus; in alloc_nodes_groups()
153 node_groups[n].ncpus = ncpus; in alloc_nodes_groups()
230 unsigned ngroups, ncpus; in alloc_nodes_groups() local
232 if (node_groups[n].ncpus == UINT_MAX) in alloc_nodes_groups()
[all …]
/Linux-v6.6/tools/testing/selftests/rcutorture/bin/
Dcpus2use.sh17 ncpus=`grep '^processor' /proc/cpuinfo | wc -l`
21 awk -v ncpus=$ncpus '{ print ncpus * ($7 + $NF) / 100 }'`
24 idlecpus=$ncpus
26 awk -v ncpus=$ncpus -v idlecpus=$idlecpus < /dev/null '
Dkvm.sh344 awk < $T/cfgcpu.sort > $T/cfgcpu.pack -v ncpus=$cpus '
462 if (ja[1] == -1 && ncpus == 0)
465 njitter = ncpus;
480 if (cpusr[jn] > ncpus && ncpus != 0)
548 nc = ncpus;
554 if (ncpus == 0) {
563 nc = ncpus;
570 if (ncpus != 0)
578 -v ncpus=$cpus \
Dkvm-build.sh44 ncpus="`getconf _NPROCESSORS_ONLN`"
45 make -j$((2 * ncpus)) $TORTURE_KMAKE_ARG > $resdir/Make.out 2>&1
/Linux-v6.6/arch/x86/include/asm/trace/
Dhyperv.h16 __field(unsigned int, ncpus)
21 TP_fast_assign(__entry->ncpus = cpumask_weight(cpus);
27 __entry->ncpus, __entry->mm,
64 __field(unsigned int, ncpus)
67 TP_fast_assign(__entry->ncpus = cpumask_weight(cpus);
71 __entry->ncpus, __entry->vector)
/Linux-v6.6/tools/perf/util/
Dbpf_ftrace.c22 int i, ncpus = 1, ntasks = 1; in perf_ftrace__latency_prepare_bpf() local
41 ncpus = perf_cpu_map__nr(ftrace->evlist->core.user_requested_cpus); in perf_ftrace__latency_prepare_bpf()
42 bpf_map__set_max_entries(skel->maps.cpu_filter, ncpus); in perf_ftrace__latency_prepare_bpf()
65 for (i = 0; i < ncpus; i++) { in perf_ftrace__latency_prepare_bpf()
127 int ncpus = cpu__max_cpu().cpu; in perf_ftrace__latency_read_bpf() local
131 hist = calloc(ncpus, sizeof(*hist)); in perf_ftrace__latency_read_bpf()
142 for (i = 0; i < ncpus; i++) in perf_ftrace__latency_read_bpf()
Dcounts.c10 struct perf_counts *perf_counts__new(int ncpus, int nthreads) in perf_counts__new() argument
17 values = xyarray__new(ncpus, nthreads, sizeof(struct perf_counts_values)); in perf_counts__new()
25 values = xyarray__new(ncpus, nthreads, sizeof(bool)); in perf_counts__new()
Dbpf_off_cpu.c129 int ncpus = 1, ntasks = 1, ncgrps = 1; in off_cpu_prepare() local
146 ncpus = perf_cpu_map__nr(evlist->core.user_requested_cpus); in off_cpu_prepare()
147 bpf_map__set_max_entries(skel->maps.cpu_filter, ncpus); in off_cpu_prepare()
211 for (i = 0; i < ncpus; i++) { in off_cpu_prepare()
/Linux-v6.6/arch/powerpc/platforms/powermac/
Dsmp.c271 int i, ncpus; in smp_psurge_probe() local
297 ncpus = 4; in smp_psurge_probe()
309 ncpus = 2; in smp_psurge_probe()
323 if (ncpus > NR_CPUS) in smp_psurge_probe()
324 ncpus = NR_CPUS; in smp_psurge_probe()
325 for (i = 1; i < ncpus ; ++i) in smp_psurge_probe()
562 static void __init smp_core99_setup_i2c_hwsync(int ncpus) in smp_core99_setup_i2c_hwsync() argument
694 static void __init smp_core99_setup(int ncpus) in smp_core99_setup() argument
702 smp_core99_setup_i2c_hwsync(ncpus); in smp_core99_setup()
751 for (i = 1; i < ncpus; ++i) in smp_core99_setup()
[all …]
/Linux-v6.6/arch/powerpc/kexec/
Dcrash.c115 volatile unsigned int ncpus = num_online_cpus() - 1;/* Excluding the panic cpu */ in crash_kexec_prepare_cpus() local
122 ncpus = num_present_cpus() - 1; in crash_kexec_prepare_cpus()
142 while ((atomic_read(&cpus_in_crash) < ncpus) && (--msecs > 0)) in crash_kexec_prepare_cpus()
147 if (atomic_read(&cpus_in_crash) >= ncpus) { in crash_kexec_prepare_cpus()
153 ncpus - atomic_read(&cpus_in_crash)); in crash_kexec_prepare_cpus()
184 while (atomic_read(&cpus_in_crash) < ncpus) in crash_kexec_prepare_cpus()
/Linux-v6.6/arch/mips/kernel/
Dcrash.c59 unsigned int ncpus; in crash_kexec_prepare_cpus() local
64 ncpus = num_online_cpus() - 1;/* Excluding the panic cpu */ in crash_kexec_prepare_cpus()
75 while ((cpumask_weight(&cpus_in_crash) < ncpus) && (--msecs > 0)) { in crash_kexec_prepare_cpus()
/Linux-v6.6/arch/sparc/kernel/
Dsetup_32.c391 int i, ncpus, err; in topology_init() local
397 ncpus = 0; in topology_init()
398 while (!cpu_find_by_instance(ncpus, NULL, NULL)) in topology_init()
399 ncpus++; in topology_init()
400 ncpus_probed = ncpus; in topology_init()
Dds.c479 static int dr_cpu_size_response(int ncpus) in dr_cpu_size_response() argument
483 (sizeof(struct dr_cpu_resp_entry) * ncpus)); in dr_cpu_size_response()
487 u64 handle, int resp_len, int ncpus, in dr_cpu_init_response() argument
502 tag->num_records = ncpus; in dr_cpu_init_response()
511 BUG_ON(i != ncpus); in dr_cpu_init_response()
514 static void dr_cpu_mark(struct ds_data *resp, int cpu, int ncpus, in dr_cpu_mark() argument
524 for (i = 0; i < ncpus; i++) { in dr_cpu_mark()
537 int resp_len, ncpus, cpu; in dr_cpu_configure() local
540 ncpus = cpumask_weight(mask); in dr_cpu_configure()
541 resp_len = dr_cpu_size_response(ncpus); in dr_cpu_configure()
[all …]
Dsun4m_smp.c177 register int ncpus = SUN4M_NCPUS; in sun4m_cross_call() local
196 for (i = 0; i < ncpus; i++) { in sun4m_cross_call()
217 } while (++i < ncpus); in sun4m_cross_call()
225 } while (++i < ncpus); in sun4m_cross_call()
/Linux-v6.6/tools/lib/perf/
Devsel.c52 int perf_evsel__alloc_fd(struct perf_evsel *evsel, int ncpus, int nthreads) in perf_evsel__alloc_fd() argument
54 evsel->fd = xyarray__new(ncpus, nthreads, sizeof(int)); in perf_evsel__alloc_fd()
59 for (idx = 0; idx < ncpus; idx++) { in perf_evsel__alloc_fd()
72 static int perf_evsel__alloc_mmap(struct perf_evsel *evsel, int ncpus, int nthreads) in perf_evsel__alloc_mmap() argument
74 evsel->mmap = xyarray__new(ncpus, nthreads, sizeof(struct perf_mmap)); in perf_evsel__alloc_mmap()
513 int perf_evsel__alloc_id(struct perf_evsel *evsel, int ncpus, int nthreads) in perf_evsel__alloc_id() argument
515 if (ncpus == 0 || nthreads == 0) in perf_evsel__alloc_id()
518 evsel->sample_id = xyarray__new(ncpus, nthreads, sizeof(struct perf_sample_id)); in perf_evsel__alloc_id()
522 evsel->id = zalloc(ncpus * nthreads * sizeof(u64)); in perf_evsel__alloc_id()
/Linux-v6.6/drivers/clk/mvebu/
Dclk-cpu.c171 int ncpus = num_possible_cpus(); in of_cpu_clk_setup() local
184 cpuclk = kcalloc(ncpus, sizeof(*cpuclk), GFP_KERNEL); in of_cpu_clk_setup()
188 clks = kcalloc(ncpus, sizeof(*clks), GFP_KERNEL); in of_cpu_clk_setup()
228 while(ncpus--) in of_cpu_clk_setup()
229 kfree(cpuclk[ncpus].clk_name); in of_cpu_clk_setup()
/Linux-v6.6/drivers/xen/
Dmcelog.c58 static uint32_t ncpus; variable
240 for (i = 0; i < ncpus; i++) in convert_log()
243 if (unlikely(i == ncpus)) { in convert_log()
378 ncpus = mc_op.u.mc_physcpuinfo.ncpus; in bind_virq_for_mce()
379 g_physinfo = kcalloc(ncpus, sizeof(struct mcinfo_logical_cpu), in bind_virq_for_mce()
/Linux-v6.6/Documentation/bpf/
Dmap_array.rst216 int ncpus = libbpf_num_possible_cpus();
217 long values[ncpus];
222 for (j = 0; j < ncpus; j++)
238 int ncpus = libbpf_num_possible_cpus();
240 long values[ncpus];
247 for (j = 0; j < ncpus; j++) {
259 in userspace, each value is an array with ``ncpus`` elements.
/Linux-v6.6/arch/xtensa/kernel/
Dsmp.c91 unsigned int ncpus = get_core_count(); in smp_init_cpus() local
94 pr_info("%s: Core Count = %d\n", __func__, ncpus); in smp_init_cpus()
97 if (ncpus > NR_CPUS) { in smp_init_cpus()
98 ncpus = NR_CPUS; in smp_init_cpus()
99 pr_info("%s: limiting core count by %d\n", __func__, ncpus); in smp_init_cpus()
102 for (i = 0; i < ncpus; ++i) in smp_init_cpus()
/Linux-v6.6/tools/lib/perf/include/internal/
Devsel.h82 int perf_evsel__alloc_fd(struct perf_evsel *evsel, int ncpus, int nthreads);
88 int perf_evsel__alloc_id(struct perf_evsel *evsel, int ncpus, int nthreads);
/Linux-v6.6/tools/testing/selftests/powerpc/
Dutils.c419 int ncpus, cpu = -1; in pick_online_cpu() local
423 ncpus = get_nprocs_conf(); in pick_online_cpu()
424 size = CPU_ALLOC_SIZE(ncpus); in pick_online_cpu()
425 mask = CPU_ALLOC(ncpus); in pick_online_cpu()
439 for (cpu = 8; cpu < ncpus; cpu += 8) in pick_online_cpu()
444 for (cpu = ncpus - 1; cpu >= 0; cpu--) in pick_online_cpu()
/Linux-v6.6/arch/loongarch/kernel/
Dmachine_kexec.c194 unsigned int ncpus; in crash_smp_send_stop() local
208 ncpus = num_online_cpus() - 1; in crash_smp_send_stop()
219 while ((cpumask_weight(&cpus_in_crash) < ncpus) && timeout--) { in crash_smp_send_stop()
/Linux-v6.6/kernel/locking/
Dtest-ww_mutex.c368 static int test_cycle(unsigned int ncpus) in test_cycle() argument
373 for (n = 2; n <= ncpus + 1; n++) { in test_cycle()
623 int ncpus = num_online_cpus(); in test_ww_mutex_init() local
650 ret = test_cycle(ncpus); in test_ww_mutex_init()
654 ret = stress(16, 2*ncpus, STRESS_INORDER); in test_ww_mutex_init()
658 ret = stress(16, 2*ncpus, STRESS_REORDER); in test_ww_mutex_init()
662 ret = stress(2047, hweight32(STRESS_ALL)*ncpus, STRESS_ALL); in test_ww_mutex_init()
/Linux-v6.6/tools/testing/selftests/powerpc/benchmarks/
Dcontext_switch.c108 int pid, ncpus; in start_process_on() local
121 ncpus = get_nprocs(); in start_process_on()
122 size = CPU_ALLOC_SIZE(ncpus); in start_process_on()
123 cpuset = CPU_ALLOC(ncpus); in start_process_on()
/Linux-v6.6/arch/x86/kernel/
Dkvmclock.c203 unsigned long ncpus; in kvmclock_init_mem() local
211 ncpus = num_possible_cpus() - HVC_BOOT_ARRAY_SIZE; in kvmclock_init_mem()
212 order = get_order(ncpus * sizeof(*hvclock_mem)); in kvmclock_init_mem()

123