diff options
author | Kai Kang <kai.kang@windriver.com> | 2014-12-18 16:51:02 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-12-23 10:18:18 +0000 |
commit | 5b3107af9e7cca48f466294f9c450a6c8bba29a7 (patch) | |
tree | 494e1b45683c328204557249c9d13e8c515248b4 | |
parent | c4c7d863e4dff845b5501375e60b078bd904e270 (diff) | |
download | poky-5b3107af9e7cca48f466294f9c450a6c8bba29a7.tar.gz |
libatomics-ops: add aarch64 target iniitial support
Add patch for libatomics-ops to add aarch64 target iniitial
support. It is from linaro repo.
(From OE-Core rev: af4654dfcabd575c1380516d499ef961b6d75984)
Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/recipes-multimedia/pulseaudio/files/0001-libatomic_ops-Aarch64-basic-port.patch | 239 | ||||
-rw-r--r-- | meta/recipes-multimedia/pulseaudio/libatomics-ops_7.2.bb | 1 |
2 files changed, 240 insertions, 0 deletions
diff --git a/meta/recipes-multimedia/pulseaudio/files/0001-libatomic_ops-Aarch64-basic-port.patch b/meta/recipes-multimedia/pulseaudio/files/0001-libatomic_ops-Aarch64-basic-port.patch new file mode 100644 index 0000000000..a563b8b022 --- /dev/null +++ b/meta/recipes-multimedia/pulseaudio/files/0001-libatomic_ops-Aarch64-basic-port.patch | |||
@@ -0,0 +1,239 @@ | |||
1 | From aac120d778ae5fc619b2fb8ef18ea18d3d5d20cc Mon Sep 17 00:00:00 2001 | ||
2 | From: Yvan Roux <yvan.roux@linaro.org> | ||
3 | Date: Wed, 23 Jan 2013 17:14:16 +0100 | ||
4 | Subject: [PATCH] Aarch64 basic port | ||
5 | |||
6 | Adapted-for-OpenEmbedded-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org> | ||
7 | |||
8 | |||
9 | Upstream-Status: Backport | ||
10 | |||
11 | It is original from | ||
12 | https://github.com/ivmai/libatomic_ops/commit/cbbf86330fcb600cfe0f895cb970d922456005d6 | ||
13 | |||
14 | Signed-off-by: Kai Kang <kai.kang@windriver.com> | ||
15 | --- | ||
16 | src/atomic_ops.h | 4 | ||
17 | src/atomic_ops/sysdeps/Makefile.am | 1 | ||
18 | src/atomic_ops/sysdeps/gcc/aarch64.h | 184 +++++++++++++++++++++++++++++++++++ | ||
19 | 3 files changed, 189 insertions(+) | ||
20 | create mode 100644 src/atomic_ops/sysdeps/gcc/aarch64.h | ||
21 | |||
22 | --- libatomic_ops-7.2.orig/src/atomic_ops.h | ||
23 | +++ libatomic_ops-7.2/src/atomic_ops.h | ||
24 | @@ -242,10 +242,14 @@ | ||
25 | # endif /* __m68k__ */ | ||
26 | # if defined(__powerpc__) || defined(__ppc__) || defined(__PPC__) \ | ||
27 | || defined(__powerpc64__) || defined(__ppc64__) | ||
28 | # include "atomic_ops/sysdeps/gcc/powerpc.h" | ||
29 | # endif /* __powerpc__ */ | ||
30 | +# if defined(__aarch64__) | ||
31 | +# include "atomic_ops/sysdeps/gcc/aarch64.h" | ||
32 | +# define AO_CAN_EMUL_CAS | ||
33 | +# endif /* __aarch64__ */ | ||
34 | # if defined(__arm__) && !defined(AO_USE_PTHREAD_DEFS) | ||
35 | # include "atomic_ops/sysdeps/gcc/arm.h" | ||
36 | # define AO_CAN_EMUL_CAS | ||
37 | # endif /* __arm__ */ | ||
38 | # if defined(__cris__) || defined(CRIS) | ||
39 | --- libatomic_ops-7.2.orig/src/atomic_ops/sysdeps/Makefile.am | ||
40 | +++ libatomic_ops-7.2/src/atomic_ops/sysdeps/Makefile.am | ||
41 | @@ -24,10 +24,11 @@ nobase_sysdep_HEADERS= generic_pthread.h | ||
42 | standard_ao_double_t.h \ | ||
43 | README \ | ||
44 | \ | ||
45 | armcc/arm_v6.h \ | ||
46 | \ | ||
47 | + gcc/aarch64.h \ | ||
48 | gcc/alpha.h gcc/arm.h gcc/avr32.h gcc/cris.h \ | ||
49 | gcc/hexagon.h gcc/hppa.h gcc/ia64.h gcc/m68k.h \ | ||
50 | gcc/mips.h gcc/powerpc.h gcc/s390.h \ | ||
51 | gcc/sh.h gcc/sparc.h gcc/x86.h gcc/x86_64.h \ | ||
52 | \ | ||
53 | --- /dev/null | ||
54 | +++ libatomic_ops-7.2/src/atomic_ops/sysdeps/gcc/aarch64.h | ||
55 | @@ -0,0 +1,184 @@ | ||
56 | +/* | ||
57 | + * Copyright (c) 1991-1994 by Xerox Corporation. All rights reserved. | ||
58 | + * Copyright (c) 1996-1999 by Silicon Graphics. All rights reserved. | ||
59 | + * Copyright (c) 1999-2003 by Hewlett-Packard Company. All rights reserved. | ||
60 | + * | ||
61 | + * | ||
62 | + * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED | ||
63 | + * OR IMPLIED. ANY USE IS AT YOUR OWN RISK. | ||
64 | + * | ||
65 | + * Permission is hereby granted to use or copy this program | ||
66 | + * for any purpose, provided the above notices are retained on all copies. | ||
67 | + * Permission to modify the code and to distribute modified code is granted, | ||
68 | + * provided the above notices are retained, and a notice that the code was | ||
69 | + * modified is included with the above copyright notice. | ||
70 | + * | ||
71 | + */ | ||
72 | + | ||
73 | +#include "../read_ordered.h" | ||
74 | + | ||
75 | +#include "../test_and_set_t_is_ao_t.h" | ||
76 | + | ||
77 | +AO_INLINE void | ||
78 | +AO_nop_full(void) | ||
79 | +{ | ||
80 | +# ifndef AO_UNIPROCESSOR | ||
81 | +__sync_synchronize (); | ||
82 | +# endif | ||
83 | +} | ||
84 | +#define AO_HAVE_nop_full | ||
85 | + | ||
86 | +AO_INLINE AO_t | ||
87 | +AO_load(const volatile AO_t *addr) | ||
88 | +{ | ||
89 | + return __atomic_load_n (addr, __ATOMIC_RELAXED); | ||
90 | +} | ||
91 | +#define AO_HAVE_load | ||
92 | + | ||
93 | +AO_INLINE AO_t | ||
94 | +AO_load_acquire(const volatile AO_t *addr) | ||
95 | +{ | ||
96 | + return __atomic_load_n (addr, __ATOMIC_ACQUIRE); | ||
97 | +} | ||
98 | +#define AO_HAVE_load_acquire | ||
99 | + | ||
100 | +AO_INLINE void | ||
101 | + AO_store(volatile AO_t *addr, AO_t value) | ||
102 | +{ | ||
103 | + __atomic_store_n(addr, value, __ATOMIC_RELAXED); | ||
104 | +} | ||
105 | +#define AO_HAVE_store | ||
106 | + | ||
107 | +AO_INLINE void | ||
108 | + AO_store_release(volatile AO_t *addr, AO_t value) | ||
109 | +{ | ||
110 | + __atomic_store_n(addr, value, __ATOMIC_RELEASE); | ||
111 | +} | ||
112 | +#define AO_HAVE_store_release | ||
113 | + | ||
114 | +AO_INLINE AO_TS_VAL_t | ||
115 | +AO_test_and_set(volatile AO_TS_t *addr) | ||
116 | +{ | ||
117 | + return __atomic_test_and_set(addr, __ATOMIC_RELAXED); | ||
118 | +} | ||
119 | +# define AO_HAVE_test_and_set | ||
120 | + | ||
121 | +AO_INLINE AO_TS_VAL_t | ||
122 | +AO_test_and_set_acquire(volatile AO_TS_t *addr) | ||
123 | +{ | ||
124 | + return __atomic_test_and_set(addr, __ATOMIC_ACQUIRE); | ||
125 | +} | ||
126 | +# define AO_HAVE_test_and_set_acquire | ||
127 | + | ||
128 | +AO_INLINE AO_TS_VAL_t | ||
129 | +AO_test_and_set_release(volatile AO_TS_t *addr) | ||
130 | +{ | ||
131 | + return __atomic_test_and_set(addr, __ATOMIC_RELEASE); | ||
132 | +} | ||
133 | +# define AO_HAVE_test_and_set_release | ||
134 | + | ||
135 | +AO_INLINE AO_TS_VAL_t | ||
136 | +AO_test_and_set_full(volatile AO_TS_t *addr) | ||
137 | +{ | ||
138 | + return __atomic_test_and_set(addr, __ATOMIC_SEQ_CST); | ||
139 | +} | ||
140 | +# define AO_HAVE_test_and_set_full | ||
141 | + | ||
142 | +AO_INLINE AO_t | ||
143 | +AO_fetch_and_add(volatile AO_t *p, AO_t incr) | ||
144 | +{ | ||
145 | + return __atomic_fetch_add(p, incr, __ATOMIC_RELAXED); | ||
146 | +} | ||
147 | +#define AO_HAVE_fetch_and_add | ||
148 | + | ||
149 | +AO_INLINE AO_t | ||
150 | +AO_fetch_and_add_acquire(volatile AO_t *p, AO_t incr) | ||
151 | +{ | ||
152 | + return __atomic_fetch_add(p, incr, __ATOMIC_ACQUIRE); | ||
153 | +} | ||
154 | +#define AO_HAVE_fetch_and_add_acquire | ||
155 | + | ||
156 | +AO_INLINE AO_t | ||
157 | +AO_fetch_and_add_release(volatile AO_t *p, AO_t incr) | ||
158 | +{ | ||
159 | + return __atomic_fetch_add(p, incr, __ATOMIC_RELEASE); | ||
160 | +} | ||
161 | +#define AO_HAVE_fetch_and_add_release | ||
162 | + | ||
163 | +AO_INLINE AO_t | ||
164 | +AO_fetch_and_add_full(volatile AO_t *p, AO_t incr) | ||
165 | +{ | ||
166 | + return __atomic_fetch_add(p, incr, __ATOMIC_SEQ_CST); | ||
167 | +} | ||
168 | +#define AO_HAVE_fetch_and_add_full | ||
169 | + | ||
170 | +AO_INLINE AO_t | ||
171 | +AO_fetch_and_add1(volatile AO_t *p) | ||
172 | +{ | ||
173 | + return __atomic_fetch_add(p, 1, __ATOMIC_RELAXED); | ||
174 | +} | ||
175 | +#define AO_HAVE_fetch_and_add1 | ||
176 | + | ||
177 | +AO_INLINE AO_t | ||
178 | +AO_fetch_and_add1_acquire(volatile AO_t *p) | ||
179 | +{ | ||
180 | + return __atomic_fetch_add(p, 1, __ATOMIC_ACQUIRE); | ||
181 | +} | ||
182 | +#define AO_HAVE_fetch_and_add1_acquire | ||
183 | + | ||
184 | +AO_INLINE AO_t | ||
185 | +AO_fetch_and_add1_release(volatile AO_t *p) | ||
186 | +{ | ||
187 | + return __atomic_fetch_add(p, 1, __ATOMIC_RELEASE); | ||
188 | +} | ||
189 | +#define AO_HAVE_fetch_and_add1_release | ||
190 | + | ||
191 | +AO_INLINE AO_t | ||
192 | +AO_fetch_and_add1_full(volatile AO_t *p) | ||
193 | +{ | ||
194 | + return __atomic_fetch_add(p, 1, __ATOMIC_SEQ_CST); | ||
195 | +} | ||
196 | +#define AO_HAVE_fetch_and_add1_full | ||
197 | + | ||
198 | +AO_INLINE AO_t | ||
199 | +AO_fetch_and_sub1(volatile AO_t *p) | ||
200 | +{ | ||
201 | + return __atomic_fetch_sub(p, 1, __ATOMIC_RELAXED); | ||
202 | +} | ||
203 | +#define AO_HAVE_fetch_and_sub1 | ||
204 | + | ||
205 | +AO_INLINE AO_t | ||
206 | +AO_fetch_and_sub1_acquire(volatile AO_t *p) | ||
207 | +{ | ||
208 | + return __atomic_fetch_sub(p, 1, __ATOMIC_ACQUIRE); | ||
209 | +} | ||
210 | +#define AO_HAVE_fetch_and_sub1_acquire | ||
211 | + | ||
212 | +AO_INLINE AO_t | ||
213 | +AO_fetch_and_sub1_release(volatile AO_t *p) | ||
214 | +{ | ||
215 | + return __atomic_fetch_sub(p, 1, __ATOMIC_RELEASE); | ||
216 | +} | ||
217 | +#define AO_HAVE_fetch_and_sub1_release | ||
218 | + | ||
219 | +AO_INLINE AO_t | ||
220 | +AO_fetch_and_sub1_full(volatile AO_t *p) | ||
221 | +{ | ||
222 | + return __atomic_fetch_sub(p, 1, __ATOMIC_SEQ_CST); | ||
223 | +} | ||
224 | +#define AO_HAVE_fetch_and_sub1_full | ||
225 | + | ||
226 | +/* Returns nonzero if the comparison succeeded. */ | ||
227 | +AO_INLINE int | ||
228 | +AO_compare_and_swap(volatile AO_t *addr, AO_t old_val, AO_t new_val) | ||
229 | +{ | ||
230 | + return __sync_bool_compare_and_swap(addr, old_val, new_val); | ||
231 | +} | ||
232 | +# define AO_HAVE_compare_and_swap | ||
233 | + | ||
234 | +AO_INLINE AO_t | ||
235 | +AO_fetch_compare_and_swap(volatile AO_t *addr, AO_t old_val, AO_t new_val) | ||
236 | +{ | ||
237 | + return __sync_val_compare_and_swap(addr, old_val, new_val); | ||
238 | +} | ||
239 | +# define AO_HAVE_fetch_compare_and_swap | ||
diff --git a/meta/recipes-multimedia/pulseaudio/libatomics-ops_7.2.bb b/meta/recipes-multimedia/pulseaudio/libatomics-ops_7.2.bb index 4632d240d2..5a582287b5 100644 --- a/meta/recipes-multimedia/pulseaudio/libatomics-ops_7.2.bb +++ b/meta/recipes-multimedia/pulseaudio/libatomics-ops_7.2.bb | |||
@@ -9,6 +9,7 @@ LIC_FILES_CHKSUM = "file://doc/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ | |||
9 | PR = "r1" | 9 | PR = "r1" |
10 | 10 | ||
11 | SRC_URI = "http://www.hpl.hp.com/research/linux/atomic_ops/download/libatomic_ops-${PV}.tar.gz \ | 11 | SRC_URI = "http://www.hpl.hp.com/research/linux/atomic_ops/download/libatomic_ops-${PV}.tar.gz \ |
12 | file://0001-libatomic_ops-Aarch64-basic-port.patch \ | ||
12 | " | 13 | " |
13 | 14 | ||
14 | SRC_URI[md5sum] = "890acdc83a7cd10e2e9536062d3741c8" | 15 | SRC_URI[md5sum] = "890acdc83a7cd10e2e9536062d3741c8" |