Skip to content

Commit

Permalink
[S390] Enable tick based perf_counter on s390.
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
  • Loading branch information
Martin Schwidefsky committed Jun 22, 2009
1 parent 181d952 commit 12310e9
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions arch/s390/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
8 changes: 8 additions & 0 deletions arch/s390/include/asm/perf_counter.h
Original file line number Diff line number Diff line change
@@ -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 changes: 6 additions & 0 deletions tools/perf/perf.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 <time.h>
#include <unistd.h>
#include <sys/types.h>
Expand Down

0 comments on commit 12310e9

Please sign in to comment.