Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-or-later */
0002 #ifndef __GUP_TEST_H
0003 #define __GUP_TEST_H
0004 
0005 #include <linux/types.h>
0006 
0007 #define GUP_FAST_BENCHMARK  _IOWR('g', 1, struct gup_test)
0008 #define PIN_FAST_BENCHMARK  _IOWR('g', 2, struct gup_test)
0009 #define PIN_LONGTERM_BENCHMARK  _IOWR('g', 3, struct gup_test)
0010 #define GUP_BASIC_TEST      _IOWR('g', 4, struct gup_test)
0011 #define PIN_BASIC_TEST      _IOWR('g', 5, struct gup_test)
0012 #define DUMP_USER_PAGES_TEST    _IOWR('g', 6, struct gup_test)
0013 
0014 #define GUP_TEST_MAX_PAGES_TO_DUMP      8
0015 
0016 #define GUP_TEST_FLAG_DUMP_PAGES_USE_PIN    0x1
0017 
0018 struct gup_test {
0019     __u64 get_delta_usec;
0020     __u64 put_delta_usec;
0021     __u64 addr;
0022     __u64 size;
0023     __u32 nr_pages_per_call;
0024     __u32 gup_flags;
0025     __u32 test_flags;
0026     /*
0027      * Each non-zero entry is the number of the page (1-based: first page is
0028      * page 1, so that zero entries mean "do nothing") from the .addr base.
0029      */
0030     __u32 which_pages[GUP_TEST_MAX_PAGES_TO_DUMP];
0031 };
0032 
0033 #endif  /* __GUP_TEST_H */