Function report |
Source Code:mm\frame_vector.c |
Create Date:2022-07-28 16:34:51 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:get_vaddr_frames() - map virtual addresses to pfns*@start: starting user address*@nr_frames: number of pages / pfns from start to map*@gup_flags: flags modifying lookup behaviour*@vec: structure which receives pages / pfns of the addresses mapped.
Proto:int get_vaddr_frames(unsigned long start, unsigned int nr_frames, unsigned int gup_flags, struct frame_vector *vec)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
unsigned long | start | |
unsigned int | nr_frames | |
unsigned int | gup_flags | |
struct frame_vector * | vec |
39 | ret = 0 |
43 | If nr_frames == 0 Then Return 0 |
46 | If WARN_ON_ONCE(nr_frames > Number of frames we have space for ) Then nr_frames = Number of frames we have space for |
52 | locked = 1 |
53 | vma = Look up the first VMA which intersects the interval start_addr..end_addr-1,NULL if none. Assume start_addr < end_addr. |
54 | If Not vma Then |
67 | If vma_is_fsdax(vma) Then |
68 | ret = -EOPNOTSUPP |
69 | Go to out |
72 | If Not (Flags, see mm.h. & (Memory mapped I/O or similar | Page-ranges managed without "struct page", just pure PFN )) Then |
73 | Did we pin pages by getting page ref? = true |
74 | Does array contain pages or pfns? = false |
77 | Go to out |
80 | Did we pin pages by getting page ref? = false |
81 | Does array contain pages or pfns? = true |
82 | Do |
83 | nums = frame_vector_pfns(vec) |
87 | If err Then |
93 | ret++ |
99 | If ret >= nr_frames || start < The first byte after our end addresswithin vm_mm. Then Break |
102 | When vma && Flags, see mm.h. & (Memory mapped I/O or similar | Page-ranges managed without "struct page", just pure PFN ) cycle |
103 | out : |
104 | If locked Then lease a read lock |
108 | If ret > 0 Then Number of frames stored in ptrs array = ret |
110 | Return ret |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |