函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\percpu-vm.c Create Date:2022-07-27 15:51:28
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:pcpu_map_pages - map pages into a pcpu_chunk*@chunk: chunk of interest*@pages: pages array containing pages to be mapped*@page_start: page index of the first page to map*@page_end: page index of the last page to map + 1

函数原型:static int pcpu_map_pages(struct pcpu_chunk *chunk, struct page **pages, int page_start, int page_end)

返回类型:int

参数:

类型参数名称
struct pcpu_chunk *chunk
struct page **pages
intpage_start
intpage_end
219  遍历可用CPU(cpu)
220  err等于__pcpu_map_pages(pcpu_chunk_addr(chunk, cpu, page_start), & pages[pcpu_page_idx(cpu, page_start)], page_end - page_start)
223  如果err小于0则转到:err
226 i小于page_end循环set the pointer to a chunk in a page struct
230  返回:0
231  err :
232  遍历可用CPU(tcpu)
233  如果tcpu恒等于cpu退出
235  __pcpu_unmap_pages(pcpu_chunk_addr(chunk, tcpu, page_start), page_end - page_start)
238  pcpu_post_unmap_tlb_flush - flush TLB after unmapping*@chunk: pcpu_chunk the regions to be flushed belong to*@page_start: page index of the first page to be flushed*@page_end: page index of the last page to be flushed + 1
239  返回:err
调用者
名称描述
pcpu_populate_chunkpcpu_populate_chunk - populate and map an area of a pcpu_chunk*@chunk: chunk of interest*@page_start: the start page*@page_end: the end page*@gfp: allocation flags passed to the underlying memory allocator* For each cpu, populate and map pages