Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:gister_nosave_region - Register a region of unsaveable memory.* Register a range of page frames the contents of which should not be saved* during hibernation (to be used in the early initialization code).

Proto:void __init __register_nosave_region(unsigned long start_pfn, unsigned long end_pfn, int use_kmalloc)

Type:void

Parameter:

TypeParameterName
unsigned longstart_pfn
unsigned longend_pfn
intuse_kmalloc
953  If start_pfn >= end_pfn Then Return
956  If Not list_empty - tests whether a list is empty*@head: the list to test. Then
958  region = list_entry - get the struct for this entry*@ptr: the &struct list_head pointer.*@type: the type of the struct this is embedded in.*@member: the name of the list_head within the struct.(prev, structnosave_region, list)
960  If end_pfn == start_pfn Then
961  end_pfn = end_pfn
962  Go to Report
965  If use_kmalloc Then
967  region = Allocation memory
968  BUG_ON(!region)
969  Else
971  region = memblock_alloc(sizeof(structnosave_region), SMP_CACHE_BYTES)
973  If Not region Then panic - halt the system*@fmt: The text string to print* Display a message, then perform cleanups.* This function never returns.
977  start_pfn = start_pfn
978  end_pfn = end_pfn
979  list_add_tail - add a new entry*@new: new entry to be added*@head: list head to add it before* Insert a new entry before the specified head.* This is useful for implementing queues.
980  Report :
981  pr_info("Registered nosave memory: [mem %#010llx-%#010llx]\n", (unsignedlonglong)start_pfn << PAGE_SHIFT determines the page size , ((unsignedlonglong)end_pfn << PAGE_SHIFT determines the page size ) - 1)