summaryrefslogtreecommitdiffstats
path: root/arch/Kconfig
diff options
context:
space:
mode:
authorJosh Poimboeuf <jpoimboe@redhat.com>2020-08-18 15:57:41 +0200
committerIngo Molnar <mingo@kernel.org>2020-09-01 09:58:04 +0200
commit115284d89a436e9b66da0c6c4f6efded806874b2 (patch)
tree32a7cea5ea8b3669e7ba38532c3e229cb13331c6 /arch/Kconfig
parent563a02b0c9704f69c0364befedd451f57fe88092 (diff)
downloadlinux-115284d89a436e9b66da0c6c4f6efded806874b2.tar.gz
linux-115284d89a436e9b66da0c6c4f6efded806874b2.tar.bz2
linux-115284d89a436e9b66da0c6c4f6efded806874b2.zip
static_call: Add basic static call infrastructure
Static calls are a replacement for global function pointers. They use code patching to allow direct calls to be used instead of indirect calls. They give the flexibility of function pointers, but with improved performance. This is especially important for cases where retpolines would otherwise be used, as retpolines can significantly impact performance. The concept and code are an extension of previous work done by Ard Biesheuvel and Steven Rostedt: https://lkml.kernel.org/r/20181005081333.15018-1-ard.biesheuvel@linaro.org https://lkml.kernel.org/r/20181006015110.653946300@goodmis.org There are two implementations, depending on arch support: 1) out-of-line: patched trampolines (CONFIG_HAVE_STATIC_CALL) 2) basic function pointers For more details, see the comments in include/linux/static_call.h. [peterz: simplified interface] Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Reviewed-by: Steven Rostedt (VMware) <rostedt@goodmis.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Link: https://lore.kernel.org/r/20200818135804.623259796@infradead.org
Diffstat (limited to 'arch/Kconfig')
-rw-r--r--arch/Kconfig3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/Kconfig b/arch/Kconfig
index af14a567b493..806e6df7b47c 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -975,6 +975,9 @@ config HAVE_SPARSE_SYSCALL_NR
config ARCH_HAS_VDSO_DATA
bool
+config HAVE_STATIC_CALL
+ bool
+
source "kernel/gcov/Kconfig"
source "scripts/gcc-plugins/Kconfig"