فهرست منبع

[S390] Enable tick based perf_counter on s390.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Martin Schwidefsky 16 سال پیش
والد
کامیت
12310e9c1b
3فایلهای تغییر یافته به همراه15 افزوده شده و 0 حذف شده
  1. 1 0
      arch/s390/Kconfig
  2. 8 0
      arch/s390/include/asm/perf_counter.h
  3. 6 0
      tools/perf/perf.h

+ 1 - 0
arch/s390/Kconfig

@@ -94,6 +94,7 @@ config S390
 	select HAVE_KVM if 64BIT
 	select HAVE_KVM if 64BIT
 	select HAVE_ARCH_TRACEHOOK
 	select HAVE_ARCH_TRACEHOOK
 	select INIT_ALL_POSSIBLE
 	select INIT_ALL_POSSIBLE
+	select HAVE_PERF_COUNTERS
 
 
 source "init/Kconfig"
 source "init/Kconfig"
 
 

+ 8 - 0
arch/s390/include/asm/perf_counter.h

@@ -0,0 +1,8 @@
+/*
+ * Performance counter support - s390 specific definitions.
+ *
+ * Copyright 2009 Martin Schwidefsky, IBM Corporation.
+ */
+
+static inline void set_perf_counter_pending(void) {}
+static inline void clear_perf_counter_pending(void) {}

+ 6 - 0
tools/perf/perf.h

@@ -13,6 +13,12 @@
 #define cpu_relax()	asm volatile ("" ::: "memory");
 #define cpu_relax()	asm volatile ("" ::: "memory");
 #endif
 #endif
 
 
+#ifdef __s390__
+#include "../../arch/s390/include/asm/unistd.h"
+#define rmb()		asm volatile("bcr 15,0" ::: "memory")
+#define cpu_relax()	asm volatile("" ::: "memory");
+#endif
+
 #include <time.h>
 #include <time.h>
 #include <unistd.h>
 #include <unistd.h>
 #include <sys/types.h>
 #include <sys/types.h>