Jens Axboe | ebac465 | 2005-12-08 15:25:21 +0100 | [diff] [blame] | 1 | #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 Axboe | 8756e4d | 2006-05-27 20:24:53 +0200 | [diff] [blame] | 15 | #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 Axboe | 1ff2a7e | 2007-02-28 08:57:27 +0100 | [diff] [blame] | 21 | #ifndef __NR_async_exec |
Zach Brown | 36ddbc0 | 2007-09-19 08:42:16 +0200 | [diff] [blame] | 22 | #define __NR_async_exec 286 |
| 23 | #define __NR_async_wait 287 |
| 24 | #define __NR_umem_add 288 |
| 25 | #define __NR_async_thread 289 |
Jens Axboe | 1ff2a7e | 2007-02-28 08:57:27 +0100 | [diff] [blame] | 26 | #endif |
| 27 | |
Jens Axboe | cb25df6 | 2007-03-23 08:23:30 +0100 | [diff] [blame] | 28 | #define FIO_HUGE_PAGE 2097152 |
| 29 | |
Jens Axboe | 1ff2a7e | 2007-02-28 08:57:27 +0100 | [diff] [blame] | 30 | #define FIO_HAVE_SYSLET |
| 31 | |
Jens Axboe | db6defc | 2007-12-11 08:55:53 +0100 | [diff] [blame] | 32 | #define nop __asm__ __volatile__("rep;nop": : :"memory") |
Jens Axboe | 44c47fe | 2008-06-04 14:31:25 +0200 | [diff] [blame] | 33 | #define read_barrier() __asm__ __volatile__("lfence":::"memory") |
| 34 | #define write_barrier() __asm__ __volatile__("sfence":::"memory") |
Jens Axboe | ebac465 | 2005-12-08 15:25:21 +0100 | [diff] [blame] | 35 | |
Jens Axboe | 6164890 | 2008-06-02 09:41:51 +0200 | [diff] [blame] | 36 | static inline unsigned int arch_ffz(unsigned int bitmask) |
Jens Axboe | 8f7e39d | 2008-06-01 19:45:10 +0200 | [diff] [blame] | 37 | { |
Jens Axboe | 6164890 | 2008-06-02 09:41:51 +0200 | [diff] [blame] | 38 | __asm__("bsfl %1,%0" :"=r" (bitmask) :"r" (~bitmask)); |
Jens Axboe | 8f7e39d | 2008-06-01 19:45:10 +0200 | [diff] [blame] | 39 | return bitmask; |
| 40 | } |
Jens Axboe | 21df44a | 2008-06-02 09:43:29 +0200 | [diff] [blame] | 41 | #define ARCH_HAVE_FFZ |
Aaron Carroll | 419484b | 2008-09-12 10:57:13 +0200 | [diff] [blame] | 42 | #define ARCH_HAVE_SSE |
Jens Axboe | 8f7e39d | 2008-06-01 19:45:10 +0200 | [diff] [blame] | 43 | |
Jens Axboe | ebac465 | 2005-12-08 15:25:21 +0100 | [diff] [blame] | 44 | #endif |