1 #ifndef FIO_ARCH_X86_COMMON
2 #define FIO_ARCH_X86_COMMON
4 static inline void do_cpuid(unsigned int *eax, unsigned int *ebx,
5 unsigned int *ecx, unsigned int *edx)
8 : "=a" (*eax), "=b" (*ebx), "=c" (*ecx), "=d" (*edx)
9 : "0" (*eax), "2" (*ecx)
13 #define ARCH_HAVE_INIT
14 extern int tsc_reliable;
15 static inline int arch_init(char *envp[])
17 unsigned int eax, ebx, ecx = 0, edx;
23 do_cpuid(&eax, &ebx, &ecx, &edx);
24 if (!(edx & (1U << 4)))
28 * Check for constant rate and synced (across cores) TSC
31 do_cpuid(&eax, &ebx, &ecx, &edx);
32 tsc_reliable = edx & (1U << 8);