hexagon: add support for TIF_NOTIFY_SIGNAL
PATCH 1/1 hexagon: add support for TIF_NOTIFY_SIGNAL
Wire up TIF_NOTIFY_SIGNAL handling for hexagon.
---
5.11 has support queued up for TIF_NOTIFY_SIGNAL, see this posting for details:
https://lore.kernel.org/io-uring/[email protected]/
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/hexagon/include/asm/thread_info.h | 2 ++ arch/hexagon/kernel/process.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-)
arch/hexagon/include/asm/thread_info.h +2 -0
@@ -95,6 +95,7 @@ register struct thread_info *__current_thread_info asm(QUOTED_THREADINFO_REG);#define TIF_NEED_RESCHED 3/* rescheduling necessary */ #define TIF_SINGLESTEP 4/* restore ss @ return to usr mode */ #define TIF_RESTORE_SIGMASK 6/* restore sig mask in do_signal() */ +#define TIF_NOTIFY_SIGNAL 7/* signal notifications exist */ /* true if poll_idle() is polling TIF_NEED_RESCHED */ #define TIF_MEMDIE 17/* OOM killer killed process */
@@ -103,6 +104,7 @@ register struct thread_info *__current_thread_info asm(QUOTED_THREADINFO_REG);#define _TIF_SIGPENDING (1 << TIF_SIGPENDING)#define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED)#define _TIF_SINGLESTEP (1 << TIF_SINGLESTEP) +#define _TIF_NOTIFY_SIGNAL (1 << TIF_NOTIFY_SIGNAL)/* work to do on interrupt/exception return - All but TIF_SYSCALL_TRACE */ #define _TIF_WORK_MASK (0x0000FFFF & ~_TIF_SYSCALL_TRACE)
arch/hexagon/kernel/process.c +1 -1
@@ -174,7 +174,7 @@ int do_work_pending(struct pt_regs *regs, u32 thread_info_flags)return 1 ; } -if (thread_info_flags & _TIF_SIGPENDING) { +if (thread_info_flags & (_TIF_SIGPENDING | _TIF_NOTIFY_SIGNAL)) {do_signal (regs);return 1 ; }
Signature · 4 lines
2.29.0 -- Jens Axboe
Gentle nudge on this one.
Quoted 54 lines · Jens Axboe
Wire up
TIF_NOTIFY_SIGNALhandling for hexagon.Signed-off-by Jens Axboe <[email protected]>---
5.11 has support queued up for
TIF_NOTIFY_SIGNAL, see this posting for details:https://lore.kernel.org/io-uring/[email protected]/
As part of that work, I'm adding
TIF_NOTIFY_SIGNALsupport 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/hexagon/include/asm/thread_info.h | 2 ++ arch/hexagon/kernel/process.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-)arch/hexagon/include/asm/thread_info.h +2
-0@@ -95,6 +95,7 @@ register struct thread_info *__current_thread_info asm(QUOTED_THREADINFO_REG);#define TIF_NEED_RESCHED 3/* rescheduling necessary */ #define TIF_SINGLESTEP 4/* restore ss @ return to usr mode */ #define TIF_RESTORE_SIGMASK 6/* restore sig mask in do_signal() */ +#define TIF_NOTIFY_SIGNAL 7/* signal notifications exist */ /* true if poll_idle() is polling TIF_NEED_RESCHED */ #define TIF_MEMDIE 17/* OOM killer killed process */ @@ -103,6 +104,7 @@ register struct thread_info *__current_thread_info asm(QUOTED_THREADINFO_REG);#define _TIF_SIGPENDING (1 << TIF_SIGPENDING)#define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED)#define _TIF_SINGLESTEP (1 << TIF_SINGLESTEP) +#define _TIF_NOTIFY_SIGNAL (1 << TIF_NOTIFY_SIGNAL)/* work to do on interrupt/exception return - All but TIF_SYSCALL_TRACE */ #define _TIF_WORK_MASK (0x0000FFFF & ~_TIF_SYSCALL_TRACE)arch/hexagon/kernel/process.c +1
-1@@ -174,7 +174,7 @@ int do_work_pending(struct pt_regs *regs, u32 thread_info_flags)return 1 ; } -if (thread_info_flags & _TIF_SIGPENDING) { +if (thread_info_flags & (_TIF_SIGPENDING | _TIF_NOTIFY_SIGNAL)) {do_signal (regs);return 1 ; }
Signature · 1 line
Jens Axboe
Quoted 7 lines
-----Original Message-----
From: Jens Axboe <[email protected]>
Sent: Thursday, November 5, 2020 10:19 AM
To: [email protected]
Subject: Re: [PATCH] hexagon: add support forTIF_NOTIFY_SIGNALGentle nudge on this one.
Sorry it slipped off my radar, I'll review it today.
-Brian
Quoted 5 lines
-----Original Message-----
From: Jens Axboe <[email protected]>
Sent: Thursday, October 29, 2020 11:14 AM
To: [email protected]
Subject: [PATCH] hexagon: add support forTIF_NOTIFY_SIGNAL
...
Quoted 14 lines
arch/hexagon/kernel/process.c +1
-1@@ -174,7 +174,7 @@ int do_work_pending(struct pt_regs *regs, u32 thread_info_flags)return 1 ; } -if (thread_info_flags & _TIF_SIGPENDING) { +if (thread_info_flags & (_TIF_SIGPENDING | _TIF_NOTIFY_SIGNAL)) {do_signal (regs);arch/hexagon/kernel/process.c +0
-1return 1 ; } --
Quoted 2 lines
2.29.0
Quoted 13 lines · Brian Cain
Quoted 5 lines
-----Original Message-----
From: Jens Axboe <[email protected]>
Sent: Thursday, October 29, 2020 11:14 AM
To: [email protected]
Subject: [PATCH] hexagon: add support forTIF_NOTIFY_SIGNAL...
Quoted 7 lines
arch/hexagon/kernel/process.c +0
-0@@ -174,7 +174,7 @@ int do_work_pending(struct pt_regs *regs, u32 thread_info_flags)return 1 ; }
Quoted 11 lines
Quoted 9 lines
arch/hexagon/kernel/process.c +1
-1-if (thread_info_flags & _TIF_SIGPENDING) { +if (thread_info_flags & (_TIF_SIGPENDING | _TIF_NOTIFY_SIGNAL)) {do_signal (regs);arch/hexagon/kernel/process.c +0
-1return 1 ; } --2.29.0
Acked-by Brian Cain <[email protected]>
Thanks Brian!
Signature · 1 line
Jens Axboe