函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\power\snapshot.c Create Date:2022-07-27 11:00:55
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称: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).

函数原型:void __init __register_nosave_region(unsigned long start_pfn, unsigned long end_pfn, int use_kmalloc)

返回类型:void

参数:

类型参数名称
unsigned longstart_pfn
unsigned longend_pfn
intuse_kmalloc
953  如果start_pfn大于等于end_pfn则返回
956  如果非链表为空
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.(链表前项, structnosave_region, list)
960  如果end_pfn恒等于start_pfn
961  end_pfn等于end_pfn
962  转到:Report
965  如果use_kmalloc
967  region等于开辟内存
968  BUG_ON(!region)
969  否则
971  region等于memblock_alloc(sizeof(structnosave_region), SMP_CACHE_BYTES)
973  如果非regionpanic - 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  添加链表项
980  Report :
981  打印信息("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)