signal, x86: Delay calling signals in atomic on RT enabled kernels
[sfrench/cifs-2.6.git] / kernel / Kconfig.preempt
index 60f1bfc3c7b246df3b6fc9d0381e6802471a59ed..5644abd5f8a8d3e72030799562e500fa97de6480 100644 (file)
@@ -1,12 +1,23 @@
 # SPDX-License-Identifier: GPL-2.0-only
 
+config PREEMPT_NONE_BUILD
+       bool
+
+config PREEMPT_VOLUNTARY_BUILD
+       bool
+
+config PREEMPT_BUILD
+       bool
+       select PREEMPTION
+       select UNINLINE_SPIN_UNLOCK if !ARCH_INLINE_SPIN_UNLOCK
+
 choice
        prompt "Preemption Model"
-       default PREEMPT_NONE_BEHAVIOUR
+       default PREEMPT_NONE
 
-config PREEMPT_NONE_BEHAVIOUR
+config PREEMPT_NONE
        bool "No Forced Preemption (Server)"
-       select PREEMPT_NONE if !PREEMPT_DYNAMIC
+       select PREEMPT_NONE_BUILD if !PREEMPT_DYNAMIC
        help
          This is the traditional Linux preemption model, geared towards
          throughput. It will still provide good latencies most of the
@@ -18,10 +29,10 @@ config PREEMPT_NONE_BEHAVIOUR
          raw processing power of the kernel, irrespective of scheduling
          latencies.
 
-config PREEMPT_VOLUNTARY_BEHAVIOUR
+config PREEMPT_VOLUNTARY
        bool "Voluntary Kernel Preemption (Desktop)"
        depends on !ARCH_NO_PREEMPT
-       select PREEMPT_VOLUNTARY if !PREEMPT_DYNAMIC
+       select PREEMPT_VOLUNTARY_BUILD if !PREEMPT_DYNAMIC
        help
          This option reduces the latency of the kernel by adding more
          "explicit preemption points" to the kernel code. These new
@@ -37,10 +48,10 @@ config PREEMPT_VOLUNTARY_BEHAVIOUR
 
          Select this if you are building a kernel for a desktop system.
 
-config PREEMPT_BEHAVIOUR
+config PREEMPT
        bool "Preemptible Kernel (Low-Latency Desktop)"
        depends on !ARCH_NO_PREEMPT
-       select PREEMPT
+       select PREEMPT_BUILD
        help
          This option reduces the latency of the kernel by making
          all kernel code (that is not executing in a critical section)
@@ -58,7 +69,7 @@ config PREEMPT_BEHAVIOUR
 
 config PREEMPT_RT
        bool "Fully Preemptible Kernel (Real-Time)"
-       depends on EXPERT && ARCH_SUPPORTS_RT && !PREEMPT_DYNAMIC
+       depends on EXPERT && ARCH_SUPPORTS_RT
        select PREEMPTION
        help
          This option turns the kernel into a real-time kernel by replacing
@@ -75,17 +86,6 @@ config PREEMPT_RT
 
 endchoice
 
-config PREEMPT_NONE
-       bool
-
-config PREEMPT_VOLUNTARY
-       bool
-
-config PREEMPT
-       bool
-       select PREEMPTION
-       select UNINLINE_SPIN_UNLOCK if !ARCH_INLINE_SPIN_UNLOCK
-
 config PREEMPT_COUNT
        bool
 
@@ -95,8 +95,8 @@ config PREEMPTION
 
 config PREEMPT_DYNAMIC
        bool "Preemption behaviour defined on boot"
-       depends on HAVE_PREEMPT_DYNAMIC
-       select PREEMPT
+       depends on HAVE_PREEMPT_DYNAMIC && !PREEMPT_RT
+       select PREEMPT_BUILD
        default y
        help
          This option allows to define the preemption model on the kernel
@@ -132,4 +132,14 @@ config SCHED_CORE
          which is the likely usage by Linux distributions, there should
          be no measurable impact on performance.
 
-
+config ARCH_WANTS_RT_DELAYED_SIGNALS
+       bool
+       help
+         This option is selected by architectures where raising signals
+         can happen in atomic contexts on PREEMPT_RT enabled kernels. This
+         option delays raising the signal until the return to user space
+         loop where it is also delivered. X86 requires this to deliver
+         signals from trap handlers which run on IST stacks.
+
+config RT_DELAYED_SIGNALS
+       def_bool PREEMPT_RT && ARCH_WANTS_RT_DELAYED_SIGNALS