Lines Matching refs:gup
23 struct gup_benchmark *gup) in __gup_benchmark_ioctl() argument
31 if (gup->size > ULONG_MAX) in __gup_benchmark_ioctl()
34 nr_pages = gup->size / PAGE_SIZE; in __gup_benchmark_ioctl()
40 nr = gup->nr_pages_per_call; in __gup_benchmark_ioctl()
42 for (addr = gup->addr; addr < gup->addr + gup->size; addr = next) { in __gup_benchmark_ioctl()
43 if (nr != gup->nr_pages_per_call) in __gup_benchmark_ioctl()
47 if (next > gup->addr + gup->size) { in __gup_benchmark_ioctl()
48 next = gup->addr + gup->size; in __gup_benchmark_ioctl()
54 nr = get_user_pages_fast(addr, nr, gup->flags & 1, in __gup_benchmark_ioctl()
59 (gup->flags & 1) | FOLL_LONGTERM, in __gup_benchmark_ioctl()
63 nr = get_user_pages(addr, nr, gup->flags & 1, pages + i, in __gup_benchmark_ioctl()
78 gup->get_delta_usec = ktime_us_delta(end_time, start_time); in __gup_benchmark_ioctl()
79 gup->size = addr - gup->addr; in __gup_benchmark_ioctl()
88 gup->put_delta_usec = ktime_us_delta(end_time, start_time); in __gup_benchmark_ioctl()
98 struct gup_benchmark gup; in gup_benchmark_ioctl() local
110 if (copy_from_user(&gup, (void __user *)arg, sizeof(gup))) in gup_benchmark_ioctl()
113 ret = __gup_benchmark_ioctl(cmd, &gup); in gup_benchmark_ioctl()
117 if (copy_to_user((void __user *)arg, &gup, sizeof(gup))) in gup_benchmark_ioctl()