powerpc: add support for TIF_NOTIFY_SIGNAL
authorJens Axboe <axboe@kernel.dk>
Fri, 23 Oct 2020 02:11:56 +0000 (20:11 -0600)
committerJens Axboe <axboe@kernel.dk>
Mon, 9 Nov 2020 15:16:55 +0000 (08:16 -0700)
Wire up TIF_NOTIFY_SIGNAL handling for powerpc.

Cc: linuxppc-dev@lists.ozlabs.org
Acked-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
arch/powerpc/include/asm/thread_info.h
arch/powerpc/kernel/signal.c

index 46a210b..53115ae 100644 (file)
@@ -90,6 +90,7 @@ void arch_setup_new_exec(void);
 #define TIF_SYSCALL_TRACE      0       /* syscall trace active */
 #define TIF_SIGPENDING         1       /* signal pending */
 #define TIF_NEED_RESCHED       2       /* rescheduling necessary */
+#define TIF_NOTIFY_SIGNAL      3       /* signal notifications exist */
 #define TIF_SYSCALL_EMU                4       /* syscall emulation active */
 #define TIF_RESTORE_TM         5       /* need to restore TM FP/VEC/VSX */
 #define TIF_PATCH_PENDING      6       /* pending live patching update */
@@ -115,6 +116,7 @@ void arch_setup_new_exec(void);
 #define _TIF_SYSCALL_TRACE     (1<<TIF_SYSCALL_TRACE)
 #define _TIF_SIGPENDING                (1<<TIF_SIGPENDING)
 #define _TIF_NEED_RESCHED      (1<<TIF_NEED_RESCHED)
+#define _TIF_NOTIFY_SIGNAL     (1<<TIF_NOTIFY_SIGNAL)
 #define _TIF_POLLING_NRFLAG    (1<<TIF_POLLING_NRFLAG)
 #define _TIF_32BIT             (1<<TIF_32BIT)
 #define _TIF_RESTORE_TM                (1<<TIF_RESTORE_TM)
@@ -136,7 +138,8 @@ void arch_setup_new_exec(void);
 
 #define _TIF_USER_WORK_MASK    (_TIF_SIGPENDING | _TIF_NEED_RESCHED | \
                                 _TIF_NOTIFY_RESUME | _TIF_UPROBE | \
-                                _TIF_RESTORE_TM | _TIF_PATCH_PENDING)
+                                _TIF_RESTORE_TM | _TIF_PATCH_PENDING | \
+                                _TIF_NOTIFY_SIGNAL)
 #define _TIF_PERSYSCALL_MASK   (_TIF_RESTOREALL|_TIF_NOERROR)
 
 /* Bits in local_flags */
index d2c356f..a8bb0ac 100644 (file)
@@ -318,7 +318,7 @@ void do_notify_resume(struct pt_regs *regs, unsigned long thread_info_flags)
        if (thread_info_flags & _TIF_PATCH_PENDING)
                klp_update_patch_state(current);
 
-       if (thread_info_flags & _TIF_SIGPENDING) {
+       if (thread_info_flags & (_TIF_SIGPENDING | _TIF_NOTIFY_SIGNAL)) {
                BUG_ON(regs != current->thread.regs);
                do_signal(current);
        }