23 #ifndef _RTDM_UAPI_TESTING_H 24 #define _RTDM_UAPI_TESTING_H 26 #include <linux/types.h> 28 #define RTTST_PROFILE_VER 2 30 typedef struct rttst_bench_res {
38 typedef struct rttst_interm_bench_res {
39 struct rttst_bench_res last;
40 struct rttst_bench_res overall;
41 } rttst_interm_bench_res_t;
43 typedef struct rttst_overall_bench_res {
44 struct rttst_bench_res result;
48 } rttst_overall_bench_res_t;
50 #define RTTST_TMBENCH_INVALID -1 51 #define RTTST_TMBENCH_TASK 0 52 #define RTTST_TMBENCH_HANDLER 1 54 typedef struct rttst_tmbench_config {
60 int histogram_bucketsize;
62 } rttst_tmbench_config_t;
64 struct rttst_swtest_task {
70 #define RTTST_SWTEST_FPU 0x1 71 #define RTTST_SWTEST_USE_FPU 0x2 72 #define RTTST_SWTEST_FREEZE 0x4 74 struct rttst_swtest_dir {
79 struct rttst_swtest_error {
80 struct rttst_swtest_dir last_switch;
84 #define RTTST_RTDM_NORMAL_CLOSE 0 85 #define RTTST_RTDM_DEFER_CLOSE_CONTEXT 1 87 #define RTTST_RTDM_MAGIC_PRIMARY 0xfefbfefb 88 #define RTTST_RTDM_MAGIC_SECONDARY 0xa5b9a5b9 90 #define RTIOC_TYPE_TESTING RTDM_CLASS_TESTING 96 #define RTDM_SUBCLASS_TIMERBENCH 0 98 #define RTDM_SUBCLASS_IRQBENCH 1 100 #define RTDM_SUBCLASS_SWITCHTEST 2 102 #define RTDM_SUBCLASS_RTDMTEST 3 109 #define RTTST_RTIOC_INTERM_BENCH_RES \ 110 _IOWR(RTIOC_TYPE_TESTING, 0x00, struct rttst_interm_bench_res) 112 #define RTTST_RTIOC_TMBENCH_START \ 113 _IOW(RTIOC_TYPE_TESTING, 0x10, struct rttst_tmbench_config) 115 #define RTTST_RTIOC_TMBENCH_STOP \ 116 _IOWR(RTIOC_TYPE_TESTING, 0x11, struct rttst_overall_bench_res) 118 #define RTTST_RTIOC_SWTEST_SET_TASKS_COUNT \ 119 _IOW(RTIOC_TYPE_TESTING, 0x30, __u32) 121 #define RTTST_RTIOC_SWTEST_SET_CPU \ 122 _IOW(RTIOC_TYPE_TESTING, 0x31, __u32) 124 #define RTTST_RTIOC_SWTEST_REGISTER_UTASK \ 125 _IOW(RTIOC_TYPE_TESTING, 0x32, struct rttst_swtest_task) 127 #define RTTST_RTIOC_SWTEST_CREATE_KTASK \ 128 _IOWR(RTIOC_TYPE_TESTING, 0x33, struct rttst_swtest_task) 130 #define RTTST_RTIOC_SWTEST_PEND \ 131 _IOR(RTIOC_TYPE_TESTING, 0x34, struct rttst_swtest_task) 133 #define RTTST_RTIOC_SWTEST_SWITCH_TO \ 134 _IOR(RTIOC_TYPE_TESTING, 0x35, struct rttst_swtest_dir) 136 #define RTTST_RTIOC_SWTEST_GET_SWITCHES_COUNT \ 137 _IOR(RTIOC_TYPE_TESTING, 0x36, __u32) 139 #define RTTST_RTIOC_SWTEST_GET_LAST_ERROR \ 140 _IOR(RTIOC_TYPE_TESTING, 0x37, struct rttst_swtest_error) 142 #define RTTST_RTIOC_SWTEST_SET_PAUSE \ 143 _IOW(RTIOC_TYPE_TESTING, 0x38, __u32) 145 #define RTTST_RTIOC_RTDM_DEFER_CLOSE \ 146 _IOW(RTIOC_TYPE_TESTING, 0x40, __u32) 148 #define RTTST_RTIOC_RTDM_ACTOR_GET_CPU \ 149 _IOR(RTIOC_TYPE_TESTING, 0x41, __u32) 151 #define RTTST_RTIOC_RTDM_PING_PRIMARY \ 152 _IOR(RTIOC_TYPE_TESTING, 0x42, __u32) 154 #define RTTST_RTIOC_RTDM_PING_SECONDARY \ 155 _IOR(RTIOC_TYPE_TESTING, 0x43, __u32)