lkml.org 
[lkml]   [2018]   [Feb]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] sparse doesn't support indirect_branch attribute

Don't use __attribute__((indirect_branch)) if we're compiling with
sparse.

Signed-off-by: Matthew Wilcox <mawilcox@microsoft.com>

diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h
index e2c7f4369eff..b6be4cc25e9d 100644
--- a/include/linux/compiler-gcc.h
+++ b/include/linux/compiler-gcc.h
@@ -93,7 +93,7 @@
#define __weak __attribute__((weak))
#define __alias(symbol) __attribute__((alias(#symbol)))

-#ifdef RETPOLINE
+#if defined(RETPOLINE) && !defined(__CHECKER__)
#define __noretpoline __attribute__((indirect_branch("keep")))
#endif

\
 
 \ /
  Last update: 2018-02-27 20:49    [W:0.065 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site