Commit edd04dc2 authored by Yu Liao's avatar Yu Liao
Browse files

timekeeping: Make CLOCKSOURCE_VALIDATE_LAST_CYCLE configurable

hulk inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I8QEV8


CVE: NA

-------------------------------

Currently, only x86 architecture supports the CLOCKSOURCE_VALIDATE_LAST_CYCLE
option. This option ensures that the timestamps returned by the clocksource are
monotonically increasing, and helps avoid issues caused by hardware failures.

This commit makes CLOCKSOURCE_VALIDATE_LAST_CYCLE configurable on
the arm64 architecture, helps increase system stability and reliability.

Signed-off-by: default avatarYu Liao <liaoyu15@huawei.com>
parent 6d225089
Loading
Loading
Loading
Loading
+8 −5
Original line number Diff line number Diff line
@@ -17,11 +17,6 @@ config ARCH_CLOCKSOURCE_DATA
config ARCH_CLOCKSOURCE_INIT
	bool

# Clocksources require validation of the clocksource against the last
# cycle update - x86/TSC misfeature
config CLOCKSOURCE_VALIDATE_LAST_CYCLE
	bool

# Timekeeping vsyscall support
config GENERIC_TIME_VSYSCALL
	bool
@@ -209,5 +204,13 @@ config CLOCKSOURCE_WATCHDOG_MAX_SKEW_US
	  per million.	If the clocksource is good enough for NTP,
	  it is good enough for the clocksource watchdog!

# Clocksources require validation of the clocksource against the last
# cycle update - x86/TSC misfeature
config CLOCKSOURCE_VALIDATE_LAST_CYCLE
	bool "Validate last cycle of clocksource"
	help
	  Enable this option to validate the last cycle to prevent issues
	  caused by clocksource going backwards.

endmenu
endif