From: tip-bot for Jamie Iles <jamie.iles@picochip.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
peterz@infradead.org, jamie.iles@picochip.com, mikpe@it.uu.se,
linux@arm.linux.org.uk, tglx@linutronix.de, mingo@elte.hu
Subject: [tip:perf/urgent] perf tools: Allow building for ARM
Date: Fri, 11 Dec 2009 12:54:33 GMT [thread overview]
Message-ID: <tip-58e9f94138c1d9c47f6a63632ca7a78fc6dcc15f@git.kernel.org> (raw)
In-Reply-To: <1260534009-5394-1-git-send-email-jamie.iles@picochip.com>
Commit-ID: 58e9f94138c1d9c47f6a63632ca7a78fc6dcc15f
Gitweb: http://git.kernel.org/tip/58e9f94138c1d9c47f6a63632ca7a78fc6dcc15f
Author: Jamie Iles <jamie.iles@picochip.com>
AuthorDate: Fri, 11 Dec 2009 12:20:09 +0000
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Fri, 11 Dec 2009 13:50:21 +0100
perf tools: Allow building for ARM
Add definitions of rmb() and cpu_relax() and include the ARM
unistd.h header. The __kuser_memory_barrier helper in the helper
page is used to provide the correct memory barrier depending on
the CPU type.
[ The rmb() will work on v6 and v7, segfault on v5. Dynamic
detection to add v5 support will be added later. ]
Signed-off-by: Jamie Iles <jamie.iles@picochip.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Mikael Pettersson <mikpe@it.uu.se>
LKML-Reference: <1260534009-5394-1-git-send-email-jamie.iles@picochip.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
tools/perf/perf.h | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/tools/perf/perf.h b/tools/perf/perf.h
index 454d5d5..75f941b 100644
--- a/tools/perf/perf.h
+++ b/tools/perf/perf.h
@@ -59,6 +59,18 @@
#define cpu_relax() asm volatile ("hint @pause" ::: "memory")
#endif
+#ifdef __arm__
+#include "../../arch/arm/include/asm/unistd.h"
+/*
+ * Use the __kuser_memory_barrier helper in the CPU helper page. See
+ * arch/arm/kernel/entry-armv.S in the kernel source for details.
+ */
+#define rmb() asm volatile("mov r0, #0xffff0fff; mov lr, pc;" \
+ "sub pc, r0, #95" ::: "r0", "lr", "cc", \
+ "memory")
+#define cpu_relax() asm volatile("":::"memory")
+#endif
+
#include <time.h>
#include <unistd.h>
#include <sys/types.h>
next prev parent reply other threads:[~2009-12-11 12:56 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
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-bot for Jamie Iles [this message]
2009-12-11 13:04 ` [tip:perf/urgent] perf tools: Allow building for ARM 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-58e9f94138c1d9c47f6a63632ca7a78fc6dcc15f@git.kernel.org \
--to=jamie.iles@picochip.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=mikpe@it.uu.se \
--cc=mingo@elte.hu \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox