aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/tsc_64.c
diff options
context:
space:
mode:
authorAndi Kleen <ak@suse.de>2008-01-30 07:32:39 -0500
committerIngo Molnar <mingo@elte.hu>2008-01-30 07:32:39 -0500
commit6d63de8dbcda98511206897562ecfcdacf18f523 (patch)
treef845f109636c3cc7eddad455b89ffb986a1188d0 /arch/x86/kernel/tsc_64.c
parentf06e4ec1c15691b0cfd2397ae32214fa36c90d71 (diff)
x86: remove get_cycles_sync
rdtsc is now speculation-safe, so no need for the sync variants of the APIs. [ mingo@elte.hu: removed the nsec_barrier() complication. ] Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/kernel/tsc_64.c')
-rw-r--r--arch/x86/kernel/tsc_64.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/x86/kernel/tsc_64.c b/arch/x86/kernel/tsc_64.c
index 3723401c4593..2cc55b726c22 100644
--- a/arch/x86/kernel/tsc_64.c
+++ b/arch/x86/kernel/tsc_64.c
@@ -181,12 +181,12 @@ static unsigned long __init tsc_read_refs(unsigned long *pm,
181 int i; 181 int i;
182 182
183 for (i = 0; i < MAX_RETRIES; i++) { 183 for (i = 0; i < MAX_RETRIES; i++) {
184 t1 = get_cycles_sync(); 184 t1 = get_cycles();
185 if (hpet) 185 if (hpet)
186 *hpet = hpet_readl(HPET_COUNTER) & 0xFFFFFFFF; 186 *hpet = hpet_readl(HPET_COUNTER) & 0xFFFFFFFF;
187 else 187 else
188 *pm = acpi_pm_read_early(); 188 *pm = acpi_pm_read_early();
189 t2 = get_cycles_sync(); 189 t2 = get_cycles();
190 if ((t2 - t1) < SMI_TRESHOLD) 190 if ((t2 - t1) < SMI_TRESHOLD)
191 return t2; 191 return t2;
192 } 192 }
@@ -210,9 +210,9 @@ void __init tsc_calibrate(void)
210 outb(0xb0, 0x43); 210 outb(0xb0, 0x43);
211 outb((CLOCK_TICK_RATE / (1000 / 50)) & 0xff, 0x42); 211 outb((CLOCK_TICK_RATE / (1000 / 50)) & 0xff, 0x42);
212 outb((CLOCK_TICK_RATE / (1000 / 50)) >> 8, 0x42); 212 outb((CLOCK_TICK_RATE / (1000 / 50)) >> 8, 0x42);
213 tr1 = get_cycles_sync(); 213 tr1 = get_cycles();
214 while ((inb(0x61) & 0x20) == 0); 214 while ((inb(0x61) & 0x20) == 0);
215 tr2 = get_cycles_sync(); 215 tr2 = get_cycles();
216 216
217 tsc2 = tsc_read_refs(&pm2, hpet ? &hpet2 : NULL); 217 tsc2 = tsc_read_refs(&pm2, hpet ? &hpet2 : NULL);
218 218
@@ -300,13 +300,13 @@ __setup("notsc", notsc_setup);
300/* clock source code: */ 300/* clock source code: */
301static cycle_t read_tsc(void) 301static cycle_t read_tsc(void)
302{ 302{
303 cycle_t ret = (cycle_t)get_cycles_sync(); 303 cycle_t ret = (cycle_t)get_cycles();
304 return ret; 304 return ret;
305} 305}
306 306
307static cycle_t __vsyscall_fn vread_tsc(void) 307static cycle_t __vsyscall_fn vread_tsc(void)
308{ 308{
309 cycle_t ret = (cycle_t)vget_cycles_sync(); 309 cycle_t ret = (cycle_t)vget_cycles();
310 return ret; 310 return ret;
311} 311}
312 312