From 12310e9c1b9a53896e4df0459039dd125f62aa9b Mon Sep 17 00:00:00 2001 From: Martin Schwidefsky Date: Mon, 22 Jun 2009 12:08:22 +0200 Subject: [PATCH] [S390] Enable tick based perf_counter on s390. Signed-off-by: Martin Schwidefsky --- arch/s390/Kconfig | 1 + arch/s390/include/asm/perf_counter.h | 8 ++++++++ tools/perf/perf.h | 6 ++++++ 3 files changed, 15 insertions(+) create mode 100644 arch/s390/include/asm/perf_counter.h diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig index a14dba0e4d67..e577839f3073 100644 --- a/arch/s390/Kconfig +++ b/arch/s390/Kconfig @@ -94,6 +94,7 @@ config S390 select HAVE_KVM if 64BIT select HAVE_ARCH_TRACEHOOK select INIT_ALL_POSSIBLE + select HAVE_PERF_COUNTERS source "init/Kconfig" diff --git a/arch/s390/include/asm/perf_counter.h b/arch/s390/include/asm/perf_counter.h new file mode 100644 index 000000000000..a7205a3828cb --- /dev/null +++ b/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) {} diff --git a/tools/perf/perf.h b/tools/perf/perf.h index bccb529dac08..ceb68aa51f7f 100644 --- a/tools/perf/perf.h +++ b/tools/perf/perf.h @@ -13,6 +13,12 @@ #define cpu_relax() asm volatile ("" ::: "memory"); #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 #include #include -- 2.20.1