Skip to content

Commit

Permalink
c6x: add support for TIF_NOTIFY_SIGNAL
Browse files Browse the repository at this point in the history
Wire up TIF_NOTIFY_SIGNAL handling for c6x.

Cc: linux-c6x-dev@linux-c6x.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
axboe committed Dec 12, 2020
1 parent 5a9a889 commit 6d665a4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions arch/c6x/include/asm/thread_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ struct thread_info *current_thread_info(void)
#define TIF_SIGPENDING 2 /* signal pending */
#define TIF_NEED_RESCHED 3 /* rescheduling necessary */
#define TIF_RESTORE_SIGMASK 4 /* restore signal mask in do_signal() */
#define TIF_NOTIFY_SIGNAL 5 /* signal notifications exist */

#define TIF_MEMDIE 17 /* OOM killer killed process */

Expand Down
1 change: 1 addition & 0 deletions arch/c6x/kernel/asm-offsets.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ void foo(void)
DEFINE(_TIF_NOTIFY_RESUME, (1<<TIF_NOTIFY_RESUME));
DEFINE(_TIF_SIGPENDING, (1<<TIF_SIGPENDING));
DEFINE(_TIF_NEED_RESCHED, (1<<TIF_NEED_RESCHED));
DEFINE(_TIF_NOTIFY_SIGNAL, (1<<TIF_NOTIFY_SIGNAL));

DEFINE(_TIF_ALLWORK_MASK, TIF_ALLWORK_MASK);
DEFINE(_TIF_WORK_MASK, TIF_WORK_MASK);
Expand Down
3 changes: 2 additions & 1 deletion arch/c6x/kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include <linux/syscalls.h>
#include <linux/tracehook.h>

#include <asm/asm-offsets.h>
#include <asm/ucontext.h>
#include <asm/cacheflush.h>

Expand Down Expand Up @@ -313,7 +314,7 @@ asmlinkage void do_notify_resume(struct pt_regs *regs, u32 thread_info_flags,
int syscall)
{
/* deal with pending signal delivery */
if (thread_info_flags & (1 << TIF_SIGPENDING))
if (thread_info_flags & (_TIF_SIGPENDING | _TIF_NOTIFY_SIGNAL))
do_signal(regs, syscall);

if (thread_info_flags & (1 << TIF_NOTIFY_RESUME))
Expand Down

0 comments on commit 6d665a4

Please sign in to comment.