/linux-6.1.9/lib/ |
D | cpumask_kunit.c | 33 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()
|
D | cpumask.c | 132 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/ |
D | paca.c | 62 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()
|
D | setup-common.c | 335 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/ |
D | platsmp.c | 102 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/ |
D | scftorture.c | 338 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()
|
D | smp.c | 354 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/ |
D | bcm63xx_smp.c | 64 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/ |
D | smpboot.c | 108 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/ |
D | cpumask.h | 36 #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/ |
D | devtree.c | 130 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/ |
D | cpuhotplug.c | 39 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()
|
D | ipi.c | 70 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()
|
D | migration.c | 29 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/ |
D | timerlist.py | 152 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/ |
D | nf_flow_table_procfs.c | 14 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/ |
D | arm_pmu_platform.c | 88 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/ |
D | omap-smp.c | 278 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/ |
D | dm-ps-io-affinity.c | 80 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/ |
D | tsc_sync.c | 101 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/ |
D | cpu.c | 252 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/ |
D | cpupri.c | 99 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/ |
D | isst_if_common.c | 225 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/ |
D | tasks.h | 242 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/ |
D | nd_perf.c | 155 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()
|