timekeeping: remove arch_gettimeoffset
[linux-2.6-microblaze.git] / kernel / time / Kconfig
1 # SPDX-License-Identifier: GPL-2.0-only
2 #
3 # Timer subsystem related configuration options
4 #
5
6 # Options selectable by arch Kconfig
7
8 # Watchdog function for clocksources to detect instabilities
9 config CLOCKSOURCE_WATCHDOG
10         bool
11
12 # Architecture has extra clocksource data
13 config ARCH_CLOCKSOURCE_DATA
14         bool
15
16 # Architecture has extra clocksource init called from registration
17 config ARCH_CLOCKSOURCE_INIT
18         bool
19
20 # Clocksources require validation of the clocksource against the last
21 # cycle update - x86/TSC misfeature
22 config CLOCKSOURCE_VALIDATE_LAST_CYCLE
23         bool
24
25 # Timekeeping vsyscall support
26 config GENERIC_TIME_VSYSCALL
27         bool
28
29 # The generic clock events infrastructure
30 config GENERIC_CLOCKEVENTS
31         bool
32
33 # Architecture can handle broadcast in a driver-agnostic way
34 config ARCH_HAS_TICK_BROADCAST
35         bool
36
37 # Clockevents broadcasting infrastructure
38 config GENERIC_CLOCKEVENTS_BROADCAST
39         bool
40         depends on GENERIC_CLOCKEVENTS
41
42 # Automatically adjust the min. reprogramming time for
43 # clock event device
44 config GENERIC_CLOCKEVENTS_MIN_ADJUST
45         bool
46
47 # Generic update of CMOS clock
48 config GENERIC_CMOS_UPDATE
49         bool
50
51 # Select to handle posix CPU timers from task_work
52 # and not from the timer interrupt context
53 config HAVE_POSIX_CPU_TIMERS_TASK_WORK
54         bool
55
56 config POSIX_CPU_TIMERS_TASK_WORK
57         bool
58         default y if POSIX_TIMERS && HAVE_POSIX_CPU_TIMERS_TASK_WORK
59
60 if GENERIC_CLOCKEVENTS
61 menu "Timers subsystem"
62
63 # Core internal switch. Selected by NO_HZ_COMMON / HIGH_RES_TIMERS. This is
64 # only related to the tick functionality. Oneshot clockevent devices
65 # are supported independent of this.
66 config TICK_ONESHOT
67         bool
68
69 config NO_HZ_COMMON
70         bool
71         select TICK_ONESHOT
72
73 choice
74         prompt "Timer tick handling"
75         default NO_HZ_IDLE if NO_HZ
76
77 config HZ_PERIODIC
78         bool "Periodic timer ticks (constant rate, no dynticks)"
79         help
80           This option keeps the tick running periodically at a constant
81           rate, even when the CPU doesn't need it.
82
83 config NO_HZ_IDLE
84         bool "Idle dynticks system (tickless idle)"
85         select NO_HZ_COMMON
86         help
87           This option enables a tickless idle system: timer interrupts
88           will only trigger on an as-needed basis when the system is idle.
89           This is usually interesting for energy saving.
90
91           Most of the time you want to say Y here.
92
93 config NO_HZ_FULL
94         bool "Full dynticks system (tickless)"
95         # NO_HZ_COMMON dependency
96         # We need at least one periodic CPU for timekeeping
97         depends on SMP
98         depends on HAVE_CONTEXT_TRACKING
99         # VIRT_CPU_ACCOUNTING_GEN dependency
100         depends on HAVE_VIRT_CPU_ACCOUNTING_GEN
101         select NO_HZ_COMMON
102         select RCU_NOCB_CPU
103         select VIRT_CPU_ACCOUNTING_GEN
104         select IRQ_WORK
105         select CPU_ISOLATION
106         help
107          Adaptively try to shutdown the tick whenever possible, even when
108          the CPU is running tasks. Typically this requires running a single
109          task on the CPU. Chances for running tickless are maximized when
110          the task mostly runs in userspace and has few kernel activity.
111
112          You need to fill up the nohz_full boot parameter with the
113          desired range of dynticks CPUs.
114
115          This is implemented at the expense of some overhead in user <-> kernel
116          transitions: syscalls, exceptions and interrupts. Even when it's
117          dynamically off.
118
119          Say N.
120
121 endchoice
122
123 config CONTEXT_TRACKING
124        bool
125
126 config CONTEXT_TRACKING_FORCE
127         bool "Force context tracking"
128         depends on CONTEXT_TRACKING
129         default y if !NO_HZ_FULL
130         help
131           The major pre-requirement for full dynticks to work is to
132           support the context tracking subsystem. But there are also
133           other dependencies to provide in order to make the full
134           dynticks working.
135
136           This option stands for testing when an arch implements the
137           context tracking backend but doesn't yet fullfill all the
138           requirements to make the full dynticks feature working.
139           Without the full dynticks, there is no way to test the support
140           for context tracking and the subsystems that rely on it: RCU
141           userspace extended quiescent state and tickless cputime
142           accounting. This option copes with the absence of the full
143           dynticks subsystem by forcing the context tracking on all
144           CPUs in the system.
145
146           Say Y only if you're working on the development of an
147           architecture backend for the context tracking.
148
149           Say N otherwise, this option brings an overhead that you
150           don't want in production.
151
152 config NO_HZ
153         bool "Old Idle dynticks config"
154         help
155           This is the old config entry that enables dynticks idle.
156           We keep it around for a little while to enforce backward
157           compatibility with older config files.
158
159 config HIGH_RES_TIMERS
160         bool "High Resolution Timer Support"
161         select TICK_ONESHOT
162         help
163           This option enables high resolution timer support. If your
164           hardware is not capable then this option only increases
165           the size of the kernel image.
166
167 endmenu
168 endif