add teest tsc sync
[lttv.git] / tests / kernel / test-hpet.c
CommitLineData
c6a191ef 1/* test-async-tsc.c
2 *
3 * test async tsc on AMD.
4 */
5
6
7#include <asm/atomic.h>
8#include <linux/module.h>
9#include <asm/timex.h>
10#include <asm/hpet.h>
11#include <asm/io.h>
12
13static int __init test_init(void)
14{
15 int i;
16 cycles_t time1, time2;
17 volatile unsigned long myval;
18
19 time1 = get_cycles();
20 for (i=0; i<1; i++) {
21 //printk("time %llu\n", ltt_tsc_read());
22 //myval = ltt_tsc_read();
23 myval = hpet_readl(HPET_COUNTER);
24 }
25 time2 = get_cycles();
26 printk("timediff %llu\n", time2-time1);
27 return -EPERM;
28}
29
30static void __exit test_exit(void)
31{
32}
33
34module_init(test_init);
35module_exit(test_exit);
36
37MODULE_LICENSE("GPL");
38MODULE_AUTHOR("Mathieu Desnoyers");
39MODULE_DESCRIPTION("sync async tsc");
40
This page took 0.023104 seconds and 4 git commands to generate.