public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] perf tools: allow building for ARM
@ 2009-12-11  9:20 Jamie Iles
  2009-12-11  9:21 ` [PATCH 2/2] perf tools: allow cross compiling Jamie Iles
  2009-12-11 10:23 ` [PATCH 1/2] perf tools: allow " Ingo Molnar
  0 siblings, 2 replies; 20+ messages in thread
From: Jamie Iles @ 2009-12-11  9:20 UTC (permalink / raw)
  To: linux-kernel; +Cc: Jamie Iles, Russell King, Peter Zijlstra

Add definitions of rmb() and cpu_relax() and include the ARM unistd.h
header. The kernel uses different definitions for rmb() depending on
the arch revision and whether the system is SMP or not. The lowest common
denominator is a compiler memory barrier so use that.

Signed-off-by: Jamie Iles <jamie.iles@picochip.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Peter Zijlstra <peterz@infradead.org>
---
 tools/perf/perf.h |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/tools/perf/perf.h b/tools/perf/perf.h
index 454d5d5..4b8eac6 100644
--- a/tools/perf/perf.h
+++ b/tools/perf/perf.h
@@ -59,6 +59,12 @@
 #define cpu_relax()	asm volatile ("hint @pause" ::: "memory")
 #endif
 
+#ifdef __arm__
+#include "../../arch/arm/include/asm/unistd.h"
+#define rmb()		asm volatile("":::"memory")
+#define cpu_relax()	asm volatile("":::"memory")
+#endif
+
 #include <time.h>
 #include <unistd.h>
 #include <sys/types.h>
-- 
1.6.5.4


^ permalink raw reply related	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2009-12-11 21:22 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-11  9:20 [PATCH 1/2] perf tools: allow building for ARM Jamie Iles
2009-12-11  9:21 ` [PATCH 2/2] perf tools: allow cross compiling Jamie Iles
2009-12-11 10:27   ` [tip:perf/urgent] perf tools: Allow " tip-bot for Jamie Iles
2009-12-11 12:20   ` [PATCH] perf tools: allow building for ARM (patch v2) Jamie Iles
2009-12-11 12:54     ` [tip:perf/urgent] perf tools: Allow building for ARM tip-bot for Jamie Iles
2009-12-11 13:04       ` Jamie Iles
2009-12-11 13:26         ` Ingo Molnar
2009-12-11 10:23 ` [PATCH 1/2] perf tools: allow " Ingo Molnar
2009-12-11 10:30   ` Jamie Iles
2009-12-11 10:38     ` Ingo Molnar
2009-12-11 11:01       ` Jamie Iles
2009-12-11 11:26         ` Mikael Pettersson
2009-12-11 21:22           ` Russell King - ARM Linux
     [not found]     ` <000101ca7a50$b3e2ad70$1ba80850$@deacon@arm.com>
2009-12-11 11:02       ` Ingo Molnar
2009-12-11 11:08         ` Pekka Enberg
2009-12-11 10:38   ` David Miller
2009-12-11 10:41     ` Ingo Molnar
2009-12-11 11:48       ` Jamie Iles
2009-12-11 12:48         ` Ingo Molnar
2009-12-11 21:19     ` Russell King - ARM Linux

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox