diff options
author | Jiaxun Yang <jiaxun.yang@flygoat.com> | 2024-06-12 10:54:29 +0200 |
---|---|---|
committer | Thomas Bogendoerfer <tsbogend@alpha.franken.de> | 2024-07-03 16:45:25 +0200 |
commit | 7190401fc56fb5f02ee3d04476778ab000bbaf32 (patch) | |
tree | b7c33784e4b8becbb027f734a120c16bc8dde999 /arch/mips/kernel | |
parent | MIPS: csrc-r4k: Refine rating computation (diff) | |
download | linux-7190401fc56fb5f02ee3d04476778ab000bbaf32.tar.xz linux-7190401fc56fb5f02ee3d04476778ab000bbaf32.zip |
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 <jiaxun.yang@flygoat.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Diffstat (limited to 'arch/mips/kernel')
-rw-r--r-- | arch/mips/kernel/csrc-r4k.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/mips/kernel/csrc-r4k.c b/arch/mips/kernel/csrc-r4k.c index f02ae333f4f9..055747a7417d 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) |