diff options
author | 2018-03-20 10:01:37 +0100 | |
---|---|---|
committer | 2018-03-20 10:01:37 +0100 | |
commit | 3eb93ea3272d428aab3c03e2dd272a78a7729ba8 (patch) | |
tree | 63ca8b7e7feccb109f4b5cb868939da395c7632f /include/linux/compiler-gcc.h | |
parent | x86/cpu: Remove the CONFIG_X86_PPRO_FENCE=y quirk (diff) | |
parent | x86/mm: Remove pointless checks in vmalloc_fault (diff) | |
download | wireguard-linux-3eb93ea3272d428aab3c03e2dd272a78a7729ba8.tar.xz wireguard-linux-3eb93ea3272d428aab3c03e2dd272a78a7729ba8.zip |
Merge branch 'x86/mm' into x86/dma, to pick up dependencies
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to '')
-rw-r--r-- | include/linux/compiler-gcc.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h index 673fbf904fe5..e2c7f4369eff 100644 --- a/include/linux/compiler-gcc.h +++ b/include/linux/compiler-gcc.h @@ -212,6 +212,15 @@ #endif /* + * calling noreturn functions, __builtin_unreachable() and __builtin_trap() + * confuse the stack allocation in gcc, leading to overly large stack + * frames, see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82365 + * + * Adding an empty inline assembly before it works around the problem + */ +#define barrier_before_unreachable() asm volatile("") + +/* * Mark a position in code as unreachable. This can be used to * suppress control flow warnings after asm blocks that transfer * control elsewhere. @@ -221,7 +230,11 @@ * unreleased. Really, we need to have autoconf for the kernel. */ #define unreachable() \ - do { annotate_unreachable(); __builtin_unreachable(); } while (0) + do { \ + annotate_unreachable(); \ + barrier_before_unreachable(); \ + __builtin_unreachable(); \ + } while (0) /* Mark a function definition as prohibited from being cloned. */ #define __noclone __attribute__((__noclone__, __optimize__("no-tracer"))) |