aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/compiler-gcc.h
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2015-11-23 03:04:05 -0500
committerDaniel Vetter <daniel.vetter@ffwll.ch>2015-11-23 03:04:05 -0500
commit92907cbbef8625bb3998d1eb385fc88f23c97a3f (patch)
tree15626ff9287e37c3cb81c7286d6db5a7fd77c854 /include/linux/compiler-gcc.h
parent15fbfccfe92c62ae8d1ecc647c44157ed01ac02e (diff)
parent1ec218373b8ebda821aec00bb156a9c94fad9cd4 (diff)
Merge tag 'v4.4-rc2' into drm-intel-next-queued
Linux 4.4-rc2 Backmerge to get at commit 1b0e3a049efe471c399674fd954500ce97438d30 Author: Imre Deak <imre.deak@intel.com> Date: Thu Nov 5 23:04:11 2015 +0200 drm/i915/skl: disable display side power well support for now so that we can proplery re-eanble skl power wells in -next. Conflicts are just adjacent lines changed, except for intel_fbdev.c where we need to interleave the changs. Nothing nefarious. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Diffstat (limited to 'include/linux/compiler-gcc.h')
-rw-r--r--include/linux/compiler-gcc.h35
1 files changed, 34 insertions, 1 deletions
diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h
index dfaa7b3e9ae9..22ab246feed3 100644
--- a/include/linux/compiler-gcc.h
+++ b/include/linux/compiler-gcc.h
@@ -205,11 +205,31 @@
205 205
206#if GCC_VERSION >= 40600 206#if GCC_VERSION >= 40600
207/* 207/*
208 * Tell the optimizer that something else uses this function or variable. 208 * When used with Link Time Optimization, gcc can optimize away C functions or
209 * variables which are referenced only from assembly code. __visible tells the
210 * optimizer that something else uses this function or variable, thus preventing
211 * this.
209 */ 212 */
210#define __visible __attribute__((externally_visible)) 213#define __visible __attribute__((externally_visible))
211#endif 214#endif
212 215
216
217#if GCC_VERSION >= 40900 && !defined(__CHECKER__)
218/*
219 * __assume_aligned(n, k): Tell the optimizer that the returned
220 * pointer can be assumed to be k modulo n. The second argument is
221 * optional (default 0), so we use a variadic macro to make the
222 * shorthand.
223 *
224 * Beware: Do not apply this to functions which may return
225 * ERR_PTRs. Also, it is probably unwise to apply it to functions
226 * returning extra information in the low bits (but in that case the
227 * compiler should see some alignment anyway, when the return value is
228 * massaged by 'flags = ptr & 3; ptr &= ~3;').
229 */
230#define __assume_aligned(a, ...) __attribute__((__assume_aligned__(a, ## __VA_ARGS__)))
231#endif
232
213/* 233/*
214 * GCC 'asm goto' miscompiles certain code sequences: 234 * GCC 'asm goto' miscompiles certain code sequences:
215 * 235 *
@@ -237,12 +257,25 @@
237#define KASAN_ABI_VERSION 3 257#define KASAN_ABI_VERSION 3
238#endif 258#endif
239 259
260#if GCC_VERSION >= 40902
261/*
262 * Tell the compiler that address safety instrumentation (KASAN)
263 * should not be applied to that function.
264 * Conflicts with inlining: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67368
265 */
266#define __no_sanitize_address __attribute__((no_sanitize_address))
267#endif
268
240#endif /* gcc version >= 40000 specific checks */ 269#endif /* gcc version >= 40000 specific checks */
241 270
242#if !defined(__noclone) 271#if !defined(__noclone)
243#define __noclone /* not needed */ 272#define __noclone /* not needed */
244#endif 273#endif
245 274
275#if !defined(__no_sanitize_address)
276#define __no_sanitize_address
277#endif
278
246/* 279/*
247 * A trick to suppress uninitialized variable warning without generating any 280 * A trick to suppress uninitialized variable warning without generating any
248 * code 281 * code