Lines Matching defs:nr_frames
14 * @nr_frames: number of pages / pfns from start to map
17 * It should have space for at least nr_frames entries.
28 * @nr_frames. In particular we stop mapping if there are more vmas of
38 int get_vaddr_frames(unsigned long start, unsigned int nr_frames,
46 if (nr_frames == 0)
49 if (WARN_ON_ONCE(nr_frames > vec->nr_allocated))
50 nr_frames = vec->nr_allocated;
78 ret = pin_user_pages_locked(start, nr_frames,
84 vec->nr_frames = 0;
92 vec->nr_frames = ret;
121 unpin_user_pages(pages, vec->nr_frames);
124 vec->nr_frames = 0;
145 for (i = 0; i < vec->nr_frames; i++)
149 for (i = 0; i < vec->nr_frames; i++)
172 for (i = 0; i < vec->nr_frames; i++)
180 * @nr_frames: number of pfns slots we should reserve
185 struct frame_vector *frame_vector_create(unsigned int nr_frames)
188 int size = sizeof(struct frame_vector) + sizeof(void *) * nr_frames;
190 if (WARN_ON_ONCE(nr_frames == 0))
196 if (WARN_ON_ONCE(nr_frames > INT_MAX / sizeof(void *) / 2))
205 vec->nr_allocated = nr_frames;
206 vec->nr_frames = 0;
220 VM_BUG_ON(vec->nr_frames > 0);