diff options
14 files changed, 40 insertions, 968 deletions
diff --git a/b2qt-init-build-env b/b2qt-init-build-env index 9858948..baa4acd 100755 --- a/b2qt-init-build-env +++ b/b2qt-init-build-env | |||
@@ -136,7 +136,7 @@ get_groups() { | |||
136 | jetson-tx1|jetson-tx2|jetson-tk1) | 136 | jetson-tx1|jetson-tx2|jetson-tk1) |
137 | PROJECT_GROUPS="jetson" | 137 | PROJECT_GROUPS="jetson" |
138 | ;; | 138 | ;; |
139 | salvator-x|h3ulcb|m3ulcb) | 139 | salvator-x|h3ulcb|m3ulcb|ebisu) |
140 | PROJECT_GROUPS="renesas-gen3" | 140 | PROJECT_GROUPS="renesas-gen3" |
141 | ;; | 141 | ;; |
142 | *) | 142 | *) |
diff --git a/meta-boot2qt-distro/conf/bblayers.conf.rcar-gen3.sample b/meta-boot2qt-distro/conf/bblayers.conf.rcar-gen3.sample index 6f502ea..0836f5a 100644 --- a/meta-boot2qt-distro/conf/bblayers.conf.rcar-gen3.sample +++ b/meta-boot2qt-distro/conf/bblayers.conf.rcar-gen3.sample | |||
@@ -39,7 +39,6 @@ BBLAYERS ?= " \ | |||
39 | ${BSPDIR}/sources/poky/meta \ | 39 | ${BSPDIR}/sources/poky/meta \ |
40 | ${BSPDIR}/sources/poky/meta-poky \ | 40 | ${BSPDIR}/sources/poky/meta-poky \ |
41 | ${BSPDIR}/sources/meta-renesas/meta-rcar-gen3 \ | 41 | ${BSPDIR}/sources/meta-renesas/meta-rcar-gen3 \ |
42 | ${BSPDIR}/sources/meta-freescale \ | ||
43 | ${BSPDIR}/sources/meta-linaro/meta-optee \ | 42 | ${BSPDIR}/sources/meta-linaro/meta-optee \ |
44 | ${BSPDIR}/sources/meta-openembedded/meta-oe \ | 43 | ${BSPDIR}/sources/meta-openembedded/meta-oe \ |
45 | ${BSPDIR}/sources/meta-openembedded/meta-python \ | 44 | ${BSPDIR}/sources/meta-openembedded/meta-python \ |
diff --git a/meta-renesas-extras/recipes/gstreamer/gstreamer1.0-plugins-bad_%.bbappend b/meta-boot2qt-distro/conf/distro/include/ebisu.conf index 85be953..24bdedd 100644 --- a/meta-renesas-extras/recipes/gstreamer/gstreamer1.0-plugins-bad_%.bbappend +++ b/meta-boot2qt-distro/conf/distro/include/ebisu.conf | |||
@@ -1,6 +1,6 @@ | |||
1 | ############################################################################ | 1 | ############################################################################ |
2 | ## | 2 | ## |
3 | ## Copyright (C) 2017 The Qt Company Ltd. | 3 | ## Copyright (C) 2018 The Qt Company Ltd. |
4 | ## Contact: https://www.qt.io/licensing/ | 4 | ## Contact: https://www.qt.io/licensing/ |
5 | ## | 5 | ## |
6 | ## This file is part of the Boot to Qt meta layer. | 6 | ## This file is part of the Boot to Qt meta layer. |
@@ -27,4 +27,6 @@ | |||
27 | ## | 27 | ## |
28 | ############################################################################ | 28 | ############################################################################ |
29 | 29 | ||
30 | DEPENDS += "wayland-kms libgbm" | 30 | include conf/distro/include/rcar-gen3.inc |
31 | |||
32 | DEPLOY_CONF_NAME = "Renesas R-Car-E3 Ebisu 4D" | ||
diff --git a/meta-boot2qt-distro/conf/distro/include/rcar-gen3.inc b/meta-boot2qt-distro/conf/distro/include/rcar-gen3.inc index 4350dda..6b99603 100644 --- a/meta-boot2qt-distro/conf/distro/include/rcar-gen3.inc +++ b/meta-boot2qt-distro/conf/distro/include/rcar-gen3.inc | |||
@@ -1,6 +1,6 @@ | |||
1 | ############################################################################ | 1 | ############################################################################ |
2 | ## | 2 | ## |
3 | ## Copyright (C) 2017 The Qt Company Ltd. | 3 | ## Copyright (C) 2018 The Qt Company Ltd. |
4 | ## Contact: https://www.qt.io/licensing/ | 4 | ## Contact: https://www.qt.io/licensing/ |
5 | ## | 5 | ## |
6 | ## This file is part of the Boot to Qt meta layer. | 6 | ## This file is part of the Boot to Qt meta layer. |
@@ -27,14 +27,28 @@ | |||
27 | ## | 27 | ## |
28 | ############################################################################ | 28 | ############################################################################ |
29 | 29 | ||
30 | include conf/distro/include/fsl.inc | 30 | IMAGE_FSTYPES += "wic" |
31 | WKS_FILE = "sdimage-bootpart.wks" | ||
32 | WIC_CREATE_EXTRA_ARGS = "--no-fstab-update" | ||
33 | WKS_FILE_DEPENDS += "u-boot optee-os" | ||
34 | |||
35 | IMAGE_BOOT_FILES = "\ | ||
36 | Image \ | ||
37 | r*.dtb \ | ||
38 | " | ||
31 | 39 | ||
32 | QBSP_IMAGE_CONTENT = "\ | 40 | QBSP_IMAGE_CONTENT = "\ |
33 | ${IMAGE_LINK_NAME}.img \ | 41 | ${IMAGE_LINK_NAME}.img \ |
34 | ${IMAGE_LINK_NAME}.conf \ | 42 | ${IMAGE_LINK_NAME}.conf \ |
43 | bl2-${MACHINE}.srec \ | ||
44 | bl31-${MACHINE}.srec \ | ||
45 | tee-${MACHINE}.srec \ | ||
46 | bootparam_sa0.srec \ | ||
47 | cert_header_sa6.srec \ | ||
48 | u-boot-elf-${MACHINE}.srec \ | ||
35 | " | 49 | " |
36 | 50 | ||
37 | BOOT_SPACE = "16384" | 51 | BOOT_SPACE = "32768" |
38 | 52 | ||
39 | # uncomment following if using the evaluation drivers | 53 | # uncomment following if using the evaluation drivers |
40 | #DISTRO_FEATURES_append = " use_eva_pkg" | 54 | #DISTRO_FEATURES_append = " use_eva_pkg" |
@@ -46,7 +60,7 @@ MULTI_PROVIDER_WHITELIST += "virtual/libgl virtual/egl virtual/libgles1 virtual/ | |||
46 | #DISTRO_FEATURES_append = " pam" | 60 | #DISTRO_FEATURES_append = " pam" |
47 | PREFERRED_PROVIDER_virtual/libgles1 = "" | 61 | PREFERRED_PROVIDER_virtual/libgles1 = "" |
48 | PREFERRED_PROVIDER_virtual/libgles2 = "gles-user-module" | 62 | PREFERRED_PROVIDER_virtual/libgles2 = "gles-user-module" |
49 | PREFERRED_PROVIDER_virtual/egl = "gles-user-module" | 63 | PREFERRED_PROVIDER_virtual/egl = "libegl" |
50 | PREFERRED_PROVIDER_virtual/libgl = "" | 64 | PREFERRED_PROVIDER_virtual/libgl = "" |
51 | PREFERRED_PROVIDER_virtual/mesa = "" | 65 | PREFERRED_PROVIDER_virtual/mesa = "" |
52 | PREFERRED_PROVIDER_libgbm = "libgbm" | 66 | PREFERRED_PROVIDER_libgbm = "libgbm" |
@@ -59,9 +73,5 @@ FILESEXTRAPATHS_append = "${BSPDIR}/sources/renesas-rcar-gen3/${PN}:" | |||
59 | 73 | ||
60 | BBMASK += "\ | 74 | BBMASK += "\ |
61 | meta-linaro/meta-optee/recipes-security/optee \ | 75 | meta-linaro/meta-optee/recipes-security/optee \ |
62 | meta-rcar-gen3/recipes-connectivity/ppp \ | ||
63 | meta-rcar-gen3/recipes-core/packagegroups \ | 76 | meta-rcar-gen3/recipes-core/packagegroups \ |
64 | meta-rcar-gen3/recipes-graphics/mesa \ | ||
65 | meta-rcar-gen3/recipes-multimedia/gstreamer \ | ||
66 | meta-rcar-gen3/recipes-multimedia/webp \ | ||
67 | " | 77 | " |
diff --git a/meta-renesas-extras/recipes/arm-trusted-firmware/arm-trusted-firmware_git.bbappend b/meta-renesas-extras/recipes/arm-trusted-firmware/arm-trusted-firmware_git.bbappend index 801a073..8a62d82 100644 --- a/meta-renesas-extras/recipes/arm-trusted-firmware/arm-trusted-firmware_git.bbappend +++ b/meta-renesas-extras/recipes/arm-trusted-firmware/arm-trusted-firmware_git.bbappend | |||
@@ -1,6 +1,6 @@ | |||
1 | ############################################################################ | 1 | ############################################################################ |
2 | ## | 2 | ## |
3 | ## Copyright (C) 2017 The Qt Company Ltd. | 3 | ## Copyright (C) 2018 The Qt Company Ltd. |
4 | ## Contact: https://www.qt.io/licensing/ | 4 | ## Contact: https://www.qt.io/licensing/ |
5 | ## | 5 | ## |
6 | ## This file is part of the Boot to Qt meta layer. | 6 | ## This file is part of the Boot to Qt meta layer. |
@@ -27,5 +27,5 @@ | |||
27 | ## | 27 | ## |
28 | ############################################################################ | 28 | ############################################################################ |
29 | 29 | ||
30 | CFLAGS[unexport] = "" | 30 | LIC_FILES_CHKSUM = "file://license.rst;md5=e927e02bca647e14efd87e9e914b2443" |
31 | CFLAGS = "-Wno-error=pedantic" | 31 | SRCREV = "dcb310296c07bce69149fa9d74f1848cdfd01f5a" |
diff --git a/meta-renesas-extras/recipes/mesa/mesa_%.bbappend b/meta-renesas-extras/recipes/mesa/mesa_%.bbappend deleted file mode 100644 index 0542b65..0000000 --- a/meta-renesas-extras/recipes/mesa/mesa_%.bbappend +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | require include/gles-control.inc | ||
2 | |||
3 | def map_libs(d): | ||
4 | if base_conditional('USE_GLES_WAYLAND', "1", "1", "0", d) == "1": | ||
5 | return "wayland" | ||
6 | |||
7 | return "dummy" | ||
8 | |||
9 | MESATARGET := "${@map_libs(d)}" | ||
10 | include recipes-graphics/mesa/mesa-${MESATARGET}.inc | ||
diff --git a/meta-renesas-extras/recipes/optee-os/optee-os_git.bbappend b/meta-renesas-extras/recipes/optee-os/optee-os_git.bbappend deleted file mode 100644 index 03862c5..0000000 --- a/meta-renesas-extras/recipes/optee-os/optee-os_git.bbappend +++ /dev/null | |||
@@ -1,30 +0,0 @@ | |||
1 | ############################################################################ | ||
2 | ## | ||
3 | ## Copyright (C) 2017 The Qt Company Ltd. | ||
4 | ## Contact: https://www.qt.io/licensing/ | ||
5 | ## | ||
6 | ## This file is part of the Boot to Qt meta layer. | ||
7 | ## | ||
8 | ## $QT_BEGIN_LICENSE:GPL$ | ||
9 | ## Commercial License Usage | ||
10 | ## Licensees holding valid commercial Qt licenses may use this file in | ||
11 | ## accordance with the commercial license agreement provided with the | ||
12 | ## Software or, alternatively, in accordance with the terms contained in | ||
13 | ## a written agreement between you and The Qt Company. For licensing terms | ||
14 | ## and conditions see https://www.qt.io/terms-conditions. For further | ||
15 | ## information use the contact form at https://www.qt.io/contact-us. | ||
16 | ## | ||
17 | ## GNU General Public License Usage | ||
18 | ## Alternatively, this file may be used under the terms of the GNU | ||
19 | ## General Public License version 3 or (at your option) any later version | ||
20 | ## approved by the KDE Free Qt Foundation. The licenses are as published by | ||
21 | ## the Free Software Foundation and appearing in the file LICENSE.GPL3 | ||
22 | ## included in the packaging of this file. Please review the following | ||
23 | ## information to ensure the GNU General Public License requirements will | ||
24 | ## be met: https://www.gnu.org/licenses/gpl-3.0.html. | ||
25 | ## | ||
26 | ## $QT_END_LICENSE$ | ||
27 | ## | ||
28 | ############################################################################ | ||
29 | |||
30 | CFLAGS = "-Wno-error=unused-const-variable= -Wno-error=strict-aliasing -Wno-error=shift-negative-value" | ||
diff --git a/meta-renesas-extras/recipes/qt5/boot2qt-appcontroller/ebisu/kms.conf b/meta-renesas-extras/recipes/qt5/boot2qt-appcontroller/ebisu/kms.conf new file mode 100644 index 0000000..4cbbf49 --- /dev/null +++ b/meta-renesas-extras/recipes/qt5/boot2qt-appcontroller/ebisu/kms.conf | |||
@@ -0,0 +1,9 @@ | |||
1 | { | ||
2 | "device": "/dev/dri/card0", | ||
3 | "outputs": [ | ||
4 | { | ||
5 | "name": "VGA1", | ||
6 | "mode": "off" | ||
7 | } | ||
8 | ] | ||
9 | } | ||
diff --git a/meta-renesas-extras/recipes/u-boot/u-boot/0001-compiler-.h-sync-include-linux-compiler-.h-with-Linu.patch b/meta-renesas-extras/recipes/u-boot/u-boot/0001-compiler-.h-sync-include-linux-compiler-.h-with-Linu.patch deleted file mode 100644 index 639f67d..0000000 --- a/meta-renesas-extras/recipes/u-boot/u-boot/0001-compiler-.h-sync-include-linux-compiler-.h-with-Linu.patch +++ /dev/null | |||
@@ -1,808 +0,0 @@ | |||
1 | From 9b2c282b348dfe966bbba967dc7a45ce817cce50 Mon Sep 17 00:00:00 2001 | ||
2 | From: Tom Rini <trini@konsulko.com> | ||
3 | Date: Mon, 29 Feb 2016 11:34:15 -0500 | ||
4 | Subject: [PATCH] compiler*.h: sync include/linux/compiler*.h with Linux | ||
5 | 4.5-rc6 | ||
6 | |||
7 | Copy these from Linux v4.5-rc6 tag. | ||
8 | |||
9 | This is needed so that we can keep up with newer gcc versions. Note | ||
10 | that we don't have the uapi/ hierarchy from the kernel so continue to | ||
11 | use <linux/types.h> | ||
12 | |||
13 | Signed-off-by: Tom Rini <trini@konsulko.com> | ||
14 | --- | ||
15 | include/linux/compiler-gcc.h | 259 ++++++++++++++++++++++++++++++++--------- | ||
16 | include/linux/compiler-gcc3.h | 23 ---- | ||
17 | include/linux/compiler-gcc4.h | 88 -------------- | ||
18 | include/linux/compiler-gcc5.h | 65 ----------- | ||
19 | include/linux/compiler-intel.h | 5 + | ||
20 | include/linux/compiler.h | 178 ++++++++++++++++++++++++++-- | ||
21 | 6 files changed, 383 insertions(+), 235 deletions(-) | ||
22 | delete mode 100644 include/linux/compiler-gcc3.h | ||
23 | delete mode 100644 include/linux/compiler-gcc4.h | ||
24 | delete mode 100644 include/linux/compiler-gcc5.h | ||
25 | |||
26 | diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h | ||
27 | index e057bd2..22ab246 100644 | ||
28 | --- a/include/linux/compiler-gcc.h | ||
29 | +++ b/include/linux/compiler-gcc.h | ||
30 | @@ -5,14 +5,28 @@ | ||
31 | /* | ||
32 | * Common definitions for all gcc versions go here. | ||
33 | */ | ||
34 | -#define GCC_VERSION (__GNUC__ * 10000 \ | ||
35 | - + __GNUC_MINOR__ * 100 \ | ||
36 | - + __GNUC_PATCHLEVEL__) | ||
37 | - | ||
38 | +#define GCC_VERSION (__GNUC__ * 10000 \ | ||
39 | + + __GNUC_MINOR__ * 100 \ | ||
40 | + + __GNUC_PATCHLEVEL__) | ||
41 | |||
42 | /* Optimization barrier */ | ||
43 | + | ||
44 | /* The "volatile" is due to gcc bugs */ | ||
45 | #define barrier() __asm__ __volatile__("": : :"memory") | ||
46 | +/* | ||
47 | + * This version is i.e. to prevent dead stores elimination on @ptr | ||
48 | + * where gcc and llvm may behave differently when otherwise using | ||
49 | + * normal barrier(): while gcc behavior gets along with a normal | ||
50 | + * barrier(), llvm needs an explicit input variable to be assumed | ||
51 | + * clobbered. The issue is as follows: while the inline asm might | ||
52 | + * access any memory it wants, the compiler could have fit all of | ||
53 | + * @ptr into memory registers instead, and since @ptr never escaped | ||
54 | + * from that, it proofed that the inline asm wasn't touching any of | ||
55 | + * it. This version works well with both compilers, i.e. we're telling | ||
56 | + * the compiler that the inline asm absolutely may see the contents | ||
57 | + * of @ptr. See also: https://llvm.org/bugs/show_bug.cgi?id=15495 | ||
58 | + */ | ||
59 | +#define barrier_data(ptr) __asm__ __volatile__("": :"r"(ptr) :"memory") | ||
60 | |||
61 | /* | ||
62 | * This macro obfuscates arithmetic on a variable address so that gcc | ||
63 | @@ -32,58 +46,63 @@ | ||
64 | * the inline assembly constraint from =g to =r, in this particular | ||
65 | * case either is valid. | ||
66 | */ | ||
67 | -#define RELOC_HIDE(ptr, off) \ | ||
68 | - ({ unsigned long __ptr; \ | ||
69 | - __asm__ ("" : "=r"(__ptr) : "0"(ptr)); \ | ||
70 | - (typeof(ptr)) (__ptr + (off)); }) | ||
71 | +#define RELOC_HIDE(ptr, off) \ | ||
72 | +({ \ | ||
73 | + unsigned long __ptr; \ | ||
74 | + __asm__ ("" : "=r"(__ptr) : "0"(ptr)); \ | ||
75 | + (typeof(ptr)) (__ptr + (off)); \ | ||
76 | +}) | ||
77 | |||
78 | /* Make the optimizer believe the variable can be manipulated arbitrarily. */ | ||
79 | -#define OPTIMIZER_HIDE_VAR(var) __asm__ ("" : "=r" (var) : "0" (var)) | ||
80 | +#define OPTIMIZER_HIDE_VAR(var) \ | ||
81 | + __asm__ ("" : "=r" (var) : "0" (var)) | ||
82 | |||
83 | #ifdef __CHECKER__ | ||
84 | -#define __must_be_array(arr) 0 | ||
85 | +#define __must_be_array(a) 0 | ||
86 | #else | ||
87 | /* &a[0] degrades to a pointer: a different type from an array */ | ||
88 | -#define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0])) | ||
89 | +#define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0])) | ||
90 | #endif | ||
91 | |||
92 | /* | ||
93 | * Force always-inline if the user requests it so via the .config, | ||
94 | * or if gcc is too old: | ||
95 | */ | ||
96 | -#if !defined(CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING) || \ | ||
97 | +#if !defined(CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING) || \ | ||
98 | !defined(CONFIG_OPTIMIZE_INLINING) || (__GNUC__ < 4) | ||
99 | -# define inline inline __attribute__((always_inline)) notrace | ||
100 | -# define __inline__ __inline__ __attribute__((always_inline)) notrace | ||
101 | -# define __inline __inline __attribute__((always_inline)) notrace | ||
102 | +#define inline inline __attribute__((always_inline)) notrace | ||
103 | +#define __inline__ __inline__ __attribute__((always_inline)) notrace | ||
104 | +#define __inline __inline __attribute__((always_inline)) notrace | ||
105 | #else | ||
106 | /* A lot of inline functions can cause havoc with function tracing */ | ||
107 | -# define inline inline notrace | ||
108 | -# define __inline__ __inline__ notrace | ||
109 | -# define __inline __inline notrace | ||
110 | +#define inline inline notrace | ||
111 | +#define __inline__ __inline__ notrace | ||
112 | +#define __inline __inline notrace | ||
113 | #endif | ||
114 | |||
115 | -#define __deprecated __attribute__((deprecated)) | ||
116 | -#ifndef __packed | ||
117 | -#define __packed __attribute__((packed)) | ||
118 | -#endif | ||
119 | -#ifndef __weak | ||
120 | -#define __weak __attribute__((weak)) | ||
121 | -#endif | ||
122 | +#define __always_inline inline __attribute__((always_inline)) | ||
123 | +#define noinline __attribute__((noinline)) | ||
124 | + | ||
125 | +#define __deprecated __attribute__((deprecated)) | ||
126 | +#define __packed __attribute__((packed)) | ||
127 | +#define __weak __attribute__((weak)) | ||
128 | +#define __alias(symbol) __attribute__((alias(#symbol))) | ||
129 | |||
130 | /* | ||
131 | - * it doesn't make sense on ARM (currently the only user of __naked) to trace | ||
132 | - * naked functions because then mcount is called without stack and frame pointer | ||
133 | - * being set up and there is no chance to restore the lr register to the value | ||
134 | - * before mcount was called. | ||
135 | + * it doesn't make sense on ARM (currently the only user of __naked) | ||
136 | + * to trace naked functions because then mcount is called without | ||
137 | + * stack and frame pointer being set up and there is no chance to | ||
138 | + * restore the lr register to the value before mcount was called. | ||
139 | + * | ||
140 | + * The asm() bodies of naked functions often depend on standard calling | ||
141 | + * conventions, therefore they must be noinline and noclone. | ||
142 | * | ||
143 | - * The asm() bodies of naked functions often depend on standard calling conventions, | ||
144 | - * therefore they must be noinline and noclone. GCC 4.[56] currently fail to enforce | ||
145 | - * this, so we must do so ourselves. See GCC PR44290. | ||
146 | + * GCC 4.[56] currently fail to enforce this, so we must do so ourselves. | ||
147 | + * See GCC PR44290. | ||
148 | */ | ||
149 | -#define __naked __attribute__((naked)) noinline __noclone notrace | ||
150 | +#define __naked __attribute__((naked)) noinline __noclone notrace | ||
151 | |||
152 | -#define __noreturn __attribute__((noreturn)) | ||
153 | +#define __noreturn __attribute__((noreturn)) | ||
154 | |||
155 | /* | ||
156 | * From the GCC manual: | ||
157 | @@ -95,34 +114,170 @@ | ||
158 | * would be. | ||
159 | * [...] | ||
160 | */ | ||
161 | -#ifndef __pure | ||
162 | -#define __pure __attribute__((pure)) | ||
163 | +#define __pure __attribute__((pure)) | ||
164 | +#define __aligned(x) __attribute__((aligned(x))) | ||
165 | +#define __printf(a, b) __attribute__((format(printf, a, b))) | ||
166 | +#define __scanf(a, b) __attribute__((format(scanf, a, b))) | ||
167 | +#define __attribute_const__ __attribute__((__const__)) | ||
168 | +#define __maybe_unused __attribute__((unused)) | ||
169 | +#define __always_unused __attribute__((unused)) | ||
170 | + | ||
171 | +/* gcc version specific checks */ | ||
172 | + | ||
173 | +#if GCC_VERSION < 30200 | ||
174 | +# error Sorry, your compiler is too old - please upgrade it. | ||
175 | +#endif | ||
176 | + | ||
177 | +#if GCC_VERSION < 30300 | ||
178 | +# define __used __attribute__((__unused__)) | ||
179 | +#else | ||
180 | +# define __used __attribute__((__used__)) | ||
181 | +#endif | ||
182 | + | ||
183 | +#ifdef CONFIG_GCOV_KERNEL | ||
184 | +# if GCC_VERSION < 30400 | ||
185 | +# error "GCOV profiling support for gcc versions below 3.4 not included" | ||
186 | +# endif /* __GNUC_MINOR__ */ | ||
187 | +#endif /* CONFIG_GCOV_KERNEL */ | ||
188 | + | ||
189 | +#if GCC_VERSION >= 30400 | ||
190 | +#define __must_check __attribute__((warn_unused_result)) | ||
191 | +#endif | ||
192 | + | ||
193 | +#if GCC_VERSION >= 40000 | ||
194 | + | ||
195 | +/* GCC 4.1.[01] miscompiles __weak */ | ||
196 | +#ifdef __KERNEL__ | ||
197 | +# if GCC_VERSION >= 40100 && GCC_VERSION <= 40101 | ||
198 | +# error Your version of gcc miscompiles the __weak directive | ||
199 | +# endif | ||
200 | +#endif | ||
201 | + | ||
202 | +#define __used __attribute__((__used__)) | ||
203 | +#define __compiler_offsetof(a, b) \ | ||
204 | + __builtin_offsetof(a, b) | ||
205 | + | ||
206 | +#if GCC_VERSION >= 40100 && GCC_VERSION < 40600 | ||
207 | +# define __compiletime_object_size(obj) __builtin_object_size(obj, 0) | ||
208 | +#endif | ||
209 | + | ||
210 | +#if GCC_VERSION >= 40300 | ||
211 | +/* Mark functions as cold. gcc will assume any path leading to a call | ||
212 | + * to them will be unlikely. This means a lot of manual unlikely()s | ||
213 | + * are unnecessary now for any paths leading to the usual suspects | ||
214 | + * like BUG(), printk(), panic() etc. [but let's keep them for now for | ||
215 | + * older compilers] | ||
216 | + * | ||
217 | + * Early snapshots of gcc 4.3 don't support this and we can't detect this | ||
218 | + * in the preprocessor, but we can live with this because they're unreleased. | ||
219 | + * Maketime probing would be overkill here. | ||
220 | + * | ||
221 | + * gcc also has a __attribute__((__hot__)) to move hot functions into | ||
222 | + * a special section, but I don't see any sense in this right now in | ||
223 | + * the kernel context | ||
224 | + */ | ||
225 | +#define __cold __attribute__((__cold__)) | ||
226 | + | ||
227 | +#define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__) | ||
228 | + | ||
229 | +#ifndef __CHECKER__ | ||
230 | +# define __compiletime_warning(message) __attribute__((warning(message))) | ||
231 | +# define __compiletime_error(message) __attribute__((error(message))) | ||
232 | +#endif /* __CHECKER__ */ | ||
233 | +#endif /* GCC_VERSION >= 40300 */ | ||
234 | + | ||
235 | +#if GCC_VERSION >= 40500 | ||
236 | +/* | ||
237 | + * Mark a position in code as unreachable. This can be used to | ||
238 | + * suppress control flow warnings after asm blocks that transfer | ||
239 | + * control elsewhere. | ||
240 | + * | ||
241 | + * Early snapshots of gcc 4.5 don't support this and we can't detect | ||
242 | + * this in the preprocessor, but we can live with this because they're | ||
243 | + * unreleased. Really, we need to have autoconf for the kernel. | ||
244 | + */ | ||
245 | +#define unreachable() __builtin_unreachable() | ||
246 | + | ||
247 | +/* Mark a function definition as prohibited from being cloned. */ | ||
248 | +#define __noclone __attribute__((__noclone__)) | ||
249 | + | ||
250 | +#endif /* GCC_VERSION >= 40500 */ | ||
251 | + | ||
252 | +#if GCC_VERSION >= 40600 | ||
253 | +/* | ||
254 | + * When used with Link Time Optimization, gcc can optimize away C functions or | ||
255 | + * variables which are referenced only from assembly code. __visible tells the | ||
256 | + * optimizer that something else uses this function or variable, thus preventing | ||
257 | + * this. | ||
258 | + */ | ||
259 | +#define __visible __attribute__((externally_visible)) | ||
260 | #endif | ||
261 | -#ifndef __aligned | ||
262 | -#define __aligned(x) __attribute__((aligned(x))) | ||
263 | + | ||
264 | + | ||
265 | +#if GCC_VERSION >= 40900 && !defined(__CHECKER__) | ||
266 | +/* | ||
267 | + * __assume_aligned(n, k): Tell the optimizer that the returned | ||
268 | + * pointer can be assumed to be k modulo n. The second argument is | ||
269 | + * optional (default 0), so we use a variadic macro to make the | ||
270 | + * shorthand. | ||
271 | + * | ||
272 | + * Beware: Do not apply this to functions which may return | ||
273 | + * ERR_PTRs. Also, it is probably unwise to apply it to functions | ||
274 | + * returning extra information in the low bits (but in that case the | ||
275 | + * compiler should see some alignment anyway, when the return value is | ||
276 | + * massaged by 'flags = ptr & 3; ptr &= ~3;'). | ||
277 | + */ | ||
278 | +#define __assume_aligned(a, ...) __attribute__((__assume_aligned__(a, ## __VA_ARGS__))) | ||
279 | #endif | ||
280 | -#define __printf(a, b) __attribute__((format(printf, a, b))) | ||
281 | -#define __scanf(a, b) __attribute__((format(scanf, a, b))) | ||
282 | -#define noinline __attribute__((noinline)) | ||
283 | -#define __attribute_const__ __attribute__((__const__)) | ||
284 | -#define __maybe_unused __attribute__((unused)) | ||
285 | -#define __always_unused __attribute__((unused)) | ||
286 | |||
287 | -#define __gcc_header(x) #x | ||
288 | -#define _gcc_header(x) __gcc_header(linux/compiler-gcc##x.h) | ||
289 | -#define gcc_header(x) _gcc_header(x) | ||
290 | -#include gcc_header(__GNUC__) | ||
291 | +/* | ||
292 | + * GCC 'asm goto' miscompiles certain code sequences: | ||
293 | + * | ||
294 | + * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58670 | ||
295 | + * | ||
296 | + * Work it around via a compiler barrier quirk suggested by Jakub Jelinek. | ||
297 | + * | ||
298 | + * (asm goto is automatically volatile - the naming reflects this.) | ||
299 | + */ | ||
300 | +#define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0) | ||
301 | + | ||
302 | +#ifdef CONFIG_ARCH_USE_BUILTIN_BSWAP | ||
303 | +#if GCC_VERSION >= 40400 | ||
304 | +#define __HAVE_BUILTIN_BSWAP32__ | ||
305 | +#define __HAVE_BUILTIN_BSWAP64__ | ||
306 | +#endif | ||
307 | +#if GCC_VERSION >= 40800 || (defined(__powerpc__) && GCC_VERSION >= 40600) | ||
308 | +#define __HAVE_BUILTIN_BSWAP16__ | ||
309 | +#endif | ||
310 | +#endif /* CONFIG_ARCH_USE_BUILTIN_BSWAP */ | ||
311 | + | ||
312 | +#if GCC_VERSION >= 50000 | ||
313 | +#define KASAN_ABI_VERSION 4 | ||
314 | +#elif GCC_VERSION >= 40902 | ||
315 | +#define KASAN_ABI_VERSION 3 | ||
316 | +#endif | ||
317 | + | ||
318 | +#if GCC_VERSION >= 40902 | ||
319 | +/* | ||
320 | + * Tell the compiler that address safety instrumentation (KASAN) | ||
321 | + * should not be applied to that function. | ||
322 | + * Conflicts with inlining: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67368 | ||
323 | + */ | ||
324 | +#define __no_sanitize_address __attribute__((no_sanitize_address)) | ||
325 | +#endif | ||
326 | + | ||
327 | +#endif /* gcc version >= 40000 specific checks */ | ||
328 | |||
329 | #if !defined(__noclone) | ||
330 | #define __noclone /* not needed */ | ||
331 | #endif | ||
332 | |||
333 | +#if !defined(__no_sanitize_address) | ||
334 | +#define __no_sanitize_address | ||
335 | +#endif | ||
336 | + | ||
337 | /* | ||
338 | * A trick to suppress uninitialized variable warning without generating any | ||
339 | * code | ||
340 | */ | ||
341 | #define uninitialized_var(x) x = x | ||
342 | - | ||
343 | -#ifndef __always_inline | ||
344 | -#define __always_inline inline __attribute__((always_inline)) | ||
345 | -#endif | ||
346 | diff --git a/include/linux/compiler-gcc3.h b/include/linux/compiler-gcc3.h | ||
347 | deleted file mode 100644 | ||
348 | index 7d89feb..0000000 | ||
349 | --- a/include/linux/compiler-gcc3.h | ||
350 | +++ /dev/null | ||
351 | @@ -1,23 +0,0 @@ | ||
352 | -#ifndef __LINUX_COMPILER_H | ||
353 | -#error "Please don't include <linux/compiler-gcc3.h> directly, include <linux/compiler.h> instead." | ||
354 | -#endif | ||
355 | - | ||
356 | -#if GCC_VERSION < 30200 | ||
357 | -# error Sorry, your compiler is too old - please upgrade it. | ||
358 | -#endif | ||
359 | - | ||
360 | -#if GCC_VERSION >= 30300 | ||
361 | -# define __used __attribute__((__used__)) | ||
362 | -#else | ||
363 | -# define __used __attribute__((__unused__)) | ||
364 | -#endif | ||
365 | - | ||
366 | -#if GCC_VERSION >= 30400 | ||
367 | -#define __must_check __attribute__((warn_unused_result)) | ||
368 | -#endif | ||
369 | - | ||
370 | -#ifdef CONFIG_GCOV_KERNEL | ||
371 | -# if GCC_VERSION < 30400 | ||
372 | -# error "GCOV profiling support for gcc versions below 3.4 not included" | ||
373 | -# endif /* __GNUC_MINOR__ */ | ||
374 | -#endif /* CONFIG_GCOV_KERNEL */ | ||
375 | diff --git a/include/linux/compiler-gcc4.h b/include/linux/compiler-gcc4.h | ||
376 | deleted file mode 100644 | ||
377 | index 2507fd2..0000000 | ||
378 | --- a/include/linux/compiler-gcc4.h | ||
379 | +++ /dev/null | ||
380 | @@ -1,88 +0,0 @@ | ||
381 | -#ifndef __LINUX_COMPILER_H | ||
382 | -#error "Please don't include <linux/compiler-gcc4.h> directly, include <linux/compiler.h> instead." | ||
383 | -#endif | ||
384 | - | ||
385 | -/* GCC 4.1.[01] miscompiles __weak */ | ||
386 | -#ifdef __KERNEL__ | ||
387 | -# if GCC_VERSION >= 40100 && GCC_VERSION <= 40101 | ||
388 | -# error Your version of gcc miscompiles the __weak directive | ||
389 | -# endif | ||
390 | -#endif | ||
391 | - | ||
392 | -#define __used __attribute__((__used__)) | ||
393 | -#define __must_check __attribute__((warn_unused_result)) | ||
394 | -#define __compiler_offsetof(a,b) __builtin_offsetof(a,b) | ||
395 | - | ||
396 | -#if GCC_VERSION >= 40100 && GCC_VERSION < 40600 | ||
397 | -# define __compiletime_object_size(obj) __builtin_object_size(obj, 0) | ||
398 | -#endif | ||
399 | - | ||
400 | -#if GCC_VERSION >= 40300 | ||
401 | -/* Mark functions as cold. gcc will assume any path leading to a call | ||
402 | - to them will be unlikely. This means a lot of manual unlikely()s | ||
403 | - are unnecessary now for any paths leading to the usual suspects | ||
404 | - like BUG(), printk(), panic() etc. [but let's keep them for now for | ||
405 | - older compilers] | ||
406 | - | ||
407 | - Early snapshots of gcc 4.3 don't support this and we can't detect this | ||
408 | - in the preprocessor, but we can live with this because they're unreleased. | ||
409 | - Maketime probing would be overkill here. | ||
410 | - | ||
411 | - gcc also has a __attribute__((__hot__)) to move hot functions into | ||
412 | - a special section, but I don't see any sense in this right now in | ||
413 | - the kernel context */ | ||
414 | -#define __cold __attribute__((__cold__)) | ||
415 | - | ||
416 | -#define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__) | ||
417 | - | ||
418 | -#ifndef __CHECKER__ | ||
419 | -# define __compiletime_warning(message) __attribute__((warning(message))) | ||
420 | -# define __compiletime_error(message) __attribute__((error(message))) | ||
421 | -#endif /* __CHECKER__ */ | ||
422 | -#endif /* GCC_VERSION >= 40300 */ | ||
423 | - | ||
424 | -#if GCC_VERSION >= 40500 | ||
425 | -/* | ||
426 | - * Mark a position in code as unreachable. This can be used to | ||
427 | - * suppress control flow warnings after asm blocks that transfer | ||
428 | - * control elsewhere. | ||
429 | - * | ||
430 | - * Early snapshots of gcc 4.5 don't support this and we can't detect | ||
431 | - * this in the preprocessor, but we can live with this because they're | ||
432 | - * unreleased. Really, we need to have autoconf for the kernel. | ||
433 | - */ | ||
434 | -#define unreachable() __builtin_unreachable() | ||
435 | - | ||
436 | -/* Mark a function definition as prohibited from being cloned. */ | ||
437 | -#define __noclone __attribute__((__noclone__)) | ||
438 | - | ||
439 | -#endif /* GCC_VERSION >= 40500 */ | ||
440 | - | ||
441 | -#if GCC_VERSION >= 40600 | ||
442 | -/* | ||
443 | - * Tell the optimizer that something else uses this function or variable. | ||
444 | - */ | ||
445 | -#define __visible __attribute__((externally_visible)) | ||
446 | -#endif | ||
447 | - | ||
448 | -/* | ||
449 | - * GCC 'asm goto' miscompiles certain code sequences: | ||
450 | - * | ||
451 | - * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58670 | ||
452 | - * | ||
453 | - * Work it around via a compiler barrier quirk suggested by Jakub Jelinek. | ||
454 | - * Fixed in GCC 4.8.2 and later versions. | ||
455 | - * | ||
456 | - * (asm goto is automatically volatile - the naming reflects this.) | ||
457 | - */ | ||
458 | -#define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0) | ||
459 | - | ||
460 | -#ifdef CONFIG_ARCH_USE_BUILTIN_BSWAP | ||
461 | -#if GCC_VERSION >= 40400 | ||
462 | -#define __HAVE_BUILTIN_BSWAP32__ | ||
463 | -#define __HAVE_BUILTIN_BSWAP64__ | ||
464 | -#endif | ||
465 | -#if GCC_VERSION >= 40800 || (defined(__powerpc__) && GCC_VERSION >= 40600) | ||
466 | -#define __HAVE_BUILTIN_BSWAP16__ | ||
467 | -#endif | ||
468 | -#endif /* CONFIG_ARCH_USE_BUILTIN_BSWAP */ | ||
469 | diff --git a/include/linux/compiler-gcc5.h b/include/linux/compiler-gcc5.h | ||
470 | deleted file mode 100644 | ||
471 | index c8c5659..0000000 | ||
472 | --- a/include/linux/compiler-gcc5.h | ||
473 | +++ /dev/null | ||
474 | @@ -1,65 +0,0 @@ | ||
475 | -#ifndef __LINUX_COMPILER_H | ||
476 | -#error "Please don't include <linux/compiler-gcc5.h> directly, include <linux/compiler.h> instead." | ||
477 | -#endif | ||
478 | - | ||
479 | -#define __used __attribute__((__used__)) | ||
480 | -#define __must_check __attribute__((warn_unused_result)) | ||
481 | -#define __compiler_offsetof(a, b) __builtin_offsetof(a, b) | ||
482 | - | ||
483 | -/* Mark functions as cold. gcc will assume any path leading to a call | ||
484 | - to them will be unlikely. This means a lot of manual unlikely()s | ||
485 | - are unnecessary now for any paths leading to the usual suspects | ||
486 | - like BUG(), printk(), panic() etc. [but let's keep them for now for | ||
487 | - older compilers] | ||
488 | - | ||
489 | - Early snapshots of gcc 4.3 don't support this and we can't detect this | ||
490 | - in the preprocessor, but we can live with this because they're unreleased. | ||
491 | - Maketime probing would be overkill here. | ||
492 | - | ||
493 | - gcc also has a __attribute__((__hot__)) to move hot functions into | ||
494 | - a special section, but I don't see any sense in this right now in | ||
495 | - the kernel context */ | ||
496 | -#define __cold __attribute__((__cold__)) | ||
497 | - | ||
498 | -#define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__) | ||
499 | - | ||
500 | -#ifndef __CHECKER__ | ||
501 | -# define __compiletime_warning(message) __attribute__((warning(message))) | ||
502 | -# define __compiletime_error(message) __attribute__((error(message))) | ||
503 | -#endif /* __CHECKER__ */ | ||
504 | - | ||
505 | -/* | ||
506 | - * Mark a position in code as unreachable. This can be used to | ||
507 | - * suppress control flow warnings after asm blocks that transfer | ||
508 | - * control elsewhere. | ||
509 | - * | ||
510 | - * Early snapshots of gcc 4.5 don't support this and we can't detect | ||
511 | - * this in the preprocessor, but we can live with this because they're | ||
512 | - * unreleased. Really, we need to have autoconf for the kernel. | ||
513 | - */ | ||
514 | -#define unreachable() __builtin_unreachable() | ||
515 | - | ||
516 | -/* Mark a function definition as prohibited from being cloned. */ | ||
517 | -#define __noclone __attribute__((__noclone__)) | ||
518 | - | ||
519 | -/* | ||
520 | - * Tell the optimizer that something else uses this function or variable. | ||
521 | - */ | ||
522 | -#define __visible __attribute__((externally_visible)) | ||
523 | - | ||
524 | -/* | ||
525 | - * GCC 'asm goto' miscompiles certain code sequences: | ||
526 | - * | ||
527 | - * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58670 | ||
528 | - * | ||
529 | - * Work it around via a compiler barrier quirk suggested by Jakub Jelinek. | ||
530 | - * | ||
531 | - * (asm goto is automatically volatile - the naming reflects this.) | ||
532 | - */ | ||
533 | -#define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0) | ||
534 | - | ||
535 | -#ifdef CONFIG_ARCH_USE_BUILTIN_BSWAP | ||
536 | -#define __HAVE_BUILTIN_BSWAP32__ | ||
537 | -#define __HAVE_BUILTIN_BSWAP64__ | ||
538 | -#define __HAVE_BUILTIN_BSWAP16__ | ||
539 | -#endif /* CONFIG_ARCH_USE_BUILTIN_BSWAP */ | ||
540 | diff --git a/include/linux/compiler-intel.h b/include/linux/compiler-intel.h | ||
541 | index ba147a1..d4c7113 100644 | ||
542 | --- a/include/linux/compiler-intel.h | ||
543 | +++ b/include/linux/compiler-intel.h | ||
544 | @@ -13,9 +13,14 @@ | ||
545 | /* Intel ECC compiler doesn't support gcc specific asm stmts. | ||
546 | * It uses intrinsics to do the equivalent things. | ||
547 | */ | ||
548 | +#undef barrier | ||
549 | +#undef barrier_data | ||
550 | #undef RELOC_HIDE | ||
551 | #undef OPTIMIZER_HIDE_VAR | ||
552 | |||
553 | +#define barrier() __memory_barrier() | ||
554 | +#define barrier_data(ptr) barrier() | ||
555 | + | ||
556 | #define RELOC_HIDE(ptr, off) \ | ||
557 | ({ unsigned long __ptr; \ | ||
558 | __ptr = (unsigned long) (ptr); \ | ||
559 | diff --git a/include/linux/compiler.h b/include/linux/compiler.h | ||
560 | index d5ad7b1..020ad16 100644 | ||
561 | --- a/include/linux/compiler.h | ||
562 | +++ b/include/linux/compiler.h | ||
563 | @@ -17,6 +17,7 @@ | ||
564 | # define __release(x) __context__(x,-1) | ||
565 | # define __cond_lock(x,c) ((c) ? ({ __acquire(x); 1; }) : 0) | ||
566 | # define __percpu __attribute__((noderef, address_space(3))) | ||
567 | +# define __pmem __attribute__((noderef, address_space(5))) | ||
568 | #ifdef CONFIG_SPARSE_RCU_POINTER | ||
569 | # define __rcu __attribute__((noderef, address_space(4))) | ||
570 | #else | ||
571 | @@ -42,6 +43,7 @@ extern void __chk_io_ptr(const volatile void __iomem *); | ||
572 | # define __cond_lock(x,c) (c) | ||
573 | # define __percpu | ||
574 | # define __rcu | ||
575 | +# define __pmem | ||
576 | #endif | ||
577 | |||
578 | /* Indirect macros required for expanded argument pasting, eg. __LINE__. */ | ||
579 | @@ -54,7 +56,11 @@ extern void __chk_io_ptr(const volatile void __iomem *); | ||
580 | #include <linux/compiler-gcc.h> | ||
581 | #endif | ||
582 | |||
583 | +#if defined(CC_USING_HOTPATCH) && !defined(__CHECKER__) | ||
584 | +#define notrace __attribute__((hotpatch(0,0))) | ||
585 | +#else | ||
586 | #define notrace __attribute__((no_instrument_function)) | ||
587 | +#endif | ||
588 | |||
589 | /* Intel compiler defines __GNUC__. So we will overwrite implementations | ||
590 | * coming from above header files here | ||
591 | @@ -138,7 +144,7 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect); | ||
592 | */ | ||
593 | #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) ) | ||
594 | #define __trace_if(cond) \ | ||
595 | - if (__builtin_constant_p((cond)) ? !!(cond) : \ | ||
596 | + if (__builtin_constant_p(!!(cond)) ? !!(cond) : \ | ||
597 | ({ \ | ||
598 | int ______r; \ | ||
599 | static struct ftrace_branch_data \ | ||
600 | @@ -165,6 +171,10 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect); | ||
601 | # define barrier() __memory_barrier() | ||
602 | #endif | ||
603 | |||
604 | +#ifndef barrier_data | ||
605 | +# define barrier_data(ptr) barrier() | ||
606 | +#endif | ||
607 | + | ||
608 | /* Unreachable code */ | ||
609 | #ifndef unreachable | ||
610 | # define unreachable() do { } while (1) | ||
611 | @@ -186,6 +196,126 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect); | ||
612 | # define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __LINE__) | ||
613 | #endif | ||
614 | |||
615 | +#include <linux/types.h> | ||
616 | + | ||
617 | +#define __READ_ONCE_SIZE \ | ||
618 | +({ \ | ||
619 | + switch (size) { \ | ||
620 | + case 1: *(__u8 *)res = *(volatile __u8 *)p; break; \ | ||
621 | + case 2: *(__u16 *)res = *(volatile __u16 *)p; break; \ | ||
622 | + case 4: *(__u32 *)res = *(volatile __u32 *)p; break; \ | ||
623 | + case 8: *(__u64 *)res = *(volatile __u64 *)p; break; \ | ||
624 | + default: \ | ||
625 | + barrier(); \ | ||
626 | + __builtin_memcpy((void *)res, (const void *)p, size); \ | ||
627 | + barrier(); \ | ||
628 | + } \ | ||
629 | +}) | ||
630 | + | ||
631 | +static __always_inline | ||
632 | +void __read_once_size(const volatile void *p, void *res, int size) | ||
633 | +{ | ||
634 | + __READ_ONCE_SIZE; | ||
635 | +} | ||
636 | + | ||
637 | +#ifdef CONFIG_KASAN | ||
638 | +/* | ||
639 | + * This function is not 'inline' because __no_sanitize_address confilcts | ||
640 | + * with inlining. Attempt to inline it may cause a build failure. | ||
641 | + * https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67368 | ||
642 | + * '__maybe_unused' allows us to avoid defined-but-not-used warnings. | ||
643 | + */ | ||
644 | +static __no_sanitize_address __maybe_unused | ||
645 | +void __read_once_size_nocheck(const volatile void *p, void *res, int size) | ||
646 | +{ | ||
647 | + __READ_ONCE_SIZE; | ||
648 | +} | ||
649 | +#else | ||
650 | +static __always_inline | ||
651 | +void __read_once_size_nocheck(const volatile void *p, void *res, int size) | ||
652 | +{ | ||
653 | + __READ_ONCE_SIZE; | ||
654 | +} | ||
655 | +#endif | ||
656 | + | ||
657 | +static __always_inline void __write_once_size(volatile void *p, void *res, int size) | ||
658 | +{ | ||
659 | + switch (size) { | ||
660 | + case 1: *(volatile __u8 *)p = *(__u8 *)res; break; | ||
661 | + case 2: *(volatile __u16 *)p = *(__u16 *)res; break; | ||
662 | + case 4: *(volatile __u32 *)p = *(__u32 *)res; break; | ||
663 | + case 8: *(volatile __u64 *)p = *(__u64 *)res; break; | ||
664 | + default: | ||
665 | + barrier(); | ||
666 | + __builtin_memcpy((void *)p, (const void *)res, size); | ||
667 | + barrier(); | ||
668 | + } | ||
669 | +} | ||
670 | + | ||
671 | +/* | ||
672 | + * Prevent the compiler from merging or refetching reads or writes. The | ||
673 | + * compiler is also forbidden from reordering successive instances of | ||
674 | + * READ_ONCE, WRITE_ONCE and ACCESS_ONCE (see below), but only when the | ||
675 | + * compiler is aware of some particular ordering. One way to make the | ||
676 | + * compiler aware of ordering is to put the two invocations of READ_ONCE, | ||
677 | + * WRITE_ONCE or ACCESS_ONCE() in different C statements. | ||
678 | + * | ||
679 | + * In contrast to ACCESS_ONCE these two macros will also work on aggregate | ||
680 | + * data types like structs or unions. If the size of the accessed data | ||
681 | + * type exceeds the word size of the machine (e.g., 32 bits or 64 bits) | ||
682 | + * READ_ONCE() and WRITE_ONCE() will fall back to memcpy and print a | ||
683 | + * compile-time warning. | ||
684 | + * | ||
685 | + * Their two major use cases are: (1) Mediating communication between | ||
686 | + * process-level code and irq/NMI handlers, all running on the same CPU, | ||
687 | + * and (2) Ensuring that the compiler does not fold, spindle, or otherwise | ||
688 | + * mutilate accesses that either do not require ordering or that interact | ||
689 | + * with an explicit memory barrier or atomic instruction that provides the | ||
690 | + * required ordering. | ||
691 | + */ | ||
692 | + | ||
693 | +#define __READ_ONCE(x, check) \ | ||
694 | +({ \ | ||
695 | + union { typeof(x) __val; char __c[1]; } __u; \ | ||
696 | + if (check) \ | ||
697 | + __read_once_size(&(x), __u.__c, sizeof(x)); \ | ||
698 | + else \ | ||
699 | + __read_once_size_nocheck(&(x), __u.__c, sizeof(x)); \ | ||
700 | + __u.__val; \ | ||
701 | +}) | ||
702 | +#define READ_ONCE(x) __READ_ONCE(x, 1) | ||
703 | + | ||
704 | +/* | ||
705 | + * Use READ_ONCE_NOCHECK() instead of READ_ONCE() if you need | ||
706 | + * to hide memory access from KASAN. | ||
707 | + */ | ||
708 | +#define READ_ONCE_NOCHECK(x) __READ_ONCE(x, 0) | ||
709 | + | ||
710 | +#define WRITE_ONCE(x, val) \ | ||
711 | +({ \ | ||
712 | + union { typeof(x) __val; char __c[1]; } __u = \ | ||
713 | + { .__val = (__force typeof(x)) (val) }; \ | ||
714 | + __write_once_size(&(x), __u.__c, sizeof(x)); \ | ||
715 | + __u.__val; \ | ||
716 | +}) | ||
717 | + | ||
718 | +/** | ||
719 | + * smp_cond_acquire() - Spin wait for cond with ACQUIRE ordering | ||
720 | + * @cond: boolean expression to wait for | ||
721 | + * | ||
722 | + * Equivalent to using smp_load_acquire() on the condition variable but employs | ||
723 | + * the control dependency of the wait to reduce the barrier on many platforms. | ||
724 | + * | ||
725 | + * The control dependency provides a LOAD->STORE order, the additional RMB | ||
726 | + * provides LOAD->LOAD order, together they provide LOAD->{LOAD,STORE} order, | ||
727 | + * aka. ACQUIRE. | ||
728 | + */ | ||
729 | +#define smp_cond_acquire(cond) do { \ | ||
730 | + while (!(cond)) \ | ||
731 | + cpu_relax(); \ | ||
732 | + smp_rmb(); /* ctrl + rmb := acquire */ \ | ||
733 | +} while (0) | ||
734 | + | ||
735 | #endif /* __KERNEL__ */ | ||
736 | |||
737 | #endif /* __ASSEMBLY__ */ | ||
738 | @@ -304,6 +434,14 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect); | ||
739 | #define __visible | ||
740 | #endif | ||
741 | |||
742 | +/* | ||
743 | + * Assume alignment of return value. | ||
744 | + */ | ||
745 | +#ifndef __assume_aligned | ||
746 | +#define __assume_aligned(a, ...) | ||
747 | +#endif | ||
748 | + | ||
749 | + | ||
750 | /* Are two types/vars the same type (ignoring qualifiers)? */ | ||
751 | #ifndef __same_type | ||
752 | # define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b)) | ||
753 | @@ -311,7 +449,7 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect); | ||
754 | |||
755 | /* Is this type a native word size -- useful for atomic operations */ | ||
756 | #ifndef __native_word | ||
757 | -# define __native_word(t) (sizeof(t) == sizeof(int) || sizeof(t) == sizeof(long)) | ||
758 | +# define __native_word(t) (sizeof(t) == sizeof(char) || sizeof(t) == sizeof(short) || sizeof(t) == sizeof(int) || sizeof(t) == sizeof(long)) | ||
759 | #endif | ||
760 | |||
761 | /* Compile time object size, -1 for unknown */ | ||
762 | @@ -373,12 +511,38 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect); | ||
763 | * to make the compiler aware of ordering is to put the two invocations of | ||
764 | * ACCESS_ONCE() in different C statements. | ||
765 | * | ||
766 | - * This macro does absolutely -nothing- to prevent the CPU from reordering, | ||
767 | - * merging, or refetching absolutely anything at any time. Its main intended | ||
768 | - * use is to mediate communication between process-level code and irq/NMI | ||
769 | - * handlers, all running on the same CPU. | ||
770 | + * ACCESS_ONCE will only work on scalar types. For union types, ACCESS_ONCE | ||
771 | + * on a union member will work as long as the size of the member matches the | ||
772 | + * size of the union and the size is smaller than word size. | ||
773 | + * | ||
774 | + * The major use cases of ACCESS_ONCE used to be (1) Mediating communication | ||
775 | + * between process-level code and irq/NMI handlers, all running on the same CPU, | ||
776 | + * and (2) Ensuring that the compiler does not fold, spindle, or otherwise | ||
777 | + * mutilate accesses that either do not require ordering or that interact | ||
778 | + * with an explicit memory barrier or atomic instruction that provides the | ||
779 | + * required ordering. | ||
780 | + * | ||
781 | + * If possible use READ_ONCE()/WRITE_ONCE() instead. | ||
782 | + */ | ||
783 | +#define __ACCESS_ONCE(x) ({ \ | ||
784 | + __maybe_unused typeof(x) __var = (__force typeof(x)) 0; \ | ||
785 | + (volatile typeof(x) *)&(x); }) | ||
786 | +#define ACCESS_ONCE(x) (*__ACCESS_ONCE(x)) | ||
787 | + | ||
788 | +/** | ||
789 | + * lockless_dereference() - safely load a pointer for later dereference | ||
790 | + * @p: The pointer to load | ||
791 | + * | ||
792 | + * Similar to rcu_dereference(), but for situations where the pointed-to | ||
793 | + * object's lifetime is managed by something other than RCU. That | ||
794 | + * "something other" might be reference counting or simple immortality. | ||
795 | */ | ||
796 | -#define ACCESS_ONCE(x) (*(volatile typeof(x) *)&(x)) | ||
797 | +#define lockless_dereference(p) \ | ||
798 | +({ \ | ||
799 | + typeof(p) _________p1 = READ_ONCE(p); \ | ||
800 | + smp_read_barrier_depends(); /* Dependency order vs. p above. */ \ | ||
801 | + (_________p1); \ | ||
802 | +}) | ||
803 | |||
804 | /* Ignore/forbid kprobes attach on very low level functions marked by this attribute: */ | ||
805 | #ifdef CONFIG_KPROBES | ||
806 | -- | ||
807 | 2.7.4 | ||
808 | |||
diff --git a/meta-renesas-extras/recipes/u-boot/u-boot_%.bbappend b/meta-renesas-extras/recipes/u-boot/u-boot_%.bbappend deleted file mode 100644 index 47fe2ce..0000000 --- a/meta-renesas-extras/recipes/u-boot/u-boot_%.bbappend +++ /dev/null | |||
@@ -1,40 +0,0 @@ | |||
1 | ############################################################################ | ||
2 | ## | ||
3 | ## Copyright (C) 2017 The Qt Company Ltd. | ||
4 | ## Contact: https://www.qt.io/licensing/ | ||
5 | ## | ||
6 | ## This file is part of the Boot to Qt meta layer. | ||
7 | ## | ||
8 | ## $QT_BEGIN_LICENSE:GPL$ | ||
9 | ## Commercial License Usage | ||
10 | ## Licensees holding valid commercial Qt licenses may use this file in | ||
11 | ## accordance with the commercial license agreement provided with the | ||
12 | ## Software or, alternatively, in accordance with the terms contained in | ||
13 | ## a written agreement between you and The Qt Company. For licensing terms | ||
14 | ## and conditions see https://www.qt.io/terms-conditions. For further | ||
15 | ## information use the contact form at https://www.qt.io/contact-us. | ||
16 | ## | ||
17 | ## GNU General Public License Usage | ||
18 | ## Alternatively, this file may be used under the terms of the GNU | ||
19 | ## General Public License version 3 or (at your option) any later version | ||
20 | ## approved by the KDE Free Qt Foundation. The licenses are as published by | ||
21 | ## the Free Software Foundation and appearing in the file LICENSE.GPL3 | ||
22 | ## included in the packaging of this file. Please review the following | ||
23 | ## information to ensure the GNU General Public License requirements will | ||
24 | ## be met: https://www.gnu.org/licenses/gpl-3.0.html. | ||
25 | ## | ||
26 | ## $QT_END_LICENSE$ | ||
27 | ## | ||
28 | ############################################################################ | ||
29 | |||
30 | LICENSE = "GPLv2+" | ||
31 | |||
32 | FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" | ||
33 | |||
34 | SRC_URI += "file://0001-compiler-.h-sync-include-linux-compiler-.h-with-Linu.patch" | ||
35 | |||
36 | S = "${WORKDIR}/git" | ||
37 | |||
38 | do_deploy_prepend() { | ||
39 | cp ${B}/${UBOOT_SREC} ${S}/${UBOOT_SREC} | ||
40 | } | ||
diff --git a/meta-renesas-extras/recipes/wayland/wayland-kms_1.6.0.bbappend b/meta-renesas-extras/recipes/wayland/wayland-kms_1.6.0.bbappend deleted file mode 100644 index 0cd3eec..0000000 --- a/meta-renesas-extras/recipes/wayland/wayland-kms_1.6.0.bbappend +++ /dev/null | |||
@@ -1,30 +0,0 @@ | |||
1 | ############################################################################ | ||
2 | ## | ||
3 | ## Copyright (C) 2017 The Qt Company Ltd. | ||
4 | ## Contact: https://www.qt.io/licensing/ | ||
5 | ## | ||
6 | ## This file is part of the Boot to Qt meta layer. | ||
7 | ## | ||
8 | ## $QT_BEGIN_LICENSE:GPL$ | ||
9 | ## Commercial License Usage | ||
10 | ## Licensees holding valid commercial Qt licenses may use this file in | ||
11 | ## accordance with the commercial license agreement provided with the | ||
12 | ## Software or, alternatively, in accordance with the terms contained in | ||
13 | ## a written agreement between you and The Qt Company. For licensing terms | ||
14 | ## and conditions see https://www.qt.io/terms-conditions. For further | ||
15 | ## information use the contact form at https://www.qt.io/contact-us. | ||
16 | ## | ||
17 | ## GNU General Public License Usage | ||
18 | ## Alternatively, this file may be used under the terms of the GNU | ||
19 | ## General Public License version 3 or (at your option) any later version | ||
20 | ## approved by the KDE Free Qt Foundation. The licenses are as published by | ||
21 | ## the Free Software Foundation and appearing in the file LICENSE.GPL3 | ||
22 | ## included in the packaging of this file. Please review the following | ||
23 | ## information to ensure the GNU General Public License requirements will | ||
24 | ## be met: https://www.gnu.org/licenses/gpl-3.0.html. | ||
25 | ## | ||
26 | ## $QT_END_LICENSE$ | ||
27 | ## | ||
28 | ############################################################################ | ||
29 | |||
30 | DEPENDS += "wayland-native" | ||
diff --git a/meta-renesas-extras/recipes/wayland/weston_1.11.0.bbappend b/meta-renesas-extras/recipes/wayland/weston_1.11.0.bbappend deleted file mode 100644 index ef14c2f..0000000 --- a/meta-renesas-extras/recipes/wayland/weston_1.11.0.bbappend +++ /dev/null | |||
@@ -1,30 +0,0 @@ | |||
1 | ############################################################################ | ||
2 | ## | ||
3 | ## Copyright (C) 2017 The Qt Company Ltd. | ||
4 | ## Contact: https://www.qt.io/licensing/ | ||
5 | ## | ||
6 | ## This file is part of the Boot to Qt meta layer. | ||
7 | ## | ||
8 | ## $QT_BEGIN_LICENSE:GPL$ | ||
9 | ## Commercial License Usage | ||
10 | ## Licensees holding valid commercial Qt licenses may use this file in | ||
11 | ## accordance with the commercial license agreement provided with the | ||
12 | ## Software or, alternatively, in accordance with the terms contained in | ||
13 | ## a written agreement between you and The Qt Company. For licensing terms | ||
14 | ## and conditions see https://www.qt.io/terms-conditions. For further | ||
15 | ## information use the contact form at https://www.qt.io/contact-us. | ||
16 | ## | ||
17 | ## GNU General Public License Usage | ||
18 | ## Alternatively, this file may be used under the terms of the GNU | ||
19 | ## General Public License version 3 or (at your option) any later version | ||
20 | ## approved by the KDE Free Qt Foundation. The licenses are as published by | ||
21 | ## the Free Software Foundation and appearing in the file LICENSE.GPL3 | ||
22 | ## included in the packaging of this file. Please review the following | ||
23 | ## information to ensure the GNU General Public License requirements will | ||
24 | ## be met: https://www.gnu.org/licenses/gpl-3.0.html. | ||
25 | ## | ||
26 | ## $QT_END_LICENSE$ | ||
27 | ## | ||
28 | ############################################################################ | ||
29 | |||
30 | EXTRA_OECONF += "WAYLAND_PROTOCOLS_SYSROOT_DIR=${RECIPE_SYSROOT}" | ||
diff --git a/scripts/manifest.xml b/scripts/manifest.xml index a1ad676..a30ac05 100644 --- a/scripts/manifest.xml +++ b/scripts/manifest.xml | |||
@@ -37,7 +37,7 @@ | |||
37 | remote="freescale" | 37 | remote="freescale" |
38 | revision="2813c0c59a81498afab26a2b1f90db07728df2ed" | 38 | revision="2813c0c59a81498afab26a2b1f90db07728df2ed" |
39 | path="sources/meta-freescale" | 39 | path="sources/meta-freescale" |
40 | groups="notdefault,external,fsl,toradex,smx6,renesas-gen3,boundary,fsl-imx8"/> | 40 | groups="notdefault,external,fsl,toradex,smx6,boundary,fsl-imx8"/> |
41 | <project name="meta-freescale-3rdparty" | 41 | <project name="meta-freescale-3rdparty" |
42 | remote="freescale" | 42 | remote="freescale" |
43 | revision="ba684412e6983eeda0ef7158a724305f0f1a2f0a" | 43 | revision="ba684412e6983eeda0ef7158a724305f0f1a2f0a" |
@@ -60,12 +60,12 @@ | |||
60 | groups="notdefault,external,jetson"/> | 60 | groups="notdefault,external,jetson"/> |
61 | <project name="meta-renesas" | 61 | <project name="meta-renesas" |
62 | remote="renesas" | 62 | remote="renesas" |
63 | revision="95cb48ba09bc7e55fd549817e3e26723409e68d5" | 63 | revision="276e6ae724d7e604e0d28e4670b8c9edea2957e3" |
64 | path="sources/meta-renesas" | 64 | path="sources/meta-renesas" |
65 | groups="notdefault,external,renesas-gen3"/> | 65 | groups="notdefault,external,renesas-gen3"/> |
66 | <project name="meta-linaro" | 66 | <project name="meta-linaro" |
67 | remote="linaro" | 67 | remote="linaro" |
68 | revision="74dacb34c13d1c85fe4627a890b9c04940f9ffeb" | 68 | revision="282b47a10940c26854c1cca0ec40950192af16fc" |
69 | path="sources/meta-linaro" | 69 | path="sources/meta-linaro" |
70 | groups="notdefault,external,renesas-gen3"/> | 70 | groups="notdefault,external,renesas-gen3"/> |
71 | <project name="meta-toradex-bsp-common" | 71 | <project name="meta-toradex-bsp-common" |
@@ -101,7 +101,7 @@ | |||
101 | groups="notdefault,internal"/> | 101 | groups="notdefault,internal"/> |
102 | <project name="renesas-rcar-gen3" | 102 | <project name="renesas-rcar-gen3" |
103 | remote="playground" | 103 | remote="playground" |
104 | revision="41c966df95fad1d8fca5c24676c437a46e997c5f" | 104 | revision="53a345942e4207b2fa1b19d932b5b72bd5c4761c" |
105 | path="sources/renesas-rcar-gen3" | 105 | path="sources/renesas-rcar-gen3" |
106 | groups="notdefault,internal"/> | 106 | groups="notdefault,internal"/> |
107 | <project name="meta-smx6" | 107 | <project name="meta-smx6" |
diff --git a/scripts/setup-environment.sh b/scripts/setup-environment.sh index 077f3af..c019c3e 100755 --- a/scripts/setup-environment.sh +++ b/scripts/setup-environment.sh | |||
@@ -80,7 +80,7 @@ if [ ! -f ${PWD}/${BUILDDIRECTORY}/conf/bblayers.conf ]; then | |||
80 | tegra-x1|tegra-t18x) | 80 | tegra-x1|tegra-t18x) |
81 | LAYERSCONF="bblayers.conf.nvidia-tegra.sample" | 81 | LAYERSCONF="bblayers.conf.nvidia-tegra.sample" |
82 | ;; | 82 | ;; |
83 | salvator-x|h3ulcb|m3ulcb) | 83 | salvator-x|h3ulcb|m3ulcb|ebisu) |
84 | LAYERSCONF="bblayers.conf.rcar-gen3.sample" | 84 | LAYERSCONF="bblayers.conf.rcar-gen3.sample" |
85 | ;; | 85 | ;; |
86 | emulator) | 86 | emulator) |