Home
last modified time | relevance | path

Searched refs:nr_cpu_ids (Results 1 – 25 of 284) sorted by relevance

12345678910>>...12

/linux-6.1.9/lib/
Dcpumask_kunit.c33 KUNIT_EXPECT_EQ_MSG((test), nr_cpu_ids - mask_weight, iter, MASK_MSG(mask)); \
54 for_each_cpu_wrap(cpu, m, nr_cpu_ids / 2) \
78 KUNIT_EXPECT_EQ_MSG(test, nr_cpu_ids, cpumask_weight(cpu_possible_mask), in test_cpumask_weight()
85 KUNIT_EXPECT_LE_MSG(test, nr_cpu_ids, cpumask_first(&mask_empty), MASK_MSG(&mask_empty)); in test_cpumask_first()
89 KUNIT_EXPECT_LE_MSG(test, nr_cpu_ids, cpumask_first_zero(cpu_possible_mask), in test_cpumask_first()
97 KUNIT_EXPECT_EQ_MSG(test, nr_cpu_ids - 1, cpumask_last(cpu_possible_mask), in test_cpumask_last()
104 KUNIT_EXPECT_LE_MSG(test, nr_cpu_ids, cpumask_next_zero(-1, cpu_possible_mask), in test_cpumask_next()
107 KUNIT_EXPECT_LE_MSG(test, nr_cpu_ids, cpumask_next(-1, &mask_empty), in test_cpumask_next()
Dcpumask.c132 if (cpu < nr_cpu_ids) in cpumask_local_spread()
137 if (cpu < nr_cpu_ids) in cpumask_local_spread()
144 if (cpu < nr_cpu_ids) in cpumask_local_spread()
171 if (next < nr_cpu_ids) in cpumask_any_and_distribute()
185 if (next < nr_cpu_ids) in cpumask_any_distribute()
/linux-6.1.9/arch/powerpc/kernel/
Dpaca.c62 size_t shared_lppaca_total_size = PAGE_ALIGN(nr_cpu_ids * LPPACA_SIZE); in alloc_shared_lppaca()
243 paca_nr_cpu_ids = nr_cpu_ids; in allocate_paca_ptrs()
245 paca_ptrs_size = sizeof(struct paca_struct *) * nr_cpu_ids; in allocate_paca_ptrs()
289 new_ptrs_size = sizeof(struct paca_struct *) * nr_cpu_ids; in free_unused_pacas()
294 paca_nr_cpu_ids = nr_cpu_ids; in free_unused_pacas()
307 paca_ptrs_size + paca_struct_size, nr_cpu_ids); in free_unused_pacas()
Dsetup-common.c335 if (cpumask_next(cpu_id, cpu_online_mask) >= nr_cpu_ids) in show_cpuinfo()
347 if ((*pos) < nr_cpu_ids) in c_start()
451 cpu_to_phys_id = memblock_alloc(nr_cpu_ids * sizeof(u32), in smp_setup_cpu_maps()
455 __func__, nr_cpu_ids * sizeof(u32), __alignof__(u32)); in smp_setup_cpu_maps()
482 for (j = 0; j < nthreads && cpu < nr_cpu_ids; j++) { in smp_setup_cpu_maps()
499 if (cpu >= nr_cpu_ids) { in smp_setup_cpu_maps()
535 if (maxcpus > nr_cpu_ids) { in smp_setup_cpu_maps()
539 maxcpus, nr_cpu_ids); in smp_setup_cpu_maps()
540 maxcpus = nr_cpu_ids; in smp_setup_cpu_maps()
883 memblock_free(cpu_to_phys_id, nr_cpu_ids * sizeof(u32)); in smp_setup_pacas()
/linux-6.1.9/arch/arm/mach-spear/
Dplatsmp.c102 if (ncores > nr_cpu_ids) { in spear13xx_smp_init_cpus()
104 ncores, nr_cpu_ids); in spear13xx_smp_init_cpus()
105 ncores = nr_cpu_ids; in spear13xx_smp_init_cpus()
/linux-6.1.9/kernel/
Dscftorture.c338 cpu = torture_random(trsp) % nr_cpu_ids; in scftorture_invoke_one()
345 cpu = torture_random(trsp) % nr_cpu_ids; in scftorture_invoke_one()
368 cpu = torture_random(trsp) % nr_cpu_ids; in scftorture_invoke_one()
449 cpu = scfp->cpu % nr_cpu_ids; in scftorture_invoker()
459 WARN_ONCE(curcpu != scfp->cpu % nr_cpu_ids, in scftorture_invoker()
461 __func__, scfp->cpu, curcpu, nr_cpu_ids); in scftorture_invoker()
558 weight_resched1 = weight_resched == 0 ? 0 : 2 * nr_cpu_ids; in scf_torture_init()
559 weight_single1 = weight_single == 0 ? 0 : 2 * nr_cpu_ids; in scf_torture_init()
560 weight_single_rpc1 = weight_single_rpc == 0 ? 0 : 2 * nr_cpu_ids; in scf_torture_init()
561 weight_single_wait1 = weight_single_wait == 0 ? 0 : 2 * nr_cpu_ids; in scf_torture_init()
Dsmp.c354 if (WARN_ONCE(cpu < 0 || cpu >= nr_cpu_ids, "%s: cpu = %d\n", __func__, cpu)) in csd_lock_wait_toolong()
526 if ((unsigned)cpu >= nr_cpu_ids || !cpu_online(cpu)) { in generic_exec_single()
858 for (cpu = cpumask_first_and(nodemask, mask); cpu < nr_cpu_ids; in smp_call_function_any()
922 if (cpu < nr_cpu_ids) in smp_call_function_many_cond()
1071 if (get_option(&str, &nr_cpus) && nr_cpus > 0 && nr_cpus < nr_cpu_ids) in nrcpus()
1092 unsigned int nr_cpu_ids __read_mostly = NR_CPUS;
1093 EXPORT_SYMBOL(nr_cpu_ids);
1249 if (cpu >= nr_cpu_ids || !cpu_online(cpu)) in smp_call_on_cpu()
/linux-6.1.9/arch/arm/mach-bcm/
Dbcm63xx_smp.c64 if (ncores > nr_cpu_ids) { in scu_a9_enable()
66 ncores, nr_cpu_ids); in scu_a9_enable()
67 ncores = nr_cpu_ids; in scu_a9_enable()
/linux-6.1.9/arch/riscv/kernel/
Dsmpboot.c108 if (cpuid > nr_cpu_ids) in setup_smp()
110 cpuid, nr_cpu_ids); in setup_smp()
112 for (cpuid = 1; cpuid < nr_cpu_ids; cpuid++) { in setup_smp()
/linux-6.1.9/include/linux/
Dcpumask.h36 #define cpumask_pr_args(maskp) nr_cpu_ids, cpumask_bits(maskp)
39 #define nr_cpu_ids ((unsigned int)NR_CPUS) macro
41 extern unsigned int nr_cpu_ids;
47 WARN_ON(nr != nr_cpu_ids); in set_nr_cpu_ids()
49 nr_cpu_ids = nr; in set_nr_cpu_ids()
54 #define nr_cpumask_bits nr_cpu_ids
1118 nr_cpu_ids); in cpumap_print_to_pagebuf()
1142 nr_cpu_ids, off, count) - 1; in cpumap_print_bitmask_to_buf()
1157 nr_cpu_ids, off, count) - 1; in cpumap_print_list_to_buf()
/linux-6.1.9/arch/arm/kernel/
Ddevtree.c130 if (WARN(cpuidx > nr_cpu_ids, "DT /cpu %u nodes greater than " in arm_dt_init_cpu_maps()
132 cpuidx, nr_cpu_ids)) { in arm_dt_init_cpu_maps()
133 cpuidx = nr_cpu_ids; in arm_dt_init_cpu_maps()
/linux-6.1.9/kernel/irq/
Dcpuhotplug.c39 if (cpumask_any_but(m, cpu) < nr_cpu_ids && in irq_needs_fixup()
40 cpumask_any_and(m, cpu_online_mask) >= nr_cpu_ids) { in irq_needs_fixup()
113 if (cpumask_any_and(affinity, cpu_online_mask) >= nr_cpu_ids) { in migrate_one_irq()
Dipi.c70 if (next < nr_cpu_ids) in irq_reserve_ipi()
72 if (next < nr_cpu_ids) { in irq_reserve_ipi()
168 if (!data || cpu >= nr_cpu_ids) in ipi_get_hwirq()
199 if (cpu >= nr_cpu_ids) in ipi_send_verify()
Dmigration.c29 if (cpumask_any_and(desc->pending_mask, cpu_online_mask) >= nr_cpu_ids) { in irq_fixup_move_pending()
77 if (cpumask_any_and(desc->pending_mask, cpu_online_mask) < nr_cpu_ids) { in irq_move_masked_irq()
/linux-6.1.9/scripts/gdb/linux/
Dtimerlist.py152 nr_cpu_ids = 1
154 nr_cpu_ids = gdb.parse_and_eval("nr_cpu_ids")
158 num_bytes = (nr_cpu_ids + 7) / 8
172 extra = nr_cpu_ids % 8
/linux-6.1.9/net/netfilter/
Dnf_flow_table_procfs.c14 for (cpu = *pos - 1; cpu < nr_cpu_ids; ++cpu) { in nf_flow_table_cpu_seq_start()
29 for (cpu = *pos; cpu < nr_cpu_ids; ++cpu) { in nf_flow_table_cpu_seq_next()
/linux-6.1.9/drivers/perf/
Darm_pmu_platform.c88 cpu = nr_cpu_ids; in pmu_parse_irq_affinity()
124 if (nr_cpu_ids != 1 && !pmu_has_irq_affinity(dev->of_node)) in pmu_parse_irqs()
142 if (cpu >= nr_cpu_ids) in pmu_parse_irqs()
/linux-6.1.9/arch/arm/mach-omap2/
Domap-smp.c278 if (ncores > nr_cpu_ids) { in omap4_smp_init_cpus()
280 ncores, nr_cpu_ids); in omap4_smp_init_cpus()
281 ncores = nr_cpu_ids; in omap4_smp_init_cpus()
/linux-6.1.9/drivers/md/
Ddm-ps-io-affinity.c80 if (cpu >= nr_cpu_ids) { in ioa_add_path()
82 cpu, nr_cpu_ids); in ioa_add_path()
119 s->path_map = kzalloc(nr_cpu_ids * sizeof(struct path_info *), in ioa_create()
/linux-6.1.9/arch/x86/kernel/
Dtsc_sync.c101 if (next_cpu >= nr_cpu_ids) in tsc_sync_check_timer_fn()
209 refcpu = mask ? cpumask_any_but(mask, cpu) : nr_cpu_ids; in tsc_store_and_check_tsc_adjust()
211 if (refcpu >= nr_cpu_ids) { in tsc_store_and_check_tsc_adjust()
/linux-6.1.9/drivers/base/
Dcpu.c252 if (total_cpus && nr_cpu_ids < total_cpus) { in print_cpus_offline()
255 if (nr_cpu_ids == total_cpus-1) in print_cpus_offline()
256 len += sysfs_emit_at(buf, len, "%u", nr_cpu_ids); in print_cpus_offline()
259 nr_cpu_ids, total_cpus - 1); in print_cpus_offline()
393 if (cpu < nr_cpu_ids && cpu_possible(cpu)) in get_cpu_device()
/linux-6.1.9/kernel/sched/
Dcpupri.c99 if (cpumask_any_and(&p->cpus_mask, vec->mask) >= nr_cpu_ids) in __cpupri_find()
289 cp->cpu_to_pri = kcalloc(nr_cpu_ids, sizeof(int), GFP_KERNEL); in cpupri_init()
/linux-6.1.9/drivers/platform/x86/intel/speed_select_if/
Disst_if_common.c225 if (cmd->logical_cpu >= nr_cpu_ids) in isst_if_mbox_cmd_invalid()
307 cpu >= nr_cpu_ids || cpu >= num_possible_cpus()) in _isst_if_get_pci_dev()
380 cpu >= nr_cpu_ids || cpu >= num_possible_cpus()) in isst_if_get_pci_dev()
469 if (cpu_map->logical_cpu >= nr_cpu_ids || in isst_if_proc_phyid_req()
501 if (msr_cmd->logical_cpu >= nr_cpu_ids) in isst_if_msr_cmd_req()
/linux-6.1.9/kernel/rcu/
Dtasks.h242 if (lim > nr_cpu_ids) in cblist_init_generic()
243 lim = nr_cpu_ids; in cblist_init_generic()
244 shift = ilog2(nr_cpu_ids / lim); in cblist_init_generic()
245 if (((nr_cpu_ids - 1) >> shift) >= lim) in cblist_init_generic()
307 READ_ONCE(rtp->percpu_enqueue_lim) != nr_cpu_ids) in call_rcu_tasks_generic()
320 if (rtp->percpu_enqueue_lim != nr_cpu_ids) { in call_rcu_tasks_generic()
322 WRITE_ONCE(rtp->percpu_dequeue_lim, nr_cpu_ids); in call_rcu_tasks_generic()
323 smp_store_release(&rtp->percpu_enqueue_lim, nr_cpu_ids); in call_rcu_tasks_generic()
425 WRITE_ONCE(rtp->percpu_enqueue_shift, order_base_2(nr_cpu_ids)); in rcu_tasks_need_gpcb()
439 for (cpu = rtp->percpu_dequeue_lim; cpu < nr_cpu_ids; cpu++) { in rcu_tasks_need_gpcb()
/linux-6.1.9/drivers/nvdimm/
Dnd_perf.c155 if (target >= nr_cpu_ids) { in nvdimm_pmu_cpu_offline()
163 if (target >= 0 && target < nr_cpu_ids) in nvdimm_pmu_cpu_offline()
175 if (nd_pmu->cpu >= nr_cpu_ids) in nvdimm_pmu_cpu_online()

12345678910>>...12