Lines Matching refs:gup
23 struct gup_benchmark *gup) in __gup_benchmark_ioctl() argument
30 if (gup->size > ULONG_MAX) in __gup_benchmark_ioctl()
33 nr_pages = gup->size / PAGE_SIZE; in __gup_benchmark_ioctl()
39 nr = gup->nr_pages_per_call; in __gup_benchmark_ioctl()
41 for (addr = gup->addr; addr < gup->addr + gup->size; addr = next) { in __gup_benchmark_ioctl()
42 if (nr != gup->nr_pages_per_call) in __gup_benchmark_ioctl()
46 if (next > gup->addr + gup->size) { in __gup_benchmark_ioctl()
47 next = gup->addr + gup->size; in __gup_benchmark_ioctl()
53 nr = get_user_pages_fast(addr, nr, gup->flags & 1, in __gup_benchmark_ioctl()
58 (gup->flags & 1) | FOLL_LONGTERM, in __gup_benchmark_ioctl()
62 nr = get_user_pages(addr, nr, gup->flags & 1, pages + i, in __gup_benchmark_ioctl()
75 gup->get_delta_usec = ktime_us_delta(end_time, start_time); in __gup_benchmark_ioctl()
76 gup->size = addr - gup->addr; in __gup_benchmark_ioctl()
85 gup->put_delta_usec = ktime_us_delta(end_time, start_time); in __gup_benchmark_ioctl()
94 struct gup_benchmark gup; in gup_benchmark_ioctl() local
106 if (copy_from_user(&gup, (void __user *)arg, sizeof(gup))) in gup_benchmark_ioctl()
109 ret = __gup_benchmark_ioctl(cmd, &gup); in gup_benchmark_ioctl()
113 if (copy_to_user((void __user *)arg, &gup, sizeof(gup))) in gup_benchmark_ioctl()