aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcin Juszkiewicz <marcin.juszkiewicz@linaro.org>2013-01-16 17:03:26 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-01-16 16:10:00 +0000
commit169b9afcf2d357fdcf254a380d21d17701685834 (patch)
tree434fe0893437e513102d39c8c6ac0e3b716e1aa0
parent2fbfb2708fc7c0082b85ef964d850f8520b841d6 (diff)
downloadopenembedded-core-contrib-169b9afcf2d357fdcf254a380d21d17701685834.tar.gz
oprofile: add AArch64 support
Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-kernel/oprofile/oprofile/0001-Add-rmb-definition-for-AArch64-architecture.patch31
-rw-r--r--meta/recipes-kernel/oprofile/oprofile_0.9.8.bb3
2 files changed, 33 insertions, 1 deletions
diff --git a/meta/recipes-kernel/oprofile/oprofile/0001-Add-rmb-definition-for-AArch64-architecture.patch b/meta/recipes-kernel/oprofile/oprofile/0001-Add-rmb-definition-for-AArch64-architecture.patch
new file mode 100644
index 00000000000..195bfb296ec
--- /dev/null
+++ b/meta/recipes-kernel/oprofile/oprofile/0001-Add-rmb-definition-for-AArch64-architecture.patch
@@ -0,0 +1,31 @@
+From 27edaef9c6d66dfc324630ef40cb27e78031eeeb Mon Sep 17 00:00:00 2001
+From: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
+Date: Tue, 15 Jan 2013 07:37:33 +0100
+Subject: [PATCH] Add rmb() definition for AArch64 architecture
+
+Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
+
+Upstream-status: backport
+---
+ libperf_events/operf_utils.h | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/libperf_events/operf_utils.h b/libperf_events/operf_utils.h
+index 815d51d..2df00b7 100644
+--- a/libperf_events/operf_utils.h
++++ b/libperf_events/operf_utils.h
+@@ -148,6 +148,11 @@ void op_release_resources(void);
+ #define cpu_relax() asm volatile("":::"memory")
+ #endif
+
++#ifdef __aarch64__
++#define rmb() asm volatile("dmb ld" ::: "memory")
++#define cpu_relax() asm volatile("yield" ::: "memory")
++#endif
++
+ #ifdef __mips__
+ #include <asm/unistd.h>
+ #define rmb() asm volatile( \
+--
+1.8.0
+
diff --git a/meta/recipes-kernel/oprofile/oprofile_0.9.8.bb b/meta/recipes-kernel/oprofile/oprofile_0.9.8.bb
index 939c1bab85e..d283b5cd034 100644
--- a/meta/recipes-kernel/oprofile/oprofile_0.9.8.bb
+++ b/meta/recipes-kernel/oprofile/oprofile_0.9.8.bb
@@ -2,7 +2,8 @@ require oprofile.inc
PR = "${INC_PR}.0"
-SRC_URI += "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz"
+SRC_URI += "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz \
+ file://0001-Add-rmb-definition-for-AArch64-architecture.patch"
SRC_URI[md5sum] = "6d127023af1dd1cf24e15411229f3cc8"
SRC_URI[sha256sum] = "ab45900fa1a23e5d5badf3c0a55f26c17efe6e184efcf00b371433751fa761bc"