]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
riscv: Use generic TIF bits
authorThomas Gleixner <tglx@linutronix.de>
Mon, 8 Sep 2025 21:32:38 +0000 (23:32 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Wed, 17 Sep 2025 06:14:05 +0000 (08:14 +0200)
No point in defining generic items and the upcoming RSEQ optimizations are
only available with this _and_ the generic entry infrastructure, which is
already used by RISCV. So no further action required here.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
arch/riscv/Kconfig
arch/riscv/include/asm/thread_info.h

index 51dcd8eaa24356d947ebe0f1c4a701a3cfc6b757..0c280614a2847821de38f7546fab6b4167ccece1 100644 (file)
@@ -161,6 +161,7 @@ config RISCV
        select HAVE_FUNCTION_GRAPH_FREGS
        select HAVE_FUNCTION_TRACER if !XIP_KERNEL && HAVE_DYNAMIC_FTRACE
        select HAVE_EBPF_JIT if MMU
+       select HAVE_GENERIC_TIF_BITS
        select HAVE_GUP_FAST if MMU
        select HAVE_FUNCTION_ARG_ACCESS_API
        select HAVE_FUNCTION_ERROR_INJECTION
index f5916a70879a87d9356bb755ca78b4d2e7f65f6e..a315b0261b9d7b7eda7ec3275a891dfa9544fb2d 100644 (file)
@@ -107,23 +107,18 @@ int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src);
  * - pending work-to-be-done flags are in lowest half-word
  * - other flags in upper half-word(s)
  */
-#define TIF_NEED_RESCHED       0       /* rescheduling necessary */
-#define TIF_NEED_RESCHED_LAZY  1       /* Lazy rescheduling needed */
-#define TIF_NOTIFY_RESUME      2       /* callback before returning to user */
-#define TIF_SIGPENDING         3       /* signal pending */
-#define TIF_RESTORE_SIGMASK    4       /* restore signal mask in do_signal() */
-#define TIF_MEMDIE             5       /* is terminating due to OOM killer */
-#define TIF_NOTIFY_SIGNAL      9       /* signal notifications exist */
-#define TIF_UPROBE             10      /* uprobe breakpoint or singlestep */
-#define TIF_32BIT              11      /* compat-mode 32bit process */
-#define TIF_RISCV_V_DEFER_RESTORE      12 /* restore Vector before returing to user */
-
-#define _TIF_NEED_RESCHED      (1 << TIF_NEED_RESCHED)
-#define _TIF_NEED_RESCHED_LAZY (1 << TIF_NEED_RESCHED_LAZY)
-#define _TIF_NOTIFY_RESUME     (1 << TIF_NOTIFY_RESUME)
-#define _TIF_SIGPENDING                (1 << TIF_SIGPENDING)
-#define _TIF_NOTIFY_SIGNAL     (1 << TIF_NOTIFY_SIGNAL)
-#define _TIF_UPROBE            (1 << TIF_UPROBE)
-#define _TIF_RISCV_V_DEFER_RESTORE     (1 << TIF_RISCV_V_DEFER_RESTORE)
+
+/*
+ * Tell the generic TIF infrastructure which bits riscv supports
+ */
+#define HAVE_TIF_NEED_RESCHED_LAZY
+#define HAVE_TIF_RESTORE_SIGMASK
+
+#include <asm-generic/thread_info_tif.h>
+
+#define TIF_32BIT                      16      /* compat-mode 32bit process */
+#define TIF_RISCV_V_DEFER_RESTORE      17      /* restore Vector before returing to user */
+
+#define _TIF_RISCV_V_DEFER_RESTORE     BIT(TIF_RISCV_V_DEFER_RESTORE)
 
 #endif /* _ASM_RISCV_THREAD_INFO_H */