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 RTTST_HEAPCHECK_ZEROOVRD 1 91 #define RTTST_HEAPCHECK_SHUFFLE 2 92 #define RTTST_HEAPCHECK_PATTERN 4 93 #define RTTST_HEAPCHECK_HOT 8 95 struct rttst_heap_parms {
102 struct rttst_heap_stats {
116 struct rttst_heap_stathdr {
118 struct rttst_heap_stats *buf;
121 #define RTIOC_TYPE_TESTING RTDM_CLASS_TESTING 127 #define RTDM_SUBCLASS_TIMERBENCH 0 129 #define RTDM_SUBCLASS_IRQBENCH 1 131 #define RTDM_SUBCLASS_SWITCHTEST 2 133 #define RTDM_SUBCLASS_RTDMTEST 3 135 #define RTDM_SUBCLASS_HEAPCHECK 4 142 #define RTTST_RTIOC_INTERM_BENCH_RES \ 143 _IOWR(RTIOC_TYPE_TESTING, 0x00, struct rttst_interm_bench_res) 145 #define RTTST_RTIOC_TMBENCH_START \ 146 _IOW(RTIOC_TYPE_TESTING, 0x10, struct rttst_tmbench_config) 148 #define RTTST_RTIOC_TMBENCH_STOP \ 149 _IOWR(RTIOC_TYPE_TESTING, 0x11, struct rttst_overall_bench_res) 151 #define RTTST_RTIOC_SWTEST_SET_TASKS_COUNT \ 152 _IOW(RTIOC_TYPE_TESTING, 0x30, __u32) 154 #define RTTST_RTIOC_SWTEST_SET_CPU \ 155 _IOW(RTIOC_TYPE_TESTING, 0x31, __u32) 157 #define RTTST_RTIOC_SWTEST_REGISTER_UTASK \ 158 _IOW(RTIOC_TYPE_TESTING, 0x32, struct rttst_swtest_task) 160 #define RTTST_RTIOC_SWTEST_CREATE_KTASK \ 161 _IOWR(RTIOC_TYPE_TESTING, 0x33, struct rttst_swtest_task) 163 #define RTTST_RTIOC_SWTEST_PEND \ 164 _IOR(RTIOC_TYPE_TESTING, 0x34, struct rttst_swtest_task) 166 #define RTTST_RTIOC_SWTEST_SWITCH_TO \ 167 _IOR(RTIOC_TYPE_TESTING, 0x35, struct rttst_swtest_dir) 169 #define RTTST_RTIOC_SWTEST_GET_SWITCHES_COUNT \ 170 _IOR(RTIOC_TYPE_TESTING, 0x36, __u32) 172 #define RTTST_RTIOC_SWTEST_GET_LAST_ERROR \ 173 _IOR(RTIOC_TYPE_TESTING, 0x37, struct rttst_swtest_error) 175 #define RTTST_RTIOC_SWTEST_SET_PAUSE \ 176 _IOW(RTIOC_TYPE_TESTING, 0x38, __u32) 178 #define RTTST_RTIOC_RTDM_DEFER_CLOSE \ 179 _IOW(RTIOC_TYPE_TESTING, 0x40, __u32) 181 #define RTTST_RTIOC_RTDM_ACTOR_GET_CPU \ 182 _IOR(RTIOC_TYPE_TESTING, 0x41, __u32) 184 #define RTTST_RTIOC_RTDM_PING_PRIMARY \ 185 _IOR(RTIOC_TYPE_TESTING, 0x42, __u32) 187 #define RTTST_RTIOC_RTDM_PING_SECONDARY \ 188 _IOR(RTIOC_TYPE_TESTING, 0x43, __u32) 190 #define RTTST_RTIOC_HEAP_CHECK \ 191 _IOR(RTIOC_TYPE_TESTING, 0x44, struct rttst_heap_parms) 193 #define RTTST_RTIOC_HEAP_STAT_COLLECT \ 194 _IOR(RTIOC_TYPE_TESTING, 0x45, int)