Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

static_call_inline: Provide trampoline address when updating sites

In preparation of support of inline static calls on powerpc, provide
trampoline address when updating sites, so that when the destination
function is too far for a direct function call, the call site is
patched with a call to the trampoline.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Link: https://patch.msgid.link/5efe0cffc38d6f69b1ec13988a99f1acff551abf.1733245362.git.christophe.leroy@csgroup.eu

authored by

Christophe Leroy and committed by
Madhavan Srinivasan
d856bc3a 65acbd12

+2 -2
+1 -1
arch/x86/kernel/static_call.c
··· 158 158 { 159 159 mutex_lock(&text_mutex); 160 160 161 - if (tramp) { 161 + if (tramp && !site) { 162 162 __static_call_validate(tramp, true, true); 163 163 __static_call_transform(tramp, __sc_insn(!func, true), func, false); 164 164 }
+1 -1
kernel/static_call_inline.c
··· 206 206 continue; 207 207 } 208 208 209 - arch_static_call_transform(site_addr, NULL, func, 209 + arch_static_call_transform(site_addr, tramp, func, 210 210 static_call_is_tail(site)); 211 211 } 212 212 }