函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\sparse.c Create Date:2022-07-27 17:07:33
Last Modify:2020-03-17 22:36:03 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:subsection_map_init

函数原型:void __init subsection_map_init(unsigned long pfn, unsigned long nr_pages)

返回类型:void

参数:

类型参数名称
unsigned longpfn
unsigned longnr_pages
233  end_sec等于pfn_to_section_nr(pfn + nr_pages - 1)
234  start_sec等于pfn_to_section_nr(pfn)
236  如果非nr_pages则返回
239 nr小于等于end_sec循环
243  pfns等于两数取小(nr_pages, PAGES_PER_SECTION - (pfn & ~PAGE_SECTION_MASK))
245  ms等于__nr_to_section(nr)
246  subsection_mask_set(subsection_map, pfn, pfns)
248  pr_debug("%s: sec: %lu pfns: %lu set(%d, %d)\n", __func__, nr, pfns, subsection_map_index(pfn), subsection_map_index(pfn + pfns - 1))
252  pfn加等于pfns
253  nr_pages减等于pfns