Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\cpu_rmap.c Create Date:2022-07-28 07:17:49
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:alloc_cpu_rmap - allocate CPU affinity reverse-map*@size: Number of objects to be mapped*@flags: Allocation flags e.g. %GFP_KERNEL

Proto:struct cpu_rmap *alloc_cpu_rmap(unsigned int size, gfp_t flags)

Type:struct cpu_rmap

Parameter:

TypeParameterName
unsigned intsize
gfp_tflags
32  If size > 0xffff Then Return NULL
36  obj_offset = @a is a power of 2 value (offsetof(structcpu_rmap, near[nr_cpu_ids]), size of * )
39  rmap = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc).
40  If Not rmap Then Return NULL
43  kref_init - initialize object.*@kref: object in question.
44  obj = rmap + obj_offset
52  for_each_possible_cpu(cpu)
53  index = cpu % size
54  dist = CPU_RMAP_DIST_INF
57  size = size
58  Return rmap
Caller
NameDescribe
alloc_irq_cpu_rmapalloc_irq_cpu_rmap - allocate CPU affinity reverse-map for IRQs*@size: Number of objects to be mapped* Must be called in process context.