Add IA64 support for CPU clock
authorJens Axboe <jens.axboe@oracle.com>
Wed, 24 Mar 2010 12:35:28 +0000 (13:35 +0100)
committerJens Axboe <jens.axboe@oracle.com>
Wed, 24 Mar 2010 12:35:28 +0000 (13:35 +0100)
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
arch/arch-ia64.h

index a8bb23a..056f636 100644 (file)
@@ -33,6 +33,16 @@ static inline unsigned long arch_ffz(unsigned long bitmask)
 {
        return ia64_popcnt(bitmask & (~bitmask - 1));
 }
+
+static inline unsigned long get_cpu_clock(void)
+{
+       unsigned long ret;
+
+       __asm__ __volatile__("mov %0=ar.itc" : "=r" (ret) : : "memory");
+       return ret;
+}
+
 #define ARCH_HAVE_FFZ
+#define ARCH_HAVE_CPU_CLOCK
 
 #endif