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_cbr_zero(struct time_fixture *tfix) in tcal_cbr_zero() argument
216 config = tfix->config; in tcal_cbr_zero()
220 errcode = pt_tcal_update_cbr(&tfix->tcal, &packet, &config); in tcal_cbr_zero()
226 static struct ptunit_result tcal_mtc_null(struct time_fixture *tfix) in tcal_mtc_null() argument
231 errcode = pt_tcal_update_mtc(NULL, &packet, &tfix->config); in tcal_mtc_null()
234 errcode = pt_tcal_update_mtc(&tfix->tcal, NULL, &tfix->config); in tcal_mtc_null()
237 errcode = pt_tcal_update_mtc(&tfix->tcal, &packet, NULL); in tcal_mtc_null()
243 static struct ptunit_result tcal_cyc_null(struct time_fixture *tfix) in tcal_cyc_null() argument
248 errcode = pt_tcal_update_cyc(NULL, &packet, &tfix->config); in tcal_cyc_null()
251 errcode = pt_tcal_update_cyc(&tfix->tcal, NULL, &tfix->config); in tcal_cyc_null()
257 static struct ptunit_result tsc(struct time_fixture *tfix) in tsc() argument
266 errcode = pt_time_update_tsc(&tfix->time, &packet, &tfix->config); in tsc()
269 errcode = pt_time_query_tsc(&tsc, &lost_mtc, &lost_cyc, &tfix->time); in tsc()
279 static struct ptunit_result cbr(struct time_fixture *tfix) in cbr() argument
287 errcode = pt_time_update_cbr(&tfix->time, &packet, &tfix->config); in cbr()
290 errcode = pt_time_query_cbr(&cbr, &tfix->time); in cbr()
298 static struct ptunit_result cbr_zero(struct time_fixture *tfix) in cbr_zero() argument
305 errcode = pt_time_update_cbr(&tfix->time, &packet, &tfix->config); in cbr_zero()
311 static struct ptunit_result tma(struct time_fixture *tfix) in tma() argument
319 errcode = pt_time_update_tma(&tfix->time, &packet, &tfix->config); in tma()
325 static struct ptunit_result mtc(struct time_fixture *tfix) in mtc() argument
333 errcode = pt_time_update_mtc(&tfix->time, &packet, &tfix->config); in mtc()
336 errcode = pt_time_query_tsc(&tsc, NULL, NULL, &tfix->time); in mtc()
342 static struct ptunit_result cyc(struct time_fixture *tfix) in cyc() argument
348 errcode = pt_tcal_fcr(&fcr, &tfix->tcal); in cyc()
353 errcode = pt_time_update_cyc(&tfix->time, &packet, &tfix->config, fcr); in cyc()
356 errcode = pt_time_query_tsc(&tsc, NULL, NULL, &tfix->time); in cyc()
366 struct time_fixture tfix; in main() local
370 tfix.init = tfix_init; in main()
371 tfix.fini = NULL; in main()
373 ptu_run_f(suite, tsc_null, tfix); in main()
374 ptu_run_f(suite, cbr_null, tfix); in main()
375 ptu_run_f(suite, tma_null, tfix); in main()
376 ptu_run_f(suite, mtc_null, tfix); in main()
377 ptu_run_f(suite, cyc_null, tfix); in main()
379 ptu_run_f(suite, query_tsc_null, tfix); in main()
380 ptu_run_f(suite, query_tsc_none, tfix); in main()
381 ptu_run_f(suite, query_cbr_null, tfix); in main()
382 ptu_run_f(suite, query_cbr_none, tfix); in main()
384 ptu_run_f(suite, tcal_cbr_null, tfix); in main()
385 ptu_run_f(suite, tcal_cbr_zero, tfix); in main()
386 ptu_run_f(suite, tcal_mtc_null, tfix); in main()
387 ptu_run_f(suite, tcal_cyc_null, tfix); in main()
389 ptu_run_f(suite, tsc, tfix); in main()
390 ptu_run_f(suite, cbr, tfix); in main()
391 ptu_run_f(suite, cbr_zero, tfix); in main()
392 ptu_run_f(suite, tma, tfix); in main()
393 ptu_run_f(suite, mtc, tfix); in main()
394 ptu_run_f(suite, cyc, tfix); in main()