arch-ppc.h: Add ilog2 implementation for ppc64
[fio.git] / arch / arch-ia64.h
index a8bb23a3bca6229d8fb2ca7d3d703e1c578d3c97..8e8dd7fd4215307879a1d00e46f9b960589e3ba5 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef ARCH_IA64_H
 #define ARCH_IA64_H
 
-#define ARCH   (arch_ia64)
+#define FIO_ARCH       (arch_ia64)
 
 #ifndef __NR_ioprio_set
 #define __NR_ioprio_set                1274
@@ -33,6 +33,24 @@ static inline unsigned long arch_ffz(unsigned long bitmask)
 {
        return ia64_popcnt(bitmask & (~bitmask - 1));
 }
+
+static inline unsigned long long get_cpu_clock(void)
+{
+       unsigned long long ret;
+
+       __asm__ __volatile__("mov %0=ar.itc" : "=r" (ret) : : "memory");
+       return ret;
+}
+
+#define ARCH_HAVE_INIT
+extern int tsc_reliable;
+static inline int arch_init(char *envp[])
+{
+       tsc_reliable = 1;
+       return 0;
+}
+
 #define ARCH_HAVE_FFZ
+#define ARCH_HAVE_CPU_CLOCK
 
 #endif