perf tools: Add ia64 support for tools/perf/
authorLuck, Tony <tony.luck@intel.com>
Tue, 17 Nov 2009 17:05:56 +0000 (09:05 -0800)
committerIngo Molnar <mingo@elte.hu>
Thu, 19 Nov 2009 05:03:33 +0000 (06:03 +0100)
Compiler on ia64 rejects the "-m64" option.
Add arch specific pieces to perf.h

Signed-off-by: Tony Luck <tony.luck@intel.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <4b02d7f43514327a@agluck-desktop.sc.intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
tools/perf/Makefile
tools/perf/perf.h

index 5d1a8b0dff8fef2bd3166046b50420c85187186a..3f0666af93de7e0cac32b4bb51b17f7a61bf3b0a 100644 (file)
@@ -166,10 +166,12 @@ ifdef NO_64BIT
   MBITS := -m32
 else
   #
-  # If we're on a 64-bit kernel, use -m64:
+  # If we're on a 64-bit kernel (except ia64), use -m64:
   #
-  ifneq ($(patsubst %64,%,$(uname_M)),$(uname_M))
-    MBITS := -m64
+  ifneq ($(uname_M),ia64)
+    ifneq ($(patsubst %64,%,$(uname_M)),$(uname_M))
+      MBITS := -m64
+    endif
   endif
 endif
 
index 216bdb223f63e5d6b70d7e2c815318d0248ca853..454d5d55f32d9cb30d8206c6f03bfe1e0b5f61fb 100644 (file)
 #define cpu_relax()    asm volatile("" ::: "memory")
 #endif
 
+#ifdef __ia64__
+#include "../../arch/ia64/include/asm/unistd.h"
+#define rmb()          asm volatile ("mf" ::: "memory")
+#define cpu_relax()    asm volatile ("hint @pause" ::: "memory")
+#endif
+
 #include <time.h>
 #include <unistd.h>
 #include <sys/types.h>