Skip to content

Commit b13e8bf

Browse files
committed
nds32: add support for TIF_NOTIFY_SIGNAL
Wire up TIF_NOTIFY_SIGNAL handling for nds32. Cc: Nick Hu <[email protected]> Cc: Greentime Hu <[email protected]> Cc: Vincent Chen <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
1 parent b269c22 commit b13e8bf

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

arch/nds32/include/asm/thread_info.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ struct thread_info {
4848
#define TIF_NEED_RESCHED 2
4949
#define TIF_SINGLESTEP 3
5050
#define TIF_NOTIFY_RESUME 4 /* callback before returning to user */
51+
#define TIF_NOTIFY_SIGNAL 5 /* signal notifications exist */
5152
#define TIF_SYSCALL_TRACE 8
5253
#define TIF_POLLING_NRFLAG 17
5354
#define TIF_MEMDIE 18
@@ -57,6 +58,7 @@ struct thread_info {
5758
#define _TIF_SIGPENDING (1 << TIF_SIGPENDING)
5859
#define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED)
5960
#define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME)
61+
#define _TIF_NOTIFY_SIGNAL (1 << TIF_NOTIFY_SIGNAL)
6062
#define _TIF_SINGLESTEP (1 << TIF_SINGLESTEP)
6163
#define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE)
6264
#define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG)

arch/nds32/kernel/ex-exit.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ work_pending:
120120
andi $p1, $r1, #_TIF_NEED_RESCHED
121121
bnez $p1, work_resched
122122

123-
andi $p1, $r1, #_TIF_SIGPENDING|#_TIF_NOTIFY_RESUME
123+
andi $p1, $r1, #_TIF_SIGPENDING|#_TIF_NOTIFY_RESUME|#_TIF_NOTIFY_SIGNAL
124124
beqz $p1, no_work_pending
125125

126126
move $r0, $sp ! 'regs'

arch/nds32/kernel/signal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ static void do_signal(struct pt_regs *regs)
376376
asmlinkage void
377377
do_notify_resume(struct pt_regs *regs, unsigned int thread_flags)
378378
{
379-
if (thread_flags & _TIF_SIGPENDING)
379+
if (thread_flags & (_TIF_SIGPENDING | _TIF_NOTIFY_SIGNAL))
380380
do_signal(regs);
381381

382382
if (thread_flags & _TIF_NOTIFY_RESUME)

0 commit comments

Comments
 (0)