Re: [PATCH] csky: add support for TIF_NOTIFY_SIGNAL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I haven't tested the whole patchset of notify_signal, but the wire-up
code is ok for me.

Acked-by: Guo Ren <guoren@xxxxxxxxxx>


On Fri, Nov 6, 2020 at 12:19 AM Jens Axboe <axboe@xxxxxxxxx> wrote:
>
> Gentle nudge on this one.
>
> On 10/29/20 10:13 AM, Jens Axboe wrote:
> > Wire up TIF_NOTIFY_SIGNAL handling for csky.
> >
> > Cc: linux-csky@xxxxxxxxxxxxxxx
> > Signed-off-by: Jens Axboe <axboe@xxxxxxxxx>
> > ---
> >
> > 5.11 has support queued up for TIF_NOTIFY_SIGNAL, see this posting
> > for details:
> >
> > https://lore.kernel.org/io-uring/20201026203230.386348-1-axboe@xxxxxxxxx/
> >
> > As part of that work, I'm adding TIF_NOTIFY_SIGNAL support to all archs,
> > as that will enable a set of cleanups once all of them support it. I'm
> > happy carrying this patch if need be, or it can be funelled through the
> > arch tree. Let me know.
> >
> >  arch/csky/include/asm/thread_info.h | 5 ++++-
> >  arch/csky/kernel/signal.c           | 2 +-
> >  2 files changed, 5 insertions(+), 2 deletions(-)
> >
> > diff --git a/arch/csky/include/asm/thread_info.h b/arch/csky/include/asm/thread_info.h
> > index 68e7a1227170..21456a3737c2 100644
> > --- a/arch/csky/include/asm/thread_info.h
> > +++ b/arch/csky/include/asm/thread_info.h
> > @@ -64,6 +64,7 @@ static inline struct thread_info *current_thread_info(void)
> >  #define TIF_SYSCALL_TRACE    4       /* syscall trace active */
> >  #define TIF_SYSCALL_TRACEPOINT       5       /* syscall tracepoint instrumentation */
> >  #define TIF_SYSCALL_AUDIT    6       /* syscall auditing */
> > +#define TIF_NOTIFY_SIGNAL    7       /* signal notifications exist */
> >  #define TIF_POLLING_NRFLAG   16      /* poll_idle() is TIF_NEED_RESCHED */
> >  #define TIF_MEMDIE           18      /* is terminating due to OOM killer */
> >  #define TIF_RESTORE_SIGMASK  20      /* restore signal mask in do_signal() */
> > @@ -75,6 +76,7 @@ static inline struct thread_info *current_thread_info(void)
> >  #define _TIF_SYSCALL_TRACE   (1 << TIF_SYSCALL_TRACE)
> >  #define _TIF_SYSCALL_TRACEPOINT      (1 << TIF_SYSCALL_TRACEPOINT)
> >  #define _TIF_SYSCALL_AUDIT   (1 << TIF_SYSCALL_AUDIT)
> > +#define _TIF_NOTIFY_SIGNAL   (1 << TIF_NOTIFY_SIGNAL)
> >  #define _TIF_UPROBE          (1 << TIF_UPROBE)
> >  #define _TIF_POLLING_NRFLAG  (1 << TIF_POLLING_NRFLAG)
> >  #define _TIF_MEMDIE          (1 << TIF_MEMDIE)
> > @@ -82,7 +84,8 @@ static inline struct thread_info *current_thread_info(void)
> >  #define _TIF_SECCOMP         (1 << TIF_SECCOMP)
> >
> >  #define _TIF_WORK_MASK               (_TIF_NEED_RESCHED | _TIF_SIGPENDING | \
> > -                              _TIF_NOTIFY_RESUME | _TIF_UPROBE)
> > +                              _TIF_NOTIFY_RESUME | _TIF_UPROBE | \
> > +                              _TIF_NOTIFY_SIGNAL)
> >
> >  #define _TIF_SYSCALL_WORK    (_TIF_SYSCALL_TRACE | _TIF_SYSCALL_AUDIT | \
> >                                _TIF_SYSCALL_TRACEPOINT | _TIF_SECCOMP)
> > diff --git a/arch/csky/kernel/signal.c b/arch/csky/kernel/signal.c
> > index 8b068cf37447..37ea64ed3c12 100644
> > --- a/arch/csky/kernel/signal.c
> > +++ b/arch/csky/kernel/signal.c
> > @@ -257,7 +257,7 @@ asmlinkage void do_notify_resume(struct pt_regs *regs,
> >               uprobe_notify_resume(regs);
> >
> >       /* Handle pending signal delivery */
> > -     if (thread_info_flags & _TIF_SIGPENDING)
> > +     if (thread_info_flags & (_TIF_SIGPENDING | _TIF_NOTIFY_SIGNAL))
> >               do_signal(regs);
> >
> >       if (thread_info_flags & _TIF_NOTIFY_RESUME) {
> >
>
>
> --
> Jens Axboe
>


--
Best Regards
 Guo Ren

ML: https://lore.kernel.org/linux-csky/



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux