]> Git Repo - linux.git/commitdiff
x86/orc: Make the is_callthunk() definition depend on CONFIG_BPF_JIT=y
authorIngo Molnar <[email protected]>
Fri, 9 Jun 2023 09:04:53 +0000 (11:04 +0200)
committerIngo Molnar <[email protected]>
Fri, 9 Jun 2023 09:09:04 +0000 (11:09 +0200)
Recent commit:

  020126239b8f Revert "x86/orc: Make it callthunk aware"

Made the only user of is_callthunk() depend on CONFIG_BPF_JIT=y, while
the definition of the helper function is unconditional.

Move is_callthunk() inside the #ifdef block.

Addresses this build failure:

   arch/x86/kernel/callthunks.c:296:13: error: ‘is_callthunk’ defined but not used [-Werror=unused-function]

Signed-off-by: Ingo Molnar <[email protected]>
Cc: Josh Poimboeuf <[email protected]>
Cc: [email protected]
Cc: Peter Zijlstra <[email protected]>
arch/x86/kernel/callthunks.c

index 8e0a9b637e23f8cb09fbc53452fdc038abaed369..fcb8eeaf65b1057d3b11e9237e6dc017c280b1ef 100644 (file)
@@ -293,6 +293,7 @@ void *callthunks_translate_call_dest(void *dest)
        return target ? : dest;
 }
 
+#ifdef CONFIG_BPF_JIT
 static bool is_callthunk(void *addr)
 {
        unsigned int tmpl_size = SKL_TMPL_SIZE;
@@ -306,7 +307,6 @@ static bool is_callthunk(void *addr)
        return !bcmp((void *)(dest - tmpl_size), tmpl, tmpl_size);
 }
 
-#ifdef CONFIG_BPF_JIT
 int x86_call_depth_emit_accounting(u8 **pprog, void *func)
 {
        unsigned int tmpl_size = SKL_TMPL_SIZE;
This page took 0.070105 seconds and 4 git commands to generate.