Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Initially all pages are reserved - free ones are freed* up by memblock_free_all() once the early boot process is* done. Non-atomic initialization, single-pass.

Proto:void __meminit memmap_init_zone(unsigned long size, int nid, unsigned long zone, unsigned long start_pfn, enum memmap_context context, struct vmem_altmap *altmap)

Type:void

Parameter:

TypeParameterName
unsigned longsize
intnid
unsigned longzone
unsigned longstart_pfn
enum memmap_contextcontext
struct vmem_altmap *altmap
5860  end_pfn = start_pfn + size
5863  If highest_memmap_pfn < end_pfn - 1 Then highest_memmap_pfn = end_pfn - 1
5884  When pfn < end_pfn cycle
5889  If context == MEMMAP_EARLY Then
5890  If Not early_pfn_valid(pfn) Then Continue
5892  If Not early_pfn_in_nid(pfn, nid) Then Continue
5896  If defer_init(nid, pfn, end_pfn) Then Break
5900  page = pfn_to_page(pfn)
5901  __init_single_page(page, pfn, zone, nid)
5902  If context == MEMMAP_HOTPLUG Then __SetPageReserved(page)
5917  If Not (pfn & pageblock_nr_pages - 1 ) Then
5919  cond_resched()
Caller
NameDescribe
memmap_init