Lines Matching refs:gup
68 struct gup_benchmark *gup)
78 if (gup->size > ULONG_MAX)
81 nr_pages = gup->size / PAGE_SIZE;
92 nr = gup->nr_pages_per_call;
94 for (addr = gup->addr; addr < gup->addr + gup->size; addr = next) {
95 if (nr != gup->nr_pages_per_call)
99 if (next > gup->addr + gup->size) {
100 next = gup->addr + gup->size;
104 /* Filter out most gup flags: only allow a tiny subset here: */
105 gup->flags &= FOLL_WRITE;
109 nr = get_user_pages_fast(addr, nr, gup->flags,
113 nr = get_user_pages(addr, nr, gup->flags, pages + i,
117 nr = pin_user_pages_fast(addr, nr, gup->flags,
121 nr = pin_user_pages(addr, nr, gup->flags, pages + i,
126 gup->flags | FOLL_LONGTERM,
143 gup->get_delta_usec = ktime_us_delta(end_time, start_time);
144 gup->size = addr - gup->addr;
157 gup->put_delta_usec = ktime_us_delta(end_time, start_time);
170 struct gup_benchmark gup;
184 if (copy_from_user(&gup, (void __user *)arg, sizeof(gup)))
187 ret = __gup_benchmark_ioctl(cmd, &gup);
191 if (copy_to_user((void __user *)arg, &gup, sizeof(gup)))