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

mips: Handle KCOV __init vs inline mismatch

When KCOV is enabled all functions get instrumented, unless
the __no_sanitize_coverage attribute is used. To prepare for
__no_sanitize_coverage being applied to __init functions, we
have to handle differences in how GCC's inline optimizations get
resolved. For mips this requires adding the __init annotation on
init_mips_clocksource().

Reviewed-by: Huacai Chen <chenhuacai@loongson.cn>
Link: https://lore.kernel.org/r/20250717232519.2984886-9-kees@kernel.org
Signed-off-by: Kees Cook <kees@kernel.org>

Kees Cook d01daf9d 645d1b66

+1 -1
+1 -1
arch/mips/include/asm/time.h
··· 55 55 */ 56 56 extern int init_r4k_clocksource(void); 57 57 58 - static inline int init_mips_clocksource(void) 58 + static inline __init int init_mips_clocksource(void) 59 59 { 60 60 #ifdef CONFIG_CSRC_R4K 61 61 return init_r4k_clocksource();