函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\percpu.c Create Date:2022-07-27 15:52:34
Last Modify:2022-05-23 13:52:24 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称: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.

函数原型:void __init setup_per_cpu_areas(void)

返回类型:void

参数:

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  如果非ai或非fcpanic - 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().