From: Jiaxun Yang Date: Wed, 12 Jun 2024 08:54:29 +0000 (+0100) Subject: MIPS: csrc-r4k: Apply verification clocksource flags X-Git-Tag: v6.11-rc1~95^2~25 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7190401fc56fb5f02ee3d04476778ab000bbaf32;p=thirdparty%2Fkernel%2Flinux.git MIPS: csrc-r4k: Apply verification clocksource flags CP0 counter suffers from various problems like SMP sync, behaviour on wait. Set CLOCK_SOURCE_MUST_VERIFY and CLOCK_SOURCE_VERIFY_PERCPU, as what x86 did to TSC, to let kernel test it before use. Signed-off-by: Jiaxun Yang Signed-off-by: Thomas Bogendoerfer --- diff --git a/arch/mips/kernel/csrc-r4k.c b/arch/mips/kernel/csrc-r4k.c index f02ae333f4f95..055747a7417d6 100644 --- a/arch/mips/kernel/csrc-r4k.c +++ b/arch/mips/kernel/csrc-r4k.c @@ -21,7 +21,9 @@ static struct clocksource clocksource_mips = { .name = "MIPS", .read = c0_hpt_read, .mask = CLOCKSOURCE_MASK(32), - .flags = CLOCK_SOURCE_IS_CONTINUOUS, + .flags = CLOCK_SOURCE_IS_CONTINUOUS | + CLOCK_SOURCE_MUST_VERIFY | + CLOCK_SOURCE_VERIFY_PERCPU, }; static u64 __maybe_unused notrace r4k_read_sched_clock(void)