X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=include%2Flinux%2Finit.h;h=13dfc98844fa8c8647755409fcbdceec8dc8a3ec;hb=2066f5c4135f7d919a10bd6ff1f79d900e44aab8;hp=9146f39cdddfe97bd61473d54a72a33bfad3a04f;hpb=ea0ca3a843babd50c22dfbb5cf2d9a14df821b2b;p=pandora-kernel.git diff --git a/include/linux/init.h b/include/linux/init.h index 9146f39cdddf..13dfc98844fa 100644 --- a/include/linux/init.h +++ b/include/linux/init.h @@ -3,6 +3,13 @@ #include +/* Built-in __init functions needn't be compiled with retpoline */ +#if defined(RETPOLINE) && !defined(MODULE) +#define __noretpoline __attribute__((indirect_branch("keep"))) +#else +#define __noretpoline +#endif + /* These macros are used to mark some functions or * initialized data (doesn't apply to uninitialized data) * as `initialization' functions. The kernel can take this @@ -40,7 +47,7 @@ /* These are for everybody (although not all archs will actually discard it in modules) */ -#define __init __section(.init.text) __cold notrace +#define __init __section(.init.text) __cold notrace __noretpoline #define __initdata __section(.init.data) #define __initconst __section(.init.rodata) #define __exitdata __section(.exit.data)