From: Kees Cook Date: Thu, 17 Jul 2025 23:25:14 +0000 (-0700) Subject: mips: Handle KCOV __init vs inline mismatch X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d01daf9d95c9918bd11f990e807517f214a83ea2;p=thirdparty%2Flinux.git 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 Link: https://lore.kernel.org/r/20250717232519.2984886-9-kees@kernel.org Signed-off-by: Kees Cook --- diff --git a/arch/mips/include/asm/time.h b/arch/mips/include/asm/time.h index e855a3611d922..5e7193b759f33 100644 --- a/arch/mips/include/asm/time.h +++ b/arch/mips/include/asm/time.h @@ -55,7 +55,7 @@ static inline int mips_clockevent_init(void) */ extern int init_r4k_clocksource(void); -static inline int init_mips_clocksource(void) +static inline __init int init_mips_clocksource(void) { #ifdef CONFIG_CSRC_R4K return init_r4k_clocksource();