aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/init.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/init.h')
-rw-r--r--include/linux/init.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/linux/init.h b/include/linux/init.h
index ea1b31101d9e..506a98151131 100644
--- a/include/linux/init.h
+++ b/include/linux/init.h
@@ -5,6 +5,13 @@
5#include <linux/compiler.h> 5#include <linux/compiler.h>
6#include <linux/types.h> 6#include <linux/types.h>
7 7
8/* Built-in __init functions needn't be compiled with retpoline */
9#if defined(RETPOLINE) && !defined(MODULE)
10#define __noretpoline __attribute__((indirect_branch("keep")))
11#else
12#define __noretpoline
13#endif
14
8/* These macros are used to mark some functions or 15/* These macros are used to mark some functions or
9 * initialized data (doesn't apply to uninitialized data) 16 * initialized data (doesn't apply to uninitialized data)
10 * as `initialization' functions. The kernel can take this 17 * as `initialization' functions. The kernel can take this
@@ -40,7 +47,7 @@
40 47
41/* These are for everybody (although not all archs will actually 48/* These are for everybody (although not all archs will actually
42 discard it in modules) */ 49 discard it in modules) */
43#define __init __section(.init.text) __cold __latent_entropy 50#define __init __section(.init.text) __cold __latent_entropy __noretpoline
44#define __initdata __section(.init.data) 51#define __initdata __section(.init.data)
45#define __initconst __section(.init.rodata) 52#define __initconst __section(.init.rodata)
46#define __exitdata __section(.exit.data) 53#define __exitdata __section(.exit.data)