Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\sparse.c Create Date:2022-07-28 15:34:45
Last Modify:2020-03-17 22:36:03 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:section_deactivate

Proto:static void section_deactivate(unsigned long pfn, unsigned long nr_pages, struct vmem_altmap *altmap)

Type:void

Parameter:

TypeParameterName
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  If subsection_map Then bitmap_and(tmp, map, subsection_map, SUBSECTIONS_PER_SECTION)
754  If WARN(!subsection_map || !bitmap_equal(tmp, map, SUBSECTIONS_PER_SECTION), "section already deactivated (%#lx + %ld)\n", pfn, nr_pages) Then Return
776  bitmap_xor(subsection_map, map, subsection_map, SUBSECTIONS_PER_SECTION)
777  If bitmap_empty(subsection_map, SUBSECTIONS_PER_SECTION) Then
778  section_nr = pfn_to_section_nr(pfn)
788  kfree(usage)
789  usage = NULL
791  memmap = Decode mem_map from the coded memmap
792  section_mem_map = NULL
795  If section_is_early && memmap Then free_map_bootmem(memmap)
797  Else depopulate_section_memmap(pfn, nr_pages, altmap)
Caller
NameDescribe
section_activate
sparse_remove_section