Skip to content

Commit 24a31b8

Browse files
committed
riscv: add support for TIF_NOTIFY_SIGNAL
Wire up TIF_NOTIFY_SIGNAL handling for riscv. Cc: [email protected] Signed-off-by: Jens Axboe <[email protected]>
1 parent b13e8bf commit 24a31b8

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

arch/riscv/include/asm/thread_info.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ struct thread_info {
7474
#define TIF_SYSCALL_TRACEPOINT 6 /* syscall tracepoint instrumentation */
7575
#define TIF_SYSCALL_AUDIT 7 /* syscall auditing */
7676
#define TIF_SECCOMP 8 /* syscall secure computing */
77+
#define TIF_NOTIFY_SIGNAL 9 /* signal notifications exist */
7778

7879
#define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE)
7980
#define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME)
@@ -82,9 +83,11 @@ struct thread_info {
8283
#define _TIF_SYSCALL_TRACEPOINT (1 << TIF_SYSCALL_TRACEPOINT)
8384
#define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT)
8485
#define _TIF_SECCOMP (1 << TIF_SECCOMP)
86+
#define _TIF_NOTIFY_SIGNAL (1 << TIF_NOTIFY_SIGNAL)
8587

8688
#define _TIF_WORK_MASK \
87-
(_TIF_NOTIFY_RESUME | _TIF_SIGPENDING | _TIF_NEED_RESCHED)
89+
(_TIF_NOTIFY_RESUME | _TIF_SIGPENDING | _TIF_NEED_RESCHED | \
90+
_TIF_NOTIFY_SIGNAL)
8891

8992
#define _TIF_SYSCALL_WORK \
9093
(_TIF_SYSCALL_TRACE | _TIF_SYSCALL_TRACEPOINT | _TIF_SYSCALL_AUDIT | \

arch/riscv/kernel/signal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ asmlinkage __visible void do_notify_resume(struct pt_regs *regs,
310310
unsigned long thread_info_flags)
311311
{
312312
/* Handle pending signal delivery */
313-
if (thread_info_flags & _TIF_SIGPENDING)
313+
if (thread_info_flags & (_TIF_SIGPENDING | _TIF_NOTIFY_SIGNAL))
314314
do_signal(regs);
315315

316316
if (thread_info_flags & _TIF_NOTIFY_RESUME)

0 commit comments

Comments
 (0)