]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
x86/callthunks: Mark apply_relocation() as __init_or_module
authorIngo Molnar <mingo@kernel.org>
Thu, 30 Nov 2023 19:15:51 +0000 (20:15 +0100)
committerIngo Molnar <mingo@kernel.org>
Thu, 30 Nov 2023 19:15:51 +0000 (20:15 +0100)
Do it like the rest of the methods using it.

Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Uros Bizjak <ubizjak@gmail.com>
Link: https://lore.kernel.org/r/20231105213731.1878100-3-ubizjak@gmail.com
arch/x86/include/asm/text-patching.h
arch/x86/kernel/alternative.c

index ba8d900f3ebee5234cc6085b804e738d3455b4c4..fb338f00d38343bc7bc1c380245756ba75fc53b4 100644 (file)
@@ -18,7 +18,7 @@ static inline void apply_paravirt(struct paravirt_patch_site *start,
 #define __parainstructions_end NULL
 #endif
 
-void apply_relocation(u8 *buf, size_t len, u8 *dest, u8 *src, size_t src_len);
+extern void apply_relocation(u8 *buf, size_t len, u8 *dest, u8 *src, size_t src_len);
 
 /*
  * Currently, the max observed size in the kernel code is
index aa864157f57ea1648795d05c18df644f6fc24070..50523713989b2f4c14c738fa8203290bbf28df4a 100644 (file)
@@ -325,7 +325,7 @@ bool need_reloc(unsigned long offset, u8 *src, size_t src_len)
        return (target < src || target > src + src_len);
 }
 
-void apply_relocation(u8 *buf, size_t len, u8 *dest, u8 *src, size_t src_len)
+void __init_or_module apply_relocation(u8 *buf, size_t len, u8 *dest, u8 *src, size_t src_len)
 {
        int prev, target = 0;