Lines Matching defs:nr_units
2418 * @nr_units: the number of units
2421 * @nr_units units. The returned ai's groups[0].cpu_map points to the
2422 * cpu_map array which is long enough for @nr_units and filled with
2431 int nr_units)
2440 ai_size = base_size + nr_units * sizeof(ai->groups[0].cpu_map[0]);
2450 for (unit = 0; unit < nr_units; unit++)
2507 BUG_ON(gi->nr_units % upa);
2508 for (alloc_end += gi->nr_units / upa;
2658 group_sizes[group] = gi->nr_units * ai->unit_size;
2660 for (i = 0; i < gi->nr_units; i++) {
2846 int nr_groups = 1, nr_units = 0;
2939 nr_units += roundup(group_cnt[group], upa);
2941 ai = pcpu_alloc_alloc_info(nr_groups, nr_units);
2970 gi->cpu_map[gi->nr_units++] = cpu;
2971 gi->nr_units = roundup(gi->nr_units, upa);
2972 unit += gi->nr_units;
2974 BUG_ON(unit != nr_units);
3081 for (i = 0; i < gi->nr_units && cpu == NR_CPUS; i++)
3086 ptr = pcpu_fc_alloc(cpu, gi->nr_units * ai->unit_size, atom_size, cpu_to_nd_fn);
3100 max_distance += ai->unit_size * ai->groups[highest_group].nr_units;
3122 for (i = 0; i < gi->nr_units; i++, ptr += ai->unit_size) {
3150 ai->groups[group].nr_units * ai->unit_size);
3257 if (WARN_ON(ai->groups[0].nr_units != nr_g0_units)) {
3399 ai->groups[0].nr_units = 1;