• Home
  • Raw
  • Download

Lines Matching refs:cpu

263 static int __maybe_unused pcpu_page_idx(unsigned int cpu, int page_idx)  in pcpu_page_idx()  argument
265 return pcpu_unit_map[cpu] * pcpu_unit_pages + page_idx; in pcpu_page_idx()
268 static unsigned long pcpu_unit_page_offset(unsigned int cpu, int page_idx) in pcpu_unit_page_offset() argument
270 return pcpu_unit_offsets[cpu] + (page_idx << PAGE_SHIFT); in pcpu_unit_page_offset()
274 unsigned int cpu, int page_idx) in pcpu_chunk_addr() argument
277 pcpu_unit_page_offset(cpu, page_idx); in pcpu_chunk_addr()
1688 int slot, off, cpu, ret; in pcpu_alloc() local
1838 for_each_possible_cpu(cpu) in pcpu_alloc()
1839 memset((void *)pcpu_chunk_addr(chunk, cpu, 0) + off, 0, size); in pcpu_alloc()
2132 unsigned int cpu; in __is_kernel_percpu_address() local
2134 for_each_possible_cpu(cpu) { in __is_kernel_percpu_address()
2135 void *start = per_cpu_ptr(base, cpu); in __is_kernel_percpu_address()
2196 unsigned int cpu; in per_cpu_ptr_to_phys() local
2214 for_each_possible_cpu(cpu) { in per_cpu_ptr_to_phys()
2215 void *start = per_cpu_ptr(base, cpu); in per_cpu_ptr_to_phys()
2411 unsigned int cpu; in pcpu_setup_first_chunk() local
2473 for (cpu = 0; cpu < nr_cpu_ids; cpu++) in pcpu_setup_first_chunk()
2474 unit_map[cpu] = UINT_MAX; in pcpu_setup_first_chunk()
2486 cpu = gi->cpu_map[i]; in pcpu_setup_first_chunk()
2487 if (cpu == NR_CPUS) in pcpu_setup_first_chunk()
2490 PCPU_SETUP_BUG_ON(cpu >= nr_cpu_ids); in pcpu_setup_first_chunk()
2491 PCPU_SETUP_BUG_ON(!cpu_possible(cpu)); in pcpu_setup_first_chunk()
2492 PCPU_SETUP_BUG_ON(unit_map[cpu] != UINT_MAX); in pcpu_setup_first_chunk()
2494 unit_map[cpu] = unit + i; in pcpu_setup_first_chunk()
2495 unit_off[cpu] = gi->base_offset + i * ai->unit_size; in pcpu_setup_first_chunk()
2499 unit_off[cpu] < unit_off[pcpu_low_unit_cpu]) in pcpu_setup_first_chunk()
2500 pcpu_low_unit_cpu = cpu; in pcpu_setup_first_chunk()
2502 unit_off[cpu] > unit_off[pcpu_high_unit_cpu]) in pcpu_setup_first_chunk()
2503 pcpu_high_unit_cpu = cpu; in pcpu_setup_first_chunk()
2508 for_each_possible_cpu(cpu) in pcpu_setup_first_chunk()
2509 PCPU_SETUP_BUG_ON(unit_map[cpu] == UINT_MAX); in pcpu_setup_first_chunk()
2678 unsigned int cpu, tcpu; in pcpu_build_alloc_info() local
2707 for_each_possible_cpu(cpu) { in pcpu_build_alloc_info()
2711 if (cpu == tcpu) in pcpu_build_alloc_info()
2714 (cpu_distance_fn(cpu, tcpu) > LOCAL_DISTANCE || in pcpu_build_alloc_info()
2715 cpu_distance_fn(tcpu, cpu) > LOCAL_DISTANCE)) { in pcpu_build_alloc_info()
2721 group_map[cpu] = group; in pcpu_build_alloc_info()
2790 for_each_possible_cpu(cpu) in pcpu_build_alloc_info()
2791 if (group_map[cpu] == group) in pcpu_build_alloc_info()
2792 gi->cpu_map[gi->nr_units++] = cpu; in pcpu_build_alloc_info()
2866 unsigned int cpu = NR_CPUS; in pcpu_embed_first_chunk() local
2869 for (i = 0; i < gi->nr_units && cpu == NR_CPUS; i++) in pcpu_embed_first_chunk()
2870 cpu = gi->cpu_map[i]; in pcpu_embed_first_chunk()
2871 BUG_ON(cpu == NR_CPUS); in pcpu_embed_first_chunk()
2874 ptr = alloc_fn(cpu, gi->nr_units * ai->unit_size, atom_size); in pcpu_embed_first_chunk()
3005 unsigned int cpu = ai->groups[0].cpu_map[unit]; in pcpu_page_first_chunk() local
3009 ptr = alloc_fn(cpu, PAGE_SIZE, PAGE_SIZE); in pcpu_page_first_chunk()
3012 psize_str, cpu); in pcpu_page_first_chunk()
3086 static void * __init pcpu_dfl_fc_alloc(unsigned int cpu, size_t size, in pcpu_dfl_fc_alloc() argument
3100 unsigned int cpu; in setup_per_cpu_areas() local
3114 for_each_possible_cpu(cpu) in setup_per_cpu_areas()
3115 __per_cpu_offset[cpu] = delta + pcpu_unit_offsets[cpu]; in setup_per_cpu_areas()