Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\percpu.c Create Date:2022-07-28 14:28:03
Last Modify:2022-05-23 13:52:24 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:UP percpu area setup.* UP always uses km-based percpu allocator with identity mapping.* Static percpu variables are indistinguishable from the usual static* variables and don't require any special preparation.

Proto:void __init setup_per_cpu_areas(void)

Type:void

Parameter:Nothing

2993  unit_size = undup_pow_of_two - round the given value up to nearest power of two*@n: parameter* round the given value up to the nearest power of two* - the result is undefined when n == 0* - this can be used to initialise global variables from constant data(max_t - return maximum of two values, using the specified type*@type: data type to use*@x: first value*@y: second value(size_t, minimum unit size, also is the maximum supported allocation size , PERCPU_DYNAMIC_RESERVE))
2999  ai = pcpu_alloc_alloc_info - allocate percpu allocation info*@nr_groups: the number of groups*@nr_units: the number of units* Allocate ai which is large enough for @nr_groups groups containing*@nr_units units
3000  fc = memblock_alloc_from(unit_size, PAGE_SIZE, __pa(The maximum address that we can perform a DMA transfer to on this platform ))
3001  If Not ai || Not fc Then panic - halt the system*@fmt: The text string to print* Display a message, then perform cleanups.* This function never returns.
3004  kmemleak_free(fc)
3006  dyn_size = unit_size
3007  unit_size = unit_size
3008  atom_size = unit_size
3009  alloc_size = unit_size
3010  aligned # of units = 1
3011  unit->cpu map, empty * entries contain NR_CPUS [0] = 0
3013  pcpu_setup_first_chunk - initialize the first percpu chunk*@ai: pcpu_alloc_info describing how to percpu area is shaped*@base_addr: mapped address* Initialize the first percpu chunk which contains the kernel static* percpu area
3014  pcpu_free_alloc_info - free percpu allocation info*@ai: pcpu_alloc_info to free* Free @ai which was allocated by pcpu_alloc_alloc_info().