xref: /openbmc/linux/kernel/time/Kconfig (revision 1fb497dd)
1ec8f24b7SThomas Gleixner# SPDX-License-Identifier: GPL-2.0-only
279bf2bb3SThomas Gleixner#
379bf2bb3SThomas Gleixner# Timer subsystem related configuration options
479bf2bb3SThomas Gleixner#
53872c48bSThomas Gleixner
6b5e498adSThomas Gleixner# Options selectable by arch Kconfig
7b5e498adSThomas Gleixner
8b5e498adSThomas Gleixner# Watchdog function for clocksources to detect instabilities
9b5e498adSThomas Gleixnerconfig CLOCKSOURCE_WATCHDOG
10b5e498adSThomas Gleixner	bool
11b5e498adSThomas Gleixner
12b5e498adSThomas Gleixner# Architecture has extra clocksource data
13b5e498adSThomas Gleixnerconfig ARCH_CLOCKSOURCE_DATA
14b5e498adSThomas Gleixner	bool
15b5e498adSThomas Gleixner
16d67f34c1SThomas Gleixner# Architecture has extra clocksource init called from registration
17d67f34c1SThomas Gleixnerconfig ARCH_CLOCKSOURCE_INIT
18d67f34c1SThomas Gleixner	bool
19d67f34c1SThomas Gleixner
2009ec5442SThomas Gleixner# Clocksources require validation of the clocksource against the last
2109ec5442SThomas Gleixner# cycle update - x86/TSC misfeature
2209ec5442SThomas Gleixnerconfig CLOCKSOURCE_VALIDATE_LAST_CYCLE
2309ec5442SThomas Gleixner	bool
2409ec5442SThomas Gleixner
25b5e498adSThomas Gleixner# Timekeeping vsyscall support
26576094b7SJohn Stultzconfig GENERIC_TIME_VSYSCALL
27576094b7SJohn Stultz	bool
28576094b7SJohn Stultz
29b5e498adSThomas Gleixner# Old style timekeeping
30b5e498adSThomas Gleixnerconfig ARCH_USES_GETTIMEOFFSET
31b5e498adSThomas Gleixner	bool
32b5e498adSThomas Gleixner
33b5e498adSThomas Gleixner# The generic clock events infrastructure
34b5e498adSThomas Gleixnerconfig GENERIC_CLOCKEVENTS
35b5e498adSThomas Gleixner	bool
36b5e498adSThomas Gleixner
3712ad1000SMark Rutland# Architecture can handle broadcast in a driver-agnostic way
3812ad1000SMark Rutlandconfig ARCH_HAS_TICK_BROADCAST
3912ad1000SMark Rutland	bool
4012ad1000SMark Rutland
41b5e498adSThomas Gleixner# Clockevents broadcasting infrastructure
42b5e498adSThomas Gleixnerconfig GENERIC_CLOCKEVENTS_BROADCAST
43b5e498adSThomas Gleixner	bool
44b5e498adSThomas Gleixner	depends on GENERIC_CLOCKEVENTS
45b5e498adSThomas Gleixner
46764e0da1SThomas Gleixner# Automatically adjust the min. reprogramming time for
47764e0da1SThomas Gleixner# clock event device
48764e0da1SThomas Gleixnerconfig GENERIC_CLOCKEVENTS_MIN_ADJUST
49764e0da1SThomas Gleixner	bool
50764e0da1SThomas Gleixner
51b5e498adSThomas Gleixner# Generic update of CMOS clock
52b5e498adSThomas Gleixnerconfig GENERIC_CMOS_UPDATE
53b5e498adSThomas Gleixner	bool
54764e0da1SThomas Gleixner
551fb497ddSThomas Gleixner# Select to handle posix CPU timers from task_work
561fb497ddSThomas Gleixner# and not from the timer interrupt context
571fb497ddSThomas Gleixnerconfig HAVE_POSIX_CPU_TIMERS_TASK_WORK
581fb497ddSThomas Gleixner	bool
591fb497ddSThomas Gleixner
601fb497ddSThomas Gleixnerconfig POSIX_CPU_TIMERS_TASK_WORK
611fb497ddSThomas Gleixner	bool
621fb497ddSThomas Gleixner	default y if POSIX_TIMERS && HAVE_POSIX_CPU_TIMERS_TASK_WORK
631fb497ddSThomas Gleixner
64764e0da1SThomas Gleixnerif GENERIC_CLOCKEVENTS
65764e0da1SThomas Gleixnermenu "Timers subsystem"
66764e0da1SThomas Gleixner
673451d024SFrederic Weisbecker# Core internal switch. Selected by NO_HZ_COMMON / HIGH_RES_TIMERS. This is
68764e0da1SThomas Gleixner# only related to the tick functionality. Oneshot clockevent devices
696082a6e4SRandy Dunlap# are supported independent of this.
70764e0da1SThomas Gleixnerconfig TICK_ONESHOT
71764e0da1SThomas Gleixner	bool
72764e0da1SThomas Gleixner
733451d024SFrederic Weisbeckerconfig NO_HZ_COMMON
743451d024SFrederic Weisbecker	bool
753451d024SFrederic Weisbecker	depends on !ARCH_USES_GETTIMEOFFSET && GENERIC_CLOCKEVENTS
763451d024SFrederic Weisbecker	select TICK_ONESHOT
773451d024SFrederic Weisbecker
783ca277e4SFrederic Weisbeckerchoice
793ca277e4SFrederic Weisbecker	prompt "Timer tick handling"
803ca277e4SFrederic Weisbecker	default NO_HZ_IDLE if NO_HZ
813ca277e4SFrederic Weisbecker
825b533f4fSFrederic Weisbeckerconfig HZ_PERIODIC
833ca277e4SFrederic Weisbecker	bool "Periodic timer ticks (constant rate, no dynticks)"
843ca277e4SFrederic Weisbecker	help
853ca277e4SFrederic Weisbecker	  This option keeps the tick running periodically at a constant
863ca277e4SFrederic Weisbecker	  rate, even when the CPU doesn't need it.
873ca277e4SFrederic Weisbecker
883ca277e4SFrederic Weisbeckerconfig NO_HZ_IDLE
893ca277e4SFrederic Weisbecker	bool "Idle dynticks system (tickless idle)"
90764e0da1SThomas Gleixner	depends on !ARCH_USES_GETTIMEOFFSET && GENERIC_CLOCKEVENTS
913451d024SFrederic Weisbecker	select NO_HZ_COMMON
92764e0da1SThomas Gleixner	help
933ca277e4SFrederic Weisbecker	  This option enables a tickless idle system: timer interrupts
943ca277e4SFrederic Weisbecker	  will only trigger on an as-needed basis when the system is idle.
953ca277e4SFrederic Weisbecker	  This is usually interesting for energy saving.
963ca277e4SFrederic Weisbecker
973ca277e4SFrederic Weisbecker	  Most of the time you want to say Y here.
98764e0da1SThomas Gleixner
99c5bfece2SFrederic Weisbeckerconfig NO_HZ_FULL
100fae30dd6SFrederic Weisbecker	bool "Full dynticks system (tickless)"
1013451d024SFrederic Weisbecker	# NO_HZ_COMMON dependency
102ab71d36dSFrederic Weisbecker	depends on !ARCH_USES_GETTIMEOFFSET && GENERIC_CLOCKEVENTS
103fae30dd6SFrederic Weisbecker	# We need at least one periodic CPU for timekeeping
104fae30dd6SFrederic Weisbecker	depends on SMP
105fae30dd6SFrederic Weisbecker	depends on HAVE_CONTEXT_TRACKING
106c58b0df1SFrederic Weisbecker	# VIRT_CPU_ACCOUNTING_GEN dependency
107554b0004SKevin Hilman	depends on HAVE_VIRT_CPU_ACCOUNTING_GEN
1083451d024SFrederic Weisbecker	select NO_HZ_COMMON
109ab71d36dSFrederic Weisbecker	select RCU_NOCB_CPU
110c58b0df1SFrederic Weisbecker	select VIRT_CPU_ACCOUNTING_GEN
11176c24fb0SFrederic Weisbecker	select IRQ_WORK
112bf29cb23SPaul E. McKenney	select CPU_ISOLATION
113a831881bSFrederic Weisbecker	help
114a831881bSFrederic Weisbecker	 Adaptively try to shutdown the tick whenever possible, even when
115a831881bSFrederic Weisbecker	 the CPU is running tasks. Typically this requires running a single
116a831881bSFrederic Weisbecker	 task on the CPU. Chances for running tickless are maximized when
117a831881bSFrederic Weisbecker	 the task mostly runs in userspace and has few kernel activity.
118a831881bSFrederic Weisbecker
119c5bfece2SFrederic Weisbecker	 You need to fill up the nohz_full boot parameter with the
120a831881bSFrederic Weisbecker	 desired range of dynticks CPUs.
121a831881bSFrederic Weisbecker
122a831881bSFrederic Weisbecker	 This is implemented at the expense of some overhead in user <-> kernel
123a831881bSFrederic Weisbecker	 transitions: syscalls, exceptions and interrupts. Even when it's
124a831881bSFrederic Weisbecker	 dynamically off.
125a831881bSFrederic Weisbecker
126a831881bSFrederic Weisbecker	 Say N.
127a831881bSFrederic Weisbecker
1283ca277e4SFrederic Weisbeckerendchoice
1293ca277e4SFrederic Weisbecker
130a4cffdadSPaul E. McKenneyconfig CONTEXT_TRACKING
131a4cffdadSPaul E. McKenney       bool
132a4cffdadSPaul E. McKenney
133a4cffdadSPaul E. McKenneyconfig CONTEXT_TRACKING_FORCE
134a4cffdadSPaul E. McKenney	bool "Force context tracking"
135a4cffdadSPaul E. McKenney	depends on CONTEXT_TRACKING
136a4cffdadSPaul E. McKenney	default y if !NO_HZ_FULL
137a4cffdadSPaul E. McKenney	help
138a4cffdadSPaul E. McKenney	  The major pre-requirement for full dynticks to work is to
139a4cffdadSPaul E. McKenney	  support the context tracking subsystem. But there are also
140a4cffdadSPaul E. McKenney	  other dependencies to provide in order to make the full
141a4cffdadSPaul E. McKenney	  dynticks working.
142a4cffdadSPaul E. McKenney
143a4cffdadSPaul E. McKenney	  This option stands for testing when an arch implements the
144a4cffdadSPaul E. McKenney	  context tracking backend but doesn't yet fullfill all the
145a4cffdadSPaul E. McKenney	  requirements to make the full dynticks feature working.
146a4cffdadSPaul E. McKenney	  Without the full dynticks, there is no way to test the support
147a4cffdadSPaul E. McKenney	  for context tracking and the subsystems that rely on it: RCU
148a4cffdadSPaul E. McKenney	  userspace extended quiescent state and tickless cputime
149a4cffdadSPaul E. McKenney	  accounting. This option copes with the absence of the full
150a4cffdadSPaul E. McKenney	  dynticks subsystem by forcing the context tracking on all
151a4cffdadSPaul E. McKenney	  CPUs in the system.
152a4cffdadSPaul E. McKenney
153a4cffdadSPaul E. McKenney	  Say Y only if you're working on the development of an
154a4cffdadSPaul E. McKenney	  architecture backend for the context tracking.
155a4cffdadSPaul E. McKenney
156a4cffdadSPaul E. McKenney	  Say N otherwise, this option brings an overhead that you
157a4cffdadSPaul E. McKenney	  don't want in production.
158a4cffdadSPaul E. McKenney
1590644ca5cSFrederic Weisbeckerconfig NO_HZ
1600644ca5cSFrederic Weisbecker	bool "Old Idle dynticks config"
1610644ca5cSFrederic Weisbecker	depends on !ARCH_USES_GETTIMEOFFSET && GENERIC_CLOCKEVENTS
1620644ca5cSFrederic Weisbecker	help
1630644ca5cSFrederic Weisbecker	  This is the old config entry that enables dynticks idle.
1640644ca5cSFrederic Weisbecker	  We keep it around for a little while to enforce backward
1650644ca5cSFrederic Weisbecker	  compatibility with older config files.
1660644ca5cSFrederic Weisbecker
167764e0da1SThomas Gleixnerconfig HIGH_RES_TIMERS
168764e0da1SThomas Gleixner	bool "High Resolution Timer Support"
169764e0da1SThomas Gleixner	depends on !ARCH_USES_GETTIMEOFFSET && GENERIC_CLOCKEVENTS
170764e0da1SThomas Gleixner	select TICK_ONESHOT
171764e0da1SThomas Gleixner	help
172764e0da1SThomas Gleixner	  This option enables high resolution timer support. If your
173764e0da1SThomas Gleixner	  hardware is not capable then this option only increases
174764e0da1SThomas Gleixner	  the size of the kernel image.
175764e0da1SThomas Gleixner
176764e0da1SThomas Gleixnerendmenu
177764e0da1SThomas Gleixnerendif
178