Skip to content

Commit d01daf9

Browse files
committed
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Kees Cook <[email protected]>
1 parent 645d1b6 commit d01daf9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/mips/include/asm/time.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ static inline int mips_clockevent_init(void)
5555
*/
5656
extern int init_r4k_clocksource(void);
5757

58-
static inline int init_mips_clocksource(void)
58+
static inline __init int init_mips_clocksource(void)
5959
{
6060
#ifdef CONFIG_CSRC_R4K
6161
return init_r4k_clocksource();

0 commit comments

Comments
 (0)