forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-09 958e46acc8e900e8569dd467c1af9b8d2d019394
kernel/kernel/Kconfig.preempt
....@@ -1,3 +1,10 @@
1
+# SPDX-License-Identifier: GPL-2.0-only
2
+
3
+config HAVE_PREEMPT_LAZY
4
+ bool
5
+
6
+config PREEMPT_LAZY
7
+ def_bool y if HAVE_PREEMPT_LAZY && PREEMPT_RT
18
29 choice
310 prompt "Preemption Model"
....@@ -37,7 +44,7 @@
3744 config PREEMPT
3845 bool "Preemptible Kernel (Low-Latency Desktop)"
3946 depends on !ARCH_NO_PREEMPT
40
- select PREEMPT_COUNT
47
+ select PREEMPTION
4148 select UNINLINE_SPIN_UNLOCK if !ARCH_INLINE_SPIN_UNLOCK
4249 help
4350 This option reduces the latency of the kernel by making
....@@ -54,7 +61,29 @@
5461 embedded system with latency requirements in the milliseconds
5562 range.
5663
64
+config PREEMPT_RT
65
+ bool "Fully Preemptible Kernel (Real-Time)"
66
+ depends on EXPERT && ARCH_SUPPORTS_RT
67
+ select PREEMPTION
68
+ select RT_MUTEXES
69
+ help
70
+ This option turns the kernel into a real-time kernel by replacing
71
+ various locking primitives (spinlocks, rwlocks, etc.) with
72
+ preemptible priority-inheritance aware variants, enforcing
73
+ interrupt threading and introducing mechanisms to break up long
74
+ non-preemptible sections. This makes the kernel, except for very
75
+ low level and critical code paths (entry code, scheduler, low
76
+ level interrupt handling) fully preemptible and brings most
77
+ execution contexts under scheduler control.
78
+
79
+ Select this if you are building a kernel for systems which
80
+ require real-time guarantees.
81
+
5782 endchoice
5883
5984 config PREEMPT_COUNT
60
- bool
85
+ bool
86
+
87
+config PREEMPTION
88
+ bool
89
+ select PREEMPT_COUNT