X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=arch%2Farch-x86.h;h=2e803cbe5ba13c96e2f377516dca6def34bc013f;hp=574383a65e0c4ca90ea9a2271b51e2390182f10c;hb=f57d6f943806727b70d3d15230dcac09b22fab1a;hpb=b12ebc65e82de1cc6174b65c79266dd0f0a4fbf3 diff --git a/arch/arch-x86.h b/arch/arch-x86.h index 574383a6..2e803cbe 100644 --- a/arch/arch-x86.h +++ b/arch/arch-x86.h @@ -19,22 +19,35 @@ #endif #ifndef __NR_async_exec -#define __NR_async_exec 320 -#define __NR_async_wait 321 -#define __NR_umem_add 322 -#define __NR_async_thread 323 +#define __NR_async_exec 325 +#define __NR_async_wait 326 +#define __NR_umem_add 327 +#define __NR_async_thread 328 #endif #define FIO_HUGE_PAGE 4194304 #define FIO_HAVE_SYSLET -#define nop __asm__ __volatile__("rep;nop": : :"memory") +#define nop __asm__ __volatile__("rep;nop": : :"memory") +#define read_barrier() __asm__ __volatile__("": : :"memory") +#define write_barrier() __asm__ __volatile__("": : :"memory") -static inline unsigned long fio_ffz(unsigned long bitmask) +static inline unsigned long arch_ffz(unsigned long bitmask) { __asm__("bsfl %1,%0" :"=r" (bitmask) :"r" (~bitmask)); return bitmask; } +static inline unsigned long long get_cpu_clock(void) +{ + unsigned long ret; + + __asm__ __volatile__("rdtsc" : "=A" (ret)); + return ret; +} + +#define ARCH_HAVE_FFZ +#define ARCH_HAVE_CPU_CLOCK + #endif