OSDN Git Service

alpha: add support for TIF_NOTIFY_SIGNAL
authorJens Axboe <axboe@kernel.dk>
Thu, 8 Oct 2020 15:11:42 +0000 (09:11 -0600)
committerJens Axboe <axboe@kernel.dk>
Sat, 12 Dec 2020 16:16:34 +0000 (09:16 -0700)
Wire up TIF_NOTIFY_SIGNAL handling for alpha.

Cc: linux-alpha@vger.kernel.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
arch/alpha/include/asm/thread_info.h
arch/alpha/kernel/entry.S
arch/alpha/kernel/signal.c

index 807d7b9..2592356 100644 (file)
@@ -62,6 +62,7 @@ register struct thread_info *__current_thread_info __asm__("$8");
 #define TIF_SIGPENDING         2       /* signal pending */
 #define TIF_NEED_RESCHED       3       /* rescheduling necessary */
 #define TIF_SYSCALL_AUDIT      4       /* syscall audit active */
+#define TIF_NOTIFY_SIGNAL      5       /* signal notifications exist */
 #define TIF_DIE_IF_KERNEL      9       /* dik recursion lock */
 #define TIF_MEMDIE             13      /* is terminating due to OOM killer */
 #define TIF_POLLING_NRFLAG     14      /* idle is polling for TIF_NEED_RESCHED */
@@ -71,6 +72,7 @@ register struct thread_info *__current_thread_info __asm__("$8");
 #define _TIF_NEED_RESCHED      (1<<TIF_NEED_RESCHED)
 #define _TIF_NOTIFY_RESUME     (1<<TIF_NOTIFY_RESUME)
 #define _TIF_SYSCALL_AUDIT     (1<<TIF_SYSCALL_AUDIT)
+#define _TIF_NOTIFY_SIGNAL     (1<<TIF_NOTIFY_SIGNAL)
 #define _TIF_POLLING_NRFLAG    (1<<TIF_POLLING_NRFLAG)
 
 /* Work to do on interrupt/exception return.  */
index 2e09248..e227f3a 100644 (file)
@@ -544,7 +544,7 @@ $ret_success:
        .align  4
        .type   work_pending, @function
 work_pending:
-       and     $17, _TIF_NOTIFY_RESUME | _TIF_SIGPENDING, $2
+       and     $17, _TIF_NOTIFY_RESUME | _TIF_SIGPENDING | _TIF_NOTIFY_SIGNAL, $2
        bne     $2, $work_notifysig
 
 $work_resched:
index 3739efc..948b897 100644 (file)
@@ -527,7 +527,7 @@ do_work_pending(struct pt_regs *regs, unsigned long thread_flags,
                        schedule();
                } else {
                        local_irq_enable();
-                       if (thread_flags & _TIF_SIGPENDING) {
+                       if (thread_flags & (_TIF_SIGPENDING|_TIF_NOTIFY_SIGNAL)) {
                                do_signal(regs, r0, r19);
                                r0 = 0;
                        } else {