Skip to content

Commit 7190401

Browse files
FlyGoattsbogend
authored andcommitted
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 <[email protected]> Signed-off-by: Thomas Bogendoerfer <[email protected]>
1 parent c171186 commit 7190401

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

arch/mips/kernel/csrc-r4k.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ static struct clocksource clocksource_mips = {
2121
.name = "MIPS",
2222
.read = c0_hpt_read,
2323
.mask = CLOCKSOURCE_MASK(32),
24-
.flags = CLOCK_SOURCE_IS_CONTINUOUS,
24+
.flags = CLOCK_SOURCE_IS_CONTINUOUS |
25+
CLOCK_SOURCE_MUST_VERIFY |
26+
CLOCK_SOURCE_VERIFY_PERCPU,
2527
};
2628

2729
static u64 __maybe_unused notrace r4k_read_sched_clock(void)

0 commit comments

Comments
 (0)