Lines Matching refs:tfix

53 static struct ptunit_result tfix_init(struct time_fixture *tfix)  in tfix_init()  argument
55 memset(&tfix->config, 0, sizeof(tfix->config)); in tfix_init()
56 tfix->config.size = sizeof(tfix->config); in tfix_init()
57 tfix->config.cpuid_0x15_eax = 2; in tfix_init()
58 tfix->config.cpuid_0x15_ebx = 1; in tfix_init()
59 tfix->config.mtc_freq = 4; in tfix_init()
61 pt_tcal_init(&tfix->tcal); in tfix_init()
62 pt_tcal_set_fcr(&tfix->tcal, 0x2ull << pt_tcal_fcr_shr); in tfix_init()
64 pt_time_init(&tfix->time); in tfix_init()
70 static struct ptunit_result tsc_null(struct time_fixture *tfix) in tsc_null() argument
75 errcode = pt_time_update_tsc(NULL, &packet, &tfix->config); in tsc_null()
78 errcode = pt_time_update_tsc(&tfix->time, NULL, &tfix->config); in tsc_null()
84 static struct ptunit_result cbr_null(struct time_fixture *tfix) in cbr_null() argument
89 errcode = pt_time_update_cbr(NULL, &packet, &tfix->config); in cbr_null()
92 errcode = pt_time_update_cbr(&tfix->time, NULL, &tfix->config); in cbr_null()
98 static struct ptunit_result tma_null(struct time_fixture *tfix) in tma_null() argument
103 errcode = pt_time_update_tma(NULL, &packet, &tfix->config); in tma_null()
106 errcode = pt_time_update_tma(&tfix->time, NULL, &tfix->config); in tma_null()
109 errcode = pt_time_update_tma(&tfix->time, &packet, NULL); in tma_null()
115 static struct ptunit_result mtc_null(struct time_fixture *tfix) in mtc_null() argument
120 errcode = pt_time_update_mtc(NULL, &packet, &tfix->config); in mtc_null()
123 errcode = pt_time_update_mtc(&tfix->time, NULL, &tfix->config); in mtc_null()
126 errcode = pt_time_update_mtc(&tfix->time, &packet, NULL); in mtc_null()
132 static struct ptunit_result cyc_null(struct time_fixture *tfix) in cyc_null() argument
137 errcode = pt_time_update_cyc(NULL, &packet, &tfix->config, 0ull); in cyc_null()
140 errcode = pt_time_update_cyc(&tfix->time, NULL, &tfix->config, 0ull); in cyc_null()
143 errcode = pt_time_update_cyc(&tfix->time, &packet, NULL, 0ull); in cyc_null()
149 static struct ptunit_result query_tsc_null(struct time_fixture *tfix) in query_tsc_null() argument
154 errcode = pt_time_query_tsc(NULL, NULL, NULL, &tfix->time); in query_tsc_null()
163 static struct ptunit_result query_tsc_none(struct time_fixture *tfix) in query_tsc_none() argument
168 errcode = pt_time_query_tsc(&tsc, NULL, NULL, &tfix->time); in query_tsc_none()
174 static struct ptunit_result query_cbr_null(struct time_fixture *tfix) in query_cbr_null() argument
179 errcode = pt_time_query_cbr(NULL, &tfix->time); in query_cbr_null()
188 static struct ptunit_result query_cbr_none(struct time_fixture *tfix) in query_cbr_none() argument
193 errcode = pt_time_query_cbr(&cbr, &tfix->time); in query_cbr_none()
199 static struct ptunit_result tcal_cbr_null(struct time_fixture *tfix) in tcal_cbr_null() argument
204 errcode = pt_tcal_update_cbr(NULL, &packet, &tfix->config); in tcal_cbr_null()
210 static struct ptunit_result tcal_mtc_null(struct time_fixture *tfix) in tcal_mtc_null() argument
215 errcode = pt_tcal_update_mtc(NULL, &packet, &tfix->config); in tcal_mtc_null()
218 errcode = pt_tcal_update_mtc(&tfix->tcal, NULL, &tfix->config); in tcal_mtc_null()
221 errcode = pt_tcal_update_mtc(&tfix->tcal, &packet, NULL); in tcal_mtc_null()
227 static struct ptunit_result tcal_cyc_null(struct time_fixture *tfix) in tcal_cyc_null() argument
232 errcode = pt_tcal_update_cyc(NULL, &packet, &tfix->config); in tcal_cyc_null()
235 errcode = pt_tcal_update_cyc(&tfix->tcal, NULL, &tfix->config); in tcal_cyc_null()
241 static struct ptunit_result tsc(struct time_fixture *tfix) in tsc() argument
250 errcode = pt_time_update_tsc(&tfix->time, &packet, &tfix->config); in tsc()
253 errcode = pt_time_query_tsc(&tsc, &lost_mtc, &lost_cyc, &tfix->time); in tsc()
263 static struct ptunit_result cbr(struct time_fixture *tfix) in cbr() argument
271 errcode = pt_time_update_cbr(&tfix->time, &packet, &tfix->config); in cbr()
274 errcode = pt_time_query_cbr(&cbr, &tfix->time); in cbr()
282 static struct ptunit_result tma(struct time_fixture *tfix) in tma() argument
290 errcode = pt_time_update_tma(&tfix->time, &packet, &tfix->config); in tma()
296 static struct ptunit_result mtc(struct time_fixture *tfix) in mtc() argument
304 errcode = pt_time_update_mtc(&tfix->time, &packet, &tfix->config); in mtc()
307 errcode = pt_time_query_tsc(&tsc, NULL, NULL, &tfix->time); in mtc()
313 static struct ptunit_result cyc(struct time_fixture *tfix) in cyc() argument
319 errcode = pt_tcal_fcr(&fcr, &tfix->tcal); in cyc()
324 errcode = pt_time_update_cyc(&tfix->time, &packet, &tfix->config, fcr); in cyc()
327 errcode = pt_time_query_tsc(&tsc, NULL, NULL, &tfix->time); in cyc()
337 struct time_fixture tfix; in main() local
341 tfix.init = tfix_init; in main()
342 tfix.fini = NULL; in main()
344 ptu_run_f(suite, tsc_null, tfix); in main()
345 ptu_run_f(suite, cbr_null, tfix); in main()
346 ptu_run_f(suite, tma_null, tfix); in main()
347 ptu_run_f(suite, mtc_null, tfix); in main()
348 ptu_run_f(suite, cyc_null, tfix); in main()
350 ptu_run_f(suite, query_tsc_null, tfix); in main()
351 ptu_run_f(suite, query_tsc_none, tfix); in main()
352 ptu_run_f(suite, query_cbr_null, tfix); in main()
353 ptu_run_f(suite, query_cbr_none, tfix); in main()
355 ptu_run_f(suite, tcal_cbr_null, tfix); in main()
356 ptu_run_f(suite, tcal_mtc_null, tfix); in main()
357 ptu_run_f(suite, tcal_cyc_null, tfix); in main()
359 ptu_run_f(suite, tsc, tfix); in main()
360 ptu_run_f(suite, cbr, tfix); in main()
361 ptu_run_f(suite, tma, tfix); in main()
362 ptu_run_f(suite, mtc, tfix); in main()
363 ptu_run_f(suite, cyc, tfix); in main()