函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:section_deactivate

函数原型:static void section_deactivate(unsigned long pfn, unsigned long nr_pages, struct vmem_altmap *altmap)

返回类型:void

参数:

类型参数名称
unsigned longpfn
unsigned longnr_pages
struct vmem_altmap *altmap
742  DECLARE_BITMAP(map, SUBSECTIONS_PER_SECTION) = {0}
743  DECLARE_BITMAP(tmp, SUBSECTIONS_PER_SECTION) = {0}
744  ms等于__pfn_to_section(pfn)
745  section_is_early等于early_section(ms)
746  struct page * memmap = NULL
747  unsigned long * subsection_map = usage ? & subsection_map[0] : NULL
750  subsection_mask_set(map, pfn, nr_pages)
751  如果subsection_mapbitmap_and(tmp, map, subsection_map, SUBSECTIONS_PER_SECTION)
754  如果WARN(!subsection_map || !bitmap_equal(tmp, map, SUBSECTIONS_PER_SECTION), "section already deactivated (%#lx + %ld)\n", pfn, nr_pages)则返回
776  bitmap_xor(subsection_map, map, subsection_map, SUBSECTIONS_PER_SECTION)
777  如果bitmap_empty(subsection_map, SUBSECTIONS_PER_SECTION)则
778  section_nr等于pfn_to_section_nr(pfn)
788  释放内存
789  usage = NULL
791  memmap等于Decode mem_map from the coded memmap
792  section_mem_map = NULL
795  如果section_is_earlymemmapfree_map_bootmem(memmap)
797  否则depopulate_section_memmap(pfn, nr_pages, altmap)
调用者
名称描述
section_activate
sparse_remove_section