hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/kernel/Kconfig.preempt
....@@ -1,3 +1,4 @@
1
+# SPDX-License-Identifier: GPL-2.0-only
12
23 choice
34 prompt "Preemption Model"
....@@ -37,7 +38,7 @@
3738 config PREEMPT
3839 bool "Preemptible Kernel (Low-Latency Desktop)"
3940 depends on !ARCH_NO_PREEMPT
40
- select PREEMPT_COUNT
41
+ select PREEMPTION
4142 select UNINLINE_SPIN_UNLOCK if !ARCH_INLINE_SPIN_UNLOCK
4243 help
4344 This option reduces the latency of the kernel by making
....@@ -54,7 +55,28 @@
5455 embedded system with latency requirements in the milliseconds
5556 range.
5657
58
+config PREEMPT_RT
59
+ bool "Fully Preemptible Kernel (Real-Time)"
60
+ depends on EXPERT && ARCH_SUPPORTS_RT
61
+ select PREEMPTION
62
+ help
63
+ This option turns the kernel into a real-time kernel by replacing
64
+ various locking primitives (spinlocks, rwlocks, etc.) with
65
+ preemptible priority-inheritance aware variants, enforcing
66
+ interrupt threading and introducing mechanisms to break up long
67
+ non-preemptible sections. This makes the kernel, except for very
68
+ low level and critical code paths (entry code, scheduler, low
69
+ level interrupt handling) fully preemptible and brings most
70
+ execution contexts under scheduler control.
71
+
72
+ Select this if you are building a kernel for systems which
73
+ require real-time guarantees.
74
+
5775 endchoice
5876
5977 config PREEMPT_COUNT
60
- bool
78
+ bool
79
+
80
+config PREEMPTION
81
+ bool
82
+ select PREEMPT_COUNT