Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:swsusp_alloc - Allocate memory for hibernation image

Proto:static int swsusp_alloc(struct memory_bitmap *copy_bm, unsigned int nr_pages, unsigned int nr_highmem)

Type:int

Parameter:

TypeParameterName
struct memory_bitmap *copy_bm
unsigned intnr_pages
unsigned intnr_highmem
1948  If nr_highmem > 0 Then
1949  If get_highmem_buffer(PG_ANY) Then Go to err_out
1956  If nr_pages > Numbers of normal and highmem page frames allocated for hibernation image* before suspending devices. Then
1957  nr_pages -= Numbers of normal and highmem page frames allocated for hibernation image* before suspending devices.
1958  When nr_pages-- > 0 cycle
1962  If Not page Then Go to err_out
1968  Return 0
1970  err_out :
1971  swsusp_free - Free pages allocated for hibernation image.* Image pages are alocated before snapshot creation, so they need to be* released after resume.
1972  Return -ENOMEM
Caller
NameDescribe
swsusp_save