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

Cc: linux-m68k@lists.linux-m68k.org
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
arch/m68k/include/asm/thread_info.h
arch/m68k/kernel/signal.c

index 3689c67..15a7570 100644 (file)
@@ -60,6 +60,7 @@ static inline struct thread_info *current_thread_info(void)
  * bits 0-7 are tested at every exception exit
  * bits 8-15 are also tested at syscall exit
  */
  * bits 0-7 are tested at every exception exit
  * bits 8-15 are also tested at syscall exit
  */
+#define TIF_NOTIFY_SIGNAL      4
 #define TIF_NOTIFY_RESUME      5       /* callback before returning to user */
 #define TIF_SIGPENDING         6       /* signal pending */
 #define TIF_NEED_RESCHED       7       /* rescheduling necessary */
 #define TIF_NOTIFY_RESUME      5       /* callback before returning to user */
 #define TIF_SIGPENDING         6       /* signal pending */
 #define TIF_NEED_RESCHED       7       /* rescheduling necessary */
index 46f91e0..349570f 100644 (file)
@@ -1133,7 +1133,8 @@ static void do_signal(struct pt_regs *regs)
 
 void do_notify_resume(struct pt_regs *regs)
 {
 
 void do_notify_resume(struct pt_regs *regs)
 {
-       if (test_thread_flag(TIF_SIGPENDING))
+       if (test_thread_flag(TIF_NOTIFY_SIGNAL) ||
+           test_thread_flag(TIF_SIGPENDING))
                do_signal(regs);
 
        if (test_thread_flag(TIF_NOTIFY_RESUME))
                do_signal(regs);
 
        if (test_thread_flag(TIF_NOTIFY_RESUME))