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 a8bb23a3bca6229d8fb2ca7d3d703e1c578d3c97..056f6365597424240c73d3129f8d6b74ac1e76f5 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