summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/liburcu
diff options
context:
space:
mode:
authorMarek Vasut <marex@denx.de>2016-02-10 01:04:05 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-02-11 12:27:49 +0000
commit252f97ec9234f09a049635538e665a985bbb7f0f (patch)
tree8bad77c7183feb3d2cf2bfe5257901c7a5f5c31b /meta/recipes-support/liburcu
parente72ab70a03c4a71e757be0f8b4a40d7376dce062 (diff)
downloadpoky-252f97ec9234f09a049635538e665a985bbb7f0f.tar.gz
liburcu: Add nios2 support
Add support for the nios2 into the liburcu. (From OE-Core rev: c0f8be26f5a82b546e066511a405306f40bfe1a8) 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> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-support/liburcu')
-rw-r--r--meta/recipes-support/liburcu/liburcu/0001-Support-for-NIOS2-architecture.patch144
-rw-r--r--meta/recipes-support/liburcu/liburcu_0.9.1.bb8
2 files changed, 149 insertions, 3 deletions
diff --git a/meta/recipes-support/liburcu/liburcu/0001-Support-for-NIOS2-architecture.patch b/meta/recipes-support/liburcu/liburcu/0001-Support-for-NIOS2-architecture.patch
new file mode 100644
index 0000000000..690872b4a2
--- /dev/null
+++ b/meta/recipes-support/liburcu/liburcu/0001-Support-for-NIOS2-architecture.patch
@@ -0,0 +1,144 @@
1From add566b913e1b5cd4974a2167157dc08d8245ab0 Mon Sep 17 00:00:00 2001
2From: Marek Vasut <marex@denx.de>
3Date: Tue, 9 Feb 2016 01:52:26 +0100
4Subject: [PATCH] Support for NIOS2 architecture
5
6Add support for the Altera NIOS2 CPU archirecture. The atomic operations
7are handled by the GCC. The memory barriers on this systems are entirely
8trivial too, since the CPU does not support SMP at all.
9
10Signed-off-by: Marek Vasut <marex@denx.de>
11Upstream-Status: Backport [ http://git.lttng.org/?p=userspace-rcu.git;a=commit;h=859050b3088aa3f0cb59d7f51ce24b9a0f18faa5 ]
12---
13 LICENSE | 1 +
14 README.md | 1 +
15 configure.ac | 1 +
16 urcu/arch/nios2.h | 40 ++++++++++++++++++++++++++++++++++++++++
17 urcu/uatomic/nios2.h | 32 ++++++++++++++++++++++++++++++++
18 5 files changed, 75 insertions(+)
19 create mode 100644 urcu/arch/nios2.h
20 create mode 100644 urcu/uatomic/nios2.h
21
22diff --git a/LICENSE b/LICENSE
23index 3147094..a06fdcc 100644
24--- a/LICENSE
25+++ b/LICENSE
26@@ -45,6 +45,7 @@ compiler.h
27 arch/s390.h
28 uatomic/alpha.h
29 uatomic/mips.h
30+uatomic/nios2.h
31 uatomic/s390.h
32 system.h
33
34diff --git a/README.md b/README.md
35index f6b290f..6fe9c1e 100644
36--- a/README.md
37+++ b/README.md
38@@ -43,6 +43,7 @@ Currently, the following architectures are supported:
39 - S390, S390x
40 - ARM 32/64
41 - MIPS
42+ - NIOS2
43 - Alpha
44 - ia64
45 - Sparcv9 32/64
46diff --git a/configure.ac b/configure.ac
47index 39a7777..71a7d71 100644
48--- a/configure.ac
49+++ b/configure.ac
50@@ -124,6 +124,7 @@ AS_CASE([$host_cpu],
51 [arm*], [ARCHTYPE="arm"],
52 [aarch64], [ARCHTYPE="aarch64"],
53 [mips*], [ARCHTYPE="mips"],
54+ [nios2*], [ARCHTYPE="nios2"],
55 [tile*], [ARCHTYPE="tile"],
56 [hppa*], [ARCHTYPE="hppa"],
57 [ARCHTYPE="unknown"]
58diff --git a/urcu/arch/nios2.h b/urcu/arch/nios2.h
59new file mode 100644
60index 0000000..030d1bc
61--- /dev/null
62+++ b/urcu/arch/nios2.h
63@@ -0,0 +1,40 @@
64+#ifndef _URCU_ARCH_NIOS2_H
65+#define _URCU_ARCH_NIOS2_H
66+
67+/*
68+ * arch_nios2.h: trivial definitions for the NIOS2 architecture.
69+ *
70+ * Copyright (c) 2016 Marek Vasut <marex@denx.de>
71+ *
72+ * This library is free software; you can redistribute it and/or
73+ * modify it under the terms of the GNU Lesser General Public
74+ * License as published by the Free Software Foundation; either
75+ * version 2.1 of the License, or (at your option) any later version.
76+ *
77+ * This library is distributed in the hope that it will be useful,
78+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
79+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
80+ * Lesser General Public License for more details.
81+ *
82+ * You should have received a copy of the GNU Lesser General Public
83+ * License along with this library; if not, write to the Free Software
84+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
85+ */
86+
87+#include <urcu/compiler.h>
88+#include <urcu/config.h>
89+#include <urcu/syscall-compat.h>
90+
91+#ifdef __cplusplus
92+extern "C" {
93+#endif
94+
95+#define cmm_mb() cmm_barrier()
96+
97+#ifdef __cplusplus
98+}
99+#endif
100+
101+#include <urcu/arch/generic.h>
102+
103+#endif /* _URCU_ARCH_NIOS2_H */
104diff --git a/urcu/uatomic/nios2.h b/urcu/uatomic/nios2.h
105new file mode 100644
106index 0000000..5b3c303
107--- /dev/null
108+++ b/urcu/uatomic/nios2.h
109@@ -0,0 +1,32 @@
110+#ifndef _URCU_UATOMIC_ARCH_NIOS2_H
111+#define _URCU_UATOMIC_ARCH_NIOS2_H
112+
113+/*
114+ * Atomic exchange operations for the NIOS2 architecture. Let GCC do it.
115+ *
116+ * Copyright (c) 2016 Marek Vasut <marex@denx.de>
117+ *
118+ * Permission is hereby granted, free of charge, to any person obtaining a copy
119+ * of this software and associated documentation files (the "Software"), to
120+ * deal in the Software without restriction, including without limitation the
121+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
122+ * sell copies of the Software, and to permit persons to whom the Software is
123+ * furnished to do so, subject to the following conditions:
124+ *
125+ * The above copyright notice and this permission notice shall be included in
126+ * all copies or substantial portions of the Software.
127+ *
128+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
129+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
130+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
131+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
132+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
133+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
134+ * IN THE SOFTWARE.
135+ */
136+
137+#include <urcu/compiler.h>
138+#include <urcu/system.h>
139+#include <urcu/uatomic/generic.h>
140+
141+#endif /* _URCU_UATOMIC_ARCH_NIOS2_H */
142--
1432.7.0
144
diff --git a/meta/recipes-support/liburcu/liburcu_0.9.1.bb b/meta/recipes-support/liburcu/liburcu_0.9.1.bb
index 39348d75e9..dccc05c066 100644
--- a/meta/recipes-support/liburcu/liburcu_0.9.1.bb
+++ b/meta/recipes-support/liburcu/liburcu_0.9.1.bb
@@ -3,12 +3,14 @@ HOMEPAGE = "http://lttng.org/urcu"
3BUGTRACKER = "http://lttng.org/project/issues" 3BUGTRACKER = "http://lttng.org/project/issues"
4 4
5LICENSE = "LGPLv2.1+ & MIT-style" 5LICENSE = "LGPLv2.1+ & MIT-style"
6LIC_FILES_CHKSUM = "file://LICENSE;md5=0f060c30a27922ce9c0d557a639b4fa3 \ 6LIC_FILES_CHKSUM = "file://LICENSE;md5=e548d28737289d75a8f1e01ba2fd7825 \
7 file://urcu.h;beginline=4;endline=32;md5=4de0d68d3a997643715036d2209ae1d9 \ 7 file://urcu.h;beginline=4;endline=32;md5=4de0d68d3a997643715036d2209ae1d9 \
8 file://urcu/uatomic/x86.h;beginline=4;endline=21;md5=58e50bbd8a2f073bb5500e6554af0d0b" 8 file://urcu/uatomic/x86.h;beginline=4;endline=21;md5=58e50bbd8a2f073bb5500e6554af0d0b"
9 9
10SRC_URI = "http://lttng.org/files/urcu/userspace-rcu-${PV}.tar.bz2 \ 10SRC_URI = " \
11 " 11 http://lttng.org/files/urcu/userspace-rcu-${PV}.tar.bz2 \
12 file://0001-Support-for-NIOS2-architecture.patch \
13 "
12 14
13SRC_URI[md5sum] = "124eaeea06863271c0bdf2a0cc1d8e4b" 15SRC_URI[md5sum] = "124eaeea06863271c0bdf2a0cc1d8e4b"
14SRC_URI[sha256sum] = "f8d278e9d95bec97c9ba954fc4c3fb584936bc0010713a8fe358b916bafd8715" 16SRC_URI[sha256sum] = "f8d278e9d95bec97c9ba954fc4c3fb584936bc0010713a8fe358b916bafd8715"