From: Jens Axboe <axboe@kernel.dk>
To: linux-m68k <linux-m68k@lists.linux-m68k.org>
Subject: [PATCH] m68k: add support for TIF_NOTIFY_SIGNAL
Date: Thu, 29 Oct 2020 10:15:39 -0600 [thread overview]
Message-ID: <63245c79-6fa4-49f6-d468-becf9a805ca8@kernel.dk> (raw)
Wire up TIF_NOTIFY_SIGNAL handling for m68k.
Cc: linux-m68k@lists.linux-m68k.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
---
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@kernel.dk/
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/m68k/include/asm/thread_info.h | 1 +
arch/m68k/kernel/signal.c | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/m68k/include/asm/thread_info.h b/arch/m68k/include/asm/thread_info.h
index 3689c6718c88..15a757073fa5 100644
--- a/arch/m68k/include/asm/thread_info.h
+++ b/arch/m68k/include/asm/thread_info.h
@@ -60,6 +60,7 @@ static inline struct thread_info *current_thread_info(void)
* bits 0-7 are tested at every exception exit
* bits 8-15 are also tested at syscall exit
*/
+#define TIF_NOTIFY_SIGNAL 4
#define TIF_NOTIFY_RESUME 5 /* callback before returning to user */
#define TIF_SIGPENDING 6 /* signal pending */
#define TIF_NEED_RESCHED 7 /* rescheduling necessary */
diff --git a/arch/m68k/kernel/signal.c b/arch/m68k/kernel/signal.c
index 46f91e0f6a08..349570f16a78 100644
--- a/arch/m68k/kernel/signal.c
+++ b/arch/m68k/kernel/signal.c
@@ -1133,7 +1133,8 @@ static void do_signal(struct pt_regs *regs)
void do_notify_resume(struct pt_regs *regs)
{
- if (test_thread_flag(TIF_SIGPENDING))
+ if (test_thread_flag(TIF_NOTIFY_SIGNAL) ||
+ test_thread_flag(TIF_SIGPENDING))
do_signal(regs);
if (test_thread_flag(TIF_NOTIFY_RESUME))
--
2.29.0
--
Jens Axboe
next reply other threads:[~2020-10-29 16:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-29 16:15 Jens Axboe [this message]
2020-10-30 8:52 ` [PATCH] m68k: add support for TIF_NOTIFY_SIGNAL Geert Uytterhoeven
2020-10-30 13:22 ` Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=63245c79-6fa4-49f6-d468-becf9a805ca8@kernel.dk \
--to=axboe@kernel.dk \
--cc=linux-m68k@lists.linux-m68k.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox