diff options
Diffstat (limited to 'arch/x86_64/kernel/tsc.c')
-rw-r--r-- | arch/x86_64/kernel/tsc.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/x86_64/kernel/tsc.c b/arch/x86_64/kernel/tsc.c index 8c92f2fe7e2e..895831865019 100644 --- a/arch/x86_64/kernel/tsc.c +++ b/arch/x86_64/kernel/tsc.c | |||
@@ -180,6 +180,12 @@ static cycle_t read_tsc(void) | |||
180 | return ret; | 180 | return ret; |
181 | } | 181 | } |
182 | 182 | ||
183 | static cycle_t __vsyscall_fn vread_tsc(void) | ||
184 | { | ||
185 | cycle_t ret = (cycle_t)get_cycles_sync(); | ||
186 | return ret; | ||
187 | } | ||
188 | |||
183 | static struct clocksource clocksource_tsc = { | 189 | static struct clocksource clocksource_tsc = { |
184 | .name = "tsc", | 190 | .name = "tsc", |
185 | .rating = 300, | 191 | .rating = 300, |
@@ -188,6 +194,7 @@ static struct clocksource clocksource_tsc = { | |||
188 | .shift = 22, | 194 | .shift = 22, |
189 | .flags = CLOCK_SOURCE_IS_CONTINUOUS | | 195 | .flags = CLOCK_SOURCE_IS_CONTINUOUS | |
190 | CLOCK_SOURCE_MUST_VERIFY, | 196 | CLOCK_SOURCE_MUST_VERIFY, |
197 | .vread = vread_tsc, | ||
191 | }; | 198 | }; |
192 | 199 | ||
193 | void mark_tsc_unstable(void) | 200 | void mark_tsc_unstable(void) |