x86/static_call: Add out-of-line static call implementation
authorJosh Poimboeuf <jpoimboe@redhat.com>
Tue, 18 Aug 2020 13:57:44 +0000 (15:57 +0200)
committerIngo Molnar <mingo@kernel.org>
Tue, 1 Sep 2020 07:58:05 +0000 (09:58 +0200)
commite6d6c071f22de29e4993784fc00cd2202b7ba149
treebae18c77a906997cabae12110f0c759a28856a65
parent6333e8f73b834f54e395a056e6002403f0862c51
x86/static_call: Add out-of-line static call implementation

Add the x86 out-of-line static call implementation.  For each key, a
permanent trampoline is created which is the destination for all static
calls for the given key.  The trampoline has a direct jump which gets
patched by static_call_update() when the destination function changes.

[peterz: fixed trampoline, rewrote patching code]

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>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: https://lore.kernel.org/r/20200818135804.804315175@infradead.org
arch/x86/Kconfig
arch/x86/include/asm/static_call.h [new file with mode: 0644]
arch/x86/kernel/Makefile
arch/x86/kernel/static_call.c [new file with mode: 0644]