perfcounter tools: get the syscall number from arch/*/include/asm/unistd.h
authorThomas Gleixner <tglx@linutronix.de>
Fri, 1 May 2009 16:48:06 +0000 (18:48 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Fri, 1 May 2009 16:50:29 +0000 (18:50 +0200)
Avoid further confusion during development

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Documentation/perf_counter/perf.h

index fb1423072286e9d563f69e4a0bce434201ac7c53..6fa3656399f444fb1c265a1bd277582b3cbec9d3 100644 (file)
@@ -26,20 +26,14 @@ static inline unsigned long long rdclock(void)
 #define __user
 #define asmlinkage
 
-#ifdef __x86_64__
-#define __NR_perf_counter_open 298
-#define rmb()          asm volatile("lfence" ::: "memory")
-#define cpu_relax()    asm volatile("rep; nop" ::: "memory");
-#endif
-
-#ifdef __i386__
-#define __NR_perf_counter_open 336
+#if defined(__x86_64__) || defined(__i386__)
+#include "../../arch/x86/include/asm/unistd.h"
 #define rmb()          asm volatile("lfence" ::: "memory")
 #define cpu_relax()    asm volatile("rep; nop" ::: "memory");
 #endif
 
 #ifdef __powerpc__
-#define __NR_perf_counter_open 319
+#include "../../arch/powerpc/include/asm/unistd.h"
 #define rmb()          asm volatile ("sync" ::: "memory")
 #define cpu_relax()    asm volatile ("" ::: "memory");
 #endif