Jens Axboe | ebac465 | 2005-12-08 15:25:21 +0100 | [diff] [blame] | 1 | #ifndef ARCH_IA64_H |
| 2 | #define ARCH_IA64_H |
| 3 | |
| 4 | #define ARCH (arch_ia64) |
| 5 | |
| 6 | #ifndef __NR_ioprio_set |
| 7 | #define __NR_ioprio_set 1274 |
| 8 | #define __NR_ioprio_get 1275 |
| 9 | #endif |
| 10 | |
| 11 | #ifndef __NR_fadvise64 |
| 12 | #define __NR_fadvise64 1234 |
| 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 1297 |
| 17 | #define __NR_sys_tee 1301 |
| 18 | #define __NR_sys_vmsplice 1302 |
| 19 | #endif |
| 20 | |
Jens Axboe | db6defc | 2007-12-11 08:55:53 +0100 | [diff] [blame^] | 21 | #define nop asm volatile ("hint @pause" ::: "memory"); |
| 22 | #define read_barrier() asm volatile ("mf" ::: "memory") |
Jens Axboe | ebac465 | 2005-12-08 15:25:21 +0100 | [diff] [blame] | 23 | |
| 24 | #define ia64_popcnt(x) \ |
| 25 | ({ \ |
| 26 | unsigned long ia64_intri_res; \ |
| 27 | asm ("popcnt %0=%1" : "=r" (ia64_intri_res) : "r" (x)); \ |
| 28 | ia64_intri_res; \ |
| 29 | }) |
| 30 | |
Jens Axboe | b12ebc6 | 2007-05-21 11:42:33 +0200 | [diff] [blame] | 31 | static inline unsigned long fio_ffz(unsigned long bitmask) |
Jens Axboe | ebac465 | 2005-12-08 15:25:21 +0100 | [diff] [blame] | 32 | { |
| 33 | return ia64_popcnt(bitmask & (~bitmask - 1)); |
| 34 | } |
| 35 | |
| 36 | #endif |