Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\setup_percpu.c Create Date:2022-07-28 08:25:21
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:setup_per_cpu_areas

Proto:void __init setup_per_cpu_areas(void)

Type:void

Parameter:Nothing

174  pr_info("NR_CPUS:%d nr_cpumask_bits:%d nr_cpu_ids:%u nr_node_ids:%u\n", Places which use this should consider cpumask_var_t. , nr_cpumask_bits, nr_cpu_ids, nr_node_ids)
184  If pcpu_chosen_fc == PCPU_FC_AUTO && pcpu_need_numa - determine percpu allocation needs to consider NUMA* If NUMA is not configured or there is only one NUMA node available,* there is no reason to consider NUMA Then pcpu_chosen_fc = PCPU_FC_PAGE
187  rc = -EINVAL
188  If pcpu_chosen_fc != PCPU_FC_PAGE Then
189  dyn_size = ugh to cover all DEFINE_PER_CPUs in modules + PERCPU_DYNAMIC_RESERVE - On x86_64 symbols referenced from code should be reachable using* 32bit relocations. Reserve space for static percpu variables in* modules so that they are always served from the first chunk which* is located at the percpu segment base
201  atom_size = PMD_SIZE
205  rc = pcpu_embed_first_chunk(On x86_64 symbols referenced from code should be reachable using* 32bit relocations. Reserve space for static percpu variables in* modules so that they are always served from the first chunk which* is located at the percpu segment base, dyn_size, atom_size, pcpu_cpu_distance, Helpers for first chunk memory allocation, pcpu_fc_free)
209  If rc < 0 Then pr_warn("%s allocator failed (%d), falling back to page size\n", pcpu_fc_names[pcpu_chosen_fc], rc)
213  If rc < 0 Then rc = pcpu_page_first_chunk(On x86_64 symbols referenced from code should be reachable using* 32bit relocations. Reserve space for static percpu variables in* modules so that they are always served from the first chunk which* is located at the percpu segment base, Helpers for first chunk memory allocation, pcpu_fc_free, pcpup_populate_pte)
217  If rc < 0 Then panic - halt the system*@fmt: The text string to print* Display a message, then perform cleanups.* This function never returns.
221  delta = pcpu_base_addr - __per_cpu_start
222  for_each_possible_cpu(cpu)
223  per_cpu_offset(cpu) = delta + pcpu_unit_offsets[cpu]
224  per_cpu(this_cpu_off, cpu) = per_cpu_offset(cpu)
225  per_cpu(cpu_number, cpu) = cpu
226  setup_percpu_segment(cpu)
227  dummy boot_init_stack_canary() is defined in linux/stackprotector.h
244  per_cpu(x86_cpu_to_logical_apicid, cpu) = early_per_cpu_map(x86_cpu_to_logical_apicid, cpu)
248  per_cpu(Mappings between logical cpu number and node number , cpu) = early_per_cpu_map(Mappings between logical cpu number and node number , cpu)
258  set_cpu_numa_node(cpu, Same function but used if called before per_cpu areas are setup )
264  If Not cpu Then Current gdt points %fs at the "master" per-cpu area: after this,* it's on the real one.
275  early_per_cpu_ptr(x86_cpu_to_logical_apicid) = NULL
278  early_per_cpu_ptr(Mappings between logical cpu number and node number ) = NULL
282  setup_node_to_cpumask_map()
285  rrectly size the local cpu masks
297  sync_initial_page_table()