Merge tag 'sched-core-2022-03-22' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6-microblaze.git] / arch / Kconfig
index cabfac2..17709ac 100644 (file)
@@ -1293,12 +1293,41 @@ config HAVE_STATIC_CALL_INLINE
 
 config HAVE_PREEMPT_DYNAMIC
        bool
+
+config HAVE_PREEMPT_DYNAMIC_CALL
+       bool
        depends on HAVE_STATIC_CALL
-       depends on GENERIC_ENTRY
+       select HAVE_PREEMPT_DYNAMIC
+       help
+          An architecture should select this if it can handle the preemption
+          model being selected at boot time using static calls.
+
+          Where an architecture selects HAVE_STATIC_CALL_INLINE, any call to a
+          preemption function will be patched directly.
+
+          Where an architecture does not select HAVE_STATIC_CALL_INLINE, any
+          call to a preemption function will go through a trampoline, and the
+          trampoline will be patched.
+
+          It is strongly advised to support inline static call to avoid any
+          overhead.
+
+config HAVE_PREEMPT_DYNAMIC_KEY
+       bool
+       depends on HAVE_ARCH_JUMP_LABEL && CC_HAS_ASM_GOTO
+       select HAVE_PREEMPT_DYNAMIC
        help
-          Select this if the architecture support boot time preempt setting
-          on top of static calls. It is strongly advised to support inline
-          static call to avoid any overhead.
+          An architecture should select this if it can handle the preemption
+          model being selected at boot time using static keys.
+
+          Each preemption function will be given an early return based on a
+          static key. This should have slightly lower overhead than non-inline
+          static calls, as this effectively inlines each trampoline into the
+          start of its callee. This may avoid redundant work, and may
+          integrate better with CFI schemes.
+
+          This will have greater overhead than using inline static calls as
+          the call to the preemption function cannot be entirely elided.
 
 config ARCH_WANT_LD_ORPHAN_WARN
        bool