Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:setup_usemap

Proto:static void __ref setup_usemap(struct pglist_data *pgdat, struct zone *zone, unsigned long zone_start_pfn, unsigned long zonesize)

Type:void

Parameter:

TypeParameterName
struct pglist_data *pgdat
struct zone *zone
unsigned longzone_start_pfn
unsigned longzonesize
6584  usemapsize = Calculate the size of the zone->blockflags rounded to an unsigned long* Start by making sure zonesize is a multiple of pageblock_order by rounding* up
6585  * Flags for a pageblock_nr_pages block. See pageblock-flags.h. * In SPARSEMEM, this map is stored in struct mem_section = NULL
6586  If usemapsize Then
6587  * Flags for a pageblock_nr_pages block. See pageblock-flags.h. * In SPARSEMEM, this map is stored in struct mem_section = memblock_alloc_node(usemapsize, SMP_CACHE_BYTES, node_id)
6590  If Not * Flags for a pageblock_nr_pages block. See pageblock-flags.h. * In SPARSEMEM, this map is stored in struct mem_section Then panic - halt the system*@fmt: The text string to print* Display a message, then perform cleanups.* This function never returns.
Caller
NameDescribe
free_area_init_coreSet up the zone data structures:* - mark all pages reserved* - mark all memory queues empty* - clear the memory bitmaps* NOTE: pgdat should get zeroed by caller.* NOTE: this function is only called during early init.