summaryrefslogtreecommitdiff
path: root/meta/recipes-kernel/oprofile
diff options
context:
space:
mode:
authorMarek Vasut <marex@denx.de>2016-02-10 01:04:06 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-02-11 12:27:28 +0000
commita4292d508c2747d2543302404d877fff58f8b1d1 (patch)
treed6633da6e82bd0b03f29c299202df1d49f45422e /meta/recipes-kernel/oprofile
parent4d05f82844782a0fb053b9d2c7ad53e85efdf163 (diff)
downloadopenembedded-core-a4292d508c2747d2543302404d877fff58f8b1d1.tar.gz
openembedded-core-a4292d508c2747d2543302404d877fff58f8b1d1.tar.bz2
openembedded-core-a4292d508c2747d2543302404d877fff58f8b1d1.zip
oprofile: Add nios2 support
Add support for the nios2 architecture. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Richard Purdie <richard.purdie@linuxfoundation.org> Cc: Ross Burton <ross.burton@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/recipes-kernel/oprofile')
-rw-r--r--meta/recipes-kernel/oprofile/oprofile.inc3
-rw-r--r--meta/recipes-kernel/oprofile/oprofile/0001-Add-rmb-definition-for-NIOS2-architecture.patch30
2 files changed, 32 insertions, 1 deletions
diff --git a/meta/recipes-kernel/oprofile/oprofile.inc b/meta/recipes-kernel/oprofile/oprofile.inc
index faf0e53fe5..cf3ad435cf 100644
--- a/meta/recipes-kernel/oprofile/oprofile.inc
+++ b/meta/recipes-kernel/oprofile/oprofile.inc
@@ -23,7 +23,8 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz \
file://automake-foreign.patch \
file://oprofile-cross-compile-tests.patch \
file://run-ptest \
- file://root-home-dir.patch"
+ file://root-home-dir.patch \
+ file://0001-Add-rmb-definition-for-NIOS2-architecture.patch"
SRC_URI_append_libc-musl = " file://musl.patch"
diff --git a/meta/recipes-kernel/oprofile/oprofile/0001-Add-rmb-definition-for-NIOS2-architecture.patch b/meta/recipes-kernel/oprofile/oprofile/0001-Add-rmb-definition-for-NIOS2-architecture.patch
new file mode 100644
index 0000000000..ae8562a231
--- /dev/null
+++ b/meta/recipes-kernel/oprofile/oprofile/0001-Add-rmb-definition-for-NIOS2-architecture.patch
@@ -0,0 +1,30 @@
+From 34b0d9b1a32fb404a30327a7ae8931c7c75583bf Mon Sep 17 00:00:00 2001
+From: Marek Vasut <marex@denx.de>
+Date: Tue, 9 Feb 2016 02:00:29 +0100
+Subject: [PATCH] Add rmb() definition for NIOS2 architecture
+
+Signed-off-by: Marek Vasut <marex@denx.de>
+Upstream-Status: Submitted [ http://marc.info/?l=oprofile-list&m=145501915931874&w=2 ]
+---
+ 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 32954cc..8270e53 100644
+--- a/libperf_events/operf_utils.h
++++ b/libperf_events/operf_utils.h
+@@ -178,6 +178,11 @@ void op_release_resources(void);
+ #define cpu_relax() asm volatile("" ::: "memory")
+ #endif
+
++#ifdef __nios2__
++#define rmb() asm volatile("" ::: "memory")
++#define cpu_relax() asm volatile("" ::: "memory")
++#endif
++
+ #ifdef __tile__
+ #include <asm/unistd.h>
+ #define rmb() __insn_mf()
+--
+2.7.0
+