blob: 457714c80506cebc0c81f5e88ceca537643ac83c [file] [log] [blame]
Jens Axboeebac4652005-12-08 15:25:21 +01001#ifndef ARCH_X86_64_h
2#define ARCH_X86_64_h
3
4#define ARCH (arch_x86_64)
5
6#ifndef __NR_ioprio_set
7#define __NR_ioprio_set 251
8#define __NR_ioprio_get 252
9#endif
10
11#ifndef __NR_fadvise64
12#define __NR_fadvise64 221
13#endif
14
Jens Axboe8756e4d2006-05-27 20:24:53 +020015#ifndef __NR_sys_splice
16#define __NR_sys_splice 275
17#define __NR_sys_tee 276
18#define __NR_sys_vmsplice 278
19#endif
20
Jens Axboe1ff2a7e2007-02-28 08:57:27 +010021#ifndef __NR_async_exec
Zach Brown36ddbc02007-09-19 08:42:16 +020022#define __NR_async_exec 286
23#define __NR_async_wait 287
24#define __NR_umem_add 288
25#define __NR_async_thread 289
Jens Axboe1ff2a7e2007-02-28 08:57:27 +010026#endif
27
Jens Axboecb25df62007-03-23 08:23:30 +010028#define FIO_HUGE_PAGE 2097152
29
Jens Axboe1ff2a7e2007-02-28 08:57:27 +010030#define FIO_HAVE_SYSLET
31
Jens Axboedb6defc2007-12-11 08:55:53 +010032#define nop __asm__ __volatile__("rep;nop": : :"memory")
Jens Axboe44c47fe2008-06-04 14:31:25 +020033#define read_barrier() __asm__ __volatile__("lfence":::"memory")
34#define write_barrier() __asm__ __volatile__("sfence":::"memory")
Jens Axboeebac4652005-12-08 15:25:21 +010035
Jens Axboe61648902008-06-02 09:41:51 +020036static inline unsigned int arch_ffz(unsigned int bitmask)
Jens Axboe8f7e39d2008-06-01 19:45:10 +020037{
Jens Axboe61648902008-06-02 09:41:51 +020038 __asm__("bsfl %1,%0" :"=r" (bitmask) :"r" (~bitmask));
Jens Axboe8f7e39d2008-06-01 19:45:10 +020039 return bitmask;
40}
Jens Axboe21df44a2008-06-02 09:43:29 +020041#define ARCH_HAVE_FFZ
Aaron Carroll419484b2008-09-12 10:57:13 +020042#define ARCH_HAVE_SSE
Jens Axboe8f7e39d2008-06-01 19:45:10 +020043
Jens Axboeebac4652005-12-08 15:25:21 +010044#endif