Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:get_swap_reader

Proto:static int get_swap_reader(struct swap_map_handle *handle, unsigned int *flags_p)

Type:int

Parameter:

TypeParameterName
struct swap_map_handle *handle
unsigned int *flags_p
968  flags_p = Flags to pass to the "boot" kernel
970  If Not image Then Return -EINVAL
973  cur = NULL
974  last = maps = NULL
975  offset = image
976  When offset cycle
977  tmp = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc).
978  If Not tmp Then
980  Return -ENOMEM
982  If Not maps Then maps = tmp
984  If last Then next = tmp
986  last = tmp
988  map = __get_free_page(GFP_NOIO | __GFP_HIGH)
990  If Not map Then
992  Return -ENOMEM
995  error = hib_submit_io(REQ_OP_READ, 0, offset, map, NULL)
996  If error Then
998  Return error
1000  offset = next_swap
1002  k = 0
1003  cur = map
1004  Return 0
Caller
NameDescribe
swsusp_readswsusp_read - read the hibernation image.*@flags_p: flags passed by the "frozen" kernel in the image header should* be written into this memory location